@tak-ps/cloudtak 12.54.0 → 12.55.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 +7 -3
- package/dist/types/src/App.vue.d.ts +0 -5
- 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/stores/brand.d.ts +0 -7
- package/dist/types/src/stores/float.d.ts +0 -42
- package/dist/types/src/test/setup.d.ts +0 -1
- package/dist/types/src/timediff.d.ts +0 -1
- package/dist/types/src/video.d.ts +0 -1
- 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,413 +0,0 @@
|
|
|
1
|
-
import * as terraDraw from 'terra-draw';
|
|
2
|
-
import { v4 as randomUUID } from 'uuid';
|
|
3
|
-
import mapgl from 'maplibre-gl'
|
|
4
|
-
import pointOnFeature from '@turf/point-on-feature';
|
|
5
|
-
import { coordEach } from '@turf/meta';
|
|
6
|
-
import { TerraDrawMapLibreGLAdapter } from 'terra-draw-maplibre-gl-adapter';
|
|
7
|
-
import { distance } from '@turf/distance';
|
|
8
|
-
import type { GeoJSONFeatureId } from 'maplibre-gl'
|
|
9
|
-
import type COT from '../../base/cot.ts';
|
|
10
|
-
import Filter from '../../base/filter.ts';
|
|
11
|
-
import { OriginMode } from '../../base/cot.ts';
|
|
12
|
-
import { std, stdurl } from '../../std.ts';
|
|
13
|
-
import type { Feature, FeatureCollection } from '../../types.ts';
|
|
14
|
-
import type { Polygon, Position } from 'geojson';
|
|
15
|
-
import type { useMapStore } from '../map.ts';
|
|
16
|
-
|
|
17
|
-
export enum DrawToolMode {
|
|
18
|
-
STATIC = 'static',
|
|
19
|
-
FREEHAND = 'freehand',
|
|
20
|
-
SELECT = 'select',
|
|
21
|
-
|
|
22
|
-
POINT = 'point',
|
|
23
|
-
LINESTRING = 'linestring',
|
|
24
|
-
POLYGON = 'polygon',
|
|
25
|
-
RECTANGLE = 'angled-rectangle',
|
|
26
|
-
CIRCLE = 'circle',
|
|
27
|
-
SECTOR = 'sector',
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export default class DrawTool {
|
|
31
|
-
private draw: terraDraw.TerraDraw;
|
|
32
|
-
public editing: COT | null;
|
|
33
|
-
|
|
34
|
-
public mode: DrawToolMode;
|
|
35
|
-
|
|
36
|
-
private mapStore: ReturnType<typeof useMapStore>;
|
|
37
|
-
|
|
38
|
-
// Contains coordinates to allow snapping to
|
|
39
|
-
public snapping: Set<[number, number]>;
|
|
40
|
-
|
|
41
|
-
public point: {
|
|
42
|
-
type: string,
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
public lasso: {
|
|
46
|
-
loading: boolean;
|
|
47
|
-
overlay: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
constructor(mapStore: ReturnType<typeof useMapStore>) {
|
|
51
|
-
this.mapStore = mapStore;
|
|
52
|
-
|
|
53
|
-
const toCustom = (event: terraDraw.TerraDrawMouseEvent): Position | undefined => {
|
|
54
|
-
let closest: {
|
|
55
|
-
dist: number
|
|
56
|
-
coord: Position
|
|
57
|
-
} | undefined = undefined;
|
|
58
|
-
|
|
59
|
-
for (const coord of this.snapping.values()) {
|
|
60
|
-
const dist = distance([event.lng, event.lat], coord);
|
|
61
|
-
|
|
62
|
-
if (!closest || (dist < closest.dist)) {
|
|
63
|
-
closest = { dist, coord }
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (closest) {
|
|
68
|
-
// Base Threshold / Math.pow(decayFactor, zoomLevel)
|
|
69
|
-
const threshold = 1000 / Math.pow(2, this.mapStore.map.getZoom());
|
|
70
|
-
|
|
71
|
-
if (closest.dist < threshold) {
|
|
72
|
-
return closest.coord;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return;
|
|
76
|
-
} else {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
this.draw = new terraDraw.TerraDraw({
|
|
82
|
-
adapter: new TerraDrawMapLibreGLAdapter({
|
|
83
|
-
map: this.mapStore.map,
|
|
84
|
-
// @ts-expect-error TS is complaining
|
|
85
|
-
lib: mapgl
|
|
86
|
-
}),
|
|
87
|
-
idStrategy: {
|
|
88
|
-
isValidId: (id: string | number): boolean => {
|
|
89
|
-
return typeof id === "string"
|
|
90
|
-
},
|
|
91
|
-
getId: (function () {
|
|
92
|
-
return function () {
|
|
93
|
-
return randomUUID()
|
|
94
|
-
};
|
|
95
|
-
})()
|
|
96
|
-
},
|
|
97
|
-
modes: [
|
|
98
|
-
new terraDraw.TerraDrawPointMode({
|
|
99
|
-
editable: true
|
|
100
|
-
}),
|
|
101
|
-
new terraDraw.TerraDrawLineStringMode({
|
|
102
|
-
editable: true,
|
|
103
|
-
snapping: { toCustom }
|
|
104
|
-
}),
|
|
105
|
-
new terraDraw.TerraDrawPolygonMode({
|
|
106
|
-
editable: true,
|
|
107
|
-
showCoordinatePoints: true,
|
|
108
|
-
snapping: { toCustom }
|
|
109
|
-
}),
|
|
110
|
-
new terraDraw.TerraDrawAngledRectangleMode(),
|
|
111
|
-
new terraDraw.TerraDrawFreehandMode(),
|
|
112
|
-
new terraDraw.TerraDrawSectorMode(),
|
|
113
|
-
new terraDraw.TerraDrawCircleMode(),
|
|
114
|
-
new terraDraw.TerraDrawSelectMode({
|
|
115
|
-
flags: {
|
|
116
|
-
polygon: {
|
|
117
|
-
feature: {
|
|
118
|
-
draggable: true,
|
|
119
|
-
coordinates: {
|
|
120
|
-
snappable: true,
|
|
121
|
-
deletable: true,
|
|
122
|
-
midpoints: {
|
|
123
|
-
draggable: true
|
|
124
|
-
},
|
|
125
|
-
draggable: true,
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
linestring: {
|
|
130
|
-
feature: {
|
|
131
|
-
draggable: true,
|
|
132
|
-
coordinates: {
|
|
133
|
-
snappable: true,
|
|
134
|
-
deletable: true,
|
|
135
|
-
midpoints: {
|
|
136
|
-
draggable: true
|
|
137
|
-
},
|
|
138
|
-
draggable: true,
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
point: {
|
|
143
|
-
feature: {
|
|
144
|
-
draggable: true,
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
})
|
|
149
|
-
]
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
this.draw.on('finish', async (id, context) => {
|
|
153
|
-
if (context.action === "draw") {
|
|
154
|
-
if (this.draw.getMode() === DrawToolMode.STATIC || this.editing) {
|
|
155
|
-
return;
|
|
156
|
-
} else if (this.mode === DrawToolMode.FREEHAND) {
|
|
157
|
-
const feat = this.draw.getSnapshotFeature(id);
|
|
158
|
-
if (!feat) throw new Error('Could not find underlying marker');
|
|
159
|
-
this.removeFeature(id);
|
|
160
|
-
this.stop();
|
|
161
|
-
|
|
162
|
-
if (!this.lasso.overlay || this.lasso.overlay === "CoT Icons") {
|
|
163
|
-
const touching = await this.mapStore.worker.db.touching(feat.geometry as Polygon);
|
|
164
|
-
|
|
165
|
-
for (const cot of touching.values()) {
|
|
166
|
-
this.mapStore.selected.set(cot.id, cot);
|
|
167
|
-
}
|
|
168
|
-
} else {
|
|
169
|
-
const ov = this.mapStore.getOverlayByName(this.lasso.overlay);
|
|
170
|
-
if (!ov) throw new Error('Could not find overlay');
|
|
171
|
-
|
|
172
|
-
this.lasso.loading = true;
|
|
173
|
-
|
|
174
|
-
try {
|
|
175
|
-
const url = stdurl(`/api/basemap/${ov.mode_id}/feature`);
|
|
176
|
-
|
|
177
|
-
const fc = await std(url, {
|
|
178
|
-
method: 'POST',
|
|
179
|
-
body: {
|
|
180
|
-
polygon: feat.geometry
|
|
181
|
-
}
|
|
182
|
-
}) as FeatureCollection;
|
|
183
|
-
|
|
184
|
-
mapStore.toImport = fc.features.map((f) => {
|
|
185
|
-
const id = randomUUID();
|
|
186
|
-
|
|
187
|
-
return {
|
|
188
|
-
id,
|
|
189
|
-
type: 'Feature',
|
|
190
|
-
path: '/',
|
|
191
|
-
properties: {
|
|
192
|
-
id,
|
|
193
|
-
type: 'u-d-p',
|
|
194
|
-
how: 'h-g-i-g-o',
|
|
195
|
-
color: '#00FF00',
|
|
196
|
-
archived: true,
|
|
197
|
-
time: new Date().toISOString(),
|
|
198
|
-
start: new Date().toISOString(),
|
|
199
|
-
stale: new Date().toISOString(),
|
|
200
|
-
center: pointOnFeature(f).geometry.coordinates,
|
|
201
|
-
callsign: 'New Feature'
|
|
202
|
-
},
|
|
203
|
-
geometry: f.geometry
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
this.lasso.loading = false;
|
|
208
|
-
} catch (err) {
|
|
209
|
-
this.lasso.loading = false;
|
|
210
|
-
console.error(err);
|
|
211
|
-
throw new Error('Error fetching lasso features');
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
} else {
|
|
215
|
-
const storeFeat = this.draw.getSnapshotFeature(id);
|
|
216
|
-
if (!storeFeat) throw new Error('Could not find underlying marker');
|
|
217
|
-
|
|
218
|
-
const now = new Date();
|
|
219
|
-
const feat: Feature = {
|
|
220
|
-
id: String(id),
|
|
221
|
-
type: 'Feature',
|
|
222
|
-
path: '/',
|
|
223
|
-
properties: {
|
|
224
|
-
id: String(id),
|
|
225
|
-
type: 'u-d-p',
|
|
226
|
-
how: 'h-g-i-g-o',
|
|
227
|
-
archived: true,
|
|
228
|
-
callsign: 'New Feature',
|
|
229
|
-
time: now.toISOString(),
|
|
230
|
-
start: now.toISOString(),
|
|
231
|
-
stale: new Date(now.getTime() + 3600).toISOString(),
|
|
232
|
-
center: [0,0]
|
|
233
|
-
},
|
|
234
|
-
geometry: JSON.parse(JSON.stringify(storeFeat.geometry))
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
if (
|
|
238
|
-
this.mode === DrawToolMode.POLYGON
|
|
239
|
-
|| this.mode === DrawToolMode.RECTANGLE
|
|
240
|
-
|| this.mode === DrawToolMode.SECTOR
|
|
241
|
-
) {
|
|
242
|
-
feat.properties.type = 'u-d-f';
|
|
243
|
-
} else if (this.mode === DrawToolMode.LINESTRING) {
|
|
244
|
-
feat.properties.type = 'u-d-f';
|
|
245
|
-
} else if (this.mode === DrawToolMode.CIRCLE) {
|
|
246
|
-
feat.properties.type = 'u-d-c-c';
|
|
247
|
-
} else if (this.mode === DrawToolMode.POINT) {
|
|
248
|
-
feat.properties.type = this.point.type
|
|
249
|
-
feat.properties["marker-opacity"] = 1;
|
|
250
|
-
|
|
251
|
-
if (this.point.type === 'u-d-p') {
|
|
252
|
-
feat.properties["marker-color"] = '#00FF00';
|
|
253
|
-
} else {
|
|
254
|
-
feat.properties["marker-color"] = '#FFFFFF';
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
this.removeFeature(id);
|
|
259
|
-
|
|
260
|
-
await this.stop();
|
|
261
|
-
|
|
262
|
-
await this.mapStore.worker.db.add(feat, {
|
|
263
|
-
authored: true
|
|
264
|
-
});
|
|
265
|
-
|
|
266
|
-
await this.mapStore.refresh();
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
})
|
|
270
|
-
|
|
271
|
-
// Deselect event is for editing existing features
|
|
272
|
-
this.draw.on('deselect', async () => {
|
|
273
|
-
if (!this.editing) return;
|
|
274
|
-
|
|
275
|
-
const feat = this.draw.getSnapshotFeature(this.editing.id);
|
|
276
|
-
|
|
277
|
-
if (!feat) throw new Error('Could not find underlying marker');
|
|
278
|
-
|
|
279
|
-
delete feat.properties.center;
|
|
280
|
-
|
|
281
|
-
const editing = this.editing;
|
|
282
|
-
|
|
283
|
-
await this.stop();
|
|
284
|
-
|
|
285
|
-
await this.mapStore.worker.db.add(feat as Feature, {
|
|
286
|
-
authored: true
|
|
287
|
-
});
|
|
288
|
-
|
|
289
|
-
await this.mapStore.refresh();
|
|
290
|
-
|
|
291
|
-
if (editing && editing.origin.mode === OriginMode.MISSION && editing.origin.mode_id) {
|
|
292
|
-
await this.mapStore.loadMission(editing.origin.mode_id);
|
|
293
|
-
} else {
|
|
294
|
-
await this.mapStore.worker.db.unhide(editing.id);
|
|
295
|
-
await this.mapStore.refresh();
|
|
296
|
-
}
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
this.mode = DrawToolMode.STATIC;
|
|
300
|
-
this.snapping = new Set();
|
|
301
|
-
this.editing = null;
|
|
302
|
-
|
|
303
|
-
this.point = {
|
|
304
|
-
type: 'u-d-p'
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
this.lasso = {
|
|
308
|
-
loading: false,
|
|
309
|
-
overlay: 'CoT Icons'
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
async start(mode: DrawToolMode): Promise<void> {
|
|
314
|
-
this.mode = mode;
|
|
315
|
-
this.draw.start();
|
|
316
|
-
this.draw.setMode(mode)
|
|
317
|
-
|
|
318
|
-
this.snapping = await this.mapStore.worker.db.snapping(
|
|
319
|
-
this.mapStore.map.getBounds().toArray()
|
|
320
|
-
);
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
async stop(refresh = true): Promise<void> {
|
|
324
|
-
this.mode = DrawToolMode.STATIC;
|
|
325
|
-
|
|
326
|
-
// Reset cursor to default BEFORE stopping draw operations
|
|
327
|
-
this.mapStore.map.getCanvas().style.cursor = '';
|
|
328
|
-
|
|
329
|
-
this.draw.stop();
|
|
330
|
-
this.snapping.clear()
|
|
331
|
-
|
|
332
|
-
if (!this.editing) return;
|
|
333
|
-
|
|
334
|
-
await Filter.delete({ external: `hidden-${this.editing.id}` });
|
|
335
|
-
|
|
336
|
-
if (refresh) {
|
|
337
|
-
if (this.editing && this.editing.origin.mode === OriginMode.MISSION && this.editing.origin.mode_id) {
|
|
338
|
-
await this.mapStore.loadMission(this.editing.origin.mode_id);
|
|
339
|
-
this.editing = null;
|
|
340
|
-
} else {
|
|
341
|
-
await this.mapStore.worker.db.unhide(this.editing.id);
|
|
342
|
-
this.editing = null;
|
|
343
|
-
|
|
344
|
-
await this.mapStore.refresh();
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
async edit(cot: COT) {
|
|
350
|
-
this.editing = cot;
|
|
351
|
-
|
|
352
|
-
this.start(DrawToolMode.SELECT);
|
|
353
|
-
|
|
354
|
-
try {
|
|
355
|
-
const feat = cot.as_feature({ clone: true });
|
|
356
|
-
if (feat.geometry.type === 'Polygon') {
|
|
357
|
-
feat.properties.mode = 'polygon';
|
|
358
|
-
} else if (feat.geometry.type === 'LineString') {
|
|
359
|
-
feat.properties.mode = 'linestring';
|
|
360
|
-
} else if (feat.geometry.type === 'Point') {
|
|
361
|
-
feat.properties.mode = 'point';
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
coordEach(feat, (coord) => {
|
|
365
|
-
if (coord.length > 2) {
|
|
366
|
-
coord.splice(2, coord.length - 2);
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
// Ensure precision is within bounds
|
|
370
|
-
for (let i = 0; i < coord.length; i++) {
|
|
371
|
-
coord[i] = Math.round(coord[i] * Math.pow(10, 9)) / Math.pow(10, 9);
|
|
372
|
-
}
|
|
373
|
-
});
|
|
374
|
-
|
|
375
|
-
await Filter.create(
|
|
376
|
-
cot.properties.callsign + ' Hidden',
|
|
377
|
-
`hidden-${cot.id}`,
|
|
378
|
-
'AtlasDatabase',
|
|
379
|
-
true,
|
|
380
|
-
`id = "${cot.id}"`
|
|
381
|
-
)
|
|
382
|
-
|
|
383
|
-
if (cot.origin.mode === OriginMode.MISSION && cot.origin.mode_id) {
|
|
384
|
-
await this.mapStore.loadMission(cot.origin.mode_id);
|
|
385
|
-
} else {
|
|
386
|
-
await this.mapStore.worker.db.hide(cot.id);
|
|
387
|
-
await this.mapStore.refresh();
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
const errorStatus = this.draw.addFeatures([feat as terraDraw.GeoJSONStoreFeatures]).filter((status) => {
|
|
391
|
-
return !status.valid;
|
|
392
|
-
});
|
|
393
|
-
|
|
394
|
-
if (errorStatus.length) {
|
|
395
|
-
throw new Error('Error editing this feature: ' + errorStatus[0].reason)
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
this.draw.selectFeature(cot.id);
|
|
399
|
-
} catch (err) {
|
|
400
|
-
await this.stop();
|
|
401
|
-
|
|
402
|
-
throw err;
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
getFeature(id: GeoJSONFeatureId) {
|
|
407
|
-
return this.draw.getSnapshotFeature(id);
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
removeFeature(id: GeoJSONFeatureId): void {
|
|
411
|
-
return this.draw.removeFeatures([id]);
|
|
412
|
-
}
|
|
413
|
-
}
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Icon Color Manager for runtime icon recoloring
|
|
3
|
-
*/
|
|
4
|
-
import ms from 'milsymbol'
|
|
5
|
-
import Icon from '../../base/icon.ts'
|
|
6
|
-
import type { Map as MapLibreMap } from 'maplibre-gl';
|
|
7
|
-
import type { IconsetList, Iconset } from '../../types.ts';
|
|
8
|
-
import { std, stdurl } from '../../std.ts';
|
|
9
|
-
import { db, type DBIconset } from '../../base/database.ts';
|
|
10
|
-
|
|
11
|
-
export default class IconManager {
|
|
12
|
-
private cache = new Map<string, HTMLCanvasElement>();
|
|
13
|
-
private map: MapLibreMap;
|
|
14
|
-
|
|
15
|
-
constructor(map: MapLibreMap) {
|
|
16
|
-
this.map = map;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static async from(uid: string): Promise<DBIconset | undefined> {
|
|
20
|
-
return await db.iconset.get(uid);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async addIconset(uid: string): Promise<void> {
|
|
24
|
-
const iconset = await std(`/api/iconset/${uid}`) as Iconset;
|
|
25
|
-
|
|
26
|
-
await db.iconset.put(iconset);
|
|
27
|
-
|
|
28
|
-
this.map.addSprite(
|
|
29
|
-
iconset.uid,
|
|
30
|
-
String(stdurl(`/api/iconset/${iconset.uid}/sprite?token=${localStorage.token}`))
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
async removeIconset(uid: string): Promise<void> {
|
|
35
|
-
this.map.removeSprite(uid);
|
|
36
|
-
await db.iconset.delete(uid);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
static async sprites(): Promise<Array<{
|
|
40
|
-
id: string,
|
|
41
|
-
url: string
|
|
42
|
-
}>> {
|
|
43
|
-
const sprites = [{
|
|
44
|
-
id: 'default',
|
|
45
|
-
url: String(stdurl(`/api/iconset/default/sprite?token=${localStorage.token}`))
|
|
46
|
-
}]
|
|
47
|
-
|
|
48
|
-
// Eventually make a sprite URL part of the overlay so KMLs can load a sprite package & add paging support
|
|
49
|
-
const iconsets = await std('/api/iconset?limit=100') as IconsetList;
|
|
50
|
-
|
|
51
|
-
await db.iconset.bulkPut(iconsets.items);
|
|
52
|
-
|
|
53
|
-
for (const iconset of iconsets.items) {
|
|
54
|
-
sprites.push({
|
|
55
|
-
id: iconset.uid,
|
|
56
|
-
url: String(stdurl(`/api/iconset/${iconset.uid}/sprites?token=${localStorage.token}`))
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return sprites;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
public async updateImages(): Promise<void> {
|
|
64
|
-
const images = this.map.listImages();
|
|
65
|
-
|
|
66
|
-
await Icon.populate(images);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
public async onStyleImageMissing(e: { id: string }): Promise<void> {
|
|
70
|
-
if (e.id.startsWith('2525D:')) {
|
|
71
|
-
const sidc = e.id.replace('2525D:', '');
|
|
72
|
-
const size = 24;
|
|
73
|
-
const data = new ms.Symbol(sidc, { size }).asCanvas();
|
|
74
|
-
|
|
75
|
-
this.map.addImage(e.id, await createImageBitmap(data));
|
|
76
|
-
} else if (e.id.includes('-colored-')) {
|
|
77
|
-
// This is a colored icon, we need to load it from the icon manager
|
|
78
|
-
const parts = e.id.split('-colored-');
|
|
79
|
-
const originalIconId = parts[0];
|
|
80
|
-
const color = '#' + parts[1];
|
|
81
|
-
|
|
82
|
-
this.getColoredIcon(originalIconId, color);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Get or create a colored version of an icon
|
|
88
|
-
*/
|
|
89
|
-
public getColoredIcon(iconId: string, color: string): string {
|
|
90
|
-
const coloredIconId = `${iconId}-colored-${color.slice(1)}`;
|
|
91
|
-
|
|
92
|
-
if (!this.cache.has(coloredIconId)) {
|
|
93
|
-
this.createColoredIcon(iconId, color, coloredIconId);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return coloredIconId;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Create a colored version of an icon and add it to the map
|
|
101
|
-
*/
|
|
102
|
-
private createColoredIcon(iconId: string, color: string, coloredIconId: string): void {
|
|
103
|
-
// Get the original icon from the map
|
|
104
|
-
const originalImage = this.map.getImage(iconId);
|
|
105
|
-
if (!originalImage) {
|
|
106
|
-
console.warn(`Icon ${iconId} not found in map`);
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// Create canvas for recoloring
|
|
111
|
-
const canvas = document.createElement('canvas');
|
|
112
|
-
const ctx = canvas.getContext('2d');
|
|
113
|
-
if (!ctx) return;
|
|
114
|
-
|
|
115
|
-
canvas.width = originalImage.data.width;
|
|
116
|
-
canvas.height = originalImage.data.height;
|
|
117
|
-
|
|
118
|
-
// Create ImageData from the original image
|
|
119
|
-
const imageData = new ImageData(
|
|
120
|
-
new Uint8ClampedArray(originalImage.data.data),
|
|
121
|
-
originalImage.data.width,
|
|
122
|
-
originalImage.data.height
|
|
123
|
-
);
|
|
124
|
-
|
|
125
|
-
// Recolor white pixels
|
|
126
|
-
this.recolorWhitePixels(imageData, color);
|
|
127
|
-
|
|
128
|
-
// Draw to canvas
|
|
129
|
-
ctx.putImageData(imageData, 0, 0);
|
|
130
|
-
|
|
131
|
-
// Cache and add to map
|
|
132
|
-
this.cache.set(coloredIconId, canvas);
|
|
133
|
-
|
|
134
|
-
// Convert canvas to ImageData for map
|
|
135
|
-
const canvasImageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
|
|
136
|
-
this.map.addImage(coloredIconId, {
|
|
137
|
-
width: canvas.width,
|
|
138
|
-
height: canvas.height,
|
|
139
|
-
data: canvasImageData.data
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Replace white/light pixels with the target color
|
|
145
|
-
*/
|
|
146
|
-
private recolorWhitePixels(imageData: ImageData, color: string): void {
|
|
147
|
-
const data = imageData.data;
|
|
148
|
-
const [r, g, b] = this.hexToRgb(color);
|
|
149
|
-
|
|
150
|
-
for (let i = 0; i < data.length; i += 4) {
|
|
151
|
-
const alpha = data[i + 3];
|
|
152
|
-
|
|
153
|
-
// Skip transparent pixels
|
|
154
|
-
if (alpha === 0) continue;
|
|
155
|
-
|
|
156
|
-
// Check if pixel is white or light colored
|
|
157
|
-
if (this.isWhitePixel(data[i], data[i + 1], data[i + 2])) {
|
|
158
|
-
data[i] = r; // Red
|
|
159
|
-
data[i + 1] = g; // Green
|
|
160
|
-
data[i + 2] = b; // Blue
|
|
161
|
-
// Keep original alpha
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Check if a pixel is considered "white" (should be recolored)
|
|
168
|
-
*/
|
|
169
|
-
private isWhitePixel(r: number, g: number, b: number): boolean {
|
|
170
|
-
// Consider pixels white if they are very light (above 200 in all channels)
|
|
171
|
-
return r > 200 && g > 200 && b > 200;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Convert hex color to RGB values
|
|
176
|
-
*/
|
|
177
|
-
private hexToRgb(hex: string): [number, number, number] {
|
|
178
|
-
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
179
|
-
return result ? [
|
|
180
|
-
parseInt(result[1], 16),
|
|
181
|
-
parseInt(result[2], 16),
|
|
182
|
-
parseInt(result[3], 16)
|
|
183
|
-
] : [0, 255, 0]; // Default to green if parsing fails
|
|
184
|
-
}
|
|
185
|
-
}
|