@flipdish/portal-library 8.3.0 → 8.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/organisms/AssetManager/LibraryTabContent/index.cjs.js +1 -1
- package/dist/components/organisms/AssetManager/LibraryTabContent/index.cjs.js.map +1 -1
- package/dist/components/organisms/AssetManager/LibraryTabContent/index.d.ts +1 -1
- package/dist/components/organisms/AssetManager/LibraryTabContent/index.js +1 -1
- package/dist/components/organisms/AssetManager/LibraryTabContent/index.js.map +1 -1
- package/dist/components/organisms/AssetManager/__mocks__/mockAssets.cjs.js +1 -1
- package/dist/components/organisms/AssetManager/__mocks__/mockAssets.cjs.js.map +1 -1
- package/dist/components/organisms/AssetManager/__mocks__/mockAssets.d.ts +2 -2
- package/dist/components/organisms/AssetManager/__mocks__/mockAssets.js +1 -1
- package/dist/components/organisms/AssetManager/__mocks__/mockAssets.js.map +1 -1
- package/dist/components/organisms/AssetManager/hooks/useGetAssets.cjs.js +1 -1
- package/dist/components/organisms/AssetManager/hooks/useGetAssets.cjs.js.map +1 -1
- package/dist/components/organisms/AssetManager/hooks/useGetAssets.js +1 -1
- package/dist/components/organisms/AssetManager/hooks/useGetAssets.js.map +1 -1
- package/dist/components/organisms/AssetManager/hooks/useUploadAsset.cjs.js.map +1 -1
- package/dist/components/organisms/AssetManager/hooks/useUploadAsset.d.ts +1 -1
- package/dist/components/organisms/AssetManager/hooks/useUploadAsset.js.map +1 -1
- package/dist/components/organisms/AssetManager/index.cjs.js +1 -1
- package/dist/components/organisms/AssetManager/index.cjs.js.map +1 -1
- package/dist/components/organisms/AssetManager/index.d.ts +1 -1
- package/dist/components/organisms/AssetManager/index.js +1 -1
- package/dist/components/organisms/AssetManager/index.js.map +1 -1
- package/dist/components/organisms/AssetManager/services/asset.service.cjs.js +1 -1
- package/dist/components/organisms/AssetManager/services/asset.service.cjs.js.map +1 -1
- package/dist/components/organisms/AssetManager/services/asset.service.d.ts +2 -2
- package/dist/components/organisms/AssetManager/services/asset.service.js +1 -1
- package/dist/components/organisms/AssetManager/services/asset.service.js.map +1 -1
- package/dist/components/organisms/FileUpload/components/FileDropZone.cjs.js +1 -1
- package/dist/components/organisms/FileUpload/components/FileDropZone.cjs.js.map +1 -1
- package/dist/components/organisms/FileUpload/components/FileDropZone.js +1 -1
- package/dist/components/organisms/FileUpload/components/FileDropZone.js.map +1 -1
- package/dist/mocks/msw/handlers.cjs.js +1 -1
- package/dist/mocks/msw/handlers.d.ts +1 -1
- package/dist/mocks/msw/handlers.js +1 -1
- package/dist/mocks/msw/server.cjs.js +1 -1
- package/dist/mocks/msw/server.d.ts +1 -1
- package/dist/mocks/msw/server.js +1 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/browser/createRequestId-DQcIlohW.cjs.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/browser/createRequestId-DQcIlohW.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/browser/createRequestId-DQcIlohW.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/browser/createRequestId-DQcIlohW.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/browser/hasConfigurableGlobal-C8kXFDic.cjs.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/browser/hasConfigurableGlobal-C8kXFDic.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/{@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/chunk-VYSDLBSS.js → @mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/browser/hasConfigurableGlobal-C8kXFDic.js} +2 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/browser/hasConfigurableGlobal-C8kXFDic.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/browser/interceptors/WebSocket/index.cjs.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/browser/interceptors/WebSocket/index.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/browser/interceptors/WebSocket/index.d.d.ts +230 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/browser/interceptors/WebSocket/index.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/browser/interceptors/WebSocket/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/BatchInterceptor-DFaBPilf.cjs.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/BatchInterceptor-DFaBPilf.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/BatchInterceptor-DFaBPilf.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/BatchInterceptor-DFaBPilf.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/BatchInterceptor-D_YqR8qU.d.d.ts +27 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/ClientRequest-Ca8Qykuv.cjs.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/ClientRequest-Ca8Qykuv.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/ClientRequest-Ca8Qykuv.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/ClientRequest-Ca8Qykuv.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/Interceptor-DJ2akVWI.d.d.ts +120 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/XMLHttpRequest-C8dIZpds.cjs.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/XMLHttpRequest-C8dIZpds.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/XMLHttpRequest-C8dIZpds.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/XMLHttpRequest-C8dIZpds.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/bufferUtils-_8XfKIfX.cjs.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/bufferUtils-_8XfKIfX.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/bufferUtils-_8XfKIfX.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/bufferUtils-_8XfKIfX.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/fetch-G1DVwDKG.cjs.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/fetch-G1DVwDKG.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/fetch-G1DVwDKG.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/fetch-G1DVwDKG.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/fetchUtils-CoU35g3M.cjs.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/fetchUtils-CoU35g3M.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/fetchUtils-CoU35g3M.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/fetchUtils-CoU35g3M.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/getRawRequest-DnwmXyOW.cjs.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/getRawRequest-DnwmXyOW.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/getRawRequest-DnwmXyOW.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/getRawRequest-DnwmXyOW.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/glossary-glQBRnVD.cjs.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/glossary-glQBRnVD.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/glossary-glQBRnVD.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/glossary-glQBRnVD.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/handleRequest-Y97UwBbF.cjs.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/handleRequest-Y97UwBbF.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/handleRequest-Y97UwBbF.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/handleRequest-Y97UwBbF.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/hasConfigurableGlobal-DBJA0vjm.cjs.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/hasConfigurableGlobal-DBJA0vjm.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/{@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-TX5GBTFY.js → @mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/hasConfigurableGlobal-DBJA0vjm.js} +2 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/hasConfigurableGlobal-DBJA0vjm.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/index.cjs.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/index.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/index.d.d.ts +28 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/index.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/node-DwCc6iuP.cjs.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/node-DwCc6iuP.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/node-DwCc6iuP.js +2 -0
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/node/node-DwCc6iuP.js.map +1 -0
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/HttpResponse-CVs3ngx3.d.d.ts +1 -1
- package/dist/node_modules/.pnpm/msw@2.12.8_@types_node@20.19.31_typescript@5.4.5/node_modules/msw/lib/core/HttpResponse.cjs.js +2 -0
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/HttpResponse.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/msw@2.12.8_@types_node@20.19.31_typescript@5.4.5/node_modules/msw/lib/core/HttpResponse.js +2 -0
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/HttpResponse.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/SetupApi.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/SetupApi.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/handlers/HttpHandler.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/handlers/HttpHandler.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/handlers/RequestHandler.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/handlers/RequestHandler.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/handlers/WebSocketHandler.d.d.ts +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/http.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/http.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/index.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/index.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/isCommonAssetRequest.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/isCommonAssetRequest.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/HttpResponse/decorators.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/HttpResponse/decorators.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/cookieStore.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/cookieStore.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/executeHandlers.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/executeHandlers.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/handleRequest.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/handleRequest.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/Disposable.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/Disposable.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/checkGlobals.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/checkGlobals.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/devUtils.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/devUtils.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/getCallFrame.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/getCallFrame.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isHandlerKind.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isHandlerKind.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isIterable.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isIterable.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isObject.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isObject.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isStringEqual.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isStringEqual.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/jsonParse.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/jsonParse.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/mergeRight.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/mergeRight.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/pipeEvents.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/toReadonlyArray.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/toReadonlyArray.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/getStatusCodeColor.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/getStatusCodeColor.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/getTimestamp.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/getTimestamp.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/serializeRequest.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/serializeRequest.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/serializeResponse.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/serializeResponse.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/matching/matchRequestUrl.cjs.js +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/matching/matchRequestUrl.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/matching/matchRequestUrl.js +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/matching/matchRequestUrl.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/matching/normalizePath.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/matching/normalizePath.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/getRequestCookies.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/getRequestCookies.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/onUnhandledRequest.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/onUnhandledRequest.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/storeResponseCookies.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/storeResponseCookies.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/toPublicUrl.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/toPublicUrl.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/cleanUrl.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/cleanUrl.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/getAbsoluteUrl.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/getAbsoluteUrl.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/isAbsoluteUrl.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/isAbsoluteUrl.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/ws/handleWebSocketEvent.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/ws/handleWebSocketEvent.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/ws/webSocketInterceptor.cjs.js +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/ws/webSocketInterceptor.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/ws/webSocketInterceptor.js +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/ws/webSocketInterceptor.js.map +1 -1
- package/dist/node_modules/.pnpm/msw@2.12.8_@types_node@20.19.31_typescript@5.4.5/node_modules/msw/lib/node/index.cjs.js +2 -0
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/node/index.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/node/index.d.d.ts +3 -3
- package/dist/node_modules/.pnpm/msw@2.12.8_@types_node@20.19.31_typescript@5.4.5/node_modules/msw/lib/node/index.js +2 -0
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/node/index.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/shims/cookie.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/shims/cookie.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/shims/statuses.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/shims/statuses.js.map +1 -1
- package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/domain.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/domain.js.map +1 -1
- package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/extract-hostname.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/extract-hostname.js.map +1 -1
- package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/factory.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/factory.js.map +1 -1
- package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/is-ip.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/is-ip.js.map +1 -1
- package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/is-valid.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/is-valid.js.map +1 -1
- package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/lookup/fast-path.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/lookup/fast-path.js.map +1 -1
- package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/options.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/options.js.map +1 -1
- package/dist/node_modules/.pnpm/{tldts@7.0.19 → tldts@7.0.22}/node_modules/tldts/dist/es6/index.cjs.js +1 -1
- package/dist/node_modules/.pnpm/{tldts@7.0.19 → tldts@7.0.22}/node_modules/tldts/dist/es6/index.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/{tldts@7.0.19 → tldts@7.0.22}/node_modules/tldts/dist/es6/index.js +1 -1
- package/dist/node_modules/.pnpm/{tldts@7.0.19 → tldts@7.0.22}/node_modules/tldts/dist/es6/index.js.map +1 -1
- package/dist/node_modules/.pnpm/tldts@7.0.22/node_modules/tldts/dist/es6/src/data/trie.cjs.js +2 -0
- package/dist/node_modules/.pnpm/tldts@7.0.22/node_modules/tldts/dist/es6/src/data/trie.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/tldts@7.0.22/node_modules/tldts/dist/es6/src/data/trie.js +2 -0
- package/dist/node_modules/.pnpm/tldts@7.0.22/node_modules/tldts/dist/es6/src/data/trie.js.map +1 -0
- package/dist/node_modules/.pnpm/tldts@7.0.22/node_modules/tldts/dist/es6/src/suffix-trie.cjs.js +2 -0
- package/dist/node_modules/.pnpm/tldts@7.0.22/node_modules/tldts/dist/es6/src/suffix-trie.cjs.js.map +1 -0
- package/dist/node_modules/.pnpm/tldts@7.0.22/node_modules/tldts/dist/es6/src/suffix-trie.js +2 -0
- package/dist/node_modules/.pnpm/tldts@7.0.22/node_modules/tldts/dist/es6/src/suffix-trie.js.map +1 -0
- package/dist/node_modules/.pnpm/tough-cookie@6.0.0/node_modules/tough-cookie/dist/index.cjs.js +1 -1
- package/dist/node_modules/.pnpm/tough-cookie@6.0.0/node_modules/tough-cookie/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/type-fest@5.4.3/node_modules/type-fest/source/is-equal.d.d.ts +41 -0
- package/dist/node_modules/.pnpm/{type-fest@5.3.1 → type-fest@5.4.3}/node_modules/type-fest/source/is-never.d.d.ts +2 -2
- package/dist/node_modules/.pnpm/{type-fest@5.3.1 → type-fest@5.4.3}/node_modules/type-fest/source/merge.d.d.ts +21 -9
- package/dist/node_modules/.pnpm/{type-fest@5.3.1 → type-fest@5.4.3}/node_modules/type-fest/source/omit-index-signature.d.d.ts +8 -4
- package/dist/utilities/apiUtils.cjs.js +2 -0
- package/dist/utilities/apiUtils.cjs.js.map +1 -0
- package/dist/utilities/apiUtils.d.ts +32 -0
- package/dist/utilities/apiUtils.js +2 -0
- package/dist/utilities/apiUtils.js.map +1 -0
- package/package.json +3 -2
- package/dist/components/organisms/AssetManager/types/index.cjs.js +0 -2
- package/dist/components/organisms/AssetManager/types/index.cjs.js.map +0 -1
- package/dist/components/organisms/AssetManager/types/index.d.ts +0 -36
- package/dist/components/organisms/AssetManager/types/index.js +0 -2
- package/dist/components/organisms/AssetManager/types/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/chunk-VYSDLBSS.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/chunk-VYSDLBSS.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/chunk-VYSDLBSS.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/chunk-Z5TSB3T6.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/chunk-Z5TSB3T6.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/chunk-Z5TSB3T6.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/chunk-Z5TSB3T6.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/interceptors/WebSocket/index.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/interceptors/WebSocket/index.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/interceptors/WebSocket/index.d.d.ts +0 -225
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/interceptors/WebSocket/index.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/browser/interceptors/WebSocket/index.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/BatchInterceptor-cb9a2eee.d.d.ts +0 -25
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/Interceptor-dc0a39b5.d.d.ts +0 -123
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-5UGIB6OX.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-5UGIB6OX.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-5UGIB6OX.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-5UGIB6OX.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-5V3SIIW2.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-5V3SIIW2.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-5V3SIIW2.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-5V3SIIW2.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-6HYIRFX2.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-6HYIRFX2.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-6HYIRFX2.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-6HYIRFX2.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-6YM4PLBI.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-6YM4PLBI.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-6YM4PLBI.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-6YM4PLBI.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-GKN5RBVR.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-GKN5RBVR.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-GKN5RBVR.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-GKN5RBVR.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-JXGB54LE.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-JXGB54LE.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-JXGB54LE.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-JXGB54LE.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-OFW5L5ET.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-OFW5L5ET.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-OFW5L5ET.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-OFW5L5ET.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-R6T7CL5E.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-R6T7CL5E.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-R6T7CL5E.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-R6T7CL5E.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-SQ6RHTJR.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-SQ6RHTJR.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-SQ6RHTJR.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-SQ6RHTJR.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-TX5GBTFY.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-TX5GBTFY.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-TX5GBTFY.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-YWNGXXUQ.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-YWNGXXUQ.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-YWNGXXUQ.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/chunk-YWNGXXUQ.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/index.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/index.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/index.d.d.ts +0 -26
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/index.js +0 -2
- package/dist/node_modules/.pnpm/@mswjs_interceptors@0.40.0/node_modules/@mswjs/interceptors/lib/node/index.js.map +0 -1
- package/dist/node_modules/.pnpm/msw@2.12.7_@types_node@20.19.30_typescript@5.4.5/node_modules/msw/lib/core/HttpResponse.cjs.js +0 -2
- package/dist/node_modules/.pnpm/msw@2.12.7_@types_node@20.19.30_typescript@5.4.5/node_modules/msw/lib/core/HttpResponse.js +0 -2
- package/dist/node_modules/.pnpm/msw@2.12.7_@types_node@20.19.30_typescript@5.4.5/node_modules/msw/lib/node/index.cjs.js +0 -2
- package/dist/node_modules/.pnpm/msw@2.12.7_@types_node@20.19.30_typescript@5.4.5/node_modules/msw/lib/node/index.js +0 -2
- package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/src/data/trie.cjs.js +0 -2
- package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/src/data/trie.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/src/data/trie.js +0 -2
- package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/src/data/trie.js.map +0 -1
- package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/src/suffix-trie.cjs.js +0 -2
- package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/src/suffix-trie.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/src/suffix-trie.js +0 -2
- package/dist/node_modules/.pnpm/tldts@7.0.19/node_modules/tldts/dist/es6/src/suffix-trie.js.map +0 -1
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/SetupApi.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/SetupApi.d.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/SetupApi.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/handlers/HttpHandler.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/handlers/HttpHandler.d.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/handlers/HttpHandler.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/handlers/RequestHandler.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/handlers/RequestHandler.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/http.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/http.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/index.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/index.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/isCommonAssetRequest.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/isCommonAssetRequest.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/sharedOptions.d.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/typeUtils.d.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/HttpResponse/decorators.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/HttpResponse/decorators.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/cookieStore.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/cookieStore.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/executeHandlers.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/executeHandlers.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/handleRequest.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/handleRequest.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/Disposable.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/Disposable.d.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/Disposable.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/checkGlobals.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/checkGlobals.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/devUtils.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/devUtils.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/getCallFrame.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/getCallFrame.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isHandlerKind.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isHandlerKind.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isIterable.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isIterable.d.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isIterable.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isObject.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isObject.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isStringEqual.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/isStringEqual.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/jsonParse.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/jsonParse.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/mergeRight.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/mergeRight.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/pipeEvents.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/pipeEvents.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/toReadonlyArray.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/internal/toReadonlyArray.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/getStatusCodeColor.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/getStatusCodeColor.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/getTimestamp.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/getTimestamp.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/serializeRequest.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/serializeRequest.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/serializeResponse.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/logging/serializeResponse.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/matching/matchRequestUrl.d.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/matching/normalizePath.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/matching/normalizePath.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/getRequestCookies.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/getRequestCookies.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/onUnhandledRequest.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/onUnhandledRequest.d.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/onUnhandledRequest.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/storeResponseCookies.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/storeResponseCookies.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/toPublicUrl.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/request/toPublicUrl.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/cleanUrl.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/cleanUrl.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/getAbsoluteUrl.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/getAbsoluteUrl.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/isAbsoluteUrl.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/utils/url/isAbsoluteUrl.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/ws/handleWebSocketEvent.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/core/ws/handleWebSocketEvent.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/shims/cookie.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/shims/cookie.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/shims/statuses.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{msw@2.12.7_@types_node@20.19.30_typescript@5.4.5 → msw@2.12.8_@types_node@20.19.31_typescript@5.4.5}/node_modules/msw/lib/shims/statuses.js +0 -0
- /package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/domain.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/domain.js +0 -0
- /package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/extract-hostname.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/extract-hostname.js +0 -0
- /package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/factory.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/factory.js +0 -0
- /package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/is-ip.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/is-ip.js +0 -0
- /package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/is-valid.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/is-valid.js +0 -0
- /package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/lookup/fast-path.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/lookup/fast-path.js +0 -0
- /package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/options.cjs.js +0 -0
- /package/dist/node_modules/.pnpm/{tldts-core@7.0.19 → tldts-core@7.0.22}/node_modules/tldts-core/dist/es6/src/options.js +0 -0
- /package/dist/node_modules/.pnpm/{type-fest@5.3.1 → type-fest@5.4.3}/node_modules/type-fest/source/if.d.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{type-fest@5.3.1 → type-fest@5.4.3}/node_modules/type-fest/source/internal/object.d.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{type-fest@5.3.1 → type-fest@5.4.3}/node_modules/type-fest/source/internal/type.d.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{type-fest@5.3.1 → type-fest@5.4.3}/node_modules/type-fest/source/is-any.d.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{type-fest@5.3.1 → type-fest@5.4.3}/node_modules/type-fest/source/is-optional-key-of.d.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{type-fest@5.3.1 → type-fest@5.4.3}/node_modules/type-fest/source/optional-keys-of.d.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{type-fest@5.3.1 → type-fest@5.4.3}/node_modules/type-fest/source/partial-deep.d.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{type-fest@5.3.1 → type-fest@5.4.3}/node_modules/type-fest/source/pick-index-signature.d.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{type-fest@5.3.1 → type-fest@5.4.3}/node_modules/type-fest/source/primitive.d.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{type-fest@5.3.1 → type-fest@5.4.3}/node_modules/type-fest/source/required-keys-of.d.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{type-fest@5.3.1 → type-fest@5.4.3}/node_modules/type-fest/source/simplify.d.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ListAssetsResponse, UploadAssetResponse } from '@flipdish/asset-management';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Fetches assets from the asset management service API
|
|
@@ -6,7 +6,7 @@ import { AssetResponse, UploadAssetResponse } from '../types/index.js';
|
|
|
6
6
|
* @param brandId - brand ID.
|
|
7
7
|
* @returns Promise resolving to an array of assets
|
|
8
8
|
*/
|
|
9
|
-
declare const getAssets: (orgId: string, brandId?: string) => Promise<
|
|
9
|
+
declare const getAssets: (orgId: string, brandId?: string) => Promise<ListAssetsResponse>;
|
|
10
10
|
/**
|
|
11
11
|
* Upload parameters for asset upload
|
|
12
12
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const
|
|
1
|
+
import{getErrorMessage as t}from"../../../../utilities/apiUtils.js";import{Configuration as s,AssetsApi as r}from"@flipdish/asset-management";const a=new r(new s({basePath:(()=>{const t=window.location?.host?.includes("portal.flipdish.com");return t?"https://api.portal.flipdish.com/assets":"https://api-prod-staging.portal.flipdishdev.com/assets"})(),baseOptions:{withCredentials:!0}})),o=async(s,r)=>{if(!s)throw new Error("Organization ID is required to fetch assets");try{return(await a.listAssets(s,r)).data}catch(s){const r=t(s,"Failed to fetch assets");throw new Error(r)}},e=async s=>{const{orgId:r,brandId:o,files:e}=s;if(!r)throw new Error("Organization ID is required to upload assets");if(!e||0===e.length)throw new Error("At least one file is required to upload");try{return(await a.uploadAsset(r,e,o)).data}catch(s){const r=t(s,"Failed to upload assets");throw new Error(r)}};export{o as getAssets,e as uploadAsset};
|
|
2
2
|
//# sourceMappingURL=asset.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset.service.js","sources":["../../../../../src/components/organisms/AssetManager/services/asset.service.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"asset.service.js","sources":["../../../../../src/components/organisms/AssetManager/services/asset.service.ts"],"sourcesContent":["import { getErrorMessage } from '@fd/utilities/apiUtils';\nimport {\n AssetsApi,\n Configuration,\n type ListAssetsResponse,\n type UploadAssetResponse,\n} from '@flipdish/asset-management';\n\nconst PROD_API_URL = 'https://api.portal.flipdish.com/assets';\nconst DEV_STAGING_API_URL = 'https://api-prod-staging.portal.flipdishdev.com/assets';\n\n/**\n * Gets the asset management API base URL based on the current environment\n * @returns The appropriate API URL for the current environment\n */\nconst getAssetManagementApiUrl = (): string => {\n const isProd = window.location?.host?.includes('portal.flipdish.com');\n\n if (isProd) {\n return PROD_API_URL;\n }\n\n return DEV_STAGING_API_URL;\n};\n\n/**\n * Configuration for the asset management API client\n * - basePath: API base URL based on environment\n * - baseOptions.withCredentials: Send cookies/credentials with requests\n */\nconst configuration = new Configuration({\n basePath: getAssetManagementApiUrl(),\n baseOptions: {\n withCredentials: true,\n },\n});\n\nconst assetsApi = new AssetsApi(configuration);\n\n/**\n * Fetches assets from the asset management service API\n * @param orgId - organization ID.\n * @param brandId - brand ID.\n * @returns Promise resolving to an array of assets\n */\nexport const getAssets = async (orgId: string, brandId?: string): Promise<ListAssetsResponse> => {\n if (!orgId) {\n throw new Error('Organization ID is required to fetch assets');\n }\n\n try {\n const response = await assetsApi.listAssets(orgId, brandId);\n return response.data;\n } catch (error: unknown) {\n const errorMessage = getErrorMessage(error, 'Failed to fetch assets');\n throw new Error(errorMessage);\n }\n};\n\n/**\n * Upload parameters for asset upload\n */\nexport interface UploadAssetParams {\n /** Organization ID */\n orgId: string;\n /** Optional brand ID */\n brandId?: string;\n /** The files to upload */\n files: File[];\n}\n\n/**\n * Uploads multiple assets to the asset management service API\n * @param params - Upload parameters containing orgId, brandId, and files\n * @returns Promise resolving to an array of uploaded assets\n */\nexport const uploadAsset = async (params: UploadAssetParams): Promise<UploadAssetResponse> => {\n const { orgId, brandId, files } = params;\n\n if (!orgId) {\n throw new Error('Organization ID is required to upload assets');\n }\n\n if (!files || files.length === 0) {\n throw new Error('At least one file is required to upload');\n }\n\n try {\n const response = await assetsApi.uploadAsset(orgId, files, brandId);\n return response.data;\n } catch (error: unknown) {\n const errorMessage = getErrorMessage(error, 'Failed to upload assets');\n throw new Error(errorMessage);\n }\n};\n"],"names":["assetsApi","AssetsApi","Configuration","basePath","isProd","window","location","host","includes","getAssetManagementApiUrl","baseOptions","withCredentials","getAssets","async","orgId","brandId","Error","listAssets","data","error","errorMessage","getErrorMessage","uploadAsset","params","files","length"],"mappings":"8IAQA,MA6BMA,EAAY,IAAIC,EAPA,IAAIC,EAAc,CACtCC,SAhB+B,MAC/B,MAAMC,EAASC,OAAOC,UAAUC,MAAMC,SAAS,uBAE/C,OAAIJ,EAVe,yCACO,0DAsBhBK,GACVC,YAAa,CACXC,iBAAiB,MAYRC,EAAYC,MAAOC,EAAeC,KAC7C,IAAKD,EACH,MAAM,IAAIE,MAAM,+CAGlB,IAEE,aADuBhB,EAAUiB,WAAWH,EAAOC,IACnCG,IAClB,CAAE,MAAOC,GACP,MAAMC,EAAeC,EAAgBF,EAAO,0BAC5C,MAAM,IAAIH,MAAMI,EAClB,GAoBWE,EAAcT,MAAOU,IAChC,MAAMT,MAAEA,EAAKC,QAAEA,EAAOS,MAAEA,GAAUD,EAElC,IAAKT,EACH,MAAM,IAAIE,MAAM,gDAGlB,IAAKQ,GAA0B,IAAjBA,EAAMC,OAClB,MAAM,IAAIT,MAAM,2CAGlB,IAEE,aADuBhB,EAAUsB,YAAYR,EAAOU,EAAOT,IAC3CG,IAClB,CAAE,MAAOC,GACP,MAAMC,EAAeC,EAAgBF,EAAO,2BAC5C,MAAM,IAAIH,MAAMI,EAClB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("@mui/material/Box/Box"),i=require("@mui/material/Stack/Stack"),a=require("@mui/material/styles/styled"),l=require("@mui/material/styles/useTheme"),n=require("../../../atoms/Button/index.cjs.js"),o=require("@mui/material/FormHelperText"),s=require("@mui/material/Typography"),c=require("../../../../icons/CancelCircle/index.cjs.js"),u=require("../../../../icons/Upload/index.cjs.js"),d=require("../../../../providers/TranslationProvider.cjs.js");const p=a(t,{shouldForwardProp:e=>"hasError"!==e})((({theme:e,hasError:r})=>({flex:"1",display:"flex",flexDirection:"column",height:"100%",boxSizing:"border-box",alignItems:"center",justifyContent:"center",padding:e.spacing(4),borderRadius:e.radius["radius-8"],border:r?`1px solid ${e.palette.semantic.stroke["stroke-error-weak"]}`:`1px dashed ${e.palette.semantic.stroke["stroke-strong"]}`,background:r?e.palette.semantic.fill["fill-error-weak"]:e.palette.semantic.fill["fill-weaker"],cursor:"pointer",transition:"all 0.2s ease-in-out",[e.breakpoints.only("mobile")]:{justifyContent:"center",gap:e.spacing(4)}}))),m=a("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1}),f=a(t,{shouldForwardProp:e=>"hasError"!==e})((({hasError:e,theme:r})=>({display:"flex",flexDirection:"column",width:"48px",height:"48px",padding:"0px",justifyContent:"center",alignItems:"center",borderRadius:r.radius["radius-32"],backgroundColor:e?r.palette.semantic.fill["fill-error-weak"]:r.palette.semantic.fill["fill-primary-weak"]}))),h=a(n.Button)({alignSelf:"center"});module.exports=({handleUpload:t,multiple:a,maxFiles:n,maxFileSize:g,allowedFileTypes:x=[],disabled:b=!1,error:k,dragActiveText:j,dragInactiveText:y,browseButtonText:v,invalidFileTypesText:C,invalidFileSizeText:w,invalidFileCountText:_})=>{const T=l(),[F,D]=r.useState(!1),S=r.useRef(null),[q,P]=r.useState(null),{translate:E}=d.useTranslation(),z=k
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("@mui/material/Box/Box"),i=require("@mui/material/Stack/Stack"),a=require("@mui/material/styles/styled"),l=require("@mui/material/styles/useTheme"),n=require("../../../atoms/Button/index.cjs.js"),o=require("@mui/material/FormHelperText"),s=require("@mui/material/Typography"),c=require("../../../../icons/CancelCircle/index.cjs.js"),u=require("../../../../icons/Upload/index.cjs.js"),d=require("../../../../providers/TranslationProvider.cjs.js");const p=a(t,{shouldForwardProp:e=>"hasError"!==e})((({theme:e,hasError:r})=>({flex:"1",display:"flex",flexDirection:"column",height:"100%",boxSizing:"border-box",alignItems:"center",justifyContent:"center",padding:e.spacing(4),borderRadius:e.radius["radius-8"],border:r?`1px solid ${e.palette.semantic.stroke["stroke-error-weak"]}`:`1px dashed ${e.palette.semantic.stroke["stroke-strong"]}`,background:r?e.palette.semantic.fill["fill-error-weak"]:e.palette.semantic.fill["fill-weaker"],cursor:"pointer",transition:"all 0.2s ease-in-out",[e.breakpoints.only("mobile")]:{justifyContent:"center",gap:e.spacing(4)}}))),m=a("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1}),f=a(t,{shouldForwardProp:e=>"hasError"!==e})((({hasError:e,theme:r})=>({display:"flex",flexDirection:"column",width:"48px",height:"48px",padding:"0px",justifyContent:"center",alignItems:"center",borderRadius:r.radius["radius-32"],backgroundColor:e?r.palette.semantic.fill["fill-error-weak"]:r.palette.semantic.fill["fill-primary-weak"]}))),h=a(n.Button)({alignSelf:"center"});module.exports=({handleUpload:t,multiple:a,maxFiles:n,maxFileSize:g,allowedFileTypes:x=[],disabled:b=!1,error:k,dragActiveText:j,dragInactiveText:y,browseButtonText:v,invalidFileTypesText:C,invalidFileSizeText:w,invalidFileCountText:_})=>{const T=l(),[F,D]=r.useState(!1),S=r.useRef(null),[q,P]=r.useState(null),{translate:E}=d.useTranslation(),z=q??k,B=r.useMemo((()=>{if(x.length)return x.filter(Boolean).map((e=>e.startsWith(".")?e:`.${e}`)).join(",")}),[x]),I=r.useCallback((e=>{if(g&&e.size>g)return P(w||E("File_size_is_too_large",{maxFileSize:g?.toString()||""})),!1;const r=e.name.split(".").pop()?.toLowerCase();return!(x.length>0&&r&&!x.includes(r))||(P(C||E("File_type_is_not_allowed",{allowedFileTypes:x.join(", ")})),!1)}),[g,x,C,w,E]),R=r.useCallback((e=>{const r=Array.from(e),i=[];n&&r.length>n?P(_||E("Too_many_files_selected",{maxFiles:n.toString()})):(r.forEach((e=>{I(e)&&i.push(e)})),i.length>0&&(P(null),t(i)))}),[n,I,t,_,E]),$=r.useCallback((e=>{e.preventDefault(),e.stopPropagation(),b||D(!0)}),[b]),A=r.useCallback((e=>{e.preventDefault(),e.stopPropagation(),b||D(!1)}),[b]),L=r.useCallback((e=>{e.preventDefault(),e.stopPropagation()}),[]),U=r.useCallback((e=>{if(e.preventDefault(),e.stopPropagation(),b)return;D(!1);const r=e.dataTransfer.files;r&&r.length>0&&R(r)}),[b,R]),H=r.useCallback((e=>{if(b)return;const r=e.target.files;r&&r.length>0&&R(r),S.current&&(S.current.value="")}),[b,R]),K=r.useCallback((e=>{e.preventDefault(),e.stopPropagation(),S.current?.click()}),[]),M=r.useCallback((()=>{b||S.current?.click()}),[b]);return e.jsxs(e.Fragment,{children:[!!z&&e.jsxs(o,{error:!0,children:[e.jsx(c,{}),z]}),e.jsxs(p,{"data-fd":"file-drop-zone",hasError:!!z,onClick:b?void 0:M,onDragEnter:$,onDragLeave:A,onDragOver:L,onDrop:U,children:[e.jsx(m,{ref:S,accept:B,"data-fd":"file-upload-input",disabled:b,multiple:a,onChange:H,type:"file"}),e.jsxs(i,{alignItems:"center",direction:"column",gap:T.spacing(2),justifyContent:"center",width:"100%",children:[e.jsx(f,{hasError:!!z,children:e.jsx(u,{color:z?T.palette.semantic.icon["icon-error"]:T.palette.semantic.icon["icon-primary"]})}),e.jsx(s,{variant:"b1Strong",children:F?j||E("Drop_files_here"):y||E("Drag_and_drop_files_here")}),e.jsx(h,{disabled:b,fdKey:"file-upload-btn",onClick:b?void 0:K,variant:"secondary",children:v||E("Browse_files")})]})]})]})};
|
|
2
2
|
//# sourceMappingURL=FileDropZone.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileDropZone.cjs.js","sources":["../../../../../src/components/organisms/FileUpload/components/FileDropZone.tsx"],"sourcesContent":["import React, { useCallback, useRef, useState } from 'react';\n\nimport Box from '@mui/material/Box/Box';\nimport Stack from '@mui/material/Stack/Stack';\nimport styled from '@mui/material/styles/styled';\nimport useTheme from '@mui/material/styles/useTheme';\n\nimport FlipdishButton from '@fd/components/atoms/Button';\nimport FlipdishFormHelperText from '@fd/components/atoms/FormHelperText';\nimport FlipdishTypography from '@fd/components/atoms/Typography';\nimport CancelCircleIcon from '@fd/icons/CancelCircle';\nimport UploadIcon from '@fd/icons/Upload';\nimport { useTranslation } from '@fd/providers/TranslationProvider';\n\nconst StyledUploadAreaContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'hasError',\n})<{ hasError?: boolean }>(({ theme, hasError }) => ({\n flex: '1',\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n boxSizing: 'border-box',\n alignItems: 'center',\n justifyContent: 'center',\n padding: theme.spacing(4),\n borderRadius: theme.radius['radius-8'],\n border: hasError\n ? `1px solid ${theme.palette.semantic.stroke['stroke-error-weak']}`\n : `1px dashed ${theme.palette.semantic.stroke['stroke-strong']}`,\n background: hasError\n ? theme.palette.semantic.fill['fill-error-weak']\n : theme.palette.semantic.fill['fill-weaker'],\n cursor: 'pointer',\n transition: 'all 0.2s ease-in-out',\n [theme.breakpoints.only('mobile')]: {\n justifyContent: 'center',\n gap: theme.spacing(4),\n },\n}));\n\nconst VisuallyHiddenInput = styled('input')({\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(50%)',\n height: 1,\n overflow: 'hidden',\n position: 'absolute',\n bottom: 0,\n left: 0,\n whiteSpace: 'nowrap',\n width: 1,\n});\n\nconst StyledIconContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'hasError',\n})<{ hasError?: boolean }>(({ hasError, theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n width: '48px',\n height: '48px',\n padding: '0px',\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: theme.radius['radius-32'],\n backgroundColor: hasError\n ? theme.palette.semantic.fill['fill-error-weak']\n : theme.palette.semantic.fill['fill-primary-weak'],\n}));\n\nconst StyledButton = styled(FlipdishButton)({\n alignSelf: 'center',\n});\n\n/**\n * Props for the FileDropZone component.\n * Provides a drag-and-drop file upload interface with validation.\n */\nexport interface FileDropZoneProps {\n /**\n * Callback function invoked when files are successfully validated and ready to upload.\n * @param files - Array of File objects to be uploaded\n */\n handleUpload: (files: File[]) => void;\n\n /**\n * Whether multiple files can be selected at once.\n * @default true\n */\n multiple?: boolean;\n\n /**\n * Maximum number of files that can be selected in a single operation.\n * If exceeded, an error message will be displayed.\n * @default undefined (no limit)\n */\n maxFiles?: number;\n\n /**\n * Maximum file size allowed in bytes.\n * Files exceeding this size will be rejected with an error message.\n * Example: 10 * 1024 * 1024 for 10MB\n * @default undefined (no limit)\n */\n maxFileSize?: number;\n\n /**\n * Array of allowed file extensions (without dots).\n * Files with extensions not in this list will be rejected.\n * Example: ['jpg', 'png', 'pdf']\n * @default [] (all file types allowed)\n */\n allowedFileTypes?: string[];\n\n /**\n * Whether the file drop zone is disabled.\n * When true, prevents all file selection and drag-and-drop interactions.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Optional custom error message to display at the top.\n */\n error?: string | null;\n\n /**\n * Text displayed when files are being dragged over the drop zone.\n * @default 'Drop files here'\n */\n dragActiveText?: string;\n\n /**\n * Text displayed when no files are being dragged (idle state).\n * @default 'Drag and drop files here'\n */\n dragInactiveText?: string;\n\n /**\n * Text displayed on the browse/upload button.\n * @default 'Browse files'\n */\n browseButtonText?: string;\n\n /**\n * Text displayed when a file type is not allowed.\n * @default 'File type is not allowed. Allowed types: {allowedFileTypes}'\n */\n invalidFileTypesText?: string;\n\n /**\n * Text displayed when a file size is too large.\n * @default 'File size is too large. Maximum size: {maxFileSize}'\n */\n invalidFileSizeText?: string;\n\n /**\n * Text displayed when too many files are selected.\n * @default 'Too many files selected. Maximum allowed: {maxFiles}'\n */\n invalidFileCountText?: string;\n}\n\nconst FileDropZone: React.FC<FileDropZoneProps> = ({\n handleUpload,\n multiple,\n maxFiles,\n maxFileSize,\n allowedFileTypes = [],\n disabled = false,\n error,\n dragActiveText,\n dragInactiveText,\n browseButtonText,\n invalidFileTypesText,\n invalidFileSizeText,\n invalidFileCountText,\n}) => {\n const theme = useTheme();\n const [isDragActive, setIsDragActive] = useState(false);\n const fileInputRef = useRef<HTMLInputElement>(null);\n const [validationError, setValidationError] = useState<string | null>(null);\n const { translate } = useTranslation();\n const displayError = error ?? validationError;\n\n const validateFile = useCallback(\n (file: File): boolean => {\n // Check file size\n if (maxFileSize && file.size > maxFileSize) {\n setValidationError(\n invalidFileSizeText ||\n translate('File_size_is_too_large', { maxFileSize: maxFileSize?.toString() || '' }),\n );\n return false;\n }\n\n // Check file type\n const fileExtension = file.name.split('.').pop()?.toLowerCase();\n if (allowedFileTypes.length > 0 && fileExtension && !allowedFileTypes.includes(fileExtension)) {\n setValidationError(\n invalidFileTypesText ||\n translate('File_type_is_not_allowed', { allowedFileTypes: allowedFileTypes.join(', ') }),\n );\n return false;\n }\n\n return true;\n },\n [maxFileSize, allowedFileTypes, invalidFileTypesText, invalidFileSizeText, translate],\n );\n\n const processFiles = useCallback(\n (files: File[] | FileList) => {\n const fileArray = Array.from(files);\n const validFiles: File[] = [];\n\n // Check max files limit\n if (maxFiles && fileArray.length > maxFiles) {\n setValidationError(\n invalidFileCountText || translate('Too_many_files_selected', { maxFiles: maxFiles.toString() }),\n );\n return;\n }\n\n // Validate each file\n fileArray.forEach((file) => {\n if (validateFile(file)) {\n validFiles.push(file);\n }\n });\n\n if (validFiles.length > 0) {\n setValidationError(null);\n handleUpload(validFiles);\n }\n },\n [maxFiles, validateFile, handleUpload, invalidFileCountText, translate],\n );\n\n const handleDragEnter = useCallback(\n (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (disabled) return;\n\n setIsDragActive(true);\n },\n [disabled],\n );\n\n const handleDragLeave = useCallback(\n (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (disabled) return;\n\n setIsDragActive(false);\n },\n [disabled],\n );\n\n const handleDragOver = useCallback((e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n }, []);\n\n const handleDrop = useCallback(\n (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (disabled) return;\n\n setIsDragActive(false);\n\n const files = e.dataTransfer.files;\n if (files && files.length > 0) {\n processFiles(files);\n }\n },\n [disabled, processFiles],\n );\n\n const handleFileInputChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n if (disabled) return;\n\n const files = e.target.files;\n if (files && files.length > 0) {\n processFiles(files);\n }\n\n // Reset input value to allow selecting the same file again\n if (fileInputRef.current) {\n fileInputRef.current.value = '';\n }\n },\n [disabled, processFiles],\n );\n\n const handleButtonClick = useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n fileInputRef.current?.click();\n }, []);\n\n const handleContainerClick = useCallback(() => {\n if (disabled) return;\n\n fileInputRef.current?.click();\n }, [disabled]);\n\n return (\n <>\n {!!displayError && (\n <FlipdishFormHelperText error>\n <CancelCircleIcon />\n {displayError}\n </FlipdishFormHelperText>\n )}\n <StyledUploadAreaContainer\n data-fd=\"file-drop-zone\"\n hasError={!!displayError}\n onClick={disabled ? undefined : handleContainerClick}\n onDragEnter={handleDragEnter}\n onDragLeave={handleDragLeave}\n onDragOver={handleDragOver}\n onDrop={handleDrop}\n >\n <VisuallyHiddenInput\n ref={fileInputRef}\n data-fd=\"file-upload-input\"\n disabled={disabled}\n multiple={multiple}\n onChange={handleFileInputChange}\n type=\"file\"\n />\n\n <Stack\n alignItems=\"center\"\n direction=\"column\"\n gap={theme.spacing(2)}\n justifyContent=\"center\"\n width=\"100%\"\n >\n <StyledIconContainer hasError={!!displayError}>\n <UploadIcon\n color={\n displayError\n ? theme.palette.semantic.icon['icon-error']\n : theme.palette.semantic.icon['icon-primary']\n }\n />\n </StyledIconContainer>\n\n <FlipdishTypography variant=\"b1Strong\">\n {isDragActive\n ? dragActiveText || translate('Drop_files_here')\n : dragInactiveText || translate('Drag_and_drop_files_here')}\n </FlipdishTypography>\n\n <StyledButton\n disabled={disabled}\n fdKey=\"file-upload-btn\"\n onClick={disabled ? undefined : handleButtonClick}\n variant=\"secondary\"\n >\n {browseButtonText || translate('Browse_files')}\n </StyledButton>\n </Stack>\n </StyledUploadAreaContainer>\n </>\n );\n};\n\nexport default FileDropZone;\n"],"names":["StyledUploadAreaContainer","styled","Box","shouldForwardProp","prop","theme","hasError","flex","display","flexDirection","height","boxSizing","alignItems","justifyContent","padding","spacing","borderRadius","radius","border","palette","semantic","stroke","background","fill","cursor","transition","breakpoints","only","gap","VisuallyHiddenInput","clip","clipPath","overflow","position","bottom","left","whiteSpace","width","StyledIconContainer","backgroundColor","StyledButton","FlipdishButton","alignSelf","handleUpload","multiple","maxFiles","maxFileSize","allowedFileTypes","disabled","error","dragActiveText","dragInactiveText","browseButtonText","invalidFileTypesText","invalidFileSizeText","invalidFileCountText","useTheme","isDragActive","setIsDragActive","useState","fileInputRef","useRef","validationError","setValidationError","translate","useTranslation","displayError","validateFile","useCallback","file","size","toString","fileExtension","name","split","pop","toLowerCase","length","includes","join","processFiles","files","fileArray","Array","from","validFiles","forEach","push","handleDragEnter","e","preventDefault","stopPropagation","handleDragLeave","handleDragOver","handleDrop","dataTransfer","handleFileInputChange","target","current","value","handleButtonClick","event","click","handleContainerClick","_jsxs","_Fragment","children","FlipdishFormHelperText","_jsx","CancelCircleIcon","onClick","undefined","onDragEnter","onDragLeave","onDragOver","onDrop","ref","onChange","type","Stack","direction","UploadIcon","color","icon","FlipdishTypography","variant","fdKey"],"mappings":"2gBAcA,MAAMA,EAA4BC,EAAOC,EAAK,CAC5CC,kBAAoBC,GAAkB,aAATA,GADGH,EAEP,EAAGI,QAAOC,eAAU,CAC7CC,KAAM,IACNC,QAAS,OACTC,cAAe,SACfC,OAAQ,OACRC,UAAW,aACXC,WAAY,SACZC,eAAgB,SAChBC,QAAST,EAAMU,QAAQ,GACvBC,aAAcX,EAAMY,OAAO,YAC3BC,OAAQZ,EACJ,aAAaD,EAAMc,QAAQC,SAASC,OAAO,uBAC3C,cAAchB,EAAMc,QAAQC,SAASC,OAAO,mBAChDC,WAAYhB,EACRD,EAAMc,QAAQC,SAASG,KAAK,mBAC5BlB,EAAMc,QAAQC,SAASG,KAAK,eAChCC,OAAQ,UACRC,WAAY,uBACZ,CAACpB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D,OAAK,EAAAyD,SAAA,CAC3BE,MAACC,EAAgB,CAAA,GAChB3C,KAGLsC,EAAAA,KAACxG,EAAyB,CAAA,UAChB,iBACRM,WAAY4D,EACZ4C,QAAS9D,OAAW+D,EAAYR,EAChCS,YAAaxB,EACbyB,YAAarB,EACbsB,WAAYrB,EACZsB,OAAQrB,EAAUY,SAAA,CAElBE,EAAAA,IAAC/E,EAAmB,CAClBuF,IAAKxD,EAAY,UACT,oBACRZ,SAAUA,EACVJ,SAAUA,EACVyE,SAAUrB,EACVsB,KAAK,SAGPd,EAAAA,KAACe,EAAK,CACJ3G,WAAW,SACX4G,UAAU,SACV5F,IAAKvB,EAAMU,QAAQ,GACnBF,eAAe,SACfwB,MAAM,OAAMqE,SAAA,CAEZE,EAAAA,IAACtE,EAAmB,CAAChC,WAAY4D,EAAYwC,SAC3CE,EAAAA,IAACa,EAAU,CACTC,MACExD,EACI7D,EAAMc,QAAQC,SAASuG,KAAK,cAC5BtH,EAAMc,QAAQC,SAASuG,KAAK,oBAKtCf,EAAAA,IAACgB,GAAmBC,QAAQ,WAAUnB,SACnCjD,EACGP,GAAkBc,EAAU,mBAC5Bb,GAAoBa,EAAU,8BAGpC4C,EAAAA,IAACpE,EAAY,CACXQ,SAAUA,EACV8E,MAAM,kBACNhB,QAAS9D,OAAW+D,EAAYX,EAChCyB,QAAQ,YAAWnB,SAElBtD,GAAoBY,EAAU"}
|
|
1
|
+
{"version":3,"file":"FileDropZone.cjs.js","sources":["../../../../../src/components/organisms/FileUpload/components/FileDropZone.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useRef, useState } from 'react';\n\nimport Box from '@mui/material/Box/Box';\nimport Stack from '@mui/material/Stack/Stack';\nimport styled from '@mui/material/styles/styled';\nimport useTheme from '@mui/material/styles/useTheme';\n\nimport FlipdishButton from '@fd/components/atoms/Button';\nimport FlipdishFormHelperText from '@fd/components/atoms/FormHelperText';\nimport FlipdishTypography from '@fd/components/atoms/Typography';\nimport CancelCircleIcon from '@fd/icons/CancelCircle';\nimport UploadIcon from '@fd/icons/Upload';\nimport { useTranslation } from '@fd/providers/TranslationProvider';\n\nconst StyledUploadAreaContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'hasError',\n})<{ hasError?: boolean }>(({ theme, hasError }) => ({\n flex: '1',\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n boxSizing: 'border-box',\n alignItems: 'center',\n justifyContent: 'center',\n padding: theme.spacing(4),\n borderRadius: theme.radius['radius-8'],\n border: hasError\n ? `1px solid ${theme.palette.semantic.stroke['stroke-error-weak']}`\n : `1px dashed ${theme.palette.semantic.stroke['stroke-strong']}`,\n background: hasError\n ? theme.palette.semantic.fill['fill-error-weak']\n : theme.palette.semantic.fill['fill-weaker'],\n cursor: 'pointer',\n transition: 'all 0.2s ease-in-out',\n [theme.breakpoints.only('mobile')]: {\n justifyContent: 'center',\n gap: theme.spacing(4),\n },\n}));\n\nconst VisuallyHiddenInput = styled('input')({\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(50%)',\n height: 1,\n overflow: 'hidden',\n position: 'absolute',\n bottom: 0,\n left: 0,\n whiteSpace: 'nowrap',\n width: 1,\n});\n\nconst StyledIconContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'hasError',\n})<{ hasError?: boolean }>(({ hasError, theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n width: '48px',\n height: '48px',\n padding: '0px',\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: theme.radius['radius-32'],\n backgroundColor: hasError\n ? theme.palette.semantic.fill['fill-error-weak']\n : theme.palette.semantic.fill['fill-primary-weak'],\n}));\n\nconst StyledButton = styled(FlipdishButton)({\n alignSelf: 'center',\n});\n\n/**\n * Props for the FileDropZone component.\n * Provides a drag-and-drop file upload interface with validation.\n */\nexport interface FileDropZoneProps {\n /**\n * Callback function invoked when files are successfully validated and ready to upload.\n * @param files - Array of File objects to be uploaded\n */\n handleUpload: (files: File[]) => void;\n\n /**\n * Whether multiple files can be selected at once.\n * @default true\n */\n multiple?: boolean;\n\n /**\n * Maximum number of files that can be selected in a single operation.\n * If exceeded, an error message will be displayed.\n * @default undefined (no limit)\n */\n maxFiles?: number;\n\n /**\n * Maximum file size allowed in bytes.\n * Files exceeding this size will be rejected with an error message.\n * Example: 10 * 1024 * 1024 for 10MB\n * @default undefined (no limit)\n */\n maxFileSize?: number;\n\n /**\n * Array of allowed file extensions (without dots).\n * Files with extensions not in this list will be rejected.\n * Example: ['jpg', 'png', 'pdf']\n * @default [] (all file types allowed)\n */\n allowedFileTypes?: string[];\n\n /**\n * Whether the file drop zone is disabled.\n * When true, prevents all file selection and drag-and-drop interactions.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Optional custom error message to display at the top.\n */\n error?: string | null;\n\n /**\n * Text displayed when files are being dragged over the drop zone.\n * @default 'Drop files here'\n */\n dragActiveText?: string;\n\n /**\n * Text displayed when no files are being dragged (idle state).\n * @default 'Drag and drop files here'\n */\n dragInactiveText?: string;\n\n /**\n * Text displayed on the browse/upload button.\n * @default 'Browse files'\n */\n browseButtonText?: string;\n\n /**\n * Text displayed when a file type is not allowed.\n * @default 'File type is not allowed. Allowed types: {allowedFileTypes}'\n */\n invalidFileTypesText?: string;\n\n /**\n * Text displayed when a file size is too large.\n * @default 'File size is too large. Maximum size: {maxFileSize}'\n */\n invalidFileSizeText?: string;\n\n /**\n * Text displayed when too many files are selected.\n * @default 'Too many files selected. Maximum allowed: {maxFiles}'\n */\n invalidFileCountText?: string;\n}\n\nconst FileDropZone: React.FC<FileDropZoneProps> = ({\n handleUpload,\n multiple,\n maxFiles,\n maxFileSize,\n allowedFileTypes = [],\n disabled = false,\n error,\n dragActiveText,\n dragInactiveText,\n browseButtonText,\n invalidFileTypesText,\n invalidFileSizeText,\n invalidFileCountText,\n}) => {\n const theme = useTheme();\n const [isDragActive, setIsDragActive] = useState(false);\n const fileInputRef = useRef<HTMLInputElement>(null);\n const [validationError, setValidationError] = useState<string | null>(null);\n const { translate } = useTranslation();\n const displayError = validationError ?? error;\n const inputAccept = useMemo(() => {\n if (!allowedFileTypes.length) return undefined;\n\n return allowedFileTypes\n .filter(Boolean)\n .map((ext) => (ext.startsWith('.') ? ext : `.${ext}`))\n .join(',');\n }, [allowedFileTypes]);\n\n const validateFile = useCallback(\n (file: File): boolean => {\n // Check file size\n if (maxFileSize && file.size > maxFileSize) {\n setValidationError(\n invalidFileSizeText ||\n translate('File_size_is_too_large', { maxFileSize: maxFileSize?.toString() || '' }),\n );\n return false;\n }\n\n // Check file type\n const fileExtension = file.name.split('.').pop()?.toLowerCase();\n if (allowedFileTypes.length > 0 && fileExtension && !allowedFileTypes.includes(fileExtension)) {\n setValidationError(\n invalidFileTypesText ||\n translate('File_type_is_not_allowed', { allowedFileTypes: allowedFileTypes.join(', ') }),\n );\n return false;\n }\n\n return true;\n },\n [maxFileSize, allowedFileTypes, invalidFileTypesText, invalidFileSizeText, translate],\n );\n\n const processFiles = useCallback(\n (files: File[] | FileList) => {\n const fileArray = Array.from(files);\n const validFiles: File[] = [];\n\n // Check max files limit\n if (maxFiles && fileArray.length > maxFiles) {\n setValidationError(\n invalidFileCountText || translate('Too_many_files_selected', { maxFiles: maxFiles.toString() }),\n );\n return;\n }\n\n // Validate each file\n fileArray.forEach((file) => {\n if (validateFile(file)) {\n validFiles.push(file);\n }\n });\n\n if (validFiles.length > 0) {\n setValidationError(null);\n handleUpload(validFiles);\n }\n },\n [maxFiles, validateFile, handleUpload, invalidFileCountText, translate],\n );\n\n const handleDragEnter = useCallback(\n (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (disabled) return;\n\n setIsDragActive(true);\n },\n [disabled],\n );\n\n const handleDragLeave = useCallback(\n (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (disabled) return;\n\n setIsDragActive(false);\n },\n [disabled],\n );\n\n const handleDragOver = useCallback((e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n }, []);\n\n const handleDrop = useCallback(\n (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (disabled) return;\n\n setIsDragActive(false);\n\n const files = e.dataTransfer.files;\n if (files && files.length > 0) {\n processFiles(files);\n }\n },\n [disabled, processFiles],\n );\n\n const handleFileInputChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n if (disabled) return;\n\n const files = e.target.files;\n if (files && files.length > 0) {\n processFiles(files);\n }\n\n // Reset input value to allow selecting the same file again\n if (fileInputRef.current) {\n fileInputRef.current.value = '';\n }\n },\n [disabled, processFiles],\n );\n\n const handleButtonClick = useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n fileInputRef.current?.click();\n }, []);\n\n const handleContainerClick = useCallback(() => {\n if (disabled) return;\n\n fileInputRef.current?.click();\n }, [disabled]);\n\n return (\n <>\n {!!displayError && (\n <FlipdishFormHelperText error>\n <CancelCircleIcon />\n {displayError}\n </FlipdishFormHelperText>\n )}\n <StyledUploadAreaContainer\n data-fd=\"file-drop-zone\"\n hasError={!!displayError}\n onClick={disabled ? undefined : handleContainerClick}\n onDragEnter={handleDragEnter}\n onDragLeave={handleDragLeave}\n onDragOver={handleDragOver}\n onDrop={handleDrop}\n >\n <VisuallyHiddenInput\n ref={fileInputRef}\n accept={inputAccept}\n data-fd=\"file-upload-input\"\n disabled={disabled}\n multiple={multiple}\n onChange={handleFileInputChange}\n type=\"file\"\n />\n\n <Stack\n alignItems=\"center\"\n direction=\"column\"\n gap={theme.spacing(2)}\n justifyContent=\"center\"\n width=\"100%\"\n >\n <StyledIconContainer hasError={!!displayError}>\n <UploadIcon\n color={\n displayError\n ? theme.palette.semantic.icon['icon-error']\n : theme.palette.semantic.icon['icon-primary']\n }\n />\n </StyledIconContainer>\n\n <FlipdishTypography variant=\"b1Strong\">\n {isDragActive\n ? dragActiveText || translate('Drop_files_here')\n : dragInactiveText || translate('Drag_and_drop_files_here')}\n </FlipdishTypography>\n\n <StyledButton\n disabled={disabled}\n fdKey=\"file-upload-btn\"\n onClick={disabled ? undefined : handleButtonClick}\n variant=\"secondary\"\n >\n {browseButtonText || translate('Browse_files')}\n </StyledButton>\n </Stack>\n </StyledUploadAreaContainer>\n </>\n );\n};\n\nexport default FileDropZone;\n"],"names":["StyledUploadAreaContainer","styled","Box","shouldForwardProp","prop","theme","hasError","flex","display","flexDirection","height","boxSizing","alignItems","justifyContent","padding","spacing","borderRadius","radius","border","palette","semantic","stroke","background","fill","cursor","transition","breakpoints","only","gap","VisuallyHiddenInput","clip","clipPath","overflow","position","bottom","left","whiteSpace","width","StyledIconContainer","backgroundColor","StyledButton","FlipdishButton","alignSelf","handleUpload","multiple","maxFiles","maxFileSize","allowedFileTypes","disabled","error","dragActiveText","dragInactiveText","browseButtonText","invalidFileTypesText","invalidFileSizeText","invalidFileCountText","useTheme","isDragActive","setIsDragActive","useState","fileInputRef","useRef","validationError","setValidationError","translate","useTranslation","displayError","inputAccept","useMemo","length","filter","Boolean","map","ext","startsWith","join","validateFile","useCallback","file","size","toString","fileExtension","name","split","pop","toLowerCase","includes","processFiles","files","fileArray","Array","from","validFiles","forEach","push","handleDragEnter","e","preventDefault","stopPropagation","handleDragLeave","handleDragOver","handleDrop","dataTransfer","handleFileInputChange","target","current","value","handleButtonClick","event","click","handleContainerClick","_jsxs","_Fragment","children","FlipdishFormHelperText","_jsx","CancelCircleIcon","onClick","undefined","onDragEnter","onDragLeave","onDragOver","onDrop","ref","accept","onChange","type","Stack","direction","UploadIcon","color","icon","FlipdishTypography","variant","fdKey"],"mappings":"2gBAcA,MAAMA,EAA4BC,EAAOC,EAAK,CAC5CC,kBAAoBC,GAAkB,aAATA,GADGH,EAEP,EAAGI,QAAOC,eAAU,CAC7CC,KAAM,IACNC,QAAS,OACTC,cAAe,SACfC,OAAQ,OACRC,UAAW,aACXC,WAAY,SACZC,eAAgB,SAChBC,QAAST,EAAMU,QAAQ,GACvBC,aAAcX,EAAMY,OAAO,YAC3BC,OAAQZ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YAAWpB,SAElB7D,GAAoBY,EAAU"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import{useState as i,useRef as o,useCallback as
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import{useState as i,useRef as o,useMemo as a,useCallback as l}from"react";import n from"@mui/material/Box/Box";import s from"@mui/material/Stack/Stack";import p from"@mui/material/styles/styled";import d from"@mui/material/styles/useTheme";import{Button as c}from"../../../atoms/Button/index.js";import m from"@mui/material/FormHelperText";import f from"@mui/material/Typography";import u from"../../../../icons/CancelCircle/index.js";import h from"../../../../icons/Upload/index.js";import{useTranslation as g}from"../../../../providers/TranslationProvider.js";const x=p(n,{shouldForwardProp:e=>"hasError"!==e})((({theme:e,hasError:r})=>({flex:"1",display:"flex",flexDirection:"column",height:"100%",boxSizing:"border-box",alignItems:"center",justifyContent:"center",padding:e.spacing(4),borderRadius:e.radius["radius-8"],border:r?`1px solid ${e.palette.semantic.stroke["stroke-error-weak"]}`:`1px dashed ${e.palette.semantic.stroke["stroke-strong"]}`,background:r?e.palette.semantic.fill["fill-error-weak"]:e.palette.semantic.fill["fill-weaker"],cursor:"pointer",transition:"all 0.2s ease-in-out",[e.breakpoints.only("mobile")]:{justifyContent:"center",gap:e.spacing(4)}}))),y=p("input")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:1,overflow:"hidden",position:"absolute",bottom:0,left:0,whiteSpace:"nowrap",width:1}),v=p(n,{shouldForwardProp:e=>"hasError"!==e})((({hasError:e,theme:r})=>({display:"flex",flexDirection:"column",width:"48px",height:"48px",padding:"0px",justifyContent:"center",alignItems:"center",borderRadius:r.radius["radius-32"],backgroundColor:e?r.palette.semantic.fill["fill-error-weak"]:r.palette.semantic.fill["fill-primary-weak"]}))),w=p(c)({alignSelf:"center"}),b=({handleUpload:n,multiple:p,maxFiles:c,maxFileSize:b,allowedFileTypes:k=[],disabled:_=!1,error:T,dragActiveText:F,dragInactiveText:D,browseButtonText:C,invalidFileTypesText:j,invalidFileSizeText:S,invalidFileCountText:P})=>{const E=d(),[z,B]=i(!1),I=o(null),[$,A]=i(null),{translate:L}=g(),R=$??T,U=a((()=>{if(k.length)return k.filter(Boolean).map((e=>e.startsWith(".")?e:`.${e}`)).join(",")}),[k]),H=l((e=>{if(b&&e.size>b)return A(S||L("File_size_is_too_large",{maxFileSize:b?.toString()||""})),!1;const r=e.name.split(".").pop()?.toLowerCase();return!(k.length>0&&r&&!k.includes(r))||(A(j||L("File_type_is_not_allowed",{allowedFileTypes:k.join(", ")})),!1)}),[b,k,j,S,L]),K=l((e=>{const r=Array.from(e),t=[];c&&r.length>c?A(P||L("Too_many_files_selected",{maxFiles:c.toString()})):(r.forEach((e=>{H(e)&&t.push(e)})),t.length>0&&(A(null),n(t)))}),[c,H,n,P,L]),O=l((e=>{e.preventDefault(),e.stopPropagation(),_||B(!0)}),[_]),W=l((e=>{e.preventDefault(),e.stopPropagation(),_||B(!1)}),[_]),q=l((e=>{e.preventDefault(),e.stopPropagation()}),[]),G=l((e=>{if(e.preventDefault(),e.stopPropagation(),_)return;B(!1);const r=e.dataTransfer.files;r&&r.length>0&&K(r)}),[_,K]),J=l((e=>{if(_)return;const r=e.target.files;r&&r.length>0&&K(r),I.current&&(I.current.value="")}),[_,K]),M=l((e=>{e.preventDefault(),e.stopPropagation(),I.current?.click()}),[]),N=l((()=>{_||I.current?.click()}),[_]);return e(r,{children:[!!R&&e(m,{error:!0,children:[t(u,{}),R]}),e(x,{"data-fd":"file-drop-zone",hasError:!!R,onClick:_?void 0:N,onDragEnter:O,onDragLeave:W,onDragOver:q,onDrop:G,children:[t(y,{ref:I,accept:U,"data-fd":"file-upload-input",disabled:_,multiple:p,onChange:J,type:"file"}),e(s,{alignItems:"center",direction:"column",gap:E.spacing(2),justifyContent:"center",width:"100%",children:[t(v,{hasError:!!R,children:t(h,{color:R?E.palette.semantic.icon["icon-error"]:E.palette.semantic.icon["icon-primary"]})}),t(f,{variant:"b1Strong",children:z?F||L("Drop_files_here"):D||L("Drag_and_drop_files_here")}),t(w,{disabled:_,fdKey:"file-upload-btn",onClick:_?void 0:M,variant:"secondary",children:C||L("Browse_files")})]})]})]})};export{b as default};
|
|
2
2
|
//# sourceMappingURL=FileDropZone.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileDropZone.js","sources":["../../../../../src/components/organisms/FileUpload/components/FileDropZone.tsx"],"sourcesContent":["import React, { useCallback, useRef, useState } from 'react';\n\nimport Box from '@mui/material/Box/Box';\nimport Stack from '@mui/material/Stack/Stack';\nimport styled from '@mui/material/styles/styled';\nimport useTheme from '@mui/material/styles/useTheme';\n\nimport FlipdishButton from '@fd/components/atoms/Button';\nimport FlipdishFormHelperText from '@fd/components/atoms/FormHelperText';\nimport FlipdishTypography from '@fd/components/atoms/Typography';\nimport CancelCircleIcon from '@fd/icons/CancelCircle';\nimport UploadIcon from '@fd/icons/Upload';\nimport { useTranslation } from '@fd/providers/TranslationProvider';\n\nconst StyledUploadAreaContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'hasError',\n})<{ hasError?: boolean }>(({ theme, hasError }) => ({\n flex: '1',\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n boxSizing: 'border-box',\n alignItems: 'center',\n justifyContent: 'center',\n padding: theme.spacing(4),\n borderRadius: theme.radius['radius-8'],\n border: hasError\n ? `1px solid ${theme.palette.semantic.stroke['stroke-error-weak']}`\n : `1px dashed ${theme.palette.semantic.stroke['stroke-strong']}`,\n background: hasError\n ? theme.palette.semantic.fill['fill-error-weak']\n : theme.palette.semantic.fill['fill-weaker'],\n cursor: 'pointer',\n transition: 'all 0.2s ease-in-out',\n [theme.breakpoints.only('mobile')]: {\n justifyContent: 'center',\n gap: theme.spacing(4),\n },\n}));\n\nconst VisuallyHiddenInput = styled('input')({\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(50%)',\n height: 1,\n overflow: 'hidden',\n position: 'absolute',\n bottom: 0,\n left: 0,\n whiteSpace: 'nowrap',\n width: 1,\n});\n\nconst StyledIconContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'hasError',\n})<{ hasError?: boolean }>(({ hasError, theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n width: '48px',\n height: '48px',\n padding: '0px',\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: theme.radius['radius-32'],\n backgroundColor: hasError\n ? theme.palette.semantic.fill['fill-error-weak']\n : theme.palette.semantic.fill['fill-primary-weak'],\n}));\n\nconst StyledButton = styled(FlipdishButton)({\n alignSelf: 'center',\n});\n\n/**\n * Props for the FileDropZone component.\n * Provides a drag-and-drop file upload interface with validation.\n */\nexport interface FileDropZoneProps {\n /**\n * Callback function invoked when files are successfully validated and ready to upload.\n * @param files - Array of File objects to be uploaded\n */\n handleUpload: (files: File[]) => void;\n\n /**\n * Whether multiple files can be selected at once.\n * @default true\n */\n multiple?: boolean;\n\n /**\n * Maximum number of files that can be selected in a single operation.\n * If exceeded, an error message will be displayed.\n * @default undefined (no limit)\n */\n maxFiles?: number;\n\n /**\n * Maximum file size allowed in bytes.\n * Files exceeding this size will be rejected with an error message.\n * Example: 10 * 1024 * 1024 for 10MB\n * @default undefined (no limit)\n */\n maxFileSize?: number;\n\n /**\n * Array of allowed file extensions (without dots).\n * Files with extensions not in this list will be rejected.\n * Example: ['jpg', 'png', 'pdf']\n * @default [] (all file types allowed)\n */\n allowedFileTypes?: string[];\n\n /**\n * Whether the file drop zone is disabled.\n * When true, prevents all file selection and drag-and-drop interactions.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Optional custom error message to display at the top.\n */\n error?: string | null;\n\n /**\n * Text displayed when files are being dragged over the drop zone.\n * @default 'Drop files here'\n */\n dragActiveText?: string;\n\n /**\n * Text displayed when no files are being dragged (idle state).\n * @default 'Drag and drop files here'\n */\n dragInactiveText?: string;\n\n /**\n * Text displayed on the browse/upload button.\n * @default 'Browse files'\n */\n browseButtonText?: string;\n\n /**\n * Text displayed when a file type is not allowed.\n * @default 'File type is not allowed. Allowed types: {allowedFileTypes}'\n */\n invalidFileTypesText?: string;\n\n /**\n * Text displayed when a file size is too large.\n * @default 'File size is too large. Maximum size: {maxFileSize}'\n */\n invalidFileSizeText?: string;\n\n /**\n * Text displayed when too many files are selected.\n * @default 'Too many files selected. Maximum allowed: {maxFiles}'\n */\n invalidFileCountText?: string;\n}\n\nconst FileDropZone: React.FC<FileDropZoneProps> = ({\n handleUpload,\n multiple,\n maxFiles,\n maxFileSize,\n allowedFileTypes = [],\n disabled = false,\n error,\n dragActiveText,\n dragInactiveText,\n browseButtonText,\n invalidFileTypesText,\n invalidFileSizeText,\n invalidFileCountText,\n}) => {\n const theme = useTheme();\n const [isDragActive, setIsDragActive] = useState(false);\n const fileInputRef = useRef<HTMLInputElement>(null);\n const [validationError, setValidationError] = useState<string | null>(null);\n const { translate } = useTranslation();\n const displayError = error ?? validationError;\n\n const validateFile = useCallback(\n (file: File): boolean => {\n // Check file size\n if (maxFileSize && file.size > maxFileSize) {\n setValidationError(\n invalidFileSizeText ||\n translate('File_size_is_too_large', { maxFileSize: maxFileSize?.toString() || '' }),\n );\n return false;\n }\n\n // Check file type\n const fileExtension = file.name.split('.').pop()?.toLowerCase();\n if (allowedFileTypes.length > 0 && fileExtension && !allowedFileTypes.includes(fileExtension)) {\n setValidationError(\n invalidFileTypesText ||\n translate('File_type_is_not_allowed', { allowedFileTypes: allowedFileTypes.join(', ') }),\n );\n return false;\n }\n\n return true;\n },\n [maxFileSize, allowedFileTypes, invalidFileTypesText, invalidFileSizeText, translate],\n );\n\n const processFiles = useCallback(\n (files: File[] | FileList) => {\n const fileArray = Array.from(files);\n const validFiles: File[] = [];\n\n // Check max files limit\n if (maxFiles && fileArray.length > maxFiles) {\n setValidationError(\n invalidFileCountText || translate('Too_many_files_selected', { maxFiles: maxFiles.toString() }),\n );\n return;\n }\n\n // Validate each file\n fileArray.forEach((file) => {\n if (validateFile(file)) {\n validFiles.push(file);\n }\n });\n\n if (validFiles.length > 0) {\n setValidationError(null);\n handleUpload(validFiles);\n }\n },\n [maxFiles, validateFile, handleUpload, invalidFileCountText, translate],\n );\n\n const handleDragEnter = useCallback(\n (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (disabled) return;\n\n setIsDragActive(true);\n },\n [disabled],\n );\n\n const handleDragLeave = useCallback(\n (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (disabled) return;\n\n setIsDragActive(false);\n },\n [disabled],\n );\n\n const handleDragOver = useCallback((e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n }, []);\n\n const handleDrop = useCallback(\n (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (disabled) return;\n\n setIsDragActive(false);\n\n const files = e.dataTransfer.files;\n if (files && files.length > 0) {\n processFiles(files);\n }\n },\n [disabled, processFiles],\n );\n\n const handleFileInputChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n if (disabled) return;\n\n const files = e.target.files;\n if (files && files.length > 0) {\n processFiles(files);\n }\n\n // Reset input value to allow selecting the same file again\n if (fileInputRef.current) {\n fileInputRef.current.value = '';\n }\n },\n [disabled, processFiles],\n );\n\n const handleButtonClick = useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n fileInputRef.current?.click();\n }, []);\n\n const handleContainerClick = useCallback(() => {\n if (disabled) return;\n\n fileInputRef.current?.click();\n }, [disabled]);\n\n return (\n <>\n {!!displayError && (\n <FlipdishFormHelperText error>\n <CancelCircleIcon />\n {displayError}\n </FlipdishFormHelperText>\n )}\n <StyledUploadAreaContainer\n data-fd=\"file-drop-zone\"\n hasError={!!displayError}\n onClick={disabled ? undefined : handleContainerClick}\n onDragEnter={handleDragEnter}\n onDragLeave={handleDragLeave}\n onDragOver={handleDragOver}\n onDrop={handleDrop}\n >\n <VisuallyHiddenInput\n ref={fileInputRef}\n data-fd=\"file-upload-input\"\n disabled={disabled}\n multiple={multiple}\n onChange={handleFileInputChange}\n type=\"file\"\n />\n\n <Stack\n alignItems=\"center\"\n direction=\"column\"\n gap={theme.spacing(2)}\n justifyContent=\"center\"\n width=\"100%\"\n >\n <StyledIconContainer hasError={!!displayError}>\n <UploadIcon\n color={\n displayError\n ? theme.palette.semantic.icon['icon-error']\n : theme.palette.semantic.icon['icon-primary']\n }\n />\n </StyledIconContainer>\n\n <FlipdishTypography variant=\"b1Strong\">\n {isDragActive\n ? dragActiveText || translate('Drop_files_here')\n : dragInactiveText || translate('Drag_and_drop_files_here')}\n </FlipdishTypography>\n\n <StyledButton\n disabled={disabled}\n fdKey=\"file-upload-btn\"\n onClick={disabled ? undefined : handleButtonClick}\n variant=\"secondary\"\n >\n {browseButtonText || translate('Browse_files')}\n </StyledButton>\n </Stack>\n </StyledUploadAreaContainer>\n </>\n );\n};\n\nexport default FileDropZone;\n"],"names":["StyledUploadAreaContainer","styled","Box","shouldForwardProp","prop","theme","hasError","flex","display","flexDirection","height","boxSizing","alignItems","justifyContent","padding","spacing","borderRadius","radius","border","palette","semantic","stroke","background","fill","cursor","transition","breakpoints","only","gap","VisuallyHiddenInput","clip","clipPath","overflow","position","bottom","left","whiteSpace","width","StyledIconContainer","backgroundColor","StyledButton","FlipdishButton","alignSelf","FileDropZone","handleUpload","multiple","maxFiles","maxFileSize","allowedFileTypes","disabled","error","dragActiveText","dragInactiveText","browseButtonText","invalidFileTypesText","invalidFileSizeText","invalidFileCountText","useTheme","isDragActive","setIsDragActive","useState","fileInputRef","useRef","validationError","setValidationError","translate","useTranslation","displayError","validateFile","useCallback","file","size","toString","fileExtension","name","split","pop","toLowerCase","length","includes","join","processFiles","files","fileArray","Array","from","validFiles","forEach","push","handleDragEnter","e","preventDefault","stopPropagation","handleDragLeave","handleDragOver","handleDrop","dataTransfer","handleFileInputChange","target","current","value","handleButtonClick","event","click","handleContainerClick","_jsxs","_Fragment","children","FlipdishFormHelperText","_jsx","CancelCircleIcon","onClick","undefined","onDragEnter","onDragLeave","onDragOver","onDrop","ref","onChange","type","Stack","direction","UploadIcon","color","icon","FlipdishTypography","variant","fdKey"],"mappings":"smBAcA,MAAMA,EAA4BC,EAAOC,EAAK,CAC5CC,kBAAoBC,GAAkB,aAATA,GADGH,EAEP,EAAGI,QAAOC,eAAU,CAC7CC,KAAM,IACNC,QAAS,OACTC,cAAe,SACfC,OAAQ,OACRC,UAAW,aACXC,WAAY,SACZC,eAAgB,SAChBC,QAAST,EAAMU,QAAQ,GACvBC,aAAcX,EAAMY,OAAO,YAC3BC,OAAQZ,EACJ,aAAaD,EAAMc,QAAQC,SAASC,OAAO,uBAC3C,cAAchB,EAAMc,QAAQC,SAASC,OAAO,mBAChDC,WAAYhB,EACRD,EAAMc,QAAQC,SAASG,KAAK,mBAC5BlB,EAAMc,QAAQC,SAASG,KAAK,eAChCC,OAAQ,UACRC,WAAY,uBACZ,CAACpB,EAAMqB,YAAYC,KAAK,WAAY,CAClCd,eAAgB,SAChBe,IAAKvB,EAAMU,QAAQ,QAIjBc,EAAsB5B,EAAO,QAAPA,CAAgB,CAC1C6B,KAAM,gBACNC,SAAU,aACVrB,OAAQ,EACRsB,SAAU,SACVC,SAAU,WACVC,OAAQ,EACRC,KAAM,EACNC,WAAY,SACZC,MAAO,IAGHC,EAAsBrC,EAAOC,EAAK,CACtCC,kBAAoBC,GAAkB,aAATA,GADHH,EAED,EAAGK,WAAUD,YAAO,CAC7CG,QAAS,OACTC,cAAe,SACf4B,MAAO,OACP3B,OAAQ,OACRI,QAAS,MACTD,eAAgB,SAChBD,WAAY,SACZI,aAAcX,EAAMY,OAAO,aAC3BsB,gBAAiBjC,EACbD,EAAMc,QAAQC,SAASG,KAAK,mBAC5BlB,EAAMc,QAAQC,SAASG,KAAK,yBAG5BiB,EAAevC,EAAOwC,EAAPxC,CAAuB,CAC1CyC,UAAW,WA4FPC,EAA4C,EAChDC,eACAC,WACAC,WACAC,cACAC,mBAAmB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4C,EAACrE,EAAY,CACXS,SAAUA,EACV8E,MAAM,kBACNhB,QAAS9D,OAAW+D,EAAYX,EAChCyB,QAAQ,YAAWnB,SAElBtD,GAAoBY,EAAU"}
|
|
1
|
+
{"version":3,"file":"FileDropZone.js","sources":["../../../../../src/components/organisms/FileUpload/components/FileDropZone.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useRef, useState } from 'react';\n\nimport Box from '@mui/material/Box/Box';\nimport Stack from '@mui/material/Stack/Stack';\nimport styled from '@mui/material/styles/styled';\nimport useTheme from '@mui/material/styles/useTheme';\n\nimport FlipdishButton from '@fd/components/atoms/Button';\nimport FlipdishFormHelperText from '@fd/components/atoms/FormHelperText';\nimport FlipdishTypography from '@fd/components/atoms/Typography';\nimport CancelCircleIcon from '@fd/icons/CancelCircle';\nimport UploadIcon from '@fd/icons/Upload';\nimport { useTranslation } from '@fd/providers/TranslationProvider';\n\nconst StyledUploadAreaContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'hasError',\n})<{ hasError?: boolean }>(({ theme, hasError }) => ({\n flex: '1',\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n boxSizing: 'border-box',\n alignItems: 'center',\n justifyContent: 'center',\n padding: theme.spacing(4),\n borderRadius: theme.radius['radius-8'],\n border: hasError\n ? `1px solid ${theme.palette.semantic.stroke['stroke-error-weak']}`\n : `1px dashed ${theme.palette.semantic.stroke['stroke-strong']}`,\n background: hasError\n ? theme.palette.semantic.fill['fill-error-weak']\n : theme.palette.semantic.fill['fill-weaker'],\n cursor: 'pointer',\n transition: 'all 0.2s ease-in-out',\n [theme.breakpoints.only('mobile')]: {\n justifyContent: 'center',\n gap: theme.spacing(4),\n },\n}));\n\nconst VisuallyHiddenInput = styled('input')({\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(50%)',\n height: 1,\n overflow: 'hidden',\n position: 'absolute',\n bottom: 0,\n left: 0,\n whiteSpace: 'nowrap',\n width: 1,\n});\n\nconst StyledIconContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'hasError',\n})<{ hasError?: boolean }>(({ hasError, theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n width: '48px',\n height: '48px',\n padding: '0px',\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: theme.radius['radius-32'],\n backgroundColor: hasError\n ? theme.palette.semantic.fill['fill-error-weak']\n : theme.palette.semantic.fill['fill-primary-weak'],\n}));\n\nconst StyledButton = styled(FlipdishButton)({\n alignSelf: 'center',\n});\n\n/**\n * Props for the FileDropZone component.\n * Provides a drag-and-drop file upload interface with validation.\n */\nexport interface FileDropZoneProps {\n /**\n * Callback function invoked when files are successfully validated and ready to upload.\n * @param files - Array of File objects to be uploaded\n */\n handleUpload: (files: File[]) => void;\n\n /**\n * Whether multiple files can be selected at once.\n * @default true\n */\n multiple?: boolean;\n\n /**\n * Maximum number of files that can be selected in a single operation.\n * If exceeded, an error message will be displayed.\n * @default undefined (no limit)\n */\n maxFiles?: number;\n\n /**\n * Maximum file size allowed in bytes.\n * Files exceeding this size will be rejected with an error message.\n * Example: 10 * 1024 * 1024 for 10MB\n * @default undefined (no limit)\n */\n maxFileSize?: number;\n\n /**\n * Array of allowed file extensions (without dots).\n * Files with extensions not in this list will be rejected.\n * Example: ['jpg', 'png', 'pdf']\n * @default [] (all file types allowed)\n */\n allowedFileTypes?: string[];\n\n /**\n * Whether the file drop zone is disabled.\n * When true, prevents all file selection and drag-and-drop interactions.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Optional custom error message to display at the top.\n */\n error?: string | null;\n\n /**\n * Text displayed when files are being dragged over the drop zone.\n * @default 'Drop files here'\n */\n dragActiveText?: string;\n\n /**\n * Text displayed when no files are being dragged (idle state).\n * @default 'Drag and drop files here'\n */\n dragInactiveText?: string;\n\n /**\n * Text displayed on the browse/upload button.\n * @default 'Browse files'\n */\n browseButtonText?: string;\n\n /**\n * Text displayed when a file type is not allowed.\n * @default 'File type is not allowed. Allowed types: {allowedFileTypes}'\n */\n invalidFileTypesText?: string;\n\n /**\n * Text displayed when a file size is too large.\n * @default 'File size is too large. Maximum size: {maxFileSize}'\n */\n invalidFileSizeText?: string;\n\n /**\n * Text displayed when too many files are selected.\n * @default 'Too many files selected. Maximum allowed: {maxFiles}'\n */\n invalidFileCountText?: string;\n}\n\nconst FileDropZone: React.FC<FileDropZoneProps> = ({\n handleUpload,\n multiple,\n maxFiles,\n maxFileSize,\n allowedFileTypes = [],\n disabled = false,\n error,\n dragActiveText,\n dragInactiveText,\n browseButtonText,\n invalidFileTypesText,\n invalidFileSizeText,\n invalidFileCountText,\n}) => {\n const theme = useTheme();\n const [isDragActive, setIsDragActive] = useState(false);\n const fileInputRef = useRef<HTMLInputElement>(null);\n const [validationError, setValidationError] = useState<string | null>(null);\n const { translate } = useTranslation();\n const displayError = validationError ?? error;\n const inputAccept = useMemo(() => {\n if (!allowedFileTypes.length) return undefined;\n\n return allowedFileTypes\n .filter(Boolean)\n .map((ext) => (ext.startsWith('.') ? ext : `.${ext}`))\n .join(',');\n }, [allowedFileTypes]);\n\n const validateFile = useCallback(\n (file: File): boolean => {\n // Check file size\n if (maxFileSize && file.size > maxFileSize) {\n setValidationError(\n invalidFileSizeText ||\n translate('File_size_is_too_large', { maxFileSize: maxFileSize?.toString() || '' }),\n );\n return false;\n }\n\n // Check file type\n const fileExtension = file.name.split('.').pop()?.toLowerCase();\n if (allowedFileTypes.length > 0 && fileExtension && !allowedFileTypes.includes(fileExtension)) {\n setValidationError(\n invalidFileTypesText ||\n translate('File_type_is_not_allowed', { allowedFileTypes: allowedFileTypes.join(', ') }),\n );\n return false;\n }\n\n return true;\n },\n [maxFileSize, allowedFileTypes, invalidFileTypesText, invalidFileSizeText, translate],\n );\n\n const processFiles = useCallback(\n (files: File[] | FileList) => {\n const fileArray = Array.from(files);\n const validFiles: File[] = [];\n\n // Check max files limit\n if (maxFiles && fileArray.length > maxFiles) {\n setValidationError(\n invalidFileCountText || translate('Too_many_files_selected', { maxFiles: maxFiles.toString() }),\n );\n return;\n }\n\n // Validate each file\n fileArray.forEach((file) => {\n if (validateFile(file)) {\n validFiles.push(file);\n }\n });\n\n if (validFiles.length > 0) {\n setValidationError(null);\n handleUpload(validFiles);\n }\n },\n [maxFiles, validateFile, handleUpload, invalidFileCountText, translate],\n );\n\n const handleDragEnter = useCallback(\n (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (disabled) return;\n\n setIsDragActive(true);\n },\n [disabled],\n );\n\n const handleDragLeave = useCallback(\n (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (disabled) return;\n\n setIsDragActive(false);\n },\n [disabled],\n );\n\n const handleDragOver = useCallback((e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n }, []);\n\n const handleDrop = useCallback(\n (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (disabled) return;\n\n setIsDragActive(false);\n\n const files = e.dataTransfer.files;\n if (files && files.length > 0) {\n processFiles(files);\n }\n },\n [disabled, processFiles],\n );\n\n const handleFileInputChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n if (disabled) return;\n\n const files = e.target.files;\n if (files && files.length > 0) {\n processFiles(files);\n }\n\n // Reset input value to allow selecting the same file again\n if (fileInputRef.current) {\n fileInputRef.current.value = '';\n }\n },\n [disabled, processFiles],\n );\n\n const handleButtonClick = useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n fileInputRef.current?.click();\n }, []);\n\n const handleContainerClick = useCallback(() => {\n if (disabled) return;\n\n fileInputRef.current?.click();\n }, [disabled]);\n\n return (\n <>\n {!!displayError && (\n <FlipdishFormHelperText error>\n <CancelCircleIcon />\n {displayError}\n </FlipdishFormHelperText>\n )}\n <StyledUploadAreaContainer\n data-fd=\"file-drop-zone\"\n hasError={!!displayError}\n onClick={disabled ? undefined : handleContainerClick}\n onDragEnter={handleDragEnter}\n onDragLeave={handleDragLeave}\n onDragOver={handleDragOver}\n onDrop={handleDrop}\n >\n <VisuallyHiddenInput\n ref={fileInputRef}\n accept={inputAccept}\n data-fd=\"file-upload-input\"\n disabled={disabled}\n multiple={multiple}\n onChange={handleFileInputChange}\n type=\"file\"\n />\n\n <Stack\n alignItems=\"center\"\n direction=\"column\"\n gap={theme.spacing(2)}\n justifyContent=\"center\"\n width=\"100%\"\n >\n <StyledIconContainer hasError={!!displayError}>\n <UploadIcon\n color={\n displayError\n ? theme.palette.semantic.icon['icon-error']\n : theme.palette.semantic.icon['icon-primary']\n }\n />\n </StyledIconContainer>\n\n <FlipdishTypography variant=\"b1Strong\">\n {isDragActive\n ? dragActiveText || translate('Drop_files_here')\n : dragInactiveText || translate('Drag_and_drop_files_here')}\n </FlipdishTypography>\n\n <StyledButton\n disabled={disabled}\n fdKey=\"file-upload-btn\"\n onClick={disabled ? undefined : handleButtonClick}\n variant=\"secondary\"\n >\n {browseButtonText || translate('Browse_files')}\n </StyledButton>\n </Stack>\n </StyledUploadAreaContainer>\n </>\n );\n};\n\nexport default FileDropZone;\n"],"names":["StyledUploadAreaContainer","styled","Box","shouldForwardProp","prop","theme","hasError","flex","display","flexDirection","height","boxSizing","alignItems","justifyContent","padding","spacing","borderRadius","radius","border","palette","semantic","stroke","background","fill","cursor","transition","breakpoints","only","gap","VisuallyHiddenInput","clip","clipPath","overflow","position","bottom","left","whiteSpace","width","StyledIconContainer","backgroundColor","StyledButton","FlipdishButton","alignSelf","FileDropZone","handleUpload","multiple","maxFiles","maxFileSize","allowedFileTypes","disabled","error","dragActiveText","dragInactiveText","browseButtonText","invalidFileTypesText","invalidFileSizeText","invalidFileCountText","useTheme","isDragActive","setIsDragActive","useState","fileInputRef","useRef","validationError","setValidationError","translate","useTranslation","displayError","inputAccept","useMemo","length","filter","Boolean","map","ext","startsWith","join","validateFile","useCallback","file","size","toString","fileExtension","name","split","pop","toLowerCase","includes","processFiles","files","fileArray","Array","from","validFiles","forEach","push","handleDragEnter","e","preventDefault","stopPropagation","handleDragLeave","handleDragOver","handleDrop","dataTransfer","handleFileInputChange","target","current","value","handleButtonClick","event","click","handleContainerClick","_jsxs","_Fragment","children","FlipdishFormHelperText","_jsx","CancelCircleIcon","onClick","undefined","onDragEnter","onDragLeave","onDragOver","onDrop","ref","accept","onChange","type","Stack","direction","UploadIcon","color","icon","FlipdishTypography","variant","fdKey"],"mappings":"mnBAcA,MAAMA,EAA4BC,EAAOC,EAAK,CAC5CC,kBAAoBC,GAAkB,aAATA,GADGH,EAEP,EAAGI,QAAOC,eAAU,CAC7CC,KAAM,IACNC,QAAS,OACTC,cAAe,SACfC,OAAQ,OACRC,UAAW,aACXC,WAAY,SACZC,eAAgB,SAChBC,QAAST,EAAMU,QAAQ,GACvBC,aAAcX,EAAMY,OAAO,YAC3BC,OAAQZ,EACJ,aAAaD,EAAMc,QAAQC,SAASC,OAAO,uBAC3C,cAAchB,EAAMc,QAAQC,SAASC,OAAO,mBAChDC,WAAYhB,EACRD,EAAMc,QAAQC,SAASG,KAAK,mBAC5BlB,EAAMc,QAAQC,SAASG,KAAK,eAChCC,OAAQ,UACRC,WAAY,uBACZ,CAACpB,EAAMqB,YAAYC,KAAK,WAAY,CAClCd,eAAgB,SAChBe,IAAKvB,EAAMU,QAAQ,QAIjBc,EAAsB5B,EAAO,QAAPA,CAAgB,CAC1C6B,KAAM,gBACNC,SAAU,aACVrB,OAAQ,EACRsB,SAAU,SACVC,SAAU,WACVC,OAAQ,EACRC,KAAM,EACNC,WAAY,SACZC,MAAO,IAGHC,EAAsBrC,EAAOC,EAAK,CACtCC,kBAAoBC,GAAkB,aAATA,GADHH,EAED,EAAGK,WAAUD,YAAO,CAC7CG,QAAS,OACTC,cAAe,SACf4B,MAAO,OACP3B,OAAQ,OACRI,QAAS,MACTD,eAAgB,SAChBD,WAAY,SACZI,aAAcX,EAAMY,OAAO,aAC3BsB,gBAAiBjC,EACbD,EAAMc,QAAQC,SAASG,KAAK,mBAC5BlB,EAAMc,QAAQC,SAASG,KAAK,yBAG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AAe,SACfwB,MAAM,OAAM6E,SAAA,CAEZE,EAAC9E,EAAmB,CAAChC,WAAY6D,EAAY+C,SAC3CE,EAACc,EAAU,CACTC,MACEhE,EACI9D,EAAMc,QAAQC,SAASgH,KAAK,cAC5B/H,EAAMc,QAAQC,SAASgH,KAAK,oBAKtChB,EAACiB,GAAmBC,QAAQ,WAAUpB,SACnCxD,EACGP,GAAkBc,EAAU,mBAC5Bb,GAAoBa,EAAU,8BAGpCmD,EAAC5E,EAAY,CACXS,SAAUA,EACVsF,MAAM,kBACNjB,QAASrE,OAAWsE,EAAYX,EAChC0B,QAAQ,YAAWpB,SAElB7D,GAAoBY,EAAU"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require("../../node_modules/.pnpm/msw@2.12.
|
|
1
|
+
"use strict";require("../../node_modules/.pnpm/msw@2.12.8_@types_node@20.19.31_typescript@5.4.5/node_modules/msw/lib/core/index.cjs.js");var e=require("../../components/organisms/AssetManager/__mocks__/mockAssets.cjs.js"),s=require("../../node_modules/.pnpm/msw@2.12.8_@types_node@20.19.31_typescript@5.4.5/node_modules/msw/lib/core/http.cjs.js"),t=require("../../node_modules/.pnpm/msw@2.12.8_@types_node@20.19.31_typescript@5.4.5/node_modules/msw/lib/core/HttpResponse.cjs.js");const o=[...[s.http.get("*/assets/orgs/:orgId/assets",(({request:s,params:o})=>(console.log("[MSW] Intercepted GET assets request:",s.url,"orgId:",o.orgId),t.HttpResponse.json(e.mockAssets)))),s.http.post("*/assets/orgs/:orgId/assets/upload",(async({request:s,params:o})=>{console.log("[MSW] Intercepted POST upload request:",s.url,"orgId:",o.orgId);const r=(await s.formData()).getAll("files").map((s=>e.createMockAsset({id:"asset_e3454351fw5",fileName:s.name,contentType:s.type||"image/jpeg",createdBy:"Test User",updatedBy:"Test User"})));return t.HttpResponse.json(r)}))]];exports.handlers=o;
|
|
2
2
|
//# sourceMappingURL=handlers.cjs.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpHandler } from '../../node_modules/.pnpm/msw@2.12.
|
|
1
|
+
import { HttpHandler } from '../../node_modules/.pnpm/msw@2.12.8_@types_node@20.19.31_typescript@5.4.5/node_modules/msw/lib/core/handlers/HttpHandler.d.js';
|
|
2
2
|
|
|
3
3
|
declare const handlers: HttpHandler[];
|
|
4
4
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../node_modules/.pnpm/msw@2.12.
|
|
1
|
+
import"../../node_modules/.pnpm/msw@2.12.8_@types_node@20.19.31_typescript@5.4.5/node_modules/msw/lib/core/index.js";import{mockAssets as e,createMockAsset as s}from"../../components/organisms/AssetManager/__mocks__/mockAssets.js";import{http as o}from"../../node_modules/.pnpm/msw@2.12.8_@types_node@20.19.31_typescript@5.4.5/node_modules/msw/lib/core/http.js";import{HttpResponse as t}from"../../node_modules/.pnpm/msw@2.12.8_@types_node@20.19.31_typescript@5.4.5/node_modules/msw/lib/core/HttpResponse.js";const r=[...[o.get("*/assets/orgs/:orgId/assets",(({request:s,params:o})=>(console.log("[MSW] Intercepted GET assets request:",s.url,"orgId:",o.orgId),t.json(e)))),o.post("*/assets/orgs/:orgId/assets/upload",(async({request:e,params:o})=>{console.log("[MSW] Intercepted POST upload request:",e.url,"orgId:",o.orgId);const r=(await e.formData()).getAll("files").map((e=>s({id:"asset_e3454351fw5",fileName:e.name,contentType:e.type||"image/jpeg",createdBy:"Test User",updatedBy:"Test User"})));return t.json(r)}))]];export{r as handlers};
|
|
2
2
|
//# sourceMappingURL=handlers.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("../../node_modules/.pnpm/msw@2.12.
|
|
1
|
+
"use strict";var e=require("../../node_modules/.pnpm/msw@2.12.8_@types_node@20.19.31_typescript@5.4.5/node_modules/msw/lib/node/index.cjs.js"),s=require("./handlers.cjs.js");const r=e.setupServer(...s.handlers);exports.server=r;
|
|
2
2
|
//# sourceMappingURL=server.cjs.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SetupServerApi } from '../../node_modules/.pnpm/msw@2.12.
|
|
1
|
+
import { SetupServerApi } from '../../node_modules/.pnpm/msw@2.12.8_@types_node@20.19.31_typescript@5.4.5/node_modules/msw/lib/node/index.d.js';
|
|
2
2
|
|
|
3
3
|
declare const server: SetupServerApi;
|
|
4
4
|
|
package/dist/mocks/msw/server.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{setupServer as o}from"../../node_modules/.pnpm/msw@2.12.
|
|
1
|
+
import{setupServer as o}from"../../node_modules/.pnpm/msw@2.12.8_@types_node@20.19.31_typescript@5.4.5/node_modules/msw/lib/node/index.js";import{handlers as e}from"./handlers.js";const s=o(...e);export{s as server};
|
|
2
2
|
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var t=require("../../../../../../@open-draft_logger@0.3.0/node_modules/@open-draft/logger/lib/index.cjs.js"),e=require("../../../../../../strict-event-emitter@0.5.1/node_modules/strict-event-emitter/lib/index.cjs.js");function i(t){return globalThis[t]||void 0}function s(t){delete globalThis[t]}let n=function(t){return t.INACTIVE="INACTIVE",t.APPLYING="APPLYING",t.APPLIED="APPLIED",t.DISPOSING="DISPOSING",t.DISPOSED="DISPOSED",t}({});exports.a=s,exports.i=n,exports.o=i,exports.r=class{constructor(i){this.symbol=i,this.readyState=n.INACTIVE,this.emitter=new e.Emitter,this.subscriptions=[],this.logger=new t.Logger(i.description),this.emitter.setMaxListeners(0),this.logger.info("constructing the interceptor...")}checkEnvironment(){return!0}apply(){const t=this.logger.extend("apply");if(t.info("applying the interceptor..."),this.readyState===n.APPLIED)return void t.info("intercepted already applied!");if(!this.checkEnvironment())return void t.info("the interceptor cannot be applied in this environment!");this.readyState=n.APPLYING;const e=this.getInstance();if(e)return t.info("found a running instance, reusing..."),this.on=(i,s)=>(t.info('proxying the "%s" listener',i),e.emitter.addListener(i,s),this.subscriptions.push((()=>{e.emitter.removeListener(i,s),t.info('removed proxied "%s" listener!',i)})),this),void(this.readyState=n.APPLIED);t.info("no running instance found, setting up a new instance..."),this.setup(),this.setInstance(),this.readyState=n.APPLIED}setup(){}on(t,e){const i=this.logger.extend("on");return this.readyState===n.DISPOSING||this.readyState===n.DISPOSED?(i.info("cannot listen to events, already disposed!"),this):(i.info('adding "%s" event listener:',t,e),this.emitter.on(t,e),this)}once(t,e){return this.emitter.once(t,e),this}off(t,e){return this.emitter.off(t,e),this}removeAllListeners(t){return this.emitter.removeAllListeners(t),this}dispose(){const t=this.logger.extend("dispose");if(this.readyState!==n.DISPOSED)if(t.info("disposing the interceptor..."),this.readyState=n.DISPOSING,this.getInstance()){if(this.clearInstance(),t.info("global symbol deleted:",i(this.symbol)),this.subscriptions.length>0){t.info("disposing of %d subscriptions...",this.subscriptions.length);for(const t of this.subscriptions)t();this.subscriptions=[],t.info("disposed of all subscriptions!",this.subscriptions.length)}this.emitter.removeAllListeners(),t.info("destroyed the listener!"),this.readyState=n.DISPOSED}else t.info("no interceptors running, skipping dispose...");else t.info("cannot dispose, already disposed!")}getInstance(){const t=i(this.symbol);return this.logger.info("retrieved global instance:",t?.constructor?.name),t}setInstance(){var t,e;t=this.symbol,e=this,globalThis[t]=e,this.logger.info("set global instance!",this.symbol.description)}clearInstance(){s(this.symbol),this.logger.info("cleared global instance!",this.symbol.description)}},exports.t=function(){return Math.random().toString(16).slice(2)};
|
|
2
|
+
//# sourceMappingURL=createRequestId-DQcIlohW.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRequestId-DQcIlohW.cjs.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@mswjs+interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/browser/createRequestId-DQcIlohW.mjs"],"sourcesContent":["import { Logger } from \"@open-draft/logger\";\nimport { Emitter } from \"strict-event-emitter\";\n\n//#region src/Interceptor.ts\n/**\n* Request header name to detect when a single request\n* is being handled by nested interceptors (XHR -> ClientRequest).\n* Obscure by design to prevent collisions with user-defined headers.\n* Ideally, come up with the Interceptor-level mechanism for this.\n* @see https://github.com/mswjs/interceptors/issues/378\n*/\nconst INTERNAL_REQUEST_ID_HEADER_NAME = \"x-interceptors-internal-request-id\";\nfunction getGlobalSymbol(symbol) {\n\treturn globalThis[symbol] || void 0;\n}\nfunction setGlobalSymbol(symbol, value) {\n\tglobalThis[symbol] = value;\n}\nfunction deleteGlobalSymbol(symbol) {\n\tdelete globalThis[symbol];\n}\nlet InterceptorReadyState = /* @__PURE__ */ function(InterceptorReadyState$1) {\n\tInterceptorReadyState$1[\"INACTIVE\"] = \"INACTIVE\";\n\tInterceptorReadyState$1[\"APPLYING\"] = \"APPLYING\";\n\tInterceptorReadyState$1[\"APPLIED\"] = \"APPLIED\";\n\tInterceptorReadyState$1[\"DISPOSING\"] = \"DISPOSING\";\n\tInterceptorReadyState$1[\"DISPOSED\"] = \"DISPOSED\";\n\treturn InterceptorReadyState$1;\n}({});\nvar Interceptor = class {\n\tconstructor(symbol) {\n\t\tthis.symbol = symbol;\n\t\tthis.readyState = InterceptorReadyState.INACTIVE;\n\t\tthis.emitter = new Emitter();\n\t\tthis.subscriptions = [];\n\t\tthis.logger = new Logger(symbol.description);\n\t\tthis.emitter.setMaxListeners(0);\n\t\tthis.logger.info(\"constructing the interceptor...\");\n\t}\n\t/**\n\t* Determine if this interceptor can be applied\n\t* in the current environment.\n\t*/\n\tcheckEnvironment() {\n\t\treturn true;\n\t}\n\t/**\n\t* Apply this interceptor to the current process.\n\t* Returns an already running interceptor instance if it's present.\n\t*/\n\tapply() {\n\t\tconst logger = this.logger.extend(\"apply\");\n\t\tlogger.info(\"applying the interceptor...\");\n\t\tif (this.readyState === InterceptorReadyState.APPLIED) {\n\t\t\tlogger.info(\"intercepted already applied!\");\n\t\t\treturn;\n\t\t}\n\t\tif (!this.checkEnvironment()) {\n\t\t\tlogger.info(\"the interceptor cannot be applied in this environment!\");\n\t\t\treturn;\n\t\t}\n\t\tthis.readyState = InterceptorReadyState.APPLYING;\n\t\tconst runningInstance = this.getInstance();\n\t\tif (runningInstance) {\n\t\t\tlogger.info(\"found a running instance, reusing...\");\n\t\t\tthis.on = (event, listener) => {\n\t\t\t\tlogger.info(\"proxying the \\\"%s\\\" listener\", event);\n\t\t\t\trunningInstance.emitter.addListener(event, listener);\n\t\t\t\tthis.subscriptions.push(() => {\n\t\t\t\t\trunningInstance.emitter.removeListener(event, listener);\n\t\t\t\t\tlogger.info(\"removed proxied \\\"%s\\\" listener!\", event);\n\t\t\t\t});\n\t\t\t\treturn this;\n\t\t\t};\n\t\t\tthis.readyState = InterceptorReadyState.APPLIED;\n\t\t\treturn;\n\t\t}\n\t\tlogger.info(\"no running instance found, setting up a new instance...\");\n\t\tthis.setup();\n\t\tthis.setInstance();\n\t\tthis.readyState = InterceptorReadyState.APPLIED;\n\t}\n\t/**\n\t* Setup the module augments and stubs necessary for this interceptor.\n\t* This method is not run if there's a running interceptor instance\n\t* to prevent instantiating an interceptor multiple times.\n\t*/\n\tsetup() {}\n\t/**\n\t* Listen to the interceptor's public events.\n\t*/\n\ton(event, listener) {\n\t\tconst logger = this.logger.extend(\"on\");\n\t\tif (this.readyState === InterceptorReadyState.DISPOSING || this.readyState === InterceptorReadyState.DISPOSED) {\n\t\t\tlogger.info(\"cannot listen to events, already disposed!\");\n\t\t\treturn this;\n\t\t}\n\t\tlogger.info(\"adding \\\"%s\\\" event listener:\", event, listener);\n\t\tthis.emitter.on(event, listener);\n\t\treturn this;\n\t}\n\tonce(event, listener) {\n\t\tthis.emitter.once(event, listener);\n\t\treturn this;\n\t}\n\toff(event, listener) {\n\t\tthis.emitter.off(event, listener);\n\t\treturn this;\n\t}\n\tremoveAllListeners(event) {\n\t\tthis.emitter.removeAllListeners(event);\n\t\treturn this;\n\t}\n\t/**\n\t* Disposes of any side-effects this interceptor has introduced.\n\t*/\n\tdispose() {\n\t\tconst logger = this.logger.extend(\"dispose\");\n\t\tif (this.readyState === InterceptorReadyState.DISPOSED) {\n\t\t\tlogger.info(\"cannot dispose, already disposed!\");\n\t\t\treturn;\n\t\t}\n\t\tlogger.info(\"disposing the interceptor...\");\n\t\tthis.readyState = InterceptorReadyState.DISPOSING;\n\t\tif (!this.getInstance()) {\n\t\t\tlogger.info(\"no interceptors running, skipping dispose...\");\n\t\t\treturn;\n\t\t}\n\t\tthis.clearInstance();\n\t\tlogger.info(\"global symbol deleted:\", getGlobalSymbol(this.symbol));\n\t\tif (this.subscriptions.length > 0) {\n\t\t\tlogger.info(\"disposing of %d subscriptions...\", this.subscriptions.length);\n\t\t\tfor (const dispose of this.subscriptions) dispose();\n\t\t\tthis.subscriptions = [];\n\t\t\tlogger.info(\"disposed of all subscriptions!\", this.subscriptions.length);\n\t\t}\n\t\tthis.emitter.removeAllListeners();\n\t\tlogger.info(\"destroyed the listener!\");\n\t\tthis.readyState = InterceptorReadyState.DISPOSED;\n\t}\n\tgetInstance() {\n\t\tconst instance = getGlobalSymbol(this.symbol);\n\t\tthis.logger.info(\"retrieved global instance:\", instance?.constructor?.name);\n\t\treturn instance;\n\t}\n\tsetInstance() {\n\t\tsetGlobalSymbol(this.symbol, this);\n\t\tthis.logger.info(\"set global instance!\", this.symbol.description);\n\t}\n\tclearInstance() {\n\t\tdeleteGlobalSymbol(this.symbol);\n\t\tthis.logger.info(\"cleared global instance!\", this.symbol.description);\n\t}\n};\n\n//#endregion\n//#region src/createRequestId.ts\n/**\n* Generate a random ID string to represent a request.\n* @example\n* createRequestId()\n* // \"f774b6c9c600f\"\n*/\nfunction createRequestId() {\n\treturn Math.random().toString(16).slice(2);\n}\n\n//#endregion\nexport { deleteGlobalSymbol as a, InterceptorReadyState as i, INTERNAL_REQUEST_ID_HEADER_NAME as n, getGlobalSymbol as o, Interceptor as r, createRequestId as t };\n//# sourceMappingURL=createRequestId-DQcIlohW.mjs.map"],"names":["getGlobalSymbol","symbol","globalThis","deleteGlobalSymbol","InterceptorReadyState","InterceptorReadyState$1","constructor","this","readyState","INACTIVE","emitter","Emitter","subscriptions","logger","Logger","description","setMaxListeners","info","checkEnvironment","apply","extend","APPLIED","APPLYING","runningInstance","getInstance","on","event","listener","addListener","push","removeListener","setup","setInstance","DISPOSING","DISPOSED","once","off","removeAllListeners","dispose","clearInstance","length","instance","name","value","Math","random","toString","slice"],"mappings":"uOAYA,SAASA,EAAgBC,GACxB,OAAOC,WAAWD,SAAW,CAC9B,CAIA,SAASE,EAAmBF,UACpBC,WAAWD,EACnB,CACG,IAACG,EAAwC,SAASC,GAMpD,OALAA,EAAkC,SAAI,WACtCA,EAAkC,SAAI,WACtCA,EAAiC,QAAI,UACrCA,EAAmC,UAAI,YACvCA,EAAkC,SAAI,WAC/BA,CACR,CAP4C,CAO1C,CAAA,iDACgB,MACjB,WAAAC,CAAYL,GACXM,KAAKN,OAASA,EACdM,KAAKC,WAAaJ,EAAsBK,SACxCF,KAAKG,QAAU,IAAIC,UACnBJ,KAAKK,cAAgB,GACrBL,KAAKM,OAAS,IAAIC,SAAOb,EAAOc,aAChCR,KAAKG,QAAQM,gBAAgB,GAC7BT,KAAKM,OAAOI,KAAK,kCAClB,CAKA,gBAAAC,GACC,OAAO,CACR,CAKA,KAAAC,GACC,MAAMN,EAASN,KAAKM,OAAOO,OAAO,SAElC,GADAP,EAAOI,KAAK,+BACRV,KAAKC,aAAeJ,EAAsBiB,QAE7C,YADAR,EAAOI,KAAK,gCAGb,IAAKV,KAAKW,mBAET,YADAL,EAAOI,KAAK,0DAGbV,KAAKC,WAAaJ,EAAsBkB,SACxC,MAAMC,EAAkBhB,KAAKiB,cAC7B,GAAID,EAYH,OAXAV,EAAOI,KAAK,wCACZV,KAAKkB,GAAK,CAACC,EAAOC,KACjBd,EAAOI,KAAK,6BAAgCS,GAC5CH,EAAgBb,QAAQkB,YAAYF,EAAOC,GAC3CpB,KAAKK,cAAciB,MAAK,KACvBN,EAAgBb,QAAQoB,eAAeJ,EAAOC,GAC9Cd,EAAOI,KAAK,iCAAoCS,MAE1CnB,WAERA,K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,MAAMiB,EAAWzC,EAAgBO,KAAKN,QAEtC,OADAM,KAAKM,OAAOI,KAAK,6BAA8BwB,GAAUnC,aAAaoC,MAC/DD,CACR,CACA,WAAAT,GAlID,IAAyB/B,EAAQ0C,EAAR1C,EAmIPM,KAAKN,OAnIU0C,EAmIFpC,KAlI9BL,WAAWD,GAAU0C,EAmIpBpC,KAAKM,OAAOI,KAAK,uBAAwBV,KAAKN,OAAOc,YACtD,CACA,aAAAwB,GACCpC,EAAmBI,KAAKN,QACxBM,KAAKM,OAAOI,KAAK,2BAA4BV,KAAKN,OAAOc,YAC1D,aAWD,WACC,OAAO6B,KAAKC,SAASC,SAAS,IAAIC,MAAM,EACzC","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Logger as t}from"../../../../../../@open-draft_logger@0.3.0/node_modules/@open-draft/logger/lib/index.js";import{Emitter as e}from"../../../../../../strict-event-emitter@0.5.1/node_modules/strict-event-emitter/lib/index.js";function i(t){return globalThis[t]||void 0}function s(t){delete globalThis[t]}let n=function(t){return t.INACTIVE="INACTIVE",t.APPLYING="APPLYING",t.APPLIED="APPLIED",t.DISPOSING="DISPOSING",t.DISPOSED="DISPOSED",t}({});var o=class{constructor(i){this.symbol=i,this.readyState=n.INACTIVE,this.emitter=new e,this.subscriptions=[],this.logger=new t(i.description),this.emitter.setMaxListeners(0),this.logger.info("constructing the interceptor...")}checkEnvironment(){return!0}apply(){const t=this.logger.extend("apply");if(t.info("applying the interceptor..."),this.readyState===n.APPLIED)return void t.info("intercepted already applied!");if(!this.checkEnvironment())return void t.info("the interceptor cannot be applied in this environment!");this.readyState=n.APPLYING;const e=this.getInstance();if(e)return t.info("found a running instance, reusing..."),this.on=(i,s)=>(t.info('proxying the "%s" listener',i),e.emitter.addListener(i,s),this.subscriptions.push((()=>{e.emitter.removeListener(i,s),t.info('removed proxied "%s" listener!',i)})),this),void(this.readyState=n.APPLIED);t.info("no running instance found, setting up a new instance..."),this.setup(),this.setInstance(),this.readyState=n.APPLIED}setup(){}on(t,e){const i=this.logger.extend("on");return this.readyState===n.DISPOSING||this.readyState===n.DISPOSED?(i.info("cannot listen to events, already disposed!"),this):(i.info('adding "%s" event listener:',t,e),this.emitter.on(t,e),this)}once(t,e){return this.emitter.once(t,e),this}off(t,e){return this.emitter.off(t,e),this}removeAllListeners(t){return this.emitter.removeAllListeners(t),this}dispose(){const t=this.logger.extend("dispose");if(this.readyState!==n.DISPOSED)if(t.info("disposing the interceptor..."),this.readyState=n.DISPOSING,this.getInstance()){if(this.clearInstance(),t.info("global symbol deleted:",i(this.symbol)),this.subscriptions.length>0){t.info("disposing of %d subscriptions...",this.subscriptions.length);for(const t of this.subscriptions)t();this.subscriptions=[],t.info("disposed of all subscriptions!",this.subscriptions.length)}this.emitter.removeAllListeners(),t.info("destroyed the listener!"),this.readyState=n.DISPOSED}else t.info("no interceptors running, skipping dispose...");else t.info("cannot dispose, already disposed!")}getInstance(){const t=i(this.symbol);return this.logger.info("retrieved global instance:",t?.constructor?.name),t}setInstance(){var t,e;t=this.symbol,e=this,globalThis[t]=e,this.logger.info("set global instance!",this.symbol.description)}clearInstance(){s(this.symbol),this.logger.info("cleared global instance!",this.symbol.description)}};function r(){return Math.random().toString(16).slice(2)}export{s as a,n as i,i as o,o as r,r as t};
|
|
2
|
+
//# sourceMappingURL=createRequestId-DQcIlohW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRequestId-DQcIlohW.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@mswjs+interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/browser/createRequestId-DQcIlohW.mjs"],"sourcesContent":["import { Logger } from \"@open-draft/logger\";\nimport { Emitter } from \"strict-event-emitter\";\n\n//#region src/Interceptor.ts\n/**\n* Request header name to detect when a single request\n* is being handled by nested interceptors (XHR -> ClientRequest).\n* Obscure by design to prevent collisions with user-defined headers.\n* Ideally, come up with the Interceptor-level mechanism for this.\n* @see https://github.com/mswjs/interceptors/issues/378\n*/\nconst INTERNAL_REQUEST_ID_HEADER_NAME = \"x-interceptors-internal-request-id\";\nfunction getGlobalSymbol(symbol) {\n\treturn globalThis[symbol] || void 0;\n}\nfunction setGlobalSymbol(symbol, value) {\n\tglobalThis[symbol] = value;\n}\nfunction deleteGlobalSymbol(symbol) {\n\tdelete globalThis[symbol];\n}\nlet InterceptorReadyState = /* @__PURE__ */ function(InterceptorReadyState$1) {\n\tInterceptorReadyState$1[\"INACTIVE\"] = \"INACTIVE\";\n\tInterceptorReadyState$1[\"APPLYING\"] = \"APPLYING\";\n\tInterceptorReadyState$1[\"APPLIED\"] = \"APPLIED\";\n\tInterceptorReadyState$1[\"DISPOSING\"] = \"DISPOSING\";\n\tInterceptorReadyState$1[\"DISPOSED\"] = \"DISPOSED\";\n\treturn InterceptorReadyState$1;\n}({});\nvar Interceptor = class {\n\tconstructor(symbol) {\n\t\tthis.symbol = symbol;\n\t\tthis.readyState = InterceptorReadyState.INACTIVE;\n\t\tthis.emitter = new Emitter();\n\t\tthis.subscriptions = [];\n\t\tthis.logger = new Logger(symbol.description);\n\t\tthis.emitter.setMaxListeners(0);\n\t\tthis.logger.info(\"constructing the interceptor...\");\n\t}\n\t/**\n\t* Determine if this interceptor can be applied\n\t* in the current environment.\n\t*/\n\tcheckEnvironment() {\n\t\treturn true;\n\t}\n\t/**\n\t* Apply this interceptor to the current process.\n\t* Returns an already running interceptor instance if it's present.\n\t*/\n\tapply() {\n\t\tconst logger = this.logger.extend(\"apply\");\n\t\tlogger.info(\"applying the interceptor...\");\n\t\tif (this.readyState === InterceptorReadyState.APPLIED) {\n\t\t\tlogger.info(\"intercepted already applied!\");\n\t\t\treturn;\n\t\t}\n\t\tif (!this.checkEnvironment()) {\n\t\t\tlogger.info(\"the interceptor cannot be applied in this environment!\");\n\t\t\treturn;\n\t\t}\n\t\tthis.readyState = InterceptorReadyState.APPLYING;\n\t\tconst runningInstance = this.getInstance();\n\t\tif (runningInstance) {\n\t\t\tlogger.info(\"found a running instance, reusing...\");\n\t\t\tthis.on = (event, listener) => {\n\t\t\t\tlogger.info(\"proxying the \\\"%s\\\" listener\", event);\n\t\t\t\trunningInstance.emitter.addListener(event, listener);\n\t\t\t\tthis.subscriptions.push(() => {\n\t\t\t\t\trunningInstance.emitter.removeListener(event, listener);\n\t\t\t\t\tlogger.info(\"removed proxied \\\"%s\\\" listener!\", event);\n\t\t\t\t});\n\t\t\t\treturn this;\n\t\t\t};\n\t\t\tthis.readyState = InterceptorReadyState.APPLIED;\n\t\t\treturn;\n\t\t}\n\t\tlogger.info(\"no running instance found, setting up a new instance...\");\n\t\tthis.setup();\n\t\tthis.setInstance();\n\t\tthis.readyState = InterceptorReadyState.APPLIED;\n\t}\n\t/**\n\t* Setup the module augments and stubs necessary for this interceptor.\n\t* This method is not run if there's a running interceptor instance\n\t* to prevent instantiating an interceptor multiple times.\n\t*/\n\tsetup() {}\n\t/**\n\t* Listen to the interceptor's public events.\n\t*/\n\ton(event, listener) {\n\t\tconst logger = this.logger.extend(\"on\");\n\t\tif (this.readyState === InterceptorReadyState.DISPOSING || this.readyState === InterceptorReadyState.DISPOSED) {\n\t\t\tlogger.info(\"cannot listen to events, already disposed!\");\n\t\t\treturn this;\n\t\t}\n\t\tlogger.info(\"adding \\\"%s\\\" event listener:\", event, listener);\n\t\tthis.emitter.on(event, listener);\n\t\treturn this;\n\t}\n\tonce(event, listener) {\n\t\tthis.emitter.once(event, listener);\n\t\treturn this;\n\t}\n\toff(event, listener) {\n\t\tthis.emitter.off(event, listener);\n\t\treturn this;\n\t}\n\tremoveAllListeners(event) {\n\t\tthis.emitter.removeAllListeners(event);\n\t\treturn this;\n\t}\n\t/**\n\t* Disposes of any side-effects this interceptor has introduced.\n\t*/\n\tdispose() {\n\t\tconst logger = this.logger.extend(\"dispose\");\n\t\tif (this.readyState === InterceptorReadyState.DISPOSED) {\n\t\t\tlogger.info(\"cannot dispose, already disposed!\");\n\t\t\treturn;\n\t\t}\n\t\tlogger.info(\"disposing the interceptor...\");\n\t\tthis.readyState = InterceptorReadyState.DISPOSING;\n\t\tif (!this.getInstance()) {\n\t\t\tlogger.info(\"no interceptors running, skipping dispose...\");\n\t\t\treturn;\n\t\t}\n\t\tthis.clearInstance();\n\t\tlogger.info(\"global symbol deleted:\", getGlobalSymbol(this.symbol));\n\t\tif (this.subscriptions.length > 0) {\n\t\t\tlogger.info(\"disposing of %d subscriptions...\", this.subscriptions.length);\n\t\t\tfor (const dispose of this.subscriptions) dispose();\n\t\t\tthis.subscriptions = [];\n\t\t\tlogger.info(\"disposed of all subscriptions!\", this.subscriptions.length);\n\t\t}\n\t\tthis.emitter.removeAllListeners();\n\t\tlogger.info(\"destroyed the listener!\");\n\t\tthis.readyState = InterceptorReadyState.DISPOSED;\n\t}\n\tgetInstance() {\n\t\tconst instance = getGlobalSymbol(this.symbol);\n\t\tthis.logger.info(\"retrieved global instance:\", instance?.constructor?.name);\n\t\treturn instance;\n\t}\n\tsetInstance() {\n\t\tsetGlobalSymbol(this.symbol, this);\n\t\tthis.logger.info(\"set global instance!\", this.symbol.description);\n\t}\n\tclearInstance() {\n\t\tdeleteGlobalSymbol(this.symbol);\n\t\tthis.logger.info(\"cleared global instance!\", this.symbol.description);\n\t}\n};\n\n//#endregion\n//#region src/createRequestId.ts\n/**\n* Generate a random ID string to represent a request.\n* @example\n* createRequestId()\n* // \"f774b6c9c600f\"\n*/\nfunction createRequestId() {\n\treturn Math.random().toString(16).slice(2);\n}\n\n//#endregion\nexport { deleteGlobalSymbol as a, InterceptorReadyState as i, INTERNAL_REQUEST_ID_HEADER_NAME as n, getGlobalSymbol as o, Interceptor as r, createRequestId as t };\n//# sourceMappingURL=createRequestId-DQcIlohW.mjs.map"],"names":["getGlobalSymbol","symbol","globalThis","deleteGlobalSymbol","InterceptorReadyState","InterceptorReadyState$1","Interceptor","constructor","this","readyState","INACTIVE","emitter","Emitter","subscriptions","logger","Logger","description","setMaxListeners","info","checkEnvironment","apply","extend","APPLIED","APPLYING","runningInstance","getInstance","on","event","listener","addListener","push","removeListener","setup","setInstance","DISPOSING","DISPOSED","once","off","removeAllListeners","dispose","clearInstance","length","instance","name","value","createRequestId","Math","random","toString","slice"],"mappings":"uOAYA,SAASA,EAAgBC,GACxB,OAAOC,WAAWD,SAAW,CAC9B,CAIA,SAASE,EAAmBF,UACpBC,WAAWD,EACnB,CACG,IAACG,EAAwC,SAASC,GAMpD,OALAA,EAAkC,SAAI,WACtCA,EAAkC,SAAI,WACtCA,EAAiC,QAAI,UACrCA,EAAmC,UAAI,YACvCA,EAAkC,SAAI,WAC/BA,CACR,CAP4C,CAO1C,CAAA,GACC,IAACC,EAAc,MACjB,WAAAC,CAAYN,GACXO,KAAKP,OAASA,EACdO,KAAKC,WAAaL,EAAsBM,SACxCF,KAAKG,QAAU,IAAIC,EACnBJ,KAAKK,cAAgB,GACrBL,KAAKM,OAAS,IAAIC,EAAOd,EAAOe,aAChCR,KAAKG,QAAQM,gBAAgB,GAC7BT,KAAKM,OAAOI,KAAK,kCAClB,CAKA,gBAAAC,GACC,OAAO,CACR,CAKA,KAAAC,GACC,MAAMN,EAASN,KAAKM,OAAOO,OAAO,SAElC,GADAP,EAAOI,KAAK,+BACRV,KAAKC,aAAeL,EAAsBkB,QAE7C,YADAR,EAAOI,KAAK,gCAGb,IAAKV,KAAKW,mBAET,YADAL,EAAOI,KAAK,0DAGbV,KAAKC,WAAaL,EAAsBmB,SACxC,MAAMC,EAAkBhB,KAAKiB,cAC7B,GAAID,EAYH,OAXAV,EAAOI,KAAK,wCACZV,KAAKkB,GAAK,CAACC,EAAOC,KACjBd,EAAOI,KAAK,6BAAgCS,GAC5CH,EAAgBb,QAAQkB,YAAYF,EAAOC,GAC3CpB,KAAKK,cAAciB,MAAK,KACvBN,EAAgBb,QAAQoB,eAAeJ,EAAOC,GAC9Cd,EAAOI,KAAK,iCAAoCS,MAE1CnB,WAERA,KAAKC,WAAaL,EAAsBkB,SAGzCR,EAAOI,KAAK,2DAC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OAAOI,KAAK,6BAA8BwB,GAAUnC,aAAaoC,MAC/DD,CACR,CACA,WAAAT,GAlID,IAAyBhC,EAAQ2C,EAAR3C,EAmIPO,KAAKP,OAnIU2C,EAmIFpC,KAlI9BN,WAAWD,GAAU2C,EAmIpBpC,KAAKM,OAAOI,KAAK,uBAAwBV,KAAKP,OAAOe,YACtD,CACA,aAAAwB,GACCrC,EAAmBK,KAAKP,QACxBO,KAAKM,OAAOI,KAAK,2BAA4BV,KAAKP,OAAOe,YAC1D,GAWD,SAAS6B,IACR,OAAOC,KAAKC,SAASC,SAAS,IAAIC,MAAM,EACzC","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";exports.n=async function(e,o,...t){const i=e.listeners(o);if(0!==i.length)for(const o of i)await o.apply(e,t)},exports.t=function(e){const o=Object.getOwnPropertyDescriptor(globalThis,e);return void 0!==o&&(("function"!=typeof o.get||void 0!==o.get())&&((void 0!==o.get||null!=o.value)&&(!(void 0===o.set&&!o.configurable)||(console.error(`[MSW] Failed to apply interceptor: the global \`${e}\` property is non-configurable. This is likely an issue with your environment. If you are using a framework, please open an issue about this in their repository.`),!1))))};
|
|
2
|
+
//# sourceMappingURL=hasConfigurableGlobal-C8kXFDic.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hasConfigurableGlobal-C8kXFDic.cjs.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@mswjs+interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/browser/hasConfigurableGlobal-C8kXFDic.mjs"],"sourcesContent":["//#region src/utils/emitAsync.ts\n/**\n* Emits an event on the given emitter but executes\n* the listeners sequentially. This accounts for asynchronous\n* listeners (e.g. those having \"sleep\" and handling the request).\n*/\nasync function emitAsync(emitter, eventName, ...data) {\n\tconst listeners = emitter.listeners(eventName);\n\tif (listeners.length === 0) return;\n\tfor (const listener of listeners) await listener.apply(emitter, data);\n}\n\n//#endregion\n//#region src/utils/hasConfigurableGlobal.ts\n/**\n* Returns a boolean indicating whether the given global property\n* is defined and is configurable.\n*/\nfunction hasConfigurableGlobal(propertyName) {\n\tconst descriptor = Object.getOwnPropertyDescriptor(globalThis, propertyName);\n\tif (typeof descriptor === \"undefined\") return false;\n\tif (typeof descriptor.get === \"function\" && typeof descriptor.get() === \"undefined\") return false;\n\tif (typeof descriptor.get === \"undefined\" && descriptor.value == null) return false;\n\tif (typeof descriptor.set === \"undefined\" && !descriptor.configurable) {\n\t\tconsole.error(`[MSW] Failed to apply interceptor: the global \\`${propertyName}\\` property is non-configurable. This is likely an issue with your environment. If you are using a framework, please open an issue about this in their repository.`);\n\t\treturn false;\n\t}\n\treturn true;\n}\n\n//#endregion\nexport { emitAsync as n, hasConfigurableGlobal as t };\n//# sourceMappingURL=hasConfigurableGlobal-C8kXFDic.mjs.map"],"names":["async","emitter","eventName","data","listeners","length","listener","apply","propertyName","descriptor","Object","getOwnPropertyDescriptor","globalThis","get","value","set","configurable","console","error"],"mappings":"uBAMAA,eAAyBC,EAASC,KAAcC,GAC/C,MAAMC,EAAYH,EAAQG,UAAUF,GACpC,GAAyB,IAArBE,EAAUC,OACd,IAAK,MAAMC,KAAYF,QAAiBE,EAASC,MAAMN,EAASE,EACjE,YAQA,SAA+BK,GAC9B,MAAMC,EAAaC,OAAOC,yBAAyBC,WAAYJ,GAC/D,YAA0B,IAAfC,KACmB,mBAAnBA,EAAWI,UAAkD,IAArBJ,EAAWI,eAChC,IAAnBJ,EAAWI,KAA2C,MAApBJ,EAAWK,gBAC1B,IAAnBL,EAAWM,MAAwBN,EAAWO,gBACxDC,QAAQC,MAAM,mDAAmDV,wKAC1D,KAGT","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
async function e(e,o,...t){const
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
async function e(e,o,...t){const n=e.listeners(o);if(0!==n.length)for(const o of n)await o.apply(e,t)}function o(e){const o=Object.getOwnPropertyDescriptor(globalThis,e);return void 0!==o&&(("function"!=typeof o.get||void 0!==o.get())&&((void 0!==o.get||null!=o.value)&&(!(void 0===o.set&&!o.configurable)||(console.error(`[MSW] Failed to apply interceptor: the global \`${e}\` property is non-configurable. This is likely an issue with your environment. If you are using a framework, please open an issue about this in their repository.`),!1))))}export{e as n,o as t};
|
|
2
|
+
//# sourceMappingURL=hasConfigurableGlobal-C8kXFDic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hasConfigurableGlobal-C8kXFDic.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@mswjs+interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/browser/hasConfigurableGlobal-C8kXFDic.mjs"],"sourcesContent":["//#region src/utils/emitAsync.ts\n/**\n* Emits an event on the given emitter but executes\n* the listeners sequentially. This accounts for asynchronous\n* listeners (e.g. those having \"sleep\" and handling the request).\n*/\nasync function emitAsync(emitter, eventName, ...data) {\n\tconst listeners = emitter.listeners(eventName);\n\tif (listeners.length === 0) return;\n\tfor (const listener of listeners) await listener.apply(emitter, data);\n}\n\n//#endregion\n//#region src/utils/hasConfigurableGlobal.ts\n/**\n* Returns a boolean indicating whether the given global property\n* is defined and is configurable.\n*/\nfunction hasConfigurableGlobal(propertyName) {\n\tconst descriptor = Object.getOwnPropertyDescriptor(globalThis, propertyName);\n\tif (typeof descriptor === \"undefined\") return false;\n\tif (typeof descriptor.get === \"function\" && typeof descriptor.get() === \"undefined\") return false;\n\tif (typeof descriptor.get === \"undefined\" && descriptor.value == null) return false;\n\tif (typeof descriptor.set === \"undefined\" && !descriptor.configurable) {\n\t\tconsole.error(`[MSW] Failed to apply interceptor: the global \\`${propertyName}\\` property is non-configurable. This is likely an issue with your environment. If you are using a framework, please open an issue about this in their repository.`);\n\t\treturn false;\n\t}\n\treturn true;\n}\n\n//#endregion\nexport { emitAsync as n, hasConfigurableGlobal as t };\n//# sourceMappingURL=hasConfigurableGlobal-C8kXFDic.mjs.map"],"names":["async","emitAsync","emitter","eventName","data","listeners","length","listener","apply","hasConfigurableGlobal","propertyName","descriptor","Object","getOwnPropertyDescriptor","globalThis","get","value","set","configurable","console","error"],"mappings":"AAMAA,eAAeC,EAAUC,EAASC,KAAcC,GAC/C,MAAMC,EAAYH,EAAQG,UAAUF,GACpC,GAAyB,IAArBE,EAAUC,OACd,IAAK,MAAMC,KAAYF,QAAiBE,EAASC,MAAMN,EAASE,EACjE,CAQA,SAASK,EAAsBC,GAC9B,MAAMC,EAAaC,OAAOC,yBAAyBC,WAAYJ,GAC/D,YAA0B,IAAfC,KACmB,mBAAnBA,EAAWI,UAAkD,IAArBJ,EAAWI,eAChC,IAAnBJ,EAAWI,KAA2C,MAApBJ,EAAWK,gBAC1B,IAAnBL,EAAWM,MAAwBN,EAAWO,gBACxDC,QAAQC,MAAM,mDAAmDV,wKAC1D,KAGT","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("../../createRequestId-DQcIlohW.cjs.js"),t=require("../../hasConfigurableGlobal-C8kXFDic.cjs.js"),s=require("../../../../../../../../@open-draft_deferred-promise@2.2.0/node_modules/@open-draft/deferred-promise/build/index.cjs.js"),n=require("../../../../../../../../outvariant@1.4.3/node_modules/outvariant/lib/index.cjs.js");function o(e,t){return Object.defineProperties(t,{target:{value:e,enumerable:!0,writable:!0},currentTarget:{value:e,enumerable:!0,writable:!0}}),t}const r=Symbol("kCancelable"),i=Symbol("kDefaultPrevented");var a=class extends MessageEvent{constructor(e,t){super(e,t),this[r]=!!t.cancelable,this[i]=!1}get cancelable(){return this[r]}set cancelable(e){this[r]=e}get defaultPrevented(){return this[i]}set defaultPrevented(e){this[i]=e}preventDefault(){this.cancelable&&!this[i]&&(this[i]=!0)}},c=class extends Event{constructor(e,t={}){super(e,t),this.code=void 0===t.code?0:t.code,this.reason=void 0===t.reason?"":t.reason,this.wasClean=void 0!==t.wasClean&&t.wasClean}},l=class extends c{constructor(e,t={}){super(e,t),this[r]=!!t.cancelable,this[i]=!1}get cancelable(){return this[r]}set cancelable(e){this[r]=e}get defaultPrevented(){return this[i]}set defaultPrevented(e){this[i]=e}preventDefault(){this.cancelable&&!this[i]&&(this[i]=!0)}};const h=Symbol("kEmitter"),d=Symbol("kBoundListener");var u=class{constructor(t,s){this.socket=t,this.transport=s,this.id=e.t(),this.url=new URL(t.url),this[h]=new EventTarget,this.transport.addEventListener("outgoing",(e=>{const t=o(this.socket,new a("message",{data:e.data,origin:e.origin,cancelable:!0}));this[h].dispatchEvent(t),t.defaultPrevented&&e.preventDefault()})),this.transport.addEventListener("close",(e=>{this[h].dispatchEvent(o(this.socket,new c("close",e)))}))}addEventListener(e,t,s){if(!Reflect.has(t,d)){const e=t.bind(this.socket);Object.defineProperty(t,d,{value:e,enumerable:!1,configurable:!1})}this[h].addEventListener(e,Reflect.get(t,d),s)}removeEventListener(e,t,s){this[h].removeEventListener(e,Reflect.get(t,d),s)}send(e){this.transport.send(e)}close(e,t){this.transport.close(e,t)}};const v="InvalidAccessError: close code out of user configurable range",b=Symbol("kPassthroughPromise"),E=Symbol("kOnSend"),p=Symbol("kClose");var S=class extends EventTarget{static{this.CONNECTING=0}static{this.OPEN=1}static{this.CLOSING=2}static{this.CLOSED=3}constructor(e,t){super(),this.CONNECTING=0,this.OPEN=1,this.CLOSING=2,this.CLOSED=3,this._onopen=null,this._onmessage=null,this._onerror=null,this._onclose=null,this.url=e.toString(),this.protocol="",this.extensions="",this.binaryType="blob",this.readyState=this.CONNECTING,this.bufferedAmount=0,this[b]=new s.DeferredPromise,queueMicrotask((async()=>{await this[b]||(this.protocol="string"==typeof t?t:Array.isArray(t)&&t.length>0?t[0]:"",this.readyState===this.CONNECTING&&(this.readyState=this.OPEN,this.dispatchEvent(o(this,new Event("open")))))}))}set onopen(e){this.removeEventListener("open",this._onopen),this._onopen=e,null!==e&&this.addEventListener("open",e)}get onopen(){return this._onopen}set onmessage(e){this.removeEventListener("message",this._onmessage),this._onmessage=e,null!==e&&this.addEventListener("message",e)}get onmessage(){return this._onmessage}set onerror(e){this.removeEventListener("error",this._onerror),this._onerror=e,null!==e&&this.addEventListener("error",e)}get onerror(){return this._onerror}set onclose(e){this.removeEventListener("close",this._onclose),this._onclose=e,null!==e&&this.addEventListener("close",e)}get onclose(){return this._onclose}send(e){if(this.readyState===this.CONNECTING)throw this.close(),new DOMException("InvalidStateError");this.readyState!==this.CLOSING&&this.readyState!==this.CLOSED&&(this.bufferedAmount+=function(e){return"string"==typeof e?e.length:e instanceof Blob?e.size:e.byteLength}(e),queueMicrotask((()=>{this.bufferedAmount=0,this[E]?.(e)})))}close(e=1e3,t){n.invariant(e,v),n.invariant(1e3===e||e>=3e3&&e<=4999,v),this[p](e,t)}[p](e=1e3,t,s=!0){this.readyState!==this.CLOSING&&this.readyState!==this.CLOSED&&(this.readyState=this.CLOSING,queueMicrotask((()=>{this.readyState=this.CLOSED,this.dispatchEvent(o(this,new c("close",{code:e,reason:t,wasClean:s}))),this._onopen=null,this._onmessage=null,this._onerror=null,this._onclose=null})))}addEventListener(e,t,s){return super.addEventListener(e,t,s)}removeEventListener(e,t,s){return super.removeEventListener(e,t,s)}};const g=Symbol("kEmitter"),k=Symbol("kBoundListener"),C=Symbol("kSend");var m=class{constructor(e,t,s){this.client=e,this.transport=t,this.createConnection=s,this[g]=new EventTarget,this.mockCloseController=new AbortController,this.realCloseController=new AbortController,this.transport.addEventListener("outgoing",(e=>{void 0!==this.realWebSocket&&queueMicrotask((()=>{e.defaultPrevented||this[C](e.data)}))})),this.transport.addEventListener("incoming",this.handleIncomingMessage.bind(this))}get socket(){return n.invariant(this.realWebSocket,'Cannot access "socket" on the original WebSocket server object: the connection is not open. Did you forget to call `server.connect()`?'),this.realWebSocket}connect(){n.invariant(!this.realWebSocket||this.realWebSocket.readyState!==WebSocket.OPEN,'Failed to call "connect()" on the original WebSocket instance: the connection already open');const e=this.createConnection();e.binaryType=this.client.binaryType,e.addEventListener("open",(e=>{this[g].dispatchEvent(o(this.realWebSocket,new Event("open",e)))}),{once:!0}),e.addEventListener("message",(e=>{this.transport.dispatchEvent(o(this.realWebSocket,new MessageEvent("incoming",{data:e.data,origin:e.origin})))})),this.client.addEventListener("close",(e=>{this.handleMockClose(e)}),{signal:this.mockCloseController.signal}),e.addEventListener("close",(e=>{this.handleRealClose(e)}),{signal:this.realCloseController.signal}),e.addEventListener("error",(()=>{const t=o(e,new Event("error",{cancelable:!0}));this[g].dispatchEvent(t),t.defaultPrevented||this.client.dispatchEvent(o(this.client,new Event("error")))})),this.realWebSocket=e}addEventListener(e,t,s){if(!Reflect.has(t,k)){const e=t.bind(this.client);Object.defineProperty(t,k,{value:e,enumerable:!1})}this[g].addEventListener(e,Reflect.get(t,k),s)}removeEventListener(e,t,s){this[g].removeEventListener(e,Reflect.get(t,k),s)}send(e){this[C](e)}[C](e){const{realWebSocket:t}=this;n.invariant(t,'Failed to call "server.send()" for "%s": the connection is not open. Did you forget to call "server.connect()"?',this.client.url),t.readyState!==WebSocket.CLOSING&&t.readyState!==WebSocket.CLOSED&&(t.readyState!==WebSocket.CONNECTING?t.send(e):t.addEventListener("open",(()=>{t.send(e)}),{once:!0}))}close(){const{realWebSocket:e}=this;n.invariant(e,'Failed to close server connection for "%s": the connection is not open. Did you forget to call "server.connect()"?',this.client.url),this.realCloseController.abort(),e.readyState!==WebSocket.CLOSING&&e.readyState!==WebSocket.CLOSED&&(e.close(),queueMicrotask((()=>{this[g].dispatchEvent(o(this.realWebSocket,new l("close",{code:1e3,cancelable:!0})))})))}handleIncomingMessage(e){const t=o(e.target,new a("message",{data:e.data,origin:e.origin,cancelable:!0}));this[g].dispatchEvent(t),t.defaultPrevented||this.client.dispatchEvent(o(this.client,new MessageEvent("message",{data:e.data,origin:e.origin})))}handleMockClose(e){this.realWebSocket&&this.realWebSocket.close()}handleRealClose(e){this.mockCloseController.abort();const t=o(this.realWebSocket,new l("close",{code:e.code,reason:e.reason,wasClean:e.wasClean,cancelable:!0}));this[g].dispatchEvent(t),t.defaultPrevented||this.client[p](e.code,e.reason)}},y=class extends EventTarget{constructor(e){super(),this.socket=e,this.socket.addEventListener("close",(e=>{this.dispatchEvent(o(this.socket,new c("close",e)))})),this.socket[E]=e=>{this.dispatchEvent(o(this.socket,new a("outgoing",{data:e,origin:this.socket.url,cancelable:!0})))}}addEventListener(e,t,s){return super.addEventListener(e,t,s)}dispatchEvent(e){return super.dispatchEvent(e)}send(e){queueMicrotask((()=>{if(this.socket.readyState===this.socket.CLOSING||this.socket.readyState===this.socket.CLOSED)return;const t=()=>{this.socket.dispatchEvent(o(this.socket,new MessageEvent("message",{data:e,origin:this.socket.url})))};this.socket.readyState===this.socket.CONNECTING?this.socket.addEventListener("open",(()=>{t()}),{once:!0}):t()}))}close(e,t){this.socket[p](e,t)}},f=class s extends e.r{static{this.symbol=Symbol("websocket")}constructor(){super(s.symbol)}checkEnvironment(){return t.t("WebSocket")}setup(){const e=Object.getOwnPropertyDescriptor(globalThis,"WebSocket"),s=new Proxy(globalThis.WebSocket,{construct:(e,s,n)=>{const[r,i]=s,a=()=>Reflect.construct(e,s,n),c=new S(r,i),l=new y(c);return queueMicrotask((async()=>{try{const e=new m(c,l,a),s=this.emitter.listenerCount("connection")>0;await t.n(this.emitter,"connection",{client:new u(c,l),server:e,info:{protocols:i}}),s?c[b].resolve(!1):(c[b].resolve(!0),e.connect(),e.addEventListener("open",(()=>{c.dispatchEvent(o(c,new Event("open"))),e.realWebSocket&&(c.protocol=e.realWebSocket.protocol)})))}catch(e){e instanceof Error&&(c.dispatchEvent(new Event("error")),c.readyState!==WebSocket.CLOSING&&c.readyState!==WebSocket.CLOSED&&c[p](1011,e.message,!1),console.error(e))}})),c}});Object.defineProperty(globalThis,"WebSocket",{value:s,configurable:!0}),this.subscriptions.push((()=>{Object.defineProperty(globalThis,"WebSocket",e)}))}};exports.CancelableCloseEvent=l,exports.CancelableMessageEvent=a,exports.CloseEvent=c,exports.WebSocketClientConnection=u,exports.WebSocketInterceptor=f,exports.WebSocketServerConnection=m;
|
|
2
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../../../../../../../../../../../node_modules/.pnpm/@mswjs+interceptors@0.41.0/node_modules/@mswjs/interceptors/lib/browser/interceptors/WebSocket/index.mjs"],"sourcesContent":["import { r as Interceptor, t as createRequestId } from \"../../createRequestId-DQcIlohW.mjs\";\nimport { n as emitAsync, t as hasConfigurableGlobal } from \"../../hasConfigurableGlobal-C8kXFDic.mjs\";\nimport { DeferredPromise } from \"@open-draft/deferred-promise\";\nimport { invariant } from \"outvariant\";\n\n//#region src/interceptors/WebSocket/utils/bindEvent.ts\nfunction bindEvent(target, event) {\n\tObject.defineProperties(event, {\n\t\ttarget: {\n\t\t\tvalue: target,\n\t\t\tenumerable: true,\n\t\t\twritable: true\n\t\t},\n\t\tcurrentTarget: {\n\t\t\tvalue: target,\n\t\t\tenumerable: true,\n\t\t\twritable: true\n\t\t}\n\t});\n\treturn event;\n}\n\n//#endregion\n//#region src/interceptors/WebSocket/utils/events.ts\nconst kCancelable = Symbol(\"kCancelable\");\nconst kDefaultPrevented = Symbol(\"kDefaultPrevented\");\n/**\n* A `MessageEvent` superset that supports event cancellation\n* in Node.js. It's rather non-intrusive so it can be safely\n* used in the browser as well.\n*\n* @see https://github.com/nodejs/node/issues/51767\n*/\nvar CancelableMessageEvent = class extends MessageEvent {\n\tconstructor(type, init) {\n\t\tsuper(type, init);\n\t\tthis[kCancelable] = !!init.cancelable;\n\t\tthis[kDefaultPrevented] = false;\n\t}\n\tget cancelable() {\n\t\treturn this[kCancelable];\n\t}\n\tset cancelable(nextCancelable) {\n\t\tthis[kCancelable] = nextCancelable;\n\t}\n\tget defaultPrevented() {\n\t\treturn this[kDefaultPrevented];\n\t}\n\tset defaultPrevented(nextDefaultPrevented) {\n\t\tthis[kDefaultPrevented] = nextDefaultPrevented;\n\t}\n\tpreventDefault() {\n\t\tif (this.cancelable && !this[kDefaultPrevented]) this[kDefaultPrevented] = true;\n\t}\n};\nvar CloseEvent = class extends Event {\n\tconstructor(type, init = {}) {\n\t\tsuper(type, init);\n\t\tthis.code = init.code === void 0 ? 0 : init.code;\n\t\tthis.reason = init.reason === void 0 ? \"\" : init.reason;\n\t\tthis.wasClean = init.wasClean === void 0 ? false : init.wasClean;\n\t}\n};\nvar CancelableCloseEvent = class extends CloseEvent {\n\tconstructor(type, init = {}) {\n\t\tsuper(type, init);\n\t\tthis[kCancelable] = !!init.cancelable;\n\t\tthis[kDefaultPrevented] = false;\n\t}\n\tget cancelable() {\n\t\treturn this[kCancelable];\n\t}\n\tset cancelable(nextCancelable) {\n\t\tthis[kCancelable] = nextCancelable;\n\t}\n\tget defaultPrevented() {\n\t\treturn this[kDefaultPrevented];\n\t}\n\tset defaultPrevented(nextDefaultPrevented) {\n\t\tthis[kDefaultPrevented] = nextDefaultPrevented;\n\t}\n\tpreventDefault() {\n\t\tif (this.cancelable && !this[kDefaultPrevented]) this[kDefaultPrevented] = true;\n\t}\n};\n\n//#endregion\n//#region src/interceptors/WebSocket/WebSocketClientConnection.ts\nconst kEmitter$1 = Symbol(\"kEmitter\");\nconst kBoundListener$1 = Symbol(\"kBoundListener\");\nvar WebSocketClientConnectionProtocol = class {};\n/**\n* The WebSocket client instance represents an incoming\n* client connection. The user can control the connection,\n* send and receive events.\n*/\nvar WebSocketClientConnection = class {\n\tconstructor(socket, transport) {\n\t\tthis.socket = socket;\n\t\tthis.transport = transport;\n\t\tthis.id = createRequestId();\n\t\tthis.url = new URL(socket.url);\n\t\tthis[kEmitter$1] = new EventTarget();\n\t\tthis.transport.addEventListener(\"outgoing\", (event) => {\n\t\t\tconst message = bindEvent(this.socket, new CancelableMessageEvent(\"message\", {\n\t\t\t\tdata: event.data,\n\t\t\t\torigin: event.origin,\n\t\t\t\tcancelable: true\n\t\t\t}));\n\t\t\tthis[kEmitter$1].dispatchEvent(message);\n\t\t\tif (message.defaultPrevented) event.preventDefault();\n\t\t});\n\t\t/**\n\t\t* Emit the \"close\" event on the \"client\" connection\n\t\t* whenever the underlying transport is closed.\n\t\t* @note \"client.close()\" does NOT dispatch the \"close\"\n\t\t* event on the WebSocket because it uses non-configurable\n\t\t* close status code. Thus, we listen to the transport\n\t\t* instead of the WebSocket's \"close\" event.\n\t\t*/\n\t\tthis.transport.addEventListener(\"close\", (event) => {\n\t\t\tthis[kEmitter$1].dispatchEvent(bindEvent(this.socket, new CloseEvent(\"close\", event)));\n\t\t});\n\t}\n\t/**\n\t* Listen for the outgoing events from the connected WebSocket client.\n\t*/\n\taddEventListener(type, listener, options) {\n\t\tif (!Reflect.has(listener, kBoundListener$1)) {\n\t\t\tconst boundListener = listener.bind(this.socket);\n\t\t\tObject.defineProperty(listener, kBoundListener$1, {\n\t\t\t\tvalue: boundListener,\n\t\t\t\tenumerable: false,\n\t\t\t\tconfigurable: false\n\t\t\t});\n\t\t}\n\t\tthis[kEmitter$1].addEventListener(type, Reflect.get(listener, kBoundListener$1), options);\n\t}\n\t/**\n\t* Removes the listener for the given event.\n\t*/\n\tremoveEventListener(event, listener, options) {\n\t\tthis[kEmitter$1].removeEventListener(event, Reflect.get(listener, kBoundListener$1), options);\n\t}\n\t/**\n\t* Send data to the connected client.\n\t*/\n\tsend(data) {\n\t\tthis.transport.send(data);\n\t}\n\t/**\n\t* Close the WebSocket connection.\n\t* @param {number} code A status code (see https://www.rfc-editor.org/rfc/rfc6455#section-7.4.1).\n\t* @param {string} reason A custom connection close reason.\n\t*/\n\tclose(code, reason) {\n\t\tthis.transport.close(code, reason);\n\t}\n};\n\n//#endregion\n//#region src/interceptors/WebSocket/WebSocketOverride.ts\nconst WEBSOCKET_CLOSE_CODE_RANGE_ERROR = \"InvalidAccessError: close code out of user configurable range\";\nconst kPassthroughPromise = Symbol(\"kPassthroughPromise\");\nconst kOnSend = Symbol(\"kOnSend\");\nconst kClose = Symbol(\"kClose\");\nvar WebSocketOverride = class extends EventTarget {\n\tstatic {\n\t\tthis.CONNECTING = 0;\n\t}\n\tstatic {\n\t\tthis.OPEN = 1;\n\t}\n\tstatic {\n\t\tthis.CLOSING = 2;\n\t}\n\tstatic {\n\t\tthis.CLOSED = 3;\n\t}\n\tconstructor(url, protocols) {\n\t\tsuper();\n\t\tthis.CONNECTING = 0;\n\t\tthis.OPEN = 1;\n\t\tthis.CLOSING = 2;\n\t\tthis.CLOSED = 3;\n\t\tthis._onopen = null;\n\t\tthis._onmessage = null;\n\t\tthis._onerror = null;\n\t\tthis._onclose = null;\n\t\tthis.url = url.toString();\n\t\tthis.protocol = \"\";\n\t\tthis.extensions = \"\";\n\t\tthis.binaryType = \"blob\";\n\t\tthis.readyState = this.CONNECTING;\n\t\tthis.bufferedAmount = 0;\n\t\tthis[kPassthroughPromise] = new DeferredPromise();\n\t\tqueueMicrotask(async () => {\n\t\t\tif (await this[kPassthroughPromise]) return;\n\t\t\tthis.protocol = typeof protocols === \"string\" ? protocols : Array.isArray(protocols) && protocols.length > 0 ? protocols[0] : \"\";\n\t\t\t/**\n\t\t\t* @note Check that nothing has prevented this connection\n\t\t\t* (e.g. called `client.close()` in the connection listener).\n\t\t\t* If the connection has been prevented, never dispatch the open event,.\n\t\t\t*/\n\t\t\tif (this.readyState === this.CONNECTING) {\n\t\t\t\tthis.readyState = this.OPEN;\n\t\t\t\tthis.dispatchEvent(bindEvent(this, new Event(\"open\")));\n\t\t\t}\n\t\t});\n\t}\n\tset onopen(listener) {\n\t\tthis.removeEventListener(\"open\", this._onopen);\n\t\tthis._onopen = listener;\n\t\tif (listener !== null) this.addEventListener(\"open\", listener);\n\t}\n\tget onopen() {\n\t\treturn this._onopen;\n\t}\n\tset onmessage(listener) {\n\t\tthis.removeEventListener(\"message\", this._onmessage);\n\t\tthis._onmessage = listener;\n\t\tif (listener !== null) this.addEventListener(\"message\", listener);\n\t}\n\tget onmessage() {\n\t\treturn this._onmessage;\n\t}\n\tset onerror(listener) {\n\t\tthis.removeEventListener(\"error\", this._onerror);\n\t\tthis._onerror = listener;\n\t\tif (listener !== null) this.addEventListener(\"error\", listener);\n\t}\n\tget onerror() {\n\t\treturn this._onerror;\n\t}\n\tset onclose(listener) {\n\t\tthis.removeEventListener(\"close\", this._onclose);\n\t\tthis._onclose = listener;\n\t\tif (listener !== null) this.addEventListener(\"close\", listener);\n\t}\n\tget onclose() {\n\t\treturn this._onclose;\n\t}\n\t/**\n\t* @see https://websockets.spec.whatwg.org/#ref-for-dom-websocket-send%E2%91%A0\n\t*/\n\tsend(data) {\n\t\tif (this.readyState === this.CONNECTING) {\n\t\t\tthis.close();\n\t\t\tthrow new DOMException(\"InvalidStateError\");\n\t\t}\n\t\tif (this.readyState === this.CLOSING || this.readyState === this.CLOSED) return;\n\t\tthis.bufferedAmount += getDataSize(data);\n\t\tqueueMicrotask(() => {\n\t\t\tthis.bufferedAmount = 0;\n\t\t\t/**\n\t\t\t* @note Notify the parent about outgoing data.\n\t\t\t* This notifies the transport and the connection\n\t\t\t* listens to the outgoing data to emit the \"message\" event.\n\t\t\t*/\n\t\t\tthis[kOnSend]?.(data);\n\t\t});\n\t}\n\tclose(code = 1e3, reason) {\n\t\tinvariant(code, WEBSOCKET_CLOSE_CODE_RANGE_ERROR);\n\t\tinvariant(code === 1e3 || code >= 3e3 && code <= 4999, WEBSOCKET_CLOSE_CODE_RANGE_ERROR);\n\t\tthis[kClose](code, reason);\n\t}\n\t[kClose](code = 1e3, reason, wasClean = true) {\n\t\t/**\n\t\t* @note Move this check here so that even internal closures,\n\t\t* like those triggered by the `server` connection, are not\n\t\t* performed twice.\n\t\t*/\n\t\tif (this.readyState === this.CLOSING || this.readyState === this.CLOSED) return;\n\t\tthis.readyState = this.CLOSING;\n\t\tqueueMicrotask(() => {\n\t\t\tthis.readyState = this.CLOSED;\n\t\t\tthis.dispatchEvent(bindEvent(this, new CloseEvent(\"close\", {\n\t\t\t\tcode,\n\t\t\t\treason,\n\t\t\t\twasClean\n\t\t\t})));\n\t\t\tthis._onopen = null;\n\t\t\tthis._onmessage = null;\n\t\t\tthis._onerror = null;\n\t\t\tthis._onclose = null;\n\t\t});\n\t}\n\taddEventListener(type, listener, options) {\n\t\treturn super.addEventListener(type, listener, options);\n\t}\n\tremoveEventListener(type, callback, options) {\n\t\treturn super.removeEventListener(type, callback, options);\n\t}\n};\nfunction getDataSize(data) {\n\tif (typeof data === \"string\") return data.length;\n\tif (data instanceof Blob) return data.size;\n\treturn data.byteLength;\n}\n\n//#endregion\n//#region src/interceptors/WebSocket/WebSocketServerConnection.ts\nconst kEmitter = Symbol(\"kEmitter\");\nconst kBoundListener = Symbol(\"kBoundListener\");\nconst kSend = Symbol(\"kSend\");\nvar WebSocketServerConnectionProtocol = class {};\n/**\n* The WebSocket server instance represents the actual production\n* WebSocket server connection. It's idle by default but you can\n* establish it by calling `server.connect()`.\n*/\nvar WebSocketServerConnection = class {\n\tconstructor(client, transport, createConnection) {\n\t\tthis.client = client;\n\t\tthis.transport = transport;\n\t\tthis.createConnection = createConnection;\n\t\tthis[kEmitter] = new EventTarget();\n\t\tthis.mockCloseController = new AbortController();\n\t\tthis.realCloseController = new AbortController();\n\t\tthis.transport.addEventListener(\"outgoing\", (event) => {\n\t\t\tif (typeof this.realWebSocket === \"undefined\") return;\n\t\t\tqueueMicrotask(() => {\n\t\t\t\tif (!event.defaultPrevented)\n /**\n\t\t\t\t* @note Use the internal send mechanism so consumers can tell\n\t\t\t\t* apart direct user calls to `server.send()` and internal calls.\n\t\t\t\t* E.g. MSW has to ignore this internal call to log out messages correctly.\n\t\t\t\t*/\n\t\t\t\tthis[kSend](event.data);\n\t\t\t});\n\t\t});\n\t\tthis.transport.addEventListener(\"incoming\", this.handleIncomingMessage.bind(this));\n\t}\n\t/**\n\t* The `WebSocket` instance connected to the original server.\n\t* Accessing this before calling `server.connect()` will throw.\n\t*/\n\tget socket() {\n\t\tinvariant(this.realWebSocket, \"Cannot access \\\"socket\\\" on the original WebSocket server object: the connection is not open. Did you forget to call `server.connect()`?\");\n\t\treturn this.realWebSocket;\n\t}\n\t/**\n\t* Open connection to the original WebSocket server.\n\t*/\n\tconnect() {\n\t\tinvariant(!this.realWebSocket || this.realWebSocket.readyState !== WebSocket.OPEN, \"Failed to call \\\"connect()\\\" on the original WebSocket instance: the connection already open\");\n\t\tconst realWebSocket = this.createConnection();\n\t\trealWebSocket.binaryType = this.client.binaryType;\n\t\trealWebSocket.addEventListener(\"open\", (event) => {\n\t\t\tthis[kEmitter].dispatchEvent(bindEvent(this.realWebSocket, new Event(\"open\", event)));\n\t\t}, { once: true });\n\t\trealWebSocket.addEventListener(\"message\", (event) => {\n\t\t\tthis.transport.dispatchEvent(bindEvent(this.realWebSocket, new MessageEvent(\"incoming\", {\n\t\t\t\tdata: event.data,\n\t\t\t\torigin: event.origin\n\t\t\t})));\n\t\t});\n\t\tthis.client.addEventListener(\"close\", (event) => {\n\t\t\tthis.handleMockClose(event);\n\t\t}, { signal: this.mockCloseController.signal });\n\t\trealWebSocket.addEventListener(\"close\", (event) => {\n\t\t\tthis.handleRealClose(event);\n\t\t}, { signal: this.realCloseController.signal });\n\t\trealWebSocket.addEventListener(\"error\", () => {\n\t\t\tconst errorEvent = bindEvent(realWebSocket, new Event(\"error\", { cancelable: true }));\n\t\t\tthis[kEmitter].dispatchEvent(errorEvent);\n\t\t\tif (!errorEvent.defaultPrevented) this.client.dispatchEvent(bindEvent(this.client, new Event(\"error\")));\n\t\t});\n\t\tthis.realWebSocket = realWebSocket;\n\t}\n\t/**\n\t* Listen for the incoming events from the original WebSocket server.\n\t*/\n\taddEventListener(event, listener, options) {\n\t\tif (!Reflect.has(listener, kBoundListener)) {\n\t\t\tconst boundListener = listener.bind(this.client);\n\t\t\tObject.defineProperty(listener, kBoundListener, {\n\t\t\t\tvalue: boundListener,\n\t\t\t\tenumerable: false\n\t\t\t});\n\t\t}\n\t\tthis[kEmitter].addEventListener(event, Reflect.get(listener, kBoundListener), options);\n\t}\n\t/**\n\t* Remove the listener for the given event.\n\t*/\n\tremoveEventListener(event, listener, options) {\n\t\tthis[kEmitter].removeEventListener(event, Reflect.get(listener, kBoundListener), options);\n\t}\n\t/**\n\t* Send data to the original WebSocket server.\n\t* @example\n\t* server.send('hello')\n\t* server.send(new Blob(['hello']))\n\t* server.send(new TextEncoder().encode('hello'))\n\t*/\n\tsend(data) {\n\t\tthis[kSend](data);\n\t}\n\t[kSend](data) {\n\t\tconst { realWebSocket } = this;\n\t\tinvariant(realWebSocket, \"Failed to call \\\"server.send()\\\" for \\\"%s\\\": the connection is not open. Did you forget to call \\\"server.connect()\\\"?\", this.client.url);\n\t\tif (realWebSocket.readyState === WebSocket.CLOSING || realWebSocket.readyState === WebSocket.CLOSED) return;\n\t\tif (realWebSocket.readyState === WebSocket.CONNECTING) {\n\t\t\trealWebSocket.addEventListener(\"open\", () => {\n\t\t\t\trealWebSocket.send(data);\n\t\t\t}, { once: true });\n\t\t\treturn;\n\t\t}\n\t\trealWebSocket.send(data);\n\t}\n\t/**\n\t* Close the actual server connection.\n\t*/\n\tclose() {\n\t\tconst { realWebSocket } = this;\n\t\tinvariant(realWebSocket, \"Failed to close server connection for \\\"%s\\\": the connection is not open. Did you forget to call \\\"server.connect()\\\"?\", this.client.url);\n\t\tthis.realCloseController.abort();\n\t\tif (realWebSocket.readyState === WebSocket.CLOSING || realWebSocket.readyState === WebSocket.CLOSED) return;\n\t\trealWebSocket.close();\n\t\tqueueMicrotask(() => {\n\t\t\tthis[kEmitter].dispatchEvent(bindEvent(this.realWebSocket, new CancelableCloseEvent(\"close\", {\n\t\t\t\tcode: 1e3,\n\t\t\t\tcancelable: true\n\t\t\t})));\n\t\t});\n\t}\n\thandleIncomingMessage(event) {\n\t\tconst messageEvent = bindEvent(event.target, new CancelableMessageEvent(\"message\", {\n\t\t\tdata: event.data,\n\t\t\torigin: event.origin,\n\t\t\tcancelable: true\n\t\t}));\n\t\t/**\n\t\t* @note Emit \"message\" event on the server connection\n\t\t* instance to let the interceptor know about these\n\t\t* incoming events from the original server. In that listener,\n\t\t* the interceptor can modify or skip the event forwarding\n\t\t* to the mock WebSocket instance.\n\t\t*/\n\t\tthis[kEmitter].dispatchEvent(messageEvent);\n\t\t/**\n\t\t* @note Forward the incoming server events to the client.\n\t\t* Preventing the default on the message event stops this.\n\t\t*/\n\t\tif (!messageEvent.defaultPrevented) this.client.dispatchEvent(bindEvent(\n\t\t\t/**\n\t\t\t* @note Bind the forwarded original server events\n\t\t\t* to the mock WebSocket instance so it would\n\t\t\t* dispatch them straight away.\n\t\t\t*/\n\t\t\tthis.client,\n\t\t\tnew MessageEvent(\"message\", {\n\t\t\t\tdata: event.data,\n\t\t\t\torigin: event.origin\n\t\t\t})\n\t\t));\n\t}\n\thandleMockClose(_event) {\n\t\tif (this.realWebSocket) this.realWebSocket.close();\n\t}\n\thandleRealClose(event) {\n\t\tthis.mockCloseController.abort();\n\t\tconst closeEvent = bindEvent(this.realWebSocket, new CancelableCloseEvent(\"close\", {\n\t\t\tcode: event.code,\n\t\t\treason: event.reason,\n\t\t\twasClean: event.wasClean,\n\t\t\tcancelable: true\n\t\t}));\n\t\tthis[kEmitter].dispatchEvent(closeEvent);\n\t\tif (!closeEvent.defaultPrevented) this.client[kClose](event.code, event.reason);\n\t}\n};\n\n//#endregion\n//#region src/interceptors/WebSocket/WebSocketClassTransport.ts\n/**\n* Abstraction over the given mock `WebSocket` instance that allows\n* for controlling that instance (e.g. sending and receiving messages).\n*/\nvar WebSocketClassTransport = class extends EventTarget {\n\tconstructor(socket) {\n\t\tsuper();\n\t\tthis.socket = socket;\n\t\tthis.socket.addEventListener(\"close\", (event) => {\n\t\t\tthis.dispatchEvent(bindEvent(this.socket, new CloseEvent(\"close\", event)));\n\t\t});\n\t\t/**\n\t\t* Emit the \"outgoing\" event on the transport\n\t\t* whenever the WebSocket client sends data (\"ws.send()\").\n\t\t*/\n\t\tthis.socket[kOnSend] = (data) => {\n\t\t\tthis.dispatchEvent(bindEvent(this.socket, new CancelableMessageEvent(\"outgoing\", {\n\t\t\t\tdata,\n\t\t\t\torigin: this.socket.url,\n\t\t\t\tcancelable: true\n\t\t\t})));\n\t\t};\n\t}\n\taddEventListener(type, callback, options) {\n\t\treturn super.addEventListener(type, callback, options);\n\t}\n\tdispatchEvent(event) {\n\t\treturn super.dispatchEvent(event);\n\t}\n\tsend(data) {\n\t\tqueueMicrotask(() => {\n\t\t\tif (this.socket.readyState === this.socket.CLOSING || this.socket.readyState === this.socket.CLOSED) return;\n\t\t\tconst dispatchEvent = () => {\n\t\t\t\tthis.socket.dispatchEvent(bindEvent(\n\t\t\t\t\t/**\n\t\t\t\t\t* @note Setting this event's \"target\" to the\n\t\t\t\t\t* WebSocket override instance is important.\n\t\t\t\t\t* This way it can tell apart original incoming events\n\t\t\t\t\t* (must be forwarded to the transport) from the\n\t\t\t\t\t* mocked message events like the one below\n\t\t\t\t\t* (must be dispatched on the client instance).\n\t\t\t\t\t*/\n\t\t\t\t\tthis.socket,\n\t\t\t\t\tnew MessageEvent(\"message\", {\n\t\t\t\t\t\tdata,\n\t\t\t\t\t\torigin: this.socket.url\n\t\t\t\t\t})\n\t\t\t\t));\n\t\t\t};\n\t\t\tif (this.socket.readyState === this.socket.CONNECTING) this.socket.addEventListener(\"open\", () => {\n\t\t\t\tdispatchEvent();\n\t\t\t}, { once: true });\n\t\t\telse dispatchEvent();\n\t\t});\n\t}\n\tclose(code, reason) {\n\t\t/**\n\t\t* @note Call the internal close method directly\n\t\t* to allow closing the connection with the status codes\n\t\t* that are non-configurable by the user (> 1000 <= 1015).\n\t\t*/\n\t\tthis.socket[kClose](code, reason);\n\t}\n};\n\n//#endregion\n//#region src/interceptors/WebSocket/index.ts\n/**\n* Intercept the outgoing WebSocket connections created using\n* the global `WebSocket` class.\n*/\nvar WebSocketInterceptor = class WebSocketInterceptor extends Interceptor {\n\tstatic {\n\t\tthis.symbol = Symbol(\"websocket\");\n\t}\n\tconstructor() {\n\t\tsuper(WebSocketInterceptor.symbol);\n\t}\n\tcheckEnvironment() {\n\t\treturn hasConfigurableGlobal(\"WebSocket\");\n\t}\n\tsetup() {\n\t\tconst originalWebSocketDescriptor = Object.getOwnPropertyDescriptor(globalThis, \"WebSocket\");\n\t\tconst WebSocketProxy = new Proxy(globalThis.WebSocket, { construct: (target, args, newTarget) => {\n\t\t\tconst [url, protocols] = args;\n\t\t\tconst createConnection = () => {\n\t\t\t\treturn Reflect.construct(target, args, newTarget);\n\t\t\t};\n\t\t\tconst socket = new WebSocketOverride(url, protocols);\n\t\t\tconst transport = new WebSocketClassTransport(socket);\n\t\t\tqueueMicrotask(async () => {\n\t\t\t\ttry {\n\t\t\t\t\tconst server = new WebSocketServerConnection(socket, transport, createConnection);\n\t\t\t\t\tconst hasConnectionListeners = this.emitter.listenerCount(\"connection\") > 0;\n\t\t\t\t\tawait emitAsync(this.emitter, \"connection\", {\n\t\t\t\t\t\tclient: new WebSocketClientConnection(socket, transport),\n\t\t\t\t\t\tserver,\n\t\t\t\t\t\tinfo: { protocols }\n\t\t\t\t\t});\n\t\t\t\t\tif (hasConnectionListeners) socket[kPassthroughPromise].resolve(false);\n\t\t\t\t\telse {\n\t\t\t\t\t\tsocket[kPassthroughPromise].resolve(true);\n\t\t\t\t\t\tserver.connect();\n\t\t\t\t\t\tserver.addEventListener(\"open\", () => {\n\t\t\t\t\t\t\tsocket.dispatchEvent(bindEvent(socket, new Event(\"open\")));\n\t\t\t\t\t\t\tif (server[\"realWebSocket\"]) socket.protocol = server[\"realWebSocket\"].protocol;\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\t/**\n\t\t\t\t\t* @note Translate unhandled exceptions during the connection\n\t\t\t\t\t* handling (i.e. interceptor exceptions) as WebSocket connection\n\t\t\t\t\t* closures with error. This prevents from the exceptions occurring\n\t\t\t\t\t* in `queueMicrotask` from being process-wide and uncatchable.\n\t\t\t\t\t*/\n\t\t\t\t\tif (error instanceof Error) {\n\t\t\t\t\t\tsocket.dispatchEvent(new Event(\"error\"));\n\t\t\t\t\t\tif (socket.readyState !== WebSocket.CLOSING && socket.readyState !== WebSocket.CLOSED) socket[kClose](1011, error.message, false);\n\t\t\t\t\t\tconsole.error(error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn socket;\n\t\t} });\n\t\tObject.defineProperty(globalThis, \"WebSocket\", {\n\t\t\tvalue: WebSocketProxy,\n\t\t\tconfigurable: true\n\t\t});\n\t\tthis.subscriptions.push(() => {\n\t\t\tObject.defineProperty(globalThis, \"WebSocket\", originalWebSocketDescriptor);\n\t\t});\n\t}\n};\n\n//#endregion\nexport { CancelableCloseEvent, CancelableMessageEvent, CloseEvent, WebSocketClientConnection, WebSocketClientConnectionProtocol, WebSocketInterceptor, WebSocketServerConnection, WebSocketServerConnectionProtocol };\n//# sourceMappingURL=index.mjs.map"],"names":["bindEvent","target","event","Object","defineProperties","value","enumerable","writable","currentTarget","kCancelable","Symbol","kDefaultPrevented","CancelableMessageEvent","MessageEvent","constructor","type","init","super","this","cancelable","nextCancelable","defaultPrevented","nextDefaultPrevented","preventDefault","CloseEvent","Event","code","reason","wasClean","CancelableCloseEvent","kEmitter$1","kBoundListener$1","WebSocketClientConnection","socket","transport","id","createRequestId","url","URL","EventTarget","addEventListener","message","data","origin","dispatchEvent","listener","options","Reflect","has","boundListener","bind","defineProperty","configurable","get","removeEventListener","send","close","WEBSOCKET_CLOSE_CODE_RANGE_ERROR","kPassthroughPromise","kOnSend","kClose","WebSocketOverride","CONNECTING","OPEN","CLOSING","CLOSED","protocols","_onopen","_onmessage","_onerror","_onclose","toString","protocol","extensions","binaryType","readyState","bufferedAmount","DeferredPromise","queueMicrotask","async","Array","isArray","length","onopen","onmessage","onerror","onclose","DOMException","Blob","size","byteLength","getDataSize","invariant","callback","kEmitter","kBoundListener","kSend","WebSocketServerConnection","client","createConnection","mockCloseController","AbortController","realCloseController","realWebSocket","handleIncomingMessage","connect","WebSocket","once","handleMockClose","signal","handleRealClose","errorEvent","abort","messageEvent","_event","closeEvent","WebSocketClassTransport","WebSocketInterceptor","Interceptor","symbol","checkEnvironment","hasConfigurableGlobal","setup","originalWebSocketDescriptor","getOwnPropertyDescriptor","globalThis","WebSocketProxy","Proxy","construct","args","newTarget","server","hasConnectionListeners","emitter","listenerCount","emitAsync","info","resolve","error","Error","console","subscriptions","push"],"mappings":"iWAMA,SAASA,EAAUC,EAAQC,GAa1B,OAZAC,OAAOC,iBAAiBF,EAAO,CAC9BD,OAAQ,CACPI,MAAOJ,EACPK,YAAY,EACZC,UAAU,GAEXC,cAAe,CACdH,MAAOJ,EACPK,YAAY,EACZC,UAAU,KAGLL,CACR,CAIA,MAAMO,EAAcC,OAAO,eACrBC,EAAoBD,OAAO,qBAQ9B,IAACE,EAAyB,cAAcC,aAC1C,WAAAC,CAAYC,EAAMC,GACjBC,MAAMF,EAAMC,GACZE,KAAKT,KAAiBO,EAAKG,WAC3BD,KAAKP,IAAqB,CAC3B,CACA,cAAIQ,GACH,OAAOD,KAAKT,EACb,CACA,cAAIU,CAAWC,GACdF,KAAKT,GAAeW,CACrB,CACA,oBAAIC,GACH,OAAOH,KAAKP,EACb,CACA,oBAAIU,CAAiBC,GACpBJ,KAAKP,GAAqBW,CAC3B,CACA,cAAAC,GACKL,KAAKC,aAAeD,KAAKP,KAAoBO,KAAKP,IAAqB,EAC5E,GAEGa,EAAa,cAAcC,MAC9B,WAAAX,CAAYC,EAAMC,EAAO,IACxBC,MAAMF,EAAMC,GACZE,KAAKQ,UAAqB,IAAdV,EAAKU,KAAkB,EAAIV,EAAKU,KAC5CR,KAAKS,YAAyB,IAAhBX,EAAKW,OAAoB,GAAKX,EAAKW,OACjDT,KAAKU,cAA6B,IAAlBZ,EAAKY,UAA8BZ,EAAKY,QACzD,GAEGC,EAAuB,cAAcL,EACxC,WAAAV,CAAYC,EAAMC,EAAO,IACxBC,MAAMF,EAAMC,GACZE,KAAKT,KAAiBO,EAAKG,WAC3BD,KAAKP,IAAqB,CAC3B,CACA,cAAIQ,GACH,OA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