@aguacerowx/react-native 0.0.52 → 0.0.54
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/LICENSE +21 -0
- package/android/src/main/cpp/satellite_ktx_jni.cpp +6 -1
- package/android/src/main/java/com/aguacerowx/reactnative/NexradRadarLayerView.java +14 -2
- package/android/src/main/java/com/aguacerowx/reactnative/SatelliteLayer.java +121 -1
- package/android/src/main/java/com/aguacerowx/reactnative/SatelliteLayerView.java +556 -392
- package/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +77 -0
- package/index.js +1 -1
- package/ios/SatelliteLayerView.swift +517 -517
- package/ios/WeatherFrameProcessorModule.m +19 -15
- package/ios/WeatherFrameProcessorModule.swift +65 -0
- package/lib/commonjs/AguaceroContext.js +0 -4
- package/lib/commonjs/AguaceroContext.js.map +1 -1
- package/lib/commonjs/GridRenderLayer.js +62 -76
- package/lib/commonjs/GridRenderLayer.js.map +1 -1
- package/lib/commonjs/MapManager.js +110 -224
- package/lib/commonjs/MapManager.js.map +1 -1
- package/lib/commonjs/MapRegistry.js +21 -33
- package/lib/commonjs/MapRegistry.js.map +1 -1
- package/lib/commonjs/NexradRadarLayer.android.js +28 -100
- package/lib/commonjs/NexradRadarLayer.android.js.map +1 -1
- package/lib/commonjs/NexradRadarLayer.ios.js +26 -97
- package/lib/commonjs/NexradRadarLayer.ios.js.map +1 -1
- package/lib/commonjs/NexradSitesMapLayer.js +41 -61
- package/lib/commonjs/NexradSitesMapLayer.js.map +1 -1
- package/lib/commonjs/SatelliteLayer.android.js +26 -38
- package/lib/commonjs/SatelliteLayer.android.js.map +1 -1
- package/lib/commonjs/SatelliteLayer.ios.js +30 -42
- package/lib/commonjs/SatelliteLayer.ios.js.map +1 -1
- package/lib/commonjs/StyleApplicator.js +129 -175
- package/lib/commonjs/StyleApplicator.js.map +1 -1
- package/lib/commonjs/WeatherLayerManager.js +996 -1627
- package/lib/commonjs/WeatherLayerManager.js.map +1 -1
- package/lib/commonjs/aguaceroCoreDebugHooks.js +58 -130
- package/lib/commonjs/aguaceroCoreDebugHooks.js.map +1 -1
- package/lib/commonjs/aguaceroRnDebug.js +147 -287
- package/lib/commonjs/aguaceroRnDebug.js.map +1 -1
- package/lib/commonjs/cdnAuthenticatedFetch.js +104 -0
- package/lib/commonjs/cdnAuthenticatedFetch.js.map +1 -0
- package/lib/commonjs/dispatchViewManagerCommandCompat.js +51 -88
- package/lib/commonjs/dispatchViewManagerCommandCompat.js.map +1 -1
- package/lib/commonjs/gridCdnAuth.js +41 -50
- package/lib/commonjs/gridCdnAuth.js.map +1 -1
- package/lib/commonjs/index.js +51 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/nexrad/nexradAndroidController.js +851 -863
- package/lib/commonjs/nexrad/nexradAndroidController.js.map +1 -1
- package/lib/commonjs/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js +62 -85
- package/lib/commonjs/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js.map +1 -1
- package/lib/commonjs/nexrad/nexradDiag.js +32 -148
- package/lib/commonjs/nexrad/nexradDiag.js.map +1 -1
- package/lib/commonjs/nexrad/nexradLevel2Keys.js +261 -0
- package/lib/commonjs/nexrad/nexradLevel2Keys.js.map +1 -0
- package/lib/commonjs/nexrad/nexradLutBuild.js +64 -111
- package/lib/commonjs/nexrad/nexradLutBuild.js.map +1 -1
- package/lib/commonjs/nexrad/nexradMapboxFrameOpts.bundled.js +136 -164
- package/lib/commonjs/nexrad/nexradMapboxFrameOpts.bundled.js.map +1 -1
- package/lib/commonjs/nexrad/nexradSdkImports.js +51 -0
- package/lib/commonjs/nexrad/nexradSdkImports.js.map +1 -0
- package/lib/commonjs/nexrad/radarArchiveCore.bundled.js +2848 -4455
- package/lib/commonjs/nexrad/radarArchiveCore.bundled.js.map +1 -1
- package/lib/commonjs/nexrad/radarDecode.worker.bundled.js +445 -648
- package/lib/commonjs/nexrad/radarDecode.worker.bundled.js.map +1 -1
- package/lib/commonjs/nexrad/radarFrameGpuMatch.bundled.js +52 -68
- package/lib/commonjs/nexrad/radarFrameGpuMatch.bundled.js.map +1 -1
- package/lib/commonjs/nexradNativeCommandIds.js +24 -0
- package/lib/commonjs/nexradNativeCommandIds.js.map +1 -0
- package/lib/commonjs/nws/NwsAlertsOverlay.android.js.map +1 -1
- package/lib/commonjs/nws/NwsAlertsOverlay.ios.js.map +1 -1
- package/lib/commonjs/nws/NwsAlertsOverlay.js +3 -3
- package/lib/commonjs/nws/NwsAlertsOverlay.js.map +1 -1
- package/lib/commonjs/nws/NwsAlertsOverlay.native.js +235 -361
- package/lib/commonjs/nws/NwsAlertsOverlay.native.js.map +1 -1
- package/lib/commonjs/nws/eventSourceRnPolyfill.js +92 -146
- package/lib/commonjs/nws/eventSourceRnPolyfill.js.map +1 -1
- package/lib/commonjs/nws/nwsAndroidConstants.js +2 -8
- package/lib/commonjs/nws/nwsAndroidConstants.js.map +1 -1
- package/lib/commonjs/satellite/satelliteAndroidController.js +122 -199
- package/lib/commonjs/satellite/satelliteAndroidController.js.map +1 -1
- package/lib/commonjs/satelliteBridgeDiag.js +3 -13
- package/lib/commonjs/satelliteBridgeDiag.js.map +1 -1
- package/lib/commonjs/satelliteRnDebug.js +160 -0
- package/lib/commonjs/satelliteRnDebug.js.map +1 -0
- package/lib/module/AguaceroContext.js +2 -7
- package/lib/module/AguaceroContext.js.map +1 -1
- package/lib/module/GridRenderLayer.js +66 -80
- package/lib/module/GridRenderLayer.js.map +1 -1
- package/lib/module/MapManager.js +125 -239
- package/lib/module/MapManager.js.map +1 -1
- package/lib/module/MapRegistry.js +21 -33
- package/lib/module/MapRegistry.js.map +1 -1
- package/lib/module/NexradRadarLayer.android.js +32 -104
- package/lib/module/NexradRadarLayer.android.js.map +1 -1
- package/lib/module/NexradRadarLayer.ios.js +30 -101
- package/lib/module/NexradRadarLayer.ios.js.map +1 -1
- package/lib/module/NexradSitesMapLayer.js +44 -63
- package/lib/module/NexradSitesMapLayer.js.map +1 -1
- package/lib/module/SatelliteLayer.android.js +32 -44
- package/lib/module/SatelliteLayer.android.js.map +1 -1
- package/lib/module/SatelliteLayer.ios.js +36 -48
- package/lib/module/SatelliteLayer.ios.js.map +1 -1
- package/lib/module/StyleApplicator.js +144 -191
- package/lib/module/StyleApplicator.js.map +1 -1
- package/lib/module/WeatherLayerManager.js +1024 -1655
- package/lib/module/WeatherLayerManager.js.map +1 -1
- package/lib/module/aguaceroCoreDebugHooks.js +59 -130
- package/lib/module/aguaceroCoreDebugHooks.js.map +1 -1
- package/lib/module/aguaceroRnDebug.js +151 -291
- package/lib/module/aguaceroRnDebug.js.map +1 -1
- package/lib/module/cdnAuthenticatedFetch.js +97 -0
- package/lib/module/cdnAuthenticatedFetch.js.map +1 -0
- package/lib/module/dispatchViewManagerCommandCompat.js +52 -90
- package/lib/module/dispatchViewManagerCommandCompat.js.map +1 -1
- package/lib/module/gridCdnAuth.js +38 -50
- package/lib/module/gridCdnAuth.js.map +1 -1
- package/lib/module/index.js +9 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/nexrad/nexradAndroidController.js +865 -876
- package/lib/module/nexrad/nexradAndroidController.js.map +1 -1
- package/lib/module/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js +62 -85
- package/lib/module/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js.map +1 -1
- package/lib/module/nexrad/nexradDiag.js +31 -145
- package/lib/module/nexrad/nexradDiag.js.map +1 -1
- package/lib/module/nexrad/nexradLevel2Keys.js +245 -0
- package/lib/module/nexrad/nexradLevel2Keys.js.map +1 -0
- package/lib/module/nexrad/nexradLutBuild.js +64 -110
- package/lib/module/nexrad/nexradLutBuild.js.map +1 -1
- package/lib/module/nexrad/nexradMapboxFrameOpts.bundled.js +136 -163
- package/lib/module/nexrad/nexradMapboxFrameOpts.bundled.js.map +1 -1
- package/lib/module/nexrad/nexradSdkImports.js +4 -0
- package/lib/module/nexrad/nexradSdkImports.js.map +1 -0
- package/lib/module/nexrad/radarArchiveCore.bundled.js +2839 -4448
- package/lib/module/nexrad/radarArchiveCore.bundled.js.map +1 -1
- package/lib/module/nexrad/radarDecode.worker.bundled.js +445 -648
- package/lib/module/nexrad/radarDecode.worker.bundled.js.map +1 -1
- package/lib/module/nexrad/radarFrameGpuMatch.bundled.js +50 -66
- package/lib/module/nexrad/radarFrameGpuMatch.bundled.js.map +1 -1
- package/lib/module/nexradNativeCommandIds.js +18 -0
- package/lib/module/nexradNativeCommandIds.js.map +1 -0
- package/lib/module/nws/NwsAlertsOverlay.android.js +1 -1
- package/lib/module/nws/NwsAlertsOverlay.android.js.map +1 -1
- package/lib/module/nws/NwsAlertsOverlay.ios.js +1 -1
- package/lib/module/nws/NwsAlertsOverlay.ios.js.map +1 -1
- package/lib/module/nws/NwsAlertsOverlay.js +5 -5
- package/lib/module/nws/NwsAlertsOverlay.js.map +1 -1
- package/lib/module/nws/NwsAlertsOverlay.native.js +248 -373
- package/lib/module/nws/NwsAlertsOverlay.native.js.map +1 -1
- package/lib/module/nws/eventSourceRnPolyfill.js +92 -146
- package/lib/module/nws/eventSourceRnPolyfill.js.map +1 -1
- package/lib/module/nws/nwsAndroidConstants.js +2 -8
- package/lib/module/nws/nwsAndroidConstants.js.map +1 -1
- package/lib/module/satellite/satelliteAndroidController.js +125 -202
- package/lib/module/satellite/satelliteAndroidController.js.map +1 -1
- package/lib/module/satelliteBridgeDiag.js +3 -13
- package/lib/module/satelliteBridgeDiag.js.map +1 -1
- package/lib/module/satelliteRnDebug.js +148 -0
- package/lib/module/satelliteRnDebug.js.map +1 -0
- package/lib/typescript/AguaceroContext.d.ts +0 -4
- package/lib/typescript/AguaceroContext.d.ts.map +1 -1
- package/lib/typescript/GridRenderLayer.d.ts.map +1 -1
- package/lib/typescript/MapManager.d.ts +0 -12
- package/lib/typescript/MapManager.d.ts.map +1 -1
- package/lib/typescript/MapRegistry.d.ts +10 -12
- package/lib/typescript/MapRegistry.d.ts.map +1 -1
- package/lib/typescript/NexradRadarLayer.android.d.ts.map +1 -1
- package/lib/typescript/NexradRadarLayer.ios.d.ts.map +1 -1
- package/lib/typescript/NexradSitesMapLayer.d.ts +4 -10
- package/lib/typescript/NexradSitesMapLayer.d.ts.map +1 -1
- package/lib/typescript/SatelliteLayer.android.d.ts.map +1 -1
- package/lib/typescript/SatelliteLayer.ios.d.ts.map +1 -1
- package/lib/typescript/StyleApplicator.d.ts +1 -1
- package/lib/typescript/StyleApplicator.d.ts.map +1 -1
- package/lib/typescript/WeatherLayerManager.d.ts.map +1 -1
- package/lib/typescript/aguaceroCoreDebugHooks.d.ts +2 -9
- package/lib/typescript/aguaceroCoreDebugHooks.d.ts.map +1 -1
- package/lib/typescript/aguaceroRnDebug.d.ts +47 -66
- package/lib/typescript/aguaceroRnDebug.d.ts.map +1 -1
- package/lib/typescript/cdnAuthenticatedFetch.d.ts +10 -0
- package/lib/typescript/cdnAuthenticatedFetch.d.ts.map +1 -0
- package/lib/typescript/dispatchViewManagerCommandCompat.d.ts +1 -17
- package/lib/typescript/dispatchViewManagerCommandCompat.d.ts.map +1 -1
- package/lib/typescript/gridCdnAuth.d.ts +16 -21
- package/lib/typescript/gridCdnAuth.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/nexrad/nexradAndroidController.d.ts +39 -89
- package/lib/typescript/nexrad/nexradAndroidController.d.ts.map +1 -1
- package/lib/typescript/nexrad/nexradCrossSectionSampleAtLatLon.bundled.d.ts +2 -1
- package/lib/typescript/nexrad/nexradCrossSectionSampleAtLatLon.bundled.d.ts.map +1 -1
- package/lib/typescript/nexrad/nexradDiag.d.ts +13 -101
- package/lib/typescript/nexrad/nexradDiag.d.ts.map +1 -1
- package/lib/typescript/nexrad/nexradLevel2Keys.d.ts +36 -0
- package/lib/typescript/nexrad/nexradLevel2Keys.d.ts.map +1 -0
- package/lib/typescript/nexrad/nexradLutBuild.d.ts +3 -10
- package/lib/typescript/nexrad/nexradLutBuild.d.ts.map +1 -1
- package/lib/typescript/nexrad/nexradMapboxFrameOpts.bundled.d.ts +4 -3
- package/lib/typescript/nexrad/nexradMapboxFrameOpts.bundled.d.ts.map +1 -1
- package/lib/typescript/nexrad/nexradSdkImports.d.ts +2 -0
- package/lib/typescript/nexrad/nexradSdkImports.d.ts.map +1 -0
- package/lib/typescript/nexrad/radarArchiveCore.bundled.d.ts +12 -7
- package/lib/typescript/nexrad/radarArchiveCore.bundled.d.ts.map +1 -1
- package/lib/typescript/nexrad/radarDecode.worker.bundled.d.ts +20 -20
- package/lib/typescript/nexrad/radarDecode.worker.bundled.d.ts.map +1 -1
- package/lib/typescript/nexrad/radarFrameGpuMatch.bundled.d.ts +4 -3
- package/lib/typescript/nexrad/radarFrameGpuMatch.bundled.d.ts.map +1 -1
- package/lib/typescript/nexradNativeCommandIds.d.ts +2 -0
- package/lib/typescript/nexradNativeCommandIds.d.ts.map +1 -0
- package/lib/typescript/nws/NwsAlertsOverlay.native.d.ts +6 -17
- package/lib/typescript/nws/NwsAlertsOverlay.native.d.ts.map +1 -1
- package/lib/typescript/nws/eventSourceRnPolyfill.d.ts +0 -3
- package/lib/typescript/nws/eventSourceRnPolyfill.d.ts.map +1 -1
- package/lib/typescript/nws/nwsAndroidConstants.d.ts +0 -5
- package/lib/typescript/nws/nwsAndroidConstants.d.ts.map +1 -1
- package/lib/typescript/satellite/satelliteAndroidController.d.ts +9 -47
- package/lib/typescript/satellite/satelliteAndroidController.d.ts.map +1 -1
- package/lib/typescript/satelliteBridgeDiag.d.ts +1 -5
- package/lib/typescript/satelliteBridgeDiag.d.ts.map +1 -1
- package/lib/typescript/satelliteRnDebug.d.ts +75 -0
- package/lib/typescript/satelliteRnDebug.d.ts.map +1 -0
- package/package.json +75 -74
- package/src/AguaceroContext.js +1 -7
- package/src/GridRenderLayer.js +1 -128
- package/src/MapManager.js +1 -277
- package/src/MapRegistry.js +1 -56
- package/src/NexradRadarLayer.android.js +1 -121
- package/src/NexradRadarLayer.ios.js +1 -115
- package/src/NexradSitesMapLayer.js +1 -75
- package/src/SatelliteLayer.android.js +1 -63
- package/src/SatelliteLayer.ios.js +1 -70
- package/src/StyleApplicator.js +1 -241
- package/src/WeatherLayerManager.js +1 -2025
- package/src/aguaceroCoreDebugHooks.js +1 -142
- package/src/aguaceroRnDebug.js +1 -335
- package/src/cdnAuthenticatedFetch.js +1 -0
- package/src/dispatchViewManagerCommandCompat.js +1 -100
- package/src/gridCdnAuth.js +1 -56
- package/src/index.js +1 -19
- package/src/nexrad/nexradAndroidController.js +1 -1078
- package/src/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js +1 -91
- package/src/nexrad/nexradDiag.js +1 -150
- package/src/nexrad/nexradLevel2Keys.js +1 -0
- package/src/nexrad/nexradLutBuild.js +1 -126
- package/src/nexrad/nexradMapboxFrameOpts.bundled.js +1 -245
- package/src/nexrad/nexradSdkImports.js +1 -0
- package/src/nexrad/radarArchiveCore.bundled.js +1 -7085
- package/src/nexrad/radarDecode.worker.bundled.js +1 -813
- package/src/nexrad/radarFrameGpuMatch.bundled.js +1 -79
- package/src/nexradNativeCommandIds.js +1 -0
- package/src/nws/NwsAlertsOverlay.android.js +1 -1
- package/src/nws/NwsAlertsOverlay.ios.js +1 -1
- package/src/nws/NwsAlertsOverlay.js +1 -7
- package/src/nws/NwsAlertsOverlay.native.js +1 -463
- package/src/nws/eventSourceRnPolyfill.js +7 -193
- package/src/nws/nwsAndroidConstants.js +1 -8
- package/src/satellite/satelliteAndroidController.js +1 -245
- package/src/satelliteBridgeDiag.js +1 -15
- package/src/satelliteRnDebug.js +1 -0
- package/lib/commonjs/nexrad/nexradNativeCommandIds.js +0 -51
- package/lib/commonjs/nexrad/nexradNativeCommandIds.js.map +0 -1
- package/lib/module/nexrad/nexradNativeCommandIds.js +0 -44
- package/lib/module/nexrad/nexradNativeCommandIds.js.map +0 -1
- package/lib/typescript/nexrad/nexradNativeCommandIds.d.ts +0 -9
- package/lib/typescript/nexrad/nexradNativeCommandIds.d.ts.map +0 -1
- package/src/nexrad/nexradNativeCommandIds.js +0 -44
- /package/lib/commonjs/{nexrad/nexradSitesUs.json → nexradSitesUs.json} +0 -0
- /package/lib/module/{nexrad/nexradSitesUs.json → nexradSitesUs.json} +0 -0
- /package/src/{nexrad/nexradSitesUs.json → nexradSitesUs.json} +0 -0
|
@@ -1,228 +1,151 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* Target frame first, then remaining frames by increasing temporal distance to {@code targetUnix}.
|
|
11
|
-
* @param {{ unix: number; url: string; shaderFileName: string }[]} frames
|
|
12
|
-
* @param {number | null} targetUnix
|
|
13
|
-
*/
|
|
14
|
-
export function sortFramesByTargetProximity(frames, targetUnix) {
|
|
15
|
-
if (!frames.length) return frames;
|
|
16
|
-
if (targetUnix == null || !Number.isFinite(targetUnix)) {
|
|
17
|
-
return frames;
|
|
18
|
-
}
|
|
19
|
-
const withDistance = frames.map(f => ({
|
|
20
|
-
...f,
|
|
21
|
-
_d: Math.abs(f.unix - targetUnix)
|
|
1
|
+
import { resolveSatelliteS3FileName as f } from "@aguacerowx/javascript-sdk";
|
|
2
|
+
import { satBridgeWarn as h } from "../satelliteBridgeDiag";
|
|
3
|
+
import { isAguaceroRnDebugEnabled as b } from "../aguaceroRnDebug";
|
|
4
|
+
import { logSatelliteSyncReport as T } from "../satelliteRnDebug";
|
|
5
|
+
export function sortFramesByTargetProximity(r, e) {
|
|
6
|
+
if (!r.length || e == null || !Number.isFinite(e)) return r;
|
|
7
|
+
const n = r.map(i => ({
|
|
8
|
+
...i,
|
|
9
|
+
_d: Math.abs(i.unix - e)
|
|
22
10
|
}));
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
});
|
|
27
|
-
return withDistance.map(({
|
|
28
|
-
_d,
|
|
29
|
-
...rest
|
|
30
|
-
}) => rest);
|
|
11
|
+
return n.sort((i, t) => i._d !== t._d ? i._d - t._d : i.unix - t.unix), n.map(({
|
|
12
|
+
_d: i,
|
|
13
|
+
...t
|
|
14
|
+
}) => t);
|
|
31
15
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const channelNameUpper = String(channelName).toUpperCase();
|
|
44
|
-
let s3FileName = fileName.replace('MULTI', channelNameUpper);
|
|
45
|
-
if (!s3FileName.endsWith('.ktx2')) {
|
|
46
|
-
s3FileName += '.ktx2';
|
|
47
|
-
}
|
|
48
|
-
let shaderFileName = s3FileName;
|
|
49
|
-
if (!channelNameUpper.startsWith('C') || channelNameUpper.length > 3) {
|
|
50
|
-
const token = channelNameUpper.toLowerCase().replace(/_/g, '');
|
|
51
|
-
shaderFileName = `${s3FileName}_${token}_`;
|
|
52
|
-
}
|
|
53
|
-
const apiKey = state.apiKey;
|
|
54
|
-
if (!apiKey) {
|
|
55
|
-
return null;
|
|
16
|
+
export function buildSatelliteFetchParts(r, e) {
|
|
17
|
+
const n = f(r.satelliteChannel, r.satelliteTimeToFileMap, e);
|
|
18
|
+
if (!n) return null;
|
|
19
|
+
const i = r.satelliteChannel || r.variable,
|
|
20
|
+
t = String(i).toUpperCase();
|
|
21
|
+
let c = n.replace("MULTI", t);
|
|
22
|
+
c.endsWith(".ktx2") || (c += ".ktx2");
|
|
23
|
+
let a = c;
|
|
24
|
+
if (!t.startsWith("C") || t.length > 3) {
|
|
25
|
+
const l = t.toLowerCase().replace(/_/g, "");
|
|
26
|
+
a = `${c}_${l}_`;
|
|
56
27
|
}
|
|
57
|
-
const
|
|
58
|
-
return {
|
|
59
|
-
url
|
|
60
|
-
shaderFileName,
|
|
61
|
-
frameKey: Number(
|
|
62
|
-
apiKey
|
|
63
|
-
};
|
|
28
|
+
const d = r.apiKey;
|
|
29
|
+
return d ? {
|
|
30
|
+
url: `https://d3dc62msmxkrd7.cloudfront.net/satellite/${c}?userId=${encodeURIComponent("sdk-user")}&apiKey=${encodeURIComponent(d)}`,
|
|
31
|
+
shaderFileName: a,
|
|
32
|
+
frameKey: Number(e),
|
|
33
|
+
apiKey: d
|
|
34
|
+
} : null;
|
|
64
35
|
}
|
|
65
36
|
export class SatelliteAndroidController {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
* @param {React.RefObject<{ syncSatellite?: (json: string) => void; clearSatellite?: () => void; activateSatelliteCachedUnix?: (unix: number) => void; updateSatelliteStyle?: (json: string) => void }>} satelliteLayerRef
|
|
69
|
-
*/
|
|
70
|
-
constructor(core, satelliteLayerRef) {
|
|
71
|
-
this.core = core;
|
|
72
|
-
this.satelliteLayerRef = satelliteLayerRef;
|
|
73
|
-
this._destroyed = false;
|
|
74
|
-
/** @type {string | undefined} */
|
|
75
|
-
this._cachedRunKey = undefined;
|
|
76
|
-
/** @type {string | undefined} */
|
|
77
|
-
this._cachedTimelineSig = undefined;
|
|
78
|
-
/** @type {number | null | undefined} */
|
|
79
|
-
this._lastTargetUnix = undefined;
|
|
80
|
-
/** @type {string | undefined} */
|
|
81
|
-
this._lastStyleJson = undefined;
|
|
37
|
+
constructor(e, n) {
|
|
38
|
+
this.core = e, this.satelliteLayerRef = n, this._destroyed = !1, this._cachedRunKey = void 0, this._cachedTimelineSig = void 0, this._lastTargetUnix = void 0, this._lastStyleJson = void 0;
|
|
82
39
|
}
|
|
83
40
|
destroy() {
|
|
84
|
-
this._destroyed =
|
|
85
|
-
this._cachedRunKey = undefined;
|
|
86
|
-
this._cachedTimelineSig = undefined;
|
|
87
|
-
this._lastTargetUnix = undefined;
|
|
88
|
-
this._lastStyleJson = undefined;
|
|
89
|
-
const native = this.satelliteLayerRef?.current;
|
|
90
|
-
native?.clearSatellite?.();
|
|
41
|
+
this._destroyed = !0, this._cachedRunKey = void 0, this._cachedTimelineSig = void 0, this._lastTargetUnix = void 0, this._lastStyleJson = void 0, this.satelliteLayerRef?.current?.clearSatellite?.();
|
|
91
42
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
* @param {import('@aguacerowx/javascript-sdk').AguaceroCoreState} state
|
|
95
|
-
*/
|
|
96
|
-
sync(state) {
|
|
97
|
-
satBridgeWarn('SatelliteAndroidController.sync enter', {
|
|
43
|
+
sync(e) {
|
|
44
|
+
if (h("SatelliteAndroidController.sync enter", {
|
|
98
45
|
destroyed: this._destroyed,
|
|
99
|
-
isSatellite:
|
|
100
|
-
instrumentId:
|
|
101
|
-
sector:
|
|
102
|
-
channel:
|
|
103
|
-
tlMapSize:
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
satBridgeWarn('SatelliteAndroidController.sync early-exit', {
|
|
46
|
+
isSatellite: !!e?.isSatellite,
|
|
47
|
+
instrumentId: e?.satelliteInstrumentId ?? null,
|
|
48
|
+
sector: e?.satelliteSectorLabel ?? null,
|
|
49
|
+
channel: e?.satelliteChannel ?? null,
|
|
50
|
+
tlMapSize: e?.satelliteTimeToFileMap && typeof e.satelliteTimeToFileMap == "object" ? Object.keys(e.satelliteTimeToFileMap).length : 0
|
|
51
|
+
}), this._destroyed || !e?.isSatellite) {
|
|
52
|
+
h("SatelliteAndroidController.sync early-exit", {
|
|
107
53
|
destroyed: this._destroyed,
|
|
108
|
-
isSatellite:
|
|
54
|
+
isSatellite: e?.isSatellite
|
|
109
55
|
});
|
|
110
56
|
return;
|
|
111
57
|
}
|
|
112
|
-
const
|
|
113
|
-
if (!
|
|
114
|
-
|
|
115
|
-
refExists:
|
|
58
|
+
const n = this.satelliteLayerRef?.current;
|
|
59
|
+
if (!n?.syncSatellite) {
|
|
60
|
+
h("SatelliteAndroidController.sync abort: no native.syncSatellite", {
|
|
61
|
+
refExists: !!this.satelliteLayerRef?.current,
|
|
116
62
|
keys: this.satelliteLayerRef?.current ? Object.keys(this.satelliteLayerRef.current) : []
|
|
117
63
|
});
|
|
118
64
|
return;
|
|
119
65
|
}
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
for (const
|
|
129
|
-
const
|
|
130
|
-
if (!Number.isFinite(
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
shaderFileName: parts.shaderFileName
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
if (frames.length === 0) {
|
|
140
|
-
console.warn('[AguaceroWX][satellite][satelliteSyncNoFrames]', {
|
|
141
|
-
satRunKey,
|
|
142
|
-
timelineKeyCount: keys.length,
|
|
143
|
-
hasApiKey: Boolean(mergedState.apiKey),
|
|
144
|
-
satelliteChannel: mergedState.satelliteChannel,
|
|
145
|
-
mapKeys: mergedState.satelliteTimeToFileMap && typeof mergedState.satelliteTimeToFileMap === 'object' ? Object.keys(mergedState.satelliteTimeToFileMap).length : 0
|
|
66
|
+
const i = Object.keys(e.satelliteTimeToFileMap || {}).sort((o, s) => Number(o) - Number(s)),
|
|
67
|
+
t = `${e.satelliteInstrumentId}|${e.satelliteSectorLabel}|${e.satelliteChannel}|${e.variable || ""}`,
|
|
68
|
+
c = i.join(","),
|
|
69
|
+
a = {
|
|
70
|
+
...e,
|
|
71
|
+
apiKey: e.apiKey || this.core.apiKey
|
|
72
|
+
},
|
|
73
|
+
d = [];
|
|
74
|
+
for (const o of i) {
|
|
75
|
+
const s = Number(o);
|
|
76
|
+
if (!Number.isFinite(s)) continue;
|
|
77
|
+
const u = buildSatelliteFetchParts(a, s);
|
|
78
|
+
u && d.push({
|
|
79
|
+
unix: s,
|
|
80
|
+
url: u.url,
|
|
81
|
+
shaderFileName: u.shaderFileName
|
|
146
82
|
});
|
|
147
83
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
84
|
+
d.length === 0 && console.warn("[AguaceroWX][satellite][satelliteSyncNoFrames]", {
|
|
85
|
+
satRunKey: t,
|
|
86
|
+
timelineKeyCount: i.length,
|
|
87
|
+
hasApiKey: !!a.apiKey,
|
|
88
|
+
satelliteChannel: a.satelliteChannel,
|
|
89
|
+
gridRequestSiteOrigin: a.gridRequestSiteOrigin ?? this.core.gridRequestSiteOrigin ?? null,
|
|
90
|
+
bundleId: this.core.bundleId ?? null,
|
|
91
|
+
mapKeys: a.satelliteTimeToFileMap && typeof a.satelliteTimeToFileMap == "object" ? Object.keys(a.satelliteTimeToFileMap).length : 0,
|
|
92
|
+
hint: i.length === 0 ? "Timeline empty \u2014 wait for core.initialize / listing, or check satelliteId/sector/product." : "Timeline has keys but no resolvable frame URLs \u2014 check satelliteChannel vs listing (e.g. geocolor needs MULTI on CONUS)."
|
|
93
|
+
});
|
|
94
|
+
let l = e.satelliteTimestamp == null || e.satelliteTimestamp === void 0 ? null : Number(e.satelliteTimestamp);
|
|
95
|
+
if (l == null || !Number.isFinite(l)) {
|
|
96
|
+
const o = i.map(s => Number(s)).filter(s => Number.isFinite(s));
|
|
97
|
+
o.length > 0 && (l = Math.max(...o));
|
|
157
98
|
}
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
if (
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
// Must match query params on each frame URL (same merge as buildSatelliteFetchParts) and mapsgl fetch headers.
|
|
179
|
-
apiKey: mergedState.apiKey || '',
|
|
180
|
-
userId: 'sdk-user',
|
|
181
|
-
// RN has no browser default Origin; native satellite fetch must mirror WeatherFrameProcessor / AguaceroCore grid headers.
|
|
182
|
-
gridRequestSiteOrigin: typeof this.core.gridRequestSiteOrigin === 'string' ? this.core.gridRequestSiteOrigin : '',
|
|
183
|
-
bundleId: this.core.bundleId || '',
|
|
184
|
-
visible: stylePayload.visible,
|
|
185
|
-
opacity: stylePayload.opacity,
|
|
186
|
-
fillSmoothing: stylePayload.fillSmoothing,
|
|
187
|
-
frames: sortedFrames
|
|
188
|
-
};
|
|
189
|
-
if (targetUnix != null && Number.isFinite(targetUnix)) {
|
|
190
|
-
payload.targetUnix = targetUnix;
|
|
191
|
-
}
|
|
192
|
-
const payloadJson = JSON.stringify(payload);
|
|
193
|
-
native.syncSatellite(payloadJson);
|
|
194
|
-
satBridgeWarn('SatelliteAndroidController.sync full payload sent', {
|
|
195
|
-
runKey: satRunKey,
|
|
196
|
-
timelineChanged,
|
|
197
|
-
frameCount: sortedFrames.length,
|
|
198
|
-
targetUnix: payload.targetUnix ?? null,
|
|
199
|
-
jsonChars: payloadJson.length
|
|
99
|
+
const y = {
|
|
100
|
+
visible: e.visible !== !1,
|
|
101
|
+
opacity: e.opacity ?? 1,
|
|
102
|
+
fillSmoothing: 0
|
|
103
|
+
},
|
|
104
|
+
m = JSON.stringify(y),
|
|
105
|
+
p = t !== this._cachedRunKey,
|
|
106
|
+
S = c !== this._cachedTimelineSig;
|
|
107
|
+
if (p || S) {
|
|
108
|
+
const o = sortFramesByTargetProximity(d, l);
|
|
109
|
+
T({
|
|
110
|
+
state: a,
|
|
111
|
+
core: this.core,
|
|
112
|
+
frames: o,
|
|
113
|
+
targetUnix: l,
|
|
114
|
+
runKey: t,
|
|
115
|
+
timelineKeyCount: i.length,
|
|
116
|
+
runKeyChanged: p,
|
|
117
|
+
timelineChanged: S,
|
|
118
|
+
stylePayload: y
|
|
200
119
|
});
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
120
|
+
const s = {
|
|
121
|
+
runKey: t,
|
|
122
|
+
apiKey: a.apiKey || "",
|
|
123
|
+
userId: "sdk-user",
|
|
124
|
+
gridRequestSiteOrigin: typeof this.core.gridRequestSiteOrigin == "string" ? this.core.gridRequestSiteOrigin : "",
|
|
125
|
+
bundleId: this.core.bundleId || "",
|
|
126
|
+
visible: y.visible,
|
|
127
|
+
opacity: y.opacity,
|
|
128
|
+
fillSmoothing: y.fillSmoothing,
|
|
129
|
+
debug: b(),
|
|
130
|
+
frames: o
|
|
131
|
+
};
|
|
132
|
+
l != null && Number.isFinite(l) && (s.targetUnix = l);
|
|
133
|
+
const u = JSON.stringify(s);
|
|
134
|
+
n.syncSatellite(u), h("SatelliteAndroidController.sync full payload sent", {
|
|
135
|
+
runKey: t,
|
|
136
|
+
timelineChanged: S,
|
|
137
|
+
frameCount: o.length,
|
|
138
|
+
targetUnix: s.targetUnix ?? null,
|
|
139
|
+
jsonChars: u.length
|
|
140
|
+
}), this._cachedRunKey = t, this._cachedTimelineSig = c, this._lastTargetUnix = l != null && Number.isFinite(l) ? l : null, this._lastStyleJson = m;
|
|
205
141
|
return;
|
|
206
142
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
satBridgeWarn('SatelliteAndroidController.activateSatelliteCachedUnix', {
|
|
214
|
-
unix: finiteTarget
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
this._lastTargetUnix = finiteTarget;
|
|
218
|
-
}
|
|
219
|
-
if (styleJson !== this._lastStyleJson && native.updateSatelliteStyle) {
|
|
220
|
-
native.updateSatelliteStyle(styleJson);
|
|
221
|
-
satBridgeWarn('SatelliteAndroidController.updateSatelliteStyle', {
|
|
222
|
-
jsonChars: styleJson.length
|
|
223
|
-
});
|
|
224
|
-
this._lastStyleJson = styleJson;
|
|
225
|
-
}
|
|
143
|
+
const g = l != null && Number.isFinite(l) ? l : null;
|
|
144
|
+
g !== this._lastTargetUnix && (g != null && n.activateSatelliteCachedUnix && (n.activateSatelliteCachedUnix(g), h("SatelliteAndroidController.activateSatelliteCachedUnix", {
|
|
145
|
+
unix: g
|
|
146
|
+
})), this._lastTargetUnix = g), m !== this._lastStyleJson && n.updateSatelliteStyle && (n.updateSatelliteStyle(m), h("SatelliteAndroidController.updateSatelliteStyle", {
|
|
147
|
+
jsonChars: m.length
|
|
148
|
+
}), this._lastStyleJson = m);
|
|
226
149
|
}
|
|
227
150
|
}
|
|
228
151
|
//# sourceMappingURL=satelliteAndroidController.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["resolveSatelliteS3FileName","
|
|
1
|
+
{"version":3,"names":["resolveSatelliteS3FileName","f","satBridgeWarn","h","isAguaceroRnDebugEnabled","b","logSatelliteSyncReport","T","sortFramesByTargetProximity","r","e","length","Number","isFinite","n","map","i","_d","Math","abs","unix","sort","t","buildSatelliteFetchParts","satelliteChannel","satelliteTimeToFileMap","variable","String","toUpperCase","c","replace","endsWith","a","startsWith","l","toLowerCase","d","apiKey","url","encodeURIComponent","shaderFileName","frameKey","SatelliteAndroidController","constructor","core","satelliteLayerRef","_destroyed","_cachedRunKey","_cachedTimelineSig","_lastTargetUnix","_lastStyleJson","destroy","current","clearSatellite","sync","destroyed","isSatellite","instrumentId","satelliteInstrumentId","sector","satelliteSectorLabel","channel","tlMapSize","Object","keys","syncSatellite","refExists","o","s","join","u","push","console","warn","satRunKey","timelineKeyCount","hasApiKey","gridRequestSiteOrigin","bundleId","mapKeys","hint","satelliteTimestamp","filter","max","y","visible","opacity","fillSmoothing","m","JSON","stringify","p","S","state","frames","targetUnix","runKey","runKeyChanged","timelineChanged","stylePayload","userId","debug","frameCount","jsonChars","g","activateSatelliteCachedUnix","updateSatelliteStyle"],"sourceRoot":"..\\..\\..\\src","sources":["satellite/satelliteAndroidController.js"],"mappings":"AAAA,SAAOA,0BAA0B,IAAIC,CAAC,QAAK,4BAA4B;AAAC,SAAOC,aAAa,IAAIC,CAAC,QAAK,wBAAwB;AAAC,SAAOC,wBAAwB,IAAIC,CAAC,QAAK,oBAAoB;AAAC,SAAOC,sBAAsB,IAAIC,CAAC,QAAK,q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SAAS,EAACjC,CAAC,CAAC3D;MAAM,CAAC,CAAC,EAAC,IAAI,CAACoC,aAAa,GAACzB,CAAC,EAAC,IAAI,CAAC0B,kBAAkB,GAACnB,CAAC,EAAC,IAAI,CAACoB,eAAe,GAACf,CAAC,IAAE,IAAI,IAAEtB,MAAM,CAACC,QAAQ,CAACqB,CAAC,CAAC,GAACA,CAAC,GAAC,IAAI,EAAC,IAAI,CAACgB,cAAc,GAACsC,CAAC;MAAC;IAAM;IAAC,MAAMgB,CAAC,GAACtE,CAAC,IAAE,IAAI,IAAEtB,MAAM,CAACC,QAAQ,CAACqB,CAAC,CAAC,GAACA,CAAC,GAAC,IAAI;IAACsE,CAAC,KAAG,IAAI,CAACvD,eAAe,KAAGuD,CAAC,IAAE,IAAI,IAAE1F,CAAC,CAAC2F,2BAA2B,KAAG3F,CAAC,CAAC2F,2BAA2B,CAACD,CAAC,CAAC,EAACrG,CAAC,CAAC,wDAAwD,EAAC;MAACiB,IAAI,EAACoF;IAAC,CAAC,CAAC,CAAC,EAAC,IAAI,CAACvD,eAAe,GAACuD,CAAC,CAAC,EAAChB,CAAC,KAAG,IAAI,CAACtC,cAAc,IAAEpC,CAAC,CAAC4F,oBAAoB,KAAG5F,CAAC,CAAC4F,oBAAoB,CAAClB,CAAC,CAAC,EAACrF,CAAC,CAAC,iDAAiD,EAAC;MAACoG,SAAS,EAACf,CAAC,CAAC7E;IAAM,CAAC,CAAC,EAAC,IAAI,CAACuC,cAAc,GAACsC,CAAC,CAAC;EAAA;AAAC","ignoreList":[]}
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
* Always-on warnings for satellite bridge debugging (Metro + many device log sinks).
|
|
3
|
-
* Filter Xcode / Metro: `sat-bridge` or `AguaceroWX`.
|
|
4
|
-
*/
|
|
5
|
-
export function satBridgeWarn(tag, detail) {
|
|
1
|
+
export function satBridgeWarn(a, o) {
|
|
6
2
|
try {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} else {
|
|
10
|
-
console.warn(`[AguaceroWX][sat-bridge] ${tag}`);
|
|
11
|
-
}
|
|
12
|
-
} catch {
|
|
13
|
-
/* ignore */
|
|
14
|
-
}
|
|
3
|
+
o !== void 0 ? console.warn(`[AguaceroWX][sat-bridge] ${a}`, o) : console.warn(`[AguaceroWX][sat-bridge] ${a}`);
|
|
4
|
+
} catch {}
|
|
15
5
|
}
|
|
16
6
|
//# sourceMappingURL=satelliteBridgeDiag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["satBridgeWarn","
|
|
1
|
+
{"version":3,"names":["satBridgeWarn","a","o","console","warn"],"sourceRoot":"..\\..\\src","sources":["satelliteBridgeDiag.js"],"mappings":"AAAA,OAAO,SAASA,aAAaA,CAACC,CAAC,EAACC,CAAC,EAAC;EAAC,IAAG;IAACA,CAAC,KAAG,KAAK,CAAC,GAACC,OAAO,CAACC,IAAI,CAAC,4BAA4BH,CAAC,EAAE,EAACC,CAAC,CAAC,GAACC,OAAO,CAACC,IAAI,CAAC,4BAA4BH,CAAC,EAAE,CAAC;EAAA,CAAC,OAAK,CAAC;AAAC","ignoreList":[]}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { NativeEventEmitter as S, Platform as p, UIManager as b } from "react-native";
|
|
2
|
+
import { aguaceroDebug as c, aguaceroDebugWarn as h, getAguaceroAuthDiagnosticSnapshot as v, isAguaceroRnDebugEnabled as g, redactApiKeyFromUrl as N } from "./aguaceroRnDebug";
|
|
3
|
+
export const SATELLITE_DIAGNOSTIC_EVENT = "AguaceroSatelliteDiagnostic";
|
|
4
|
+
const I = "[AguaceroRN][satellite]";
|
|
5
|
+
let d = null;
|
|
6
|
+
const x = {
|
|
7
|
+
1: "ETC2_RGBA (preferred Android)",
|
|
8
|
+
10: "ASTC_LDR_4x4 (black tiles if GPU cannot sample ASTC)",
|
|
9
|
+
13: "RGBA32 (universal fallback)"
|
|
10
|
+
};
|
|
11
|
+
export function basisFormatLabel(t) {
|
|
12
|
+
return t == null || Number.isNaN(Number(t)) ? "unknown" : x[Number(t)] ?? `ordinal_${t}`;
|
|
13
|
+
}
|
|
14
|
+
export function interpretSatelliteBlackScreenHints(t) {
|
|
15
|
+
const e = [],
|
|
16
|
+
a = Number(t.frameCount ?? 0),
|
|
17
|
+
n = Number(t.nativeCachedFrames ?? t.cachedFrameCount ?? NaN),
|
|
18
|
+
i = t.targetUnix,
|
|
19
|
+
o = t.activeUnix,
|
|
20
|
+
r = t.visible,
|
|
21
|
+
l = t.opacity,
|
|
22
|
+
u = t.basisFormatOrdinal ?? t.transcodeFormatOrdinal;
|
|
23
|
+
return a === 0 && e.push("JS built zero frame URLs \u2014 check satellite listing, channel (geocolor), and sector."), r === !1 && e.push("Layer visible=false \u2014 imagery is hidden by state/UI."), typeof l == "number" && l <= 0 && e.push("Layer opacity=0 \u2014 increase opacity in WeatherLayerManager state."), i != null && n === 0 && !Number.isNaN(n) && e.push("targetUnix is set but native GPU cache is empty \u2014 KTX fetch/decode/upload failed; check native diagnostic events or logcat (AguaceroSatelliteView)."), o == null && i != null && e.push("targetUnix set but no active frame on GPU yet \u2014 wait for decode or prior frame failed upload (ASTC on unsupported GPU is common)."), Number(u) === 10 && e.push("Transcoded to ASTC \u2014 if the map footprint is black, rebuild SDK with ETC2-first transcode or check AguaceroSatellite for GPU upload GL errors."), t.bundleIdPresent === !1 && e.push("bundleId missing \u2014 install react-native-device-info; some keys require x-app-identifier (usually 403, not black tiles)."), t.mapLayerAdded === !1 && e.push("Mapbox custom satellite layer not attached \u2014 ensure WeatherLayerManager is a child of MapManager."), t.satelliteNativeMissing === !0 && e.push("SatelliteLayer native view manager not registered \u2014 rebuild app / link @aguacerowx/react-native android."), e.length === 0 && e.push("JS pipeline looks healthy \u2014 inspect native events below (fetch bytes, transcode format, GPU upload). Filter logcat: AguaceroSatelliteView AguaceroSatellite AguaceroSatKtx"), e;
|
|
24
|
+
}
|
|
25
|
+
export function auditSatelliteIntegration(t = {}) {
|
|
26
|
+
if (!g()) return;
|
|
27
|
+
const {
|
|
28
|
+
core: e,
|
|
29
|
+
satelliteLayerRef: a
|
|
30
|
+
} = t;
|
|
31
|
+
let n = [],
|
|
32
|
+
i = [],
|
|
33
|
+
o = null;
|
|
34
|
+
try {
|
|
35
|
+
n = Object.keys(b.getViewManagerConfig?.("SatelliteLayer")?.Commands ?? {});
|
|
36
|
+
} catch (s) {
|
|
37
|
+
o = String(s?.message ?? s), n = [];
|
|
38
|
+
}
|
|
39
|
+
try {
|
|
40
|
+
i = Object.keys(b.getViewManagerConfig?.("GridRenderLayer")?.Commands ?? {});
|
|
41
|
+
} catch {
|
|
42
|
+
i = [];
|
|
43
|
+
}
|
|
44
|
+
let r = !1,
|
|
45
|
+
l = null;
|
|
46
|
+
try {
|
|
47
|
+
const s = require("react-native-device-info");
|
|
48
|
+
r = !0;
|
|
49
|
+
try {
|
|
50
|
+
l = s.getBundleId?.() ?? null;
|
|
51
|
+
} catch {
|
|
52
|
+
l = null;
|
|
53
|
+
}
|
|
54
|
+
} catch {
|
|
55
|
+
r = !1;
|
|
56
|
+
}
|
|
57
|
+
const u = {
|
|
58
|
+
platform: p.OS,
|
|
59
|
+
satelliteNativeCommands: n,
|
|
60
|
+
satelliteNativeMissing: n.length === 0,
|
|
61
|
+
satelliteManagerError: o,
|
|
62
|
+
gridNativeCommands: i,
|
|
63
|
+
satelliteRefAttached: !!a?.current,
|
|
64
|
+
satelliteRefMethods: a?.current ? Object.keys(a.current) : [],
|
|
65
|
+
reactNativeDeviceInfo: r ? {
|
|
66
|
+
installed: !0,
|
|
67
|
+
bundleId: l
|
|
68
|
+
} : {
|
|
69
|
+
installed: !1,
|
|
70
|
+
hint: "npm install react-native-device-info \u2014 required for core.bundleId / x-app-identifier"
|
|
71
|
+
},
|
|
72
|
+
mapboxNote: "Requires @rnmapbox/maps v11; WeatherLayerManager must be nested inside MapManager",
|
|
73
|
+
nativeLibraries: ["aguacero_satellite_ktx (KTX2 Basis transcoder JNI)"],
|
|
74
|
+
auth: e ? v(e) : void 0
|
|
75
|
+
};
|
|
76
|
+
return c("integration.audit", u), n.length === 0 && h("integration.satelliteNativeMissing", {
|
|
77
|
+
hint: "SatelliteLayer ViewManager has no commands \u2014 satellite will never render on Android."
|
|
78
|
+
}), e && !e.bundleId && p.OS !== "web" && h("integration.bundleIdMissing", {
|
|
79
|
+
hint: "core.bundleId is null \u2014 CDN may still work; some API keys require react-native-device-info.",
|
|
80
|
+
deviceInfoInstalled: r
|
|
81
|
+
}), u;
|
|
82
|
+
}
|
|
83
|
+
export function logSatelliteSyncReport(t) {
|
|
84
|
+
if (!g()) return;
|
|
85
|
+
const {
|
|
86
|
+
state: e,
|
|
87
|
+
core: a,
|
|
88
|
+
frames: n,
|
|
89
|
+
targetUnix: i,
|
|
90
|
+
runKey: o,
|
|
91
|
+
timelineKeyCount: r,
|
|
92
|
+
runKeyChanged: l,
|
|
93
|
+
timelineChanged: u,
|
|
94
|
+
stylePayload: s
|
|
95
|
+
} = t,
|
|
96
|
+
m = n?.[0],
|
|
97
|
+
f = n?.length ? n[n.length - 1] : null,
|
|
98
|
+
y = {
|
|
99
|
+
runKey: o,
|
|
100
|
+
runKeyChanged: l,
|
|
101
|
+
timelineChanged: u,
|
|
102
|
+
timelineKeyCount: r,
|
|
103
|
+
builtFrameCount: n?.length ?? 0,
|
|
104
|
+
targetUnix: i,
|
|
105
|
+
satelliteTimestamp: e?.satelliteTimestamp ?? null,
|
|
106
|
+
style: s,
|
|
107
|
+
instrument: e?.satelliteInstrumentId,
|
|
108
|
+
sector: e?.satelliteSectorLabel,
|
|
109
|
+
channel: e?.satelliteChannel,
|
|
110
|
+
availableSatelliteTimestamps: e?.availableSatelliteTimestamps?.length ?? 0,
|
|
111
|
+
sampleShaderFileName: m?.shaderFileName ?? null,
|
|
112
|
+
sampleFrameUrl: m?.url ? N(m.url) : null,
|
|
113
|
+
firstUnix: m?.unix ?? null,
|
|
114
|
+
lastUnix: f?.unix ?? null,
|
|
115
|
+
auth: a ? v(a) : void 0,
|
|
116
|
+
blackScreenHints: interpretSatelliteBlackScreenHints({
|
|
117
|
+
frameCount: n?.length ?? 0,
|
|
118
|
+
targetUnix: i,
|
|
119
|
+
visible: s?.visible,
|
|
120
|
+
opacity: s?.opacity,
|
|
121
|
+
bundleIdPresent: !!a?.bundleId
|
|
122
|
+
})
|
|
123
|
+
};
|
|
124
|
+
c("sync.report", y);
|
|
125
|
+
}
|
|
126
|
+
export function installSatelliteDiagnosticListener() {
|
|
127
|
+
return g() ? p.OS !== "android" ? (c("nativeEvents.skipped", {
|
|
128
|
+
reason: "only Android emits AguaceroSatelliteDiagnostic today"
|
|
129
|
+
}), () => {}) : (d && (d.remove(), d = null), d = new S().addListener(SATELLITE_DIAGNOSTIC_EVENT, t => {
|
|
130
|
+
if (!t || typeof t != "object") return;
|
|
131
|
+
const e = t.phase ?? "unknown",
|
|
132
|
+
a = {
|
|
133
|
+
...t
|
|
134
|
+
};
|
|
135
|
+
delete a.phase, a.basisFormatOrdinal != null && (a.basisFormat = basisFormatLabel(a.basisFormatOrdinal)), a.transcodeFormatOrdinal != null && (a.transcodeFormat = basisFormatLabel(a.transcodeFormatOrdinal)), e.includes("fail") || e.includes("error") || e === "render.noDraw" || e === "render.poll" && (a.cachedFrameCount === 0 || a.activeUnix == null) ? (a.blackScreenHints = interpretSatelliteBlackScreenHints(a), h(`native.${e}`, a)) : c(`native.${e}`, a);
|
|
136
|
+
}), c("nativeEvents.installed", {
|
|
137
|
+
event: SATELLITE_DIAGNOSTIC_EVENT,
|
|
138
|
+
hint: "Native fetch/decode/GPU logs will appear here when debug=true on WeatherLayerManager"
|
|
139
|
+
}), () => {
|
|
140
|
+
d?.remove(), d = null;
|
|
141
|
+
}) : () => {};
|
|
142
|
+
}
|
|
143
|
+
export function logSatelliteNativeDiagnostic(t) {
|
|
144
|
+
if (!g() || !t) return;
|
|
145
|
+
const e = t.phase ?? "event";
|
|
146
|
+
c(`native.${e}`, t);
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=satelliteRnDebug.js.map
|