@tak-ps/cloudtak 12.54.0 → 12.94.0
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/package.json +26 -17
- package/dist/types/plugin.d.ts +0 -99
- package/dist/types/src/App.vue.d.ts +0 -5
- package/dist/types/src/base/chatroom-chats.d.ts +0 -17
- package/dist/types/src/base/chatroom.d.ts +0 -47
- package/dist/types/src/base/cot.d.ts +0 -94
- package/dist/types/src/base/database.d.ts +0 -115
- package/dist/types/src/base/events.d.ts +0 -30
- package/dist/types/src/base/filter.d.ts +0 -41
- package/dist/types/src/base/handler.d.ts +0 -11
- package/dist/types/src/base/icon.d.ts +0 -4
- package/dist/types/src/base/notification.d.ts +0 -37
- package/dist/types/src/base/overlay.d.ts +0 -94
- package/dist/types/src/base/subscription-feature.d.ts +0 -49
- package/dist/types/src/base/subscription-log.d.ts +0 -32
- package/dist/types/src/base/subscription.d.ts +0 -115
- package/dist/types/src/base/utils/styles.d.ts +0 -11
- package/dist/types/src/base/validators.d.ts +0 -9
- package/dist/types/src/components/Admin/AdminImports.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/AdminLayers.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/AdminMissionTemplate.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/AdminMissionTemplateLog.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/AdminMissionTemplates.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/AdminOverlays.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/AdminPalette.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/AdminPaletteFeature.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/AdminPalettes.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/AdminServer.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/AdminTasks.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/AdminUser.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/AdminUsers.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/AdminVideos.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/Server/ServerConnection.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/Server/ServerInjectorModal.vue.d.ts +0 -11
- package/dist/types/src/components/Admin/Server/ServerInjectors.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/Server/ServerPackages.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/Server/ServerRepeaters.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/Server/ServerVideos.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/Tasks/AdminRawTasks.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/Videos/AdminVideoLeases.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/Videos/AdminVideoService.vue.d.ts +0 -3
- package/dist/types/src/components/Admin/Videos/VideoConfig.vue.d.ts +0 -7
- package/dist/types/src/components/Admin/Videos/VideoConfigPort.vue.d.ts +0 -8
- package/dist/types/src/components/CloudTAK/CoTView.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/CoordInput.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/DrawTools.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/FeatView.vue.d.ts +0 -8
- package/dist/types/src/components/CloudTAK/GeoJSONInput.vue.d.ts +0 -24
- package/dist/types/src/components/CloudTAK/MainMenu.vue.d.ts +0 -9
- package/dist/types/src/components/CloudTAK/MainMenuContents.vue.d.ts +0 -16
- package/dist/types/src/components/CloudTAK/Map.vue.d.ts +0 -8
- package/dist/types/src/components/CloudTAK/MapLoading.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/Debugger.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuBasemaps.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuChannels.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuChats.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuConnections.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuContacts.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuFeatures.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuFeaturesDeleted.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuFiles.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuImport.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuImports.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuItemCard.vue.d.ts +0 -101
- package/dist/types/src/components/CloudTAK/Menu/MenuMission.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuMissions.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuOverlayExplorer.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuOverlays.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuPackage.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuPackages.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuRoutes.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuRoutesNew.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuSettings.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuSettingsCallsign.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuSettingsDisplay.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuVideos.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/MenuVideosRemote.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionContents.vue.d.ts +0 -11
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionCreate.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionInfo.vue.d.ts +0 -11
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionInviteModal.vue.d.ts +0 -17
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerCreate.vue.d.ts +0 -13
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerEdit.vue.d.ts +0 -15
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayerTree.vue.d.ts +0 -15
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLayers.vue.d.ts +0 -8
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLog.vue.d.ts +0 -9
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionLogs.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionTimeline.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/Menu/Mission/MissionUsers.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/Menu/Mission/PendingInvites.vue.d.ts +0 -11
- package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeMission.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/Menu/Overlays/TreeVector.vue.d.ts +0 -13
- package/dist/types/src/components/CloudTAK/Menu/Videos/VideoLeaseModal.vue.d.ts +0 -16
- package/dist/types/src/components/CloudTAK/Menu/Videos/VideosRemoteFeed.vue.d.ts +0 -13
- package/dist/types/src/components/CloudTAK/Notifications.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/Query/Magnetic.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/Query/Reverse.vue.d.ts +0 -8
- package/dist/types/src/components/CloudTAK/Query/Sun.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/Query/Weather.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/QueryView.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/RangeInput.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/RangeRingsInput.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/util/Breadcrumb.vue.d.ts +0 -6
- package/dist/types/src/components/CloudTAK/util/ChannelInfo.vue.d.ts +0 -15
- package/dist/types/src/components/CloudTAK/util/ContactPuck.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/util/Coordinate.vue.d.ts +0 -67
- package/dist/types/src/components/CloudTAK/util/CoordinateType.vue.d.ts +0 -27
- package/dist/types/src/components/CloudTAK/util/CopyButton.vue.d.ts +0 -32
- package/dist/types/src/components/CloudTAK/util/CopyField.vue.d.ts +0 -122
- package/dist/types/src/components/CloudTAK/util/DrawOverlay.vue.d.ts +0 -3
- package/dist/types/src/components/CloudTAK/util/EmptyInfo.vue.d.ts +0 -24
- package/dist/types/src/components/CloudTAK/util/FeatureIcon.vue.d.ts +0 -23
- package/dist/types/src/components/CloudTAK/util/FeatureRow.vue.d.ts +0 -81
- package/dist/types/src/components/CloudTAK/util/FloatingAttachment.vue.d.ts +0 -17
- package/dist/types/src/components/CloudTAK/util/FloatingVideo.vue.d.ts +0 -27
- package/dist/types/src/components/CloudTAK/util/GroupSelect.vue.d.ts +0 -14
- package/dist/types/src/components/CloudTAK/util/JSONModal.vue.d.ts +0 -27
- package/dist/types/src/components/CloudTAK/util/Keywords.vue.d.ts +0 -6
- package/dist/types/src/components/CloudTAK/util/LineLength.vue.d.ts +0 -24
- package/dist/types/src/components/CloudTAK/util/MenuTemplate.vue.d.ts +0 -71
- package/dist/types/src/components/CloudTAK/util/MultipleSelect.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/util/NotificationIcon.vue.d.ts +0 -10
- package/dist/types/src/components/CloudTAK/util/NotificationToast.vue.d.ts +0 -13
- package/dist/types/src/components/CloudTAK/util/PolygonArea.vue.d.ts +0 -24
- package/dist/types/src/components/CloudTAK/util/PropertyBattery.vue.d.ts +0 -13
- package/dist/types/src/components/CloudTAK/util/PropertyBearing.vue.d.ts +0 -58
- package/dist/types/src/components/CloudTAK/util/PropertyCreator.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/util/PropertyDistance.vue.d.ts +0 -54
- package/dist/types/src/components/CloudTAK/util/PropertyElevation.vue.d.ts +0 -32
- package/dist/types/src/components/CloudTAK/util/PropertyEmail.vue.d.ts +0 -13
- package/dist/types/src/components/CloudTAK/util/PropertyLinks.vue.d.ts +0 -14
- package/dist/types/src/components/CloudTAK/util/PropertyMetadata.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/util/PropertyMilSym.vue.d.ts +0 -25
- package/dist/types/src/components/CloudTAK/util/PropertyPhone.vue.d.ts +0 -13
- package/dist/types/src/components/CloudTAK/util/PropertySpeed.vue.d.ts +0 -23
- package/dist/types/src/components/CloudTAK/util/PropertyStyle.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/util/PropertyTimes.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/util/PropertyType.vue.d.ts +0 -27
- package/dist/types/src/components/CloudTAK/util/SearchBox.vue.d.ts +0 -37
- package/dist/types/src/components/CloudTAK/util/SelectFeats.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/util/SettingsCallsign.vue.d.ts +0 -28
- package/dist/types/src/components/CloudTAK/util/Share.vue.d.ts +0 -14
- package/dist/types/src/components/CloudTAK/util/ShareToMission.vue.d.ts +0 -53
- package/dist/types/src/components/CloudTAK/util/ShareToPackage.vue.d.ts +0 -62
- package/dist/types/src/components/CloudTAK/util/SlideDownHeader.vue.d.ts +0 -41
- package/dist/types/src/components/CloudTAK/util/StandardItem.vue.d.ts +0 -18
- package/dist/types/src/components/CloudTAK/util/Subscriptions.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/util/VideoLeaseSourceType.vue.d.ts +0 -6
- package/dist/types/src/components/CloudTAK/util/WarnChannels.vue.d.ts +0 -7
- package/dist/types/src/components/CloudTAK/util/WarnConfiguration.vue.d.ts +0 -7
- package/dist/types/src/components/Configure.vue.d.ts +0 -3
- package/dist/types/src/components/ETL/Connection/AgencyBadge.vue.d.ts +0 -8
- package/dist/types/src/components/ETL/Connection/ConnectionFiles.vue.d.ts +0 -3
- package/dist/types/src/components/ETL/Connection/ConnectionTokens.vue.d.ts +0 -3
- package/dist/types/src/components/ETL/Connection/ConnectionVideos.vue.d.ts +0 -3
- package/dist/types/src/components/ETL/Connection/StatusDot.vue.d.ts +0 -13
- package/dist/types/src/components/ETL/Connection/TokenModal.vue.d.ts +0 -16
- package/dist/types/src/components/ETL/Connection.vue.d.ts +0 -3
- package/dist/types/src/components/ETL/ConnectionCard.vue.d.ts +0 -16
- package/dist/types/src/components/ETL/Connections.vue.d.ts +0 -3
- package/dist/types/src/components/ETL/Data.vue.d.ts +0 -3
- package/dist/types/src/components/ETL/Layer/LayerIncomingConfig.vue.d.ts +0 -27
- package/dist/types/src/components/ETL/Layer/LayerOutgoingConfig.vue.d.ts +0 -27
- package/dist/types/src/components/ETL/Layer/utils/QueryInput.vue.d.ts +0 -56
- package/dist/types/src/components/ETL/Layer/utils/StatusDot.vue.d.ts +0 -7
- package/dist/types/src/components/ETL/Layer.vue.d.ts +0 -3
- package/dist/types/src/components/Home.vue.d.ts +0 -13
- package/dist/types/src/components/Loading.vue.d.ts +0 -3
- package/dist/types/src/components/Login.vue.d.ts +0 -7
- package/dist/types/src/components/LostUser.vue.d.ts +0 -3
- package/dist/types/src/components/PageFooter.vue.d.ts +0 -3
- package/dist/types/src/components/ServerAdmin.vue.d.ts +0 -3
- package/dist/types/src/components/VideoWall/Main.vue.d.ts +0 -3
- package/dist/types/src/components/VideoWall.vue.d.ts +0 -13
- package/dist/types/src/components/util/GroupSelect.vue.d.ts +0 -14
- package/dist/types/src/components/util/InitialAuthor.vue.d.ts +0 -6
- package/dist/types/src/components/util/StatusDot.vue.d.ts +0 -8
- package/dist/types/src/components/util/Upload.vue.d.ts +0 -46
- package/dist/types/src/components/util/UploadLogo.vue.d.ts +0 -14
- package/dist/types/src/main.d.ts +0 -1
- package/dist/types/src/pages/admin/main.d.ts +0 -1
- package/dist/types/src/pages/connection/main.d.ts +0 -1
- package/dist/types/src/pages/docs/App.vue.d.ts +0 -4
- package/dist/types/src/pages/docs/main.d.ts +0 -1
- package/dist/types/src/pages/video/main.d.ts +0 -1
- package/dist/types/src/std.d.ts +0 -19
- package/dist/types/src/stores/brand.d.ts +0 -7
- package/dist/types/src/stores/float.d.ts +0 -42
- package/dist/types/src/stores/map.d.ts +0 -115
- package/dist/types/src/stores/modules/draw.d.ts +0 -35
- package/dist/types/src/stores/modules/icons.d.ts +0 -38
- package/dist/types/src/stores/modules/menu.d.ts +0 -34
- package/dist/types/src/test/setup.d.ts +0 -1
- package/dist/types/src/timediff.d.ts +0 -1
- package/dist/types/src/types.d.ts +0 -158
- package/dist/types/src/video.d.ts +0 -1
- package/dist/types/src/workers/atlas-connection.d.ts +0 -12
- package/dist/types/src/workers/atlas-database.d.ts +0 -134
- package/dist/types/src/workers/atlas-profile.d.ts +0 -39
- package/dist/types/src/workers/atlas-team.d.ts +0 -13
- package/dist/types/src/workers/atlas.d.ts +0 -19
- package/src/App.vue +0 -341
- package/src/base/chatroom-chats.ts +0 -124
- package/src/base/chatroom.ts +0 -202
- package/src/base/cot.ts +0 -625
- package/src/base/database.ts +0 -150
- package/src/base/events.ts +0 -43
- package/src/base/filter.ts +0 -163
- package/src/base/handler.ts +0 -67
- package/src/base/icon.ts +0 -16
- package/src/base/notification.ts +0 -163
- package/src/base/overlay.ts +0 -558
- package/src/base/subscription-feature.ts +0 -224
- package/src/base/subscription-log.ts +0 -174
- package/src/base/subscription.ts +0 -489
- package/src/base/utils/styles.ts +0 -430
- package/src/base/validators.ts +0 -66
- package/src/components/Admin/AdminConfig.vue +0 -487
- package/src/components/Admin/AdminConnections.vue +0 -195
- package/src/components/Admin/AdminDatas.vue +0 -165
- package/src/components/Admin/AdminExport.vue +0 -121
- package/src/components/Admin/AdminImports.vue +0 -222
- package/src/components/Admin/AdminLayerTemplate.vue +0 -91
- package/src/components/Admin/AdminLayers.vue +0 -301
- package/src/components/Admin/AdminMissionTemplate.vue +0 -259
- package/src/components/Admin/AdminMissionTemplateLog.vue +0 -273
- package/src/components/Admin/AdminMissionTemplates.vue +0 -189
- package/src/components/Admin/AdminOverlays.vue +0 -232
- package/src/components/Admin/AdminOverlaysEdit.vue +0 -355
- package/src/components/Admin/AdminPalette.vue +0 -214
- package/src/components/Admin/AdminPaletteFeature.vue +0 -208
- package/src/components/Admin/AdminPalettes.vue +0 -189
- package/src/components/Admin/AdminServer.vue +0 -143
- package/src/components/Admin/AdminTasks.vue +0 -60
- package/src/components/Admin/AdminUser.vue +0 -263
- package/src/components/Admin/AdminUsers.vue +0 -183
- package/src/components/Admin/AdminVideos.vue +0 -60
- package/src/components/Admin/Server/ServerConnection.vue +0 -322
- package/src/components/Admin/Server/ServerInjectorModal.vue +0 -125
- package/src/components/Admin/Server/ServerInjectors.vue +0 -104
- package/src/components/Admin/Server/ServerPackages.vue +0 -159
- package/src/components/Admin/Server/ServerRepeaters.vue +0 -105
- package/src/components/Admin/Server/ServerVideos.vue +0 -83
- package/src/components/Admin/Tasks/AdminRawTasks.vue +0 -148
- package/src/components/Admin/Tasks/AdminTasks.vue +0 -286
- package/src/components/Admin/Videos/AdminVideoLeases.vue +0 -198
- package/src/components/Admin/Videos/AdminVideoService.vue +0 -67
- package/src/components/Admin/Videos/VideoConfig.vue +0 -132
- package/src/components/Admin/Videos/VideoConfigPath.vue +0 -58
- package/src/components/Admin/Videos/VideoConfigPort.vue +0 -40
- package/src/components/CloudTAK/CoTView.vue +0 -915
- package/src/components/CloudTAK/CoordInput.vue +0 -110
- package/src/components/CloudTAK/DrawTools.vue +0 -200
- package/src/components/CloudTAK/FeatView.vue +0 -242
- package/src/components/CloudTAK/GeoJSONInput.vue +0 -226
- package/src/components/CloudTAK/MainMenu.vue +0 -190
- package/src/components/CloudTAK/MainMenuContents.vue +0 -360
- package/src/components/CloudTAK/Map.vue +0 -972
- package/src/components/CloudTAK/MapLoading.vue +0 -31
- package/src/components/CloudTAK/Menu/Basemaps/EditModal.vue +0 -427
- package/src/components/CloudTAK/Menu/Debugger.vue +0 -118
- package/src/components/CloudTAK/Menu/Iconset/EditModal.vue +0 -118
- package/src/components/CloudTAK/Menu/MenuBasemaps.vue +0 -410
- package/src/components/CloudTAK/Menu/MenuChannels.vue +0 -206
- package/src/components/CloudTAK/Menu/MenuChat.vue +0 -222
- package/src/components/CloudTAK/Menu/MenuChats.vue +0 -167
- package/src/components/CloudTAK/Menu/MenuConnections.vue +0 -166
- package/src/components/CloudTAK/Menu/MenuContacts.vue +0 -245
- package/src/components/CloudTAK/Menu/MenuFeatures.vue +0 -718
- package/src/components/CloudTAK/Menu/MenuFeaturesDeleted.vue +0 -217
- package/src/components/CloudTAK/Menu/MenuFiles.vue +0 -433
- package/src/components/CloudTAK/Menu/MenuIcon.vue +0 -236
- package/src/components/CloudTAK/Menu/MenuIconset.vue +0 -128
- package/src/components/CloudTAK/Menu/MenuIconsets.vue +0 -266
- package/src/components/CloudTAK/Menu/MenuImport.vue +0 -198
- package/src/components/CloudTAK/Menu/MenuImports.vue +0 -199
- package/src/components/CloudTAK/Menu/MenuItemCard.vue +0 -240
- package/src/components/CloudTAK/Menu/MenuMission.vue +0 -324
- package/src/components/CloudTAK/Menu/MenuMissions.vue +0 -334
- package/src/components/CloudTAK/Menu/MenuOverlayExplorer.vue +0 -434
- package/src/components/CloudTAK/Menu/MenuOverlays.vue +0 -560
- package/src/components/CloudTAK/Menu/MenuPackage.vue +0 -340
- package/src/components/CloudTAK/Menu/MenuPackages.vue +0 -193
- package/src/components/CloudTAK/Menu/MenuRoutes.vue +0 -186
- package/src/components/CloudTAK/Menu/MenuRoutesNew.vue +0 -193
- package/src/components/CloudTAK/Menu/MenuSettings.vue +0 -95
- package/src/components/CloudTAK/Menu/MenuSettingsCallsign.vue +0 -12
- package/src/components/CloudTAK/Menu/MenuSettingsDisplay.vue +0 -144
- package/src/components/CloudTAK/Menu/MenuSettingsTokens.vue +0 -83
- package/src/components/CloudTAK/Menu/MenuVideos.vue +0 -436
- package/src/components/CloudTAK/Menu/MenuVideosRemote.vue +0 -203
- package/src/components/CloudTAK/Menu/Mission/MissionContents.vue +0 -211
- package/src/components/CloudTAK/Menu/Mission/MissionCreate.vue +0 -372
- package/src/components/CloudTAK/Menu/Mission/MissionInfo.vue +0 -331
- package/src/components/CloudTAK/Menu/Mission/MissionInviteModal.vue +0 -107
- package/src/components/CloudTAK/Menu/Mission/MissionLayerCreate.vue +0 -77
- package/src/components/CloudTAK/Menu/Mission/MissionLayerEdit.vue +0 -77
- package/src/components/CloudTAK/Menu/Mission/MissionLayerTree.vue +0 -194
- package/src/components/CloudTAK/Menu/Mission/MissionLayers.vue +0 -157
- package/src/components/CloudTAK/Menu/Mission/MissionLog.vue +0 -170
- package/src/components/CloudTAK/Menu/Mission/MissionLogs.vue +0 -194
- package/src/components/CloudTAK/Menu/Mission/MissionTimeline.vue +0 -142
- package/src/components/CloudTAK/Menu/Mission/MissionUsers.vue +0 -74
- package/src/components/CloudTAK/Menu/Mission/PendingInvites.vue +0 -130
- package/src/components/CloudTAK/Menu/Overlays/DeleteModal.vue +0 -57
- package/src/components/CloudTAK/Menu/Overlays/TreeCots.vue +0 -497
- package/src/components/CloudTAK/Menu/Overlays/TreeMission.vue +0 -32
- package/src/components/CloudTAK/Menu/Overlays/TreeVector.vue +0 -113
- package/src/components/CloudTAK/Menu/Settings/TokenModal.vue +0 -110
- package/src/components/CloudTAK/Menu/Videos/VideoLeaseModal.vue +0 -753
- package/src/components/CloudTAK/Menu/Videos/VideosRemoteFeed.vue +0 -75
- package/src/components/CloudTAK/Notifications.vue +0 -195
- package/src/components/CloudTAK/Query/Magnetic.vue +0 -80
- package/src/components/CloudTAK/Query/Reverse.vue +0 -65
- package/src/components/CloudTAK/Query/Sun.vue +0 -178
- package/src/components/CloudTAK/Query/Weather.vue +0 -195
- package/src/components/CloudTAK/QueryView.vue +0 -134
- package/src/components/CloudTAK/RadialMenu/LICENSE +0 -21
- package/src/components/CloudTAK/RadialMenu/README.md +0 -63
- package/src/components/CloudTAK/RadialMenu/RadialMenu.css +0 -85
- package/src/components/CloudTAK/RadialMenu/RadialMenu.js +0 -534
- package/src/components/CloudTAK/RadialMenu/RadialMenu.vue +0 -257
- package/src/components/CloudTAK/RangeInput.vue +0 -155
- package/src/components/CloudTAK/RangeRingsInput.vue +0 -269
- package/src/components/CloudTAK/util/Breadcrumb.vue +0 -85
- package/src/components/CloudTAK/util/ChannelInfo.vue +0 -25
- package/src/components/CloudTAK/util/Contact.vue +0 -131
- package/src/components/CloudTAK/util/ContactPuck.vue +0 -40
- package/src/components/CloudTAK/util/Coordinate.vue +0 -313
- package/src/components/CloudTAK/util/CoordinateType.vue +0 -134
- package/src/components/CloudTAK/util/CopyButton.vue +0 -67
- package/src/components/CloudTAK/util/CopyField.vue +0 -286
- package/src/components/CloudTAK/util/DrawOverlay.vue +0 -254
- package/src/components/CloudTAK/util/EmptyInfo.vue +0 -71
- package/src/components/CloudTAK/util/FeatureIcon.vue +0 -134
- package/src/components/CloudTAK/util/FeatureRow.vue +0 -206
- package/src/components/CloudTAK/util/FloatingAttachment.vue +0 -191
- package/src/components/CloudTAK/util/FloatingVideo.vue +0 -654
- package/src/components/CloudTAK/util/GenericSelect.vue +0 -125
- package/src/components/CloudTAK/util/GroupSelect.vue +0 -129
- package/src/components/CloudTAK/util/Icons.vue +0 -146
- package/src/components/CloudTAK/util/JSONModal.vue +0 -57
- package/src/components/CloudTAK/util/Keywords.vue +0 -31
- package/src/components/CloudTAK/util/LineLength.vue +0 -121
- package/src/components/CloudTAK/util/MenuItem.vue +0 -21
- package/src/components/CloudTAK/util/MenuTemplate.vue +0 -137
- package/src/components/CloudTAK/util/MultipleSelect.vue +0 -103
- package/src/components/CloudTAK/util/NotificationIcon.vue +0 -50
- package/src/components/CloudTAK/util/NotificationToast.vue +0 -125
- package/src/components/CloudTAK/util/PolygonArea.vue +0 -109
- package/src/components/CloudTAK/util/PropertyAttachments.vue +0 -224
- package/src/components/CloudTAK/util/PropertyBattery.vue +0 -44
- package/src/components/CloudTAK/util/PropertyBearing.vue +0 -148
- package/src/components/CloudTAK/util/PropertyCreator.vue +0 -61
- package/src/components/CloudTAK/util/PropertyDistance.vue +0 -182
- package/src/components/CloudTAK/util/PropertyElevation.vue +0 -84
- package/src/components/CloudTAK/util/PropertyEmail.vue +0 -44
- package/src/components/CloudTAK/util/PropertyLinks.vue +0 -148
- package/src/components/CloudTAK/util/PropertyMetadata.vue +0 -53
- package/src/components/CloudTAK/util/PropertyMilSym.vue +0 -62
- package/src/components/CloudTAK/util/PropertyPhone.vue +0 -61
- package/src/components/CloudTAK/util/PropertySensor.vue +0 -129
- package/src/components/CloudTAK/util/PropertySpeed.vue +0 -91
- package/src/components/CloudTAK/util/PropertyStyle.vue +0 -202
- package/src/components/CloudTAK/util/PropertyTimes.vue +0 -95
- package/src/components/CloudTAK/util/PropertyType.vue +0 -274
- package/src/components/CloudTAK/util/SearchBox.vue +0 -314
- package/src/components/CloudTAK/util/SelectFeats.vue +0 -190
- package/src/components/CloudTAK/util/SettingsCallsign.vue +0 -151
- package/src/components/CloudTAK/util/Share.vue +0 -496
- package/src/components/CloudTAK/util/ShareToMission.vue +0 -223
- package/src/components/CloudTAK/util/ShareToPackage.vue +0 -250
- package/src/components/CloudTAK/util/SlideDownHeader.vue +0 -92
- package/src/components/CloudTAK/util/StandardItem.vue +0 -42
- package/src/components/CloudTAK/util/Subscriptions.vue +0 -151
- package/src/components/CloudTAK/util/TagEntry.vue +0 -301
- package/src/components/CloudTAK/util/UploadImport.vue +0 -195
- package/src/components/CloudTAK/util/VideoLeaseSourceType.vue +0 -66
- package/src/components/CloudTAK/util/WarnChannels.vue +0 -56
- package/src/components/CloudTAK/util/WarnConfiguration.vue +0 -34
- package/src/components/Configure.vue +0 -259
- package/src/components/ETL/Connection/AgencyBadge.vue +0 -102
- package/src/components/ETL/Connection/AgencySelect.vue +0 -185
- package/src/components/ETL/Connection/CertificateLogin.vue +0 -75
- package/src/components/ETL/Connection/CertificateMachineUser.vue +0 -228
- package/src/components/ETL/Connection/CertificateP12.vue +0 -104
- package/src/components/ETL/Connection/CertificateRaw.vue +0 -50
- package/src/components/ETL/Connection/ConnectionData.vue +0 -174
- package/src/components/ETL/Connection/ConnectionFiles.vue +0 -182
- package/src/components/ETL/Connection/ConnectionGroups.vue +0 -181
- package/src/components/ETL/Connection/ConnectionLayer.vue +0 -180
- package/src/components/ETL/Connection/ConnectionTokens.vue +0 -147
- package/src/components/ETL/Connection/ConnectionVideos.vue +0 -151
- package/src/components/ETL/Connection/Events.vue +0 -88
- package/src/components/ETL/Connection/StatusDot.vue +0 -48
- package/src/components/ETL/Connection/TokenModal.vue +0 -136
- package/src/components/ETL/Connection.vue +0 -194
- package/src/components/ETL/ConnectionCard.vue +0 -265
- package/src/components/ETL/ConnectionEdit.vue +0 -448
- package/src/components/ETL/Connections.vue +0 -148
- package/src/components/ETL/Data/DataFiles.vue +0 -245
- package/src/components/ETL/Data/DataGroups.vue +0 -45
- package/src/components/ETL/Data/DataLayer.vue +0 -144
- package/src/components/ETL/Data/Location.vue +0 -238
- package/src/components/ETL/Data.vue +0 -259
- package/src/components/ETL/DataEdit.vue +0 -212
- package/src/components/ETL/Layer/LayerAlarm.vue +0 -307
- package/src/components/ETL/Layer/LayerDeployment.vue +0 -388
- package/src/components/ETL/Layer/LayerEnvironment.vue +0 -259
- package/src/components/ETL/Layer/LayerIncomingConfig.vue +0 -401
- package/src/components/ETL/Layer/LayerIncomingEnvironmentArcGIS.vue +0 -354
- package/src/components/ETL/Layer/LayerIncomingSchema.vue +0 -138
- package/src/components/ETL/Layer/LayerIncomingStyles.vue +0 -349
- package/src/components/ETL/Layer/LayerOutgoingConfig.vue +0 -204
- package/src/components/ETL/Layer/LayerOutgoingEnvironmentArcGIS.vue +0 -279
- package/src/components/ETL/Layer/utils/QueryInput.vue +0 -52
- package/src/components/ETL/Layer/utils/Schema.vue +0 -322
- package/src/components/ETL/Layer/utils/SchemaModal.vue +0 -77
- package/src/components/ETL/Layer/utils/StatusDot.vue +0 -38
- package/src/components/ETL/Layer/utils/StyleLinkModal.vue +0 -83
- package/src/components/ETL/Layer/utils/StyleLinks.vue +0 -139
- package/src/components/ETL/Layer/utils/StyleSingle.vue +0 -885
- package/src/components/ETL/Layer/utils/StyleTemplate.vue +0 -97
- package/src/components/ETL/Layer/utils/TaskModal.vue +0 -217
- package/src/components/ETL/Layer.vue +0 -560
- package/src/components/ETL/LayerEdit.vue +0 -276
- package/src/components/ETL/Styling/Layer.vue +0 -311
- package/src/components/ETL/Styling/ObjectInput.vue +0 -46
- package/src/components/ETL/Styling/Style.vue +0 -233
- package/src/components/Home.vue +0 -17
- package/src/components/Loading.vue +0 -42
- package/src/components/Login.vue +0 -198
- package/src/components/LostUser.vue +0 -31
- package/src/components/PageFooter.vue +0 -41
- package/src/components/ServerAdmin.vue +0 -408
- package/src/components/VideoWall/Main.vue +0 -79
- package/src/components/VideoWall.vue +0 -17
- package/src/components/util/DataSelect.vue +0 -148
- package/src/components/util/EsriFilter.vue +0 -140
- package/src/components/util/EsriPortal.vue +0 -422
- package/src/components/util/EsriPortalCreate.vue +0 -72
- package/src/components/util/EsriServer.vue +0 -368
- package/src/components/util/GroupSelect.vue +0 -166
- package/src/components/util/IconSelect.vue +0 -302
- package/src/components/util/InitialAuthor.vue +0 -28
- package/src/components/util/LayerSelect.vue +0 -162
- package/src/components/util/LayerTaskSelect.vue +0 -311
- package/src/components/util/LayerTemplateSelect.vue +0 -173
- package/src/components/util/LoginModal.vue +0 -110
- package/src/components/util/PublicTilesSelect.vue +0 -171
- package/src/components/util/StatusDot.vue +0 -31
- package/src/components/util/TableFooter.vue +0 -64
- package/src/components/util/TableHeader.vue +0 -127
- package/src/components/util/Upload.vue +0 -220
- package/src/components/util/UploadCSV.vue +0 -46
- package/src/components/util/UploadLogo.vue +0 -83
- package/src/components/util/UploadP12.vue +0 -93
- package/src/components/util/UserSelect.vue +0 -151
- package/src/derived-types.d.ts +0 -35243
- package/src/main.ts +0 -264
- package/src/pages/admin/main.ts +0 -208
- package/src/pages/connection/main.ts +0 -158
- package/src/pages/docs/App.vue +0 -19
- package/src/pages/docs/main.ts +0 -6
- package/src/pages/video/main.ts +0 -27
- package/src/std.ts +0 -152
- package/src/stores/brand.ts +0 -28
- package/src/stores/float.ts +0 -113
- package/src/stores/map.ts +0 -931
- package/src/stores/modules/draw.ts +0 -413
- package/src/stores/modules/icons.ts +0 -185
- package/src/stores/modules/menu.ts +0 -281
- package/src/test/setup.ts +0 -43
- package/src/timediff.ts +0 -33
- package/src/types.ts +0 -226
- package/src/video.ts +0 -27
- package/src/vite-env.d.ts +0 -9
- package/src/workers/atlas-connection.ts +0 -236
- package/src/workers/atlas-database.ts +0 -764
- package/src/workers/atlas-profile.ts +0 -374
- package/src/workers/atlas-team.ts +0 -90
- package/src/workers/atlas.ts +0 -81
|
@@ -1,764 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* AtlasConnection - Maintain the WebSocket connection with CloudTAK Server
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { std } from '../std.ts';
|
|
6
|
-
import { LngLatBounds } from 'maplibre-gl'
|
|
7
|
-
import jsonata from 'jsonata';
|
|
8
|
-
import type Atlas from './atlas.ts';
|
|
9
|
-
import Subscription from '../base/subscription.ts';
|
|
10
|
-
import { coordEach } from '@turf/meta'
|
|
11
|
-
import COT, { OriginMode } from '../base/cot.ts';
|
|
12
|
-
import { WorkerMessageType } from '../base/events.ts';
|
|
13
|
-
import type { GeoJSONSourceDiff, LngLatLike } from 'maplibre-gl';
|
|
14
|
-
import { booleanWithin } from '@turf/boolean-within';
|
|
15
|
-
import type { Polygon } from 'geojson';
|
|
16
|
-
import type { InputFeature, Feature, APIList } from '../types.ts';
|
|
17
|
-
|
|
18
|
-
type NestedArray = {
|
|
19
|
-
path: string;
|
|
20
|
-
count: number;
|
|
21
|
-
paths: Array<NestedArray>;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default class AtlasDatabase {
|
|
25
|
-
atlas: Atlas;
|
|
26
|
-
|
|
27
|
-
cots: Map<string, COT>;
|
|
28
|
-
|
|
29
|
-
// Stores Active Mission if present
|
|
30
|
-
mission?: string;
|
|
31
|
-
|
|
32
|
-
pendingCreate: Map<string, COT>;
|
|
33
|
-
pendingUpdate: Map<string, COT>;
|
|
34
|
-
pendingHidden: Set<string>;
|
|
35
|
-
pendingUnhide: Set<string>;
|
|
36
|
-
pendingDelete: Set<string>;
|
|
37
|
-
|
|
38
|
-
subscriptionPending: Map<string, string>;
|
|
39
|
-
|
|
40
|
-
constructor(atlas: Atlas) {
|
|
41
|
-
this.atlas = atlas;
|
|
42
|
-
|
|
43
|
-
this.cots = new Map();
|
|
44
|
-
|
|
45
|
-
this.pendingCreate = new Map();
|
|
46
|
-
this.pendingUpdate = new Map();
|
|
47
|
-
this.pendingUnhide = new Set();
|
|
48
|
-
this.pendingHidden = new Set();
|
|
49
|
-
this.pendingDelete = new Set();
|
|
50
|
-
|
|
51
|
-
this.subscriptionPending = new Map(); // UID, Mission Guid
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
async makeActiveMission(guid? : string): Promise<void> {
|
|
55
|
-
if (guid) {
|
|
56
|
-
this.mission = guid;
|
|
57
|
-
} else {
|
|
58
|
-
this.mission = undefined;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Only Called by non-Mission CoTs, caller is responsible for creating Filters
|
|
64
|
-
*/
|
|
65
|
-
async hide(id: string): Promise<void> {
|
|
66
|
-
this.pendingHidden.add(id);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Only Called by non-Mission CoTs, caller is responsible for removing Filters
|
|
71
|
-
*/
|
|
72
|
-
async unhide(id: string): Promise<void> {
|
|
73
|
-
this.pendingUnhide.add(id);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
async init(): Promise<void> {
|
|
77
|
-
await this.loadArchive()
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Return a Set of coordinates within the given Map bounds
|
|
82
|
-
* so that vertex snapping can take place when editing
|
|
83
|
-
*/
|
|
84
|
-
async snapping(bboxarr: [number, number][]): Promise<Set<[number, number]>> {
|
|
85
|
-
const bounds = new LngLatBounds(bboxarr as [LngLatLike, LngLatLike]);
|
|
86
|
-
const coords = new Set<[number, number]>();
|
|
87
|
-
|
|
88
|
-
for (const cot of this.cots.values()) {
|
|
89
|
-
coordEach(cot.geometry, (coord) => {
|
|
90
|
-
const min = coord.slice(0, 2) as [number, number];
|
|
91
|
-
|
|
92
|
-
// Don't Send Invalid Coords
|
|
93
|
-
if (min[0] < -180 || min[0] > 180 || min[1] < -90 || min[1] > 90) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (bounds.contains({ lng: min[0], lat: min[1] })) {
|
|
98
|
-
coords.add(min);
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return coords;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Generate a GeoJSONDiff on existing COT Features
|
|
108
|
-
*/
|
|
109
|
-
async diff(): Promise<GeoJSONSourceDiff> {
|
|
110
|
-
const now = +new Date();
|
|
111
|
-
const diff: GeoJSONSourceDiff = {};
|
|
112
|
-
diff.add = [];
|
|
113
|
-
diff.remove = [];
|
|
114
|
-
diff.update = [];
|
|
115
|
-
|
|
116
|
-
const profile = await this.atlas.profile.load();
|
|
117
|
-
const display_stale = profile.display_stale || 'Immediate';
|
|
118
|
-
|
|
119
|
-
for (const cot of this.cots.values()) {
|
|
120
|
-
const render = cot.as_rendered();
|
|
121
|
-
const stale = new Date(cot.properties.stale).getTime();
|
|
122
|
-
|
|
123
|
-
if (this.pendingHidden.has(String(cot.id))) {
|
|
124
|
-
diff.remove.push(cot.vectorId())
|
|
125
|
-
this.pendingHidden.delete(cot.id);
|
|
126
|
-
} else if (
|
|
127
|
-
!['Never'].includes(display_stale)
|
|
128
|
-
&& !cot.properties.archived
|
|
129
|
-
&& (
|
|
130
|
-
display_stale === 'Immediate' && now > stale
|
|
131
|
-
|| display_stale === '10 Minutes' && now > stale + 600000
|
|
132
|
-
|| display_stale === '30 Minutes' && now > stale + 600000 * 3
|
|
133
|
-
|| display_stale === '1 Hour' && now > stale + 600000 * 6
|
|
134
|
-
)
|
|
135
|
-
) {
|
|
136
|
-
diff.remove.push(cot.vectorId())
|
|
137
|
-
} else if (!cot.properties.archived) {
|
|
138
|
-
if (now < stale && (cot.properties['icon-opacity'] !== 1 || cot.properties['marker-opacity'] !== 1)) {
|
|
139
|
-
cot.properties['icon-opacity'] = 1;
|
|
140
|
-
cot.properties['marker-opacity'] = 1;
|
|
141
|
-
|
|
142
|
-
if (!['Point', 'Polygon', 'LineString'].includes(cot.geometry.type)) continue;
|
|
143
|
-
|
|
144
|
-
diff.update.push({
|
|
145
|
-
id: Number(render.id),
|
|
146
|
-
addOrUpdateProperties: Object.keys(render.properties).map((key) => {
|
|
147
|
-
return { key, value: render.properties ? render.properties[key] : '' }
|
|
148
|
-
}),
|
|
149
|
-
newGeometry: render.geometry
|
|
150
|
-
})
|
|
151
|
-
} else if (now > stale && (cot.properties['icon-opacity'] !== 0.5 || cot.properties['marker-opacity'] !== 127)) {
|
|
152
|
-
render.properties['icon-opacity'] = 0.5;
|
|
153
|
-
render.properties['marker-opacity'] = 0.5;
|
|
154
|
-
|
|
155
|
-
if (!['Point', 'Polygon', 'LineString'].includes(render.geometry.type)) continue;
|
|
156
|
-
|
|
157
|
-
diff.update.push({
|
|
158
|
-
id: Number(render.id),
|
|
159
|
-
addOrUpdateProperties: Object.keys(render.properties).map((key) => {
|
|
160
|
-
return { key, value: cot.properties ? render.properties[key] : '' }
|
|
161
|
-
}),
|
|
162
|
-
newGeometry: render.geometry
|
|
163
|
-
})
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
for (const id of this.pendingUnhide.values()) {
|
|
169
|
-
const cot = this.cots.get(id);
|
|
170
|
-
if (!cot) continue;
|
|
171
|
-
|
|
172
|
-
const render = cot.as_rendered();
|
|
173
|
-
diff.add.push(render);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
this.pendingUnhide.clear();
|
|
177
|
-
|
|
178
|
-
for (const cot of this.pendingCreate.values()) {
|
|
179
|
-
const render = cot.as_rendered();
|
|
180
|
-
diff.add.push(render);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
this.pendingCreate.clear();
|
|
184
|
-
|
|
185
|
-
for (const cot of this.pendingUpdate.values()) {
|
|
186
|
-
const render = cot.as_rendered();
|
|
187
|
-
|
|
188
|
-
diff.update.push({
|
|
189
|
-
id: Number(render.id),
|
|
190
|
-
addOrUpdateProperties: Object.keys(render.properties).map((key) => {
|
|
191
|
-
return { key, value: render.properties[key] }
|
|
192
|
-
}),
|
|
193
|
-
newGeometry: render.geometry
|
|
194
|
-
})
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
this.pendingCreate.clear();
|
|
198
|
-
|
|
199
|
-
for (const id of this.pendingDelete) {
|
|
200
|
-
const cot = await this.get(id);
|
|
201
|
-
if (!cot) continue;
|
|
202
|
-
|
|
203
|
-
diff.remove.push(cot.vectorId());
|
|
204
|
-
|
|
205
|
-
this.cots.delete(id);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
this.pendingDelete.clear();
|
|
209
|
-
|
|
210
|
-
return diff;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Iterate over all CoTs and delete toTs that match the filter pattern
|
|
215
|
-
* @param filter - JSONata filter expression to match CoTs against
|
|
216
|
-
*/
|
|
217
|
-
async filterRemove(
|
|
218
|
-
filter: string,
|
|
219
|
-
opts: {
|
|
220
|
-
mission?: boolean,
|
|
221
|
-
skipNetwork?: boolean
|
|
222
|
-
} = {}
|
|
223
|
-
): Promise<void> {
|
|
224
|
-
const cots = await this.filter(filter, opts);
|
|
225
|
-
|
|
226
|
-
const all = [];
|
|
227
|
-
for (const cot of cots.values()) {
|
|
228
|
-
all.push(this.remove(cot.id, {
|
|
229
|
-
mission: opts.mission || false,
|
|
230
|
-
skipNetwork: opts.skipNetwork
|
|
231
|
-
}));
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
await Promise.allSettled(all);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* Iterate over cot messages and return list of CoTs that match filter pattern
|
|
239
|
-
*/
|
|
240
|
-
async filter(
|
|
241
|
-
filter: string,
|
|
242
|
-
opts: {
|
|
243
|
-
limit?: number;
|
|
244
|
-
mission?: boolean,
|
|
245
|
-
} = {}
|
|
246
|
-
): Promise<Set<COT>> {
|
|
247
|
-
const cots: Set<COT> = new Set();
|
|
248
|
-
|
|
249
|
-
const expression = jsonata(filter);
|
|
250
|
-
|
|
251
|
-
for (const cot of this.cots.values()) {
|
|
252
|
-
if (await expression.evaluate(cot.as_feature()) === true) {
|
|
253
|
-
cots.add(cot);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
if (opts.mission) {
|
|
258
|
-
for (const sub of await Subscription.localList({
|
|
259
|
-
subscribed: true
|
|
260
|
-
})) {
|
|
261
|
-
const store = await Subscription.from(sub.guid, this.atlas.token, {
|
|
262
|
-
subscribed: true
|
|
263
|
-
});
|
|
264
|
-
|
|
265
|
-
if (!store) continue;
|
|
266
|
-
|
|
267
|
-
for (const feat of await store.feature.list()) {
|
|
268
|
-
if (await expression.evaluate(feat) === true) {
|
|
269
|
-
cots.add(await COT.load(this.atlas, feat, {
|
|
270
|
-
mode: OriginMode.MISSION,
|
|
271
|
-
mode_id: sub.guid
|
|
272
|
-
}));
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
if (opts.limit !== undefined) {
|
|
279
|
-
const subset: Set<COT> = new Set();
|
|
280
|
-
for (const cot of cots.values()) {
|
|
281
|
-
if (subset.size === opts.limit) break;
|
|
282
|
-
subset.add(cot);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
return subset;
|
|
286
|
-
} else {
|
|
287
|
-
return cots;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
async filterDelete(
|
|
292
|
-
filter: string,
|
|
293
|
-
opts: {
|
|
294
|
-
mission?: boolean,
|
|
295
|
-
} = {}
|
|
296
|
-
): Promise<void> {
|
|
297
|
-
const cots = await this.filter(filter, opts);
|
|
298
|
-
|
|
299
|
-
const all = [];
|
|
300
|
-
for (const cot of cots.values()) {
|
|
301
|
-
all.push(this.remove(cot.id, {
|
|
302
|
-
mission: opts.mission || false
|
|
303
|
-
}));
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
await Promise.allSettled(all);
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
async paths(store?: Map<string, COT>): Promise<Array<NestedArray>> {
|
|
310
|
-
if (!store) store = this.cots;
|
|
311
|
-
|
|
312
|
-
const paths = new Map<string, number>();
|
|
313
|
-
for (const value of store.values()) {
|
|
314
|
-
if (value.path && value.path !== '/' && value.properties.archived) {
|
|
315
|
-
paths.set(value.path, (paths.get(value.path) || 0) + 1);
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
return Array.from(paths.keys()).map((path) => {
|
|
320
|
-
return {
|
|
321
|
-
path: path,
|
|
322
|
-
count: paths.get(path) || 0,
|
|
323
|
-
paths: []
|
|
324
|
-
} as NestedArray
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* Return CoTs touching a given polygon
|
|
330
|
-
*
|
|
331
|
-
* @param poly - GeoJSON Polygon to test CoTs against
|
|
332
|
-
*/
|
|
333
|
-
async touching(poly: Polygon): Promise<Set<COT>> {
|
|
334
|
-
const within: Set<COT> = new Set();
|
|
335
|
-
|
|
336
|
-
for (const cot of this.cots.values()) {
|
|
337
|
-
if (booleanWithin(cot.as_feature(), poly)) {
|
|
338
|
-
within.add(cot)
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
return within;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* Load Archived CoTs
|
|
347
|
-
*/
|
|
348
|
-
async loadArchive(): Promise<void> {
|
|
349
|
-
const archive = await std('/api/profile/feature', {
|
|
350
|
-
token: this.atlas.token
|
|
351
|
-
}) as APIList<Feature>;
|
|
352
|
-
|
|
353
|
-
for (const a of archive.items) {
|
|
354
|
-
this.add(a, {
|
|
355
|
-
skipSave: true,
|
|
356
|
-
skipBroadcast: true
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
this.atlas.postMessage({
|
|
361
|
-
type: WorkerMessageType.Feature_Archived_Added,
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Remove a given CoT from the store
|
|
367
|
-
*
|
|
368
|
-
* @param id - UID of the CoT to remove
|
|
369
|
-
* @param opts - Options
|
|
370
|
-
* @param opts.mission - If true, search Mission Stores for the CoT
|
|
371
|
-
* @param opts.skipNetwork - If an archived CoT, don't delete from the server
|
|
372
|
-
*/
|
|
373
|
-
async remove(
|
|
374
|
-
id: string,
|
|
375
|
-
opts: {
|
|
376
|
-
mission?: boolean,
|
|
377
|
-
skipNetwork?: boolean
|
|
378
|
-
} = {
|
|
379
|
-
mission: false,
|
|
380
|
-
skipNetwork: false
|
|
381
|
-
}
|
|
382
|
-
): Promise<void> {
|
|
383
|
-
const cot = await this.get(id, {
|
|
384
|
-
mission: opts.mission
|
|
385
|
-
});
|
|
386
|
-
|
|
387
|
-
// TODO Throw an error?
|
|
388
|
-
if (!cot) {
|
|
389
|
-
console.warn(`Cannot remove CoT ${id} as it does not exist in the store`);
|
|
390
|
-
return;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
if (cot.origin.mode === OriginMode.CONNECTION) {
|
|
394
|
-
this.pendingDelete.add(id);
|
|
395
|
-
|
|
396
|
-
if (cot.properties.archived) {
|
|
397
|
-
this.atlas.postMessage({
|
|
398
|
-
type: WorkerMessageType.Feature_Archived_Removed
|
|
399
|
-
});
|
|
400
|
-
|
|
401
|
-
if (!opts.skipNetwork) {
|
|
402
|
-
await std(`/api/profile/feature/${id}`, {
|
|
403
|
-
token: this.atlas.token,
|
|
404
|
-
method: 'DELETE'
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
} else if (cot.origin.mode === OriginMode.MISSION && cot.origin.mode_id) {
|
|
409
|
-
const subscription = await Subscription.from(cot.origin.mode_id, this.atlas.token, {
|
|
410
|
-
subscribed: true
|
|
411
|
-
});
|
|
412
|
-
if (!subscription) throw new Error('Could not delete as Mission Subscription does not exist');
|
|
413
|
-
|
|
414
|
-
await subscription.feature.delete(this.atlas, cot.id, {
|
|
415
|
-
skipNetwork: opts.skipNetwork
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
* Empty the store
|
|
422
|
-
*
|
|
423
|
-
* @param opts - Options
|
|
424
|
-
* @param opts.ignoreArchived - Don't delete archived features
|
|
425
|
-
* @param opts.skipNetwork - Don't delete archived features from the server
|
|
426
|
-
*/
|
|
427
|
-
async clear(opts = {
|
|
428
|
-
ignoreArchived: false,
|
|
429
|
-
skipNetwork: false
|
|
430
|
-
}): Promise<void> {
|
|
431
|
-
for (const feat of this.cots.values()) {
|
|
432
|
-
if (opts.ignoreArchived && feat.properties.archived) {
|
|
433
|
-
continue;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
this.remove(feat.id, {
|
|
437
|
-
skipNetwork: opts.skipNetwork
|
|
438
|
-
});
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
/**
|
|
443
|
-
* Called everytime a Mission Task message is received
|
|
444
|
-
*
|
|
445
|
-
* @param task - GeoJSON Feature representing the Mission Task
|
|
446
|
-
*/
|
|
447
|
-
async subChange(task: Feature): Promise<void> {
|
|
448
|
-
if (task.properties.type === 't-x-m-c' && task.properties.mission && task.properties.mission.missionChanges) {
|
|
449
|
-
let updateGuid;
|
|
450
|
-
|
|
451
|
-
for (const change of task.properties.mission.missionChanges) {
|
|
452
|
-
if (!task.properties.mission.guid) {
|
|
453
|
-
console.error(`Cannot add ${change.contentUid} to ${JSON.stringify(task.properties.mission)} as no guid was included`);
|
|
454
|
-
continue;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
if (change.type === 'ADD_CONTENT') {
|
|
458
|
-
this.subscriptionPending.set(change.contentUid, task.properties.mission.guid);
|
|
459
|
-
} else if (change.type === 'REMOVE_CONTENT') {
|
|
460
|
-
const sub = await Subscription.from(task.properties.mission.guid, this.atlas.token, {
|
|
461
|
-
subscribed: true
|
|
462
|
-
});
|
|
463
|
-
if (!sub) {
|
|
464
|
-
console.error(`Cannot remove ${change.contentUid} from ${task.properties.mission.guid} as it's not in memory`);
|
|
465
|
-
continue;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
await sub.feature.delete(this.atlas, change.contentUid, {
|
|
469
|
-
// This is critical to ensure a recursive loop of doesn't occur
|
|
470
|
-
skipNetwork: true
|
|
471
|
-
});
|
|
472
|
-
|
|
473
|
-
updateGuid = task.properties.mission.guid;
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
if (updateGuid) {
|
|
478
|
-
this.atlas.postMessage({
|
|
479
|
-
type: WorkerMessageType.Mission_Change_Feature,
|
|
480
|
-
body: {
|
|
481
|
-
guid: updateGuid
|
|
482
|
-
}
|
|
483
|
-
});
|
|
484
|
-
}
|
|
485
|
-
} else if (task.properties.type === 't-x-m-c-l' && task.properties.mission && task.properties.mission.guid) {
|
|
486
|
-
const sub = await Subscription.from(task.properties.mission.guid, this.atlas.token, {
|
|
487
|
-
subscribed: true
|
|
488
|
-
});
|
|
489
|
-
|
|
490
|
-
if (!sub) {
|
|
491
|
-
console.error(`Cannot refresh ${task.properties.mission.guid} logs as it is not subscribed`);
|
|
492
|
-
return;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
await sub.log.refresh();
|
|
496
|
-
} else if (task.properties.type === 't-x-m-c-m' && task.properties.mission && task.properties.mission.guid) {
|
|
497
|
-
const sub = await Subscription.from(task.properties.mission.guid, this.atlas.token, {
|
|
498
|
-
subscribed: true
|
|
499
|
-
});
|
|
500
|
-
|
|
501
|
-
if (!sub) {
|
|
502
|
-
console.error(`Cannot refresh ${task.properties.mission.guid} logs as it is not subscribed`);
|
|
503
|
-
return;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
await sub.fetch();
|
|
507
|
-
} else {
|
|
508
|
-
console.warn('Unknown Mission Task', JSON.stringify(task));
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
/**
|
|
513
|
-
* Add or Update a CoT GeoJSON to the store and modify props to meet MapLibre style requirements
|
|
514
|
-
*
|
|
515
|
-
* @param feat - GeoJSON Feature to create/update in Store
|
|
516
|
-
*
|
|
517
|
-
* @param opts - Optional Options
|
|
518
|
-
* @param opts.skipSave - Don't save the COT to the Profile Feature Database
|
|
519
|
-
* @param opts.skipBroadcast - Don't broadcast the COT on the internal message bus to the UI
|
|
520
|
-
* @param opts.authored - If the COT is authored, append creator information if the CoT is new & potentially add it to a mission
|
|
521
|
-
*/
|
|
522
|
-
async add(
|
|
523
|
-
feature: InputFeature,
|
|
524
|
-
opts?: {
|
|
525
|
-
skipSave?: boolean;
|
|
526
|
-
skipBroadcast?: boolean;
|
|
527
|
-
authored?: boolean,
|
|
528
|
-
}
|
|
529
|
-
): Promise<COT> {
|
|
530
|
-
if (!opts) opts = {};
|
|
531
|
-
|
|
532
|
-
feature.properties.id = feature.id;
|
|
533
|
-
|
|
534
|
-
const feat = feature as Feature;
|
|
535
|
-
|
|
536
|
-
// Check if CoT exists
|
|
537
|
-
let exists = await this.get(feat.properties.id, {
|
|
538
|
-
mission: true
|
|
539
|
-
});
|
|
540
|
-
|
|
541
|
-
if (opts.authored && !exists) {
|
|
542
|
-
feat.properties.creator = await this.atlas.profile.creator();
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
// New CoT destined for a Mission
|
|
546
|
-
if (
|
|
547
|
-
!exists && (
|
|
548
|
-
(this.mission && opts.authored) // Authored CoT and we have an active Mission
|
|
549
|
-
|| (
|
|
550
|
-
feat.origin && feat.origin.mode === "Mission"
|
|
551
|
-
&& feat.origin.mode_id
|
|
552
|
-
)
|
|
553
|
-
|| this.subscriptionPending.get(feat.id)
|
|
554
|
-
)
|
|
555
|
-
|| exists && (
|
|
556
|
-
exists.origin.mode === OriginMode.MISSION
|
|
557
|
-
&& exists.origin.mode_id
|
|
558
|
-
)
|
|
559
|
-
) {
|
|
560
|
-
const pendingGuid = this.subscriptionPending.get(feat.id);
|
|
561
|
-
this.subscriptionPending.delete(feat.id);
|
|
562
|
-
|
|
563
|
-
const mission_guid =
|
|
564
|
-
this.mission // An Active Mission
|
|
565
|
-
|| pendingGuid
|
|
566
|
-
|| feat.origin?.mode_id; // The feature has a Mission Origin
|
|
567
|
-
|
|
568
|
-
if (!mission_guid) {
|
|
569
|
-
throw new Error(`Cannot add ${feat.id} to a mission as no mission GUID was found - Please report this error`);
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
const sub = await Subscription.from(mission_guid, this.atlas.token, {
|
|
573
|
-
subscribed: true
|
|
574
|
-
});
|
|
575
|
-
|
|
576
|
-
if (!sub) {
|
|
577
|
-
throw new Error(`Cannot add ${feat.id} to mission ${mission_guid} as it is not loaded`)
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
if (!exists) {
|
|
581
|
-
exists = await COT.load(this.atlas, feat, {
|
|
582
|
-
mode: OriginMode.MISSION,
|
|
583
|
-
mode_id: mission_guid
|
|
584
|
-
}, opts);
|
|
585
|
-
} else {
|
|
586
|
-
await exists.update({
|
|
587
|
-
path: feat.path,
|
|
588
|
-
properties: feat.properties,
|
|
589
|
-
geometry: feat.geometry
|
|
590
|
-
}, { skipSave: opts.skipSave })
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
await sub.feature.update(this.atlas, exists, {
|
|
594
|
-
skipNetwork: !opts.authored
|
|
595
|
-
});
|
|
596
|
-
|
|
597
|
-
this.atlas.postMessage({
|
|
598
|
-
type: WorkerMessageType.Mission_Change_Feature,
|
|
599
|
-
body: {
|
|
600
|
-
guid: mission_guid
|
|
601
|
-
}
|
|
602
|
-
});
|
|
603
|
-
|
|
604
|
-
return exists;
|
|
605
|
-
} else {
|
|
606
|
-
if (exists) {
|
|
607
|
-
await exists.update({
|
|
608
|
-
path: feat.path,
|
|
609
|
-
properties: feat.properties,
|
|
610
|
-
geometry: feat.geometry
|
|
611
|
-
}, { skipSave: opts.skipSave })
|
|
612
|
-
} else {
|
|
613
|
-
exists = await COT.load(this.atlas, feat, {
|
|
614
|
-
mode: OriginMode.CONNECTION
|
|
615
|
-
}, opts);
|
|
616
|
-
|
|
617
|
-
if (opts.skipBroadcast !== true && exists.properties.archived) {
|
|
618
|
-
this.atlas.postMessage({
|
|
619
|
-
type: WorkerMessageType.Feature_Archived_Added,
|
|
620
|
-
});
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
if (exists.is_skittle) {
|
|
625
|
-
await this.atlas.team.set(exists);
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
return exists;
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
/**
|
|
633
|
-
* Return a CoT by ID if it exists
|
|
634
|
-
*
|
|
635
|
-
* @param id - ID of the CoT to return
|
|
636
|
-
* @param opts - Options
|
|
637
|
-
* @param opts.mission - If true, search Mission Stores for the CoT
|
|
638
|
-
*/
|
|
639
|
-
async get(
|
|
640
|
-
id: string,
|
|
641
|
-
opts: {
|
|
642
|
-
mission?: boolean,
|
|
643
|
-
} = {
|
|
644
|
-
mission: false
|
|
645
|
-
}
|
|
646
|
-
): Promise<COT | undefined> {
|
|
647
|
-
if (!id) throw new Error('Cannot get marker without an ID');
|
|
648
|
-
|
|
649
|
-
if (!opts) opts = {};
|
|
650
|
-
|
|
651
|
-
let cot = this.cots.get(id);
|
|
652
|
-
|
|
653
|
-
if (cot) {
|
|
654
|
-
return cot;
|
|
655
|
-
} else if (opts.mission) {
|
|
656
|
-
for (const sub of await Subscription.localList({
|
|
657
|
-
subscribed: true
|
|
658
|
-
})) {
|
|
659
|
-
const store = await Subscription.from(sub.guid, this.atlas.token, {
|
|
660
|
-
subscribed: true
|
|
661
|
-
});
|
|
662
|
-
|
|
663
|
-
if (!store) continue;
|
|
664
|
-
|
|
665
|
-
const feat = await store.feature.from(id);
|
|
666
|
-
|
|
667
|
-
if (!feat) continue;
|
|
668
|
-
|
|
669
|
-
cot = await COT.load(this.atlas, feat, {
|
|
670
|
-
mode: OriginMode.MISSION,
|
|
671
|
-
mode_id: sub.guid
|
|
672
|
-
});
|
|
673
|
-
|
|
674
|
-
return cot;
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
return;
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
/**
|
|
682
|
-
* Returns if the CoT is present in the store given the ID
|
|
683
|
-
*/
|
|
684
|
-
has(id: string): boolean {
|
|
685
|
-
return this.cots.has(id);
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
groups(store?: Map<string, COT>): Array<string> {
|
|
689
|
-
if (!store) store = this.cots;
|
|
690
|
-
|
|
691
|
-
const groups: Set<string> = new Set();
|
|
692
|
-
for (const value of store.values()) {
|
|
693
|
-
if (value.properties.group) groups.add(value.properties.group.name);
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
return Array.from(groups);
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
pathFeatures(path?: string, store?: Map<string, COT>): Set<COT> {
|
|
700
|
-
if (!store) store = this.cots;
|
|
701
|
-
|
|
702
|
-
const feats: Set<COT> = new Set();
|
|
703
|
-
|
|
704
|
-
for (const value of store.values()) {
|
|
705
|
-
if (path && value.path === path && value.properties.archived) {
|
|
706
|
-
feats.add(value);
|
|
707
|
-
} else if (!path && value.properties.archived) {
|
|
708
|
-
feats.add(value);
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
return feats;
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
markers(store?: Map<string, COT>): Array<string> {
|
|
716
|
-
if (!store) store = this.cots;
|
|
717
|
-
|
|
718
|
-
const markers: Set<string> = new Set();
|
|
719
|
-
for (const value of store.values()) {
|
|
720
|
-
if (value.properties.group) continue;
|
|
721
|
-
if (value.properties.archived) continue;
|
|
722
|
-
markers.add(value.properties.type);
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
return Array.from(markers);
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
markerFeatures(marker: string, store?: Map<string, COT>): Set<COT> {
|
|
729
|
-
if (!store) store = this.cots;
|
|
730
|
-
|
|
731
|
-
const feats: Set<COT> = new Set();
|
|
732
|
-
|
|
733
|
-
for (const value of store.values()) {
|
|
734
|
-
if (value.properties.group) continue;
|
|
735
|
-
if (value.properties.archived) continue;
|
|
736
|
-
|
|
737
|
-
if (value.properties.type === marker) {
|
|
738
|
-
feats.add(value);
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
return feats;
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
contacts(group?: string, store?: Map<string, COT>): Set<COT> {
|
|
746
|
-
if (!store) store = this.cots;
|
|
747
|
-
|
|
748
|
-
const contacts: Set<COT> = new Set();
|
|
749
|
-
for (const value of store.values()) {
|
|
750
|
-
if (value.properties.group) contacts.add(value);
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
let list = Array.from(contacts);
|
|
754
|
-
|
|
755
|
-
if (group) {
|
|
756
|
-
list = list.filter((contact) => {
|
|
757
|
-
if (!contact.properties.group) return false;
|
|
758
|
-
return contact.properties.group.name === group;
|
|
759
|
-
})
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
return new Set(list);
|
|
763
|
-
}
|
|
764
|
-
}
|