@burdenoff/microfe-eventfullymanaged 2026.1101.1 → 2026.1101.2
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/_virtual/_rolldown/runtime.js +4 -5
- package/dist/eventfullymanaged/EventfullyManagedRoot.d.ts +1 -1
- package/dist/eventfullymanaged/EventfullyManagedRoot.d.ts.map +1 -1
- package/dist/eventfullymanaged/EventfullyManagedRoot.js +1 -2
- package/dist/eventfullymanaged/EventfullyManagedRoot.js.map +1 -1
- package/dist/eventfullymanaged/EventfullyManagedRoutes.d.ts +1 -1
- package/dist/eventfullymanaged/EventfullyManagedRoutes.d.ts.map +1 -1
- package/dist/eventfullymanaged/EventfullyManagedRoutes.js +1 -2
- package/dist/eventfullymanaged/EventfullyManagedRoutes.js.map +1 -1
- package/dist/eventfullymanaged/api/eventApi.d.ts +110 -110
- package/dist/eventfullymanaged/api/eventApi.d.ts.map +1 -1
- package/dist/eventfullymanaged/api/eventApi.js +262 -263
- package/dist/eventfullymanaged/api/eventApi.js.map +1 -1
- package/dist/eventfullymanaged/components/ActionMenu.d.ts +1 -1
- package/dist/eventfullymanaged/components/ActionMenu.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/ActionMenu.js +7 -8
- package/dist/eventfullymanaged/components/ActionMenu.js.map +1 -1
- package/dist/eventfullymanaged/components/AttendanceForecast.d.ts +11 -0
- package/dist/eventfullymanaged/components/AttendanceForecast.d.ts.map +1 -0
- package/dist/eventfullymanaged/components/AttendanceForecast.js +215 -0
- package/dist/eventfullymanaged/components/AttendanceForecast.js.map +1 -0
- package/dist/eventfullymanaged/components/EntityFormShell.d.ts +1 -1
- package/dist/eventfullymanaged/components/EntityFormShell.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/EntityFormShell.js +1 -2
- package/dist/eventfullymanaged/components/EntityFormShell.js.map +1 -1
- package/dist/eventfullymanaged/components/EntityTagsField.d.ts +1 -1
- package/dist/eventfullymanaged/components/EntityTagsField.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/EntityTagsField.js +22 -23
- package/dist/eventfullymanaged/components/EntityTagsField.js.map +1 -1
- package/dist/eventfullymanaged/components/EventCharts.d.ts +4 -4
- package/dist/eventfullymanaged/components/EventCharts.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/EventCharts.js +53 -54
- package/dist/eventfullymanaged/components/EventCharts.js.map +1 -1
- package/dist/eventfullymanaged/components/FloorPlanZoneEditor.d.ts +1 -1
- package/dist/eventfullymanaged/components/FloorPlanZoneEditor.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/FloorPlanZoneEditor.js +1 -2
- package/dist/eventfullymanaged/components/FloorPlanZoneEditor.js.map +1 -1
- package/dist/eventfullymanaged/components/ImageUploadField.d.ts +1 -1
- package/dist/eventfullymanaged/components/ImageUploadField.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/ImageUploadField.js +31 -33
- package/dist/eventfullymanaged/components/ImageUploadField.js.map +1 -1
- package/dist/eventfullymanaged/components/PageLayout.d.ts +1 -1
- package/dist/eventfullymanaged/components/PageLayout.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/PageLayout.js +1 -2
- package/dist/eventfullymanaged/components/PageLayout.js.map +1 -1
- package/dist/eventfullymanaged/components/Pagination.d.ts +1 -1
- package/dist/eventfullymanaged/components/Pagination.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/Pagination.js +1 -2
- package/dist/eventfullymanaged/components/Pagination.js.map +1 -1
- package/dist/eventfullymanaged/components/SafeLink.d.ts +1 -1
- package/dist/eventfullymanaged/components/SafeLink.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/SafeLink.js +1 -2
- package/dist/eventfullymanaged/components/SafeLink.js.map +1 -1
- package/dist/eventfullymanaged/components/floorPlanEditor/ZoneCanvas.d.ts +1 -1
- package/dist/eventfullymanaged/components/floorPlanEditor/ZoneCanvas.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/floorPlanEditor/ZoneCanvas.js +6 -13
- package/dist/eventfullymanaged/components/floorPlanEditor/ZoneCanvas.js.map +1 -1
- package/dist/eventfullymanaged/components/floorPlanEditor/ZonePanels.d.ts +3 -3
- package/dist/eventfullymanaged/components/floorPlanEditor/ZonePanels.d.ts.map +1 -1
- package/dist/eventfullymanaged/components/floorPlanEditor/ZonePanels.js +1 -2
- package/dist/eventfullymanaged/components/floorPlanEditor/ZonePanels.js.map +1 -1
- package/dist/eventfullymanaged/components/floorPlanEditor/useZoneEditorState.js +1 -2
- package/dist/eventfullymanaged/components/floorPlanEditor/useZoneEditorState.js.map +1 -1
- package/dist/eventfullymanaged/components/index.js +5 -4
- package/dist/eventfullymanaged/context/EventfullyManagedContext.d.ts +1 -1
- package/dist/eventfullymanaged/context/EventfullyManagedContext.d.ts.map +1 -1
- package/dist/eventfullymanaged/context/EventfullyManagedContext.js +4 -8
- package/dist/eventfullymanaged/context/EventfullyManagedContext.js.map +1 -1
- package/dist/eventfullymanaged/hooks/index.js +1 -1
- package/dist/eventfullymanaged/hooks/useEventDelete.js +8 -9
- package/dist/eventfullymanaged/hooks/useEventDelete.js.map +1 -1
- package/dist/eventfullymanaged/hooks/useEvmSubscription.js +7 -12
- package/dist/eventfullymanaged/hooks/useEvmSubscription.js.map +1 -1
- package/dist/eventfullymanaged/hooks/useVirtualCall.js +9 -17
- package/dist/eventfullymanaged/hooks/useVirtualCall.js.map +1 -1
- package/dist/eventfullymanaged/lib/floorPlanZones.js +26 -28
- package/dist/eventfullymanaged/lib/floorPlanZones.js.map +1 -1
- package/dist/eventfullymanaged/lib/format.js +1 -2
- package/dist/eventfullymanaged/lib/format.js.map +1 -1
- package/dist/eventfullymanaged/lib/mutationResult.js +1 -2
- package/dist/eventfullymanaged/lib/mutationResult.js.map +1 -1
- package/dist/eventfullymanaged/lib/offlineCheckInQueue.js +29 -30
- package/dist/eventfullymanaged/lib/offlineCheckInQueue.js.map +1 -1
- package/dist/eventfullymanaged/lib/toast.js +2 -3
- package/dist/eventfullymanaged/lib/toast.js.map +1 -1
- package/dist/eventfullymanaged/lib/useOfflineCheckInSync.js +1 -2
- package/dist/eventfullymanaged/lib/useOfflineCheckInSync.js.map +1 -1
- package/dist/eventfullymanaged/pages/dashboard/DashboardPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/dashboard/DashboardPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/dashboard/DashboardPage.js +46 -47
- package/dist/eventfullymanaged/pages/dashboard/DashboardPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/events/EventDetailPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/events/EventDetailPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/events/EventDetailPage.js +197 -195
- package/dist/eventfullymanaged/pages/events/EventDetailPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/events/EventFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/events/EventFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/events/EventFormPage.js +35 -36
- package/dist/eventfullymanaged/pages/events/EventFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/events/SessionFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/events/SessionFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/events/SessionFormPage.js +47 -48
- package/dist/eventfullymanaged/pages/events/SessionFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/events/TicketTypeFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/events/TicketTypeFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/events/TicketTypeFormPage.js +31 -32
- package/dist/eventfullymanaged/pages/events/TicketTypeFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/events/VirtualSessionPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/events/VirtualSessionPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/events/VirtualSessionPage.js +170 -171
- package/dist/eventfullymanaged/pages/events/VirtualSessionPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/events/eventFormUtils.js +1 -2
- package/dist/eventfullymanaged/pages/events/eventFormUtils.js.map +1 -1
- package/dist/eventfullymanaged/pages/exhibitors/ExhibitorFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/exhibitors/ExhibitorFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/exhibitors/ExhibitorFormPage.js +20 -21
- package/dist/eventfullymanaged/pages/exhibitors/ExhibitorFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/exhibitors/ExhibitorsPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/exhibitors/ExhibitorsPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/exhibitors/ExhibitorsPage.js +18 -19
- package/dist/eventfullymanaged/pages/exhibitors/ExhibitorsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/leads/LeadCaptureDialog.d.ts +1 -1
- package/dist/eventfullymanaged/pages/leads/LeadCaptureDialog.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/leads/LeadCaptureDialog.js +13 -14
- package/dist/eventfullymanaged/pages/leads/LeadCaptureDialog.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/AnalyticsPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/AnalyticsPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/AnalyticsPage.js +89 -47
- package/dist/eventfullymanaged/pages/modules/AnalyticsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.js +8 -8
- package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/AttendeeRecommendations.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/AttendeeRecommendations.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/AttendeeRecommendations.js +3 -4
- package/dist/eventfullymanaged/pages/modules/AttendeeRecommendations.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/CommunicationPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/CommunicationPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/CommunicationPage.js +170 -171
- package/dist/eventfullymanaged/pages/modules/CommunicationPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/EntityListSection.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/EntityListSection.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/EntityListSection.js +1 -2
- package/dist/eventfullymanaged/pages/modules/EntityListSection.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/EventsPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/EventsPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/EventsPage.js +185 -186
- package/dist/eventfullymanaged/pages/modules/EventsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/IntegrationsPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/IntegrationsPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/IntegrationsPage.js +73 -78
- package/dist/eventfullymanaged/pages/modules/IntegrationsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/KioskPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/KioskPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/KioskPage.js +204 -208
- package/dist/eventfullymanaged/pages/modules/KioskPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/NetworkingPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/NetworkingPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/NetworkingPage.js +177 -181
- package/dist/eventfullymanaged/pages/modules/NetworkingPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/OperationsHubPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/OperationsHubPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/OperationsHubPage.js +18 -19
- package/dist/eventfullymanaged/pages/modules/OperationsHubPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.js +122 -123
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/RoadmapPanel.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/RoadmapPanel.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/RoadmapPanel.js +1 -2
- package/dist/eventfullymanaged/pages/modules/RoadmapPanel.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js +11 -11
- package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/SponsorLeadsPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/SponsorLeadsPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/SponsorLeadsPage.js +7 -8
- package/dist/eventfullymanaged/pages/modules/SponsorLeadsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/VenueResourcesPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/VenueResourcesPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/VenueResourcesPage.js +4 -5
- package/dist/eventfullymanaged/pages/modules/VenueResourcesPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/WorkflowsPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/modules/WorkflowsPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/WorkflowsPage.js +14 -15
- package/dist/eventfullymanaged/pages/modules/WorkflowsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/networking/MeetingFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/networking/MeetingFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/networking/MeetingFormPage.js +31 -32
- package/dist/eventfullymanaged/pages/networking/MeetingFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/networking/NetworkingProfileFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/networking/NetworkingProfileFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/networking/NetworkingProfileFormPage.js +19 -20
- package/dist/eventfullymanaged/pages/networking/NetworkingProfileFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/registration/AttendeeFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/registration/AttendeeFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/registration/AttendeeFormPage.js +19 -20
- package/dist/eventfullymanaged/pages/registration/AttendeeFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.js +21 -22
- package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/registration/RegisterAttendeePage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/registration/RegisterAttendeePage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/registration/RegisterAttendeePage.js +85 -103
- package/dist/eventfullymanaged/pages/registration/RegisterAttendeePage.js.map +1 -1
- package/dist/eventfullymanaged/pages/speakers/SpeakerFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/speakers/SpeakerFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/speakers/SpeakerFormPage.js +35 -36
- package/dist/eventfullymanaged/pages/speakers/SpeakerFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/speakers/SpeakersPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/speakers/SpeakersPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/speakers/SpeakersPage.js +40 -41
- package/dist/eventfullymanaged/pages/speakers/SpeakersPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.js +22 -23
- package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.js +29 -30
- package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/venues/FloorPlansPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/venues/FloorPlansPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js +138 -147
- package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueDetailPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueDetailPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueDetailPage.js +6 -7
- package/dist/eventfullymanaged/pages/venues/VenueDetailPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueFormPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueFormPage.js +14 -15
- package/dist/eventfullymanaged/pages/venues/VenueFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueListPage.d.ts +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueListPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueListPage.js +18 -19
- package/dist/eventfullymanaged/pages/venues/VenueListPage.js.map +1 -1
- package/dist/eventfullymanaged/store/eventfullyManagedStore.js +0 -1
- package/dist/eventfullymanaged/store/eventfullyManagedStore.js.map +1 -1
- package/dist/eventfullymanaged/types/index.d.ts.map +1 -1
- package/dist/eventfullymanaged/utils/cn.js +1 -2
- package/dist/eventfullymanaged/utils/shellBridge.js +1 -2
- package/dist/eventfullymanaged/utils/shellBridge.js.map +1 -1
- package/dist/generated/wspace-operations.d.ts +93 -1
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +51 -0
- package/dist/generated/wspace-operations.js.map +1 -0
- package/dist/generated/wspace-types.d.ts +121703 -40790
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/node_modules/@apollo/client/core/networkStatus.js +1 -2
- package/dist/node_modules/@apollo/client/core/networkStatus.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/context/ApolloContext.js +2 -3
- package/dist/node_modules/@apollo/client/react/context/ApolloContext.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/constants.js +1 -2
- package/dist/node_modules/@apollo/client/react/hooks/constants.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/internal/useDeepMemo.js +2 -3
- package/dist/node_modules/@apollo/client/react/hooks/internal/useDeepMemo.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/internal/useIsomorphicLayoutEffect.js +1 -2
- package/dist/node_modules/@apollo/client/react/hooks/internal/useIsomorphicLayoutEffect.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/internal/wrapHook.js +6 -7
- package/dist/node_modules/@apollo/client/react/hooks/internal/wrapHook.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/useApolloClient.js +2 -3
- package/dist/node_modules/@apollo/client/react/hooks/useApolloClient.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/useMutation.js +23 -24
- package/dist/node_modules/@apollo/client/react/hooks/useMutation.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/useQuery.js +51 -53
- package/dist/node_modules/@apollo/client/react/hooks/useQuery.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/useSyncExternalStore.js +4 -5
- package/dist/node_modules/@apollo/client/react/hooks/useSyncExternalStore.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/internal/index.js +1 -2
- package/dist/node_modules/@apollo/client/react/internal/index.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/canUseDOM.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/canUseDOM.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/compact.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/compact.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/constants.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/constants.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/deepFreeze.js +2 -3
- package/dist/node_modules/@apollo/client/utilities/internal/deepFreeze.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/maybeDeepFreeze.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/maybeDeepFreeze.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/mergeOptions.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/mergeOptions.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/preventUnhandledRejection.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/preventUnhandledRejection.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js +2 -3
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -1
- package/dist/node_modules/@apollo/client/version.js +2 -3
- package/dist/node_modules/@apollo/client/version.js.map +1 -1
- package/dist/node_modules/@wry/equality/lib/index.js +3 -4
- package/dist/node_modules/@wry/equality/lib/index.js.map +1 -1
- package/dist/node_modules/clsx/dist/clsx.js +8 -7
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
- package/dist/node_modules/d3-array/src/ascending.js +1 -2
- package/dist/node_modules/d3-array/src/ascending.js.map +1 -1
- package/dist/node_modules/d3-array/src/bisect.js +2 -3
- package/dist/node_modules/d3-array/src/bisect.js.map +1 -1
- package/dist/node_modules/d3-array/src/bisector.js +1 -2
- package/dist/node_modules/d3-array/src/bisector.js.map +1 -1
- package/dist/node_modules/d3-array/src/descending.js +1 -2
- package/dist/node_modules/d3-array/src/descending.js.map +1 -1
- package/dist/node_modules/d3-array/src/max.js +1 -2
- package/dist/node_modules/d3-array/src/max.js.map +1 -1
- package/dist/node_modules/d3-array/src/min.js +1 -2
- package/dist/node_modules/d3-array/src/min.js.map +1 -1
- package/dist/node_modules/d3-array/src/number.js +1 -2
- package/dist/node_modules/d3-array/src/number.js.map +1 -1
- package/dist/node_modules/d3-array/src/quantile.js +17 -18
- package/dist/node_modules/d3-array/src/quantile.js.map +1 -1
- package/dist/node_modules/d3-array/src/quickselect.js +1 -2
- package/dist/node_modules/d3-array/src/quickselect.js.map +1 -1
- package/dist/node_modules/d3-array/src/range.js +1 -2
- package/dist/node_modules/d3-array/src/range.js.map +1 -1
- package/dist/node_modules/d3-array/src/sort.js +1 -2
- package/dist/node_modules/d3-array/src/sort.js.map +1 -1
- package/dist/node_modules/d3-array/src/ticks.js +5 -5
- package/dist/node_modules/d3-array/src/ticks.js.map +1 -1
- package/dist/node_modules/d3-color/src/color.js +2 -3
- package/dist/node_modules/d3-color/src/color.js.map +1 -1
- package/dist/node_modules/d3-color/src/define.js +1 -2
- package/dist/node_modules/d3-color/src/define.js.map +1 -1
- package/dist/node_modules/d3-format/src/defaultLocale.js +2 -3
- package/dist/node_modules/d3-format/src/defaultLocale.js.map +1 -1
- package/dist/node_modules/d3-format/src/exponent.js +1 -2
- package/dist/node_modules/d3-format/src/exponent.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatDecimal.js +1 -2
- package/dist/node_modules/d3-format/src/formatDecimal.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatGroup.js +1 -2
- package/dist/node_modules/d3-format/src/formatGroup.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatNumerals.js +1 -2
- package/dist/node_modules/d3-format/src/formatNumerals.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatPrefixAuto.js +1 -2
- package/dist/node_modules/d3-format/src/formatPrefixAuto.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatRounded.js +1 -2
- package/dist/node_modules/d3-format/src/formatRounded.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatSpecifier.js +2 -3
- package/dist/node_modules/d3-format/src/formatSpecifier.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatTrim.js +1 -3
- package/dist/node_modules/d3-format/src/formatTrim.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatTypes.js +1 -2
- package/dist/node_modules/d3-format/src/formatTypes.js.map +1 -1
- package/dist/node_modules/d3-format/src/identity.js +1 -2
- package/dist/node_modules/d3-format/src/identity.js.map +1 -1
- package/dist/node_modules/d3-format/src/locale.js +10 -13
- package/dist/node_modules/d3-format/src/locale.js.map +1 -1
- package/dist/node_modules/d3-format/src/precisionFixed.js +1 -2
- package/dist/node_modules/d3-format/src/precisionFixed.js.map +1 -1
- package/dist/node_modules/d3-format/src/precisionPrefix.js +1 -2
- package/dist/node_modules/d3-format/src/precisionPrefix.js.map +1 -1
- package/dist/node_modules/d3-format/src/precisionRound.js +1 -2
- package/dist/node_modules/d3-format/src/precisionRound.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/array.js +2 -4
- package/dist/node_modules/d3-interpolate/src/array.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/basis.js +1 -2
- package/dist/node_modules/d3-interpolate/src/basis.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/basisClosed.js +1 -2
- package/dist/node_modules/d3-interpolate/src/basisClosed.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/color.js +1 -2
- package/dist/node_modules/d3-interpolate/src/color.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/constant.js +1 -2
- package/dist/node_modules/d3-interpolate/src/constant.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/date.js +1 -2
- package/dist/node_modules/d3-interpolate/src/date.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/number.js +1 -2
- package/dist/node_modules/d3-interpolate/src/number.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/numberArray.js +1 -2
- package/dist/node_modules/d3-interpolate/src/numberArray.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/object.js +2 -3
- package/dist/node_modules/d3-interpolate/src/object.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/piecewise.js +1 -2
- package/dist/node_modules/d3-interpolate/src/piecewise.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/rgb.js +1 -2
- package/dist/node_modules/d3-interpolate/src/rgb.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/round.js +1 -2
- package/dist/node_modules/d3-interpolate/src/round.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/string.js +1 -2
- package/dist/node_modules/d3-interpolate/src/string.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/value.js +10 -11
- package/dist/node_modules/d3-interpolate/src/value.js.map +1 -1
- package/dist/node_modules/d3-path/src/path.js +8 -7
- package/dist/node_modules/d3-path/src/path.js.map +1 -1
- package/dist/node_modules/d3-scale/src/band.js +1 -2
- package/dist/node_modules/d3-scale/src/band.js.map +1 -1
- package/dist/node_modules/d3-scale/src/constant.js +1 -2
- package/dist/node_modules/d3-scale/src/constant.js.map +1 -1
- package/dist/node_modules/d3-scale/src/continuous.js +7 -8
- package/dist/node_modules/d3-scale/src/continuous.js.map +1 -1
- package/dist/node_modules/d3-scale/src/diverging.js +35 -36
- package/dist/node_modules/d3-scale/src/diverging.js.map +1 -1
- package/dist/node_modules/d3-scale/src/identity.js +6 -7
- package/dist/node_modules/d3-scale/src/identity.js.map +1 -1
- package/dist/node_modules/d3-scale/src/init.js +3 -8
- package/dist/node_modules/d3-scale/src/init.js.map +1 -1
- package/dist/node_modules/d3-scale/src/linear.js +6 -7
- package/dist/node_modules/d3-scale/src/linear.js.map +1 -1
- package/dist/node_modules/d3-scale/src/log.js +32 -33
- package/dist/node_modules/d3-scale/src/log.js.map +1 -1
- package/dist/node_modules/d3-scale/src/nice.js +1 -2
- package/dist/node_modules/d3-scale/src/nice.js.map +1 -1
- package/dist/node_modules/d3-scale/src/number.js +1 -2
- package/dist/node_modules/d3-scale/src/number.js.map +1 -1
- package/dist/node_modules/d3-scale/src/ordinal.js +1 -2
- package/dist/node_modules/d3-scale/src/ordinal.js.map +1 -1
- package/dist/node_modules/d3-scale/src/pow.js +13 -14
- package/dist/node_modules/d3-scale/src/pow.js.map +1 -1
- package/dist/node_modules/d3-scale/src/quantile.js +2 -3
- package/dist/node_modules/d3-scale/src/quantile.js.map +1 -1
- package/dist/node_modules/d3-scale/src/quantize.js +5 -6
- package/dist/node_modules/d3-scale/src/quantize.js.map +1 -1
- package/dist/node_modules/d3-scale/src/radial.js +8 -9
- package/dist/node_modules/d3-scale/src/radial.js.map +1 -1
- package/dist/node_modules/d3-scale/src/sequential.js +27 -28
- package/dist/node_modules/d3-scale/src/sequential.js.map +1 -1
- package/dist/node_modules/d3-scale/src/sequentialQuantile.js +6 -7
- package/dist/node_modules/d3-scale/src/sequentialQuantile.js.map +1 -1
- package/dist/node_modules/d3-scale/src/symlog.js +12 -13
- package/dist/node_modules/d3-scale/src/symlog.js.map +1 -1
- package/dist/node_modules/d3-scale/src/threshold.js +2 -3
- package/dist/node_modules/d3-scale/src/threshold.js.map +1 -1
- package/dist/node_modules/d3-scale/src/tickFormat.js +7 -10
- package/dist/node_modules/d3-scale/src/tickFormat.js.map +1 -1
- package/dist/node_modules/d3-scale/src/time.js +27 -28
- package/dist/node_modules/d3-scale/src/time.js.map +1 -1
- package/dist/node_modules/d3-scale/src/utcTime.js +13 -14
- package/dist/node_modules/d3-scale/src/utcTime.js.map +1 -1
- package/dist/node_modules/d3-shape/src/area.js +34 -33
- package/dist/node_modules/d3-shape/src/area.js.map +1 -1
- package/dist/node_modules/d3-shape/src/array.js +0 -1
- package/dist/node_modules/d3-shape/src/array.js.map +1 -1
- package/dist/node_modules/d3-shape/src/constant.js +1 -2
- package/dist/node_modules/d3-shape/src/constant.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/basis.js +4 -9
- package/dist/node_modules/d3-shape/src/curve/basis.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/basisClosed.js +3 -8
- package/dist/node_modules/d3-shape/src/curve/basisClosed.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/basisOpen.js +2 -5
- package/dist/node_modules/d3-shape/src/curve/basisOpen.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/bump.js +2 -5
- package/dist/node_modules/d3-shape/src/curve/bump.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/linear.js +2 -5
- package/dist/node_modules/d3-shape/src/curve/linear.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/linearClosed.js +1 -2
- package/dist/node_modules/d3-shape/src/curve/linearClosed.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/monotone.js +4 -9
- package/dist/node_modules/d3-shape/src/curve/monotone.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/natural.js +5 -4
- package/dist/node_modules/d3-shape/src/curve/natural.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/step.js +6 -9
- package/dist/node_modules/d3-shape/src/curve/step.js.map +1 -1
- package/dist/node_modules/d3-shape/src/line.js +16 -17
- package/dist/node_modules/d3-shape/src/line.js.map +1 -1
- package/dist/node_modules/d3-shape/src/math.js +1 -2
- package/dist/node_modules/d3-shape/src/math.js.map +1 -1
- package/dist/node_modules/d3-shape/src/noop.js +1 -2
- package/dist/node_modules/d3-shape/src/noop.js.map +1 -1
- package/dist/node_modules/d3-shape/src/offset/expand.js +1 -2
- package/dist/node_modules/d3-shape/src/offset/expand.js.map +1 -1
- package/dist/node_modules/d3-shape/src/offset/none.js +1 -2
- package/dist/node_modules/d3-shape/src/offset/none.js.map +1 -1
- package/dist/node_modules/d3-shape/src/offset/silhouette.js +1 -2
- package/dist/node_modules/d3-shape/src/offset/silhouette.js.map +1 -1
- package/dist/node_modules/d3-shape/src/offset/wiggle.js +2 -3
- package/dist/node_modules/d3-shape/src/offset/wiggle.js.map +1 -1
- package/dist/node_modules/d3-shape/src/order/none.js +1 -2
- package/dist/node_modules/d3-shape/src/order/none.js.map +1 -1
- package/dist/node_modules/d3-shape/src/path.js +1 -2
- package/dist/node_modules/d3-shape/src/path.js.map +1 -1
- package/dist/node_modules/d3-shape/src/point.js +1 -2
- package/dist/node_modules/d3-shape/src/point.js.map +1 -1
- package/dist/node_modules/d3-shape/src/stack.js +13 -14
- package/dist/node_modules/d3-shape/src/stack.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/circle.js +1 -2
- package/dist/node_modules/d3-shape/src/symbol/circle.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/cross.js +1 -2
- package/dist/node_modules/d3-shape/src/symbol/cross.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/diamond.js +1 -2
- package/dist/node_modules/d3-shape/src/symbol/diamond.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/square.js +1 -2
- package/dist/node_modules/d3-shape/src/symbol/square.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/star.js +1 -2
- package/dist/node_modules/d3-shape/src/symbol/star.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/triangle.js +1 -2
- package/dist/node_modules/d3-shape/src/symbol/triangle.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/wye.js +1 -2
- package/dist/node_modules/d3-shape/src/symbol/wye.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol.js +1 -2
- package/dist/node_modules/d3-shape/src/symbol.js.map +1 -1
- package/dist/node_modules/d3-time/src/day.js +1 -2
- package/dist/node_modules/d3-time/src/day.js.map +1 -1
- package/dist/node_modules/d3-time/src/duration.js +1 -2
- package/dist/node_modules/d3-time/src/duration.js.map +1 -1
- package/dist/node_modules/d3-time/src/hour.js +1 -2
- package/dist/node_modules/d3-time/src/hour.js.map +1 -1
- package/dist/node_modules/d3-time/src/interval.js +5 -4
- package/dist/node_modules/d3-time/src/interval.js.map +1 -1
- package/dist/node_modules/d3-time/src/millisecond.js +1 -2
- package/dist/node_modules/d3-time/src/millisecond.js.map +1 -1
- package/dist/node_modules/d3-time/src/minute.js +1 -2
- package/dist/node_modules/d3-time/src/minute.js.map +1 -1
- package/dist/node_modules/d3-time/src/month.js +1 -2
- package/dist/node_modules/d3-time/src/month.js.map +1 -1
- package/dist/node_modules/d3-time/src/second.js +1 -2
- package/dist/node_modules/d3-time/src/second.js.map +1 -1
- package/dist/node_modules/d3-time/src/ticks.js +27 -28
- package/dist/node_modules/d3-time/src/ticks.js.map +1 -1
- package/dist/node_modules/d3-time/src/week.js +2 -3
- package/dist/node_modules/d3-time/src/week.js.map +1 -1
- package/dist/node_modules/d3-time/src/year.js +1 -2
- package/dist/node_modules/d3-time/src/year.js.map +1 -1
- package/dist/node_modules/d3-time-format/src/defaultLocale.js +6 -7
- package/dist/node_modules/d3-time-format/src/defaultLocale.js.map +1 -1
- package/dist/node_modules/d3-time-format/src/locale.js +1 -2
- package/dist/node_modules/d3-time-format/src/locale.js.map +1 -1
- package/dist/node_modules/decimal.js-light/decimal.js +33 -30
- package/dist/node_modules/decimal.js-light/decimal.js.map +1 -1
- package/dist/node_modules/eventemitter3/index.js +2 -3
- package/dist/node_modules/eventemitter3/index.js.map +1 -1
- package/dist/node_modules/fast-equals/dist/es/index.js +3 -4
- package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -1
- package/dist/node_modules/graphql/error/GraphQLError.js +1 -2
- package/dist/node_modules/graphql/error/GraphQLError.js.map +1 -1
- package/dist/node_modules/graphql/error/syntaxError.js +1 -2
- package/dist/node_modules/graphql/error/syntaxError.js.map +1 -1
- package/dist/node_modules/graphql/jsutils/devAssert.js +1 -2
- package/dist/node_modules/graphql/jsutils/devAssert.js.map +1 -1
- package/dist/node_modules/graphql/jsutils/inspect.js +24 -27
- package/dist/node_modules/graphql/jsutils/inspect.js.map +1 -1
- package/dist/node_modules/graphql/jsutils/instanceOf.js +0 -1
- package/dist/node_modules/graphql/jsutils/instanceOf.js.map +1 -1
- package/dist/node_modules/graphql/jsutils/invariant.js +1 -2
- package/dist/node_modules/graphql/jsutils/invariant.js.map +1 -1
- package/dist/node_modules/graphql/jsutils/isObjectLike.js +1 -2
- package/dist/node_modules/graphql/jsutils/isObjectLike.js.map +1 -1
- package/dist/node_modules/graphql/language/ast.js +7 -8
- package/dist/node_modules/graphql/language/ast.js.map +1 -1
- package/dist/node_modules/graphql/language/blockString.js +1 -2
- package/dist/node_modules/graphql/language/blockString.js.map +1 -1
- package/dist/node_modules/graphql/language/characterClasses.js +2 -3
- package/dist/node_modules/graphql/language/characterClasses.js.map +1 -1
- package/dist/node_modules/graphql/language/directiveLocation.js +1 -2
- package/dist/node_modules/graphql/language/directiveLocation.js.map +1 -1
- package/dist/node_modules/graphql/language/kinds.js +1 -2
- package/dist/node_modules/graphql/language/kinds.js.map +1 -1
- package/dist/node_modules/graphql/language/lexer.js +47 -50
- package/dist/node_modules/graphql/language/lexer.js.map +1 -1
- package/dist/node_modules/graphql/language/location.js +1 -2
- package/dist/node_modules/graphql/language/location.js.map +1 -1
- package/dist/node_modules/graphql/language/parser.js +100 -97
- package/dist/node_modules/graphql/language/parser.js.map +1 -1
- package/dist/node_modules/graphql/language/printLocation.js +1 -2
- package/dist/node_modules/graphql/language/printLocation.js.map +1 -1
- package/dist/node_modules/graphql/language/source.js +1 -2
- package/dist/node_modules/graphql/language/source.js.map +1 -1
- package/dist/node_modules/graphql/language/tokenKind.js +1 -2
- package/dist/node_modules/graphql/language/tokenKind.js.map +1 -1
- package/dist/node_modules/graphql-tag/lib/index.js +10 -11
- package/dist/node_modules/graphql-tag/lib/index.js.map +1 -1
- package/dist/node_modules/internmap/src/index.js +1 -2
- package/dist/node_modules/internmap/src/index.js.map +1 -1
- package/dist/node_modules/lodash/_DataView.js +4 -5
- package/dist/node_modules/lodash/_DataView.js.map +1 -1
- package/dist/node_modules/lodash/_Hash.js +1 -2
- package/dist/node_modules/lodash/_Hash.js.map +1 -1
- package/dist/node_modules/lodash/_ListCache.js +1 -2
- package/dist/node_modules/lodash/_ListCache.js.map +1 -1
- package/dist/node_modules/lodash/_Map.js +4 -5
- package/dist/node_modules/lodash/_Map.js.map +1 -1
- package/dist/node_modules/lodash/_MapCache.js +1 -2
- package/dist/node_modules/lodash/_MapCache.js.map +1 -1
- package/dist/node_modules/lodash/_Promise.js +4 -5
- package/dist/node_modules/lodash/_Promise.js.map +1 -1
- package/dist/node_modules/lodash/_Set.js +4 -5
- package/dist/node_modules/lodash/_Set.js.map +1 -1
- package/dist/node_modules/lodash/_SetCache.js +1 -2
- package/dist/node_modules/lodash/_SetCache.js.map +1 -1
- package/dist/node_modules/lodash/_Stack.js +3 -3
- package/dist/node_modules/lodash/_Stack.js.map +1 -1
- package/dist/node_modules/lodash/_Symbol.js +1 -2
- package/dist/node_modules/lodash/_Symbol.js.map +1 -1
- package/dist/node_modules/lodash/_Uint8Array.js +1 -2
- package/dist/node_modules/lodash/_Uint8Array.js.map +1 -1
- package/dist/node_modules/lodash/_WeakMap.js +4 -5
- package/dist/node_modules/lodash/_WeakMap.js.map +1 -1
- package/dist/node_modules/lodash/_apply.js +1 -2
- package/dist/node_modules/lodash/_apply.js.map +1 -1
- package/dist/node_modules/lodash/_arrayEvery.js +1 -2
- package/dist/node_modules/lodash/_arrayEvery.js.map +1 -1
- package/dist/node_modules/lodash/_arrayFilter.js +1 -2
- package/dist/node_modules/lodash/_arrayFilter.js.map +1 -1
- package/dist/node_modules/lodash/_arrayIncludes.js +1 -2
- package/dist/node_modules/lodash/_arrayIncludes.js.map +1 -1
- package/dist/node_modules/lodash/_arrayIncludesWith.js +1 -2
- package/dist/node_modules/lodash/_arrayIncludesWith.js.map +1 -1
- package/dist/node_modules/lodash/_arrayLikeKeys.js +5 -6
- package/dist/node_modules/lodash/_arrayLikeKeys.js.map +1 -1
- package/dist/node_modules/lodash/_arrayMap.js +1 -2
- package/dist/node_modules/lodash/_arrayMap.js.map +1 -1
- package/dist/node_modules/lodash/_arrayPush.js +1 -2
- package/dist/node_modules/lodash/_arrayPush.js.map +1 -1
- package/dist/node_modules/lodash/_arraySome.js +1 -2
- package/dist/node_modules/lodash/_arraySome.js.map +1 -1
- package/dist/node_modules/lodash/_asciiToArray.js +1 -2
- package/dist/node_modules/lodash/_asciiToArray.js.map +1 -1
- package/dist/node_modules/lodash/_assocIndexOf.js +1 -2
- package/dist/node_modules/lodash/_assocIndexOf.js.map +1 -1
- package/dist/node_modules/lodash/_baseAssignValue.js +1 -2
- package/dist/node_modules/lodash/_baseAssignValue.js.map +1 -1
- package/dist/node_modules/lodash/_baseEach.js +1 -2
- package/dist/node_modules/lodash/_baseEach.js.map +1 -1
- package/dist/node_modules/lodash/_baseEvery.js +1 -2
- package/dist/node_modules/lodash/_baseEvery.js.map +1 -1
- package/dist/node_modules/lodash/_baseExtremum.js +1 -2
- package/dist/node_modules/lodash/_baseExtremum.js.map +1 -1
- package/dist/node_modules/lodash/_baseFindIndex.js +1 -2
- package/dist/node_modules/lodash/_baseFindIndex.js.map +1 -1
- package/dist/node_modules/lodash/_baseFlatten.js +1 -2
- package/dist/node_modules/lodash/_baseFlatten.js.map +1 -1
- package/dist/node_modules/lodash/_baseFor.js +1 -2
- package/dist/node_modules/lodash/_baseFor.js.map +1 -1
- package/dist/node_modules/lodash/_baseForOwn.js +4 -5
- package/dist/node_modules/lodash/_baseForOwn.js.map +1 -1
- package/dist/node_modules/lodash/_baseGet.js +1 -2
- package/dist/node_modules/lodash/_baseGet.js.map +1 -1
- package/dist/node_modules/lodash/_baseGetAllKeys.js +4 -5
- package/dist/node_modules/lodash/_baseGetAllKeys.js.map +1 -1
- package/dist/node_modules/lodash/_baseGetTag.js +1 -2
- package/dist/node_modules/lodash/_baseGetTag.js.map +1 -1
- package/dist/node_modules/lodash/_baseGt.js +1 -2
- package/dist/node_modules/lodash/_baseGt.js.map +1 -1
- package/dist/node_modules/lodash/_baseHasIn.js +1 -2
- package/dist/node_modules/lodash/_baseHasIn.js.map +1 -1
- package/dist/node_modules/lodash/_baseIndexOf.js +1 -2
- package/dist/node_modules/lodash/_baseIndexOf.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsArguments.js +1 -2
- package/dist/node_modules/lodash/_baseIsArguments.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsEqual.js +4 -5
- package/dist/node_modules/lodash/_baseIsEqual.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsEqualDeep.js +10 -11
- package/dist/node_modules/lodash/_baseIsEqualDeep.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsMatch.js +1 -2
- package/dist/node_modules/lodash/_baseIsMatch.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsNaN.js +1 -2
- package/dist/node_modules/lodash/_baseIsNaN.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsNative.js +5 -6
- package/dist/node_modules/lodash/_baseIsNative.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsTypedArray.js +4 -5
- package/dist/node_modules/lodash/_baseIsTypedArray.js.map +1 -1
- package/dist/node_modules/lodash/_baseIteratee.js +6 -7
- package/dist/node_modules/lodash/_baseIteratee.js.map +1 -1
- package/dist/node_modules/lodash/_baseKeys.js +1 -2
- package/dist/node_modules/lodash/_baseKeys.js.map +1 -1
- package/dist/node_modules/lodash/_baseLt.js +1 -2
- package/dist/node_modules/lodash/_baseLt.js.map +1 -1
- package/dist/node_modules/lodash/_baseMap.js +4 -5
- package/dist/node_modules/lodash/_baseMap.js.map +1 -1
- package/dist/node_modules/lodash/_baseMatches.js +1 -2
- package/dist/node_modules/lodash/_baseMatches.js.map +1 -1
- package/dist/node_modules/lodash/_baseMatchesProperty.js +7 -8
- package/dist/node_modules/lodash/_baseMatchesProperty.js.map +1 -1
- package/dist/node_modules/lodash/_baseOrderBy.js +11 -12
- package/dist/node_modules/lodash/_baseOrderBy.js.map +1 -1
- package/dist/node_modules/lodash/_baseProperty.js +1 -2
- package/dist/node_modules/lodash/_baseProperty.js.map +1 -1
- package/dist/node_modules/lodash/_basePropertyDeep.js +1 -2
- package/dist/node_modules/lodash/_basePropertyDeep.js.map +1 -1
- package/dist/node_modules/lodash/_baseRange.js +1 -2
- package/dist/node_modules/lodash/_baseRange.js.map +1 -1
- package/dist/node_modules/lodash/_baseRest.js +1 -2
- package/dist/node_modules/lodash/_baseRest.js.map +1 -1
- package/dist/node_modules/lodash/_baseSetToString.js +5 -6
- package/dist/node_modules/lodash/_baseSetToString.js.map +1 -1
- package/dist/node_modules/lodash/_baseSlice.js +1 -2
- package/dist/node_modules/lodash/_baseSlice.js.map +1 -1
- package/dist/node_modules/lodash/_baseSome.js +1 -2
- package/dist/node_modules/lodash/_baseSome.js.map +1 -1
- package/dist/node_modules/lodash/_baseSortBy.js +1 -2
- package/dist/node_modules/lodash/_baseSortBy.js.map +1 -1
- package/dist/node_modules/lodash/_baseTimes.js +1 -2
- package/dist/node_modules/lodash/_baseTimes.js.map +1 -1
- package/dist/node_modules/lodash/_baseToString.js +6 -7
- package/dist/node_modules/lodash/_baseToString.js.map +1 -1
- package/dist/node_modules/lodash/_baseTrim.js +1 -2
- package/dist/node_modules/lodash/_baseTrim.js.map +1 -1
- package/dist/node_modules/lodash/_baseUnary.js +1 -2
- package/dist/node_modules/lodash/_baseUnary.js.map +1 -1
- package/dist/node_modules/lodash/_baseUniq.js +7 -8
- package/dist/node_modules/lodash/_baseUniq.js.map +1 -1
- package/dist/node_modules/lodash/_cacheHas.js +1 -2
- package/dist/node_modules/lodash/_cacheHas.js.map +1 -1
- package/dist/node_modules/lodash/_castPath.js +1 -2
- package/dist/node_modules/lodash/_castPath.js.map +1 -1
- package/dist/node_modules/lodash/_castSlice.js +1 -2
- package/dist/node_modules/lodash/_castSlice.js.map +1 -1
- package/dist/node_modules/lodash/_compareAscending.js +1 -2
- package/dist/node_modules/lodash/_compareAscending.js.map +1 -1
- package/dist/node_modules/lodash/_compareMultiple.js +1 -2
- package/dist/node_modules/lodash/_compareMultiple.js.map +1 -1
- package/dist/node_modules/lodash/_coreJsData.js +1 -2
- package/dist/node_modules/lodash/_coreJsData.js.map +1 -1
- package/dist/node_modules/lodash/_createBaseEach.js +1 -2
- package/dist/node_modules/lodash/_createBaseEach.js.map +1 -1
- package/dist/node_modules/lodash/_createBaseFor.js +1 -2
- package/dist/node_modules/lodash/_createBaseFor.js.map +1 -1
- package/dist/node_modules/lodash/_createCaseFirst.js +6 -7
- package/dist/node_modules/lodash/_createCaseFirst.js.map +1 -1
- package/dist/node_modules/lodash/_createFind.js +5 -6
- package/dist/node_modules/lodash/_createFind.js.map +1 -1
- package/dist/node_modules/lodash/_createRange.js +4 -5
- package/dist/node_modules/lodash/_createRange.js.map +1 -1
- package/dist/node_modules/lodash/_createSet.js +6 -7
- package/dist/node_modules/lodash/_createSet.js.map +1 -1
- package/dist/node_modules/lodash/_defineProperty.js +1 -2
- package/dist/node_modules/lodash/_defineProperty.js.map +1 -1
- package/dist/node_modules/lodash/_equalArrays.js +1 -2
- package/dist/node_modules/lodash/_equalArrays.js.map +1 -1
- package/dist/node_modules/lodash/_equalByTag.js +5 -6
- package/dist/node_modules/lodash/_equalByTag.js.map +1 -1
- package/dist/node_modules/lodash/_equalObjects.js +1 -2
- package/dist/node_modules/lodash/_equalObjects.js.map +1 -1
- package/dist/node_modules/lodash/_freeGlobal.js +1 -2
- package/dist/node_modules/lodash/_freeGlobal.js.map +1 -1
- package/dist/node_modules/lodash/_getAllKeys.js +1 -2
- package/dist/node_modules/lodash/_getAllKeys.js.map +1 -1
- package/dist/node_modules/lodash/_getMapData.js +1 -2
- package/dist/node_modules/lodash/_getMapData.js.map +1 -1
- package/dist/node_modules/lodash/_getMatchData.js +4 -5
- package/dist/node_modules/lodash/_getMatchData.js.map +1 -1
- package/dist/node_modules/lodash/_getNative.js +1 -2
- package/dist/node_modules/lodash/_getNative.js.map +1 -1
- package/dist/node_modules/lodash/_getPrototype.js +1 -2
- package/dist/node_modules/lodash/_getPrototype.js.map +1 -1
- package/dist/node_modules/lodash/_getRawTag.js +1 -2
- package/dist/node_modules/lodash/_getRawTag.js.map +1 -1
- package/dist/node_modules/lodash/_getSymbols.js +1 -2
- package/dist/node_modules/lodash/_getSymbols.js.map +1 -1
- package/dist/node_modules/lodash/_getTag.js +9 -10
- package/dist/node_modules/lodash/_getTag.js.map +1 -1
- package/dist/node_modules/lodash/_getValue.js +1 -2
- package/dist/node_modules/lodash/_getValue.js.map +1 -1
- package/dist/node_modules/lodash/_hasPath.js +8 -9
- package/dist/node_modules/lodash/_hasPath.js.map +1 -1
- package/dist/node_modules/lodash/_hasUnicode.js +1 -2
- package/dist/node_modules/lodash/_hasUnicode.js.map +1 -1
- package/dist/node_modules/lodash/_hashClear.js +1 -2
- package/dist/node_modules/lodash/_hashClear.js.map +1 -1
- package/dist/node_modules/lodash/_hashDelete.js +1 -2
- package/dist/node_modules/lodash/_hashDelete.js.map +1 -1
- package/dist/node_modules/lodash/_hashGet.js +1 -2
- package/dist/node_modules/lodash/_hashGet.js.map +1 -1
- package/dist/node_modules/lodash/_hashHas.js +1 -2
- package/dist/node_modules/lodash/_hashHas.js.map +1 -1
- package/dist/node_modules/lodash/_hashSet.js +1 -2
- package/dist/node_modules/lodash/_hashSet.js.map +1 -1
- package/dist/node_modules/lodash/_isFlattenable.js +5 -6
- package/dist/node_modules/lodash/_isFlattenable.js.map +1 -1
- package/dist/node_modules/lodash/_isIndex.js +6 -7
- package/dist/node_modules/lodash/_isIndex.js.map +1 -1
- package/dist/node_modules/lodash/_isIterateeCall.js +5 -6
- package/dist/node_modules/lodash/_isIterateeCall.js.map +1 -1
- package/dist/node_modules/lodash/_isKey.js +1 -2
- package/dist/node_modules/lodash/_isKey.js.map +1 -1
- package/dist/node_modules/lodash/_isKeyable.js +1 -2
- package/dist/node_modules/lodash/_isKeyable.js.map +1 -1
- package/dist/node_modules/lodash/_isMasked.js +1 -2
- package/dist/node_modules/lodash/_isMasked.js.map +1 -1
- package/dist/node_modules/lodash/_isPrototype.js +1 -2
- package/dist/node_modules/lodash/_isPrototype.js.map +1 -1
- package/dist/node_modules/lodash/_isStrictComparable.js +1 -2
- package/dist/node_modules/lodash/_isStrictComparable.js.map +1 -1
- package/dist/node_modules/lodash/_listCacheClear.js +1 -2
- package/dist/node_modules/lodash/_listCacheClear.js.map +1 -1
- package/dist/node_modules/lodash/_listCacheDelete.js +1 -2
- package/dist/node_modules/lodash/_listCacheDelete.js.map +1 -1
- package/dist/node_modules/lodash/_listCacheGet.js +1 -2
- package/dist/node_modules/lodash/_listCacheGet.js.map +1 -1
- package/dist/node_modules/lodash/_listCacheHas.js +1 -2
- package/dist/node_modules/lodash/_listCacheHas.js.map +1 -1
- package/dist/node_modules/lodash/_listCacheSet.js +1 -2
- package/dist/node_modules/lodash/_listCacheSet.js.map +1 -1
- package/dist/node_modules/lodash/_mapCacheClear.js +1 -2
- package/dist/node_modules/lodash/_mapCacheClear.js.map +1 -1
- package/dist/node_modules/lodash/_mapCacheDelete.js +1 -2
- package/dist/node_modules/lodash/_mapCacheDelete.js.map +1 -1
- package/dist/node_modules/lodash/_mapCacheGet.js +1 -2
- package/dist/node_modules/lodash/_mapCacheGet.js.map +1 -1
- package/dist/node_modules/lodash/_mapCacheHas.js +1 -2
- package/dist/node_modules/lodash/_mapCacheHas.js.map +1 -1
- package/dist/node_modules/lodash/_mapCacheSet.js +1 -2
- package/dist/node_modules/lodash/_mapCacheSet.js.map +1 -1
- package/dist/node_modules/lodash/_mapToArray.js +1 -2
- package/dist/node_modules/lodash/_mapToArray.js.map +1 -1
- package/dist/node_modules/lodash/_matchesStrictComparable.js +2 -3
- package/dist/node_modules/lodash/_matchesStrictComparable.js.map +1 -1
- package/dist/node_modules/lodash/_memoizeCapped.js +1 -2
- package/dist/node_modules/lodash/_memoizeCapped.js.map +1 -1
- package/dist/node_modules/lodash/_nativeCreate.js +1 -2
- package/dist/node_modules/lodash/_nativeCreate.js.map +1 -1
- package/dist/node_modules/lodash/_nativeKeys.js +1 -2
- package/dist/node_modules/lodash/_nativeKeys.js.map +1 -1
- package/dist/node_modules/lodash/_nodeUtil.js +1 -2
- package/dist/node_modules/lodash/_nodeUtil.js.map +1 -1
- package/dist/node_modules/lodash/_objectToString.js +1 -2
- package/dist/node_modules/lodash/_objectToString.js.map +1 -1
- package/dist/node_modules/lodash/_overArg.js +1 -2
- package/dist/node_modules/lodash/_overArg.js.map +1 -1
- package/dist/node_modules/lodash/_overRest.js +1 -2
- package/dist/node_modules/lodash/_overRest.js.map +1 -1
- package/dist/node_modules/lodash/_root.js +1 -2
- package/dist/node_modules/lodash/_root.js.map +1 -1
- package/dist/node_modules/lodash/_setCacheAdd.js +4 -6
- package/dist/node_modules/lodash/_setCacheAdd.js.map +1 -1
- package/dist/node_modules/lodash/_setCacheHas.js +1 -2
- package/dist/node_modules/lodash/_setCacheHas.js.map +1 -1
- package/dist/node_modules/lodash/_setToArray.js +1 -2
- package/dist/node_modules/lodash/_setToArray.js.map +1 -1
- package/dist/node_modules/lodash/_setToString.js +1 -2
- package/dist/node_modules/lodash/_setToString.js.map +1 -1
- package/dist/node_modules/lodash/_shortOut.js +8 -9
- package/dist/node_modules/lodash/_shortOut.js.map +1 -1
- package/dist/node_modules/lodash/_stackClear.js +1 -2
- package/dist/node_modules/lodash/_stackClear.js.map +1 -1
- package/dist/node_modules/lodash/_stackDelete.js +1 -2
- package/dist/node_modules/lodash/_stackDelete.js.map +1 -1
- package/dist/node_modules/lodash/_stackGet.js +1 -2
- package/dist/node_modules/lodash/_stackGet.js.map +1 -1
- package/dist/node_modules/lodash/_stackHas.js +1 -2
- package/dist/node_modules/lodash/_stackHas.js.map +1 -1
- package/dist/node_modules/lodash/_stackSet.js +1 -2
- package/dist/node_modules/lodash/_stackSet.js.map +1 -1
- package/dist/node_modules/lodash/_strictIndexOf.js +1 -2
- package/dist/node_modules/lodash/_strictIndexOf.js.map +1 -1
- package/dist/node_modules/lodash/_stringToArray.js +4 -5
- package/dist/node_modules/lodash/_stringToArray.js.map +1 -1
- package/dist/node_modules/lodash/_stringToPath.js +1 -2
- package/dist/node_modules/lodash/_stringToPath.js.map +1 -1
- package/dist/node_modules/lodash/_toKey.js +2 -3
- package/dist/node_modules/lodash/_toKey.js.map +1 -1
- package/dist/node_modules/lodash/_toSource.js +1 -2
- package/dist/node_modules/lodash/_toSource.js.map +1 -1
- package/dist/node_modules/lodash/_trimmedEndIndex.js +1 -2
- package/dist/node_modules/lodash/_trimmedEndIndex.js.map +1 -1
- package/dist/node_modules/lodash/_unicodeToArray.js +1 -2
- package/dist/node_modules/lodash/_unicodeToArray.js.map +1 -1
- package/dist/node_modules/lodash/constant.js +1 -2
- package/dist/node_modules/lodash/constant.js.map +1 -1
- package/dist/node_modules/lodash/debounce.js +1 -2
- package/dist/node_modules/lodash/debounce.js.map +1 -1
- package/dist/node_modules/lodash/eq.js +1 -2
- package/dist/node_modules/lodash/eq.js.map +1 -1
- package/dist/node_modules/lodash/every.js +7 -8
- package/dist/node_modules/lodash/every.js.map +1 -1
- package/dist/node_modules/lodash/find.js +1 -2
- package/dist/node_modules/lodash/find.js.map +1 -1
- package/dist/node_modules/lodash/findIndex.js +4 -5
- package/dist/node_modules/lodash/findIndex.js.map +1 -1
- package/dist/node_modules/lodash/flatMap.js +1 -2
- package/dist/node_modules/lodash/flatMap.js.map +1 -1
- package/dist/node_modules/lodash/get.js +1 -2
- package/dist/node_modules/lodash/get.js.map +1 -1
- package/dist/node_modules/lodash/hasIn.js +1 -2
- package/dist/node_modules/lodash/hasIn.js.map +1 -1
- package/dist/node_modules/lodash/identity.js +1 -2
- package/dist/node_modules/lodash/identity.js.map +1 -1
- package/dist/node_modules/lodash/isArguments.js +4 -5
- package/dist/node_modules/lodash/isArguments.js.map +1 -1
- package/dist/node_modules/lodash/isArray.js +1 -2
- package/dist/node_modules/lodash/isArray.js.map +1 -1
- package/dist/node_modules/lodash/isArrayLike.js +1 -2
- package/dist/node_modules/lodash/isArrayLike.js.map +1 -1
- package/dist/node_modules/lodash/isBoolean.js +1 -2
- package/dist/node_modules/lodash/isBoolean.js.map +1 -1
- package/dist/node_modules/lodash/isBuffer.js +1 -2
- package/dist/node_modules/lodash/isBuffer.js.map +1 -1
- package/dist/node_modules/lodash/isEqual.js +1 -2
- package/dist/node_modules/lodash/isEqual.js.map +1 -1
- package/dist/node_modules/lodash/isFunction.js +1 -2
- package/dist/node_modules/lodash/isFunction.js.map +1 -1
- package/dist/node_modules/lodash/isLength.js +4 -6
- package/dist/node_modules/lodash/isLength.js.map +1 -1
- package/dist/node_modules/lodash/isNaN.js +1 -2
- package/dist/node_modules/lodash/isNaN.js.map +1 -1
- package/dist/node_modules/lodash/isNil.js +1 -2
- package/dist/node_modules/lodash/isNil.js.map +1 -1
- package/dist/node_modules/lodash/isNumber.js +1 -2
- package/dist/node_modules/lodash/isNumber.js.map +1 -1
- package/dist/node_modules/lodash/isObject.js +1 -2
- package/dist/node_modules/lodash/isObject.js.map +1 -1
- package/dist/node_modules/lodash/isObjectLike.js +1 -2
- package/dist/node_modules/lodash/isObjectLike.js.map +1 -1
- package/dist/node_modules/lodash/isPlainObject.js +4 -5
- package/dist/node_modules/lodash/isPlainObject.js.map +1 -1
- package/dist/node_modules/lodash/isString.js +4 -5
- package/dist/node_modules/lodash/isString.js.map +1 -1
- package/dist/node_modules/lodash/isSymbol.js +1 -2
- package/dist/node_modules/lodash/isSymbol.js.map +1 -1
- package/dist/node_modules/lodash/isTypedArray.js +1 -2
- package/dist/node_modules/lodash/isTypedArray.js.map +1 -1
- package/dist/node_modules/lodash/keys.js +1 -2
- package/dist/node_modules/lodash/keys.js.map +1 -1
- package/dist/node_modules/lodash/last.js +1 -2
- package/dist/node_modules/lodash/last.js.map +1 -1
- package/dist/node_modules/lodash/map.js +6 -7
- package/dist/node_modules/lodash/map.js.map +1 -1
- package/dist/node_modules/lodash/mapValues.js +4 -5
- package/dist/node_modules/lodash/mapValues.js.map +1 -1
- package/dist/node_modules/lodash/max.js +5 -6
- package/dist/node_modules/lodash/max.js.map +1 -1
- package/dist/node_modules/lodash/maxBy.js +5 -6
- package/dist/node_modules/lodash/maxBy.js.map +1 -1
- package/dist/node_modules/lodash/memoize.js +1 -2
- package/dist/node_modules/lodash/memoize.js.map +1 -1
- package/dist/node_modules/lodash/min.js +5 -6
- package/dist/node_modules/lodash/min.js.map +1 -1
- package/dist/node_modules/lodash/minBy.js +4 -5
- package/dist/node_modules/lodash/minBy.js.map +1 -1
- package/dist/node_modules/lodash/noop.js +1 -2
- package/dist/node_modules/lodash/noop.js.map +1 -1
- package/dist/node_modules/lodash/now.js +1 -2
- package/dist/node_modules/lodash/now.js.map +1 -1
- package/dist/node_modules/lodash/property.js +6 -7
- package/dist/node_modules/lodash/property.js.map +1 -1
- package/dist/node_modules/lodash/range.js +1 -2
- package/dist/node_modules/lodash/range.js.map +1 -1
- package/dist/node_modules/lodash/some.js +7 -8
- package/dist/node_modules/lodash/some.js.map +1 -1
- package/dist/node_modules/lodash/sortBy.js +1 -2
- package/dist/node_modules/lodash/sortBy.js.map +1 -1
- package/dist/node_modules/lodash/stubArray.js +1 -2
- package/dist/node_modules/lodash/stubArray.js.map +1 -1
- package/dist/node_modules/lodash/stubFalse.js +1 -2
- package/dist/node_modules/lodash/stubFalse.js.map +1 -1
- package/dist/node_modules/lodash/throttle.js +4 -5
- package/dist/node_modules/lodash/throttle.js.map +1 -1
- package/dist/node_modules/lodash/toFinite.js +2 -3
- package/dist/node_modules/lodash/toFinite.js.map +1 -1
- package/dist/node_modules/lodash/toInteger.js +1 -2
- package/dist/node_modules/lodash/toInteger.js.map +1 -1
- package/dist/node_modules/lodash/toNumber.js +4 -5
- package/dist/node_modules/lodash/toNumber.js.map +1 -1
- package/dist/node_modules/lodash/toString.js +1 -2
- package/dist/node_modules/lodash/toString.js.map +1 -1
- package/dist/node_modules/lodash/uniqBy.js +1 -2
- package/dist/node_modules/lodash/uniqBy.js.map +1 -1
- package/dist/node_modules/lodash/upperFirst.js +1 -2
- package/dist/node_modules/lodash/upperFirst.js.map +1 -1
- package/dist/node_modules/object-assign/index.js +1 -2
- package/dist/node_modules/object-assign/index.js.map +1 -1
- package/dist/node_modules/prop-types/checkPropTypes.js +1 -2
- package/dist/node_modules/prop-types/checkPropTypes.js.map +1 -1
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js +1 -2
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js.map +1 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +3 -3
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -1
- package/dist/node_modules/prop-types/index.js +1 -2
- package/dist/node_modules/prop-types/index.js.map +1 -1
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +1 -2
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +1 -1
- package/dist/node_modules/prop-types/lib/has.js +1 -2
- package/dist/node_modules/prop-types/lib/has.js.map +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +1 -2
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js.map +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +1 -2
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +2 -3
- package/dist/node_modules/prop-types/node_modules/react-is/index.js.map +1 -1
- package/dist/node_modules/react-is/cjs/react-is.development.js +31 -32
- package/dist/node_modules/react-is/cjs/react-is.development.js.map +1 -1
- package/dist/node_modules/react-is/cjs/react-is.production.min.js +1 -2
- package/dist/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
- package/dist/node_modules/react-is/index.js +2 -3
- package/dist/node_modules/react-is/index.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/Animate.js +33 -41
- package/dist/node_modules/react-smooth/es6/Animate.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/AnimateManager.js +2 -5
- package/dist/node_modules/react-smooth/es6/AnimateManager.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/configUpdate.js +1 -2
- package/dist/node_modules/react-smooth/es6/configUpdate.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/easing.js +1 -2
- package/dist/node_modules/react-smooth/es6/easing.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/index.js +1 -2
- package/dist/node_modules/react-smooth/es6/index.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/setRafTimeout.js +1 -2
- package/dist/node_modules/react-smooth/es6/setRafTimeout.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/util.js +17 -16
- package/dist/node_modules/react-smooth/es6/util.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/Area.js +99 -100
- package/dist/node_modules/recharts/es6/cartesian/Area.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/Bar.js +103 -104
- package/dist/node_modules/recharts/es6/cartesian/Bar.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/Brush.js +35 -36
- package/dist/node_modules/recharts/es6/cartesian/Brush.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/CartesianAxis.js +60 -67
- package/dist/node_modules/recharts/es6/cartesian/CartesianAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js +20 -21
- package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js +29 -30
- package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js +23 -24
- package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js +31 -32
- package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/XAxis.js +10 -11
- package/dist/node_modules/recharts/es6/cartesian/XAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/YAxis.js +10 -11
- package/dist/node_modules/recharts/es6/cartesian/YAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/getEquidistantTicks.js +5 -6
- package/dist/node_modules/recharts/es6/cartesian/getEquidistantTicks.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/getTicks.js +7 -8
- package/dist/node_modules/recharts/es6/cartesian/getTicks.js.map +1 -1
- package/dist/node_modules/recharts/es6/chart/AccessibilityManager.js +2 -5
- package/dist/node_modules/recharts/es6/chart/AccessibilityManager.js.map +1 -1
- package/dist/node_modules/recharts/es6/chart/AreaChart.js +5 -6
- package/dist/node_modules/recharts/es6/chart/AreaChart.js.map +1 -1
- package/dist/node_modules/recharts/es6/chart/BarChart.js +7 -8
- package/dist/node_modules/recharts/es6/chart/BarChart.js.map +1 -1
- package/dist/node_modules/recharts/es6/chart/PieChart.js +11 -12
- package/dist/node_modules/recharts/es6/chart/PieChart.js.map +1 -1
- package/dist/node_modules/recharts/es6/chart/generateCategoricalChart.js +534 -533
- package/dist/node_modules/recharts/es6/chart/generateCategoricalChart.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/Cell.js +1 -2
- package/dist/node_modules/recharts/es6/component/Cell.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/Cursor.js +17 -18
- package/dist/node_modules/recharts/es6/component/Cursor.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js +35 -36
- package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/DefaultTooltipContent.js +16 -17
- package/dist/node_modules/recharts/es6/component/DefaultTooltipContent.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/Label.js +85 -86
- package/dist/node_modules/recharts/es6/component/Label.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/LabelList.js +20 -21
- package/dist/node_modules/recharts/es6/component/LabelList.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/Legend.js +26 -23
- package/dist/node_modules/recharts/es6/component/Legend.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js +16 -17
- package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/Text.js +18 -21
- package/dist/node_modules/recharts/es6/component/Text.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/Tooltip.js +16 -17
- package/dist/node_modules/recharts/es6/component/Tooltip.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/TooltipBoundingBox.js +3 -4
- package/dist/node_modules/recharts/es6/component/TooltipBoundingBox.js.map +1 -1
- package/dist/node_modules/recharts/es6/container/Layer.js +5 -6
- package/dist/node_modules/recharts/es6/container/Layer.js.map +1 -1
- package/dist/node_modules/recharts/es6/container/Surface.js +5 -6
- package/dist/node_modules/recharts/es6/container/Surface.js.map +1 -1
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +7 -8
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js.map +1 -1
- package/dist/node_modules/recharts/es6/polar/Pie.js +103 -107
- package/dist/node_modules/recharts/es6/polar/Pie.js.map +1 -1
- package/dist/node_modules/recharts/es6/polar/PolarAngleAxis.js +30 -31
- package/dist/node_modules/recharts/es6/polar/PolarAngleAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/polar/PolarRadiusAxis.js +38 -41
- package/dist/node_modules/recharts/es6/polar/PolarRadiusAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Cross.js +4 -5
- package/dist/node_modules/recharts/es6/shape/Cross.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Curve.js +51 -52
- package/dist/node_modules/recharts/es6/shape/Curve.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Dot.js +3 -4
- package/dist/node_modules/recharts/es6/shape/Dot.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Polygon.js +7 -8
- package/dist/node_modules/recharts/es6/shape/Polygon.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Rectangle.js +8 -9
- package/dist/node_modules/recharts/es6/shape/Rectangle.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Sector.js +33 -34
- package/dist/node_modules/recharts/es6/shape/Sector.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Symbols.js +33 -34
- package/dist/node_modules/recharts/es6/shape/Symbols.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Trapezoid.js +8 -9
- package/dist/node_modules/recharts/es6/shape/Trapezoid.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js +24 -25
- package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/BarUtils.js +10 -11
- package/dist/node_modules/recharts/es6/util/BarUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/CartesianUtils.js +33 -34
- package/dist/node_modules/recharts/es6/util/CartesianUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ChartUtils.js +236 -235
- package/dist/node_modules/recharts/es6/util/ChartUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/CssPrefixUtils.js +1 -2
- package/dist/node_modules/recharts/es6/util/CssPrefixUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/DOMUtils.js +1 -2
- package/dist/node_modules/recharts/es6/util/DOMUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/DataUtils.js +7 -8
- package/dist/node_modules/recharts/es6/util/DataUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/DetectReferenceElementsDomain.js +20 -21
- package/dist/node_modules/recharts/es6/util/DetectReferenceElementsDomain.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/Events.js +0 -1
- package/dist/node_modules/recharts/es6/util/Events.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/Global.js +0 -1
- package/dist/node_modules/recharts/es6/util/Global.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/IfOverflowMatches.js +1 -2
- package/dist/node_modules/recharts/es6/util/IfOverflowMatches.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/LogUtils.js +9 -8
- package/dist/node_modules/recharts/es6/util/LogUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/PolarUtils.js +6 -7
- package/dist/node_modules/recharts/es6/util/PolarUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +11 -12
- package/dist/node_modules/recharts/es6/util/ReactUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ReduceCSSCalc.js +5 -6
- package/dist/node_modules/recharts/es6/util/ReduceCSSCalc.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ShallowEqual.js +1 -2
- package/dist/node_modules/recharts/es6/util/ShallowEqual.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/TickUtils.js +4 -4
- package/dist/node_modules/recharts/es6/util/TickUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/calculateViewBox.js +0 -1
- package/dist/node_modules/recharts/es6/util/calculateViewBox.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/cursor/getCursorPoints.js +7 -6
- package/dist/node_modules/recharts/es6/util/cursor/getCursorPoints.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/cursor/getCursorRectangle.js +1 -2
- package/dist/node_modules/recharts/es6/util/cursor/getCursorRectangle.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/cursor/getRadialCursorPoints.js +1 -2
- package/dist/node_modules/recharts/es6/util/cursor/getRadialCursorPoints.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/getEveryNthWithCondition.js +1 -2
- package/dist/node_modules/recharts/es6/util/getEveryNthWithCondition.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/getLegendProps.js +9 -10
- package/dist/node_modules/recharts/es6/util/getLegendProps.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/isDomainSpecifiedByUser.js +1 -2
- package/dist/node_modules/recharts/es6/util/isDomainSpecifiedByUser.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/payload/getUniqPayload.js +4 -5
- package/dist/node_modules/recharts/es6/util/payload/getUniqPayload.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/tooltip/translate.js +3 -4
- package/dist/node_modules/recharts/es6/util/tooltip/translate.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/types.js +2 -3
- package/dist/node_modules/recharts/es6/util/types.js.map +1 -1
- package/dist/node_modules/recharts-scale/es6/getNiceTickValues.js +2 -3
- package/dist/node_modules/recharts-scale/es6/getNiceTickValues.js.map +1 -1
- package/dist/node_modules/recharts-scale/es6/index.js +1 -1
- package/dist/node_modules/recharts-scale/es6/util/arithmetic.js +1 -2
- package/dist/node_modules/recharts-scale/es6/util/arithmetic.js.map +1 -1
- package/dist/node_modules/recharts-scale/es6/util/utils.js +3 -4
- package/dist/node_modules/recharts-scale/es6/util/utils.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +2 -3
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/Scheduler.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/Scheduler.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +13 -14
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +20 -17
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js +3 -4
- package/dist/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js +12 -13
- package/dist/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js +17 -18
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js +12 -14
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/asap.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/asap.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/Immediate.js +2 -3
- package/dist/node_modules/rxjs/dist/esm5/internal/util/Immediate.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +3 -6
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/lift.js +2 -3
- package/dist/node_modules/rxjs/dist/esm5/internal/util/lift.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -1
- package/dist/node_modules/sonner/dist/index.js +75 -69
- package/dist/node_modules/sonner/dist/index.js.map +1 -1
- package/dist/node_modules/tiny-invariant/dist/esm/tiny-invariant.js +2 -3
- package/dist/node_modules/tiny-invariant/dist/esm/tiny-invariant.js.map +1 -1
- package/dist/node_modules/tslib/tslib.es6.js +1 -2
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/node_modules/victory-vendor/es/d3-scale.js +2 -3
- package/dist/node_modules/victory-vendor/es/d3-scale.js.map +1 -1
- package/dist/services/createSandboxAssistantTransport.js +1 -2
- package/dist/services/createSandboxAssistantTransport.js.map +1 -1
- package/dist/shared/hooks/useTr.js +1 -2
- package/dist/shared/hooks/useTr.js.map +1 -1
- package/dist/utils/pageContext.js +3 -4
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +29 -16
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getGraphqlWsClient as e, reportShellError as t } from "../utils/shellBridge.js";
|
|
2
2
|
import { useEffect as n, useMemo as r, useRef as i } from "react";
|
|
3
|
-
|
|
3
|
+
// src/eventfullymanaged/hooks/useEvmSubscription.ts
|
|
4
4
|
function a(e) {
|
|
5
5
|
let t = (e instanceof Error ? e.message : typeof e == "string" ? e : e?.message ?? "").toLowerCase();
|
|
6
6
|
return t.includes("cannot query field") || t.includes("unknown field") || t.includes("subscription not supported") || t.includes("not implemented");
|
|
@@ -13,7 +13,9 @@ function o({ query: o, variables: s, operationName: c, onData: l, pollFn: u, pol
|
|
|
13
13
|
l,
|
|
14
14
|
u,
|
|
15
15
|
s
|
|
16
|
-
])
|
|
16
|
+
]);
|
|
17
|
+
let g = r(() => JSON.stringify(s ?? {}), [s]);
|
|
18
|
+
n(() => {
|
|
17
19
|
if (!f) return;
|
|
18
20
|
let n = e(), r = null, i = null, s = !1, l = () => {
|
|
19
21
|
r ||= (Promise.resolve(m.current()).catch(() => {}), setInterval(() => {
|
|
@@ -49,9 +51,7 @@ function o({ query: o, variables: s, operationName: c, onData: l, pollFn: u, pol
|
|
|
49
51
|
errors: e.errors
|
|
50
52
|
}
|
|
51
53
|
}, `[eventfullymanaged] subscription ${c} errors`);
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
if (e?.data) try {
|
|
54
|
+
} else if (e?.data) try {
|
|
55
55
|
p.current(e.data);
|
|
56
56
|
} catch (e) {
|
|
57
57
|
t(e, {
|
|
@@ -65,11 +65,7 @@ function o({ query: o, variables: s, operationName: c, onData: l, pollFn: u, pol
|
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
error: (e) => {
|
|
68
|
-
|
|
69
|
-
l();
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
t(e, {
|
|
68
|
+
a(e) || t(e, {
|
|
73
69
|
module: "eventfullymanaged",
|
|
74
70
|
context: {
|
|
75
71
|
operationName: c,
|
|
@@ -100,11 +96,10 @@ function o({ query: o, variables: s, operationName: c, onData: l, pollFn: u, pol
|
|
|
100
96
|
f,
|
|
101
97
|
o,
|
|
102
98
|
c,
|
|
103
|
-
|
|
99
|
+
g,
|
|
104
100
|
d
|
|
105
101
|
]);
|
|
106
102
|
}
|
|
107
|
-
//#endregion
|
|
108
103
|
export { o as useEvmSubscription };
|
|
109
104
|
|
|
110
105
|
//# sourceMappingURL=useEvmSubscription.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEvmSubscription.js","names":[],"sources":["../../../src/eventfullymanaged/hooks/useEvmSubscription.ts"],"sourcesContent":["/**\n * useEvmSubscription (BOFF-4318)\n *\n * Defensive subscription wrapper for the EventfullyManaged live surfaces\n * (`eventfullyManagedVirtualSignal`, `eventfullyManagedVirtualParticipantsChanged`).\n * Probes the shell-provided graphql-ws client\n * (`globalThis.__burdenoffShell.graphqlWsClient`); if present, opens a\n * subscription over the real WS transport and dispatches each payload to\n * `onData`. If absent — or if the subscription errors with a clear\n * \"unknown field\"/\"not implemented\" signal (the operation isn't on the\n * federated gateway yet, e.g. before this ticket's backend deploy has\n * reconciled) — falls back to a polling loop driven by the caller's\n * `pollFn` at `pollIntervalMs`, so the page never breaks, only degrades.\n *\n * Ported from `microfe-comradecircle/src/comradecircle/hooks/useComSubscription.ts`\n * (BOFF-4455's reference defensive-subscription pattern), generic type\n * unchanged.\n */\nimport { useEffect, useMemo, useRef } from 'react';\n\nimport { getGraphqlWsClient, reportShellError } from '../utils/shellBridge';\n\nexport interface UseEvmSubscriptionArgs<TData> {\n /** GraphQL subscription document (string SDL). */\n query: string;\n /** Variables for the subscription. */\n variables?: Record<string, unknown>;\n /** Stable identifier for this subscription, used in error context. */\n operationName: string;\n /** Called for each payload received from the subscription. */\n onData: (data: TData) => void;\n /** Polling fallback invoked when subscription is unavailable / failed. */\n pollFn: () => Promise<void> | void;\n /** Polling interval in ms (default 5s — signaling/roster is latency-sensitive). */\n pollIntervalMs?: number;\n /** Whether to enable the hook at all. */\n enabled?: boolean;\n}\n\n/** Best-effort detector for \"subscription field not found\" errors. */\nfunction isUnknownFieldError(err: unknown): boolean {\n const msg =\n err instanceof Error\n ? err.message\n : typeof err === 'string'\n ? err\n : ((err as { message?: string } | null)?.message ?? '');\n const lower = msg.toLowerCase();\n return (\n lower.includes('cannot query field') ||\n lower.includes('unknown field') ||\n lower.includes('subscription not supported') ||\n lower.includes('not implemented')\n );\n}\n\nexport function useEvmSubscription<TData = unknown>({\n query,\n variables,\n operationName,\n onData,\n pollFn,\n pollIntervalMs = 5_000,\n enabled = true,\n}: UseEvmSubscriptionArgs<TData>): void {\n const onDataRef = useRef(onData);\n const pollFnRef = useRef(pollFn);\n const variablesRef = useRef(variables);\n useEffect(() => {\n onDataRef.current = onData;\n pollFnRef.current = pollFn;\n variablesRef.current = variables;\n }, [onData, pollFn, variables]);\n\n const variablesKey = useMemo(() => JSON.stringify(variables ?? {}), [variables]);\n\n useEffect(() => {\n if (!enabled) return;\n\n const wsClient = getGraphqlWsClient();\n let pollTimer: ReturnType<typeof setInterval> | null = null;\n let unsubSub: (() => void) | null = null;\n let cancelled = false;\n\n const startPolling = () => {\n if (pollTimer) return;\n void Promise.resolve(pollFnRef.current()).catch(() => {});\n pollTimer = setInterval(() => {\n if (cancelled) return;\n void Promise.resolve(pollFnRef.current()).catch(() => {});\n }, pollIntervalMs);\n };\n\n if (!wsClient) {\n startPolling();\n return () => {\n cancelled = true;\n if (pollTimer) clearInterval(pollTimer);\n };\n }\n\n try {\n unsubSub = wsClient.subscribe(\n { query, variables: variablesRef.current, operationName },\n {\n next: (msg) => {\n if (cancelled) return;\n if (msg?.errors && msg.errors.length > 0) {\n if (msg.errors.some(isUnknownFieldError)) {\n if (unsubSub) {\n try {\n unsubSub();\n } catch {\n /* noop */\n }\n unsubSub = null;\n }\n startPolling();\n return;\n }\n reportShellError(\n new Error(`Subscription ${operationName} returned errors`),\n { module: 'eventfullymanaged', context: { operationName, errors: msg.errors } },\n `[eventfullymanaged] subscription ${operationName} errors`\n );\n return;\n }\n if (msg?.data) {\n try {\n onDataRef.current(msg.data as TData);\n } catch (handlerErr) {\n reportShellError(\n handlerErr,\n { module: 'eventfullymanaged', context: { operationName, phase: 'handler' } },\n `[eventfullymanaged] subscription ${operationName} handler threw`\n );\n }\n }\n },\n error: (err) => {\n if (isUnknownFieldError(err)) {\n startPolling();\n return;\n }\n reportShellError(\n err,\n { module: 'eventfullymanaged', context: { operationName, phase: 'transport' } },\n `[eventfullymanaged] subscription ${operationName} transport error`\n );\n startPolling();\n },\n complete: () => {\n if (!cancelled) startPolling();\n },\n }\n );\n } catch (err) {\n reportShellError(\n err,\n { module: 'eventfullymanaged', context: { operationName, phase: 'subscribe' } },\n `[eventfullymanaged] subscription ${operationName} subscribe threw`\n );\n startPolling();\n }\n\n return () => {\n cancelled = true;\n if (unsubSub) {\n try {\n unsubSub();\n } catch {\n /* noop */\n }\n }\n if (pollTimer) clearInterval(pollTimer);\n };\n }, [enabled, query, operationName, variablesKey, pollIntervalMs]);\n}\n"],"mappings":";;;AAwCA,
|
|
1
|
+
{"version":3,"file":"useEvmSubscription.js","names":["isUnknownFieldError","lower","err","useEvmSubscription","onDataRef","useRef","onData","pollFnRef","pollFn","variablesRef","variables","variablesKey","useMemo","enabled","wsClient","getGraphqlWsClient","pollTimer","unsubSub","cancelled","startPolling","pollIntervalMs","msg","operationName","handlerErr","reportShellError","query"],"sources":["../../../src/eventfullymanaged/hooks/useEvmSubscription.ts"],"sourcesContent":["/**\n * useEvmSubscription (BOFF-4318)\n *\n * Defensive subscription wrapper for the EventfullyManaged live surfaces\n * (`eventfullyManagedVirtualSignal`, `eventfullyManagedVirtualParticipantsChanged`).\n * Probes the shell-provided graphql-ws client\n * (`globalThis.__burdenoffShell.graphqlWsClient`); if present, opens a\n * subscription over the real WS transport and dispatches each payload to\n * `onData`. If absent — or if the subscription errors with a clear\n * \"unknown field\"/\"not implemented\" signal (the operation isn't on the\n * federated gateway yet, e.g. before this ticket's backend deploy has\n * reconciled) — falls back to a polling loop driven by the caller's\n * `pollFn` at `pollIntervalMs`, so the page never breaks, only degrades.\n *\n * Ported from `microfe-comradecircle/src/comradecircle/hooks/useComSubscription.ts`\n * (BOFF-4455's reference defensive-subscription pattern), generic type\n * unchanged.\n */\nimport { useEffect, useMemo, useRef } from 'react';\n\nimport { getGraphqlWsClient, reportShellError } from '../utils/shellBridge';\n\nexport interface UseEvmSubscriptionArgs<TData> {\n /** GraphQL subscription document (string SDL). */\n query: string;\n /** Variables for the subscription. */\n variables?: Record<string, unknown>;\n /** Stable identifier for this subscription, used in error context. */\n operationName: string;\n /** Called for each payload received from the subscription. */\n onData: (data: TData) => void;\n /** Polling fallback invoked when subscription is unavailable / failed. */\n pollFn: () => Promise<void> | void;\n /** Polling interval in ms (default 5s — signaling/roster is latency-sensitive). */\n pollIntervalMs?: number;\n /** Whether to enable the hook at all. */\n enabled?: boolean;\n}\n\n/** Best-effort detector for \"subscription field not found\" errors. */\nfunction isUnknownFieldError(err: unknown): boolean {\n const msg =\n err instanceof Error\n ? err.message\n : typeof err === 'string'\n ? err\n : ((err as { message?: string } | null)?.message ?? '');\n const lower = msg.toLowerCase();\n return (\n lower.includes('cannot query field') ||\n lower.includes('unknown field') ||\n lower.includes('subscription not supported') ||\n lower.includes('not implemented')\n );\n}\n\nexport function useEvmSubscription<TData = unknown>({\n query,\n variables,\n operationName,\n onData,\n pollFn,\n pollIntervalMs = 5_000,\n enabled = true,\n}: UseEvmSubscriptionArgs<TData>): void {\n const onDataRef = useRef(onData);\n const pollFnRef = useRef(pollFn);\n const variablesRef = useRef(variables);\n useEffect(() => {\n onDataRef.current = onData;\n pollFnRef.current = pollFn;\n variablesRef.current = variables;\n }, [onData, pollFn, variables]);\n\n const variablesKey = useMemo(() => JSON.stringify(variables ?? {}), [variables]);\n\n useEffect(() => {\n if (!enabled) return;\n\n const wsClient = getGraphqlWsClient();\n let pollTimer: ReturnType<typeof setInterval> | null = null;\n let unsubSub: (() => void) | null = null;\n let cancelled = false;\n\n const startPolling = () => {\n if (pollTimer) return;\n void Promise.resolve(pollFnRef.current()).catch(() => {});\n pollTimer = setInterval(() => {\n if (cancelled) return;\n void Promise.resolve(pollFnRef.current()).catch(() => {});\n }, pollIntervalMs);\n };\n\n if (!wsClient) {\n startPolling();\n return () => {\n cancelled = true;\n if (pollTimer) clearInterval(pollTimer);\n };\n }\n\n try {\n unsubSub = wsClient.subscribe(\n { query, variables: variablesRef.current, operationName },\n {\n next: (msg) => {\n if (cancelled) return;\n if (msg?.errors && msg.errors.length > 0) {\n if (msg.errors.some(isUnknownFieldError)) {\n if (unsubSub) {\n try {\n unsubSub();\n } catch {\n /* noop */\n }\n unsubSub = null;\n }\n startPolling();\n return;\n }\n reportShellError(\n new Error(`Subscription ${operationName} returned errors`),\n { module: 'eventfullymanaged', context: { operationName, errors: msg.errors } },\n `[eventfullymanaged] subscription ${operationName} errors`\n );\n return;\n }\n if (msg?.data) {\n try {\n onDataRef.current(msg.data as TData);\n } catch (handlerErr) {\n reportShellError(\n handlerErr,\n { module: 'eventfullymanaged', context: { operationName, phase: 'handler' } },\n `[eventfullymanaged] subscription ${operationName} handler threw`\n );\n }\n }\n },\n error: (err) => {\n if (isUnknownFieldError(err)) {\n startPolling();\n return;\n }\n reportShellError(\n err,\n { module: 'eventfullymanaged', context: { operationName, phase: 'transport' } },\n `[eventfullymanaged] subscription ${operationName} transport error`\n );\n startPolling();\n },\n complete: () => {\n if (!cancelled) startPolling();\n },\n }\n );\n } catch (err) {\n reportShellError(\n err,\n { module: 'eventfullymanaged', context: { operationName, phase: 'subscribe' } },\n `[eventfullymanaged] subscription ${operationName} subscribe threw`\n );\n startPolling();\n }\n\n return () => {\n cancelled = true;\n if (unsubSub) {\n try {\n unsubSub();\n } catch {\n /* noop */\n }\n }\n if (pollTimer) clearInterval(pollTimer);\n };\n }, [enabled, query, operationName, variablesKey, pollIntervalMs]);\n}\n"],"mappings":";;;AAwCA,SAASA,EAAoB,GAAuB;CAOlD,IAAMC,KALJC,aAAe,QACXA,EAAI,UACJ,OAAOA,KAAQ,WACbA,IACEA,GAAqC,WAAW,GAAA,CACxC,YAAY;CAC9B,OACED,EAAM,SAAS,oBAAoB,KACnCA,EAAM,SAAS,eAAe,KAC9BA,EAAM,SAAS,4BAA4B,KAC3CA,EAAM,SAAS,iBAAiB;AAEpC;AAEA,SAAgBE,EAAoC,EAClD,UACA,cACA,kBACA,WACA,WACA,oBAAiB,KACjB,aAAU,MAC4B;CACtC,IAAMC,IAAYC,EAAOC,CAAM,GACzBC,IAA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qB,SAAS;SAAE;SAAe,OAAO;QAAU;OAAE,GAC5E,oCAAoCD,EAAc,eACpD;MACF;KAVF;IAYF;IACA,QAAQ,MAAQ;KACd,AAAItB,EAAoBE,CAAG,KAI3BsB,EACEtB,GACA;MAAE,QAAQ;MAAqB,SAAS;OAAE;OAAe,OAAO;MAAY;KAAE,GAC9E,oCAAoCoB,EAAc,iBACpD,GACAH,EAAa;IACf;IACA,gBAAgB;KACd,AAAKD,KAAWC,EAAa;IAC/B;GACF,CACF;EACF,SAASjB,GAAK;GAMZ,AALAsB,EACEtB,GACA;IAAE,QAAQ;IAAqB,SAAS;KAAE;KAAe,OAAO;IAAY;GAAE,GAC9E,oCAAoCoB,EAAc,iBACpD,GACAH,EAAa;EACf;EAEA,aAAa;GAEX,IADA,IAAY,IACRF,GACF,IAAI;IACF,EAAS;GACX,QAAQ,CAER;GAEF,AAAID,KAAW,cAAcA,CAAS;EACxC;CACF,GAAG;EAACH;EAASY;EAAOH;EAAeX;EAAcS;CAAc,CAAC;AAClE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { reportShellError as e } from "../utils/shellBridge.js";
|
|
2
2
|
import { useCallback as t, useEffect as n, useRef as r, useState as i } from "react";
|
|
3
|
-
|
|
3
|
+
// src/eventfullymanaged/hooks/useVirtualCall.ts
|
|
4
4
|
var a = [{ urls: "stun:stun.l.google.com:19302" }];
|
|
5
5
|
function o(e, t, n) {
|
|
6
6
|
if (n === "MEETING") return !0;
|
|
@@ -21,21 +21,16 @@ function c({ sessionId: c, selfActorId: l, mode: u, selfRole: d, participants: f
|
|
|
21
21
|
}, [p]), n(() => {
|
|
22
22
|
if (!c) return;
|
|
23
23
|
let e = !1, t = typeof navigator < "u" ? navigator : void 0;
|
|
24
|
-
if (!t?.mediaDevices?.getUserMedia)
|
|
25
|
-
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
return t.mediaDevices.getUserMedia({
|
|
24
|
+
if (!t?.mediaDevices?.getUserMedia) y("This browser does not support camera/microphone capture (getUserMedia unavailable).");
|
|
25
|
+
else return t.mediaDevices.getUserMedia({
|
|
29
26
|
audio: !0,
|
|
30
27
|
video: !0
|
|
31
28
|
}).then((t) => {
|
|
32
|
-
|
|
33
|
-
t.getTracks().forEach((e) => e.stop());
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
T.current = t, _(t), y(null);
|
|
29
|
+
e ? t.getTracks().forEach((e) => e.stop()) : (T.current = t, _(t), y(null));
|
|
37
30
|
}).catch((t) => {
|
|
38
|
-
|
|
31
|
+
if (e) return;
|
|
32
|
+
let n = t instanceof Error ? t.message : "Camera/microphone access was denied.";
|
|
33
|
+
y(n);
|
|
39
34
|
}), () => {
|
|
40
35
|
e = !0, T.current?.getTracks().forEach((e) => e.stop()), T.current = null, _(null);
|
|
41
36
|
};
|
|
@@ -193,9 +188,7 @@ function c({ sessionId: c, selfActorId: l, mode: u, selfRole: d, participants: f
|
|
|
193
188
|
if (!i || !i.remoteDescription) {
|
|
194
189
|
let e = D.current.get(n) ?? [];
|
|
195
190
|
e.push(a), D.current.set(n, e);
|
|
196
|
-
|
|
197
|
-
}
|
|
198
|
-
i.addIceCandidate(new RTCIceCandidate(a)).catch(() => {});
|
|
191
|
+
} else i.addIceCandidate(new RTCIceCandidate(a)).catch(() => {});
|
|
199
192
|
}, [
|
|
200
193
|
c,
|
|
201
194
|
l,
|
|
@@ -203,7 +196,6 @@ function c({ sessionId: c, selfActorId: l, mode: u, selfRole: d, participants: f
|
|
|
203
196
|
])
|
|
204
197
|
};
|
|
205
198
|
}
|
|
206
|
-
|
|
207
|
-
export { c as useVirtualCall };
|
|
199
|
+
export { s as isInitiator, o as shouldConnect, c as useVirtualCall };
|
|
208
200
|
|
|
209
201
|
//# sourceMappingURL=useVirtualCall.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVirtualCall.js","names":[],"sources":["../../../src/eventfullymanaged/hooks/useVirtualCall.ts"],"sourcesContent":["/* eslint-disable react-hooks/set-state-in-effect -- getUserMedia failure is detected synchronously (missing API) before the async capture path even starts; there is no external-system callback to defer into */\n/**\n * useVirtualCall (BOFF-4318)\n *\n * Real browser-native WebRTC peer-connection manager for a virtual/hybrid\n * session. Mirrors the backend's two bounded topologies\n * (`VirtualSessionService`, `wspace-eventfullymanaged-svc`):\n *\n * - MEETING (full mesh, cap `MAX_MESH_PARTICIPANTS`): connects to every\n * other active participant.\n * - WEBINAR (star, cap `MAX_WEBINAR_PARTICIPANTS`): HOST/PRESENTER peers\n * connect to every attendee AND each other; ATTENDEE peers connect only\n * to HOST/PRESENTER peers, never to each other.\n *\n * Offer/answer polarity (who calls whom) is resolved without a central\n * signaling server picking sides:\n * - In a HOST/PRESENTER↔ATTENDEE pair, the HOST/PRESENTER always initiates\n * (matches the star's broadcast direction).\n * - Otherwise (mesh peers, or two HOST/PRESENTER peers), the\n * lexicographically smaller `actorId` initiates — deterministic without\n * coordination, avoids \"glare\" (both sides sending an offer at once).\n *\n * Signaling (SDP offer/answer + ICE candidates) is relayed via the\n * `eventfullyManagedSendVirtualSignal` mutation and delivered back over the\n * `eventfullyManagedVirtualSignal` subscription (see `useEvmSubscription`).\n * WebRTC itself never talks to any Burdenoff backend for media — only a\n * public STUN server (`stun.l.google.com`) for NAT traversal, the same\n * no-paid-vendor approach documented in ComradeCircle's BOFF-4450 voice\n * core. No TURN relay is configured — peers behind symmetric NAT/strict\n * firewalls may fail to connect; that is an explicit known limitation of a\n * STUN-only bounded core, not a bug.\n */\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { reportShellError } from '../utils/shellBridge';\n\nexport type VirtualCallRole = 'HOST' | 'PRESENTER' | 'ATTENDEE';\nexport type VirtualCallSignalType = 'OFFER' | 'ANSWER' | 'ICE_CANDIDATE';\n\nexport interface VirtualCallParticipant {\n actorId: string;\n role: VirtualCallRole;\n}\n\nexport interface IncomingVirtualSignal {\n sessionId: string;\n fromActorId: string;\n toActorId: string;\n signalType: VirtualCallSignalType;\n payload: unknown;\n}\n\nexport interface UseVirtualCallArgs {\n /** Null/empty disables the hook (no active session yet). */\n sessionId: string | null | undefined;\n selfActorId: string;\n mode: 'MEETING' | 'WEBINAR';\n selfRole: VirtualCallRole | null;\n /** Full active roster, including self. */\n participants: VirtualCallParticipant[];\n sendSignal: (args: { toActorId: string; signalType: VirtualCallSignalType; payload: unknown }) => Promise<unknown>;\n muted: boolean;\n videoEnabled: boolean;\n}\n\nexport interface UseVirtualCallResult {\n /** Local camera/mic stream, once granted. Null while pending/denied. */\n localStream: MediaStream | null;\n /** Remote peer streams keyed by actorId. */\n remoteStreams: Map<string, MediaStream>;\n /** Connection state per remote peer, for UI status dots. */\n connectionStates: Map<string, RTCPeerConnectionState>;\n /** Set when getUserMedia fails (denied / no device / insecure context). */\n mediaError: string | null;\n /** Feed a signal received from the `eventfullyManagedVirtualSignal` subscription/poll. */\n handleIncomingSignal: (signal: IncomingVirtualSignal) => void;\n}\n\nconst ICE_SERVERS: RTCIceServer[] = [{ urls: 'stun:stun.l.google.com:19302' }];\n\n/** Should `a` peer with `b` at all, given the session mode and their roles? */\nexport function shouldConnect(\n a: VirtualCallParticipant,\n b: VirtualCallParticipant,\n mode: 'MEETING' | 'WEBINAR'\n): boolean {\n if (mode === 'MEETING') return true;\n const aBroadcasts = a.role === 'HOST' || a.role === 'PRESENTER';\n const bBroadcasts = b.role === 'HOST' || b.role === 'PRESENTER';\n // WEBINAR (star): attendee<->attendee pairs never connect.\n return aBroadcasts || bBroadcasts;\n}\n\n/** Does `self` initiate the offer toward `other`? */\nexport function isInitiator(\n self: VirtualCallParticipant,\n other: VirtualCallParticipant,\n mode: 'MEETING' | 'WEBINAR'\n): boolean {\n if (mode === 'WEBINAR') {\n const selfBroadcasts = self.role === 'HOST' || self.role === 'PRESENTER';\n const otherBroadcasts = other.role === 'HOST' || other.role === 'PRESENTER';\n if (selfBroadcasts !== otherBroadcasts) {\n // Broadcaster always initiates toward a plain attendee.\n return selfBroadcasts;\n }\n }\n return self.actorId < other.actorId;\n}\n\nexport function useVirtualCall({\n sessionId,\n selfActorId,\n mode,\n selfRole,\n participants,\n sendSignal,\n muted,\n videoEnabled,\n}: UseVirtualCallArgs): UseVirtualCallResult {\n const [localStream, setLocalStream] = useState<MediaStream | null>(null);\n const [mediaError, setMediaError] = useState<string | null>(null);\n const [remoteStreams, setRemoteStreams] = useState<Map<string, MediaStream>>(new Map());\n const [connectionStates, setConnectionStates] = useState<Map<string, RTCPeerConnectionState>>(new Map());\n\n const peersRef = useRef<Map<string, RTCPeerConnection>>(new Map());\n const localStreamRef = useRef<MediaStream | null>(null);\n const sendSignalRef = useRef(sendSignal);\n const pendingCandidatesRef = useRef<Map<string, RTCIceCandidateInit[]>>(new Map());\n useEffect(() => {\n sendSignalRef.current = sendSignal;\n }, [sendSignal]);\n\n // Acquire local media once a session exists.\n useEffect(() => {\n if (!sessionId) return;\n let cancelled = false;\n const nav = typeof navigator !== 'undefined' ? navigator : undefined;\n if (!nav?.mediaDevices?.getUserMedia) {\n setMediaError('This browser does not support camera/microphone capture (getUserMedia unavailable).');\n return;\n }\n nav.mediaDevices\n .getUserMedia({ audio: true, video: true })\n .then((stream) => {\n if (cancelled) {\n stream.getTracks().forEach((t) => t.stop());\n return;\n }\n localStreamRef.current = stream;\n setLocalStream(stream);\n setMediaError(null);\n })\n .catch((err: unknown) => {\n if (cancelled) return;\n const message = err instanceof Error ? err.message : 'Camera/microphone access was denied.';\n setMediaError(message);\n });\n return () => {\n cancelled = true;\n localStreamRef.current?.getTracks().forEach((t) => t.stop());\n localStreamRef.current = null;\n setLocalStream(null);\n };\n }, [sessionId]);\n\n // Reflect local mute/video toggles onto the actual media tracks.\n useEffect(() => {\n localStream?.getAudioTracks().forEach((track) => {\n track.enabled = !muted;\n });\n }, [localStream, muted]);\n useEffect(() => {\n localStream?.getVideoTracks().forEach((track) => {\n track.enabled = videoEnabled;\n });\n }, [localStream, videoEnabled]);\n\n const closePeer = useCallback((actorId: string) => {\n const pc = peersRef.current.get(actorId);\n if (pc) {\n try {\n pc.close();\n } catch {\n /* noop */\n }\n peersRef.current.delete(actorId);\n }\n pendingCandidatesRef.current.delete(actorId);\n setRemoteStreams((prev) => {\n if (!prev.has(actorId)) return prev;\n const next = new Map(prev);\n next.delete(actorId);\n return next;\n });\n setConnectionStates((prev) => {\n if (!prev.has(actorId)) return prev;\n const next = new Map(prev);\n next.delete(actorId);\n return next;\n });\n }, []);\n\n const createPeer = useCallback(\n (remote: VirtualCallParticipant): RTCPeerConnection => {\n const pc = new RTCPeerConnection({ iceServers: ICE_SERVERS });\n peersRef.current.set(remote.actorId, pc);\n\n localStreamRef.current?.getTracks().forEach((track) => {\n pc.addTrack(track, localStreamRef.current as MediaStream);\n });\n\n pc.ontrack = (event) => {\n const [stream] = event.streams;\n if (!stream) return;\n setRemoteStreams((prev) => {\n const next = new Map(prev);\n next.set(remote.actorId, stream);\n return next;\n });\n };\n\n pc.onconnectionstatechange = () => {\n setConnectionStates((prev) => {\n const next = new Map(prev);\n next.set(remote.actorId, pc.connectionState);\n return next;\n });\n if (pc.connectionState === 'failed' || pc.connectionState === 'closed') {\n closePeer(remote.actorId);\n }\n };\n\n pc.onicecandidate = (event) => {\n if (!event.candidate) return;\n void sendSignalRef\n .current({\n toActorId: remote.actorId,\n signalType: 'ICE_CANDIDATE',\n payload: event.candidate.toJSON(),\n })\n .catch((err: unknown) => {\n reportShellError(err, { module: 'eventfullymanaged', context: { phase: 'ice-candidate-send' } });\n });\n };\n\n return pc;\n },\n [closePeer]\n );\n\n const startOffer = useCallback(\n async (remote: VirtualCallParticipant) => {\n const pc = createPeer(remote);\n try {\n const offer = await pc.createOffer();\n await pc.setLocalDescription(offer);\n await sendSignalRef.current({\n toActorId: remote.actorId,\n signalType: 'OFFER',\n payload: { type: offer.type, sdp: offer.sdp },\n });\n } catch (err) {\n reportShellError(err, { module: 'eventfullymanaged', context: { phase: 'create-offer', to: remote.actorId } });\n }\n },\n [createPeer]\n );\n\n // Reconcile peer connections whenever the roster or media readiness changes.\n useEffect(() => {\n if (!sessionId || !selfRole) return;\n const self: VirtualCallParticipant = { actorId: selfActorId, role: selfRole };\n const others = participants.filter((p) => p.actorId !== selfActorId);\n const desired = new Set(others.filter((p) => shouldConnect(self, p, mode)).map((p) => p.actorId));\n\n // Drop peers no longer in the desired set (left the session).\n for (const actorId of Array.from(peersRef.current.keys())) {\n if (!desired.has(actorId)) closePeer(actorId);\n }\n\n // Only initiate once local media is ready — the offer needs tracks attached.\n if (!localStreamRef.current) return;\n\n for (const remote of others) {\n if (!desired.has(remote.actorId)) continue;\n if (peersRef.current.has(remote.actorId)) continue;\n if (isInitiator(self, remote, mode)) {\n void startOffer(remote);\n }\n // Non-initiators wait for an incoming OFFER signal (handled below);\n // no connection object is created until then.\n }\n }, [sessionId, selfActorId, selfRole, mode, participants, localStream, closePeer, startOffer]);\n\n // Full cleanup on session end / unmount.\n useEffect(() => {\n if (sessionId) return undefined;\n for (const actorId of Array.from(peersRef.current.keys())) closePeer(actorId);\n return undefined;\n }, [sessionId, closePeer]);\n useEffect(\n () => () => {\n for (const actorId of Array.from(peersRef.current.keys())) closePeer(actorId);\n },\n [closePeer]\n );\n\n const handleIncomingSignal = useCallback(\n (signal: IncomingVirtualSignal) => {\n if (signal.sessionId !== sessionId || signal.toActorId !== selfActorId) return;\n const fromActorId = signal.fromActorId;\n\n const flushPendingCandidates = (pc: RTCPeerConnection) => {\n const queued = pendingCandidatesRef.current.get(fromActorId);\n if (!queued?.length) return;\n pendingCandidatesRef.current.delete(fromActorId);\n for (const candidate of queued) {\n void pc.addIceCandidate(new RTCIceCandidate(candidate)).catch(() => {});\n }\n };\n\n if (signal.signalType === 'OFFER') {\n const remote: VirtualCallParticipant = {\n actorId: fromActorId,\n // Role is unknown from a bare signal; peer creation itself is\n // role-agnostic (RTCPeerConnection doesn't care), only the\n // *decision to connect* used role — the sender already made\n // that call by sending us an OFFER.\n role: 'ATTENDEE',\n };\n let pc = peersRef.current.get(fromActorId);\n if (!pc) pc = createPeer(remote);\n const desc = signal.payload as RTCSessionDescriptionInit;\n void pc\n .setRemoteDescription(new RTCSessionDescription(desc))\n .then(() => {\n flushPendingCandidates(pc as RTCPeerConnection);\n return (pc as RTCPeerConnection).createAnswer();\n })\n .then((answer) => (pc as RTCPeerConnection).setLocalDescription(answer).then(() => answer))\n .then((answer) =>\n sendSignalRef.current({\n toActorId: fromActorId,\n signalType: 'ANSWER',\n payload: { type: answer.type, sdp: answer.sdp },\n })\n )\n .catch((err: unknown) => {\n reportShellError(err, {\n module: 'eventfullymanaged',\n context: { phase: 'handle-offer', from: fromActorId },\n });\n });\n return;\n }\n\n if (signal.signalType === 'ANSWER') {\n const pc = peersRef.current.get(fromActorId);\n if (!pc) return;\n const desc = signal.payload as RTCSessionDescriptionInit;\n void pc\n .setRemoteDescription(new RTCSessionDescription(desc))\n .then(() => flushPendingCandidates(pc))\n .catch((err: unknown) => {\n reportShellError(err, {\n module: 'eventfullymanaged',\n context: { phase: 'handle-answer', from: fromActorId },\n });\n });\n return;\n }\n\n // ICE_CANDIDATE\n const pc = peersRef.current.get(fromActorId);\n const candidate = signal.payload as RTCIceCandidateInit;\n if (!pc || !pc.remoteDescription) {\n const queue = pendingCandidatesRef.current.get(fromActorId) ?? [];\n queue.push(candidate);\n pendingCandidatesRef.current.set(fromActorId, queue);\n return;\n }\n void pc.addIceCandidate(new RTCIceCandidate(candidate)).catch(() => {});\n },\n [sessionId, selfActorId, createPeer]\n );\n\n return { localStream, remoteStreams, connectionStates, mediaError, handleIncomingSignal };\n}\n"],"mappings":";;;AA8EA,IAAM,IAA8B,CAAC,EAAE,MAAM,gCAAgC,CAAC;AAG9E,SAAgB,EACd,GACA,GACA,GACS;AACT,KAAI,MAAS,UAAW,QAAO;CAC/B,IAAM,IAAc,EAAE,SAAS,UAAU,EAAE,SAAS,aAC9C,IAAc,EAAE,SAAS,UAAU,EAAE,SAAS;AAEpD,QAAO,KAAe;;AAIxB,SAAgB,EACd,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AK;MACpB,QAAQ;MACR,SAAS;OAAE,OAAO;OAAgB,MAAM;OAAa;MACtD,CAAC;MACF;AACJ;;AAGF,OAAI,EAAO,eAAe,UAAU;IAClC,IAAM,IAAK,EAAS,QAAQ,IAAI,EAAY;AAC5C,QAAI,CAAC,EAAI;IACT,IAAM,IAAO,EAAO;AACf,MACF,qBAAqB,IAAI,sBAAsB,EAAK,CAAC,CACrD,WAAW,EAAuB,EAAG,CAAC,CACtC,OAAO,MAAiB;AACvB,OAAiB,GAAK;MACpB,QAAQ;MACR,SAAS;OAAE,OAAO;OAAiB,MAAM;OAAa;MACvD,CAAC;MACF;AACJ;;GAIF,IAAM,IAAK,EAAS,QAAQ,IAAI,EAAY,EACtC,IAAY,EAAO;AACzB,OAAI,CAAC,KAAM,CAAC,EAAG,mBAAmB;IAChC,IAAM,IAAQ,EAAqB,QAAQ,IAAI,EAAY,IAAI,EAAE;AAEjE,IADA,EAAM,KAAK,EAAU,EACrB,EAAqB,QAAQ,IAAI,GAAa,EAAM;AACpD;;AAEG,KAAG,gBAAgB,IAAI,gBAAgB,EAAU,CAAC,CAAC,YAAY,GAAG;KAEzE;GAAC;GAAW;GAAa;GAAW,CACrC;EAEwF"}
|
|
1
|
+
{"version":3,"file":"useVirtualCall.js","names":["ICE_SERVERS","shouldConnect","mode","aBroadcasts","a","bBroadcasts","b","isInitiator","selfBroadcasts","self","other","useVirtualCall","localStream","setLocalStream","useState","mediaError","setMediaError","remoteStreams","setRemoteStreams","connectionStates","setConnectionStates","peersRef","useRef","localStreamRef","sendSignalRef","sendSignal","pendingCandidatesRef","useEffect","sessionId","cancelled","nav","stream","t","message","err","muted","videoEnabled","closePeer","useCallback","pc","actorId","prev","next","createPeer","remote","track","event","startOffer","offer","selfRole","selfActorId","others","participants","p","desired","signal","fromActorId","flushPendingCandidates","queued","candidate","desc","answer","queue"],"sources":["../../../src/eventfullymanaged/hooks/useVirtualCall.ts"],"sourcesContent":["/* eslint-disable react-hooks/set-state-in-effect -- getUserMedia failure is detected synchronously (missing API) before the async capture path even starts; there is no external-system callback to defer into */\n/**\n * useVirtualCall (BOFF-4318)\n *\n * Real browser-native WebRTC peer-connection manager for a virtual/hybrid\n * session. Mirrors the backend's two bounded topologies\n * (`VirtualSessionService`, `wspace-eventfullymanaged-svc`):\n *\n * - MEETING (full mesh, cap `MAX_MESH_PARTICIPANTS`): connects to every\n * other active participant.\n * - WEBINAR (star, cap `MAX_WEBINAR_PARTICIPANTS`): HOST/PRESENTER peers\n * connect to every attendee AND each other; ATTENDEE peers connect only\n * to HOST/PRESENTER peers, never to each other.\n *\n * Offer/answer polarity (who calls whom) is resolved without a central\n * signaling server picking sides:\n * - In a HOST/PRESENTER↔ATTENDEE pair, the HOST/PRESENTER always initiates\n * (matches the star's broadcast direction).\n * - Otherwise (mesh peers, or two HOST/PRESENTER peers), the\n * lexicographically smaller `actorId` initiates — deterministic without\n * coordination, avoids \"glare\" (both sides sending an offer at once).\n *\n * Signaling (SDP offer/answer + ICE candidates) is relayed via the\n * `eventfullyManagedSendVirtualSignal` mutation and delivered back over the\n * `eventfullyManagedVirtualSignal` subscription (see `useEvmSubscription`).\n * WebRTC itself never talks to any Burdenoff backend for media — only a\n * public STUN server (`stun.l.google.com`) for NAT traversal, the same\n * no-paid-vendor approach documented in ComradeCircle's BOFF-4450 voice\n * core. No TURN relay is configured — peers behind symmetric NAT/strict\n * firewalls may fail to connect; that is an explicit known limitation of a\n * STUN-only bounded core, not a bug.\n */\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { reportShellError } from '../utils/shellBridge';\n\nexport type VirtualCallRole = 'HOST' | 'PRESENTER' | 'ATTENDEE';\nexport type VirtualCallSignalType = 'OFFER' | 'ANSWER' | 'ICE_CANDIDATE';\n\nexport interface VirtualCallParticipant {\n actorId: string;\n role: VirtualCallRole;\n}\n\nexport interface IncomingVirtualSignal {\n sessionId: string;\n fromActorId: string;\n toActorId: string;\n signalType: VirtualCallSignalType;\n payload: unknown;\n}\n\nexport interface UseVirtualCallArgs {\n /** Null/empty disables the hook (no active session yet). */\n sessionId: string | null | undefined;\n selfActorId: string;\n mode: 'MEETING' | 'WEBINAR';\n selfRole: VirtualCallRole | null;\n /** Full active roster, including self. */\n participants: VirtualCallParticipant[];\n sendSignal: (args: { toActorId: string; signalType: VirtualCallSignalType; payload: unknown }) => Promise<unknown>;\n muted: boolean;\n videoEnabled: boolean;\n}\n\nexport interface UseVirtualCallResult {\n /** Local camera/mic stream, once granted. Null while pending/denied. */\n localStream: MediaStream | null;\n /** Remote peer streams keyed by actorId. */\n remoteStreams: Map<string, MediaStream>;\n /** Connection state per remote peer, for UI status dots. */\n connectionStates: Map<string, RTCPeerConnectionState>;\n /** Set when getUserMedia fails (denied / no device / insecure context). */\n mediaError: string | null;\n /** Feed a signal received from the `eventfullyManagedVirtualSignal` subscription/poll. */\n handleIncomingSignal: (signal: IncomingVirtualSignal) => void;\n}\n\nconst ICE_SERVERS: RTCIceServer[] = [{ urls: 'stun:stun.l.google.com:19302' }];\n\n/** Should `a` peer with `b` at all, given the session mode and their roles? */\nexport function shouldConnect(\n a: VirtualCallParticipant,\n b: VirtualCallParticipant,\n mode: 'MEETING' | 'WEBINAR'\n): boolean {\n if (mode === 'MEETING') return true;\n const aBroadcasts = a.role === 'HOST' || a.role === 'PRESENTER';\n const bBroadcasts = b.role === 'HOST' || b.role === 'PRESENTER';\n // WEBINAR (star): attendee<->attendee pairs never connect.\n return aBroadcasts || bBroadcasts;\n}\n\n/** Does `self` initiate the offer toward `other`? */\nexport function isInitiator(\n self: VirtualCallParticipant,\n other: VirtualCallParticipant,\n mode: 'MEETING' | 'WEBINAR'\n): boolean {\n if (mode === 'WEBINAR') {\n const selfBroadcasts = self.role === 'HOST' || self.role === 'PRESENTER';\n const otherBroadcasts = other.role === 'HOST' || other.role === 'PRESENTER';\n if (selfBroadcasts !== otherBroadcasts) {\n // Broadcaster always initiates toward a plain attendee.\n return selfBroadcasts;\n }\n }\n return self.actorId < other.actorId;\n}\n\nexport function useVirtualCall({\n sessionId,\n selfActorId,\n mode,\n selfRole,\n participants,\n sendSignal,\n muted,\n videoEnabled,\n}: UseVirtualCallArgs): UseVirtualCallResult {\n const [localStream, setLocalStream] = useState<MediaStream | null>(null);\n const [mediaError, setMediaError] = useState<string | null>(null);\n const [remoteStreams, setRemoteStreams] = useState<Map<string, MediaStream>>(new Map());\n const [connectionStates, setConnectionStates] = useState<Map<string, RTCPeerConnectionState>>(new Map());\n\n const peersRef = useRef<Map<string, RTCPeerConnection>>(new Map());\n const localStreamRef = useRef<MediaStream | null>(null);\n const sendSignalRef = useRef(sendSignal);\n const pendingCandidatesRef = useRef<Map<string, RTCIceCandidateInit[]>>(new Map());\n useEffect(() => {\n sendSignalRef.current = sendSignal;\n }, [sendSignal]);\n\n // Acquire local media once a session exists.\n useEffect(() => {\n if (!sessionId) return;\n let cancelled = false;\n const nav = typeof navigator !== 'undefined' ? navigator : undefined;\n if (!nav?.mediaDevices?.getUserMedia) {\n setMediaError('This browser does not support camera/microphone capture (getUserMedia unavailable).');\n return;\n }\n nav.mediaDevices\n .getUserMedia({ audio: true, video: true })\n .then((stream) => {\n if (cancelled) {\n stream.getTracks().forEach((t) => t.stop());\n return;\n }\n localStreamRef.current = stream;\n setLocalStream(stream);\n setMediaError(null);\n })\n .catch((err: unknown) => {\n if (cancelled) return;\n const message = err instanceof Error ? err.message : 'Camera/microphone access was denied.';\n setMediaError(message);\n });\n return () => {\n cancelled = true;\n localStreamRef.current?.getTracks().forEach((t) => t.stop());\n localStreamRef.current = null;\n setLocalStream(null);\n };\n }, [sessionId]);\n\n // Reflect local mute/video toggles onto the actual media tracks.\n useEffect(() => {\n localStream?.getAudioTracks().forEach((track) => {\n track.enabled = !muted;\n });\n }, [localStream, muted]);\n useEffect(() => {\n localStream?.getVideoTracks().forEach((track) => {\n track.enabled = videoEnabled;\n });\n }, [localStream, videoEnabled]);\n\n const closePeer = useCallback((actorId: string) => {\n const pc = peersRef.current.get(actorId);\n if (pc) {\n try {\n pc.close();\n } catch {\n /* noop */\n }\n peersRef.current.delete(actorId);\n }\n pendingCandidatesRef.current.delete(actorId);\n setRemoteStreams((prev) => {\n if (!prev.has(actorId)) return prev;\n const next = new Map(prev);\n next.delete(actorId);\n return next;\n });\n setConnectionStates((prev) => {\n if (!prev.has(actorId)) return prev;\n const next = new Map(prev);\n next.delete(actorId);\n return next;\n });\n }, []);\n\n const createPeer = useCallback(\n (remote: VirtualCallParticipant): RTCPeerConnection => {\n const pc = new RTCPeerConnection({ iceServers: ICE_SERVERS });\n peersRef.current.set(remote.actorId, pc);\n\n localStreamRef.current?.getTracks().forEach((track) => {\n pc.addTrack(track, localStreamRef.current as MediaStream);\n });\n\n pc.ontrack = (event) => {\n const [stream] = event.streams;\n if (!stream) return;\n setRemoteStreams((prev) => {\n const next = new Map(prev);\n next.set(remote.actorId, stream);\n return next;\n });\n };\n\n pc.onconnectionstatechange = () => {\n setConnectionStates((prev) => {\n const next = new Map(prev);\n next.set(remote.actorId, pc.connectionState);\n return next;\n });\n if (pc.connectionState === 'failed' || pc.connectionState === 'closed') {\n closePeer(remote.actorId);\n }\n };\n\n pc.onicecandidate = (event) => {\n if (!event.candidate) return;\n void sendSignalRef\n .current({\n toActorId: remote.actorId,\n signalType: 'ICE_CANDIDATE',\n payload: event.candidate.toJSON(),\n })\n .catch((err: unknown) => {\n reportShellError(err, { module: 'eventfullymanaged', context: { phase: 'ice-candidate-send' } });\n });\n };\n\n return pc;\n },\n [closePeer]\n );\n\n const startOffer = useCallback(\n async (remote: VirtualCallParticipant) => {\n const pc = createPeer(remote);\n try {\n const offer = await pc.createOffer();\n await pc.setLocalDescription(offer);\n await sendSignalRef.current({\n toActorId: remote.actorId,\n signalType: 'OFFER',\n payload: { type: offer.type, sdp: offer.sdp },\n });\n } catch (err) {\n reportShellError(err, { module: 'eventfullymanaged', context: { phase: 'create-offer', to: remote.actorId } });\n }\n },\n [createPeer]\n );\n\n // Reconcile peer connections whenever the roster or media readiness changes.\n useEffect(() => {\n if (!sessionId || !selfRole) return;\n const self: VirtualCallParticipant = { actorId: selfActorId, role: selfRole };\n const others = participants.filter((p) => p.actorId !== selfActorId);\n const desired = new Set(others.filter((p) => shouldConnect(self, p, mode)).map((p) => p.actorId));\n\n // Drop peers no longer in the desired set (left the session).\n for (const actorId of Array.from(peersRef.current.keys())) {\n if (!desired.has(actorId)) closePeer(actorId);\n }\n\n // Only initiate once local media is ready — the offer needs tracks attached.\n if (!localStreamRef.current) return;\n\n for (const remote of others) {\n if (!desired.has(remote.actorId)) continue;\n if (peersRef.current.has(remote.actorId)) continue;\n if (isInitiator(self, remote, mode)) {\n void startOffer(remote);\n }\n // Non-initiators wait for an incoming OFFER signal (handled below);\n // no connection object is created until then.\n }\n }, [sessionId, selfActorId, selfRole, mode, participants, localStream, closePeer, startOffer]);\n\n // Full cleanup on session end / unmount.\n useEffect(() => {\n if (sessionId) return undefined;\n for (const actorId of Array.from(peersRef.current.keys())) closePeer(actorId);\n return undefined;\n }, [sessionId, closePeer]);\n useEffect(\n () => () => {\n for (const actorId of Array.from(peersRef.current.keys())) closePeer(actorId);\n },\n [closePeer]\n );\n\n const handleIncomingSignal = useCallback(\n (signal: IncomingVirtualSignal) => {\n if (signal.sessionId !== sessionId || signal.toActorId !== selfActorId) return;\n const fromActorId = signal.fromActorId;\n\n const flushPendingCandidates = (pc: RTCPeerConnection) => {\n const queued = pendingCandidatesRef.current.get(fromActorId);\n if (!queued?.length) return;\n pendingCandidatesRef.current.delete(fromActorId);\n for (const candidate of queued) {\n void pc.addIceCandidate(new RTCIceCandidate(candidate)).catch(() => {});\n }\n };\n\n if (signal.signalType === 'OFFER') {\n const remote: VirtualCallParticipant = {\n actorId: fromActorId,\n // Role is unknown from a bare signal; peer creation itself is\n // role-agnostic (RTCPeerConnection doesn't care), only the\n // *decision to connect* used role — the sender already made\n // that call by sending us an OFFER.\n role: 'ATTENDEE',\n };\n let pc = peersRef.current.get(fromActorId);\n if (!pc) pc = createPeer(remote);\n const desc = signal.payload as RTCSessionDescriptionInit;\n void pc\n .setRemoteDescription(new RTCSessionDescription(desc))\n .then(() => {\n flushPendingCandidates(pc as RTCPeerConnection);\n return (pc as RTCPeerConnection).createAnswer();\n })\n .then((answer) => (pc as RTCPeerConnection).setLocalDescription(answer).then(() => answer))\n .then((answer) =>\n sendSignalRef.current({\n toActorId: fromActorId,\n signalType: 'ANSWER',\n payload: { type: answer.type, sdp: answer.sdp },\n })\n )\n .catch((err: unknown) => {\n reportShellError(err, {\n module: 'eventfullymanaged',\n context: { phase: 'handle-offer', from: fromActorId },\n });\n });\n return;\n }\n\n if (signal.signalType === 'ANSWER') {\n const pc = peersRef.current.get(fromActorId);\n if (!pc) return;\n const desc = signal.payload as RTCSessionDescriptionInit;\n void pc\n .setRemoteDescription(new RTCSessionDescription(desc))\n .then(() => flushPendingCandidates(pc))\n .catch((err: unknown) => {\n reportShellError(err, {\n module: 'eventfullymanaged',\n context: { phase: 'handle-answer', from: fromActorId },\n });\n });\n return;\n }\n\n // ICE_CANDIDATE\n const pc = peersRef.current.get(fromActorId);\n const candidate = signal.payload as RTCIceCandidateInit;\n if (!pc || !pc.remoteDescription) {\n const queue = pendingCandidatesRef.current.get(fromActorId) ?? [];\n queue.push(candidate);\n pendingCandidatesRef.current.set(fromActorId, queue);\n return;\n }\n void pc.addIceCandidate(new RTCIceCandidate(candidate)).catch(() => {});\n },\n [sessionId, selfActorId, createPeer]\n );\n\n return { localStream, remoteStreams, connectionStates, mediaError, handleIncomingSignal };\n}\n"],"mappings":";;;AA8EA,IAAMA,IAA8B,CAAC,EAAE,MAAM,+BAA+B,CAAC;AAG7E,SAAgBC,EACd,GACA,GACA,GACS;CACT,IAAIC,MAAS,WAAW,OAAO;CAC/B,IAAMC,IAAcC,EAAE,SAAS,UAAUA,EAAE,SAAS,aAC9CC,IAAcC,EAAE,SAAS,UAAUA,EAAE,SAAS;CAEpD,OAAOH,KAAeE;AACxB;AAGA,SAAgBE,EACd,GACA,GACA,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EhE,AADAM,EAAM,KAAKH,CAAS,GACpBjC,EAAqB,QAAQ,IAAI8B,GAAaM,CAAK;GAErD,OACA,EAAQ,gBAAgB,IAAI,gBAAgBH,CAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;EACxE,GACA;GAAC/B;GAAWsB;GAAaP;EAAU,CAG8B;CAAqB;AAC1F"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/eventfullymanaged/lib/floorPlanZones.ts
|
|
2
2
|
var e = [
|
|
3
3
|
{
|
|
4
4
|
value: "booth",
|
|
@@ -81,8 +81,7 @@ function l(e) {
|
|
|
81
81
|
if (t === "percent" || t === "%") return "percent";
|
|
82
82
|
if (t === "fraction" || t === "ratio") return "fraction";
|
|
83
83
|
}
|
|
84
|
-
|
|
85
|
-
function d(e, t) {
|
|
84
|
+
function u(e, t) {
|
|
86
85
|
let n = r(e.x), i = r(e.y), a = r(e.w) ?? r(e.width), o = r(e.h) ?? r(e.height);
|
|
87
86
|
if (n === void 0 || i === void 0 || a === void 0 || o === void 0 || a <= 0 || o <= 0) return;
|
|
88
87
|
let s = t === "fraction" || t === void 0 && n <= 1 && i <= 1 && a <= 1 && o <= 1 ? 100 : 1, c = {
|
|
@@ -91,32 +90,32 @@ function d(e, t) {
|
|
|
91
90
|
w: a * s,
|
|
92
91
|
h: o * s
|
|
93
92
|
};
|
|
94
|
-
if (!(c.x < 0 || c.y < 0 || c.x + c.w > 100
|
|
93
|
+
if (!(c.x < 0 || c.y < 0 || c.x + c.w > 100.05 || c.y + c.h > 100.05)) return {
|
|
95
94
|
...c,
|
|
96
95
|
w: Math.min(c.w, 100 - c.x),
|
|
97
96
|
h: Math.min(c.h, 100 - c.y)
|
|
98
97
|
};
|
|
99
98
|
}
|
|
100
|
-
function
|
|
99
|
+
function d(e) {
|
|
101
100
|
if (!e) return [];
|
|
102
|
-
let t = c(e), n = l(e), a = Array.isArray(t) ? t.map((e, t) => [String(t), e]) : s(t) ? Object.entries(t) : [], o = [],
|
|
101
|
+
let t = c(e), n = l(e), a = Array.isArray(t) ? t.map((e, t) => [String(t), e]) : s(t) ? Object.entries(t) : [], o = [], d = /* @__PURE__ */ new Set();
|
|
103
102
|
for (let [e, t] of a) {
|
|
104
103
|
if (!s(t)) continue;
|
|
105
104
|
let a = i(t.label) ?? i(t.name) ?? i(t.title) ?? i(t.id) ?? e, c = i(t.id) ?? `zone-${e}`;
|
|
106
|
-
for (;
|
|
107
|
-
|
|
105
|
+
for (; d.has(c);) c = `${c}-${e}`;
|
|
106
|
+
d.add(c);
|
|
108
107
|
let l = r(t.capacity) ?? r(t.seats);
|
|
109
108
|
o.push({
|
|
110
109
|
id: c,
|
|
111
110
|
label: a,
|
|
112
111
|
type: i(t.type) ?? i(t.kind),
|
|
113
112
|
capacity: l !== void 0 && l >= 0 ? Math.floor(l) : void 0,
|
|
114
|
-
rect:
|
|
113
|
+
rect: u(t, n)
|
|
115
114
|
});
|
|
116
115
|
}
|
|
117
116
|
return o;
|
|
118
117
|
}
|
|
119
|
-
function
|
|
118
|
+
function f(e, t) {
|
|
120
119
|
let n = {}, r = s(t) ? t : {}, i = s(t) && c(t) === t;
|
|
121
120
|
for (let [e, t] of Object.entries(r)) [
|
|
122
121
|
"zones",
|
|
@@ -138,7 +137,7 @@ function p(e, t) {
|
|
|
138
137
|
})
|
|
139
138
|
};
|
|
140
139
|
}
|
|
141
|
-
function
|
|
140
|
+
function p(e) {
|
|
142
141
|
let t = o(e.x), n = o(e.y);
|
|
143
142
|
return {
|
|
144
143
|
x: t,
|
|
@@ -147,33 +146,33 @@ function m(e) {
|
|
|
147
146
|
h: Math.min(o(e.h), o(100 - n))
|
|
148
147
|
};
|
|
149
148
|
}
|
|
150
|
-
function
|
|
149
|
+
function m(e, t) {
|
|
151
150
|
let n = a(Math.min(e.x, t.x), 0, 100), r = a(Math.min(e.y, t.y), 0, 100), i = a(Math.max(e.x, t.x), 0, 100), o = a(Math.max(e.y, t.y), 0, 100);
|
|
152
|
-
return
|
|
151
|
+
return p({
|
|
153
152
|
x: n,
|
|
154
153
|
y: r,
|
|
155
154
|
w: i - n,
|
|
156
155
|
h: o - r
|
|
157
156
|
});
|
|
158
157
|
}
|
|
159
|
-
function
|
|
158
|
+
function h(e) {
|
|
160
159
|
return e.w >= 1 && e.h >= 1;
|
|
161
160
|
}
|
|
162
|
-
function
|
|
163
|
-
return
|
|
161
|
+
function g(e, t, n) {
|
|
162
|
+
return p({
|
|
164
163
|
...e,
|
|
165
164
|
x: a(e.x + t, 0, 100 - e.w),
|
|
166
165
|
y: a(e.y + n, 0, 100 - e.h)
|
|
167
166
|
});
|
|
168
167
|
}
|
|
169
|
-
function
|
|
170
|
-
return
|
|
168
|
+
function _(e, t, n) {
|
|
169
|
+
return p({
|
|
171
170
|
...e,
|
|
172
171
|
w: a(e.w + t, 1, 100 - e.x),
|
|
173
172
|
h: a(e.h + n, 1, 100 - e.y)
|
|
174
173
|
});
|
|
175
174
|
}
|
|
176
|
-
function
|
|
175
|
+
function v() {
|
|
177
176
|
return {
|
|
178
177
|
x: 44,
|
|
179
178
|
y: 44,
|
|
@@ -181,15 +180,15 @@ function y() {
|
|
|
181
180
|
h: 12
|
|
182
181
|
};
|
|
183
182
|
}
|
|
184
|
-
function
|
|
183
|
+
function y(e, r = t) {
|
|
185
184
|
let i = n(r) ?? "Zone", a = new Set(e.map((e) => e.label.trim().toLowerCase())), o = e.filter((e) => (e.type ?? "") === r).length + 1;
|
|
186
185
|
for (; a.has(`${i} ${o}`.toLowerCase());) o += 1;
|
|
187
186
|
return `${i} ${o}`;
|
|
188
187
|
}
|
|
189
|
-
function
|
|
188
|
+
function b() {
|
|
190
189
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `zone-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
191
190
|
}
|
|
192
|
-
function
|
|
191
|
+
function x(e) {
|
|
193
192
|
let t = e.trim();
|
|
194
193
|
if (t === "") return {
|
|
195
194
|
ok: !0,
|
|
@@ -202,7 +201,7 @@ function S(e) {
|
|
|
202
201
|
value: n
|
|
203
202
|
} : { ok: !1 };
|
|
204
203
|
}
|
|
205
|
-
function
|
|
204
|
+
function S(e) {
|
|
206
205
|
let t = [];
|
|
207
206
|
e.length > 500 && t.push({
|
|
208
207
|
zoneId: "",
|
|
@@ -223,17 +222,16 @@ function C(e) {
|
|
|
223
222
|
}
|
|
224
223
|
return t;
|
|
225
224
|
}
|
|
226
|
-
function
|
|
225
|
+
function C(e) {
|
|
227
226
|
return {
|
|
228
227
|
zones: e.length,
|
|
229
228
|
booths: e.filter((e) => (e.type ?? "").toLowerCase().includes("booth")).length,
|
|
230
229
|
capacity: e.reduce((e, t) => e + (t.capacity ?? 0), 0)
|
|
231
230
|
};
|
|
232
231
|
}
|
|
233
|
-
function
|
|
234
|
-
return JSON.stringify(
|
|
232
|
+
function w(e, t) {
|
|
233
|
+
return JSON.stringify(f(e)) === JSON.stringify(f(t));
|
|
235
234
|
}
|
|
236
|
-
|
|
237
|
-
export { t as DEFAULT_ZONE_TYPE, e as ZONE_TYPES, r as asNumber, i as asString, y as defaultPlacedRect, f as extractZones, g as isUsableRect, _ as moveRect, x as newZoneId, b as nextZoneLabel, S as parseCapacity, h as rectFromPoints, v as resizeRect, p as serializeZones, w as summarizeZones, C as validateZones, n as zoneTypeLabel, T as zonesEqual };
|
|
235
|
+
export { t as DEFAULT_ZONE_TYPE, e as ZONE_TYPES, r as asNumber, i as asString, a as clamp, v as defaultPlacedRect, d as extractZones, h as isUsableRect, g as moveRect, b as newZoneId, y as nextZoneLabel, x as parseCapacity, m as rectFromPoints, _ as resizeRect, p as roundRect, f as serializeZones, C as summarizeZones, S as validateZones, n as zoneTypeLabel, w as zonesEqual };
|
|
238
236
|
|
|
239
237
|
//# sourceMappingURL=floorPlanZones.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floorPlanZones.js","names":[],"sources":["../../../src/eventfullymanaged/lib/floorPlanZones.ts"],"sourcesContent":["/**\n * Floor-plan zone model shared by the floor-plan viewer and the interactive\n * zone/booth editor.\n *\n * The backend persists `FloorPlan.interactiveAreas` as free-form JSON, so this\n * module owns the contract on the client side:\n *\n * - **Reading** (`extractZones`) is deliberately lenient. Plans created before\n * the editor existed (or imported from elsewhere) may hold a bare array, a\n * `{ zones | areas | booths: [...] }` wrapper or a keyed object, with\n * coordinates as fractions (0–1) or percentages (0–100). Whatever real shape a\n * plan holds is rendered; nothing is fabricated.\n * - **Writing** (`serializeZones`) always emits the canonical v1 shape:\n *\n * ```json\n * {\n * \"version\": 1,\n * \"unit\": \"percent\",\n * \"zones\": [\n * { \"id\": \"…\", \"label\": \"Booth A1\", \"type\": \"booth\", \"capacity\": 12,\n * \"x\": 10.5, \"y\": 20, \"w\": 8, \"h\": 6 }\n * ]\n * }\n * ```\n *\n * `x`/`y` are the top-left corner and `w`/`h` the size, all as a percentage of\n * the floor-plan image, so zones stay aligned at any rendered size. Unknown\n * top-level keys already stored on the plan are preserved.\n */\n\nexport type JsonObject = Record<string, unknown>;\nexport type InteractiveAreasJson = JsonObject | unknown[] | null | undefined;\n\n/** A rectangle in percent of the floor-plan image (top-left origin). */\nexport type ZoneRect = { x: number; y: number; w: number; h: number };\n\nexport type Zone = {\n /** Stable identifier — persisted ids are kept, legacy entries get a derived one. */\n id: string;\n label: string;\n type?: string;\n capacity?: number;\n /** Absent when the stored entry carried no usable coordinates (\"unplaced\"). */\n rect?: ZoneRect;\n};\n\nexport const ZONE_TYPES = [\n { value: 'booth', label: 'Booth' },\n { value: 'stage', label: 'Stage' },\n { value: 'seating', label: 'Seating' },\n { value: 'entrance', label: 'Entrance' },\n { value: 'exit', label: 'Exit' },\n { value: 'registration', label: 'Registration desk' },\n { value: 'catering', label: 'Catering' },\n { value: 'lounge', label: 'Lounge' },\n { value: 'restroom', label: 'Restroom' },\n { value: 'storage', label: 'Storage' },\n { value: 'other', label: 'Other' },\n] as const;\n\nexport type ZoneType = (typeof ZONE_TYPES)[number]['value'];\n\nexport const DEFAULT_ZONE_TYPE: ZoneType = 'booth';\n\n/** Smallest zone (in percent of either axis) the editor will keep. */\nexport const MIN_ZONE_SIZE = 1;\n\n/** Size of a zone placed with \"Place on map\" (percent). */\nexport const DEFAULT_PLACED_SIZE = 12;\n\nexport const MAX_LABEL_LENGTH = 60;\n\nexport const MAX_ZONES = 500;\n\nexport function zoneTypeLabel(type: string | undefined): string | undefined {\n if (!type) {\n return undefined;\n }\n const known = ZONE_TYPES.find((entry) => entry.value === type.toLowerCase());\n return known ? known.label : type;\n}\n\n/** A finite number from a number or numeric string, else undefined. */\nexport function asNumber(value: unknown): number | undefined {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n if (typeof value === 'string' && value.trim() !== '' && Number.isFinite(Number(value))) {\n return Number(value);\n }\n return undefined;\n}\n\n/** A trimmed non-empty string, else undefined. */\nexport function asString(value: unknown): string | undefined {\n return typeof value === 'string' && value.trim() !== '' ? value.trim() : undefined;\n}\n\nexport function clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n\nfunction round2(value: number): number {\n return Math.round(value * 100) / 100;\n}\n\nfunction isObject(value: unknown): value is JsonObject {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction unwrapZoneList(interactiveAreas: InteractiveAreasJson): unknown {\n if (!isObject(interactiveAreas)) {\n return interactiveAreas;\n }\n for (const key of ['zones', 'areas', 'booths'] as const) {\n if (Array.isArray(interactiveAreas[key])) {\n return interactiveAreas[key];\n }\n }\n // Canonical v1 with an empty/missing list, or an empty object: no zones.\n if ('version' in interactiveAreas || Object.keys(interactiveAreas).length === 0) {\n return [];\n }\n return interactiveAreas;\n}\n\nfunction declaredUnit(interactiveAreas: InteractiveAreasJson): 'percent' | 'fraction' | undefined {\n if (!isObject(interactiveAreas)) {\n return undefined;\n }\n const unit = asString(interactiveAreas.unit)?.toLowerCase();\n if (unit === 'percent' || unit === '%') {\n return 'percent';\n }\n if (unit === 'fraction' || unit === 'ratio') {\n return 'fraction';\n }\n return undefined;\n}\n\n/**\n * How far past the right/bottom edge a stored zone may reach and still be\n * placed. Values written by other tools may carry rounding overshoot (two\n * independently rounded numbers can exceed 100 by up to 0.01); anything beyond\n * this is treated as out of range.\n */\nconst EDGE_TOLERANCE = 0.05;\n\nfunction readRect(item: JsonObject, unit: 'percent' | 'fraction' | undefined): ZoneRect | undefined {\n const x = asNumber(item.x);\n const y = asNumber(item.y);\n const w = asNumber(item.w) ?? asNumber(item.width);\n const h = asNumber(item.h) ?? asNumber(item.height);\n if (x === undefined || y === undefined || w === undefined || h === undefined || w <= 0 || h <= 0) {\n return undefined;\n }\n // Without a declared unit, infer it: all values within 0–1 means fractions.\n const scale = unit === 'fraction' || (unit === undefined && x <= 1 && y <= 1 && w <= 1 && h <= 1) ? 100 : 1;\n const rect = { x: x * scale, y: y * scale, w: w * scale, h: h * scale };\n if (rect.x < 0 || rect.y < 0 || rect.x + rect.w > 100 + EDGE_TOLERANCE || rect.y + rect.h > 100 + EDGE_TOLERANCE) {\n // Pixel coordinates (or otherwise out of range) cannot be placed without the\n // source image size — keep the zone, but unplaced, rather than mis-draw it.\n return undefined;\n }\n // Absorb rounding overshoot at the right/bottom edge so the zone stays inside the image.\n return { ...rect, w: Math.min(rect.w, 100 - rect.x), h: Math.min(rect.h, 100 - rect.y) };\n}\n\n/** Parse whatever shape `interactiveAreas` holds into zones. Never throws. */\nexport function extractZones(interactiveAreas: InteractiveAreasJson): Zone[] {\n if (!interactiveAreas) {\n return [];\n }\n const raw = unwrapZoneList(interactiveAreas);\n const unit = declaredUnit(interactiveAreas);\n\n const entries: Array<[string, unknown]> = Array.isArray(raw)\n ? raw.map((item, index) => [String(index), item])\n : isObject(raw)\n ? Object.entries(raw)\n : [];\n\n const zones: Zone[] = [];\n const seen = new Set<string>();\n for (const [key, value] of entries) {\n if (!isObject(value)) {\n continue;\n }\n const label = asString(value.label) ?? asString(value.name) ?? asString(value.title) ?? asString(value.id) ?? key;\n let id = asString(value.id) ?? `zone-${key}`;\n while (seen.has(id)) {\n id = `${id}-${key}`;\n }\n seen.add(id);\n const capacity = asNumber(value.capacity) ?? asNumber(value.seats);\n zones.push({\n id,\n label,\n type: asString(value.type) ?? asString(value.kind),\n capacity: capacity !== undefined && capacity >= 0 ? Math.floor(capacity) : undefined,\n rect: readRect(value, unit),\n });\n }\n return zones;\n}\n\n/**\n * Build the canonical v1 `interactiveAreas` payload. Unknown top-level keys of\n * the previously stored object (e.g. legend or metadata a plan was imported\n * with) are carried over; legacy list keys are replaced by `zones`.\n */\nexport function serializeZones(zones: Zone[], previous?: InteractiveAreasJson): JsonObject {\n const preserved: JsonObject = {};\n const source: JsonObject = isObject(previous) ? previous : {};\n // A legacy keyed-object plan stores each zone as a top-level object; those\n // are superseded by `zones`, so only its scalar metadata is carried over.\n const legacyKeyed = isObject(previous) && unwrapZoneList(previous) === previous;\n for (const [key, value] of Object.entries(source)) {\n if (['zones', 'areas', 'booths', 'version', 'unit'].includes(key)) {\n continue;\n }\n if (legacyKeyed && isObject(value)) {\n continue;\n }\n preserved[key] = value;\n }\n\n return {\n ...preserved,\n version: 1,\n unit: 'percent',\n zones: zones.map((zone) => {\n const entry: JsonObject = { id: zone.id, label: zone.label.trim() };\n if (zone.type) {\n entry.type = zone.type;\n }\n if (zone.capacity !== undefined) {\n entry.capacity = zone.capacity;\n }\n if (zone.rect) {\n entry.x = round2(zone.rect.x);\n entry.y = round2(zone.rect.y);\n entry.w = round2(zone.rect.w);\n entry.h = round2(zone.rect.h);\n }\n return entry;\n }),\n };\n}\n\n/** Round a rectangle to 0.01% so floating-point drag noise never reaches the UI or the stored JSON. */\nexport function roundRect(rect: ZoneRect): ZoneRect {\n const x = round2(rect.x);\n const y = round2(rect.y);\n // Size is capped against the rounded origin so x + w never exceeds 100 after rounding.\n return { x, y, w: Math.min(round2(rect.w), round2(100 - x)), h: Math.min(round2(rect.h), round2(100 - y)) };\n}\n\n/** Normalise two drag points (percent) into a rectangle clamped to the image. */\nexport function rectFromPoints(a: { x: number; y: number }, b: { x: number; y: number }): ZoneRect {\n const x1 = clamp(Math.min(a.x, b.x), 0, 100);\n const y1 = clamp(Math.min(a.y, b.y), 0, 100);\n const x2 = clamp(Math.max(a.x, b.x), 0, 100);\n const y2 = clamp(Math.max(a.y, b.y), 0, 100);\n return roundRect({ x: x1, y: y1, w: x2 - x1, h: y2 - y1 });\n}\n\nexport function isUsableRect(rect: ZoneRect): boolean {\n return rect.w >= MIN_ZONE_SIZE && rect.h >= MIN_ZONE_SIZE;\n}\n\n/** Translate a rectangle, keeping it fully inside the image. */\nexport function moveRect(rect: ZoneRect, dx: number, dy: number): ZoneRect {\n return roundRect({\n ...rect,\n x: clamp(rect.x + dx, 0, 100 - rect.w),\n y: clamp(rect.y + dy, 0, 100 - rect.h),\n });\n}\n\n/** Grow/shrink from the bottom-right corner, keeping a minimum size and the image bounds. */\nexport function resizeRect(rect: ZoneRect, dw: number, dh: number): ZoneRect {\n return roundRect({\n ...rect,\n w: clamp(rect.w + dw, MIN_ZONE_SIZE, 100 - rect.x),\n h: clamp(rect.h + dh, MIN_ZONE_SIZE, 100 - rect.y),\n });\n}\n\n/** A rectangle of the default size centred on the image, for placing an unplaced zone. */\nexport function defaultPlacedRect(): ZoneRect {\n const half = DEFAULT_PLACED_SIZE / 2;\n return { x: 50 - half, y: 50 - half, w: DEFAULT_PLACED_SIZE, h: DEFAULT_PLACED_SIZE };\n}\n\n/** Next free \"<Type> N\" label, so freshly drawn zones are distinguishable. */\nexport function nextZoneLabel(zones: Zone[], type: string = DEFAULT_ZONE_TYPE): string {\n const base = zoneTypeLabel(type) ?? 'Zone';\n const taken = new Set(zones.map((zone) => zone.label.trim().toLowerCase()));\n let n = zones.filter((zone) => (zone.type ?? '') === type).length + 1;\n while (taken.has(`${base} ${n}`.toLowerCase())) {\n n += 1;\n }\n return `${base} ${n}`;\n}\n\nexport function newZoneId(): string {\n if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {\n return crypto.randomUUID();\n }\n return `zone-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;\n}\n\n/**\n * Parse the capacity input. Empty means \"not set\"; anything else must be a\n * non-negative whole number.\n */\nexport function parseCapacity(input: string): { ok: true; value: number | undefined } | { ok: false } {\n const trimmed = input.trim();\n if (trimmed === '') {\n return { ok: true, value: undefined };\n }\n if (!/^\\d+$/.test(trimmed)) {\n return { ok: false };\n }\n const value = Number(trimmed);\n return Number.isSafeInteger(value) ? { ok: true, value } : { ok: false };\n}\n\nexport type ZoneValidationError = { zoneId: string; message: string };\n\n/** Validate zones before persisting. Returns one message per offending zone. */\nexport function validateZones(zones: Zone[]): ZoneValidationError[] {\n const errors: ZoneValidationError[] = [];\n if (zones.length > MAX_ZONES) {\n errors.push({ zoneId: '', message: `A floor plan can hold at most ${MAX_ZONES} zones.` });\n }\n for (const zone of zones) {\n const label = zone.label.trim();\n if (label === '') {\n errors.push({ zoneId: zone.id, message: 'Every zone needs a label.' });\n } else if (label.length > MAX_LABEL_LENGTH) {\n errors.push({\n zoneId: zone.id,\n message: `\"${label.slice(0, 20)}…\" is longer than ${MAX_LABEL_LENGTH} characters.`,\n });\n } else if (zone.capacity !== undefined && (!Number.isSafeInteger(zone.capacity) || zone.capacity < 0)) {\n errors.push({ zoneId: zone.id, message: `\"${label}\" has an invalid capacity.` });\n }\n }\n return errors;\n}\n\nexport type ZoneSummary = { zones: number; booths: number; capacity: number };\n\nexport function summarizeZones(zones: Zone[]): ZoneSummary {\n return {\n zones: zones.length,\n booths: zones.filter((zone) => (zone.type ?? '').toLowerCase().includes('booth')).length,\n capacity: zones.reduce((sum, zone) => sum + (zone.capacity ?? 0), 0),\n };\n}\n\n/** Structural equality used to track unsaved editor changes. */\nexport function zonesEqual(a: Zone[], b: Zone[]): boolean {\n return JSON.stringify(serializeZones(a)) === JSON.stringify(serializeZones(b));\n}\n"],"mappings":";AA8CA,IAAa,IAAa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O;;AAM1E,SAAgB,EAAc,GAAsC;CAClE,IAAM,IAAgC,EAAE;AACxC,CAAI,EAAM,SAAA,OACR,EAAO,KAAK;EAAE,QAAQ;EAAI,SAAS;EAAqD,CAAC;AAE3F,MAAK,IAAM,KAAQ,GAAO;EACxB,IAAM,IAAQ,EAAK,MAAM,MAAM;AAC/B,EAAI,MAAU,KACZ,EAAO,KAAK;GAAE,QAAQ,EAAK;GAAI,SAAS;GAA6B,CAAC,GAC7D,EAAM,SAAA,KACf,EAAO,KAAK;GACV,QAAQ,EAAK;GACb,SAAS,IAAI,EAAM,MAAM,GAAG,GAAG,CAAC;GACjC,CAAC,GACO,EAAK,aAAa,KAAA,MAAc,CAAC,OAAO,cAAc,EAAK,SAAS,IAAI,EAAK,WAAW,MACjG,EAAO,KAAK;GAAE,QAAQ,EAAK;GAAI,SAAS,IAAI,EAAM;GAA6B,CAAC;;AAGpF,QAAO;;AAKT,SAAgB,EAAe,GAA4B;AACzD,QAAO;EACL,OAAO,EAAM;EACb,QAAQ,EAAM,QAAQ,OAAU,EAAK,QAAQ,IAAI,aAAa,CAAC,SAAS,QAAQ,CAAC,CAAC;EAClF,UAAU,EAAM,QAAQ,GAAK,MAAS,KAAO,EAAK,YAAY,IAAI,EAAE;EACrE;;AAIH,SAAgB,EAAW,GAAW,GAAoB;AACxD,QAAO,KAAK,UAAU,EAAe,EAAE,CAAC,KAAK,KAAK,UAAU,EAAe,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"floorPlanZones.js","names":["ZONE_TYPES","DEFAULT_ZONE_TYPE","zoneTypeLabel","type","known","entry","asNumber","value","asString","clamp","min","max","round2","isObject","unwrapZoneList","interactiveAreas","key","declaredUnit","unit","readRect","x","item","y","w","h","scale","rect","extractZones","raw","entries","index","zones","seen","label","id","capacity","serializeZones","preserved","source","previous","legacyKeyed","zone","roundRect","rectFromPoints","x1","a","b","y1","x2","y2","isUsableRect","moveRect","dx","dy","resizeRect","dw","dh","defaultPlacedRect","nextZoneLabel","base","taken","n","newZoneId","parseCapacity","trimmed","input","validateZones","errors","summarizeZones","sum","zonesEqual"],"sources":["../../../src/eventfullymanaged/lib/floorPlanZones.ts"],"sourcesContent":["/**\n * Floor-plan zone model shared by the floor-plan viewer and the interactive\n * zone/booth editor.\n *\n * The backend persists `FloorPlan.interactiveAreas` as free-form JSON, so this\n * module owns the contract on the client side:\n *\n * - **Reading** (`extractZones`) is deliberately lenient. Plans created before\n * the editor existed (or imported from elsewhere) may hold a bare array, a\n * `{ zones | areas | booths: [...] }` wrapper or a keyed object, with\n * coordinates as fractions (0–1) or percentages (0–100). Whatever real shape a\n * plan holds is rendered; nothing is fabricated.\n * - **Writing** (`serializeZones`) always emits the canonical v1 shape:\n *\n * ```json\n * {\n * \"version\": 1,\n * \"unit\": \"percent\",\n * \"zones\": [\n * { \"id\": \"…\", \"label\": \"Booth A1\", \"type\": \"booth\", \"capacity\": 12,\n * \"x\": 10.5, \"y\": 20, \"w\": 8, \"h\": 6 }\n * ]\n * }\n * ```\n *\n * `x`/`y` are the top-left corner and `w`/`h` the size, all as a percentage of\n * the floor-plan image, so zones stay aligned at any rendered size. Unknown\n * top-level keys already stored on the plan are preserved.\n */\n\nexport type JsonObject = Record<string, unknown>;\nexport type InteractiveAreasJson = JsonObject | unknown[] | null | undefined;\n\n/** A rectangle in percent of the floor-plan image (top-left origin). */\nexport type ZoneRect = { x: number; y: number; w: number; h: number };\n\nexport type Zone = {\n /** Stable identifier — persisted ids are kept, legacy entries get a derived one. */\n id: string;\n label: string;\n type?: string;\n capacity?: number;\n /** Absent when the stored entry carried no usable coordinates (\"unplaced\"). */\n rect?: ZoneRect;\n};\n\nexport const ZONE_TYPES = [\n { value: 'booth', label: 'Booth' },\n { value: 'stage', label: 'Stage' },\n { value: 'seating', label: 'Seating' },\n { value: 'entrance', label: 'Entrance' },\n { value: 'exit', label: 'Exit' },\n { value: 'registration', label: 'Registration desk' },\n { value: 'catering', label: 'Catering' },\n { value: 'lounge', label: 'Lounge' },\n { value: 'restroom', label: 'Restroom' },\n { value: 'storage', label: 'Storage' },\n { value: 'other', label: 'Other' },\n] as const;\n\nexport type ZoneType = (typeof ZONE_TYPES)[number]['value'];\n\nexport const DEFAULT_ZONE_TYPE: ZoneType = 'booth';\n\n/** Smallest zone (in percent of either axis) the editor will keep. */\nexport const MIN_ZONE_SIZE = 1;\n\n/** Size of a zone placed with \"Place on map\" (percent). */\nexport const DEFAULT_PLACED_SIZE = 12;\n\nexport const MAX_LABEL_LENGTH = 60;\n\nexport const MAX_ZONES = 500;\n\nexport function zoneTypeLabel(type: string | undefined): string | undefined {\n if (!type) {\n return undefined;\n }\n const known = ZONE_TYPES.find((entry) => entry.value === type.toLowerCase());\n return known ? known.label : type;\n}\n\n/** A finite number from a number or numeric string, else undefined. */\nexport function asNumber(value: unknown): number | undefined {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n if (typeof value === 'string' && value.trim() !== '' && Number.isFinite(Number(value))) {\n return Number(value);\n }\n return undefined;\n}\n\n/** A trimmed non-empty string, else undefined. */\nexport function asString(value: unknown): string | undefined {\n return typeof value === 'string' && value.trim() !== '' ? value.trim() : undefined;\n}\n\nexport function clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n\nfunction round2(value: number): number {\n return Math.round(value * 100) / 100;\n}\n\nfunction isObject(value: unknown): value is JsonObject {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction unwrapZoneList(interactiveAreas: InteractiveAreasJson): unknown {\n if (!isObject(interactiveAreas)) {\n return interactiveAreas;\n }\n for (const key of ['zones', 'areas', 'booths'] as const) {\n if (Array.isArray(interactiveAreas[key])) {\n return interactiveAreas[key];\n }\n }\n // Canonical v1 with an empty/missing list, or an empty object: no zones.\n if ('version' in interactiveAreas || Object.keys(interactiveAreas).length === 0) {\n return [];\n }\n return interactiveAreas;\n}\n\nfunction declaredUnit(interactiveAreas: InteractiveAreasJson): 'percent' | 'fraction' | undefined {\n if (!isObject(interactiveAreas)) {\n return undefined;\n }\n const unit = asString(interactiveAreas.unit)?.toLowerCase();\n if (unit === 'percent' || unit === '%') {\n return 'percent';\n }\n if (unit === 'fraction' || unit === 'ratio') {\n return 'fraction';\n }\n return undefined;\n}\n\n/**\n * How far past the right/bottom edge a stored zone may reach and still be\n * placed. Values written by other tools may carry rounding overshoot (two\n * independently rounded numbers can exceed 100 by up to 0.01); anything beyond\n * this is treated as out of range.\n */\nconst EDGE_TOLERANCE = 0.05;\n\nfunction readRect(item: JsonObject, unit: 'percent' | 'fraction' | undefined): ZoneRect | undefined {\n const x = asNumber(item.x);\n const y = asNumber(item.y);\n const w = asNumber(item.w) ?? asNumber(item.width);\n const h = asNumber(item.h) ?? asNumber(item.height);\n if (x === undefined || y === undefined || w === undefined || h === undefined || w <= 0 || h <= 0) {\n return undefined;\n }\n // Without a declared unit, infer it: all values within 0–1 means fractions.\n const scale = unit === 'fraction' || (unit === undefined && x <= 1 && y <= 1 && w <= 1 && h <= 1) ? 100 : 1;\n const rect = { x: x * scale, y: y * scale, w: w * scale, h: h * scale };\n if (rect.x < 0 || rect.y < 0 || rect.x + rect.w > 100 + EDGE_TOLERANCE || rect.y + rect.h > 100 + EDGE_TOLERANCE) {\n // Pixel coordinates (or otherwise out of range) cannot be placed without the\n // source image size — keep the zone, but unplaced, rather than mis-draw it.\n return undefined;\n }\n // Absorb rounding overshoot at the right/bottom edge so the zone stays inside the image.\n return { ...rect, w: Math.min(rect.w, 100 - rect.x), h: Math.min(rect.h, 100 - rect.y) };\n}\n\n/** Parse whatever shape `interactiveAreas` holds into zones. Never throws. */\nexport function extractZones(interactiveAreas: InteractiveAreasJson): Zone[] {\n if (!interactiveAreas) {\n return [];\n }\n const raw = unwrapZoneList(interactiveAreas);\n const unit = declaredUnit(interactiveAreas);\n\n const entries: Array<[string, unknown]> = Array.isArray(raw)\n ? raw.map((item, index) => [String(index), item])\n : isObject(raw)\n ? Object.entries(raw)\n : [];\n\n const zones: Zone[] = [];\n const seen = new Set<string>();\n for (const [key, value] of entries) {\n if (!isObject(value)) {\n continue;\n }\n const label = asString(value.label) ?? asString(value.name) ?? asString(value.title) ?? asString(value.id) ?? key;\n let id = asString(value.id) ?? `zone-${key}`;\n while (seen.has(id)) {\n id = `${id}-${key}`;\n }\n seen.add(id);\n const capacity = asNumber(value.capacity) ?? asNumber(value.seats);\n zones.push({\n id,\n label,\n type: asString(value.type) ?? asString(value.kind),\n capacity: capacity !== undefined && capacity >= 0 ? Math.floor(capacity) : undefined,\n rect: readRect(value, unit),\n });\n }\n return zones;\n}\n\n/**\n * Build the canonical v1 `interactiveAreas` payload. Unknown top-level keys of\n * the previously stored object (e.g. legend or metadata a plan was imported\n * with) are carried over; legacy list keys are replaced by `zones`.\n */\nexport function serializeZones(zones: Zone[], previous?: InteractiveAreasJson): JsonObject {\n const preserved: JsonObject = {};\n const source: JsonObject = isObject(previous) ? previous : {};\n // A legacy keyed-object plan stores each zone as a top-level object; those\n // are superseded by `zones`, so only its scalar metadata is carried over.\n const legacyKeyed = isObject(previous) && unwrapZoneList(previous) === previous;\n for (const [key, value] of Object.entries(source)) {\n if (['zones', 'areas', 'booths', 'version', 'unit'].includes(key)) {\n continue;\n }\n if (legacyKeyed && isObject(value)) {\n continue;\n }\n preserved[key] = value;\n }\n\n return {\n ...preserved,\n version: 1,\n unit: 'percent',\n zones: zones.map((zone) => {\n const entry: JsonObject = { id: zone.id, label: zone.label.trim() };\n if (zone.type) {\n entry.type = zone.type;\n }\n if (zone.capacity !== undefined) {\n entry.capacity = zone.capacity;\n }\n if (zone.rect) {\n entry.x = round2(zone.rect.x);\n entry.y = round2(zone.rect.y);\n entry.w = round2(zone.rect.w);\n entry.h = round2(zone.rect.h);\n }\n return entry;\n }),\n };\n}\n\n/** Round a rectangle to 0.01% so floating-point drag noise never reaches the UI or the stored JSON. */\nexport function roundRect(rect: ZoneRect): ZoneRect {\n const x = round2(rect.x);\n const y = round2(rect.y);\n // Size is capped against the rounded origin so x + w never exceeds 100 after rounding.\n return { x, y, w: Math.min(round2(rect.w), round2(100 - x)), h: Math.min(round2(rect.h), round2(100 - y)) };\n}\n\n/** Normalise two drag points (percent) into a rectangle clamped to the image. */\nexport function rectFromPoints(a: { x: number; y: number }, b: { x: number; y: number }): ZoneRect {\n const x1 = clamp(Math.min(a.x, b.x), 0, 100);\n const y1 = clamp(Math.min(a.y, b.y), 0, 100);\n const x2 = clamp(Math.max(a.x, b.x), 0, 100);\n const y2 = clamp(Math.max(a.y, b.y), 0, 100);\n return roundRect({ x: x1, y: y1, w: x2 - x1, h: y2 - y1 });\n}\n\nexport function isUsableRect(rect: ZoneRect): boolean {\n return rect.w >= MIN_ZONE_SIZE && rect.h >= MIN_ZONE_SIZE;\n}\n\n/** Translate a rectangle, keeping it fully inside the image. */\nexport function moveRect(rect: ZoneRect, dx: number, dy: number): ZoneRect {\n return roundRect({\n ...rect,\n x: clamp(rect.x + dx, 0, 100 - rect.w),\n y: clamp(rect.y + dy, 0, 100 - rect.h),\n });\n}\n\n/** Grow/shrink from the bottom-right corner, keeping a minimum size and the image bounds. */\nexport function resizeRect(rect: ZoneRect, dw: number, dh: number): ZoneRect {\n return roundRect({\n ...rect,\n w: clamp(rect.w + dw, MIN_ZONE_SIZE, 100 - rect.x),\n h: clamp(rect.h + dh, MIN_ZONE_SIZE, 100 - rect.y),\n });\n}\n\n/** A rectangle of the default size centred on the image, for placing an unplaced zone. */\nexport function defaultPlacedRect(): ZoneRect {\n const half = DEFAULT_PLACED_SIZE / 2;\n return { x: 50 - half, y: 50 - half, w: DEFAULT_PLACED_SIZE, h: DEFAULT_PLACED_SIZE };\n}\n\n/** Next free \"<Type> N\" label, so freshly drawn zones are distinguishable. */\nexport function nextZoneLabel(zones: Zone[], type: string = DEFAULT_ZONE_TYPE): string {\n const base = zoneTypeLabel(type) ?? 'Zone';\n const taken = new Set(zones.map((zone) => zone.label.trim().toLowerCase()));\n let n = zones.filter((zone) => (zone.type ?? '') === type).length + 1;\n while (taken.has(`${base} ${n}`.toLowerCase())) {\n n += 1;\n }\n return `${base} ${n}`;\n}\n\nexport function newZoneId(): string {\n if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {\n return crypto.randomUUID();\n }\n return `zone-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;\n}\n\n/**\n * Parse the capacity input. Empty means \"not set\"; anything else must be a\n * non-negative whole number.\n */\nexport function parseCapacity(input: string): { ok: true; value: number | undefined } | { ok: false } {\n const trimmed = input.trim();\n if (trimmed === '') {\n return { ok: true, value: undefined };\n }\n if (!/^\\d+$/.test(trimmed)) {\n return { ok: false };\n }\n const value = Number(trimmed);\n return Number.isSafeInteger(value) ? { ok: true, value } : { ok: false };\n}\n\nexport type ZoneValidationError = { zoneId: string; message: string };\n\n/** Validate zones before persisting. Returns one message per offending zone. */\nexport function validateZones(zones: Zone[]): ZoneValidationError[] {\n const errors: ZoneValidationError[] = [];\n if (zones.length > MAX_ZONES) {\n errors.push({ zoneId: '', message: `A floor plan can hold at most ${MAX_ZONES} zones.` });\n }\n for (const zone of zones) {\n const label = zone.label.trim();\n if (label === '') {\n errors.push({ zoneId: zone.id, message: 'Every zone needs a label.' });\n } else if (label.length > MAX_LABEL_LENGTH) {\n errors.push({\n zoneId: zone.id,\n message: `\"${label.slice(0, 20)}…\" is longer than ${MAX_LABEL_LENGTH} characters.`,\n });\n } else if (zone.capacity !== undefined && (!Number.isSafeInteger(zone.capacity) || zone.capacity < 0)) {\n errors.push({ zoneId: zone.id, message: `\"${label}\" has an invalid capacity.` });\n }\n }\n return errors;\n}\n\nexport type ZoneSummary = { zones: number; booths: number; capacity: number };\n\nexport function summarizeZones(zones: Zone[]): ZoneSummary {\n return {\n zones: zones.length,\n booths: zones.filter((zone) => (zone.type ?? '').toLowerCase().includes('booth')).length,\n capacity: zones.reduce((sum, zone) => sum + (zone.capacity ?? 0), 0),\n };\n}\n\n/** Structural equality used to track unsaved editor changes. */\nexport function zonesEqual(a: Zone[], b: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,EAAe,GAA4B;CACzD,OAAO;EACL,OAAOrC,EAAM;EACb,QAAQA,EAAM,QAAQ,OAAUU,EAAK,QAAQ,GAAA,CAAI,YAAY,CAAC,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC;EAClF,UAAUV,EAAM,QAAQ,GAAK,MAASsC,KAAO5B,EAAK,YAAY,IAAI,CAAC;CACrE;AACF;AAGA,SAAgB6B,EAAW,GAAW,GAAoB;CACxD,OAAO,KAAK,UAAUlC,EAAeS,CAAC,CAAC,MAAM,KAAK,UAAUT,EAAeU,CAAC,CAAC;AAC/E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/eventfullymanaged/lib/format.ts
|
|
2
2
|
function e(e, t) {
|
|
3
3
|
if (!Number.isFinite(e)) return `0 ${t}`.trim();
|
|
4
4
|
let n = (t || "USD").toUpperCase();
|
|
@@ -29,7 +29,6 @@ function r(t, n, r) {
|
|
|
29
29
|
let i = typeof n == "number" ? n : Number(n);
|
|
30
30
|
return t === "PERCENT" ? `${Number.isFinite(i) ? i : n}% off` : `${Number.isFinite(i) ? e(i, r) : n} off`;
|
|
31
31
|
}
|
|
32
|
-
//#endregion
|
|
33
32
|
export { n as computeDiscount, r as describeDiscount, t as describeValidity, e as formatMoney };
|
|
34
33
|
|
|
35
34
|
//# sourceMappingURL=format.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.js","names":[],"sources":["../../../src/eventfullymanaged/lib/format.ts"],"sourcesContent":["/**\n * Presentation helpers shared across the registration & ticketing screens.\n *\n * Pricing is authored by the billing service — these helpers only format the\n * real numbers we already hold (ticket price, promo discount, quantity) for a\n * live order-summary preview. They never invent amounts.\n */\n\n/** Format a decimal amount with its ISO currency code, degrading gracefully. */\nexport function formatMoney(amount: number, currency: string): string {\n if (!Number.isFinite(amount)) {\n return `0 ${currency}`.trim();\n }\n const code = (currency || 'USD').toUpperCase();\n try {\n return new Intl.NumberFormat(undefined, {\n style: 'currency',\n currency: code,\n maximumFractionDigits: Number.isInteger(amount) ? 0 : 2,\n }).format(amount);\n } catch {\n // Unknown/invalid currency code — fall back to a plain, readable amount.\n return `${amount.toLocaleString()} ${code}`.trim();\n }\n}\n\n/**\n * Human label for an open-ended validity window — a promo code's\n * `startsAt`/`endsAt` or a ticket type's `salesStartAt`/`salesEndAt`.\n *\n * Accepts both ISO timestamps (as returned by the API) and the `datetime-local`\n * field values the forms hold; an empty/absent bound simply drops out of the\n * label, and a window with neither bound is \"Ongoing\".\n */\nexport function describeValidity(startsAt: string, endsAt: string): string {\n const fmt = (value: string) =>\n new Date(value).toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric' });\n if (startsAt && endsAt) return `${fmt(startsAt)} – ${fmt(endsAt)}`;\n if (startsAt) return `From ${fmt(startsAt)}`;\n if (endsAt) return `Until ${fmt(endsAt)}`;\n return 'Ongoing';\n}\n\nexport type DiscountType = 'PERCENT' | 'FIXED' | string;\n\n/**\n * Compute the discount an active promo would take off a subtotal, clamped so it\n * never exceeds the subtotal. Returns 0 for unknown types or non-positive input.\n */\nexport function computeDiscount(subtotal: number, discountType: DiscountType, discountValue: number): number {\n if (!Number.isFinite(subtotal) || subtotal <= 0 || !Number.isFinite(discountValue) || discountValue <= 0) {\n return 0;\n }\n const raw = discountType === 'PERCENT' ? (subtotal * discountValue) / 100 : discountValue;\n return Math.min(Math.max(raw, 0), subtotal);\n}\n\n/** Short human label for a promo discount, e.g. \"10% off\" or \"₹1,000 off\". */\nexport function describeDiscount(discountType: DiscountType, discountValue: string | number, currency: string): string {\n const value = typeof discountValue === 'number' ? discountValue : Number(discountValue);\n if (discountType === 'PERCENT') {\n return `${Number.isFinite(value) ? value : discountValue}% off`;\n }\n return `${Number.isFinite(value) ? formatMoney(value, currency) : discountValue} off`;\n}\n"],"mappings":";AASA,
|
|
1
|
+
{"version":3,"file":"format.js","names":["formatMoney","amount","currency","code","describeValidity","fmt","value","startsAt","endsAt","computeDiscount","subtotal","discountValue","raw","discountType","describeDiscount"],"sources":["../../../src/eventfullymanaged/lib/format.ts"],"sourcesContent":["/**\n * Presentation helpers shared across the registration & ticketing screens.\n *\n * Pricing is authored by the billing service — these helpers only format the\n * real numbers we already hold (ticket price, promo discount, quantity) for a\n * live order-summary preview. They never invent amounts.\n */\n\n/** Format a decimal amount with its ISO currency code, degrading gracefully. */\nexport function formatMoney(amount: number, currency: string): string {\n if (!Number.isFinite(amount)) {\n return `0 ${currency}`.trim();\n }\n const code = (currency || 'USD').toUpperCase();\n try {\n return new Intl.NumberFormat(undefined, {\n style: 'currency',\n currency: code,\n maximumFractionDigits: Number.isInteger(amount) ? 0 : 2,\n }).format(amount);\n } catch {\n // Unknown/invalid currency code — fall back to a plain, readable amount.\n return `${amount.toLocaleString()} ${code}`.trim();\n }\n}\n\n/**\n * Human label for an open-ended validity window — a promo code's\n * `startsAt`/`endsAt` or a ticket type's `salesStartAt`/`salesEndAt`.\n *\n * Accepts both ISO timestamps (as returned by the API) and the `datetime-local`\n * field values the forms hold; an empty/absent bound simply drops out of the\n * label, and a window with neither bound is \"Ongoing\".\n */\nexport function describeValidity(startsAt: string, endsAt: string): string {\n const fmt = (value: string) =>\n new Date(value).toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric' });\n if (startsAt && endsAt) return `${fmt(startsAt)} – ${fmt(endsAt)}`;\n if (startsAt) return `From ${fmt(startsAt)}`;\n if (endsAt) return `Until ${fmt(endsAt)}`;\n return 'Ongoing';\n}\n\nexport type DiscountType = 'PERCENT' | 'FIXED' | string;\n\n/**\n * Compute the discount an active promo would take off a subtotal, clamped so it\n * never exceeds the subtotal. Returns 0 for unknown types or non-positive input.\n */\nexport function computeDiscount(subtotal: number, discountType: DiscountType, discountValue: number): number {\n if (!Number.isFinite(subtotal) || subtotal <= 0 || !Number.isFinite(discountValue) || discountValue <= 0) {\n return 0;\n }\n const raw = discountType === 'PERCENT' ? (subtotal * discountValue) / 100 : discountValue;\n return Math.min(Math.max(raw, 0), subtotal);\n}\n\n/** Short human label for a promo discount, e.g. \"10% off\" or \"₹1,000 off\". */\nexport function describeDiscount(discountType: DiscountType, discountValue: string | number, currency: string): string {\n const value = typeof discountValue === 'number' ? discountValue : Number(discountValue);\n if (discountType === 'PERCENT') {\n return `${Number.isFinite(value) ? value : discountValue}% off`;\n }\n return `${Number.isFinite(value) ? formatMoney(value, currency) : discountValue} off`;\n}\n"],"mappings":";AASA,SAAgBA,EAAY,GAAgB,GAA0B;CACpE,IAAI,CAAC,OAAO,SAASC,CAAM,GACzB,OAAO,KAAKC,IAAW,KAAK;CAE9B,IAAMC,KAAQD,KAAY,MAAA,CAAO,YAAY;CAC7C,IAAI;EACF,OAAO,IAAI,KAAK,aAAa,KAAA,GAAW;GACtC,OAAO;GACP,UAAUC;GACV,uBAAuB,OAAO,UAAUF,CAAM,IAAI,IAAI;EACxD,CAAC,CAAC,CAAC,OAAOA,CAAM;CAClB,QAAQ;EAEN,OAAO,GAAGA,EAAO,eAAe,EAAE,GAAGE,IAAO,KAAK;CACnD;AACF;AAUA,SAAgBC,EAAiB,GAAkB,GAAwB;CACzE,IAAMC,KAAO,MACX,IAAI,KAAKC,CAAK,CAAC,CAAC,mBAAmB,KAAA,GAAW;EAAE,OAAO;EAAS,KAAK;EAAW,MAAM;CAAU,CAAC;CAInG,OAHIC,KAAYC,IAAe,GAAGH,EAAIE,CAAQ,EAAE,KAAKF,EAAIG,CAAM,MAC3DD,IAAiB,QAAQF,EAAIE,CAAQ,MACrCC,IAAe,SAASH,EAAIG,CAAM,MAC/B;AACT;AAQA,SAAgBC,EAAgB,GAAkB,GAA4B,GAA+B;CAC3G,IAAI,CAAC,OAAO,SAASC,CAAQ,KAAKA,KAAY,KAAK,CAAC,OAAO,SAASC,CAAa,KAAKA,KAAiB,GACrG,OAAO;CAET,IAAMC,IAAMC,MAAiB,YAAaH,IAAWC,IAAiB,MAAMA;CAC5E,OAAO,KAAK,IAAI,KAAK,IAAIC,GAAK,CAAC,GAAGF,CAAQ;AAC5C;AAGA,SAAgBI,EAAiB,GAA4B,GAAgC,GAA0B;CACrH,IAAMR,IAAQ,OAAOK,KAAkB,WAAWA,IAAgB,OAAOA,CAAa;CAItF,OAHIE,MAAiB,YACZ,GAAG,OAAO,SAASP,CAAK,IAAIA,IAAQK,EAAc,SAEpD,GAAG,OAAO,SAASL,CAAK,IAAIN,EAAYM,GAAOJ,CAAQ,IAAIS,EAAc;AAClF"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { notify as e } from "./toast.js";
|
|
2
|
-
|
|
2
|
+
// src/eventfullymanaged/lib/mutationResult.ts
|
|
3
3
|
function t(t, n, r) {
|
|
4
4
|
return t?.error ? (e.error(r, t.error.message), !1) : n ? !0 : (e.error(r, "The server did not confirm the change. Please try again."), !1);
|
|
5
5
|
}
|
|
6
6
|
function n(e) {
|
|
7
7
|
if (e instanceof Error && e.message.length > 0) return e.message;
|
|
8
8
|
}
|
|
9
|
-
//#endregion
|
|
10
9
|
export { n as describeError, t as mutationSucceeded };
|
|
11
10
|
|
|
12
11
|
//# sourceMappingURL=mutationResult.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutationResult.js","names":[],"sources":["../../../src/eventfullymanaged/lib/mutationResult.ts"],"sourcesContent":["import type { ErrorLike } from '@apollo/client';\n\nimport { notify } from './toast';\n\n/**\n * The shared gateway Apollo client runs mutations with `errorPolicy: 'all'`, so a\n * server-side failure is returned IN-BAND on `result.error` rather than thrown —\n * awaiting the mutation resolves successfully even when nothing was persisted.\n * Write forms must therefore inspect the resolved result before treating a call\n * as a success, or they silently report a fake success and drop the user's data.\n *\n * `mutationSucceeded` centralises that check: it returns `true` only when there is\n * no in-band error AND the expected success payload id is present. Otherwise it\n * surfaces the real reason via the platform toast and returns `false` so the\n * caller keeps the form inputs intact and does not navigate away.\n */\nexport function mutationSucceeded(\n result: { error?: ErrorLike } | null | undefined,\n successId: string | null | undefined,\n failureMessage: string\n): boolean {\n if (result?.error) {\n notify.error(failureMessage, result.error.message);\n return false;\n }\n if (!successId) {\n notify.error(failureMessage, 'The server did not confirm the change. Please try again.');\n return false;\n }\n return true;\n}\n\n/**\n * Normalises a thrown error (network failure, or a client configured with\n * `errorPolicy: 'none'`) into a human-readable description for the toast.\n */\nexport function describeError(error: unknown): string | undefined {\n if (error instanceof Error && error.message.length > 0) {\n return error.message;\n }\n return undefined;\n}\n"],"mappings":";;AAgBA,
|
|
1
|
+
{"version":3,"file":"mutationResult.js","names":["mutationSucceeded","result","notify","failureMessage","successId","describeError","error"],"sources":["../../../src/eventfullymanaged/lib/mutationResult.ts"],"sourcesContent":["import type { ErrorLike } from '@apollo/client';\n\nimport { notify } from './toast';\n\n/**\n * The shared gateway Apollo client runs mutations with `errorPolicy: 'all'`, so a\n * server-side failure is returned IN-BAND on `result.error` rather than thrown —\n * awaiting the mutation resolves successfully even when nothing was persisted.\n * Write forms must therefore inspect the resolved result before treating a call\n * as a success, or they silently report a fake success and drop the user's data.\n *\n * `mutationSucceeded` centralises that check: it returns `true` only when there is\n * no in-band error AND the expected success payload id is present. Otherwise it\n * surfaces the real reason via the platform toast and returns `false` so the\n * caller keeps the form inputs intact and does not navigate away.\n */\nexport function mutationSucceeded(\n result: { error?: ErrorLike } | null | undefined,\n successId: string | null | undefined,\n failureMessage: string\n): boolean {\n if (result?.error) {\n notify.error(failureMessage, result.error.message);\n return false;\n }\n if (!successId) {\n notify.error(failureMessage, 'The server did not confirm the change. Please try again.');\n return false;\n }\n return true;\n}\n\n/**\n * Normalises a thrown error (network failure, or a client configured with\n * `errorPolicy: 'none'`) into a human-readable description for the toast.\n */\nexport function describeError(error: unknown): string | undefined {\n if (error instanceof Error && error.message.length > 0) {\n return error.message;\n }\n return undefined;\n}\n"],"mappings":";;AAgBA,SAAgBA,EACd,GACA,GACA,GACS;CAST,OARIC,GAAQ,SACVC,EAAO,MAAMC,GAAgBF,EAAO,MAAM,OAAO,GAC1C,MAEJG,IAIE,MAHLF,EAAO,MAAMC,GAAgB,0DAA0D,GAChF;AAGX;AAMA,SAAgBE,EAAc,GAAoC;CAChE,IAAIC,aAAiB,SAASA,EAAM,QAAQ,SAAS,GACnD,OAAOA,EAAM;AAGjB"}
|