From e4eb3047d8c406693af6c2041ec2e5abcf3d883c Mon Sep 17 00:00:00 2001 From: ndefokou Date: Wed, 15 Jan 2025 16:41:25 +0100 Subject: [PATCH 01/14] im[limenting ui for mediatorCoordination --- .../components/MEDIATION-COMPONENTS/App.css | 48 ++++++++++++ .../components/MEDIATION-COMPONENTS/Query.tsx | 74 +++++++++++++++++++ .../MEDIATION-COMPONENTS/Request.tsx | 12 +++ .../src/components/MediatorCoordination.tsx | 22 ++++-- package-lock.json | 10 +-- package.json | 2 +- 6 files changed, 157 insertions(+), 11 deletions(-) create mode 100644 libs/message-handler/services/src/components/MEDIATION-COMPONENTS/App.css create mode 100644 libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx create mode 100644 libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/App.css b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/App.css new file mode 100644 index 0000000..64d0549 --- /dev/null +++ b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/App.css @@ -0,0 +1,48 @@ +.App { + text-align: center; + font-family: Arial, sans-serif; + } + + .form { + margin: 20px auto; + max-width: 400px; + } + + .form-group { + margin-bottom: 15px; + } + + label { + display: block; + margin-bottom: 5px; + font-weight: bold; + } + + input { + width: 100%; + padding: 8px; + box-sizing: border-box; + } + + .actions button { + margin: 10px; + padding: 10px 20px; + cursor: pointer; + } + + .response { + margin-top: 20px; + padding: 10px; + border-radius: 5px; + } + + .response.success { + color: green; + background-color: #e6ffe6; + } + + .response.error { + color: red; + background-color: #ffe6e6; + } + \ No newline at end of file diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx new file mode 100644 index 0000000..a0296f4 --- /dev/null +++ b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx @@ -0,0 +1,74 @@ +import React, { useState } from 'react'; +import './App.css'; + +import mediationCoordination, { + keylistQuery, +} from '../../../../src/mediation-coordination'; +const QueryComponent: React.FC = () => { + const [mediatorDid, setMediatorDid] = useState(''); + const [recipientDid, setRecipientDid] = useState(''); + const [response, setResponse] = useState(null); + const [error, setError] = useState(null); + + // Function to handle mediation coordination + const handleMediationCoordination = async () => { + setError(null); + setResponse(null); + try { + const routingDid = await mediationCoordination(mediatorDid, recipientDid); + setResponse(`Routing DID: ${routingDid}`); + } catch (err) { + setError((err as Error).message); + } + }; + + // Function to handle keylist query + const handleKeylistQuery = async () => { + setError(null); + setResponse(null); + try { + const result = await keylistQuery(mediatorDid, [recipientDid]); + setResponse(`Keylist Query Response: ${JSON.stringify(result)}`); + } catch (err) { + setError((err as Error).message); + } + }; + + return ( +
+

DIDComm Coordination

+
+
+ + setMediatorDid(e.target.value)} + placeholder="Enter Mediator DID" + /> +
+
+ + setRecipientDid(e.target.value)} + placeholder="Enter Recipient DID" + /> +
+
+ + +
+ {response &&
{response}
} + {error &&
{error}
} +
+
+ ); +}; + +export default QueryComponent; + + diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx new file mode 100644 index 0000000..bed4f92 --- /dev/null +++ b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx @@ -0,0 +1,12 @@ +import React from 'react'; + +const RequestComponent: React.FC = () => { + return ( +
+

mediate request Section

+

This is the page where mediate request happens.

+
+ ); +}; + +export default RequestComponent; diff --git a/libs/message-handler/services/src/components/MediatorCoordination.tsx b/libs/message-handler/services/src/components/MediatorCoordination.tsx index 46cce83..fff6bb7 100644 --- a/libs/message-handler/services/src/components/MediatorCoordination.tsx +++ b/libs/message-handler/services/src/components/MediatorCoordination.tsx @@ -1,11 +1,23 @@ -// src/components/MediatorCoordination.tsx import React from 'react'; - +import { Routes, Route, useNavigate } from 'react-router-dom'; +// import QueryComponent from './MEDIATION-COMPONENTS/Query'; +import RequestComponent from './MEDIATION-COMPONENTS/Request'; const MediatorCoordination: React.FC = () => { + const navigate = useNavigate(); + return ( -
-

Mediator Coordination Section

-

This is the page where mediator coordination happens.

+
+
Mediator Cordination
+ +
+ + {/* } /> */} + } /> + +
); }; diff --git a/package-lock.json b/package-lock.json index 8b2275c..6e6c3ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,7 +33,7 @@ "nock": "^13.5.5", "prettier": "^3.3.3", "typescript": "5.6.3", - "vite-plugin-wasm": "^3.3.0", + "vite-plugin-wasm": "^3.4.1", "vitest": "^2.1.4" } }, @@ -7074,13 +7074,13 @@ } }, "node_modules/vite-plugin-wasm": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/vite-plugin-wasm/-/vite-plugin-wasm-3.3.0.tgz", - "integrity": "sha512-tVhz6w+W9MVsOCHzxo6SSMSswCeIw4HTrXEi6qL3IRzATl83jl09JVO1djBqPSwfjgnpVHNLYcaMbaDX5WB/pg==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/vite-plugin-wasm/-/vite-plugin-wasm-3.4.1.tgz", + "integrity": "sha512-ja3nSo2UCkVeitltJGkS3pfQHAanHv/DqGatdI39ja6McgABlpsZ5hVgl6wuR8Qx5etY3T5qgDQhOWzc5RReZA==", "dev": true, "license": "MIT", "peerDependencies": { - "vite": "^2 || ^3 || ^4 || ^5" + "vite": "^2 || ^3 || ^4 || ^5 || ^6" } }, "node_modules/vitest": { diff --git a/package.json b/package.json index 17fe409..6abcfbc 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "nock": "^13.5.5", "prettier": "^3.3.3", "typescript": "5.6.3", - "vite-plugin-wasm": "^3.3.0", + "vite-plugin-wasm": "^3.4.1", "vitest": "^2.1.4" }, "workspaces": [ From 7271199cd009d878eafb0de94127a1806bcbb7e1 Mon Sep 17 00:00:00 2001 From: ndefokou Date: Thu, 16 Jan 2025 16:33:42 +0100 Subject: [PATCH 02/14] implementing the ui for key query and for mediate request --- libs/message-handler/package.json | 4 +- libs/message-handler/services/package.json | 5 + libs/message-handler/services/src/App.tsx | 7 +- .../components/MEDIATION-COMPONENTS/App.css | 48 ------- .../components/MEDIATION-COMPONENTS/Query.tsx | 126 +++++++++--------- .../MEDIATION-COMPONENTS/Request.tsx | 83 +++++++++++- .../MEDIATION-COMPONENTS/request.css | 68 ++++++++++ .../src/components/MediatorCoordination.tsx | 12 +- libs/message-handler/services/vite.config.ts | 11 +- .../src/mediation-coordination.ts | 2 +- 10 files changed, 240 insertions(+), 126 deletions(-) delete mode 100644 libs/message-handler/services/src/components/MEDIATION-COMPONENTS/App.css create mode 100644 libs/message-handler/services/src/components/MEDIATION-COMPONENTS/request.css diff --git a/libs/message-handler/package.json b/libs/message-handler/package.json index 1955ff7..1cb349c 100644 --- a/libs/message-handler/package.json +++ b/libs/message-handler/package.json @@ -12,7 +12,9 @@ "format:check": "prettier --check .", "preview": "vite preview" }, - "dependencies": {}, + "dependencies": { + "uuidv4": "^6.2.13" + }, "devDependencies": { "@babel/preset-typescript": "^7.25.9", "@eslint/js": "^9.11.1", diff --git a/libs/message-handler/services/package.json b/libs/message-handler/services/package.json index 9f9c9f7..a3c00b9 100644 --- a/libs/message-handler/services/package.json +++ b/libs/message-handler/services/package.json @@ -19,5 +19,10 @@ "typescript": "~5.6.2", "typescript-eslint": "^8.18.2", "vite": "^6.0.5" + }, + "dependencies": { + "message-handler": "^0.0.17", + "uuid": "^11.0.5", + "uuidv4": "^6.2.13" } } diff --git a/libs/message-handler/services/src/App.tsx b/libs/message-handler/services/src/App.tsx index d3e4e23..0547f6f 100644 --- a/libs/message-handler/services/src/App.tsx +++ b/libs/message-handler/services/src/App.tsx @@ -5,15 +5,20 @@ import MediatorApp from './data-collection'; import MediatorCoordination from './components/MediatorCoordination'; import PickupComponent from './components/PickupRequest'; import ForwardComponent from './components/ForwardRequest'; +import QueryComponent from './components/MEDIATION-COMPONENTS/Query'; +import RequestComponent from './components/MEDIATION-COMPONENTS/Request'; const App: React.FC = () => { return ( } /> - } /> + } /> } /> } /> + } /> + } /> + 404 - Page Not Found
} /> ); diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/App.css b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/App.css deleted file mode 100644 index 64d0549..0000000 --- a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/App.css +++ /dev/null @@ -1,48 +0,0 @@ -.App { - text-align: center; - font-family: Arial, sans-serif; - } - - .form { - margin: 20px auto; - max-width: 400px; - } - - .form-group { - margin-bottom: 15px; - } - - label { - display: block; - margin-bottom: 5px; - font-weight: bold; - } - - input { - width: 100%; - padding: 8px; - box-sizing: border-box; - } - - .actions button { - margin: 10px; - padding: 10px 20px; - cursor: pointer; - } - - .response { - margin-top: 20px; - padding: 10px; - border-radius: 5px; - } - - .response.success { - color: green; - background-color: #e6ffe6; - } - - .response.error { - color: red; - background-color: #ffe6e6; - } - \ No newline at end of file diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx index a0296f4..ffb5a55 100644 --- a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx +++ b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx @@ -1,74 +1,80 @@ import React, { useState } from 'react'; -import './App.css'; +import { TextField, Button, CircularProgress, Box, Typography } from '@mui/material'; +import { keylistQuery } from './../../../../src/mediation-coordination'; +import { Message } from 'didcomm'; -import mediationCoordination, { - keylistQuery, -} from '../../../../src/mediation-coordination'; -const QueryComponent: React.FC = () => { - const [mediatorDid, setMediatorDid] = useState(''); + +const KeylistQueryUI = () => { const [recipientDid, setRecipientDid] = useState(''); - const [response, setResponse] = useState(null); + const [mediatorDid, setMediatorDid] = useState(''); + const [isLoading, setIsLoading] = useState(false); + const [result, setResult] = useState(null); const [error, setError] = useState(null); - - // Function to handle mediation coordination - const handleMediationCoordination = async () => { - setError(null); - setResponse(null); - try { - const routingDid = await mediationCoordination(mediatorDid, recipientDid); - setResponse(`Routing DID: ${routingDid}`); - } catch (err) { - setError((err as Error).message); - } - }; - - // Function to handle keylist query const handleKeylistQuery = async () => { + setIsLoading(true); setError(null); - setResponse(null); try { - const result = await keylistQuery(mediatorDid, [recipientDid]); - setResponse(`Keylist Query Response: ${JSON.stringify(result)}`); - } catch (err) { - setError((err as Error).message); + const response = await keylistQuery(mediatorDid, [recipientDid]); + setResult(response); + } catch (err: any) { + setError('Error executing keylist query: ' + err.message); + } finally { + setIsLoading(false); } }; return ( -
-

DIDComm Coordination

-
-
- - setMediatorDid(e.target.value)} - placeholder="Enter Mediator DID" - /> -
-
- - setRecipientDid(e.target.value)} - placeholder="Enter Recipient DID" - /> -
-
- - -
- {response &&
{response}
} - {error &&
{error}
} -
-
- ); -}; + + + Keylist Query + + + setRecipientDid(e.target.value)} + margin="normal" + /> + + setMediatorDid(e.target.value)} + margin="normal" + /> -export default QueryComponent; + + {isLoading && ( + + + + )} + + {result && ( + + Query Result: +
{JSON.stringify(result, null, 2)}
+
+ )} + + {error && ( + + {error} + + )} +
+ ); +}; +export default KeylistQueryUI; diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx index bed4f92..550df23 100644 --- a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx +++ b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx @@ -1,12 +1,83 @@ -import React from 'react'; +import React, { useState } from 'react'; +import './request.css'; + +const MediateRequestUI: React.FC = () => { + const [mediatorDid, setMediatorDid] = useState(''); + const [recipientDid, setRecipientDid] = useState(''); + const [loading, setLoading] = useState(false); + const [response, setResponse] = useState(null); + const [error, setError] = useState(null); + + const handleMediateRequest = async () => { + setLoading(true); + setError(null); + setResponse(null); + + try { + const body = { mediatorDid, recipientDid }; + const res = await fetch('http://localhost:3000/', { + method: 'POST', + headers: { + 'Content-Type': 'application/didcomm-encrypted+json', + }, + body: JSON.stringify(body), + }); + + if (!res.ok) { + // throw new Error(`Request failed: ${res.statusText}`); + } + + const data = await res.json(); + setResponse(JSON.stringify(data, null, 2)); + } catch (err: any) { + setError(err.message); + } finally { + setLoading(false); + } + }; -const RequestComponent: React.FC = () => { return ( -
-

mediate request Section

-

This is the page where mediate request happens.

+
+

Mediation Request

+
{ + e.preventDefault(); + handleMediateRequest(); + }} + > +
+ + setMediatorDid(e.target.value)} + required + /> +
+
+ + setRecipientDid(e.target.value)} + required + /> +
+ +
+ {error &&

Error: {error}

} + {response && ( +
+

Response:

+
{response}
+
+ )}
); }; -export default RequestComponent; +export default MediateRequestUI; diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/request.css b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/request.css new file mode 100644 index 0000000..f23e123 --- /dev/null +++ b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/request.css @@ -0,0 +1,68 @@ +.mediate-request-ui { + font-family: Arial, sans-serif; + margin: 20px auto; + max-width: 600px; + padding: 20px; + border: 1px solid #ddd; + border-radius: 8px; + background-color: #f9f9f9; + } + + h1 { + text-align: center; + color: #333; + } + + .form-group { + margin-bottom: 15px; + } + + label { + display: block; + margin-bottom: 5px; + font-weight: bold; + } + + input { + width: 100%; + padding: 10px; + font-size: 1rem; + border: 1px solid #ccc; + border-radius: 4px; + } + + button { + display: block; + width: 100%; + padding: 10px; + font-size: 1rem; + background-color: #007bff; + color: #fff; + border: none; + border-radius: 4px; + cursor: pointer; + } + + button:disabled { + background-color: #aaa; + } + + .error { + color: red; + margin-top: 10px; + } + + .response { + margin-top: 20px; + background-color: #e8f5e9; + padding: 10px; + border-radius: 4px; + } + + pre { + overflow-x: auto; + white-space: pre-wrap; + word-wrap: break-word; + color: #333; + } + \ No newline at end of file diff --git a/libs/message-handler/services/src/components/MediatorCoordination.tsx b/libs/message-handler/services/src/components/MediatorCoordination.tsx index fff6bb7..96aab3c 100644 --- a/libs/message-handler/services/src/components/MediatorCoordination.tsx +++ b/libs/message-handler/services/src/components/MediatorCoordination.tsx @@ -1,21 +1,23 @@ import React from 'react'; import { Routes, Route, useNavigate } from 'react-router-dom'; -// import QueryComponent from './MEDIATION-COMPONENTS/Query'; +import QueryComponent from './MEDIATION-COMPONENTS/Query'; import RequestComponent from './MEDIATION-COMPONENTS/Request'; + const MediatorCoordination: React.FC = () => { const navigate = useNavigate(); return (
-
Mediator Cordination
+
Mediator Coordination
- {/* } /> */} - } /> + } /> + } />
diff --git a/libs/message-handler/services/vite.config.ts b/libs/message-handler/services/vite.config.ts index 4a5def4..4a207bc 100644 --- a/libs/message-handler/services/vite.config.ts +++ b/libs/message-handler/services/vite.config.ts @@ -1,7 +1,10 @@ -import { defineConfig } from 'vite'; -import react from '@vitejs/plugin-react'; +import wasm from 'vite-plugin-wasm'; +import nodePolyfills from 'rollup-plugin-node-polyfills'; +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' // https://vite.dev/config/ export default defineConfig({ - plugins: [react()], -}); + plugins: [react(),wasm(),nodePolyfills()], + +}) diff --git a/libs/message-handler/src/mediation-coordination.ts b/libs/message-handler/src/mediation-coordination.ts index 7a30855..15fbb40 100644 --- a/libs/message-handler/src/mediation-coordination.ts +++ b/libs/message-handler/src/mediation-coordination.ts @@ -1,11 +1,11 @@ import { DIDDoc, IMessage, Message } from 'didcomm'; import { DIDResolver, SecretsResolver } from 'didcomm'; -import { uuid as uuidv4 } from 'uuidv4'; import { ExampleDIDResolver, ExampleSecretsResolver, PeerDIDResolver, } from 'did-resolver-lib'; +import { v4 as uuidv4 } from 'uuid'; enum Action { add = 'add', From 946bed08133c8ccc13f8bd7bca162bb5d46aaaa1 Mon Sep 17 00:00:00 2001 From: ndefokou Date: Mon, 20 Jan 2025 11:13:52 +0100 Subject: [PATCH 03/14] implementing the ui for key query and for mediate request --- .../src/components/MediatorCoordination.tsx | 1 - package-lock.json | 1080 ++++++++++++++++- package.json | 7 +- 3 files changed, 1039 insertions(+), 49 deletions(-) diff --git a/libs/message-handler/services/src/components/MediatorCoordination.tsx b/libs/message-handler/services/src/components/MediatorCoordination.tsx index 96aab3c..2fa38c6 100644 --- a/libs/message-handler/services/src/components/MediatorCoordination.tsx +++ b/libs/message-handler/services/src/components/MediatorCoordination.tsx @@ -10,7 +10,6 @@ const MediatorCoordination: React.FC = () => {
Mediator Coordination
diff --git a/package-lock.json b/package-lock.json index 6e6c3ff..541994c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,9 +13,13 @@ "libs/message-handler" ], "dependencies": { + "@emotion/react": "^11.14.0", + "@emotion/styled": "^11.14.0", + "@mui/material": "^6.4.0", "base64url": "^3.0.1", "react-router-dom": "^7.1.1", - "uuid": "^11.0.2", + "util": "^0.12.5", + "uuid": "^11.0.5", "uuidv4": "^6.2.13" }, "devDependencies": { @@ -32,6 +36,7 @@ "jsonc-eslint-parser": "^2.4.0", "nock": "^13.5.5", "prettier": "^3.3.3", + "rollup-plugin-node-polyfills": "^0.2.1", "typescript": "5.6.3", "vite-plugin-wasm": "^3.4.1", "vitest": "^2.1.4" @@ -57,6 +62,9 @@ "libs/message-handler": { "version": "0.0.0", "license": "ISC", + "dependencies": { + "uuidv4": "^6.2.13" + }, "devDependencies": { "@babel/preset-typescript": "^7.25.9", "@eslint/js": "^9.11.1", @@ -140,7 +148,6 @@ "version": "7.26.2", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", - "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", "js-tokens": "^4.0.0", @@ -193,7 +200,6 @@ "version": "7.26.2", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.2.tgz", "integrity": "sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==", - "dev": true, "dependencies": { "@babel/parser": "^7.26.2", "@babel/types": "^7.26.0", @@ -273,7 +279,6 @@ "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", - "dev": true, "dependencies": { "@babel/traverse": "^7.25.9", "@babel/types": "^7.25.9" @@ -373,7 +378,6 @@ "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -383,7 +387,6 @@ "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "dev": true, "engines": { "node": ">=6.9.0" } @@ -420,7 +423,6 @@ "version": "7.26.2", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", - "dev": true, "dependencies": { "@babel/types": "^7.26.0" }, @@ -765,11 +767,22 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/runtime": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/template": { "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", - "dev": true, "dependencies": { "@babel/code-frame": "^7.25.9", "@babel/parser": "^7.25.9", @@ -783,7 +796,6 @@ "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.9.tgz", "integrity": "sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==", - "dev": true, "dependencies": { "@babel/code-frame": "^7.25.9", "@babel/generator": "^7.25.9", @@ -801,7 +813,6 @@ "version": "7.26.0", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", - "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.25.9", "@babel/helper-validator-identifier": "^7.25.9" @@ -841,6 +852,167 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@emotion/babel-plugin": { + "version": "11.13.5", + "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.13.5.tgz", + "integrity": "sha512-pxHCpT2ex+0q+HH91/zsdHkw/lXd468DIN2zvfvLtPKLLMo6gQj7oLObq8PhkrxOZb/gGCq03S3Z7PDhS8pduQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.16.7", + "@babel/runtime": "^7.18.3", + "@emotion/hash": "^0.9.2", + "@emotion/memoize": "^0.9.0", + "@emotion/serialize": "^1.3.3", + "babel-plugin-macros": "^3.1.0", + "convert-source-map": "^1.5.0", + "escape-string-regexp": "^4.0.0", + "find-root": "^1.1.0", + "source-map": "^0.5.7", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/babel-plugin/node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "license": "MIT" + }, + "node_modules/@emotion/babel-plugin/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@emotion/cache": { + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.14.0.tgz", + "integrity": "sha512-L/B1lc/TViYk4DcpGxtAVbx0ZyiKM5ktoIyafGkH6zg/tj+mA+NE//aPYKG0k8kCHSHVJrpLpcAlOBEXQ3SavA==", + "license": "MIT", + "dependencies": { + "@emotion/memoize": "^0.9.0", + "@emotion/sheet": "^1.4.0", + "@emotion/utils": "^1.4.2", + "@emotion/weak-memoize": "^0.4.0", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/hash": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.2.tgz", + "integrity": "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==", + "license": "MIT" + }, + "node_modules/@emotion/is-prop-valid": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.3.1.tgz", + "integrity": "sha512-/ACwoqx7XQi9knQs/G0qKvv5teDMhD7bXYns9N/wM8ah8iNb8jZ2uNO0YOgiq2o2poIvVtJS2YALasQuMSQ7Kw==", + "license": "MIT", + "dependencies": { + "@emotion/memoize": "^0.9.0" + } + }, + "node_modules/@emotion/memoize": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.9.0.tgz", + "integrity": "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==", + "license": "MIT" + }, + "node_modules/@emotion/react": { + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.14.0.tgz", + "integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.13.5", + "@emotion/cache": "^11.14.0", + "@emotion/serialize": "^1.3.3", + "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", + "@emotion/utils": "^1.4.2", + "@emotion/weak-memoize": "^0.4.0", + "hoist-non-react-statics": "^3.3.1" + }, + "peerDependencies": { + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/serialize": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.3.3.tgz", + "integrity": "sha512-EISGqt7sSNWHGI76hC7x1CksiXPahbxEOrC5RjmFRJTqLyEK9/9hZvBbiYn70dw4wuwMKiEMCUlR6ZXTSWQqxA==", + "license": "MIT", + "dependencies": { + "@emotion/hash": "^0.9.2", + "@emotion/memoize": "^0.9.0", + "@emotion/unitless": "^0.10.0", + "@emotion/utils": "^1.4.2", + "csstype": "^3.0.2" + } + }, + "node_modules/@emotion/sheet": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.4.0.tgz", + "integrity": "sha512-fTBW9/8r2w3dXWYM4HCB1Rdp8NLibOw2+XELH5m5+AkWiL/KqYX6dc0kKYlaYyKjrQ6ds33MCdMPEwgs2z1rqg==", + "license": "MIT" + }, + "node_modules/@emotion/styled": { + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.0.tgz", + "integrity": "sha512-XxfOnXFffatap2IyCeJyNov3kiDQWoR08gPUQxvbL7fxKryGBKUZUkG6Hz48DZwVrJSVh9sJboyV1Ds4OW6SgA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.13.5", + "@emotion/is-prop-valid": "^1.3.0", + "@emotion/serialize": "^1.3.3", + "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", + "@emotion/utils": "^1.4.2" + }, + "peerDependencies": { + "@emotion/react": "^11.0.0-rc.0", + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/unitless": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.10.0.tgz", + "integrity": "sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg==", + "license": "MIT" + }, + "node_modules/@emotion/use-insertion-effect-with-fallbacks": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.2.0.tgz", + "integrity": "sha512-yJMtVdH59sxi/aVJBpk9FQq+OR8ll5GT8oWd57UpeaKEVGab41JWaCFA7FRLoMLloOZF/c/wsPoe+bfGmRKgDg==", + "license": "MIT", + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@emotion/utils": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.4.2.tgz", + "integrity": "sha512-3vLclRofFziIa3J2wDh9jjbkUz9qk5Vi3IZ/FSTKViB0k+ef0fPV7dYrUIugbgupYDx7v9ud/SjrtEP8Y4xLoA==", + "license": "MIT" + }, + "node_modules/@emotion/weak-memoize": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz", + "integrity": "sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==", + "license": "MIT" + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", @@ -1843,7 +2015,6 @@ "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.2.1", @@ -1858,7 +2029,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.0.0" @@ -1868,7 +2038,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.0.0" @@ -1878,20 +2047,234 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@mui/core-downloads-tracker": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-6.4.0.tgz", + "integrity": "sha512-6u74wi+9zeNlukrCtYYET8Ed/n9AS27DiaXCZKAD3TRGFaqiyYSsQgN2disW83pI/cM1Q2lJY1JX4YfwvNtlNw==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + } + }, + "node_modules/@mui/material": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-6.4.0.tgz", + "integrity": "sha512-hNIgwdM9U3DNmowZ8mU59oFmWoDKjc92FqQnQva3Pxh6xRKWtD2Ej7POUHMX8Dwr1OpcSUlT2+tEMeLb7WYsIg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/core-downloads-tracker": "^6.4.0", + "@mui/system": "^6.4.0", + "@mui/types": "^7.2.21", + "@mui/utils": "^6.4.0", + "@popperjs/core": "^2.11.8", + "@types/react-transition-group": "^4.4.12", + "clsx": "^2.1.1", + "csstype": "^3.1.3", + "prop-types": "^15.8.1", + "react-is": "^19.0.0", + "react-transition-group": "^4.4.5" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@mui/material-pigment-css": "^6.4.0", + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@mui/material-pigment-css": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/material/node_modules/react-is": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.0.0.tgz", + "integrity": "sha512-H91OHcwjZsbq3ClIDHMzBShc1rotbfACdWENsmEf0IFvZ3FgGPtdHMcsv45bQ1hAbgdfiA8SnxTKfDS+x/8m2g==", + "license": "MIT" + }, + "node_modules/@mui/private-theming": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-6.4.0.tgz", + "integrity": "sha512-rNHci8MP6NOdEWAfZ/RBMO5Rhtp1T6fUDMSmingg9F1T6wiUeodIQ+NuTHh2/pMoUSeP9GdHdgMhMmfsXxOMuw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/utils": "^6.4.0", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/styled-engine": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-6.4.0.tgz", + "integrity": "sha512-ek/ZrDujrger12P6o4luQIfRd2IziH7jQod2WMbLqGE03Iy0zUwYmckRTVhRQTLPNccpD8KXGcALJF+uaUQlbg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@emotion/cache": "^11.13.5", + "@emotion/serialize": "^1.3.3", + "@emotion/sheet": "^1.4.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.4.1", + "@emotion/styled": "^11.3.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + } + } + }, + "node_modules/@mui/system": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-6.4.0.tgz", + "integrity": "sha512-wTDyfRlaZCo2sW2IuOsrjeE5dl0Usrs6J7DxE3GwNCVFqS5wMplM2YeNiV3DO7s53RfCqbho+gJY6xaB9KThUA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/private-theming": "^6.4.0", + "@mui/styled-engine": "^6.4.0", + "@mui/types": "^7.2.21", + "@mui/utils": "^6.4.0", + "clsx": "^2.1.1", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/types": { + "version": "7.2.21", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.21.tgz", + "integrity": "sha512-6HstngiUxNqLU+/DPqlUJDIPbzUBxIVHb1MmXP0eTWDIROiCR2viugXpEif0PPe2mLqqakPzzRClWAnK+8UJww==", + "license": "MIT", + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/utils": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-6.4.0.tgz", + "integrity": "sha512-woOTATWNsTNR3YBh2Ixkj3l5RaxSiGoC9G8gOpYoFw1mZM77LWJeuMHFax7iIW4ahK0Cr35TF9DKtrafJmOmNQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/types": "^7.2.21", + "@types/prop-types": "^15.7.14", + "clsx": "^2.1.1", + "prop-types": "^15.8.1", + "react-is": "^19.0.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/utils/node_modules/react-is": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.0.0.tgz", + "integrity": "sha512-H91OHcwjZsbq3ClIDHMzBShc1rotbfACdWENsmEf0IFvZ3FgGPtdHMcsv45bQ1hAbgdfiA8SnxTKfDS+x/8m2g==", + "license": "MIT" + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1930,6 +2313,16 @@ "node": ">= 8" } }, + "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==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.24.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.4.tgz", @@ -2360,24 +2753,37 @@ "undici-types": "~6.19.8" } }, + "node_modules/@types/parse-json": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", + "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==", + "license": "MIT" + }, "node_modules/@types/prop-types": { - "version": "15.7.13", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.13.tgz", - "integrity": "sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==", - "dev": true, + "version": "15.7.14", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.14.tgz", + "integrity": "sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==", "license": "MIT" }, "node_modules/@types/react": { "version": "18.3.12", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.12.tgz", "integrity": "sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==", - "dev": true, "license": "MIT", "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" } }, + "node_modules/@types/react-transition-group": { + "version": "4.4.12", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.12.tgz", + "integrity": "sha512-8TV6R3h2j7a91c+1DXdJi3Syo69zzIZbz7Lg5tORM5LEJG7X/E6a1V3drRyBRZq7/utz7A+c4OgYLiLcYGHG6w==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*" + } + }, "node_modules/@types/stack-utils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", @@ -2893,6 +3299,21 @@ "dev": true, "license": "MIT" }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/axios": { "version": "1.7.7", "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", @@ -2974,6 +3395,21 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/babel-plugin-macros": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", + "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.12.5", + "cosmiconfig": "^7.0.0", + "resolve": "^1.19.0" + }, + "engines": { + "node": ">=10", + "npm": ">=6" + } + }, "node_modules/babel-preset-current-node-syntax": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", @@ -3129,11 +3565,57 @@ "node": ">=8" } }, + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -3261,6 +3743,15 @@ "node": ">=12" } }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -3335,6 +3826,22 @@ "node": ">=18" } }, + "node_modules/cosmiconfig": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", + "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", + "license": "MIT", + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/create-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", @@ -3383,14 +3890,12 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "dev": true, "license": "MIT" }, "node_modules/debug": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -3446,6 +3951,23 @@ "node": ">=0.10.0" } }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -3496,6 +4018,30 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ejs": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", @@ -3543,12 +4089,41 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" } }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/esbuild": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", @@ -3602,7 +4177,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -4069,6 +4643,12 @@ "node": ">=8" } }, + "node_modules/find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", + "license": "MIT" + }, "node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -4125,6 +4705,15 @@ } } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/form-data": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", @@ -4166,7 +4755,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4192,6 +4780,30 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-intrinsic": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", + "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "function-bind": "^1.1.2", + "get-proto": "^1.0.0", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", @@ -4202,6 +4814,19 @@ "node": ">=8.0.0" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -4278,12 +4903,23 @@ "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, "license": "MIT", "engines": { "node": ">=4" } }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -4308,11 +4944,49 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -4321,6 +4995,21 @@ "node": ">= 0.4" } }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "license": "BSD-3-Clause", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "license": "MIT" + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -4352,7 +5041,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, "license": "MIT", "dependencies": { "parent-module": "^1.0.0", @@ -4369,7 +5057,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -4421,14 +5108,28 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, "license": "ISC" }, + "node_modules/is-arguments": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz", + "integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true, "license": "MIT" }, "node_modules/is-buffer": { @@ -4455,11 +5156,22 @@ "node": ">=4" } }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-core-module": { "version": "2.15.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", - "dev": true, "license": "MIT", "dependencies": { "hasown": "^2.0.2" @@ -4501,6 +5213,24 @@ "node": ">=6" } }, + "node_modules/is-generator-function": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", + "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-proto": "^1.0.0", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -4524,6 +5254,24 @@ "node": ">=0.12.0" } }, + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -4537,6 +5285,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -5270,7 +6033,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, "license": "MIT" }, "node_modules/js-yaml": { @@ -5291,7 +6053,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", - "dev": true, "license": "MIT", "bin": { "jsesc": "bin/jsesc" @@ -5311,7 +6072,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, "license": "MIT" }, "node_modules/json-schema-traverse": { @@ -5446,7 +6206,6 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true, "license": "MIT" }, "node_modules/locate-path": { @@ -5476,6 +6235,18 @@ "dev": true, "license": "MIT" }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, "node_modules/loupe": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.2.tgz", @@ -5548,6 +6319,15 @@ "tmpl": "1.0.5" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -5636,7 +6416,6 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, "license": "MIT" }, "node_modules/nanoid": { @@ -5717,6 +6496,15 @@ "node": ">=8" } }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -5820,7 +6608,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, "license": "MIT", "dependencies": { "callsites": "^3.0.0" @@ -5833,7 +6620,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.0.0", @@ -5882,9 +6668,17 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, "license": "MIT" }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/pathe": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", @@ -5906,7 +6700,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, "license": "ISC" }, "node_modules/picomatch": { @@ -5945,6 +6738,15 @@ "node": ">=8" } }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/postcss": { "version": "8.4.47", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", @@ -6042,6 +6844,23 @@ "node": ">= 6" } }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "license": "MIT" + }, "node_modules/propagate": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", @@ -6186,6 +7005,28 @@ "react-dom": ">=18" } }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "license": "BSD-3-Clause", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "license": "MIT" + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -6200,7 +7041,6 @@ "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, "license": "MIT", "dependencies": { "is-core-module": "^2.13.0", @@ -6296,6 +7136,63 @@ "fsevents": "~2.3.2" } }, + "node_modules/rollup-plugin-inject": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-inject/-/rollup-plugin-inject-3.0.2.tgz", + "integrity": "sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w==", + "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.", + "dev": true, + "license": "MIT", + "dependencies": { + "estree-walker": "^0.6.1", + "magic-string": "^0.25.3", + "rollup-pluginutils": "^2.8.1" + } + }, + "node_modules/rollup-plugin-inject/node_modules/estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/rollup-plugin-inject/node_modules/magic-string": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "sourcemap-codec": "^1.4.8" + } + }, + "node_modules/rollup-plugin-node-polyfills": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-polyfills/-/rollup-plugin-node-polyfills-0.2.1.tgz", + "integrity": "sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA==", + "dev": true, + "license": "MIT", + "dependencies": { + "rollup-plugin-inject": "^3.0.0" + } + }, + "node_modules/rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "estree-walker": "^0.6.1" + } + }, + "node_modules/rollup-pluginutils/node_modules/estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true, + "license": "MIT" + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -6320,6 +7217,23 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/scheduler": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz", @@ -6343,6 +7257,23 @@ "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", "license": "MIT" }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -6428,6 +7359,14 @@ "source-map": "^0.6.0" } }, + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "deprecated": "Please use @jridgewell/sourcemap-codec instead", + "dev": true, + "license": "MIT" + }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -6547,6 +7486,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/stylis": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz", + "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==", + "license": "MIT" + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -6564,7 +7509,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -6936,10 +7880,23 @@ "punycode": "^2.1.0" } }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, "node_modules/uuid": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.2.tgz", - "integrity": "sha512-14FfcOJmqdjbBPdDjFQyk/SdT4NySW4eM0zcG+HqbHP5jzuH56xO3J1DGhgs/cEMCfwYi3HQI1gnTO62iaG+tQ==", + "version": "11.0.5", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.5.tgz", + "integrity": "sha512-508e6IcKLrhxKdBbcA2b4KQZlLVp2+J5UwQ6F7Drckkc5N9ZJwFa4TgWtsww9UG8fGHbm6gbV19TdM5pQ4GaIA==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" @@ -7175,6 +8132,26 @@ "node": ">= 8" } }, + "node_modules/which-typed-array": { + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.18.tgz", + "integrity": "sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==", + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/why-is-node-running": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", @@ -7258,6 +8235,15 @@ "dev": true, "license": "ISC" }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", diff --git a/package.json b/package.json index 6abcfbc..5d65031 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "jsonc-eslint-parser": "^2.4.0", "nock": "^13.5.5", "prettier": "^3.3.3", + "rollup-plugin-node-polyfills": "^0.2.1", "typescript": "5.6.3", "vite-plugin-wasm": "^3.4.1", "vitest": "^2.1.4" @@ -37,9 +38,13 @@ "libs/message-handler" ], "dependencies": { + "@emotion/react": "^11.14.0", + "@emotion/styled": "^11.14.0", + "@mui/material": "^6.4.0", "base64url": "^3.0.1", "react-router-dom": "^7.1.1", - "uuid": "^11.0.2", + "util": "^0.12.5", + "uuid": "^11.0.5", "uuidv4": "^6.2.13" } } From 05f7b7f3560237b06f9c3d4f933230181f74860a Mon Sep 17 00:00:00 2001 From: ndefokou Date: Mon, 20 Jan 2025 11:23:48 +0100 Subject: [PATCH 04/14] fixe():formating fils --- .../components/MEDIATION-COMPONENTS/Query.tsx | 13 +- .../MEDIATION-COMPONENTS/Request.tsx | 6 +- .../MEDIATION-COMPONENTS/request.css | 133 +++++++++--------- .../src/components/MediatorCoordination.tsx | 4 +- libs/message-handler/services/vite.config.ts | 9 +- 5 files changed, 85 insertions(+), 80 deletions(-) diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx index ffb5a55..d94a1d3 100644 --- a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx +++ b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx @@ -1,14 +1,19 @@ import React, { useState } from 'react'; -import { TextField, Button, CircularProgress, Box, Typography } from '@mui/material'; +import { + TextField, + Button, + CircularProgress, + Box, + Typography, +} from '@mui/material'; import { keylistQuery } from './../../../../src/mediation-coordination'; -import { Message } from 'didcomm'; - +import { Message } from 'didcomm'; const KeylistQueryUI = () => { const [recipientDid, setRecipientDid] = useState(''); const [mediatorDid, setMediatorDid] = useState(''); const [isLoading, setIsLoading] = useState(false); - const [result, setResult] = useState(null); + const [result, setResult] = useState(null); const [error, setError] = useState(null); const handleKeylistQuery = async () => { setIsLoading(true); diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx index 550df23..d9bafe2 100644 --- a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx +++ b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import './request.css'; +import './request.css'; const MediateRequestUI: React.FC = () => { const [mediatorDid, setMediatorDid] = useState(''); @@ -18,11 +18,11 @@ const MediateRequestUI: React.FC = () => { const res = await fetch('http://localhost:3000/', { method: 'POST', headers: { - 'Content-Type': 'application/didcomm-encrypted+json', + 'Content-Type': 'application/didcomm-encrypted+json', }, body: JSON.stringify(body), }); - + if (!res.ok) { // throw new Error(`Request failed: ${res.statusText}`); } diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/request.css b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/request.css index f23e123..84da632 100644 --- a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/request.css +++ b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/request.css @@ -1,68 +1,67 @@ .mediate-request-ui { - font-family: Arial, sans-serif; - margin: 20px auto; - max-width: 600px; - padding: 20px; - border: 1px solid #ddd; - border-radius: 8px; - background-color: #f9f9f9; - } - - h1 { - text-align: center; - color: #333; - } - - .form-group { - margin-bottom: 15px; - } - - label { - display: block; - margin-bottom: 5px; - font-weight: bold; - } - - input { - width: 100%; - padding: 10px; - font-size: 1rem; - border: 1px solid #ccc; - border-radius: 4px; - } - - button { - display: block; - width: 100%; - padding: 10px; - font-size: 1rem; - background-color: #007bff; - color: #fff; - border: none; - border-radius: 4px; - cursor: pointer; - } - - button:disabled { - background-color: #aaa; - } - - .error { - color: red; - margin-top: 10px; - } - - .response { - margin-top: 20px; - background-color: #e8f5e9; - padding: 10px; - border-radius: 4px; - } - - pre { - overflow-x: auto; - white-space: pre-wrap; - word-wrap: break-word; - color: #333; - } - \ No newline at end of file + font-family: Arial, sans-serif; + margin: 20px auto; + max-width: 600px; + padding: 20px; + border: 1px solid #ddd; + border-radius: 8px; + background-color: #f9f9f9; +} + +h1 { + text-align: center; + color: #333; +} + +.form-group { + margin-bottom: 15px; +} + +label { + display: block; + margin-bottom: 5px; + font-weight: bold; +} + +input { + width: 100%; + padding: 10px; + font-size: 1rem; + border: 1px solid #ccc; + border-radius: 4px; +} + +button { + display: block; + width: 100%; + padding: 10px; + font-size: 1rem; + background-color: #007bff; + color: #fff; + border: none; + border-radius: 4px; + cursor: pointer; +} + +button:disabled { + background-color: #aaa; +} + +.error { + color: red; + margin-top: 10px; +} + +.response { + margin-top: 20px; + background-color: #e8f5e9; + padding: 10px; + border-radius: 4px; +} + +pre { + overflow-x: auto; + white-space: pre-wrap; + word-wrap: break-word; + color: #333; +} diff --git a/libs/message-handler/services/src/components/MediatorCoordination.tsx b/libs/message-handler/services/src/components/MediatorCoordination.tsx index 2fa38c6..d6f0dad 100644 --- a/libs/message-handler/services/src/components/MediatorCoordination.tsx +++ b/libs/message-handler/services/src/components/MediatorCoordination.tsx @@ -11,7 +11,9 @@ const MediatorCoordination: React.FC = () => {
Mediator Coordination
diff --git a/libs/message-handler/services/vite.config.ts b/libs/message-handler/services/vite.config.ts index 4a207bc..dbea246 100644 --- a/libs/message-handler/services/vite.config.ts +++ b/libs/message-handler/services/vite.config.ts @@ -1,10 +1,9 @@ import wasm from 'vite-plugin-wasm'; import nodePolyfills from 'rollup-plugin-node-polyfills'; -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; // https://vite.dev/config/ export default defineConfig({ - plugins: [react(),wasm(),nodePolyfills()], - -}) + plugins: [react(), wasm(), nodePolyfills()], +}); From 5b623a97a8a23c20f05284931ed2f7e66b2e4564 Mon Sep 17 00:00:00 2001 From: ndefokou Date: Fri, 24 Jan 2025 09:35:50 +0100 Subject: [PATCH 05/14] fixed on forward-client --- .../src/components/ForwardRequest.tsx | 131 ++++++++++++++++-- .../components/MEDIATION-COMPONENTS/Query.tsx | 37 +++-- .../MEDIATION-COMPONENTS/Request.tsx | 35 ++--- 3 files changed, 159 insertions(+), 44 deletions(-) diff --git a/libs/message-handler/services/src/components/ForwardRequest.tsx b/libs/message-handler/services/src/components/ForwardRequest.tsx index c1b46f2..d9e267e 100644 --- a/libs/message-handler/services/src/components/ForwardRequest.tsx +++ b/libs/message-handler/services/src/components/ForwardRequest.tsx @@ -1,13 +1,128 @@ -// ForwardComponent.tsx -import React from 'react'; +import React, { useState } from 'react'; +import { + TextField, + Button, + CircularProgress, + Box, + Typography, +} from '@mui/material'; +import { forward_msg } from './../../../src/protocols/forward-client'; + +const ForwardMessageUI = () => { + const [mediator_did, setMediatorDID] = useState(''); + const [message, setMessage] = useState(''); + const [recipient_did, setRecipientDid] = useState(''); + const [response, setResponse] = useState(null); + const [error, setError] = useState(null); + const [loading, setLoading] = useState(false); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + setLoading(true); + setError(null); + setResponse(null); + + try { + const result = await forward_msg([mediator_did],[recipient_did], message); + setResponse(result); + } catch (err) { + setError(`Error: ${err instanceof Error ? err.message : 'Unknown error'}`); + } finally { + setLoading(false); + } + }; -const ForwardComponent: React.FC = () => { return ( -
-

Forward Section

-

This is the page where forwarding happens.

-
+ + + Forward DIDComm Message + + + + Enter the recipient's DID and your message below. + + +
+ setMediatorDID(e.target.value)} + margin="normal" + required + /> + + setRecipientDid(e.target.value)} + margin="normal" + required + /> + + setMessage(e.target.value)} + margin="normal" + multiline + rows={4} + required + /> + + + + + {loading && ( + + + + )} + + {response && ( + + Response: + + {response} + + + )} + + {error && ( + + + {error} + + + )} +
); }; -export default ForwardComponent; +export default ForwardMessageUI; diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx index d94a1d3..ff2d635 100644 --- a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx +++ b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx @@ -6,23 +6,28 @@ import { Box, Typography, } from '@mui/material'; -import { keylistQuery } from './../../../../src/mediation-coordination'; -import { Message } from 'didcomm'; +import { keylistQuery } from '../../../../src/mediation-coordination'; +import { IMessage, Message } from 'didcomm'; const KeylistQueryUI = () => { const [recipientDid, setRecipientDid] = useState(''); const [mediatorDid, setMediatorDid] = useState(''); const [isLoading, setIsLoading] = useState(false); - const [result, setResult] = useState(null); + const [result, setResult] = useState(null); const [error, setError] = useState(null); + const handleKeylistQuery = async () => { setIsLoading(true); + setResult(null); setError(null); + try { - const response = await keylistQuery(mediatorDid, [recipientDid]); - setResult(response); - } catch (err: any) { - setError('Error executing keylist query: ' + err.message); + const response = await keylistQuery([mediatorDid], recipientDid); + let message: Message = response as Message; + let result: IMessage = message.as_value(); + setResult(result); + } catch (err) { + setError(`Error: ${err instanceof Error ? err.message : 'Unknown error'}`); } finally { setIsLoading(false); } @@ -35,18 +40,18 @@ const KeylistQueryUI = () => { setRecipientDid(e.target.value)} + value={mediatorDid} + onChange={(e) => setMediatorDid(e.target.value)} margin="normal" /> setMediatorDid(e.target.value)} + value={recipientDid} + onChange={(e) => setRecipientDid(e.target.value)} margin="normal" /> @@ -57,7 +62,7 @@ const KeylistQueryUI = () => { disabled={isLoading} sx={{ marginTop: 2 }} > - Execute Query + {isLoading ? 'Querying...' : 'Execute Query'} {isLoading && ( @@ -69,7 +74,9 @@ const KeylistQueryUI = () => { {result && ( Query Result: -
{JSON.stringify(result, null, 2)}
+
+            {JSON.stringify(result, null, 2)}
+          
)} diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx index d9bafe2..1d17061 100644 --- a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx +++ b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx @@ -1,5 +1,6 @@ import React, { useState } from 'react'; import './request.css'; +import mediationCoordination from '../../../../src/mediation-coordination'; const MediateRequestUI: React.FC = () => { const [mediatorDid, setMediatorDid] = useState(''); @@ -10,30 +11,22 @@ const MediateRequestUI: React.FC = () => { const handleMediateRequest = async () => { setLoading(true); - setError(null); setResponse(null); + setError(null); - try { - const body = { mediatorDid, recipientDid }; - const res = await fetch('http://localhost:3000/', { - method: 'POST', - headers: { - 'Content-Type': 'application/didcomm-encrypted+json', - }, - body: JSON.stringify(body), - }); - - if (!res.ok) { - // throw new Error(`Request failed: ${res.statusText}`); - } - - const data = await res.json(); - setResponse(JSON.stringify(data, null, 2)); - } catch (err: any) { - setError(err.message); - } finally { - setLoading(false); + try { + const response = await mediationCoordination(mediatorDid, recipientDid); + if (response) { + setResponse(JSON.stringify(response.as_value())); + } else { + setResponse(null); } + } catch (err) { + setError(`Error: ${err instanceof Error ? err.message : 'Unknown error'}`); + } finally { + setLoading(false); + } + }; return ( From 07e4d34a82afe4cf4d987eef346ae85bbc424af6 Mon Sep 17 00:00:00 2001 From: ndefokou Date: Mon, 27 Jan 2025 15:05:42 +0100 Subject: [PATCH 06/14] implementing the UI for pickup request --- libs/did-resolver-lib/src/resolver.ts | 6 + .../services/src/components/PickupRequest.tsx | 108 ++++++++++++++++-- .../src/mediation-coordination.ts | 41 +++---- libs/message-handler/src/pickup.ts | 22 +++- .../src/protocols/forward-client.ts | 36 +++--- .../src/protocols/message_types.ts | 2 +- .../src/shared_data/constants.ts | 2 +- package-lock.json | 65 +++++++++++ package.json | 1 + 9 files changed, 232 insertions(+), 51 deletions(-) diff --git a/libs/did-resolver-lib/src/resolver.ts b/libs/did-resolver-lib/src/resolver.ts index 7446ad1..bedc6fe 100644 --- a/libs/did-resolver-lib/src/resolver.ts +++ b/libs/did-resolver-lib/src/resolver.ts @@ -1,5 +1,11 @@ import { DIDDoc, DIDResolver, Service, VerificationMethod } from 'didcomm'; import base64url from 'base64url'; +import { Buffer } from 'buffer'; + +// Polyfill Buffer for environments like the browser +if (!globalThis.Buffer) { + globalThis.Buffer = Buffer; +} type Purpose = | 'Assertion' diff --git a/libs/message-handler/services/src/components/PickupRequest.tsx b/libs/message-handler/services/src/components/PickupRequest.tsx index 58fbf52..7d8ea03 100644 --- a/libs/message-handler/services/src/components/PickupRequest.tsx +++ b/libs/message-handler/services/src/components/PickupRequest.tsx @@ -1,13 +1,103 @@ -// PickupComponent.tsx -import React from 'react'; +import React, { useState } from 'react'; +import { + pickupRequest, + pickupDelivery, + pickupReceive, +} from '../../../src/pickup'; +import { Message } from 'didcomm'; + +export default function DidCommUI() { + const [to, setTo] = useState(''); + const [recipientDid, setRecipientDid] = useState(''); + const [messageType, setMessageType] = useState('Pickup Request'); + const [response, setResponse] = useState(null); + const [loading, setLoading] = useState(false); + + const handleSend = async () => { + setLoading(true); + setResponse(null); + + try { + let result; + switch (messageType) { + case 'Pickup Request': + result = await pickupRequest(to, recipientDid); + break; + case 'Pickup Delivery': + result = await pickupDelivery(to, recipientDid); + break; + case 'Pickup Receive': + result = await pickupReceive(to, recipientDid); + break; + default: + throw new Error('Invalid message type selected'); + } + setResponse(result); + } catch (error) { + setResponse({ error: error.message }); + } finally { + setLoading(false); + } + }; -const PickupComponent: React.FC = () => { return ( -
-

Pickup Section

-

This is the page where pickup happens.

+
+

+ DIDComm Message pickup +

+
+
+ + setTo(e.target.value)} + placeholder="Recipient's DID" + className="w-full px-4 py-2 border rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500" + /> +
+
+ + setRecipientDid(e.target.value)} + placeholder="Recipient's DID" + className="w-full px-4 py-2 border rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500" + /> +
+
+ + +
+ +
+ {response && ( +
+

Response

+
+            {JSON.stringify(response, null, 2)}
+          
+
+ )}
); -}; - -export default PickupComponent; +} diff --git a/libs/message-handler/src/mediation-coordination.ts b/libs/message-handler/src/mediation-coordination.ts index 15fbb40..5195620 100644 --- a/libs/message-handler/src/mediation-coordination.ts +++ b/libs/message-handler/src/mediation-coordination.ts @@ -28,24 +28,25 @@ import { CONTENT_TYPE, FROM, SERVICE_ENDPOINT } from './shared_data/constants'; export default async function mediationCoordination( mediatorDid: string, recipient_did: string, -): Promise { +): Promise { // Send a mediation request and receive the response const mediation_response: Message = await mediateRequest([mediatorDid]); + return mediation_response; // Extract the body from the mediation response - const message: IMessage = mediation_response.as_value(); + // const message: IMessage = mediation_response.as_value(); - // Retrieve the routing DID from the response body - const routing_did = message.body?.routing_did; + // // Retrieve the routing DID from the response body + // const routing_did = message.body?.routing_did; - // Update the keylist with the provided action and recipient DID - if (!routing_did) { - // Handle error if mediation is denied - throw new Error('Mediation Deny'); - } + // // Update the keylist with the provided action and recipient DID + // if (!routing_did) { + // // Handle error if mediation is denied + // throw new Error('Mediation Deny'); + // } - keylistUpdate(recipient_did, Action.add, [mediatorDid]); - return routing_did; + // keylistUpdate(recipient_did, Action.add, [mediatorDid]); + // return routing_did; } export async function buildMsg( @@ -60,7 +61,7 @@ export async function buildMsg( body: body, from: FROM, to: mediatorDid, - headers: { return_route: 'all' }, + return_route: 'all', }; return val; } @@ -162,23 +163,23 @@ export async function keylistUpdate( } export async function keylistQuery( - to: string, - recipient_did: string[], + mediator: string[], + _recipient: string, ): Promise { const body = {}; - const msg = await buildMsg(recipient_did, KEYLIST_QUERY, body); + const msg = await buildMsg(mediator, KEYLIST_QUERY, body); const packed_msg = await packEncrypted(msg); const data = await sendRequest(packed_msg); - const unpackedMsg = unpack(data as string, [to]); + const unpackedMsg = unpack(data as string, mediator); return unpackedMsg; } export async function unpack( msg: string, - to: string[], + recipient: string[], ): Promise { - const resolve = await resolvers(to); + const resolve = await resolvers(recipient); const resolver = resolve as [DIDResolver, SecretsResolver]; const did_resolver = resolver[0]; const secret_resolver = resolver[1]; @@ -193,9 +194,9 @@ export async function unpack( } export async function resolvers( - to: string[], + mediator: string[], ): Promise<[DIDResolver, SecretsResolver] | null> { - const DIDDoc = await new PeerDIDResolver().resolve(to[0]); + const DIDDoc = await new PeerDIDResolver().resolve(mediator[0]); const CLIENT_DIDDoc = await new PeerDIDResolver().resolve(FROM); const did_resolver: DIDResolver = new ExampleDIDResolver([ CLIENT_DIDDoc as DIDDoc, diff --git a/libs/message-handler/src/pickup.ts b/libs/message-handler/src/pickup.ts index 77633be..831d595 100644 --- a/libs/message-handler/src/pickup.ts +++ b/libs/message-handler/src/pickup.ts @@ -88,11 +88,23 @@ export async function pack_encrypt( // Function to send a pickup request export async function sendRequest(packmsg: string): Promise { - const response = await axios.post(SERVICE_ENDPOINT, packmsg, { - headers: { 'Content-Type': 'application/didcomm-encrypted+json' }, - }); - const data = response.data; - return data; + console.log('Sending to:', SERVICE_ENDPOINT); + console.log('Packed message payload:', packmsg); + + try { + const response = await axios.post(SERVICE_ENDPOINT, packmsg, { + headers: { 'Content-Type': 'application/didcomm-encrypted+json' }, + }); + console.log('Response:', response.data); + return response.data; + } catch (error) { + console.error( + 'Request failed:', + error.response?.status, + error.response?.data, + ); + throw error; + } } // Function to handle unpacking response diff --git a/libs/message-handler/src/protocols/forward-client.ts b/libs/message-handler/src/protocols/forward-client.ts index 0873387..55f362f 100644 --- a/libs/message-handler/src/protocols/forward-client.ts +++ b/libs/message-handler/src/protocols/forward-client.ts @@ -12,20 +12,19 @@ import { ExampleDIDResolver, ExampleSecretsResolver, } from 'did-resolver-lib'; -//import { FROM } from '../did_doc/client'; import { ROUTING } from '../shared_data/message_types'; import { CLIENT_SECRETS } from '../secrets/client'; import { MEDIATOR_ENDPOINT } from '../shared_data/endpoints'; import { CONTENT_TYPE, FROM } from '../shared_data/constants'; -export function buildMessage(to: string[], message: string): Message { +export function buildMessage(mediator_did: string[], message: string): Message { const imsg: IMessage = { id: uuidv4(), typ: 'application/didcomm-plain+json', type: ROUTING, body: {}, from: FROM, - to: to, + to: mediator_did, attachments: [ { data: { @@ -37,14 +36,22 @@ export function buildMessage(to: string[], message: string): Message { }, ], }; - const msg = new Message(imsg); - return msg; + return new Message(imsg); } -export async function forward_msg(to: string[], message: string) { - const msg = buildMessage(to, message); - const packed_msg = await pack_encrypt(msg, to); - await sendRequest(packed_msg as string); +export async function forward_msg(recipient_did: string[], mediator_did: string[], message: string) { + try { + const msg = buildMessage(mediator_did, message); + const packed_msg = await pack_encrypt(msg, recipient_did); + if (!packed_msg) { + throw new Error('Failed to pack and encrypt the message.'); + } + const response = await sendRequest(packed_msg); + return response; + } catch (error) { + console.error('Error in forward_msg:', error); + throw error; + } } export async function pack_encrypt( @@ -73,9 +80,11 @@ export async function pack_encrypt( ); return result[0]; } catch (error) { + console.error('Error in pack_encrypt:', error); throw new Error(error as string); } } + export async function sendRequest(packed_msg: string) { try { const response = await axios.post(MEDIATOR_ENDPOINT, packed_msg, { @@ -85,17 +94,14 @@ export async function sendRequest(packed_msg: string) { }); if (response.status >= 200 && response.status < 300) { - if (response.data) { - return response.data; - } else { - return { message: 'Request was successful, no further data returned.' }; - } + return response.data || 'Request was successful!'; } else { throw new Error( `Unexpected response status: ${response.status}, Response data: ${JSON.stringify(response.data)}`, ); } } catch (error) { - throw new Error(error as string); + console.error('Error in sendRequest:', error); + throw new Error(`Failed to send request: ${error}`); } } diff --git a/libs/message-handler/src/protocols/message_types.ts b/libs/message-handler/src/protocols/message_types.ts index 6dcc0f2..a0d0dc2 100644 --- a/libs/message-handler/src/protocols/message_types.ts +++ b/libs/message-handler/src/protocols/message_types.ts @@ -6,7 +6,7 @@ export const KEYLIST_QUERY: string = 'https://didcomm.org/coordinate-mediation/2.0/keylist-query'; export const ALICE_DID = 'did:example:alice123'; -export const SERVICE_ENDPOINT = 'https://example.com/api/pickup'; +export const SERVICE_ENDPOINT = 'http://localhost:3000'; export const PICKUP_REQUEST_3_0 = 'https://didcomm.org/pickup-request/3.0'; export const PICKUP_DELIVERY_3_0 = 'https://didcomm.org/pickup-delivery/3.0'; export const PICKUP_RECEIVE_3_0 = 'https://didcomm.org/pickup-receive/3.0'; diff --git a/libs/message-handler/src/shared_data/constants.ts b/libs/message-handler/src/shared_data/constants.ts index 20752c0..ad62de6 100644 --- a/libs/message-handler/src/shared_data/constants.ts +++ b/libs/message-handler/src/shared_data/constants.ts @@ -1,4 +1,4 @@ export const FROM: string = 'did:peer:2.Vz6Mkf6r1uMJwoRAbzkuyj2RwPusdZhWSPeEknnTcKv2C2EN7.Ez6LSgbP4b3y8HVWG6C73WF2zLbzjDAPXjc33P2VfnVVHE347.SeyJpZCI6IiNkaWRjb21tIiwicyI6eyJhIjpbImRpZGNvbW0vdjIiXSwiciI6W10sInVyaSI6Imh0dHA6Ly9hbGljZS1tZWRpYXRvci5jb20ifSwidCI6ImRtIn0'; -export const SERVICE_ENDPOINT = ''; +export const SERVICE_ENDPOINT = 'http://localhost:3000'; export const CONTENT_TYPE = 'application/didcomm-encrypted+json'; diff --git a/package-lock.json b/package-lock.json index 541994c..904de0a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "@emotion/styled": "^11.14.0", "@mui/material": "^6.4.0", "base64url": "^3.0.1", + "buffer": "^6.0.3", "react-router-dom": "^7.1.1", "util": "^0.12.5", "uuid": "^11.0.5", @@ -3461,6 +3462,26 @@ "dev": true, "license": "MIT" }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/base64url": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", @@ -3548,6 +3569,30 @@ "node-int64": "^0.4.0" } }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -5027,6 +5072,26 @@ "node": ">=10.17.0" } }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", diff --git a/package.json b/package.json index 5d65031..c77a32d 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "@emotion/styled": "^11.14.0", "@mui/material": "^6.4.0", "base64url": "^3.0.1", + "buffer": "^6.0.3", "react-router-dom": "^7.1.1", "util": "^0.12.5", "uuid": "^11.0.5", From 3806259716d1b5b2d19b5393144c05b9054b82de Mon Sep 17 00:00:00 2001 From: ndefokou Date: Mon, 27 Jan 2025 15:08:44 +0100 Subject: [PATCH 07/14] fixe():formating fils --- .../src/components/ForwardRequest.tsx | 10 ++++++-- .../components/MEDIATION-COMPONENTS/Query.tsx | 4 ++- .../MEDIATION-COMPONENTS/Request.tsx | 25 ++++++++++--------- .../src/protocols/forward-client.ts | 6 ++++- 4 files changed, 29 insertions(+), 16 deletions(-) diff --git a/libs/message-handler/services/src/components/ForwardRequest.tsx b/libs/message-handler/services/src/components/ForwardRequest.tsx index d9e267e..2b7d013 100644 --- a/libs/message-handler/services/src/components/ForwardRequest.tsx +++ b/libs/message-handler/services/src/components/ForwardRequest.tsx @@ -23,10 +23,16 @@ const ForwardMessageUI = () => { setResponse(null); try { - const result = await forward_msg([mediator_did],[recipient_did], message); + const result = await forward_msg( + [mediator_did], + [recipient_did], + message, + ); setResponse(result); } catch (err) { - setError(`Error: ${err instanceof Error ? err.message : 'Unknown error'}`); + setError( + `Error: ${err instanceof Error ? err.message : 'Unknown error'}`, + ); } finally { setLoading(false); } diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx index ff2d635..2f46c7a 100644 --- a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx +++ b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx @@ -27,7 +27,9 @@ const KeylistQueryUI = () => { let result: IMessage = message.as_value(); setResult(result); } catch (err) { - setError(`Error: ${err instanceof Error ? err.message : 'Unknown error'}`); + setError( + `Error: ${err instanceof Error ? err.message : 'Unknown error'}`, + ); } finally { setIsLoading(false); } diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx index 1d17061..3f977fe 100644 --- a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx +++ b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx @@ -14,19 +14,20 @@ const MediateRequestUI: React.FC = () => { setResponse(null); setError(null); - try { - const response = await mediationCoordination(mediatorDid, recipientDid); - if (response) { - setResponse(JSON.stringify(response.as_value())); - } else { - setResponse(null); + try { + const response = await mediationCoordination(mediatorDid, recipientDid); + if (response) { + setResponse(JSON.stringify(response.as_value())); + } else { + setResponse(null); + } + } catch (err) { + setError( + `Error: ${err instanceof Error ? err.message : 'Unknown error'}`, + ); + } finally { + setLoading(false); } - } catch (err) { - setError(`Error: ${err instanceof Error ? err.message : 'Unknown error'}`); - } finally { - setLoading(false); - } - }; return ( diff --git a/libs/message-handler/src/protocols/forward-client.ts b/libs/message-handler/src/protocols/forward-client.ts index 55f362f..27b0a99 100644 --- a/libs/message-handler/src/protocols/forward-client.ts +++ b/libs/message-handler/src/protocols/forward-client.ts @@ -39,7 +39,11 @@ export function buildMessage(mediator_did: string[], message: string): Message { return new Message(imsg); } -export async function forward_msg(recipient_did: string[], mediator_did: string[], message: string) { +export async function forward_msg( + recipient_did: string[], + mediator_did: string[], + message: string, +) { try { const msg = buildMessage(mediator_did, message); const packed_msg = await pack_encrypt(msg, recipient_did); From 48a70748bf22b3f199d7e711cfafa7c48861d45a Mon Sep 17 00:00:00 2001 From: ndefokou Date: Mon, 27 Jan 2025 15:22:04 +0100 Subject: [PATCH 08/14] fixe():fixing lint --- .../components/MEDIATION-COMPONENTS/Query.tsx | 4 ++-- .../src/mediation-coordination.ts | 23 +++++++++---------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx index 2f46c7a..9ef3ee1 100644 --- a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx +++ b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx @@ -23,8 +23,8 @@ const KeylistQueryUI = () => { try { const response = await keylistQuery([mediatorDid], recipientDid); - let message: Message = response as Message; - let result: IMessage = message.as_value(); + const message: Message = response as Message; + const result: IMessage = message.as_value(); setResult(result); } catch (err) { setError( diff --git a/libs/message-handler/src/mediation-coordination.ts b/libs/message-handler/src/mediation-coordination.ts index 5195620..b2939e6 100644 --- a/libs/message-handler/src/mediation-coordination.ts +++ b/libs/message-handler/src/mediation-coordination.ts @@ -33,20 +33,20 @@ export default async function mediationCoordination( const mediation_response: Message = await mediateRequest([mediatorDid]); return mediation_response; - // Extract the body from the mediation response - // const message: IMessage = mediation_response.as_value(); + //Extract the body from the mediation response + const message: IMessage = mediation_response.as_value(); - // // Retrieve the routing DID from the response body - // const routing_did = message.body?.routing_did; + // Retrieve the routing DID from the response body + const routing_did = message.body?.routing_did; - // // Update the keylist with the provided action and recipient DID - // if (!routing_did) { - // // Handle error if mediation is denied - // throw new Error('Mediation Deny'); - // } + // Update the keylist with the provided action and recipient DID + if (!routing_did) { + // Handle error if mediation is denied + throw new Error('Mediation Deny'); + } - // keylistUpdate(recipient_did, Action.add, [mediatorDid]); - // return routing_did; + keylistUpdate(recipient_did, Action.add, [mediatorDid]); + return routing_did; } export async function buildMsg( @@ -164,7 +164,6 @@ export async function keylistUpdate( export async function keylistQuery( mediator: string[], - _recipient: string, ): Promise { const body = {}; const msg = await buildMsg(mediator, KEYLIST_QUERY, body); From 340525b2c6fc03333b9210c678e38b8bd5753abd Mon Sep 17 00:00:00 2001 From: ndefokou Date: Mon, 27 Jan 2025 15:37:47 +0100 Subject: [PATCH 09/14] fixe():fixing lint --- .../services/src/components/MEDIATION-COMPONENTS/Query.tsx | 2 +- libs/message-handler/src/pickup.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx index 9ef3ee1..636fa35 100644 --- a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx +++ b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx @@ -22,7 +22,7 @@ const KeylistQueryUI = () => { setError(null); try { - const response = await keylistQuery([mediatorDid], recipientDid); + const response = await keylistQuery([mediatorDid]); const message: Message = response as Message; const result: IMessage = message.as_value(); setResult(result); diff --git a/libs/message-handler/src/pickup.ts b/libs/message-handler/src/pickup.ts index 831d595..e48da0a 100644 --- a/libs/message-handler/src/pickup.ts +++ b/libs/message-handler/src/pickup.ts @@ -100,8 +100,8 @@ export async function sendRequest(packmsg: string): Promise { } catch (error) { console.error( 'Request failed:', - error.response?.status, - error.response?.data, + // error.response?.status, + // error.response?.data, ); throw error; } From f729d2a053c4266e6d88954bb7ed78b5ca44409a Mon Sep 17 00:00:00 2001 From: ndefokou Date: Mon, 27 Jan 2025 17:53:11 +0100 Subject: [PATCH 10/14] fixe():fixing lint --- .../MEDIATION-COMPONENTS/Request.tsx | 2 +- .../src/mediation-coordination.ts | 69 +++++++++++-------- .../src/protocols/message_types.ts | 9 ++- 3 files changed, 49 insertions(+), 31 deletions(-) diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx index 3f977fe..8b1eef5 100644 --- a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx +++ b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx @@ -15,7 +15,7 @@ const MediateRequestUI: React.FC = () => { setError(null); try { - const response = await mediationCoordination(mediatorDid, recipientDid); + const response = await mediationCoordination(mediatorDid,); if (response) { setResponse(JSON.stringify(response.as_value())); } else { diff --git a/libs/message-handler/src/mediation-coordination.ts b/libs/message-handler/src/mediation-coordination.ts index b2939e6..da38bfb 100644 --- a/libs/message-handler/src/mediation-coordination.ts +++ b/libs/message-handler/src/mediation-coordination.ts @@ -27,26 +27,25 @@ import { CONTENT_TYPE, FROM, SERVICE_ENDPOINT } from './shared_data/constants'; **/ export default async function mediationCoordination( mediatorDid: string, - recipient_did: string, ): Promise { // Send a mediation request and receive the response const mediation_response: Message = await mediateRequest([mediatorDid]); return mediation_response; - //Extract the body from the mediation response - const message: IMessage = mediation_response.as_value(); + // //Extract the body from the mediation response + // const message: IMessage = mediation_response.as_value(); - // Retrieve the routing DID from the response body - const routing_did = message.body?.routing_did; + // // Retrieve the routing DID from the response body + // const routing_did = message.body?.routing_did; - // Update the keylist with the provided action and recipient DID - if (!routing_did) { - // Handle error if mediation is denied - throw new Error('Mediation Deny'); - } + // // Update the keylist with the provided action and recipient DID + // if (!routing_did) { + // // Handle error if mediation is denied + // throw new Error('Mediation Deny'); + // } - keylistUpdate(recipient_did, Action.add, [mediatorDid]); - return routing_did; + // keylistUpdate(recipient_did, Action.add, [mediatorDid]); + // return routing_did; } export async function buildMsg( @@ -123,21 +122,26 @@ export async function mediateRequest(mediatorDid: string[]): Promise { return unpackedMsg as Message; } export async function sendRequest(msg: string): Promise { - const data = fetch(SERVICE_ENDPOINT, { - method: 'POST', - body: msg, - headers: { - 'Content-Type': CONTENT_TYPE, - }, - }) - .then((response) => { - const data = response.text(); - return data; - }) - .catch((error) => { - throw Error('Error sending didcomm request' + error); + try { + const response = await fetch(SERVICE_ENDPOINT, { + method: 'POST', + body: msg, + headers: { + 'Content-Type': CONTENT_TYPE, + }, }); - return data; + + if (!response.ok) { + throw new Error( + `Request failed with status ${response.status}: ${await response.text()}`, + ); + } + + return await response.text(); + } catch (error) { + console.error('Error sending DIDComm request:', error); + throw error; + } } export async function keylistUpdate( @@ -166,11 +170,22 @@ export async function keylistQuery( mediator: string[], ): Promise { const body = {}; + console.log('Building keylist query message...'); + const msg = await buildMsg(mediator, KEYLIST_QUERY, body); + console.log('Built message:', JSON.stringify(msg)); + const packed_msg = await packEncrypted(msg); + console.log('Packed message:', packed_msg); + const data = await sendRequest(packed_msg); + console.log('Mediator response:', data); + + if (!data) throw new Error('Mediator returned an empty response.'); + + const unpackedMsg = await unpack(data as string, mediator); + console.log('Unpacked message:', unpackedMsg); - const unpackedMsg = unpack(data as string, mediator); return unpackedMsg; } diff --git a/libs/message-handler/src/protocols/message_types.ts b/libs/message-handler/src/protocols/message_types.ts index a0d0dc2..68b4ca0 100644 --- a/libs/message-handler/src/protocols/message_types.ts +++ b/libs/message-handler/src/protocols/message_types.ts @@ -7,6 +7,9 @@ export const KEYLIST_QUERY: string = export const ALICE_DID = 'did:example:alice123'; export const SERVICE_ENDPOINT = 'http://localhost:3000'; -export const PICKUP_REQUEST_3_0 = 'https://didcomm.org/pickup-request/3.0'; -export const PICKUP_DELIVERY_3_0 = 'https://didcomm.org/pickup-delivery/3.0'; -export const PICKUP_RECEIVE_3_0 = 'https://didcomm.org/pickup-receive/3.0'; +export const PICKUP_REQUEST_3_0 = + 'https://didcomm.org/messagepickup/3.0/status-request'; +export const PICKUP_DELIVERY_3_0 = + 'https://didcomm.org/messagepickup/3.0/delivery-request'; +export const PICKUP_RECEIVE_3_0 = + 'https://didcomm.org/messagepickup/3.0/messages-received'; From 7ddb1ef7f1cf265ce46d4335fd72b73d39e6d675 Mon Sep 17 00:00:00 2001 From: ndefokou Date: Mon, 27 Jan 2025 17:54:40 +0100 Subject: [PATCH 11/14] fixe():formating file --- .../services/src/components/MEDIATION-COMPONENTS/Request.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx index 8b1eef5..755540e 100644 --- a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx +++ b/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx @@ -15,7 +15,7 @@ const MediateRequestUI: React.FC = () => { setError(null); try { - const response = await mediationCoordination(mediatorDid,); + const response = await mediationCoordination(mediatorDid); if (response) { setResponse(JSON.stringify(response.as_value())); } else { From f5c0125872cc769bef87c0ccf3c5037b8b992bca Mon Sep 17 00:00:00 2001 From: ndefokou Date: Fri, 31 Jan 2025 09:16:52 +0100 Subject: [PATCH 12/14] fix():pickup client --- libs/message-handler/services/package.json | 1 + libs/message-handler/services/src/App.tsx | 4 +- .../Query.tsx | 0 .../Request.tsx | 0 .../request.css | 0 .../src/components/MediatorCoordination.tsx | 4 +- .../services/src/components/PickupRequest.tsx | 128 +++++++++--------- .../services/src/components/pickup.css | 124 +++++++++++++++++ libs/message-handler/src/pickup.ts | 81 +++++++---- .../src/protocols/forward-client.ts | 15 +- 10 files changed, 263 insertions(+), 94 deletions(-) rename libs/message-handler/services/src/components/{MEDIATION-COMPONENTS => Mediation-components}/Query.tsx (100%) rename libs/message-handler/services/src/components/{MEDIATION-COMPONENTS => Mediation-components}/Request.tsx (100%) rename libs/message-handler/services/src/components/{MEDIATION-COMPONENTS => Mediation-components}/request.css (100%) create mode 100644 libs/message-handler/services/src/components/pickup.css diff --git a/libs/message-handler/services/package.json b/libs/message-handler/services/package.json index a3c00b9..ea2abe9 100644 --- a/libs/message-handler/services/package.json +++ b/libs/message-handler/services/package.json @@ -21,6 +21,7 @@ "vite": "^6.0.5" }, "dependencies": { + "didcomm": "^0.4.1", "message-handler": "^0.0.17", "uuid": "^11.0.5", "uuidv4": "^6.2.13" diff --git a/libs/message-handler/services/src/App.tsx b/libs/message-handler/services/src/App.tsx index 0547f6f..b83ac23 100644 --- a/libs/message-handler/services/src/App.tsx +++ b/libs/message-handler/services/src/App.tsx @@ -5,8 +5,8 @@ import MediatorApp from './data-collection'; import MediatorCoordination from './components/MediatorCoordination'; import PickupComponent from './components/PickupRequest'; import ForwardComponent from './components/ForwardRequest'; -import QueryComponent from './components/MEDIATION-COMPONENTS/Query'; -import RequestComponent from './components/MEDIATION-COMPONENTS/Request'; +import QueryComponent from './components/Mediation-components/Query'; +import RequestComponent from './components/Mediation-components/Request'; const App: React.FC = () => { return ( diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx b/libs/message-handler/services/src/components/Mediation-components/Query.tsx similarity index 100% rename from libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Query.tsx rename to libs/message-handler/services/src/components/Mediation-components/Query.tsx diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx b/libs/message-handler/services/src/components/Mediation-components/Request.tsx similarity index 100% rename from libs/message-handler/services/src/components/MEDIATION-COMPONENTS/Request.tsx rename to libs/message-handler/services/src/components/Mediation-components/Request.tsx diff --git a/libs/message-handler/services/src/components/MEDIATION-COMPONENTS/request.css b/libs/message-handler/services/src/components/Mediation-components/request.css similarity index 100% rename from libs/message-handler/services/src/components/MEDIATION-COMPONENTS/request.css rename to libs/message-handler/services/src/components/Mediation-components/request.css diff --git a/libs/message-handler/services/src/components/MediatorCoordination.tsx b/libs/message-handler/services/src/components/MediatorCoordination.tsx index d6f0dad..a439fba 100644 --- a/libs/message-handler/services/src/components/MediatorCoordination.tsx +++ b/libs/message-handler/services/src/components/MediatorCoordination.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Routes, Route, useNavigate } from 'react-router-dom'; -import QueryComponent from './MEDIATION-COMPONENTS/Query'; -import RequestComponent from './MEDIATION-COMPONENTS/Request'; +import QueryComponent from './Mediation-components/Query'; +import RequestComponent from './Mediation-components/Request'; const MediatorCoordination: React.FC = () => { const navigate = useNavigate(); diff --git a/libs/message-handler/services/src/components/PickupRequest.tsx b/libs/message-handler/services/src/components/PickupRequest.tsx index 7d8ea03..b112dcd 100644 --- a/libs/message-handler/services/src/components/PickupRequest.tsx +++ b/libs/message-handler/services/src/components/PickupRequest.tsx @@ -4,13 +4,14 @@ import { pickupDelivery, pickupReceive, } from '../../../src/pickup'; -import { Message } from 'didcomm'; +import './pickup.css'; +import { IMessage } from 'didcomm'; export default function DidCommUI() { const [to, setTo] = useState(''); const [recipientDid, setRecipientDid] = useState(''); const [messageType, setMessageType] = useState('Pickup Request'); - const [response, setResponse] = useState(null); + const [response, setResponse] = useState(null); const [loading, setLoading] = useState(false); const handleSend = async () => { @@ -24,80 +25,85 @@ export default function DidCommUI() { result = await pickupRequest(to, recipientDid); break; case 'Pickup Delivery': - result = await pickupDelivery(to, recipientDid); + result = await pickupDelivery(to, recipientDid, 10); break; case 'Pickup Receive': - result = await pickupReceive(to, recipientDid); + result = await pickupReceive(to, recipientDid, [ + '6689601fd2d92bb3cd451b2c', + '6389601fd2d92bb3cd451b2d', + ]); break; default: throw new Error('Invalid message type selected'); } - setResponse(result); + setResponse(result.as_value()); } catch (error) { - setResponse({ error: error.message }); + console.error('Error:', error); } finally { setLoading(false); } }; return ( -
-

- DIDComm Message pickup -

-
-
- - setTo(e.target.value)} - placeholder="Recipient's DID" - className="w-full px-4 py-2 border rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500" - /> -
-
- - setRecipientDid(e.target.value)} - placeholder="Recipient's DID" - className="w-full px-4 py-2 border rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500" - /> -
-
- - +
+
+

DIDComm Message Pickup

+ +
+ {/* Recipient DID */} +
+ + setTo(e.target.value)} + placeholder="Enter recipient's DID" + className="input" + /> +
+ + {/* Sender DID */} +
+ + setRecipientDid(e.target.value)} + placeholder="Enter sender's DID" + className="input" + /> +
+ + {/* Message Type Selection */} +
+ + +
+ + {/* Send Button */} +
- + + {/* Response Box */} + {response && ( +
+

Response

+
+              {JSON.stringify(response, null, 2)}
+            
+
+ )}
- {response && ( -
-

Response

-
-            {JSON.stringify(response, null, 2)}
-          
-
- )}
); } diff --git a/libs/message-handler/services/src/components/pickup.css b/libs/message-handler/services/src/components/pickup.css new file mode 100644 index 0000000..d2ff3e0 --- /dev/null +++ b/libs/message-handler/services/src/components/pickup.css @@ -0,0 +1,124 @@ +/* Container */ +.container { + display: flex; + align-items: center; + justify-content: center; + min-height: 100vh; + background-color: #f3f4f6; + padding: 1rem; +} + +.dark .container { + background-color: #1a202c; +} + +/* Card */ +.card { + width: 100%; + max-width: 28rem; + padding: 1.5rem; + background-color: white; + border-radius: 0.75rem; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +.dark .card { + background-color: #2d3748; +} + +/* Title */ +.title { + font-size: 1.5rem; + font-weight: bold; + color: #2d3748; + text-align: center; +} + +.dark .title { + color: white; +} + +/* Form Inputs */ +.label { + display: block; + font-size: 0.875rem; + font-weight: 500; + color: #4a5568; + margin-bottom: 0.25rem; +} + +.dark .label { + color: #cbd5e0; +} + +.input, +.select { + width: 100%; + padding: 0.5rem 1rem; + border: 1px solid #cbd5e0; + border-radius: 0.5rem; + background-color: white; + color: black; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.dark .input, +.dark .select { + background-color: #4a5568; + color: white; + border-color: #718096; +} + +/* Button */ +.button { + width: 100%; + padding: 0.5rem 1rem; + font-weight: 600; + border-radius: 0.5rem; + transition: background-color 0.3s; + color: white; + background-color: #2563eb; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +} + +.button:hover { + background-color: #1e40af; +} + +.button:disabled { + background-color: #a0aec0; + cursor: not-allowed; +} + +/* Response Box */ +.response-box { + padding: 1rem; + margin-top: 1rem; + background-color: #edf2f7; + border-radius: 0.5rem; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.dark .response-box { + background-color: #4a5568; +} + +.response-title { + font-size: 1.125rem; + font-weight: 600; + color: #2d3748; +} + +.dark .response-title { + color: white; +} + +.response-text { + font-size: 0.875rem; + color: #4a5568; + word-break: break-word; +} + +.dark .response-text { + color: #e2e8f0; +} diff --git a/libs/message-handler/src/pickup.ts b/libs/message-handler/src/pickup.ts index e48da0a..1904bb1 100644 --- a/libs/message-handler/src/pickup.ts +++ b/libs/message-handler/src/pickup.ts @@ -1,6 +1,5 @@ -import axios from 'axios'; import { v4 as uuidv4 } from 'uuid'; -import { DIDDoc, Message, UnpackOptions } from 'didcomm'; +import { DIDDoc, Message } from 'didcomm'; import { ExampleDIDResolver, ExampleSecretsResolver, @@ -25,9 +24,13 @@ export async function pickupRequest(to: string, recipient_did: string) { const unpackedMsg: Message = await handleResponse(to, response as string); return unpackedMsg; } -export async function pickupDelivery(to: string, recipient_did: string) { +export async function pickupDelivery( + to: string, + recipient_did: string, + limit: number | null = null, +) { const type = PICKUP_DELIVERY_3_0; - const msg: Message = buildMessage(to, recipient_did, type); + const msg: Message = buildMessage(to, recipient_did, type, limit); const packmsg = await pack_encrypt(msg, to); // send packmsg to mediator const response = await sendRequest(packmsg as string); @@ -35,9 +38,19 @@ export async function pickupDelivery(to: string, recipient_did: string) { return unpackedMsg; } -export async function pickupReceive(to: string, recipient_did: string) { +export async function pickupReceive( + to: string, + recipient_did: string, + message_id_list: string[], +) { const type = PICKUP_RECEIVE_3_0; - const msg: Message = buildMessage(to, recipient_did, type); + const msg: Message = buildMessage( + to, + recipient_did, + type, + null, + message_id_list, + ); const packmsg = await pack_encrypt(msg, to); // send packmsg to mediator const response = await sendRequest(packmsg as string); @@ -49,6 +62,8 @@ export function buildMessage( to: string, recipient_did: string, type: string, + limit: number | null = null, + message_id_list: string[] | null = null, ): Message { return new Message({ id: `urn:uuid:${uuidv4()}`, @@ -58,15 +73,14 @@ export function buildMessage( to: [to], body: { recipient_did: recipient_did, + limit: limit, + message_id_list: message_id_list, }, return_route: 'all', }); } -export async function pack_encrypt( - msg: Message, - to: string, -): Promise { +export async function pack_encrypt(msg: Message, to: string): Promise { const MEDIDOC = await new PeerDIDResolver().resolve(to); const SENDERDOC = await new PeerDIDResolver().resolve(FROM); const did_resolver = new ExampleDIDResolver([ @@ -81,28 +95,40 @@ export async function pack_encrypt( null, did_resolver, secrets_resolver, - {}, + { + forward: false, + }, ); return encryptedMsg[0]; } // Function to send a pickup request -export async function sendRequest(packmsg: string): Promise { - console.log('Sending to:', SERVICE_ENDPOINT); - console.log('Packed message payload:', packmsg); +export async function sendRequest(msg: string): Promise { + if (typeof msg !== 'string') { + throw new Error('Packed message is not a valid string.'); + } + // console.log('Sending Packed Message:', msg); try { - const response = await axios.post(SERVICE_ENDPOINT, packmsg, { - headers: { 'Content-Type': 'application/didcomm-encrypted+json' }, + const response = await fetch(SERVICE_ENDPOINT, { + method: 'POST', + body: msg, + headers: { + 'Content-Type': 'application/didcomm-encrypted+json', + }, }); - console.log('Response:', response.data); - return response.data; + + const responseText = await response.text(); + + if (!response.ok) { + throw new Error( + `Request failed with status ${response.status}: ${responseText}`, + ); + } + + return responseText; } catch (error) { - console.error( - 'Request failed:', - // error.response?.status, - // error.response?.data, - ); + console.error('Error sending pickup request:', error); throw error; } } @@ -110,8 +136,9 @@ export async function sendRequest(packmsg: string): Promise { // Function to handle unpacking response export async function handleResponse( to: string, - packedMsg: string, + msg: string, ): Promise { + console.log(msg); try { const MEDIDOC = await new PeerDIDResolver().resolve(to); const SENDERDOC = await new PeerDIDResolver().resolve(FROM); @@ -120,12 +147,12 @@ export async function handleResponse( SENDERDOC as DIDDoc, ]); const secrets_resolver = new ExampleSecretsResolver(CLIENT_SECRETS); - const unpackOptions: UnpackOptions = {}; + const unpackedMsg = await Message.unpack( - packedMsg, + msg, did_resolver, secrets_resolver, - unpackOptions, + {}, ); return unpackedMsg[0]; } catch (error) { diff --git a/libs/message-handler/src/protocols/forward-client.ts b/libs/message-handler/src/protocols/forward-client.ts index 27b0a99..3035ef2 100644 --- a/libs/message-handler/src/protocols/forward-client.ts +++ b/libs/message-handler/src/protocols/forward-client.ts @@ -1,3 +1,4 @@ +// import {ap_in_forward } from didcomm import { DIDDoc, DIDResolver, @@ -72,7 +73,7 @@ export async function pack_encrypt( ); try { - const result = await msg.pack_encrypted( + const packed_msg = await msg.pack_encrypted( to[0], FROM, null, @@ -82,7 +83,17 @@ export async function pack_encrypt( forward: true, }, ); - return result[0]; + + // let message = await wrap_in_forward.Message.wrap_in_forward( + // packed_msg[0], + // {}, + // to[0], + // [], // routing did + // '', + // did_resolver, + // ); + + return packed_msg[0]; } catch (error) { console.error('Error in pack_encrypt:', error); throw new Error(error as string); From 584c6e7e6c8e27ca4d43bedce926cb8c58df5bf0 Mon Sep 17 00:00:00 2001 From: ndefokou Date: Mon, 3 Feb 2025 11:15:20 +0100 Subject: [PATCH 13/14] fix():removing un use coments --- libs/message-handler/src/mediation-coordination.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/libs/message-handler/src/mediation-coordination.ts b/libs/message-handler/src/mediation-coordination.ts index da38bfb..e73123d 100644 --- a/libs/message-handler/src/mediation-coordination.ts +++ b/libs/message-handler/src/mediation-coordination.ts @@ -32,20 +32,6 @@ export default async function mediationCoordination( const mediation_response: Message = await mediateRequest([mediatorDid]); return mediation_response; - // //Extract the body from the mediation response - // const message: IMessage = mediation_response.as_value(); - - // // Retrieve the routing DID from the response body - // const routing_did = message.body?.routing_did; - - // // Update the keylist with the provided action and recipient DID - // if (!routing_did) { - // // Handle error if mediation is denied - // throw new Error('Mediation Deny'); - // } - - // keylistUpdate(recipient_did, Action.add, [mediatorDid]); - // return routing_did; } export async function buildMsg( From de917f429dbb90ea09572e65207e49e3372dc1f0 Mon Sep 17 00:00:00 2001 From: ndefokou Date: Mon, 3 Feb 2025 11:16:51 +0100 Subject: [PATCH 14/14] fix():file formating --- libs/message-handler/src/mediation-coordination.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/libs/message-handler/src/mediation-coordination.ts b/libs/message-handler/src/mediation-coordination.ts index e73123d..16381ff 100644 --- a/libs/message-handler/src/mediation-coordination.ts +++ b/libs/message-handler/src/mediation-coordination.ts @@ -31,7 +31,6 @@ export default async function mediationCoordination( // Send a mediation request and receive the response const mediation_response: Message = await mediateRequest([mediatorDid]); return mediation_response; - } export async function buildMsg(