1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
| /**
| * @license
| * @name dc-sdk
| * @github https://github.com/dvgis/dc-sdk.git
| * @author Caven Chen <cavencj@gmail.com>
| * @organization dvgis
| * @version 4.0.0
| *
| * Copyright (c) 2019-present Caven Chen
| *
| * Licensed under the Apache License, Version 2.0 (the "License");
| * you may not use this file except in compliance with the License.
| * You may obtain a copy of the License at
| *
| * http://www.apache.org/licenses/LICENSE-2.0
| *
| * Unless required by applicable law or agreed to in writing, software
| * distributed under the License is distributed on an "AS IS" BASIS,
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| * See the License for the specific language governing permissions and
| * limitations under the License.
| *
| * Portions licensed separately.
| * See https://github.com/dvgis/dc-sdk/blob/master/LICENSE.MD for full licensing details.
| */
| var DC_Common=(()=>{var rTe=Object.create;var nO=Object.defineProperty;var sTe=Object.getOwnPropertyDescriptor;var aTe=Object.getOwnPropertyNames;var cTe=Object.getPrototypeOf,lTe=Object.prototype.hasOwnProperty;var iO=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,n)=>(typeof require!="undefined"?require:t)[n]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Rf=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),KX=(e,t)=>{for(var n in t)nO(e,n,{get:t[n],enumerable:!0})},$X=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of aTe(t))!lTe.call(e,o)&&o!==n&&nO(e,o,{get:()=>t[o],enumerable:!(i=sTe(t,o))||i.enumerable});return e};var Mr=(e,t,n)=>(n=e!=null?rTe(cTe(e)):{},$X(t||!e||!e.__esModule?nO(n,"default",{value:e,enumerable:!0}):n,e)),uTe=e=>$X(nO({},"__esModule",{value:!0}),e);var oO=Rf((Oxt,JX)=>{var Sm=function(e){e==null&&(e=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,e.constructor==Array?this.init_by_array(e,e.length):this.init_seed(e)};Sm.prototype.init_seed=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti<this.N;this.mti++){var e=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((e&4294901760)>>>16)*1812433253<<16)+(e&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};Sm.prototype.init_by_array=function(e,t){var n,i,o;for(this.init_seed(19650218),n=1,i=0,o=this.N>t?this.N:t;o;o--){var r=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((r&4294901760)>>>16)*1664525<<16)+(r&65535)*1664525)+e[i]+i,this.mt[n]>>>=0,n++,i++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1),i>=t&&(i=0)}for(o=this.N-1;o;o--){var r=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((r&4294901760)>>>16)*1566083941<<16)+(r&65535)*1566083941)-n,this.mt[n]>>>=0,n++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1)}this.mt[0]=2147483648};Sm.prototype.random_int=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var n;for(this.mti==this.N+1&&this.init_seed(5489),n=0;n<this.N-this.M;n++)e=this.mt[n]&this.UPPER_MASK|this.mt[n+1]&this.LOWER_MASK,this.mt[n]=this.mt[n+this.M]^e>>>1^t[e&1];for(;n<this.N-1;n++)e=this.mt[n]&this.UPPER_MASK|this.mt[n+1]&this.LOWER_MASK,this.mt[n]=this.mt[n+(this.M-this.N)]^e>>>1^t[e&1];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[e&1],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,e^=e>>>18,e>>>0};Sm.prototype.random_int31=function(){return this.random_int()>>>1};Sm.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};Sm.prototype.random=function(){return this.random_int()*(1/4294967296)};Sm.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};Sm.prototype.random_long=function(){var e=this.random_int()>>>5,t=this.random_int()>>>6;return(e*67108864+t)*(1/9007199254740992)};JX.exports=Sm});var EK=Rf((wx,Sx)=>{/*! https://mths.be/punycode v1.4.0 by @mathias */(function(e){var t=typeof wx=="object"&&wx&&!wx.nodeType&&wx,n=typeof Sx=="object"&&Sx&&!Sx.nodeType&&Sx,i=typeof global=="object"&&global;(i.global===i||i.window===i||i.self===i)&&(e=i);var o,r=2147483647,s=36,a=1,l=26,u=38,f=700,h=72,m=128,p="-",_=/^xn--/,b=/[^\x20-\x7E]/,x=/[\x2E\u3002\uFF0E\uFF61]/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=s-a,S=Math.floor,A=String.fromCharCode,v;function D(H){throw new RangeError(T[H])}function R(H,X){for(var $=H.length,ae=[];$--;)ae[$]=X(H[$]);return ae}function P(H,X){var $=H.split("@"),ae="";$.length>1&&(ae=$[0]+"@",H=$[1]),H=H.replace(x,".");var se=H.split("."),he=R(se,X).join(".");return ae+he}function L(H){for(var X=[],$=0,ae=H.length,se,he;$<ae;)se=H.charCodeAt($++),se>=55296&&se<=56319&&$<ae?(he=H.charCodeAt($++),(he&64512)==56320?X.push(((se&1023)<<10)+(he&1023)+65536):(X.push(se),$--)):X.push(se);return X}function F(H){return R(H,function(X){var $="";return X>65535&&(X-=65536,$+=A(X>>>10&1023|55296),X=56320|X&1023),$+=A(X),$}).join("")}function y(H){return H-48<10?H-22:H-65<26?H-65:H-97<26?H-97:s}function I(H,X){return H+22+75*(H<26)-((X!=0)<<5)}function M(H,X,$){var ae=0;for(H=$?S(H/f):H>>1,H+=S(H/X);H>E*l>>1;ae+=s)H=S(H/E);return S(ae+(E+1)*H/(H+u))}function B(H){var X=[],$=H.length,ae,se=0,he=m,ge=h,le,me,Me,Ge,De,ke,He,ft,Ie;for(le=H.lastIndexOf(p),le<0&&(le=0),me=0;me<le;++me)H.charCodeAt(me)>=128&&D("not-basic"),X.push(H.charCodeAt(me));for(Me=le>0?le+1:0;Me<$;){for(Ge=se,De=1,ke=s;Me>=$&&D("invalid-input"),He=y(H.charCodeAt(Me++)),(He>=s||He>S((r-se)/De))&&D("overflow"),se+=He*De,ft=ke<=ge?a:ke>=ge+l?l:ke-ge,!(He<ft);ke+=s)Ie=s-ft,De>S(r/Ie)&&D("overflow"),De*=Ie;ae=X.length+1,ge=M(se-Ge,ae,Ge==0),S(se/ae)>r-he&&D("overflow"),he+=S(se/ae),se%=ae,X.splice(se++,0,he)}return F(X)}function U(H){var X,$,ae,se,he,ge,le,me,Me,Ge,De,ke=[],He,ft,Ie,Kt;for(H=L(H),He=H.length,X=m,$=0,he=h,ge=0;ge<He;++ge)De=H[ge],De<128&&ke.push(A(De));for(ae=se=ke.length,se&&ke.push(p);ae<He;){for(le=r,ge=0;ge<He;++ge)De=H[ge],De>=X&&De<le&&(le=De);for(ft=ae+1,le-X>S((r-$)/ft)&&D("overflow"),$+=(le-X)*ft,X=le,ge=0;ge<He;++ge)if(De=H[ge],De<X&&++$>r&&D("overflow"),De==X){for(me=$,Me=s;Ge=Me<=he?a:Me>=he+l?l:Me-he,!(me<Ge);Me+=s)Kt=me-Ge,Ie=s-Ge,ke.push(A(I(Ge+Kt%Ie,0))),me=S(Kt/Ie);ke.push(A(I(me,0))),he=M($,ft,ae==se),$=0,++ae}++$,++X}return ke.join("")}function V(H){return P(H,function(X){return _.test(X)?B(X.slice(4).toLowerCase()):X})}function W(H){return P(H,function(X){return b.test(X)?"xn--"+U(X):X})}if(o={version:"1.3.2",ucs2:{decode:L,encode:F},decode:B,encode:U,toASCII:W,toUnicode:V},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return o});else if(t&&n)if(Sx.exports==t)n.exports=o;else for(v in o)o.hasOwnProperty(v)&&(t[v]=o[v]);else e.punycode=o})(wx)});var SK=Rf((wK,vO)=>{/*!
| * URI.js - Mutating URLs
| * IPv6 Support
| *
| * Version: 1.19.11
| *
| * Author: Rodney Rehm
| * Web: http://medialize.github.io/URI.js/
| *
| * Licensed under
| * MIT License http://www.opensource.org/licenses/mit-license
| *
| */(function(e,t){"use strict";typeof vO=="object"&&vO.exports?vO.exports=t():typeof define=="function"&&define.amd?define(t):e.IPv6=t(e)})(wK,function(e){"use strict";var t=e&&e.IPv6;function n(o){var r=o.toLowerCase(),s=r.split(":"),a=s.length,l=8;s[0]===""&&s[1]===""&&s[2]===""?(s.shift(),s.shift()):s[0]===""&&s[1]===""?s.shift():s[a-1]===""&&s[a-2]===""&&s.pop(),a=s.length,s[a-1].indexOf(".")!==-1&&(l=7);var u;for(u=0;u<a&&s[u]!=="";u++);if(u<l)for(s.splice(u,1,"0000");s.length<l;)s.splice(u,0,"0000");for(var f,h=0;h<l;h++){f=s[h].split("");for(var m=0;m<3&&(f[0]==="0"&&f.length>1);m++)f.splice(0,1);s[h]=f.join("")}var p=-1,_=0,b=0,x=-1,T=!1;for(h=0;h<l;h++)T?s[h]==="0"?b+=1:(T=!1,b>_&&(p=x,_=b)):s[h]==="0"&&(T=!0,x=h,b=1);b>_&&(p=x,_=b),_>1&&s.splice(p,_,""),a=s.length;var E="";for(s[0]===""&&(E=":"),h=0;h<a&&(E+=s[h],h!==a-1);h++)E+=":";return s[a-1]===""&&(E+=":"),E}function i(){return e.IPv6===this&&(e.IPv6=t),this}return{best:n,noConflict:i}})});var vK=Rf((AK,DO)=>{/*!
| * URI.js - Mutating URLs
| * Second Level Domain (SLD) Support
| *
| * Version: 1.19.11
| *
| * Author: Rodney Rehm
| * Web: http://medialize.github.io/URI.js/
| *
| * Licensed under
| * MIT License http://www.opensource.org/licenses/mit-license
| *
| */(function(e,t){"use strict";typeof DO=="object"&&DO.exports?DO.exports=t():typeof define=="function"&&define.amd?define(t):e.SecondLevelDomains=t(e)})(AK,function(e){"use strict";var t=e&&e.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(i){var o=i.lastIndexOf(".");if(o<=0||o>=i.length-1)return!1;var r=i.lastIndexOf(".",o-1);if(r<=0||r>=o-1)return!1;var s=n.list[i.slice(o+1)];return s?s.indexOf(" "+i.slice(r+1,o)+" ")>=0:!1},is:function(i){var o=i.lastIndexOf(".");if(o<=0||o>=i.length-1)return!1;var r=i.lastIndexOf(".",o-1);if(r>=0)return!1;var s=n.list[i.slice(o+1)];return s?s.indexOf(" "+i.slice(0,o)+" ")>=0:!1},get:function(i){var o=i.lastIndexOf(".");if(o<=0||o>=i.length-1)return null;var r=i.lastIndexOf(".",o-1);if(r<=0||r>=o-1)return null;var s=n.list[i.slice(o+1)];return!s||s.indexOf(" "+i.slice(r+1,o)+" ")<0?null:i.slice(r+1)},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return n})});var Sl=Rf((DK,IO)=>{/*!
| * URI.js - Mutating URLs
| *
| * Version: 1.19.11
| *
| * Author: Rodney Rehm
| * Web: http://medialize.github.io/URI.js/
| *
| * Licensed under
| * MIT License http://www.opensource.org/licenses/mit-license
| *
| */(function(e,t){"use strict";typeof IO=="object"&&IO.exports?IO.exports=t(EK(),SK(),vK()):typeof define=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],t):e.URI=t(e.punycode,e.IPv6,e.SecondLevelDomains,e)})(DK,function(e,t,n,i){"use strict";var o=i&&i.URI;function r(I,M){var B=arguments.length>=1,U=arguments.length>=2;if(!(this instanceof r))return B?U?new r(I,M):new r(I):new r;if(I===void 0){if(B)throw new TypeError("undefined is not a valid argument for URI");typeof location!="undefined"?I=location.href+"":I=""}if(I===null&&B)throw new TypeError("null is not a valid argument for URI");return this.href(I),M!==void 0?this.absoluteTo(M):this}function s(I){return/^[0-9]+$/.test(I)}r.version="1.19.11";var a=r.prototype,l=Object.prototype.hasOwnProperty;function u(I){return I.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function f(I){return I===void 0?"Undefined":String(Object.prototype.toString.call(I)).slice(8,-1)}function h(I){return f(I)==="Array"}function m(I,M){var B={},U,V;if(f(M)==="RegExp")B=null;else if(h(M))for(U=0,V=M.length;U<V;U++)B[M[U]]=!0;else B[M]=!0;for(U=0,V=I.length;U<V;U++){var W=B&&B[I[U]]!==void 0||!B&&M.test(I[U]);W&&(I.splice(U,1),V--,U--)}return I}function p(I,M){var B,U;if(h(M)){for(B=0,U=M.length;B<U;B++)if(!p(I,M[B]))return!1;return!0}var V=f(M);for(B=0,U=I.length;B<U;B++)if(V==="RegExp"){if(typeof I[B]=="string"&&I[B].match(M))return!0}else if(I[B]===M)return!0;return!1}function _(I,M){if(!h(I)||!h(M)||I.length!==M.length)return!1;I.sort(),M.sort();for(var B=0,U=I.length;B<U;B++)if(I[B]!==M[B])return!1;return!0}function b(I){var M=/^\/+|\/+$/g;return I.replace(M,"")}r._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:r.preventInvalidHostname,duplicateQueryParameters:r.duplicateQueryParameters,escapeQuerySpace:r.escapeQuerySpace}},r.preventInvalidHostname=!1,r.duplicateQueryParameters=!1,r.escapeQuerySpace=!0,r.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,r.idn_expression=/[^a-z0-9\._-]/i,r.punycode_expression=/(xn--)/i,r.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,r.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,r.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,r.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},r.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,r.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,r.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},r.hostProtocols=["http","https"],r.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,r.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},r.getDomAttribute=function(I){if(!(!I||!I.nodeName)){var M=I.nodeName.toLowerCase();if(!(M==="input"&&I.type!=="image"))return r.domAttributes[M]}};function x(I){return escape(I)}function T(I){return encodeURIComponent(I).replace(/[!'()*]/g,x).replace(/\*/g,"%2A")}r.encode=T,r.decode=decodeURIComponent,r.iso8859=function(){r.encode=escape,r.decode=unescape},r.unicode=function(){r.encode=T,r.decode=decodeURIComponent},r.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},r.encodeQuery=function(I,M){var B=r.encode(I+"");return M===void 0&&(M=r.escapeQuerySpace),M?B.replace(/%20/g,"+"):B},r.decodeQuery=function(I,M){I+="",M===void 0&&(M=r.escapeQuerySpace);try{return r.decode(M?I.replace(/\+/g,"%20"):I)}catch{return I}};var E={encode:"encode",decode:"decode"},S,A=function(I,M){return function(B){try{return r[M](B+"").replace(r.characters[I][M].expression,function(U){return r.characters[I][M].map[U]})}catch{return B}}};for(S in E)r[S+"PathSegment"]=A("pathname",E[S]),r[S+"UrnPathSegment"]=A("urnpath",E[S]);var v=function(I,M,B){return function(U){var V;B?V=function($){return r[M](r[B]($))}:V=r[M];for(var W=(U+"").split(I),H=0,X=W.length;H<X;H++)W[H]=V(W[H]);return W.join(I)}};r.decodePath=v("/","decodePathSegment"),r.decodeUrnPath=v(":","decodeUrnPathSegment"),r.recodePath=v("/","encodePathSegment","decode"),r.recodeUrnPath=v(":","encodeUrnPathSegment","decode"),r.encodeReserved=A("reserved","encode"),r.parse=function(I,M){var B;return M||(M={preventInvalidHostname:r.preventInvalidHostname}),I=I.replace(r.leading_whitespace_expression,""),I=I.replace(r.ascii_tab_whitespace,""),B=I.indexOf("#"),B>-1&&(M.fragment=I.substring(B+1)||null,I=I.substring(0,B)),B=I.indexOf("?"),B>-1&&(M.query=I.substring(B+1)||null,I=I.substring(0,B)),I=I.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),I=I.replace(/^[/\\]{2,}/i,"//"),I.substring(0,2)==="//"?(M.protocol=null,I=I.substring(2),I=r.parseAuthority(I,M)):(B=I.indexOf(":"),B>-1&&(M.protocol=I.substring(0,B)||null,M.protocol&&!M.protocol.match(r.protocol_expression)?M.protocol=void 0:I.substring(B+1,B+3).replace(/\\/g,"/")==="//"?(I=I.substring(B+3),I=r.parseAuthority(I,M)):(I=I.substring(B+1),M.urn=!0))),M.path=I,M},r.parseHost=function(I,M){I||(I=""),I=I.replace(/\\/g,"/");var B=I.indexOf("/"),U,V;if(B===-1&&(B=I.length),I.charAt(0)==="[")U=I.indexOf("]"),M.hostname=I.substring(1,U)||null,M.port=I.substring(U+2,B)||null,M.port==="/"&&(M.port=null);else{var W=I.indexOf(":"),H=I.indexOf("/"),X=I.indexOf(":",W+1);X!==-1&&(H===-1||X<H)?(M.hostname=I.substring(0,B)||null,M.port=null):(V=I.substring(0,B).split(":"),M.hostname=V[0]||null,M.port=V[1]||null)}return M.hostname&&I.substring(B).charAt(0)!=="/"&&(B++,I="/"+I),M.preventInvalidHostname&&r.ensureValidHostname(M.hostname,M.protocol),M.port&&r.ensureValidPort(M.port),I.substring(B)||"/"},r.parseAuthority=function(I,M){return I=r.parseUserinfo(I,M),r.parseHost(I,M)},r.parseUserinfo=function(I,M){var B=I,U=I.indexOf("\\");U!==-1&&(I=I.replace(/\\/g,"/"));var V=I.indexOf("/"),W=I.lastIndexOf("@",V>-1?V:I.length-1),H;return W>-1&&(V===-1||W<V)?(H=I.substring(0,W).split(":"),M.username=H[0]?r.decode(H[0]):null,H.shift(),M.password=H[0]?r.decode(H.join(":")):null,I=B.substring(W+1)):(M.username=null,M.password=null),I},r.parseQuery=function(I,M){if(!I)return{};if(I=I.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!I)return{};for(var B={},U=I.split("&"),V=U.length,W,H,X,$=0;$<V;$++)W=U[$].split("="),H=r.decodeQuery(W.shift(),M),X=W.length?r.decodeQuery(W.join("="),M):null,H!=="__proto__"&&(l.call(B,H)?((typeof B[H]=="string"||B[H]===null)&&(B[H]=[B[H]]),B[H].push(X)):B[H]=X);return B},r.build=function(I){var M="",B=!1;return I.protocol&&(M+=I.protocol+":"),!I.urn&&(M||I.hostname)&&(M+="//",B=!0),M+=r.buildAuthority(I)||"",typeof I.path=="string"&&(I.path.charAt(0)!=="/"&&B&&(M+="/"),M+=I.path),typeof I.query=="string"&&I.query&&(M+="?"+I.query),typeof I.fragment=="string"&&I.fragment&&(M+="#"+I.fragment),M},r.buildHost=function(I){var M="";if(I.hostname)r.ip6_expression.test(I.hostname)?M+="["+I.hostname+"]":M+=I.hostname;else return"";return I.port&&(M+=":"+I.port),M},r.buildAuthority=function(I){return r.buildUserinfo(I)+r.buildHost(I)},r.buildUserinfo=function(I){var M="";return I.username&&(M+=r.encode(I.username)),I.password&&(M+=":"+r.encode(I.password)),M&&(M+="@"),M},r.buildQuery=function(I,M,B){var U="",V,W,H,X;for(W in I)if(W!=="__proto__"&&l.call(I,W))if(h(I[W]))for(V={},H=0,X=I[W].length;H<X;H++)I[W][H]!==void 0&&V[I[W][H]+""]===void 0&&(U+="&"+r.buildQueryParameter(W,I[W][H],B),M!==!0&&(V[I[W][H]+""]=!0));else I[W]!==void 0&&(U+="&"+r.buildQueryParameter(W,I[W],B));return U.substring(1)},r.buildQueryParameter=function(I,M,B){return r.encodeQuery(I,B)+(M!==null?"="+r.encodeQuery(M,B):"")},r.addQuery=function(I,M,B){if(typeof M=="object")for(var U in M)l.call(M,U)&&r.addQuery(I,U,M[U]);else if(typeof M=="string"){if(I[M]===void 0){I[M]=B;return}else typeof I[M]=="string"&&(I[M]=[I[M]]);h(B)||(B=[B]),I[M]=(I[M]||[]).concat(B)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},r.setQuery=function(I,M,B){if(typeof M=="object")for(var U in M)l.call(M,U)&&r.setQuery(I,U,M[U]);else if(typeof M=="string")I[M]=B===void 0?null:B;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},r.removeQuery=function(I,M,B){var U,V,W;if(h(M))for(U=0,V=M.length;U<V;U++)I[M[U]]=void 0;else if(f(M)==="RegExp")for(W in I)M.test(W)&&(I[W]=void 0);else if(typeof M=="object")for(W in M)l.call(M,W)&&r.removeQuery(I,W,M[W]);else if(typeof M=="string")B!==void 0?f(B)==="RegExp"?!h(I[M])&&B.test(I[M])?I[M]=void 0:I[M]=m(I[M],B):I[M]===String(B)&&(!h(B)||B.length===1)?I[M]=void 0:h(I[M])&&(I[M]=m(I[M],B)):I[M]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},r.hasQuery=function(I,M,B,U){switch(f(M)){case"String":break;case"RegExp":for(var V in I)if(l.call(I,V)&&M.test(V)&&(B===void 0||r.hasQuery(I,V,B)))return!0;return!1;case"Object":for(var W in M)if(l.call(M,W)&&!r.hasQuery(I,W,M[W]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(f(B)){case"Undefined":return M in I;case"Boolean":var H=!!(h(I[M])?I[M].length:I[M]);return B===H;case"Function":return!!B(I[M],M,I);case"Array":if(!h(I[M]))return!1;var X=U?p:_;return X(I[M],B);case"RegExp":return h(I[M])?U?p(I[M],B):!1:!!(I[M]&&I[M].match(B));case"Number":B=String(B);case"String":return h(I[M])?U?p(I[M],B):!1:I[M]===B;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},r.joinPaths=function(){for(var I=[],M=[],B=0,U=0;U<arguments.length;U++){var V=new r(arguments[U]);I.push(V);for(var W=V.segment(),H=0;H<W.length;H++)typeof W[H]=="string"&&M.push(W[H]),W[H]&&B++}if(!M.length||!B)return new r("");var X=new r("").segment(M);return(I[0].path()===""||I[0].path().slice(0,1)==="/")&&X.path("/"+X.path()),X.normalize()},r.commonPath=function(I,M){var B=Math.min(I.length,M.length),U;for(U=0;U<B;U++)if(I.charAt(U)!==M.charAt(U)){U--;break}return U<1?I.charAt(0)===M.charAt(0)&&I.charAt(0)==="/"?"/":"":((I.charAt(U)!=="/"||M.charAt(U)!=="/")&&(U=I.substring(0,U).lastIndexOf("/")),I.substring(0,U+1))},r.withinString=function(I,M,B){B||(B={});var U=B.start||r.findUri.start,V=B.end||r.findUri.end,W=B.trim||r.findUri.trim,H=B.parens||r.findUri.parens,X=/[a-z0-9-]=["']?$/i;for(U.lastIndex=0;;){var $=U.exec(I);if(!$)break;var ae=$.index;if(B.ignoreHtml){var se=I.slice(Math.max(ae-3,0),ae);if(se&&X.test(se))continue}for(var he=ae+I.slice(ae).search(V),ge=I.slice(ae,he),le=-1;;){var me=H.exec(ge);if(!me)break;var Me=me.index+me[0].length;le=Math.max(le,Me)}if(le>-1?ge=ge.slice(0,le)+ge.slice(le).replace(W,""):ge=ge.replace(W,""),!(ge.length<=$[0].length)&&!(B.ignore&&B.ignore.test(ge))){he=ae+ge.length;var Ge=M(ge,ae,he,I);if(Ge===void 0){U.lastIndex=he;continue}Ge=String(Ge),I=I.slice(0,ae)+Ge+I.slice(he),U.lastIndex=ae+Ge.length}}return U.lastIndex=0,I},r.ensureValidHostname=function(I,M){var B=!!I,U=!!M,V=!1;if(U&&(V=p(r.hostProtocols,M)),V&&!B)throw new TypeError("Hostname cannot be empty, if protocol is "+M);if(I&&I.match(r.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+I+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(I).match(r.invalid_hostname_characters))throw new TypeError('Hostname "'+I+'" contains characters other than [A-Z0-9.-:_]')}},r.ensureValidPort=function(I){if(I){var M=Number(I);if(!(s(M)&&M>0&&M<65536))throw new TypeError('Port "'+I+'" is not a valid port')}},r.noConflict=function(I){if(I){var M={URI:this.noConflict()};return i.URITemplate&&typeof i.URITemplate.noConflict=="function"&&(M.URITemplate=i.URITemplate.noConflict()),i.IPv6&&typeof i.IPv6.noConflict=="function"&&(M.IPv6=i.IPv6.noConflict()),i.SecondLevelDomains&&typeof i.SecondLevelDomains.noConflict=="function"&&(M.SecondLevelDomains=i.SecondLevelDomains.noConflict()),M}else i.URI===this&&(i.URI=o);return this},a.build=function(I){return I===!0?this._deferred_build=!0:(I===void 0||this._deferred_build)&&(this._string=r.build(this._parts),this._deferred_build=!1),this},a.clone=function(){return new r(this)},a.valueOf=a.toString=function(){return this.build(!1)._string};function D(I){return function(M,B){return M===void 0?this._parts[I]||"":(this._parts[I]=M||null,this.build(!B),this)}}function R(I,M){return function(B,U){return B===void 0?this._parts[I]||"":(B!==null&&(B=B+"",B.charAt(0)===M&&(B=B.substring(1))),this._parts[I]=B,this.build(!U),this)}}a.protocol=D("protocol"),a.username=D("username"),a.password=D("password"),a.hostname=D("hostname"),a.port=D("port"),a.query=R("query","?"),a.fragment=R("fragment","#"),a.search=function(I,M){var B=this.query(I,M);return typeof B=="string"&&B.length?"?"+B:B},a.hash=function(I,M){var B=this.fragment(I,M);return typeof B=="string"&&B.length?"#"+B:B},a.pathname=function(I,M){if(I===void 0||I===!0){var B=this._parts.path||(this._parts.hostname?"/":"");return I?(this._parts.urn?r.decodeUrnPath:r.decodePath)(B):B}else return this._parts.urn?this._parts.path=I?r.recodeUrnPath(I):"":this._parts.path=I?r.recodePath(I):"/",this.build(!M),this},a.path=a.pathname,a.href=function(I,M){var B;if(I===void 0)return this.toString();this._string="",this._parts=r._parts();var U=I instanceof r,V=typeof I=="object"&&(I.hostname||I.path||I.pathname);if(I.nodeName){var W=r.getDomAttribute(I);I=I[W]||"",V=!1}if(!U&&V&&I.pathname!==void 0&&(I=I.toString()),typeof I=="string"||I instanceof String)this._parts=r.parse(String(I),this._parts);else if(U||V){var H=U?I._parts:I;for(B in H)B!=="query"&&l.call(this._parts,B)&&(this._parts[B]=H[B]);H.query&&this.query(H.query,!1)}else throw new TypeError("invalid input");return this.build(!M),this},a.is=function(I){var M=!1,B=!1,U=!1,V=!1,W=!1,H=!1,X=!1,$=!this._parts.urn;switch(this._parts.hostname&&($=!1,B=r.ip4_expression.test(this._parts.hostname),U=r.ip6_expression.test(this._parts.hostname),M=B||U,V=!M,W=V&&n&&n.has(this._parts.hostname),H=V&&r.idn_expression.test(this._parts.hostname),X=V&&r.punycode_expression.test(this._parts.hostname)),I.toLowerCase()){case"relative":return $;case"absolute":return!$;case"domain":case"name":return V;case"sld":return W;case"ip":return M;case"ip4":case"ipv4":case"inet4":return B;case"ip6":case"ipv6":case"inet6":return U;case"idn":return H;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return X}return null};var P=a.protocol,L=a.port,F=a.hostname;a.protocol=function(I,M){if(I&&(I=I.replace(/:(\/\/)?$/,""),!I.match(r.protocol_expression)))throw new TypeError('Protocol "'+I+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return P.call(this,I,M)},a.scheme=a.protocol,a.port=function(I,M){return this._parts.urn?I===void 0?"":this:(I!==void 0&&(I===0&&(I=null),I&&(I+="",I.charAt(0)===":"&&(I=I.substring(1)),r.ensureValidPort(I))),L.call(this,I,M))},a.hostname=function(I,M){if(this._parts.urn)return I===void 0?"":this;if(I!==void 0){var B={preventInvalidHostname:this._parts.preventInvalidHostname},U=r.parseHost(I,B);if(U!=="/")throw new TypeError('Hostname "'+I+'" contains characters other than [A-Z0-9.-]');I=B.hostname,this._parts.preventInvalidHostname&&r.ensureValidHostname(I,this._parts.protocol)}return F.call(this,I,M)},a.origin=function(I,M){if(this._parts.urn)return I===void 0?"":this;if(I===void 0){var B=this.protocol(),U=this.authority();return U?(B?B+"://":"")+this.authority():""}else{var V=r(I);return this.protocol(V.protocol()).authority(V.authority()).build(!M),this}},a.host=function(I,M){if(this._parts.urn)return I===void 0?"":this;if(I===void 0)return this._parts.hostname?r.buildHost(this._parts):"";var B=r.parseHost(I,this._parts);if(B!=="/")throw new TypeError('Hostname "'+I+'" contains characters other than [A-Z0-9.-]');return this.build(!M),this},a.authority=function(I,M){if(this._parts.urn)return I===void 0?"":this;if(I===void 0)return this._parts.hostname?r.buildAuthority(this._parts):"";var B=r.parseAuthority(I,this._parts);if(B!=="/")throw new TypeError('Hostname "'+I+'" contains characters other than [A-Z0-9.-]');return this.build(!M),this},a.userinfo=function(I,M){if(this._parts.urn)return I===void 0?"":this;if(I===void 0){var B=r.buildUserinfo(this._parts);return B&&B.substring(0,B.length-1)}else return I[I.length-1]!=="@"&&(I+="@"),r.parseUserinfo(I,this._parts),this.build(!M),this},a.resource=function(I,M){var B;return I===void 0?this.path()+this.search()+this.hash():(B=r.parse(I),this._parts.path=B.path,this._parts.query=B.query,this._parts.fragment=B.fragment,this.build(!M),this)},a.subdomain=function(I,M){if(this._parts.urn)return I===void 0?"":this;if(I===void 0){if(!this._parts.hostname||this.is("IP"))return"";var B=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,B)||""}else{var U=this._parts.hostname.length-this.domain().length,V=this._parts.hostname.substring(0,U),W=new RegExp("^"+u(V));if(I&&I.charAt(I.length-1)!=="."&&(I+="."),I.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return I&&r.ensureValidHostname(I,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(W,I),this.build(!M),this}},a.domain=function(I,M){if(this._parts.urn)return I===void 0?"":this;if(typeof I=="boolean"&&(M=I,I=void 0),I===void 0){if(!this._parts.hostname||this.is("IP"))return"";var B=this._parts.hostname.match(/\./g);if(B&&B.length<2)return this._parts.hostname;var U=this._parts.hostname.length-this.tld(M).length-1;return U=this._parts.hostname.lastIndexOf(".",U-1)+1,this._parts.hostname.substring(U)||""}else{if(!I)throw new TypeError("cannot set domain empty");if(I.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(r.ensureValidHostname(I,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=I;else{var V=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(V,I)}return this.build(!M),this}},a.tld=function(I,M){if(this._parts.urn)return I===void 0?"":this;if(typeof I=="boolean"&&(M=I,I=void 0),I===void 0){if(!this._parts.hostname||this.is("IP"))return"";var B=this._parts.hostname.lastIndexOf("."),U=this._parts.hostname.substring(B+1);return M!==!0&&n&&n.list[U.toLowerCase()]&&n.get(this._parts.hostname)||U}else{var V;if(I)if(I.match(/[^a-zA-Z0-9-]/))if(n&&n.is(I))V=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(V,I);else throw new TypeError('TLD "'+I+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");V=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(V,I)}else throw new TypeError("cannot set TLD empty");return this.build(!M),this}},a.directory=function(I,M){if(this._parts.urn)return I===void 0?"":this;if(I===void 0||I===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var B=this._parts.path.length-this.filename().length-1,U=this._parts.path.substring(0,B)||(this._parts.hostname?"/":"");return I?r.decodePath(U):U}else{var V=this._parts.path.length-this.filename().length,W=this._parts.path.substring(0,V),H=new RegExp("^"+u(W));return this.is("relative")||(I||(I="/"),I.charAt(0)!=="/"&&(I="/"+I)),I&&I.charAt(I.length-1)!=="/"&&(I+="/"),I=r.recodePath(I),this._parts.path=this._parts.path.replace(H,I),this.build(!M),this}},a.filename=function(I,M){if(this._parts.urn)return I===void 0?"":this;if(typeof I!="string"){if(!this._parts.path||this._parts.path==="/")return"";var B=this._parts.path.lastIndexOf("/"),U=this._parts.path.substring(B+1);return I?r.decodePathSegment(U):U}else{var V=!1;I.charAt(0)==="/"&&(I=I.substring(1)),I.match(/\.?\//)&&(V=!0);var W=new RegExp(u(this.filename())+"$");return I=r.recodePath(I),this._parts.path=this._parts.path.replace(W,I),V?this.normalizePath(M):this.build(!M),this}},a.suffix=function(I,M){if(this._parts.urn)return I===void 0?"":this;if(I===void 0||I===!0){if(!this._parts.path||this._parts.path==="/")return"";var B=this.filename(),U=B.lastIndexOf("."),V,W;return U===-1?"":(V=B.substring(U+1),W=/^[a-z0-9%]+$/i.test(V)?V:"",I?r.decodePathSegment(W):W)}else{I.charAt(0)==="."&&(I=I.substring(1));var H=this.suffix(),X;if(H)I?X=new RegExp(u(H)+"$"):X=new RegExp(u("."+H)+"$");else{if(!I)return this;this._parts.path+="."+r.recodePath(I)}return X&&(I=r.recodePath(I),this._parts.path=this._parts.path.replace(X,I)),this.build(!M),this}},a.segment=function(I,M,B){var U=this._parts.urn?":":"/",V=this.path(),W=V.substring(0,1)==="/",H=V.split(U);if(I!==void 0&&typeof I!="number"&&(B=M,M=I,I=void 0),I!==void 0&&typeof I!="number")throw new Error('Bad segment "'+I+'", must be 0-based integer');if(W&&H.shift(),I<0&&(I=Math.max(H.length+I,0)),M===void 0)return I===void 0?H:H[I];if(I===null||H[I]===void 0)if(h(M)){H=[];for(var X=0,$=M.length;X<$;X++)!M[X].length&&(!H.length||!H[H.length-1].length)||(H.length&&!H[H.length-1].length&&H.pop(),H.push(b(M[X])))}else(M||typeof M=="string")&&(M=b(M),H[H.length-1]===""?H[H.length-1]=M:H.push(M));else M?H[I]=b(M):H.splice(I,1);return W&&H.unshift(""),this.path(H.join(U),B)},a.segmentCoded=function(I,M,B){var U,V,W;if(typeof I!="number"&&(B=M,M=I,I=void 0),M===void 0){if(U=this.segment(I,M,B),!h(U))U=U!==void 0?r.decode(U):void 0;else for(V=0,W=U.length;V<W;V++)U[V]=r.decode(U[V]);return U}if(!h(M))M=typeof M=="string"||M instanceof String?r.encode(M):M;else for(V=0,W=M.length;V<W;V++)M[V]=r.encode(M[V]);return this.segment(I,M,B)};var y=a.query;return a.query=function(I,M){if(I===!0)return r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof I=="function"){var B=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace),U=I.call(this,B);return this._parts.query=r.buildQuery(U||B,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!M),this}else return I!==void 0&&typeof I!="string"?(this._parts.query=r.buildQuery(I,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!M),this):y.call(this,I,M)},a.setQuery=function(I,M,B){var U=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof I=="string"||I instanceof String)U[I]=M!==void 0?M:null;else if(typeof I=="object")for(var V in I)l.call(I,V)&&(U[V]=I[V]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=r.buildQuery(U,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof I!="string"&&(B=M),this.build(!B),this},a.addQuery=function(I,M,B){var U=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.addQuery(U,I,M===void 0?null:M),this._parts.query=r.buildQuery(U,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof I!="string"&&(B=M),this.build(!B),this},a.removeQuery=function(I,M,B){var U=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.removeQuery(U,I,M),this._parts.query=r.buildQuery(U,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof I!="string"&&(B=M),this.build(!B),this},a.hasQuery=function(I,M,B){var U=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.hasQuery(U,I,M,B)},a.setSearch=a.setQuery,a.addSearch=a.addQuery,a.removeSearch=a.removeQuery,a.hasSearch=a.hasQuery,a.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},a.normalizeProtocol=function(I){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!I)),this},a.normalizeHostname=function(I){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!I)),this},a.normalizePort=function(I){return typeof this._parts.protocol=="string"&&this._parts.port===r.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!I)),this},a.normalizePath=function(I){var M=this._parts.path;if(!M)return this;if(this._parts.urn)return this._parts.path=r.recodeUrnPath(this._parts.path),this.build(!I),this;if(this._parts.path==="/")return this;M=r.recodePath(M);var B,U="",V,W;for(M.charAt(0)!=="/"&&(B=!0,M="/"+M),(M.slice(-3)==="/.."||M.slice(-2)==="/.")&&(M+="/"),M=M.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),B&&(U=M.substring(1).match(/^(\.\.\/)+/)||"",U&&(U=U[0]));V=M.search(/\/\.\.(\/|$)/),V!==-1;){if(V===0){M=M.substring(3);continue}W=M.substring(0,V).lastIndexOf("/"),W===-1&&(W=V),M=M.substring(0,W)+M.substring(V+3)}return B&&this.is("relative")&&(M=U+M.substring(1)),this._parts.path=M,this.build(!I),this},a.normalizePathname=a.normalizePath,a.normalizeQuery=function(I){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(r.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!I)),this},a.normalizeFragment=function(I){return this._parts.fragment||(this._parts.fragment=null,this.build(!I)),this},a.normalizeSearch=a.normalizeQuery,a.normalizeHash=a.normalizeFragment,a.iso8859=function(){var I=r.encode,M=r.decode;r.encode=escape,r.decode=decodeURIComponent;try{this.normalize()}finally{r.encode=I,r.decode=M}return this},a.unicode=function(){var I=r.encode,M=r.decode;r.encode=T,r.decode=unescape;try{this.normalize()}finally{r.encode=I,r.decode=M}return this},a.readable=function(){var I=this.clone();I.username("").password("").normalize();var M="";if(I._parts.protocol&&(M+=I._parts.protocol+"://"),I._parts.hostname&&(I.is("punycode")&&e?(M+=e.toUnicode(I._parts.hostname),I._parts.port&&(M+=":"+I._parts.port)):M+=I.host()),I._parts.hostname&&I._parts.path&&I._parts.path.charAt(0)!=="/"&&(M+="/"),M+=I.path(!0),I._parts.query){for(var B="",U=0,V=I._parts.query.split("&"),W=V.length;U<W;U++){var H=(V[U]||"").split("=");B+="&"+r.decodeQuery(H[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),H[1]!==void 0&&(B+="="+r.decodeQuery(H[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}M+="?"+B.substring(1)}return M+=r.decodeQuery(I.hash(),!0),M},a.absoluteTo=function(I){var M=this.clone(),B=["protocol","username","password","hostname","port"],U,V,W;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(I instanceof r||(I=new r(I)),M._parts.protocol||(M._parts.protocol=I._parts.protocol,this._parts.hostname))return M;for(V=0;W=B[V];V++)M._parts[W]=I._parts[W];return M._parts.path?(M._parts.path.substring(-2)===".."&&(M._parts.path+="/"),M.path().charAt(0)!=="/"&&(U=I.directory(),U=U||(I.path().indexOf("/")===0?"/":""),M._parts.path=(U?U+"/":"")+M._parts.path,M.normalizePath())):(M._parts.path=I._parts.path,M._parts.query||(M._parts.query=I._parts.query)),M.build(),M},a.relativeTo=function(I){var M=this.clone().normalize(),B,U,V,W,H;if(M._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(I=new r(I).normalize(),B=M._parts,U=I._parts,W=M.path(),H=I.path(),W.charAt(0)!=="/")throw new Error("URI is already relative");if(H.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if(B.protocol===U.protocol&&(B.protocol=null),B.username!==U.username||B.password!==U.password||B.protocol!==null||B.username!==null||B.password!==null)return M.build();if(B.hostname===U.hostname&&B.port===U.port)B.hostname=null,B.port=null;else return M.build();if(W===H)return B.path="",M.build();if(V=r.commonPath(W,H),!V)return M.build();var X=U.path.substring(V.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return B.path=X+B.path.substring(V.length)||"./",M.build()},a.equals=function(I){var M=this.clone(),B=new r(I),U={},V={},W={},H,X,$;if(M.normalize(),B.normalize(),M.toString()===B.toString())return!0;if(H=M.query(),X=B.query(),M.query(""),B.query(""),M.toString()!==B.toString()||H.length!==X.length)return!1;U=r.parseQuery(H,this._parts.escapeQuerySpace),V=r.parseQuery(X,this._parts.escapeQuerySpace);for($ in U)if(l.call(U,$)){if(h(U[$])){if(!_(U[$],V[$]))return!1}else if(U[$]!==V[$])return!1;W[$]=!0}for($ in V)if(l.call(V,$)&&!W[$])return!1;return!0},a.preventInvalidHostname=function(I){return this._parts.preventInvalidHostname=!!I,this},a.duplicateQueryParameters=function(I){return this._parts.duplicateQueryParameters=!!I,this},a.escapeQuerySpace=function(I){return this._parts.escapeQuerySpace=!!I,this},r})});var Aee=Rf((uj,fj)=>{/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */(function(e,t){typeof uj=="object"&&typeof fj!="undefined"?fj.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis!="undefined"?globalThis:e||self,e.DOMPurify=t())})(uj,function(){"use strict";let{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:i,getOwnPropertyDescriptor:o}=Object,{freeze:r,seal:s,create:a}=Object,{apply:l,construct:u}=typeof Reflect!="undefined"&&Reflect;r||(r=function(Qe){return Qe}),s||(s=function(Qe){return Qe}),l||(l=function(Qe,et,at){return Qe.apply(et,at)}),u||(u=function(Qe,et){return new Qe(...et)});let f=D(Array.prototype.forEach),h=D(Array.prototype.pop),m=D(Array.prototype.push),p=D(String.prototype.toLowerCase),_=D(String.prototype.toString),b=D(String.prototype.match),x=D(String.prototype.replace),T=D(String.prototype.indexOf),E=D(String.prototype.trim),S=D(Object.prototype.hasOwnProperty),A=D(RegExp.prototype.test),v=R(TypeError);function D(Ae){return function(Qe){for(var et=arguments.length,at=new Array(et>1?et-1:0),$t=1;$t<et;$t++)at[$t-1]=arguments[$t];return l(Ae,Qe,at)}}function R(Ae){return function(){for(var Qe=arguments.length,et=new Array(Qe),at=0;at<Qe;at++)et[at]=arguments[at];return u(Ae,et)}}function P(Ae,Qe){let et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p;t&&t(Ae,null);let at=Qe.length;for(;at--;){let $t=Qe[at];if(typeof $t=="string"){let pe=et($t);pe!==$t&&(n(Qe)||(Qe[at]=pe),$t=pe)}Ae[$t]=!0}return Ae}function L(Ae){for(let Qe=0;Qe<Ae.length;Qe++)S(Ae,Qe)||(Ae[Qe]=null);return Ae}function F(Ae){let Qe=a(null);for(let[et,at]of e(Ae))S(Ae,et)&&(Array.isArray(at)?Qe[et]=L(at):at&&typeof at=="object"&&at.constructor===Object?Qe[et]=F(at):Qe[et]=at);return Qe}function y(Ae,Qe){for(;Ae!==null;){let at=o(Ae,Qe);if(at){if(at.get)return D(at.get);if(typeof at.value=="function")return D(at.value)}Ae=i(Ae)}function et(){return null}return et}let I=r(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),M=r(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),B=r(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),U=r(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),V=r(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),W=r(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),H=r(["#text"]),X=r(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),$=r(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ae=r(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),se=r(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),he=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ge=s(/<%[\w\W]*|[\w\W]*%>/gm),le=s(/\${[\w\W]*}/gm),me=s(/^data-[\-\w.\u00B7-\uFFFF]/),Me=s(/^aria-[\-\w]+$/),Ge=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),De=s(/^(?:\w+script|data):/i),ke=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),He=s(/^html$/i),ft=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ie=Object.freeze({__proto__:null,MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:le,DATA_ATTR:me,ARIA_ATTR:Me,IS_ALLOWED_URI:Ge,IS_SCRIPT_OR_DATA:De,ATTR_WHITESPACE:ke,DOCTYPE_NAME:He,CUSTOM_ELEMENT:ft});let Kt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Pt=function(){return typeof window=="undefined"?null:window},dt=function(Qe,et){if(typeof Qe!="object"||typeof Qe.createPolicy!="function")return null;let at=null,$t="data-tt-policy-suffix";et&&et.hasAttribute($t)&&(at=et.getAttribute($t));let pe="dompurify"+(at?"#"+at:"");try{return Qe.createPolicy(pe,{createHTML(_e){return _e},createScriptURL(_e){return _e}})}catch{return console.warn("TrustedTypes policy "+pe+" could not be created."),null}};function rn(){let Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Pt(),Qe=xn=>rn(xn);if(Qe.version="3.1.7",Qe.removed=[],!Ae||!Ae.document||Ae.document.nodeType!==Kt.document)return Qe.isSupported=!1,Qe;let{document:et}=Ae,at=et,$t=at.currentScript,{DocumentFragment:pe,HTMLTemplateElement:_e,Node:rt,Element:Ri,NodeFilter:ot,NamedNodeMap:uo=Ae.NamedNodeMap||Ae.MozNamedAttrMap,HTMLFormElement:ir,DOMParser:Ja,trustedTypes:gr}=Ae,Vr=Ri.prototype,Le=y(Vr,"cloneNode"),it=y(Vr,"remove"),We=y(Vr,"nextSibling"),Ye=y(Vr,"childNodes"),ct=y(Vr,"parentNode");if(typeof _e=="function"){let xn=et.createElement("template");xn.content&&xn.content.ownerDocument&&(et=xn.content.ownerDocument)}let At,hn="",{implementation:ao,createNodeIterator:Yo,createDocumentFragment:ya,getElementsByTagName:ba}=et,{importNode:Hr}=at,Gn={};Qe.isSupported=typeof e=="function"&&typeof ct=="function"&&ao&&ao.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:ts,ERB_EXPR:yr,TMPLIT_EXPR:Bc,DATA_ATTR:fo,ARIA_ATTR:Rr,IS_SCRIPT_OR_DATA:xm,ATTR_WHITESPACE:kc,CUSTOM_ELEMENT:Tm}=Ie,{IS_ALLOWED_URI:xa}=Ie,br=null,na=P({},[...I,...M,...B,...V,...H]),co=null,Cm=P({},[...X,...$,...ae,...se]),ii=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Qa=null,wl=null,Tu=!0,ho=!0,Cu=!1,fx=!0,Vy=!1,G4=!0,Hy=!1,j4=!1,W4=!1,dx=!1,ZI=!1,JI=!1,DX=!0,IX=!1,Zxe="user-content-",q4=!0,Kw=!1,hx={},mx=null,OX=P({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),PX=null,RX=P({},["audio","video","img","source","image","track"]),Y4=null,MX=P({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),QI="http://www.w3.org/1998/Math/MathML",eO="http://www.w3.org/2000/svg",Em="http://www.w3.org/1999/xhtml",px=Em,X4=!1,K4=null,Jxe=P({},[QI,eO,Em],_),$w=null,Qxe=["application/xhtml+xml","text/html"],eTe="text/html",Ns=null,_x=null,tTe=et.createElement("form"),LX=function(ye){return ye instanceof RegExp||ye instanceof Function},$4=function(){let ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(_x&&_x===ye)){if((!ye||typeof ye!="object")&&(ye={}),ye=F(ye),$w=Qxe.indexOf(ye.PARSER_MEDIA_TYPE)===-1?eTe:ye.PARSER_MEDIA_TYPE,Ns=$w==="application/xhtml+xml"?_:p,br=S(ye,"ALLOWED_TAGS")?P({},ye.ALLOWED_TAGS,Ns):na,co=S(ye,"ALLOWED_ATTR")?P({},ye.ALLOWED_ATTR,Ns):Cm,K4=S(ye,"ALLOWED_NAMESPACES")?P({},ye.ALLOWED_NAMESPACES,_):Jxe,Y4=S(ye,"ADD_URI_SAFE_ATTR")?P(F(MX),ye.ADD_URI_SAFE_ATTR,Ns):MX,PX=S(ye,"ADD_DATA_URI_TAGS")?P(F(RX),ye.ADD_DATA_URI_TAGS,Ns):RX,mx=S(ye,"FORBID_CONTENTS")?P({},ye.FORBID_CONTENTS,Ns):OX,Qa=S(ye,"FORBID_TAGS")?P({},ye.FORBID_TAGS,Ns):{},wl=S(ye,"FORBID_ATTR")?P({},ye.FORBID_ATTR,Ns):{},hx=S(ye,"USE_PROFILES")?ye.USE_PROFILES:!1,Tu=ye.ALLOW_ARIA_ATTR!==!1,ho=ye.ALLOW_DATA_ATTR!==!1,Cu=ye.ALLOW_UNKNOWN_PROTOCOLS||!1,fx=ye.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Vy=ye.SAFE_FOR_TEMPLATES||!1,G4=ye.SAFE_FOR_XML!==!1,Hy=ye.WHOLE_DOCUMENT||!1,dx=ye.RETURN_DOM||!1,ZI=ye.RETURN_DOM_FRAGMENT||!1,JI=ye.RETURN_TRUSTED_TYPE||!1,W4=ye.FORCE_BODY||!1,DX=ye.SANITIZE_DOM!==!1,IX=ye.SANITIZE_NAMED_PROPS||!1,q4=ye.KEEP_CONTENT!==!1,Kw=ye.IN_PLACE||!1,xa=ye.ALLOWED_URI_REGEXP||Ge,px=ye.NAMESPACE||Em,ii=ye.CUSTOM_ELEMENT_HANDLING||{},ye.CUSTOM_ELEMENT_HANDLING&&LX(ye.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ii.tagNameCheck=ye.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ye.CUSTOM_ELEMENT_HANDLING&&LX(ye.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ii.attributeNameCheck=ye.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ye.CUSTOM_ELEMENT_HANDLING&&typeof ye.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ii.allowCustomizedBuiltInElements=ye.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Vy&&(ho=!1),ZI&&(dx=!0),hx&&(br=P({},H),co=[],hx.html===!0&&(P(br,I),P(co,X)),hx.svg===!0&&(P(br,M),P(co,$),P(co,se)),hx.svgFilters===!0&&(P(br,B),P(co,$),P(co,se)),hx.mathMl===!0&&(P(br,V),P(co,ae),P(co,se))),ye.ADD_TAGS&&(br===na&&(br=F(br)),P(br,ye.ADD_TAGS,Ns)),ye.ADD_ATTR&&(co===Cm&&(co=F(co)),P(co,ye.ADD_ATTR,Ns)),ye.ADD_URI_SAFE_ATTR&&P(Y4,ye.ADD_URI_SAFE_ATTR,Ns),ye.FORBID_CONTENTS&&(mx===OX&&(mx=F(mx)),P(mx,ye.FORBID_CONTENTS,Ns)),q4&&(br["#text"]=!0),Hy&&P(br,["html","head","body"]),br.table&&(P(br,["tbody"]),delete Qa.tbody),ye.TRUSTED_TYPES_POLICY){if(typeof ye.TRUSTED_TYPES_POLICY.createHTML!="function")throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ye.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');At=ye.TRUSTED_TYPES_POLICY,hn=At.createHTML("")}else At===void 0&&(At=dt(gr,$t)),At!==null&&typeof hn=="string"&&(hn=At.createHTML(""));r&&r(ye),_x=ye}},NX=P({},["mi","mo","mn","ms","mtext"]),FX=P({},["annotation-xml"]),nTe=P({},["title","style","font","a","script"]),BX=P({},[...M,...B,...U]),kX=P({},[...V,...W]),iTe=function(ye){let Rt=ct(ye);(!Rt||!Rt.tagName)&&(Rt={namespaceURI:px,tagName:"template"});let dn=p(ye.tagName),Ro=p(Rt.tagName);return K4[ye.namespaceURI]?ye.namespaceURI===eO?Rt.namespaceURI===Em?dn==="svg":Rt.namespaceURI===QI?dn==="svg"&&(Ro==="annotation-xml"||NX[Ro]):!!BX[dn]:ye.namespaceURI===QI?Rt.namespaceURI===Em?dn==="math":Rt.namespaceURI===eO?dn==="math"&&FX[Ro]:!!kX[dn]:ye.namespaceURI===Em?Rt.namespaceURI===eO&&!FX[Ro]||Rt.namespaceURI===QI&&!NX[Ro]?!1:!kX[dn]&&(nTe[dn]||!BX[dn]):!!($w==="application/xhtml+xml"&&K4[ye.namespaceURI]):!1},jd=function(ye){m(Qe.removed,{element:ye});try{ct(ye).removeChild(ye)}catch{it(ye)}},tO=function(ye,Rt){try{m(Qe.removed,{attribute:Rt.getAttributeNode(ye),from:Rt})}catch{m(Qe.removed,{attribute:null,from:Rt})}if(Rt.removeAttribute(ye),ye==="is"&&!co[ye])if(dx||ZI)try{jd(Rt)}catch{}else try{Rt.setAttribute(ye,"")}catch{}},UX=function(ye){let Rt=null,dn=null;if(W4)ye="<remove></remove>"+ye;else{let ia=b(ye,/^[\r\n\t ]+/);dn=ia&&ia[0]}$w==="application/xhtml+xml"&&px===Em&&(ye='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ye+"</body></html>");let Ro=At?At.createHTML(ye):ye;if(px===Em)try{Rt=new Ja().parseFromString(Ro,$w)}catch{}if(!Rt||!Rt.documentElement){Rt=ao.createDocument(px,"template",null);try{Rt.documentElement.innerHTML=X4?hn:Ro}catch{}}let Ta=Rt.body||Rt.documentElement;return ye&&dn&&Ta.insertBefore(et.createTextNode(dn),Ta.childNodes[0]||null),px===Em?ba.call(Rt,Hy?"html":"body")[0]:Hy?Rt.documentElement:Ta},zX=function(ye){return Yo.call(ye.ownerDocument||ye,ye,ot.SHOW_ELEMENT|ot.SHOW_COMMENT|ot.SHOW_TEXT|ot.SHOW_PROCESSING_INSTRUCTION|ot.SHOW_CDATA_SECTION,null)},VX=function(ye){return ye instanceof ir&&(typeof ye.nodeName!="string"||typeof ye.textContent!="string"||typeof ye.removeChild!="function"||!(ye.attributes instanceof uo)||typeof ye.removeAttribute!="function"||typeof ye.setAttribute!="function"||typeof ye.namespaceURI!="string"||typeof ye.insertBefore!="function"||typeof ye.hasChildNodes!="function")},HX=function(ye){return typeof rt=="function"&&ye instanceof rt},wm=function(ye,Rt,dn){Gn[ye]&&f(Gn[ye],Ro=>{Ro.call(Qe,Rt,dn,_x)})},GX=function(ye){let Rt=null;if(wm("beforeSanitizeElements",ye,null),VX(ye))return jd(ye),!0;let dn=Ns(ye.nodeName);if(wm("uponSanitizeElement",ye,{tagName:dn,allowedTags:br}),ye.hasChildNodes()&&!HX(ye.firstElementChild)&&A(/<[/\w]/g,ye.innerHTML)&&A(/<[/\w]/g,ye.textContent)||ye.nodeType===Kt.progressingInstruction||G4&&ye.nodeType===Kt.comment&&A(/<[/\w]/g,ye.data))return jd(ye),!0;if(!br[dn]||Qa[dn]){if(!Qa[dn]&&WX(dn)&&(ii.tagNameCheck instanceof RegExp&&A(ii.tagNameCheck,dn)||ii.tagNameCheck instanceof Function&&ii.tagNameCheck(dn)))return!1;if(q4&&!mx[dn]){let Ro=ct(ye)||ye.parentNode,Ta=Ye(ye)||ye.childNodes;if(Ta&&Ro){let ia=Ta.length;for(let Uc=ia-1;Uc>=0;--Uc){let Wd=Le(Ta[Uc],!0);Wd.__removalCount=(ye.__removalCount||0)+1,Ro.insertBefore(Wd,We(ye))}}}return jd(ye),!0}return ye instanceof Ri&&!iTe(ye)||(dn==="noscript"||dn==="noembed"||dn==="noframes")&&A(/<\/no(script|embed|frames)/i,ye.innerHTML)?(jd(ye),!0):(Vy&&ye.nodeType===Kt.text&&(Rt=ye.textContent,f([ts,yr,Bc],Ro=>{Rt=x(Rt,Ro," ")}),ye.textContent!==Rt&&(m(Qe.removed,{element:ye.cloneNode()}),ye.textContent=Rt)),wm("afterSanitizeElements",ye,null),!1)},jX=function(ye,Rt,dn){if(DX&&(Rt==="id"||Rt==="name")&&(dn in et||dn in tTe))return!1;if(!(ho&&!wl[Rt]&&A(fo,Rt))){if(!(Tu&&A(Rr,Rt))){if(!co[Rt]||wl[Rt]){if(!(WX(ye)&&(ii.tagNameCheck instanceof RegExp&&A(ii.tagNameCheck,ye)||ii.tagNameCheck instanceof Function&&ii.tagNameCheck(ye))&&(ii.attributeNameCheck instanceof RegExp&&A(ii.attributeNameCheck,Rt)||ii.attributeNameCheck instanceof Function&&ii.attributeNameCheck(Rt))||Rt==="is"&&ii.allowCustomizedBuiltInElements&&(ii.tagNameCheck instanceof RegExp&&A(ii.tagNameCheck,dn)||ii.tagNameCheck instanceof Function&&ii.tagNameCheck(dn))))return!1}else if(!Y4[Rt]){if(!A(xa,x(dn,kc,""))){if(!((Rt==="src"||Rt==="xlink:href"||Rt==="href")&&ye!=="script"&&T(dn,"data:")===0&&PX[ye])){if(!(Cu&&!A(xm,x(dn,kc,"")))){if(dn)return!1}}}}}}return!0},WX=function(ye){return ye!=="annotation-xml"&&b(ye,Tm)},qX=function(ye){wm("beforeSanitizeAttributes",ye,null);let{attributes:Rt}=ye;if(!Rt)return;let dn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:co},Ro=Rt.length;for(;Ro--;){let Ta=Rt[Ro],{name:ia,namespaceURI:Uc,value:Wd}=Ta,Zw=Ns(ia),ec=ia==="value"?Wd:E(Wd);if(dn.attrName=Zw,dn.attrValue=ec,dn.keepAttr=!0,dn.forceKeepAttr=void 0,wm("uponSanitizeAttribute",ye,dn),ec=dn.attrValue,dn.forceKeepAttr||(tO(ia,ye),!dn.keepAttr))continue;if(!fx&&A(/\/>/i,ec)){tO(ia,ye);continue}Vy&&f([ts,yr,Bc],XX=>{ec=x(ec,XX," ")});let YX=Ns(ye.nodeName);if(jX(YX,Zw,ec)){if(IX&&(Zw==="id"||Zw==="name")&&(tO(ia,ye),ec=Zxe+ec),G4&&A(/((--!?|])>)|<\/(style|title)/i,ec)){tO(ia,ye);continue}if(At&&typeof gr=="object"&&typeof gr.getAttributeType=="function"&&!Uc)switch(gr.getAttributeType(YX,Zw)){case"TrustedHTML":{ec=At.createHTML(ec);break}case"TrustedScriptURL":{ec=At.createScriptURL(ec);break}}try{Uc?ye.setAttributeNS(Uc,ia,ec):ye.setAttribute(ia,ec),VX(ye)?jd(ye):h(Qe.removed)}catch{}}}wm("afterSanitizeAttributes",ye,null)},oTe=function xn(ye){let Rt=null,dn=zX(ye);for(wm("beforeSanitizeShadowDOM",ye,null);Rt=dn.nextNode();)wm("uponSanitizeShadowNode",Rt,null),!GX(Rt)&&(Rt.content instanceof pe&&xn(Rt.content),qX(Rt));wm("afterSanitizeShadowDOM",ye,null)};return Qe.sanitize=function(xn){let ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Rt=null,dn=null,Ro=null,Ta=null;if(X4=!xn,X4&&(xn="<!-->"),typeof xn!="string"&&!HX(xn))if(typeof xn.toString=="function"){if(xn=xn.toString(),typeof xn!="string")throw v("dirty is not a string, aborting")}else throw v("toString is not a function");if(!Qe.isSupported)return xn;if(j4||$4(ye),Qe.removed=[],typeof xn=="string"&&(Kw=!1),Kw){if(xn.nodeName){let Wd=Ns(xn.nodeName);if(!br[Wd]||Qa[Wd])throw v("root node is forbidden and cannot be sanitized in-place")}}else if(xn instanceof rt)Rt=UX("<!---->"),dn=Rt.ownerDocument.importNode(xn,!0),dn.nodeType===Kt.element&&dn.nodeName==="BODY"||dn.nodeName==="HTML"?Rt=dn:Rt.appendChild(dn);else{if(!dx&&!Vy&&!Hy&&xn.indexOf("<")===-1)return At&&JI?At.createHTML(xn):xn;if(Rt=UX(xn),!Rt)return dx?null:JI?hn:""}Rt&&W4&&jd(Rt.firstChild);let ia=zX(Kw?xn:Rt);for(;Ro=ia.nextNode();)GX(Ro)||(Ro.content instanceof pe&&oTe(Ro.content),qX(Ro));if(Kw)return xn;if(dx){if(ZI)for(Ta=ya.call(Rt.ownerDocument);Rt.firstChild;)Ta.appendChild(Rt.firstChild);else Ta=Rt;return(co.shadowroot||co.shadowrootmode)&&(Ta=Hr.call(at,Ta,!0)),Ta}let Uc=Hy?Rt.outerHTML:Rt.innerHTML;return Hy&&br["!doctype"]&&Rt.ownerDocument&&Rt.ownerDocument.doctype&&Rt.ownerDocument.doctype.name&&A(He,Rt.ownerDocument.doctype.name)&&(Uc="<!DOCTYPE "+Rt.ownerDocument.doctype.name+`>
| `+Uc),Vy&&f([ts,yr,Bc],Wd=>{Uc=x(Uc,Wd," ")}),At&&JI?At.createHTML(Uc):Uc},Qe.setConfig=function(){let xn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$4(xn),j4=!0},Qe.clearConfig=function(){_x=null,j4=!1},Qe.isValidAttribute=function(xn,ye,Rt){_x||$4({});let dn=Ns(xn),Ro=Ns(ye);return jX(dn,Ro,Rt)},Qe.addHook=function(xn,ye){typeof ye=="function"&&(Gn[xn]=Gn[xn]||[],m(Gn[xn],ye))},Qe.removeHook=function(xn){if(Gn[xn])return h(Gn[xn])},Qe.removeHooks=function(xn){Gn[xn]&&(Gn[xn]=[])},Qe.removeAllHooks=function(){Gn={}},Qe}var Vt=rn();return Vt})});var wre=Rf((Wvn,Ere)=>{"use strict";Ere.exports=kje;var $A=1e20;function kje(e,t){t||(t={});var n=t.cutoff==null?.25:t.cutoff,i=t.radius==null?8:t.radius,o=t.channel||0,r,s,a,l,u,f,h,m,p,_,b;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");r=t.width,s=t.height,l=e,t.stride?f=t.stride:f=Math.floor(e.length/r/s)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(m=e,h=m.getContext("2d"),r=m.width,s=m.height,p=h.getImageData(0,0,r,s),l=p.data,f=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(m=e.canvas,h=e,r=m.width,s=m.height,p=h.getImageData(0,0,r,s),l=p.data,f=4):window.ImageData&&e instanceof window.ImageData&&(p=e,r=e.width,s=e.height,l=p.data,f=4);if(a=Math.max(r,s),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(r*s),_=0,b=Math.floor(u.length/f);_<b;_++)l[_]=u[_*f+o]/255;else if(f!==1)throw Error("Raw data can have only 1 value per pixel");var x=Array(r*s),T=Array(r*s),E=Array(a),S=Array(a),A=Array(a+1),v=Array(a);for(_=0,b=r*s;_<b;_++){var D=l[_];x[_]=D===1?0:D===0?$A:Math.pow(Math.max(0,.5-D),2),T[_]=D===1?$A:D===0?0:Math.pow(Math.max(0,D-.5),2)}Tre(x,r,s,E,S,v,A),Tre(T,r,s,E,S,v,A);var R=window.Float32Array?new Float32Array(r*s):new Array(r*s);for(_=0,b=r*s;_<b;_++)R[_]=Math.min(Math.max(1-((x[_]-T[_])/i+n),0),1);return R}function Tre(e,t,n,i,o,r,s){for(var a=0;a<t;a++){for(var l=0;l<n;l++)i[l]=e[l*t+a];for(Cre(i,o,r,s,n),l=0;l<n;l++)e[l*t+a]=o[l]}for(l=0;l<n;l++){for(a=0;a<t;a++)i[a]=e[l*t+a];for(Cre(i,o,r,s,t),a=0;a<t;a++)e[l*t+a]=Math.sqrt(o[a])}}function Cre(e,t,n,i,o){n[0]=0,i[0]=-$A,i[1]=+$A;for(var r=1,s=0;r<o;r++){for(var a=(e[r]+r*r-(e[n[s]]+n[s]*n[s]))/(2*r-2*n[s]);a<=i[s];)s--,a=(e[r]+r*r-(e[n[s]]+n[s]*n[s]))/(2*r-2*n[s]);s++,n[s]=r,i[s]=a,i[s+1]=+$A}for(r=0,s=0;r<o;r++){for(;i[s+1]<r;)s++;t[r]=(r-n[s])*(r-n[s])+e[n[s]]}}});var Ire=Rf((lDn,O2)=>{function Kje(){var e=0,t=1,n=2,i=3,o=4,r=5,s=6,a=7,l=8,u=9,f=10,h=11,m=12,p=13,_=14,b=15,x=16,T=17,E=0,S=1,A=2,v=3,D=4;function R(y,I){return 55296<=y.charCodeAt(I)&&y.charCodeAt(I)<=56319&&56320<=y.charCodeAt(I+1)&&y.charCodeAt(I+1)<=57343}function P(y,I){I===void 0&&(I=0);var M=y.charCodeAt(I);if(55296<=M&&M<=56319&&I<y.length-1){var B=M,U=y.charCodeAt(I+1);return 56320<=U&&U<=57343?(B-55296)*1024+(U-56320)+65536:B}if(56320<=M&&M<=57343&&I>=1){var B=y.charCodeAt(I-1),U=M;return 55296<=B&&B<=56319?(B-55296)*1024+(U-56320)+65536:U}return M}function L(y,I,M){var B=[y].concat(I).concat([M]),U=B[B.length-2],V=M,W=B.lastIndexOf(_);if(W>1&&B.slice(1,W).every(function($){return $==i})&&[i,p,T].indexOf(y)==-1)return A;var H=B.lastIndexOf(o);if(H>0&&B.slice(1,H).every(function($){return $==o})&&[m,o].indexOf(U)==-1)return B.filter(function($){return $==o}).length%2==1?v:D;if(U==e&&V==t)return E;if(U==n||U==e||U==t)return V==_&&I.every(function($){return $==i})?A:S;if(V==n||V==e||V==t)return S;if(U==s&&(V==s||V==a||V==u||V==f))return E;if((U==u||U==a)&&(V==a||V==l))return E;if((U==f||U==l)&&V==l)return E;if(V==i||V==b)return E;if(V==r)return E;if(U==m)return E;var X=B.indexOf(i)!=-1?B.lastIndexOf(i)-1:B.length-2;return[p,T].indexOf(B[X])!=-1&&B.slice(X+1,-1).every(function($){return $==i})&&V==_||U==b&&[x,T].indexOf(V)!=-1?E:I.indexOf(o)!=-1?A:U==o&&V==o?E:S}this.nextBreak=function(y,I){if(I===void 0&&(I=0),I<0)return 0;if(I>=y.length-1)return y.length;for(var M=F(P(y,I)),B=[],U=I+1;U<y.length;U++)if(!R(y,U-1)){var V=F(P(y,U));if(L(M,B,V))return U;B.push(V)}return y.length},this.splitGraphemes=function(y){for(var I=[],M=0,B;(B=this.nextBreak(y,M))<y.length;)I.push(y.slice(M,B)),M=B;return M<y.length&&I.push(y.slice(M)),I},this.iterateGraphemes=function(y){var I=0,M={next:function(){var B,U;return(U=this.nextBreak(y,I))<y.length?(B=y.slice(I,U),I=U,{value:B,done:!1}):I<y.length?(B=y.slice(I),I=y.length,{value:B,done:!1}):{value:void 0,done:!0}}.bind(this)};return typeof Symbol!="undefined"&&Symbol.iterator&&(M[Symbol.iterator]=function(){return M}),M},this.countGraphemes=function(y){for(var I=0,M=0,B;(B=this.nextBreak(y,M))<y.length;)M=B,I++;return M<y.length&&I++,I};function F(y){return 1536<=y&&y<=1541||y==1757||y==1807||y==2274||y==3406||y==69821||70082<=y&&y<=70083||y==72250||72326<=y&&y<=72329||y==73030?m:y==13?e:y==10?t:0<=y&&y<=9||11<=y&&y<=12||14<=y&&y<=31||127<=y&&y<=159||y==173||y==1564||y==6158||y==8203||8206<=y&&y<=8207||y==8232||y==8233||8234<=y&&y<=8238||8288<=y&&y<=8292||y==8293||8294<=y&&y<=8303||55296<=y&&y<=57343||y==65279||65520<=y&&y<=65528||65529<=y&&y<=65531||113824<=y&&y<=113827||119155<=y&&y<=119162||y==917504||y==917505||917506<=y&&y<=917535||917632<=y&&y<=917759||918e3<=y&&y<=921599?n:768<=y&&y<=879||1155<=y&&y<=1159||1160<=y&&y<=1161||1425<=y&&y<=1469||y==1471||1473<=y&&y<=1474||1476<=y&&y<=1477||y==1479||1552<=y&&y<=1562||1611<=y&&y<=1631||y==1648||1750<=y&&y<=1756||1759<=y&&y<=1764||1767<=y&&y<=1768||1770<=y&&y<=1773||y==1809||1840<=y&&y<=1866||1958<=y&&y<=1968||2027<=y&&y<=2035||2070<=y&&y<=2073||2075<=y&&y<=2083||2085<=y&&y<=2087||2089<=y&&y<=2093||2137<=y&&y<=2139||2260<=y&&y<=2273||2275<=y&&y<=2306||y==2362||y==2364||2369<=y&&y<=2376||y==2381||2385<=y&&y<=2391||2402<=y&&y<=2403||y==2433||y==2492||y==2494||2497<=y&&y<=2500||y==2509||y==2519||2530<=y&&y<=2531||2561<=y&&y<=2562||y==2620||2625<=y&&y<=2626||2631<=y&&y<=2632||2635<=y&&y<=2637||y==2641||2672<=y&&y<=2673||y==2677||2689<=y&&y<=2690||y==2748||2753<=y&&y<=2757||2759<=y&&y<=2760||y==2765||2786<=y&&y<=2787||2810<=y&&y<=2815||y==2817||y==2876||y==2878||y==2879||2881<=y&&y<=2884||y==2893||y==2902||y==2903||2914<=y&&y<=2915||y==2946||y==3006||y==3008||y==3021||y==3031||y==3072||3134<=y&&y<=3136||3142<=y&&y<=3144||3146<=y&&y<=3149||3157<=y&&y<=3158||3170<=y&&y<=3171||y==3201||y==3260||y==3263||y==3266||y==3270||3276<=y&&y<=3277||3285<=y&&y<=3286||3298<=y&&y<=3299||3328<=y&&y<=3329||3387<=y&&y<=3388||y==3390||3393<=y&&y<=3396||y==3405||y==3415||3426<=y&&y<=3427||y==3530||y==3535||3538<=y&&y<=3540||y==3542||y==3551||y==3633||3636<=y&&y<=3642||3655<=y&&y<=3662||y==3761||3764<=y&&y<=3769||3771<=y&&y<=3772||3784<=y&&y<=3789||3864<=y&&y<=3865||y==3893||y==3895||y==3897||3953<=y&&y<=3966||3968<=y&&y<=3972||3974<=y&&y<=3975||3981<=y&&y<=3991||3993<=y&&y<=4028||y==4038||4141<=y&&y<=4144||4146<=y&&y<=4151||4153<=y&&y<=4154||4157<=y&&y<=4158||4184<=y&&y<=4185||4190<=y&&y<=4192||4209<=y&&y<=4212||y==4226||4229<=y&&y<=4230||y==4237||y==4253||4957<=y&&y<=4959||5906<=y&&y<=5908||5938<=y&&y<=5940||5970<=y&&y<=5971||6002<=y&&y<=6003||6068<=y&&y<=6069||6071<=y&&y<=6077||y==6086||6089<=y&&y<=6099||y==6109||6155<=y&&y<=6157||6277<=y&&y<=6278||y==6313||6432<=y&&y<=6434||6439<=y&&y<=6440||y==6450||6457<=y&&y<=6459||6679<=y&&y<=6680||y==6683||y==6742||6744<=y&&y<=6750||y==6752||y==6754||6757<=y&&y<=6764||6771<=y&&y<=6780||y==6783||6832<=y&&y<=6845||y==6846||6912<=y&&y<=6915||y==6964||6966<=y&&y<=6970||y==6972||y==6978||7019<=y&&y<=7027||7040<=y&&y<=7041||7074<=y&&y<=7077||7080<=y&&y<=7081||7083<=y&&y<=7085||y==7142||7144<=y&&y<=7145||y==7149||7151<=y&&y<=7153||7212<=y&&y<=7219||7222<=y&&y<=7223||7376<=y&&y<=7378||7380<=y&&y<=7392||7394<=y&&y<=7400||y==7405||y==7412||7416<=y&&y<=7417||7616<=y&&y<=7673||7675<=y&&y<=7679||y==8204||8400<=y&&y<=8412||8413<=y&&y<=8416||y==8417||8418<=y&&y<=8420||8421<=y&&y<=8432||11503<=y&&y<=11505||y==11647||11744<=y&&y<=11775||12330<=y&&y<=12333||12334<=y&&y<=12335||12441<=y&&y<=12442||y==42607||42608<=y&&y<=42610||42612<=y&&y<=42621||42654<=y&&y<=42655||42736<=y&&y<=42737||y==43010||y==43014||y==43019||43045<=y&&y<=43046||43204<=y&&y<=43205||43232<=y&&y<=43249||43302<=y&&y<=43309||43335<=y&&y<=43345||43392<=y&&y<=43394||y==43443||43446<=y&&y<=43449||y==43452||y==43493||43561<=y&&y<=43566||43569<=y&&y<=43570||43573<=y&&y<=43574||y==43587||y==43596||y==43644||y==43696||43698<=y&&y<=43700||43703<=y&&y<=43704||43710<=y&&y<=43711||y==43713||43756<=y&&y<=43757||y==43766||y==44005||y==44008||y==44013||y==64286||65024<=y&&y<=65039||65056<=y&&y<=65071||65438<=y&&y<=65439||y==66045||y==66272||66422<=y&&y<=66426||68097<=y&&y<=68099||68101<=y&&y<=68102||68108<=y&&y<=68111||68152<=y&&y<=68154||y==68159||68325<=y&&y<=68326||y==69633||69688<=y&&y<=69702||69759<=y&&y<=69761||69811<=y&&y<=69814||69817<=y&&y<=69818||69888<=y&&y<=69890||69927<=y&&y<=69931||69933<=y&&y<=69940||y==70003||70016<=y&&y<=70017||70070<=y&&y<=70078||70090<=y&&y<=70092||70191<=y&&y<=70193||y==70196||70198<=y&&y<=70199||y==70206||y==70367||70371<=y&&y<=70378||70400<=y&&y<=70401||y==70460||y==70462||y==70464||y==70487||70502<=y&&y<=70508||70512<=y&&y<=70516||70712<=y&&y<=70719||70722<=y&&y<=70724||y==70726||y==70832||70835<=y&&y<=70840||y==70842||y==70845||70847<=y&&y<=70848||70850<=y&&y<=70851||y==71087||71090<=y&&y<=71093||71100<=y&&y<=71101||71103<=y&&y<=71104||71132<=y&&y<=71133||71219<=y&&y<=71226||y==71229||71231<=y&&y<=71232||y==71339||y==71341||71344<=y&&y<=71349||y==71351||71453<=y&&y<=71455||71458<=y&&y<=71461||71463<=y&&y<=71467||72193<=y&&y<=72198||72201<=y&&y<=72202||72243<=y&&y<=72248||72251<=y&&y<=72254||y==72263||72273<=y&&y<=72278||72281<=y&&y<=72283||72330<=y&&y<=72342||72344<=y&&y<=72345||72752<=y&&y<=72758||72760<=y&&y<=72765||y==72767||72850<=y&&y<=72871||72874<=y&&y<=72880||72882<=y&&y<=72883||72885<=y&&y<=72886||73009<=y&&y<=73014||y==73018||73020<=y&&y<=73021||73023<=y&&y<=73029||y==73031||92912<=y&&y<=92916||92976<=y&&y<=92982||94095<=y&&y<=94098||113821<=y&&y<=113822||y==119141||119143<=y&&y<=119145||119150<=y&&y<=119154||119163<=y&&y<=119170||119173<=y&&y<=119179||119210<=y&&y<=119213||119362<=y&&y<=119364||121344<=y&&y<=121398||121403<=y&&y<=121452||y==121461||y==121476||121499<=y&&y<=121503||121505<=y&&y<=121519||122880<=y&&y<=122886||122888<=y&&y<=122904||122907<=y&&y<=122913||122915<=y&&y<=122916||122918<=y&&y<=122922||125136<=y&&y<=125142||125252<=y&&y<=125258||917536<=y&&y<=917631||917760<=y&&y<=917999?i:127462<=y&&y<=127487?o:y==2307||y==2363||2366<=y&&y<=2368||2377<=y&&y<=2380||2382<=y&&y<=2383||2434<=y&&y<=2435||2495<=y&&y<=2496||2503<=y&&y<=2504||2507<=y&&y<=2508||y==2563||2622<=y&&y<=2624||y==2691||2750<=y&&y<=2752||y==2761||2763<=y&&y<=2764||2818<=y&&y<=2819||y==2880||2887<=y&&y<=2888||2891<=y&&y<=2892||y==3007||3009<=y&&y<=3010||3014<=y&&y<=3016||3018<=y&&y<=3020||3073<=y&&y<=3075||3137<=y&&y<=3140||3202<=y&&y<=3203||y==3262||3264<=y&&y<=3265||3267<=y&&y<=3268||3271<=y&&y<=3272||3274<=y&&y<=3275||3330<=y&&y<=3331||3391<=y&&y<=3392||3398<=y&&y<=3400||3402<=y&&y<=3404||3458<=y&&y<=3459||3536<=y&&y<=3537||3544<=y&&y<=3550||3570<=y&&y<=3571||y==3635||y==3763||3902<=y&&y<=3903||y==3967||y==4145||4155<=y&&y<=4156||4182<=y&&y<=4183||y==4228||y==6070||6078<=y&&y<=6085||6087<=y&&y<=6088||6435<=y&&y<=6438||6441<=y&&y<=6443||6448<=y&&y<=6449||6451<=y&&y<=6456||6681<=y&&y<=6682||y==6741||y==6743||6765<=y&&y<=6770||y==6916||y==6965||y==6971||6973<=y&&y<=6977||6979<=y&&y<=6980||y==7042||y==7073||7078<=y&&y<=7079||y==7082||y==7143||7146<=y&&y<=7148||y==7150||7154<=y&&y<=7155||7204<=y&&y<=7211||7220<=y&&y<=7221||y==7393||7410<=y&&y<=7411||y==7415||43043<=y&&y<=43044||y==43047||43136<=y&&y<=43137||43188<=y&&y<=43203||43346<=y&&y<=43347||y==43395||43444<=y&&y<=43445||43450<=y&&y<=43451||43453<=y&&y<=43456||43567<=y&&y<=43568||43571<=y&&y<=43572||y==43597||y==43755||43758<=y&&y<=43759||y==43765||44003<=y&&y<=44004||44006<=y&&y<=44007||44009<=y&&y<=44010||y==44012||y==69632||y==69634||y==69762||69808<=y&&y<=69810||69815<=y&&y<=69816||y==69932||y==70018||70067<=y&&y<=70069||70079<=y&&y<=70080||70188<=y&&y<=70190||70194<=y&&y<=70195||y==70197||70368<=y&&y<=70370||70402<=y&&y<=70403||y==70463||70465<=y&&y<=70468||70471<=y&&y<=70472||70475<=y&&y<=70477||70498<=y&&y<=70499||70709<=y&&y<=70711||70720<=y&&y<=70721||y==70725||70833<=y&&y<=70834||y==70841||70843<=y&&y<=70844||y==70846||y==70849||71088<=y&&y<=71089||71096<=y&&y<=71099||y==71102||71216<=y&&y<=71218||71227<=y&&y<=71228||y==71230||y==71340||71342<=y&&y<=71343||y==71350||71456<=y&&y<=71457||y==71462||72199<=y&&y<=72200||y==72249||72279<=y&&y<=72280||y==72343||y==72751||y==72766||y==72873||y==72881||y==72884||94033<=y&&y<=94078||y==119142||y==119149?r:4352<=y&&y<=4447||43360<=y&&y<=43388?s:4448<=y&&y<=4519||55216<=y&&y<=55238?a:4520<=y&&y<=4607||55243<=y&&y<=55291?l:y==44032||y==44060||y==44088||y==44116||y==44144||y==44172||y==44200||y==44228||y==44256||y==44284||y==44312||y==44340||y==44368||y==44396||y==44424||y==44452||y==44480||y==44508||y==44536||y==44564||y==44592||y==44620||y==44648||y==44676||y==44704||y==44732||y==44760||y==44788||y==44816||y==44844||y==44872||y==44900||y==44928||y==44956||y==44984||y==45012||y==45040||y==45068||y==45096||y==45124||y==45152||y==45180||y==45208||y==45236||y==45264||y==45292||y==45320||y==45348||y==45376||y==45404||y==45432||y==45460||y==45488||y==45516||y==45544||y==45572||y==45600||y==45628||y==45656||y==45684||y==45712||y==45740||y==45768||y==45796||y==45824||y==45852||y==45880||y==45908||y==45936||y==45964||y==45992||y==46020||y==46048||y==46076||y==46104||y==46132||y==46160||y==46188||y==46216||y==46244||y==46272||y==46300||y==46328||y==46356||y==46384||y==46412||y==46440||y==46468||y==46496||y==46524||y==46552||y==46580||y==46608||y==46636||y==46664||y==46692||y==46720||y==46748||y==46776||y==46804||y==46832||y==46860||y==46888||y==46916||y==46944||y==46972||y==47e3||y==47028||y==47056||y==47084||y==47112||y==47140||y==47168||y==47196||y==47224||y==47252||y==47280||y==47308||y==47336||y==47364||y==47392||y==47420||y==47448||y==47476||y==47504||y==47532||y==47560||y==47588||y==47616||y==47644||y==47672||y==47700||y==47728||y==47756||y==47784||y==47812||y==47840||y==47868||y==47896||y==47924||y==47952||y==47980||y==48008||y==48036||y==48064||y==48092||y==48120||y==48148||y==48176||y==48204||y==48232||y==48260||y==48288||y==48316||y==48344||y==48372||y==48400||y==48428||y==48456||y==48484||y==48512||y==48540||y==48568||y==48596||y==48624||y==48652||y==48680||y==48708||y==48736||y==48764||y==48792||y==48820||y==48848||y==48876||y==48904||y==48932||y==48960||y==48988||y==49016||y==49044||y==49072||y==49100||y==49128||y==49156||y==49184||y==49212||y==49240||y==49268||y==49296||y==49324||y==49352||y==49380||y==49408||y==49436||y==49464||y==49492||y==49520||y==49548||y==49576||y==49604||y==49632||y==49660||y==49688||y==49716||y==49744||y==49772||y==49800||y==49828||y==49856||y==49884||y==49912||y==49940||y==49968||y==49996||y==50024||y==50052||y==50080||y==50108||y==50136||y==50164||y==50192||y==50220||y==50248||y==50276||y==50304||y==50332||y==50360||y==50388||y==50416||y==50444||y==50472||y==50500||y==50528||y==50556||y==50584||y==50612||y==50640||y==50668||y==50696||y==50724||y==50752||y==50780||y==50808||y==50836||y==50864||y==50892||y==50920||y==50948||y==50976||y==51004||y==51032||y==51060||y==51088||y==51116||y==51144||y==51172||y==51200||y==51228||y==51256||y==51284||y==51312||y==51340||y==51368||y==51396||y==51424||y==51452||y==51480||y==51508||y==51536||y==51564||y==51592||y==51620||y==51648||y==51676||y==51704||y==51732||y==51760||y==51788||y==51816||y==51844||y==51872||y==51900||y==51928||y==51956||y==51984||y==52012||y==52040||y==52068||y==52096||y==52124||y==52152||y==52180||y==52208||y==52236||y==52264||y==52292||y==52320||y==52348||y==52376||y==52404||y==52432||y==52460||y==52488||y==52516||y==52544||y==52572||y==52600||y==52628||y==52656||y==52684||y==52712||y==52740||y==52768||y==52796||y==52824||y==52852||y==52880||y==52908||y==52936||y==52964||y==52992||y==53020||y==53048||y==53076||y==53104||y==53132||y==53160||y==53188||y==53216||y==53244||y==53272||y==53300||y==53328||y==53356||y==53384||y==53412||y==53440||y==53468||y==53496||y==53524||y==53552||y==53580||y==53608||y==53636||y==53664||y==53692||y==53720||y==53748||y==53776||y==53804||y==53832||y==53860||y==53888||y==53916||y==53944||y==53972||y==54e3||y==54028||y==54056||y==54084||y==54112||y==54140||y==54168||y==54196||y==54224||y==54252||y==54280||y==54308||y==54336||y==54364||y==54392||y==54420||y==54448||y==54476||y==54504||y==54532||y==54560||y==54588||y==54616||y==54644||y==54672||y==54700||y==54728||y==54756||y==54784||y==54812||y==54840||y==54868||y==54896||y==54924||y==54952||y==54980||y==55008||y==55036||y==55064||y==55092||y==55120||y==55148||y==55176?u:44033<=y&&y<=44059||44061<=y&&y<=44087||44089<=y&&y<=44115||44117<=y&&y<=44143||44145<=y&&y<=44171||44173<=y&&y<=44199||44201<=y&&y<=44227||44229<=y&&y<=44255||44257<=y&&y<=44283||44285<=y&&y<=44311||44313<=y&&y<=44339||44341<=y&&y<=44367||44369<=y&&y<=44395||44397<=y&&y<=44423||44425<=y&&y<=44451||44453<=y&&y<=44479||44481<=y&&y<=44507||44509<=y&&y<=44535||44537<=y&&y<=44563||44565<=y&&y<=44591||44593<=y&&y<=44619||44621<=y&&y<=44647||44649<=y&&y<=44675||44677<=y&&y<=44703||44705<=y&&y<=44731||44733<=y&&y<=44759||44761<=y&&y<=44787||44789<=y&&y<=44815||44817<=y&&y<=44843||44845<=y&&y<=44871||44873<=y&&y<=44899||44901<=y&&y<=44927||44929<=y&&y<=44955||44957<=y&&y<=44983||44985<=y&&y<=45011||45013<=y&&y<=45039||45041<=y&&y<=45067||45069<=y&&y<=45095||45097<=y&&y<=45123||45125<=y&&y<=45151||45153<=y&&y<=45179||45181<=y&&y<=45207||45209<=y&&y<=45235||45237<=y&&y<=45263||45265<=y&&y<=45291||45293<=y&&y<=45319||45321<=y&&y<=45347||45349<=y&&y<=45375||45377<=y&&y<=45403||45405<=y&&y<=45431||45433<=y&&y<=45459||45461<=y&&y<=45487||45489<=y&&y<=45515||45517<=y&&y<=45543||45545<=y&&y<=45571||45573<=y&&y<=45599||45601<=y&&y<=45627||45629<=y&&y<=45655||45657<=y&&y<=45683||45685<=y&&y<=45711||45713<=y&&y<=45739||45741<=y&&y<=45767||45769<=y&&y<=45795||45797<=y&&y<=45823||45825<=y&&y<=45851||45853<=y&&y<=45879||45881<=y&&y<=45907||45909<=y&&y<=45935||45937<=y&&y<=45963||45965<=y&&y<=45991||45993<=y&&y<=46019||46021<=y&&y<=46047||46049<=y&&y<=46075||46077<=y&&y<=46103||46105<=y&&y<=46131||46133<=y&&y<=46159||46161<=y&&y<=46187||46189<=y&&y<=46215||46217<=y&&y<=46243||46245<=y&&y<=46271||46273<=y&&y<=46299||46301<=y&&y<=46327||46329<=y&&y<=46355||46357<=y&&y<=46383||46385<=y&&y<=46411||46413<=y&&y<=46439||46441<=y&&y<=46467||46469<=y&&y<=46495||46497<=y&&y<=46523||46525<=y&&y<=46551||46553<=y&&y<=46579||46581<=y&&y<=46607||46609<=y&&y<=46635||46637<=y&&y<=46663||46665<=y&&y<=46691||46693<=y&&y<=46719||46721<=y&&y<=46747||46749<=y&&y<=46775||46777<=y&&y<=46803||46805<=y&&y<=46831||46833<=y&&y<=46859||46861<=y&&y<=46887||46889<=y&&y<=46915||46917<=y&&y<=46943||46945<=y&&y<=46971||46973<=y&&y<=46999||47001<=y&&y<=47027||47029<=y&&y<=47055||47057<=y&&y<=47083||47085<=y&&y<=47111||47113<=y&&y<=47139||47141<=y&&y<=47167||47169<=y&&y<=47195||47197<=y&&y<=47223||47225<=y&&y<=47251||47253<=y&&y<=47279||47281<=y&&y<=47307||47309<=y&&y<=47335||47337<=y&&y<=47363||47365<=y&&y<=47391||47393<=y&&y<=47419||47421<=y&&y<=47447||47449<=y&&y<=47475||47477<=y&&y<=47503||47505<=y&&y<=47531||47533<=y&&y<=47559||47561<=y&&y<=47587||47589<=y&&y<=47615||47617<=y&&y<=47643||47645<=y&&y<=47671||47673<=y&&y<=47699||47701<=y&&y<=47727||47729<=y&&y<=47755||47757<=y&&y<=47783||47785<=y&&y<=47811||47813<=y&&y<=47839||47841<=y&&y<=47867||47869<=y&&y<=47895||47897<=y&&y<=47923||47925<=y&&y<=47951||47953<=y&&y<=47979||47981<=y&&y<=48007||48009<=y&&y<=48035||48037<=y&&y<=48063||48065<=y&&y<=48091||48093<=y&&y<=48119||48121<=y&&y<=48147||48149<=y&&y<=48175||48177<=y&&y<=48203||48205<=y&&y<=48231||48233<=y&&y<=48259||48261<=y&&y<=48287||48289<=y&&y<=48315||48317<=y&&y<=48343||48345<=y&&y<=48371||48373<=y&&y<=48399||48401<=y&&y<=48427||48429<=y&&y<=48455||48457<=y&&y<=48483||48485<=y&&y<=48511||48513<=y&&y<=48539||48541<=y&&y<=48567||48569<=y&&y<=48595||48597<=y&&y<=48623||48625<=y&&y<=48651||48653<=y&&y<=48679||48681<=y&&y<=48707||48709<=y&&y<=48735||48737<=y&&y<=48763||48765<=y&&y<=48791||48793<=y&&y<=48819||48821<=y&&y<=48847||48849<=y&&y<=48875||48877<=y&&y<=48903||48905<=y&&y<=48931||48933<=y&&y<=48959||48961<=y&&y<=48987||48989<=y&&y<=49015||49017<=y&&y<=49043||49045<=y&&y<=49071||49073<=y&&y<=49099||49101<=y&&y<=49127||49129<=y&&y<=49155||49157<=y&&y<=49183||49185<=y&&y<=49211||49213<=y&&y<=49239||49241<=y&&y<=49267||49269<=y&&y<=49295||49297<=y&&y<=49323||49325<=y&&y<=49351||49353<=y&&y<=49379||49381<=y&&y<=49407||49409<=y&&y<=49435||49437<=y&&y<=49463||49465<=y&&y<=49491||49493<=y&&y<=49519||49521<=y&&y<=49547||49549<=y&&y<=49575||49577<=y&&y<=49603||49605<=y&&y<=49631||49633<=y&&y<=49659||49661<=y&&y<=49687||49689<=y&&y<=49715||49717<=y&&y<=49743||49745<=y&&y<=49771||49773<=y&&y<=49799||49801<=y&&y<=49827||49829<=y&&y<=49855||49857<=y&&y<=49883||49885<=y&&y<=49911||49913<=y&&y<=49939||49941<=y&&y<=49967||49969<=y&&y<=49995||49997<=y&&y<=50023||50025<=y&&y<=50051||50053<=y&&y<=50079||50081<=y&&y<=50107||50109<=y&&y<=50135||50137<=y&&y<=50163||50165<=y&&y<=50191||50193<=y&&y<=50219||50221<=y&&y<=50247||50249<=y&&y<=50275||50277<=y&&y<=50303||50305<=y&&y<=50331||50333<=y&&y<=50359||50361<=y&&y<=50387||50389<=y&&y<=50415||50417<=y&&y<=50443||50445<=y&&y<=50471||50473<=y&&y<=50499||50501<=y&&y<=50527||50529<=y&&y<=50555||50557<=y&&y<=50583||50585<=y&&y<=50611||50613<=y&&y<=50639||50641<=y&&y<=50667||50669<=y&&y<=50695||50697<=y&&y<=50723||50725<=y&&y<=50751||50753<=y&&y<=50779||50781<=y&&y<=50807||50809<=y&&y<=50835||50837<=y&&y<=50863||50865<=y&&y<=50891||50893<=y&&y<=50919||50921<=y&&y<=50947||50949<=y&&y<=50975||50977<=y&&y<=51003||51005<=y&&y<=51031||51033<=y&&y<=51059||51061<=y&&y<=51087||51089<=y&&y<=51115||51117<=y&&y<=51143||51145<=y&&y<=51171||51173<=y&&y<=51199||51201<=y&&y<=51227||51229<=y&&y<=51255||51257<=y&&y<=51283||51285<=y&&y<=51311||51313<=y&&y<=51339||51341<=y&&y<=51367||51369<=y&&y<=51395||51397<=y&&y<=51423||51425<=y&&y<=51451||51453<=y&&y<=51479||51481<=y&&y<=51507||51509<=y&&y<=51535||51537<=y&&y<=51563||51565<=y&&y<=51591||51593<=y&&y<=51619||51621<=y&&y<=51647||51649<=y&&y<=51675||51677<=y&&y<=51703||51705<=y&&y<=51731||51733<=y&&y<=51759||51761<=y&&y<=51787||51789<=y&&y<=51815||51817<=y&&y<=51843||51845<=y&&y<=51871||51873<=y&&y<=51899||51901<=y&&y<=51927||51929<=y&&y<=51955||51957<=y&&y<=51983||51985<=y&&y<=52011||52013<=y&&y<=52039||52041<=y&&y<=52067||52069<=y&&y<=52095||52097<=y&&y<=52123||52125<=y&&y<=52151||52153<=y&&y<=52179||52181<=y&&y<=52207||52209<=y&&y<=52235||52237<=y&&y<=52263||52265<=y&&y<=52291||52293<=y&&y<=52319||52321<=y&&y<=52347||52349<=y&&y<=52375||52377<=y&&y<=52403||52405<=y&&y<=52431||52433<=y&&y<=52459||52461<=y&&y<=52487||52489<=y&&y<=52515||52517<=y&&y<=52543||52545<=y&&y<=52571||52573<=y&&y<=52599||52601<=y&&y<=52627||52629<=y&&y<=52655||52657<=y&&y<=52683||52685<=y&&y<=52711||52713<=y&&y<=52739||52741<=y&&y<=52767||52769<=y&&y<=52795||52797<=y&&y<=52823||52825<=y&&y<=52851||52853<=y&&y<=52879||52881<=y&&y<=52907||52909<=y&&y<=52935||52937<=y&&y<=52963||52965<=y&&y<=52991||52993<=y&&y<=53019||53021<=y&&y<=53047||53049<=y&&y<=53075||53077<=y&&y<=53103||53105<=y&&y<=53131||53133<=y&&y<=53159||53161<=y&&y<=53187||53189<=y&&y<=53215||53217<=y&&y<=53243||53245<=y&&y<=53271||53273<=y&&y<=53299||53301<=y&&y<=53327||53329<=y&&y<=53355||53357<=y&&y<=53383||53385<=y&&y<=53411||53413<=y&&y<=53439||53441<=y&&y<=53467||53469<=y&&y<=53495||53497<=y&&y<=53523||53525<=y&&y<=53551||53553<=y&&y<=53579||53581<=y&&y<=53607||53609<=y&&y<=53635||53637<=y&&y<=53663||53665<=y&&y<=53691||53693<=y&&y<=53719||53721<=y&&y<=53747||53749<=y&&y<=53775||53777<=y&&y<=53803||53805<=y&&y<=53831||53833<=y&&y<=53859||53861<=y&&y<=53887||53889<=y&&y<=53915||53917<=y&&y<=53943||53945<=y&&y<=53971||53973<=y&&y<=53999||54001<=y&&y<=54027||54029<=y&&y<=54055||54057<=y&&y<=54083||54085<=y&&y<=54111||54113<=y&&y<=54139||54141<=y&&y<=54167||54169<=y&&y<=54195||54197<=y&&y<=54223||54225<=y&&y<=54251||54253<=y&&y<=54279||54281<=y&&y<=54307||54309<=y&&y<=54335||54337<=y&&y<=54363||54365<=y&&y<=54391||54393<=y&&y<=54419||54421<=y&&y<=54447||54449<=y&&y<=54475||54477<=y&&y<=54503||54505<=y&&y<=54531||54533<=y&&y<=54559||54561<=y&&y<=54587||54589<=y&&y<=54615||54617<=y&&y<=54643||54645<=y&&y<=54671||54673<=y&&y<=54699||54701<=y&&y<=54727||54729<=y&&y<=54755||54757<=y&&y<=54783||54785<=y&&y<=54811||54813<=y&&y<=54839||54841<=y&&y<=54867||54869<=y&&y<=54895||54897<=y&&y<=54923||54925<=y&&y<=54951||54953<=y&&y<=54979||54981<=y&&y<=55007||55009<=y&&y<=55035||55037<=y&&y<=55063||55065<=y&&y<=55091||55093<=y&&y<=55119||55121<=y&&y<=55147||55149<=y&&y<=55175||55177<=y&&y<=55203?f:y==9757||y==9977||9994<=y&&y<=9997||y==127877||127938<=y&&y<=127940||y==127943||127946<=y&&y<=127948||128066<=y&&y<=128067||128070<=y&&y<=128080||y==128110||128112<=y&&y<=128120||y==128124||128129<=y&&y<=128131||128133<=y&&y<=128135||y==128170||128372<=y&&y<=128373||y==128378||y==128400||128405<=y&&y<=128406||128581<=y&&y<=128583||128587<=y&&y<=128591||y==128675||128692<=y&&y<=128694||y==128704||y==128716||129304<=y&&y<=129308||129310<=y&&y<=129311||y==129318||129328<=y&&y<=129337||129341<=y&&y<=129342||129489<=y&&y<=129501?p:127995<=y&&y<=127999?_:y==8205?b:y==9792||y==9794||9877<=y&&y<=9878||y==9992||y==10084||y==127752||y==127806||y==127859||y==127891||y==127908||y==127912||y==127979||y==127981||y==128139||128187<=y&&y<=128188||y==128295||y==128300||y==128488||y==128640||y==128658?x:128102<=y&&y<=128105?T:h}return this}typeof O2!="undefined"&&O2.exports&&(O2.exports=Kje)});var yue=Rf((RW,MW)=>{(function(e,t){typeof RW=="object"&&typeof MW!="undefined"?MW.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self).RBush=t()})(RW,function(){"use strict";function e(x,T,E,S,A){(function v(D,R,P,L,F){for(;L>P;){if(L-P>600){var y=L-P+1,I=R-P+1,M=Math.log(y),B=.5*Math.exp(2*M/3),U=.5*Math.sqrt(M*B*(y-B)/y)*(I-y/2<0?-1:1),V=Math.max(P,Math.floor(R-I*B/y+U)),W=Math.min(L,Math.floor(R+(y-I)*B/y+U));v(D,R,V,W,F)}var H=D[R],X=P,$=L;for(t(D,P,R),F(D[L],H)>0&&t(D,P,L);X<$;){for(t(D,X,$),X++,$--;F(D[X],H)<0;)X++;for(;F(D[$],H)>0;)$--}F(D[P],H)===0?t(D,P,$):t(D,++$,L),$<=R&&(P=$+1),R<=$&&(L=$-1)}})(x,T,E||0,S||x.length-1,A||n)}function t(x,T,E){var S=x[T];x[T]=x[E],x[E]=S}function n(x,T){return x<T?-1:x>T?1:0}var i=function(x){x===void 0&&(x=9),this._maxEntries=Math.max(4,x),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(x,T,E){if(!E)return T.indexOf(x);for(var S=0;S<T.length;S++)if(E(x,T[S]))return S;return-1}function r(x,T){s(x,0,x.children.length,T,x)}function s(x,T,E,S,A){A||(A=_(null)),A.minX=1/0,A.minY=1/0,A.maxX=-1/0,A.maxY=-1/0;for(var v=T;v<E;v++){var D=x.children[v];a(A,x.leaf?S(D):D)}return A}function a(x,T){return x.minX=Math.min(x.minX,T.minX),x.minY=Math.min(x.minY,T.minY),x.maxX=Math.max(x.maxX,T.maxX),x.maxY=Math.max(x.maxY,T.maxY),x}function l(x,T){return x.minX-T.minX}function u(x,T){return x.minY-T.minY}function f(x){return(x.maxX-x.minX)*(x.maxY-x.minY)}function h(x){return x.maxX-x.minX+(x.maxY-x.minY)}function m(x,T){return x.minX<=T.minX&&x.minY<=T.minY&&T.maxX<=x.maxX&&T.maxY<=x.maxY}function p(x,T){return T.minX<=x.maxX&&T.minY<=x.maxY&&T.maxX>=x.minX&&T.maxY>=x.minY}function _(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function b(x,T,E,S,A){for(var v=[T,E];v.length;)if(!((E=v.pop())-(T=v.pop())<=S)){var D=T+Math.ceil((E-T)/S/2)*S;e(x,D,T,E,A),v.push(T,D,D,E)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(x){var T=this.data,E=[];if(!p(x,T))return E;for(var S=this.toBBox,A=[];T;){for(var v=0;v<T.children.length;v++){var D=T.children[v],R=T.leaf?S(D):D;p(x,R)&&(T.leaf?E.push(D):m(x,R)?this._all(D,E):A.push(D))}T=A.pop()}return E},i.prototype.collides=function(x){var T=this.data;if(!p(x,T))return!1;for(var E=[];T;){for(var S=0;S<T.children.length;S++){var A=T.children[S],v=T.leaf?this.toBBox(A):A;if(p(x,v)){if(T.leaf||m(x,v))return!0;E.push(A)}}T=E.pop()}return!1},i.prototype.load=function(x){if(!x||!x.length)return this;if(x.length<this._minEntries){for(var T=0;T<x.length;T++)this.insert(x[T]);return this}var E=this._build(x.slice(),0,x.length-1,0);if(this.data.children.length)if(this.data.height===E.height)this._splitRoot(this.data,E);else{if(this.data.height<E.height){var S=this.data;this.data=E,E=S}this._insert(E,this.data.height-E.height-1,!0)}else this.data=E;return this},i.prototype.insert=function(x){return x&&this._insert(x,this.data.height-1),this},i.prototype.clear=function(){return this.data=_([]),this},i.prototype.remove=function(x,T){if(!x)return this;for(var E,S,A,v=this.data,D=this.toBBox(x),R=[],P=[];v||R.length;){if(v||(v=R.pop(),S=R[R.length-1],E=P.pop(),A=!0),v.leaf){var L=o(x,v.children,T);if(L!==-1)return v.children.splice(L,1),R.push(v),this._condense(R),this}A||v.leaf||!m(v,D)?S?(E++,v=S.children[E],A=!1):v=null:(R.push(v),P.push(E),E=0,S=v,v=v.children[0])}return this},i.prototype.toBBox=function(x){return x},i.prototype.compareMinX=function(x,T){return x.minX-T.minX},i.prototype.compareMinY=function(x,T){return x.minY-T.minY},i.prototype.toJSON=function(){return this.data},i.prototype.fromJSON=function(x){return this.data=x,this},i.prototype._all=function(x,T){for(var E=[];x;)x.leaf?T.push.apply(T,x.children):E.push.apply(E,x.children),x=E.pop();return T},i.prototype._build=function(x,T,E,S){var A,v=E-T+1,D=this._maxEntries;if(v<=D)return r(A=_(x.slice(T,E+1)),this.toBBox),A;S||(S=Math.ceil(Math.log(v)/Math.log(D)),D=Math.ceil(v/Math.pow(D,S-1))),(A=_([])).leaf=!1,A.height=S;var R=Math.ceil(v/D),P=R*Math.ceil(Math.sqrt(D));b(x,T,E,P,this.compareMinX);for(var L=T;L<=E;L+=P){var F=Math.min(L+P-1,E);b(x,L,F,R,this.compareMinY);for(var y=L;y<=F;y+=R){var I=Math.min(y+R-1,F);A.children.push(this._build(x,y,I,S-1))}}return r(A,this.toBBox),A},i.prototype._chooseSubtree=function(x,T,E,S){for(;S.push(T),!T.leaf&&S.length-1!==E;){for(var A=1/0,v=1/0,D=void 0,R=0;R<T.children.length;R++){var P=T.children[R],L=f(P),F=(y=x,I=P,(Math.max(I.maxX,y.maxX)-Math.min(I.minX,y.minX))*(Math.max(I.maxY,y.maxY)-Math.min(I.minY,y.minY))-L);F<v?(v=F,A=L<A?L:A,D=P):F===v&&L<A&&(A=L,D=P)}T=D||T.children[0]}var y,I;return T},i.prototype._insert=function(x,T,E){var S=E?x:this.toBBox(x),A=[],v=this._chooseSubtree(S,this.data,T,A);for(v.children.push(x),a(v,S);T>=0&&A[T].children.length>this._maxEntries;)this._split(A,T),T--;this._adjustParentBBoxes(S,A,T)},i.prototype._split=function(x,T){var E=x[T],S=E.children.length,A=this._minEntries;this._chooseSplitAxis(E,A,S);var v=this._chooseSplitIndex(E,A,S),D=_(E.children.splice(v,E.children.length-v));D.height=E.height,D.leaf=E.leaf,r(E,this.toBBox),r(D,this.toBBox),T?x[T-1].children.push(D):this._splitRoot(E,D)},i.prototype._splitRoot=function(x,T){this.data=_([x,T]),this.data.height=x.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(x,T,E){for(var S,A,v,D,R,P,L,F=1/0,y=1/0,I=T;I<=E-T;I++){var M=s(x,0,I,this.toBBox),B=s(x,I,E,this.toBBox),U=(A=M,v=B,D=void 0,R=void 0,P=void 0,L=void 0,D=Math.max(A.minX,v.minX),R=Math.max(A.minY,v.minY),P=Math.min(A.maxX,v.maxX),L=Math.min(A.maxY,v.maxY),Math.max(0,P-D)*Math.max(0,L-R)),V=f(M)+f(B);U<F?(F=U,S=I,y=V<y?V:y):U===F&&V<y&&(y=V,S=I)}return S||E-T},i.prototype._chooseSplitAxis=function(x,T,E){var S=x.leaf?this.compareMinX:l,A=x.leaf?this.compareMinY:u;this._allDistMargin(x,T,E,S)<this._allDistMargin(x,T,E,A)&&x.children.sort(S)},i.prototype._allDistMargin=function(x,T,E,S){x.children.sort(S);for(var A=this.toBBox,v=s(x,0,T,A),D=s(x,E-T,E,A),R=h(v)+h(D),P=T;P<E-T;P++){var L=x.children[P];a(v,x.leaf?A(L):L),R+=h(v)}for(var F=E-T-1;F>=T;F--){var y=x.children[F];a(D,x.leaf?A(y):y),R+=h(D)}return R},i.prototype._adjustParentBBoxes=function(x,T,E){for(var S=E;S>=0;S--)a(T[S],x)},i.prototype._condense=function(x){for(var T=x.length-1,E=void 0;T>=0;T--)x[T].children.length===0?T>0?(E=x[T-1].children).splice(E.indexOf(x[T]),1):this.clear():r(x[T],this.toBBox)},i})});var Q7=Rf((exports,module)=>{/*!
| * protobuf.js v7.4.0 (c) 2016, daniel wirtz
| * compiled thu, 22 aug 2024 20:30:39 utc
| * licensed under the bsd-3-clause license
| * see: https://github.com/dcodeio/protobuf.js for details
| */(function(undefined){"use strict";(function(t,n,i){function o(s){var a=n[s];return a||t[s][0].call(a=n[s]={exports:{}},o,a,a.exports),a.exports}var r=o(i[0]);r.util.global.protobuf=r,typeof define=="function"&&define.amd&&define(["long"],function(s){return s&&s.isLong&&(r.util.Long=s,r.configure()),r}),typeof module=="object"&&module&&module.exports&&(module.exports=r)})({1:[function(e,t,n){"use strict";t.exports=i;function i(o,r){for(var s=new Array(arguments.length-1),a=0,l=2,u=!0;l<arguments.length;)s[a++]=arguments[l++];return new Promise(function(h,m){s[a]=function(_){if(u)if(u=!1,_)m(_);else{for(var b=new Array(arguments.length-1),x=0;x<b.length;)b[x++]=arguments[x];h.apply(null,b)}};try{o.apply(r||null,s)}catch(p){u&&(u=!1,m(p))}})}},{}],2:[function(e,t,n){"use strict";var i=n;i.length=function(u){var f=u.length;if(!f)return 0;for(var h=0;--f%4>1&&u.charAt(f)==="=";)++h;return Math.ceil(u.length*3)/4-h};for(var o=new Array(64),r=new Array(123),s=0;s<64;)r[o[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;i.encode=function(u,f,h){for(var m=null,p=[],_=0,b=0,x;f<h;){var T=u[f++];switch(b){case 0:p[_++]=o[T>>2],x=(T&3)<<4,b=1;break;case 1:p[_++]=o[x|T>>4],x=(T&15)<<2,b=2;break;case 2:p[_++]=o[x|T>>6],p[_++]=o[T&63],b=0;break}_>8191&&((m||(m=[])).push(String.fromCharCode.apply(String,p)),_=0)}return b&&(p[_++]=o[x],p[_++]=61,b===1&&(p[_++]=61)),m?(_&&m.push(String.fromCharCode.apply(String,p.slice(0,_))),m.join("")):String.fromCharCode.apply(String,p.slice(0,_))};var a="invalid encoding";i.decode=function(u,f,h){for(var m=h,p=0,_,b=0;b<u.length;){var x=u.charCodeAt(b++);if(x===61&&p>1)break;if((x=r[x])===undefined)throw Error(a);switch(p){case 0:_=x,p=1;break;case 1:f[h++]=_<<2|(x&48)>>4,_=x,p=2;break;case 2:f[h++]=(_&15)<<4|(x&60)>>2,_=x,p=3;break;case 3:f[h++]=(_&3)<<6|x,p=0;break}}if(p===1)throw Error(a);return h-m},i.test=function(u){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(u)}},{}],3:[function(e,t,n){"use strict";t.exports=i;function i(){this._listeners={}}i.prototype.on=function(r,s,a){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:s,ctx:a||this}),this},i.prototype.off=function(r,s){if(r===undefined)this._listeners={};else if(s===undefined)this._listeners[r]=[];else for(var a=this._listeners[r],l=0;l<a.length;)a[l].fn===s?a.splice(l,1):++l;return this},i.prototype.emit=function(r){var s=this._listeners[r];if(s){for(var a=[],l=1;l<arguments.length;)a.push(arguments[l++]);for(l=0;l<s.length;)s[l].fn.apply(s[l++].ctx,a)}return this}},{}],4:[function(e,t,n){"use strict";t.exports=i(i);function i(l){return typeof Float32Array!="undefined"?function(){var u=new Float32Array([-0]),f=new Uint8Array(u.buffer),h=f[3]===128;function m(x,T,E){u[0]=x,T[E]=f[0],T[E+1]=f[1],T[E+2]=f[2],T[E+3]=f[3]}function p(x,T,E){u[0]=x,T[E]=f[3],T[E+1]=f[2],T[E+2]=f[1],T[E+3]=f[0]}l.writeFloatLE=h?m:p,l.writeFloatBE=h?p:m;function _(x,T){return f[0]=x[T],f[1]=x[T+1],f[2]=x[T+2],f[3]=x[T+3],u[0]}function b(x,T){return f[3]=x[T],f[2]=x[T+1],f[1]=x[T+2],f[0]=x[T+3],u[0]}l.readFloatLE=h?_:b,l.readFloatBE=h?b:_}():function(){function u(h,m,p,_){var b=m<0?1:0;if(b&&(m=-m),m===0)h(1/m>0?0:2147483648,p,_);else if(isNaN(m))h(2143289344,p,_);else if(m>34028234663852886e22)h((b<<31|2139095040)>>>0,p,_);else if(m<11754943508222875e-54)h((b<<31|Math.round(m/1401298464324817e-60))>>>0,p,_);else{var x=Math.floor(Math.log(m)/Math.LN2),T=Math.round(m*Math.pow(2,-x)*8388608)&8388607;h((b<<31|x+127<<23|T)>>>0,p,_)}}l.writeFloatLE=u.bind(null,o),l.writeFloatBE=u.bind(null,r);function f(h,m,p){var _=h(m,p),b=(_>>31)*2+1,x=_>>>23&255,T=_&8388607;return x===255?T?NaN:b*(1/0):x===0?b*1401298464324817e-60*T:b*Math.pow(2,x-150)*(T+8388608)}l.readFloatLE=f.bind(null,s),l.readFloatBE=f.bind(null,a)}(),typeof Float64Array!="undefined"?function(){var u=new Float64Array([-0]),f=new Uint8Array(u.buffer),h=f[7]===128;function m(x,T,E){u[0]=x,T[E]=f[0],T[E+1]=f[1],T[E+2]=f[2],T[E+3]=f[3],T[E+4]=f[4],T[E+5]=f[5],T[E+6]=f[6],T[E+7]=f[7]}function p(x,T,E){u[0]=x,T[E]=f[7],T[E+1]=f[6],T[E+2]=f[5],T[E+3]=f[4],T[E+4]=f[3],T[E+5]=f[2],T[E+6]=f[1],T[E+7]=f[0]}l.writeDoubleLE=h?m:p,l.writeDoubleBE=h?p:m;function _(x,T){return f[0]=x[T],f[1]=x[T+1],f[2]=x[T+2],f[3]=x[T+3],f[4]=x[T+4],f[5]=x[T+5],f[6]=x[T+6],f[7]=x[T+7],u[0]}function b(x,T){return f[7]=x[T],f[6]=x[T+1],f[5]=x[T+2],f[4]=x[T+3],f[3]=x[T+4],f[2]=x[T+5],f[1]=x[T+6],f[0]=x[T+7],u[0]}l.readDoubleLE=h?_:b,l.readDoubleBE=h?b:_}():function(){function u(h,m,p,_,b,x){var T=_<0?1:0;if(T&&(_=-_),_===0)h(0,b,x+m),h(1/_>0?0:2147483648,b,x+p);else if(isNaN(_))h(0,b,x+m),h(2146959360,b,x+p);else if(_>17976931348623157e292)h(0,b,x+m),h((T<<31|2146435072)>>>0,b,x+p);else{var E;if(_<22250738585072014e-324)E=_/5e-324,h(E>>>0,b,x+m),h((T<<31|E/4294967296)>>>0,b,x+p);else{var S=Math.floor(Math.log(_)/Math.LN2);S===1024&&(S=1023),E=_*Math.pow(2,-S),h(E*4503599627370496>>>0,b,x+m),h((T<<31|S+1023<<20|E*1048576&1048575)>>>0,b,x+p)}}}l.writeDoubleLE=u.bind(null,o,0,4),l.writeDoubleBE=u.bind(null,r,4,0);function f(h,m,p,_,b){var x=h(_,b+m),T=h(_,b+p),E=(T>>31)*2+1,S=T>>>20&2047,A=4294967296*(T&1048575)+x;return S===2047?A?NaN:E*(1/0):S===0?E*5e-324*A:E*Math.pow(2,S-1075)*(A+4503599627370496)}l.readDoubleLE=f.bind(null,s,0,4),l.readDoubleBE=f.bind(null,a,4,0)}(),l}function o(l,u,f){u[f]=l&255,u[f+1]=l>>>8&255,u[f+2]=l>>>16&255,u[f+3]=l>>>24}function r(l,u,f){u[f]=l>>>24,u[f+1]=l>>>16&255,u[f+2]=l>>>8&255,u[f+3]=l&255}function s(l,u){return(l[u]|l[u+1]<<8|l[u+2]<<16|l[u+3]<<24)>>>0}function a(l,u){return(l[u]<<24|l[u+1]<<16|l[u+2]<<8|l[u+3])>>>0}},{}],5:[function(require,module,exports){"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}},{}],6:[function(e,t,n){"use strict";t.exports=i;function i(o,r,s){var a=s||8192,l=a>>>1,u=null,f=a;return function(m){if(m<1||m>l)return o(m);f+m>a&&(u=o(a),f=0);var p=r.call(u,f,f+=m);return f&7&&(f=(f|7)+1),p}}},{}],7:[function(e,t,n){"use strict";var i=n;i.length=function(r){for(var s=0,a=0,l=0;l<r.length;++l)a=r.charCodeAt(l),a<128?s+=1:a<2048?s+=2:(a&64512)===55296&&(r.charCodeAt(l+1)&64512)===56320?(++l,s+=4):s+=3;return s},i.read=function(r,s,a){var l=a-s;if(l<1)return"";for(var u=null,f=[],h=0,m;s<a;)m=r[s++],m<128?f[h++]=m:m>191&&m<224?f[h++]=(m&31)<<6|r[s++]&63:m>239&&m<365?(m=((m&7)<<18|(r[s++]&63)<<12|(r[s++]&63)<<6|r[s++]&63)-65536,f[h++]=55296+(m>>10),f[h++]=56320+(m&1023)):f[h++]=(m&15)<<12|(r[s++]&63)<<6|r[s++]&63,h>8191&&((u||(u=[])).push(String.fromCharCode.apply(String,f)),h=0);return u?(h&&u.push(String.fromCharCode.apply(String,f.slice(0,h))),u.join("")):String.fromCharCode.apply(String,f.slice(0,h))},i.write=function(r,s,a){for(var l=a,u,f,h=0;h<r.length;++h)u=r.charCodeAt(h),u<128?s[a++]=u:u<2048?(s[a++]=u>>6|192,s[a++]=u&63|128):(u&64512)===55296&&((f=r.charCodeAt(h+1))&64512)===56320?(u=65536+((u&1023)<<10)+(f&1023),++h,s[a++]=u>>18|240,s[a++]=u>>12&63|128,s[a++]=u>>6&63|128,s[a++]=u&63|128):(s[a++]=u>>12|224,s[a++]=u>>6&63|128,s[a++]=u&63|128);return a-l}},{}],8:[function(e,t,n){"use strict";var i=n;i.build="minimal",i.Writer=e(16),i.BufferWriter=e(17),i.Reader=e(9),i.BufferReader=e(10),i.util=e(15),i.rpc=e(12),i.roots=e(11),i.configure=o;function o(){i.util._configure(),i.Writer._configure(i.BufferWriter),i.Reader._configure(i.BufferReader)}o()},{10:10,11:11,12:12,15:15,16:16,17:17,9:9}],9:[function(e,t,n){"use strict";t.exports=l;var i=e(15),o,r=i.LongBits,s=i.utf8;function a(_,b){return RangeError("index out of range: "+_.pos+" + "+(b||1)+" > "+_.len)}function l(_){this.buf=_,this.pos=0,this.len=_.length}var u=typeof Uint8Array!="undefined"?function(b){if(b instanceof Uint8Array||Array.isArray(b))return new l(b);throw Error("illegal buffer")}:function(b){if(Array.isArray(b))return new l(b);throw Error("illegal buffer")},f=function(){return i.Buffer?function(x){return(l.create=function(E){return i.Buffer.isBuffer(E)?new o(E):u(E)})(x)}:u};l.create=f(),l.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,l.prototype.uint32=function(){var b=4294967295;return function(){if(b=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(b=(b|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(b=(b|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(b=(b|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(b=(b|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return b;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return b}}(),l.prototype.int32=function(){return this.uint32()|0},l.prototype.sint32=function(){var b=this.uint32();return b>>>1^-(b&1)|0};function h(){var _=new r(0,0),b=0;if(this.len-this.pos>4){for(;b<4;++b)if(_.lo=(_.lo|(this.buf[this.pos]&127)<<b*7)>>>0,this.buf[this.pos++]<128)return _;if(_.lo=(_.lo|(this.buf[this.pos]&127)<<28)>>>0,_.hi=(_.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return _;b=0}else{for(;b<3;++b){if(this.pos>=this.len)throw a(this);if(_.lo=(_.lo|(this.buf[this.pos]&127)<<b*7)>>>0,this.buf[this.pos++]<128)return _}return _.lo=(_.lo|(this.buf[this.pos++]&127)<<b*7)>>>0,_}if(this.len-this.pos>4){for(;b<5;++b)if(_.hi=(_.hi|(this.buf[this.pos]&127)<<b*7+3)>>>0,this.buf[this.pos++]<128)return _}else for(;b<5;++b){if(this.pos>=this.len)throw a(this);if(_.hi=(_.hi|(this.buf[this.pos]&127)<<b*7+3)>>>0,this.buf[this.pos++]<128)return _}throw Error("invalid varint encoding")}l.prototype.bool=function(){return this.uint32()!==0};function m(_,b){return(_[b-4]|_[b-3]<<8|_[b-2]<<16|_[b-1]<<24)>>>0}l.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return m(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return m(this.buf,this.pos+=4)|0};function p(){if(this.pos+8>this.len)throw a(this,8);return new r(m(this.buf,this.pos+=4),m(this.buf,this.pos+=4))}l.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var b=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,b},l.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var b=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,b},l.prototype.bytes=function(){var b=this.uint32(),x=this.pos,T=this.pos+b;if(T>this.len)throw a(this,b);if(this.pos+=b,Array.isArray(this.buf))return this.buf.slice(x,T);if(x===T){var E=i.Buffer;return E?E.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,x,T)},l.prototype.string=function(){var b=this.bytes();return s.read(b,0,b.length)},l.prototype.skip=function(b){if(typeof b=="number"){if(this.pos+b>this.len)throw a(this,b);this.pos+=b}else do if(this.pos>=this.len)throw a(this);while(this.buf[this.pos++]&128);return this},l.prototype.skipType=function(_){switch(_){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(_=this.uint32()&7)!==4;)this.skipType(_);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+_+" at offset "+this.pos)}return this},l._configure=function(_){o=_,l.create=f(),o._configure();var b=i.Long?"toLong":"toNumber";i.merge(l.prototype,{int64:function(){return h.call(this)[b](!1)},uint64:function(){return h.call(this)[b](!0)},sint64:function(){return h.call(this).zzDecode()[b](!1)},fixed64:function(){return p.call(this)[b](!0)},sfixed64:function(){return p.call(this)[b](!1)}})}},{15:15}],10:[function(e,t,n){"use strict";t.exports=r;var i=e(9);(r.prototype=Object.create(i.prototype)).constructor=r;var o=e(15);function r(s){i.call(this,s)}r._configure=function(){o.Buffer&&(r.prototype._slice=o.Buffer.prototype.slice)},r.prototype.string=function(){var a=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+a,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+a,this.len))},r._configure()},{15:15,9:9}],11:[function(e,t,n){"use strict";t.exports={}},{}],12:[function(e,t,n){"use strict";var i=n;i.Service=e(13)},{13:13}],13:[function(e,t,n){"use strict";t.exports=o;var i=e(15);(o.prototype=Object.create(i.EventEmitter.prototype)).constructor=o;function o(r,s,a){if(typeof r!="function")throw TypeError("rpcImpl must be a function");i.EventEmitter.call(this),this.rpcImpl=r,this.requestDelimited=!!s,this.responseDelimited=!!a}o.prototype.rpcCall=function r(s,a,l,u,f){if(!u)throw TypeError("request must be specified");var h=this;if(!f)return i.asPromise(r,h,s,a,l,u);if(!h.rpcImpl)return setTimeout(function(){f(Error("already ended"))},0),undefined;try{return h.rpcImpl(s,a[h.requestDelimited?"encodeDelimited":"encode"](u).finish(),function(p,_){if(p)return h.emit("error",p,s),f(p);if(_===null)return h.end(!0),undefined;if(!(_ instanceof l))try{_=l[h.responseDelimited?"decodeDelimited":"decode"](_)}catch(b){return h.emit("error",b,s),f(b)}return h.emit("data",_,s),f(null,_)})}catch(m){return h.emit("error",m,s),setTimeout(function(){f(m)},0),undefined}},o.prototype.end=function(s){return this.rpcImpl&&(s||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{15:15}],14:[function(e,t,n){"use strict";t.exports=o;var i=e(15);function o(l,u){this.lo=l>>>0,this.hi=u>>>0}var r=o.zero=new o(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var s=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(u){if(u===0)return r;var f=u<0;f&&(u=-u);var h=u>>>0,m=(u-h)/4294967296>>>0;return f&&(m=~m>>>0,h=~h>>>0,++h>4294967295&&(h=0,++m>4294967295&&(m=0))),new o(h,m)},o.from=function(u){if(typeof u=="number")return o.fromNumber(u);if(i.isString(u))if(i.Long)u=i.Long.fromString(u);else return o.fromNumber(parseInt(u,10));return u.low||u.high?new o(u.low>>>0,u.high>>>0):r},o.prototype.toNumber=function(u){if(!u&&this.hi>>>31){var f=~this.lo+1>>>0,h=~this.hi>>>0;return f||(h=h+1>>>0),-(f+h*4294967296)}return this.lo+this.hi*4294967296},o.prototype.toLong=function(u){return i.Long?new i.Long(this.lo|0,this.hi|0,!!u):{low:this.lo|0,high:this.hi|0,unsigned:!!u}};var a=String.prototype.charCodeAt;o.fromHash=function(u){return u===s?r:new o((a.call(u,0)|a.call(u,1)<<8|a.call(u,2)<<16|a.call(u,3)<<24)>>>0,(a.call(u,4)|a.call(u,5)<<8|a.call(u,6)<<16|a.call(u,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var u=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^u)>>>0,this.lo=(this.lo<<1^u)>>>0,this},o.prototype.zzDecode=function(){var u=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^u)>>>0,this.hi=(this.hi>>>1^u)>>>0,this},o.prototype.length=function(){var u=this.lo,f=(this.lo>>>28|this.hi<<4)>>>0,h=this.hi>>>24;return h===0?f===0?u<16384?u<128?1:2:u<2097152?3:4:f<16384?f<128?5:6:f<2097152?7:8:h<128?9:10}},{15:15}],15:[function(e,t,n){"use strict";var i=n;i.asPromise=e(1),i.base64=e(2),i.EventEmitter=e(3),i.float=e(4),i.inquire=e(5),i.utf8=e(7),i.pool=e(6),i.LongBits=e(14),i.isNode=!!(typeof global!="undefined"&&global&&global.process&&global.process.versions&&global.process.versions.node),i.global=i.isNode&&global||typeof window!="undefined"&&window||typeof self!="undefined"&&self||this,i.emptyArray=Object.freeze?Object.freeze([]):[],i.emptyObject=Object.freeze?Object.freeze({}):{},i.isInteger=Number.isInteger||function(a){return typeof a=="number"&&isFinite(a)&&Math.floor(a)===a},i.isString=function(a){return typeof a=="string"||a instanceof String},i.isObject=function(a){return a&&typeof a=="object"},i.isset=i.isSet=function(a,l){var u=a[l];return u!=null&&a.hasOwnProperty(l)?typeof u!="object"||(Array.isArray(u)?u.length:Object.keys(u).length)>0:!1},i.Buffer=function(){try{var s=i.inquire("buffer").Buffer;return s.prototype.utf8Write?s:null}catch{return null}}(),i._Buffer_from=null,i._Buffer_allocUnsafe=null,i.newBuffer=function(a){return typeof a=="number"?i.Buffer?i._Buffer_allocUnsafe(a):new i.Array(a):i.Buffer?i._Buffer_from(a):typeof Uint8Array=="undefined"?a:new Uint8Array(a)},i.Array=typeof Uint8Array!="undefined"?Uint8Array:Array,i.Long=i.global.dcodeIO&&i.global.dcodeIO.Long||i.global.Long||i.inquire("long"),i.key2Re=/^true|false|0|1$/,i.key32Re=/^-?(?:0|[1-9][0-9]*)$/,i.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,i.longToHash=function(a){return a?i.LongBits.from(a).toHash():i.LongBits.zeroHash},i.longFromHash=function(a,l){var u=i.LongBits.fromHash(a);return i.Long?i.Long.fromBits(u.lo,u.hi,l):u.toNumber(!!l)};function o(s,a,l){for(var u=Object.keys(a),f=0;f<u.length;++f)(s[u[f]]===undefined||!l)&&(s[u[f]]=a[u[f]]);return s}i.merge=o,i.lcFirst=function(a){return a.charAt(0).toLowerCase()+a.substring(1)};function r(s){function a(l,u){if(!(this instanceof a))return new a(l,u);Object.defineProperty(this,"message",{get:function(){return l}}),Error.captureStackTrace?Error.captureStackTrace(this,a):Object.defineProperty(this,"stack",{value:new Error().stack||""}),u&&o(this,u)}return a.prototype=Object.create(Error.prototype,{constructor:{value:a,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return s},set:undefined,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),a}i.newError=r,i.ProtocolError=r("ProtocolError"),i.oneOfGetter=function(a){for(var l={},u=0;u<a.length;++u)l[a[u]]=1;return function(){for(var f=Object.keys(this),h=f.length-1;h>-1;--h)if(l[f[h]]===1&&this[f[h]]!==undefined&&this[f[h]]!==null)return f[h]}},i.oneOfSetter=function(a){return function(l){for(var u=0;u<a.length;++u)a[u]!==l&&delete this[a[u]]}},i.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},i._configure=function(){var s=i.Buffer;if(!s){i._Buffer_from=i._Buffer_allocUnsafe=null;return}i._Buffer_from=s.from!==Uint8Array.from&&s.from||function(l,u){return new s(l,u)},i._Buffer_allocUnsafe=s.allocUnsafe||function(l){return new s(l)}}},{1:1,14:14,2:2,3:3,4:4,5:5,6:6,7:7}],16:[function(e,t,n){"use strict";t.exports=h;var i=e(15),o,r=i.LongBits,s=i.base64,a=i.utf8;function l(S,A,v){this.fn=S,this.len=A,this.next=undefined,this.val=v}function u(){}function f(S){this.head=S.head,this.tail=S.tail,this.len=S.len,this.next=S.states}function h(){this.len=0,this.head=new l(u,0,0),this.tail=this.head,this.states=null}var m=function(){return i.Buffer?function(){return(h.create=function(){return new o})()}:function(){return new h}};h.create=m(),h.alloc=function(A){return new i.Array(A)},i.Array!==Array&&(h.alloc=i.pool(h.alloc,i.Array.prototype.subarray)),h.prototype._push=function(A,v,D){return this.tail=this.tail.next=new l(A,v,D),this.len+=v,this};function p(S,A,v){A[v]=S&255}function _(S,A,v){for(;S>127;)A[v++]=S&127|128,S>>>=7;A[v]=S}function b(S,A){this.len=S,this.next=undefined,this.val=A}b.prototype=Object.create(l.prototype),b.prototype.fn=_,h.prototype.uint32=function(A){return this.len+=(this.tail=this.tail.next=new b((A=A>>>0)<128?1:A<16384?2:A<2097152?3:A<268435456?4:5,A)).len,this},h.prototype.int32=function(A){return A<0?this._push(x,10,r.fromNumber(A)):this.uint32(A)},h.prototype.sint32=function(A){return this.uint32((A<<1^A>>31)>>>0)};function x(S,A,v){for(;S.hi;)A[v++]=S.lo&127|128,S.lo=(S.lo>>>7|S.hi<<25)>>>0,S.hi>>>=7;for(;S.lo>127;)A[v++]=S.lo&127|128,S.lo=S.lo>>>7;A[v++]=S.lo}h.prototype.uint64=function(A){var v=r.from(A);return this._push(x,v.length(),v)},h.prototype.int64=h.prototype.uint64,h.prototype.sint64=function(A){var v=r.from(A).zzEncode();return this._push(x,v.length(),v)},h.prototype.bool=function(A){return this._push(p,1,A?1:0)};function T(S,A,v){A[v]=S&255,A[v+1]=S>>>8&255,A[v+2]=S>>>16&255,A[v+3]=S>>>24}h.prototype.fixed32=function(A){return this._push(T,4,A>>>0)},h.prototype.sfixed32=h.prototype.fixed32,h.prototype.fixed64=function(A){var v=r.from(A);return this._push(T,4,v.lo)._push(T,4,v.hi)},h.prototype.sfixed64=h.prototype.fixed64,h.prototype.float=function(A){return this._push(i.float.writeFloatLE,4,A)},h.prototype.double=function(A){return this._push(i.float.writeDoubleLE,8,A)};var E=i.Array.prototype.set?function(A,v,D){v.set(A,D)}:function(A,v,D){for(var R=0;R<A.length;++R)v[D+R]=A[R]};h.prototype.bytes=function(A){var v=A.length>>>0;if(!v)return this._push(p,1,0);if(i.isString(A)){var D=h.alloc(v=s.length(A));s.decode(A,D,0),A=D}return this.uint32(v)._push(E,v,A)},h.prototype.string=function(A){var v=a.length(A);return v?this.uint32(v)._push(a.write,v,A):this._push(p,1,0)},h.prototype.fork=function(){return this.states=new f(this),this.head=this.tail=new l(u,0,0),this.len=0,this},h.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(u,0,0),this.len=0),this},h.prototype.ldelim=function(){var A=this.head,v=this.tail,D=this.len;return this.reset().uint32(D),D&&(this.tail.next=A.next,this.tail=v,this.len+=D),this},h.prototype.finish=function(){for(var A=this.head.next,v=this.constructor.alloc(this.len),D=0;A;)A.fn(A.val,v,D),D+=A.len,A=A.next;return v},h._configure=function(S){o=S,h.create=m(),o._configure()}},{15:15}],17:[function(e,t,n){"use strict";t.exports=r;var i=e(16);(r.prototype=Object.create(i.prototype)).constructor=r;var o=e(15);function r(){i.call(this)}r._configure=function(){r.alloc=o._Buffer_allocUnsafe,r.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&o.Buffer.prototype.set.name==="set"?function(l,u,f){u.set(l,f)}:function(l,u,f){if(l.copy)l.copy(u,f,0,l.length);else for(var h=0;h<l.length;)u[f++]=l[h++]}},r.prototype.bytes=function(l){o.isString(l)&&(l=o._Buffer_from(l,"base64"));var u=l.length>>>0;return this.uint32(u),u&&this._push(r.writeBytesBuffer,u,l),this};function s(a,l,u){a.length<40?o.utf8.write(a,l,u):l.utf8Write?l.utf8Write(a,u):l.write(a,u)}r.prototype.string=function(l){var u=o.Buffer.byteLength(l);return this.uint32(u),u&&this._push(s,u,l),this},r._configure()},{15:15,16:16}]},{},[8])})()});var sxe=Rf((y8i,F4)=>{/* Copyright 2015-2018 Esri. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */(function(){var e=function(){var o={};o.defaultNoDataValue=-34027999387901484e22,o.decode=function(f,h){h=h||{};var m=h.encodedMaskData||h.encodedMaskData===null,p=l(f,h.inputOffset||0,m),_=h.noDataValue!==null?h.noDataValue:o.defaultNoDataValue,b=r(p,h.pixelType||Float32Array,h.encodedMaskData,_,h.returnMask),x={width:p.width,height:p.height,pixelData:b.resultPixels,minValue:b.minValue,maxValue:p.pixels.maxValue,noDataValue:_};return b.resultMask&&(x.maskData=b.resultMask),h.returnEncodedMask&&p.mask&&(x.encodedMaskData=p.mask.bitset?p.mask.bitset:null),h.returnFileInfo&&(x.fileInfo=s(p),h.computeUsedBitDepths&&(x.fileInfo.bitDepths=a(p))),x};var r=function(f,h,m,p,_){var b=0,x=f.pixels.numBlocksX,T=f.pixels.numBlocksY,E=Math.floor(f.width/x),S=Math.floor(f.height/T),A=2*f.maxZError,v=Number.MAX_VALUE,D;m=m||(f.mask?f.mask.bitset:null);var R,P;R=new h(f.width*f.height),_&&m&&(P=new Uint8Array(f.width*f.height));for(var L=new Float32Array(E*S),F,y,I=0;I<=T;I++){var M=I!==T?S:f.height%T;if(M!==0)for(var B=0;B<=x;B++){var U=B!==x?E:f.width%x;if(U!==0){var V=I*f.width*S+B*E,W=f.width-U,H=f.pixels.blocks[b],X,$,ae;H.encoding<2?(H.encoding===0?X=H.rawData:(u(H.stuffedData,H.bitsPerPixel,H.numValidPixels,H.offset,A,L,f.pixels.maxValue),X=L),$=0):H.encoding===2?ae=0:ae=H.offset;var se;if(m)for(y=0;y<M;y++){for(V&7&&(se=m[V>>3],se<<=V&7),F=0;F<U;F++)V&7||(se=m[V>>3]),se&128?(P&&(P[V]=1),D=H.encoding<2?X[$++]:ae,v=v>D?D:v,R[V++]=D):(P&&(P[V]=0),R[V++]=p),se<<=1;V+=W}else if(H.encoding<2)for(y=0;y<M;y++){for(F=0;F<U;F++)D=X[$++],v=v>D?D:v,R[V++]=D;V+=W}else for(v=v>ae?ae:v,y=0;y<M;y++){for(F=0;F<U;F++)R[V++]=ae;V+=W}if(H.encoding===1&&$!==H.numValidPixels)throw"Block and Mask do not match";b++}}}return{resultPixels:R,resultMask:P,minValue:v}},s=function(f){return{fileIdentifierString:f.fileIdentifierString,fileVersion:f.fileVersion,imageType:f.imageType,height:f.height,width:f.width,maxZError:f.maxZError,eofOffset:f.eofOffset,mask:f.mask?{numBlocksX:f.mask.numBlocksX,numBlocksY:f.mask.numBlocksY,numBytes:f.mask.numBytes,maxValue:f.mask.maxValue}:null,pixels:{numBlocksX:f.pixels.numBlocksX,numBlocksY:f.pixels.numBlocksY,numBytes:f.pixels.numBytes,maxValue:f.pixels.maxValue,noDataValue:f.noDataValue}}},a=function(f){for(var h=f.pixels.numBlocksX*f.pixels.numBlocksY,m={},p=0;p<h;p++){var _=f.pixels.blocks[p];_.encoding===0?m.float32=!0:_.encoding===1?m[_.bitsPerPixel]=!0:m[0]=!0}return Object.keys(m)},l=function(f,h,m){var p={},_=new Uint8Array(f,h,10);if(p.fileIdentifierString=String.fromCharCode.apply(null,_),p.fileIdentifierString.trim()!=="CntZImage")throw"Unexpected file identifier string: "+p.fileIdentifierString;h+=10;var b=new DataView(f,h,24);if(p.fileVersion=b.getInt32(0,!0),p.imageType=b.getInt32(4,!0),p.height=b.getUint32(8,!0),p.width=b.getUint32(12,!0),p.maxZError=b.getFloat64(16,!0),h+=24,!m)if(b=new DataView(f,h,16),p.mask={},p.mask.numBlocksY=b.getUint32(0,!0),p.mask.numBlocksX=b.getUint32(4,!0),p.mask.numBytes=b.getUint32(8,!0),p.mask.maxValue=b.getFloat32(12,!0),h+=16,p.mask.numBytes>0){var x=new Uint8Array(Math.ceil(p.width*p.height/8));b=new DataView(f,h,p.mask.numBytes);var T=b.getInt16(0,!0),E=2,S=0;do{if(T>0)for(;T--;)x[S++]=b.getUint8(E++);else{var A=b.getUint8(E++);for(T=-T;T--;)x[S++]=A}T=b.getInt16(E,!0),E+=2}while(E<p.mask.numBytes);if(T!==-32768||S<x.length)throw"Unexpected end of mask RLE encoding";p.mask.bitset=x,h+=p.mask.numBytes}else p.mask.numBytes|p.mask.numBlocksY|p.mask.maxValue||(p.mask.bitset=new Uint8Array(Math.ceil(p.width*p.height/8)));b=new DataView(f,h,16),p.pixels={},p.pixels.numBlocksY=b.getUint32(0,!0),p.pixels.numBlocksX=b.getUint32(4,!0),p.pixels.numBytes=b.getUint32(8,!0),p.pixels.maxValue=b.getFloat32(12,!0),h+=16;var v=p.pixels.numBlocksX,D=p.pixels.numBlocksY,R=v+(p.width%v>0?1:0),P=D+(p.height%D>0?1:0);p.pixels.blocks=new Array(R*P);for(var L=0,F=0;F<P;F++)for(var y=0;y<R;y++){var I=0,M=f.byteLength-h;b=new DataView(f,h,Math.min(10,M));var B={};p.pixels.blocks[L++]=B;var U=b.getUint8(0);if(I++,B.encoding=U&63,B.encoding>3)throw"Invalid block encoding ("+B.encoding+")";if(B.encoding===2){h++;continue}if(U!==0&&U!==2){if(U>>=6,B.offsetType=U,U===2)B.offset=b.getInt8(1),I++;else if(U===1)B.offset=b.getInt16(1,!0),I+=2;else if(U===0)B.offset=b.getFloat32(1,!0),I+=4;else throw"Invalid block offset type";if(B.encoding===1)if(U=b.getUint8(I),I++,B.bitsPerPixel=U&63,U>>=6,B.numValidPixelsType=U,U===2)B.numValidPixels=b.getUint8(I),I++;else if(U===1)B.numValidPixels=b.getUint16(I,!0),I+=2;else if(U===0)B.numValidPixels=b.getUint32(I,!0),I+=4;else throw"Invalid valid pixel count type"}if(h+=I,B.encoding!==3){var V,W;if(B.encoding===0){var H=(p.pixels.numBytes-1)/4;if(H!==Math.floor(H))throw"uncompressed block has invalid length";V=new ArrayBuffer(H*4),W=new Uint8Array(V),W.set(new Uint8Array(f,h,H*4));var X=new Float32Array(V);B.rawData=X,h+=H*4}else if(B.encoding===1){var $=Math.ceil(B.numValidPixels*B.bitsPerPixel/8),ae=Math.ceil($/4);V=new ArrayBuffer(ae*4),W=new Uint8Array(V),W.set(new Uint8Array(f,h,$)),B.stuffedData=new Uint32Array(V),h+=$}}}return p.eofOffset=h,p},u=function(f,h,m,p,_,b,x){var T=(1<<h)-1,E=0,S,A=0,v,D,R=Math.ceil((x-p)/_),P=f.length*4-Math.ceil(h*m/8);for(f[f.length-1]<<=8*P,S=0;S<m;S++){if(A===0&&(D=f[E++],A=32),A>=h)v=D>>>A-h&T,A-=h;else{var L=h-A;v=(D&T)<<L&T,D=f[E++],A=32-L,v+=D>>>A}b[S]=v<R?p+v*_:x}return b};return o}(),t=function(){"use strict";var o={unstuff:function(l,u,f,h,m,p,_,b){var x=(1<<f)-1,T=0,E,S=0,A,v,D,R,P=l.length*4-Math.ceil(f*h/8);if(l[l.length-1]<<=8*P,m)for(E=0;E<h;E++)S===0&&(v=l[T++],S=32),S>=f?(A=v>>>S-f&x,S-=f):(D=f-S,A=(v&x)<<D&x,v=l[T++],S=32-D,A+=v>>>S),u[E]=m[A];else for(R=Math.ceil((b-p)/_),E=0;E<h;E++)S===0&&(v=l[T++],S=32),S>=f?(A=v>>>S-f&x,S-=f):(D=f-S,A=(v&x)<<D&x,v=l[T++],S=32-D,A+=v>>>S),u[E]=A<R?p+A*_:b},unstuffLUT:function(l,u,f,h,m,p){var _=(1<<u)-1,b=0,x=0,T=0,E=0,S=0,A,v=[],D=l.length*4-Math.ceil(u*f/8);l[l.length-1]<<=8*D;var R=Math.ceil((p-h)/m);for(x=0;x<f;x++)E===0&&(A=l[b++],E=32),E>=u?(S=A>>>E-u&_,E-=u):(T=u-E,S=(A&_)<<T&_,A=l[b++],E=32-T,S+=A>>>E),v[x]=S<R?h+S*m:p;return v.unshift(h),v},unstuff2:function(l,u,f,h,m,p,_,b){var x=(1<<f)-1,T=0,E,S=0,A=0,v,D,R;if(m)for(E=0;E<h;E++)S===0&&(D=l[T++],S=32,A=0),S>=f?(v=D>>>A&x,S-=f,A+=f):(R=f-S,v=D>>>A&x,D=l[T++],S=32-R,v|=(D&(1<<R)-1)<<f-R,A=R),u[E]=m[v];else{var P=Math.ceil((b-p)/_);for(E=0;E<h;E++)S===0&&(D=l[T++],S=32,A=0),S>=f?(v=D>>>A&x,S-=f,A+=f):(R=f-S,v=D>>>A&x,D=l[T++],S=32-R,v|=(D&(1<<R)-1)<<f-R,A=R),u[E]=v<P?p+v*_:b}return u},unstuffLUT2:function(l,u,f,h,m,p){var _=(1<<u)-1,b=0,x=0,T=0,E=0,S=0,A=0,v,D=[],R=Math.ceil((p-h)/m);for(x=0;x<f;x++)E===0&&(v=l[b++],E=32,A=0),E>=u?(S=v>>>A&_,E-=u,A+=u):(T=u-E,S=v>>>A&_,v=l[b++],E=32-T,S|=(v&(1<<T)-1)<<u-T,A=T),D[x]=S<R?h+S*m:p;return D.unshift(h),D},originalUnstuff:function(l,u,f,h){var m=(1<<f)-1,p=0,_,b=0,x,T,E,S=l.length*4-Math.ceil(f*h/8);for(l[l.length-1]<<=8*S,_=0;_<h;_++)b===0&&(T=l[p++],b=32),b>=f?(x=T>>>b-f&m,b-=f):(E=f-b,x=(T&m)<<E&m,T=l[p++],b=32-E,x+=T>>>b),u[_]=x;return u},originalUnstuff2:function(l,u,f,h){var m=(1<<f)-1,p=0,_,b=0,x=0,T,E,S;for(_=0;_<h;_++)b===0&&(E=l[p++],b=32,x=0),b>=f?(T=E>>>x&m,b-=f,x+=f):(S=f-b,T=E>>>x&m,E=l[p++],b=32-S,T|=(E&(1<<S)-1)<<f-S,x=S),u[_]=T;return u}},r={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(l){for(var u=65535,f=65535,h=l.length,m=Math.floor(h/2),p=0;m;){var _=m>=359?359:m;m-=_;do u+=l[p++]<<8,f+=u+=l[p++];while(--_);u=(u&65535)+(u>>>16),f=(f&65535)+(f>>>16)}return h&1&&(f+=u+=l[p]<<8),u=(u&65535)+(u>>>16),f=(f&65535)+(f>>>16),(f<<16|u)>>>0},readHeaderInfo:function(l,u){var f=u.ptr,h=new Uint8Array(l,f,6),m={};if(m.fileIdentifierString=String.fromCharCode.apply(null,h),m.fileIdentifierString.lastIndexOf("Lerc2",0)!==0)throw"Unexpected file identifier string (expect Lerc2 ): "+m.fileIdentifierString;f+=6;var p=new DataView(l,f,8),_=p.getInt32(0,!0);m.fileVersion=_,f+=4,_>=3&&(m.checksum=p.getUint32(4,!0),f+=4),p=new DataView(l,f,12),m.height=p.getUint32(0,!0),m.width=p.getUint32(4,!0),f+=8,_>=4?(m.numDims=p.getUint32(8,!0),f+=4):m.numDims=1,p=new DataView(l,f,40),m.numValidPixel=p.getUint32(0,!0),m.microBlockSize=p.getInt32(4,!0),m.blobSize=p.getInt32(8,!0),m.imageType=p.getInt32(12,!0),m.maxZError=p.getFloat64(16,!0),m.zMin=p.getFloat64(24,!0),m.zMax=p.getFloat64(32,!0),f+=40,u.headerInfo=m,u.ptr=f;var b,x;if(_>=3&&(x=_>=4?52:48,b=this.computeChecksumFletcher32(new Uint8Array(l,f-x,m.blobSize-14)),b!==m.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(l,u){var f=u.headerInfo,h=this.getDataTypeArray(f.imageType),m=f.numDims*this.getDataTypeSize(f.imageType),p=this.readSubArray(l,u.ptr,h,m),_=this.readSubArray(l,u.ptr+m,h,m);u.ptr+=2*m;var b,x=!0;for(b=0;b<f.numDims;b++)if(p[b]!==_[b]){x=!1;break}return f.minValues=p,f.maxValues=_,x},readSubArray:function(l,u,f,h){var m;if(f===Uint8Array)m=new Uint8Array(l,u,h);else{var p=new ArrayBuffer(h),_=new Uint8Array(p);_.set(new Uint8Array(l,u,h)),m=new f(p)}return m},readMask:function(l,u){var f=u.ptr,h=u.headerInfo,m=h.width*h.height,p=h.numValidPixel,_=new DataView(l,f,4),b={};if(b.numBytes=_.getUint32(0,!0),f+=4,(p===0||m===p)&&b.numBytes!==0)throw"invalid mask";var x,T;if(p===0)x=new Uint8Array(Math.ceil(m/8)),b.bitset=x,T=new Uint8Array(m),u.pixels.resultMask=T,f+=b.numBytes;else if(b.numBytes>0){x=new Uint8Array(Math.ceil(m/8)),_=new DataView(l,f,b.numBytes);var E=_.getInt16(0,!0),S=2,A=0,v=0;do{if(E>0)for(;E--;)x[A++]=_.getUint8(S++);else for(v=_.getUint8(S++),E=-E;E--;)x[A++]=v;E=_.getInt16(S,!0),S+=2}while(S<b.numBytes);if(E!==-32768||A<x.length)throw"Unexpected end of mask RLE encoding";T=new Uint8Array(m);var D=0,R=0;for(R=0;R<m;R++)R&7?(D=x[R>>3],D<<=R&7):D=x[R>>3],D&128&&(T[R]=1);u.pixels.resultMask=T,b.bitset=x,f+=b.numBytes}return u.ptr=f,u.mask=b,!0},readDataOneSweep:function(l,u,f){var h=u.ptr,m=u.headerInfo,p=m.numDims,_=m.width*m.height,b=m.imageType,x=m.numValidPixel*r.getDataTypeSize(b)*p,T,E=u.pixels.resultMask;if(f===Uint8Array)T=new Uint8Array(l,h,x);else{var S=new ArrayBuffer(x),A=new Uint8Array(S);A.set(new Uint8Array(l,h,x)),T=new f(S)}if(T.length===_*p)u.pixels.resultPixels=T;else{u.pixels.resultPixels=new f(_*p);var v=0,D=0,R=0,P=0;if(p>1)for(R=0;R<p;R++)for(P=R*_,D=0;D<_;D++)E[D]&&(u.pixels.resultPixels[P+D]=T[v++]);else for(D=0;D<_;D++)E[D]&&(u.pixels.resultPixels[D]=T[v++])}return h+=x,u.ptr=h,!0},readHuffmanTree:function(l,u){var f=this.HUFFMAN_LUT_BITS_MAX,h=new DataView(l,u.ptr,16);u.ptr+=16;var m=h.getInt32(0,!0);if(m<2)throw"unsupported Huffman version";var p=h.getInt32(4,!0),_=h.getInt32(8,!0),b=h.getInt32(12,!0);if(_>=b)return!1;var x=new Uint32Array(b-_);r.decodeBits(l,u,x);var T=[],E,S,A,v;for(E=_;E<b;E++)S=E-(E<p?0:p),T[S]={first:x[E-_],second:null};var D=l.byteLength-u.ptr,R=Math.ceil(D/4),P=new ArrayBuffer(R*4),L=new Uint8Array(P);L.set(new Uint8Array(l,u.ptr,D));var F=new Uint32Array(P),y=0,I,M=0;for(I=F[0],E=_;E<b;E++)S=E-(E<p?0:p),v=T[S].first,v>0&&(T[S].second=I<<y>>>32-v,32-y>=v?(y+=v,y===32&&(y=0,M++,I=F[M])):(y+=v-32,M++,I=F[M],T[S].second|=I>>>32-y));var B=0,U=0,V=new s;for(E=0;E<T.length;E++)T[E]!==void 0&&(B=Math.max(B,T[E].first));B>=f?U=f:U=B,B>=30&&console.log("WARning, large NUM LUT BITS IS "+B);var W=[],H,X,$,ae,se,he;for(E=_;E<b;E++)if(S=E-(E<p?0:p),v=T[S].first,v>0)if(H=[v,S],v<=U)for(X=T[S].second<<U-v,$=1<<U-v,A=0;A<$;A++)W[X|A]=H;else for(X=T[S].second,he=V,ae=v-1;ae>=0;ae--)se=X>>>ae&1,se?(he.right||(he.right=new s),he=he.right):(he.left||(he.left=new s),he=he.left),ae===0&&!he.val&&(he.val=H[1]);return{decodeLut:W,numBitsLUTQick:U,numBitsLUT:B,tree:V,stuffedData:F,srcPtr:M,bitPos:y}},readHuffman:function(l,u,f){var h=u.headerInfo,m=h.numDims,p=u.headerInfo.height,_=u.headerInfo.width,b=_*p,x=this.readHuffmanTree(l,u),T=x.decodeLut,E=x.tree,S=x.stuffedData,A=x.srcPtr,v=x.bitPos,D=x.numBitsLUTQick,R=x.numBitsLUT,P=u.headerInfo.imageType===0?128:0,L,F,y,I=u.pixels.resultMask,M,B,U,V,W,H,X,$=0;v>0&&(A++,v=0);var ae=S[A],se=u.encodeMode===1,he=new f(b*m),ge=he,le;for(le=0;le<h.numDims;le++){if(m>1&&(ge=new f(he.buffer,b*le,b),$=0),u.headerInfo.numValidPixel===_*p)for(H=0,V=0;V<p;V++)for(W=0;W<_;W++,H++){if(F=0,M=ae<<v>>>32-D,B=M,32-v<D&&(M|=S[A+1]>>>64-v-D,B=M),T[B])F=T[B][1],v+=T[B][0];else for(M=ae<<v>>>32-R,B=M,32-v<R&&(M|=S[A+1]>>>64-v-R,B=M),L=E,X=0;X<R;X++)if(U=M>>>R-X-1&1,L=U?L.right:L.left,!(L.left||L.right)){F=L.val,v=v+X+1;break}v>=32&&(v-=32,A++,ae=S[A]),y=F-P,se?(W>0?y+=$:V>0?y+=ge[H-_]:y+=$,y&=255,ge[H]=y,$=y):ge[H]=y}else for(H=0,V=0;V<p;V++)for(W=0;W<_;W++,H++)if(I[H]){if(F=0,M=ae<<v>>>32-D,B=M,32-v<D&&(M|=S[A+1]>>>64-v-D,B=M),T[B])F=T[B][1],v+=T[B][0];else for(M=ae<<v>>>32-R,B=M,32-v<R&&(M|=S[A+1]>>>64-v-R,B=M),L=E,X=0;X<R;X++)if(U=M>>>R-X-1&1,L=U?L.right:L.left,!(L.left||L.right)){F=L.val,v=v+X+1;break}v>=32&&(v-=32,A++,ae=S[A]),y=F-P,se?(W>0&&I[H-1]?y+=$:V>0&&I[H-_]?y+=ge[H-_]:y+=$,y&=255,ge[H]=y,$=y):ge[H]=y}u.ptr=u.ptr+(A+1)*4+(v>0?4:0)}u.pixels.resultPixels=he},decodeBits:function(l,u,f,h,m){{var p=u.headerInfo,_=p.fileVersion,b=0,x=new DataView(l,u.ptr,5),T=x.getUint8(0);b++;var E=T>>6,S=E===0?4:3-E,A=(T&32)>0,v=T&31,D=0;if(S===1)D=x.getUint8(b),b++;else if(S===2)D=x.getUint16(b,!0),b+=2;else if(S===4)D=x.getUint32(b,!0),b+=4;else throw"Invalid valid pixel count type";var R=2*p.maxZError,P,L,F,y,I,M,B,U,V,W,H=p.numDims>1?p.maxValues[m]:p.zMax;if(A){for(u.counter.lut++,U=x.getUint8(b),V=v,b++,y=Math.ceil((U-1)*v/8),I=Math.ceil(y/4),L=new ArrayBuffer(I*4),F=new Uint8Array(L),u.ptr+=b,F.set(new Uint8Array(l,u.ptr,y)),B=new Uint32Array(L),u.ptr+=y,W=0;U-1>>>W;)W++;y=Math.ceil(D*W/8),I=Math.ceil(y/4),L=new ArrayBuffer(I*4),F=new Uint8Array(L),F.set(new Uint8Array(l,u.ptr,y)),P=new Uint32Array(L),u.ptr+=y,_>=3?M=o.unstuffLUT2(B,v,U-1,h,R,H):M=o.unstuffLUT(B,v,U-1,h,R,H),_>=3?o.unstuff2(P,f,W,D,M):o.unstuff(P,f,W,D,M)}else u.counter.bitstuffer++,W=v,u.ptr+=b,W>0&&(y=Math.ceil(D*W/8),I=Math.ceil(y/4),L=new ArrayBuffer(I*4),F=new Uint8Array(L),F.set(new Uint8Array(l,u.ptr,y)),P=new Uint32Array(L),u.ptr+=y,_>=3?h==null?o.originalUnstuff2(P,f,W,D):o.unstuff2(P,f,W,D,!1,h,R,H):h==null?o.originalUnstuff(P,f,W,D):o.unstuff(P,f,W,D,!1,h,R,H))}},readTiles:function(l,u,f){var h=u.headerInfo,m=h.width,p=h.height,_=h.microBlockSize,b=h.imageType,x=r.getDataTypeSize(b),T=Math.ceil(m/_),E=Math.ceil(p/_);u.pixels.numBlocksY=E,u.pixels.numBlocksX=T,u.pixels.ptr=0;var S=0,A=0,v=0,D=0,R=0,P=0,L=0,F=0,y=0,I=0,M=0,B=0,U=0,V=0,W=0,H=0,X,$,ae,se,he,ge,le=new f(_*_),me=p%_||_,Me=m%_||_,Ge,De,ke=h.numDims,He,ft=u.pixels.resultMask,Ie=u.pixels.resultPixels;for(v=0;v<E;v++)for(R=v!==E-1?_:me,D=0;D<T;D++)for(P=D!==T-1?_:Me,M=v*m*_+D*_,B=m-P,He=0;He<ke;He++){if(ke>1&&(Ie=new f(u.pixels.resultPixels.buffer,m*p*He*x,m*p)),L=l.byteLength-u.ptr,X=new DataView(l,u.ptr,Math.min(10,L)),$={},H=0,F=X.getUint8(0),H++,y=F>>6&255,I=F>>2&15,I!==(D*_>>3&15))throw"integrity issue";if(ge=F&3,ge>3)throw u.ptr+=H,"Invalid block encoding ("+ge+")";if(ge===2){u.counter.constant++,u.ptr+=H;continue}else if(ge===0){if(u.counter.uncompressed++,u.ptr+=H,U=R*P*x,V=l.byteLength-u.ptr,U=U<V?U:V,ae=new ArrayBuffer(U%x===0?U:U+x-U%x),se=new Uint8Array(ae),se.set(new Uint8Array(l,u.ptr,U)),he=new f(ae),W=0,ft)for(S=0;S<R;S++){for(A=0;A<P;A++)ft[M]&&(Ie[M]=he[W++]),M++;M+=B}else for(S=0;S<R;S++){for(A=0;A<P;A++)Ie[M++]=he[W++];M+=B}u.ptr+=W*x}else if(Ge=r.getDataTypeUsed(b,y),De=r.getOnePixel($,H,Ge,X),H+=r.getDataTypeSize(Ge),ge===3)if(u.ptr+=H,u.counter.constantoffset++,ft)for(S=0;S<R;S++){for(A=0;A<P;A++)ft[M]&&(Ie[M]=De),M++;M+=B}else for(S=0;S<R;S++){for(A=0;A<P;A++)Ie[M++]=De;M+=B}else if(u.ptr+=H,r.decodeBits(l,u,le,De,He),H=0,ft)for(S=0;S<R;S++){for(A=0;A<P;A++)ft[M]&&(Ie[M]=le[H++]),M++;M+=B}else for(S=0;S<R;S++){for(A=0;A<P;A++)Ie[M++]=le[H++];M+=B}}},formatFileInfo:function(l){return{fileIdentifierString:l.headerInfo.fileIdentifierString,fileVersion:l.headerInfo.fileVersion,imageType:l.headerInfo.imageType,height:l.headerInfo.height,width:l.headerInfo.width,numValidPixel:l.headerInfo.numValidPixel,microBlockSize:l.headerInfo.microBlockSize,blobSize:l.headerInfo.blobSize,maxZError:l.headerInfo.maxZError,pixelType:r.getPixelType(l.headerInfo.imageType),eofOffset:l.eofOffset,mask:l.mask?{numBytes:l.mask.numBytes}:null,pixels:{numBlocksX:l.pixels.numBlocksX,numBlocksY:l.pixels.numBlocksY,maxValue:l.headerInfo.zMax,minValue:l.headerInfo.zMin,noDataValue:l.noDataValue}}},constructConstantSurface:function(l){var u=l.headerInfo.zMax,f=l.headerInfo.numDims,h=l.headerInfo.height*l.headerInfo.width,m=h*f,p=0,_=0,b=0,x=l.pixels.resultMask;if(x)if(f>1)for(p=0;p<f;p++)for(b=p*h,_=0;_<h;_++)x[_]&&(l.pixels.resultPixels[b+_]=u);else for(_=0;_<h;_++)x[_]&&(l.pixels.resultPixels[_]=u);else if(l.pixels.resultPixels.fill)l.pixels.resultPixels.fill(u);else for(_=0;_<m;_++)l.pixels.resultPixels[_]=u},getDataTypeArray:function(l){var u;switch(l){case 0:u=Int8Array;break;case 1:u=Uint8Array;break;case 2:u=Int16Array;break;case 3:u=Uint16Array;break;case 4:u=Int32Array;break;case 5:u=Uint32Array;break;case 6:u=Float32Array;break;case 7:u=Float64Array;break;default:u=Float32Array}return u},getPixelType:function(l){var u;switch(l){case 0:u="S8";break;case 1:u="U8";break;case 2:u="S16";break;case 3:u="U16";break;case 4:u="S32";break;case 5:u="U32";break;case 6:u="F32";break;case 7:u="F64";break;default:u="F32"}return u},isValidPixelValue:function(l,u){if(u==null)return!1;var f;switch(l){case 0:f=u>=-128&&u<=127;break;case 1:f=u>=0&&u<=255;break;case 2:f=u>=-32768&&u<=32767;break;case 3:f=u>=0&&u<=65536;break;case 4:f=u>=-2147483648&&u<=2147483647;break;case 5:f=u>=0&&u<=4294967296;break;case 6:f=u>=-34027999387901484e22&&u<=34027999387901484e22;break;case 7:f=u>=5e-324&&u<=17976931348623157e292;break;default:f=!1}return f},getDataTypeSize:function(l){var u=0;switch(l){case 0:case 1:u=1;break;case 2:case 3:u=2;break;case 4:case 5:case 6:u=4;break;case 7:u=8;break;default:u=l}return u},getDataTypeUsed:function(l,u){var f=l;switch(l){case 2:case 4:f=l-u;break;case 3:case 5:f=l-2*u;break;case 6:u===0?f=l:u===1?f=2:f=1;break;case 7:u===0?f=l:f=l-2*u+1;break;default:f=l;break}return f},getOnePixel:function(l,u,f,h){var m=0;switch(f){case 0:m=h.getInt8(u);break;case 1:m=h.getUint8(u);break;case 2:m=h.getInt16(u,!0);break;case 3:m=h.getUint16(u,!0);break;case 4:m=h.getInt32(u,!0);break;case 5:m=h.getUInt32(u,!0);break;case 6:m=h.getFloat32(u,!0);break;case 7:m=h.getFloat64(u,!0);break;default:throw"the decoder does not understand this pixel type"}return m}},s=function(l,u,f){this.val=l,this.left=u,this.right=f},a={decode:function(l,u){u=u||{};var f=u.noDataValue,h=0,m={};if(m.ptr=u.inputOffset||0,m.pixels={},!!r.readHeaderInfo(l,m)){var p=m.headerInfo,_=p.fileVersion,b=r.getDataTypeArray(p.imageType);r.readMask(l,m),p.numValidPixel!==p.width*p.height&&!m.pixels.resultMask&&(m.pixels.resultMask=u.maskData);var x=p.width*p.height;if(m.pixels.resultPixels=new b(x*p.numDims),m.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},p.numValidPixel!==0)if(p.zMax===p.zMin)r.constructConstantSurface(m);else if(_>=4&&r.checkMinMaxRanges(l,m))r.constructConstantSurface(m);else{var T=new DataView(l,m.ptr,2),E=T.getUint8(0);if(m.ptr++,E)r.readDataOneSweep(l,m,b);else if(_>1&&p.imageType<=1&&Math.abs(p.maxZError-.5)<1e-5){var S=T.getUint8(1);if(m.ptr++,m.encodeMode=S,S>2||_<4&&S>1)throw"Invalid Huffman flag "+S;S?r.readHuffman(l,m,b):r.readTiles(l,m,b)}else r.readTiles(l,m,b)}m.eofOffset=m.ptr;var A;u.inputOffset?(A=m.headerInfo.blobSize+u.inputOffset-m.ptr,Math.abs(A)>=1&&(m.eofOffset=u.inputOffset+m.headerInfo.blobSize)):(A=m.headerInfo.blobSize-m.ptr,Math.abs(A)>=1&&(m.eofOffset=m.headerInfo.blobSize));var v={width:p.width,height:p.height,pixelData:m.pixels.resultPixels,minValue:p.zMin,maxValue:p.zMax,validPixelCount:p.numValidPixel,dimCount:p.numDims,dimStats:{minValues:p.minValues,maxValues:p.maxValues},maskData:m.pixels.resultMask};if(m.pixels.resultMask&&r.isValidPixelValue(p.imageType,f)){var D=m.pixels.resultMask;for(h=0;h<x;h++)D[h]||(v.pixelData[h]=f);v.noDataValue=f}return m.noDataValue=f,u.returnFileInfo&&(v.fileInfo=r.formatFileInfo(m)),v}},getBandCount:function(l){var u=0,f=0,h={};for(h.ptr=0,h.pixels={};f<l.byteLength-58;)r.readHeaderInfo(l,h),f+=h.headerInfo.blobSize,u++,h.ptr=f;return u}};return a}(),n=function(){var o=new ArrayBuffer(4),r=new Uint8Array(o),s=new Uint32Array(o);return s[0]=1,r[0]===1}(),i={decode:function(o,r){if(!n)throw"Big endian system is not supported.";r=r||{};var s=r.inputOffset||0,a=new Uint8Array(o,s,10),l=String.fromCharCode.apply(null,a),u,f;if(l.trim()==="CntZImage")u=e,f=1;else if(l.substring(0,5)==="Lerc2")u=t,f=2;else throw"Unexpected file identifier string: "+l;for(var h=0,m=o.byteLength-10,p,_=[],b,x,T={width:0,height:0,pixels:[],pixelType:r.pixelType,mask:null,statistics:[]};s<m;){var E=u.decode(o,{inputOffset:s,encodedMaskData:p,maskData:x,returnMask:h===0,returnEncodedMask:h===0,returnFileInfo:!0,pixelType:r.pixelType||null,noDataValue:r.noDataValue||null});s=E.fileInfo.eofOffset,h===0&&(p=E.encodedMaskData,x=E.maskData,T.width=E.width,T.height=E.height,T.dimCount=E.dimCount||1,T.pixelType=E.pixelType||E.fileInfo.pixelType,T.mask=E.maskData),f>1&&E.fileInfo.mask&&E.fileInfo.mask.numBytes>0&&_.push(E.maskData),h++,T.pixels.push(E.pixelData),T.statistics.push({minValue:E.minValue,maxValue:E.maxValue,noDataValue:E.noDataValue,dimStats:E.dimStats})}var S,A,v;if(f>1&&_.length>1){for(v=T.width*T.height,T.bandMasks=_,x=new Uint8Array(v),x.set(_[0]),S=1;S<_.length;S++)for(b=_[S],A=0;A<v;A++)x[A]=x[A]&b[A];T.maskData=x}return T}};typeof define=="function"&&define.amd?define([],function(){return i}):typeof F4!="undefined"&&F4.exports?F4.exports=i:this.Lerc=i})()});var Txt={};KX(Txt,{Cesium:()=>bxt,ENGINE_VERSION:()=>xxt,Supercluster:()=>$I});var AX={};KX(AX,{AlphaMode:()=>Jm,AlphaPipelineStage:()=>mF,AnchorPointDirect:()=>mN,AnchorPointIndirect:()=>pN,Appearance:()=>$i,ApproximateTerrainHeights:()=>ai,ArcGISTiledElevationTerrainProvider:()=>Ube,ArcGisBaseMapType:()=>YE,ArcGisMapServerImageryProvider:()=>yU,ArcGisMapService:()=>Tf,ArcType:()=>jt,ArticulationStageType:()=>gc,AssociativeArray:()=>Et,Atmosphere:()=>WT,AtmospherePipelineStage:()=>YN,AttributeCompression:()=>On,AttributeType:()=>tn,AutoExposure:()=>RV,AutomaticUniforms:()=>r_,Axis:()=>vo,AxisAlignedBoundingBox:()=>lb,B3dmLoader:()=>vN,B3dmParser:()=>AN,BatchTable:()=>nT,BatchTableHierarchy:()=>AT,BatchTexture:()=>Zc,BatchTexturePipelineStage:()=>pF,Billboard:()=>no,BillboardCollection:()=>Ju,BillboardGraphics:()=>sc,BillboardVisualizer:()=>lM,BingMapsGeocoderService:()=>Vbe,BingMapsImageryProvider:()=>xU,BingMapsStyle:()=>ND,BlendEquation:()=>Oa,BlendFunction:()=>bo,BlendOption:()=>Co,BlendingState:()=>cn,BoundingRectangle:()=>je,BoundingSphere:()=>ne,BoundingSphereState:()=>lt,BoundingVolumeSemantics:()=>kT,BoxEmitter:()=>F0e,BoxGeometry:()=>Ia,BoxGeometryUpdater:()=>rL,BoxGraphics:()=>uT,BoxOutlineGeometry:()=>oh,BrdfLutGenerator:()=>bz,Buffer:()=>yt,BufferLoader:()=>OT,BufferUsage:()=>Pe,CPUStylingPipelineStage:()=>bF,CallbackPositionProperty:()=>sL,CallbackProperty:()=>fh,Camera:()=>Qi,CameraEventAggregator:()=>kV,CameraEventType:()=>Pi,CameraFlightPath:()=>xz,Cartesian2:()=>k,Cartesian3:()=>d,Cartesian4:()=>ee,Cartographic:()=>re,CartographicGeocoderService:()=>Hbe,CatmullRomSpline:()=>jbe,Cesium3DContentGroup:()=>ST,Cesium3DTile:()=>ad,Cesium3DTileBatchTable:()=>R_,Cesium3DTileColorBlendMode:()=>O_,Cesium3DTileContent:()=>B0e,Cesium3DTileContentFactory:()=>bC,Cesium3DTileContentState:()=>zo,Cesium3DTileContentType:()=>Ss,Cesium3DTileFeature:()=>Jc,Cesium3DTileFeatureTable:()=>Sh,Cesium3DTileOptimizationHint:()=>od,Cesium3DTileOptimizations:()=>nB,Cesium3DTilePass:()=>dr,Cesium3DTilePassState:()=>Nd,Cesium3DTilePointFeature:()=>_g,Cesium3DTileRefine:()=>ko,Cesium3DTileStyle:()=>_4,Cesium3DTileStyleEngine:()=>cB,Cesium3DTilesVoxelProvider:()=>U0e,Cesium3DTileset:()=>ol,Cesium3DTilesetBaseTraversal:()=>uB,Cesium3DTilesetCache:()=>oB,Cesium3DTilesetGraphics:()=>gT,Cesium3DTilesetHeatmap:()=>sB,Cesium3DTilesetMetadata:()=>RC,Cesium3DTilesetMostDetailedTraversal:()=>lB,Cesium3DTilesetSkipTraversal:()=>dB,Cesium3DTilesetStatistics:()=>Sg,Cesium3DTilesetTraversal:()=>Ws,Cesium3DTilesetVisualizer:()=>mB,CesiumTerrainProvider:()=>Nw,CesiumWidget:()=>Nbe,Check:()=>C,CheckerboardMaterialProperty:()=>xv,CircleEmitter:()=>T4,CircleGeometry:()=>Qbe,CircleOutlineGeometry:()=>e0e,ClassificationModelDrawCommand:()=>u2,ClassificationPipelineStage:()=>_F,ClassificationPrimitive:()=>PS,ClassificationType:()=>Ln,ClearCommand:()=>$n,ClippingPlane:()=>zT,ClippingPlaneCollection:()=>as,ClippingPolygon:()=>AA,ClippingPolygonCollection:()=>Ch,Clock:()=>XC,ClockRange:()=>Va,ClockStep:()=>Or,CloudCollection:()=>q0e,CloudType:()=>Gw,Color:()=>z,ColorBlendMode:()=>_c,ColorGeometryInstanceAttribute:()=>Ht,ColorMaterialProperty:()=>Ut,ComponentDatatype:()=>j,Composite3DTileContent:()=>cL,CompositeEntityCollection:()=>oae,CompositeMaterialProperty:()=>wv,CompositePositionProperty:()=>fa,CompositeProperty:()=>Tc,CompressedTextureBuffer:()=>rP,ComputeCommand:()=>Vc,ComputeEngine:()=>oP,ConditionsExpression:()=>p4,ConeEmitter:()=>Y0e,ConstantPositionProperty:()=>Bu,ConstantProperty:()=>jn,ConstantSpline:()=>NN,ContentMetadata:()=>j2,Context:()=>oM,ContextLimits:()=>ht,CoplanarPolygonGeometry:()=>a3,CoplanarPolygonGeometryLibrary:()=>xg,CoplanarPolygonOutlineGeometry:()=>sd,CornerType:()=>Ii,CorrelationGroup:()=>_N,CorridorGeometry:()=>VC,CorridorGeometryLibrary:()=>Bi,CorridorGeometryUpdater:()=>wB,CorridorGraphics:()=>dT,CorridorOutlineGeometry:()=>EB,Credit:()=>St,CreditDisplay:()=>Oz,CubeMap:()=>Lo,CubeMapFace:()=>bP,CubicRealPolynomial:()=>zx,CullFace:()=>pi,CullingVolume:()=>rs,CumulusCloud:()=>Pf,CustomDataSource:()=>IB,CustomHeightmapTerrainProvider:()=>t0e,CustomShader:()=>AH,CustomShaderMode:()=>dg,CustomShaderPipelineStage:()=>AF,CustomShaderTranslucencyMode:()=>zb,CylinderGeometry:()=>OB,CylinderGeometryLibrary:()=>GC,CylinderGeometryUpdater:()=>RB,CylinderGraphics:()=>hT,CylinderOutlineGeometry:()=>PB,CzmlDataSource:()=>$ce,DataSource:()=>kr,DataSourceClock:()=>Bh,DataSourceCollection:()=>jB,DataSourceDisplay:()=>R3,DebugAppearance:()=>X0e,DebugCameraPrimitive:()=>Wp,DebugInspector:()=>JV,DebugModelMatrixPrimitive:()=>K0e,DefaultProxy:()=>i0e,DepthFunction:()=>cc,DepthPlane:()=>Bz,DequantizationPipelineStage:()=>vF,DerivedCommand:()=>qp,DeveloperError:()=>w,DeviceOrientationCameraController:()=>Uz,DirectionalLight:()=>$0e,DiscardEmptyTileImagePolicy:()=>BD,DiscardMissingTileImagePolicy:()=>gU,DistanceDisplayCondition:()=>Nt,DistanceDisplayConditionGeometryInstanceAttribute:()=>Mn,DoubleEndedPriorityQueue:()=>Cw,DoublyLinkedList:()=>iB,DracoLoader:()=>H_,DrawCommand:()=>Ke,DynamicAtmosphereLightingType:()=>eg,DynamicEnvironmentMapManager:()=>tg,DynamicGeometryBatch:()=>oE,DynamicGeometryUpdater:()=>Jn,EarthOrientationParameters:()=>UO,EarthOrientationParametersSample:()=>Wy,EasingFunction:()=>Ps,EllipseGeometry:()=>cl,EllipseGeometryLibrary:()=>Zl,EllipseGeometryUpdater:()=>QB,EllipseGraphics:()=>mT,EllipseOutlineGeometry:()=>pf,Ellipsoid:()=>Z,EllipsoidGeodesic:()=>C_,EllipsoidGeometry:()=>Ks,EllipsoidGeometryUpdater:()=>e3,EllipsoidGraphics:()=>pT,EllipsoidOutlineGeometry:()=>sf,EllipsoidPrimitive:()=>uz,EllipsoidRhumbLine:()=>Pa,EllipsoidSurfaceAppearance:()=>Z0e,EllipsoidTangentPlane:()=>Wr,EllipsoidTerrainProvider:()=>dU,EllipsoidalOccluder:()=>Rg,Empty3DTileContent:()=>av,EncodedCartesian3:()=>kn,Entity:()=>Ts,EntityCluster:()=>ff,EntityCollection:()=>qs,EntityView:()=>N3,Event:()=>fe,EventHelper:()=>rl,Expression:()=>Wf,ExpressionNodeType:()=>pt,ExtrapolationType:()=>df,FeatureDetection:()=>sn,FeatureIdPipelineStage:()=>Ub,Fog:()=>zz,ForEach:()=>Ee,FrameRateMonitor:()=>J0e,FrameState:()=>Vz,Framebuffer:()=>Lr,FramebufferManager:()=>ui,FrustumCommands:()=>Kz,FrustumGeometry:()=>sw,FrustumOutlineGeometry:()=>Rz,Fullscreen:()=>fO,GeoJsonDataSource:()=>Efe,GeoJsonLoader:()=>IN,GeocodeType:()=>t4,GeocoderService:()=>o0e,GeographicProjection:()=>Ei,GeographicTilingScheme:()=>Hi,Geometry:()=>st,Geometry3DTileContent:()=>_L,GeometryAttribute:()=>be,GeometryAttributes:()=>fn,GeometryFactory:()=>s0e,GeometryInstance:()=>wt,GeometryInstanceAttribute:()=>lc,GeometryOffsetAttribute:()=>Zt,GeometryPipeline:()=>Pn,GeometryPipelineStage:()=>OF,GeometryType:()=>Ff,GeometryUpdater:()=>Qn,GeometryUpdaterSet:()=>xE,GeometryVisualizer:()=>C3,GetFeatureInfoFormat:()=>JE,Globe:()=>rz,GlobeDepth:()=>$z,GlobeSurfaceShaderSet:()=>pU,GlobeSurfaceTile:()=>Pd,GlobeSurfaceTileProvider:()=>XU,GlobeTranslucency:()=>KU,GlobeTranslucencyFramebuffer:()=>Zz,GlobeTranslucencyState:()=>Hz,GltfBufferViewLoader:()=>aA,GltfDracoLoader:()=>cA,GltfGpmLoader:()=>yN,GltfGpmLocal:()=>RA,GltfImageLoader:()=>lA,GltfIndexBufferLoader:()=>uA,GltfJsonLoader:()=>dA,GltfLoader:()=>rg,GltfLoaderUtil:()=>zl,GltfMeshPrimitiveGpmLoader:()=>CN,GltfStructuralMetadataLoader:()=>uN,GltfTextureLoader:()=>_A,GltfVertexBufferLoader:()=>gA,GoogleEarthEnterpriseImageryProvider:()=>exe,GoogleEarthEnterpriseMapsProvider:()=>AU,GoogleEarthEnterpriseMetadata:()=>My,GoogleEarthEnterpriseTerrainData:()=>FI,GoogleEarthEnterpriseTerrainProvider:()=>p0e,GoogleEarthEnterpriseTileInformation:()=>i4,GoogleMaps:()=>kw,GpxDataSource:()=>yde,GregorianDate:()=>vm,GridImageryProvider:()=>txe,GridMaterialProperty:()=>Mv,GroundGeometryUpdater:()=>Un,GroundPolylineGeometry:()=>aT,GroundPolylinePrimitive:()=>sh,GroundPrimitive:()=>Kc,GroupMetadata:()=>fv,HeadingPitchRange:()=>Cd,HeadingPitchRoll:()=>Hc,Heap:()=>LO,HeightReference:()=>qe,HeightmapEncoding:()=>Id,HeightmapTerrainData:()=>Wa,HeightmapTessellator:()=>MD,HermitePolynomialApproximation:()=>LB,HermiteSpline:()=>Fb,HilbertOrder:()=>iA,HorizontalOrigin:()=>mi,I3SDataProvider:()=>bm,I3SDecoder:()=>A4,I3SFeature:()=>v4,I3SField:()=>I4,I3SGeometry:()=>HI,I3SLayer:()=>Ww,I3SNode:()=>GI,I3SStatistics:()=>L4,I3SSublayer:()=>N4,I3SSymbology:()=>R4,I3dmLoader:()=>LN,I3dmParser:()=>PN,Iau2000Orientation:()=>az,Iau2006XysData:()=>GO,Iau2006XysSample:()=>Mx,IauOrientationAxes:()=>cz,IauOrientationParameters:()=>sz,ImageBasedLighting:()=>wT,ImageBasedLightingPipelineStage:()=>KN,ImageMaterialProperty:()=>pb,Imagery:()=>GD,ImageryLayer:()=>lu,ImageryLayerCollection:()=>ZU,ImageryLayerFeatureInfo:()=>rm,ImageryProvider:()=>pl,ImageryState:()=>ni,Implicit3DTileContent:()=>CA,ImplicitAvailabilityBitstream:()=>oA,ImplicitMetadataView:()=>rA,ImplicitSubdivisionScheme:()=>Jo,ImplicitSubtree:()=>FT,ImplicitSubtreeCache:()=>g4,ImplicitSubtreeMetadata:()=>xL,ImplicitTileCoordinates:()=>NC,ImplicitTileset:()=>LC,IndexDatatype:()=>Oe,InstanceAttributeSemantic:()=>Yr,InstancingPipelineStage:()=>uF,InterpolationAlgorithm:()=>_0e,InterpolationType:()=>wh,Intersect:()=>Gt,IntersectionTests:()=>Yn,Intersections2D:()=>Py,Interval:()=>Da,InvertClassification:()=>cI,Ion:()=>mh,IonGeocoderService:()=>g0e,IonImageryProvider:()=>RU,IonResource:()=>Uu,IonWorldImageryStyle:()=>MU,Iso8601:()=>Ue,JobScheduler:()=>jz,JobType:()=>ca,JsonMetadataTable:()=>ng,JulianDate:()=>K,KTX2Transcoder:()=>sP,KeyboardEventModifier:()=>ta,KeyframeNode:()=>Ki,KmlCamera:()=>K3,KmlDataSource:()=>mme,KmlLookAt:()=>jk,KmlTour:()=>qk,KmlTourFlyTo:()=>Xk,KmlTourWait:()=>Kk,Label:()=>Yb,LabelCollection:()=>hp,LabelGraphics:()=>ch,LabelStyle:()=>Uo,LabelVisualizer:()=>E3,LagrangePolynomialApproximation:()=>NB,LeapSecond:()=>zi,Light:()=>uxe,LightingModel:()=>cp,LightingPipelineStage:()=>RF,LinearApproximation:()=>YC,LinearSpline:()=>Nb,ManagedArray:()=>$c,MapMode2D:()=>fu,MapProjection:()=>y0e,MapboxImageryProvider:()=>vU,MapboxStyleImageryProvider:()=>dxe,Material:()=>Vi,MaterialAppearance:()=>eo,MaterialPipelineStage:()=>LF,MaterialProperty:()=>$o,Math:()=>O,Matrix2:()=>Li,Matrix3:()=>q,Matrix4:()=>N,Megatexture:()=>EI,MeshPrimitiveGpmLocal:()=>TN,MetadataClass:()=>xh,MetadataClassProperty:()=>Eb,MetadataComponentType:()=>zt,MetadataEntity:()=>Rn,MetadataEnum:()=>GL,MetadataEnumValue:()=>VL,MetadataPicking:()=>Yz,MetadataPickingPipelineStage:()=>Yu,MetadataPipelineStage:()=>Zf,MetadataSchema:()=>ju,MetadataSchemaLoader:()=>bA,MetadataSemantic:()=>BT,MetadataTable:()=>kl,MetadataTableProperty:()=>CL,MetadataType:()=>Ct,MipmapHint:()=>zf,Model:()=>Dh,Model3DTileContent:()=>up,ModelAlphaOptions:()=>JF,ModelAnimation:()=>UN,ModelAnimationChannel:()=>kN,ModelAnimationCollection:()=>VN,ModelAnimationLoop:()=>Hl,ModelAnimationState:()=>Ah,ModelArticulation:()=>JN,ModelArticulationStage:()=>$N,ModelClippingPlanesPipelineStage:()=>tF,ModelClippingPolygonsPipelineStage:()=>oF,ModelColorPipelineStage:()=>kb,ModelComponents:()=>bn,ModelDrawCommand:()=>d2,ModelDrawCommands:()=>p2,ModelFeature:()=>HN,ModelFeatureTable:()=>GN,ModelGraphics:()=>S_,ModelLightingOptions:()=>c2,ModelMatrixUpdateStage:()=>fF,ModelNode:()=>rF,ModelRenderResources:()=>QF,ModelRuntimeNode:()=>hF,ModelRuntimePrimitive:()=>$F,ModelSceneGraph:()=>g2,ModelSilhouettePipelineStage:()=>i2,ModelSkin:()=>ZF,ModelSplitterPipelineStage:()=>s2,ModelStatistics:()=>y2,ModelType:()=>fr,ModelUtility:()=>Xt,ModelVisualizer:()=>S3,Moon:()=>hz,MorphTargetsPipelineStage:()=>FF,MorphWeightSpline:()=>b0e,MortonOrder:()=>t0,Multiple3DTileContent:()=>Y2,MultisampleFramebuffer:()=>rM,NearFarScalar:()=>Bt,NeverTileDiscardPolicy:()=>hxe,NodeRenderResources:()=>a2,NodeStatisticsPipelineStage:()=>dF,NodeTransformationProperty:()=>_T,OIT:()=>Qz,Occluder:()=>gz,OffsetGeometryInstanceAttribute:()=>qi,OpenCageGeocoderService:()=>x0e,OpenStreetMapImageryProvider:()=>mxe,OrderedGroundPrimitiveCollection:()=>qB,OrientedBoundingBox:()=>wn,OrthographicFrustum:()=>an,OrthographicOffCenterFrustum:()=>No,Packable:()=>T0e,PackableForInterpolation:()=>C0e,Particle:()=>WI,ParticleBurst:()=>gxe,ParticleEmitter:()=>bxe,ParticleSystem:()=>Cxe,Pass:()=>xe,PassState:()=>ic,PathGraphics:()=>A_,PathVisualizer:()=>A3,PeliasGeocoderService:()=>a4,PerInstanceColorAppearance:()=>nn,PerformanceDisplay:()=>qz,PerspectiveFrustum:()=>bi,PerspectiveOffCenterFrustum:()=>gl,PickDepth:()=>Xz,PickDepthFramebuffer:()=>eV,PickFramebuffer:()=>tV,PickedMetadataInfo:()=>DH,Picking:()=>dV,PickingPipelineStage:()=>BF,PinBuilder:()=>$g,PixelDatatype:()=>Ne,PixelFormat:()=>Re,Plane:()=>on,PlaneGeometry:()=>i3,PlaneGeometryUpdater:()=>s3,PlaneGraphics:()=>oL,PlaneOutlineGeometry:()=>r3,PntsLoader:()=>x2,PntsParser:()=>fC,PointCloud:()=>WH,PointCloudEyeDomeLighting:()=>sg,PointCloudShading:()=>np,PointCloudStylingPipelineStage:()=>UF,PointGraphics:()=>yT,PointPrimitive:()=>Ds,PointPrimitiveCollection:()=>Ov,PointVisualizer:()=>v3,PolygonGeometry:()=>Q_,PolygonGeometryLibrary:()=>Fn,PolygonGeometryUpdater:()=>u3,PolygonGraphics:()=>lh,PolygonHierarchy:()=>Ra,PolygonOutlineGeometry:()=>l3,PolygonPipeline:()=>ti,Polyline:()=>Jf,PolylineArrowMaterialProperty:()=>Lv,PolylineCollection:()=>Rh,PolylineColorAppearance:()=>qr,PolylineDashMaterialProperty:()=>Nv,PolylineGeometry:()=>Kg,PolylineGeometryUpdater:()=>I3,PolylineGlowMaterialProperty:()=>Fv,PolylineGraphics:()=>fc,PolylineMaterialAppearance:()=>sa,PolylineOutlineMaterialProperty:()=>c0,PolylinePipeline:()=>Di,PolylineVisualizer:()=>P3,PolylineVolumeGeometry:()=>f3,PolylineVolumeGeometryLibrary:()=>Nh,PolylineVolumeGeometryUpdater:()=>h3,PolylineVolumeGraphics:()=>bT,PolylineVolumeOutlineGeometry:()=>d3,PositionProperty:()=>ah,PositionPropertyArray:()=>Lg,PostProcessStage:()=>so,PostProcessStageCollection:()=>LV,PostProcessStageComposite:()=>bl,PostProcessStageLibrary:()=>Af,PostProcessStageSampleMode:()=>Sf,PostProcessStageTextureCache:()=>pw,PpeMetadata:()=>xN,PpeSource:()=>Wxe,PpeTexture:()=>bN,Primitive:()=>An,PrimitiveCollection:()=>$l,PrimitiveLoadPlan:()=>KT,PrimitiveOutlineGenerator:()=>XT,PrimitiveOutlinePipelineStage:()=>HF,PrimitivePipeline:()=>iT,PrimitiveRenderResources:()=>l2,PrimitiveState:()=>Er,PrimitiveStatisticsPipelineStage:()=>GF,PrimitiveType:()=>Se,Property:()=>G,PropertyArray:()=>Bv,PropertyAttribute:()=>qT,PropertyAttributeProperty:()=>aN,PropertyBag:()=>Ll,PropertyTable:()=>el,PropertyTexture:()=>ig,PropertyTextureProperty:()=>sN,Proxy:()=>w0e,QuadraticRealPolynomial:()=>jc,QuadtreeOccluders:()=>JU,QuadtreePrimitive:()=>oz,QuadtreeTile:()=>ez,QuadtreeTileLoadState:()=>Qs,QuadtreeTileProvider:()=>Exe,QuantizedMeshTerrainData:()=>Lw,QuarticRealPolynomial:()=>cP,Quaternion:()=>ve,QuaternionSpline:()=>BN,Queue:()=>Pb,Ray:()=>mn,Rectangle:()=>te,RectangleCollisionChecker:()=>EE,RectangleGeometry:()=>_E,RectangleGeometryLibrary:()=>vs,RectangleGeometryUpdater:()=>m3,RectangleGraphics:()=>uh,RectangleOutlineGeometry:()=>wC,ReferenceFrame:()=>Ni,ReferenceProperty:()=>Fg,RenderState:()=>Fe,Renderbuffer:()=>Pu,RenderbufferFormat:()=>oc,Request:()=>Ko,RequestErrorEvent:()=>Im,RequestScheduler:()=>tc,RequestState:()=>qn,RequestType:()=>is,Resource:()=>Te,ResourceCache:()=>Fi,ResourceCacheKey:()=>Vl,ResourceCacheStatistics:()=>qL,ResourceLoader:()=>Gi,ResourceLoaderState:()=>_t,Rotation:()=>fd,RuntimeError:()=>ie,S2Cell:()=>z_,SDFSettings:()=>Gs,SampledPositionProperty:()=>da,SampledProperty:()=>hf,Sampler:()=>Jt,ScaledPositionProperty:()=>Fp,Scene:()=>PH,SceneFramebuffer:()=>fw,SceneMode:()=>J,SceneMode2DPipelineStage:()=>jF,SceneTransforms:()=>Yi,SceneTransitioner:()=>BV,ScreenSpaceCameraController:()=>XV,ScreenSpaceEventHandler:()=>Ay,ScreenSpaceEventType:()=>ci,SelectedFeatureIdPipelineStage:()=>Vb,SensorVolumePortionToDisplay:()=>zv,ShaderBuilder:()=>Kx,ShaderCache:()=>J1,ShaderDestination:()=>ce,ShaderFunction:()=>aM,ShaderProgram:()=>en,ShaderSource:()=>Be,ShaderStruct:()=>sM,ShadowMap:()=>Cy,ShadowMapShader:()=>Kp,ShadowMode:()=>yn,ShadowVolumeAppearance:()=>Nu,ShowGeometryInstanceAttribute:()=>gn,Simon1994PlanetaryPositions:()=>ob,SimplePolylineGeometry:()=>S0e,SingleTileImageryProvider:()=>DU,SkinningPipelineStage:()=>qF,SkyAtmosphere:()=>LH,SkyBox:()=>BH,SpatialNode:()=>TH,Spdcf:()=>gN,SpecularEnvironmentCubeMap:()=>hh,SphereEmitter:()=>wxe,SphereGeometry:()=>A0e,SphereOutlineGeometry:()=>Cg,Spherical:()=>FB,Spline:()=>Ai,SplitDirection:()=>Nr,Splitter:()=>OI,StaticGeometryColorBatch:()=>gd,StaticGeometryPerMaterialBatch:()=>bd,StaticGroundGeometryColorBatch:()=>Qv,StaticGroundGeometryPerMaterialBatch:()=>T3,StaticGroundPolylinePerMaterialBatch:()=>O3,StaticOutlineGeometryBatch:()=>eD,StencilConstants:()=>kt,StencilFunction:()=>Nn,StencilOperation:()=>ut,SteppedSpline:()=>FN,Stereographic:()=>pc,StorageType:()=>tp,StripeMaterialProperty:()=>kv,StripeOrientation:()=>kh,StructuralMetadata:()=>Vs,StyleCommandsNeeded:()=>vh,StyleExpression:()=>Sxe,Sun:()=>VH,SunLight:()=>g_,SunPostProcess:()=>ZV,SupportedImageFormats:()=>hN,TaskProcessor:()=>hi,Terrain:()=>Axe,TerrainData:()=>om,TerrainEncoding:()=>Ic,TerrainFillMesh:()=>qD,TerrainMesh:()=>Od,TerrainOffsetProperty:()=>CT,TerrainProvider:()=>Jr,TerrainQuantization:()=>Js,TerrainState:()=>ro,Texture:()=>Ot,TextureAtlas:()=>jb,TextureCache:()=>eM,TextureMagnificationFilter:()=>si,TextureManager:()=>SH,TextureMinificationFilter:()=>Wt,TextureUniform:()=>Gxe,TextureWrap:()=>pn,TileAvailability:()=>_m,TileBoundingRegion:()=>rd,TileBoundingS2Cell:()=>Z2,TileBoundingSphere:()=>Eg,TileBoundingVolume:()=>vxe,TileCoordinatesImageryProvider:()=>Dxe,TileDiscardPolicy:()=>Ixe,TileEdge:()=>_n,TileImagery:()=>jD,TileMapServiceImageryProvider:()=>zD,TileMetadata:()=>W2,TileOrientedBoundingBox:()=>af,TileProviderError:()=>Eo,TileReplacementQueue:()=>nz,TileSelectionResult:()=>Hn,TileState:()=>Oxe,Tileset3DTileContent:()=>C2,TilesetMetadata:()=>tB,TilesetPipelineStage:()=>jN,TilingScheme:()=>v0e,TimeConstants:()=>Vn,TimeDynamicImagery:()=>QE,TimeDynamicPointCloud:()=>RI,TimeInterval:()=>En,TimeIntervalCollection:()=>Br,TimeIntervalCollectionPositionProperty:()=>kg,TimeIntervalCollectionProperty:()=>Ug,TimeStandard:()=>zn,Tipsify:()=>fP,Tonemapper:()=>wy,Transforms:()=>Lt,TranslationRotationScale:()=>gb,TranslucentTileClassification:()=>oV,TridiagonalSystemSolver:()=>FA,TrustedServers:()=>iS,TweenCollection:()=>yw,UniformState:()=>iM,UniformType:()=>Ew,UrlTemplateImageryProvider:()=>qa,VRTheWorldTerrainProvider:()=>O0e,VaryingType:()=>jxe,Vector3DTileBatch:()=>qm,Vector3DTileClampedPolylines:()=>V2,Vector3DTileContent:()=>G2,Vector3DTileGeometry:()=>N_,Vector3DTilePoints:()=>F2,Vector3DTilePolygons:()=>B2,Vector3DTilePolylines:()=>yC,Vector3DTilePrimitive:()=>DT,VelocityOrientationProperty:()=>kB,VelocityVectorProperty:()=>nE,VertexArray:()=>Zn,VertexArrayFacade:()=>y_,VertexAttributeSemantic:()=>Tt,VertexFormat:()=>Ce,VerticalExaggeration:()=>Cr,VerticalExaggerationPipelineStage:()=>XF,VerticalOrigin:()=>Dn,VideoSynchronizer:()=>P0e,View:()=>hw,ViewportQuad:()=>Pxe,Visibility:()=>pr,Visualizer:()=>pme,VoxelBoxShape:()=>Qp,VoxelCell:()=>QV,VoxelContent:()=>b4,VoxelCylinderShape:()=>e_,VoxelEllipsoidShape:()=>Tw,VoxelPrimitive:()=>Z0,VoxelProvider:()=>Rxe,VoxelRenderResources:()=>mH,VoxelShape:()=>Mxe,VoxelShapeType:()=>Nc,VoxelTraversal:()=>SI,VulkanConstants:()=>R0e,WallGeometry:()=>_3,WallGeometryLibrary:()=>yE,WallGeometryUpdater:()=>y3,WallGraphics:()=>v_,WallOutlineGeometry:()=>g3,WebGLConstants:()=>Y,WebMapServiceImageryProvider:()=>OU,WebMapTileServiceImageryProvider:()=>PU,WebMercatorProjection:()=>Si,WebMercatorTilingScheme:()=>Qr,WindingOrder:()=>Gr,WireframeIndexGenerator:()=>HA,WireframePipelineStage:()=>KF,_shadersAcesTonemappingStage:()=>hV,_shadersAdditiveBlend:()=>KV,_shadersAdjustTranslucentFS:()=>lI,_shadersAllMaterialAppearanceFS:()=>fM,_shadersAllMaterialAppearanceVS:()=>dM,_shadersAmbientOcclusionGenerate:()=>mV,_shadersAmbientOcclusionModulate:()=>pV,_shadersAspectRampMaterial:()=>gM,_shadersAtmosphereCommon:()=>Eh,_shadersAtmosphereStageFS:()=>WN,_shadersAtmosphereStageVS:()=>qN,_shadersBasicMaterialAppearanceFS:()=>hM,_shadersBasicMaterialAppearanceVS:()=>mM,_shadersBillboardCollectionFS:()=>E2,_shadersBillboardCollectionVS:()=>w2,_shadersBlackAndWhite:()=>_V,_shadersBloomComposite:()=>gV,_shadersBrdfLutGeneratorFS:()=>yz,_shadersBrightPass:()=>$V,_shadersBrightness:()=>yV,_shadersBumpMapMaterial:()=>yM,_shadersCPUStylingStageFS:()=>yF,_shadersCPUStylingStageVS:()=>gF,_shadersCheckerboardMaterial:()=>bM,_shadersCloudCollectionFS:()=>qH,_shadersCloudCollectionVS:()=>YH,_shadersCloudNoiseFS:()=>XH,_shadersCloudNoiseVS:()=>KH,_shadersCompareAndPackTranslucentDepth:()=>iV,_shadersCompositeOITFS:()=>Jz,_shadersCompositeTranslucentClassification:()=>dw,_shadersComputeIrradianceFS:()=>nN,_shadersComputeRadianceMapFS:()=>iN,_shadersContrastBias:()=>bV,_shadersConvolveSpecularMapFS:()=>oN,_shadersConvolveSpecularMapVS:()=>rN,_shadersCustomShaderStageFS:()=>TF,_shadersCustomShaderStageVS:()=>xF,_shadersCzmBuiltins:()=>Wx,_shadersDepthOfField:()=>xV,_shadersDepthPlaneFS:()=>Lz,_shadersDepthPlaneVS:()=>Nz,_shadersDepthView:()=>TV,_shadersDepthViewPacked:()=>Hxe,_shadersDotMaterial:()=>xM,_shadersEdgeDetection:()=>CV,_shadersElevationBandMaterial:()=>TM,_shadersElevationContourMaterial:()=>CM,_shadersElevationRampMaterial:()=>EM,_shadersEllipsoidFS:()=>$D,_shadersEllipsoidSurfaceAppearanceFS:()=>w4,_shadersEllipsoidSurfaceAppearanceVS:()=>S4,_shadersEllipsoidVS:()=>ZD,_shadersFXAA:()=>SV,_shadersFXAA3_11:()=>PV,_shadersFadeMaterial:()=>wM,_shadersFeatureIdStageFS:()=>CF,_shadersFeatureIdStageVS:()=>EF,_shadersFilmicTonemapping:()=>EV,_shadersGaussianBlur1D:()=>z0,_shadersGeometryStageFS:()=>DF,_shadersGeometryStageVS:()=>IF,_shadersGlobeFS:()=>hU,_shadersGlobeVS:()=>mU,_shadersGridMaterial:()=>SM,_shadersGroundAtmosphere:()=>LD,_shadersHSBToRGB:()=>pR,_shadersHSLToRGB:()=>_R,_shadersImageBasedLightingStageFS:()=>XN,_shadersInstancingStageCommon:()=>sF,_shadersInstancingStageVS:()=>aF,_shadersIntersectBox:()=>sH,_shadersIntersectClippingPlanes:()=>rH,_shadersIntersectCylinder:()=>aH,_shadersIntersectDepth:()=>oH,_shadersIntersectEllipsoid:()=>cH,_shadersIntersectLongitude:()=>TI,_shadersIntersection:()=>xw,_shadersIntersectionUtils:()=>iH,_shadersLegacyInstancingStageVS:()=>cF,_shadersLensFlare:()=>AV,_shadersLightingStageFS:()=>PF,_shadersMaterialStageFS:()=>MF,_shadersMegatexture:()=>hH,_shadersMetadataStageFS:()=>wF,_shadersMetadataStageVS:()=>SF,_shadersModelClippingPlanesStageFS:()=>eF,_shadersModelClippingPolygonsStageFS:()=>iF,_shadersModelClippingPolygonsStageVS:()=>nF,_shadersModelColorStageFS:()=>QN,_shadersModelFS:()=>m2,_shadersModelSilhouetteStageFS:()=>e2,_shadersModelSilhouetteStageVS:()=>t2,_shadersModelSplitterStageFS:()=>o2,_shadersModelVS:()=>h2,_shadersModifiedReinhardTonemapping:()=>vV,_shadersMorphTargetsStageVS:()=>NF,_shadersNightVision:()=>DV,_shadersNormalMapMaterial:()=>AM,_shadersOctree:()=>dH,_shadersPassThrough:()=>du,_shadersPassThroughDepth:()=>B0,_shadersPbrNeutralTonemapping:()=>wV,_shadersPerInstanceColorAppearanceFS:()=>FM,_shadersPerInstanceColorAppearanceVS:()=>BM,_shadersPerInstanceFlatColorAppearanceFS:()=>eT,_shadersPerInstanceFlatColorAppearanceVS:()=>kM,_shadersPointCloudEyeDomeLighting:()=>SN,_shadersPointCloudStylingStageVS:()=>kF,_shadersPointPrimitiveCollectionFS:()=>o0,_shadersPointPrimitiveCollectionVS:()=>vB,_shadersPolygonSignedDistanceFS:()=>tN,_shadersPolylineArrowMaterial:()=>vM,_shadersPolylineColorAppearanceVS:()=>nL,_shadersPolylineCommon:()=>Fu,_shadersPolylineDashMaterial:()=>DM,_shadersPolylineFS:()=>cT,_shadersPolylineGlowMaterial:()=>IM,_shadersPolylineMaterialAppearanceVS:()=>iL,_shadersPolylineOutlineMaterial:()=>OM,_shadersPolylineShadowVolumeFS:()=>JM,_shadersPolylineShadowVolumeMorphFS:()=>QM,_shadersPolylineShadowVolumeMorphVS:()=>eL,_shadersPolylineShadowVolumeVS:()=>tL,_shadersPolylineVS:()=>P2,_shadersPrimitiveOutlineStageFS:()=>VF,_shadersPrimitiveOutlineStageVS:()=>zF,_shadersRGBToHSB:()=>gR,_shadersRGBToHSL:()=>yR,_shadersRGBToXYZ:()=>bR,_shadersReinhardTonemapping:()=>IV,_shadersReprojectWebMercatorFS:()=>NU,_shadersReprojectWebMercatorVS:()=>FU,_shadersRimLightingMaterial:()=>PM,_shadersSelectedFeatureIdStageCommon:()=>zA,_shadersShadowVolumeAppearanceFS:()=>OS,_shadersShadowVolumeAppearanceVS:()=>HM,_shadersShadowVolumeFS:()=>ub,_shadersSilhouette:()=>OV,_shadersSkinningStageVS:()=>WF,_shadersSkyAtmosphereCommon:()=>vI,_shadersSkyAtmosphereFS:()=>RH,_shadersSkyAtmosphereVS:()=>MH,_shadersSkyBoxFS:()=>NH,_shadersSkyBoxVS:()=>FH,_shadersSlopeRampMaterial:()=>RM,_shadersStripeMaterial:()=>MM,_shadersSunFS:()=>kH,_shadersSunTextureFS:()=>UH,_shadersSunVS:()=>zH,_shadersTexturedMaterialAppearanceFS:()=>pM,_shadersTexturedMaterialAppearanceVS:()=>_M,_shadersVector3DTileClampedPolylinesFS:()=>z2,_shadersVector3DTileClampedPolylinesVS:()=>U2,_shadersVector3DTilePolylinesVS:()=>k2,_shadersVectorTileVS:()=>nA,_shadersVerticalExaggerationStageVS:()=>YF,_shadersViewportQuadFS:()=>$H,_shadersViewportQuadVS:()=>Fx,_shadersVoxelFS:()=>tH,_shadersVoxelUtils:()=>eH,_shadersVoxelVS:()=>nH,_shadersWater:()=>NM,_shadersWaterMaskMaterial:()=>LM,_shadersXYZToRGB:()=>xR,_shadersacesTonemapping:()=>TR,_shadersalphaWeight:()=>CR,_shadersantialias:()=>ER,_shadersapplyHSBShift:()=>wR,_shadersapproximateSphericalCoordinates:()=>SR,_shadersapproximateTanh:()=>AR,_shadersbackFacing:()=>vR,_shadersbranchFreeTernary:()=>DR,_shaderscascadeColor:()=>IR,_shaderscascadeDistance:()=>OR,_shaderscascadeMatrix:()=>PR,_shaderscascadeWeights:()=>RR,_shadersclipPolygons:()=>MR,_shaderscolumbusViewMorph:()=>LR,_shaderscomputeAtmosphereColor:()=>NR,_shaderscomputeGroundAtmosphereScattering:()=>FR,_shaderscomputePosition:()=>BR,_shaderscomputeScattering:()=>kR,_shadersconvertUvToBox:()=>lH,_shadersconvertUvToCylinder:()=>uH,_shadersconvertUvToEllipsoid:()=>fH,_shaderscosineAndSine:()=>UR,_shadersdecompressTextureCoordinates:()=>zR,_shadersdegreesPerRadian:()=>EP,_shadersdepthClamp:()=>VR,_shadersdepthRange:()=>wP,_shadersdepthRangeStruct:()=>aR,_shaderseastNorthUpToEyeCoordinates:()=>HR,_shadersellipsoidContainsPoint:()=>GR,_shadersellipsoidTextureCoordinates:()=>jR,_shadersepsilon1:()=>SP,_shadersepsilon2:()=>AP,_shadersepsilon3:()=>vP,_shadersepsilon4:()=>DP,_shadersepsilon5:()=>IP,_shadersepsilon6:()=>OP,_shadersepsilon7:()=>PP,_shadersequalsEpsilon:()=>WR,_shaderseyeOffset:()=>qR,_shaderseyeToWindowCoordinates:()=>YR,_shadersfastApproximateAtan:()=>XR,_shadersfog:()=>KR,_shadersgammaCorrect:()=>$R,_shadersgeodeticSurfaceNormal:()=>ZR,_shadersgetDefaultMaterial:()=>JR,_shadersgetDynamicAtmosphereLightDirection:()=>QR,_shadersgetLambertDiffuse:()=>e1,_shadersgetSpecular:()=>t1,_shadersgetWaterNoise:()=>n1,_shadershue:()=>i1,_shadersinfinity:()=>RP,_shadersinverseGamma:()=>o1,_shadersisEmpty:()=>r1,_shadersisFull:()=>s1,_shaderslatitudeToWebMercatorFraction:()=>a1,_shaderslineDistance:()=>c1,_shaderslinearToSrgb:()=>l1,_shadersluminance:()=>u1,_shadersmaterial:()=>cR,_shadersmaterialInput:()=>lR,_shadersmaximumComponent:()=>f1,_shadersmetersPerPixel:()=>d1,_shadersmodelMaterial:()=>uR,_shadersmodelToWindowCoordinates:()=>h1,_shadersmodelVertexOutput:()=>fR,_shadersmultiplyWithColorBalance:()=>m1,_shadersnearFarScalar:()=>p1,_shadersoctDecode:()=>_1,_shadersoneOverPi:()=>MP,_shadersoneOverTwoPi:()=>LP,_shaderspackDepth:()=>g1,_shaderspassCesium3DTile:()=>NP,_shaderspassCesium3DTileClassification:()=>FP,_shaderspassCesium3DTileClassificationIgnoreShow:()=>BP,_shaderspassClassification:()=>kP,_shaderspassCompute:()=>UP,_shaderspassEnvironment:()=>zP,_shaderspassGlobe:()=>VP,_shaderspassOpaque:()=>HP,_shaderspassOverlay:()=>GP,_shaderspassTerrainClassification:()=>jP,_shaderspassTranslucent:()=>WP,_shaderspassVoxels:()=>qP,_shaderspbrLighting:()=>y1,_shaderspbrNeutralTonemapping:()=>b1,_shadersphong:()=>x1,_shaderspi:()=>YP,_shaderspiOverFour:()=>XP,_shaderspiOverSix:()=>KP,_shaderspiOverThree:()=>$P,_shaderspiOverTwo:()=>ZP,_shadersplaneDistance:()=>T1,_shaderspointAlongRay:()=>C1,_shadersradiansPerDegree:()=>JP,_shadersray:()=>dR,_shadersrayEllipsoidIntersectionInterval:()=>E1,_shadersraySegment:()=>hR,_shadersraySphereIntersectionInterval:()=>w1,_shadersreadDepth:()=>S1,_shadersreadNonPerspective:()=>A1,_shadersreverseLogDepth:()=>v1,_shadersround:()=>D1,_shaderssaturation:()=>I1,_shaderssceneMode2D:()=>QP,_shaderssceneMode3D:()=>eR,_shaderssceneModeColumbusView:()=>tR,_shaderssceneModeMorphing:()=>nR,_shadersshadowDepthCompare:()=>O1,_shadersshadowParameters:()=>mR,_shadersshadowVisibility:()=>P1,_shaderssignNotZero:()=>R1,_shaderssolarRadius:()=>iR,_shaderssphericalHarmonics:()=>M1,_shaderssrgbToLinear:()=>L1,_shaderstangentToEyeSpaceMatrix:()=>N1,_shaderstextureCube:()=>F1,_shadersthreePiOver2:()=>oR,_shaderstransformPlane:()=>B1,_shaderstranslateRelativeToEye:()=>k1,_shaderstranslucentPhong:()=>U1,_shaderstranspose:()=>z1,_shaderstwoPi:()=>rR,_shadersunpackClippingExtents:()=>V1,_shadersunpackDepth:()=>H1,_shadersunpackFloat:()=>G1,_shadersunpackUint:()=>j1,_shadersvalueTransform:()=>W1,_shadersvertexLogDepth:()=>q1,_shaderswebMercatorMaxLatitude:()=>sR,_shaderswindowToEyeCoordinates:()=>Y1,_shaderswriteDepthClamp:()=>X1,_shaderswriteLogDepth:()=>K1,_shaderswriteNonPerspective:()=>$1,addBuffer:()=>ML,addDefaults:()=>EL,addExtensionsRequired:()=>OL,addExtensionsUsed:()=>Yf,addPipelineExtras:()=>Ab,addToArray:()=>Es,appendForwardSlash:()=>OO,arrayRemoveDuplicates:()=>po,barycentricCoordinates:()=>Ux,binarySearch:()=>Xo,buildModuleUrl:()=>Mi,buildVoxelDrawCommands:()=>gH,clone:()=>ze,combine:()=>bt,computeFlyToLocationForRectangle:()=>sU,createBillboardPointCallback:()=>hC,createElevationBandMaterial:()=>Bxe,createGooglePhotorealistic3DTileset:()=>Uxe,createGuid:()=>Bn,createMaterialPropertyDescriptor:()=>Ao,createOsmBuildingsAsync:()=>zxe,createPropertyDescriptor:()=>oe,createRawPropertyDescriptor:()=>Ml,createTangentSpaceDebugPrimitive:()=>Vxe,createTaskProcessorWorker:()=>qxe,createUniform:()=>eP,createUniformArray:()=>tP,createWorldBathymetryAsync:()=>d4,createWorldImageryAsync:()=>LU,createWorldTerrainAsync:()=>h4,decodeGoogleEarthEnterpriseData:()=>m4,decodeVectorPolylinePositions:()=>H2,defaultValue:()=>g,defer:()=>Al,defined:()=>c,demodernizeShader:()=>Z1,deprecationWarning:()=>os,destroyObject:()=>ue,exportKml:()=>Sme,findAccessorMinMax:()=>MT,findContentMetadata:()=>xC,findGroupMetadata:()=>TC,findTileMetadata:()=>q2,forEachTextureInMaterial:()=>fA,formatError:()=>Hp,freezeRenderState:()=>JO,getAbsoluteUri:()=>Dm,getAccessorByteStride:()=>Ul,getBaseUri:()=>PO,getBinaryAccessor:()=>Vu,getClipAndStyleCode:()=>HH,getClippingFunction:()=>my,getComponentReader:()=>W_,getElement:()=>em,getExtensionFromUri:()=>Ax,getFilenameFromUri:()=>Mg,getImageFromTypedArray:()=>EH,getImagePixels:()=>Yd,getJsonFromTypedArray:()=>Do,getMagic:()=>_h,getMetadataClassProperty:()=>vH,getStringFromTypedArray:()=>Fl,getTimestamp:()=>yi,hasExtension:()=>ei,heightReferenceOnEntityPropertyChanged:()=>D_,isBitSet:()=>Fc,isBlobUri:()=>vx,isCrossOriginUrl:()=>qy,isDataUri:()=>c_,isLeapYear:()=>qd,loadAndExecuteScript:()=>Dx,loadCubeMap:()=>cM,loadImageFromTypedArray:()=>PT,loadKTX2:()=>vl,mergeSort:()=>gy,moveTechniqueRenderStates:()=>IL,moveTechniquesToExtension:()=>PL,numberOfComponentsForType:()=>Gu,objectToQuery:()=>Ix,oneTimeWarning:()=>mt,parseBatchTable:()=>ag,parseFeatureMetadataLegacy:()=>lN,parseGlb:()=>AL,parseResponseHeaders:()=>MO,parseStructuralMetadata:()=>cN,pickModel:()=>WA,pointInsideTriangle:()=>M0e,preprocess3DTileContent:()=>xp,processVoxelProperties:()=>_H,queryToObject:()=>Au,readAccessorPacked:()=>LL,removeExtension:()=>LT,removeExtensionsRequired:()=>SL,removeExtensionsUsed:()=>RT,removePipelineExtras:()=>DL,removeUnusedElements:()=>RL,resizeImageToNextPowerOfTwo:()=>Db,sampleTerrain:()=>oU,sampleTerrainMostDetailed:()=>rU,scaleToGeodeticSurface:()=>Cx,srgbToLinear:()=>Vw,subdivideArray:()=>GM,updateAccessorComponentTypes:()=>FL,updateVersion:()=>kL,usesExtension:()=>lr,webGLConstantToGlslType:()=>L0e,wrapFunction:()=>N0e,writeTextToCanvas:()=>pC});function fTe(e){return e!=null}var c=fTe;function Gy(e){this.name="DeveloperError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}c(Object.create)&&(Gy.prototype=Object.create(Error.prototype),Gy.prototype.constructor=Gy);Gy.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return c(this.stack)&&(e+=`
| ${this.stack.toString()}`),e};Gy.throwInstantiationError=function(){throw new Gy("This function defines an interface and should not be called directly.")};var w=Gy;var ns={};ns.typeOf={};function dTe(e){return`${e} is required, actual value was undefined`}function gx(e,t,n){return`Expected ${n} to be typeof ${t}, actual typeof was ${e}`}ns.defined=function(e,t){if(!c(t))throw new w(dTe(e))};ns.typeOf.func=function(e,t){if(typeof t!="function")throw new w(gx(typeof t,"function",e))};ns.typeOf.string=function(e,t){if(typeof t!="string")throw new w(gx(typeof t,"string",e))};ns.typeOf.number=function(e,t){if(typeof t!="number")throw new w(gx(typeof t,"number",e))};ns.typeOf.number.lessThan=function(e,t,n){if(ns.typeOf.number(e,t),t>=n)throw new w(`Expected ${e} to be less than ${n}, actual value was ${t}`)};ns.typeOf.number.lessThanOrEquals=function(e,t,n){if(ns.typeOf.number(e,t),t>n)throw new w(`Expected ${e} to be less than or equal to ${n}, actual value was ${t}`)};ns.typeOf.number.greaterThan=function(e,t,n){if(ns.typeOf.number(e,t),t<=n)throw new w(`Expected ${e} to be greater than ${n}, actual value was ${t}`)};ns.typeOf.number.greaterThanOrEquals=function(e,t,n){if(ns.typeOf.number(e,t),t<n)throw new w(`Expected ${e} to be greater than or equal to ${n}, actual value was ${t}`)};ns.typeOf.object=function(e,t){if(typeof t!="object")throw new w(gx(typeof t,"object",e))};ns.typeOf.bool=function(e,t){if(typeof t!="boolean")throw new w(gx(typeof t,"boolean",e))};ns.typeOf.bigint=function(e,t){if(typeof t!="bigint")throw new w(gx(typeof t,"bigint",e))};ns.typeOf.number.equals=function(e,t,n,i){if(ns.typeOf.number(e,n),ns.typeOf.number(t,i),n!==i)throw new w(`${e} must be equal to ${t}, the actual values are ${n} and ${i}`)};var C=ns;function ZX(e,t){return e!=null?e:t}ZX.EMPTY_OBJECT=Object.freeze({});var g=ZX;var Z4=Mr(oO(),1);var nt={};nt.EPSILON1=.1;nt.EPSILON2=.01;nt.EPSILON3=.001;nt.EPSILON4=1e-4;nt.EPSILON5=1e-5;nt.EPSILON6=1e-6;nt.EPSILON7=1e-7;nt.EPSILON8=1e-8;nt.EPSILON9=1e-9;nt.EPSILON10=1e-10;nt.EPSILON11=1e-11;nt.EPSILON12=1e-12;nt.EPSILON13=1e-13;nt.EPSILON14=1e-14;nt.EPSILON15=1e-15;nt.EPSILON16=1e-16;nt.EPSILON17=1e-17;nt.EPSILON18=1e-18;nt.EPSILON19=1e-19;nt.EPSILON20=1e-20;nt.EPSILON21=1e-21;nt.GRAVITATIONALPARAMETER=3986004418e5;nt.SOLAR_RADIUS=6955e5;nt.LUNAR_RADIUS=1737400;nt.SIXTY_FOUR_KILOBYTES=64*1024;nt.FOUR_GIGABYTES=4*1024*1024*1024;nt.sign=g(Math.sign,function(t){return t=+t,t===0||t!==t?t:t>0?1:-1});nt.signNotZero=function(e){return e<0?-1:1};nt.toSNorm=function(e,t){return t=g(t,255),Math.round((nt.clamp(e,-1,1)*.5+.5)*t)};nt.fromSNorm=function(e,t){return t=g(t,255),nt.clamp(e,0,t)/t*2-1};nt.normalize=function(e,t,n){return n=Math.max(n-t,0),n===0?0:nt.clamp((e-t)/n,0,1)};nt.sinh=g(Math.sinh,function(t){return(Math.exp(t)-Math.exp(-t))/2});nt.cosh=g(Math.cosh,function(t){return(Math.exp(t)+Math.exp(-t))/2});nt.lerp=function(e,t,n){return(1-n)*e+n*t};nt.PI=Math.PI;nt.ONE_OVER_PI=1/Math.PI;nt.PI_OVER_TWO=Math.PI/2;nt.PI_OVER_THREE=Math.PI/3;nt.PI_OVER_FOUR=Math.PI/4;nt.PI_OVER_SIX=Math.PI/6;nt.THREE_PI_OVER_TWO=3*Math.PI/2;nt.TWO_PI=2*Math.PI;nt.ONE_OVER_TWO_PI=1/(2*Math.PI);nt.RADIANS_PER_DEGREE=Math.PI/180;nt.DEGREES_PER_RADIAN=180/Math.PI;nt.RADIANS_PER_ARCSECOND=nt.RADIANS_PER_DEGREE/3600;nt.toRadians=function(e){if(!c(e))throw new w("degrees is required.");return e*nt.RADIANS_PER_DEGREE};nt.toDegrees=function(e){if(!c(e))throw new w("radians is required.");return e*nt.DEGREES_PER_RADIAN};nt.convertLongitudeRange=function(e){if(!c(e))throw new w("angle is required.");let t=nt.TWO_PI,n=e-Math.floor(e/t)*t;return n<-Math.PI?n+t:n>=Math.PI?n-t:n};nt.clampToLatitudeRange=function(e){if(!c(e))throw new w("angle is required.");return nt.clamp(e,-1*nt.PI_OVER_TWO,nt.PI_OVER_TWO)};nt.negativePiToPi=function(e){if(!c(e))throw new w("angle is required.");return e>=-nt.PI&&e<=nt.PI?e:nt.zeroToTwoPi(e+nt.PI)-nt.PI};nt.zeroToTwoPi=function(e){if(!c(e))throw new w("angle is required.");if(e>=0&&e<=nt.TWO_PI)return e;let t=nt.mod(e,nt.TWO_PI);return Math.abs(t)<nt.EPSILON14&&Math.abs(e)>nt.EPSILON14?nt.TWO_PI:t};nt.mod=function(e,t){if(!c(e))throw new w("m is required.");if(!c(t))throw new w("n is required.");if(t===0)throw new w("divisor cannot be 0.");return nt.sign(e)===nt.sign(t)&&Math.abs(e)<Math.abs(t)?e:(e%t+t)%t};nt.equalsEpsilon=function(e,t,n,i){if(!c(e))throw new w("left is required.");if(!c(t))throw new w("right is required.");n=g(n,0),i=g(i,n);let o=Math.abs(e-t);return o<=i||o<=n*Math.max(Math.abs(e),Math.abs(t))};nt.lessThan=function(e,t,n){if(!c(e))throw new w("first is required.");if(!c(t))throw new w("second is required.");if(!c(n))throw new w("absoluteEpsilon is required.");return e-t<-n};nt.lessThanOrEquals=function(e,t,n){if(!c(e))throw new w("first is required.");if(!c(t))throw new w("second is required.");if(!c(n))throw new w("absoluteEpsilon is required.");return e-t<n};nt.greaterThan=function(e,t,n){if(!c(e))throw new w("first is required.");if(!c(t))throw new w("second is required.");if(!c(n))throw new w("absoluteEpsilon is required.");return e-t>n};nt.greaterThanOrEquals=function(e,t,n){if(!c(e))throw new w("first is required.");if(!c(t))throw new w("second is required.");if(!c(n))throw new w("absoluteEpsilon is required.");return e-t>-n};var rO=[1];nt.factorial=function(e){if(typeof e!="number"||e<0)throw new w("A number greater than or equal to 0 is required.");let t=rO.length;if(e>=t){let n=rO[t-1];for(let i=t;i<=e;i++){let o=n*i;rO.push(o),n=o}}return rO[e]};nt.incrementWrap=function(e,t,n){if(n=g(n,0),!c(e))throw new w("n is required.");if(t<=n)throw new w("maximumValue must be greater than minimumValue.");return++e,e>t&&(e=n),e};nt.isPowerOfTwo=function(e){if(typeof e!="number"||e<0||e>4294967295)throw new w("A number between 0 and (2^32)-1 is required.");return e!==0&&(e&e-1)===0};nt.nextPowerOfTwo=function(e){if(typeof e!="number"||e<0||e>2147483648)throw new w("A number between 0 and 2^31 is required.");return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e,e};nt.previousPowerOfTwo=function(e){if(typeof e!="number"||e<0||e>4294967295)throw new w("A number between 0 and (2^32)-1 is required.");return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e|=e>>32,e=(e>>>0)-(e>>>1),e};nt.clamp=function(e,t,n){return C.typeOf.number("value",e),C.typeOf.number("min",t),C.typeOf.number("max",n),e<t?t:e>n?n:e};var QX=new Z4.default;nt.setRandomNumberSeed=function(e){if(!c(e))throw new w("seed is required.");QX=new Z4.default(e)};nt.nextRandomNumber=function(){return QX.random()};nt.randomBetween=function(e,t){return nt.nextRandomNumber()*(t-e)+e};nt.acosClamped=function(e){if(!c(e))throw new w("value is required.");return Math.acos(nt.clamp(e,-1,1))};nt.asinClamped=function(e){if(!c(e))throw new w("value is required.");return Math.asin(nt.clamp(e,-1,1))};nt.chordLength=function(e,t){if(!c(e))throw new w("angle is required.");if(!c(t))throw new w("radius is required.");return 2*t*Math.sin(e*.5)};nt.logBase=function(e,t){if(!c(e))throw new w("number is required.");if(!c(t))throw new w("base is required.");return Math.log(e)/Math.log(t)};nt.cbrt=g(Math.cbrt,function(t){let n=Math.pow(Math.abs(t),.3333333333333333);return t<0?-n:n});nt.log2=g(Math.log2,function(t){return Math.log(t)*Math.LOG2E});nt.fog=function(e,t){let n=e*t;return 1-Math.exp(-(n*n))};nt.fastApproximateAtan=function(e){return C.typeOf.number("x",e),e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)};nt.fastApproximateAtan2=function(e,t){C.typeOf.number("x",e),C.typeOf.number("y",t);let n,i=Math.abs(e);n=Math.abs(t);let o=Math.max(i,n);n=Math.min(i,n);let r=n/o;if(isNaN(r))throw new w("either x or y must be nonzero");return i=nt.fastApproximateAtan(r),i=Math.abs(t)>Math.abs(e)?nt.PI_OVER_TWO-i:i,i=e<0?nt.PI-i:i,i=t<0?-i:i,i};var O=nt;function Xe(e,t,n){this.x=g(e,0),this.y=g(t,0),this.z=g(n,0)}Xe.fromSpherical=function(e,t){C.typeOf.object("spherical",e),c(t)||(t=new Xe);let n=e.clock,i=e.cone,o=g(e.magnitude,1),r=o*Math.sin(i);return t.x=r*Math.cos(n),t.y=r*Math.sin(n),t.z=o*Math.cos(i),t};Xe.fromElements=function(e,t,n,i){return c(i)?(i.x=e,i.y=t,i.z=n,i):new Xe(e,t,n)};Xe.clone=function(e,t){if(c(e))return c(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new Xe(e.x,e.y,e.z)};Xe.fromCartesian4=Xe.clone;Xe.packedLength=3;Xe.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),t[n++]=e.x,t[n++]=e.y,t[n]=e.z,t};Xe.unpack=function(e,t,n){return C.defined("array",e),t=g(t,0),c(n)||(n=new Xe),n.x=e[t++],n.y=e[t++],n.z=e[t],n};Xe.packArray=function(e,t){C.defined("array",e);let n=e.length,i=n*3;if(!c(t))t=new Array(i);else{if(!Array.isArray(t)&&t.length!==i)throw new w("If result is a typed array, it must have exactly array.length * 3 elements");t.length!==i&&(t.length=i)}for(let o=0;o<n;++o)Xe.pack(e[o],t,o*3);return t};Xe.unpackArray=function(e,t){if(C.defined("array",e),C.typeOf.number.greaterThanOrEquals("array.length",e.length,3),e.length%3!==0)throw new w("array length must be a multiple of 3.");let n=e.length;c(t)?t.length=n/3:t=new Array(n/3);for(let i=0;i<n;i+=3){let o=i/3;t[o]=Xe.unpack(e,i,t[o])}return t};Xe.fromArray=Xe.unpack;Xe.maximumComponent=function(e){return C.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z)};Xe.minimumComponent=function(e){return C.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z)};Xe.minimumByComponent=function(e,t,n){return C.typeOf.object("first",e),C.typeOf.object("second",t),C.typeOf.object("result",n),n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n.z=Math.min(e.z,t.z),n};Xe.maximumByComponent=function(e,t,n){return C.typeOf.object("first",e),C.typeOf.object("second",t),C.typeOf.object("result",n),n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n.z=Math.max(e.z,t.z),n};Xe.clamp=function(e,t,n,i){C.typeOf.object("value",e),C.typeOf.object("min",t),C.typeOf.object("max",n),C.typeOf.object("result",i);let o=O.clamp(e.x,t.x,n.x),r=O.clamp(e.y,t.y,n.y),s=O.clamp(e.z,t.z,n.z);return i.x=o,i.y=r,i.z=s,i};Xe.magnitudeSquared=function(e){return C.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z};Xe.magnitude=function(e){return Math.sqrt(Xe.magnitudeSquared(e))};var aO=new Xe;Xe.distance=function(e,t){return C.typeOf.object("left",e),C.typeOf.object("right",t),Xe.subtract(e,t,aO),Xe.magnitude(aO)};Xe.distanceSquared=function(e,t){return C.typeOf.object("left",e),C.typeOf.object("right",t),Xe.subtract(e,t,aO),Xe.magnitudeSquared(aO)};Xe.normalize=function(e,t){C.typeOf.object("cartesian",e),C.typeOf.object("result",t);let n=Xe.magnitude(e);if(t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,isNaN(t.x)||isNaN(t.y)||isNaN(t.z))throw new w("normalized result is not a number");return t};Xe.dot=function(e,t){return C.typeOf.object("left",e),C.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z};Xe.multiplyComponents=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.x=e.x*t.x,n.y=e.y*t.y,n.z=e.z*t.z,n};Xe.divideComponents=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.x=e.x/t.x,n.y=e.y/t.y,n.z=e.z/t.z,n};Xe.add=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n};Xe.subtract=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n};Xe.multiplyByScalar=function(e,t,n){return C.typeOf.object("cartesian",e),C.typeOf.number("scalar",t),C.typeOf.object("result",n),n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n};Xe.divideByScalar=function(e,t,n){return C.typeOf.object("cartesian",e),C.typeOf.number("scalar",t),C.typeOf.object("result",n),n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n};Xe.negate=function(e,t){return C.typeOf.object("cartesian",e),C.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t};Xe.abs=function(e,t){return C.typeOf.object("cartesian",e),C.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};var eK=new Xe;Xe.lerp=function(e,t,n,i){return C.typeOf.object("start",e),C.typeOf.object("end",t),C.typeOf.number("t",n),C.typeOf.object("result",i),Xe.multiplyByScalar(t,n,eK),i=Xe.multiplyByScalar(e,1-n,i),Xe.add(eK,i,i)};var sO=new Xe,J4=new Xe;Xe.angleBetween=function(e,t){C.typeOf.object("left",e),C.typeOf.object("right",t),Xe.normalize(e,sO),Xe.normalize(t,J4);let n=Xe.dot(sO,J4),i=Xe.magnitude(Xe.cross(sO,J4,sO));return Math.atan2(i,n)};var hTe=new Xe;Xe.mostOrthogonalAxis=function(e,t){C.typeOf.object("cartesian",e),C.typeOf.object("result",t);let n=Xe.normalize(e,hTe);return Xe.abs(n,n),n.x<=n.y?n.x<=n.z?t=Xe.clone(Xe.UNIT_X,t):t=Xe.clone(Xe.UNIT_Z,t):n.y<=n.z?t=Xe.clone(Xe.UNIT_Y,t):t=Xe.clone(Xe.UNIT_Z,t),t};Xe.projectVector=function(e,t,n){C.defined("a",e),C.defined("b",t),C.defined("result",n);let i=Xe.dot(e,t)/Xe.dot(t,t);return Xe.multiplyByScalar(t,i,n)};Xe.equals=function(e,t){return e===t||c(e)&&c(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z};Xe.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]&&e.z===t[n+2]};Xe.equalsEpsilon=function(e,t,n,i){return e===t||c(e)&&c(t)&&O.equalsEpsilon(e.x,t.x,n,i)&&O.equalsEpsilon(e.y,t.y,n,i)&&O.equalsEpsilon(e.z,t.z,n,i)};Xe.cross=function(e,t,n){C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n);let i=e.x,o=e.y,r=e.z,s=t.x,a=t.y,l=t.z,u=o*l-r*a,f=r*s-i*l,h=i*a-o*s;return n.x=u,n.y=f,n.z=h,n};Xe.midpoint=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.x=(e.x+t.x)*.5,n.y=(e.y+t.y)*.5,n.z=(e.z+t.z)*.5,n};Xe.fromDegrees=function(e,t,n,i,o){return C.typeOf.number("longitude",e),C.typeOf.number("latitude",t),e=O.toRadians(e),t=O.toRadians(t),Xe.fromRadians(e,t,n,i,o)};var Eu=new Xe,yx=new Xe;Xe._ellipsoidRadiiSquared=new Xe(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);Xe.fromRadians=function(e,t,n,i,o){C.typeOf.number("longitude",e),C.typeOf.number("latitude",t),n=g(n,0);let r=c(i)?i.radiiSquared:Xe._ellipsoidRadiiSquared,s=Math.cos(t);Eu.x=s*Math.cos(e),Eu.y=s*Math.sin(e),Eu.z=Math.sin(t),Eu=Xe.normalize(Eu,Eu),Xe.multiplyComponents(r,Eu,yx);let a=Math.sqrt(Xe.dot(Eu,yx));return yx=Xe.divideByScalar(yx,a,yx),Eu=Xe.multiplyByScalar(Eu,n,Eu),c(o)||(o=new Xe),Xe.add(yx,Eu,o)};Xe.fromDegreesArray=function(e,t,n){if(C.defined("coordinates",e),e.length<2||e.length%2!==0)throw new w("the number of coordinates must be a multiple of 2 and at least 2");let i=e.length;c(n)?n.length=i/2:n=new Array(i/2);for(let o=0;o<i;o+=2){let r=e[o],s=e[o+1],a=o/2;n[a]=Xe.fromDegrees(r,s,0,t,n[a])}return n};Xe.fromRadiansArray=function(e,t,n){if(C.defined("coordinates",e),e.length<2||e.length%2!==0)throw new w("the number of coordinates must be a multiple of 2 and at least 2");let i=e.length;c(n)?n.length=i/2:n=new Array(i/2);for(let o=0;o<i;o+=2){let r=e[o],s=e[o+1],a=o/2;n[a]=Xe.fromRadians(r,s,0,t,n[a])}return n};Xe.fromDegreesArrayHeights=function(e,t,n){if(C.defined("coordinates",e),e.length<3||e.length%3!==0)throw new w("the number of coordinates must be a multiple of 3 and at least 3");let i=e.length;c(n)?n.length=i/3:n=new Array(i/3);for(let o=0;o<i;o+=3){let r=e[o],s=e[o+1],a=e[o+2],l=o/3;n[l]=Xe.fromDegrees(r,s,a,t,n[l])}return n};Xe.fromRadiansArrayHeights=function(e,t,n){if(C.defined("coordinates",e),e.length<3||e.length%3!==0)throw new w("the number of coordinates must be a multiple of 3 and at least 3");let i=e.length;c(n)?n.length=i/3:n=new Array(i/3);for(let o=0;o<i;o+=3){let r=e[o],s=e[o+1],a=e[o+2],l=o/3;n[l]=Xe.fromRadians(r,s,a,t,n[l])}return n};Xe.ZERO=Object.freeze(new Xe(0,0,0));Xe.ONE=Object.freeze(new Xe(1,1,1));Xe.UNIT_X=Object.freeze(new Xe(1,0,0));Xe.UNIT_Y=Object.freeze(new Xe(0,1,0));Xe.UNIT_Z=Object.freeze(new Xe(0,0,1));Xe.prototype.clone=function(e){return Xe.clone(this,e)};Xe.prototype.equals=function(e){return Xe.equals(this,e)};Xe.prototype.equalsEpsilon=function(e,t,n){return Xe.equalsEpsilon(this,e,t,n)};Xe.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};var d=Xe;function gt(e,t,n,i){this.x=g(e,0),this.y=g(t,0),this.z=g(n,0),this.w=g(i,0)}gt.fromElements=function(e,t,n,i,o){return c(o)?(o.x=e,o.y=t,o.z=n,o.w=i,o):new gt(e,t,n,i)};gt.fromColor=function(e,t){return C.typeOf.object("color",e),c(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new gt(e.red,e.green,e.blue,e.alpha)};gt.clone=function(e,t){if(c(e))return c(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new gt(e.x,e.y,e.z,e.w)};gt.packedLength=4;gt.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t};gt.unpack=function(e,t,n){return C.defined("array",e),t=g(t,0),c(n)||(n=new gt),n.x=e[t++],n.y=e[t++],n.z=e[t++],n.w=e[t],n};gt.packArray=function(e,t){C.defined("array",e);let n=e.length,i=n*4;if(!c(t))t=new Array(i);else{if(!Array.isArray(t)&&t.length!==i)throw new w("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==i&&(t.length=i)}for(let o=0;o<n;++o)gt.pack(e[o],t,o*4);return t};gt.unpackArray=function(e,t){if(C.defined("array",e),C.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!==0)throw new w("array length must be a multiple of 4.");let n=e.length;c(t)?t.length=n/4:t=new Array(n/4);for(let i=0;i<n;i+=4){let o=i/4;t[o]=gt.unpack(e,i,t[o])}return t};gt.fromArray=gt.unpack;gt.maximumComponent=function(e){return C.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z,e.w)};gt.minimumComponent=function(e){return C.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z,e.w)};gt.minimumByComponent=function(e,t,n){return C.typeOf.object("first",e),C.typeOf.object("second",t),C.typeOf.object("result",n),n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n.z=Math.min(e.z,t.z),n.w=Math.min(e.w,t.w),n};gt.maximumByComponent=function(e,t,n){return C.typeOf.object("first",e),C.typeOf.object("second",t),C.typeOf.object("result",n),n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n.z=Math.max(e.z,t.z),n.w=Math.max(e.w,t.w),n};gt.clamp=function(e,t,n,i){C.typeOf.object("value",e),C.typeOf.object("min",t),C.typeOf.object("max",n),C.typeOf.object("result",i);let o=O.clamp(e.x,t.x,n.x),r=O.clamp(e.y,t.y,n.y),s=O.clamp(e.z,t.z,n.z),a=O.clamp(e.w,t.w,n.w);return i.x=o,i.y=r,i.z=s,i.w=a,i};gt.magnitudeSquared=function(e){return C.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};gt.magnitude=function(e){return Math.sqrt(gt.magnitudeSquared(e))};var cO=new gt;gt.distance=function(e,t){return C.typeOf.object("left",e),C.typeOf.object("right",t),gt.subtract(e,t,cO),gt.magnitude(cO)};gt.distanceSquared=function(e,t){return C.typeOf.object("left",e),C.typeOf.object("right",t),gt.subtract(e,t,cO),gt.magnitudeSquared(cO)};gt.normalize=function(e,t){C.typeOf.object("cartesian",e),C.typeOf.object("result",t);let n=gt.magnitude(e);if(t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t.w=e.w/n,isNaN(t.x)||isNaN(t.y)||isNaN(t.z)||isNaN(t.w))throw new w("normalized result is not a number");return t};gt.dot=function(e,t){return C.typeOf.object("left",e),C.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w};gt.multiplyComponents=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.x=e.x*t.x,n.y=e.y*t.y,n.z=e.z*t.z,n.w=e.w*t.w,n};gt.divideComponents=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.x=e.x/t.x,n.y=e.y/t.y,n.z=e.z/t.z,n.w=e.w/t.w,n};gt.add=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n.w=e.w+t.w,n};gt.subtract=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n.w=e.w-t.w,n};gt.multiplyByScalar=function(e,t,n){return C.typeOf.object("cartesian",e),C.typeOf.number("scalar",t),C.typeOf.object("result",n),n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n};gt.divideByScalar=function(e,t,n){return C.typeOf.object("cartesian",e),C.typeOf.number("scalar",t),C.typeOf.object("result",n),n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n};gt.negate=function(e,t){return C.typeOf.object("cartesian",e),C.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t};gt.abs=function(e,t){return C.typeOf.object("cartesian",e),C.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t.w=Math.abs(e.w),t};var tK=new gt;gt.lerp=function(e,t,n,i){return C.typeOf.object("start",e),C.typeOf.object("end",t),C.typeOf.number("t",n),C.typeOf.object("result",i),gt.multiplyByScalar(t,n,tK),i=gt.multiplyByScalar(e,1-n,i),gt.add(tK,i,i)};var mTe=new gt;gt.mostOrthogonalAxis=function(e,t){C.typeOf.object("cartesian",e),C.typeOf.object("result",t);let n=gt.normalize(e,mTe);return gt.abs(n,n),n.x<=n.y?n.x<=n.z?n.x<=n.w?t=gt.clone(gt.UNIT_X,t):t=gt.clone(gt.UNIT_W,t):n.z<=n.w?t=gt.clone(gt.UNIT_Z,t):t=gt.clone(gt.UNIT_W,t):n.y<=n.z?n.y<=n.w?t=gt.clone(gt.UNIT_Y,t):t=gt.clone(gt.UNIT_W,t):n.z<=n.w?t=gt.clone(gt.UNIT_Z,t):t=gt.clone(gt.UNIT_W,t),t};gt.equals=function(e,t){return e===t||c(e)&&c(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w};gt.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]&&e.z===t[n+2]&&e.w===t[n+3]};gt.equalsEpsilon=function(e,t,n,i){return e===t||c(e)&&c(t)&&O.equalsEpsilon(e.x,t.x,n,i)&&O.equalsEpsilon(e.y,t.y,n,i)&&O.equalsEpsilon(e.z,t.z,n,i)&&O.equalsEpsilon(e.w,t.w,n,i)};gt.ZERO=Object.freeze(new gt(0,0,0,0));gt.ONE=Object.freeze(new gt(1,1,1,1));gt.UNIT_X=Object.freeze(new gt(1,0,0,0));gt.UNIT_Y=Object.freeze(new gt(0,1,0,0));gt.UNIT_Z=Object.freeze(new gt(0,0,1,0));gt.UNIT_W=Object.freeze(new gt(0,0,0,1));gt.prototype.clone=function(e){return gt.clone(this,e)};gt.prototype.equals=function(e){return gt.equals(this,e)};gt.prototype.equalsEpsilon=function(e,t,n){return gt.equalsEpsilon(this,e,t,n)};gt.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var Q4=new Float32Array(1),Ca=new Uint8Array(Q4.buffer),pTe=new Uint32Array([287454020]),_Te=new Uint8Array(pTe.buffer),nK=_Te[0]===68;gt.packFloat=function(e,t){return C.typeOf.number("value",e),c(t)||(t=new gt),Q4[0]=e,nK?(t.x=Ca[0],t.y=Ca[1],t.z=Ca[2],t.w=Ca[3]):(t.x=Ca[3],t.y=Ca[2],t.z=Ca[1],t.w=Ca[0]),t};gt.unpackFloat=function(e){return C.typeOf.object("packedFloat",e),nK?(Ca[0]=e.x,Ca[1]=e.y,Ca[2]=e.z,Ca[3]=e.w):(Ca[0]=e.w,Ca[1]=e.z,Ca[2]=e.y,Ca[3]=e.x),Q4[0]};var ee=gt;function Ze(e,t,n,i,o,r,s,a,l){this[0]=g(e,0),this[1]=g(i,0),this[2]=g(s,0),this[3]=g(t,0),this[4]=g(o,0),this[5]=g(a,0),this[6]=g(n,0),this[7]=g(r,0),this[8]=g(l,0)}Ze.packedLength=9;Ze.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t};Ze.unpack=function(e,t,n){return C.defined("array",e),t=g(t,0),c(n)||(n=new Ze),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n[4]=e[t++],n[5]=e[t++],n[6]=e[t++],n[7]=e[t++],n[8]=e[t++],n};Ze.packArray=function(e,t){C.defined("array",e);let n=e.length,i=n*9;if(!c(t))t=new Array(i);else{if(!Array.isArray(t)&&t.length!==i)throw new w("If result is a typed array, it must have exactly array.length * 9 elements");t.length!==i&&(t.length=i)}for(let o=0;o<n;++o)Ze.pack(e[o],t,o*9);return t};Ze.unpackArray=function(e,t){if(C.defined("array",e),C.typeOf.number.greaterThanOrEquals("array.length",e.length,9),e.length%9!==0)throw new w("array length must be a multiple of 9.");let n=e.length;c(t)?t.length=n/9:t=new Array(n/9);for(let i=0;i<n;i+=9){let o=i/9;t[o]=Ze.unpack(e,i,t[o])}return t};Ze.clone=function(e,t){if(c(e))return c(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):new Ze(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])};Ze.fromArray=Ze.unpack;Ze.fromColumnMajorArray=function(e,t){return C.defined("values",e),Ze.clone(e,t)};Ze.fromRowMajorArray=function(e,t){return C.defined("values",e),c(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new Ze(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])};Ze.fromQuaternion=function(e,t){C.typeOf.object("quaternion",e);let n=e.x*e.x,i=e.x*e.y,o=e.x*e.z,r=e.x*e.w,s=e.y*e.y,a=e.y*e.z,l=e.y*e.w,u=e.z*e.z,f=e.z*e.w,h=e.w*e.w,m=n-s-u+h,p=2*(i-f),_=2*(o+l),b=2*(i+f),x=-n+s-u+h,T=2*(a-r),E=2*(o-l),S=2*(a+r),A=-n-s+u+h;return c(t)?(t[0]=m,t[1]=b,t[2]=E,t[3]=p,t[4]=x,t[5]=S,t[6]=_,t[7]=T,t[8]=A,t):new Ze(m,p,_,b,x,T,E,S,A)};Ze.fromHeadingPitchRoll=function(e,t){C.typeOf.object("headingPitchRoll",e);let n=Math.cos(-e.pitch),i=Math.cos(-e.heading),o=Math.cos(e.roll),r=Math.sin(-e.pitch),s=Math.sin(-e.heading),a=Math.sin(e.roll),l=n*i,u=-o*s+a*r*i,f=a*s+o*r*i,h=n*s,m=o*i+a*r*s,p=-a*i+o*r*s,_=-r,b=a*n,x=o*n;return c(t)?(t[0]=l,t[1]=h,t[2]=_,t[3]=u,t[4]=m,t[5]=b,t[6]=f,t[7]=p,t[8]=x,t):new Ze(l,u,f,h,m,p,_,b,x)};Ze.fromScale=function(e,t){return C.typeOf.object("scale",e),c(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new Ze(e.x,0,0,0,e.y,0,0,0,e.z)};Ze.fromUniformScale=function(e,t){return C.typeOf.number("scale",e),c(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new Ze(e,0,0,0,e,0,0,0,e)};Ze.fromCrossProduct=function(e,t){return C.typeOf.object("vector",e),c(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new Ze(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)};Ze.fromRotationX=function(e,t){C.typeOf.number("angle",e);let n=Math.cos(e),i=Math.sin(e);return c(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=n,t[5]=i,t[6]=0,t[7]=-i,t[8]=n,t):new Ze(1,0,0,0,n,-i,0,i,n)};Ze.fromRotationY=function(e,t){C.typeOf.number("angle",e);let n=Math.cos(e),i=Math.sin(e);return c(t)?(t[0]=n,t[1]=0,t[2]=-i,t[3]=0,t[4]=1,t[5]=0,t[6]=i,t[7]=0,t[8]=n,t):new Ze(n,0,i,0,1,0,-i,0,n)};Ze.fromRotationZ=function(e,t){C.typeOf.number("angle",e);let n=Math.cos(e),i=Math.sin(e);return c(t)?(t[0]=n,t[1]=i,t[2]=0,t[3]=-i,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new Ze(n,-i,0,i,n,0,0,0,1)};Ze.toArray=function(e,t){return C.typeOf.object("matrix",e),c(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]};Ze.getElementIndex=function(e,t){return C.typeOf.number.greaterThanOrEquals("row",t,0),C.typeOf.number.lessThanOrEquals("row",t,2),C.typeOf.number.greaterThanOrEquals("column",e,0),C.typeOf.number.lessThanOrEquals("column",e,2),e*3+t};Ze.getColumn=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.number.greaterThanOrEquals("index",t,0),C.typeOf.number.lessThanOrEquals("index",t,2),C.typeOf.object("result",n);let i=t*3,o=e[i],r=e[i+1],s=e[i+2];return n.x=o,n.y=r,n.z=s,n};Ze.setColumn=function(e,t,n,i){C.typeOf.object("matrix",e),C.typeOf.number.greaterThanOrEquals("index",t,0),C.typeOf.number.lessThanOrEquals("index",t,2),C.typeOf.object("cartesian",n),C.typeOf.object("result",i),i=Ze.clone(e,i);let o=t*3;return i[o]=n.x,i[o+1]=n.y,i[o+2]=n.z,i};Ze.getRow=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.number.greaterThanOrEquals("index",t,0),C.typeOf.number.lessThanOrEquals("index",t,2),C.typeOf.object("result",n);let i=e[t],o=e[t+3],r=e[t+6];return n.x=i,n.y=o,n.z=r,n};Ze.setRow=function(e,t,n,i){return C.typeOf.object("matrix",e),C.typeOf.number.greaterThanOrEquals("index",t,0),C.typeOf.number.lessThanOrEquals("index",t,2),C.typeOf.object("cartesian",n),C.typeOf.object("result",i),i=Ze.clone(e,i),i[t]=n.x,i[t+3]=n.y,i[t+6]=n.z,i};var gTe=new d;Ze.setScale=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.object("scale",t),C.typeOf.object("result",n);let i=Ze.getScale(e,gTe),o=t.x/i.x,r=t.y/i.y,s=t.z/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3]*r,n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*s,n[7]=e[7]*s,n[8]=e[8]*s,n};var yTe=new d;Ze.setUniformScale=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.number("scale",t),C.typeOf.object("result",n);let i=Ze.getScale(e,yTe),o=t/i.x,r=t/i.y,s=t/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3]*r,n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*s,n[7]=e[7]*s,n[8]=e[8]*s,n};var eG=new d;Ze.getScale=function(e,t){return C.typeOf.object("matrix",e),C.typeOf.object("result",t),t.x=d.magnitude(d.fromElements(e[0],e[1],e[2],eG)),t.y=d.magnitude(d.fromElements(e[3],e[4],e[5],eG)),t.z=d.magnitude(d.fromElements(e[6],e[7],e[8],eG)),t};var iK=new d;Ze.getMaximumScale=function(e){return Ze.getScale(e,iK),d.maximumComponent(iK)};var bTe=new d;Ze.setRotation=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.object("result",n);let i=Ze.getScale(e,bTe);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.x,n[3]=t[3]*i.y,n[4]=t[4]*i.y,n[5]=t[5]*i.y,n[6]=t[6]*i.z,n[7]=t[7]*i.z,n[8]=t[8]*i.z,n};var xTe=new d;Ze.getRotation=function(e,t){C.typeOf.object("matrix",e),C.typeOf.object("result",t);let n=Ze.getScale(e,xTe);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.x,t[3]=e[3]/n.y,t[4]=e[4]/n.y,t[5]=e[5]/n.y,t[6]=e[6]/n.z,t[7]=e[7]/n.z,t[8]=e[8]/n.z,t};Ze.multiply=function(e,t,n){C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n);let i=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],o=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],r=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],s=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],a=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],l=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],u=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],f=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],h=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return n[0]=i,n[1]=o,n[2]=r,n[3]=s,n[4]=a,n[5]=l,n[6]=u,n[7]=f,n[8]=h,n};Ze.add=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n};Ze.subtract=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n};Ze.multiplyByVector=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.object("cartesian",t),C.typeOf.object("result",n);let i=t.x,o=t.y,r=t.z,s=e[0]*i+e[3]*o+e[6]*r,a=e[1]*i+e[4]*o+e[7]*r,l=e[2]*i+e[5]*o+e[8]*r;return n.x=s,n.y=a,n.z=l,n};Ze.multiplyByScalar=function(e,t,n){return C.typeOf.object("matrix",e),C.typeOf.number("scalar",t),C.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n};Ze.multiplyByScale=function(e,t,n){return C.typeOf.object("matrix",e),C.typeOf.object("scale",t),C.typeOf.object("result",n),n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.x,n[3]=e[3]*t.y,n[4]=e[4]*t.y,n[5]=e[5]*t.y,n[6]=e[6]*t.z,n[7]=e[7]*t.z,n[8]=e[8]*t.z,n};Ze.multiplyByUniformScale=function(e,t,n){return C.typeOf.object("matrix",e),C.typeOf.number("scale",t),C.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n};Ze.negate=function(e,t){return C.typeOf.object("matrix",e),C.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t};Ze.transpose=function(e,t){C.typeOf.object("matrix",e),C.typeOf.object("result",t);let n=e[0],i=e[3],o=e[6],r=e[1],s=e[4],a=e[7],l=e[2],u=e[5],f=e[8];return t[0]=n,t[1]=i,t[2]=o,t[3]=r,t[4]=s,t[5]=a,t[6]=l,t[7]=u,t[8]=f,t};function TTe(e){let t=0;for(let n=0;n<9;++n){let i=e[n];t+=i*i}return Math.sqrt(t)}var tG=[1,0,0],nG=[2,2,1];function CTe(e){let t=0;for(let n=0;n<3;++n){let i=e[Ze.getElementIndex(nG[n],tG[n])];t+=2*i*i}return Math.sqrt(t)}function ETe(e,t){let n=O.EPSILON15,i=0,o=1;for(let u=0;u<3;++u){let f=Math.abs(e[Ze.getElementIndex(nG[u],tG[u])]);f>i&&(o=u,i=f)}let r=1,s=0,a=tG[o],l=nG[o];if(Math.abs(e[Ze.getElementIndex(l,a)])>n){let u=e[Ze.getElementIndex(l,l)],f=e[Ze.getElementIndex(a,a)],h=e[Ze.getElementIndex(l,a)],m=(u-f)/2/h,p;m<0?p=-1/(-m+Math.sqrt(1+m*m)):p=1/(m+Math.sqrt(1+m*m)),r=1/Math.sqrt(1+p*p),s=p*r}return t=Ze.clone(Ze.IDENTITY,t),t[Ze.getElementIndex(a,a)]=t[Ze.getElementIndex(l,l)]=r,t[Ze.getElementIndex(l,a)]=s,t[Ze.getElementIndex(a,l)]=-s,t}var lO=new Ze,oK=new Ze;Ze.computeEigenDecomposition=function(e,t){C.typeOf.object("matrix",e);let n=O.EPSILON20,i=10,o=0,r=0;c(t)||(t={});let s=t.unitary=Ze.clone(Ze.IDENTITY,t.unitary),a=t.diagonal=Ze.clone(e,t.diagonal),l=n*TTe(a);for(;r<i&&CTe(a)>l;)ETe(a,lO),Ze.transpose(lO,oK),Ze.multiply(a,lO,a),Ze.multiply(oK,a,a),Ze.multiply(s,lO,s),++o>2&&(++r,o=0);return t};Ze.abs=function(e,t){return C.typeOf.object("matrix",e),C.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t};Ze.determinant=function(e){C.typeOf.object("matrix",e);let t=e[0],n=e[3],i=e[6],o=e[1],r=e[4],s=e[7],a=e[2],l=e[5],u=e[8];return t*(r*u-l*s)+o*(l*i-n*u)+a*(n*s-r*i)};Ze.inverse=function(e,t){C.typeOf.object("matrix",e),C.typeOf.object("result",t);let n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],l=e[6],u=e[7],f=e[8],h=Ze.determinant(e);if(Math.abs(h)<=O.EPSILON15)throw new w("matrix is not invertible");t[0]=s*f-u*a,t[1]=u*o-i*f,t[2]=i*a-s*o,t[3]=l*a-r*f,t[4]=n*f-l*o,t[5]=r*o-n*a,t[6]=r*u-l*s,t[7]=l*i-n*u,t[8]=n*s-r*i;let m=1/h;return Ze.multiplyByScalar(t,m,t)};var wTe=new Ze;Ze.inverseTranspose=function(e,t){return C.typeOf.object("matrix",e),C.typeOf.object("result",t),Ze.inverse(Ze.transpose(e,wTe),t)};Ze.equals=function(e,t){return e===t||c(e)&&c(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]};Ze.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n};Ze.IDENTITY=Object.freeze(new Ze(1,0,0,0,1,0,0,0,1));Ze.ZERO=Object.freeze(new Ze(0,0,0,0,0,0,0,0,0));Ze.COLUMN0ROW0=0;Ze.COLUMN0ROW1=1;Ze.COLUMN0ROW2=2;Ze.COLUMN1ROW0=3;Ze.COLUMN1ROW1=4;Ze.COLUMN1ROW2=5;Ze.COLUMN2ROW0=6;Ze.COLUMN2ROW1=7;Ze.COLUMN2ROW2=8;Object.defineProperties(Ze.prototype,{length:{get:function(){return Ze.packedLength}}});Ze.prototype.clone=function(e){return Ze.clone(this,e)};Ze.prototype.equals=function(e){return Ze.equals(this,e)};Ze.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]};Ze.prototype.equalsEpsilon=function(e,t){return Ze.equalsEpsilon(this,e,t)};Ze.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})
| (${this[1]}, ${this[4]}, ${this[7]})
| (${this[2]}, ${this[5]}, ${this[8]})`};var q=Ze;function Jw(e){this.name="RuntimeError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}c(Object.create)&&(Jw.prototype=Object.create(Error.prototype),Jw.prototype.constructor=Jw);Jw.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return c(this.stack)&&(e+=`
| ${this.stack.toString()}`),e};var ie=Jw;function $e(e,t,n,i,o,r,s,a,l,u,f,h,m,p,_,b){this[0]=g(e,0),this[1]=g(o,0),this[2]=g(l,0),this[3]=g(m,0),this[4]=g(t,0),this[5]=g(r,0),this[6]=g(u,0),this[7]=g(p,0),this[8]=g(n,0),this[9]=g(s,0),this[10]=g(f,0),this[11]=g(_,0),this[12]=g(i,0),this[13]=g(a,0),this[14]=g(h,0),this[15]=g(b,0)}$e.packedLength=16;$e.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t[n++]=e[9],t[n++]=e[10],t[n++]=e[11],t[n++]=e[12],t[n++]=e[13],t[n++]=e[14],t[n]=e[15],t};$e.unpack=function(e,t,n){return C.defined("array",e),t=g(t,0),c(n)||(n=new $e),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n[4]=e[t++],n[5]=e[t++],n[6]=e[t++],n[7]=e[t++],n[8]=e[t++],n[9]=e[t++],n[10]=e[t++],n[11]=e[t++],n[12]=e[t++],n[13]=e[t++],n[14]=e[t++],n[15]=e[t],n};$e.packArray=function(e,t){C.defined("array",e);let n=e.length,i=n*16;if(!c(t))t=new Array(i);else{if(!Array.isArray(t)&&t.length!==i)throw new w("If result is a typed array, it must have exactly array.length * 16 elements");t.length!==i&&(t.length=i)}for(let o=0;o<n;++o)$e.pack(e[o],t,o*16);return t};$e.unpackArray=function(e,t){if(C.defined("array",e),C.typeOf.number.greaterThanOrEquals("array.length",e.length,16),e.length%16!==0)throw new w("array length must be a multiple of 16.");let n=e.length;c(t)?t.length=n/16:t=new Array(n/16);for(let i=0;i<n;i+=16){let o=i/16;t[o]=$e.unpack(e,i,t[o])}return t};$e.clone=function(e,t){if(c(e))return c(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):new $e(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])};$e.fromArray=$e.unpack;$e.fromColumnMajorArray=function(e,t){return C.defined("values",e),$e.clone(e,t)};$e.fromRowMajorArray=function(e,t){return C.defined("values",e),c(t)?(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t):new $e(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])};$e.fromRotationTranslation=function(e,t,n){return C.typeOf.object("rotation",e),t=g(t,d.ZERO),c(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=0,n[4]=e[3],n[5]=e[4],n[6]=e[5],n[7]=0,n[8]=e[6],n[9]=e[7],n[10]=e[8],n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,n):new $e(e[0],e[3],e[6],t.x,e[1],e[4],e[7],t.y,e[2],e[5],e[8],t.z,0,0,0,1)};$e.fromTranslationQuaternionRotationScale=function(e,t,n,i){C.typeOf.object("translation",e),C.typeOf.object("rotation",t),C.typeOf.object("scale",n),c(i)||(i=new $e);let o=n.x,r=n.y,s=n.z,a=t.x*t.x,l=t.x*t.y,u=t.x*t.z,f=t.x*t.w,h=t.y*t.y,m=t.y*t.z,p=t.y*t.w,_=t.z*t.z,b=t.z*t.w,x=t.w*t.w,T=a-h-_+x,E=2*(l-b),S=2*(u+p),A=2*(l+b),v=-a+h-_+x,D=2*(m-f),R=2*(u-p),P=2*(m+f),L=-a-h+_+x;return i[0]=T*o,i[1]=A*o,i[2]=R*o,i[3]=0,i[4]=E*r,i[5]=v*r,i[6]=P*r,i[7]=0,i[8]=S*s,i[9]=D*s,i[10]=L*s,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,i};$e.fromTranslationRotationScale=function(e,t){return C.typeOf.object("translationRotationScale",e),$e.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t)};$e.fromTranslation=function(e,t){return C.typeOf.object("translation",e),$e.fromRotationTranslation(q.IDENTITY,e,t)};$e.fromScale=function(e,t){return C.typeOf.object("scale",e),c(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e.y,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e.z,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new $e(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)};$e.fromUniformScale=function(e,t){return C.typeOf.number("scale",e),c(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new $e(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};$e.fromRotation=function(e,t){return C.typeOf.object("rotation",e),c(t)||(t=new $e),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t};var bx=new d,xx=new d,Qw=new d;$e.fromCamera=function(e,t){C.typeOf.object("camera",e);let n=e.position,i=e.direction,o=e.up;C.typeOf.object("camera.position",n),C.typeOf.object("camera.direction",i),C.typeOf.object("camera.up",o),d.normalize(i,bx),d.normalize(d.cross(bx,o,xx),xx),d.normalize(d.cross(xx,bx,Qw),Qw);let r=xx.x,s=xx.y,a=xx.z,l=bx.x,u=bx.y,f=bx.z,h=Qw.x,m=Qw.y,p=Qw.z,_=n.x,b=n.y,x=n.z,T=r*-_+s*-b+a*-x,E=h*-_+m*-b+p*-x,S=l*_+u*b+f*x;return c(t)?(t[0]=r,t[1]=h,t[2]=-l,t[3]=0,t[4]=s,t[5]=m,t[6]=-u,t[7]=0,t[8]=a,t[9]=p,t[10]=-f,t[11]=0,t[12]=T,t[13]=E,t[14]=S,t[15]=1,t):new $e(r,s,a,T,h,m,p,E,-l,-u,-f,S,0,0,0,1)};$e.computePerspectiveFieldOfView=function(e,t,n,i,o){C.typeOf.number.greaterThan("fovY",e,0),C.typeOf.number.lessThan("fovY",e,Math.PI),C.typeOf.number.greaterThan("near",n,0),C.typeOf.number.greaterThan("far",i,0),C.typeOf.object("result",o);let s=1/Math.tan(e*.5),a=s/t,l=(i+n)/(n-i),u=2*i*n/(n-i);return o[0]=a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=s,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=l,o[11]=-1,o[12]=0,o[13]=0,o[14]=u,o[15]=0,o};$e.computeOrthographicOffCenter=function(e,t,n,i,o,r,s){C.typeOf.number("left",e),C.typeOf.number("right",t),C.typeOf.number("bottom",n),C.typeOf.number("top",i),C.typeOf.number("near",o),C.typeOf.number("far",r),C.typeOf.object("result",s);let a=1/(t-e),l=1/(i-n),u=1/(r-o),f=-(t+e)*a,h=-(i+n)*l,m=-(r+o)*u;return a*=2,l*=2,u*=-2,s[0]=a,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=l,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=u,s[11]=0,s[12]=f,s[13]=h,s[14]=m,s[15]=1,s};$e.computePerspectiveOffCenter=function(e,t,n,i,o,r,s){C.typeOf.number("left",e),C.typeOf.number("right",t),C.typeOf.number("bottom",n),C.typeOf.number("top",i),C.typeOf.number("near",o),C.typeOf.number("far",r),C.typeOf.object("result",s);let a=2*o/(t-e),l=2*o/(i-n),u=(t+e)/(t-e),f=(i+n)/(i-n),h=-(r+o)/(r-o),m=-1,p=-2*r*o/(r-o);return s[0]=a,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=l,s[6]=0,s[7]=0,s[8]=u,s[9]=f,s[10]=h,s[11]=m,s[12]=0,s[13]=0,s[14]=p,s[15]=0,s};$e.computeInfinitePerspectiveOffCenter=function(e,t,n,i,o,r){C.typeOf.number("left",e),C.typeOf.number("right",t),C.typeOf.number("bottom",n),C.typeOf.number("top",i),C.typeOf.number("near",o),C.typeOf.object("result",r);let s=2*o/(t-e),a=2*o/(i-n),l=(t+e)/(t-e),u=(i+n)/(i-n),f=-1,h=-1,m=-2*o;return r[0]=s,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=a,r[6]=0,r[7]=0,r[8]=l,r[9]=u,r[10]=f,r[11]=h,r[12]=0,r[13]=0,r[14]=m,r[15]=0,r};$e.computeViewportTransformation=function(e,t,n,i){c(i)||(i=new $e),e=g(e,g.EMPTY_OBJECT);let o=g(e.x,0),r=g(e.y,0),s=g(e.width,0),a=g(e.height,0);t=g(t,0),n=g(n,1);let l=s*.5,u=a*.5,f=(n-t)*.5,h=l,m=u,p=f,_=o+l,b=r+u,x=t+f,T=1;return i[0]=h,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=m,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=p,i[11]=0,i[12]=_,i[13]=b,i[14]=x,i[15]=T,i};$e.computeView=function(e,t,n,i,o){return C.typeOf.object("position",e),C.typeOf.object("direction",t),C.typeOf.object("up",n),C.typeOf.object("right",i),C.typeOf.object("result",o),o[0]=i.x,o[1]=n.x,o[2]=-t.x,o[3]=0,o[4]=i.y,o[5]=n.y,o[6]=-t.y,o[7]=0,o[8]=i.z,o[9]=n.z,o[10]=-t.z,o[11]=0,o[12]=-d.dot(i,e),o[13]=-d.dot(n,e),o[14]=d.dot(t,e),o[15]=1,o};$e.toArray=function(e,t){return C.typeOf.object("matrix",e),c(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]};$e.getElementIndex=function(e,t){return C.typeOf.number.greaterThanOrEquals("row",t,0),C.typeOf.number.lessThanOrEquals("row",t,3),C.typeOf.number.greaterThanOrEquals("column",e,0),C.typeOf.number.lessThanOrEquals("column",e,3),e*4+t};$e.getColumn=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.number.greaterThanOrEquals("index",t,0),C.typeOf.number.lessThanOrEquals("index",t,3),C.typeOf.object("result",n);let i=t*4,o=e[i],r=e[i+1],s=e[i+2],a=e[i+3];return n.x=o,n.y=r,n.z=s,n.w=a,n};$e.setColumn=function(e,t,n,i){C.typeOf.object("matrix",e),C.typeOf.number.greaterThanOrEquals("index",t,0),C.typeOf.number.lessThanOrEquals("index",t,3),C.typeOf.object("cartesian",n),C.typeOf.object("result",i),i=$e.clone(e,i);let o=t*4;return i[o]=n.x,i[o+1]=n.y,i[o+2]=n.z,i[o+3]=n.w,i};$e.getRow=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.number.greaterThanOrEquals("index",t,0),C.typeOf.number.lessThanOrEquals("index",t,3),C.typeOf.object("result",n);let i=e[t],o=e[t+4],r=e[t+8],s=e[t+12];return n.x=i,n.y=o,n.z=r,n.w=s,n};$e.setRow=function(e,t,n,i){return C.typeOf.object("matrix",e),C.typeOf.number.greaterThanOrEquals("index",t,0),C.typeOf.number.lessThanOrEquals("index",t,3),C.typeOf.object("cartesian",n),C.typeOf.object("result",i),i=$e.clone(e,i),i[t]=n.x,i[t+4]=n.y,i[t+8]=n.z,i[t+12]=n.w,i};$e.setTranslation=function(e,t,n){return C.typeOf.object("matrix",e),C.typeOf.object("translation",t),C.typeOf.object("result",n),n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=e[15],n};var STe=new d;$e.setScale=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.object("scale",t),C.typeOf.object("result",n);let i=$e.getScale(e,STe),o=t.x/i.x,r=t.y/i.y,s=t.z/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3],n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*r,n[7]=e[7],n[8]=e[8]*s,n[9]=e[9]*s,n[10]=e[10]*s,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};var ATe=new d;$e.setUniformScale=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.number("scale",t),C.typeOf.object("result",n);let i=$e.getScale(e,ATe),o=t/i.x,r=t/i.y,s=t/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3],n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*r,n[7]=e[7],n[8]=e[8]*s,n[9]=e[9]*s,n[10]=e[10]*s,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};var iG=new d;$e.getScale=function(e,t){return C.typeOf.object("matrix",e),C.typeOf.object("result",t),t.x=d.magnitude(d.fromElements(e[0],e[1],e[2],iG)),t.y=d.magnitude(d.fromElements(e[4],e[5],e[6],iG)),t.z=d.magnitude(d.fromElements(e[8],e[9],e[10],iG)),t};var rK=new d;$e.getMaximumScale=function(e){return $e.getScale(e,rK),d.maximumComponent(rK)};var vTe=new d;$e.setRotation=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.object("result",n);let i=$e.getScale(e,vTe);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.x,n[3]=e[3],n[4]=t[3]*i.y,n[5]=t[4]*i.y,n[6]=t[5]*i.y,n[7]=e[7],n[8]=t[6]*i.z,n[9]=t[7]*i.z,n[10]=t[8]*i.z,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};var DTe=new d;$e.getRotation=function(e,t){C.typeOf.object("matrix",e),C.typeOf.object("result",t);let n=$e.getScale(e,DTe);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.x,t[3]=e[4]/n.y,t[4]=e[5]/n.y,t[5]=e[6]/n.y,t[6]=e[8]/n.z,t[7]=e[9]/n.z,t[8]=e[10]/n.z,t};$e.multiply=function(e,t,n){C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n);let i=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5],u=e[6],f=e[7],h=e[8],m=e[9],p=e[10],_=e[11],b=e[12],x=e[13],T=e[14],E=e[15],S=t[0],A=t[1],v=t[2],D=t[3],R=t[4],P=t[5],L=t[6],F=t[7],y=t[8],I=t[9],M=t[10],B=t[11],U=t[12],V=t[13],W=t[14],H=t[15],X=i*S+a*A+h*v+b*D,$=o*S+l*A+m*v+x*D,ae=r*S+u*A+p*v+T*D,se=s*S+f*A+_*v+E*D,he=i*R+a*P+h*L+b*F,ge=o*R+l*P+m*L+x*F,le=r*R+u*P+p*L+T*F,me=s*R+f*P+_*L+E*F,Me=i*y+a*I+h*M+b*B,Ge=o*y+l*I+m*M+x*B,De=r*y+u*I+p*M+T*B,ke=s*y+f*I+_*M+E*B,He=i*U+a*V+h*W+b*H,ft=o*U+l*V+m*W+x*H,Ie=r*U+u*V+p*W+T*H,Kt=s*U+f*V+_*W+E*H;return n[0]=X,n[1]=$,n[2]=ae,n[3]=se,n[4]=he,n[5]=ge,n[6]=le,n[7]=me,n[8]=Me,n[9]=Ge,n[10]=De,n[11]=ke,n[12]=He,n[13]=ft,n[14]=Ie,n[15]=Kt,n};$e.add=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n[9]=e[9]+t[9],n[10]=e[10]+t[10],n[11]=e[11]+t[11],n[12]=e[12]+t[12],n[13]=e[13]+t[13],n[14]=e[14]+t[14],n[15]=e[15]+t[15],n};$e.subtract=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n[9]=e[9]-t[9],n[10]=e[10]-t[10],n[11]=e[11]-t[11],n[12]=e[12]-t[12],n[13]=e[13]-t[13],n[14]=e[14]-t[14],n[15]=e[15]-t[15],n};$e.multiplyTransformation=function(e,t,n){C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n);let i=e[0],o=e[1],r=e[2],s=e[4],a=e[5],l=e[6],u=e[8],f=e[9],h=e[10],m=e[12],p=e[13],_=e[14],b=t[0],x=t[1],T=t[2],E=t[4],S=t[5],A=t[6],v=t[8],D=t[9],R=t[10],P=t[12],L=t[13],F=t[14],y=i*b+s*x+u*T,I=o*b+a*x+f*T,M=r*b+l*x+h*T,B=i*E+s*S+u*A,U=o*E+a*S+f*A,V=r*E+l*S+h*A,W=i*v+s*D+u*R,H=o*v+a*D+f*R,X=r*v+l*D+h*R,$=i*P+s*L+u*F+m,ae=o*P+a*L+f*F+p,se=r*P+l*L+h*F+_;return n[0]=y,n[1]=I,n[2]=M,n[3]=0,n[4]=B,n[5]=U,n[6]=V,n[7]=0,n[8]=W,n[9]=H,n[10]=X,n[11]=0,n[12]=$,n[13]=ae,n[14]=se,n[15]=1,n};$e.multiplyByMatrix3=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.object("rotation",t),C.typeOf.object("result",n);let i=e[0],o=e[1],r=e[2],s=e[4],a=e[5],l=e[6],u=e[8],f=e[9],h=e[10],m=t[0],p=t[1],_=t[2],b=t[3],x=t[4],T=t[5],E=t[6],S=t[7],A=t[8],v=i*m+s*p+u*_,D=o*m+a*p+f*_,R=r*m+l*p+h*_,P=i*b+s*x+u*T,L=o*b+a*x+f*T,F=r*b+l*x+h*T,y=i*E+s*S+u*A,I=o*E+a*S+f*A,M=r*E+l*S+h*A;return n[0]=v,n[1]=D,n[2]=R,n[3]=0,n[4]=P,n[5]=L,n[6]=F,n[7]=0,n[8]=y,n[9]=I,n[10]=M,n[11]=0,n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};$e.multiplyByTranslation=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.object("translation",t),C.typeOf.object("result",n);let i=t.x,o=t.y,r=t.z,s=i*e[0]+o*e[4]+r*e[8]+e[12],a=i*e[1]+o*e[5]+r*e[9]+e[13],l=i*e[2]+o*e[6]+r*e[10]+e[14];return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=s,n[13]=a,n[14]=l,n[15]=e[15],n};$e.multiplyByScale=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.object("scale",t),C.typeOf.object("result",n);let i=t.x,o=t.y,r=t.z;return i===1&&o===1&&r===1?$e.clone(e,n):(n[0]=i*e[0],n[1]=i*e[1],n[2]=i*e[2],n[3]=e[3],n[4]=o*e[4],n[5]=o*e[5],n[6]=o*e[6],n[7]=e[7],n[8]=r*e[8],n[9]=r*e[9],n[10]=r*e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n)};$e.multiplyByUniformScale=function(e,t,n){return C.typeOf.object("matrix",e),C.typeOf.number("scale",t),C.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3],n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7],n[8]=e[8]*t,n[9]=e[9]*t,n[10]=e[10]*t,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};$e.multiplyByVector=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.object("cartesian",t),C.typeOf.object("result",n);let i=t.x,o=t.y,r=t.z,s=t.w,a=e[0]*i+e[4]*o+e[8]*r+e[12]*s,l=e[1]*i+e[5]*o+e[9]*r+e[13]*s,u=e[2]*i+e[6]*o+e[10]*r+e[14]*s,f=e[3]*i+e[7]*o+e[11]*r+e[15]*s;return n.x=a,n.y=l,n.z=u,n.w=f,n};$e.multiplyByPointAsVector=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.object("cartesian",t),C.typeOf.object("result",n);let i=t.x,o=t.y,r=t.z,s=e[0]*i+e[4]*o+e[8]*r,a=e[1]*i+e[5]*o+e[9]*r,l=e[2]*i+e[6]*o+e[10]*r;return n.x=s,n.y=a,n.z=l,n};$e.multiplyByPoint=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.object("cartesian",t),C.typeOf.object("result",n);let i=t.x,o=t.y,r=t.z,s=e[0]*i+e[4]*o+e[8]*r+e[12],a=e[1]*i+e[5]*o+e[9]*r+e[13],l=e[2]*i+e[6]*o+e[10]*r+e[14];return n.x=s,n.y=a,n.z=l,n};$e.multiplyByScalar=function(e,t,n){return C.typeOf.object("matrix",e),C.typeOf.number("scalar",t),C.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n[9]=e[9]*t,n[10]=e[10]*t,n[11]=e[11]*t,n[12]=e[12]*t,n[13]=e[13]*t,n[14]=e[14]*t,n[15]=e[15]*t,n};$e.negate=function(e,t){return C.typeOf.object("matrix",e),C.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t};$e.transpose=function(e,t){C.typeOf.object("matrix",e),C.typeOf.object("result",t);let n=e[1],i=e[2],o=e[3],r=e[6],s=e[7],a=e[11];return t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=r,t[10]=e[10],t[11]=e[14],t[12]=o,t[13]=s,t[14]=a,t[15]=e[15],t};$e.abs=function(e,t){return C.typeOf.object("matrix",e),C.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t[9]=Math.abs(e[9]),t[10]=Math.abs(e[10]),t[11]=Math.abs(e[11]),t[12]=Math.abs(e[12]),t[13]=Math.abs(e[13]),t[14]=Math.abs(e[14]),t[15]=Math.abs(e[15]),t};$e.equals=function(e,t){return e===t||c(e)&&c(t)&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[3]===t[3]&&e[7]===t[7]&&e[11]===t[11]&&e[15]===t[15]};$e.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n&&Math.abs(e[9]-t[9])<=n&&Math.abs(e[10]-t[10])<=n&&Math.abs(e[11]-t[11])<=n&&Math.abs(e[12]-t[12])<=n&&Math.abs(e[13]-t[13])<=n&&Math.abs(e[14]-t[14])<=n&&Math.abs(e[15]-t[15])<=n};$e.getTranslation=function(e,t){return C.typeOf.object("matrix",e),C.typeOf.object("result",t),t.x=e[12],t.y=e[13],t.z=e[14],t};$e.getMatrix3=function(e,t){return C.typeOf.object("matrix",e),C.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t};var ITe=new q,OTe=new q,PTe=new ee,RTe=new ee(0,0,0,1);$e.inverse=function(e,t){C.typeOf.object("matrix",e),C.typeOf.object("result",t);let n=e[0],i=e[4],o=e[8],r=e[12],s=e[1],a=e[5],l=e[9],u=e[13],f=e[2],h=e[6],m=e[10],p=e[14],_=e[3],b=e[7],x=e[11],T=e[15],E=m*T,S=p*x,A=h*T,v=p*b,D=h*x,R=m*b,P=f*T,L=p*_,F=f*x,y=m*_,I=f*b,M=h*_,B=E*a+v*l+D*u-(S*a+A*l+R*u),U=S*s+P*l+y*u-(E*s+L*l+F*u),V=A*s+L*a+I*u-(v*s+P*a+M*u),W=R*s+F*a+M*l-(D*s+y*a+I*l),H=S*i+A*o+R*r-(E*i+v*o+D*r),X=E*n+L*o+F*r-(S*n+P*o+y*r),$=v*n+P*i+M*r-(A*n+L*i+I*r),ae=D*n+y*i+I*o-(R*n+F*i+M*o);E=o*u,S=r*l,A=i*u,v=r*a,D=i*l,R=o*a,P=n*u,L=r*s,F=n*l,y=o*s,I=n*a,M=i*s;let se=E*b+v*x+D*T-(S*b+A*x+R*T),he=S*_+P*x+y*T-(E*_+L*x+F*T),ge=A*_+L*b+I*T-(v*_+P*b+M*T),le=R*_+F*b+M*x-(D*_+y*b+I*x),me=A*m+R*p+S*h-(D*p+E*h+v*m),Me=F*p+E*f+L*m-(P*m+y*p+S*f),Ge=P*h+M*p+v*f-(I*p+A*f+L*h),De=I*m+D*f+y*h-(F*h+M*m+R*f),ke=n*B+i*U+o*V+r*W;if(Math.abs(ke)<O.EPSILON21){if(q.equalsEpsilon($e.getMatrix3(e,ITe),OTe,O.EPSILON7)&&ee.equals($e.getRow(e,3,PTe),RTe))return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=1,t;throw new ie("matrix is not invertible because its determinate is zero.")}return ke=1/ke,t[0]=B*ke,t[1]=U*ke,t[2]=V*ke,t[3]=W*ke,t[4]=H*ke,t[5]=X*ke,t[6]=$*ke,t[7]=ae*ke,t[8]=se*ke,t[9]=he*ke,t[10]=ge*ke,t[11]=le*ke,t[12]=me*ke,t[13]=Me*ke,t[14]=Ge*ke,t[15]=De*ke,t};$e.inverseTransformation=function(e,t){C.typeOf.object("matrix",e),C.typeOf.object("result",t);let n=e[0],i=e[1],o=e[2],r=e[4],s=e[5],a=e[6],l=e[8],u=e[9],f=e[10],h=e[12],m=e[13],p=e[14],_=-n*h-i*m-o*p,b=-r*h-s*m-a*p,x=-l*h-u*m-f*p;return t[0]=n,t[1]=r,t[2]=l,t[3]=0,t[4]=i,t[5]=s,t[6]=u,t[7]=0,t[8]=o,t[9]=a,t[10]=f,t[11]=0,t[12]=_,t[13]=b,t[14]=x,t[15]=1,t};var MTe=new $e;$e.inverseTranspose=function(e,t){return C.typeOf.object("matrix",e),C.typeOf.object("result",t),$e.inverse($e.transpose(e,MTe),t)};$e.IDENTITY=Object.freeze(new $e(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1));$e.ZERO=Object.freeze(new $e(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0));$e.COLUMN0ROW0=0;$e.COLUMN0ROW1=1;$e.COLUMN0ROW2=2;$e.COLUMN0ROW3=3;$e.COLUMN1ROW0=4;$e.COLUMN1ROW1=5;$e.COLUMN1ROW2=6;$e.COLUMN1ROW3=7;$e.COLUMN2ROW0=8;$e.COLUMN2ROW1=9;$e.COLUMN2ROW2=10;$e.COLUMN2ROW3=11;$e.COLUMN3ROW0=12;$e.COLUMN3ROW1=13;$e.COLUMN3ROW2=14;$e.COLUMN3ROW3=15;Object.defineProperties($e.prototype,{length:{get:function(){return $e.packedLength}}});$e.prototype.clone=function(e){return $e.clone(this,e)};$e.prototype.equals=function(e){return $e.equals(this,e)};$e.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]&&e[9]===t[n+9]&&e[10]===t[n+10]&&e[11]===t[n+11]&&e[12]===t[n+12]&&e[13]===t[n+13]&&e[14]===t[n+14]&&e[15]===t[n+15]};$e.prototype.equalsEpsilon=function(e,t){return $e.equalsEpsilon(this,e,t)};$e.prototype.toString=function(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})
| (${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})
| (${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})
| (${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`};var N=$e;var LTe={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_ASTC_4x4_WEBGL:37808,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_BPTC_UNORM:36492,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047},Y=Object.freeze(LTe);var NTe=new d;function vt(e){this._size=e.size,this._datatype=e.datatype,this.getValue=e.getValue}var Fs={};Fs[Y.FLOAT]="float";Fs[Y.FLOAT_VEC2]="vec2";Fs[Y.FLOAT_VEC3]="vec3";Fs[Y.FLOAT_VEC4]="vec4";Fs[Y.INT]="int";Fs[Y.INT_VEC2]="ivec2";Fs[Y.INT_VEC3]="ivec3";Fs[Y.INT_VEC4]="ivec4";Fs[Y.BOOL]="bool";Fs[Y.BOOL_VEC2]="bvec2";Fs[Y.BOOL_VEC3]="bvec3";Fs[Y.BOOL_VEC4]="bvec4";Fs[Y.FLOAT_MAT2]="mat2";Fs[Y.FLOAT_MAT3]="mat3";Fs[Y.FLOAT_MAT4]="mat4";Fs[Y.SAMPLER_2D]="sampler2D";Fs[Y.SAMPLER_CUBE]="samplerCube";vt.prototype.getDeclaration=function(e){let t=`uniform ${Fs[this._datatype]} ${e}`,n=this._size;return n===1?t+=";":t+=`[${n.toString()}];`,t};var FTe={czm_viewport:new vt({size:1,datatype:Y.FLOAT_VEC4,getValue:function(e){return e.viewportCartesian4}}),czm_viewportOrthographic:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.viewportOrthographic}}),czm_viewportTransformation:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.viewportTransformation}}),czm_globeDepthTexture:new vt({size:1,datatype:Y.SAMPLER_2D,getValue:function(e){return e.globeDepthTexture}}),czm_model:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.model}}),czm_inverseModel:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.inverseModel}}),czm_view:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.view}}),czm_view3D:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.view3D}}),czm_viewRotation:new vt({size:1,datatype:Y.FLOAT_MAT3,getValue:function(e){return e.viewRotation}}),czm_viewRotation3D:new vt({size:1,datatype:Y.FLOAT_MAT3,getValue:function(e){return e.viewRotation3D}}),czm_inverseView:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.inverseView}}),czm_inverseView3D:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.inverseView3D}}),czm_inverseViewRotation:new vt({size:1,datatype:Y.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation}}),czm_inverseViewRotation3D:new vt({size:1,datatype:Y.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation3D}}),czm_projection:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.projection}}),czm_inverseProjection:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.inverseProjection}}),czm_infiniteProjection:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.infiniteProjection}}),czm_modelView:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.modelView}}),czm_modelView3D:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.modelView3D}}),czm_modelViewRelativeToEye:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.modelViewRelativeToEye}}),czm_inverseModelView:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.inverseModelView}}),czm_inverseModelView3D:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.inverseModelView3D}}),czm_viewProjection:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.viewProjection}}),czm_inverseViewProjection:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.inverseViewProjection}}),czm_modelViewProjection:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.modelViewProjection}}),czm_inverseModelViewProjection:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.inverseModelViewProjection}}),czm_modelViewProjectionRelativeToEye:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.modelViewProjectionRelativeToEye}}),czm_modelViewInfiniteProjection:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.modelViewInfiniteProjection}}),czm_orthographicIn3D:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.orthographicIn3D?1:0}}),czm_normal:new vt({size:1,datatype:Y.FLOAT_MAT3,getValue:function(e){return e.normal}}),czm_normal3D:new vt({size:1,datatype:Y.FLOAT_MAT3,getValue:function(e){return e.normal3D}}),czm_inverseNormal:new vt({size:1,datatype:Y.FLOAT_MAT3,getValue:function(e){return e.inverseNormal}}),czm_inverseNormal3D:new vt({size:1,datatype:Y.FLOAT_MAT3,getValue:function(e){return e.inverseNormal3D}}),czm_eyeHeight:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.eyeHeight}}),czm_eyeHeight2D:new vt({size:1,datatype:Y.FLOAT_VEC2,getValue:function(e){return e.eyeHeight2D}}),czm_eyeEllipsoidNormalEC:new vt({size:1,datatype:Y.FLOAT_VEC3,getValue:function(e){return e.eyeEllipsoidNormalEC}}),czm_eyeEllipsoidCurvature:new vt({size:1,datatype:Y.FLOAT_VEC2,getValue:function(e){return e.eyeEllipsoidCurvature}}),czm_modelToEnu:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.modelToEnu}}),czm_enuToModel:new vt({size:1,datatype:Y.FLOAT_MAT4,getValue:function(e){return e.enuToModel}}),czm_entireFrustum:new vt({size:1,datatype:Y.FLOAT_VEC2,getValue:function(e){return e.entireFrustum}}),czm_currentFrustum:new vt({size:1,datatype:Y.FLOAT_VEC2,getValue:function(e){return e.currentFrustum}}),czm_frustumPlanes:new vt({size:1,datatype:Y.FLOAT_VEC4,getValue:function(e){return e.frustumPlanes}}),czm_farDepthFromNearPlusOne:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.farDepthFromNearPlusOne}}),czm_log2FarDepthFromNearPlusOne:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.log2FarDepthFromNearPlusOne}}),czm_oneOverLog2FarDepthFromNearPlusOne:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.oneOverLog2FarDepthFromNearPlusOne}}),czm_sunPositionWC:new vt({size:1,datatype:Y.FLOAT_VEC3,getValue:function(e){return e.sunPositionWC}}),czm_sunPositionColumbusView:new vt({size:1,datatype:Y.FLOAT_VEC3,getValue:function(e){return e.sunPositionColumbusView}}),czm_sunDirectionEC:new vt({size:1,datatype:Y.FLOAT_VEC3,getValue:function(e){return e.sunDirectionEC}}),czm_sunDirectionWC:new vt({size:1,datatype:Y.FLOAT_VEC3,getValue:function(e){return e.sunDirectionWC}}),czm_moonDirectionEC:new vt({size:1,datatype:Y.FLOAT_VEC3,getValue:function(e){return e.moonDirectionEC}}),czm_lightDirectionEC:new vt({size:1,datatype:Y.FLOAT_VEC3,getValue:function(e){return e.lightDirectionEC}}),czm_lightDirectionWC:new vt({size:1,datatype:Y.FLOAT_VEC3,getValue:function(e){return e.lightDirectionWC}}),czm_lightColor:new vt({size:1,datatype:Y.FLOAT_VEC3,getValue:function(e){return e.lightColor}}),czm_lightColorHdr:new vt({size:1,datatype:Y.FLOAT_VEC3,getValue:function(e){return e.lightColorHdr}}),czm_encodedCameraPositionMCHigh:new vt({size:1,datatype:Y.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCHigh}}),czm_encodedCameraPositionMCLow:new vt({size:1,datatype:Y.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCLow}}),czm_viewerPositionWC:new vt({size:1,datatype:Y.FLOAT_VEC3,getValue:function(e){return N.getTranslation(e.inverseView,NTe)}}),czm_frameNumber:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.frameState.frameNumber}}),czm_morphTime:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.frameState.morphTime}}),czm_sceneMode:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.frameState.mode}}),czm_pass:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.pass}}),czm_backgroundColor:new vt({size:1,datatype:Y.FLOAT_VEC4,getValue:function(e){return e.backgroundColor}}),czm_brdfLut:new vt({size:1,datatype:Y.SAMPLER_2D,getValue:function(e){return e.brdfLut}}),czm_environmentMap:new vt({size:1,datatype:Y.SAMPLER_CUBE,getValue:function(e){return e.environmentMap}}),czm_specularEnvironmentMaps:new vt({size:1,datatype:Y.SAMPLER_2D,getValue:function(e){return e.specularEnvironmentMaps}}),czm_specularEnvironmentMapsMaximumLOD:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.specularEnvironmentMapsMaximumLOD}}),czm_sphericalHarmonicCoefficients:new vt({size:9,datatype:Y.FLOAT_VEC3,getValue:function(e){return e.sphericalHarmonicCoefficients}}),czm_temeToPseudoFixed:new vt({size:1,datatype:Y.FLOAT_MAT3,getValue:function(e){return e.temeToPseudoFixedMatrix}}),czm_pixelRatio:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.pixelRatio}}),czm_fogDensity:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.fogDensity}}),czm_fogVisualDensityScalar:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.fogVisualDensityScalar}}),czm_fogMinimumBrightness:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.fogMinimumBrightness}}),czm_atmosphereHsbShift:new vt({size:1,datatype:Y.FLOAT_VEC3,getValue:function(e){return e.atmosphereHsbShift}}),czm_atmosphereLightIntensity:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.atmosphereLightIntensity}}),czm_atmosphereRayleighCoefficient:new vt({size:1,datatype:Y.FLOAT_VEC3,getValue:function(e){return e.atmosphereRayleighCoefficient}}),czm_atmosphereRayleighScaleHeight:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.atmosphereRayleighScaleHeight}}),czm_atmosphereMieCoefficient:new vt({size:1,datatype:Y.FLOAT_VEC3,getValue:function(e){return e.atmosphereMieCoefficient}}),czm_atmosphereMieScaleHeight:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.atmosphereMieScaleHeight}}),czm_atmosphereMieAnisotropy:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.atmosphereMieAnisotropy}}),czm_atmosphereDynamicLighting:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.atmosphereDynamicLighting}}),czm_splitPosition:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.splitPosition}}),czm_geometricToleranceOverMeter:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.geometricToleranceOverMeter}}),czm_minimumDisableDepthTestDistance:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.minimumDisableDepthTestDistance}}),czm_invertClassificationColor:new vt({size:1,datatype:Y.FLOAT_VEC4,getValue:function(e){return e.invertClassificationColor}}),czm_gamma:new vt({size:1,datatype:Y.FLOAT,getValue:function(e){return e.gamma}}),czm_ellipsoidRadii:new vt({size:1,datatype:Y.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.radii}}),czm_ellipsoidInverseRadii:new vt({size:1,datatype:Y.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.oneOverRadii}})},r_=FTe;function BTe(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var Bn=BTe;function kTe(){return!0}function UTe(e,t){t=g(t,"This object was destroyed, i.e., destroy() was called.");function n(){throw new w(t)}for(let i in e)typeof e[i]=="function"&&(e[i]=n);e.isDestroyed=kTe}var ue=UTe;var _s={UNSIGNED_BYTE:Y.UNSIGNED_BYTE,UNSIGNED_SHORT:Y.UNSIGNED_SHORT,UNSIGNED_INT:Y.UNSIGNED_INT};_s.getSizeInBytes=function(e){switch(e){case _s.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case _s.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case _s.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new w("indexDatatype is required and must be a valid IndexDatatype constant.")};_s.fromSizeInBytes=function(e){switch(e){case 2:return _s.UNSIGNED_SHORT;case 4:return _s.UNSIGNED_INT;case 1:return _s.UNSIGNED_BYTE;default:throw new w("Size in bytes cannot be mapped to an IndexDatatype")}};_s.validate=function(e){return c(e)&&(e===_s.UNSIGNED_BYTE||e===_s.UNSIGNED_SHORT||e===_s.UNSIGNED_INT)};_s.createTypedArray=function(e,t){if(!c(e))throw new w("numberOfVertices is required.");return e>=O.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)};_s.createTypedArrayFromArrayBuffer=function(e,t,n,i){if(!c(e))throw new w("numberOfVertices is required.");if(!c(t))throw new w("sourceArray is required.");if(!c(n))throw new w("byteOffset is required.");return e>=O.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,n,i):new Uint16Array(t,n,i)};_s.fromTypedArray=function(e){if(e instanceof Uint8Array)return _s.UNSIGNED_BYTE;if(e instanceof Uint16Array)return _s.UNSIGNED_SHORT;if(e instanceof Uint32Array)return _s.UNSIGNED_INT;throw new w("array must be a Uint8Array, Uint16Array, or Uint32Array.")};var Oe=Object.freeze(_s);var uO={STREAM_DRAW:Y.STREAM_DRAW,STATIC_DRAW:Y.STATIC_DRAW,DYNAMIC_DRAW:Y.DYNAMIC_DRAW,validate:function(e){return e===uO.STREAM_DRAW||e===uO.STATIC_DRAW||e===uO.DYNAMIC_DRAW}},Pe=Object.freeze(uO);function wu(e){if(e=g(e,g.EMPTY_OBJECT),C.defined("options.context",e.context),!c(e.typedArray)&&!c(e.sizeInBytes))throw new w("Either options.sizeInBytes or options.typedArray is required.");if(c(e.typedArray)&&c(e.sizeInBytes))throw new w("Cannot pass in both options.sizeInBytes and options.typedArray.");if(c(e.typedArray)&&(C.typeOf.object("options.typedArray",e.typedArray),C.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),!Pe.validate(e.usage))throw new w("usage is invalid.");let t=e.context._gl,n=e.bufferTarget,i=e.typedArray,o=e.sizeInBytes,r=e.usage,s=c(i);s&&(o=i.byteLength),C.typeOf.number.greaterThan("sizeInBytes",o,0);let a=t.createBuffer();t.bindBuffer(n,a),t.bufferData(n,s?i:o,r),t.bindBuffer(n,null),this._id=Bn(),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=n,this._sizeInBytes=o,this._usage=r,this._buffer=a,this.vertexArrayDestroyable=!0}wu.createVertexBuffer=function(e){return C.defined("options.context",e.context),new wu({context:e.context,bufferTarget:Y.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})};wu.createIndexBuffer=function(e){if(C.defined("options.context",e.context),!Oe.validate(e.indexDatatype))throw new w("Invalid indexDatatype.");if(e.indexDatatype===Oe.UNSIGNED_INT&&!e.context.elementIndexUint)throw new w("IndexDatatype.UNSIGNED_INT requires OES_element_index_uint, which is not supported on this system. Check context.elementIndexUint.");let t=e.context,n=e.indexDatatype,i=Oe.getSizeInBytes(n),o=new wu({context:t,bufferTarget:Y.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage}),r=o.sizeInBytes/i;return Object.defineProperties(o,{indexDatatype:{get:function(){return n}},bytesPerIndex:{get:function(){return i}},numberOfIndices:{get:function(){return r}}}),o};Object.defineProperties(wu.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}});wu.prototype._getBuffer=function(){return this._buffer};wu.prototype.copyFromArrayView=function(e,t){t=g(t,0),C.defined("arrayView",e),C.typeOf.number.lessThanOrEquals("offsetInBytes + arrayView.byteLength",t+e.byteLength,this._sizeInBytes);let n=this._gl,i=this._bufferTarget;n.bindBuffer(i,this._buffer),n.bufferSubData(i,t,e),n.bindBuffer(i,null)};wu.prototype.copyFromBuffer=function(e,t,n,i){if(!this._webgl2)throw new w("A WebGL 2 context is required.");if(!c(e))throw new w("readBuffer must be defined.");if(!c(i)||i<=0)throw new w("sizeInBytes must be defined and be greater than zero.");if(!c(t)||t<0||t+i>e._sizeInBytes)throw new w("readOffset must be greater than or equal to zero and readOffset + sizeInBytes must be less than of equal to readBuffer.sizeInBytes.");if(!c(n)||n<0||n+i>this._sizeInBytes)throw new w("writeOffset must be greater than or equal to zero and writeOffset + sizeInBytes must be less than of equal to this.sizeInBytes.");if(this._buffer===e._buffer&&(n>=t&&n<t+i||t>n&&t<n+i))throw new w("When readBuffer is equal to this, the ranges [readOffset + sizeInBytes) and [writeOffset, writeOffset + sizeInBytes) must not overlap.");if(this._bufferTarget===Y.ELEMENT_ARRAY_BUFFER&&e._bufferTarget!==Y.ELEMENT_ARRAY_BUFFER||this._bufferTarget!==Y.ELEMENT_ARRAY_BUFFER&&e._bufferTarget===Y.ELEMENT_ARRAY_BUFFER)throw new w("Can not copy an index buffer into another buffer type.");let o=Y.COPY_READ_BUFFER,r=Y.COPY_WRITE_BUFFER,s=this._gl;s.bindBuffer(r,this._buffer),s.bindBuffer(o,e._buffer),s.copyBufferSubData(o,r,t,n,i),s.bindBuffer(r,null),s.bindBuffer(o,null)};wu.prototype.getBufferData=function(e,t,n,i){if(t=g(t,0),n=g(n,0),!this._webgl2)throw new w("A WebGL 2 context is required.");if(!c(e))throw new w("arrayView is required.");let o,r,s=e.byteLength;if(c(i)?(o=i,c(s)?r=1:(s=e.length,r=e.BYTES_PER_ELEMENT)):c(s)?(o=s-n,r=1):(s=e.length,o=s-n,r=e.BYTES_PER_ELEMENT),n<0||n>s)throw new w("destinationOffset must be greater than zero and less than the arrayView length.");if(n+o>s)throw new w("destinationOffset + length must be less than or equal to the arrayViewLength.");if(t<0||t>this._sizeInBytes)throw new w("sourceOffset must be greater than zero and less than the buffers size.");if(t+o*r>this._sizeInBytes)throw new w("sourceOffset + length must be less than the buffers size.");let a=this._gl,l=Y.COPY_READ_BUFFER;a.bindBuffer(l,this._buffer),a.getBufferSubData(l,t,e,n,i),a.bindBuffer(l,null)};wu.prototype.isDestroyed=function(){return!1};wu.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),ue(this)};var yt=wu;var s_,xr={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},zc={};Object.defineProperties(zc,{element:{get:function(){if(zc.supportsFullscreen())return document[xr.fullscreenElement]}},changeEventName:{get:function(){if(zc.supportsFullscreen())return xr.fullscreenchange}},errorEventName:{get:function(){if(zc.supportsFullscreen())return xr.fullscreenerror}},enabled:{get:function(){if(zc.supportsFullscreen())return document[xr.fullscreenEnabled]}},fullscreen:{get:function(){if(zc.supportsFullscreen())return zc.element!==null}}});zc.supportsFullscreen=function(){if(c(s_))return s_;s_=!1;let e=document.body;if(typeof e.requestFullscreen=="function")return xr.requestFullscreen="requestFullscreen",xr.exitFullscreen="exitFullscreen",xr.fullscreenEnabled="fullscreenEnabled",xr.fullscreenElement="fullscreenElement",xr.fullscreenchange="fullscreenchange",xr.fullscreenerror="fullscreenerror",s_=!0,s_;let t=["webkit","moz","o","ms","khtml"],n;for(let i=0,o=t.length;i<o;++i){let r=t[i];n=`${r}RequestFullscreen`,typeof e[n]=="function"?(xr.requestFullscreen=n,s_=!0):(n=`${r}RequestFullScreen`,typeof e[n]=="function"&&(xr.requestFullscreen=n,s_=!0)),n=`${r}ExitFullscreen`,typeof document[n]=="function"?xr.exitFullscreen=n:(n=`${r}CancelFullScreen`,typeof document[n]=="function"&&(xr.exitFullscreen=n)),n=`${r}FullscreenEnabled`,document[n]!==void 0?xr.fullscreenEnabled=n:(n=`${r}FullScreenEnabled`,document[n]!==void 0&&(xr.fullscreenEnabled=n)),n=`${r}FullscreenElement`,document[n]!==void 0?xr.fullscreenElement=n:(n=`${r}FullScreenElement`,document[n]!==void 0&&(xr.fullscreenElement=n)),n=`${r}fullscreenchange`,document[`on${n}`]!==void 0&&(r==="ms"&&(n="MSFullscreenChange"),xr.fullscreenchange=n),n=`${r}fullscreenerror`,document[`on${n}`]!==void 0&&(r==="ms"&&(n="MSFullscreenError"),xr.fullscreenerror=n)}return s_};zc.requestFullscreen=function(e,t){zc.supportsFullscreen()&&e[xr.requestFullscreen]({vrDisplay:t})};zc.exitFullscreen=function(){zc.supportsFullscreen()&&document[xr.exitFullscreen]()};zc._names=xr;var fO=zc;var wa;typeof navigator!="undefined"?wa=navigator:wa={};function jy(e){let t=e.split(".");for(let n=0,i=t.length;n<i;++n)t[n]=parseInt(t[n],10);return t}var dO,sK;function lG(){if(!c(dO)&&(dO=!1,!yO())){let e=/ Chrome\/([\.0-9]+)/.exec(wa.userAgent);e!==null&&(dO=!0,sK=jy(e[1]))}return dO}function zTe(){return lG()&&sK}var hO,aK;function cK(){if(!c(hO)&&(hO=!1,!lG()&&!yO()&&/ Safari\/[\.0-9]+/.test(wa.userAgent))){let e=/ Version\/([\.0-9]+)/.exec(wa.userAgent);e!==null&&(hO=!0,aK=jy(e[1]))}return hO}function VTe(){return cK()&&aK}var mO,aG;function lK(){if(!c(mO)){mO=!1;let e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(wa.userAgent);e!==null&&(mO=!0,aG=jy(e[1]),aG.isNightly=!!e[2])}return mO}function HTe(){return lK()&&aG}var eS,cG;function uK(){if(!c(eS)){eS=!1;let e;wa.appName==="Microsoft Internet Explorer"?(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(wa.userAgent),e!==null&&(eS=!0,cG=jy(e[1]))):wa.appName==="Netscape"&&(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(wa.userAgent),e!==null&&(eS=!0,cG=jy(e[1])))}return eS}function GTe(){return uK()&&cG}var pO,fK;function yO(){if(!c(pO)){pO=!1;let e=/ Edg\/([\.0-9]+)/.exec(wa.userAgent);e!==null&&(pO=!0,fK=jy(e[1]))}return pO}function jTe(){return yO()&&fK}var _O,uG;function bO(){if(!c(_O)){_O=!1;let e=/Firefox\/([\.0-9]+)/.exec(wa.userAgent);e!==null&&(_O=!0,uG=jy(e[1]))}return _O}var oG;function WTe(){return c(oG)||(oG=/Windows/i.test(wa.appVersion)),oG}var rG;function qTe(){return c(rG)||(rG=navigator.platform==="iPhone"||navigator.platform==="iPod"||navigator.platform==="iPad"),rG}function YTe(){return bO()&&uG}var sG;function XTe(){return c(sG)||(sG=!bO()&&typeof PointerEvent!="undefined"&&(!c(wa.pointerEnabled)||wa.pointerEnabled)),sG}var dK,gO;function hK(){if(!c(gO)){let e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");let t=e.style.imageRendering;gO=c(t)&&t!=="",gO&&(dK=t)}return gO}function KTe(){return hK()?dK:void 0}function Ea(){if(!Ea.initialized)throw new w("You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP");return Ea._result}Ea._promise=void 0;Ea._result=void 0;Ea.initialize=function(){return c(Ea._promise)||(Ea._promise=new Promise(e=>{let t=new Image;t.onload=function(){Ea._result=t.width>0&&t.height>0,e(Ea._result)},t.onerror=function(){Ea._result=!1,e(Ea._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),Ea._promise};Object.defineProperties(Ea,{initialized:{get:function(){return c(Ea._result)}}});var Tx=[];typeof ArrayBuffer!="undefined"&&(Tx.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray!="undefined"&&Tx.push(Uint8ClampedArray),typeof Uint8ClampedArray!="undefined"&&Tx.push(Uint8ClampedArray),typeof BigInt64Array!="undefined"&&Tx.push(BigInt64Array),typeof BigUint64Array!="undefined"&&Tx.push(BigUint64Array));var Su={isChrome:lG,chromeVersion:zTe,isSafari:cK,safariVersion:VTe,isWebkit:lK,webkitVersion:HTe,isInternetExplorer:uK,internetExplorerVersion:GTe,isEdge:yO,edgeVersion:jTe,isFirefox:bO,firefoxVersion:YTe,isWindows:WTe,isIPadOrIOS:qTe,hardwareConcurrency:g(wa.hardwareConcurrency,3),supportsPointerEvents:XTe,supportsImageRenderingPixelated:hK,supportsWebP:Ea,imageRenderingValue:KTe,typedArrayTypes:Tx};Su.supportsBasis=function(e){return Su.supportsWebAssembly()&&e.context.supportsBasis};Su.supportsFullscreen=function(){return fO.supportsFullscreen()};Su.supportsTypedArrays=function(){return typeof ArrayBuffer!="undefined"};Su.supportsBigInt64Array=function(){return typeof BigInt64Array!="undefined"};Su.supportsBigUint64Array=function(){return typeof BigUint64Array!="undefined"};Su.supportsBigInt=function(){return typeof BigInt!="undefined"};Su.supportsWebWorkers=function(){return typeof Worker!="undefined"};Su.supportsWebAssembly=function(){return typeof WebAssembly!="undefined"};Su.supportsWebgl2=function(e){return C.defined("scene",e),e.context.webgl2};Su.supportsEsmWebWorkers=function(){return!bO()||parseInt(uG)>=114};var sn=Su;function fG(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n*6<1?e+(t-e)*6*n:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Q(e,t,n,i){this.red=g(e,1),this.green=g(t,1),this.blue=g(n,1),this.alpha=g(i,1)}Q.fromCartesian4=function(e,t){return C.typeOf.object("cartesian",e),c(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new Q(e.x,e.y,e.z,e.w)};Q.fromBytes=function(e,t,n,i,o){return e=Q.byteToFloat(g(e,255)),t=Q.byteToFloat(g(t,255)),n=Q.byteToFloat(g(n,255)),i=Q.byteToFloat(g(i,255)),c(o)?(o.red=e,o.green=t,o.blue=n,o.alpha=i,o):new Q(e,t,n,i)};Q.fromAlpha=function(e,t,n){return C.typeOf.object("color",e),C.typeOf.number("alpha",t),c(n)?(n.red=e.red,n.green=e.green,n.blue=e.blue,n.alpha=t,n):new Q(e.red,e.green,e.blue,t)};var dG,hG,Am;sn.supportsTypedArrays()&&(dG=new ArrayBuffer(4),hG=new Uint32Array(dG),Am=new Uint8Array(dG));Q.fromRgba=function(e,t){return hG[0]=e,Q.fromBytes(Am[0],Am[1],Am[2],Am[3],t)};Q.fromHsl=function(e,t,n,i,o){e=g(e,0)%1,t=g(t,0),n=g(n,0),i=g(i,1);let r=n,s=n,a=n;if(t!==0){let l;n<.5?l=n*(1+t):l=n+t-n*t;let u=2*n-l;r=fG(u,l,e+1/3),s=fG(u,l,e),a=fG(u,l,e-1/3)}return c(o)?(o.red=r,o.green=s,o.blue=a,o.alpha=i,o):new Q(r,s,a,i)};Q.fromRandom=function(e,t){e=g(e,g.EMPTY_OBJECT);let n=e.red;if(!c(n)){let s=g(e.minimumRed,0),a=g(e.maximumRed,1);C.typeOf.number.lessThanOrEquals("minimumRed",s,a),n=s+O.nextRandomNumber()*(a-s)}let i=e.green;if(!c(i)){let s=g(e.minimumGreen,0),a=g(e.maximumGreen,1);C.typeOf.number.lessThanOrEquals("minimumGreen",s,a),i=s+O.nextRandomNumber()*(a-s)}let o=e.blue;if(!c(o)){let s=g(e.minimumBlue,0),a=g(e.maximumBlue,1);C.typeOf.number.lessThanOrEquals("minimumBlue",s,a),o=s+O.nextRandomNumber()*(a-s)}let r=e.alpha;if(!c(r)){let s=g(e.minimumAlpha,0),a=g(e.maximumAlpha,1);C.typeOf.number.lessThanOrEquals("minimumAlpha",s,a),r=s+O.nextRandomNumber()*(a-s)}return c(t)?(t.red=n,t.green=i,t.blue=o,t.alpha=r,t):new Q(n,i,o,r)};var $Te=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,ZTe=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,JTe=/^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i,QTe=/^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;Q.fromCssColorString=function(e,t){C.typeOf.string("color",e),c(t)||(t=new Q),e=e.trim();let n=Q[e.toUpperCase()];if(c(n))return Q.clone(n,t),t;let i=$Te.exec(e);return i!==null?(t.red=parseInt(i[1],16)/15,t.green=parseInt(i[2],16)/15,t.blue=parseInt(i[3],16)/15,t.alpha=parseInt(g(i[4],"f"),16)/15,t):(i=ZTe.exec(e),i!==null?(t.red=parseInt(i[1],16)/255,t.green=parseInt(i[2],16)/255,t.blue=parseInt(i[3],16)/255,t.alpha=parseInt(g(i[4],"ff"),16)/255,t):(i=JTe.exec(e),i!==null?(t.red=parseFloat(i[1])/(i[1].substr(-1)==="%"?100:255),t.green=parseFloat(i[2])/(i[2].substr(-1)==="%"?100:255),t.blue=parseFloat(i[3])/(i[3].substr(-1)==="%"?100:255),t.alpha=parseFloat(g(i[4],"1.0")),t):(i=QTe.exec(e),i!==null?Q.fromHsl(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(g(i[4],"1.0")),t):(t=void 0,t))))};Q.packedLength=4;Q.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),t[n++]=e.red,t[n++]=e.green,t[n++]=e.blue,t[n]=e.alpha,t};Q.unpack=function(e,t,n){return C.defined("array",e),t=g(t,0),c(n)||(n=new Q),n.red=e[t++],n.green=e[t++],n.blue=e[t++],n.alpha=e[t],n};Q.byteToFloat=function(e){return e/255};Q.floatToByte=function(e){return e===1?255:e*256|0};Q.clone=function(e,t){if(c(e))return c(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new Q(e.red,e.green,e.blue,e.alpha)};Q.equals=function(e,t){return e===t||c(e)&&c(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha};Q.equalsArray=function(e,t,n){return e.red===t[n]&&e.green===t[n+1]&&e.blue===t[n+2]&&e.alpha===t[n+3]};Q.prototype.clone=function(e){return Q.clone(this,e)};Q.prototype.equals=function(e){return Q.equals(this,e)};Q.prototype.equalsEpsilon=function(e,t){return this===e||c(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t};Q.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`};Q.prototype.toCssColorString=function(){let e=Q.floatToByte(this.red),t=Q.floatToByte(this.green),n=Q.floatToByte(this.blue);return this.alpha===1?`rgb(${e},${t},${n})`:`rgba(${e},${t},${n},${this.alpha})`};Q.prototype.toCssHexString=function(){let e=Q.floatToByte(this.red).toString(16);e.length<2&&(e=`0${e}`);let t=Q.floatToByte(this.green).toString(16);t.length<2&&(t=`0${t}`);let n=Q.floatToByte(this.blue).toString(16);if(n.length<2&&(n=`0${n}`),this.alpha<1){let i=Q.floatToByte(this.alpha).toString(16);return i.length<2&&(i=`0${i}`),`#${e}${t}${n}${i}`}return`#${e}${t}${n}`};Q.prototype.toBytes=function(e){let t=Q.floatToByte(this.red),n=Q.floatToByte(this.green),i=Q.floatToByte(this.blue),o=Q.floatToByte(this.alpha);return c(e)?(e[0]=t,e[1]=n,e[2]=i,e[3]=o,e):[t,n,i,o]};Q.prototype.toRgba=function(){return Am[0]=Q.floatToByte(this.red),Am[1]=Q.floatToByte(this.green),Am[2]=Q.floatToByte(this.blue),Am[3]=Q.floatToByte(this.alpha),hG[0]};Q.prototype.brighten=function(e,t){return C.typeOf.number("magnitude",e),C.typeOf.number.greaterThanOrEquals("magnitude",e,0),C.typeOf.object("result",t),e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t};Q.prototype.darken=function(e,t){return C.typeOf.number("magnitude",e),C.typeOf.number.greaterThanOrEquals("magnitude",e,0),C.typeOf.object("result",t),e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t};Q.prototype.withAlpha=function(e,t){return Q.fromAlpha(this,e,t)};Q.add=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.red=e.red+t.red,n.green=e.green+t.green,n.blue=e.blue+t.blue,n.alpha=e.alpha+t.alpha,n};Q.subtract=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.red=e.red-t.red,n.green=e.green-t.green,n.blue=e.blue-t.blue,n.alpha=e.alpha-t.alpha,n};Q.multiply=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.red=e.red*t.red,n.green=e.green*t.green,n.blue=e.blue*t.blue,n.alpha=e.alpha*t.alpha,n};Q.divide=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.red=e.red/t.red,n.green=e.green/t.green,n.blue=e.blue/t.blue,n.alpha=e.alpha/t.alpha,n};Q.mod=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.red=e.red%t.red,n.green=e.green%t.green,n.blue=e.blue%t.blue,n.alpha=e.alpha%t.alpha,n};Q.lerp=function(e,t,n,i){return C.typeOf.object("start",e),C.typeOf.object("end",t),C.typeOf.number("t",n),C.typeOf.object("result",i),i.red=O.lerp(e.red,t.red,n),i.green=O.lerp(e.green,t.green,n),i.blue=O.lerp(e.blue,t.blue,n),i.alpha=O.lerp(e.alpha,t.alpha,n),i};Q.multiplyByScalar=function(e,t,n){return C.typeOf.object("color",e),C.typeOf.number("scalar",t),C.typeOf.object("result",n),n.red=e.red*t,n.green=e.green*t,n.blue=e.blue*t,n.alpha=e.alpha*t,n};Q.divideByScalar=function(e,t,n){return C.typeOf.object("color",e),C.typeOf.number("scalar",t),C.typeOf.object("result",n),n.red=e.red/t,n.green=e.green/t,n.blue=e.blue/t,n.alpha=e.alpha/t,n};Q.ALICEBLUE=Object.freeze(Q.fromCssColorString("#F0F8FF"));Q.ANTIQUEWHITE=Object.freeze(Q.fromCssColorString("#FAEBD7"));Q.AQUA=Object.freeze(Q.fromCssColorString("#00FFFF"));Q.AQUAMARINE=Object.freeze(Q.fromCssColorString("#7FFFD4"));Q.AZURE=Object.freeze(Q.fromCssColorString("#F0FFFF"));Q.BEIGE=Object.freeze(Q.fromCssColorString("#F5F5DC"));Q.BISQUE=Object.freeze(Q.fromCssColorString("#FFE4C4"));Q.BLACK=Object.freeze(Q.fromCssColorString("#000000"));Q.BLANCHEDALMOND=Object.freeze(Q.fromCssColorString("#FFEBCD"));Q.BLUE=Object.freeze(Q.fromCssColorString("#0000FF"));Q.BLUEVIOLET=Object.freeze(Q.fromCssColorString("#8A2BE2"));Q.BROWN=Object.freeze(Q.fromCssColorString("#A52A2A"));Q.BURLYWOOD=Object.freeze(Q.fromCssColorString("#DEB887"));Q.CADETBLUE=Object.freeze(Q.fromCssColorString("#5F9EA0"));Q.CHARTREUSE=Object.freeze(Q.fromCssColorString("#7FFF00"));Q.CHOCOLATE=Object.freeze(Q.fromCssColorString("#D2691E"));Q.CORAL=Object.freeze(Q.fromCssColorString("#FF7F50"));Q.CORNFLOWERBLUE=Object.freeze(Q.fromCssColorString("#6495ED"));Q.CORNSILK=Object.freeze(Q.fromCssColorString("#FFF8DC"));Q.CRIMSON=Object.freeze(Q.fromCssColorString("#DC143C"));Q.CYAN=Object.freeze(Q.fromCssColorString("#00FFFF"));Q.DARKBLUE=Object.freeze(Q.fromCssColorString("#00008B"));Q.DARKCYAN=Object.freeze(Q.fromCssColorString("#008B8B"));Q.DARKGOLDENROD=Object.freeze(Q.fromCssColorString("#B8860B"));Q.DARKGRAY=Object.freeze(Q.fromCssColorString("#A9A9A9"));Q.DARKGREEN=Object.freeze(Q.fromCssColorString("#006400"));Q.DARKGREY=Q.DARKGRAY;Q.DARKKHAKI=Object.freeze(Q.fromCssColorString("#BDB76B"));Q.DARKMAGENTA=Object.freeze(Q.fromCssColorString("#8B008B"));Q.DARKOLIVEGREEN=Object.freeze(Q.fromCssColorString("#556B2F"));Q.DARKORANGE=Object.freeze(Q.fromCssColorString("#FF8C00"));Q.DARKORCHID=Object.freeze(Q.fromCssColorString("#9932CC"));Q.DARKRED=Object.freeze(Q.fromCssColorString("#8B0000"));Q.DARKSALMON=Object.freeze(Q.fromCssColorString("#E9967A"));Q.DARKSEAGREEN=Object.freeze(Q.fromCssColorString("#8FBC8F"));Q.DARKSLATEBLUE=Object.freeze(Q.fromCssColorString("#483D8B"));Q.DARKSLATEGRAY=Object.freeze(Q.fromCssColorString("#2F4F4F"));Q.DARKSLATEGREY=Q.DARKSLATEGRAY;Q.DARKTURQUOISE=Object.freeze(Q.fromCssColorString("#00CED1"));Q.DARKVIOLET=Object.freeze(Q.fromCssColorString("#9400D3"));Q.DEEPPINK=Object.freeze(Q.fromCssColorString("#FF1493"));Q.DEEPSKYBLUE=Object.freeze(Q.fromCssColorString("#00BFFF"));Q.DIMGRAY=Object.freeze(Q.fromCssColorString("#696969"));Q.DIMGREY=Q.DIMGRAY;Q.DODGERBLUE=Object.freeze(Q.fromCssColorString("#1E90FF"));Q.FIREBRICK=Object.freeze(Q.fromCssColorString("#B22222"));Q.FLORALWHITE=Object.freeze(Q.fromCssColorString("#FFFAF0"));Q.FORESTGREEN=Object.freeze(Q.fromCssColorString("#228B22"));Q.FUCHSIA=Object.freeze(Q.fromCssColorString("#FF00FF"));Q.GAINSBORO=Object.freeze(Q.fromCssColorString("#DCDCDC"));Q.GHOSTWHITE=Object.freeze(Q.fromCssColorString("#F8F8FF"));Q.GOLD=Object.freeze(Q.fromCssColorString("#FFD700"));Q.GOLDENROD=Object.freeze(Q.fromCssColorString("#DAA520"));Q.GRAY=Object.freeze(Q.fromCssColorString("#808080"));Q.GREEN=Object.freeze(Q.fromCssColorString("#008000"));Q.GREENYELLOW=Object.freeze(Q.fromCssColorString("#ADFF2F"));Q.GREY=Q.GRAY;Q.HONEYDEW=Object.freeze(Q.fromCssColorString("#F0FFF0"));Q.HOTPINK=Object.freeze(Q.fromCssColorString("#FF69B4"));Q.INDIANRED=Object.freeze(Q.fromCssColorString("#CD5C5C"));Q.INDIGO=Object.freeze(Q.fromCssColorString("#4B0082"));Q.IVORY=Object.freeze(Q.fromCssColorString("#FFFFF0"));Q.KHAKI=Object.freeze(Q.fromCssColorString("#F0E68C"));Q.LAVENDER=Object.freeze(Q.fromCssColorString("#E6E6FA"));Q.LAVENDAR_BLUSH=Object.freeze(Q.fromCssColorString("#FFF0F5"));Q.LAWNGREEN=Object.freeze(Q.fromCssColorString("#7CFC00"));Q.LEMONCHIFFON=Object.freeze(Q.fromCssColorString("#FFFACD"));Q.LIGHTBLUE=Object.freeze(Q.fromCssColorString("#ADD8E6"));Q.LIGHTCORAL=Object.freeze(Q.fromCssColorString("#F08080"));Q.LIGHTCYAN=Object.freeze(Q.fromCssColorString("#E0FFFF"));Q.LIGHTGOLDENRODYELLOW=Object.freeze(Q.fromCssColorString("#FAFAD2"));Q.LIGHTGRAY=Object.freeze(Q.fromCssColorString("#D3D3D3"));Q.LIGHTGREEN=Object.freeze(Q.fromCssColorString("#90EE90"));Q.LIGHTGREY=Q.LIGHTGRAY;Q.LIGHTPINK=Object.freeze(Q.fromCssColorString("#FFB6C1"));Q.LIGHTSEAGREEN=Object.freeze(Q.fromCssColorString("#20B2AA"));Q.LIGHTSKYBLUE=Object.freeze(Q.fromCssColorString("#87CEFA"));Q.LIGHTSLATEGRAY=Object.freeze(Q.fromCssColorString("#778899"));Q.LIGHTSLATEGREY=Q.LIGHTSLATEGRAY;Q.LIGHTSTEELBLUE=Object.freeze(Q.fromCssColorString("#B0C4DE"));Q.LIGHTYELLOW=Object.freeze(Q.fromCssColorString("#FFFFE0"));Q.LIME=Object.freeze(Q.fromCssColorString("#00FF00"));Q.LIMEGREEN=Object.freeze(Q.fromCssColorString("#32CD32"));Q.LINEN=Object.freeze(Q.fromCssColorString("#FAF0E6"));Q.MAGENTA=Object.freeze(Q.fromCssColorString("#FF00FF"));Q.MAROON=Object.freeze(Q.fromCssColorString("#800000"));Q.MEDIUMAQUAMARINE=Object.freeze(Q.fromCssColorString("#66CDAA"));Q.MEDIUMBLUE=Object.freeze(Q.fromCssColorString("#0000CD"));Q.MEDIUMORCHID=Object.freeze(Q.fromCssColorString("#BA55D3"));Q.MEDIUMPURPLE=Object.freeze(Q.fromCssColorString("#9370DB"));Q.MEDIUMSEAGREEN=Object.freeze(Q.fromCssColorString("#3CB371"));Q.MEDIUMSLATEBLUE=Object.freeze(Q.fromCssColorString("#7B68EE"));Q.MEDIUMSPRINGGREEN=Object.freeze(Q.fromCssColorString("#00FA9A"));Q.MEDIUMTURQUOISE=Object.freeze(Q.fromCssColorString("#48D1CC"));Q.MEDIUMVIOLETRED=Object.freeze(Q.fromCssColorString("#C71585"));Q.MIDNIGHTBLUE=Object.freeze(Q.fromCssColorString("#191970"));Q.MINTCREAM=Object.freeze(Q.fromCssColorString("#F5FFFA"));Q.MISTYROSE=Object.freeze(Q.fromCssColorString("#FFE4E1"));Q.MOCCASIN=Object.freeze(Q.fromCssColorString("#FFE4B5"));Q.NAVAJOWHITE=Object.freeze(Q.fromCssColorString("#FFDEAD"));Q.NAVY=Object.freeze(Q.fromCssColorString("#000080"));Q.OLDLACE=Object.freeze(Q.fromCssColorString("#FDF5E6"));Q.OLIVE=Object.freeze(Q.fromCssColorString("#808000"));Q.OLIVEDRAB=Object.freeze(Q.fromCssColorString("#6B8E23"));Q.ORANGE=Object.freeze(Q.fromCssColorString("#FFA500"));Q.ORANGERED=Object.freeze(Q.fromCssColorString("#FF4500"));Q.ORCHID=Object.freeze(Q.fromCssColorString("#DA70D6"));Q.PALEGOLDENROD=Object.freeze(Q.fromCssColorString("#EEE8AA"));Q.PALEGREEN=Object.freeze(Q.fromCssColorString("#98FB98"));Q.PALETURQUOISE=Object.freeze(Q.fromCssColorString("#AFEEEE"));Q.PALEVIOLETRED=Object.freeze(Q.fromCssColorString("#DB7093"));Q.PAPAYAWHIP=Object.freeze(Q.fromCssColorString("#FFEFD5"));Q.PEACHPUFF=Object.freeze(Q.fromCssColorString("#FFDAB9"));Q.PERU=Object.freeze(Q.fromCssColorString("#CD853F"));Q.PINK=Object.freeze(Q.fromCssColorString("#FFC0CB"));Q.PLUM=Object.freeze(Q.fromCssColorString("#DDA0DD"));Q.POWDERBLUE=Object.freeze(Q.fromCssColorString("#B0E0E6"));Q.PURPLE=Object.freeze(Q.fromCssColorString("#800080"));Q.RED=Object.freeze(Q.fromCssColorString("#FF0000"));Q.ROSYBROWN=Object.freeze(Q.fromCssColorString("#BC8F8F"));Q.ROYALBLUE=Object.freeze(Q.fromCssColorString("#4169E1"));Q.SADDLEBROWN=Object.freeze(Q.fromCssColorString("#8B4513"));Q.SALMON=Object.freeze(Q.fromCssColorString("#FA8072"));Q.SANDYBROWN=Object.freeze(Q.fromCssColorString("#F4A460"));Q.SEAGREEN=Object.freeze(Q.fromCssColorString("#2E8B57"));Q.SEASHELL=Object.freeze(Q.fromCssColorString("#FFF5EE"));Q.SIENNA=Object.freeze(Q.fromCssColorString("#A0522D"));Q.SILVER=Object.freeze(Q.fromCssColorString("#C0C0C0"));Q.SKYBLUE=Object.freeze(Q.fromCssColorString("#87CEEB"));Q.SLATEBLUE=Object.freeze(Q.fromCssColorString("#6A5ACD"));Q.SLATEGRAY=Object.freeze(Q.fromCssColorString("#708090"));Q.SLATEGREY=Q.SLATEGRAY;Q.SNOW=Object.freeze(Q.fromCssColorString("#FFFAFA"));Q.SPRINGGREEN=Object.freeze(Q.fromCssColorString("#00FF7F"));Q.STEELBLUE=Object.freeze(Q.fromCssColorString("#4682B4"));Q.TAN=Object.freeze(Q.fromCssColorString("#D2B48C"));Q.TEAL=Object.freeze(Q.fromCssColorString("#008080"));Q.THISTLE=Object.freeze(Q.fromCssColorString("#D8BFD8"));Q.TOMATO=Object.freeze(Q.fromCssColorString("#FF6347"));Q.TURQUOISE=Object.freeze(Q.fromCssColorString("#40E0D0"));Q.VIOLET=Object.freeze(Q.fromCssColorString("#EE82EE"));Q.WHEAT=Object.freeze(Q.fromCssColorString("#F5DEB3"));Q.WHITE=Object.freeze(Q.fromCssColorString("#FFFFFF"));Q.WHITESMOKE=Object.freeze(Q.fromCssColorString("#F5F5F5"));Q.YELLOW=Object.freeze(Q.fromCssColorString("#FFFF00"));Q.YELLOWGREEN=Object.freeze(Q.fromCssColorString("#9ACD32"));Q.TRANSPARENT=Object.freeze(new Q(0,0,0,0));var z=Q;function xO(e){e=g(e,g.EMPTY_OBJECT),this.color=e.color,this.depth=e.depth,this.stencil=e.stencil,this.renderState=e.renderState,this.framebuffer=e.framebuffer,this.owner=e.owner,this.pass=e.pass}xO.ALL=Object.freeze(new xO({color:new z(0,0,0,0),depth:1,stencil:0}));xO.prototype.execute=function(e,t){e.clear(this,t)};var $n=xO;var eCe={ENVIRONMENT:0,COMPUTE:1,GLOBE:2,TERRAIN_CLASSIFICATION:3,CESIUM_3D_TILE:4,CESIUM_3D_TILE_CLASSIFICATION:5,CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW:6,OPAQUE:7,TRANSLUCENT:8,VOXELS:9,OVERLAY:10,NUMBER_OF_PASSES:11},xe=Object.freeze(eCe);function mK(e){e=g(e,g.EMPTY_OBJECT),this.vertexArray=e.vertexArray,this.fragmentShaderSource=e.fragmentShaderSource,this.shaderProgram=e.shaderProgram,this.uniformMap=e.uniformMap,this.outputTexture=e.outputTexture,this.preExecute=e.preExecute,this.postExecute=e.postExecute,this.canceled=e.canceled,this.persists=g(e.persists,!1),this.pass=xe.COMPUTE,this.owner=e.owner}mK.prototype.execute=function(e){e.execute(this)};var Vc=mK;function Ft(e,t){this.x=g(e,0),this.y=g(t,0)}Ft.fromElements=function(e,t,n){return c(n)?(n.x=e,n.y=t,n):new Ft(e,t)};Ft.clone=function(e,t){if(c(e))return c(t)?(t.x=e.x,t.y=e.y,t):new Ft(e.x,e.y)};Ft.fromCartesian3=Ft.clone;Ft.fromCartesian4=Ft.clone;Ft.packedLength=2;Ft.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),t[n++]=e.x,t[n]=e.y,t};Ft.unpack=function(e,t,n){return C.defined("array",e),t=g(t,0),c(n)||(n=new Ft),n.x=e[t++],n.y=e[t],n};Ft.packArray=function(e,t){C.defined("array",e);let n=e.length,i=n*2;if(!c(t))t=new Array(i);else{if(!Array.isArray(t)&&t.length!==i)throw new w("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==i&&(t.length=i)}for(let o=0;o<n;++o)Ft.pack(e[o],t,o*2);return t};Ft.unpackArray=function(e,t){if(C.defined("array",e),C.typeOf.number.greaterThanOrEquals("array.length",e.length,2),e.length%2!==0)throw new w("array length must be a multiple of 2.");let n=e.length;c(t)?t.length=n/2:t=new Array(n/2);for(let i=0;i<n;i+=2){let o=i/2;t[o]=Ft.unpack(e,i,t[o])}return t};Ft.fromArray=Ft.unpack;Ft.maximumComponent=function(e){return C.typeOf.object("cartesian",e),Math.max(e.x,e.y)};Ft.minimumComponent=function(e){return C.typeOf.object("cartesian",e),Math.min(e.x,e.y)};Ft.minimumByComponent=function(e,t,n){return C.typeOf.object("first",e),C.typeOf.object("second",t),C.typeOf.object("result",n),n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n};Ft.maximumByComponent=function(e,t,n){return C.typeOf.object("first",e),C.typeOf.object("second",t),C.typeOf.object("result",n),n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n};Ft.clamp=function(e,t,n,i){C.typeOf.object("value",e),C.typeOf.object("min",t),C.typeOf.object("max",n),C.typeOf.object("result",i);let o=O.clamp(e.x,t.x,n.x),r=O.clamp(e.y,t.y,n.y);return i.x=o,i.y=r,i};Ft.magnitudeSquared=function(e){return C.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y};Ft.magnitude=function(e){return Math.sqrt(Ft.magnitudeSquared(e))};var TO=new Ft;Ft.distance=function(e,t){return C.typeOf.object("left",e),C.typeOf.object("right",t),Ft.subtract(e,t,TO),Ft.magnitude(TO)};Ft.distanceSquared=function(e,t){return C.typeOf.object("left",e),C.typeOf.object("right",t),Ft.subtract(e,t,TO),Ft.magnitudeSquared(TO)};Ft.normalize=function(e,t){C.typeOf.object("cartesian",e),C.typeOf.object("result",t);let n=Ft.magnitude(e);if(t.x=e.x/n,t.y=e.y/n,isNaN(t.x)||isNaN(t.y))throw new w("normalized result is not a number");return t};Ft.dot=function(e,t){return C.typeOf.object("left",e),C.typeOf.object("right",t),e.x*t.x+e.y*t.y};Ft.cross=function(e,t){return C.typeOf.object("left",e),C.typeOf.object("right",t),e.x*t.y-e.y*t.x};Ft.multiplyComponents=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.x=e.x*t.x,n.y=e.y*t.y,n};Ft.divideComponents=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.x=e.x/t.x,n.y=e.y/t.y,n};Ft.add=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.x=e.x+t.x,n.y=e.y+t.y,n};Ft.subtract=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.x=e.x-t.x,n.y=e.y-t.y,n};Ft.multiplyByScalar=function(e,t,n){return C.typeOf.object("cartesian",e),C.typeOf.number("scalar",t),C.typeOf.object("result",n),n.x=e.x*t,n.y=e.y*t,n};Ft.divideByScalar=function(e,t,n){return C.typeOf.object("cartesian",e),C.typeOf.number("scalar",t),C.typeOf.object("result",n),n.x=e.x/t,n.y=e.y/t,n};Ft.negate=function(e,t){return C.typeOf.object("cartesian",e),C.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t};Ft.abs=function(e,t){return C.typeOf.object("cartesian",e),C.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t};var pK=new Ft;Ft.lerp=function(e,t,n,i){return C.typeOf.object("start",e),C.typeOf.object("end",t),C.typeOf.number("t",n),C.typeOf.object("result",i),Ft.multiplyByScalar(t,n,pK),i=Ft.multiplyByScalar(e,1-n,i),Ft.add(pK,i,i)};var _K=new Ft,gK=new Ft;Ft.angleBetween=function(e,t){return C.typeOf.object("left",e),C.typeOf.object("right",t),Ft.normalize(e,_K),Ft.normalize(t,gK),O.acosClamped(Ft.dot(_K,gK))};var tCe=new Ft;Ft.mostOrthogonalAxis=function(e,t){C.typeOf.object("cartesian",e),C.typeOf.object("result",t);let n=Ft.normalize(e,tCe);return Ft.abs(n,n),n.x<=n.y?t=Ft.clone(Ft.UNIT_X,t):t=Ft.clone(Ft.UNIT_Y,t),t};Ft.equals=function(e,t){return e===t||c(e)&&c(t)&&e.x===t.x&&e.y===t.y};Ft.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]};Ft.equalsEpsilon=function(e,t,n,i){return e===t||c(e)&&c(t)&&O.equalsEpsilon(e.x,t.x,n,i)&&O.equalsEpsilon(e.y,t.y,n,i)};Ft.ZERO=Object.freeze(new Ft(0,0));Ft.ONE=Object.freeze(new Ft(1,1));Ft.UNIT_X=Object.freeze(new Ft(1,0));Ft.UNIT_Y=Object.freeze(new Ft(0,1));Ft.prototype.clone=function(e){return Ft.clone(this,e)};Ft.prototype.equals=function(e){return Ft.equals(this,e)};Ft.prototype.equalsEpsilon=function(e,t,n){return Ft.equalsEpsilon(this,e,t,n)};Ft.prototype.toString=function(){return`(${this.x}, ${this.y})`};var k=Ft;var nCe=new d,iCe=new d;function oCe(e,t,n,i,o){if(!c(e))throw new w("cartesian is required.");if(!c(t))throw new w("oneOverRadii is required.");if(!c(n))throw new w("oneOverRadiiSquared is required.");if(!c(i))throw new w("centerToleranceSquared is required.");let r=e.x,s=e.y,a=e.z,l=t.x,u=t.y,f=t.z,h=r*r*l*l,m=s*s*u*u,p=a*a*f*f,_=h+m+p,b=Math.sqrt(1/_),x=d.multiplyByScalar(e,b,nCe);if(_<i)return isFinite(b)?d.clone(x,o):void 0;let T=n.x,E=n.y,S=n.z,A=iCe;A.x=x.x*T*2,A.y=x.y*E*2,A.z=x.z*S*2;let v=(1-b)*d.magnitude(e)/(.5*d.magnitude(A)),D=0,R,P,L,F,y,I,M,B,U,V,W;do{v-=D,L=1/(1+v*T),F=1/(1+v*E),y=1/(1+v*S),I=L*L,M=F*F,B=y*y,U=I*L,V=M*F,W=B*y,R=h*I+m*M+p*B-1,P=h*U*T+m*V*E+p*W*S;let H=-2*P;D=R/H}while(Math.abs(R)>O.EPSILON12);return c(o)?(o.x=r*L,o.y=s*F,o.z=a*y,o):new d(r*L,s*F,a*y)}var Cx=oCe;function wo(e,t,n){this.longitude=g(e,0),this.latitude=g(t,0),this.height=g(n,0)}wo.fromRadians=function(e,t,n,i){return C.typeOf.number("longitude",e),C.typeOf.number("latitude",t),n=g(n,0),c(i)?(i.longitude=e,i.latitude=t,i.height=n,i):new wo(e,t,n)};wo.fromDegrees=function(e,t,n,i){return C.typeOf.number("longitude",e),C.typeOf.number("latitude",t),e=O.toRadians(e),t=O.toRadians(t),wo.fromRadians(e,t,n,i)};var rCe=new d,sCe=new d,aCe=new d;wo._ellipsoidOneOverRadii=new d(1/6378137,1/6378137,1/6356752314245179e-9);wo._ellipsoidOneOverRadiiSquared=new d(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9));wo._ellipsoidCenterToleranceSquared=O.EPSILON1;wo.fromCartesian=function(e,t,n){let i=c(t)?t.oneOverRadii:wo._ellipsoidOneOverRadii,o=c(t)?t.oneOverRadiiSquared:wo._ellipsoidOneOverRadiiSquared,r=c(t)?t._centerToleranceSquared:wo._ellipsoidCenterToleranceSquared,s=Cx(e,i,o,r,sCe);if(!c(s))return;let a=d.multiplyComponents(s,o,rCe);a=d.normalize(a,a);let l=d.subtract(e,s,aCe),u=Math.atan2(a.y,a.x),f=Math.asin(a.z),h=O.sign(d.dot(l,e))*d.magnitude(l);return c(n)?(n.longitude=u,n.latitude=f,n.height=h,n):new wo(u,f,h)};wo.toCartesian=function(e,t,n){return C.defined("cartographic",e),d.fromRadians(e.longitude,e.latitude,e.height,t,n)};wo.clone=function(e,t){if(c(e))return c(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new wo(e.longitude,e.latitude,e.height)};wo.equals=function(e,t){return e===t||c(e)&&c(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height};wo.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(t)&&Math.abs(e.longitude-t.longitude)<=n&&Math.abs(e.latitude-t.latitude)<=n&&Math.abs(e.height-t.height)<=n};wo.ZERO=Object.freeze(new wo(0,0,0));wo.prototype.clone=function(e){return wo.clone(this,e)};wo.prototype.equals=function(e){return wo.equals(this,e)};wo.prototype.equalsEpsilon=function(e,t){return wo.equalsEpsilon(this,e,t)};wo.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var re=wo;function bK(e,t,n,i){t=g(t,0),n=g(n,0),i=g(i,0),C.typeOf.number.greaterThanOrEquals("x",t,0),C.typeOf.number.greaterThanOrEquals("y",n,0),C.typeOf.number.greaterThanOrEquals("z",i,0),e._radii=new d(t,n,i),e._radiiSquared=new d(t*t,n*n,i*i),e._radiiToTheFourth=new d(t*t*t*t,n*n*n*n,i*i*i*i),e._oneOverRadii=new d(t===0?0:1/t,n===0?0:1/n,i===0?0:1/i),e._oneOverRadiiSquared=new d(t===0?0:1/(t*t),n===0?0:1/(n*n),i===0?0:1/(i*i)),e._minimumRadius=Math.min(t,n,i),e._maximumRadius=Math.max(t,n,i),e._centerToleranceSquared=O.EPSILON1,e._radiiSquared.z!==0&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function li(e,t,n){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,bK(this,e,t,n)}Object.defineProperties(li.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}});li.clone=function(e,t){if(!c(e))return;let n=e._radii;return c(t)?(d.clone(n,t._radii),d.clone(e._radiiSquared,t._radiiSquared),d.clone(e._radiiToTheFourth,t._radiiToTheFourth),d.clone(e._oneOverRadii,t._oneOverRadii),d.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new li(n.x,n.y,n.z)};li.fromCartesian3=function(e,t){return c(t)||(t=new li),c(e)&&bK(t,e.x,e.y,e.z),t};li.WGS84=Object.freeze(new li(6378137,6378137,6356752314245179e-9));li.UNIT_SPHERE=Object.freeze(new li(1,1,1));li.MOON=Object.freeze(new li(O.LUNAR_RADIUS,O.LUNAR_RADIUS,O.LUNAR_RADIUS));li._default=li.WGS84;Object.defineProperties(li,{default:{get:function(){return li._default},set:function(e){C.typeOf.object("value",e),li._default=e,d._ellipsoidRadiiSquared=e.radiiSquared,re._ellipsoidOneOverRadii=e.oneOverRadii,re._ellipsoidOneOverRadiiSquared=e.oneOverRadiiSquared,re._ellipsoidCenterToleranceSquared=e._centerToleranceSquared}}});li.prototype.clone=function(e){return li.clone(this,e)};li.packedLength=d.packedLength;li.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),d.pack(e._radii,t,n),t};li.unpack=function(e,t,n){C.defined("array",e),t=g(t,0);let i=d.unpack(e,t);return li.fromCartesian3(i,n)};li.prototype.geocentricSurfaceNormal=d.normalize;li.prototype.geodeticSurfaceNormalCartographic=function(e,t){C.typeOf.object("cartographic",e);let n=e.longitude,i=e.latitude,o=Math.cos(i),r=o*Math.cos(n),s=o*Math.sin(n),a=Math.sin(i);return c(t)||(t=new d),t.x=r,t.y=s,t.z=a,d.normalize(t,t)};li.prototype.geodeticSurfaceNormal=function(e,t){if(C.typeOf.object("cartesian",e),isNaN(e.x)||isNaN(e.y)||isNaN(e.z))throw new w("cartesian has a NaN component");if(!d.equalsEpsilon(e,d.ZERO,O.EPSILON14))return c(t)||(t=new d),t=d.multiplyComponents(e,this._oneOverRadiiSquared,t),d.normalize(t,t)};var cCe=new d,lCe=new d;li.prototype.cartographicToCartesian=function(e,t){let n=cCe,i=lCe;this.geodeticSurfaceNormalCartographic(e,n),d.multiplyComponents(this._radiiSquared,n,i);let o=Math.sqrt(d.dot(n,i));return d.divideByScalar(i,o,i),d.multiplyByScalar(n,e.height,n),c(t)||(t=new d),d.add(i,n,t)};li.prototype.cartographicArrayToCartesianArray=function(e,t){C.defined("cartographics",e);let n=e.length;c(t)?t.length=n:t=new Array(n);for(let i=0;i<n;i++)t[i]=this.cartographicToCartesian(e[i],t[i]);return t};var uCe=new d,fCe=new d,dCe=new d;li.prototype.cartesianToCartographic=function(e,t){let n=this.scaleToGeodeticSurface(e,fCe);if(!c(n))return;let i=this.geodeticSurfaceNormal(n,uCe),o=d.subtract(e,n,dCe),r=Math.atan2(i.y,i.x),s=Math.asin(i.z),a=O.sign(d.dot(o,e))*d.magnitude(o);return c(t)?(t.longitude=r,t.latitude=s,t.height=a,t):new re(r,s,a)};li.prototype.cartesianArrayToCartographicArray=function(e,t){C.defined("cartesians",e);let n=e.length;c(t)?t.length=n:t=new Array(n);for(let i=0;i<n;++i)t[i]=this.cartesianToCartographic(e[i],t[i]);return t};li.prototype.scaleToGeodeticSurface=function(e,t){return Cx(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)};li.prototype.scaleToGeocentricSurface=function(e,t){C.typeOf.object("cartesian",e),c(t)||(t=new d);let n=e.x,i=e.y,o=e.z,r=this._oneOverRadiiSquared,s=1/Math.sqrt(n*n*r.x+i*i*r.y+o*o*r.z);return d.multiplyByScalar(e,s,t)};li.prototype.transformPositionToScaledSpace=function(e,t){return c(t)||(t=new d),d.multiplyComponents(e,this._oneOverRadii,t)};li.prototype.transformPositionFromScaledSpace=function(e,t){return c(t)||(t=new d),d.multiplyComponents(e,this._radii,t)};li.prototype.equals=function(e){return this===e||c(e)&&d.equals(this._radii,e._radii)};li.prototype.toString=function(){return this._radii.toString()};li.prototype.getSurfaceNormalIntersectionWithZAxis=function(e,t,n){if(C.typeOf.object("position",e),!O.equalsEpsilon(this._radii.x,this._radii.y,O.EPSILON15))throw new w("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");C.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),t=g(t,0);let i=this._squaredXOverSquaredZ;if(c(n)||(n=new d),n.x=0,n.y=0,n.z=e.z*(1-i),!(Math.abs(n.z)>=this._radii.z-t))return n};var hCe=new d;li.prototype.getLocalCurvature=function(e,t){C.typeOf.object("surfacePosition",e),c(t)||(t=new k);let n=this.getSurfaceNormalIntersectionWithZAxis(e,0,hCe),i=d.distance(e,n),o=this.minimumRadius*i/this.maximumRadius**2,r=i*o**2;return k.fromElements(1/i,1/r,t)};var mCe=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],pCe=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function yK(e,t,n){C.typeOf.number("a",e),C.typeOf.number("b",t),C.typeOf.func("func",n);let i=.5*(t+e),o=.5*(t-e),r=0;for(let s=0;s<5;s++){let a=o*mCe[s];r+=pCe[s]*(n(i+a)+n(i-a))}return r*=o,r}li.prototype.surfaceArea=function(e){C.typeOf.object("rectangle",e);let t=e.west,n=e.east,i=e.south,o=e.north;for(;n<t;)n+=O.TWO_PI;let r=this._radiiSquared,s=r.x,a=r.y,l=r.z,u=s*a;return yK(i,o,function(f){let h=Math.cos(f),m=Math.sin(f);return Math.cos(f)*yK(t,n,function(p){let _=Math.cos(p),b=Math.sin(p);return Math.sqrt(u*m*m+l*(a*_*_+s*b*b)*h*h)})})};var Z=li;function CO(e){this._ellipsoid=g(e,Z.default),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(CO.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});CO.prototype.project=function(e,t){let n=this._semimajorAxis,i=e.longitude*n,o=e.latitude*n,r=e.height;return c(t)?(t.x=i,t.y=o,t.z=r,t):new d(i,o,r)};CO.prototype.unproject=function(e,t){if(!c(e))throw new w("cartesian is required");let n=this._oneOverSemimajorAxis,i=e.x*n,o=e.y*n,r=e.z;return c(t)?(t.longitude=i,t.latitude=o,t.height=r,t):new re(i,o,r)};var Ei=CO;var _Ce={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},Gt=Object.freeze(_Ce);function gCe(e,t,n){C.defined("array",e),C.defined("itemToFind",t),C.defined("comparator",n);let i=0,o=e.length-1,r,s;for(;i<=o;){if(r=~~((i+o)/2),s=n(e[r],t),s<0){i=r+1;continue}if(s>0){o=r-1;continue}return r}return~(o+1)}var Xo=gCe;function yCe(e,t,n,i,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=i,this.ut1MinusUtc=o}var Wy=yCe;function bCe(e){if(e===null||isNaN(e))throw new w("year is required and must be a number.");return e%4===0&&e%100!==0||e%400===0}var qd=bCe;var xK=[31,28,31,30,31,30,31,31,30,31,30,31];function xCe(e,t,n,i,o,r,s,a){e=g(e,1),t=g(t,1),n=g(n,1),i=g(i,0),o=g(o,0),r=g(r,0),s=g(s,0),a=g(a,!1),b(),x(),this.year=e,this.month=t,this.day=n,this.hour=i,this.minute=o,this.second=r,this.millisecond=s,this.isLeapSecond=a;function b(){C.typeOf.number.greaterThanOrEquals("Year",e,1),C.typeOf.number.lessThanOrEquals("Year",e,9999),C.typeOf.number.greaterThanOrEquals("Month",t,1),C.typeOf.number.lessThanOrEquals("Month",t,12),C.typeOf.number.greaterThanOrEquals("Day",n,1),C.typeOf.number.lessThanOrEquals("Day",n,31),C.typeOf.number.greaterThanOrEquals("Hour",i,0),C.typeOf.number.lessThanOrEquals("Hour",i,23),C.typeOf.number.greaterThanOrEquals("Minute",o,0),C.typeOf.number.lessThanOrEquals("Minute",o,59),C.typeOf.bool("IsLeapSecond",a),C.typeOf.number.greaterThanOrEquals("Second",r,0),C.typeOf.number.lessThanOrEquals("Second",r,a?60:59),C.typeOf.number.greaterThanOrEquals("Millisecond",s,0),C.typeOf.number.lessThan("Millisecond",s,1e3)}function x(){let T=t===2&&qd(e)?xK[t-1]+1:xK[t-1];if(n>T)throw new w("Month and Day represents invalid date")}}var vm=xCe;function TCe(e,t){this.julianDate=e,this.offset=t}var zi=TCe;var CCe={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:24000005e-1},Vn=Object.freeze(CCe);var ECe={UTC:0,TAI:1},zn=Object.freeze(ECe);var CK=new vm,EO=[31,28,31,30,31,30,31,31,30,31,30,31],wO=29;function mG(e,t){return It.compare(e.julianDate,t.julianDate)}var Ex=new zi;function AO(e){Ex.julianDate=e;let t=It.leapSeconds,n=Xo(t,Ex,mG);n<0&&(n=~n),n>=t.length&&(n=t.length-1);let i=t[n].offset;n>0&&It.secondsDifference(t[n].julianDate,e)>i&&(n--,i=t[n].offset),It.addSeconds(e,i,e)}function TK(e,t){Ex.julianDate=e;let n=It.leapSeconds,i=Xo(n,Ex,mG);if(i<0&&(i=~i),i===0)return It.addSeconds(e,-n[0].offset,t);if(i>=n.length)return It.addSeconds(e,-n[i-1].offset,t);let o=It.secondsDifference(n[i].julianDate,e);if(o===0)return It.addSeconds(e,-n[i].offset,t);if(!(o<=1))return It.addSeconds(e,-n[--i].offset,t)}function a_(e,t,n){let i=t/Vn.SECONDS_PER_DAY|0;return e+=i,t-=Vn.SECONDS_PER_DAY*i,t<0&&(e--,t+=Vn.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function pG(e,t,n,i,o,r,s){let a=(t-14)/12|0,l=e+4800+a,u=(1461*l/4|0)+(367*(t-2-12*a)/12|0)-(3*((l+100)/100|0)/4|0)+n-32075;i=i-12,i<0&&(i+=24);let f=r+(i*Vn.SECONDS_PER_HOUR+o*Vn.SECONDS_PER_MINUTE+s*Vn.SECONDS_PER_MILLISECOND);return f>=43200&&(u-=1),[u,f]}var wCe=/^(\d{4})$/,SCe=/^(\d{4})-(\d{2})$/,ACe=/^(\d{4})-?(\d{3})$/,vCe=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,DCe=/^(\d{4})-?(\d{2})-?(\d{2})$/,_G=/([Z+\-])?(\d{2})?:?(\d{2})?$/,ICe=/^(\d{2})(\.\d+)?/.source+_G.source,OCe=/^(\d{2}):?(\d{2})(\.\d+)?/.source+_G.source,PCe=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+_G.source,Mf="Invalid ISO 8601 date.";function It(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=g(e,0),t=g(t,0),n=g(n,zn.UTC);let i=e|0;t=t+(e-i)*Vn.SECONDS_PER_DAY,a_(i,t,this),n===zn.UTC&&AO(this)}It.fromGregorianDate=function(e,t){if(!(e instanceof vm))throw new w("date must be a valid GregorianDate.");let n=pG(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return c(t)?(a_(n[0],n[1],t),AO(t),t):new It(n[0],n[1],zn.UTC)};It.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new w("date must be a valid JavaScript Date.");let n=pG(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return c(t)?(a_(n[0],n[1],t),AO(t),t):new It(n[0],n[1],zn.UTC)};It.fromIso8601=function(e,t){if(typeof e!="string")throw new w(Mf);e=e.replace(",",".");let n=e.split("T"),i,o=1,r=1,s=0,a=0,l=0,u=0,f=n[0],h=n[1],m,p;if(!c(f))throw new w(Mf);let _;if(n=f.match(DCe),n!==null){if(_=f.split("-").length-1,_>0&&_!==2)throw new w(Mf);i=+n[1],o=+n[2],r=+n[3]}else if(n=f.match(SCe),n!==null)i=+n[1],o=+n[2];else if(n=f.match(wCe),n!==null)i=+n[1];else{let E;if(n=f.match(ACe),n!==null){if(i=+n[1],E=+n[2],p=qd(i),E<1||p&&E>366||!p&&E>365)throw new w(Mf)}else if(n=f.match(vCe),n!==null){i=+n[1];let S=+n[2],A=+n[3]||0;if(_=f.split("-").length-1,_>0&&(!c(n[3])&&_!==1||c(n[3])&&_!==2))throw new w(Mf);let v=new Date(Date.UTC(i,0,4));E=S*7+A-v.getUTCDay()-3}else throw new w(Mf);m=new Date(Date.UTC(i,0,1)),m.setUTCDate(E),o=m.getUTCMonth()+1,r=m.getUTCDate()}if(p=qd(i),o<1||o>12||r<1||(o!==2||!p)&&r>EO[o-1]||p&&o===2&&r>wO)throw new w(Mf);let b;if(c(h)){if(n=h.match(PCe),n!==null){if(_=h.split(":").length-1,_>0&&_!==2&&_!==3)throw new w(Mf);s=+n[1],a=+n[2],l=+n[3],u=+(n[4]||0)*1e3,b=5}else if(n=h.match(OCe),n!==null){if(_=h.split(":").length-1,_>2)throw new w(Mf);s=+n[1],a=+n[2],l=+(n[3]||0)*60,b=4}else if(n=h.match(ICe),n!==null)s=+n[1],a=+(n[2]||0)*60,b=3;else throw new w(Mf);if(a>=60||l>=61||s>24||s===24&&(a>0||l>0||u>0))throw new w(Mf);let E=n[b],S=+n[b+1],A=+(n[b+2]||0);switch(E){case"+":s=s-S,a=a-A;break;case"-":s=s+S,a=a+A;break;case"Z":break;default:a=a+new Date(Date.UTC(i,o-1,r,s,a)).getTimezoneOffset();break}}let x=l===60;for(x&&l--;a>=60;)a-=60,s++;for(;s>=24;)s-=24,r++;for(m=p&&o===2?wO:EO[o-1];r>m;)r-=m,o++,o>12&&(o-=12,i++),m=p&&o===2?wO:EO[o-1];for(;a<0;)a+=60,s--;for(;s<0;)s+=24,r--;for(;r<1;)o--,o<1&&(o+=12,i--),m=p&&o===2?wO:EO[o-1],r+=m;let T=pG(i,o,r,s,a,l,u);return c(t)?(a_(T[0],T[1],t),AO(t)):t=new It(T[0],T[1],zn.UTC),x&&It.addSeconds(t,1,t),t};It.now=function(e){return It.fromDate(new Date,e)};var SO=new It(0,0,zn.TAI);It.toGregorianDate=function(e,t){if(!c(e))throw new w("julianDate is required.");let n=!1,i=TK(e,SO);c(i)||(It.addSeconds(e,-1,SO),i=TK(SO,SO),n=!0);let o=i.dayNumber,r=i.secondsOfDay;r>=43200&&(o+=1);let s=o+68569|0,a=4*s/146097|0;s=s-((146097*a+3)/4|0)|0;let l=4e3*(s+1)/1461001|0;s=s-(1461*l/4|0)+31|0;let u=80*s/2447|0,f=s-(2447*u/80|0)|0;s=u/11|0;let h=u+2-12*s|0,m=100*(a-49)+l+s|0,p=r/Vn.SECONDS_PER_HOUR|0,_=r-p*Vn.SECONDS_PER_HOUR,b=_/Vn.SECONDS_PER_MINUTE|0;_=_-b*Vn.SECONDS_PER_MINUTE;let x=_|0,T=(_-x)/Vn.SECONDS_PER_MILLISECOND;return p+=12,p>23&&(p-=24),n&&(x+=1),c(t)?(t.year=m,t.month=h,t.day=f,t.hour=p,t.minute=b,t.second=x,t.millisecond=T,t.isLeapSecond=n,t):new vm(m,h,f,p,b,x,T,n)};It.toDate=function(e){if(!c(e))throw new w("julianDate is required.");let t=It.toGregorianDate(e,CK),n=t.second;return t.isLeapSecond&&(n-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,n,t.millisecond))};It.toIso8601=function(e,t){if(!c(e))throw new w("julianDate is required.");let n=It.toGregorianDate(e,CK),i=n.year,o=n.month,r=n.day,s=n.hour,a=n.minute,l=n.second,u=n.millisecond;i===1e4&&o===1&&r===1&&s===0&&a===0&&l===0&&u===0&&(i=9999,o=12,r=31,s=24);let f;return!c(t)&&u!==0?(f=(u*.01).toString().replace(".",""),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}.${f}Z`):!c(t)||t===0?`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}Z`:(f=(u*.01).toFixed(t).replace(".","").slice(0,t),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}.${f}Z`)};It.clone=function(e,t){if(c(e))return c(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new It(e.dayNumber,e.secondsOfDay,zn.TAI)};It.compare=function(e,t){if(!c(e))throw new w("left is required.");if(!c(t))throw new w("right is required.");let n=e.dayNumber-t.dayNumber;return n!==0?n:e.secondsOfDay-t.secondsOfDay};It.equals=function(e,t){return e===t||c(e)&&c(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay};It.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(t)&&Math.abs(It.secondsDifference(e,t))<=n};It.totalDays=function(e){if(!c(e))throw new w("julianDate is required.");return e.dayNumber+e.secondsOfDay/Vn.SECONDS_PER_DAY};It.secondsDifference=function(e,t){if(!c(e))throw new w("left is required.");if(!c(t))throw new w("right is required.");return(e.dayNumber-t.dayNumber)*Vn.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)};It.daysDifference=function(e,t){if(!c(e))throw new w("left is required.");if(!c(t))throw new w("right is required.");let n=e.dayNumber-t.dayNumber,i=(e.secondsOfDay-t.secondsOfDay)/Vn.SECONDS_PER_DAY;return n+i};It.computeTaiMinusUtc=function(e){Ex.julianDate=e;let t=It.leapSeconds,n=Xo(t,Ex,mG);return n<0&&(n=~n,--n,n<0&&(n=0)),t[n].offset};It.addSeconds=function(e,t,n){if(!c(e))throw new w("julianDate is required.");if(!c(t))throw new w("seconds is required.");if(!c(n))throw new w("result is required.");return a_(e.dayNumber,e.secondsOfDay+t,n)};It.addMinutes=function(e,t,n){if(!c(e))throw new w("julianDate is required.");if(!c(t))throw new w("minutes is required.");if(!c(n))throw new w("result is required.");let i=e.secondsOfDay+t*Vn.SECONDS_PER_MINUTE;return a_(e.dayNumber,i,n)};It.addHours=function(e,t,n){if(!c(e))throw new w("julianDate is required.");if(!c(t))throw new w("hours is required.");if(!c(n))throw new w("result is required.");let i=e.secondsOfDay+t*Vn.SECONDS_PER_HOUR;return a_(e.dayNumber,i,n)};It.addDays=function(e,t,n){if(!c(e))throw new w("julianDate is required.");if(!c(t))throw new w("days is required.");if(!c(n))throw new w("result is required.");let i=e.dayNumber+t;return a_(i,e.secondsOfDay,n)};It.lessThan=function(e,t){return It.compare(e,t)<0};It.lessThanOrEquals=function(e,t){return It.compare(e,t)<=0};It.greaterThan=function(e,t){return It.compare(e,t)>0};It.greaterThanOrEquals=function(e,t){return It.compare(e,t)>=0};It.prototype.clone=function(e){return It.clone(this,e)};It.prototype.equals=function(e){return It.equals(this,e)};It.prototype.equalsEpsilon=function(e,t){return It.equalsEpsilon(this,e,t)};It.prototype.toString=function(){return It.toIso8601(this)};It.leapSeconds=[new zi(new It(2441317,43210,zn.TAI),10),new zi(new It(2441499,43211,zn.TAI),11),new zi(new It(2441683,43212,zn.TAI),12),new zi(new It(2442048,43213,zn.TAI),13),new zi(new It(2442413,43214,zn.TAI),14),new zi(new It(2442778,43215,zn.TAI),15),new zi(new It(2443144,43216,zn.TAI),16),new zi(new It(2443509,43217,zn.TAI),17),new zi(new It(2443874,43218,zn.TAI),18),new zi(new It(2444239,43219,zn.TAI),19),new zi(new It(2444786,43220,zn.TAI),20),new zi(new It(2445151,43221,zn.TAI),21),new zi(new It(2445516,43222,zn.TAI),22),new zi(new It(2446247,43223,zn.TAI),23),new zi(new It(2447161,43224,zn.TAI),24),new zi(new It(2447892,43225,zn.TAI),25),new zi(new It(2448257,43226,zn.TAI),26),new zi(new It(2448804,43227,zn.TAI),27),new zi(new It(2449169,43228,zn.TAI),28),new zi(new It(2449534,43229,zn.TAI),29),new zi(new It(2450083,43230,zn.TAI),30),new zi(new It(2450630,43231,zn.TAI),31),new zi(new It(2451179,43232,zn.TAI),32),new zi(new It(2453736,43233,zn.TAI),33),new zi(new It(2454832,43234,zn.TAI),34),new zi(new It(2456109,43235,zn.TAI),35),new zi(new It(2457204,43236,zn.TAI),36),new zi(new It(2457754,43237,zn.TAI),37)];var K=It;var VK=Mr(Sl(),1);function RCe(e){return(e.length===0||e[e.length-1]!=="/")&&(e=`${e}/`),e}var OO=RCe;function IK(e,t){if(e===null||typeof e!="object")return e;t=g(t,!1);let n=new e.constructor;for(let i in e)if(e.hasOwnProperty(i)){let o=e[i];t&&(o=IK(o,t)),n[i]=o}return n}var ze=IK;function OK(e,t,n){n=g(n,!1);let i={},o=c(e),r=c(t),s,a,l;if(o)for(s in e)e.hasOwnProperty(s)&&(a=e[s],r&&n&&typeof a=="object"&&t.hasOwnProperty(s)?(l=t[s],typeof l=="object"?i[s]=OK(a,l,n):i[s]=a):i[s]=a);if(r)for(s in t)t.hasOwnProperty(s)&&!i.hasOwnProperty(s)&&(l=t[s],i[s]=l);return i}var bt=OK;function MCe(){let e,t,n=new Promise(function(i,o){e=i,t=o});return{resolve:e,reject:t,promise:n}}var Al=MCe;var PK=Mr(Sl(),1);function gG(e,t){let n;return typeof document!="undefined"&&(n=document),gG._implementation(e,t,n)}gG._implementation=function(e,t,n){if(!c(e))throw new w("relative uri is required.");if(!c(t)){if(typeof n=="undefined")return e;t=g(n.baseURI,n.location.href)}let i=new PK.default(e);return i.scheme()!==""?i.toString():i.absoluteTo(t).toString()};var Dm=gG;var RK=Mr(Sl(),1);function LCe(e,t){if(!c(e))throw new w("uri is required.");let n="",i=e.lastIndexOf("/");return i!==-1&&(n=e.substring(0,i+1)),t&&(e=new RK.default(e),e.query().length!==0&&(n+=`?${e.query()}`),e.fragment().length!==0&&(n+=`#${e.fragment()}`)),n}var PO=LCe;var MK=Mr(Sl(),1);function NCe(e){if(!c(e))throw new w("uri is required.");let t=new MK.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),i=n.lastIndexOf("."),i===-1?n="":n=n.substr(i+1),n}var Ax=NCe;var LK={};function FCe(e,t,n){c(t)||(t=e.width),c(n)||(n=e.height);let i=LK[t];c(i)||(i={},LK[t]=i);let o=i[n];if(!c(o)){let r=document.createElement("canvas");r.width=t,r.height=n,o=r.getContext("2d",{willReadFrequently:!0}),o.globalCompositeOperation="copy",i[n]=o}return o.drawImage(e,0,0,t,n),o.getImageData(0,0,t,n).data}var Yd=FCe;var BCe=/^blob:/i;function kCe(e){return C.typeOf.string("uri",e),BCe.test(e)}var vx=kCe;var Xd;function UCe(e){c(Xd)||(Xd=document.createElement("a")),Xd.href=window.location.href;let t=Xd.host,n=Xd.protocol;return Xd.href=e,Xd.href=Xd.href,n!==Xd.protocol||t!==Xd.host}var qy=UCe;var zCe=/^data:/i;function VCe(e){return C.typeOf.string("uri",e),zCe.test(e)}var c_=VCe;function HCe(e){let t=document.createElement("script");return t.async=!0,t.src=e,new Promise((n,i)=>{window.crossOriginIsolated&&t.setAttribute("crossorigin","anonymous");let o=document.getElementsByTagName("head")[0];t.onload=function(){t.onload=void 0,o.removeChild(t),n()},t.onerror=function(r){i(r)},o.appendChild(t)})}var Dx=HCe;function GCe(e){if(!c(e))throw new w("obj is required.");let t="";for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],o=`${encodeURIComponent(n)}=`;if(Array.isArray(i))for(let r=0,s=i.length;r<s;++r)t+=`${o+encodeURIComponent(i[r])}&`;else t+=`${o+encodeURIComponent(i)}&`}return t=t.slice(0,-1),t}var Ix=GCe;function jCe(e){if(!c(e))throw new w("queryString is required.");let t={};if(e==="")return t;let n=e.replace(/\+/g,"%20").split(/[&;]/);for(let i=0,o=n.length;i<o;++i){let r=n[i].split("="),s=decodeURIComponent(r[0]),a=r[1];c(a)?a=decodeURIComponent(a):a="";let l=t[s];typeof l=="string"?t[s]=[l,a]:Array.isArray(l)?l.push(a):t[s]=a}return t}var Au=jCe;var WCe={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5},qn=Object.freeze(WCe);var qCe={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3},is=Object.freeze(qCe);function RO(e){e=g(e,g.EMPTY_OBJECT);let t=g(e.throttleByServer,!1),n=g(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=g(e.priority,0),this.throttle=n,this.throttleByServer=t,this.type=g(e.type,is.OTHER),this.serverKey=e.serverKey,this.state=qn.UNISSUED,this.deferred=void 0,this.cancelled=!1}RO.prototype.cancel=function(){this.cancelled=!0};RO.prototype.clone=function(e){return c(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=qn.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new RO(this)};var Ko=RO;function YCe(e){let t={};if(!e)return t;let n=e.split(`\r
| `);for(let i=0;i<n.length;++i){let o=n[i],r=o.indexOf(": ");if(r>0){let s=o.substring(0,r),a=o.substring(r+2);t[s]=a}}return t}var MO=YCe;function NK(e,t,n){this.statusCode=e,this.response=t,this.responseHeaders=n,typeof this.responseHeaders=="string"&&(this.responseHeaders=MO(this.responseHeaders))}NK.prototype.toString=function(){let e="Request has failed.";return c(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};var Im=NK;var NO=Mr(Sl(),1);function tS(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}Object.defineProperties(tS.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}});tS.prototype.addEventListener=function(e,t){C.typeOf.func("listener",e),this._listeners.push(e),this._scopes.push(t);let n=this;return function(){n.removeEventListener(e,t)}};tS.prototype.removeEventListener=function(e,t){C.typeOf.func("listener",e);let n=this._listeners,i=this._scopes,o=-1;for(let r=0;r<n.length;r++)if(n[r]===e&&i[r]===t){o=r;break}return o!==-1?(this._insideRaiseEvent?(this._toRemove.push(o),n[o]=void 0,i[o]=void 0):(n.splice(o,1),i.splice(o,1)),!0):!1};function XCe(e,t){return t-e}tS.prototype.raiseEvent=function(){this._insideRaiseEvent=!0;let e,t=this._listeners,n=this._scopes,i=t.length;for(e=0;e<i;e++){let r=t[e];c(r)&&t[e].apply(n[e],arguments)}let o=this._toRemove;if(i=o.length,i>0){for(o.sort(XCe),e=0;e<i;e++){let r=o[e];t.splice(r,1),n.splice(r,1)}o.length=0}this._insideRaiseEvent=!1};var fe=tS;function Yy(e){C.typeOf.object("options",e),C.defined("options.comparator",e.comparator),this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}Object.defineProperties(Yy.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){C.typeOf.number.greaterThanOrEquals("maximumLength",e,0);let t=this._length;if(e<t){let n=this._array;for(let i=e;i<t;++i)n[i]=void 0;this._length=e,n.length=e}this._maximumLength=e}},comparator:{get:function(){return this._comparator}}});function yG(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}Yy.prototype.reserve=function(e){e=g(e,this._length),this._array.length=e};Yy.prototype.heapify=function(e){e=g(e,0);let t=this._length,n=this._comparator,i=this._array,o=-1,r=!0;for(;r;){let s=2*(e+1),a=s-1;a<t&&n(i[a],i[e])<0?o=a:o=e,s<t&&n(i[s],i[o])<0&&(o=s),o!==e?(yG(i,o,e),e=o):r=!1}};Yy.prototype.resort=function(){let e=this._length;for(let t=Math.ceil(e/2);t>=0;--t)this.heapify(t)};Yy.prototype.insert=function(e){C.defined("element",e);let t=this._array,n=this._comparator,i=this._maximumLength,o=this._length++;for(o<t.length?t[o]=e:t.push(e);o!==0;){let s=Math.floor((o-1)/2);if(n(t[o],t[s])<0)yG(t,o,s),o=s;else break}let r;return c(i)&&this._length>i&&(r=t[i],this._length=i),r};Yy.prototype.pop=function(e){if(e=g(e,0),this._length===0)return;C.typeOf.number.lessThan("index",e,this._length);let t=this._array,n=t[e];return yG(t,e,--this._length),this.heapify(e),t[this._length]=void 0,n};var LO=Yy;function KCe(e,t){return e.priority-t.priority}var ji={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},Ox=20,Sa=new LO({comparator:KCe});Sa.maximumLength=Ox;Sa.reserve(Ox);var Kd=[],Om={},$Ce=typeof document!="undefined"?new NO.default(document.location.href):new NO.default,FO=new fe;function Mo(){}Mo.maximumRequests=50;Mo.maximumRequestsPerServer=18;Mo.requestsByServer={};Mo.throttleRequests=!0;Mo.debugShowStatistics=!1;Mo.requestCompletedEvent=FO;Object.defineProperties(Mo,{statistics:{get:function(){return ji}},priorityHeapLength:{get:function(){return Ox},set:function(e){if(e<Ox)for(;Sa.length>e;){let t=Sa.pop();Xy(t)}Ox=e,Sa.maximumLength=e,Sa.reserve(e)}}});function FK(e){c(e.priorityFunction)&&(e.priority=e.priorityFunction())}Mo.serverHasOpenSlots=function(e,t){t=g(t,1);let n=g(Mo.requestsByServer[e],Mo.maximumRequestsPerServer);return Om[e]+t<=n};Mo.heapHasOpenSlots=function(e){return Sa.length+e<=Ox};function BK(e){return e.state===qn.UNISSUED&&(e.state=qn.ISSUED,e.deferred=Al()),e.deferred.promise}function ZCe(e){return function(t){if(e.state===qn.CANCELLED)return;let n=e.deferred;--ji.numberOfActiveRequests,--Om[e.serverKey],FO.raiseEvent(),e.state=qn.RECEIVED,e.deferred=void 0,n.resolve(t)}}function JCe(e){return function(t){e.state!==qn.CANCELLED&&(++ji.numberOfFailedRequests,--ji.numberOfActiveRequests,--Om[e.serverKey],FO.raiseEvent(t),e.state=qn.FAILED,e.deferred.reject(t))}}function kK(e){let t=BK(e);return e.state=qn.ACTIVE,Kd.push(e),++ji.numberOfActiveRequests,++ji.numberOfActiveRequestsEver,++Om[e.serverKey],e.requestFunction().then(ZCe(e)).catch(JCe(e)),t}function Xy(e){let t=e.state===qn.ACTIVE;if(e.state=qn.CANCELLED,++ji.numberOfCancelledRequests,c(e.deferred)){let n=e.deferred;e.deferred=void 0,n.reject()}t&&(--ji.numberOfActiveRequests,--Om[e.serverKey],++ji.numberOfCancelledActiveRequests),c(e.cancelFunction)&&e.cancelFunction()}Mo.update=function(){let e,t,n=0,i=Kd.length;for(e=0;e<i;++e){if(t=Kd[e],t.cancelled&&Xy(t),t.state!==qn.ACTIVE){++n;continue}n>0&&(Kd[e-n]=t)}Kd.length-=n;let o=Sa.internalArray,r=Sa.length;for(e=0;e<r;++e)FK(o[e]);Sa.resort();let s=Math.max(Mo.maximumRequests-Kd.length,0),a=0;for(;a<s&&Sa.length>0;){if(t=Sa.pop(),t.cancelled){Xy(t);continue}if(t.throttleByServer&&!Mo.serverHasOpenSlots(t.serverKey)){Xy(t);continue}kK(t),++a}QCe()};Mo.getServerKey=function(e){C.typeOf.string("url",e);let t=new NO.default(e);t.scheme()===""&&(t=t.absoluteTo($Ce),t.normalize());let n=t.authority();/:/.test(n)||(n=`${n}:${t.scheme()==="https"?"443":"80"}`);let i=Om[n];return c(i)||(Om[n]=0),n};Mo.request=function(e){if(C.typeOf.object("request",e),C.typeOf.string("request.url",e.url),C.typeOf.func("request.requestFunction",e.requestFunction),c_(e.url)||vx(e.url))return FO.raiseEvent(),e.state=qn.RECEIVED,e.requestFunction();if(++ji.numberOfAttemptedRequests,c(e.serverKey)||(e.serverKey=Mo.getServerKey(e.url)),Mo.throttleRequests&&e.throttleByServer&&!Mo.serverHasOpenSlots(e.serverKey))return;if(!Mo.throttleRequests||!e.throttle)return kK(e);if(Kd.length>=Mo.maximumRequests)return;FK(e);let t=Sa.insert(e);if(c(t)){if(t===e)return;Xy(t)}return BK(e)};function QCe(){Mo.debugShowStatistics&&(ji.numberOfActiveRequests===0&&ji.lastNumberOfActiveRequests>0&&(ji.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${ji.numberOfAttemptedRequests}`),ji.numberOfAttemptedRequests=0),ji.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${ji.numberOfCancelledRequests}`),ji.numberOfCancelledRequests=0),ji.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${ji.numberOfCancelledActiveRequests}`),ji.numberOfCancelledActiveRequests=0),ji.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${ji.numberOfFailedRequests}`),ji.numberOfFailedRequests=0)),ji.lastNumberOfActiveRequests=ji.numberOfActiveRequests)}Mo.clearForSpecs=function(){for(;Sa.length>0;){let t=Sa.pop();Xy(t)}let e=Kd.length;for(let t=0;t<e;++t)Xy(Kd[t]);Kd.length=0,Om={},ji.numberOfAttemptedRequests=0,ji.numberOfActiveRequests=0,ji.numberOfCancelledRequests=0,ji.numberOfCancelledActiveRequests=0,ji.numberOfFailedRequests=0,ji.numberOfActiveRequestsEver=0,ji.lastNumberOfActiveRequests=0};Mo.numberOfActiveRequestsByServer=function(e){return Om[e]};Mo.requestHeap=Sa;var tc=Mo;var UK=Mr(Sl(),1);var nS={},Px={};nS.add=function(e,t){if(!c(e))throw new w("host is required.");if(!c(t)||t<=0)throw new w("port is required to be greater than 0.");let n=`${e.toLowerCase()}:${t}`;c(Px[n])||(Px[n]=!0)};nS.remove=function(e,t){if(!c(e))throw new w("host is required.");if(!c(t)||t<=0)throw new w("port is required to be greater than 0.");let n=`${e.toLowerCase()}:${t}`;c(Px[n])&&delete Px[n]};function eEe(e){let t=new UK.default(e);t.normalize();let n=t.authority();if(n.length!==0){if(t.authority(n),n.indexOf("@")!==-1&&(n=n.split("@")[1]),n.indexOf(":")===-1){let i=t.scheme();if(i.length===0&&(i=window.location.protocol,i=i.substring(0,i.length-1)),i==="http")n+=":80";else if(i==="https")n+=":443";else return}return n}}nS.contains=function(e){if(!c(e))throw new w("url is required.");let t=eEe(e);return!!(c(t)&&c(Px[t]))};nS.clear=function(){Px={}};var iS=nS;var HK=function(){try{let e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob",e.responseType==="blob"}catch{return!1}}();function Dt(e){e=g(e,g.EMPTY_OBJECT),typeof e=="string"&&(e={url:e}),C.typeOf.string("options.url",e.url),this._url=void 0,this._templateValues=$d(e.templateValues,{}),this._queryParameters=$d(e.queryParameters,{}),this.headers=$d(e.headers,{}),this.request=g(e.request,new Ko),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=g(e.retryAttempts,0),this._retryCount=0,g(e.parseUrl,!0)?this.parseUrl(e.url,!0,!0):this._url=e.url,this._credits=e.credits}function $d(e,t){return c(e)?ze(e):t}Dt.createIfNeeded=function(e){return e instanceof Dt?e.getDerivedResource({request:e.request}):typeof e!="string"?e:new Dt({url:e})};var Rx;Dt.supportsImageBitmapOptions=function(){return c(Rx)?Rx:typeof createImageBitmap!="function"?(Rx=Promise.resolve(!1),Rx):(Rx=Dt.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC"}).then(function(t){let n={imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"};return Promise.all([createImageBitmap(t,n),createImageBitmap(t)])}).then(function(t){let n=Yd(t[0]),i=Yd(t[1]);return n[1]!==i[1]}).catch(function(){return!1}),Rx)};Object.defineProperties(Dt,{isBlobSupported:{get:function(){return HK}}});Object.defineProperties(Dt.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){this.parseUrl(e,!1,!1)}},extension:{get:function(){return Ax(this._url)}},isDataUri:{get:function(){return c_(this._url)}},isBlobUri:{get:function(){return vx(this._url)}},isCrossOriginUrl:{get:function(){return qy(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}},credits:{get:function(){return this._credits}}});Dt.prototype.toString=function(){return this.getUrlComponent(!0,!0)};Dt.prototype.parseUrl=function(e,t,n,i){let o=new VK.default(e),r=tEe(o.query());this._queryParameters=t?kO(r,this.queryParameters,n):r,o.search(""),o.fragment(""),c(i)&&o.scheme()===""&&(o=o.absoluteTo(Dm(i))),this._url=o.toString()};function tEe(e){return e.length===0?{}:e.indexOf("=")===-1?{[e]:void 0}:Au(e)}function kO(e,t,n){if(!n)return bt(e,t);let i=ze(e,!0);for(let o in t)if(t.hasOwnProperty(o)){let r=i[o],s=t[o];c(r)?(Array.isArray(r)||(r=i[o]=[r]),i[o]=r.concat(s)):i[o]=Array.isArray(s)?s.slice():s}return i}Dt.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;let n=this._url;e&&(n=`${n}${nEe(this.queryParameters)}`),n=n.replace(/%7B/g,"{").replace(/%7D/g,"}");let i=this._templateValues;return Object.keys(i).length>0&&(n=n.replace(/{(.*?)}/g,function(o,r){let s=i[r];return c(s)?encodeURIComponent(s):o})),t&&c(this.proxy)&&(n=this.proxy.getURL(n)),n};function nEe(e){let t=Object.keys(e);return t.length===0?"":t.length===1&&!c(e[t[0]])?`?${t[0]}`:`?${Ix(e)}`}Dt.prototype.setQueryParameters=function(e,t){t?this._queryParameters=kO(this._queryParameters,e,!1):this._queryParameters=kO(e,this._queryParameters,!1)};Dt.prototype.appendQueryParameters=function(e){this._queryParameters=kO(e,this._queryParameters,!0)};Dt.prototype.setTemplateValues=function(e,t){t?this._templateValues=bt(this._templateValues,e):this._templateValues=bt(e,this._templateValues)};Dt.prototype.getDerivedResource=function(e){let t=this.clone();if(t._retryCount=0,c(e.url)){let n=g(e.preserveQueryParameters,!1);t.parseUrl(e.url,!0,n,this._url)}return c(e.queryParameters)&&(t._queryParameters=bt(e.queryParameters,t.queryParameters)),c(e.templateValues)&&(t._templateValues=bt(e.templateValues,t.templateValues)),c(e.headers)&&(t.headers=bt(e.headers,t.headers)),c(e.proxy)&&(t.proxy=e.proxy),c(e.request)&&(t.request=e.request),c(e.retryCallback)&&(t.retryCallback=e.retryCallback),c(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t};Dt.prototype.retryOnError=function(e){let t=this.retryCallback;if(typeof t!="function"||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);let n=this;return Promise.resolve(t(this,e)).then(function(i){return++n._retryCount,i})};Dt.prototype.clone=function(e){return c(e)?(e._url=this._url,e._queryParameters=ze(this._queryParameters),e._templateValues=ze(this._templateValues),e.headers=ze(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e):new Dt({url:this._url,queryParameters:this.queryParameters,templateValues:this.templateValues,headers:this.headers,proxy:this.proxy,retryCallback:this.retryCallback,retryAttempts:this.retryAttempts,request:this.request.clone(),parseUrl:!1,credits:c(this.credits)?this.credits.slice():void 0})};Dt.prototype.getBaseUri=function(e){return PO(this.getUrlComponent(e),e)};Dt.prototype.appendForwardSlash=function(){this._url=OO(this._url)};Dt.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})};Dt.fetchArrayBuffer=function(e){return new Dt(e).fetchArrayBuffer()};Dt.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})};Dt.fetchBlob=function(e){return new Dt(e).fetchBlob()};Dt.prototype.fetchImage=function(e){e=g(e,g.EMPTY_OBJECT);let t=g(e.preferImageBitmap,!1),n=g(e.preferBlob,!1),i=g(e.flipY,!1),o=g(e.skipColorSpaceConversion,!1);if(xG(this.request),!HK||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return bG({resource:this,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:t});let r=this.fetchBlob();if(!c(r))return;let s,a,l,u;return Dt.supportsImageBitmapOptions().then(function(f){return s=f,a=s&&t,r}).then(function(f){if(!c(f))return;if(u=f,a)return Dt.createImageBitmapFromBlob(f,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o});let h=window.URL.createObjectURL(f);return l=new Dt({url:h}),bG({resource:l,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:!1})}).then(function(f){if(c(f))return f.blob=u,a||window.URL.revokeObjectURL(l.url),f}).catch(function(f){return c(l)&&window.URL.revokeObjectURL(l.url),f.blob=u,Promise.reject(f)})};function bG(e){let t=e.resource,n=e.flipY,i=e.skipColorSpaceConversion,o=e.preferImageBitmap,r=t.request;r.url=t.url,r.requestFunction=function(){let a=!1;!t.isDataUri&&!t.isBlobUri&&(a=t.isCrossOriginUrl);let l=Al();return Dt._Implementations.createImage(r,a,l,n,i,o),l.promise};let s=tc.request(r);if(c(s))return s.catch(function(a){return r.state!==qn.FAILED?Promise.reject(a):t.retryOnError(a).then(function(l){return l?(r.state=qn.UNISSUED,r.deferred=void 0,bG({resource:t,flipY:n,skipColorSpaceConversion:i,preferImageBitmap:o})):Promise.reject(a)})})}Dt.fetchImage=function(e){return new Dt(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})};Dt.prototype.fetchText=function(){return this.fetch({responseType:"text"})};Dt.fetchText=function(e){return new Dt(e).fetchText()};Dt.prototype.fetchJson=function(){let e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(c(e))return e.then(function(t){if(c(t))return JSON.parse(t)})};Dt.fetchJson=function(e){return new Dt(e).fetchJson()};Dt.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})};Dt.fetchXML=function(e){return new Dt(e).fetchXML()};Dt.prototype.fetchJsonp=function(e){e=g(e,"callback"),xG(this.request);let t;do t=`loadJsonp${O.nextRandomNumber().toString().substring(2,8)}`;while(c(window[t]));return GK(this,e,t)};function GK(e,t,n){let i={};i[t]=n,e.setQueryParameters(i);let o=e.request,r=e.url;o.url=r,o.requestFunction=function(){let a=Al();return window[n]=function(l){a.resolve(l);try{delete window[n]}catch{window[n]=void 0}},Dt._Implementations.loadAndExecuteScript(r,n,a),a.promise};let s=tc.request(o);if(c(s))return s.catch(function(a){return o.state!==qn.FAILED?Promise.reject(a):e.retryOnError(a).then(function(l){return l?(o.state=qn.UNISSUED,o.deferred=void 0,GK(e,t,n)):Promise.reject(a)})})}Dt.fetchJsonp=function(e){return new Dt(e).fetchJsonp(e.callbackParameterName)};Dt.prototype._makeRequest=function(e){let t=this;xG(t.request);let n=t.request,i=t.url;n.url=i,n.requestFunction=function(){let r=e.responseType,s=bt(e.headers,t.headers),a=e.overrideMimeType,l=e.method,u=e.data,f=Al(),h=Dt._Implementations.loadWithXhr(i,r,l,u,s,f,a);return c(h)&&c(h.abort)&&(n.cancelFunction=function(){h.abort()}),f.promise};let o=tc.request(n);if(c(o))return o.then(function(r){return n.cancelFunction=void 0,r}).catch(function(r){return n.cancelFunction=void 0,n.state!==qn.FAILED?Promise.reject(r):t.retryOnError(r).then(function(s){return s?(n.state=qn.UNISSUED,n.deferred=void 0,t.fetch(e)):Promise.reject(r)})})};function xG(e){if(e.state===qn.ISSUED||e.state===qn.ACTIVE)throw new ie("The Resource is already being fetched.");e.state=qn.UNISSUED,e.deferred=void 0}var iEe=/^data:(.*?)(;base64)?,(.*)$/;function BO(e,t){let n=decodeURIComponent(t);return e?atob(n):n}function zK(e,t){let n=BO(e,t),i=new ArrayBuffer(n.length),o=new Uint8Array(i);for(let r=0;r<n.length;r++)o[r]=n.charCodeAt(r);return i}function oEe(e,t){t=g(t,"");let n=e[1],i=!!e[2],o=e[3],r,s;switch(t){case"":case"text":return BO(i,o);case"arraybuffer":return zK(i,o);case"blob":return r=zK(i,o),new Blob([r],{type:n});case"document":return s=new DOMParser,s.parseFromString(BO(i,o),n);case"json":return JSON.parse(BO(i,o));default:throw new w(`Unhandled responseType: ${t}`)}}Dt.prototype.fetch=function(e){return e=$d(e,{}),e.method="GET",this._makeRequest(e)};Dt.fetch=function(e){return new Dt(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Dt.prototype.delete=function(e){return e=$d(e,{}),e.method="DELETE",this._makeRequest(e)};Dt.delete=function(e){return new Dt(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})};Dt.prototype.head=function(e){return e=$d(e,{}),e.method="HEAD",this._makeRequest(e)};Dt.head=function(e){return new Dt(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Dt.prototype.options=function(e){return e=$d(e,{}),e.method="OPTIONS",this._makeRequest(e)};Dt.options=function(e){return new Dt(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Dt.prototype.post=function(e,t){return C.defined("data",e),t=$d(t,{}),t.method="POST",t.data=e,this._makeRequest(t)};Dt.post=function(e){return new Dt(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Dt.prototype.put=function(e,t){return C.defined("data",e),t=$d(t,{}),t.method="PUT",t.data=e,this._makeRequest(t)};Dt.put=function(e){return new Dt(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Dt.prototype.patch=function(e,t){return C.defined("data",e),t=$d(t,{}),t.method="PATCH",t.data=e,this._makeRequest(t)};Dt.patch=function(e){return new Dt(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Dt._Implementations={};Dt._Implementations.loadImageElement=function(e,t,n){let i=new Image;i.onload=function(){i.naturalWidth===0&&i.naturalHeight===0&&i.width===0&&i.height===0&&(i.width=300,i.height=150),n.resolve(i)},i.onerror=function(o){n.reject(o)},t&&(iS.contains(e)?i.crossOrigin="use-credentials":i.crossOrigin=""),i.src=e};Dt._Implementations.createImage=function(e,t,n,i,o,r){let s=e.url;Dt.supportsImageBitmapOptions().then(function(a){if(!(a&&r)){Dt._Implementations.loadImageElement(s,t,n);return}let l="blob",u="GET",f=Al(),h=Dt._Implementations.loadWithXhr(s,l,u,void 0,void 0,f,void 0,void 0,void 0);return c(h)&&c(h.abort)&&(e.cancelFunction=function(){h.abort()}),f.promise.then(function(m){if(!c(m)){n.reject(new ie(`Successfully retrieved ${s} but it contained no content.`));return}return Dt.createImageBitmapFromBlob(m,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o})}).then(function(m){n.resolve(m)})}).catch(function(a){n.reject(a)})};Dt.createImageBitmapFromBlob=function(e,t){return C.defined("options",t),C.typeOf.bool("options.flipY",t.flipY),C.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),C.typeOf.bool("options.skipColorSpaceConversion",t.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:t.skipColorSpaceConversion?"none":"default"})};function rEe(e,t,n,i,o,r,s){fetch(e,{method:n,headers:o}).then(async a=>{if(!a.ok){let l={};a.headers.forEach((u,f)=>{l[f]=u}),r.reject(new Im(a.status,a,l));return}switch(t){case"text":r.resolve(a.text());break;case"json":r.resolve(a.json());break;default:r.resolve(new Uint8Array(await a.arrayBuffer()).buffer);break}}).catch(()=>{r.reject(new Im)})}var sEe=typeof XMLHttpRequest=="undefined";Dt._Implementations.loadWithXhr=function(e,t,n,i,o,r,s){let a=iEe.exec(e);if(a!==null){r.resolve(oEe(a,t));return}if(sEe){rEe(e,t,n,i,o,r,s);return}let l=new XMLHttpRequest;if(iS.contains(e)&&(l.withCredentials=!0),l.open(n,e,!0),c(s)&&c(l.overrideMimeType)&&l.overrideMimeType(s),c(o))for(let f in o)o.hasOwnProperty(f)&&l.setRequestHeader(f,o[f]);c(t)&&(l.responseType=t);let u=!1;return typeof e=="string"&&(u=e.indexOf("file://")===0||typeof window!="undefined"&&window.location.origin==="file://"),l.onload=function(){if((l.status<200||l.status>=300)&&!(u&&l.status===0)){r.reject(new Im(l.status,l.response,l.getAllResponseHeaders()));return}let f=l.response,h=l.responseType;if(n==="HEAD"||n==="OPTIONS"){let p=l.getAllResponseHeaders().trim().split(/[\r\n]+/),_={};p.forEach(function(b){let x=b.split(": "),T=x.shift();_[T]=x.join(": ")}),r.resolve(_);return}if(l.status===204)r.resolve(void 0);else if(c(f)&&(!c(t)||h===t))r.resolve(f);else if(t==="json"&&typeof f=="string")try{r.resolve(JSON.parse(f))}catch(m){r.reject(m)}else(h===""||h==="document")&&c(l.responseXML)&&l.responseXML.hasChildNodes()?r.resolve(l.responseXML):(h===""||h==="text")&&c(l.responseText)?r.resolve(l.responseText):r.reject(new ie("Invalid XMLHttpRequest response type."))},l.onerror=function(f){r.reject(new Im)},l.send(i),l};Dt._Implementations.loadAndExecuteScript=function(e,t,n){return Dx(e,t).catch(function(i){n.reject(i)})};Dt._DefaultImplementations={};Dt._DefaultImplementations.createImage=Dt._Implementations.createImage;Dt._DefaultImplementations.loadWithXhr=Dt._Implementations.loadWithXhr;Dt._DefaultImplementations.loadAndExecuteScript=Dt._Implementations.loadAndExecuteScript;Dt.DEFAULT=Object.freeze(new Dt({url:typeof document=="undefined"?"":document.location.href.split("?")[0]}));var Te=Dt;function rS(e){e=g(e,g.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._addNewLeapSeconds=g(e.addNewLeapSeconds,!0),c(e.data)?jK(this,e.data):jK(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}rS.fromUrl=async function(e,t){C.defined("url",e),t=g(t,g.EMPTY_OBJECT);let n=Te.createIfNeeded(e),i;try{i=await n.fetchJson()}catch{throw new ie(`An error occurred while retrieving the EOP data from the URL ${n.url}.`)}return new rS({addNewLeapSeconds:t.addNewLeapSeconds,data:i})};rS.NONE=Object.freeze({compute:function(e,t){return c(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new Wy(0,0,0,0,0),t}});rS.prototype.compute=function(e,t){if(!c(this._samples))return;if(c(t)||(t=new Wy(0,0,0,0,0)),this._samples.length===0)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;let n=this._dates,i=this._lastIndex,o=0,r=0;if(c(i)){let a=n[i],l=n[i+1],u=K.lessThanOrEquals(a,e),f=!c(l),h=f||K.greaterThanOrEquals(l,e);if(u&&h)return o=i,!f&&l.equals(e)&&++o,r=o+1,qK(this,n,this._samples,e,o,r,t),t}let s=Xo(n,e,K.compare,this._dateColumn);return s>=0?(s<n.length-1&&n[s+1].equals(e)&&++s,o=s,r=s):(r=~s,o=r-1,o<0&&(o=0)),this._lastIndex=o,qK(this,n,this._samples,e,o,r,t),t};function aEe(e,t){return K.compare(e.julianDate,t)}function jK(e,t){if(!c(t.columnNames))throw new ie("Error in loaded EOP data: The columnNames property is required.");if(!c(t.samples))throw new ie("Error in loaded EOP data: The samples property is required.");let n=t.columnNames.indexOf("modifiedJulianDateUtc"),i=t.columnNames.indexOf("xPoleWanderRadians"),o=t.columnNames.indexOf("yPoleWanderRadians"),r=t.columnNames.indexOf("ut1MinusUtcSeconds"),s=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),a=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),l=t.columnNames.indexOf("taiMinusUtcSeconds");if(n<0||i<0||o<0||r<0||s<0||a<0||l<0)throw new ie("Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");let u=e._samples=t.samples,f=e._dates=[];e._dateColumn=n,e._xPoleWanderRadiansColumn=i,e._yPoleWanderRadiansColumn=o,e._ut1MinusUtcSecondsColumn=r,e._xCelestialPoleOffsetRadiansColumn=s,e._yCelestialPoleOffsetRadiansColumn=a,e._taiMinusUtcSecondsColumn=l,e._columnCount=t.columnNames.length,e._lastIndex=void 0;let h,m=e._addNewLeapSeconds;for(let p=0,_=u.length;p<_;p+=e._columnCount){let b=u[p+n],x=u[p+l],T=b+Vn.MODIFIED_JULIAN_DATE_DIFFERENCE,E=new K(T,x,zn.TAI);if(f.push(E),m){if(x!==h&&c(h)){let S=K.leapSeconds,A=Xo(S,E,aEe);if(A<0){let v=new zi(E,x);S.splice(~A,0,v)}}h=x}}}function WK(e,t,n,i,o){let r=n*i;o.xPoleWander=t[r+e._xPoleWanderRadiansColumn],o.yPoleWander=t[r+e._yPoleWanderRadiansColumn],o.xPoleOffset=t[r+e._xCelestialPoleOffsetRadiansColumn],o.yPoleOffset=t[r+e._yCelestialPoleOffsetRadiansColumn],o.ut1MinusUtc=t[r+e._ut1MinusUtcSecondsColumn]}function oS(e,t,n){return t+e*(n-t)}function qK(e,t,n,i,o,r,s){let a=e._columnCount;if(r>t.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;let l=t[o],u=t[r];if(l.equals(u)||i.equals(l))return WK(e,n,o,a,s),s;if(i.equals(u))return WK(e,n,r,a,s),s;let f=K.secondsDifference(i,l)/K.secondsDifference(u,l),h=o*a,m=r*a,p=n[h+e._ut1MinusUtcSecondsColumn],_=n[m+e._ut1MinusUtcSecondsColumn],b=_-p;if(b>.5||b<-.5){let x=n[h+e._taiMinusUtcSecondsColumn],T=n[m+e._taiMinusUtcSecondsColumn];x!==T&&(u.equals(i)?p=_:_-=T-x)}return s.xPoleWander=oS(f,n[h+e._xPoleWanderRadiansColumn],n[m+e._xPoleWanderRadiansColumn]),s.yPoleWander=oS(f,n[h+e._yPoleWanderRadiansColumn],n[m+e._yPoleWanderRadiansColumn]),s.xPoleOffset=oS(f,n[h+e._xCelestialPoleOffsetRadiansColumn],n[m+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=oS(f,n[h+e._yCelestialPoleOffsetRadiansColumn],n[m+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=oS(f,p,_),s}var UO=rS;function Aa(e,t,n){this.heading=g(e,0),this.pitch=g(t,0),this.roll=g(n,0)}Aa.fromQuaternion=function(e,t){if(!c(e))throw new w("quaternion is required");c(t)||(t=new Aa);let n=2*(e.w*e.y-e.z*e.x),i=1-2*(e.x*e.x+e.y*e.y),o=2*(e.w*e.x+e.y*e.z),r=1-2*(e.y*e.y+e.z*e.z),s=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(s,r),t.roll=Math.atan2(o,i),t.pitch=-O.asinClamped(n),t};Aa.fromDegrees=function(e,t,n,i){if(!c(e))throw new w("heading is required");if(!c(t))throw new w("pitch is required");if(!c(n))throw new w("roll is required");return c(i)||(i=new Aa),i.heading=e*O.RADIANS_PER_DEGREE,i.pitch=t*O.RADIANS_PER_DEGREE,i.roll=n*O.RADIANS_PER_DEGREE,i};Aa.clone=function(e,t){if(c(e))return c(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new Aa(e.heading,e.pitch,e.roll)};Aa.equals=function(e,t){return e===t||c(e)&&c(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll};Aa.equalsEpsilon=function(e,t,n,i){return e===t||c(e)&&c(t)&&O.equalsEpsilon(e.heading,t.heading,n,i)&&O.equalsEpsilon(e.pitch,t.pitch,n,i)&&O.equalsEpsilon(e.roll,t.roll,n,i)};Aa.prototype.clone=function(e){return Aa.clone(this,e)};Aa.prototype.equals=function(e){return Aa.equals(this,e)};Aa.prototype.equalsEpsilon=function(e,t,n){return Aa.equalsEpsilon(this,e,t,n)};Aa.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};var Hc=Aa;var HO={};var YK=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function cEe(){let e=document.getElementsByTagName("script");for(let t=0,n=e.length;t<n;++t){let i=e[t].getAttribute("src"),o=YK.exec(i);if(o!==null)return o[1]}}var zO;function XK(e){return typeof document=="undefined"?e:(c(zO)||(zO=document.createElement("a")),zO.href=e,zO.href)}var Ky;function KK(){if(c(Ky))return Ky;let e;if(typeof CESIUM_BASE_URL!="undefined"?e=CESIUM_BASE_URL:c(HO==null?void 0:HO.url)?e=Dm(".",HO.url):typeof define=="object"&&c(define.amd)&&!define.amd.toUrlUndefined&&c(iO.toUrl)?e=Dm("..",$y("Core/buildModuleUrl.js")):e=cEe(),!c(e))throw new w("Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.");return Ky=new Te({url:XK(e)}),Ky.appendForwardSlash(),Ky}function lEe(e){return XK(iO.toUrl(`../${e}`))}function $K(e){return KK().getDerivedResource({url:e}).url}var VO;function $y(e){return c(VO)||(typeof define=="object"&&c(define.amd)&&!define.amd.toUrlUndefined&&c(iO.toUrl)?VO=lEe:VO=$K),VO(e)}$y._cesiumScriptRegex=YK;$y._buildModuleUrlFromBaseUrl=$K;$y._clearBaseResource=function(){Ky=void 0};$y.setBaseUrl=function(e){Ky=Te.DEFAULT.getDerivedResource({url:e})};$y.getCesiumBaseUrl=KK;var Mi=$y;function uEe(e,t,n){this.x=e,this.y=t,this.s=n}var Mx=uEe;function EG(e){e=g(e,g.EMPTY_OBJECT),this._xysFileUrlTemplate=Te.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=g(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=g(e.sampleZeroJulianEphemerisDate,24423965e-1),this._sampleZeroDateTT=new K(this._sampleZeroJulianEphemerisDate,0,zn.TAI),this._stepSizeDays=g(e.stepSizeDays,1),this._samplesPerXysFile=g(e.samplesPerXysFile,1e3),this._totalSamples=g(e.totalSamples,27426),this._samples=new Array(this._totalSamples*3),this._chunkDownloadsInProgress=[];let t=this._interpolationOrder,n=this._denominators=new Array(t+1),i=this._xTable=new Array(t+1),o=Math.pow(this._stepSizeDays,t);for(let r=0;r<=t;++r){n[r]=o,i[r]=r*this._stepSizeDays;for(let s=0;s<=t;++s)s!==r&&(n[r]*=r-s);n[r]=1/n[r]}this._work=new Array(t+1),this._coef=new Array(t+1)}var fEe=new K(0,0,zn.TAI);function TG(e,t,n){let i=fEe;return i.dayNumber=t,i.secondsOfDay=n,K.daysDifference(i,e._sampleZeroDateTT)}EG.prototype.preload=function(e,t,n,i){let o=TG(this,e,t),r=TG(this,n,i),s=o/this._stepSizeDays-this._interpolationOrder/2|0;s<0&&(s=0);let a=r/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;a>=this._totalSamples&&(a=this._totalSamples-1);let l=s/this._samplesPerXysFile|0,u=a/this._samplesPerXysFile|0,f=[];for(let h=l;h<=u;++h)f.push(CG(this,h));return Promise.all(f)};EG.prototype.computeXysRadians=function(e,t,n){let i=TG(this,e,t);if(i<0)return;let o=i/this._stepSizeDays|0;if(o>=this._totalSamples)return;let r=this._interpolationOrder,s=o-(r/2|0);s<0&&(s=0);let a=s+r;a>=this._totalSamples&&(a=this._totalSamples-1,s=a-r,s<0&&(s=0));let l=!1,u=this._samples;if(c(u[s*3])||(CG(this,s/this._samplesPerXysFile|0),l=!0),c(u[a*3])||(CG(this,a/this._samplesPerXysFile|0),l=!0),l)return;c(n)?(n.x=0,n.y=0,n.s=0):n=new Mx(0,0,0);let f=i-s*this._stepSizeDays,h=this._work,m=this._denominators,p=this._coef,_=this._xTable,b,x;for(b=0;b<=r;++b)h[b]=f-_[b];for(b=0;b<=r;++b){for(p[b]=1,x=0;x<=r;++x)x!==b&&(p[b]*=h[x]);p[b]*=m[b];let T=(s+b)*3;n.x+=p[b]*u[T++],n.y+=p[b]*u[T++],n.s+=p[b]*u[T]}return n};function CG(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];let n,i=e._xysFileUrlTemplate;c(i)?n=i.getDerivedResource({templateValues:{0:t}}):n=new Te({url:Mi(`Assets/IAU2006_XYS/IAU2006_XYS_${t}.json`)});let o=n.fetchJson().then(function(r){e._chunkDownloadsInProgress[t]=!1;let s=e._samples,a=r.samples,l=t*e._samplesPerXysFile*3;for(let u=0,f=a.length;u<f;++u)s[l+u]=a[u]});return e._chunkDownloadsInProgress[t]=o,o}var GO=EG;function Je(e,t,n,i){this.x=g(e,0),this.y=g(t,0),this.z=g(n,0),this.w=g(i,0)}var sS=new d;Je.fromAxisAngle=function(e,t,n){C.typeOf.object("axis",e),C.typeOf.number("angle",t);let i=t/2,o=Math.sin(i);sS=d.normalize(e,sS);let r=sS.x*o,s=sS.y*o,a=sS.z*o,l=Math.cos(i);return c(n)?(n.x=r,n.y=s,n.z=a,n.w=l,n):new Je(r,s,a,l)};var dEe=[1,2,0],hEe=new Array(3);Je.fromRotationMatrix=function(e,t){C.typeOf.object("matrix",e);let n,i,o,r,s,a=e[q.COLUMN0ROW0],l=e[q.COLUMN1ROW1],u=e[q.COLUMN2ROW2],f=a+l+u;if(f>0)n=Math.sqrt(f+1),s=.5*n,n=.5/n,i=(e[q.COLUMN1ROW2]-e[q.COLUMN2ROW1])*n,o=(e[q.COLUMN2ROW0]-e[q.COLUMN0ROW2])*n,r=(e[q.COLUMN0ROW1]-e[q.COLUMN1ROW0])*n;else{let h=dEe,m=0;l>a&&(m=1),u>a&&u>l&&(m=2);let p=h[m],_=h[p];n=Math.sqrt(e[q.getElementIndex(m,m)]-e[q.getElementIndex(p,p)]-e[q.getElementIndex(_,_)]+1);let b=hEe;b[m]=.5*n,n=.5/n,s=(e[q.getElementIndex(_,p)]-e[q.getElementIndex(p,_)])*n,b[p]=(e[q.getElementIndex(p,m)]+e[q.getElementIndex(m,p)])*n,b[_]=(e[q.getElementIndex(_,m)]+e[q.getElementIndex(m,_)])*n,i=-b[0],o=-b[1],r=-b[2]}return c(t)?(t.x=i,t.y=o,t.z=r,t.w=s,t):new Je(i,o,r,s)};var ZK=new Je,JK=new Je,wG=new Je,QK=new Je;Je.fromHeadingPitchRoll=function(e,t){return C.typeOf.object("headingPitchRoll",e),QK=Je.fromAxisAngle(d.UNIT_X,e.roll,ZK),wG=Je.fromAxisAngle(d.UNIT_Y,-e.pitch,t),t=Je.multiply(wG,QK,wG),JK=Je.fromAxisAngle(d.UNIT_Z,-e.heading,ZK),Je.multiply(JK,t,t)};var jO=new d,SG=new d,Lf=new Je,e$=new Je,WO=new Je;Je.packedLength=4;Je.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t};Je.unpack=function(e,t,n){return C.defined("array",e),t=g(t,0),c(n)||(n=new Je),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n};Je.packedInterpolationLength=3;Je.convertPackedArrayForInterpolation=function(e,t,n,i){Je.unpack(e,n*4,WO),Je.conjugate(WO,WO);for(let o=0,r=n-t+1;o<r;o++){let s=o*3;Je.unpack(e,(t+o)*4,Lf),Je.multiply(Lf,WO,Lf),Lf.w<0&&Je.negate(Lf,Lf),Je.computeAxis(Lf,jO);let a=Je.computeAngle(Lf);c(i)||(i=[]),i[s]=jO.x*a,i[s+1]=jO.y*a,i[s+2]=jO.z*a}};Je.unpackInterpolationResult=function(e,t,n,i,o){c(o)||(o=new Je),d.fromArray(e,0,SG);let r=d.magnitude(SG);return Je.unpack(t,i*4,e$),r===0?Je.clone(Je.IDENTITY,Lf):Je.fromAxisAngle(SG,r,Lf),Je.multiply(Lf,e$,o)};Je.clone=function(e,t){if(c(e))return c(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new Je(e.x,e.y,e.z,e.w)};Je.conjugate=function(e,t){return C.typeOf.object("quaternion",e),C.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t};Je.magnitudeSquared=function(e){return C.typeOf.object("quaternion",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};Je.magnitude=function(e){return Math.sqrt(Je.magnitudeSquared(e))};Je.normalize=function(e,t){C.typeOf.object("result",t);let n=1/Je.magnitude(e),i=e.x*n,o=e.y*n,r=e.z*n,s=e.w*n;return t.x=i,t.y=o,t.z=r,t.w=s,t};Je.inverse=function(e,t){C.typeOf.object("result",t);let n=Je.magnitudeSquared(e);return t=Je.conjugate(e,t),Je.multiplyByScalar(t,1/n,t)};Je.add=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n.w=e.w+t.w,n};Je.subtract=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n.w=e.w-t.w,n};Je.negate=function(e,t){return C.typeOf.object("quaternion",e),C.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t};Je.dot=function(e,t){return C.typeOf.object("left",e),C.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w};Je.multiply=function(e,t,n){C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n);let i=e.x,o=e.y,r=e.z,s=e.w,a=t.x,l=t.y,u=t.z,f=t.w,h=s*a+i*f+o*u-r*l,m=s*l-i*u+o*f+r*a,p=s*u+i*l-o*a+r*f,_=s*f-i*a-o*l-r*u;return n.x=h,n.y=m,n.z=p,n.w=_,n};Je.multiplyByScalar=function(e,t,n){return C.typeOf.object("quaternion",e),C.typeOf.number("scalar",t),C.typeOf.object("result",n),n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n};Je.divideByScalar=function(e,t,n){return C.typeOf.object("quaternion",e),C.typeOf.number("scalar",t),C.typeOf.object("result",n),n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n};Je.computeAxis=function(e,t){C.typeOf.object("quaternion",e),C.typeOf.object("result",t);let n=e.w;if(Math.abs(n-1)<O.EPSILON6||Math.abs(n+1)<O.EPSILON6)return t.x=1,t.y=t.z=0,t;let i=1/Math.sqrt(1-n*n);return t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t};Je.computeAngle=function(e){return C.typeOf.object("quaternion",e),Math.abs(e.w-1)<O.EPSILON6?0:2*Math.acos(e.w)};var AG=new Je;Je.lerp=function(e,t,n,i){return C.typeOf.object("start",e),C.typeOf.object("end",t),C.typeOf.number("t",n),C.typeOf.object("result",i),AG=Je.multiplyByScalar(t,n,AG),i=Je.multiplyByScalar(e,1-n,i),Je.add(AG,i,i)};var t$=new Je,vG=new Je,DG=new Je;Je.slerp=function(e,t,n,i){C.typeOf.object("start",e),C.typeOf.object("end",t),C.typeOf.number("t",n),C.typeOf.object("result",i);let o=Je.dot(e,t),r=t;if(o<0&&(o=-o,r=t$=Je.negate(t,t$)),1-o<O.EPSILON6)return Je.lerp(e,r,n,i);let s=Math.acos(o);return vG=Je.multiplyByScalar(e,Math.sin((1-n)*s),vG),DG=Je.multiplyByScalar(r,Math.sin(n*s),DG),i=Je.add(vG,DG,i),Je.multiplyByScalar(i,1/Math.sin(s),i)};Je.log=function(e,t){C.typeOf.object("quaternion",e),C.typeOf.object("result",t);let n=O.acosClamped(e.w),i=0;return n!==0&&(i=n/Math.sin(n)),d.multiplyByScalar(e,i,t)};Je.exp=function(e,t){C.typeOf.object("cartesian",e),C.typeOf.object("result",t);let n=d.magnitude(e),i=0;return n!==0&&(i=Math.sin(n)/n),t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t.w=Math.cos(n),t};var mEe=new d,pEe=new d,aS=new Je,Lx=new Je;Je.computeInnerQuadrangle=function(e,t,n,i){C.typeOf.object("q0",e),C.typeOf.object("q1",t),C.typeOf.object("q2",n),C.typeOf.object("result",i);let o=Je.conjugate(t,aS);Je.multiply(o,n,Lx);let r=Je.log(Lx,mEe);Je.multiply(o,e,Lx);let s=Je.log(Lx,pEe);return d.add(r,s,r),d.multiplyByScalar(r,.25,r),d.negate(r,r),Je.exp(r,aS),Je.multiply(t,aS,i)};Je.squad=function(e,t,n,i,o,r){C.typeOf.object("q0",e),C.typeOf.object("q1",t),C.typeOf.object("s0",n),C.typeOf.object("s1",i),C.typeOf.number("t",o),C.typeOf.object("result",r);let s=Je.slerp(e,t,o,aS),a=Je.slerp(n,i,o,Lx);return Je.slerp(s,a,2*o*(1-o),r)};var _Ee=new Je,n$=1.9011074535173003,qO=sn.supportsTypedArrays()?new Float32Array(8):[],YO=sn.supportsTypedArrays()?new Float32Array(8):[],Pm=sn.supportsTypedArrays()?new Float32Array(8):[],Rm=sn.supportsTypedArrays()?new Float32Array(8):[];for(let e=0;e<7;++e){let t=e+1,n=2*t+1;qO[e]=1/(t*n),YO[e]=t/n}qO[7]=n$/(8*17);YO[7]=n$*8/17;Je.fastSlerp=function(e,t,n,i){C.typeOf.object("start",e),C.typeOf.object("end",t),C.typeOf.number("t",n),C.typeOf.object("result",i);let o=Je.dot(e,t),r;o>=0?r=1:(r=-1,o=-o);let s=o-1,a=1-n,l=n*n,u=a*a;for(let p=7;p>=0;--p)Pm[p]=(qO[p]*l-YO[p])*s,Rm[p]=(qO[p]*u-YO[p])*s;let f=r*n*(1+Pm[0]*(1+Pm[1]*(1+Pm[2]*(1+Pm[3]*(1+Pm[4]*(1+Pm[5]*(1+Pm[6]*(1+Pm[7])))))))),h=a*(1+Rm[0]*(1+Rm[1]*(1+Rm[2]*(1+Rm[3]*(1+Rm[4]*(1+Rm[5]*(1+Rm[6]*(1+Rm[7])))))))),m=Je.multiplyByScalar(e,h,_Ee);return Je.multiplyByScalar(t,f,i),Je.add(m,i,i)};Je.fastSquad=function(e,t,n,i,o,r){C.typeOf.object("q0",e),C.typeOf.object("q1",t),C.typeOf.object("s0",n),C.typeOf.object("s1",i),C.typeOf.number("t",o),C.typeOf.object("result",r);let s=Je.fastSlerp(e,t,o,aS),a=Je.fastSlerp(n,i,o,Lx);return Je.fastSlerp(s,a,2*o*(1-o),r)};Je.equals=function(e,t){return e===t||c(e)&&c(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w};Je.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(t)&&Math.abs(e.x-t.x)<=n&&Math.abs(e.y-t.y)<=n&&Math.abs(e.z-t.z)<=n&&Math.abs(e.w-t.w)<=n};Je.ZERO=Object.freeze(new Je(0,0,0,0));Je.IDENTITY=Object.freeze(new Je(0,0,0,1));Je.prototype.clone=function(e){return Je.clone(this,e)};Je.prototype.equals=function(e){return Je.equals(this,e)};Je.prototype.equalsEpsilon=function(e,t){return Je.equalsEpsilon(this,e,t)};Je.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var ve=Je;var oi={},IG={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},Nx={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},OG={},Gc={east:new d,north:new d,up:new d,west:new d,south:new d,down:new d},l_=new d,u_=new d,f_=new d;oi.localFrameToFixedFrameGenerator=function(e,t){if(!IG.hasOwnProperty(e)||!IG[e].hasOwnProperty(t))throw new w("firstAxis and secondAxis must be east, north, up, west, south or down.");let n=IG[e][t],i,o=e+t;return c(OG[o])?i=OG[o]:(i=function(r,s,a){if(!c(r))throw new w("origin is required.");if(isNaN(r.x)||isNaN(r.y)||isNaN(r.z))throw new w("origin has a NaN component");if(c(a)||(a=new N),d.equalsEpsilon(r,d.ZERO,O.EPSILON14))d.unpack(Nx[e],0,l_),d.unpack(Nx[t],0,u_),d.unpack(Nx[n],0,f_);else if(O.equalsEpsilon(r.x,0,O.EPSILON14)&&O.equalsEpsilon(r.y,0,O.EPSILON14)){let l=O.sign(r.z);d.unpack(Nx[e],0,l_),e!=="east"&&e!=="west"&&d.multiplyByScalar(l_,l,l_),d.unpack(Nx[t],0,u_),t!=="east"&&t!=="west"&&d.multiplyByScalar(u_,l,u_),d.unpack(Nx[n],0,f_),n!=="east"&&n!=="west"&&d.multiplyByScalar(f_,l,f_)}else{s=g(s,Z.default),s.geodeticSurfaceNormal(r,Gc.up);let l=Gc.up,u=Gc.east;u.x=-r.y,u.y=r.x,u.z=0,d.normalize(u,Gc.east),d.cross(l,u,Gc.north),d.multiplyByScalar(Gc.up,-1,Gc.down),d.multiplyByScalar(Gc.east,-1,Gc.west),d.multiplyByScalar(Gc.north,-1,Gc.south),l_=Gc[e],u_=Gc[t],f_=Gc[n]}return a[0]=l_.x,a[1]=l_.y,a[2]=l_.z,a[3]=0,a[4]=u_.x,a[5]=u_.y,a[6]=u_.z,a[7]=0,a[8]=f_.x,a[9]=f_.y,a[10]=f_.z,a[11]=0,a[12]=r.x,a[13]=r.y,a[14]=r.z,a[15]=1,a},OG[o]=i),i};oi.eastNorthUpToFixedFrame=oi.localFrameToFixedFrameGenerator("east","north");oi.northEastDownToFixedFrame=oi.localFrameToFixedFrameGenerator("north","east");oi.northUpEastToFixedFrame=oi.localFrameToFixedFrameGenerator("north","up");oi.northWestUpToFixedFrame=oi.localFrameToFixedFrameGenerator("north","west");var gEe=new ve,yEe=new d(1,1,1),bEe=new N;oi.headingPitchRollToFixedFrame=function(e,t,n,i,o){C.typeOf.object("HeadingPitchRoll",t),i=g(i,oi.eastNorthUpToFixedFrame);let r=ve.fromHeadingPitchRoll(t,gEe),s=N.fromTranslationQuaternionRotationScale(d.ZERO,r,yEe,bEe);return o=i(e,n,o),N.multiply(o,s,o)};var xEe=new N,TEe=new q;oi.headingPitchRollQuaternion=function(e,t,n,i,o){C.typeOf.object("HeadingPitchRoll",t);let r=oi.headingPitchRollToFixedFrame(e,t,n,i,xEe),s=N.getMatrix3(r,TEe);return ve.fromRotationMatrix(s,o)};var CEe=new d(1,1,1),EEe=new d,i$=new N,wEe=new N,SEe=new q,AEe=new ve;oi.fixedFrameToHeadingPitchRoll=function(e,t,n,i){C.defined("transform",e),t=g(t,Z.default),n=g(n,oi.eastNorthUpToFixedFrame),c(i)||(i=new Hc);let o=N.getTranslation(e,EEe);if(d.equals(o,d.ZERO))return i.heading=0,i.pitch=0,i.roll=0,i;let r=N.inverseTransformation(n(o,t,i$),i$),s=N.setScale(e,CEe,wEe);s=N.setTranslation(s,d.ZERO,s),r=N.multiply(r,s,r);let a=ve.fromRotationMatrix(N.getMatrix3(r,SEe),AEe);return a=ve.normalize(a,a),Hc.fromQuaternion(a,i)};var vEe=6*3600+41*60+50.54841,DEe=8640184812866e-6,IEe=.093104,OEe=-62e-7,PEe=11772758384668e-32,REe=72921158553e-15,MEe=O.TWO_PI/86400,XO=new K;oi.computeIcrfToCentralBodyFixedMatrix=function(e,t){let n=oi.computeIcrfToFixedMatrix(e,t);return c(n)||(n=oi.computeTemeToPseudoFixedMatrix(e,t)),n};oi.computeTemeToPseudoFixedMatrix=function(e,t){if(!c(e))throw new w("date is required.");XO=K.addSeconds(e,-K.computeTaiMinusUtc(e),XO);let n=XO.dayNumber,i=XO.secondsOfDay,o,r=n-2451545;i>=43200?o=(r+.5)/Vn.DAYS_PER_JULIAN_CENTURY:o=(r-.5)/Vn.DAYS_PER_JULIAN_CENTURY;let a=(vEe+o*(DEe+o*(IEe+o*OEe)))*MEe%O.TWO_PI,l=REe+PEe*(n-24515455e-1),u=(i+Vn.SECONDS_PER_DAY*.5)%Vn.SECONDS_PER_DAY,f=a+l*u,h=Math.cos(f),m=Math.sin(f);return c(t)?(t[0]=h,t[1]=-m,t[2]=0,t[3]=m,t[4]=h,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new q(h,m,0,-m,h,0,0,0,1)};oi.iau2006XysData=new GO;oi.earthOrientationParameters=UO.NONE;var MG=32.184,LEe=2451545;oi.preloadIcrfFixed=function(e){let t=e.start.dayNumber,n=e.start.secondsOfDay+MG,i=e.stop.dayNumber,o=e.stop.secondsOfDay+MG;return oi.iau2006XysData.preload(t,n,i,o)};oi.computeIcrfToFixedMatrix=function(e,t){if(!c(e))throw new w("date is required.");c(t)||(t=new q);let n=oi.computeFixedToIcrfMatrix(e,t);if(c(n))return q.transpose(n,t)};var NEe=32.184,FEe=2451545,KO=new Hc,BEe=new q,kEe=new K;oi.computeMoonFixedToIcrfMatrix=function(e,t){if(!c(e))throw new w("date is required.");c(t)||(t=new q);let n=K.addSeconds(e,NEe,kEe),i=K.totalDays(n)-FEe,o=O.toRadians(12.112)-O.toRadians(.052992)*i,r=O.toRadians(24.224)-O.toRadians(.105984)*i,s=O.toRadians(227.645)+O.toRadians(13.012)*i,a=O.toRadians(261.105)+O.toRadians(13.340716)*i,l=O.toRadians(358)+O.toRadians(.9856)*i;return KO.pitch=O.toRadians(180)-O.toRadians(3.878)*Math.sin(o)-O.toRadians(.12)*Math.sin(r)+O.toRadians(.07)*Math.sin(s)-O.toRadians(.017)*Math.sin(a),KO.roll=O.toRadians(66.53-90)+O.toRadians(1.543)*Math.cos(o)+O.toRadians(.24)*Math.cos(r)-O.toRadians(.028)*Math.cos(s)+O.toRadians(.007)*Math.cos(a),KO.heading=O.toRadians(244.375-90)+O.toRadians(13.17635831)*i+O.toRadians(3.558)*Math.sin(o)+O.toRadians(.121)*Math.sin(r)-O.toRadians(.064)*Math.sin(s)+O.toRadians(.016)*Math.sin(a)+O.toRadians(.025)*Math.sin(l),q.fromHeadingPitchRoll(KO,BEe)};oi.computeIcrfToMoonFixedMatrix=function(e,t){if(!c(e))throw new w("date is required.");c(t)||(t=new q);let n=oi.computeMoonFixedToIcrfMatrix(e,t);if(c(n))return q.transpose(n,t)};var UEe=new Mx(0,0,0),zEe=new Wy(0,0,0,0,0,0),PG=new q,RG=new q;oi.computeFixedToIcrfMatrix=function(e,t){if(!c(e))throw new w("date is required.");c(t)||(t=new q);let n=oi.earthOrientationParameters.compute(e,zEe);if(!c(n))return;let i=e.dayNumber,o=e.secondsOfDay+MG,r=oi.iau2006XysData.computeXysRadians(i,o,UEe);if(!c(r))return;let s=r.x+n.xPoleOffset,a=r.y+n.yPoleOffset,l=1/(1+Math.sqrt(1-s*s-a*a)),u=PG;u[0]=1-l*s*s,u[3]=-l*s*a,u[6]=s,u[1]=-l*s*a,u[4]=1-l*a*a,u[7]=a,u[2]=-s,u[5]=-a,u[8]=1-l*(s*s+a*a);let f=q.fromRotationZ(-r.s,RG),h=q.multiply(u,f,PG),m=e.dayNumber,p=e.secondsOfDay-K.computeTaiMinusUtc(e)+n.ut1MinusUtc,_=m-2451545,b=p/Vn.SECONDS_PER_DAY,x=.779057273264+b+.00273781191135448*(_+b);x=x%1*O.TWO_PI;let T=q.fromRotationZ(x,RG),E=q.multiply(h,T,PG),S=Math.cos(n.xPoleWander),A=Math.cos(n.yPoleWander),v=Math.sin(n.xPoleWander),D=Math.sin(n.yPoleWander),R=i-LEe+o/Vn.SECONDS_PER_DAY;R/=36525;let P=-47e-6*R*O.RADIANS_PER_DEGREE/3600,L=Math.cos(P),F=Math.sin(P),y=RG;return y[0]=S*L,y[1]=S*F,y[2]=v,y[3]=-A*F+D*v*L,y[4]=A*L+D*v*F,y[5]=-D*S,y[6]=-D*F-A*v*L,y[7]=D*L-A*v*F,y[8]=A*S,q.multiply(E,y,t)};var VEe=new ee;oi.pointToWindowCoordinates=function(e,t,n,i){return i=oi.pointToGLWindowCoordinates(e,t,n,i),i.y=2*t[5]-i.y,i};oi.pointToGLWindowCoordinates=function(e,t,n,i){if(!c(e))throw new w("modelViewProjectionMatrix is required.");if(!c(t))throw new w("viewportTransformation is required.");if(!c(n))throw new w("point is required.");c(i)||(i=new k);let o=VEe;return N.multiplyByVector(e,ee.fromElements(n.x,n.y,n.z,1,o),o),ee.multiplyByScalar(o,1/o.w,o),N.multiplyByVector(t,o,o),k.fromCartesian4(o,i)};var HEe=new d,GEe=new d,jEe=new d;oi.rotationMatrixFromPositionVelocity=function(e,t,n,i){if(!c(e))throw new w("position is required.");if(!c(t))throw new w("velocity is required.");let o=g(n,Z.default).geodeticSurfaceNormal(e,HEe),r=d.cross(t,o,GEe);d.equalsEpsilon(r,d.ZERO,O.EPSILON6)&&(r=d.clone(d.UNIT_X,r));let s=d.cross(r,t,jEe);return d.normalize(s,s),d.cross(t,s,r),d.negate(r,r),d.normalize(r,r),c(i)||(i=new q),i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=r.x,i[4]=r.y,i[5]=r.z,i[6]=s.x,i[7]=s.y,i[8]=s.z,i};var o$=new N(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),r$=new re,LG=new d,WEe=new d,qEe=new q,NG=new N,s$=new N;oi.basisTo2D=function(e,t,n){if(!c(e))throw new w("projection is required.");if(!c(t))throw new w("matrix is required.");if(!c(n))throw new w("result is required.");let i=N.getTranslation(t,WEe),o=e.ellipsoid,r;if(d.equals(i,d.ZERO))r=d.clone(d.ZERO,LG);else{let f=o.cartesianToCartographic(i,r$);r=e.project(f,LG),d.fromElements(r.z,r.x,r.y,r)}let s=oi.eastNorthUpToFixedFrame(i,o,NG),a=N.inverseTransformation(s,s$),l=N.getMatrix3(t,qEe),u=N.multiplyByMatrix3(a,l,n);return N.multiply(o$,u,n),N.setTranslation(n,r,n),n};oi.ellipsoidTo2DModelMatrix=function(e,t,n){if(!c(e))throw new w("projection is required.");if(!c(t))throw new w("center is required.");if(!c(n))throw new w("result is required.");let i=e.ellipsoid,o=oi.eastNorthUpToFixedFrame(t,i,NG),r=N.inverseTransformation(o,s$),s=i.cartesianToCartographic(t,r$),a=e.project(s,LG);d.fromElements(a.z,a.x,a.y,a);let l=N.fromTranslation(a,NG);return N.multiply(o$,r,n),N.multiply(l,n,n),n};var Lt=oi;var a$={};function cS(e,t){if(!c(e))throw new w("identifier is required.");c(a$[e])||(a$[e]=!0,console.warn(g(t,e)))}cS.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.";cS.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";cS.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";cS.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var mt=cS;function YEe(e,t){if(!c(e)||!c(t))throw new w("identifier and message are required.");mt(e,t)}var os=YEe;function Tn(e,t,n,i){this.west=g(e,0),this.south=g(t,0),this.east=g(n,0),this.north=g(i,0)}Object.defineProperties(Tn.prototype,{width:{get:function(){return Tn.computeWidth(this)}},height:{get:function(){return Tn.computeHeight(this)}}});Tn.packedLength=4;Tn.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),t[n++]=e.west,t[n++]=e.south,t[n++]=e.east,t[n]=e.north,t};Tn.unpack=function(e,t,n){return C.defined("array",e),t=g(t,0),c(n)||(n=new Tn),n.west=e[t++],n.south=e[t++],n.east=e[t++],n.north=e[t],n};Tn.computeWidth=function(e){C.typeOf.object("rectangle",e);let t=e.east,n=e.west;return t<n&&(t+=O.TWO_PI),t-n};Tn.computeHeight=function(e){return C.typeOf.object("rectangle",e),e.north-e.south};Tn.fromDegrees=function(e,t,n,i,o){return e=O.toRadians(g(e,0)),t=O.toRadians(g(t,0)),n=O.toRadians(g(n,0)),i=O.toRadians(g(i,0)),c(o)?(o.west=e,o.south=t,o.east=n,o.north=i,o):new Tn(e,t,n,i)};Tn.fromRadians=function(e,t,n,i,o){return c(o)?(o.west=g(e,0),o.south=g(t,0),o.east=g(n,0),o.north=g(i,0),o):new Tn(e,t,n,i)};Tn.fromCartographicArray=function(e,t){C.defined("cartographics",e);let n=Number.MAX_VALUE,i=-Number.MAX_VALUE,o=Number.MAX_VALUE,r=-Number.MAX_VALUE,s=Number.MAX_VALUE,a=-Number.MAX_VALUE;for(let l=0,u=e.length;l<u;l++){let f=e[l];n=Math.min(n,f.longitude),i=Math.max(i,f.longitude),s=Math.min(s,f.latitude),a=Math.max(a,f.latitude);let h=f.longitude>=0?f.longitude:f.longitude+O.TWO_PI;o=Math.min(o,h),r=Math.max(r,h)}return i-n>r-o&&(n=o,i=r,i>O.PI&&(i=i-O.TWO_PI),n>O.PI&&(n=n-O.TWO_PI)),c(t)?(t.west=n,t.south=s,t.east=i,t.north=a,t):new Tn(n,s,i,a)};Tn.fromCartesianArray=function(e,t,n){C.defined("cartesians",e),t=g(t,Z.default);let i=Number.MAX_VALUE,o=-Number.MAX_VALUE,r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=Number.MAX_VALUE,l=-Number.MAX_VALUE;for(let u=0,f=e.length;u<f;u++){let h=t.cartesianToCartographic(e[u]);i=Math.min(i,h.longitude),o=Math.max(o,h.longitude),a=Math.min(a,h.latitude),l=Math.max(l,h.latitude);let m=h.longitude>=0?h.longitude:h.longitude+O.TWO_PI;r=Math.min(r,m),s=Math.max(s,m)}return o-i>s-r&&(i=r,o=s,o>O.PI&&(o=o-O.TWO_PI),i>O.PI&&(i=i-O.TWO_PI)),c(n)?(n.west=i,n.south=a,n.east=o,n.north=l,n):new Tn(i,a,o,l)};var XEe=new d,KEe=new d,$Ee=new d,ZEe=new d,JEe=new d,FG=new Array(5);for(let e=0;e<FG.length;++e)FG[e]=new d;Tn.fromBoundingSphere=function(e,t,n){C.typeOf.object("boundingSphere",e);let i=e.center,o=e.radius;if(c(t)||(t=Z.default),c(n)||(n=new Tn),d.equals(i,d.ZERO))return Tn.clone(Tn.MAX_VALUE,n),n;let r=Lt.eastNorthUpToFixedFrame(i,t,XEe),s=N.multiplyByPointAsVector(r,d.UNIT_X,KEe);d.normalize(s,s);let a=N.multiplyByPointAsVector(r,d.UNIT_Y,$Ee);d.normalize(a,a),d.multiplyByScalar(a,o,a),d.multiplyByScalar(s,o,s);let l=d.negate(a,JEe),u=d.negate(s,ZEe),f=FG,h=f[0];return d.add(i,a,h),h=f[1],d.add(i,u,h),h=f[2],d.add(i,l,h),h=f[3],d.add(i,s,h),f[4]=i,Tn.fromCartesianArray(f,t,n)};Tn.clone=function(e,t){if(c(e))return c(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new Tn(e.west,e.south,e.east,e.north)};Tn.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(t)&&Math.abs(e.west-t.west)<=n&&Math.abs(e.south-t.south)<=n&&Math.abs(e.east-t.east)<=n&&Math.abs(e.north-t.north)<=n};Tn.prototype.clone=function(e){return Tn.clone(this,e)};Tn.prototype.equals=function(e){return Tn.equals(this,e)};Tn.equals=function(e,t){return e===t||c(e)&&c(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north};Tn.prototype.equalsEpsilon=function(e,t){return Tn.equalsEpsilon(this,e,t)};Tn.validate=function(e){return os("Rectangle.validate","Rectangle.validate is a no-op and has been deprecated. It will be removed in Cesium 1.124."),Tn._validate(e)};Tn._validate=function(e){C.typeOf.object("rectangle",e);let t=e.north;C.typeOf.number.greaterThanOrEquals("north",t,-O.PI_OVER_TWO),C.typeOf.number.lessThanOrEquals("north",t,O.PI_OVER_TWO);let n=e.south;C.typeOf.number.greaterThanOrEquals("south",n,-O.PI_OVER_TWO),C.typeOf.number.lessThanOrEquals("south",n,O.PI_OVER_TWO);let i=e.west;C.typeOf.number.greaterThanOrEquals("west",i,-Math.PI),C.typeOf.number.lessThanOrEquals("west",i,Math.PI);let o=e.east;C.typeOf.number.greaterThanOrEquals("east",o,-Math.PI),C.typeOf.number.lessThanOrEquals("east",o,Math.PI)};Tn.southwest=function(e,t){return C.typeOf.object("rectangle",e),c(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new re(e.west,e.south)};Tn.northwest=function(e,t){return C.typeOf.object("rectangle",e),c(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new re(e.west,e.north)};Tn.northeast=function(e,t){return C.typeOf.object("rectangle",e),c(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new re(e.east,e.north)};Tn.southeast=function(e,t){return C.typeOf.object("rectangle",e),c(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new re(e.east,e.south)};Tn.center=function(e,t){C.typeOf.object("rectangle",e);let n=e.east,i=e.west;n<i&&(n+=O.TWO_PI);let o=O.negativePiToPi((i+n)*.5),r=(e.south+e.north)*.5;return c(t)?(t.longitude=o,t.latitude=r,t.height=0,t):new re(o,r)};Tn.intersection=function(e,t,n){C.typeOf.object("rectangle",e),C.typeOf.object("otherRectangle",t);let i=e.east,o=e.west,r=t.east,s=t.west;i<o&&r>0?i+=O.TWO_PI:r<s&&i>0&&(r+=O.TWO_PI),i<o&&s<0?s+=O.TWO_PI:r<s&&o<0&&(o+=O.TWO_PI);let a=O.negativePiToPi(Math.max(o,s)),l=O.negativePiToPi(Math.min(i,r));if((e.west<e.east||t.west<t.east)&&l<=a)return;let u=Math.max(e.south,t.south),f=Math.min(e.north,t.north);if(!(u>=f))return c(n)?(n.west=a,n.south=u,n.east=l,n.north=f,n):new Tn(a,u,l,f)};Tn.simpleIntersection=function(e,t,n){C.typeOf.object("rectangle",e),C.typeOf.object("otherRectangle",t);let i=Math.max(e.west,t.west),o=Math.max(e.south,t.south),r=Math.min(e.east,t.east),s=Math.min(e.north,t.north);if(!(o>=s||i>=r))return c(n)?(n.west=i,n.south=o,n.east=r,n.north=s,n):new Tn(i,o,r,s)};Tn.union=function(e,t,n){C.typeOf.object("rectangle",e),C.typeOf.object("otherRectangle",t),c(n)||(n=new Tn);let i=e.east,o=e.west,r=t.east,s=t.west;i<o&&r>0?i+=O.TWO_PI:r<s&&i>0&&(r+=O.TWO_PI),i<o&&s<0?s+=O.TWO_PI:r<s&&o<0&&(o+=O.TWO_PI);let a=O.negativePiToPi(Math.min(o,s)),l=O.negativePiToPi(Math.max(i,r));return n.west=a,n.south=Math.min(e.south,t.south),n.east=l,n.north=Math.max(e.north,t.north),n};Tn.expand=function(e,t,n){return C.typeOf.object("rectangle",e),C.typeOf.object("cartographic",t),c(n)||(n=new Tn),n.west=Math.min(e.west,t.longitude),n.south=Math.min(e.south,t.latitude),n.east=Math.max(e.east,t.longitude),n.north=Math.max(e.north,t.latitude),n};Tn.contains=function(e,t){C.typeOf.object("rectangle",e),C.typeOf.object("cartographic",t);let n=t.longitude,i=t.latitude,o=e.west,r=e.east;return r<o&&(r+=O.TWO_PI,n<0&&(n+=O.TWO_PI)),(n>o||O.equalsEpsilon(n,o,O.EPSILON14))&&(n<r||O.equalsEpsilon(n,r,O.EPSILON14))&&i>=e.south&&i<=e.north};var QEe=new re;Tn.subsample=function(e,t,n,i){C.typeOf.object("rectangle",e),t=g(t,Z.default),n=g(n,0),c(i)||(i=[]);let o=0,r=e.north,s=e.south,a=e.east,l=e.west,u=QEe;u.height=n,u.longitude=l,u.latitude=r,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=a,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.latitude=s,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=l,i[o]=t.cartographicToCartesian(u,i[o]),o++,r<0?u.latitude=r:s>0?u.latitude=s:u.latitude=0;for(let f=1;f<8;++f)u.longitude=-Math.PI+f*O.PI_OVER_TWO,Tn.contains(e,u)&&(i[o]=t.cartographicToCartesian(u,i[o]),o++);return u.latitude===0&&(u.longitude=l,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=a,i[o]=t.cartographicToCartesian(u,i[o]),o++),i.length=o,i};Tn.subsection=function(e,t,n,i,o,r){if(C.typeOf.object("rectangle",e),C.typeOf.number.greaterThanOrEquals("westLerp",t,0),C.typeOf.number.lessThanOrEquals("westLerp",t,1),C.typeOf.number.greaterThanOrEquals("southLerp",n,0),C.typeOf.number.lessThanOrEquals("southLerp",n,1),C.typeOf.number.greaterThanOrEquals("eastLerp",i,0),C.typeOf.number.lessThanOrEquals("eastLerp",i,1),C.typeOf.number.greaterThanOrEquals("northLerp",o,0),C.typeOf.number.lessThanOrEquals("northLerp",o,1),C.typeOf.number.lessThanOrEquals("westLerp",t,i),C.typeOf.number.lessThanOrEquals("southLerp",n,o),c(r)||(r=new Tn),e.west<=e.east){let a=e.east-e.west;r.west=e.west+t*a,r.east=e.west+i*a}else{let a=O.TWO_PI+e.east-e.west;r.west=O.negativePiToPi(e.west+t*a),r.east=O.negativePiToPi(e.west+i*a)}let s=e.north-e.south;return r.south=e.south+n*s,r.north=e.south+o*s,t===1&&(r.west=e.east),i===1&&(r.east=e.east),n===1&&(r.south=e.north),o===1&&(r.north=e.north),r};Tn.MAX_VALUE=Object.freeze(new Tn(-Math.PI,-O.PI_OVER_TWO,Math.PI,O.PI_OVER_TWO));var te=Tn;function Tr(e,t,n,i){this.x=g(e,0),this.y=g(t,0),this.width=g(n,0),this.height=g(i,0)}Tr.packedLength=4;Tr.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.width,t[n]=e.height,t};Tr.unpack=function(e,t,n){return C.defined("array",e),t=g(t,0),c(n)||(n=new Tr),n.x=e[t++],n.y=e[t++],n.width=e[t++],n.height=e[t],n};Tr.fromPoints=function(e,t){if(c(t)||(t=new Tr),!c(e)||e.length===0)return t.x=0,t.y=0,t.width=0,t.height=0,t;let n=e.length,i=e[0].x,o=e[0].y,r=e[0].x,s=e[0].y;for(let a=1;a<n;a++){let l=e[a],u=l.x,f=l.y;i=Math.min(u,i),r=Math.max(u,r),o=Math.min(f,o),s=Math.max(f,s)}return t.x=i,t.y=o,t.width=r-i,t.height=s-o,t};var c$=new Ei,ewe=new re,twe=new re;Tr.fromRectangle=function(e,t,n){if(c(n)||(n=new Tr),!c(e))return n.x=0,n.y=0,n.width=0,n.height=0,n;c$._ellipsoid=Z.default,t=g(t,c$);let i=t.project(te.southwest(e,ewe)),o=t.project(te.northeast(e,twe));return k.subtract(o,i,o),n.x=i.x,n.y=i.y,n.width=o.x,n.height=o.y,n};Tr.clone=function(e,t){if(c(e))return c(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new Tr(e.x,e.y,e.width,e.height)};Tr.union=function(e,t,n){C.typeOf.object("left",e),C.typeOf.object("right",t),c(n)||(n=new Tr);let i=Math.min(e.x,t.x),o=Math.min(e.y,t.y),r=Math.max(e.x+e.width,t.x+t.width),s=Math.max(e.y+e.height,t.y+t.height);return n.x=i,n.y=o,n.width=r-i,n.height=s-o,n};Tr.expand=function(e,t,n){C.typeOf.object("rectangle",e),C.typeOf.object("point",t),n=Tr.clone(e,n);let i=t.x-n.x,o=t.y-n.y;return i>n.width?n.width=i:i<0&&(n.width-=i,n.x=t.x),o>n.height?n.height=o:o<0&&(n.height-=o,n.y=t.y),n};Tr.intersect=function(e,t){C.typeOf.object("left",e),C.typeOf.object("right",t);let n=e.x,i=e.y,o=t.x,r=t.y;return n>o+t.width||n+e.width<o||i+e.height<r||i>r+t.height?Gt.OUTSIDE:Gt.INTERSECTING};Tr.equals=function(e,t){return e===t||c(e)&&c(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height};Tr.prototype.clone=function(e){return Tr.clone(this,e)};Tr.prototype.intersect=function(e){return Tr.intersect(this,e)};Tr.prototype.equals=function(e){return Tr.equals(this,e)};var je=Tr;var oa={POINTS:Y.POINTS,LINES:Y.LINES,LINE_LOOP:Y.LINE_LOOP,LINE_STRIP:Y.LINE_STRIP,TRIANGLES:Y.TRIANGLES,TRIANGLE_STRIP:Y.TRIANGLE_STRIP,TRIANGLE_FAN:Y.TRIANGLE_FAN};oa.isLines=function(e){return e===oa.LINES||e===oa.LINE_LOOP||e===oa.LINE_STRIP};oa.isTriangles=function(e){return e===oa.TRIANGLES||e===oa.TRIANGLE_STRIP||e===oa.TRIANGLE_FAN};oa.validate=function(e){return e===oa.POINTS||e===oa.LINES||e===oa.LINE_LOOP||e===oa.LINE_STRIP||e===oa.TRIANGLES||e===oa.TRIANGLE_STRIP||e===oa.TRIANGLE_FAN};var Se=Object.freeze(oa);var Fx=`in vec4 position;
| in vec2 textureCoordinates;
|
| out vec2 v_textureCoordinates;
|
| void main()
| {
| gl_Position = position;
| v_textureCoordinates = textureCoordinates;
| }
| `;var or={CULL:1,OCCLUDE:2,EXECUTE_IN_CLOSEST_FRUSTUM:4,DEBUG_SHOW_BOUNDING_VOLUME:8,CAST_SHADOWS:16,RECEIVE_SHADOWS:32,PICK_ONLY:64,DEPTH_FOR_TRANSLUCENT_CLASSIFICATION:128};function lS(e){e=g(e,g.EMPTY_OBJECT),this._boundingVolume=e.boundingVolume,this._orientedBoundingBox=e.orientedBoundingBox,this._modelMatrix=e.modelMatrix,this._primitiveType=g(e.primitiveType,Se.TRIANGLES),this._vertexArray=e.vertexArray,this._count=e.count,this._offset=g(e.offset,0),this._instanceCount=g(e.instanceCount,0),this._shaderProgram=e.shaderProgram,this._uniformMap=e.uniformMap,this._renderState=e.renderState,this._framebuffer=e.framebuffer,this._pass=e.pass,this._owner=e.owner,this._debugOverlappingFrustums=0,this._pickId=e.pickId,this._pickMetadataAllowed=e.pickMetadataAllowed===!0,this._pickedMetadataInfo=void 0,this._flags=0,this.cull=g(e.cull,!0),this.occlude=g(e.occlude,!0),this.executeInClosestFrustum=g(e.executeInClosestFrustum,!1),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.castShadows=g(e.castShadows,!1),this.receiveShadows=g(e.receiveShadows,!1),this.pickOnly=g(e.pickOnly,!1),this.depthForTranslucentClassification=g(e.depthForTranslucentClassification,!1),this.dirty=!0,this.lastDirtyTime=0,this.derivedCommands={}}function va(e,t){return(e._flags&t)===t}function d_(e,t,n){n?e._flags|=t:e._flags&=~t}Object.defineProperties(lS.prototype,{boundingVolume:{get:function(){return this._boundingVolume},set:function(e){this._boundingVolume!==e&&(this._boundingVolume=e,this.dirty=!0)}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox},set:function(e){this._orientedBoundingBox!==e&&(this._orientedBoundingBox=e,this.dirty=!0)}},cull:{get:function(){return va(this,or.CULL)},set:function(e){va(this,or.CULL)!==e&&(d_(this,or.CULL,e),this.dirty=!0)}},occlude:{get:function(){return va(this,or.OCCLUDE)},set:function(e){va(this,or.OCCLUDE)!==e&&(d_(this,or.OCCLUDE,e),this.dirty=!0)}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix!==e&&(this._modelMatrix=e,this.dirty=!0)}},primitiveType:{get:function(){return this._primitiveType},set:function(e){this._primitiveType!==e&&(this._primitiveType=e,this.dirty=!0)}},vertexArray:{get:function(){return this._vertexArray},set:function(e){this._vertexArray!==e&&(this._vertexArray=e,this.dirty=!0)}},count:{get:function(){return this._count},set:function(e){this._count!==e&&(this._count=e,this.dirty=!0)}},offset:{get:function(){return this._offset},set:function(e){this._offset!==e&&(this._offset=e,this.dirty=!0)}},instanceCount:{get:function(){return this._instanceCount},set:function(e){this._instanceCount!==e&&(this._instanceCount=e,this.dirty=!0)}},shaderProgram:{get:function(){return this._shaderProgram},set:function(e){this._shaderProgram!==e&&(this._shaderProgram=e,this.dirty=!0)}},castShadows:{get:function(){return va(this,or.CAST_SHADOWS)},set:function(e){va(this,or.CAST_SHADOWS)!==e&&(d_(this,or.CAST_SHADOWS,e),this.dirty=!0)}},receiveShadows:{get:function(){return va(this,or.RECEIVE_SHADOWS)},set:function(e){va(this,or.RECEIVE_SHADOWS)!==e&&(d_(this,or.RECEIVE_SHADOWS,e),this.dirty=!0)}},uniformMap:{get:function(){return this._uniformMap},set:function(e){this._uniformMap!==e&&(this._uniformMap=e,this.dirty=!0)}},renderState:{get:function(){return this._renderState},set:function(e){this._renderState!==e&&(this._renderState=e,this.dirty=!0)}},framebuffer:{get:function(){return this._framebuffer},set:function(e){this._framebuffer!==e&&(this._framebuffer=e,this.dirty=!0)}},pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e,this.dirty=!0)}},executeInClosestFrustum:{get:function(){return va(this,or.EXECUTE_IN_CLOSEST_FRUSTUM)},set:function(e){va(this,or.EXECUTE_IN_CLOSEST_FRUSTUM)!==e&&(d_(this,or.EXECUTE_IN_CLOSEST_FRUSTUM,e),this.dirty=!0)}},owner:{get:function(){return this._owner},set:function(e){this._owner!==e&&(this._owner=e,this.dirty=!0)}},debugShowBoundingVolume:{get:function(){return va(this,or.DEBUG_SHOW_BOUNDING_VOLUME)},set:function(e){va(this,or.DEBUG_SHOW_BOUNDING_VOLUME)!==e&&(d_(this,or.DEBUG_SHOW_BOUNDING_VOLUME,e),this.dirty=!0)}},debugOverlappingFrustums:{get:function(){return this._debugOverlappingFrustums},set:function(e){this._debugOverlappingFrustums!==e&&(this._debugOverlappingFrustums=e,this.dirty=!0)}},pickId:{get:function(){return this._pickId},set:function(e){this._pickId!==e&&(this._pickId=e,this.dirty=!0)}},pickMetadataAllowed:{get:function(){return this._pickMetadataAllowed}},pickedMetadataInfo:{get:function(){return this._pickedMetadataInfo},set:function(e){this._pickedMetadataInfo!==e&&(this._pickedMetadataInfo=e,this.dirty=!0)}},pickOnly:{get:function(){return va(this,or.PICK_ONLY)},set:function(e){va(this,or.PICK_ONLY)!==e&&(d_(this,or.PICK_ONLY,e),this.dirty=!0)}},depthForTranslucentClassification:{get:function(){return va(this,or.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION)},set:function(e){va(this,or.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION)!==e&&(d_(this,or.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION,e),this.dirty=!0)}}});lS.shallowClone=function(e,t){if(c(e))return c(t)||(t=new lS),t._boundingVolume=e._boundingVolume,t._orientedBoundingBox=e._orientedBoundingBox,t._modelMatrix=e._modelMatrix,t._primitiveType=e._primitiveType,t._vertexArray=e._vertexArray,t._count=e._count,t._offset=e._offset,t._instanceCount=e._instanceCount,t._shaderProgram=e._shaderProgram,t._uniformMap=e._uniformMap,t._renderState=e._renderState,t._framebuffer=e._framebuffer,t._pass=e._pass,t._owner=e._owner,t._debugOverlappingFrustums=e._debugOverlappingFrustums,t._pickId=e._pickId,t._pickMetadataAllowed=e._pickMetadataAllowed,t._pickedMetadataInfo=e._pickedMetadataInfo,t._flags=e._flags,t.dirty=!0,t.lastDirtyTime=0,t};lS.prototype.execute=function(e,t){e.draw(this,t)};var Ke=lS;var ri={UNSIGNED_BYTE:Y.UNSIGNED_BYTE,UNSIGNED_SHORT:Y.UNSIGNED_SHORT,UNSIGNED_INT:Y.UNSIGNED_INT,FLOAT:Y.FLOAT,HALF_FLOAT:Y.HALF_FLOAT_OES,UNSIGNED_INT_24_8:Y.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:Y.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:Y.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:Y.UNSIGNED_SHORT_5_6_5};ri.toWebGLConstant=function(e,t){switch(e){case ri.UNSIGNED_BYTE:return Y.UNSIGNED_BYTE;case ri.UNSIGNED_SHORT:return Y.UNSIGNED_SHORT;case ri.UNSIGNED_INT:return Y.UNSIGNED_INT;case ri.FLOAT:return Y.FLOAT;case ri.HALF_FLOAT:return t.webgl2?Y.HALF_FLOAT:Y.HALF_FLOAT_OES;case ri.UNSIGNED_INT_24_8:return Y.UNSIGNED_INT_24_8;case ri.UNSIGNED_SHORT_4_4_4_4:return Y.UNSIGNED_SHORT_4_4_4_4;case ri.UNSIGNED_SHORT_5_5_5_1:return Y.UNSIGNED_SHORT_5_5_5_1;case ri.UNSIGNED_SHORT_5_6_5:return ri.UNSIGNED_SHORT_5_6_5}};ri.isPacked=function(e){return e===ri.UNSIGNED_INT_24_8||e===ri.UNSIGNED_SHORT_4_4_4_4||e===ri.UNSIGNED_SHORT_5_5_5_1||e===ri.UNSIGNED_SHORT_5_6_5};ri.sizeInBytes=function(e){switch(e){case ri.UNSIGNED_BYTE:return 1;case ri.UNSIGNED_SHORT:case ri.UNSIGNED_SHORT_4_4_4_4:case ri.UNSIGNED_SHORT_5_5_5_1:case ri.UNSIGNED_SHORT_5_6_5:case ri.HALF_FLOAT:return 2;case ri.UNSIGNED_INT:case ri.FLOAT:case ri.UNSIGNED_INT_24_8:return 4}};ri.validate=function(e){return e===ri.UNSIGNED_BYTE||e===ri.UNSIGNED_SHORT||e===ri.UNSIGNED_INT||e===ri.FLOAT||e===ri.HALF_FLOAT||e===ri.UNSIGNED_INT_24_8||e===ri.UNSIGNED_SHORT_4_4_4_4||e===ri.UNSIGNED_SHORT_5_5_5_1||e===ri.UNSIGNED_SHORT_5_6_5};ri.getTypedArrayConstructor=function(e){let t=ri.sizeInBytes(e);return t===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:t===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:t===Float32Array.BYTES_PER_ELEMENT&&e===ri.FLOAT?Float32Array:Uint32Array};var Ne=Object.freeze(ri);var tt={DEPTH_COMPONENT:Y.DEPTH_COMPONENT,DEPTH_STENCIL:Y.DEPTH_STENCIL,ALPHA:Y.ALPHA,RED:Y.RED,RG:Y.RG,RGB:Y.RGB,RGBA:Y.RGBA,LUMINANCE:Y.LUMINANCE,LUMINANCE_ALPHA:Y.LUMINANCE_ALPHA,RGB_DXT1:Y.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:Y.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:Y.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:Y.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:Y.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:Y.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:Y.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:Y.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:Y.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:Y.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:Y.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:Y.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:Y.COMPRESSED_RGBA_BPTC_UNORM};tt.componentsLength=function(e){switch(e){case tt.RGB:return 3;case tt.RGBA:return 4;case tt.LUMINANCE_ALPHA:case tt.RG:return 2;case tt.ALPHA:case tt.RED:case tt.LUMINANCE:return 1;default:return 1}};tt.validate=function(e){return e===tt.DEPTH_COMPONENT||e===tt.DEPTH_STENCIL||e===tt.ALPHA||e===tt.RED||e===tt.RG||e===tt.RGB||e===tt.RGBA||e===tt.LUMINANCE||e===tt.LUMINANCE_ALPHA||e===tt.RGB_DXT1||e===tt.RGBA_DXT1||e===tt.RGBA_DXT3||e===tt.RGBA_DXT5||e===tt.RGB_PVRTC_4BPPV1||e===tt.RGB_PVRTC_2BPPV1||e===tt.RGBA_PVRTC_4BPPV1||e===tt.RGBA_PVRTC_2BPPV1||e===tt.RGBA_ASTC||e===tt.RGB_ETC1||e===tt.RGB8_ETC2||e===tt.RGBA8_ETC2_EAC||e===tt.RGBA_BC7};tt.isColorFormat=function(e){return e===tt.RED||e===tt.ALPHA||e===tt.RGB||e===tt.RGBA||e===tt.LUMINANCE||e===tt.LUMINANCE_ALPHA};tt.isDepthFormat=function(e){return e===tt.DEPTH_COMPONENT||e===tt.DEPTH_STENCIL};tt.isCompressedFormat=function(e){return e===tt.RGB_DXT1||e===tt.RGBA_DXT1||e===tt.RGBA_DXT3||e===tt.RGBA_DXT5||e===tt.RGB_PVRTC_4BPPV1||e===tt.RGB_PVRTC_2BPPV1||e===tt.RGBA_PVRTC_4BPPV1||e===tt.RGBA_PVRTC_2BPPV1||e===tt.RGBA_ASTC||e===tt.RGB_ETC1||e===tt.RGB8_ETC2||e===tt.RGBA8_ETC2_EAC||e===tt.RGBA_BC7};tt.isDXTFormat=function(e){return e===tt.RGB_DXT1||e===tt.RGBA_DXT1||e===tt.RGBA_DXT3||e===tt.RGBA_DXT5};tt.isPVRTCFormat=function(e){return e===tt.RGB_PVRTC_4BPPV1||e===tt.RGB_PVRTC_2BPPV1||e===tt.RGBA_PVRTC_4BPPV1||e===tt.RGBA_PVRTC_2BPPV1};tt.isASTCFormat=function(e){return e===tt.RGBA_ASTC};tt.isETC1Format=function(e){return e===tt.RGB_ETC1};tt.isETC2Format=function(e){return e===tt.RGB8_ETC2||e===tt.RGBA8_ETC2_EAC};tt.isBC7Format=function(e){return e===tt.RGBA_BC7};tt.compressedTextureSizeInBytes=function(e,t,n){switch(e){case tt.RGB_DXT1:case tt.RGBA_DXT1:case tt.RGB_ETC1:case tt.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*8;case tt.RGBA_DXT3:case tt.RGBA_DXT5:case tt.RGBA_ASTC:case tt.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*16;case tt.RGB_PVRTC_4BPPV1:case tt.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(n,8)*4+7)/8);case tt.RGB_PVRTC_2BPPV1:case tt.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(n,8)*2+7)/8);case tt.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(n/4)*16;default:return 0}};tt.textureSizeInBytes=function(e,t,n,i){let o=tt.componentsLength(e);return Ne.isPacked(t)&&(o=1),o*Ne.sizeInBytes(t)*n*i};tt.alignmentInBytes=function(e,t,n){let i=tt.textureSizeInBytes(e,t,n,1)%4;return i===0?4:i===2?2:1};tt.createTypedArray=function(e,t,n,i){let o=Ne.getTypedArrayConstructor(t),r=tt.componentsLength(e)*n*i;return new o(r)};tt.flipY=function(e,t,n,i,o){if(o===1)return e;let r=tt.createTypedArray(t,n,i,o),s=tt.componentsLength(t),a=i*s;for(let l=0;l<o;++l){let u=l*i*s,f=(o-l-1)*i*s;for(let h=0;h<a;++h)r[f+h]=e[u+h]}return r};tt.toInternalFormat=function(e,t,n){if(!n.webgl2)return e;if(e===tt.DEPTH_STENCIL)return Y.DEPTH24_STENCIL8;if(e===tt.DEPTH_COMPONENT){if(t===Ne.UNSIGNED_SHORT)return Y.DEPTH_COMPONENT16;if(t===Ne.UNSIGNED_INT)return Y.DEPTH_COMPONENT24}if(t===Ne.FLOAT)switch(e){case tt.RGBA:return Y.RGBA32F;case tt.RGB:return Y.RGB32F;case tt.RG:return Y.RG32F;case tt.RED:return Y.R32F}if(t===Ne.HALF_FLOAT)switch(e){case tt.RGBA:return Y.RGBA16F;case tt.RGB:return Y.RGB16F;case tt.RG:return Y.RG16F;case tt.RED:return Y.R16F}return e};var Re=Object.freeze(tt);var rr={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:0,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_maximumSamples:0,_highpFloatSupported:!1,_highpIntSupported:!1};Object.defineProperties(rr,{maximumCombinedTextureImageUnits:{get:function(){return rr._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return rr._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return rr._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return rr._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return rr._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return rr._maximumTextureSize}},maximumVaryingVectors:{get:function(){return rr._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return rr._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return rr._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return rr._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return rr._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return rr._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return rr._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return rr._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return rr._maximumViewportWidth}},maximumViewportHeight:{get:function(){return rr._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return rr._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return rr._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return rr._maximumColorAttachments}},maximumSamples:{get:function(){return rr._maximumSamples}},highpFloatSupported:{get:function(){return rr._highpFloatSupported}},highpIntSupported:{get:function(){return rr._highpIntSupported}}});var ht=rr;function BG(e,t,n){let i=e._gl;i.framebufferTexture2D(i.FRAMEBUFFER,t,n._target,n._texture,0)}function $O(e,t,n){let i=e._gl;i.framebufferRenderbuffer(i.FRAMEBUFFER,t,i.RENDERBUFFER,n._getRenderbuffer())}function Nf(e){e=g(e,g.EMPTY_OBJECT);let t=e.context;C.defined("options.context",t);let n=t._gl,i=ht.maximumColorAttachments;if(this._gl=n,this._framebuffer=n.createFramebuffer(),this._colorTextures=[],this._colorRenderbuffers=[],this._activeColorAttachments=[],this._depthTexture=void 0,this._depthRenderbuffer=void 0,this._stencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this.destroyAttachments=g(e.destroyAttachments,!0),c(e.colorTextures)&&c(e.colorRenderbuffers))throw new w("Cannot have both color texture and color renderbuffer attachments.");if(c(e.depthTexture)&&c(e.depthRenderbuffer))throw new w("Cannot have both a depth texture and depth renderbuffer attachment.");if(c(e.depthStencilTexture)&&c(e.depthStencilRenderbuffer))throw new w("Cannot have both a depth-stencil texture and depth-stencil renderbuffer attachment.");let o=c(e.depthTexture)||c(e.depthRenderbuffer),r=c(e.depthStencilTexture)||c(e.depthStencilRenderbuffer);if(o&&r)throw new w("Cannot have both a depth and depth-stencil attachment.");if(c(e.stencilRenderbuffer)&&r)throw new w("Cannot have both a stencil and depth-stencil attachment.");if(o&&c(e.stencilRenderbuffer))throw new w("Cannot have both a depth and stencil attachment.");if(this._bind(),c(e.colorTextures)){let s=e.colorTextures,a=this._colorTextures.length=this._activeColorAttachments.length=s.length;if(a>i)throw new w("The number of color attachments exceeds the number supported.");for(let l=0;l<a;++l){let u=s[l];if(!Re.isColorFormat(u.pixelFormat))throw new w("The color-texture pixel-format must be a color format.");if(u.pixelDatatype===Ne.FLOAT&&!t.colorBufferFloat)throw new w("The color texture pixel datatype is FLOAT and the WebGL implementation does not support the EXT_color_buffer_float or WEBGL_color_buffer_float extensions. See Context.colorBufferFloat.");if(u.pixelDatatype===Ne.HALF_FLOAT&&!t.colorBufferHalfFloat)throw new w("The color texture pixel datatype is HALF_FLOAT and the WebGL implementation does not support the EXT_color_buffer_half_float extension. See Context.colorBufferHalfFloat.");let f=this._gl.COLOR_ATTACHMENT0+l;BG(this,f,u),this._activeColorAttachments[l]=f,this._colorTextures[l]=u}}if(c(e.colorRenderbuffers)){let s=e.colorRenderbuffers,a=this._colorRenderbuffers.length=this._activeColorAttachments.length=s.length;if(a>i)throw new w("The number of color attachments exceeds the number supported.");for(let l=0;l<a;++l){let u=s[l],f=this._gl.COLOR_ATTACHMENT0+l;$O(this,f,u),this._activeColorAttachments[l]=f,this._colorRenderbuffers[l]=u}}if(c(e.depthTexture)){let s=e.depthTexture;if(s.pixelFormat!==Re.DEPTH_COMPONENT)throw new w("The depth-texture pixel-format must be DEPTH_COMPONENT.");BG(this,this._gl.DEPTH_ATTACHMENT,s),this._depthTexture=s}if(c(e.depthRenderbuffer)){let s=e.depthRenderbuffer;$O(this,this._gl.DEPTH_ATTACHMENT,s),this._depthRenderbuffer=s}if(c(e.stencilRenderbuffer)){let s=e.stencilRenderbuffer;$O(this,this._gl.STENCIL_ATTACHMENT,s),this._stencilRenderbuffer=s}if(c(e.depthStencilTexture)){let s=e.depthStencilTexture;if(s.pixelFormat!==Re.DEPTH_STENCIL)throw new w("The depth-stencil pixel-format must be DEPTH_STENCIL.");BG(this,this._gl.DEPTH_STENCIL_ATTACHMENT,s),this._depthStencilTexture=s}if(c(e.depthStencilRenderbuffer)){let s=e.depthStencilRenderbuffer;$O(this,this._gl.DEPTH_STENCIL_ATTACHMENT,s),this._depthStencilRenderbuffer=s}this._unBind()}Object.defineProperties(Nf.prototype,{status:{get:function(){this._bind();let e=this._gl.checkFramebufferStatus(this._gl.FRAMEBUFFER);return this._unBind(),e}},numberOfColorAttachments:{get:function(){return this._activeColorAttachments.length}},depthTexture:{get:function(){return this._depthTexture}},depthRenderbuffer:{get:function(){return this._depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}}});Nf.prototype._bind=function(){let e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer)};Nf.prototype._unBind=function(){let e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,null)};Nf.prototype.bindDraw=function(){let e=this._gl;e.bindFramebuffer(e.DRAW_FRAMEBUFFER,this._framebuffer)};Nf.prototype.bindRead=function(){let e=this._gl;e.bindFramebuffer(e.READ_FRAMEBUFFER,this._framebuffer)};Nf.prototype._getActiveColorAttachments=function(){return this._activeColorAttachments};Nf.prototype.getColorTexture=function(e){if(!c(e)||e<0||e>=this._colorTextures.length)throw new w("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorTextures[e]};Nf.prototype.getColorRenderbuffer=function(e){if(!c(e)||e<0||e>=this._colorRenderbuffers.length)throw new w("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorRenderbuffers[e]};Nf.prototype.isDestroyed=function(){return!1};Nf.prototype.destroy=function(){if(this.destroyAttachments){let e=this._colorTextures;for(let n=0;n<e.length;++n){let i=e[n];c(i)&&i.destroy()}let t=this._colorRenderbuffers;for(let n=0;n<t.length;++n){let i=t[n];c(i)&&i.destroy()}this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy(),this._stencilRenderbuffer=this._stencilRenderbuffer&&this._stencilRenderbuffer.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()}return this._gl.deleteFramebuffer(this._framebuffer),ue(this)};var Lr=Nf;var ZO={CLOCKWISE:Y.CW,COUNTER_CLOCKWISE:Y.CCW};ZO.validate=function(e){return e===ZO.CLOCKWISE||e===ZO.COUNTER_CLOCKWISE};var Gr=Object.freeze(ZO);function l$(e){if(typeof e!="object"||e===null)return e;let t,n=Object.keys(e);for(let i=0;i<n.length;i++)t=n[i],e.hasOwnProperty(t)&&t!=="_applyFunctions"&&(e[t]=l$(e[t]));return Object.freeze(e)}var JO=l$;function u$(e){return e===Y.FUNC_ADD||e===Y.FUNC_SUBTRACT||e===Y.FUNC_REVERSE_SUBTRACT||e===Y.MIN||e===Y.MAX}function QO(e){return e===Y.ZERO||e===Y.ONE||e===Y.SRC_COLOR||e===Y.ONE_MINUS_SRC_COLOR||e===Y.DST_COLOR||e===Y.ONE_MINUS_DST_COLOR||e===Y.SRC_ALPHA||e===Y.ONE_MINUS_SRC_ALPHA||e===Y.DST_ALPHA||e===Y.ONE_MINUS_DST_ALPHA||e===Y.CONSTANT_COLOR||e===Y.ONE_MINUS_CONSTANT_COLOR||e===Y.CONSTANT_ALPHA||e===Y.ONE_MINUS_CONSTANT_ALPHA||e===Y.SRC_ALPHA_SATURATE}function nwe(e){return e===Y.FRONT||e===Y.BACK||e===Y.FRONT_AND_BACK}function iwe(e){return e===Y.NEVER||e===Y.LESS||e===Y.EQUAL||e===Y.LEQUAL||e===Y.GREATER||e===Y.NOTEQUAL||e===Y.GEQUAL||e===Y.ALWAYS}function f$(e){return e===Y.NEVER||e===Y.LESS||e===Y.EQUAL||e===Y.LEQUAL||e===Y.GREATER||e===Y.NOTEQUAL||e===Y.GEQUAL||e===Y.ALWAYS}function Bx(e){return e===Y.ZERO||e===Y.KEEP||e===Y.REPLACE||e===Y.INCR||e===Y.DECR||e===Y.INVERT||e===Y.INCR_WRAP||e===Y.DECR_WRAP}function Jd(e){let t=g(e,g.EMPTY_OBJECT),n=g(t.cull,g.EMPTY_OBJECT),i=g(t.polygonOffset,g.EMPTY_OBJECT),o=g(t.scissorTest,g.EMPTY_OBJECT),r=g(o.rectangle,g.EMPTY_OBJECT),s=g(t.depthRange,g.EMPTY_OBJECT),a=g(t.depthTest,g.EMPTY_OBJECT),l=g(t.colorMask,g.EMPTY_OBJECT),u=g(t.blending,g.EMPTY_OBJECT),f=g(u.color,g.EMPTY_OBJECT),h=g(t.stencilTest,g.EMPTY_OBJECT),m=g(h.frontOperation,g.EMPTY_OBJECT),p=g(h.backOperation,g.EMPTY_OBJECT),_=g(t.sampleCoverage,g.EMPTY_OBJECT),b=t.viewport;if(this.frontFace=g(t.frontFace,Gr.COUNTER_CLOCKWISE),this.cull={enabled:g(n.enabled,!1),face:g(n.face,Y.BACK)},this.lineWidth=g(t.lineWidth,1),this.polygonOffset={enabled:g(i.enabled,!1),factor:g(i.factor,0),units:g(i.units,0)},this.scissorTest={enabled:g(o.enabled,!1),rectangle:je.clone(r)},this.depthRange={near:g(s.near,0),far:g(s.far,1)},this.depthTest={enabled:g(a.enabled,!1),func:g(a.func,Y.LESS)},this.colorMask={red:g(l.red,!0),green:g(l.green,!0),blue:g(l.blue,!0),alpha:g(l.alpha,!0)},this.depthMask=g(t.depthMask,!0),this.stencilMask=g(t.stencilMask,-1),this.blending={enabled:g(u.enabled,!1),color:new z(g(f.red,0),g(f.green,0),g(f.blue,0),g(f.alpha,0)),equationRgb:g(u.equationRgb,Y.FUNC_ADD),equationAlpha:g(u.equationAlpha,Y.FUNC_ADD),functionSourceRgb:g(u.functionSourceRgb,Y.ONE),functionSourceAlpha:g(u.functionSourceAlpha,Y.ONE),functionDestinationRgb:g(u.functionDestinationRgb,Y.ZERO),functionDestinationAlpha:g(u.functionDestinationAlpha,Y.ZERO)},this.stencilTest={enabled:g(h.enabled,!1),frontFunction:g(h.frontFunction,Y.ALWAYS),backFunction:g(h.backFunction,Y.ALWAYS),reference:g(h.reference,0),mask:g(h.mask,-1),frontOperation:{fail:g(m.fail,Y.KEEP),zFail:g(m.zFail,Y.KEEP),zPass:g(m.zPass,Y.KEEP)},backOperation:{fail:g(p.fail,Y.KEEP),zFail:g(p.zFail,Y.KEEP),zPass:g(p.zPass,Y.KEEP)}},this.sampleCoverage={enabled:g(_.enabled,!1),value:g(_.value,1),invert:g(_.invert,!1)},this.viewport=c(b)?new je(b.x,b.y,b.width,b.height):void 0,this.lineWidth<ht.minimumAliasedLineWidth||this.lineWidth>ht.maximumAliasedLineWidth)throw new w("renderState.lineWidth is out of range. Check minimumAliasedLineWidth and maximumAliasedLineWidth.");if(!Gr.validate(this.frontFace))throw new w("Invalid renderState.frontFace.");if(!nwe(this.cull.face))throw new w("Invalid renderState.cull.face.");if(this.scissorTest.rectangle.width<0||this.scissorTest.rectangle.height<0)throw new w("renderState.scissorTest.rectangle.width and renderState.scissorTest.rectangle.height must be greater than or equal to zero.");if(this.depthRange.near>this.depthRange.far)throw new w("renderState.depthRange.near can not be greater than renderState.depthRange.far.");if(this.depthRange.near<0)throw new w("renderState.depthRange.near must be greater than or equal to zero.");if(this.depthRange.far>1)throw new w("renderState.depthRange.far must be less than or equal to one.");if(!iwe(this.depthTest.func))throw new w("Invalid renderState.depthTest.func.");if(this.blending.color.red<0||this.blending.color.red>1||this.blending.color.green<0||this.blending.color.green>1||this.blending.color.blue<0||this.blending.color.blue>1||this.blending.color.alpha<0||this.blending.color.alpha>1)throw new w("renderState.blending.color components must be greater than or equal to zero and less than or equal to one.");if(!u$(this.blending.equationRgb))throw new w("Invalid renderState.blending.equationRgb.");if(!u$(this.blending.equationAlpha))throw new w("Invalid renderState.blending.equationAlpha.");if(!QO(this.blending.functionSourceRgb))throw new w("Invalid renderState.blending.functionSourceRgb.");if(!QO(this.blending.functionSourceAlpha))throw new w("Invalid renderState.blending.functionSourceAlpha.");if(!QO(this.blending.functionDestinationRgb))throw new w("Invalid renderState.blending.functionDestinationRgb.");if(!QO(this.blending.functionDestinationAlpha))throw new w("Invalid renderState.blending.functionDestinationAlpha.");if(!f$(this.stencilTest.frontFunction))throw new w("Invalid renderState.stencilTest.frontFunction.");if(!f$(this.stencilTest.backFunction))throw new w("Invalid renderState.stencilTest.backFunction.");if(!Bx(this.stencilTest.frontOperation.fail))throw new w("Invalid renderState.stencilTest.frontOperation.fail.");if(!Bx(this.stencilTest.frontOperation.zFail))throw new w("Invalid renderState.stencilTest.frontOperation.zFail.");if(!Bx(this.stencilTest.frontOperation.zPass))throw new w("Invalid renderState.stencilTest.frontOperation.zPass.");if(!Bx(this.stencilTest.backOperation.fail))throw new w("Invalid renderState.stencilTest.backOperation.fail.");if(!Bx(this.stencilTest.backOperation.zFail))throw new w("Invalid renderState.stencilTest.backOperation.zFail.");if(!Bx(this.stencilTest.backOperation.zPass))throw new w("Invalid renderState.stencilTest.backOperation.zPass.");if(c(this.viewport)){if(this.viewport.width<0)throw new w("renderState.viewport.width must be greater than or equal to zero.");if(this.viewport.height<0)throw new w("renderState.viewport.height must be greater than or equal to zero.");if(this.viewport.width>ht.maximumViewportWidth)throw new w(`renderState.viewport.width must be less than or equal to the maximum viewport width (${ht.maximumViewportWidth.toString()}). Check maximumViewportWidth.`);if(this.viewport.height>ht.maximumViewportHeight)throw new w(`renderState.viewport.height must be less than or equal to the maximum viewport height (${ht.maximumViewportHeight.toString()}). Check maximumViewportHeight.`)}this.id=0,this._applyFunctions=[]}var owe=0,Zd={};Jd.fromCache=function(e){let t=JSON.stringify(e),n=Zd[t];if(c(n))return++n.referenceCount,n.state;let i=new Jd(e),o=JSON.stringify(i);return n=Zd[o],c(n)||(i.id=owe++,i=JO(i),n={referenceCount:0,state:i},Zd[o]=n),++n.referenceCount,Zd[t]={referenceCount:1,state:n.state},n.state};Jd.removeFromCache=function(e){let t=new Jd(e),n=JSON.stringify(t),i=Zd[n],o=JSON.stringify(e),r=Zd[o];c(r)&&(--r.referenceCount,r.referenceCount===0&&(delete Zd[o],c(i)&&--i.referenceCount)),c(i)&&i.referenceCount===0&&delete Zd[n]};Jd.getCache=function(){return Zd};Jd.clearCache=function(){Zd={}};function Zy(e,t,n){n?e.enable(t):e.disable(t)}function d$(e,t){e.frontFace(t.frontFace)}function h$(e,t){let n=t.cull,i=n.enabled;Zy(e,e.CULL_FACE,i),i&&e.cullFace(n.face)}function m$(e,t){e.lineWidth(t.lineWidth)}function p$(e,t){let n=t.polygonOffset,i=n.enabled;Zy(e,e.POLYGON_OFFSET_FILL,i),i&&e.polygonOffset(n.factor,n.units)}function _$(e,t,n){let i=t.scissorTest,o=c(n.scissorTest)?n.scissorTest.enabled:i.enabled;if(Zy(e,e.SCISSOR_TEST,o),o){let r=c(n.scissorTest)?n.scissorTest.rectangle:i.rectangle;e.scissor(r.x,r.y,r.width,r.height)}}function g$(e,t){let n=t.depthRange;e.depthRange(n.near,n.far)}function y$(e,t){let n=t.depthTest,i=n.enabled;Zy(e,e.DEPTH_TEST,i),i&&e.depthFunc(n.func)}function b$(e,t){let n=t.colorMask;e.colorMask(n.red,n.green,n.blue,n.alpha)}function x$(e,t){e.depthMask(t.depthMask)}function T$(e,t){e.stencilMask(t.stencilMask)}function rwe(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)}function C$(e,t,n){let i=t.blending,o=c(n.blendingEnabled)?n.blendingEnabled:i.enabled;Zy(e,e.BLEND,o),o&&(rwe(e,i.color),e.blendEquationSeparate(i.equationRgb,i.equationAlpha),e.blendFuncSeparate(i.functionSourceRgb,i.functionDestinationRgb,i.functionSourceAlpha,i.functionDestinationAlpha))}function E$(e,t){let n=t.stencilTest,i=n.enabled;if(Zy(e,e.STENCIL_TEST,i),i){let o=n.frontFunction,r=n.backFunction,s=n.reference,a=n.mask;e.stencilFunc(o,s,a),e.stencilFuncSeparate(e.BACK,r,s,a),e.stencilFuncSeparate(e.FRONT,o,s,a);let l=n.frontOperation,u=l.fail,f=l.zFail,h=l.zPass;e.stencilOpSeparate(e.FRONT,u,f,h);let m=n.backOperation,p=m.fail,_=m.zFail,b=m.zPass;e.stencilOpSeparate(e.BACK,p,_,b)}}function w$(e,t){let n=t.sampleCoverage,i=n.enabled;Zy(e,e.SAMPLE_COVERAGE,i),i&&e.sampleCoverage(n.value,n.invert)}var swe=new je;function S$(e,t,n){let i=g(t.viewport,n.viewport);c(i)||(i=swe,i.width=n.context.drawingBufferWidth,i.height=n.context.drawingBufferHeight),n.context.uniformState.viewport=i,e.viewport(i.x,i.y,i.width,i.height)}Jd.apply=function(e,t,n){d$(e,t),h$(e,t),m$(e,t),p$(e,t),g$(e,t),y$(e,t),b$(e,t),x$(e,t),T$(e,t),E$(e,t),w$(e,t),_$(e,t,n),C$(e,t,n),S$(e,t,n)};function awe(e,t){let n=[];return e.frontFace!==t.frontFace&&n.push(d$),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&n.push(h$),e.lineWidth!==t.lineWidth&&n.push(m$),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&n.push(p$),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&n.push(g$),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&n.push(y$),(e.colorMask.red!==t.colorMask.red||e.colorMask.green!==t.colorMask.green||e.colorMask.blue!==t.colorMask.blue||e.colorMask.alpha!==t.colorMask.alpha)&&n.push(b$),e.depthMask!==t.depthMask&&n.push(x$),e.stencilMask!==t.stencilMask&&n.push(T$),(e.stencilTest.enabled!==t.stencilTest.enabled||e.stencilTest.frontFunction!==t.stencilTest.frontFunction||e.stencilTest.backFunction!==t.stencilTest.backFunction||e.stencilTest.reference!==t.stencilTest.reference||e.stencilTest.mask!==t.stencilTest.mask||e.stencilTest.frontOperation.fail!==t.stencilTest.frontOperation.fail||e.stencilTest.frontOperation.zFail!==t.stencilTest.frontOperation.zFail||e.stencilTest.backOperation.fail!==t.stencilTest.backOperation.fail||e.stencilTest.backOperation.zFail!==t.stencilTest.backOperation.zFail||e.stencilTest.backOperation.zPass!==t.stencilTest.backOperation.zPass)&&n.push(E$),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&n.push(w$),n}Jd.partialApply=function(e,t,n,i,o,r){if(t!==n){let f=n._applyFunctions[t.id];c(f)||(f=awe(t,n),n._applyFunctions[t.id]=f);let h=f.length;for(let m=0;m<h;++m)f[m](e,n)}let s=c(i.scissorTest)?i.scissorTest:t.scissorTest,a=c(o.scissorTest)?o.scissorTest:n.scissorTest;(s!==a||r)&&_$(e,n,o);let l=c(i.blendingEnabled)?i.blendingEnabled:t.blending.enabled,u=c(o.blendingEnabled)?o.blendingEnabled:n.blending.enabled;(l!==u||u&&t.blending!==n.blending)&&C$(e,n,o),(t!==n||i!==o||i.context!==o.context)&&S$(e,n,o)};Jd.getState=function(e){if(!c(e))throw new w("renderState is required.");return{frontFace:e.frontFace,cull:{enabled:e.cull.enabled,face:e.cull.face},lineWidth:e.lineWidth,polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},scissorTest:{enabled:e.scissorTest.enabled,rectangle:je.clone(e.scissorTest.rectangle)},depthRange:{near:e.depthRange.near,far:e.depthRange.far},depthTest:{enabled:e.depthTest.enabled,func:e.depthTest.func},colorMask:{red:e.colorMask.red,green:e.colorMask.green,blue:e.colorMask.blue,alpha:e.colorMask.alpha},depthMask:e.depthMask,stencilMask:e.stencilMask,blending:{enabled:e.blending.enabled,color:z.clone(e.blending.color),equationRgb:e.blending.equationRgb,equationAlpha:e.blending.equationAlpha,functionSourceRgb:e.blending.functionSourceRgb,functionSourceAlpha:e.blending.functionSourceAlpha,functionDestinationRgb:e.blending.functionDestinationRgb,functionDestinationAlpha:e.blending.functionDestinationAlpha},stencilTest:{enabled:e.stencilTest.enabled,frontFunction:e.stencilTest.frontFunction,backFunction:e.stencilTest.backFunction,reference:e.stencilTest.reference,mask:e.stencilTest.mask,frontOperation:{fail:e.stencilTest.frontOperation.fail,zFail:e.stencilTest.frontOperation.zFail,zPass:e.stencilTest.frontOperation.zPass},backOperation:{fail:e.stencilTest.backOperation.fail,zFail:e.stencilTest.backOperation.zFail,zPass:e.stencilTest.backOperation.zPass}},sampleCoverage:{enabled:e.sampleCoverage.enabled,value:e.sampleCoverage.value,invert:e.sampleCoverage.invert},viewport:c(e.viewport)?je.clone(e.viewport):void 0}};var Fe=Jd;function Yt(e,t,n,i){this[0]=g(e,0),this[1]=g(n,0),this[2]=g(t,0),this[3]=g(i,0)}Yt.packedLength=4;Yt.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t};Yt.unpack=function(e,t,n){return C.defined("array",e),t=g(t,0),c(n)||(n=new Yt),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n};Yt.packArray=function(e,t){C.defined("array",e);let n=e.length,i=n*4;if(!c(t))t=new Array(i);else{if(!Array.isArray(t)&&t.length!==i)throw new w("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==i&&(t.length=i)}for(let o=0;o<n;++o)Yt.pack(e[o],t,o*4);return t};Yt.unpackArray=function(e,t){if(C.defined("array",e),C.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!==0)throw new w("array length must be a multiple of 4.");let n=e.length;c(t)?t.length=n/4:t=new Array(n/4);for(let i=0;i<n;i+=4){let o=i/4;t[o]=Yt.unpack(e,i,t[o])}return t};Yt.clone=function(e,t){if(c(e))return c(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new Yt(e[0],e[2],e[1],e[3])};Yt.fromArray=Yt.unpack;Yt.fromColumnMajorArray=function(e,t){return C.defined("values",e),Yt.clone(e,t)};Yt.fromRowMajorArray=function(e,t){return C.defined("values",e),c(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new Yt(e[0],e[1],e[2],e[3])};Yt.fromScale=function(e,t){return C.typeOf.object("scale",e),c(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new Yt(e.x,0,0,e.y)};Yt.fromUniformScale=function(e,t){return C.typeOf.number("scale",e),c(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new Yt(e,0,0,e)};Yt.fromRotation=function(e,t){C.typeOf.number("angle",e);let n=Math.cos(e),i=Math.sin(e);return c(t)?(t[0]=n,t[1]=i,t[2]=-i,t[3]=n,t):new Yt(n,-i,i,n)};Yt.toArray=function(e,t){return C.typeOf.object("matrix",e),c(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]};Yt.getElementIndex=function(e,t){return C.typeOf.number.greaterThanOrEquals("row",t,0),C.typeOf.number.lessThanOrEquals("row",t,1),C.typeOf.number.greaterThanOrEquals("column",e,0),C.typeOf.number.lessThanOrEquals("column",e,1),e*2+t};Yt.getColumn=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.number.greaterThanOrEquals("index",t,0),C.typeOf.number.lessThanOrEquals("index",t,1),C.typeOf.object("result",n);let i=t*2,o=e[i],r=e[i+1];return n.x=o,n.y=r,n};Yt.setColumn=function(e,t,n,i){C.typeOf.object("matrix",e),C.typeOf.number.greaterThanOrEquals("index",t,0),C.typeOf.number.lessThanOrEquals("index",t,1),C.typeOf.object("cartesian",n),C.typeOf.object("result",i),i=Yt.clone(e,i);let o=t*2;return i[o]=n.x,i[o+1]=n.y,i};Yt.getRow=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.number.greaterThanOrEquals("index",t,0),C.typeOf.number.lessThanOrEquals("index",t,1),C.typeOf.object("result",n);let i=e[t],o=e[t+2];return n.x=i,n.y=o,n};Yt.setRow=function(e,t,n,i){return C.typeOf.object("matrix",e),C.typeOf.number.greaterThanOrEquals("index",t,0),C.typeOf.number.lessThanOrEquals("index",t,1),C.typeOf.object("cartesian",n),C.typeOf.object("result",i),i=Yt.clone(e,i),i[t]=n.x,i[t+2]=n.y,i};var cwe=new k;Yt.setScale=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.object("scale",t),C.typeOf.object("result",n);let i=Yt.getScale(e,cwe),o=t.x/i.x,r=t.y/i.y;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*r,n[3]=e[3]*r,n};var lwe=new k;Yt.setUniformScale=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.number("scale",t),C.typeOf.object("result",n);let i=Yt.getScale(e,lwe),o=t/i.x,r=t/i.y;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*r,n[3]=e[3]*r,n};var A$=new k;Yt.getScale=function(e,t){return C.typeOf.object("matrix",e),C.typeOf.object("result",t),t.x=k.magnitude(k.fromElements(e[0],e[1],A$)),t.y=k.magnitude(k.fromElements(e[2],e[3],A$)),t};var v$=new k;Yt.getMaximumScale=function(e){return Yt.getScale(e,v$),k.maximumComponent(v$)};var uwe=new k;Yt.setRotation=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.object("result",n);let i=Yt.getScale(e,uwe);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.y,n[3]=t[3]*i.y,n};var fwe=new k;Yt.getRotation=function(e,t){C.typeOf.object("matrix",e),C.typeOf.object("result",t);let n=Yt.getScale(e,fwe);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.y,t[3]=e[3]/n.y,t};Yt.multiply=function(e,t,n){C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n);let i=e[0]*t[0]+e[2]*t[1],o=e[0]*t[2]+e[2]*t[3],r=e[1]*t[0]+e[3]*t[1],s=e[1]*t[2]+e[3]*t[3];return n[0]=i,n[1]=r,n[2]=o,n[3]=s,n};Yt.add=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n};Yt.subtract=function(e,t,n){return C.typeOf.object("left",e),C.typeOf.object("right",t),C.typeOf.object("result",n),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n};Yt.multiplyByVector=function(e,t,n){C.typeOf.object("matrix",e),C.typeOf.object("cartesian",t),C.typeOf.object("result",n);let i=e[0]*t.x+e[2]*t.y,o=e[1]*t.x+e[3]*t.y;return n.x=i,n.y=o,n};Yt.multiplyByScalar=function(e,t,n){return C.typeOf.object("matrix",e),C.typeOf.number("scalar",t),C.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n};Yt.multiplyByScale=function(e,t,n){return C.typeOf.object("matrix",e),C.typeOf.object("scale",t),C.typeOf.object("result",n),n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.y,n[3]=e[3]*t.y,n};Yt.multiplyByUniformScale=function(e,t,n){return C.typeOf.object("matrix",e),C.typeOf.number("scale",t),C.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n};Yt.negate=function(e,t){return C.typeOf.object("matrix",e),C.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t};Yt.transpose=function(e,t){C.typeOf.object("matrix",e),C.typeOf.object("result",t);let n=e[0],i=e[2],o=e[1],r=e[3];return t[0]=n,t[1]=i,t[2]=o,t[3]=r,t};Yt.abs=function(e,t){return C.typeOf.object("matrix",e),C.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t};Yt.equals=function(e,t){return e===t||c(e)&&c(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]};Yt.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]};Yt.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n};Yt.IDENTITY=Object.freeze(new Yt(1,0,0,1));Yt.ZERO=Object.freeze(new Yt(0,0,0,0));Yt.COLUMN0ROW0=0;Yt.COLUMN0ROW1=1;Yt.COLUMN1ROW0=2;Yt.COLUMN1ROW1=3;Object.defineProperties(Yt.prototype,{length:{get:function(){return Yt.packedLength}}});Yt.prototype.clone=function(e){return Yt.clone(this,e)};Yt.prototype.equals=function(e){return Yt.equals(this,e)};Yt.prototype.equalsEpsilon=function(e,t){return Yt.equalsEpsilon(this,e,t)};Yt.prototype.toString=function(){return`(${this[0]}, ${this[2]})
| (${this[1]}, ${this[3]})`};var Li=Yt;function dwe(e,t,n,i){switch(t.type){case e.FLOAT:return new D$(e,t,n,i);case e.FLOAT_VEC2:return new I$(e,t,n,i);case e.FLOAT_VEC3:return new O$(e,t,n,i);case e.FLOAT_VEC4:return new P$(e,t,n,i);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new kG(e,t,n,i);case e.INT:case e.BOOL:return new R$(e,t,n,i);case e.INT_VEC2:case e.BOOL_VEC2:return new M$(e,t,n,i);case e.INT_VEC3:case e.BOOL_VEC3:return new L$(e,t,n,i);case e.INT_VEC4:case e.BOOL_VEC4:return new N$(e,t,n,i);case e.FLOAT_MAT2:return new F$(e,t,n,i);case e.FLOAT_MAT3:return new B$(e,t,n,i);case e.FLOAT_MAT4:return new k$(e,t,n,i);default:throw new ie(`Unrecognized uniform type: ${t.type} for uniform "${n}".`)}}function D$(e,t,n,i){this.name=n,this.value=void 0,this._value=0,this._gl=e,this._location=i}D$.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1f(this._location,this.value))};function I$(e,t,n,i){this.name=n,this.value=void 0,this._value=new k,this._gl=e,this._location=i}I$.prototype.set=function(){let e=this.value;k.equals(e,this._value)||(k.clone(e,this._value),this._gl.uniform2f(this._location,e.x,e.y))};function O$(e,t,n,i){this.name=n,this.value=void 0,this._value=void 0,this._gl=e,this._location=i}O$.prototype.set=function(){let e=this.value;if(c(e.red))z.equals(e,this._value)||(this._value=z.clone(e,this._value),this._gl.uniform3f(this._location,e.red,e.green,e.blue));else if(c(e.x))d.equals(e,this._value)||(this._value=d.clone(e,this._value),this._gl.uniform3f(this._location,e.x,e.y,e.z));else throw new w(`Invalid vec3 value for uniform "${this.name}".`)};function P$(e,t,n,i){this.name=n,this.value=void 0,this._value=void 0,this._gl=e,this._location=i}P$.prototype.set=function(){let e=this.value;if(c(e.red))z.equals(e,this._value)||(this._value=z.clone(e,this._value),this._gl.uniform4f(this._location,e.red,e.green,e.blue,e.alpha));else if(c(e.x))ee.equals(e,this._value)||(this._value=ee.clone(e,this._value),this._gl.uniform4f(this._location,e.x,e.y,e.z,e.w));else throw new w(`Invalid vec4 value for uniform "${this.name}".`)};function kG(e,t,n,i){this.name=n,this.value=void 0,this._gl=e,this._location=i,this.textureUnitIndex=void 0}kG.prototype.set=function(){let e=this._gl;e.activeTexture(e.TEXTURE0+this.textureUnitIndex);let t=this.value;e.bindTexture(t._target,t._texture)};kG.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1};function R$(e,t,n,i){this.name=n,this.value=void 0,this._value=0,this._gl=e,this._location=i}R$.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1i(this._location,this.value))};function M$(e,t,n,i){this.name=n,this.value=void 0,this._value=new k,this._gl=e,this._location=i}M$.prototype.set=function(){let e=this.value;k.equals(e,this._value)||(k.clone(e,this._value),this._gl.uniform2i(this._location,e.x,e.y))};function L$(e,t,n,i){this.name=n,this.value=void 0,this._value=new d,this._gl=e,this._location=i}L$.prototype.set=function(){let e=this.value;d.equals(e,this._value)||(d.clone(e,this._value),this._gl.uniform3i(this._location,e.x,e.y,e.z))};function N$(e,t,n,i){this.name=n,this.value=void 0,this._value=new ee,this._gl=e,this._location=i}N$.prototype.set=function(){let e=this.value;ee.equals(e,this._value)||(ee.clone(e,this._value),this._gl.uniform4i(this._location,e.x,e.y,e.z,e.w))};var hwe=new Float32Array(4);function F$(e,t,n,i){this.name=n,this.value=void 0,this._value=new Li,this._gl=e,this._location=i}F$.prototype.set=function(){if(!Li.equalsArray(this.value,this._value,0)){Li.clone(this.value,this._value);let e=Li.toArray(this.value,hwe);this._gl.uniformMatrix2fv(this._location,!1,e)}};var mwe=new Float32Array(9);function B$(e,t,n,i){this.name=n,this.value=void 0,this._value=new q,this._gl=e,this._location=i}B$.prototype.set=function(){if(!q.equalsArray(this.value,this._value,0)){q.clone(this.value,this._value);let e=q.toArray(this.value,mwe);this._gl.uniformMatrix3fv(this._location,!1,e)}};var pwe=new Float32Array(16);function k$(e,t,n,i){this.name=n,this.value=void 0,this._value=new N,this._gl=e,this._location=i}k$.prototype.set=function(){if(!N.equalsArray(this.value,this._value,0)){N.clone(this.value,this._value);let e=N.toArray(this.value,pwe);this._gl.uniformMatrix4fv(this._location,!1,e)}};var eP=dwe;function _we(e,t,n,i){switch(t.type){case e.FLOAT:return new U$(e,t,n,i);case e.FLOAT_VEC2:return new z$(e,t,n,i);case e.FLOAT_VEC3:return new V$(e,t,n,i);case e.FLOAT_VEC4:return new H$(e,t,n,i);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new UG(e,t,n,i);case e.INT:case e.BOOL:return new G$(e,t,n,i);case e.INT_VEC2:case e.BOOL_VEC2:return new j$(e,t,n,i);case e.INT_VEC3:case e.BOOL_VEC3:return new W$(e,t,n,i);case e.INT_VEC4:case e.BOOL_VEC4:return new q$(e,t,n,i);case e.FLOAT_MAT2:return new Y$(e,t,n,i);case e.FLOAT_MAT3:return new X$(e,t,n,i);case e.FLOAT_MAT4:return new K$(e,t,n,i);default:throw new ie(`Unrecognized uniform type: ${t.type} for uniform "${n}".`)}}function U$(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o),this._gl=e,this._location=i[0]}U$.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1;for(let o=0;o<t;++o){let r=e[o];r!==n[o]&&(n[o]=r,i=!0)}i&&this._gl.uniform1fv(this._location,n)};function z$(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o*2),this._gl=e,this._location=i[0]}z$.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];k.equalsArray(s,n,o)||(k.pack(s,n,o),i=!0),o+=2}i&&this._gl.uniform2fv(this._location,n)};function V$(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o*3),this._gl=e,this._location=i[0]}V$.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];if(c(s.red))(s.red!==n[o]||s.green!==n[o+1]||s.blue!==n[o+2])&&(n[o]=s.red,n[o+1]=s.green,n[o+2]=s.blue,i=!0);else if(c(s.x))d.equalsArray(s,n,o)||(d.pack(s,n,o),i=!0);else throw new w("Invalid vec3 value.");o+=3}i&&this._gl.uniform3fv(this._location,n)};function H$(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o*4),this._gl=e,this._location=i[0]}H$.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];if(c(s.red))z.equalsArray(s,n,o)||(z.pack(s,n,o),i=!0);else if(c(s.x))ee.equalsArray(s,n,o)||(ee.pack(s,n,o),i=!0);else throw new w("Invalid vec4 value.");o+=4}i&&this._gl.uniform4fv(this._location,n)};function UG(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o),this._gl=e,this._locations=i,this.textureUnitIndex=void 0}UG.prototype.set=function(){let e=this._gl,t=e.TEXTURE0+this.textureUnitIndex,n=this.value,i=n.length;for(let o=0;o<i;++o){let r=n[o];e.activeTexture(t+o),e.bindTexture(r._target,r._texture)}};UG.prototype._setSampler=function(e){this.textureUnitIndex=e;let t=this._locations,n=t.length;for(let i=0;i<n;++i){let o=e+i;this._gl.uniform1i(t[i],o)}return e+n};function G$(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(o),this._gl=e,this._location=i[0]}G$.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1;for(let o=0;o<t;++o){let r=e[o];r!==n[o]&&(n[o]=r,i=!0)}i&&this._gl.uniform1iv(this._location,n)};function j$(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(o*2),this._gl=e,this._location=i[0]}j$.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];k.equalsArray(s,n,o)||(k.pack(s,n,o),i=!0),o+=2}i&&this._gl.uniform2iv(this._location,n)};function W$(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(o*3),this._gl=e,this._location=i[0]}W$.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];d.equalsArray(s,n,o)||(d.pack(s,n,o),i=!0),o+=3}i&&this._gl.uniform3iv(this._location,n)};function q$(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(o*4),this._gl=e,this._location=i[0]}q$.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];ee.equalsArray(s,n,o)||(ee.pack(s,n,o),i=!0),o+=4}i&&this._gl.uniform4iv(this._location,n)};function Y$(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o*4),this._gl=e,this._location=i[0]}Y$.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];Li.equalsArray(s,n,o)||(Li.pack(s,n,o),i=!0),o+=4}i&&this._gl.uniformMatrix2fv(this._location,!1,n)};function X$(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o*9),this._gl=e,this._location=i[0]}X$.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];q.equalsArray(s,n,o)||(q.pack(s,n,o),i=!0),o+=9}i&&this._gl.uniformMatrix3fv(this._location,!1,n)};function K$(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o*16),this._gl=e,this._location=i[0]}K$.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];N.equalsArray(s,n,o)||(N.pack(s,n,o),i=!0),o+=16}i&&this._gl.uniformMatrix4fv(this._location,!1,n)};var tP=_we;var gwe=0;function Mm(e){let t=e.vertexShaderText,n=e.fragmentShaderText;typeof spector!="undefined"&&(t=t.replace(/^#line/gm,"//#line"),n=n.replace(/^#line/gm,"//#line"));let i=ywe(t,n);this._gl=e.gl,this._logShaderCompilation=e.logShaderCompilation,this._debugShaders=e.debugShaders,this._attributeLocations=e.attributeLocations,this._program=void 0,this._numberOfVertexAttributes=void 0,this._vertexAttributes=void 0,this._uniformsByName=void 0,this._uniforms=void 0,this._automaticUniforms=void 0,this._manualUniforms=void 0,this._duplicateUniformNames=i.duplicateUniformNames,this._cachedShader=void 0,this.maximumTextureUnitIndex=void 0,this._vertexShaderSource=e.vertexShaderSource,this._vertexShaderText=e.vertexShaderText,this._fragmentShaderSource=e.fragmentShaderSource,this._fragmentShaderText=i.fragmentShaderText,this.id=gwe++}Mm.fromCache=function(e){return e=g(e,g.EMPTY_OBJECT),C.defined("options.context",e.context),e.context.shaderCache.getShaderProgram(e)};Mm.replaceCache=function(e){return e=g(e,g.EMPTY_OBJECT),C.defined("options.context",e.context),e.context.shaderCache.replaceShaderProgram(e)};Object.defineProperties(Mm.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},vertexAttributes:{get:function(){return nP(this),this._vertexAttributes}},numberOfVertexAttributes:{get:function(){return nP(this),this._numberOfVertexAttributes}},allUniforms:{get:function(){return nP(this),this._uniformsByName}}});function $$(e){let t=[],n=e.match(/uniform.*?(?![^{]*})(?=[=\[;])/g);if(c(n)){let i=n.length;for(let o=0;o<i;o++){let r=n[o].trim(),s=r.slice(r.lastIndexOf(" ")+1);t.push(s)}}return t}function ywe(e,t){let n={};if(!ht.highpFloatSupported||!ht.highpIntSupported){let i,o,r,s,a=$$(e),l=$$(t),u=a.length,f=l.length;for(i=0;i<u;i++)for(o=0;o<f;o++)if(a[i]===l[o]){r=a[i],s=`czm_mediump_${r}`;let h=new RegExp(`${r}\\b`,"g");t=t.replace(h,s),n[s]=r}}return{fragmentShaderText:t,duplicateUniformNames:n}}var Qd="[Cesium WebGL] ";function bwe(e,t){let n=t._vertexShaderText,i=t._fragmentShaderText,o=e.createShader(e.VERTEX_SHADER);e.shaderSource(o,n),e.compileShader(o);let r=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(r,i),e.compileShader(r);let s=e.createProgram();e.attachShader(s,o),e.attachShader(s,r);let a=t._attributeLocations;if(c(a))for(let m in a)a.hasOwnProperty(m)&&e.bindAttribLocation(s,a[m],m);e.linkProgram(s);let l;if(e.getProgramParameter(s,e.LINK_STATUS))return t._logShaderCompilation&&(l=e.getShaderInfoLog(o),c(l)&&l.length>0&&console.log(`${Qd}Vertex shader compile log: ${l}`),l=e.getShaderInfoLog(r),c(l)&&l.length>0&&console.log(`${Qd}Fragment shader compile log: ${l}`),l=e.getProgramInfoLog(s),c(l)&&l.length>0&&console.log(`${Qd}Shader program link log: ${l}`)),e.deleteShader(o),e.deleteShader(r),s;let u,f=t._debugShaders;throw e.getShaderParameter(r,e.COMPILE_STATUS)?e.getShaderParameter(o,e.COMPILE_STATUS)?(l=e.getProgramInfoLog(s),console.error(`${Qd}Shader program link log: ${l}`),h(o,"vertex"),h(r,"fragment"),u=`Program failed to link. Link log: ${l}`):(l=e.getShaderInfoLog(o),console.error(`${Qd}Vertex shader compile log: ${l}`),console.error(`${Qd} Vertex shader source:
| ${n}`),u=`Vertex shader failed to compile. Compile log: ${l}`):(l=e.getShaderInfoLog(r),console.error(`${Qd}Fragment shader compile log: ${l}`),console.error(`${Qd} Fragment shader source:
| ${i}`),u=`Fragment shader failed to compile. Compile log: ${l}`),e.deleteShader(o),e.deleteShader(r),e.deleteProgram(s),new ie(u);function h(m,p){if(!c(f))return;let _=f.getTranslatedShaderSource(m);if(_===""){console.error(`${Qd}${p} shader translation failed.`);return}console.error(`${Qd}Translated ${p} shaderSource:
| ${_}`)}}function xwe(e,t,n){let i={};for(let o=0;o<n;++o){let r=e.getActiveAttrib(t,o),s=e.getAttribLocation(t,r.name);i[r.name]={name:r.name,type:r.type,index:s}}return i}function Twe(e,t){let n={},i=[],o=[],r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let s=0;s<r;++s){let a=e.getActiveUniform(t,s),l="[0]",u=a.name.indexOf(l,a.name.length-l.length)!==-1?a.name.slice(0,a.name.length-3):a.name;if(u.indexOf("gl_")!==0)if(a.name.indexOf("[")<0){let f=e.getUniformLocation(t,u);if(f!==null){let h=eP(e,a,u,f);n[u]=h,i.push(h),h._setSampler&&o.push(h)}}else{let f,h,m,p,_=u.indexOf("[");if(_>=0){if(f=n[u.slice(0,_)],!c(f))continue;h=f._locations,h.length<=1&&(m=f.value,p=e.getUniformLocation(t,u),p!==null&&(h.push(p),m.push(e.getUniform(t,p))))}else{h=[];for(let b=0;b<a.size;++b)p=e.getUniformLocation(t,`${u}[${b}]`),p!==null&&h.push(p);f=tP(e,a,u,h),n[u]=f,i.push(f),f._setSampler&&o.push(f)}}}return{uniformsByName:n,uniforms:i,samplerUniforms:o}}function Cwe(e,t){let n=[],i=[];for(let o in t)if(t.hasOwnProperty(o)){let r=t[o],s=o,a=e._duplicateUniformNames[s];c(a)&&(r.name=a,s=a);let l=r_[s];c(l)?n.push({uniform:r,automaticUniform:l}):i.push(r)}return{automaticUniforms:n,manualUniforms:i}}function Ewe(e,t,n){e.useProgram(t);let i=0,o=n.length;for(let r=0;r<o;++r)i=n[r]._setSampler(i);return e.useProgram(null),i}function nP(e){c(e._program)||Z$(e)}function Z$(e){let t=e._program,n=e._gl,i=bwe(n,e,e._debugShaders),o=n.getProgramParameter(i,n.ACTIVE_ATTRIBUTES),r=Twe(n,i),s=Cwe(e,r.uniformsByName);e._program=i,e._numberOfVertexAttributes=o,e._vertexAttributes=xwe(n,i,o),e._uniformsByName=r.uniformsByName,e._uniforms=r.uniforms,e._automaticUniforms=s.automaticUniforms,e._manualUniforms=s.manualUniforms,e.maximumTextureUnitIndex=Ewe(n,i,r.samplerUniforms),t&&e._gl.deleteProgram(t),typeof spector!="undefined"&&(e._program.__SPECTOR_rebuildProgram=function(a,l,u,f){let h=e._vertexShaderText,m=e._fragmentShaderText,p=/ ! = /g;e._vertexShaderText=a.replace(p," != "),e._fragmentShaderText=l.replace(p," != ");try{Z$(e),u(e._program)}catch(_){e._vertexShaderText=h,e._fragmentShaderText=m;let x=/(?:Compile|Link) error: ([^]*)/.exec(_.message);f(x?x[1]:_.message)}})}Mm.prototype._bind=function(){nP(this),this._gl.useProgram(this._program)};Mm.prototype._setUniforms=function(e,t,n){let i,o;if(c(e)){let a=this._manualUniforms;for(i=a.length,o=0;o<i;++o){let l=a[o];if(!c(e[l.name]))throw new w(`Unknown uniform: ${l.name}`);l.value=e[l.name]()}}let r=this._automaticUniforms;for(i=r.length,o=0;o<i;++o){let a=r[o];a.uniform.value=a.automaticUniform.getValue(t)}let s=this._uniforms;for(i=s.length,o=0;o<i;++o)s[o].set();if(n){let a=this._gl,l=this._program;if(a.validateProgram(l),!a.getProgramParameter(l,a.VALIDATE_STATUS))throw new w(`Program validation failed. Program info log: ${a.getProgramInfoLog(l)}`)}};Mm.prototype.isDestroyed=function(){return!1};Mm.prototype.destroy=function(){this._cachedShader.cache.releaseShaderProgram(this)};Mm.prototype.finalDestroy=function(){return this._gl.deleteProgram(this._program),ue(this)};var en=Mm;function iP(e){this._context=e}var uS,wwe=new Ke({primitiveType:Se.TRIANGLES}),Swe=new $n({color:new z(0,0,0,0)});function Awe(e,t){return new Lr({context:e,colorTextures:[t],destroyAttachments:!1})}function vwe(e,t){return en.fromCache({context:e,vertexShaderSource:Fx,fragmentShaderSource:t,attributeLocations:{position:0,textureCoordinates:1}})}function Dwe(e,t){return(!c(uS)||uS.viewport.width!==e||uS.viewport.height!==t)&&(uS=Fe.fromCache({viewport:new je(0,0,e,t)})),uS}iP.prototype.execute=function(e){if(C.defined("computeCommand",e),c(e.preExecute)&&e.preExecute(e),!c(e.fragmentShaderSource)&&!c(e.shaderProgram))throw new w("computeCommand.fragmentShaderSource or computeCommand.shaderProgram is required.");C.defined("computeCommand.outputTexture",e.outputTexture);let t=e.outputTexture,n=t.width,i=t.height,o=this._context,r=c(e.vertexArray)?e.vertexArray:o.getViewportQuadVertexArray(),s=c(e.shaderProgram)?e.shaderProgram:vwe(o,e.fragmentShaderSource),a=Awe(o,t),l=Dwe(n,i),u=e.uniformMap,f=Swe;f.framebuffer=a,f.renderState=l,f.execute(o);let h=wwe;h.vertexArray=r,h.renderState=l,h.shaderProgram=s,h.uniformMap=u,h.framebuffer=a,h.execute(o),a.destroy(),e.persists||(s.destroy(),c(e.vertexArray)&&r.destroy()),c(e.postExecute)&&e.postExecute(t)};iP.prototype.isDestroyed=function(){return!1};iP.prototype.destroy=function(){return ue(this)};var oP=iP;var Cn={BYTE:Y.BYTE,UNSIGNED_BYTE:Y.UNSIGNED_BYTE,SHORT:Y.SHORT,UNSIGNED_SHORT:Y.UNSIGNED_SHORT,INT:Y.INT,UNSIGNED_INT:Y.UNSIGNED_INT,FLOAT:Y.FLOAT,DOUBLE:Y.DOUBLE};Cn.getSizeInBytes=function(e){if(!c(e))throw new w("value is required.");switch(e){case Cn.BYTE:return Int8Array.BYTES_PER_ELEMENT;case Cn.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Cn.SHORT:return Int16Array.BYTES_PER_ELEMENT;case Cn.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Cn.INT:return Int32Array.BYTES_PER_ELEMENT;case Cn.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case Cn.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case Cn.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new w("componentDatatype is not a valid value.")}};Cn.fromTypedArray=function(e){if(e instanceof Int8Array)return Cn.BYTE;if(e instanceof Uint8Array)return Cn.UNSIGNED_BYTE;if(e instanceof Int16Array)return Cn.SHORT;if(e instanceof Uint16Array)return Cn.UNSIGNED_SHORT;if(e instanceof Int32Array)return Cn.INT;if(e instanceof Uint32Array)return Cn.UNSIGNED_INT;if(e instanceof Float32Array)return Cn.FLOAT;if(e instanceof Float64Array)return Cn.DOUBLE;throw new w("array must be an Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, or Float64Array.")};Cn.validate=function(e){return c(e)&&(e===Cn.BYTE||e===Cn.UNSIGNED_BYTE||e===Cn.SHORT||e===Cn.UNSIGNED_SHORT||e===Cn.INT||e===Cn.UNSIGNED_INT||e===Cn.FLOAT||e===Cn.DOUBLE)};Cn.createTypedArray=function(e,t){if(!c(e))throw new w("componentDatatype is required.");if(!c(t))throw new w("valuesOrLength is required.");switch(e){case Cn.BYTE:return new Int8Array(t);case Cn.UNSIGNED_BYTE:return new Uint8Array(t);case Cn.SHORT:return new Int16Array(t);case Cn.UNSIGNED_SHORT:return new Uint16Array(t);case Cn.INT:return new Int32Array(t);case Cn.UNSIGNED_INT:return new Uint32Array(t);case Cn.FLOAT:return new Float32Array(t);case Cn.DOUBLE:return new Float64Array(t);default:throw new w("componentDatatype is not a valid value.")}};Cn.createArrayBufferView=function(e,t,n,i){if(!c(e))throw new w("componentDatatype is required.");if(!c(t))throw new w("buffer is required.");switch(n=g(n,0),i=g(i,(t.byteLength-n)/Cn.getSizeInBytes(e)),e){case Cn.BYTE:return new Int8Array(t,n,i);case Cn.UNSIGNED_BYTE:return new Uint8Array(t,n,i);case Cn.SHORT:return new Int16Array(t,n,i);case Cn.UNSIGNED_SHORT:return new Uint16Array(t,n,i);case Cn.INT:return new Int32Array(t,n,i);case Cn.UNSIGNED_INT:return new Uint32Array(t,n,i);case Cn.FLOAT:return new Float32Array(t,n,i);case Cn.DOUBLE:return new Float64Array(t,n,i);default:throw new w("componentDatatype is not a valid value.")}};Cn.fromName=function(e){switch(e){case"BYTE":return Cn.BYTE;case"UNSIGNED_BYTE":return Cn.UNSIGNED_BYTE;case"SHORT":return Cn.SHORT;case"UNSIGNED_SHORT":return Cn.UNSIGNED_SHORT;case"INT":return Cn.INT;case"UNSIGNED_INT":return Cn.UNSIGNED_INT;case"FLOAT":return Cn.FLOAT;case"DOUBLE":return Cn.DOUBLE;default:throw new w("name is not a valid value.")}};var j=Object.freeze(Cn);var Iwe={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3},Ff=Object.freeze(Iwe);function zG(e){e=g(e,g.EMPTY_OBJECT),C.typeOf.object("options.attributes",e.attributes),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=g(e.primitiveType,Se.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=g(e.geometryType,Ff.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}zG.computeNumberOfVertices=function(e){C.typeOf.object("geometry",e);let t=-1;for(let n in e.attributes)if(e.attributes.hasOwnProperty(n)&&c(e.attributes[n])&&c(e.attributes[n].values)){let i=e.attributes[n],o=i.values.length/i.componentsPerAttribute;if(t!==o&&t!==-1)throw new w("All attribute lists must have the same number of attributes.");t=o}return t};var Owe=new re,Pwe=new d,J$=new N,Rwe=[new re,new re,new re],Mwe=[new k,new k,new k],Lwe=[new k,new k,new k],Nwe=new d,Fwe=new ve,Bwe=new N,kwe=new Li;zG._textureCoordinateRotationPoints=function(e,t,n,i){let o,r=te.center(i,Owe),s=re.toCartesian(r,n,Pwe),a=Lt.eastNorthUpToFixedFrame(s,n,J$),l=N.inverse(a,J$),u=Mwe,f=Rwe;f[0].longitude=i.west,f[0].latitude=i.south,f[1].longitude=i.west,f[1].latitude=i.north,f[2].longitude=i.east,f[2].latitude=i.south;let h=Nwe;for(o=0;o<3;o++)re.toCartesian(f[o],n,h),h=N.multiplyByPointAsVector(l,h,h),u[o].x=h.x,u[o].y=h.y;let m=ve.fromAxisAngle(d.UNIT_Z,-t,Fwe),p=q.fromQuaternion(m,Bwe),_=e.length,b=Number.POSITIVE_INFINITY,x=Number.POSITIVE_INFINITY,T=Number.NEGATIVE_INFINITY,E=Number.NEGATIVE_INFINITY;for(o=0;o<_;o++)h=N.multiplyByPointAsVector(l,e[o],h),h=q.multiplyByVector(p,h,h),b=Math.min(b,h.x),x=Math.min(x,h.y),T=Math.max(T,h.x),E=Math.max(E,h.y);let S=Li.fromRotation(t,kwe),A=Lwe;A[0].x=b,A[0].y=x,A[1].x=b,A[1].y=E,A[2].x=T,A[2].y=x;let v=u[0],D=u[2].x-v.x,R=u[1].y-v.y;for(o=0;o<3;o++){let I=A[o];Li.multiplyByVector(S,I,I),I.x=(I.x-v.x)/D,I.y=(I.y-v.y)/R}let P=A[0],L=A[1],F=A[2],y=new Array(6);return k.pack(P,y),k.pack(L,y,2),k.pack(F,y,4),y};var st=zG;function Uwe(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.componentDatatype))throw new w("options.componentDatatype is required.");if(!c(e.componentsPerAttribute))throw new w("options.componentsPerAttribute is required.");if(e.componentsPerAttribute<1||e.componentsPerAttribute>4)throw new w("options.componentsPerAttribute must be between 1 and 4.");if(!c(e.values))throw new w("options.values is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=g(e.normalize,!1),this.values=e.values}var be=Uwe;function kx(e,t,n,i,o){this._format=e,this._datatype=t,this._width=n,this._height=i,this._buffer=o}Object.defineProperties(kx.prototype,{internalFormat:{get:function(){return this._format}},pixelDatatype:{get:function(){return this._datatype}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}},arrayBufferView:{get:function(){return this._buffer}}});kx.clone=function(e){if(c(e))return new kx(e._format,e._datatype,e._width,e._height,e._buffer)};kx.prototype.clone=function(){return kx.clone(this)};var rP=kx;var Q$=Mr(Sl(),1);function eZ(){if(!c(Bs._canTransferArrayBuffer)){let e=GG("transferTypedArrayTest");e.postMessage=g(e.webkitPostMessage,e.postMessage);let t=99,n=new Int8Array([t]);try{e.postMessage({array:n},[n.buffer])}catch{return Bs._canTransferArrayBuffer=!1,Bs._canTransferArrayBuffer}Bs._canTransferArrayBuffer=new Promise(i=>{e.onmessage=function(o){let r=o.data.array,s=c(r)&&r[0]===t;i(s),e.terminate(),Bs._canTransferArrayBuffer=s}})}return Bs._canTransferArrayBuffer}var HG=new fe;function VG(e){let t;try{t=new Blob([e],{type:"application/javascript"})}catch{let o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,r=new o;r.append(e),t=r.getBlob("application/javascript")}return(window.URL||window.webkitURL).createObjectURL(t)}function GG(e){let t=new Q$.default(e),n=t.scheme().length!==0&&t.fragment().length===0,i=e.replace(/\.js$/,""),o={},r,s;if(qy(e))s=e;else if(!n){let a=Mi(`${Bs._workerModulePrefix}/${i}.js`);qy(a)&&(s=a)}if(s){let a=`import "${s}";`;return r=VG(a),o.type="module",new Worker(r,o)}if(!n&&typeof CESIUM_WORKERS!="undefined"){let a=`
| importScripts("${VG(CESIUM_WORKERS)}");
| CesiumWorkers["${i}"]();
| `;return r=VG(a),new Worker(r,o)}if(r=e,n||(r=Mi(`${Bs._workerModulePrefix+i}.js`)),!sn.supportsEsmWebWorkers())throw new ie("This browser is not supported. Please update your browser to continue.");return o.type="module",new Worker(r,o)}async function zwe(e,t){let n={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(!sn.supportsWebAssembly()){if(!c(t.fallbackModulePath))throw new ie(`This browser does not support Web Assembly, and no backup module was provided for ${e._workerPath}`);return n.modulePath=Mi(t.fallbackModulePath),n}n.wasmBinaryFile=Mi(t.wasmBinaryFile);let i=await Te.fetchArrayBuffer({url:n.wasmBinaryFile});return n.wasmBinary=i,n}function Bs(e,t){this._workerPath=e,this._maximumActiveTasks=g(t,Number.POSITIVE_INFINITY),this._activeTasks=0,this._nextID=0,this._webAssemblyPromise=void 0}var Vwe=(e,t,n,i)=>{let o=({data:r})=>{if(r.id===t){if(c(r.error)){let s=r.error;s.name==="RuntimeError"?(s=new ie(r.error.message),s.stack=r.error.stack):s.name==="DeveloperError"?(s=new w(r.error.message),s.stack=r.error.stack):s.name==="Error"&&(s=new Error(r.error.message),s.stack=r.error.stack),HG.raiseEvent(s),i(s)}else HG.raiseEvent(),n(r.result);e.removeEventListener("message",o)}};return o},Hwe=[];async function Gwe(e,t,n){let i=await Promise.resolve(eZ());c(n)?i||(n.length=0):n=Hwe;let o=e._nextID++,r=new Promise((s,a)=>{e._worker.addEventListener("message",Vwe(e._worker,o,s,a))});return e._worker.postMessage({id:o,baseUrl:Mi.getCesiumBaseUrl().url,parameters:t,canTransferArrayBuffer:i},n),r}async function jwe(e,t,n){++e._activeTasks;try{let i=await Gwe(e,t,n);return--e._activeTasks,i}catch(i){throw--e._activeTasks,i}}Bs.prototype.scheduleTask=function(e,t){if(c(this._worker)||(this._worker=GG(this._workerPath)),!(this._activeTasks>=this._maximumActiveTasks))return jwe(this,e,t)};Bs.prototype.initWebAssemblyModule=async function(e){if(c(this._webAssemblyPromise))return this._webAssemblyPromise;let t=async()=>{let n=this._worker=GG(this._workerPath),i=await zwe(this,e),o=await Promise.resolve(eZ()),r,s=i.wasmBinary;c(s)&&o&&(r=[s]);let a=new Promise((l,u)=>{n.onmessage=function({data:f}){c(f)?l(f.result):u(new ie("Could not configure wasm module"))}});return n.postMessage({canTransferArrayBuffer:o,parameters:{webAssemblyConfig:i}},r),a};return this._webAssemblyPromise=t(),this._webAssemblyPromise};Bs.prototype.isDestroyed=function(){return!1};Bs.prototype.destroy=function(){return c(this._worker)&&this._worker.terminate(),ue(this)};Bs.taskCompletedEvent=HG;Bs._defaultWorkerModulePrefix="Workers/";Bs._workerModulePrefix=Bs._defaultWorkerModulePrefix;Bs._canTransferArrayBuffer=void 0;var hi=Bs;function Lm(){}Lm._transcodeTaskProcessor=new hi("transcodeKTX2",Number.POSITIVE_INFINITY);Lm._readyPromise=void 0;function Wwe(){let e=Lm._transcodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then(function(t){if(t)return Lm._transcodeTaskProcessor;throw new ie("KTX2 transcoder could not be initialized.")});Lm._readyPromise=e}Lm.transcode=function(e,t){return C.defined("supportedTargetFormats",t),c(Lm._readyPromise)||Wwe(),Lm._readyPromise.then(function(n){let i=e;e instanceof ArrayBuffer&&(i=new Uint8Array(e));let o={supportedTargetFormats:t,ktx2Buffer:i};return n.scheduleTask(o,[i.buffer])}).then(function(n){let i=n.length,o=Object.keys(n[0]);for(let r=0;r<i;r++){let s=n[r];for(let a=0;a<o.length;a++){let l=s[o[a]];s[o[a]]=new rP(l.internalFormat,l.datatype,l.width,l.height,l.levelBuffer)}}if(o.length===1){for(let r=0;r<i;++r)n[r]=n[r][o[0]];i===1&&(n=n[0])}return n}).catch(function(n){throw n})};var sP=Lm;var tZ;nZ.setKTX2SupportedFormats=function(e,t,n,i,o,r){tZ={s3tc:e,pvrtc:t,astc:n,etc:i,etc1:o,bc7:r}};function nZ(e){C.defined("resourceOrUrlOrBuffer",e);let t;return e instanceof ArrayBuffer||ArrayBuffer.isView(e)?t=Promise.resolve(e):t=Te.createIfNeeded(e).fetchArrayBuffer(),t.then(function(n){return sP.transcode(n,tZ)})}var vl=nZ;function qwe(e,t){this.start=g(e,0),this.stop=g(t,0)}var Da=qwe;function un(e,t){this.center=d.clone(g(e,d.ZERO)),this.radius=g(t,0)}var qG=new d,YG=new d,XG=new d,KG=new d,$G=new d,ZG=new d,JG=new d,ks=new d,QG=new d,e8=new d,t8=new d,n8=new d,Ywe=4/3*O.PI;un.fromPoints=function(e,t){if(c(t)||(t=new un),!c(e)||e.length===0)return t.center=d.clone(d.ZERO,t.center),t.radius=0,t;let n=d.clone(e[0],JG),i=d.clone(n,qG),o=d.clone(n,YG),r=d.clone(n,XG),s=d.clone(n,KG),a=d.clone(n,$G),l=d.clone(n,ZG),u=e.length,f;for(f=1;f<u;f++){d.clone(e[f],n);let P=n.x,L=n.y,F=n.z;P<i.x&&d.clone(n,i),P>s.x&&d.clone(n,s),L<o.y&&d.clone(n,o),L>a.y&&d.clone(n,a),F<r.z&&d.clone(n,r),F>l.z&&d.clone(n,l)}let h=d.magnitudeSquared(d.subtract(s,i,ks)),m=d.magnitudeSquared(d.subtract(a,o,ks)),p=d.magnitudeSquared(d.subtract(l,r,ks)),_=i,b=s,x=h;m>x&&(x=m,_=o,b=a),p>x&&(x=p,_=r,b=l);let T=QG;T.x=(_.x+b.x)*.5,T.y=(_.y+b.y)*.5,T.z=(_.z+b.z)*.5;let E=d.magnitudeSquared(d.subtract(b,T,ks)),S=Math.sqrt(E),A=e8;A.x=i.x,A.y=o.y,A.z=r.z;let v=t8;v.x=s.x,v.y=a.y,v.z=l.z;let D=d.midpoint(A,v,n8),R=0;for(f=0;f<u;f++){d.clone(e[f],n);let P=d.magnitude(d.subtract(n,D,ks));P>R&&(R=P);let L=d.magnitudeSquared(d.subtract(n,T,ks));if(L>E){let F=Math.sqrt(L);S=(S+F)*.5,E=S*S;let y=F-S;T.x=(S*T.x+y*n.x)/F,T.y=(S*T.y+y*n.y)/F,T.z=(S*T.z+y*n.z)/F}}return S<R?(d.clone(T,t.center),t.radius=S):(d.clone(D,t.center),t.radius=R),t};var iZ=new Ei,Xwe=new d,Kwe=new d,jG=new re,WG=new re;un.fromRectangle2D=function(e,t,n){return un.fromRectangleWithHeights2D(e,t,0,0,n)};un.fromRectangleWithHeights2D=function(e,t,n,i,o){if(c(o)||(o=new un),!c(e))return o.center=d.clone(d.ZERO,o.center),o.radius=0,o;iZ._ellipsoid=Z.default,t=g(t,iZ),te.southwest(e,jG),jG.height=n,te.northeast(e,WG),WG.height=i;let r=t.project(jG,Xwe),s=t.project(WG,Kwe),a=s.x-r.x,l=s.y-r.y,u=s.z-r.z;o.radius=Math.sqrt(a*a+l*l+u*u)*.5;let f=o.center;return f.x=r.x+a*.5,f.y=r.y+l*.5,f.z=r.z+u*.5,o};var $we=[];un.fromRectangle3D=function(e,t,n,i){if(t=g(t,Z.default),n=g(n,0),c(i)||(i=new un),!c(e))return i.center=d.clone(d.ZERO,i.center),i.radius=0,i;let o=te.subsample(e,t,n,$we);return un.fromPoints(o,i)};un.fromVertices=function(e,t,n,i){if(c(i)||(i=new un),!c(e)||e.length===0)return i.center=d.clone(d.ZERO,i.center),i.radius=0,i;t=g(t,d.ZERO),n=g(n,3),C.typeOf.number.greaterThanOrEquals("stride",n,3);let o=JG;o.x=e[0]+t.x,o.y=e[1]+t.y,o.z=e[2]+t.z;let r=d.clone(o,qG),s=d.clone(o,YG),a=d.clone(o,XG),l=d.clone(o,KG),u=d.clone(o,$G),f=d.clone(o,ZG),h=e.length,m;for(m=0;m<h;m+=n){let F=e[m]+t.x,y=e[m+1]+t.y,I=e[m+2]+t.z;o.x=F,o.y=y,o.z=I,F<r.x&&d.clone(o,r),F>l.x&&d.clone(o,l),y<s.y&&d.clone(o,s),y>u.y&&d.clone(o,u),I<a.z&&d.clone(o,a),I>f.z&&d.clone(o,f)}let p=d.magnitudeSquared(d.subtract(l,r,ks)),_=d.magnitudeSquared(d.subtract(u,s,ks)),b=d.magnitudeSquared(d.subtract(f,a,ks)),x=r,T=l,E=p;_>E&&(E=_,x=s,T=u),b>E&&(E=b,x=a,T=f);let S=QG;S.x=(x.x+T.x)*.5,S.y=(x.y+T.y)*.5,S.z=(x.z+T.z)*.5;let A=d.magnitudeSquared(d.subtract(T,S,ks)),v=Math.sqrt(A),D=e8;D.x=r.x,D.y=s.y,D.z=a.z;let R=t8;R.x=l.x,R.y=u.y,R.z=f.z;let P=d.midpoint(D,R,n8),L=0;for(m=0;m<h;m+=n){o.x=e[m]+t.x,o.y=e[m+1]+t.y,o.z=e[m+2]+t.z;let F=d.magnitude(d.subtract(o,P,ks));F>L&&(L=F);let y=d.magnitudeSquared(d.subtract(o,S,ks));if(y>A){let I=Math.sqrt(y);v=(v+I)*.5,A=v*v;let M=I-v;S.x=(v*S.x+M*o.x)/I,S.y=(v*S.y+M*o.y)/I,S.z=(v*S.z+M*o.z)/I}}return v<L?(d.clone(S,i.center),i.radius=v):(d.clone(P,i.center),i.radius=L),i};un.fromEncodedCartesianVertices=function(e,t,n){if(c(n)||(n=new un),!c(e)||!c(t)||e.length!==t.length||e.length===0)return n.center=d.clone(d.ZERO,n.center),n.radius=0,n;let i=JG;i.x=e[0]+t[0],i.y=e[1]+t[1],i.z=e[2]+t[2];let o=d.clone(i,qG),r=d.clone(i,YG),s=d.clone(i,XG),a=d.clone(i,KG),l=d.clone(i,$G),u=d.clone(i,ZG),f=e.length,h;for(h=0;h<f;h+=3){let L=e[h]+t[h],F=e[h+1]+t[h+1],y=e[h+2]+t[h+2];i.x=L,i.y=F,i.z=y,L<o.x&&d.clone(i,o),L>a.x&&d.clone(i,a),F<r.y&&d.clone(i,r),F>l.y&&d.clone(i,l),y<s.z&&d.clone(i,s),y>u.z&&d.clone(i,u)}let m=d.magnitudeSquared(d.subtract(a,o,ks)),p=d.magnitudeSquared(d.subtract(l,r,ks)),_=d.magnitudeSquared(d.subtract(u,s,ks)),b=o,x=a,T=m;p>T&&(T=p,b=r,x=l),_>T&&(T=_,b=s,x=u);let E=QG;E.x=(b.x+x.x)*.5,E.y=(b.y+x.y)*.5,E.z=(b.z+x.z)*.5;let S=d.magnitudeSquared(d.subtract(x,E,ks)),A=Math.sqrt(S),v=e8;v.x=o.x,v.y=r.y,v.z=s.z;let D=t8;D.x=a.x,D.y=l.y,D.z=u.z;let R=d.midpoint(v,D,n8),P=0;for(h=0;h<f;h+=3){i.x=e[h]+t[h],i.y=e[h+1]+t[h+1],i.z=e[h+2]+t[h+2];let L=d.magnitude(d.subtract(i,R,ks));L>P&&(P=L);let F=d.magnitudeSquared(d.subtract(i,E,ks));if(F>S){let y=Math.sqrt(F);A=(A+y)*.5,S=A*A;let I=y-A;E.x=(A*E.x+I*i.x)/y,E.y=(A*E.y+I*i.y)/y,E.z=(A*E.z+I*i.z)/y}}return A<P?(d.clone(E,n.center),n.radius=A):(d.clone(R,n.center),n.radius=P),n};un.fromCornerPoints=function(e,t,n){C.typeOf.object("corner",e),C.typeOf.object("oppositeCorner",t),c(n)||(n=new un);let i=d.midpoint(e,t,n.center);return n.radius=d.distance(i,t),n};un.fromEllipsoid=function(e,t){return C.typeOf.object("ellipsoid",e),c(t)||(t=new un),d.clone(d.ZERO,t.center),t.radius=e.maximumRadius,t};var Zwe=new d;un.fromBoundingSpheres=function(e,t){if(c(t)||(t=new un),!c(e)||e.length===0)return t.center=d.clone(d.ZERO,t.center),t.radius=0,t;let n=e.length;if(n===1)return un.clone(e[0],t);if(n===2)return un.union(e[0],e[1],t);let i=[],o;for(o=0;o<n;o++)i.push(e[o].center);t=un.fromPoints(i,t);let r=t.center,s=t.radius;for(o=0;o<n;o++){let a=e[o];s=Math.max(s,d.distance(r,a.center,Zwe)+a.radius)}return t.radius=s,t};var Jwe=new d,Qwe=new d,eSe=new d;un.fromOrientedBoundingBox=function(e,t){C.defined("orientedBoundingBox",e),c(t)||(t=new un);let n=e.halfAxes,i=q.getColumn(n,0,Jwe),o=q.getColumn(n,1,Qwe),r=q.getColumn(n,2,eSe);return d.add(i,o,i),d.add(i,r,i),t.center=d.clone(e.center,t.center),t.radius=d.magnitude(i),t};var tSe=new d,nSe=new d;un.fromTransformation=function(e,t){C.typeOf.object("transformation",e),c(t)||(t=new un);let n=N.getTranslation(e,tSe),i=N.getScale(e,nSe),o=.5*d.magnitude(i);return t.center=d.clone(n,t.center),t.radius=o,t};un.clone=function(e,t){if(c(e))return c(t)?(t.center=d.clone(e.center,t.center),t.radius=e.radius,t):new un(e.center,e.radius)};un.packedLength=4;un.pack=function(e,t,n){C.typeOf.object("value",e),C.defined("array",t),n=g(n,0);let i=e.center;return t[n++]=i.x,t[n++]=i.y,t[n++]=i.z,t[n]=e.radius,t};un.unpack=function(e,t,n){C.defined("array",e),t=g(t,0),c(n)||(n=new un);let i=n.center;return i.x=e[t++],i.y=e[t++],i.z=e[t++],n.radius=e[t],n};var iSe=new d,oSe=new d;un.union=function(e,t,n){C.typeOf.object("left",e),C.typeOf.object("right",t),c(n)||(n=new un);let i=e.center,o=e.radius,r=t.center,s=t.radius,a=d.subtract(r,i,iSe),l=d.magnitude(a);if(o>=l+s)return e.clone(n),n;if(s>=l+o)return t.clone(n),n;let u=(o+l+s)*.5,f=d.multiplyByScalar(a,(-o+u)/l,oSe);return d.add(f,i,f),d.clone(f,n.center),n.radius=u,n};var rSe=new d;un.expand=function(e,t,n){C.typeOf.object("sphere",e),C.typeOf.object("point",t),n=un.clone(e,n);let i=d.magnitude(d.subtract(t,n.center,rSe));return i>n.radius&&(n.radius=i),n};un.intersectPlane=function(e,t){C.typeOf.object("sphere",e),C.typeOf.object("plane",t);let n=e.center,i=e.radius,o=t.normal,r=d.dot(o,n)+t.distance;return r<-i?Gt.OUTSIDE:r<i?Gt.INTERSECTING:Gt.INSIDE};un.transform=function(e,t,n){return C.typeOf.object("sphere",e),C.typeOf.object("transform",t),c(n)||(n=new un),n.center=N.multiplyByPoint(t,e.center,n.center),n.radius=N.getMaximumScale(t)*e.radius,n};var sSe=new d;un.distanceSquaredTo=function(e,t){C.typeOf.object("sphere",e),C.typeOf.object("cartesian",t);let n=d.subtract(e.center,t,sSe),i=d.magnitude(n)-e.radius;return i<=0?0:i*i};un.transformWithoutScale=function(e,t,n){return C.typeOf.object("sphere",e),C.typeOf.object("transform",t),c(n)||(n=new un),n.center=N.multiplyByPoint(t,e.center,n.center),n.radius=e.radius,n};var aSe=new d;un.computePlaneDistances=function(e,t,n,i){C.typeOf.object("sphere",e),C.typeOf.object("position",t),C.typeOf.object("direction",n),c(i)||(i=new Da);let o=d.subtract(e.center,t,aSe),r=d.dot(n,o);return i.start=r-e.radius,i.stop=r+e.radius,i};var oZ=new d,cSe=new d,lSe=new d,uSe=new d,fSe=new d,dSe=new re,sZ=new Array(8);for(let e=0;e<8;++e)sZ[e]=new d;var rZ=new Ei;un.projectTo2D=function(e,t,n){C.typeOf.object("sphere",e),rZ._ellipsoid=Z.default,t=g(t,rZ);let i=t.ellipsoid,o=e.center,r=e.radius,s;d.equals(o,d.ZERO)?s=d.clone(d.UNIT_X,oZ):s=i.geodeticSurfaceNormal(o,oZ);let a=d.cross(d.UNIT_Z,s,cSe);d.normalize(a,a);let l=d.cross(s,a,lSe);d.normalize(l,l),d.multiplyByScalar(s,r,s),d.multiplyByScalar(l,r,l),d.multiplyByScalar(a,r,a);let u=d.negate(l,fSe),f=d.negate(a,uSe),h=sZ,m=h[0];d.add(s,l,m),d.add(m,a,m),m=h[1],d.add(s,l,m),d.add(m,f,m),m=h[2],d.add(s,u,m),d.add(m,f,m),m=h[3],d.add(s,u,m),d.add(m,a,m),d.negate(s,s),m=h[4],d.add(s,l,m),d.add(m,a,m),m=h[5],d.add(s,l,m),d.add(m,f,m),m=h[6],d.add(s,u,m),d.add(m,f,m),m=h[7],d.add(s,u,m),d.add(m,a,m);let p=h.length;for(let T=0;T<p;++T){let E=h[T];d.add(o,E,E);let S=i.cartesianToCartographic(E,dSe);t.project(S,E)}n=un.fromPoints(h,n),o=n.center;let _=o.x,b=o.y,x=o.z;return o.x=x,o.y=_,o.z=b,n};un.isOccluded=function(e,t){return C.typeOf.object("sphere",e),C.typeOf.object("occluder",t),!t.isBoundingSphereVisible(e)};un.equals=function(e,t){return e===t||c(e)&&c(t)&&d.equals(e.center,t.center)&&e.radius===t.radius};un.prototype.intersectPlane=function(e){return un.intersectPlane(this,e)};un.prototype.distanceSquaredTo=function(e){return un.distanceSquaredTo(this,e)};un.prototype.computePlaneDistances=function(e,t,n){return un.computePlaneDistances(this,e,t,n)};un.prototype.isOccluded=function(e){return un.isOccluded(this,e)};un.prototype.equals=function(e){return un.equals(this,e)};un.prototype.clone=function(e){return un.clone(this,e)};un.prototype.volume=function(){let e=this.radius;return Ywe*e*e*e};var ne=un;function hSe(e){e=g(e,g.EMPTY_OBJECT),this.position=e.position,this.normal=e.normal,this.st=e.st,this.bitangent=e.bitangent,this.tangent=e.tangent,this.color=e.color}var fn=hSe;var mSe={NONE:0,TOP:1,ALL:2},Zt=Object.freeze(mSe);function jr(e){e=g(e,g.EMPTY_OBJECT),this.position=g(e.position,!1),this.normal=g(e.normal,!1),this.st=g(e.st,!1),this.bitangent=g(e.bitangent,!1),this.tangent=g(e.tangent,!1),this.color=g(e.color,!1)}jr.POSITION_ONLY=Object.freeze(new jr({position:!0}));jr.POSITION_AND_NORMAL=Object.freeze(new jr({position:!0,normal:!0}));jr.POSITION_NORMAL_AND_ST=Object.freeze(new jr({position:!0,normal:!0,st:!0}));jr.POSITION_AND_ST=Object.freeze(new jr({position:!0,st:!0}));jr.POSITION_AND_COLOR=Object.freeze(new jr({position:!0,color:!0}));jr.ALL=Object.freeze(new jr({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0}));jr.DEFAULT=jr.POSITION_NORMAL_AND_ST;jr.packedLength=6;jr.pack=function(e,t,n){if(!c(e))throw new w("value is required");if(!c(t))throw new w("array is required");return n=g(n,0),t[n++]=e.position?1:0,t[n++]=e.normal?1:0,t[n++]=e.st?1:0,t[n++]=e.tangent?1:0,t[n++]=e.bitangent?1:0,t[n]=e.color?1:0,t};jr.unpack=function(e,t,n){if(!c(e))throw new w("array is required");return t=g(t,0),c(n)||(n=new jr),n.position=e[t++]===1,n.normal=e[t++]===1,n.st=e[t++]===1,n.tangent=e[t++]===1,n.bitangent=e[t++]===1,n.color=e[t]===1,n};jr.clone=function(e,t){if(c(e))return c(t)||(t=new jr),t.position=e.position,t.normal=e.normal,t.st=e.st,t.tangent=e.tangent,t.bitangent=e.bitangent,t.color=e.color,t};var Ce=jr;var pSe=new d;function Dl(e){e=g(e,g.EMPTY_OBJECT);let t=e.minimum,n=e.maximum;if(C.typeOf.object("min",t),C.typeOf.object("max",n),c(e.offsetAttribute)&&e.offsetAttribute===Zt.TOP)throw new w("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");let i=g(e.vertexFormat,Ce.DEFAULT);this._minimum=d.clone(t),this._maximum=d.clone(n),this._vertexFormat=i,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}Dl.fromDimensions=function(e){e=g(e,g.EMPTY_OBJECT);let t=e.dimensions;C.typeOf.object("dimensions",t),C.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),C.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),C.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);let n=d.multiplyByScalar(t,.5,new d);return new Dl({minimum:d.negate(n,new d),maximum:n,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})};Dl.fromAxisAlignedBoundingBox=function(e){return C.typeOf.object("boundingBox",e),new Dl({minimum:e.minimum,maximum:e.maximum})};Dl.packedLength=2*d.packedLength+Ce.packedLength+1;Dl.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),d.pack(e._minimum,t,n),d.pack(e._maximum,t,n+d.packedLength),Ce.pack(e._vertexFormat,t,n+2*d.packedLength),t[n+2*d.packedLength+Ce.packedLength]=g(e._offsetAttribute,-1),t};var cZ=new d,lZ=new d,uZ=new Ce,aZ={minimum:cZ,maximum:lZ,vertexFormat:uZ,offsetAttribute:void 0};Dl.unpack=function(e,t,n){C.defined("array",e),t=g(t,0);let i=d.unpack(e,t,cZ),o=d.unpack(e,t+d.packedLength,lZ),r=Ce.unpack(e,t+2*d.packedLength,uZ),s=e[t+2*d.packedLength+Ce.packedLength];return c(n)?(n._minimum=d.clone(i,n._minimum),n._maximum=d.clone(o,n._maximum),n._vertexFormat=Ce.clone(r,n._vertexFormat),n._offsetAttribute=s===-1?void 0:s,n):(aZ.offsetAttribute=s===-1?void 0:s,new Dl(aZ))};Dl.createGeometry=function(e){let t=e._minimum,n=e._maximum,i=e._vertexFormat;if(d.equals(t,n))return;let o=new fn,r,s;if(i.position&&(i.st||i.normal||i.tangent||i.bitangent)){if(i.position&&(s=new Float64Array(6*4*3),s[0]=t.x,s[1]=t.y,s[2]=n.z,s[3]=n.x,s[4]=t.y,s[5]=n.z,s[6]=n.x,s[7]=n.y,s[8]=n.z,s[9]=t.x,s[10]=n.y,s[11]=n.z,s[12]=t.x,s[13]=t.y,s[14]=t.z,s[15]=n.x,s[16]=t.y,s[17]=t.z,s[18]=n.x,s[19]=n.y,s[20]=t.z,s[21]=t.x,s[22]=n.y,s[23]=t.z,s[24]=n.x,s[25]=t.y,s[26]=t.z,s[27]=n.x,s[28]=n.y,s[29]=t.z,s[30]=n.x,s[31]=n.y,s[32]=n.z,s[33]=n.x,s[34]=t.y,s[35]=n.z,s[36]=t.x,s[37]=t.y,s[38]=t.z,s[39]=t.x,s[40]=n.y,s[41]=t.z,s[42]=t.x,s[43]=n.y,s[44]=n.z,s[45]=t.x,s[46]=t.y,s[47]=n.z,s[48]=t.x,s[49]=n.y,s[50]=t.z,s[51]=n.x,s[52]=n.y,s[53]=t.z,s[54]=n.x,s[55]=n.y,s[56]=n.z,s[57]=t.x,s[58]=n.y,s[59]=n.z,s[60]=t.x,s[61]=t.y,s[62]=t.z,s[63]=n.x,s[64]=t.y,s[65]=t.z,s[66]=n.x,s[67]=t.y,s[68]=n.z,s[69]=t.x,s[70]=t.y,s[71]=n.z,o.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:s})),i.normal){let u=new Float32Array(72);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=1,u[9]=0,u[10]=0,u[11]=1,u[12]=0,u[13]=0,u[14]=-1,u[15]=0,u[16]=0,u[17]=-1,u[18]=0,u[19]=0,u[20]=-1,u[21]=0,u[22]=0,u[23]=-1,u[24]=1,u[25]=0,u[26]=0,u[27]=1,u[28]=0,u[29]=0,u[30]=1,u[31]=0,u[32]=0,u[33]=1,u[34]=0,u[35]=0,u[36]=-1,u[37]=0,u[38]=0,u[39]=-1,u[40]=0,u[41]=0,u[42]=-1,u[43]=0,u[44]=0,u[45]=-1,u[46]=0,u[47]=0,u[48]=0,u[49]=1,u[50]=0,u[51]=0,u[52]=1,u[53]=0,u[54]=0,u[55]=1,u[56]=0,u[57]=0,u[58]=1,u[59]=0,u[60]=0,u[61]=-1,u[62]=0,u[63]=0,u[64]=-1,u[65]=0,u[66]=0,u[67]=-1,u[68]=0,u[69]=0,u[70]=-1,u[71]=0,o.normal=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:u})}if(i.st){let u=new Float32Array(48);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=1,u[5]=1,u[6]=0,u[7]=1,u[8]=1,u[9]=0,u[10]=0,u[11]=0,u[12]=0,u[13]=1,u[14]=1,u[15]=1,u[16]=0,u[17]=0,u[18]=1,u[19]=0,u[20]=1,u[21]=1,u[22]=0,u[23]=1,u[24]=1,u[25]=0,u[26]=0,u[27]=0,u[28]=0,u[29]=1,u[30]=1,u[31]=1,u[32]=1,u[33]=0,u[34]=0,u[35]=0,u[36]=0,u[37]=1,u[38]=1,u[39]=1,u[40]=0,u[41]=0,u[42]=1,u[43]=0,u[44]=1,u[45]=1,u[46]=0,u[47]=1,o.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:u})}if(i.tangent){let u=new Float32Array(72);u[0]=1,u[1]=0,u[2]=0,u[3]=1,u[4]=0,u[5]=0,u[6]=1,u[7]=0,u[8]=0,u[9]=1,u[10]=0,u[11]=0,u[12]=-1,u[13]=0,u[14]=0,u[15]=-1,u[16]=0,u[17]=0,u[18]=-1,u[19]=0,u[20]=0,u[21]=-1,u[22]=0,u[23]=0,u[24]=0,u[25]=1,u[26]=0,u[27]=0,u[28]=1,u[29]=0,u[30]=0,u[31]=1,u[32]=0,u[33]=0,u[34]=1,u[35]=0,u[36]=0,u[37]=-1,u[38]=0,u[39]=0,u[40]=-1,u[41]=0,u[42]=0,u[43]=-1,u[44]=0,u[45]=0,u[46]=-1,u[47]=0,u[48]=-1,u[49]=0,u[50]=0,u[51]=-1,u[52]=0,u[53]=0,u[54]=-1,u[55]=0,u[56]=0,u[57]=-1,u[58]=0,u[59]=0,u[60]=1,u[61]=0,u[62]=0,u[63]=1,u[64]=0,u[65]=0,u[66]=1,u[67]=0,u[68]=0,u[69]=1,u[70]=0,u[71]=0,o.tangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:u})}if(i.bitangent){let u=new Float32Array(72);u[0]=0,u[1]=1,u[2]=0,u[3]=0,u[4]=1,u[5]=0,u[6]=0,u[7]=1,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=1,u[14]=0,u[15]=0,u[16]=1,u[17]=0,u[18]=0,u[19]=1,u[20]=0,u[21]=0,u[22]=1,u[23]=0,u[24]=0,u[25]=0,u[26]=1,u[27]=0,u[28]=0,u[29]=1,u[30]=0,u[31]=0,u[32]=1,u[33]=0,u[34]=0,u[35]=1,u[36]=0,u[37]=0,u[38]=1,u[39]=0,u[40]=0,u[41]=1,u[42]=0,u[43]=0,u[44]=1,u[45]=0,u[46]=0,u[47]=1,u[48]=0,u[49]=0,u[50]=1,u[51]=0,u[52]=0,u[53]=1,u[54]=0,u[55]=0,u[56]=1,u[57]=0,u[58]=0,u[59]=1,u[60]=0,u[61]=0,u[62]=1,u[63]=0,u[64]=0,u[65]=1,u[66]=0,u[67]=0,u[68]=1,u[69]=0,u[70]=0,u[71]=1,o.bitangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:u})}r=new Uint16Array(6*2*3),r[0]=0,r[1]=1,r[2]=2,r[3]=0,r[4]=2,r[5]=3,r[6]=6,r[7]=5,r[8]=4,r[9]=7,r[10]=6,r[11]=4,r[12]=8,r[13]=9,r[14]=10,r[15]=8,r[16]=10,r[17]=11,r[18]=14,r[19]=13,r[20]=12,r[21]=15,r[22]=14,r[23]=12,r[24]=18,r[25]=17,r[26]=16,r[27]=19,r[28]=18,r[29]=16,r[30]=20,r[31]=21,r[32]=22,r[33]=20,r[34]=22,r[35]=23}else s=new Float64Array(8*3),s[0]=t.x,s[1]=t.y,s[2]=t.z,s[3]=n.x,s[4]=t.y,s[5]=t.z,s[6]=n.x,s[7]=n.y,s[8]=t.z,s[9]=t.x,s[10]=n.y,s[11]=t.z,s[12]=t.x,s[13]=t.y,s[14]=n.z,s[15]=n.x,s[16]=t.y,s[17]=n.z,s[18]=n.x,s[19]=n.y,s[20]=n.z,s[21]=t.x,s[22]=n.y,s[23]=n.z,o.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:s}),r=new Uint16Array(6*2*3),r[0]=4,r[1]=5,r[2]=6,r[3]=4,r[4]=6,r[5]=7,r[6]=1,r[7]=0,r[8]=3,r[9]=1,r[10]=3,r[11]=2,r[12]=1,r[13]=6,r[14]=5,r[15]=1,r[16]=2,r[17]=6,r[18]=2,r[19]=3,r[20]=7,r[21]=2,r[22]=7,r[23]=6,r[24]=3,r[25]=0,r[26]=4,r[27]=3,r[28]=4,r[29]=7,r[30]=0,r[31]=1,r[32]=5,r[33]=0,r[34]=5,r[35]=4;let a=d.subtract(n,t,pSe),l=d.magnitude(a)*.5;if(c(e._offsetAttribute)){let u=s.length,f=e._offsetAttribute===Zt.NONE?0:1,h=new Uint8Array(u/3).fill(f);o.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}return new st({attributes:o,indices:r,primitiveType:Se.TRIANGLES,boundingSphere:new ne(d.ZERO,l),offsetAttribute:e._offsetAttribute})};var i8;Dl.getUnitBox=function(){return c(i8)||(i8=Dl.createGeometry(Dl.fromDimensions({dimensions:new d(1,1,1),vertexFormat:Ce.POSITION_ONLY}))),i8};var Ia=Dl;var Wi={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"};Wi.getMathType=function(e){switch(e){case Wi.SCALAR:return Number;case Wi.VEC2:return k;case Wi.VEC3:return d;case Wi.VEC4:return ee;case Wi.MAT2:return Li;case Wi.MAT3:return q;case Wi.MAT4:return N;default:throw new w("attributeType is not a valid value.")}};Wi.getNumberOfComponents=function(e){switch(e){case Wi.SCALAR:return 1;case Wi.VEC2:return 2;case Wi.VEC3:return 3;case Wi.VEC4:case Wi.MAT2:return 4;case Wi.MAT3:return 9;case Wi.MAT4:return 16;default:throw new w("attributeType is not a valid value.")}};Wi.getAttributeLocationCount=function(e){switch(e){case Wi.SCALAR:case Wi.VEC2:case Wi.VEC3:case Wi.VEC4:return 1;case Wi.MAT2:return 2;case Wi.MAT3:return 3;case Wi.MAT4:return 4;default:throw new w("attributeType is not a valid value.")}};Wi.getGlslType=function(e){switch(C.typeOf.string("attributeType",e),e){case Wi.SCALAR:return"float";case Wi.VEC2:return"vec2";case Wi.VEC3:return"vec3";case Wi.VEC4:return"vec4";case Wi.MAT2:return"mat2";case Wi.MAT3:return"mat3";case Wi.MAT4:return"mat4";default:throw new w("attributeType is not a valid value.")}};var tn=Object.freeze(Wi);var fZ=1/256,dZ=256,lo={};lo.octEncodeInRange=function(e,t,n){C.defined("vector",e),C.defined("result",n);let i=d.magnitudeSquared(e);if(Math.abs(i-1)>O.EPSILON6)throw new w("vector must be normalized.");if(n.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),n.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0){let o=n.x,r=n.y;n.x=(1-Math.abs(r))*O.signNotZero(o),n.y=(1-Math.abs(o))*O.signNotZero(r)}return n.x=O.toSNorm(n.x,t),n.y=O.toSNorm(n.y,t),n};lo.octEncode=function(e,t){return lo.octEncodeInRange(e,255,t)};var fS=new k,hZ=new Uint8Array(1);function aP(e){return hZ[0]=e,hZ[0]}lo.octEncodeToCartesian4=function(e,t){return lo.octEncodeInRange(e,65535,fS),t.x=aP(fS.x*fZ),t.y=aP(fS.x),t.z=aP(fS.y*fZ),t.w=aP(fS.y),t};lo.octDecodeInRange=function(e,t,n,i){if(C.defined("result",i),e<0||e>n||t<0||t>n)throw new w(`x and y must be unsigned normalized integers between 0 and ${n}`);if(i.x=O.fromSNorm(e,n),i.y=O.fromSNorm(t,n),i.z=1-(Math.abs(i.x)+Math.abs(i.y)),i.z<0){let o=i.x;i.x=(1-Math.abs(i.y))*O.signNotZero(o),i.y=(1-Math.abs(o))*O.signNotZero(i.y)}return d.normalize(i,i)};lo.octDecode=function(e,t,n){return lo.octDecodeInRange(e,t,255,n)};lo.octDecodeFromCartesian4=function(e,t){C.typeOf.object("encoded",e),C.typeOf.object("result",t);let n=e.x,i=e.y,o=e.z,r=e.w;if(n<0||n>255||i<0||i>255||o<0||o>255||r<0||r>255)throw new w("x, y, z, and w must be unsigned normalized integers between 0 and 255");let s=n*dZ+i,a=o*dZ+r;return lo.octDecodeInRange(s,a,65535,t)};lo.octPackFloat=function(e){return C.defined("encoded",e),256*e.x+e.y};var r8=new k;lo.octEncodeFloat=function(e){return lo.octEncode(e,r8),lo.octPackFloat(r8)};lo.octDecodeFloat=function(e,t){C.defined("value",e);let n=e/256,i=Math.floor(n),o=(n-i)*256;return lo.octDecode(i,o,t)};lo.octPack=function(e,t,n,i){C.defined("v1",e),C.defined("v2",t),C.defined("v3",n),C.defined("result",i);let o=lo.octEncodeFloat(e),r=lo.octEncodeFloat(t),s=lo.octEncode(n,r8);return i.x=65536*s.x+o,i.y=65536*s.y+r,i};lo.octUnpack=function(e,t,n,i){C.defined("packed",e),C.defined("v1",t),C.defined("v2",n),C.defined("v3",i);let o=e.x/65536,r=Math.floor(o),s=(o-r)*65536;o=e.y/65536;let a=Math.floor(o),l=(o-a)*65536;lo.octDecodeFloat(s,t),lo.octDecodeFloat(l,n),lo.octDecode(r,a,i)};lo.compressTextureCoordinates=function(e){C.defined("textureCoordinates",e);let t=e.x*4095|0,n=e.y*4095|0;return 4096*t+n};lo.decompressTextureCoordinates=function(e,t){C.defined("compressed",e),C.defined("result",t);let n=e/4096,i=Math.floor(n);return t.x=i/4095,t.y=(e-i*4096)/4095,t};function o8(e){return e>>1^-(e&1)}lo.zigZagDeltaDecode=function(e,t,n){C.defined("uBuffer",e),C.defined("vBuffer",t),C.typeOf.number.equals("uBuffer.length","vBuffer.length",e.length,t.length),c(n)&&C.typeOf.number.equals("uBuffer.length","heightBuffer.length",e.length,n.length);let i=e.length,o=0,r=0,s=0;for(let a=0;a<i;++a)o+=o8(e[a]),r+=o8(t[a]),e[a]=o,t[a]=r,c(n)&&(s+=o8(n[a]),n[a]=s)};lo.dequantize=function(e,t,n,i){C.defined("typedArray",e),C.defined("componentDatatype",t),C.defined("type",n),C.defined("count",i);let o=tn.getNumberOfComponents(n),r;switch(t){case j.BYTE:r=127;break;case j.UNSIGNED_BYTE:r=255;break;case j.SHORT:r=32767;break;case j.UNSIGNED_SHORT:r=65535;break;case j.INT:r=2147483647;break;case j.UNSIGNED_INT:r=4294967295;break;default:throw new w(`Cannot dequantize component datatype: ${t}`)}let s=new Float32Array(i*o);for(let a=0;a<i;a++)for(let l=0;l<o;l++){let u=a*o+l;s[u]=Math.max(e[u]/r,-1)}return s};lo.decodeRGB565=function(e,t){C.defined("typedArray",e);let n=e.length*3;c(t)&&C.typeOf.number.equals("result.length","typedArray.length * 3",t.length,n);let i=e.length;c(t)||(t=new Float32Array(i*3));let o=31,r=63,s=1/31,a=1/63;for(let l=0;l<i;l++){let u=e[l],f=u>>11,h=u>>5&r,m=u&o,p=3*l;t[p]=f*s,t[p+1]=h*a,t[p+2]=m*s}return t};var On=lo;var mZ=new d,pZ=new d,_Z=new d;function _Se(e,t,n,i,o){C.defined("point",e),C.defined("p0",t),C.defined("p1",n),C.defined("p2",i),c(o)||(o=new d);let r,s,a,l,u,f,h,m;if(c(t.z)){if(d.equalsEpsilon(e,t,O.EPSILON14))return d.clone(d.UNIT_X,o);if(d.equalsEpsilon(e,n,O.EPSILON14))return d.clone(d.UNIT_Y,o);if(d.equalsEpsilon(e,i,O.EPSILON14))return d.clone(d.UNIT_Z,o);r=d.subtract(n,t,mZ),s=d.subtract(i,t,pZ),a=d.subtract(e,t,_Z),l=d.dot(r,r),u=d.dot(r,s),f=d.dot(r,a),h=d.dot(s,s),m=d.dot(s,a)}else{if(k.equalsEpsilon(e,t,O.EPSILON14))return d.clone(d.UNIT_X,o);if(k.equalsEpsilon(e,n,O.EPSILON14))return d.clone(d.UNIT_Y,o);if(k.equalsEpsilon(e,i,O.EPSILON14))return d.clone(d.UNIT_Z,o);r=k.subtract(n,t,mZ),s=k.subtract(i,t,pZ),a=k.subtract(e,t,_Z),l=k.dot(r,r),u=k.dot(r,s),f=k.dot(r,a),h=k.dot(s,s),m=k.dot(s,a)}o.y=h*f-u*m,o.z=l*m-u*f;let p=l*h-u*u;if(p!==0)return o.y/=p,o.z/=p,o.x=1-o.y-o.z,o}var Ux=_Se;function eh(){this.high=d.clone(d.ZERO),this.low=d.clone(d.ZERO)}eh.encode=function(e,t){C.typeOf.number("value",e),c(t)||(t={high:0,low:0});let n;return e>=0?(n=Math.floor(e/65536)*65536,t.high=n,t.low=e-n):(n=Math.floor(-e/65536)*65536,t.high=-n,t.low=e+n),t};var Nm={high:0,low:0};eh.fromCartesian=function(e,t){C.typeOf.object("cartesian",e),c(t)||(t=new eh);let n=t.high,i=t.low;return eh.encode(e.x,Nm),n.x=Nm.high,i.x=Nm.low,eh.encode(e.y,Nm),n.y=Nm.high,i.y=Nm.low,eh.encode(e.z,Nm),n.z=Nm.high,i.z=Nm.low,t};var s8=new eh;eh.writeElements=function(e,t,n){C.defined("cartesianArray",t),C.typeOf.number("index",n),C.typeOf.number.greaterThanOrEquals("index",n,0),eh.fromCartesian(e,s8);let i=s8.high,o=s8.low;t[n]=i.x,t[n+1]=i.y,t[n+2]=i.z,t[n+3]=o.x,t[n+4]=o.y,t[n+5]=o.z};var kn=eh;var a8={};a8.computeDiscriminant=function(e,t,n){if(typeof e!="number")throw new w("a is a required number.");if(typeof t!="number")throw new w("b is a required number.");if(typeof n!="number")throw new w("c is a required number.");return t*t-4*e*n};function gZ(e,t,n){let i=e+t;return O.sign(e)!==O.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))<n?0:i}a8.computeRealRoots=function(e,t,n){if(typeof e!="number")throw new w("a is a required number.");if(typeof t!="number")throw new w("b is a required number.");if(typeof n!="number")throw new w("c is a required number.");let i;if(e===0)return t===0?[]:[-n/t];if(t===0){if(n===0)return[0,0];let l=Math.abs(n),u=Math.abs(e);if(l<u&&l/u<O.EPSILON14)return[0,0];if(l>u&&u/l<O.EPSILON14)return[];if(i=-n/e,i<0)return[];let f=Math.sqrt(i);return[-f,f]}else if(n===0)return i=-t/e,i<0?[i,0]:[0,i];let o=t*t,r=4*e*n,s=gZ(o,-r,O.EPSILON14);if(s<0)return[];let a=-.5*gZ(t,O.sign(t)*Math.sqrt(s),O.EPSILON14);return t>0?[a/e,n/a]:[n/a,a/e]};var jc=a8;var l8={};l8.computeDiscriminant=function(e,t,n,i){if(typeof e!="number")throw new w("a is a required number.");if(typeof t!="number")throw new w("b is a required number.");if(typeof n!="number")throw new w("c is a required number.");if(typeof i!="number")throw new w("d is a required number.");let o=e*e,r=t*t,s=n*n,a=i*i;return 18*e*t*n*i+r*s-27*o*a-4*(e*s*n+r*t*i)};function c8(e,t,n,i){let o=e,r=t/3,s=n/3,a=i,l=o*s,u=r*a,f=r*r,h=s*s,m=o*s-f,p=o*a-r*s,_=r*a-h,b=4*m*_-p*p,x,T;if(b<0){let ae,se,he;f*u>=l*h?(ae=o,se=m,he=-2*r*m+o*p):(ae=a,se=_,he=-a*p+2*s*_);let le=-(he<0?-1:1)*Math.abs(ae)*Math.sqrt(-b);T=-he+le;let me=T/2,Me=me<0?-Math.pow(-me,1/3):Math.pow(me,1/3),Ge=T===le?-Me:-se/Me;return x=se<=0?Me+Ge:-he/(Me*Me+Ge*Ge+se),f*u>=l*h?[(x-r)/o]:[-a/(x+s)]}let E=m,S=-2*r*m+o*p,A=_,v=-a*p+2*s*_,D=Math.sqrt(b),R=Math.sqrt(3)/2,P=Math.abs(Math.atan2(o*D,-S)/3);x=2*Math.sqrt(-E);let L=Math.cos(P);T=x*L;let F=x*(-L/2-R*Math.sin(P)),y=T+F>2*r?T-r:F-r,I=o,M=y/I;P=Math.abs(Math.atan2(a*D,-v)/3),x=2*Math.sqrt(-A),L=Math.cos(P),T=x*L,F=x*(-L/2-R*Math.sin(P));let B=-a,U=T+F<2*s?T+s:F+s,V=B/U,W=I*U,H=-y*U-I*B,X=y*B,$=(s*H-r*X)/(-r*H+s*W);return M<=$?M<=V?$<=V?[M,$,V]:[M,V,$]:[V,M,$]:M<=V?[$,M,V]:$<=V?[$,V,M]:[V,$,M]}l8.computeRealRoots=function(e,t,n,i){if(typeof e!="number")throw new w("a is a required number.");if(typeof t!="number")throw new w("b is a required number.");if(typeof n!="number")throw new w("c is a required number.");if(typeof i!="number")throw new w("d is a required number.");let o,r;if(e===0)return jc.computeRealRoots(t,n,i);if(t===0){if(n===0){if(i===0)return[0,0,0];r=-i/e;let s=r<0?-Math.pow(-r,1/3):Math.pow(r,1/3);return[s,s,s]}else if(i===0)return o=jc.computeRealRoots(e,0,n),o.Length===0?[0]:[o[0],0,o[1]];return c8(e,0,n,i)}else{if(n===0)return i===0?(r=-t/e,r<0?[r,0,0]:[0,0,r]):c8(e,t,0,i);if(i===0)return o=jc.computeRealRoots(e,t,n),o.length===0?[0]:o[1]<=0?[o[0],o[1],0]:o[0]>=0?[0,o[0],o[1]]:[o[0],0,o[1]]}return c8(e,t,n,i)};var zx=l8;var u8={};u8.computeDiscriminant=function(e,t,n,i,o){if(typeof e!="number")throw new w("a is a required number.");if(typeof t!="number")throw new w("b is a required number.");if(typeof n!="number")throw new w("c is a required number.");if(typeof i!="number")throw new w("d is a required number.");if(typeof o!="number")throw new w("e is a required number.");let r=e*e,s=r*e,a=t*t,l=a*t,u=n*n,f=u*n,h=i*i,m=h*i,p=o*o,_=p*o;return a*u*h-4*l*m-4*e*f*h+18*e*t*n*m-27*r*h*h+256*s*_+o*(18*l*n*i-4*a*f+16*e*u*u-80*e*t*u*i-6*e*a*h+144*r*n*h)+p*(144*e*a*n-27*a*a-128*r*u-192*r*t*i)};function Bf(e,t,n,i){let o=e*e,r=t-3*o/8,s=n-t*e/2+o*e/8,a=i-n*e/4+t*o/16-3*o*o/256,l=zx.computeRealRoots(1,2*r,r*r-4*a,-s*s);if(l.length>0){let u=-e/4,f=l[l.length-1];if(Math.abs(f)<O.EPSILON14){let h=jc.computeRealRoots(1,r,a);if(h.length===2){let m=h[0],p=h[1],_;if(m>=0&&p>=0){let b=Math.sqrt(m),x=Math.sqrt(p);return[u-x,u-b,u+b,u+x]}else{if(m>=0&&p<0)return _=Math.sqrt(m),[u-_,u+_];if(m<0&&p>=0)return _=Math.sqrt(p),[u-_,u+_]}}return[]}else if(f>0){let h=Math.sqrt(f),m=(r+f-s/h)/2,p=(r+f+s/h)/2,_=jc.computeRealRoots(1,h,m),b=jc.computeRealRoots(1,-h,p);return _.length!==0?(_[0]+=u,_[1]+=u,b.length!==0?(b[0]+=u,b[1]+=u,_[1]<=b[0]?[_[0],_[1],b[0],b[1]]:b[1]<=_[0]?[b[0],b[1],_[0],_[1]]:_[0]>=b[0]&&_[1]<=b[1]?[b[0],_[0],_[1],b[1]]:b[0]>=_[0]&&b[1]<=_[1]?[_[0],b[0],b[1],_[1]]:_[0]>b[0]&&_[0]<b[1]?[b[0],_[0],b[1],_[1]]:[_[0],b[0],_[1],b[1]]):_):b.length!==0?(b[0]+=u,b[1]+=u,b):[]}}return[]}function dS(e,t,n,i){let o=n*n,r=t*t,s=e*e,a=-2*t,l=n*e+r-4*i,u=s*i-n*t*e+o,f=zx.computeRealRoots(1,a,l,u);if(f.length>0){let h=f[0],m=t-h,p=m*m,_=e/2,b=m/2,x=p-4*i,T=p+4*Math.abs(i),E=s-4*h,S=s+4*Math.abs(h),A,v;if(h<0||x*S<E*T){let I=Math.sqrt(E);A=I/2,v=I===0?0:(e*b-n)/I}else{let I=Math.sqrt(x);A=I===0?0:(e*b-n)/I,v=I/2}let D,R;_===0&&A===0?(D=0,R=0):O.sign(_)===O.sign(A)?(D=_+A,R=h/D):(R=_-A,D=h/R);let P,L;b===0&&v===0?(P=0,L=0):O.sign(b)===O.sign(v)?(P=b+v,L=i/P):(L=b-v,P=i/L);let F=jc.computeRealRoots(1,D,P),y=jc.computeRealRoots(1,R,L);if(F.length!==0)return y.length!==0?F[1]<=y[0]?[F[0],F[1],y[0],y[1]]:y[1]<=F[0]?[y[0],y[1],F[0],F[1]]:F[0]>=y[0]&&F[1]<=y[1]?[y[0],F[0],F[1],y[1]]:y[0]>=F[0]&&y[1]<=F[1]?[F[0],y[0],y[1],F[1]]:F[0]>y[0]&&F[0]<y[1]?[y[0],F[0],y[1],F[1]]:[F[0],y[0],F[1],y[1]]:F;if(y.length!==0)return y}return[]}u8.computeRealRoots=function(e,t,n,i,o){if(typeof e!="number")throw new w("a is a required number.");if(typeof t!="number")throw new w("b is a required number.");if(typeof n!="number")throw new w("c is a required number.");if(typeof i!="number")throw new w("d is a required number.");if(typeof o!="number")throw new w("e is a required number.");if(Math.abs(e)<O.EPSILON15)return zx.computeRealRoots(t,n,i,o);let r=t/e,s=n/e,a=i/e,l=o/e,u=r<0?1:0;switch(u+=s<0?u+1:u,u+=a<0?u+1:u,u+=l<0?u+1:u,u){case 0:return Bf(r,s,a,l);case 1:return dS(r,s,a,l);case 2:return dS(r,s,a,l);case 3:return Bf(r,s,a,l);case 4:return Bf(r,s,a,l);case 5:return dS(r,s,a,l);case 6:return Bf(r,s,a,l);case 7:return Bf(r,s,a,l);case 8:return dS(r,s,a,l);case 9:return Bf(r,s,a,l);case 10:return Bf(r,s,a,l);case 11:return dS(r,s,a,l);case 12:return Bf(r,s,a,l);case 13:return Bf(r,s,a,l);case 14:return Bf(r,s,a,l);case 15:return Bf(r,s,a,l);default:return}};var cP=u8;function lP(e,t){t=d.clone(g(t,d.ZERO)),d.equals(t,d.ZERO)||d.normalize(t,t),this.origin=d.clone(g(e,d.ZERO)),this.direction=t}lP.clone=function(e,t){if(c(e))return c(t)?(t.origin=d.clone(e.origin),t.direction=d.clone(e.direction),t):new lP(e.origin,e.direction)};lP.getPoint=function(e,t,n){return C.typeOf.object("ray",e),C.typeOf.number("t",t),c(n)||(n=new d),n=d.multiplyByScalar(e.direction,t,n),d.add(e.origin,n,n)};var mn=lP;var So={};So.rayPlane=function(e,t,n){if(!c(e))throw new w("ray is required.");if(!c(t))throw new w("plane is required.");c(n)||(n=new d);let i=e.origin,o=e.direction,r=t.normal,s=d.dot(r,o);if(Math.abs(s)<O.EPSILON15)return;let a=(-t.distance-d.dot(r,i))/s;if(!(a<0))return n=d.multiplyByScalar(o,a,n),d.add(i,n,n)};var gSe=new d,ySe=new d,SZ=new d,yZ=new d,bZ=new d;So.rayTriangleParametric=function(e,t,n,i,o){if(!c(e))throw new w("ray is required.");if(!c(t))throw new w("p0 is required.");if(!c(n))throw new w("p1 is required.");if(!c(i))throw new w("p2 is required.");o=g(o,!1);let r=e.origin,s=e.direction,a=d.subtract(n,t,gSe),l=d.subtract(i,t,ySe),u=d.cross(s,l,SZ),f=d.dot(a,u),h,m,p,_,b;if(o){if(f<O.EPSILON6||(h=d.subtract(r,t,yZ),p=d.dot(h,u),p<0||p>f)||(m=d.cross(h,a,bZ),_=d.dot(s,m),_<0||p+_>f))return;b=d.dot(l,m)/f}else{if(Math.abs(f)<O.EPSILON6)return;let x=1/f;if(h=d.subtract(r,t,yZ),p=d.dot(h,u)*x,p<0||p>1||(m=d.cross(h,a,bZ),_=d.dot(s,m)*x,_<0||p+_>1))return;b=d.dot(l,m)*x}return b};So.rayTriangle=function(e,t,n,i,o,r){let s=So.rayTriangleParametric(e,t,n,i,o);if(!(!c(s)||s<0))return c(r)||(r=new d),d.multiplyByScalar(e.direction,s,r),d.add(e.origin,r,r)};var bSe=new mn;So.lineSegmentTriangle=function(e,t,n,i,o,r,s){if(!c(e))throw new w("v0 is required.");if(!c(t))throw new w("v1 is required.");if(!c(n))throw new w("p0 is required.");if(!c(i))throw new w("p1 is required.");if(!c(o))throw new w("p2 is required.");let a=bSe;d.clone(e,a.origin),d.subtract(t,e,a.direction),d.normalize(a.direction,a.direction);let l=So.rayTriangleParametric(a,n,i,o,r);if(!(!c(l)||l<0||l>d.distance(e,t)))return c(s)||(s=new d),d.multiplyByScalar(a.direction,l,s),d.add(a.origin,s,s)};function xSe(e,t,n,i){let o=t*t-4*e*n;if(o<0)return;if(o>0){let s=1/(2*e),a=Math.sqrt(o),l=(-t+a)*s,u=(-t-a)*s;return l<u?(i.root0=l,i.root1=u):(i.root0=u,i.root1=l),i}let r=-t/(2*e);if(r!==0)return i.root0=i.root1=r,i}var TSe={root0:0,root1:0};function AZ(e,t,n){c(n)||(n=new Da);let i=e.origin,o=e.direction,r=t.center,s=t.radius*t.radius,a=d.subtract(i,r,SZ),l=d.dot(o,o),u=2*d.dot(o,a),f=d.magnitudeSquared(a)-s,h=xSe(l,u,f,TSe);if(c(h))return n.start=h.root0,n.stop=h.root1,n}So.raySphere=function(e,t,n){if(!c(e))throw new w("ray is required.");if(!c(t))throw new w("sphere is required.");if(n=AZ(e,t,n),!(!c(n)||n.stop<0))return n.start=Math.max(n.start,0),n};var CSe=new mn;So.lineSegmentSphere=function(e,t,n,i){if(!c(e))throw new w("p0 is required.");if(!c(t))throw new w("p1 is required.");if(!c(n))throw new w("sphere is required.");let o=CSe;d.clone(e,o.origin);let r=d.subtract(t,e,o.direction),s=d.magnitude(r);if(d.normalize(r,r),i=AZ(o,n,i),!(!c(i)||i.stop<0||i.start>s))return i.start=Math.max(i.start,0),i.stop=Math.min(i.stop,s),i};var ESe=new d,wSe=new d;So.rayEllipsoid=function(e,t){if(!c(e))throw new w("ray is required.");if(!c(t))throw new w("ellipsoid is required.");let n=t.oneOverRadii,i=d.multiplyComponents(n,e.origin,ESe),o=d.multiplyComponents(n,e.direction,wSe),r=d.magnitudeSquared(i),s=d.dot(i,o),a,l,u,f,h;if(r>1){if(s>=0)return;let m=s*s;if(a=r-1,l=d.magnitudeSquared(o),u=l*a,m<u)return;if(m>u){f=s*s-u,h=-s+Math.sqrt(f);let _=h/l,b=a/h;return _<b?new Da(_,b):{start:b,stop:_}}let p=Math.sqrt(a/l);return new Da(p,p)}else if(r<1)return a=r-1,l=d.magnitudeSquared(o),u=l*a,f=s*s-u,h=-s+Math.sqrt(f),new Da(0,h/l);if(s<0)return l=d.magnitudeSquared(o),new Da(0,-s/l)};function Jy(e,t,n){let i=e+t;return O.sign(e)!==O.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))<n?0:i}So.quadraticVectorExpression=function(e,t,n,i,o){let r=i*i,s=o*o,a=(e[q.COLUMN1ROW1]-e[q.COLUMN2ROW2])*s,l=o*(i*Jy(e[q.COLUMN1ROW0],e[q.COLUMN0ROW1],O.EPSILON15)+t.y),u=e[q.COLUMN0ROW0]*r+e[q.COLUMN2ROW2]*s+i*t.x+n,f=s*Jy(e[q.COLUMN2ROW1],e[q.COLUMN1ROW2],O.EPSILON15),h=o*(i*Jy(e[q.COLUMN2ROW0],e[q.COLUMN0ROW2])+t.z),m,p=[];if(h===0&&f===0){if(m=jc.computeRealRoots(a,l,u),m.length===0)return p;let P=m[0],L=Math.sqrt(Math.max(1-P*P,0));if(p.push(new d(i,o*P,o*-L)),p.push(new d(i,o*P,o*L)),m.length===2){let F=m[1],y=Math.sqrt(Math.max(1-F*F,0));p.push(new d(i,o*F,o*-y)),p.push(new d(i,o*F,o*y))}return p}let _=h*h,b=f*f,x=a*a,T=h*f,E=x+b,S=2*(l*a+T),A=2*u*a+l*l-b+_,v=2*(u*l-T),D=u*u-_;if(E===0&&S===0&&A===0&&v===0)return p;m=cP.computeRealRoots(E,S,A,v,D);let R=m.length;if(R===0)return p;for(let P=0;P<R;++P){let L=m[P],F=L*L,y=Math.max(1-F,0),I=Math.sqrt(y),M;O.sign(a)===O.sign(u)?M=Jy(a*F+u,l*L,O.EPSILON12):O.sign(u)===O.sign(l*L)?M=Jy(a*F,l*L+u,O.EPSILON12):M=Jy(a*F+l*L,u,O.EPSILON12);let B=Jy(f*L,h,O.EPSILON15),U=M*B;U<0?p.push(new d(i,o*L,o*I)):U>0?p.push(new d(i,o*L,o*-I)):I!==0?(p.push(new d(i,o*L,o*-I)),p.push(new d(i,o*L,o*I)),++P):p.push(new d(i,o*L,o*I))}return p};var f8=new d,xZ=new d,TZ=new d,uP=new d,SSe=new d,ASe=new q,vSe=new q,DSe=new q,ISe=new q,OSe=new q,CZ=new q,EZ=new q,wZ=new d,PSe=new d,RSe=new re;So.grazingAltitudeLocation=function(e,t){if(!c(e))throw new w("ray is required.");if(!c(t))throw new w("ellipsoid is required.");let n=e.origin,i=e.direction;if(!d.equals(n,d.ZERO)){let D=t.geodeticSurfaceNormal(n,f8);if(d.dot(i,D)>=0)return n}let o=c(this.rayEllipsoid(e,t)),r=t.transformPositionToScaledSpace(i,f8),s=d.normalize(r,r),a=d.mostOrthogonalAxis(r,uP),l=d.normalize(d.cross(a,s,xZ),xZ),u=d.normalize(d.cross(s,l,TZ),TZ),f=ASe;f[0]=s.x,f[1]=s.y,f[2]=s.z,f[3]=l.x,f[4]=l.y,f[5]=l.z,f[6]=u.x,f[7]=u.y,f[8]=u.z;let h=q.transpose(f,vSe),m=q.fromScale(t.radii,DSe),p=q.fromScale(t.oneOverRadii,ISe),_=OSe;_[0]=0,_[1]=-i.z,_[2]=i.y,_[3]=i.z,_[4]=0,_[5]=-i.x,_[6]=-i.y,_[7]=i.x,_[8]=0;let b=q.multiply(q.multiply(h,p,CZ),_,CZ),x=q.multiply(q.multiply(b,m,EZ),f,EZ),T=q.multiplyByVector(b,n,SSe),E=So.quadraticVectorExpression(x,d.negate(T,f8),0,0,1),S,A,v=E.length;if(v>0){let D=d.clone(d.ZERO,PSe),R=Number.NEGATIVE_INFINITY;for(let L=0;L<v;++L){S=q.multiplyByVector(m,q.multiplyByVector(f,E[L],wZ),wZ);let F=d.normalize(d.subtract(S,n,uP),uP),y=d.dot(F,i);y>R&&(R=y,D=d.clone(S,D))}let P=t.cartesianToCartographic(D,RSe);return R=O.clamp(R,0,1),A=d.magnitude(d.subtract(D,n,uP))*Math.sqrt(1-R*R),A=o?-A:A,P.height=A,t.cartographicToCartesian(P,new d)}};var MSe=new d;So.lineSegmentPlane=function(e,t,n,i){if(!c(e))throw new w("endPoint0 is required.");if(!c(t))throw new w("endPoint1 is required.");if(!c(n))throw new w("plane is required.");c(i)||(i=new d);let o=d.subtract(t,e,MSe),r=n.normal,s=d.dot(r,o);if(Math.abs(s)<O.EPSILON6)return;let a=d.dot(r,e),l=-(n.distance+a)/s;if(!(l<0||l>1))return d.multiplyByScalar(o,l,i),d.add(e,i,i),i};So.trianglePlaneIntersection=function(e,t,n,i){if(!c(e)||!c(t)||!c(n)||!c(i))throw new w("p0, p1, p2, and plane are required.");let o=i.normal,r=i.distance,s=d.dot(o,e)+r<0,a=d.dot(o,t)+r<0,l=d.dot(o,n)+r<0,u=0;u+=s?1:0,u+=a?1:0,u+=l?1:0;let f,h;if((u===1||u===2)&&(f=new d,h=new d),u===1){if(s)return So.lineSegmentPlane(e,t,i,f),So.lineSegmentPlane(e,n,i,h),{positions:[e,t,n,f,h],indices:[0,3,4,1,2,4,1,4,3]};if(a)return So.lineSegmentPlane(t,n,i,f),So.lineSegmentPlane(t,e,i,h),{positions:[e,t,n,f,h],indices:[1,3,4,2,0,4,2,4,3]};if(l)return So.lineSegmentPlane(n,e,i,f),So.lineSegmentPlane(n,t,i,h),{positions:[e,t,n,f,h],indices:[2,3,4,0,1,4,0,4,3]}}else if(u===2)if(s)if(a){if(!l)return So.lineSegmentPlane(e,n,i,f),So.lineSegmentPlane(t,n,i,h),{positions:[e,t,n,f,h],indices:[0,1,4,0,4,3,2,3,4]}}else return So.lineSegmentPlane(n,t,i,f),So.lineSegmentPlane(e,t,i,h),{positions:[e,t,n,f,h],indices:[2,0,4,2,4,3,1,3,4]};else return So.lineSegmentPlane(t,e,i,f),So.lineSegmentPlane(n,e,i,h),{positions:[e,t,n,f,h],indices:[1,2,4,1,4,3,0,3,4]}};var Yn=So;function gs(e,t){if(C.typeOf.object("normal",e),!O.equalsEpsilon(d.magnitude(e),1,O.EPSILON6))throw new w("normal must be normalized.");C.typeOf.number("distance",t),this.normal=d.clone(e),this.distance=t}gs.fromPointNormal=function(e,t,n){if(C.typeOf.object("point",e),C.typeOf.object("normal",t),!O.equalsEpsilon(d.magnitude(t),1,O.EPSILON6))throw new w("normal must be normalized.");let i=-d.dot(t,e);return c(n)?(d.clone(t,n.normal),n.distance=i,n):new gs(t,i)};var LSe=new d;gs.fromCartesian4=function(e,t){C.typeOf.object("coefficients",e);let n=d.fromCartesian4(e,LSe),i=e.w;if(!O.equalsEpsilon(d.magnitude(n),1,O.EPSILON6))throw new w("normal must be normalized.");return c(t)?(d.clone(n,t.normal),t.distance=i,t):new gs(n,i)};gs.getPointDistance=function(e,t){return C.typeOf.object("plane",e),C.typeOf.object("point",t),d.dot(e.normal,t)+e.distance};var NSe=new d;gs.projectPointOntoPlane=function(e,t,n){C.typeOf.object("plane",e),C.typeOf.object("point",t),c(n)||(n=new d);let i=gs.getPointDistance(e,t),o=d.multiplyByScalar(e.normal,i,NSe);return d.subtract(t,o,n)};var FSe=new N,BSe=new ee,kSe=new d;gs.transform=function(e,t,n){C.typeOf.object("plane",e),C.typeOf.object("transform",t);let i=e.normal,o=e.distance,r=N.inverseTranspose(t,FSe),s=ee.fromElements(i.x,i.y,i.z,o,BSe);s=N.multiplyByVector(r,s,s);let a=d.fromCartesian4(s,kSe);return s=ee.divideByScalar(s,d.magnitude(a),s),gs.fromCartesian4(s,n)};gs.clone=function(e,t){return C.typeOf.object("plane",e),c(t)?(d.clone(e.normal,t.normal),t.distance=e.distance,t):new gs(e.normal,e.distance)};gs.equals=function(e,t){return C.typeOf.object("left",e),C.typeOf.object("right",t),e.distance===t.distance&&d.equals(e.normal,t.normal)};gs.ORIGIN_XY_PLANE=Object.freeze(new gs(d.UNIT_Z,0));gs.ORIGIN_YZ_PLANE=Object.freeze(new gs(d.UNIT_X,0));gs.ORIGIN_ZX_PLANE=Object.freeze(new gs(d.UNIT_Y,0));var on=gs;var d8={};d8.calculateACMR=function(e){e=g(e,g.EMPTY_OBJECT);let t=e.indices,n=e.maximumIndex,i=g(e.cacheSize,24);if(!c(t))throw new w("indices is required.");let o=t.length;if(o<3||o%3!==0)throw new w("indices length must be a multiple of three.");if(n<=0)throw new w("maximumIndex must be greater than zero.");if(i<3)throw new w("cacheSize must be greater than two.");if(!c(n)){n=0;let a=0,l=t[a];for(;a<o;)l>n&&(n=l),++a,l=t[a]}let r=[];for(let a=0;a<n+1;a++)r[a]=0;let s=i+1;for(let a=0;a<o;++a)s-r[t[a]]>i&&(r[t[a]]=s,++s);return(s-i+1)/(o/3)};d8.tipsify=function(e){e=g(e,g.EMPTY_OBJECT);let t=e.indices,n=e.maximumIndex,i=g(e.cacheSize,24),o;function r(y,I,M,B){for(;I.length>=1;){let U=I[I.length-1];if(I.splice(I.length-1,1),y[U].numLiveTriangles>0)return U}for(;o<B;){if(y[o].numLiveTriangles>0)return++o,o-1;++o}return-1}function s(y,I,M,B,U,V,W){let H=-1,X,$=-1,ae=0;for(;ae<M.length;){let se=M[ae];B[se].numLiveTriangles&&(X=0,U-B[se].timeStamp+2*B[se].numLiveTriangles<=I&&(X=U-B[se].timeStamp),(X>$||$===-1)&&($=X,H=se)),++ae}return H===-1?r(B,V,y,W):H}if(!c(t))throw new w("indices is required.");let a=t.length;if(a<3||a%3!==0)throw new w("indices length must be a multiple of three.");if(n<=0)throw new w("maximumIndex must be greater than zero.");if(i<3)throw new w("cacheSize must be greater than two.");let l=0,u=0,f=t[u],h=a;if(c(n))l=n+1;else{for(;u<h;)f>l&&(l=f),++u,f=t[u];if(l===-1)return 0;++l}let m=[],p;for(p=0;p<l;p++)m[p]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};u=0;let _=0;for(;u<h;)m[t[u]].vertexTriangles.push(_),++m[t[u]].numLiveTriangles,m[t[u+1]].vertexTriangles.push(_),++m[t[u+1]].numLiveTriangles,m[t[u+2]].vertexTriangles.push(_),++m[t[u+2]].numLiveTriangles,++_,u+=3;let b=0,x=i+1;o=1;let T=[],E=[],S,A,v=0,D=[],R=a/3,P=[];for(p=0;p<R;p++)P[p]=!1;let L,F;for(;b!==-1;){T=[],A=m[b],F=A.vertexTriangles.length;for(let y=0;y<F;++y)if(_=A.vertexTriangles[y],!P[_]){P[_]=!0,u=_+_+_;for(let I=0;I<3;++I)L=t[u],T.push(L),E.push(L),D[v]=L,++v,S=m[L],--S.numLiveTriangles,x-S.timeStamp>i&&(S.timeStamp=x,++x),++u}b=s(t,i,T,m,x,E,l)}return D};var fP=d8;var nc={};function yP(e,t,n,i,o){e[t++]=n,e[t++]=i,e[t++]=i,e[t++]=o,e[t++]=o,e[t]=n}function USe(e){let t=e.length,n=t/3*6,i=Oe.createTypedArray(t,n),o=0;for(let r=0;r<t;r+=3,o+=6)yP(i,o,e[r],e[r+1],e[r+2]);return i}function zSe(e){let t=e.length;if(t>=3){let n=(t-2)*6,i=Oe.createTypedArray(t,n);yP(i,0,e[0],e[1],e[2]);let o=6;for(let r=3;r<t;++r,o+=6)yP(i,o,e[r-1],e[r],e[r-2]);return i}return new Uint16Array}function VSe(e){if(e.length>0){let t=e.length-1,n=(t-1)*6,i=Oe.createTypedArray(t,n),o=e[0],r=0;for(let s=1;s<t;++s,r+=6)yP(i,r,o,e[s],e[s+1]);return i}return new Uint16Array}nc.toWireframe=function(e){if(!c(e))throw new w("geometry is required.");let t=e.indices;if(c(t)){switch(e.primitiveType){case Se.TRIANGLES:e.indices=USe(t);break;case Se.TRIANGLE_STRIP:e.indices=zSe(t);break;case Se.TRIANGLE_FAN:e.indices=VSe(t);break;default:throw new w("geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.")}e.primitiveType=Se.LINES}return e};nc.createLineSegmentsForVectors=function(e,t,n){if(t=g(t,"normal"),!c(e))throw new w("geometry is required.");if(!c(e.attributes.position))throw new w("geometry.attributes.position is required.");if(!c(e.attributes[t]))throw new w(`geometry.attributes must have an attribute with the same name as the attributeName parameter, ${t}.`);n=g(n,1e4);let i=e.attributes.position.values,o=e.attributes[t].values,r=i.length,s=new Float64Array(2*r),a=0;for(let f=0;f<r;f+=3)s[a++]=i[f],s[a++]=i[f+1],s[a++]=i[f+2],s[a++]=i[f]+o[f]*n,s[a++]=i[f+1]+o[f+1]*n,s[a++]=i[f+2]+o[f+2]*n;let l,u=e.boundingSphere;return c(u)&&(l=new ne(u.center,u.radius+n)),new st({attributes:{position:new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:s})},primitiveType:Se.LINES,boundingSphere:l})};nc.createAttributeLocations=function(e){if(!c(e))throw new w("geometry is required.");let t=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=e.attributes,i={},o=0,r,s=t.length;for(r=0;r<s;++r){let a=t[r];c(n[a])&&(i[a]=o++)}for(let a in n)n.hasOwnProperty(a)&&!c(i[a])&&(i[a]=o++);return i};nc.reorderForPreVertexCache=function(e){if(!c(e))throw new w("geometry is required.");let t=st.computeNumberOfVertices(e),n=e.indices;if(c(n)){let i=new Int32Array(t);for(let m=0;m<t;m++)i[m]=-1;let o=n,r=o.length,s=Oe.createTypedArray(t,r),a=0,l=0,u=0,f;for(;a<r;)f=i[o[a]],f!==-1?s[l]=f:(f=o[a],i[f]=u,s[l]=u,++u),++a,++l;e.indices=s;let h=e.attributes;for(let m in h)if(h.hasOwnProperty(m)&&c(h[m])&&c(h[m].values)){let p=h[m],_=p.values,b=0,x=p.componentsPerAttribute,T=j.createTypedArray(p.componentDatatype,u*x);for(;b<t;){let E=i[b];if(E!==-1)for(let S=0;S<x;S++)T[x*E+S]=_[x*b+S];++b}p.values=T}}return e};nc.reorderForPostVertexCache=function(e,t){if(!c(e))throw new w("geometry is required.");let n=e.indices;if(e.primitiveType===Se.TRIANGLES&&c(n)){let i=n.length,o=0;for(let r=0;r<i;r++)n[r]>o&&(o=n[r]);e.indices=fP.tipsify({indices:n,maximumIndex:o,cacheSize:t})}return e};function vZ(e){let t={};for(let n in e)if(e.hasOwnProperty(n)&&c(e[n])&&c(e[n].values)){let i=e[n];t[n]=new be({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return t}function HSe(e,t,n){for(let i in t)if(t.hasOwnProperty(i)&&c(t[i])&&c(t[i].values)){let o=t[i];for(let r=0;r<o.componentsPerAttribute;++r)e[i].values.push(o.values[n*o.componentsPerAttribute+r])}}nc.fitToUnsignedShortIndices=function(e){if(!c(e))throw new w("geometry is required.");if(c(e.indices)&&e.primitiveType!==Se.TRIANGLES&&e.primitiveType!==Se.LINES&&e.primitiveType!==Se.POINTS)throw new w("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");let t=[],n=st.computeNumberOfVertices(e);if(c(e.indices)&&n>=O.SIXTY_FOUR_KILOBYTES){let i=[],o=[],r=0,s=vZ(e.attributes),a=e.indices,l=a.length,u;e.primitiveType===Se.TRIANGLES?u=3:e.primitiveType===Se.LINES?u=2:e.primitiveType===Se.POINTS&&(u=1);for(let f=0;f<l;f+=u){for(let h=0;h<u;++h){let m=a[f+h],p=i[m];c(p)||(p=r++,i[m]=p,HSe(s,e.attributes,m)),o.push(p)}r+u>=O.SIXTY_FOUR_KILOBYTES&&(t.push(new st({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],o=[],r=0,s=vZ(e.attributes))}o.length!==0&&t.push(new st({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var DZ=new d,GSe=new re;nc.projectTo2D=function(e,t,n,i,o){if(!c(e))throw new w("geometry is required.");if(!c(t))throw new w("attributeName is required.");if(!c(n))throw new w("attributeName3D is required.");if(!c(i))throw new w("attributeName2D is required.");if(!c(e.attributes[t]))throw new w(`geometry must have attribute matching the attributeName argument: ${t}.`);if(e.attributes[t].componentDatatype!==j.DOUBLE)throw new w("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");let r=e.attributes[t];o=c(o)?o:new Ei;let s=o.ellipsoid,a=r.values,l=new Float64Array(a.length),u=0;for(let f=0;f<a.length;f+=3){let h=d.fromArray(a,f,DZ),m=s.cartesianToCartographic(h,GSe);if(!c(m))throw new w(`Could not project point (${h.x}, ${h.y}, ${h.z}) to 2D.`);let p=o.project(m,DZ);l[u++]=p.x,l[u++]=p.y,l[u++]=p.z}return e.attributes[n]=r,e.attributes[i]=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:l}),delete e.attributes[t],e};var h8={high:0,low:0};nc.encodeAttribute=function(e,t,n,i){if(!c(e))throw new w("geometry is required.");if(!c(t))throw new w("attributeName is required.");if(!c(n))throw new w("attributeHighName is required.");if(!c(i))throw new w("attributeLowName is required.");if(!c(e.attributes[t]))throw new w(`geometry must have attribute matching the attributeName argument: ${t}.`);if(e.attributes[t].componentDatatype!==j.DOUBLE)throw new w("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");let o=e.attributes[t],r=o.values,s=r.length,a=new Float32Array(s),l=new Float32Array(s);for(let f=0;f<s;++f)kn.encode(r[f],h8),a[f]=h8.high,l[f]=h8.low;let u=o.componentsPerAttribute;return e.attributes[n]=new be({componentDatatype:j.FLOAT,componentsPerAttribute:u,values:a}),e.attributes[i]=new be({componentDatatype:j.FLOAT,componentsPerAttribute:u,values:l}),delete e.attributes[t],e};var Uf=new d;function m8(e,t){if(c(t)){let n=t.values,i=n.length;for(let o=0;o<i;o+=3)d.unpack(n,o,Uf),N.multiplyByPoint(e,Uf,Uf),d.pack(Uf,n,o)}}function p8(e,t){if(c(t)){let n=t.values,i=n.length;for(let o=0;o<i;o+=3)d.unpack(n,o,Uf),q.multiplyByVector(e,Uf,Uf),Uf=d.normalize(Uf,Uf),d.pack(Uf,n,o)}}var dP=new N,hP=new q;nc.transformToWorldCoordinates=function(e){if(!c(e))throw new w("instance is required.");let t=e.modelMatrix;if(N.equals(t,N.IDENTITY))return e;let n=e.geometry.attributes;m8(t,n.position),m8(t,n.prevPosition),m8(t,n.nextPosition),(c(n.normal)||c(n.tangent)||c(n.bitangent))&&(N.inverse(t,dP),N.transpose(dP,dP),N.getMatrix3(dP,hP),p8(hP,n.normal),p8(hP,n.tangent),p8(hP,n.bitangent));let i=e.geometry.boundingSphere;return c(i)&&(e.geometry.boundingSphere=ne.transform(i,t,i)),e.modelMatrix=N.clone(N.IDENTITY),e};function jSe(e,t){let n=e.length,i={},o=e[0][t].attributes,r;for(r in o)if(o.hasOwnProperty(r)&&c(o[r])&&c(o[r].values)){let s=o[r],a=s.values.length,l=!0;for(let u=1;u<n;++u){let f=e[u][t].attributes[r];if(!c(f)||s.componentDatatype!==f.componentDatatype||s.componentsPerAttribute!==f.componentsPerAttribute||s.normalize!==f.normalize){l=!1;break}a+=f.values.length}l&&(i[r]=new be({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:j.createTypedArray(s.componentDatatype,a)}))}return i}var WSe=new d;function _8(e,t){let n=e.length,i,o,r,s,a=e[0].modelMatrix,l=c(e[0][t].indices),u=e[0][t].primitiveType;for(o=1;o<n;++o){if(!N.equals(e[o].modelMatrix,a))throw new w("All instances must have the same modelMatrix.");if(c(e[o][t].indices)!==l)throw new w("All instance geometries must have an indices or not have one.");if(e[o][t].primitiveType!==u)throw new w("All instance geometries must have the same primitiveType.")}let f=jSe(e,t),h,m,p;for(i in f)if(f.hasOwnProperty(i))for(h=f[i].values,s=0,o=0;o<n;++o)for(m=e[o][t].attributes[i].values,p=m.length,r=0;r<p;++r)h[s++]=m[r];let _;if(l){let E=0;for(o=0;o<n;++o)E+=e[o][t].indices.length;let S=st.computeNumberOfVertices(new st({attributes:f,primitiveType:Se.POINTS})),A=Oe.createTypedArray(S,E),v=0,D=0;for(o=0;o<n;++o){let R=e[o][t].indices,P=R.length;for(s=0;s<P;++s)A[v++]=D+R[s];D+=st.computeNumberOfVertices(e[o][t])}_=A}let b=new d,x=0,T;for(o=0;o<n;++o){if(T=e[o][t].boundingSphere,!c(T)){b=void 0;break}d.add(T.center,b,b)}if(c(b))for(d.divideByScalar(b,n,b),o=0;o<n;++o){T=e[o][t].boundingSphere;let E=d.magnitude(d.subtract(T.center,b,WSe))+T.radius;E>x&&(x=E)}return new st({attributes:f,indices:_,primitiveType:u,boundingSphere:c(b)?new ne(b,x):void 0})}nc.combineInstances=function(e){if(!c(e)||e.length<1)throw new w("instances is required and must have length greater than zero.");let t=[],n=[],i=e.length;for(let r=0;r<i;++r){let s=e[r];c(s.geometry)?t.push(s):c(s.westHemisphereGeometry)&&c(s.eastHemisphereGeometry)&&n.push(s)}let o=[];return t.length>0&&o.push(_8(t,"geometry")),n.length>0&&(o.push(_8(n,"westHemisphereGeometry")),o.push(_8(n,"eastHemisphereGeometry"))),o};var vu=new d,hS=new d,Vx=new d,Hx=new d;nc.computeNormal=function(e){if(!c(e))throw new w("geometry is required.");if(!c(e.attributes.position)||!c(e.attributes.position.values))throw new w("geometry.attributes.position.values is required.");if(!c(e.indices))throw new w("geometry.indices is required.");if(e.indices.length<2||e.indices.length%3!==0)throw new w("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==Se.TRIANGLES)throw new w("geometry.primitiveType must be PrimitiveType.TRIANGLES.");let t=e.indices,n=e.attributes,i=n.position.values,o=n.position.values.length/3,r=t.length,s=new Array(o),a=new Array(r/3),l=new Array(r),u;for(u=0;u<o;u++)s[u]={indexOffset:0,count:0,currentCount:0};let f=0;for(u=0;u<r;u+=3){let _=t[u],b=t[u+1],x=t[u+2],T=_*3,E=b*3,S=x*3;hS.x=i[T],hS.y=i[T+1],hS.z=i[T+2],Vx.x=i[E],Vx.y=i[E+1],Vx.z=i[E+2],Hx.x=i[S],Hx.y=i[S+1],Hx.z=i[S+2],s[_].count++,s[b].count++,s[x].count++,d.subtract(Vx,hS,Vx),d.subtract(Hx,hS,Hx),a[f]=d.cross(Vx,Hx,new d),f++}let h=0;for(u=0;u<o;u++)s[u].indexOffset+=h,h+=s[u].count;f=0;let m;for(u=0;u<r;u+=3){m=s[t[u]];let _=m.indexOffset+m.currentCount;l[_]=f,m.currentCount++,m=s[t[u+1]],_=m.indexOffset+m.currentCount,l[_]=f,m.currentCount++,m=s[t[u+2]],_=m.indexOffset+m.currentCount,l[_]=f,m.currentCount++,f++}let p=new Float32Array(o*3);for(u=0;u<o;u++){let _=u*3;if(m=s[u],d.clone(d.ZERO,vu),m.count>0){for(f=0;f<m.count;f++)d.add(vu,a[l[m.indexOffset+f]],vu);d.equalsEpsilon(d.ZERO,vu,O.EPSILON10)&&d.clone(a[l[m.indexOffset]],vu)}d.equalsEpsilon(d.ZERO,vu,O.EPSILON10)&&(vu.z=1),d.normalize(vu,vu),p[_]=vu.x,p[_+1]=vu.y,p[_+2]=vu.z}return e.attributes.normal=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:p}),e};var qSe=new d,IZ=new d,YSe=new d;nc.computeTangentAndBitangent=function(e){if(!c(e))throw new w("geometry is required.");let t=e.attributes,n=e.indices;if(!c(t.position)||!c(t.position.values))throw new w("geometry.attributes.position.values is required.");if(!c(t.normal)||!c(t.normal.values))throw new w("geometry.attributes.normal.values is required.");if(!c(t.st)||!c(t.st.values))throw new w("geometry.attributes.st.values is required.");if(!c(n))throw new w("geometry.indices is required.");if(n.length<2||n.length%3!==0)throw new w("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==Se.TRIANGLES)throw new w("geometry.primitiveType must be PrimitiveType.TRIANGLES.");let i=e.attributes.position.values,o=e.attributes.normal.values,r=e.attributes.st.values,s=e.attributes.position.values.length/3,a=n.length,l=new Array(s*3),u;for(u=0;u<l.length;u++)l[u]=0;let f,h,m;for(u=0;u<a;u+=3){let b=n[u],x=n[u+1],T=n[u+2];f=b*3,h=x*3,m=T*3;let E=b*2,S=x*2,A=T*2,v=i[f],D=i[f+1],R=i[f+2],P=r[E],L=r[E+1],F=r[S+1]-L,y=r[A+1]-L,I=1/((r[S]-P)*y-(r[A]-P)*F),M=(y*(i[h]-v)-F*(i[m]-v))*I,B=(y*(i[h+1]-D)-F*(i[m+1]-D))*I,U=(y*(i[h+2]-R)-F*(i[m+2]-R))*I;l[f]+=M,l[f+1]+=B,l[f+2]+=U,l[h]+=M,l[h+1]+=B,l[h+2]+=U,l[m]+=M,l[m+1]+=B,l[m+2]+=U}let p=new Float32Array(s*3),_=new Float32Array(s*3);for(u=0;u<s;u++){f=u*3,h=f+1,m=f+2;let b=d.fromArray(o,f,qSe),x=d.fromArray(l,f,YSe),T=d.dot(b,x);d.multiplyByScalar(b,T,IZ),d.normalize(d.subtract(x,IZ,x),x),p[f]=x.x,p[h]=x.y,p[m]=x.z,d.normalize(d.cross(b,x,x),x),_[f]=x.x,_[h]=x.y,_[m]=x.z}return e.attributes.tangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:p}),e.attributes.bitangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:_}),e};var mS=new k,kf=new d,OZ=new d,PZ=new d,mP=new k;nc.compressVertices=function(e){if(!c(e))throw new w("geometry is required.");let t=e.attributes.extrudeDirection,n,i;if(c(t)){let D=t.values;i=D.length/3;let R=new Float32Array(i*2),P=0;for(n=0;n<i;++n){if(d.fromArray(D,n*3,kf),d.equals(kf,d.ZERO)){P+=2;continue}mP=On.octEncodeInRange(kf,65535,mP),R[P++]=mP.x,R[P++]=mP.y}return e.attributes.compressedAttributes=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:R}),delete e.attributes.extrudeDirection,e}let o=e.attributes.normal,r=e.attributes.st,s=c(o),a=c(r);if(!s&&!a)return e;let l=e.attributes.tangent,u=e.attributes.bitangent,f=c(l),h=c(u),m,p,_,b;s&&(m=o.values),a&&(p=r.values),f&&(_=l.values),h&&(b=u.values),i=(s?m.length:p.length)/(s?3:2);let E=i,S=a&&s?2:1;S+=f||h?1:0,E*=S;let A=new Float32Array(E),v=0;for(n=0;n<i;++n){a&&(k.fromArray(p,n*2,mS),A[v++]=On.compressTextureCoordinates(mS));let D=n*3;s&&c(_)&&c(b)?(d.fromArray(m,D,kf),d.fromArray(_,D,OZ),d.fromArray(b,D,PZ),On.octPack(kf,OZ,PZ,mS),A[v++]=mS.x,A[v++]=mS.y):(s&&(d.fromArray(m,D,kf),A[v++]=On.octEncodeFloat(kf)),f&&(d.fromArray(_,D,kf),A[v++]=On.octEncodeFloat(kf)),h&&(d.fromArray(b,D,kf),A[v++]=On.octEncodeFloat(kf)))}return e.attributes.compressedAttributes=new be({componentDatatype:j.FLOAT,componentsPerAttribute:S,values:A}),s&&delete e.attributes.normal,a&&delete e.attributes.st,h&&delete e.attributes.bitangent,f&&delete e.attributes.tangent,e};function XSe(e){if(c(e.indices))return e;let t=st.computeNumberOfVertices(e);if(t<3)throw new w("The number of vertices must be at least three.");if(t%3!==0)throw new w("The number of vertices must be a multiple of three.");let n=Oe.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function KSe(e){let t=st.computeNumberOfVertices(e);if(t<3)throw new w("The number of vertices must be at least three.");let n=Oe.createTypedArray(t,(t-2)*3);n[0]=1,n[1]=0,n[2]=2;let i=3;for(let o=3;o<t;++o)n[i++]=o-1,n[i++]=0,n[i++]=o;return e.indices=n,e.primitiveType=Se.TRIANGLES,e}function $Se(e){let t=st.computeNumberOfVertices(e);if(t<3)throw new w("The number of vertices must be at least 3.");let n=Oe.createTypedArray(t,(t-2)*3);n[0]=0,n[1]=1,n[2]=2,t>3&&(n[3]=0,n[4]=2,n[5]=3);let i=6;for(let o=3;o<t-1;o+=2)n[i++]=o,n[i++]=o-1,n[i++]=o+1,o+2<t&&(n[i++]=o,n[i++]=o+1,n[i++]=o+2);return e.indices=n,e.primitiveType=Se.TRIANGLES,e}function ZSe(e){if(c(e.indices))return e;let t=st.computeNumberOfVertices(e);if(t<2)throw new w("The number of vertices must be at least two.");if(t%2!==0)throw new w("The number of vertices must be a multiple of 2.");let n=Oe.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function JSe(e){let t=st.computeNumberOfVertices(e);if(t<2)throw new w("The number of vertices must be at least two.");let n=Oe.createTypedArray(t,(t-1)*2);n[0]=0,n[1]=1;let i=2;for(let o=2;o<t;++o)n[i++]=o-1,n[i++]=o;return e.indices=n,e.primitiveType=Se.LINES,e}function QSe(e){let t=st.computeNumberOfVertices(e);if(t<2)throw new w("The number of vertices must be at least two.");let n=Oe.createTypedArray(t,t*2);n[0]=0,n[1]=1;let i=2;for(let o=2;o<t;++o)n[i++]=o-1,n[i++]=o;return n[i++]=t-1,n[i]=0,e.indices=n,e.primitiveType=Se.LINES,e}function eAe(e){switch(e.primitiveType){case Se.TRIANGLE_FAN:return KSe(e);case Se.TRIANGLE_STRIP:return $Se(e);case Se.TRIANGLES:return XSe(e);case Se.LINE_STRIP:return JSe(e);case Se.LINE_LOOP:return QSe(e);case Se.LINES:return ZSe(e)}return e}function h_(e,t){Math.abs(e.y)<O.EPSILON6&&(t?e.y=-O.EPSILON6:e.y=O.EPSILON6)}function tAe(e,t,n){if(e.y!==0&&t.y!==0&&n.y!==0){h_(e,e.y<0),h_(t,t.y<0),h_(n,n.y<0);return}let i=Math.abs(e.y),o=Math.abs(t.y),r=Math.abs(n.y),s;i>o?i>r?s=O.sign(e.y):s=O.sign(n.y):o>r?s=O.sign(t.y):s=O.sign(n.y);let a=s<0;h_(e,a),h_(t,a),h_(n,a)}var RZ=new d;function Du(e,t,n,i){d.add(e,d.multiplyByScalar(d.subtract(t,e,RZ),e.y/(e.y-t.y),RZ),n),d.clone(n,i),h_(n,!0),h_(i,!1)}var Qy=new d,eb=new d,tb=new d,nb=new d,g8={positions:new Array(7),indices:new Array(3*3)};function nAe(e,t,n){if(e.x>=0||t.x>=0||n.x>=0)return;tAe(e,t,n);let i=e.y<0,o=t.y<0,r=n.y<0,s=0;s+=i?1:0,s+=o?1:0,s+=r?1:0;let a=g8.indices;s===1?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,i?(Du(e,t,Qy,tb),Du(e,n,eb,nb),a[0]=0,a[3]=1,a[4]=2,a[6]=1):o?(Du(t,n,Qy,tb),Du(t,e,eb,nb),a[0]=1,a[3]=2,a[4]=0,a[6]=2):r&&(Du(n,e,Qy,tb),Du(n,t,eb,nb),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):s===2&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,i?o?r||(Du(n,e,Qy,tb),Du(n,t,eb,nb),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(Du(t,n,Qy,tb),Du(t,e,eb,nb),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(Du(e,t,Qy,tb),Du(e,n,eb,nb),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let l=g8.positions;return l[0]=e,l[1]=t,l[2]=n,l.length=3,(s===1||s===2)&&(l[3]=Qy,l[4]=eb,l[5]=tb,l[6]=nb,l.length=7),g8}function MZ(e,t){let n=e.attributes;if(n.position.values.length===0)return;for(let o in n)if(n.hasOwnProperty(o)&&c(n[o])&&c(n[o].values)){let r=n[o];r.values=j.createTypedArray(r.componentDatatype,r.values)}let i=st.computeNumberOfVertices(e);return e.indices=Oe.createTypedArray(i,e.indices),t&&(e.boundingSphere=ne.fromVertices(n.position.values)),e}function jx(e){let t=e.attributes,n={};for(let i in t)if(t.hasOwnProperty(i)&&c(t[i])&&c(t[i].values)){let o=t[i];n[i]=new be({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:[]})}return new st({attributes:n,indices:[],primitiveType:e.primitiveType})}function T8(e,t,n){let i=c(e.geometry.boundingSphere);t=MZ(t,i),n=MZ(n,i),c(n)&&!c(t)?e.geometry=n:!c(n)&&c(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=n,e.geometry=void 0)}function C8(e,t){let n=new e,i=new e,o=new e;return function(r,s,a,l,u,f,h,m){let p=e.fromArray(u,r*t,n),_=e.fromArray(u,s*t,i),b=e.fromArray(u,a*t,o);e.multiplyByScalar(p,l.x,p),e.multiplyByScalar(_,l.y,_),e.multiplyByScalar(b,l.z,b);let x=e.add(p,_,p);e.add(x,b,x),m&&e.normalize(x,x),e.pack(x,f,h*t)}}var iAe=C8(ee,4),gP=C8(d,3),UZ=C8(k,2),oAe=function(e,t,n,i,o,r,s){let a=o[e]*i.x,l=o[t]*i.y,u=o[n]*i.z;r[s]=a+l+u>O.EPSILON6?1:0},pS=new d,y8=new d,b8=new d,rAe=new d;function pP(e,t,n,i,o,r,s,a,l,u,f,h,m,p,_,b){if(!c(r)&&!c(s)&&!c(a)&&!c(l)&&!c(u)&&p===0)return;let x=d.fromArray(o,e*3,pS),T=d.fromArray(o,t*3,y8),E=d.fromArray(o,n*3,b8),S=Ux(i,x,T,E,rAe);if(c(S)){if(c(r)&&gP(e,t,n,S,r,h.normal.values,b,!0),c(u)){let A=d.fromArray(u,e*3,pS),v=d.fromArray(u,t*3,y8),D=d.fromArray(u,n*3,b8);d.multiplyByScalar(A,S.x,A),d.multiplyByScalar(v,S.y,v),d.multiplyByScalar(D,S.z,D);let R;!d.equals(A,d.ZERO)||!d.equals(v,d.ZERO)||!d.equals(D,d.ZERO)?(R=d.add(A,v,A),d.add(R,D,R),d.normalize(R,R)):(R=pS,R.x=0,R.y=0,R.z=0),d.pack(R,h.extrudeDirection.values,b*3)}if(c(f)&&oAe(e,t,n,S,f,h.applyOffset.values,b),c(s)&&gP(e,t,n,S,s,h.tangent.values,b,!0),c(a)&&gP(e,t,n,S,a,h.bitangent.values,b,!0),c(l)&&UZ(e,t,n,S,l,h.st.values,b),p>0)for(let A=0;A<p;A++){let v=m[A];sAe(e,t,n,S,b,_[v],h[v])}}}function sAe(e,t,n,i,o,r,s){let a=r.componentsPerAttribute,l=r.values,u=s.values;switch(a){case 4:iAe(e,t,n,i,l,u,o,!1);break;case 3:gP(e,t,n,i,l,u,o,!1);break;case 2:UZ(e,t,n,i,l,u,o,!1);break;default:u[o]=l[e]*i.x+l[t]*i.y+l[n]*i.z}}function th(e,t,n,i,o,r){let s=e.position.values.length/3;if(o!==-1){let a=i[o],l=n[a];return l===-1?(n[a]=s,e.position.values.push(r.x,r.y,r.z),t.push(s),s):(t.push(l),l)}return e.position.values.push(r.x,r.y,r.z),t.push(s),s}var aAe={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function LZ(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=c(n.normal)?n.normal.values:void 0,r=c(n.bitangent)?n.bitangent.values:void 0,s=c(n.tangent)?n.tangent.values:void 0,a=c(n.st)?n.st.values:void 0,l=c(n.extrudeDirection)?n.extrudeDirection.values:void 0,u=c(n.applyOffset)?n.applyOffset.values:void 0,f=t.indices,h=[];for(let R in n)n.hasOwnProperty(R)&&!aAe[R]&&c(n[R])&&h.push(R);let m=h.length,p=jx(t),_=jx(t),b,x,T,E,S,A=[];A.length=i.length/3;let v=[];for(v.length=i.length/3,S=0;S<A.length;++S)A[S]=-1,v[S]=-1;let D=f.length;for(S=0;S<D;S+=3){let R=f[S],P=f[S+1],L=f[S+2],F=d.fromArray(i,R*3),y=d.fromArray(i,P*3),I=d.fromArray(i,L*3),M=nAe(F,y,I);if(c(M)&&M.positions.length>3){let B=M.positions,U=M.indices,V=U.length;for(let W=0;W<V;++W){let H=U[W],X=B[H];X.y<0?(b=_.attributes,x=_.indices,T=A):(b=p.attributes,x=p.indices,T=v),E=th(b,x,T,f,H<3?S+H:-1,X),pP(R,P,L,X,i,o,s,r,a,l,u,b,h,m,n,E)}}else c(M)&&(F=M.positions[0],y=M.positions[1],I=M.positions[2]),F.y<0?(b=_.attributes,x=_.indices,T=A):(b=p.attributes,x=p.indices,T=v),E=th(b,x,T,f,S,F),pP(R,P,L,F,i,o,s,r,a,l,u,b,h,m,n,E),E=th(b,x,T,f,S+1,y),pP(R,P,L,y,i,o,s,r,a,l,u,b,h,m,n,E),E=th(b,x,T,f,S+2,I),pP(R,P,L,I,i,o,s,r,a,l,u,b,h,m,n,E)}T8(e,_,p)}var zZ=on.fromPointNormal(d.ZERO,d.UNIT_Y),cAe=new d,lAe=new d;function Gx(e,t,n,i,o,r,s){if(!c(s))return;let a=d.fromArray(i,e*3,pS);d.equalsEpsilon(a,n,O.EPSILON10)?r.applyOffset.values[o]=s[e]:r.applyOffset.values[o]=s[t]}function NZ(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=c(n.applyOffset)?n.applyOffset.values:void 0,r=t.indices,s=jx(t),a=jx(t),l,u=r.length,f=[];f.length=i.length/3;let h=[];for(h.length=i.length/3,l=0;l<f.length;++l)f[l]=-1,h[l]=-1;for(l=0;l<u;l+=2){let m=r[l],p=r[l+1],_=d.fromArray(i,m*3,pS),b=d.fromArray(i,p*3,y8),x;Math.abs(_.y)<O.EPSILON6&&(_.y<0?_.y=-O.EPSILON6:_.y=O.EPSILON6),Math.abs(b.y)<O.EPSILON6&&(b.y<0?b.y=-O.EPSILON6:b.y=O.EPSILON6);let T=s.attributes,E=s.indices,S=h,A=a.attributes,v=a.indices,D=f,R=Yn.lineSegmentPlane(_,b,zZ,b8);if(c(R)){let P=d.multiplyByScalar(d.UNIT_Y,5*O.EPSILON9,cAe);_.y<0&&(d.negate(P,P),T=a.attributes,E=a.indices,S=f,A=s.attributes,v=s.indices,D=h);let L=d.add(R,P,lAe);x=th(T,E,S,r,l,_),Gx(m,p,_,i,x,T,o),x=th(T,E,S,r,-1,L),Gx(m,p,L,i,x,T,o),d.negate(P,P),d.add(R,P,L),x=th(A,v,D,r,-1,L),Gx(m,p,L,i,x,A,o),x=th(A,v,D,r,l+1,b),Gx(m,p,b,i,x,A,o)}else{let P,L,F;_.y<0?(P=a.attributes,L=a.indices,F=f):(P=s.attributes,L=s.indices,F=h),x=th(P,L,F,r,l,_),Gx(m,p,_,i,x,P,o),x=th(P,L,F,r,l+1,b),Gx(m,p,b,i,x,P,o)}}T8(e,a,s)}var FZ=new k,uAe=new k,VZ=new d,HZ=new d,x8=new d,fAe=new d,dAe=new d,hAe=new d,BZ=new ee;function kZ(e){let t=e.attributes,n=t.position.values,i=t.prevPosition.values,o=t.nextPosition.values,r=n.length;for(let s=0;s<r;s+=3){let a=d.unpack(n,s,VZ);if(a.x>0)continue;let l=d.unpack(i,s,HZ);(a.y<0&&l.y>0||a.y>0&&l.y<0)&&(s-3>0?(i[s]=n[s-3],i[s+1]=n[s-2],i[s+2]=n[s-1]):d.pack(a,i,s));let u=d.unpack(o,s,x8);(a.y<0&&u.y>0||a.y>0&&u.y<0)&&(s+3<r?(o[s]=n[s+3],o[s+1]=n[s+4],o[s+2]=n[s+5]):d.pack(a,o,s))}}var mAe=5*O.EPSILON9,_P=O.EPSILON6;function pAe(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=n.prevPosition.values,r=n.nextPosition.values,s=n.expandAndWidth.values,a=c(n.st)?n.st.values:void 0,l=c(n.color)?n.color.values:void 0,u=jx(t),f=jx(t),h,m,p,_=!1,b=i.length/3;for(h=0;h<b;h+=4){let x=h,T=h+2,E=d.fromArray(i,x*3,VZ),S=d.fromArray(i,T*3,HZ);if(Math.abs(E.y)<_P)for(E.y=_P*(S.y<0?-1:1),i[h*3+1]=E.y,i[(h+1)*3+1]=E.y,m=x*3;m<x*3+4*3;m+=3)o[m]=i[h*3],o[m+1]=i[h*3+1],o[m+2]=i[h*3+2];if(Math.abs(S.y)<_P)for(S.y=_P*(E.y<0?-1:1),i[(h+2)*3+1]=S.y,i[(h+3)*3+1]=S.y,m=x*3;m<x*3+4*3;m+=3)r[m]=i[(h+2)*3],r[m+1]=i[(h+2)*3+1],r[m+2]=i[(h+2)*3+2];let A=u.attributes,v=u.indices,D=f.attributes,R=f.indices,P=Yn.lineSegmentPlane(E,S,zZ,fAe);if(c(P)){_=!0;let L=d.multiplyByScalar(d.UNIT_Y,mAe,dAe);E.y<0&&(d.negate(L,L),A=f.attributes,v=f.indices,D=u.attributes,R=u.indices);let F=d.add(P,L,hAe);A.position.values.push(E.x,E.y,E.z,E.x,E.y,E.z),A.position.values.push(F.x,F.y,F.z),A.position.values.push(F.x,F.y,F.z),A.prevPosition.values.push(o[x*3],o[x*3+1],o[x*3+2]),A.prevPosition.values.push(o[x*3+3],o[x*3+4],o[x*3+5]),A.prevPosition.values.push(E.x,E.y,E.z,E.x,E.y,E.z),A.nextPosition.values.push(F.x,F.y,F.z),A.nextPosition.values.push(F.x,F.y,F.z),A.nextPosition.values.push(F.x,F.y,F.z),A.nextPosition.values.push(F.x,F.y,F.z),d.negate(L,L),d.add(P,L,F),D.position.values.push(F.x,F.y,F.z),D.position.values.push(F.x,F.y,F.z),D.position.values.push(S.x,S.y,S.z,S.x,S.y,S.z),D.prevPosition.values.push(F.x,F.y,F.z),D.prevPosition.values.push(F.x,F.y,F.z),D.prevPosition.values.push(F.x,F.y,F.z),D.prevPosition.values.push(F.x,F.y,F.z),D.nextPosition.values.push(S.x,S.y,S.z,S.x,S.y,S.z),D.nextPosition.values.push(r[T*3],r[T*3+1],r[T*3+2]),D.nextPosition.values.push(r[T*3+3],r[T*3+4],r[T*3+5]);let y=k.fromArray(s,x*2,FZ),I=Math.abs(y.y);A.expandAndWidth.values.push(-1,I,1,I),A.expandAndWidth.values.push(-1,-I,1,-I),D.expandAndWidth.values.push(-1,I,1,I),D.expandAndWidth.values.push(-1,-I,1,-I);let M=d.magnitudeSquared(d.subtract(P,E,x8));if(M/=d.magnitudeSquared(d.subtract(S,E,x8)),c(l)){let B=ee.fromArray(l,x*4,BZ),U=ee.fromArray(l,T*4,BZ),V=O.lerp(B.x,U.x,M),W=O.lerp(B.y,U.y,M),H=O.lerp(B.z,U.z,M),X=O.lerp(B.w,U.w,M);for(m=x*4;m<x*4+2*4;++m)A.color.values.push(l[m]);for(A.color.values.push(V,W,H,X),A.color.values.push(V,W,H,X),D.color.values.push(V,W,H,X),D.color.values.push(V,W,H,X),m=T*4;m<T*4+2*4;++m)D.color.values.push(l[m])}if(c(a)){let B=k.fromArray(a,x*2,FZ),U=k.fromArray(a,(h+3)*2,uAe),V=O.lerp(B.x,U.x,M);for(m=x*2;m<x*2+2*2;++m)A.st.values.push(a[m]);for(A.st.values.push(V,B.y),A.st.values.push(V,U.y),D.st.values.push(V,B.y),D.st.values.push(V,U.y),m=T*2;m<T*2+2*2;++m)D.st.values.push(a[m])}p=A.position.values.length/3-4,v.push(p,p+2,p+1),v.push(p+1,p+2,p+3),p=D.position.values.length/3-4,R.push(p,p+2,p+1),R.push(p+1,p+2,p+3)}else{let L,F;for(E.y<0?(L=f.attributes,F=f.indices):(L=u.attributes,F=u.indices),L.position.values.push(E.x,E.y,E.z),L.position.values.push(E.x,E.y,E.z),L.position.values.push(S.x,S.y,S.z),L.position.values.push(S.x,S.y,S.z),m=h*3;m<h*3+4*3;++m)L.prevPosition.values.push(o[m]),L.nextPosition.values.push(r[m]);for(m=h*2;m<h*2+4*2;++m)L.expandAndWidth.values.push(s[m]),c(a)&&L.st.values.push(a[m]);if(c(l))for(m=h*4;m<h*4+4*4;++m)L.color.values.push(l[m]);p=L.position.values.length/3-4,F.push(p,p+2,p+1),F.push(p+1,p+2,p+3)}}_&&(kZ(f),kZ(u)),T8(e,f,u)}nc.splitLongitude=function(e){if(!c(e))throw new w("instance is required.");let t=e.geometry,n=t.boundingSphere;if(c(n)&&(n.center.x-n.radius>0||ne.intersectPlane(n,on.ORIGIN_ZX_PLANE)!==Gt.INTERSECTING))return e;if(t.geometryType!==Ff.NONE)switch(t.geometryType){case Ff.POLYLINES:pAe(e);break;case Ff.TRIANGLES:LZ(e);break;case Ff.LINES:NZ(e);break}else eAe(t),t.primitiveType===Se.TRIANGLES?LZ(e):t.primitiveType===Se.LINES&&NZ(e);return e};var Pn=nc;function _S(e,t,n,i,o,r,s,a,l,u,f){this._context=e,this._texture=t,this._textureTarget=n,this._targetFace=i,this._pixelDatatype=s,this._internalFormat=o,this._pixelFormat=r,this._size=a,this._preMultiplyAlpha=l,this._flipY=u,this._initialized=f}Object.defineProperties(_S.prototype,{pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},_target:{get:function(){return this._targetFace}}});_S.prototype.copyFrom=function(e){C.defined("options",e);let{xOffset:t=0,yOffset:n=0,source:i,skipColorSpaceConversion:o=!1}=e;if(C.defined("options.source",i),C.typeOf.number.greaterThanOrEquals("xOffset",t,0),C.typeOf.number.greaterThanOrEquals("yOffset",n,0),t+i.width>this._size)throw new w("xOffset + options.source.width must be less than or equal to width.");if(n+i.height>this._size)throw new w("yOffset + options.source.height must be less than or equal to height.");let{width:r,height:s}=i,a=this._context._gl,l=this._textureTarget,u=this._targetFace;a.activeTexture(a.TEXTURE0),a.bindTexture(l,this._texture);let f=i.arrayBufferView,h=this._size,m=this._pixelFormat,p=this._internalFormat,_=this._pixelDatatype,b=this._preMultiplyAlpha,x=this._flipY,T=4;c(f)&&(T=Re.alignmentInBytes(m,_,r)),a.pixelStorei(a.UNPACK_ALIGNMENT,T),o?a.pixelStorei(a.UNPACK_COLORSPACE_CONVERSION_WEBGL,a.NONE):a.pixelStorei(a.UNPACK_COLORSPACE_CONVERSION_WEBGL,a.BROWSER_DEFAULT_WEBGL);let E=!1;if(!this._initialized){let S;t===0&&n===0&&r===h&&s===h?(c(f)?(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),x&&(f=Re.flipY(f,m,_,h,h)),S=f):(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,b),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,x),S=i),E=!0):(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),S=Re.createTypedArray(m,_,h,h)),a.texImage2D(u,0,p,h,h,0,m,Ne.toWebGLConstant(_,this._context),S),this._initialized=!0}E||(c(f)?(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),x&&(f=Re.flipY(f,m,_,r,s)),a.texSubImage2D(u,0,t,n,r,s,m,Ne.toWebGLConstant(_,this._context),f)):(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,b),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,x),a.texSubImage2D(u,0,t,n,m,Ne.toWebGLConstant(_,this._context),i))),a.bindTexture(l,null)};_S.prototype.copyFromFramebuffer=function(e,t,n,i,o,r){if(e=g(e,0),t=g(t,0),n=g(n,0),i=g(i,0),o=g(o,this._size),r=g(r,this._size),C.typeOf.number.greaterThanOrEquals("xOffset",e,0),C.typeOf.number.greaterThanOrEquals("yOffset",t,0),C.typeOf.number.greaterThanOrEquals("framebufferXOffset",n,0),C.typeOf.number.greaterThanOrEquals("framebufferYOffset",i,0),e+o>this._size)throw new w("xOffset + source.width must be less than or equal to width.");if(t+r>this._size)throw new w("yOffset + source.height must be less than or equal to height.");if(this._pixelDatatype===Ne.FLOAT)throw new w("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===Ne.HALF_FLOAT)throw new w("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");let s=this._context._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture),s.copyTexSubImage2D(this._targetFace,0,e,t,n,i,o,r),s.bindTexture(a,null),this._initialized=!0};_S.prototype.copyMipmapFromFramebuffer=function(e,t,n,i,o){if(e=g(e,0),t=g(t,0),n=g(n,this._size),i=g(i,this._size),o=g(o,0),C.typeOf.number.greaterThanOrEquals("xOffset",e,0),C.typeOf.number.greaterThanOrEquals("yOffset",t,0),e+n>this._size)throw new w("xOffset + source.width must be less than or equal to width.");if(t+i>this._size)throw new w("yOffset + source.height must be less than or equal to height.");if(this._pixelDatatype===Ne.FLOAT)throw new w("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===Ne.HALF_FLOAT)throw new w("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");let r=this._context._gl,s=this._textureTarget;r.activeTexture(r.TEXTURE0),r.bindTexture(s,this._texture),r.copyTexImage2D(this._targetFace,o,this._internalFormat,e,t,n,i,0),r.bindTexture(s,null),this._initialized=!0};var bP=_S;var xP={DONT_CARE:Y.DONT_CARE,FASTEST:Y.FASTEST,NICEST:Y.NICEST,validate:function(e){return e===xP.DONT_CARE||e===xP.FASTEST||e===xP.NICEST}},zf=Object.freeze(xP);var TP={NEAREST:Y.NEAREST,LINEAR:Y.LINEAR};TP.validate=function(e){return e===TP.NEAREST||e===TP.LINEAR};var si=Object.freeze(TP);var m_={NEAREST:Y.NEAREST,LINEAR:Y.LINEAR,NEAREST_MIPMAP_NEAREST:Y.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:Y.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:Y.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:Y.LINEAR_MIPMAP_LINEAR};m_.validate=function(e){return e===m_.NEAREST||e===m_.LINEAR||e===m_.NEAREST_MIPMAP_NEAREST||e===m_.LINEAR_MIPMAP_NEAREST||e===m_.NEAREST_MIPMAP_LINEAR||e===m_.LINEAR_MIPMAP_LINEAR};var Wt=Object.freeze(m_);var CP={CLAMP_TO_EDGE:Y.CLAMP_TO_EDGE,REPEAT:Y.REPEAT,MIRRORED_REPEAT:Y.MIRRORED_REPEAT,validate:function(e){return e===CP.CLAMP_TO_EDGE||e===CP.REPEAT||e===CP.MIRRORED_REPEAT}},pn=Object.freeze(CP);function gS(e){e=g(e,g.EMPTY_OBJECT);let{wrapS:t=pn.CLAMP_TO_EDGE,wrapT:n=pn.CLAMP_TO_EDGE,minificationFilter:i=Wt.LINEAR,magnificationFilter:o=si.LINEAR,maximumAnisotropy:r=1}=e;if(!pn.validate(t))throw new w("Invalid sampler.wrapS.");if(!pn.validate(n))throw new w("Invalid sampler.wrapT.");if(!Wt.validate(i))throw new w("Invalid sampler.minificationFilter.");if(!si.validate(o))throw new w("Invalid sampler.magnificationFilter.");C.typeOf.number.greaterThanOrEquals("maximumAnisotropy",r,1),this._wrapS=t,this._wrapT=n,this._minificationFilter=i,this._magnificationFilter=o,this._maximumAnisotropy=r}Object.defineProperties(gS.prototype,{wrapS:{get:function(){return this._wrapS}},wrapT:{get:function(){return this._wrapT}},minificationFilter:{get:function(){return this._minificationFilter}},magnificationFilter:{get:function(){return this._magnificationFilter}},maximumAnisotropy:{get:function(){return this._maximumAnisotropy}}});gS.equals=function(e,t){return e===t||c(e)&&c(t)&&e._wrapS===t._wrapS&&e._wrapT===t._wrapT&&e._minificationFilter===t._minificationFilter&&e._magnificationFilter===t._magnificationFilter&&e._maximumAnisotropy===t._maximumAnisotropy};gS.NEAREST=Object.freeze(new gS({wrapS:pn.CLAMP_TO_EDGE,wrapT:pn.CLAMP_TO_EDGE,minificationFilter:Wt.NEAREST,magnificationFilter:si.NEAREST}));var Jt=gS;function _Ae(e,t,n,i){let o=c(t.vertexBuffer),r=c(t.value),s=t.value?t.value.length:t.componentsPerAttribute;if(!o&&!r)throw new w("attribute must have a vertexBuffer or a value.");if(o&&r)throw new w("attribute cannot have both a vertexBuffer and a value. It must have either a vertexBuffer property defining per-vertex data or a value property defining data for all vertices.");if(s!==1&&s!==2&&s!==3&&s!==4)throw r?new w("attribute.value.length must be in the range [1, 4]."):new w("attribute.componentsPerAttribute must be in the range [1, 4].");if(c(t.componentDatatype)&&!j.validate(t.componentDatatype))throw new w("attribute must have a valid componentDatatype or not specify it.");if(c(t.strideInBytes)&&t.strideInBytes>255)throw new w("attribute must have a strideInBytes less than or equal to 255 or not specify it.");if(c(t.instanceDivisor)&&t.instanceDivisor>0&&!i.instancedArrays)throw new w("instanced arrays is not supported");if(c(t.instanceDivisor)&&t.instanceDivisor<0)throw new w("attribute must have an instanceDivisor greater than or equal to zero");if(c(t.instanceDivisor)&&r)throw new w("attribute cannot have have an instanceDivisor if it is not backed by a buffer");if(c(t.instanceDivisor)&&t.instanceDivisor>0&&t.index===0)throw new w("attribute zero cannot have an instanceDivisor greater than 0");let a={index:g(t.index,n),enabled:g(t.enabled,!0),vertexBuffer:t.vertexBuffer,value:r?t.value.slice(0):void 0,componentsPerAttribute:s,componentDatatype:g(t.componentDatatype,j.FLOAT),normalize:g(t.normalize,!1),offsetInBytes:g(t.offsetInBytes,0),strideInBytes:g(t.strideInBytes,0),instanceDivisor:g(t.instanceDivisor,0)};if(o)a.vertexAttrib=function(l){let u=this.index;l.bindBuffer(l.ARRAY_BUFFER,this.vertexBuffer._getBuffer()),l.vertexAttribPointer(u,this.componentsPerAttribute,this.componentDatatype,this.normalize,this.strideInBytes,this.offsetInBytes),l.enableVertexAttribArray(u),this.instanceDivisor>0&&(i.glVertexAttribDivisor(u,this.instanceDivisor),i._vertexAttribDivisors[u]=this.instanceDivisor,i._previousDrawInstanced=!0)},a.disableVertexAttribArray=function(l){l.disableVertexAttribArray(this.index),this.instanceDivisor>0&&i.glVertexAttribDivisor(n,0)};else{switch(a.componentsPerAttribute){case 1:a.vertexAttrib=function(l){l.vertexAttrib1fv(this.index,this.value)};break;case 2:a.vertexAttrib=function(l){l.vertexAttrib2fv(this.index,this.value)};break;case 3:a.vertexAttrib=function(l){l.vertexAttrib3fv(this.index,this.value)};break;case 4:a.vertexAttrib=function(l){l.vertexAttrib4fv(this.index,this.value)};break}a.disableVertexAttribArray=function(l){}}e.push(a)}function jZ(e,t,n){for(let i=0;i<t.length;++i){let o=t[i];o.enabled&&o.vertexAttrib(e)}c(n)&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n._getBuffer())}function Fm(e){e=g(e,g.EMPTY_OBJECT),C.defined("options.context",e.context),C.defined("options.attributes",e.attributes);let t=e.context,n=t._gl,i=e.attributes,o=e.indexBuffer,r,s=[],a=1,l=!1,u=!1,f=i.length;for(r=0;r<f;++r)_Ae(s,i[r],r,t);for(f=s.length,r=0;r<f;++r){let p=s[r];if(c(p.vertexBuffer)&&p.instanceDivisor===0){let _=p.strideInBytes||p.componentsPerAttribute*j.getSizeInBytes(p.componentDatatype);a=p.vertexBuffer.sizeInBytes/_;break}}for(r=0;r<f;++r)s[r].instanceDivisor>0&&(l=!0),c(s[r].value)&&(u=!0);let h={};for(r=0;r<f;++r){let p=s[r].index;if(h[p])throw new w(`Index ${p} is used by more than one attribute.`);h[p]=!0}let m;t.vertexArrayObject&&(m=t.glCreateVertexArray(),t.glBindVertexArray(m),jZ(n,s,o),t.glBindVertexArray(null)),this._numberOfVertices=a,this._hasInstancedAttributes=l,this._hasConstantAttributes=u,this._context=t,this._gl=n,this._vao=m,this._attributes=s,this._indexBuffer=o}function GZ(e){return e.values.length/e.componentsPerAttribute}function gAe(e){return j.getSizeInBytes(e.componentDatatype)*e.componentsPerAttribute}function yAe(e){let t,n,i,o=[];for(n in e)e.hasOwnProperty(n)&&c(e[n])&&c(e[n].values)&&(o.push(n),e[n].componentDatatype===j.DOUBLE&&(e[n].componentDatatype=j.FLOAT,e[n].values=j.createTypedArray(j.FLOAT,e[n].values)));let r,s=o.length;if(s>0)for(r=GZ(e[o[0]]),t=1;t<s;++t){let u=GZ(e[o[t]]);if(u!==r)throw new ie(`Each attribute list must have the same number of vertices. Attribute ${o[t]} has a different number of vertices (${u.toString()}) than attribute ${o[0]} (${r.toString()}).`)}o.sort(function(u,f){return j.getSizeInBytes(e[f].componentDatatype)-j.getSizeInBytes(e[u].componentDatatype)});let a=0,l={};for(t=0;t<s;++t)n=o[t],i=e[n],l[n]=a,a+=gAe(i);if(a>0){let u=j.getSizeInBytes(e[o[0]].componentDatatype),f=a%u;f!==0&&(a+=u-f);let h=r*a,m=new ArrayBuffer(h),p={};for(t=0;t<s;++t){n=o[t];let _=j.getSizeInBytes(e[n].componentDatatype);p[n]={pointer:j.createTypedArray(e[n].componentDatatype,m),index:l[n]/_,strideInComponentType:a/_}}for(t=0;t<r;++t)for(let _=0;_<s;++_){n=o[_],i=e[n];let b=i.values,x=p[n],T=x.pointer,E=i.componentsPerAttribute;for(let S=0;S<E;++S)T[x.index+S]=b[t*E+S];x.index+=x.strideInComponentType}return{buffer:m,offsetsInBytes:l,vertexSizeInBytes:a}}}Fm.fromGeometry=function(e){e=g(e,g.EMPTY_OBJECT),C.defined("options.context",e.context);let t=e.context,n=g(e.geometry,g.EMPTY_OBJECT),i=g(e.bufferUsage,Pe.DYNAMIC_DRAW),o=g(e.attributeLocations,g.EMPTY_OBJECT),r=g(e.interleave,!1),s=e.vertexArrayAttributes,a,l,u,f=c(s)?s:[],h=n.attributes;if(r){let _=yAe(h);if(c(_)){u=yt.createVertexBuffer({context:t,typedArray:_.buffer,usage:i});let b=_.offsetsInBytes,x=_.vertexSizeInBytes;for(a in h)h.hasOwnProperty(a)&&c(h[a])&&(l=h[a],c(l.values)?f.push({index:o[a],vertexBuffer:u,componentDatatype:l.componentDatatype,componentsPerAttribute:l.componentsPerAttribute,normalize:l.normalize,offsetInBytes:b[a],strideInBytes:x}):f.push({index:o[a],value:l.value,componentDatatype:l.componentDatatype,normalize:l.normalize}))}}else for(a in h)if(h.hasOwnProperty(a)&&c(h[a])){l=h[a];let _=l.componentDatatype;_===j.DOUBLE&&(_=j.FLOAT),u=void 0,c(l.values)&&(u=yt.createVertexBuffer({context:t,typedArray:j.createTypedArray(_,l.values),usage:i})),f.push({index:o[a],vertexBuffer:u,value:l.value,componentDatatype:_,componentsPerAttribute:l.componentsPerAttribute,normalize:l.normalize})}let m,p=n.indices;return c(p)&&(st.computeNumberOfVertices(n)>=O.SIXTY_FOUR_KILOBYTES&&t.elementIndexUint?m=yt.createIndexBuffer({context:t,typedArray:new Uint32Array(p),usage:i,indexDatatype:Oe.UNSIGNED_INT}):m=yt.createIndexBuffer({context:t,typedArray:new Uint16Array(p),usage:i,indexDatatype:Oe.UNSIGNED_SHORT})),new Fm({context:t,attributes:f,indexBuffer:m})};Object.defineProperties(Fm.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}});Fm.prototype.getAttribute=function(e){return C.defined("index",e),this._attributes[e]};function bAe(e){let t=e._context,n=e._hasInstancedAttributes;if(!n&&!t._previousDrawInstanced)return;t._previousDrawInstanced=n;let i=t._vertexAttribDivisors,o=e._attributes,r=ht.maximumVertexAttributes,s;if(n){let a=o.length;for(s=0;s<a;++s){let l=o[s];if(l.enabled){let u=l.instanceDivisor,f=l.index;u!==i[f]&&(t.glVertexAttribDivisor(f,u),i[f]=u)}}}else for(s=0;s<r;++s)i[s]>0&&(t.glVertexAttribDivisor(s,0),i[s]=0)}function xAe(e,t){let n=e._attributes,i=n.length;for(let o=0;o<i;++o){let r=n[o];r.enabled&&c(r.value)&&r.vertexAttrib(t)}}Fm.prototype._bind=function(){c(this._vao)?(this._context.glBindVertexArray(this._vao),this._context.instancedArrays&&bAe(this),this._hasConstantAttributes&&xAe(this,this._gl)):jZ(this._gl,this._attributes,this._indexBuffer)};Fm.prototype._unBind=function(){if(c(this._vao))this._context.glBindVertexArray(null);else{let e=this._attributes,t=this._gl;for(let n=0;n<e.length;++n){let i=e[n];i.enabled&&i.disableVertexAttribArray(t)}this._indexBuffer&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null)}};Fm.prototype.isDestroyed=function(){return!1};Fm.prototype.destroy=function(){let e=this._attributes;for(let n=0;n<e.length;++n){let i=e[n].vertexBuffer;c(i)&&!i.isDestroyed()&&i.vertexArrayDestroyable&&i.destroy()}let t=this._indexBuffer;return c(t)&&!t.isDestroyed()&&t.vertexArrayDestroyable&&t.destroy(),c(this._vao)&&this._context.glDeleteVertexArray(this._vao),ue(this)};var Zn=Fm;function mo(e){e=g(e,g.EMPTY_OBJECT),C.defined("options.context",e.context);let{context:t,source:n,pixelFormat:i=Re.RGBA,pixelDatatype:o=Ne.UNSIGNED_BYTE,flipY:r=!0,skipColorSpaceConversion:s=!1,sampler:a=new Jt}=e,l=e.preMultiplyAlpha||i===Re.RGB||i===Re.LUMINANCE,{width:u,height:f}=e;if(c(n)){if(!Object.values(mo.FaceName).every(S=>c(n[S])))throw new w(`options.source requires faces ${Object.values(mo.FaceName).join(", ")}.`);({width:u,height:f}=n.positiveX);for(let S of mo.faceNames()){let A=n[S];if(Number(A.width)!==u||Number(A.height)!==f)throw new w("Each face in options.source must have the same width and height.")}}let h=u;if(!c(u)||!c(f))throw new w("options requires a source field to create an initialized cube map or width and height fields to create a blank cube map.");if(u!==f)throw new w("Width must equal height.");if(h<=0)throw new w("Width and height must be greater than zero.");if(h>ht.maximumCubeMapSize)throw new w(`Width and height must be less than or equal to the maximum cube map size (${ht.maximumCubeMapSize}). Check maximumCubeMapSize.`);if(!Re.validate(i))throw new w("Invalid options.pixelFormat.");if(Re.isDepthFormat(i))throw new w("options.pixelFormat cannot be DEPTH_COMPONENT or DEPTH_STENCIL.");if(!Ne.validate(o))throw new w("Invalid options.pixelDatatype.");if(o===Ne.FLOAT&&!t.floatingPointTexture)throw new w("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension.");if(o===Ne.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new w("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension.");let m=Re.textureSizeInBytes(i,o,h,h)*6,p=Re.toInternalFormat(i,o,t),_=t._gl,b=_.TEXTURE_CUBE_MAP,x=_.createTexture();this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=b,this._texture=x,this._pixelFormat=i,this._pixelDatatype=o,this._size=h,this._hasMipmap=!1,this._sizeInBytes=m,this._preMultiplyAlpha=l,this._flipY=r;let T=c(n);function E(S){return new bP(t,x,b,S,p,i,o,h,l,r,T)}this._positiveX=E(_.TEXTURE_CUBE_MAP_POSITIVE_X),this._negativeX=E(_.TEXTURE_CUBE_MAP_NEGATIVE_X),this._positiveY=E(_.TEXTURE_CUBE_MAP_POSITIVE_Y),this._negativeY=E(_.TEXTURE_CUBE_MAP_NEGATIVE_Y),this._positiveZ=E(_.TEXTURE_CUBE_MAP_POSITIVE_Z),this._negativeZ=E(_.TEXTURE_CUBE_MAP_NEGATIVE_Z),this._sampler=a,WZ(this,a),_.activeTexture(_.TEXTURE0),_.bindTexture(b,x),s?_.pixelStorei(_.UNPACK_COLORSPACE_CONVERSION_WEBGL,_.NONE):_.pixelStorei(_.UNPACK_COLORSPACE_CONVERSION_WEBGL,_.BROWSER_DEFAULT_WEBGL);for(let S of mo.faceNames())E8(this[S],n==null?void 0:n[S],0);_.bindTexture(b,null)}mo.prototype.copyFace=function(e,t,n,i){let o=e.context,r=new Lr({context:o,colorTextures:[t],destroyAttachments:!1});r._bind(),this[n].copyMipmapFromFramebuffer(0,0,t.width,t.height,g(i,0)),r._unBind(),r.destroy()};mo.FaceName=Object.freeze({POSITIVEX:"positiveX",NEGATIVEX:"negativeX",POSITIVEY:"positiveY",NEGATIVEY:"negativeY",POSITIVEZ:"positiveZ",NEGATIVEZ:"negativeZ"});function*TAe(){yield mo.FaceName.POSITIVEX,yield mo.FaceName.NEGATIVEX,yield mo.FaceName.POSITIVEY,yield mo.FaceName.NEGATIVEY,yield mo.FaceName.POSITIVEZ,yield mo.FaceName.NEGATIVEZ}mo.faceNames=function(){return TAe()};function E8(e,t,n){n=g(n,0);let i=e._targetFace,o=Math.max(Math.floor(e._size/2**n),1),r=e._pixelFormat,s=e._pixelDatatype,a=e._internalFormat,l=e._flipY,u=e._preMultiplyAlpha,f=e._context,h=f._gl;if(!c(t)){h.texImage2D(i,n,a,o,o,0,r,Ne.toWebGLConstant(s,f),null);return}let{arrayBufferView:m}=t,p=4;c(m)&&(p=Re.alignmentInBytes(r,s,o)),h.pixelStorei(h.UNPACK_ALIGNMENT,p),c(m)?(h.pixelStorei(h.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),h.pixelStorei(h.UNPACK_FLIP_Y_WEBGL,!1),l&&(m=Re.flipY(m,r,s,o,o)),h.texImage2D(i,n,a,o,o,0,r,Ne.toWebGLConstant(s,f),m)):(h.pixelStorei(h.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),h.pixelStorei(h.UNPACK_FLIP_Y_WEBGL,l),h.texImage2D(i,n,a,r,Ne.toWebGLConstant(s,f),t))}mo.loadFace=E8;Object.defineProperties(mo.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){WZ(this,e),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(this._sizeInBytes*4/3):this._sizeInBytes}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}});mo.getDirection=function(e,t){switch(e){case mo.FaceName.POSITIVEX:return d.clone(d.UNIT_X,t);case mo.FaceName.NEGATIVEX:return d.negate(d.UNIT_X,t);case mo.FaceName.POSITIVEY:return d.clone(d.UNIT_Y,t);case mo.FaceName.NEGATIVEY:return d.negate(d.UNIT_Y,t);case mo.FaceName.POSITIVEZ:return d.clone(d.UNIT_Z,t);case mo.FaceName.NEGATIVEZ:return d.negate(d.UNIT_Z,t)}};function WZ(e,t){let{minificationFilter:n,magnificationFilter:i}=t,o=[Wt.NEAREST_MIPMAP_NEAREST,Wt.NEAREST_MIPMAP_LINEAR,Wt.LINEAR_MIPMAP_NEAREST,Wt.LINEAR_MIPMAP_LINEAR].includes(n),r=e._context,s=e._pixelDatatype;(s===Ne.FLOAT&&!r.textureFloatLinear||s===Ne.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(n=o?Wt.NEAREST_MIPMAP_NEAREST:Wt.NEAREST,i=si.NEAREST);let a=r._gl,l=e._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(l,e._texture),a.texParameteri(l,a.TEXTURE_MIN_FILTER,n),a.texParameteri(l,a.TEXTURE_MAG_FILTER,i),a.texParameteri(l,a.TEXTURE_WRAP_S,t.wrapS),a.texParameteri(l,a.TEXTURE_WRAP_T,t.wrapT),c(e._textureFilterAnisotropic)&&a.texParameteri(l,e._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,t.maximumAnisotropy),a.bindTexture(l,null)}mo.prototype.loadMipmaps=function(e,t){if(C.defined("source",e),!Array.isArray(e))throw new w("source must be an array");let n=Math.log2(this._size);if(e.length!==n)throw new w("all mip levels must be defined");t=g(t,!1);let i=this._context._gl,o=this._texture,r=this._textureTarget;i.activeTexture(i.TEXTURE0),i.bindTexture(r,o),t?i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,i.NONE):i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,i.BROWSER_DEFAULT_WEBGL);for(let s=0;s<e.length;s++){let a=e[s],l=s+1;for(let u of mo.faceNames())E8(this[u],a[u],l)}i.bindTexture(r,null),this._hasMipmap=!0};mo.prototype.generateMipmap=function(e){if(e=g(e,zf.DONT_CARE),this._size>1&&!O.isPowerOfTwo(this._size))throw new w("width and height must be a power of two to call generateMipmap().");if(!zf.validate(e))throw new w("hint is invalid.");this._hasMipmap=!0;let t=this._context._gl,n=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(n,this._texture),t.generateMipmap(n),t.bindTexture(n,null)};mo.createVertexArray=function(e){let t=Ia.createGeometry(Ia.fromDimensions({dimensions:new d(2,2,2),vertexFormat:Ce.POSITION_ONLY})),n=this._attributeLocations=Pn.createAttributeLocations(t);return Zn.fromGeometry({context:e,geometry:t,attributeLocations:n,bufferUsage:Pe.STATIC_DRAW})};mo.prototype.isDestroyed=function(){return!1};mo.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._positiveX=ue(this._positiveX),this._negativeX=ue(this._negativeX),this._positiveY=ue(this._positiveY),this._negativeY=ue(this._negativeY),this._positiveZ=ue(this._positiveZ),this._negativeZ=ue(this._negativeZ),ue(this)};var Lo=mo;function CAe(e){this.context=e,this.framebuffer=void 0,this.blendingEnabled=void 0,this.scissorTest=void 0,this.viewport=void 0}var ic=CAe;var EP=`/**
| * A built-in GLSL floating-point constant for converting radians to degrees.
| *
| * @alias czm_degreesPerRadian
| * @glslConstant
| *
| * @see CesiumMath.DEGREES_PER_RADIAN
| *
| * @example
| * // GLSL declaration
| * const float czm_degreesPerRadian = ...;
| *
| * // Example
| * float deg = czm_degreesPerRadian * rad;
| */
| const float czm_degreesPerRadian = 57.29577951308232;
| `;var wP=`/**
| * A built-in GLSL vec2 constant for defining the depth range.
| * This is a workaround to a bug where IE11 does not implement gl_DepthRange.
| *
| * @alias czm_depthRange
| * @glslConstant
| *
| * @example
| * // GLSL declaration
| * float depthRangeNear = czm_depthRange.near;
| * float depthRangeFar = czm_depthRange.far;
| *
| */
| const czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);
| `;var SP=`/**
| * 0.1
| *
| * @name czm_epsilon1
| * @glslConstant
| */
| const float czm_epsilon1 = 0.1;
| `;var AP=`/**
| * 0.01
| *
| * @name czm_epsilon2
| * @glslConstant
| */
| const float czm_epsilon2 = 0.01;
| `;var vP=`/**
| * 0.001
| *
| * @name czm_epsilon3
| * @glslConstant
| */
| const float czm_epsilon3 = 0.001;
| `;var DP=`/**
| * 0.0001
| *
| * @name czm_epsilon4
| * @glslConstant
| */
| const float czm_epsilon4 = 0.0001;
| `;var IP=`/**
| * 0.00001
| *
| * @name czm_epsilon5
| * @glslConstant
| */
| const float czm_epsilon5 = 0.00001;
| `;var OP=`/**
| * 0.000001
| *
| * @name czm_epsilon6
| * @glslConstant
| */
| const float czm_epsilon6 = 0.000001;
| `;var PP=`/**
| * 0.0000001
| *
| * @name czm_epsilon7
| * @glslConstant
| */
| const float czm_epsilon7 = 0.0000001;
| `;var RP=`/**
| * DOC_TBA
| *
| * @name czm_infinity
| * @glslConstant
| */
| const float czm_infinity = 5906376272000.0; // Distance from the Sun to Pluto in meters. TODO: What is best given lowp, mediump, and highp?
| `;var MP=`/**
| * A built-in GLSL floating-point constant for <code>1/pi</code>.
| *
| * @alias czm_oneOverPi
| * @glslConstant
| *
| * @see CesiumMath.ONE_OVER_PI
| *
| * @example
| * // GLSL declaration
| * const float czm_oneOverPi = ...;
| *
| * // Example
| * float pi = 1.0 / czm_oneOverPi;
| */
| const float czm_oneOverPi = 0.3183098861837907;
| `;var LP=`/**
| * A built-in GLSL floating-point constant for <code>1/2pi</code>.
| *
| * @alias czm_oneOverTwoPi
| * @glslConstant
| *
| * @see CesiumMath.ONE_OVER_TWO_PI
| *
| * @example
| * // GLSL declaration
| * const float czm_oneOverTwoPi = ...;
| *
| * // Example
| * float pi = 2.0 * czm_oneOverTwoPi;
| */
| const float czm_oneOverTwoPi = 0.15915494309189535;
| `;var NP=`/**
| * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE}
| *
| * @name czm_passCesium3DTile
| * @glslConstant
| *
| * @see czm_pass
| */
| const float czm_passCesium3DTile = 4.0;
| `;var FP=`/**
| * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION}
| *
| * @name czm_passCesium3DTileClassification
| * @glslConstant
| *
| * @see czm_pass
| */
| const float czm_passCesium3DTileClassification = 5.0;
| `;var BP=`/**
| * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW}
| *
| * @name czm_passCesium3DTileClassificationIgnoreShow
| * @glslConstant
| *
| * @see czm_pass
| */
| const float czm_passCesium3DTileClassificationIgnoreShow = 6.0;
| `;var kP=`/**
| * The automatic GLSL constant for {@link Pass#CLASSIFICATION}
| *
| * @name czm_passClassification
| * @glslConstant
| *
| * @see czm_pass
| */
| const float czm_passClassification = 7.0;
| `;var UP=`/**
| * The automatic GLSL constant for {@link Pass#COMPUTE}
| *
| * @name czm_passCompute
| * @glslConstant
| *
| * @see czm_pass
| */
| const float czm_passCompute = 1.0;
| `;var zP=`/**
| * The automatic GLSL constant for {@link Pass#ENVIRONMENT}
| *
| * @name czm_passEnvironment
| * @glslConstant
| *
| * @see czm_pass
| */
| const float czm_passEnvironment = 0.0;
| `;var VP=`/**
| * The automatic GLSL constant for {@link Pass#GLOBE}
| *
| * @name czm_passGlobe
| * @glslConstant
| *
| * @see czm_pass
| */
| const float czm_passGlobe = 2.0;
| `;var HP=`/**
| * The automatic GLSL constant for {@link Pass#OPAQUE}
| *
| * @name czm_passOpaque
| * @glslConstant
| *
| * @see czm_pass
| */
| const float czm_passOpaque = 7.0;
| `;var GP=`/**
| * The automatic GLSL constant for {@link Pass#OVERLAY}
| *
| * @name czm_passOverlay
| * @glslConstant
| *
| * @see czm_pass
| */
| const float czm_passOverlay = 10.0;
| `;var jP=`/**
| * The automatic GLSL constant for {@link Pass#TERRAIN_CLASSIFICATION}
| *
| * @name czm_passTerrainClassification
| * @glslConstant
| *
| * @see czm_pass
| */
| const float czm_passTerrainClassification = 3.0;
| `;var WP=`/**
| * The automatic GLSL constant for {@link Pass#TRANSLUCENT}
| *
| * @name czm_passTranslucent
| * @glslConstant
| *
| * @see czm_pass
| */
| const float czm_passTranslucent = 8.0;
| `;var qP=`/**
| * The automatic GLSL constant for {@link Pass#VOXELS}
| *
| * @name czm_passVoxels
| * @glslConstant
| *
| * @see czm_pass
| */
| const float czm_passVoxels = 9.0;
| `;var YP=`/**
| * A built-in GLSL floating-point constant for <code>Math.PI</code>.
| *
| * @alias czm_pi
| * @glslConstant
| *
| * @see CesiumMath.PI
| *
| * @example
| * // GLSL declaration
| * const float czm_pi = ...;
| *
| * // Example
| * float twoPi = 2.0 * czm_pi;
| */
| const float czm_pi = 3.141592653589793;
| `;var XP=`/**
| * A built-in GLSL floating-point constant for <code>pi/4</code>.
| *
| * @alias czm_piOverFour
| * @glslConstant
| *
| * @see CesiumMath.PI_OVER_FOUR
| *
| * @example
| * // GLSL declaration
| * const float czm_piOverFour = ...;
| *
| * // Example
| * float pi = 4.0 * czm_piOverFour;
| */
| const float czm_piOverFour = 0.7853981633974483;
| `;var KP=`/**
| * A built-in GLSL floating-point constant for <code>pi/6</code>.
| *
| * @alias czm_piOverSix
| * @glslConstant
| *
| * @see CesiumMath.PI_OVER_SIX
| *
| * @example
| * // GLSL declaration
| * const float czm_piOverSix = ...;
| *
| * // Example
| * float pi = 6.0 * czm_piOverSix;
| */
| const float czm_piOverSix = 0.5235987755982988;
| `;var $P=`/**
| * A built-in GLSL floating-point constant for <code>pi/3</code>.
| *
| * @alias czm_piOverThree
| * @glslConstant
| *
| * @see CesiumMath.PI_OVER_THREE
| *
| * @example
| * // GLSL declaration
| * const float czm_piOverThree = ...;
| *
| * // Example
| * float pi = 3.0 * czm_piOverThree;
| */
| const float czm_piOverThree = 1.0471975511965976;
| `;var ZP=`/**
| * A built-in GLSL floating-point constant for <code>pi/2</code>.
| *
| * @alias czm_piOverTwo
| * @glslConstant
| *
| * @see CesiumMath.PI_OVER_TWO
| *
| * @example
| * // GLSL declaration
| * const float czm_piOverTwo = ...;
| *
| * // Example
| * float pi = 2.0 * czm_piOverTwo;
| */
| const float czm_piOverTwo = 1.5707963267948966;
| `;var JP=`/**
| * A built-in GLSL floating-point constant for converting degrees to radians.
| *
| * @alias czm_radiansPerDegree
| * @glslConstant
| *
| * @see CesiumMath.RADIANS_PER_DEGREE
| *
| * @example
| * // GLSL declaration
| * const float czm_radiansPerDegree = ...;
| *
| * // Example
| * float rad = czm_radiansPerDegree * deg;
| */
| const float czm_radiansPerDegree = 0.017453292519943295;
| `;var QP=`/**
| * The constant identifier for the 2D {@link SceneMode}
| *
| * @name czm_sceneMode2D
| * @glslConstant
| * @see czm_sceneMode
| * @see czm_sceneModeColumbusView
| * @see czm_sceneMode3D
| * @see czm_sceneModeMorphing
| */
| const float czm_sceneMode2D = 2.0;
| `;var eR=`/**
| * The constant identifier for the 3D {@link SceneMode}
| *
| * @name czm_sceneMode3D
| * @glslConstant
| * @see czm_sceneMode
| * @see czm_sceneMode2D
| * @see czm_sceneModeColumbusView
| * @see czm_sceneModeMorphing
| */
| const float czm_sceneMode3D = 3.0;
| `;var tR=`/**
| * The constant identifier for the Columbus View {@link SceneMode}
| *
| * @name czm_sceneModeColumbusView
| * @glslConstant
| * @see czm_sceneMode
| * @see czm_sceneMode2D
| * @see czm_sceneMode3D
| * @see czm_sceneModeMorphing
| */
| const float czm_sceneModeColumbusView = 1.0;
| `;var nR=`/**
| * The constant identifier for the Morphing {@link SceneMode}
| *
| * @name czm_sceneModeMorphing
| * @glslConstant
| * @see czm_sceneMode
| * @see czm_sceneMode2D
| * @see czm_sceneModeColumbusView
| * @see czm_sceneMode3D
| */
| const float czm_sceneModeMorphing = 0.0;
| `;var iR=`/**
| * A built-in GLSL floating-point constant for one solar radius.
| *
| * @alias czm_solarRadius
| * @glslConstant
| *
| * @see CesiumMath.SOLAR_RADIUS
| *
| * @example
| * // GLSL declaration
| * const float czm_solarRadius = ...;
| */
| const float czm_solarRadius = 695500000.0;
| `;var oR=`/**
| * A built-in GLSL floating-point constant for <code>3pi/2</code>.
| *
| * @alias czm_threePiOver2
| * @glslConstant
| *
| * @see CesiumMath.THREE_PI_OVER_TWO
| *
| * @example
| * // GLSL declaration
| * const float czm_threePiOver2 = ...;
| *
| * // Example
| * float pi = (2.0 / 3.0) * czm_threePiOver2;
| */
| const float czm_threePiOver2 = 4.71238898038469;
| `;var rR=`/**
| * A built-in GLSL floating-point constant for <code>2pi</code>.
| *
| * @alias czm_twoPi
| * @glslConstant
| *
| * @see CesiumMath.TWO_PI
| *
| * @example
| * // GLSL declaration
| * const float czm_twoPi = ...;
| *
| * // Example
| * float pi = czm_twoPi / 2.0;
| */
| const float czm_twoPi = 6.283185307179586;
| `;var sR=`/**
| * The maximum latitude, in radians, both North and South, supported by a Web Mercator
| * (EPSG:3857) projection. Technically, the Mercator projection is defined
| * for any latitude up to (but not including) 90 degrees, but it makes sense
| * to cut it off sooner because it grows exponentially with increasing latitude.
| * The logic behind this particular cutoff value, which is the one used by
| * Google Maps, Bing Maps, and Esri, is that it makes the projection
| * square. That is, the rectangle is equal in the X and Y directions.
| *
| * The constant value is computed as follows:
| * czm_pi * 0.5 - (2.0 * atan(exp(-czm_pi)))
| *
| * @name czm_webMercatorMaxLatitude
| * @glslConstant
| */
| const float czm_webMercatorMaxLatitude = 1.4844222297453324;
| `;var aR=`/**
| * @name czm_depthRangeStruct
| * @glslStruct
| */
| struct czm_depthRangeStruct
| {
| float near;
| float far;
| };
| `;var cR=`/**
| * Holds material information that can be used for lighting. Returned by all czm_getMaterial functions.
| *
| * @name czm_material
| * @glslStruct
| *
| * @property {vec3} diffuse Incoming light that scatters evenly in all directions.
| * @property {float} specular Intensity of incoming light reflecting in a single direction.
| * @property {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.
| * @property {vec3} normal Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.
| * @property {vec3} emission Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.
| * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.
| */
| struct czm_material
| {
| vec3 diffuse;
| float specular;
| float shininess;
| vec3 normal;
| vec3 emission;
| float alpha;
| };
| `;var lR=`/**
| * Used as input to every material's czm_getMaterial function.
| *
| * @name czm_materialInput
| * @glslStruct
| *
| * @property {float} s 1D texture coordinates.
| * @property {vec2} st 2D texture coordinates.
| * @property {vec3} str 3D texture coordinates.
| * @property {vec3} normalEC Unperturbed surface normal in eye coordinates.
| * @property {mat3} tangentToEyeMatrix Matrix for converting a tangent space normal to eye space.
| * @property {vec3} positionToEyeEC Vector from the fragment to the eye in eye coordinates. The magnitude is the distance in meters from the fragment to the eye.
| * @property {float} height The height of the terrain in meters above or below the ellipsoid. Only available for globe materials.
| * @property {float} slope The slope of the terrain in radians. 0 is flat; pi/2 is vertical. Only available for globe materials.
| * @property {float} aspect The aspect of the terrain in radians. 0 is East, pi/2 is North, pi is West, 3pi/2 is South. Only available for globe materials.
| * @property {float} waterMask The value of the water mask. 0 is land, 1 is water. Only available for globe materials.
| */
| struct czm_materialInput
| {
| float s;
| vec2 st;
| vec3 str;
| vec3 normalEC;
| mat3 tangentToEyeMatrix;
| vec3 positionToEyeEC;
| float height;
| float slope;
| float aspect;
| float waterMask;
| };
| `;var uR=`/**
| * Struct for representing a material for a {@link Model}. The model
| * rendering pipeline will pass this struct between material, custom shaders,
| * and lighting stages. This is not to be confused with {@link czm_material}
| * which is used by the older Fabric materials system, although they are similar.
| * <p>
| * All color values (diffuse, specular, emissive) are in linear color space.
| * </p>
| *
| * @name czm_modelMaterial
| * @glslStruct
| *
| * @property {vec4} baseColor The base color of the material.
| * @property {vec3} diffuse Incoming light that scatters evenly in all directions.
| * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.
| * @property {vec3} specular Color of reflected light at normal incidence in PBR materials. This is sometimes referred to as f0 in the literature.
| * @property {float} roughness A number from 0.0 to 1.0 representing how rough the surface is. Values near 0.0 produce glossy surfaces, while values near 1.0 produce rough surfaces.
| * @property {vec3} normalEC Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.
| * @property {float} occlusion Ambient occlusion recieved at this point on the material. 1.0 means fully lit, 0.0 means fully occluded.
| * @property {vec3} emissive Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.
| */
| struct czm_modelMaterial {
| vec4 baseColor;
| vec3 diffuse;
| float alpha;
| vec3 specular;
| float roughness;
| vec3 normalEC;
| float occlusion;
| vec3 emissive;
| #ifdef USE_SPECULAR
| float specularWeight;
| #endif
| #ifdef USE_ANISOTROPY
| vec3 anisotropicT;
| vec3 anisotropicB;
| float anisotropyStrength;
| #endif
| #ifdef USE_CLEARCOAT
| float clearcoatFactor;
| float clearcoatRoughness;
| vec3 clearcoatNormal;
| // Add clearcoatF0 when KHR_materials_ior is implemented
| #endif
| };
| `;var fR=`/**
| * Struct for representing the output of a custom vertex shader.
| *
| * @name czm_modelVertexOutput
| * @glslStruct
| *
| * @see {@link CustomShader}
| * @see {@link Model}
| *
| * @property {vec3} positionMC The position of the vertex in model coordinates
| * @property {float} pointSize A custom value for gl_PointSize. This is only used for point primitives.
| */
| struct czm_modelVertexOutput {
| vec3 positionMC;
| float pointSize;
| };
| `;var dR=`/**
| * DOC_TBA
| *
| * @name czm_ray
| * @glslStruct
| */
| struct czm_ray
| {
| vec3 origin;
| vec3 direction;
| };
| `;var hR=`/**
| * DOC_TBA
| *
| * @name czm_raySegment
| * @glslStruct
| */
| struct czm_raySegment
| {
| float start;
| float stop;
| };
|
| /**
| * DOC_TBA
| *
| * @name czm_emptyRaySegment
| * @glslConstant
| */
| const czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);
|
| /**
| * DOC_TBA
| *
| * @name czm_fullRaySegment
| * @glslConstant
| */
| const czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);
| `;var mR=`struct czm_shadowParameters
| {
| #ifdef USE_CUBE_MAP_SHADOW
| vec3 texCoords;
| #else
| vec2 texCoords;
| #endif
|
| float depthBias;
| float depth;
| float nDotL;
| vec2 texelStepSize;
| float normalShadingSmooth;
| float darkness;
| };
| `;var pR=`/**
| * Converts an HSB color (hue, saturation, brightness) to RGB
| * HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}
| *
| * @name czm_HSBToRGB
| * @glslFunction
| *
| * @param {vec3} hsb The color in HSB.
| *
| * @returns {vec3} The color in RGB.
| *
| * @example
| * vec3 hsb = czm_RGBToHSB(rgb);
| * hsb.z *= 0.1;
| * rgb = czm_HSBToRGB(hsb);
| */
|
| const vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
| vec3 czm_HSBToRGB(vec3 hsb)
| {
| vec3 p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);
| return hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsb.y);
| }
| `;var _R=`/**
| * Converts an HSL color (hue, saturation, lightness) to RGB
| * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}
| *
| * @name czm_HSLToRGB
| * @glslFunction
| *
| * @param {vec3} rgb The color in HSL.
| *
| * @returns {vec3} The color in RGB.
| *
| * @example
| * vec3 hsl = czm_RGBToHSL(rgb);
| * hsl.z *= 0.1;
| * rgb = czm_HSLToRGB(hsl);
| */
|
| vec3 hueToRGB(float hue)
| {
| float r = abs(hue * 6.0 - 3.0) - 1.0;
| float g = 2.0 - abs(hue * 6.0 - 2.0);
| float b = 2.0 - abs(hue * 6.0 - 4.0);
| return clamp(vec3(r, g, b), 0.0, 1.0);
| }
|
| vec3 czm_HSLToRGB(vec3 hsl)
| {
| vec3 rgb = hueToRGB(hsl.x);
| float c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;
| return (rgb - 0.5) * c + hsl.z;
| }
| `;var gR=`/**
| * Converts an RGB color to HSB (hue, saturation, brightness)
| * HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}
| *
| * @name czm_RGBToHSB
| * @glslFunction
| *
| * @param {vec3} rgb The color in RGB.
| *
| * @returns {vec3} The color in HSB.
| *
| * @example
| * vec3 hsb = czm_RGBToHSB(rgb);
| * hsb.z *= 0.1;
| * rgb = czm_HSBToRGB(hsb);
| */
|
| const vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
|
| vec3 czm_RGBToHSB(vec3 rgb)
| {
| vec4 p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));
| vec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));
|
| float d = q.x - min(q.w, q.y);
| return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);
| }
| `;var yR=`/**
| * Converts an RGB color to HSL (hue, saturation, lightness)
| * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}
| *
| * @name czm_RGBToHSL
| * @glslFunction
| *
| * @param {vec3} rgb The color in RGB.
| *
| * @returns {vec3} The color in HSL.
| *
| * @example
| * vec3 hsl = czm_RGBToHSL(rgb);
| * hsl.z *= 0.1;
| * rgb = czm_HSLToRGB(hsl);
| */
|
| vec3 RGBtoHCV(vec3 rgb)
| {
| // Based on work by Sam Hocevar and Emil Persson
| vec4 p = (rgb.g < rgb.b) ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);
| vec4 q = (rgb.r < p.x) ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);
| float c = q.x - min(q.w, q.y);
| float h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);
| return vec3(h, c, q.x);
| }
|
| vec3 czm_RGBToHSL(vec3 rgb)
| {
| vec3 hcv = RGBtoHCV(rgb);
| float l = hcv.z - hcv.y * 0.5;
| float s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);
| return vec3(hcv.x, s, l);
| }
| `;var bR=`/**
| * Converts an RGB color to CIE Yxy.
| * <p>The conversion is described in
| * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}
| * </p>
| *
| * @name czm_RGBToXYZ
| * @glslFunction
| *
| * @param {vec3} rgb The color in RGB.
| *
| * @returns {vec3} The color in CIE Yxy.
| *
| * @example
| * vec3 xyz = czm_RGBToXYZ(rgb);
| * xyz.x = max(xyz.x - luminanceThreshold, 0.0);
| * rgb = czm_XYZToRGB(xyz);
| */
| vec3 czm_RGBToXYZ(vec3 rgb)
| {
| const mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,
| 0.3576, 0.7152, 0.1192,
| 0.1805, 0.0722, 0.9505);
| vec3 xyz = RGB2XYZ * rgb;
| vec3 Yxy;
| Yxy.r = xyz.g;
| float temp = dot(vec3(1.0), xyz);
| Yxy.gb = xyz.rg / temp;
| return Yxy;
| }
| `;var xR=`/**
| * Converts a CIE Yxy color to RGB.
| * <p>The conversion is described in
| * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}
| * </p>
| *
| * @name czm_XYZToRGB
| * @glslFunction
| *
| * @param {vec3} Yxy The color in CIE Yxy.
| *
| * @returns {vec3} The color in RGB.
| *
| * @example
| * vec3 xyz = czm_RGBToXYZ(rgb);
| * xyz.x = max(xyz.x - luminanceThreshold, 0.0);
| * rgb = czm_XYZToRGB(xyz);
| */
| vec3 czm_XYZToRGB(vec3 Yxy)
| {
| const mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,
| -1.5371, 1.8760, -0.2040,
| -0.4985, 0.0416, 1.0572);
| vec3 xyz;
| xyz.r = Yxy.r * Yxy.g / Yxy.b;
| xyz.g = Yxy.r;
| xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;
|
| return XYZ2RGB * xyz;
| }
| `;var TR=`// See:
| // https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/
|
| vec3 czm_acesTonemapping(vec3 color) {
| float g = 0.985;
| float a = 0.065;
| float b = 0.0001;
| float c = 0.433;
| float d = 0.238;
|
| color = (color * (color + a) - b) / (color * (g * color + c) + d);
|
| color = clamp(color, 0.0, 1.0);
|
| return color;
| }
| `;var CR=`/**
| * @private
| */
| float czm_alphaWeight(float a)
| {
| float z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];
|
| // See Weighted Blended Order-Independent Transparency for examples of different weighting functions:
| // http://jcgt.org/published/0002/02/09/
| return pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));
| }
| `;var ER=`/**
| * Procedural anti-aliasing by blurring two colors that meet at a sharp edge.
| *
| * @name czm_antialias
| * @glslFunction
| *
| * @param {vec4} color1 The color on one side of the edge.
| * @param {vec4} color2 The color on the other side of the edge.
| * @param {vec4} currentcolor The current color, either <code>color1</code> or <code>color2</code>.
| * @param {float} dist The distance to the edge in texture coordinates.
| * @param {float} [fuzzFactor=0.1] Controls the blurriness between the two colors.
| * @returns {vec4} The anti-aliased color.
| *
| * @example
| * // GLSL declarations
| * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor);
| * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist);
| *
| * // get the color for a material that has a sharp edge at the line y = 0.5 in texture space
| * float dist = abs(textureCoordinates.t - 0.5);
| * vec4 currentColor = mix(bottomColor, topColor, step(0.5, textureCoordinates.t));
| * vec4 color = czm_antialias(bottomColor, topColor, currentColor, dist, 0.1);
| */
| vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)
| {
| float val1 = clamp(dist / fuzzFactor, 0.0, 1.0);
| float val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);
| val1 = val1 * (1.0 - val2);
| val1 = val1 * val1 * (3.0 - (2.0 * val1));
| val1 = pow(val1, 0.5); //makes the transition nicer
|
| vec4 midColor = (color1 + color2) * 0.5;
| return mix(midColor, currentColor, val1);
| }
|
| vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)
| {
| return czm_antialias(color1, color2, currentColor, dist, 0.1);
| }
| `;var wR=`/**
| * Apply a HSB color shift to an RGB color.
| *
| * @param {vec3} rgb The color in RGB space.
| * @param {vec3} hsbShift The amount to shift each component. The xyz components correspond to hue, saturation, and brightness. Shifting the hue by +/- 1.0 corresponds to shifting the hue by a full cycle. Saturation and brightness are clamped between 0 and 1 after the adjustment
| * @param {bool} ignoreBlackPixels If true, black pixels will be unchanged. This is necessary in some shaders such as atmosphere-related effects.
| *
| * @return {vec3} The RGB color after shifting in HSB space and clamping saturation and brightness to a valid range.
| */
| vec3 czm_applyHSBShift(vec3 rgb, vec3 hsbShift, bool ignoreBlackPixels) {
| // Convert rgb color to hsb
| vec3 hsb = czm_RGBToHSB(rgb);
|
| // Perform hsb shift
| // Hue cycles around so no clamp is needed.
| hsb.x += hsbShift.x; // hue
| hsb.y = clamp(hsb.y + hsbShift.y, 0.0, 1.0); // saturation
|
| // brightness
| //
| // Some shaders such as atmosphere-related effects need to leave black
| // pixels unchanged
| if (ignoreBlackPixels) {
| hsb.z = hsb.z > czm_epsilon7 ? hsb.z + hsbShift.z : 0.0;
| } else {
| hsb.z = hsb.z + hsbShift.z;
| }
| hsb.z = clamp(hsb.z, 0.0, 1.0);
|
| // Convert shifted hsb back to rgb
| return czm_HSBToRGB(hsb);
| }
| `;var SR=`/**
| * Approximately computes spherical coordinates given a normal.
| * Uses approximate inverse trigonometry for speed and consistency,
| * since inverse trigonometry can differ from vendor-to-vendor and when compared with the CPU.
| *
| * @name czm_approximateSphericalCoordinates
| * @glslFunction
| *
| * @param {vec3} normal arbitrary-length normal.
| *
| * @returns {vec2} Approximate latitude and longitude spherical coordinates.
| */
| vec2 czm_approximateSphericalCoordinates(vec3 normal) {
| // Project into plane with vertical for latitude
| float latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);
| float longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);
| return vec2(latitudeApproximation, longitudeApproximation);
| }
| `;var AR=`/**
| * Compute a rational approximation to tanh(x)
| *
| * @param {float} x A real number input
| * @returns {float} An approximation for tanh(x)
| */
| float czm_approximateTanh(float x) {
| float x2 = x * x;
| return max(-1.0, min(1.0, x * (27.0 + x2) / (27.0 + 9.0 * x2)));
| }
| `;var vR=`/**
| * Determines if the fragment is back facing
| *
| * @name czm_backFacing
| * @glslFunction
| *
| * @returns {bool} <code>true</code> if the fragment is back facing; otherwise, <code>false</code>.
| */
| bool czm_backFacing()
| {
| // !gl_FrontFacing doesn't work as expected on Mac/Intel so use the more verbose form instead. See https://github.com/CesiumGS/cesium/pull/8494.
| return gl_FrontFacing == false;
| }
| `;var DR=`/**
| * Branchless ternary operator to be used when it's inexpensive to explicitly
| * evaluate both possibilities for a float expression.
| *
| * @name czm_branchFreeTernary
| * @glslFunction
| *
| * @param {bool} comparison A comparison statement
| * @param {float} a Value to return if the comparison is true.
| * @param {float} b Value to return if the comparison is false.
| *
| * @returns {float} equivalent of comparison ? a : b
| */
| float czm_branchFreeTernary(bool comparison, float a, float b) {
| float useA = float(comparison);
| return a * useA + b * (1.0 - useA);
| }
|
| /**
| * Branchless ternary operator to be used when it's inexpensive to explicitly
| * evaluate both possibilities for a vec2 expression.
| *
| * @name czm_branchFreeTernary
| * @glslFunction
| *
| * @param {bool} comparison A comparison statement
| * @param {vec2} a Value to return if the comparison is true.
| * @param {vec2} b Value to return if the comparison is false.
| *
| * @returns {vec2} equivalent of comparison ? a : b
| */
| vec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {
| float useA = float(comparison);
| return a * useA + b * (1.0 - useA);
| }
|
| /**
| * Branchless ternary operator to be used when it's inexpensive to explicitly
| * evaluate both possibilities for a vec3 expression.
| *
| * @name czm_branchFreeTernary
| * @glslFunction
| *
| * @param {bool} comparison A comparison statement
| * @param {vec3} a Value to return if the comparison is true.
| * @param {vec3} b Value to return if the comparison is false.
| *
| * @returns {vec3} equivalent of comparison ? a : b
| */
| vec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {
| float useA = float(comparison);
| return a * useA + b * (1.0 - useA);
| }
|
| /**
| * Branchless ternary operator to be used when it's inexpensive to explicitly
| * evaluate both possibilities for a vec4 expression.
| *
| * @name czm_branchFreeTernary
| * @glslFunction
| *
| * @param {bool} comparison A comparison statement
| * @param {vec3} a Value to return if the comparison is true.
| * @param {vec3} b Value to return if the comparison is false.
| *
| * @returns {vec3} equivalent of comparison ? a : b
| */
| vec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {
| float useA = float(comparison);
| return a * useA + b * (1.0 - useA);
| }
| `;var IR=`
| vec4 czm_cascadeColor(vec4 weights)
| {
| return vec4(1.0, 0.0, 0.0, 1.0) * weights.x +
| vec4(0.0, 1.0, 0.0, 1.0) * weights.y +
| vec4(0.0, 0.0, 1.0, 1.0) * weights.z +
| vec4(1.0, 0.0, 1.0, 1.0) * weights.w;
| }
| `;var OR=`
| uniform vec4 shadowMap_cascadeDistances;
|
| float czm_cascadeDistance(vec4 weights)
| {
| return dot(shadowMap_cascadeDistances, weights);
| }
| `;var PR=`
| uniform mat4 shadowMap_cascadeMatrices[4];
|
| mat4 czm_cascadeMatrix(vec4 weights)
| {
| return shadowMap_cascadeMatrices[0] * weights.x +
| shadowMap_cascadeMatrices[1] * weights.y +
| shadowMap_cascadeMatrices[2] * weights.z +
| shadowMap_cascadeMatrices[3] * weights.w;
| }
| `;var RR=`
| uniform vec4 shadowMap_cascadeSplits[2];
|
| vec4 czm_cascadeWeights(float depthEye)
| {
| // One component is set to 1.0 and all others set to 0.0.
| vec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));
| vec4 far = step(depthEye, shadowMap_cascadeSplits[1]);
| return near * far;
| }
| `;var MR=`float getSignedDistance(vec2 uv, highp sampler2D clippingDistance) {
| float signedDistance = texture(clippingDistance, uv).r;
| return (signedDistance - 0.5) * 2.0;
| }
|
| void czm_clipPolygons(highp sampler2D clippingDistance, int extentsLength, vec2 clippingPosition, int regionIndex) {
| // Position is completely outside of polygons bounds
| vec2 rectUv = clippingPosition;
| if (regionIndex < 0 || rectUv.x <= 0.0 || rectUv.y <= 0.0 || rectUv.x >= 1.0 || rectUv.y >= 1.0) {
| #ifdef CLIPPING_INVERSE
| discard;
| #endif
| return;
| }
|
| vec2 clippingDistanceTextureDimensions = vec2(textureSize(clippingDistance, 0));
| vec2 sampleOffset = max(1.0 / clippingDistanceTextureDimensions, vec2(0.005));
| float dimension = float(extentsLength);
| if (extentsLength > 2) {
| dimension = ceil(log2(float(extentsLength)));
| }
|
| vec2 textureOffset = vec2(mod(float(regionIndex), dimension), floor(float(regionIndex) / dimension)) / dimension;
| vec2 uv = textureOffset + rectUv / dimension;
|
| float signedDistance = getSignedDistance(uv, clippingDistance);
|
| #ifdef CLIPPING_INVERSE
| if (signedDistance > 0.0) {
| discard;
| }
| #else
| if (signedDistance < 0.0) {
| discard;
| }
| #endif
| }
| `;var LR=`/**
| * DOC_TBA
| *
| * @name czm_columbusViewMorph
| * @glslFunction
| */
| vec4 czm_columbusViewMorph(vec4 position2D, vec4 position3D, float time)
| {
| // Just linear for now.
| vec3 p = mix(position2D.xyz, position3D.xyz, time);
| return vec4(p, 1.0);
| }
| `;var NR=`/**
| * Compute the atmosphere color, applying Rayleigh and Mie scattering. This
| * builtin uses automatic uniforms so the atmophere settings are synced with the
| * state of the Scene, even in other contexts like Model.
| *
| * @name czm_computeAtmosphereColor
| * @glslFunction
| *
| * @param {vec3} positionWC Position of the fragment in world coords (low precision)
| * @param {vec3} lightDirection Light direction from the sun or other light source.
| * @param {vec3} rayleighColor The Rayleigh scattering color computed by a scattering function
| * @param {vec3} mieColor The Mie scattering color computed by a scattering function
| * @param {float} opacity The opacity computed by a scattering function.
| */
| vec4 czm_computeAtmosphereColor(
| vec3 positionWC,
| vec3 lightDirection,
| vec3 rayleighColor,
| vec3 mieColor,
| float opacity
| ) {
| // Setup the primary ray: from the camera position to the vertex position.
| vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
| vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
|
| float cosAngle = dot(cameraToPositionWCDirection, lightDirection);
| float cosAngleSq = cosAngle * cosAngle;
|
| float G = czm_atmosphereMieAnisotropy;
| float GSq = G * G;
|
| // The Rayleigh phase function.
| float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
| // The Mie phase function.
| float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));
|
| // The final color is generated by combining the effects of the Rayleigh and Mie scattering.
| vec3 rayleigh = rayleighPhase * rayleighColor;
| vec3 mie = miePhase * mieColor;
|
| vec3 color = (rayleigh + mie) * czm_atmosphereLightIntensity;
|
| return vec4(color, opacity);
| }
|
| /**
| * Compute the atmosphere color, applying Rayleigh and Mie scattering. This
| * builtin uses automatic uniforms so the atmophere settings are synced with the
| * state of the Scene, even in other contexts like Model.
| *
| * @name czm_computeAtmosphereColor
| * @glslFunction
| *
| * @param {czm_ray} primaryRay Ray from the origin to sky fragment to in world coords (low precision)
| * @param {vec3} lightDirection Light direction from the sun or other light source.
| * @param {vec3} rayleighColor The Rayleigh scattering color computed by a scattering function
| * @param {vec3} mieColor The Mie scattering color computed by a scattering function
| * @param {float} opacity The opacity computed by a scattering function.
| */
| vec4 czm_computeAtmosphereColor(
| czm_ray primaryRay,
| vec3 lightDirection,
| vec3 rayleighColor,
| vec3 mieColor,
| float opacity
| ) {
| vec3 direction = normalize(primaryRay.direction);
|
| float cosAngle = dot(direction, lightDirection);
| float cosAngleSq = cosAngle * cosAngle;
|
| float G = czm_atmosphereMieAnisotropy;
| float GSq = G * G;
|
| // The Rayleigh phase function.
| float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
| // The Mie phase function.
| float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));
|
| // The final color is generated by combining the effects of the Rayleigh and Mie scattering.
| vec3 rayleigh = rayleighPhase * rayleighColor;
| vec3 mie = miePhase * mieColor;
|
| vec3 color = (rayleigh + mie) * czm_atmosphereLightIntensity;
|
| return vec4(color, opacity);
| }
|
| `;var FR=`/**
| * Compute atmosphere scattering for the ground atmosphere and fog. This method
| * uses automatic uniforms so it is always synced with the scene settings.
| *
| * @name czm_computeGroundAtmosphereScattering
| * @glslfunction
| *
| * @param {vec3} positionWC The position of the fragment in world coordinates.
| * @param {vec3} lightDirection The direction of the light to calculate the scattering from.
| * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.
| * @param {vec3} mieColor The variable the Mie scattering will be written to.
| * @param {float} opacity The variable the transmittance will be written to.
| */
| void czm_computeGroundAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity) {
| vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
| vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
| czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);
|
| float atmosphereInnerRadius = length(positionWC);
|
| czm_computeScattering(
| primaryRay,
| length(cameraToPositionWC),
| lightDirection,
| atmosphereInnerRadius,
| rayleighColor,
| mieColor,
| opacity
| );
| }
| `;var BR=`/**
| * Returns a position in model coordinates relative to eye taking into
| * account the current scene mode: 3D, 2D, or Columbus view.
| * <p>
| * This uses standard position attributes, <code>position3DHigh</code>,
| * <code>position3DLow</code>, <code>position2DHigh</code>, and <code>position2DLow</code>,
| * and should be used when writing a vertex shader for an {@link Appearance}.
| * </p>
| *
| * @name czm_computePosition
| * @glslFunction
| *
| * @returns {vec4} The position relative to eye.
| *
| * @example
| * vec4 p = czm_computePosition();
| * v_positionEC = (czm_modelViewRelativeToEye * p).xyz;
| * gl_Position = czm_modelViewProjectionRelativeToEye * p;
| *
| * @see czm_translateRelativeToEye
| */
| vec4 czm_computePosition();
| `;var kR=`/**
| * This function computes the colors contributed by Rayliegh and Mie scattering on a given ray, as well as
| * the transmittance value for the ray. This function uses automatic uniforms
| * so the atmosphere settings are always synced with the current scene.
| *
| * @name czm_computeScattering
| * @glslfunction
| *
| * @param {czm_ray} primaryRay The ray from the camera to the position.
| * @param {float} primaryRayLength The length of the primary ray.
| * @param {vec3} lightDirection The direction of the light to calculate the scattering from.
| * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.
| * @param {vec3} mieColor The variable the Mie scattering will be written to.
| * @param {float} opacity The variable the transmittance will be written to.
| */
| void czm_computeScattering(
| czm_ray primaryRay,
| float primaryRayLength,
| vec3 lightDirection,
| float atmosphereInnerRadius,
| out vec3 rayleighColor,
| out vec3 mieColor,
| out float opacity
| ) {
| const float ATMOSPHERE_THICKNESS = 111e3; // The thickness of the atmosphere in meters.
| const int PRIMARY_STEPS_MAX = 16; // Maximum number of times the ray from the camera to the world position (primary ray) is sampled.
| const int LIGHT_STEPS_MAX = 4; // Maximum number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.
|
| // Initialize the default scattering amounts to 0.
| rayleighColor = vec3(0.0);
| mieColor = vec3(0.0);
| opacity = 0.0;
|
| float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;
|
| vec3 origin = vec3(0.0);
|
| // Calculate intersection from the camera to the outer ring of the atmosphere.
| czm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);
|
| // Return empty colors if no intersection with the atmosphere geometry.
| if (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {
| return;
| }
|
| // To deal with smaller values of PRIMARY_STEPS (e.g. 4)
| // we implement a split strategy: sky or horizon.
| // For performance reasons, instead of a if/else branch
| // a soft choice is implemented through a weight 0.0 <= w_stop_gt_lprl <= 1.0
| float x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);
| // Value close to 0.0: close to the horizon
| // Value close to 1.0: above in the sky
| float w_stop_gt_lprl = 0.5 * (1.0 + czm_approximateTanh(x));
|
| // The ray should start from the first intersection with the outer atmopshere, or from the camera position, if it is inside the atmosphere.
| float start_0 = primaryRayAtmosphereIntersect.start;
| primaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);
| // The ray should end at the exit from the atmosphere or at the distance to the vertex, whichever is smaller.
| primaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));
|
| // For the number of ray steps, distinguish inside or outside atmosphere (outer space)
| // (1) from outer space we have to use more ray steps to get a realistic rendering
| // (2) within atmosphere we need fewer steps for faster rendering
| float x_o_a = start_0 - ATMOSPHERE_THICKNESS; // ATMOSPHERE_THICKNESS used as an ad-hoc constant, no precise meaning here, only the order of magnitude matters
| float w_inside_atmosphere = 1.0 - 0.5 * (1.0 + czm_approximateTanh(x_o_a));
| int PRIMARY_STEPS = PRIMARY_STEPS_MAX - int(w_inside_atmosphere * 12.0); // Number of times the ray from the camera to the world position (primary ray) is sampled.
| int LIGHT_STEPS = LIGHT_STEPS_MAX - int(w_inside_atmosphere * 2.0); // Number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.
|
| // Setup for sampling positions along the ray - starting from the intersection with the outer ring of the atmosphere.
| float rayPositionLength = primaryRayAtmosphereIntersect.start;
| // (1) Outside the atmosphere: constant rayStepLength
| // (2) Inside atmosphere: variable rayStepLength to compensate the rough rendering of the smaller number of ray steps
| float totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;
| float rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));
| float rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));
|
| vec3 rayleighAccumulation = vec3(0.0);
| vec3 mieAccumulation = vec3(0.0);
| vec2 opticalDepth = vec2(0.0);
| vec2 heightScale = vec2(czm_atmosphereRayleighScaleHeight, czm_atmosphereMieScaleHeight);
|
| // Sample positions on the primary ray.
| for (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {
|
| // The loop should be: for (int i = 0; i < PRIMARY_STEPS; ++i) {...} but WebGL1 cannot
| // loop with non-constant condition, so it has to break early instead
| if (i >= PRIMARY_STEPS) {
| break;
| }
|
| // Calculate sample position along viewpoint ray.
| vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);
|
| // Calculate height of sample position above ellipsoid.
| float sampleHeight = length(samplePosition) - atmosphereInnerRadius;
|
| // Calculate and accumulate density of particles at the sample position.
| vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;
| opticalDepth += sampleDensity;
|
| // Generate ray from the sample position segment to the light source, up to the outer ring of the atmosphere.
| czm_ray lightRay = czm_ray(samplePosition, lightDirection);
| czm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);
|
| float lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);
| float lightPositionLength = 0.0;
|
| vec2 lightOpticalDepth = vec2(0.0);
|
| // Sample positions along the light ray, to accumulate incidence of light on the latest sample segment.
| for (int j = 0; j < LIGHT_STEPS_MAX; ++j) {
|
| // The loop should be: for (int j = 0; i < LIGHT_STEPS; ++j) {...} but WebGL1 cannot
| // loop with non-constant condition, so it has to break early instead
| if (j >= LIGHT_STEPS) {
| break;
| }
|
| // Calculate sample position along light ray.
| vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);
|
| // Calculate height of the light sample position above ellipsoid.
| float lightHeight = length(lightPosition) - atmosphereInnerRadius;
|
| // Calculate density of photons at the light sample position.
| lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;
|
| // Increment distance on light ray.
| lightPositionLength += lightStepLength;
| }
|
| // Compute attenuation via the primary ray and the light ray.
| vec3 attenuation = exp(-((czm_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (czm_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));
|
| // Accumulate the scattering.
| rayleighAccumulation += sampleDensity.x * attenuation;
| mieAccumulation += sampleDensity.y * attenuation;
|
| // Increment distance on primary ray.
| rayPositionLength += (rayStepLength += rayStepLengthIncrease);
| }
|
| // Compute the scattering amount.
| rayleighColor = czm_atmosphereRayleighCoefficient * rayleighAccumulation;
| mieColor = czm_atmosphereMieCoefficient * mieAccumulation;
|
| // Compute the transmittance i.e. how much light is passing through the atmosphere.
| opacity = length(exp(-((czm_atmosphereMieCoefficient * opticalDepth.y) + (czm_atmosphereRayleighCoefficient * opticalDepth.x))));
| }
| `;var UR=`/**
| * @private
| */
| vec2 cordic(float angle)
| {
| // Scale the vector by the appropriate factor for the 24 iterations to follow.
| vec2 vector = vec2(6.0725293500888267e-1, 0.0);
| // Iteration 1
| float sense = (angle < 0.0) ? -1.0 : 1.0;
| // float factor = sense * 1.0; // 2^-0
| mat2 rotation = mat2(1.0, sense, -sense, 1.0);
| vector = rotation * vector;
| angle -= sense * 7.8539816339744828e-1; // atan(2^-0)
| // Iteration 2
| sense = (angle < 0.0) ? -1.0 : 1.0;
| float factor = sense * 5.0e-1; // 2^-1
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 4.6364760900080609e-1; // atan(2^-1)
| // Iteration 3
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 2.5e-1; // 2^-2
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 2.4497866312686414e-1; // atan(2^-2)
| // Iteration 4
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 1.25e-1; // 2^-3
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 1.2435499454676144e-1; // atan(2^-3)
| // Iteration 5
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 6.25e-2; // 2^-4
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 6.2418809995957350e-2; // atan(2^-4)
| // Iteration 6
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 3.125e-2; // 2^-5
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 3.1239833430268277e-2; // atan(2^-5)
| // Iteration 7
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 1.5625e-2; // 2^-6
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 1.5623728620476831e-2; // atan(2^-6)
| // Iteration 8
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 7.8125e-3; // 2^-7
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 7.8123410601011111e-3; // atan(2^-7)
| // Iteration 9
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 3.90625e-3; // 2^-8
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 3.9062301319669718e-3; // atan(2^-8)
| // Iteration 10
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 1.953125e-3; // 2^-9
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 1.9531225164788188e-3; // atan(2^-9)
| // Iteration 11
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 9.765625e-4; // 2^-10
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 9.7656218955931946e-4; // atan(2^-10)
| // Iteration 12
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 4.8828125e-4; // 2^-11
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 4.8828121119489829e-4; // atan(2^-11)
| // Iteration 13
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 2.44140625e-4; // 2^-12
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 2.4414062014936177e-4; // atan(2^-12)
| // Iteration 14
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 1.220703125e-4; // 2^-13
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 1.2207031189367021e-4; // atan(2^-13)
| // Iteration 15
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 6.103515625e-5; // 2^-14
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 6.1035156174208773e-5; // atan(2^-14)
| // Iteration 16
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 3.0517578125e-5; // 2^-15
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 3.0517578115526096e-5; // atan(2^-15)
| // Iteration 17
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 1.52587890625e-5; // 2^-16
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 1.5258789061315762e-5; // atan(2^-16)
| // Iteration 18
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 7.62939453125e-6; // 2^-17
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 7.6293945311019700e-6; // atan(2^-17)
| // Iteration 19
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 3.814697265625e-6; // 2^-18
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 3.8146972656064961e-6; // atan(2^-18)
| // Iteration 20
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 1.9073486328125e-6; // 2^-19
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 1.9073486328101870e-6; // atan(2^-19)
| // Iteration 21
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 9.5367431640625e-7; // 2^-20
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 9.5367431640596084e-7; // atan(2^-20)
| // Iteration 22
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 4.76837158203125e-7; // 2^-21
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 4.7683715820308884e-7; // atan(2^-21)
| // Iteration 23
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 2.384185791015625e-7; // 2^-22
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| angle -= sense * 2.3841857910155797e-7; // atan(2^-22)
| // Iteration 24
| sense = (angle < 0.0) ? -1.0 : 1.0;
| factor = sense * 1.1920928955078125e-7; // 2^-23
| rotation[0][1] = factor;
| rotation[1][0] = -factor;
| vector = rotation * vector;
| // angle -= sense * 1.1920928955078068e-7; // atan(2^-23)
|
| return vector;
| }
|
| /**
| * Computes the cosine and sine of the provided angle using the CORDIC algorithm.
| *
| * @name czm_cosineAndSine
| * @glslFunction
| *
| * @param {float} angle The angle in radians.
| *
| * @returns {vec2} The resulting cosine of the angle (as the x coordinate) and sine of the angle (as the y coordinate).
| *
| * @example
| * vec2 v = czm_cosineAndSine(czm_piOverSix);
| * float cosine = v.x;
| * float sine = v.y;
| */
| vec2 czm_cosineAndSine(float angle)
| {
| if (angle < -czm_piOverTwo || angle > czm_piOverTwo)
| {
| if (angle < 0.0)
| {
| return -cordic(angle + czm_pi);
| }
| else
| {
| return -cordic(angle - czm_pi);
| }
| }
| else
| {
| return cordic(angle);
| }
| }
| `;var zR=`/**
| * Decompresses texture coordinates that were packed into a single float.
| *
| * @name czm_decompressTextureCoordinates
| * @glslFunction
| *
| * @param {float} encoded The compressed texture coordinates.
| * @returns {vec2} The decompressed texture coordinates.
| */
| vec2 czm_decompressTextureCoordinates(float encoded)
| {
| float temp = encoded / 4096.0;
| float xZeroTo4095 = floor(temp);
| float stx = xZeroTo4095 / 4095.0;
| float sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;
| return vec2(stx, sty);
| }
| `;var VR=`// emulated noperspective
| #if (__VERSION__ == 300 || defined(GL_EXT_frag_depth)) && !defined(LOG_DEPTH)
| out float v_WindowZ;
| #endif
|
| /**
| * Emulates GL_DEPTH_CLAMP, which is not available in WebGL 1 or 2.
| * GL_DEPTH_CLAMP clamps geometry that is outside the near and far planes,
| * capping the shadow volume. More information here:
| * https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_depth_clamp.txt.
| *
| * When GL_EXT_frag_depth is available we emulate GL_DEPTH_CLAMP by ensuring
| * no geometry gets clipped by setting the clip space z value to 0.0 and then
| * sending the unaltered screen space z value (using emulated noperspective
| * interpolation) to the frag shader where it is clamped to [0,1] and then
| * written with gl_FragDepth (see czm_writeDepthClamp). This technique is based on:
| * https://stackoverflow.com/questions/5960757/how-to-emulate-gl-depth-clamp-nv.
| *
| * When GL_EXT_frag_depth is not available, which is the case on some mobile
| * devices, we must attempt to fix this only in the vertex shader.
| * The approach is to clamp the z value to the far plane, which closes the
| * shadow volume but also distorts the geometry, so there can still be artifacts
| * on frustum seams.
| *
| * @name czm_depthClamp
| * @glslFunction
| *
| * @param {vec4} coords The vertex in clip coordinates.
| * @returns {vec4} The modified vertex.
| *
| * @example
| * gl_Position = czm_depthClamp(czm_modelViewProjection * vec4(position, 1.0));
| *
| * @see czm_writeDepthClamp
| */
| vec4 czm_depthClamp(vec4 coords)
| {
| #ifndef LOG_DEPTH
| #if __VERSION__ == 300 || defined(GL_EXT_frag_depth)
| v_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;
| coords.z = 0.0;
| #else
| coords.z = min(coords.z, coords.w);
| #endif
| #endif
| return coords;
| }
| `;var HR=`/**
| * Computes a 3x3 rotation matrix that transforms vectors from an ellipsoid's east-north-up coordinate system
| * to eye coordinates. In east-north-up coordinates, x points east, y points north, and z points along the
| * surface normal. East-north-up can be used as an ellipsoid's tangent space for operations such as bump mapping.
| * <br /><br />
| * The ellipsoid is assumed to be centered at the model coordinate's origin.
| *
| * @name czm_eastNorthUpToEyeCoordinates
| * @glslFunction
| *
| * @param {vec3} positionMC The position on the ellipsoid in model coordinates.
| * @param {vec3} normalEC The normalized ellipsoid surface normal, at <code>positionMC</code>, in eye coordinates.
| *
| * @returns {mat3} A 3x3 rotation matrix that transforms vectors from the east-north-up coordinate system to eye coordinates.
| *
| * @example
| * // Transform a vector defined in the east-north-up coordinate
| * // system, (0, 0, 1) which is the surface normal, to eye
| * // coordinates.
| * mat3 m = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);
| * vec3 normalEC = m * vec3(0.0, 0.0, 1.0);
| */
| mat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)
| {
| vec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0)); // normalized surface tangent in model coordinates
| vec3 tangentEC = normalize(czm_normal3D * tangentMC); // normalized surface tangent in eye coordinates
| vec3 bitangentEC = normalize(cross(normalEC, tangentEC)); // normalized surface bitangent in eye coordinates
|
| return mat3(
| tangentEC.x, tangentEC.y, tangentEC.z,
| bitangentEC.x, bitangentEC.y, bitangentEC.z,
| normalEC.x, normalEC.y, normalEC.z);
| }
| `;var GR=`/**
| * DOC_TBA
| *
| * @name czm_ellipsoidContainsPoint
| * @glslFunction
| *
| */
| bool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)
| {
| vec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;
| return (dot(scaled, scaled) <= 1.0);
| }
| `;var jR=`/**
| * Approximate uv coordinates based on the ellipsoid normal.
| *
| * @name czm_ellipsoidTextureCoordinates
| * @glslFunction
| */
| vec2 czm_ellipsoidTextureCoordinates(vec3 normal)
| {
| return vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);
| }
| `;var WR=`/**
| * Compares <code>left</code> and <code>right</code> componentwise. Returns <code>true</code>
| * if they are within <code>epsilon</code> and <code>false</code> otherwise. The inputs
| * <code>left</code> and <code>right</code> can be <code>float</code>s, <code>vec2</code>s,
| * <code>vec3</code>s, or <code>vec4</code>s.
| *
| * @name czm_equalsEpsilon
| * @glslFunction
| *
| * @param {} left The first vector.
| * @param {} right The second vector.
| * @param {float} epsilon The epsilon to use for equality testing.
| * @returns {bool} <code>true</code> if the components are within <code>epsilon</code> and <code>false</code> otherwise.
| *
| * @example
| * // GLSL declarations
| * bool czm_equalsEpsilon(float left, float right, float epsilon);
| * bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon);
| * bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon);
| * bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon);
| */
| bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {
| return all(lessThanEqual(abs(left - right), vec4(epsilon)));
| }
|
| bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {
| return all(lessThanEqual(abs(left - right), vec3(epsilon)));
| }
|
| bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {
| return all(lessThanEqual(abs(left - right), vec2(epsilon)));
| }
|
| bool czm_equalsEpsilon(float left, float right, float epsilon) {
| return (abs(left - right) <= epsilon);
| }
| `;var qR=`/**
| * DOC_TBA
| *
| * @name czm_eyeOffset
| * @glslFunction
| *
| * @param {vec4} positionEC DOC_TBA.
| * @param {vec3} eyeOffset DOC_TBA.
| *
| * @returns {vec4} DOC_TBA.
| */
| vec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)
| {
| // This equation is approximate in x and y.
| vec4 p = positionEC;
| vec4 zEyeOffset = normalize(p) * eyeOffset.z;
| p.xy += eyeOffset.xy + zEyeOffset.xy;
| p.z += zEyeOffset.z;
| return p;
| }
| `;var YR=`/**
| * Transforms a position from eye to window coordinates. The transformation
| * from eye to clip coordinates is done using {@link czm_projection}.
| * The transform from normalized device coordinates to window coordinates is
| * done using {@link czm_viewportTransformation}, which assumes a depth range
| * of <code>near = 0</code> and <code>far = 1</code>.
| * <br /><br />
| * This transform is useful when there is a need to manipulate window coordinates
| * in a vertex shader as done by {@link BillboardCollection}.
| *
| * @name czm_eyeToWindowCoordinates
| * @glslFunction
| *
| * @param {vec4} position The position in eye coordinates to transform.
| *
| * @returns {vec4} The transformed position in window coordinates.
| *
| * @see czm_modelToWindowCoordinates
| * @see czm_projection
| * @see czm_viewportTransformation
| * @see BillboardCollection
| *
| * @example
| * vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);
| */
| vec4 czm_eyeToWindowCoordinates(vec4 positionEC)
| {
| vec4 q = czm_projection * positionEC; // clip coordinates
| q.xyz /= q.w; // normalized device coordinates
| q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates
| return q;
| }
| `;var XR=`/**
| * Approxiamtes atan over the range [0, 1]. Safe to flip output for negative input.
| *
| * Based on Michal Drobot's approximation from ShaderFastLibs, which in turn is based on
| * "Efficient approximations for the arctangent function," Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006.
| * Adapted from ShaderFastLibs under MIT License.
| *
| * Chosen for the following characteristics over range [0, 1]:
| * - basically no error at 0 and 1, important for getting around range limit (naive atan2 via atan requires infinite range atan)
| * - no visible artifacts from first-derivative discontinuities, unlike latitude via range-reduced sqrt asin approximations (at equator)
| *
| * The original code is x * (-0.1784 * abs(x) - 0.0663 * x * x + 1.0301);
| * Removed the abs() in here because it isn't needed, the input range is guaranteed as [0, 1] by how we're approximating atan2.
| *
| * @name czm_fastApproximateAtan
| * @glslFunction
| *
| * @param {float} x Value between 0 and 1 inclusive.
| *
| * @returns {float} Approximation of atan(x)
| */
| float czm_fastApproximateAtan(float x) {
| return x * (-0.1784 * x - 0.0663 * x * x + 1.0301);
| }
|
| /**
| * Approximation of atan2.
| *
| * Range reduction math based on nvidia's cg reference implementation for atan2: http://developer.download.nvidia.com/cg/atan2.html
| * However, we replaced their atan curve with Michael Drobot's (see above).
| *
| * @name czm_fastApproximateAtan
| * @glslFunction
| *
| * @param {float} x Value between -1 and 1 inclusive.
| * @param {float} y Value between -1 and 1 inclusive.
| *
| * @returns {float} Approximation of atan2(x, y)
| */
| float czm_fastApproximateAtan(float x, float y) {
| // atan approximations are usually only reliable over [-1, 1], or, in our case, [0, 1] due to modifications.
| // So range-reduce using abs and by flipping whether x or y is on top.
| float t = abs(x); // t used as swap and atan result.
| float opposite = abs(y);
| float adjacent = max(t, opposite);
| opposite = min(t, opposite);
|
| t = czm_fastApproximateAtan(opposite / adjacent);
|
| // Undo range reduction
| t = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);
| t = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);
| t = czm_branchFreeTernary(y < 0.0, -t, t);
| return t;
| }
| `;var KR=`/**
| * Gets the color with fog at a distance from the camera.
| *
| * @name czm_fog
| * @glslFunction
| *
| * @param {float} distanceToCamera The distance to the camera in meters.
| * @param {vec3} color The original color.
| * @param {vec3} fogColor The color of the fog.
| *
| * @returns {vec3} The color adjusted for fog at the distance from the camera.
| */
| vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor)
| {
| float scalar = distanceToCamera * czm_fogDensity;
| float fog = 1.0 - exp(-(scalar * scalar));
| return mix(color, fogColor, fog);
| }
|
| /**
| * Gets the color with fog at a distance from the camera.
| *
| * @name czm_fog
| * @glslFunction
| *
| * @param {float} distanceToCamera The distance to the camera in meters.
| * @param {vec3} color The original color.
| * @param {vec3} fogColor The color of the fog.
| * @param {float} fogModifierConstant A constant to modify the appearance of fog.
| *
| * @returns {vec3} The color adjusted for fog at the distance from the camera.
| */
| vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor, float fogModifierConstant)
| {
| float scalar = distanceToCamera * czm_fogDensity;
| float fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));
| return mix(color, fogColor, fog);
| }
| `;var $R=`/**
| * Converts a color from RGB space to linear space.
| *
| * @name czm_gammaCorrect
| * @glslFunction
| *
| * @param {vec3} color The color in RGB space.
| * @returns {vec3} The color in linear space.
| */
| vec3 czm_gammaCorrect(vec3 color) {
| #ifdef HDR
| color = pow(color, vec3(czm_gamma));
| #endif
| return color;
| }
|
| vec4 czm_gammaCorrect(vec4 color) {
| #ifdef HDR
| color.rgb = pow(color.rgb, vec3(czm_gamma));
| #endif
| return color;
| }
| `;var ZR=`/**
| * DOC_TBA
| *
| * @name czm_geodeticSurfaceNormal
| * @glslFunction
| *
| * @param {vec3} positionOnEllipsoid DOC_TBA
| * @param {vec3} ellipsoidCenter DOC_TBA
| * @param {vec3} oneOverEllipsoidRadiiSquared DOC_TBA
| *
| * @returns {vec3} DOC_TBA.
| */
| vec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared)
| {
| return normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);
| }
| `;var JR=`/**
| * An czm_material with default values. Every material's czm_getMaterial
| * should use this default material as a base for the material it returns.
| * The default normal value is given by materialInput.normalEC.
| *
| * @name czm_getDefaultMaterial
| * @glslFunction
| *
| * @param {czm_materialInput} input The input used to construct the default material.
| *
| * @returns {czm_material} The default material.
| *
| * @see czm_materialInput
| * @see czm_material
| * @see czm_getMaterial
| */
| czm_material czm_getDefaultMaterial(czm_materialInput materialInput)
| {
| czm_material material;
| material.diffuse = vec3(0.0);
| material.specular = 0.0;
| material.shininess = 1.0;
| material.normal = materialInput.normalEC;
| material.emission = vec3(0.0);
| material.alpha = 1.0;
| return material;
| }
| `;var QR=`/**
| * Select which direction vector to use for dynamic atmosphere lighting based on an enum value
| *
| * @name czm_getDynamicAtmosphereLightDirection
| * @glslfunction
| * @see DynamicAtmosphereLightingType.js
| *
| * @param {vec3} positionWC the position of the vertex/fragment in world coordinates. This is normalized and returned when dynamic lighting is turned off.
| * @param {float} lightEnum The enum value for selecting between light sources.
| * @return {vec3} The normalized light direction vector. Depending on the enum value, it is either positionWC, czm_lightDirectionWC or czm_sunDirectionWC
| */
| vec3 czm_getDynamicAtmosphereLightDirection(vec3 positionWC, float lightEnum) {
| const float NONE = 0.0;
| const float SCENE_LIGHT = 1.0;
| const float SUNLIGHT = 2.0;
|
| vec3 lightDirection =
| positionWC * float(lightEnum == NONE) +
| czm_lightDirectionWC * float(lightEnum == SCENE_LIGHT) +
| czm_sunDirectionWC * float(lightEnum == SUNLIGHT);
| return normalize(lightDirection);
| }
| `;var e1=`/**
| * Calculates the intensity of diffusely reflected light.
| *
| * @name czm_getLambertDiffuse
| * @glslFunction
| *
| * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
| * @param {vec3} normalEC The surface normal in eye coordinates.
| *
| * @returns {float} The intensity of the diffuse reflection.
| *
| * @see czm_phong
| *
| * @example
| * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);
| * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);
| * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);
| */
| float czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC)
| {
| return max(dot(lightDirectionEC, normalEC), 0.0);
| }
| `;var t1=`/**
| * Calculates the specular intensity of reflected light.
| *
| * @name czm_getSpecular
| * @glslFunction
| *
| * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
| * @param {vec3} toEyeEC Unit vector pointing to the eye position in eye coordinates.
| * @param {vec3} normalEC The surface normal in eye coordinates.
| * @param {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.
| *
| * @returns {float} The intensity of the specular highlight.
| *
| * @see czm_phong
| *
| * @example
| * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);
| * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);
| * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);
| */
| float czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)
| {
| vec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);
| float specular = max(dot(toReflectedLight, toEyeEC), 0.0);
|
| // pow has undefined behavior if both parameters <= 0.
| // Prevent this by making sure shininess is at least czm_epsilon2.
| return pow(specular, max(shininess, czm_epsilon2));
| }
| `;var n1=`/**
| * @private
| */
| vec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)
| {
| float cosAngle = cos(angleInRadians);
| float sinAngle = sin(angleInRadians);
|
| // time dependent sampling directions
| vec2 s0 = vec2(1.0/17.0, 0.0);
| vec2 s1 = vec2(-1.0/29.0, 0.0);
| vec2 s2 = vec2(1.0/101.0, 1.0/59.0);
| vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);
|
| // rotate sampling direction by specified angle
| s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));
| s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));
| s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));
| s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));
|
| vec2 uv0 = (uv/103.0) + (time * s0);
| vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);
| vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);
| vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);
|
| uv0 = fract(uv0);
| uv1 = fract(uv1);
| uv2 = fract(uv2);
| uv3 = fract(uv3);
| vec4 noise = (texture(normalMap, uv0)) +
| (texture(normalMap, uv1)) +
| (texture(normalMap, uv2)) +
| (texture(normalMap, uv3));
|
| // average and scale to between -1 and 1
| return ((noise / 4.0) - 0.5) * 2.0;
| }
| `;var i1=`/**
| * Adjusts the hue of a color.
| *
| * @name czm_hue
| * @glslFunction
| *
| * @param {vec3} rgb The color.
| * @param {float} adjustment The amount to adjust the hue of the color in radians.
| *
| * @returns {float} The color with the hue adjusted.
| *
| * @example
| * vec3 adjustHue = czm_hue(color, czm_pi); // The same as czm_hue(color, -czm_pi)
| */
| vec3 czm_hue(vec3 rgb, float adjustment)
| {
| const mat3 toYIQ = mat3(0.299, 0.587, 0.114,
| 0.595716, -0.274453, -0.321263,
| 0.211456, -0.522591, 0.311135);
| const mat3 toRGB = mat3(1.0, 0.9563, 0.6210,
| 1.0, -0.2721, -0.6474,
| 1.0, -1.107, 1.7046);
|
| vec3 yiq = toYIQ * rgb;
| float hue = atan(yiq.z, yiq.y) + adjustment;
| float chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);
|
| vec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));
| return toRGB * color;
| }
| `;var o1=`/**
| * Converts a color in linear space to RGB space.
| *
| * @name czm_inverseGamma
| * @glslFunction
| *
| * @param {vec3} color The color in linear space.
| * @returns {vec3} The color in RGB space.
| */
| vec3 czm_inverseGamma(vec3 color) {
| return pow(color, vec3(1.0 / czm_gamma));
| }
| `;var r1=`/**
| * Determines if a time interval is empty.
| *
| * @name czm_isEmpty
| * @glslFunction
| *
| * @param {czm_raySegment} interval The interval to test.
| *
| * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.
| *
| * @example
| * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true
| * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false
| * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.
| */
| bool czm_isEmpty(czm_raySegment interval)
| {
| return (interval.stop < 0.0);
| }
| `;var s1=`/**
| * Determines if a time interval is empty.
| *
| * @name czm_isFull
| * @glslFunction
| *
| * @param {czm_raySegment} interval The interval to test.
| *
| * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.
| *
| * @example
| * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true
| * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false
| * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.
| */
| bool czm_isFull(czm_raySegment interval)
| {
| return (interval.start == 0.0 && interval.stop == czm_infinity);
| }
| `;var a1=`/**
| * Computes the fraction of a Web Wercator rectangle at which a given geodetic latitude is located.
| *
| * @name czm_latitudeToWebMercatorFraction
| * @glslFunction
| *
| * @param {float} latitude The geodetic latitude, in radians.
| * @param {float} southMercatorY The Web Mercator coordinate of the southern boundary of the rectangle.
| * @param {float} oneOverMercatorHeight The total height of the rectangle in Web Mercator coordinates.
| *
| * @returns {float} The fraction of the rectangle at which the latitude occurs. If the latitude is the southern
| * boundary of the rectangle, the return value will be zero. If it is the northern boundary, the return
| * value will be 1.0. Latitudes in between are mapped according to the Web Mercator projection.
| */
| float czm_latitudeToWebMercatorFraction(float latitude, float southMercatorY, float oneOverMercatorHeight)
| {
| float sinLatitude = sin(latitude);
| float mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));
|
| return (mercatorY - southMercatorY) * oneOverMercatorHeight;
| }
| `;var c1=`/**
| * Computes distance from an point in 2D to a line in 2D.
| *
| * @name czm_lineDistance
| * @glslFunction
| *
| * param {vec2} point1 A point along the line.
| * param {vec2} point2 A point along the line.
| * param {vec2} point A point that may or may not be on the line.
| * returns {float} The distance from the point to the line.
| */
| float czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {
| return abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);
| }
| `;var l1=`/**
| * Converts a linear RGB color to an sRGB color.
| *
| * @param {vec3|vec4} linearIn The color in linear color space.
| * @returns {vec3|vec4} The color in sRGB color space. The vector type matches the input.
| */
| vec3 czm_linearToSrgb(vec3 linearIn)
| {
| return pow(linearIn, vec3(1.0/2.2));
| }
|
| vec4 czm_linearToSrgb(vec4 linearIn)
| {
| vec3 srgbOut = pow(linearIn.rgb, vec3(1.0/2.2));
| return vec4(srgbOut, linearIn.a);
| }
| `;var u1=`/**
| * Computes the luminance of a color.
| *
| * @name czm_luminance
| * @glslFunction
| *
| * @param {vec3} rgb The color.
| *
| * @returns {float} The luminance.
| *
| * @example
| * float light = czm_luminance(vec3(0.0)); // 0.0
| * float dark = czm_luminance(vec3(1.0)); // ~1.0
| */
| float czm_luminance(vec3 rgb)
| {
| // Algorithm from Chapter 10 of Graphics Shaders.
| const vec3 W = vec3(0.2125, 0.7154, 0.0721);
| return dot(rgb, W);
| }
| `;var f1=`/**
| * Find the maximum component of a vector.
| *
| * @name czm_maximumComponent
| * @glslFunction
| *
| * @param {vec2|vec3|vec4} v The input vector.
| * @returns {float} The value of the largest component.
| */
| float czm_maximumComponent(vec2 v)
| {
| return max(v.x, v.y);
| }
| float czm_maximumComponent(vec3 v)
| {
| return max(max(v.x, v.y), v.z);
| }
| float czm_maximumComponent(vec4 v)
| {
| return max(max(max(v.x, v.y), v.z), v.w);
| }
| `;var d1=`/**
| * Computes the size of a pixel in meters at a distance from the eye.
| * <p>
| * Use this version when passing in a custom pixel ratio. For example, passing in 1.0 will return meters per native device pixel.
| * </p>
| * @name czm_metersPerPixel
| * @glslFunction
| *
| * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.
| * @param {float} pixelRatio The scaling factor from pixel space to coordinate space
| *
| * @returns {float} The meters per pixel at positionEC.
| */
| float czm_metersPerPixel(vec4 positionEC, float pixelRatio)
| {
| float width = czm_viewport.z;
| float height = czm_viewport.w;
| float pixelWidth;
| float pixelHeight;
|
| float top = czm_frustumPlanes.x;
| float bottom = czm_frustumPlanes.y;
| float left = czm_frustumPlanes.z;
| float right = czm_frustumPlanes.w;
|
| if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)
| {
| float frustumWidth = right - left;
| float frustumHeight = top - bottom;
| pixelWidth = frustumWidth / width;
| pixelHeight = frustumHeight / height;
| }
| else
| {
| float distanceToPixel = -positionEC.z;
| float inverseNear = 1.0 / czm_currentFrustum.x;
| float tanTheta = top * inverseNear;
| pixelHeight = 2.0 * distanceToPixel * tanTheta / height;
| tanTheta = right * inverseNear;
| pixelWidth = 2.0 * distanceToPixel * tanTheta / width;
| }
|
| return max(pixelWidth, pixelHeight) * pixelRatio;
| }
|
| /**
| * Computes the size of a pixel in meters at a distance from the eye.
| * <p>
| * Use this version when scaling by pixel ratio.
| * </p>
| * @name czm_metersPerPixel
| * @glslFunction
| *
| * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.
| *
| * @returns {float} The meters per pixel at positionEC.
| */
| float czm_metersPerPixel(vec4 positionEC)
| {
| return czm_metersPerPixel(positionEC, czm_pixelRatio);
| }
| `;var h1=`/**
| * Transforms a position from model to window coordinates. The transformation
| * from model to clip coordinates is done using {@link czm_modelViewProjection}.
| * The transform from normalized device coordinates to window coordinates is
| * done using {@link czm_viewportTransformation}, which assumes a depth range
| * of <code>near = 0</code> and <code>far = 1</code>.
| * <br /><br />
| * This transform is useful when there is a need to manipulate window coordinates
| * in a vertex shader as done by {@link BillboardCollection}.
| * <br /><br />
| * This function should not be confused with {@link czm_viewportOrthographic},
| * which is an orthographic projection matrix that transforms from window
| * coordinates to clip coordinates.
| *
| * @name czm_modelToWindowCoordinates
| * @glslFunction
| *
| * @param {vec4} position The position in model coordinates to transform.
| *
| * @returns {vec4} The transformed position in window coordinates.
| *
| * @see czm_eyeToWindowCoordinates
| * @see czm_modelViewProjection
| * @see czm_viewportTransformation
| * @see czm_viewportOrthographic
| * @see BillboardCollection
| *
| * @example
| * vec4 positionWC = czm_modelToWindowCoordinates(positionMC);
| */
| vec4 czm_modelToWindowCoordinates(vec4 position)
| {
| vec4 q = czm_modelViewProjection * position; // clip coordinates
| q.xyz /= q.w; // normalized device coordinates
| q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates
| return q;
| }
| `;var m1=`/**
| * DOC_TBA
| *
| * @name czm_multiplyWithColorBalance
| * @glslFunction
| */
| vec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)
| {
| // Algorithm from Chapter 10 of Graphics Shaders.
| const vec3 W = vec3(0.2125, 0.7154, 0.0721);
|
| vec3 target = left * right;
| float leftLuminance = dot(left, W);
| float rightLuminance = dot(right, W);
| float targetLuminance = dot(target, W);
|
| return ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;
| }
| `;var p1=`/**
| * Computes a value that scales with distance. The scaling is clamped at the near and
| * far distances, and does not extrapolate. This function works with the
| * {@link NearFarScalar} JavaScript class.
| *
| * @name czm_nearFarScalar
| * @glslFunction
| *
| * @param {vec4} nearFarScalar A vector with 4 components: Near distance (x), Near value (y), Far distance (z), Far value (w).
| * @param {float} cameraDistSq The square of the current distance from the camera.
| *
| * @returns {float} The value at this distance.
| */
| float czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)
| {
| float valueAtMin = nearFarScalar.y;
| float valueAtMax = nearFarScalar.w;
| float nearDistanceSq = nearFarScalar.x * nearFarScalar.x;
| float farDistanceSq = nearFarScalar.z * nearFarScalar.z;
|
| float t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);
|
| t = pow(clamp(t, 0.0, 1.0), 0.2);
|
| return mix(valueAtMin, valueAtMax, t);
| }
| `;var _1=` /**
| * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.
| * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
| * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
| *
| * @name czm_octDecode
| * @param {vec2} encoded The oct-encoded, unit-length vector
| * @param {float} range The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.
| * @returns {vec3} The decoded and normalized vector
| */
| vec3 czm_octDecode(vec2 encoded, float range)
| {
| if (encoded.x == 0.0 && encoded.y == 0.0) {
| return vec3(0.0, 0.0, 0.0);
| }
|
| encoded = encoded / range * 2.0 - 1.0;
| vec3 v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));
| if (v.z < 0.0)
| {
| v.xy = (1.0 - abs(v.yx)) * czm_signNotZero(v.xy);
| }
|
| return normalize(v);
| }
|
| /**
| * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.
| * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
| * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
| *
| * @name czm_octDecode
| * @param {vec2} encoded The oct-encoded, unit-length vector
| * @returns {vec3} The decoded and normalized vector
| */
| vec3 czm_octDecode(vec2 encoded)
| {
| return czm_octDecode(encoded, 255.0);
| }
|
| /**
| * Decodes a unit-length vector in 'oct' encoding packed into a floating-point number to a normalized 3-component Cartesian vector.
| * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
| * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
| *
| * @name czm_octDecode
| * @param {float} encoded The oct-encoded, unit-length vector
| * @returns {vec3} The decoded and normalized vector
| */
| vec3 czm_octDecode(float encoded)
| {
| float temp = encoded / 256.0;
| float x = floor(temp);
| float y = (temp - x) * 256.0;
| return czm_octDecode(vec2(x, y));
| }
|
| /**
| * Decodes three unit-length vectors in 'oct' encoding packed into two floating-point numbers to normalized 3-component Cartesian vectors.
| * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
| * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
| *
| * @name czm_octDecode
| * @param {vec2} encoded The packed oct-encoded, unit-length vectors.
| * @param {vec3} vector1 One decoded and normalized vector.
| * @param {vec3} vector2 One decoded and normalized vector.
| * @param {vec3} vector3 One decoded and normalized vector.
| */
| void czm_octDecode(vec2 encoded, out vec3 vector1, out vec3 vector2, out vec3 vector3)
| {
| float temp = encoded.x / 65536.0;
| float x = floor(temp);
| float encodedFloat1 = (temp - x) * 65536.0;
|
| temp = encoded.y / 65536.0;
| float y = floor(temp);
| float encodedFloat2 = (temp - y) * 65536.0;
|
| vector1 = czm_octDecode(encodedFloat1);
| vector2 = czm_octDecode(encodedFloat2);
| vector3 = czm_octDecode(vec2(x, y));
| }
|
| `;var g1=`/**
| * Packs a depth value into a vec4 that can be represented by unsigned bytes.
| *
| * @name czm_packDepth
| * @glslFunction
| *
| * @param {float} depth The floating-point depth.
| * @returns {vec4} The packed depth.
| */
| vec4 czm_packDepth(float depth)
| {
| // See Aras Pranckevi\u010Dius' post Encoding Floats to RGBA
| // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/
| vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * depth;
| enc = fract(enc);
| enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);
| return enc;
| }
| `;var y1=`vec3 lambertianDiffuse(vec3 diffuseColor)
| {
| return diffuseColor / czm_pi;
| }
|
| vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)
| {
| float versine = 1.0 - VdotH;
| // pow(versine, 5.0) is slow. See https://stackoverflow.com/a/68793086/10082269
| float versineSquared = versine * versine;
| return f0 + (f90 - f0) * versineSquared * versineSquared * versine;
| }
|
| #ifdef USE_ANISOTROPY
| /**
| * @param {float} bitangentRoughness Material roughness (along the anisotropy bitangent)
| * @param {float} tangentialRoughness Anisotropic roughness (along the anisotropy tangent)
| * @param {vec3} lightDirection The direction from the fragment to the light source, transformed to tangent-bitangent-normal coordinates
| * @param {vec3} viewDirection The direction from the fragment to the camera, transformed to tangent-bitangent-normal coordinates
| */
| float smithVisibilityGGX_anisotropic(float bitangentRoughness, float tangentialRoughness, vec3 lightDirection, vec3 viewDirection)
| {
| vec3 roughnessScale = vec3(tangentialRoughness, bitangentRoughness, 1.0);
| float GGXV = lightDirection.z * length(roughnessScale * viewDirection);
| float GGXL = viewDirection.z * length(roughnessScale * lightDirection);
| float v = 0.5 / (GGXV + GGXL);
| return clamp(v, 0.0, 1.0);
| }
|
| /**
| * @param {float} bitangentRoughness Material roughness (along the anisotropy bitangent)
| * @param {float} tangentialRoughness Anisotropic roughness (along the anisotropy tangent)
| * @param {vec3} halfwayDirection The unit vector halfway between light and view directions, transformed to tangent-bitangent-normal coordinates
| */
| float GGX_anisotropic(float bitangentRoughness, float tangentialRoughness, vec3 halfwayDirection)
| {
| float roughnessSquared = bitangentRoughness * tangentialRoughness;
| vec3 f = halfwayDirection * vec3(bitangentRoughness, tangentialRoughness, roughnessSquared);
| float w2 = roughnessSquared / dot(f, f);
| return roughnessSquared * w2 * w2 / czm_pi;
| }
| #endif
|
| /**
| * Estimate the geometric self-shadowing of the microfacets in a surface,
| * using the Smith Joint GGX visibility function.
| * Note: Vis = G / (4 * NdotL * NdotV)
| * see Eric Heitz. 2014. Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs. Journal of Computer Graphics Techniques, 3
| * see Real-Time Rendering. Page 331 to 336.
| * see https://google.github.io/filament/Filament.md.html#materialsystem/specularbrdf/geometricshadowing(specularg)
| *
| * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
| * @param {float} NdotL The cosine of the angle between the surface normal and the direction to the light source.
| * @param {float} NdotV The cosine of the angle between the surface normal and the direction to the camera.
| */
| float smithVisibilityGGX(float alphaRoughness, float NdotL, float NdotV)
| {
| float alphaRoughnessSq = alphaRoughness * alphaRoughness;
|
| float GGXV = NdotL * sqrt(NdotV * NdotV * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
| float GGXL = NdotV * sqrt(NdotL * NdotL * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
|
| float GGX = GGXV + GGXL;
| if (GGX > 0.0)
| {
| return 0.5 / GGX;
| }
| return 0.0;
| }
|
| /**
| * Estimate the fraction of the microfacets in a surface that are aligned with
| * the halfway vector, which is aligned halfway between the directions from
| * the fragment to the camera and from the fragment to the light source.
| *
| * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
| * @param {float} NdotH The cosine of the angle between the surface normal and the halfway vector.
| * @return {float} The fraction of microfacets aligned to the halfway vector.
| */
| float GGX(float alphaRoughness, float NdotH)
| {
| float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
| float f = (NdotH * alphaRoughnessSquared - NdotH) * NdotH + 1.0;
| return alphaRoughnessSquared / (czm_pi * f * f);
| }
|
| /**
| * Compute the strength of the specular reflection due to direct lighting.
| *
| * @param {vec3} normal The surface normal.
| * @param {vec3} lightDirection The unit vector pointing from the fragment to the light source.
| * @param {vec3} viewDirection The unit vector pointing from the fragment to the camera.
| * @param {vec3} halfwayDirection The unit vector pointing from the fragment to halfway between the light source and the camera.
| * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
| * @return {float} The strength of the specular reflection.
| */
| float computeDirectSpecularStrength(vec3 normal, vec3 lightDirection, vec3 viewDirection, vec3 halfwayDirection, float alphaRoughness)
| {
| float NdotL = clamp(dot(normal, lightDirection), 0.0, 1.0);
| float NdotV = clamp(dot(normal, viewDirection), 0.0, 1.0);
| float G = smithVisibilityGGX(alphaRoughness, NdotL, NdotV);
| float NdotH = clamp(dot(normal, halfwayDirection), 0.0, 1.0);
| float D = GGX(alphaRoughness, NdotH);
| return G * D;
| }
|
| /**
| * Compute the diffuse and specular contributions using physically based
| * rendering. This function only handles direct lighting.
| * <p>
| * This function only handles the lighting calculations. Metallic/roughness
| * and specular/glossy must be handled separately. See {@MaterialStageFS}
| * </p>
| *
| * @name czm_pbrLighting
| * @glslFunction
| *
| * @param {vec3} viewDirectionEC Unit vector pointing from the fragment to the eye position
| * @param {vec3} normalEC The surface normal in eye coordinates
| * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
| * @param {czm_modelMaterial} The material properties.
| * @return {vec3} The computed HDR color
| */
| vec3 czm_pbrLighting(vec3 viewDirectionEC, vec3 normalEC, vec3 lightDirectionEC, czm_modelMaterial material)
| {
| vec3 halfwayDirectionEC = normalize(viewDirectionEC + lightDirectionEC);
| float VdotH = clamp(dot(viewDirectionEC, halfwayDirectionEC), 0.0, 1.0);
| float NdotL = clamp(dot(normalEC, lightDirectionEC), 0.001, 1.0);
|
| vec3 f0 = material.specular;
| float reflectance = czm_maximumComponent(f0);
| // Typical dielectrics will have reflectance 0.04, so f90 will be 1.0.
| // In this case, at grazing angle, all incident energy is reflected.
| vec3 f90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));
| vec3 F = fresnelSchlick2(f0, f90, VdotH);
|
| #if defined(USE_SPECULAR)
| F *= material.specularWeight;
| #endif
|
| float alphaRoughness = material.roughness * material.roughness;
| #ifdef USE_ANISOTROPY
| mat3 tbn = mat3(material.anisotropicT, material.anisotropicB, normalEC);
| vec3 lightDirection = lightDirectionEC * tbn;
| vec3 viewDirection = viewDirectionEC * tbn;
| vec3 halfwayDirection = halfwayDirectionEC * tbn;
| float anisotropyStrength = material.anisotropyStrength;
| float tangentialRoughness = mix(alphaRoughness, 1.0, anisotropyStrength * anisotropyStrength);
| float bitangentRoughness = clamp(alphaRoughness, 0.001, 1.0);
| float G = smithVisibilityGGX_anisotropic(bitangentRoughness, tangentialRoughness, lightDirection, viewDirection);
| float D = GGX_anisotropic(bitangentRoughness, tangentialRoughness, halfwayDirection);
| vec3 specularContribution = F * G * D;
| #else
| float specularStrength = computeDirectSpecularStrength(normalEC, lightDirectionEC, viewDirectionEC, halfwayDirectionEC, alphaRoughness);
| vec3 specularContribution = F * specularStrength;
| #endif
|
| vec3 diffuseColor = material.diffuse;
| // F here represents the specular contribution
| vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);
|
| // Lo = (diffuse + specular) * Li * NdotL
| return (diffuseContribution + specularContribution) * NdotL;
| }
| `;var b1=`// KhronosGroup https://github.com/KhronosGroup/ToneMapping/tree/main/PBR_Neutral
|
| // Input color is non-negative and resides in the Linear Rec. 709 color space.
| // Output color is also Linear Rec. 709, but in the [0, 1] range.
|
| vec3 czm_pbrNeutralTonemapping(vec3 color) {
| const float startCompression = 0.8 - 0.04;
| const float desaturation = 0.15;
|
| float x = min(color.r, min(color.g, color.b));
| float offset = czm_branchFreeTernary(x < 0.08, x - 6.25 * x * x, 0.04);
| color -= offset;
|
| float peak = max(color.r, max(color.g, color.b));
| if (peak < startCompression) return color;
|
| const float d = 1.0 - startCompression;
| float newPeak = 1.0 - d * d / (peak + d - startCompression);
| color *= newPeak / peak;
|
| float g = 1.0 - 1.0 / (desaturation * (peak - newPeak) + 1.0);
| return mix(color, newPeak * vec3(1.0, 1.0, 1.0), g);
| }
| `;var x1=`float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)
| {
| return czm_getLambertDiffuse(lightDirectionEC, material.normal);
| }
|
| float czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)
| {
| return czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);
| }
|
| /**
| * Computes a color using the Phong lighting model.
| *
| * @name czm_phong
| * @glslFunction
| *
| * @param {vec3} toEye A normalized vector from the fragment to the eye in eye coordinates.
| * @param {czm_material} material The fragment's material.
| *
| * @returns {vec4} The computed color.
| *
| * @example
| * vec3 positionToEyeEC = // ...
| * czm_material material = // ...
| * vec3 lightDirectionEC = // ...
| * out_FragColor = czm_phong(normalize(positionToEyeEC), material, lightDirectionEC);
| *
| * @see czm_getMaterial
| */
| vec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)
| {
| // Diffuse from directional light sources at eye (for top-down)
| float diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);
| if (czm_sceneMode == czm_sceneMode3D) {
| // (and horizon views in 3D)
| diffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);
| }
|
| float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);
|
| // Temporary workaround for adding ambient.
| vec3 materialDiffuse = material.diffuse * 0.5;
|
| vec3 ambient = materialDiffuse;
| vec3 color = ambient + material.emission;
| color += materialDiffuse * diffuse * czm_lightColor;
| color += material.specular * specular * czm_lightColor;
|
| return vec4(color, material.alpha);
| }
|
| vec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)
| {
| float diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);
| float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);
|
| vec3 ambient = vec3(0.0);
| vec3 color = ambient + material.emission;
| color += material.diffuse * diffuse * czm_lightColor;
| color += material.specular * specular * czm_lightColor;
|
| return vec4(color, material.alpha);
| }
| `;var T1=`/**
| * Computes distance from a point to a plane.
| *
| * @name czm_planeDistance
| * @glslFunction
| *
| * param {vec4} plane A Plane in Hessian Normal Form. See Plane.js
| * param {vec3} point A point in the same space as the plane.
| * returns {float} The distance from the point to the plane.
| */
| float czm_planeDistance(vec4 plane, vec3 point) {
| return (dot(plane.xyz, point) + plane.w);
| }
|
| /**
| * Computes distance from a point to a plane.
| *
| * @name czm_planeDistance
| * @glslFunction
| *
| * param {vec3} planeNormal Normal for a plane in Hessian Normal Form. See Plane.js
| * param {float} planeDistance Distance for a plane in Hessian Normal form. See Plane.js
| * param {vec3} point A point in the same space as the plane.
| * returns {float} The distance from the point to the plane.
| */
| float czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {
| return (dot(planeNormal, point) + planeDistance);
| }
| `;var C1=`/**
| * Computes the point along a ray at the given time. <code>time</code> can be positive, negative, or zero.
| *
| * @name czm_pointAlongRay
| * @glslFunction
| *
| * @param {czm_ray} ray The ray to compute the point along.
| * @param {float} time The time along the ray.
| *
| * @returns {vec3} The point along the ray at the given time.
| *
| * @example
| * czm_ray ray = czm_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)); // origin, direction
| * vec3 v = czm_pointAlongRay(ray, 2.0); // (2.0, 0.0, 0.0)
| */
| vec3 czm_pointAlongRay(czm_ray ray, float time)
| {
| return ray.origin + (time * ray.direction);
| }
| `;var E1=`/**
| * DOC_TBA
| *
| * @name czm_rayEllipsoidIntersectionInterval
| * @glslFunction
| */
| czm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_center, vec3 ellipsoid_inverseRadii)
| {
| // ray and ellipsoid center in eye coordinates. radii in model coordinates.
| vec3 q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;
| vec3 w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;
|
| q = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ellipsoid_center, 1.0)).xyz;
|
| float q2 = dot(q, q);
| float qw = dot(q, w);
|
| if (q2 > 1.0) // Outside ellipsoid.
| {
| if (qw >= 0.0) // Looking outward or tangent (0 intersections).
| {
| return czm_emptyRaySegment;
| }
| else // qw < 0.0.
| {
| float qw2 = qw * qw;
| float difference = q2 - 1.0; // Positively valued.
| float w2 = dot(w, w);
| float product = w2 * difference;
|
| if (qw2 < product) // Imaginary roots (0 intersections).
| {
| return czm_emptyRaySegment;
| }
| else if (qw2 > product) // Distinct roots (2 intersections).
| {
| float discriminant = qw * qw - product;
| float temp = -qw + sqrt(discriminant); // Avoid cancellation.
| float root0 = temp / w2;
| float root1 = difference / temp;
| if (root0 < root1)
| {
| czm_raySegment i = czm_raySegment(root0, root1);
| return i;
| }
| else
| {
| czm_raySegment i = czm_raySegment(root1, root0);
| return i;
| }
| }
| else // qw2 == product. Repeated roots (2 intersections).
| {
| float root = sqrt(difference / w2);
| czm_raySegment i = czm_raySegment(root, root);
| return i;
| }
| }
| }
| else if (q2 < 1.0) // Inside ellipsoid (2 intersections).
| {
| float difference = q2 - 1.0; // Negatively valued.
| float w2 = dot(w, w);
| float product = w2 * difference; // Negatively valued.
| float discriminant = qw * qw - product;
| float temp = -qw + sqrt(discriminant); // Positively valued.
| czm_raySegment i = czm_raySegment(0.0, temp / w2);
| return i;
| }
| else // q2 == 1.0. On ellipsoid.
| {
| if (qw < 0.0) // Looking inward.
| {
| float w2 = dot(w, w);
| czm_raySegment i = czm_raySegment(0.0, -qw / w2);
| return i;
| }
| else // qw >= 0.0. Looking outward or tangent.
| {
| return czm_emptyRaySegment;
| }
| }
| }
| `;var w1=`/**
| * Compute the intersection interval of a ray with a sphere.
| *
| * @name czm_raySphereIntersectionInterval
| * @glslFunction
| *
| * @param {czm_ray} ray The ray.
| * @param {vec3} center The center of the sphere.
| * @param {float} radius The radius of the sphere.
| * @return {czm_raySegment} The intersection interval of the ray with the sphere.
| */
| czm_raySegment czm_raySphereIntersectionInterval(czm_ray ray, vec3 center, float radius)
| {
| vec3 o = ray.origin;
| vec3 d = ray.direction;
|
| vec3 oc = o - center;
|
| float a = dot(d, d);
| float b = 2.0 * dot(d, oc);
| float c = dot(oc, oc) - (radius * radius);
|
| float det = (b * b) - (4.0 * a * c);
|
| if (det < 0.0) {
| return czm_emptyRaySegment;
| }
|
| float sqrtDet = sqrt(det);
|
| float t0 = (-b - sqrtDet) / (2.0 * a);
| float t1 = (-b + sqrtDet) / (2.0 * a);
|
| czm_raySegment result = czm_raySegment(t0, t1);
| return result;
| }
| `;var S1=`float czm_readDepth(sampler2D depthTexture, vec2 texCoords)
| {
| return czm_reverseLogDepth(texture(depthTexture, texCoords).r);
| }
| `;var A1=`/**
| * Reads a value previously transformed with {@link czm_writeNonPerspective}
| * by dividing it by \`w\`, the value used in the perspective divide.
| * This function is intended to be called in a fragment shader to access a
| * \`varying\` that should not be subject to perspective interpolation.
| * For example, screen-space texture coordinates. The value should have been
| * previously written in the vertex shader with a call to
| * {@link czm_writeNonPerspective}.
| *
| * @name czm_readNonPerspective
| * @glslFunction
| *
| * @param {float|vec2|vec3|vec4} value The non-perspective value to be read.
| * @param {float} oneOverW One over the perspective divide value, \`w\`. Usually this is simply \`gl_FragCoord.w\`.
| * @returns {float|vec2|vec3|vec4} The usable value.
| */
| float czm_readNonPerspective(float value, float oneOverW) {
| return value * oneOverW;
| }
|
| vec2 czm_readNonPerspective(vec2 value, float oneOverW) {
| return value * oneOverW;
| }
|
| vec3 czm_readNonPerspective(vec3 value, float oneOverW) {
| return value * oneOverW;
| }
|
| vec4 czm_readNonPerspective(vec4 value, float oneOverW) {
| return value * oneOverW;
| }
| `;var v1=`float czm_reverseLogDepth(float logZ)
| {
| #ifdef LOG_DEPTH
| float near = czm_currentFrustum.x;
| float far = czm_currentFrustum.y;
| float log2Depth = logZ * czm_log2FarDepthFromNearPlusOne;
| float depthFromNear = pow(2.0, log2Depth) - 1.0;
| return far * (1.0 - near / (depthFromNear + near)) / (far - near);
| #endif
| return logZ;
| }
| `;var D1=`/**
| * Round a floating point value. This function exists because round() doesn't
| * exist in GLSL 1.00.
| *
| * @param {float|vec2|vec3|vec4} value The value to round
| * @param {float|vec2|vec3|vec3} The rounded value. The type matches the input.
| */
| float czm_round(float value) {
| return floor(value + 0.5);
| }
|
| vec2 czm_round(vec2 value) {
| return floor(value + 0.5);
| }
|
| vec3 czm_round(vec3 value) {
| return floor(value + 0.5);
| }
|
| vec4 czm_round(vec4 value) {
| return floor(value + 0.5);
| }
| `;var I1=`/**
| * Adjusts the saturation of a color.
| *
| * @name czm_saturation
| * @glslFunction
| *
| * @param {vec3} rgb The color.
| * @param {float} adjustment The amount to adjust the saturation of the color.
| *
| * @returns {float} The color with the saturation adjusted.
| *
| * @example
| * vec3 greyScale = czm_saturation(color, 0.0);
| * vec3 doubleSaturation = czm_saturation(color, 2.0);
| */
| vec3 czm_saturation(vec3 rgb, float adjustment)
| {
| // Algorithm from Chapter 16 of OpenGL Shading Language
| const vec3 W = vec3(0.2125, 0.7154, 0.0721);
| vec3 intensity = vec3(dot(rgb, W));
| return mix(intensity, rgb, adjustment);
| }
| `;var O1=`
| float czm_sampleShadowMap(highp samplerCube shadowMap, vec3 d)
| {
| return czm_unpackDepth(czm_textureCube(shadowMap, d));
| }
|
| float czm_sampleShadowMap(highp sampler2D shadowMap, vec2 uv)
| {
| #ifdef USE_SHADOW_DEPTH_TEXTURE
| return texture(shadowMap, uv).r;
| #else
| return czm_unpackDepth(texture(shadowMap, uv));
| #endif
| }
|
| float czm_shadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)
| {
| return step(depth, czm_sampleShadowMap(shadowMap, uv));
| }
|
| float czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)
| {
| return step(depth, czm_sampleShadowMap(shadowMap, uv));
| }
| `;var P1=`
| float czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)
| {
| #ifdef USE_NORMAL_SHADING
| #ifdef USE_NORMAL_SHADING_SMOOTH
| float strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);
| #else
| float strength = step(0.0, nDotL);
| #endif
| visibility *= strength;
| #endif
|
| visibility = max(visibility, darkness);
| return visibility;
| }
|
| #ifdef USE_CUBE_MAP_SHADOW
| float czm_shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)
| {
| float depthBias = shadowParameters.depthBias;
| float depth = shadowParameters.depth;
| float nDotL = shadowParameters.nDotL;
| float normalShadingSmooth = shadowParameters.normalShadingSmooth;
| float darkness = shadowParameters.darkness;
| vec3 uvw = shadowParameters.texCoords;
|
| depth -= depthBias;
| float visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);
| return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);
| }
| #else
| float czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)
| {
| float depthBias = shadowParameters.depthBias;
| float depth = shadowParameters.depth;
| float nDotL = shadowParameters.nDotL;
| float normalShadingSmooth = shadowParameters.normalShadingSmooth;
| float darkness = shadowParameters.darkness;
| vec2 uv = shadowParameters.texCoords;
|
| depth -= depthBias;
| #ifdef USE_SOFT_SHADOWS
| vec2 texelStepSize = shadowParameters.texelStepSize;
| float radius = 1.0;
| float dx0 = -texelStepSize.x * radius;
| float dy0 = -texelStepSize.y * radius;
| float dx1 = texelStepSize.x * radius;
| float dy1 = texelStepSize.y * radius;
| float visibility = (
| czm_shadowDepthCompare(shadowMap, uv, depth) +
| czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +
| czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +
| czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +
| czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +
| czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +
| czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +
| czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +
| czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)
| ) * (1.0 / 9.0);
| #else
| float visibility = czm_shadowDepthCompare(shadowMap, uv, depth);
| #endif
|
| return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);
| }
| #endif
| `;var R1=`/**
| * Returns 1.0 if the given value is positive or zero, and -1.0 if it is negative. This is similar to the GLSL
| * built-in function <code>sign</code> except that returns 1.0 instead of 0.0 when the input value is 0.0.
| *
| * @name czm_signNotZero
| * @glslFunction
| *
| * @param {} value The value for which to determine the sign.
| * @returns {} 1.0 if the value is positive or zero, -1.0 if the value is negative.
| */
| float czm_signNotZero(float value)
| {
| return value >= 0.0 ? 1.0 : -1.0;
| }
|
| vec2 czm_signNotZero(vec2 value)
| {
| return vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));
| }
|
| vec3 czm_signNotZero(vec3 value)
| {
| return vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));
| }
|
| vec4 czm_signNotZero(vec4 value)
| {
| return vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));
| }
| `;var M1=`/**
| * Computes a color from the third order spherical harmonic coefficients and a normalized direction vector.
| * <p>
| * The order of the coefficients is [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22].
| * </p>
| *
| * @name czm_sphericalHarmonics
| * @glslFunction
| *
| * @param {vec3} normal The normalized direction.
| * @param {vec3[9]} coefficients The third order spherical harmonic coefficients.
| * @returns {vec3} The color at the direction.
| *
| * @see https://graphics.stanford.edu/papers/envmap/envmap.pdf
| */
| vec3 czm_sphericalHarmonics(vec3 normal, vec3 coefficients[9])
| {
| vec3 L00 = coefficients[0];
| vec3 L1_1 = coefficients[1];
| vec3 L10 = coefficients[2];
| vec3 L11 = coefficients[3];
| vec3 L2_2 = coefficients[4];
| vec3 L2_1 = coefficients[5];
| vec3 L20 = coefficients[6];
| vec3 L21 = coefficients[7];
| vec3 L22 = coefficients[8];
|
| float x = normal.x;
| float y = normal.y;
| float z = normal.z;
|
| vec3 L =
| L00
| + L1_1 * y
| + L10 * z
| + L11 * x
| + L2_2 * (y * x)
| + L2_1 * (y * z)
| + L20 * (3.0 * z * z - 1.0)
| + L21 * (z * x)
| + L22 * (x * x - y * y);
|
| return max(L, vec3(0.0));
| }
| `;var L1=`/**
| * Converts an sRGB color to a linear RGB color.
| *
| * @param {vec3|vec4} srgbIn The color in sRGB space
| * @returns {vec3|vec4} The color in linear color space. The vector type matches the input.
| */
| vec3 czm_srgbToLinear(vec3 srgbIn)
| {
| return pow(srgbIn, vec3(2.2));
| }
|
| vec4 czm_srgbToLinear(vec4 srgbIn)
| {
| vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));
| return vec4(linearOut, srgbIn.a);
| }
| `;var N1=`/**
| * Creates a matrix that transforms vectors from tangent space to eye space.
| *
| * @name czm_tangentToEyeSpaceMatrix
| * @glslFunction
| *
| * @param {vec3} normalEC The normal vector in eye coordinates.
| * @param {vec3} tangentEC The tangent vector in eye coordinates.
| * @param {vec3} bitangentEC The bitangent vector in eye coordinates.
| *
| * @returns {mat3} The matrix that transforms from tangent space to eye space.
| *
| * @example
| * mat3 tangentToEye = czm_tangentToEyeSpaceMatrix(normalEC, tangentEC, bitangentEC);
| * vec3 normal = tangentToEye * texture(normalMap, st).xyz;
| */
| mat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)
| {
| vec3 normal = normalize(normalEC);
| vec3 tangent = normalize(tangentEC);
| vec3 bitangent = normalize(bitangentEC);
| return mat3(tangent.x , tangent.y , tangent.z,
| bitangent.x, bitangent.y, bitangent.z,
| normal.x , normal.y , normal.z);
| }
| `;var F1=`/**
| * A wrapper around the texture (WebGL2) / textureCube (WebGL1)
| * function to allow for WebGL 1 support.
| *
| * @name czm_textureCube
| * @glslFunction
| *
| * @param {samplerCube} sampler The sampler.
| * @param {vec3} p The coordinate at which to sample the texture.
| */
| vec4 czm_textureCube(samplerCube sampler, vec3 p) {
| #if __VERSION__ == 300
| return texture(sampler, p);
| #else
| return textureCube(sampler, p);
| #endif
| }
|
| /**
| * A wrapper around the textureLod (WebGL2) / textureCube (WebGL1)
| * function to allow for WebGL 1 support in fragment shaders.
| *
| * @name czm_textureCubeLod
| * @glslFunction
| *
| * @param {samplerCube} sampler The sampler.
| * @param {vec3} p The coordinate at which to sample the texture.
| * @param {float} lod The mipmap level from which to sample.
| */
| vec4 czm_textureCube(samplerCube sampler, vec3 p, float lod) {
| #if __VERSION__ == 300
| return textureLod(sampler, p, lod);
| #elif defined(GL_EXT_shader_texture_lod)
| return textureCubeLodEXT(sampler, p, lod);
| #endif
| }`;var B1=`/**
| * Transforms a plane.
| *
| * @name czm_transformPlane
| * @glslFunction
| *
| * @param {vec4} plane The plane in Hessian Normal Form.
| * @param {mat4} transform The inverse-transpose of a transformation matrix.
| */
| vec4 czm_transformPlane(vec4 plane, mat4 transform) {
| vec4 transformedPlane = transform * plane;
| // Convert the transformed plane to Hessian Normal Form
| float normalMagnitude = length(transformedPlane.xyz);
| return transformedPlane / normalMagnitude;
| }
| `;var k1=`/**
| * Translates a position (or any <code>vec3</code>) that was encoded with {@link EncodedCartesian3},
| * and then provided to the shader as separate <code>high</code> and <code>low</code> bits to
| * be relative to the eye. As shown in the example, the position can then be transformed in eye
| * or clip coordinates using {@link czm_modelViewRelativeToEye} or {@link czm_modelViewProjectionRelativeToEye},
| * respectively.
| * <p>
| * This technique, called GPU RTE, eliminates jittering artifacts when using large coordinates as
| * described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
| * </p>
| *
| * @name czm_translateRelativeToEye
| * @glslFunction
| *
| * @param {vec3} high The position's high bits.
| * @param {vec3} low The position's low bits.
| * @returns {vec3} The position translated to be relative to the camera's position.
| *
| * @example
| * in vec3 positionHigh;
| * in vec3 positionLow;
| *
| * void main()
| * {
| * vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
| * gl_Position = czm_modelViewProjectionRelativeToEye * p;
| * }
| *
| * @see czm_modelViewRelativeToEye
| * @see czm_modelViewProjectionRelativeToEye
| * @see czm_computePosition
| * @see EncodedCartesian3
| */
| vec4 czm_translateRelativeToEye(vec3 high, vec3 low)
| {
| vec3 highDifference = high - czm_encodedCameraPositionMCHigh;
| // This check handles the case when NaN values have gotten into \`highDifference\`.
| // Such a thing could happen on devices running iOS.
| if (length(highDifference) == 0.0) {
| highDifference = vec3(0);
| }
| vec3 lowDifference = low - czm_encodedCameraPositionMCLow;
|
| return vec4(highDifference + lowDifference, 1.0);
| }
| `;var U1=`/**
| * @private
| */
| vec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)
| {
| // Diffuse from directional light sources at eye (for top-down and horizon views)
| float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);
|
| if (czm_sceneMode == czm_sceneMode3D) {
| // (and horizon views in 3D)
| diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);
| }
|
| diffuse = clamp(diffuse, 0.0, 1.0);
|
| float specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);
|
| // Temporary workaround for adding ambient.
| vec3 materialDiffuse = material.diffuse * 0.5;
|
| vec3 ambient = materialDiffuse;
| vec3 color = ambient + material.emission;
| color += materialDiffuse * diffuse * czm_lightColor;
| color += material.specular * specular * czm_lightColor;
|
| return vec4(color, material.alpha);
| }
| `;var z1=`/**
| * Returns the transpose of the matrix. The input <code>matrix</code> can be
| * a <code>mat2</code>, <code>mat3</code>, or <code>mat4</code>.
| *
| * @name czm_transpose
| * @glslFunction
| *
| * @param {} matrix The matrix to transpose.
| *
| * @returns {} The transposed matrix.
| *
| * @example
| * // GLSL declarations
| * mat2 czm_transpose(mat2 matrix);
| * mat3 czm_transpose(mat3 matrix);
| * mat4 czm_transpose(mat4 matrix);
| *
| * // Transpose a 3x3 rotation matrix to find its inverse.
| * mat3 eastNorthUpToEye = czm_eastNorthUpToEyeCoordinates(
| * positionMC, normalEC);
| * mat3 eyeToEastNorthUp = czm_transpose(eastNorthUpToEye);
| */
| mat2 czm_transpose(mat2 matrix)
| {
| return mat2(
| matrix[0][0], matrix[1][0],
| matrix[0][1], matrix[1][1]);
| }
|
| mat3 czm_transpose(mat3 matrix)
| {
| return mat3(
| matrix[0][0], matrix[1][0], matrix[2][0],
| matrix[0][1], matrix[1][1], matrix[2][1],
| matrix[0][2], matrix[1][2], matrix[2][2]);
| }
|
| mat4 czm_transpose(mat4 matrix)
| {
| return mat4(
| matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],
| matrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],
| matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],
| matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);
| }
| `;var V1=`vec2 getLookupUv(vec2 dimensions, int i) {
| int pixY = i / int(dimensions.x);
| int pixX = i - (pixY * int(dimensions.x));
| float pixelWidth = 1.0 / dimensions.x;
| float pixelHeight = 1.0 / dimensions.y;
| float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
| float v = (float(pixY) + 0.5) * pixelHeight;
| return vec2(u, v);
| }
|
| vec4 czm_unpackClippingExtents(highp sampler2D extentsTexture, int index) {
| vec2 textureDimensions = vec2(textureSize(extentsTexture, 0));
| return texture(extentsTexture, getLookupUv(textureDimensions, index));
| }`;var H1=`/**
| * Unpacks a vec4 depth value to a float in [0, 1) range.
| *
| * @name czm_unpackDepth
| * @glslFunction
| *
| * @param {vec4} packedDepth The packed depth.
| *
| * @returns {float} The floating-point depth in [0, 1) range.
| */
| float czm_unpackDepth(vec4 packedDepth)
| {
| // See Aras Pranckevi\u010Dius' post Encoding Floats to RGBA
| // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/
| return dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));
| }
| `;var G1=`/**
| * Unpack an IEEE 754 single-precision float that is packed as a little-endian unsigned normalized vec4.
| *
| * @name czm_unpackFloat
| * @glslFunction
| *
| * @param {vec4} packedFloat The packed float.
| *
| * @returns {float} The floating-point depth in arbitrary range.
| */
| float czm_unpackFloat(vec4 packedFloat)
| {
| // Convert to [0.0, 255.0] and round to integer
| packedFloat = floor(packedFloat * 255.0 + 0.5);
| float sign = 1.0 - step(128.0, packedFloat[3]) * 2.0;
| float exponent = 2.0 * mod(packedFloat[3], 128.0) + step(128.0, packedFloat[2]) - 127.0;
| if (exponent == -127.0)
| {
| return 0.0;
| }
| float mantissa = mod(packedFloat[2], 128.0) * 65536.0 + packedFloat[1] * 256.0 + packedFloat[0] + float(0x800000);
| float result = sign * exp2(exponent - 23.0) * mantissa;
| return result;
| }
| `;var j1=`/**
| * Unpack unsigned integers of 1-4 bytes. in WebGL 1, there is no uint type,
| * so the return value is an int.
| * <p>
| * There are also precision limitations in WebGL 1. highp int is still limited
| * to 24 bits. Above the value of 2^24 = 16777216, precision loss may occur.
| * </p>
| *
| * @param {float|vec2|vec3|vec4} packed The packed value. For vectors, the components are listed in little-endian order.
| *
| * @return {int} The unpacked value.
| */
| int czm_unpackUint(float packedValue) {
| float rounded = czm_round(packedValue * 255.0);
| return int(rounded);
| }
|
| int czm_unpackUint(vec2 packedValue) {
| vec2 rounded = czm_round(packedValue * 255.0);
| return int(dot(rounded, vec2(1.0, 256.0)));
| }
|
| int czm_unpackUint(vec3 packedValue) {
| vec3 rounded = czm_round(packedValue * 255.0);
| return int(dot(rounded, vec3(1.0, 256.0, 65536.0)));
| }
|
| int czm_unpackUint(vec4 packedValue) {
| vec4 rounded = czm_round(packedValue * 255.0);
| return int(dot(rounded, vec4(1.0, 256.0, 65536.0, 16777216.0)));
| }
| `;var W1=`/**
| * Transform metadata values following the EXT_structural_metadata spec
| * by multiplying by scale and adding the offset. Operations are always
| * performed component-wise, even for matrices.
| *
| * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} offset The offset to add
| * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} scale The scale factor to multiply
| * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} value The original value.
| *
| * @return {float|vec2|vec3|vec4|mat2|mat3|mat4} The transformed value of the same scalar/vector/matrix type as the input.
| */
| float czm_valueTransform(float offset, float scale, float value) {
| return scale * value + offset;
| }
|
| vec2 czm_valueTransform(vec2 offset, vec2 scale, vec2 value) {
| return scale * value + offset;
| }
|
| vec3 czm_valueTransform(vec3 offset, vec3 scale, vec3 value) {
| return scale * value + offset;
| }
|
| vec4 czm_valueTransform(vec4 offset, vec4 scale, vec4 value) {
| return scale * value + offset;
| }
|
| mat2 czm_valueTransform(mat2 offset, mat2 scale, mat2 value) {
| return matrixCompMult(scale, value) + offset;
| }
|
| mat3 czm_valueTransform(mat3 offset, mat3 scale, mat3 value) {
| return matrixCompMult(scale, value) + offset;
| }
|
| mat4 czm_valueTransform(mat4 offset, mat4 scale, mat4 value) {
| return matrixCompMult(scale, value) + offset;
| }
| `;var q1=`#ifdef LOG_DEPTH
| // 1.0 at the near plane, increasing linearly from there.
| out float v_depthFromNearPlusOne;
| #ifdef SHADOW_MAP
| out vec3 v_logPositionEC;
| #endif
| #endif
|
| vec4 czm_updatePositionDepth(vec4 coords) {
| #if defined(LOG_DEPTH)
|
| #ifdef SHADOW_MAP
| vec3 logPositionEC = (czm_inverseProjection * coords).xyz;
| v_logPositionEC = logPositionEC;
| #endif
|
| // With the very high far/near ratios used with the logarithmic depth
| // buffer, floating point rounding errors can cause linear depth values
| // to end up on the wrong side of the far plane, even for vertices that
| // are really nowhere near it. Since we always write a correct logarithmic
| // depth value in the fragment shader anyway, we just need to make sure
| // such errors don't cause the primitive to be clipped entirely before
| // we even get to the fragment shader.
| coords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;
| #endif
|
| return coords;
| }
|
| /**
| * Writes the logarithmic depth to gl_Position using the already computed gl_Position.
| *
| * @name czm_vertexLogDepth
| * @glslFunction
| */
| void czm_vertexLogDepth()
| {
| #ifdef LOG_DEPTH
| v_depthFromNearPlusOne = (gl_Position.w - czm_currentFrustum.x) + 1.0;
| gl_Position = czm_updatePositionDepth(gl_Position);
| #endif
| }
|
| /**
| * Writes the logarithmic depth to gl_Position using the provided clip coordinates.
| * <p>
| * An example use case for this function would be moving the vertex in window coordinates
| * before converting back to clip coordinates. Use the original vertex clip coordinates.
| * </p>
| * @name czm_vertexLogDepth
| * @glslFunction
| *
| * @param {vec4} clipCoords The vertex in clip coordinates.
| *
| * @example
| * czm_vertexLogDepth(czm_projection * vec4(positionEyeCoordinates, 1.0));
| */
| void czm_vertexLogDepth(vec4 clipCoords)
| {
| #ifdef LOG_DEPTH
| v_depthFromNearPlusOne = (clipCoords.w - czm_currentFrustum.x) + 1.0;
| czm_updatePositionDepth(clipCoords);
| #endif
| }
| `;var Y1=`vec4 czm_screenToEyeCoordinates(vec4 screenCoordinate)
| {
| // Reconstruct NDC coordinates
| float x = 2.0 * screenCoordinate.x - 1.0;
| float y = 2.0 * screenCoordinate.y - 1.0;
| float z = (screenCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];
| vec4 q = vec4(x, y, z, 1.0);
|
| // Reverse the perspective division to obtain clip coordinates.
| q /= screenCoordinate.w;
|
| // Reverse the projection transformation to obtain eye coordinates.
| if (!(czm_inverseProjection == mat4(0.0))) // IE and Edge sometimes do something weird with != between mat4s
| {
| q = czm_inverseProjection * q;
| }
| else
| {
| float top = czm_frustumPlanes.x;
| float bottom = czm_frustumPlanes.y;
| float left = czm_frustumPlanes.z;
| float right = czm_frustumPlanes.w;
|
| float near = czm_currentFrustum.x;
| float far = czm_currentFrustum.y;
|
| q.x = (q.x * (right - left) + left + right) * 0.5;
| q.y = (q.y * (top - bottom) + bottom + top) * 0.5;
| q.z = (q.z * (near - far) - near - far) * 0.5;
| q.w = 1.0;
| }
|
| return q;
| }
|
| /**
| * Transforms a position from window to eye coordinates.
| * The transform from window to normalized device coordinates is done using components
| * of (@link czm_viewport} and {@link czm_viewportTransformation} instead of calculating
| * the inverse of <code>czm_viewportTransformation</code>. The transformation from
| * normalized device coordinates to clip coordinates is done using <code>fragmentCoordinate.w</code>,
| * which is expected to be the scalar used in the perspective divide. The transformation
| * from clip to eye coordinates is done using {@link czm_inverseProjection}.
| *
| * @name czm_windowToEyeCoordinates
| * @glslFunction
| *
| * @param {vec4} fragmentCoordinate The position in window coordinates to transform.
| *
| * @returns {vec4} The transformed position in eye coordinates.
| *
| * @see czm_modelToWindowCoordinates
| * @see czm_eyeToWindowCoordinates
| * @see czm_inverseProjection
| * @see czm_viewport
| * @see czm_viewportTransformation
| *
| * @example
| * vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);
| */
| vec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate)
| {
| vec2 screenCoordXY = (fragmentCoordinate.xy - czm_viewport.xy) / czm_viewport.zw;
| return czm_screenToEyeCoordinates(vec4(screenCoordXY, fragmentCoordinate.zw));
| }
|
| vec4 czm_screenToEyeCoordinates(vec2 screenCoordinateXY, float depthOrLogDepth)
| {
| // See reverseLogDepth.glsl. This is separate to re-use the pow.
| #if defined(LOG_DEPTH) || defined(LOG_DEPTH_READ_ONLY)
| float near = czm_currentFrustum.x;
| float far = czm_currentFrustum.y;
| float log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;
| float depthFromNear = exp2(log2Depth) - 1.0;
| float depthFromCamera = depthFromNear + near;
| vec4 screenCoord = vec4(screenCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);
| vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);
| eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision
| return eyeCoordinate;
| #else
| vec4 screenCoord = vec4(screenCoordinateXY, depthOrLogDepth, 1.0);
| vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);
| #endif
| return eyeCoordinate;
| }
|
| /**
| * Transforms a position given as window x/y and a depth or a log depth from window to eye coordinates.
| * This function produces more accurate results for window positions with log depth than
| * conventionally unpacking the log depth using czm_reverseLogDepth and using the standard version
| * of czm_windowToEyeCoordinates.
| *
| * @name czm_windowToEyeCoordinates
| * @glslFunction
| *
| * @param {vec2} fragmentCoordinateXY The XY position in window coordinates to transform.
| * @param {float} depthOrLogDepth A depth or log depth for the fragment.
| *
| * @see czm_modelToWindowCoordinates
| * @see czm_eyeToWindowCoordinates
| * @see czm_inverseProjection
| * @see czm_viewport
| * @see czm_viewportTransformation
| *
| * @returns {vec4} The transformed position in eye coordinates.
| */
| vec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth)
| {
| vec2 screenCoordXY = (fragmentCoordinateXY.xy - czm_viewport.xy) / czm_viewport.zw;
| return czm_screenToEyeCoordinates(screenCoordXY, depthOrLogDepth);
| }
| `;var X1=`// emulated noperspective
| #if !defined(LOG_DEPTH)
| in float v_WindowZ;
| #endif
|
| /**
| * Emulates GL_DEPTH_CLAMP. Clamps a fragment to the near and far plane
| * by writing the fragment's depth. See czm_depthClamp for more details.
| *
| * @name czm_writeDepthClamp
| * @glslFunction
| *
| * @example
| * out_FragColor = color;
| * czm_writeDepthClamp();
| *
| * @see czm_depthClamp
| */
| void czm_writeDepthClamp()
| {
| #if (!defined(LOG_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
| gl_FragDepth = clamp(v_WindowZ * gl_FragCoord.w, 0.0, 1.0);
| #endif
| }
| `;var K1=`#ifdef LOG_DEPTH
| in float v_depthFromNearPlusOne;
|
| #ifdef POLYGON_OFFSET
| uniform vec2 u_polygonOffset;
| #endif
|
| #endif
|
| /**
| * Writes the fragment depth to the logarithmic depth buffer.
| * <p>
| * Use this when the vertex shader does not call {@link czm_vertexLogDepth}, for example, when
| * ray-casting geometry using a full screen quad.
| * </p>
| * @name czm_writeLogDepth
| * @glslFunction
| *
| * @param {float} depth The depth coordinate, where 1.0 is on the near plane and
| * depth increases in eye-space units from there
| *
| * @example
| * czm_writeLogDepth((czm_projection * v_positionEyeCoordinates).w + 1.0);
| */
| void czm_writeLogDepth(float depth)
| {
| #if (defined(LOG_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
| // Discard the vertex if it's not between the near and far planes.
| // We allow a bit of epsilon on the near plane comparison because a 1.0
| // from the vertex shader (indicating the vertex should be _on_ the near
| // plane) will not necessarily come here as exactly 1.0.
| if (depth <= 0.9999999 || depth > czm_farDepthFromNearPlusOne) {
| discard;
| }
|
| #ifdef POLYGON_OFFSET
| // Polygon offset: m * factor + r * units
| float factor = u_polygonOffset[0];
| float units = u_polygonOffset[1];
|
| #if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
| // This factor doesn't work in IE 10
| if (factor != 0.0) {
| // m = sqrt(dZdX^2 + dZdY^2);
| float x = dFdx(depth);
| float y = dFdy(depth);
| float m = sqrt(x * x + y * y);
|
| // Apply the factor before computing the log depth.
| depth += m * factor;
| }
| #endif
|
| #endif
|
| gl_FragDepth = log2(depth) * czm_oneOverLog2FarDepthFromNearPlusOne;
|
| #ifdef POLYGON_OFFSET
| // Apply the units after the log depth.
| gl_FragDepth += czm_epsilon7 * units;
| #endif
|
| #endif
| }
|
| /**
| * Writes the fragment depth to the logarithmic depth buffer.
| * <p>
| * Use this when the vertex shader calls {@link czm_vertexLogDepth}.
| * </p>
| *
| * @name czm_writeLogDepth
| * @glslFunction
| */
| void czm_writeLogDepth() {
| #ifdef LOG_DEPTH
| czm_writeLogDepth(v_depthFromNearPlusOne);
| #endif
| }
| `;var $1=`/**
| * Transforms a value for non-perspective interpolation by multiplying
| * it by w, the value used in the perspective divide. This function is
| * intended to be called in a vertex shader to compute the value of a
| * \`varying\` that should not be subject to perspective interpolation.
| * For example, screen-space texture coordinates. The fragment shader
| * must call {@link czm_readNonPerspective} to retrieve the final
| * non-perspective value.
| *
| * @name czm_writeNonPerspective
| * @glslFunction
| *
| * @param {float|vec2|vec3|vec4} value The value to be interpolated without accounting for perspective.
| * @param {float} w The perspective divide value. Usually this is the computed \`gl_Position.w\`.
| * @returns {float|vec2|vec3|vec4} The transformed value, intended to be stored in a \`varying\` and read in the
| * fragment shader with {@link czm_readNonPerspective}.
| */
| float czm_writeNonPerspective(float value, float w) {
| return value * w;
| }
|
| vec2 czm_writeNonPerspective(vec2 value, float w) {
| return value * w;
| }
|
| vec3 czm_writeNonPerspective(vec3 value, float w) {
| return value * w;
| }
|
| vec4 czm_writeNonPerspective(vec4 value, float w) {
| return value * w;
| }
| `;var Wx={czm_degreesPerRadian:EP,czm_depthRange:wP,czm_epsilon1:SP,czm_epsilon2:AP,czm_epsilon3:vP,czm_epsilon4:DP,czm_epsilon5:IP,czm_epsilon6:OP,czm_epsilon7:PP,czm_infinity:RP,czm_oneOverPi:MP,czm_oneOverTwoPi:LP,czm_passCesium3DTile:NP,czm_passCesium3DTileClassification:FP,czm_passCesium3DTileClassificationIgnoreShow:BP,czm_passClassification:kP,czm_passCompute:UP,czm_passEnvironment:zP,czm_passGlobe:VP,czm_passOpaque:HP,czm_passOverlay:GP,czm_passTerrainClassification:jP,czm_passTranslucent:WP,czm_passVoxels:qP,czm_pi:YP,czm_piOverFour:XP,czm_piOverSix:KP,czm_piOverThree:$P,czm_piOverTwo:ZP,czm_radiansPerDegree:JP,czm_sceneMode2D:QP,czm_sceneMode3D:eR,czm_sceneModeColumbusView:tR,czm_sceneModeMorphing:nR,czm_solarRadius:iR,czm_threePiOver2:oR,czm_twoPi:rR,czm_webMercatorMaxLatitude:sR,czm_depthRangeStruct:aR,czm_material:cR,czm_materialInput:lR,czm_modelMaterial:uR,czm_modelVertexOutput:fR,czm_ray:dR,czm_raySegment:hR,czm_shadowParameters:mR,czm_HSBToRGB:pR,czm_HSLToRGB:_R,czm_RGBToHSB:gR,czm_RGBToHSL:yR,czm_RGBToXYZ:bR,czm_XYZToRGB:xR,czm_acesTonemapping:TR,czm_alphaWeight:CR,czm_antialias:ER,czm_applyHSBShift:wR,czm_approximateSphericalCoordinates:SR,czm_approximateTanh:AR,czm_backFacing:vR,czm_branchFreeTernary:DR,czm_cascadeColor:IR,czm_cascadeDistance:OR,czm_cascadeMatrix:PR,czm_cascadeWeights:RR,czm_clipPolygons:MR,czm_columbusViewMorph:LR,czm_computeAtmosphereColor:NR,czm_computeGroundAtmosphereScattering:FR,czm_computePosition:BR,czm_computeScattering:kR,czm_cosineAndSine:UR,czm_decompressTextureCoordinates:zR,czm_depthClamp:VR,czm_eastNorthUpToEyeCoordinates:HR,czm_ellipsoidContainsPoint:GR,czm_ellipsoidTextureCoordinates:jR,czm_equalsEpsilon:WR,czm_eyeOffset:qR,czm_eyeToWindowCoordinates:YR,czm_fastApproximateAtan:XR,czm_fog:KR,czm_gammaCorrect:$R,czm_geodeticSurfaceNormal:ZR,czm_getDefaultMaterial:JR,czm_getDynamicAtmosphereLightDirection:QR,czm_getLambertDiffuse:e1,czm_getSpecular:t1,czm_getWaterNoise:n1,czm_hue:i1,czm_inverseGamma:o1,czm_isEmpty:r1,czm_isFull:s1,czm_latitudeToWebMercatorFraction:a1,czm_lineDistance:c1,czm_linearToSrgb:l1,czm_luminance:u1,czm_maximumComponent:f1,czm_metersPerPixel:d1,czm_modelToWindowCoordinates:h1,czm_multiplyWithColorBalance:m1,czm_nearFarScalar:p1,czm_octDecode:_1,czm_packDepth:g1,czm_pbrLighting:y1,czm_pbrNeutralTonemapping:b1,czm_phong:x1,czm_planeDistance:T1,czm_pointAlongRay:C1,czm_rayEllipsoidIntersectionInterval:E1,czm_raySphereIntersectionInterval:w1,czm_readDepth:S1,czm_readNonPerspective:A1,czm_reverseLogDepth:v1,czm_round:D1,czm_saturation:I1,czm_shadowDepthCompare:O1,czm_shadowVisibility:P1,czm_signNotZero:R1,czm_sphericalHarmonics:M1,czm_srgbToLinear:L1,czm_tangentToEyeSpaceMatrix:N1,czm_textureCube:F1,czm_transformPlane:B1,czm_translateRelativeToEye:k1,czm_translucentPhong:U1,czm_transpose:z1,czm_unpackClippingExtents:V1,czm_unpackDepth:H1,czm_unpackFloat:G1,czm_unpackUint:j1,czm_valueTransform:W1,czm_vertexLogDepth:q1,czm_windowToEyeCoordinates:Y1,czm_writeDepthClamp:X1,czm_writeLogDepth:K1,czm_writeNonPerspective:$1};function EAe(e,t){let n=e;return n=n.replaceAll("version 300 es",""),n=n.replaceAll(/(texture\()/g,"texture2D("),t?(n=n.replaceAll(/\n\s*(in)\s+(vec\d|mat\d|float)/g,`
| varying $2`),/out_FragData_(\d+)/.test(n)&&(n=`#extension GL_EXT_draw_buffers : enable
| ${n}`,n=n.replaceAll(/layout\s+\(location\s*=\s*\d+\)\s*out\s+vec4\s+out_FragData_\d+;/g,""),n=n.replaceAll(/out_FragData_(\d+)/g,"gl_FragData[$1]")),n=n.replaceAll(/layout\s+\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g,""),n=n.replaceAll(/out_FragColor/g,"gl_FragColor"),n=n.replaceAll(/out_FragColor\[(\d+)\]/g,"gl_FragColor[$1]"),/gl_FragDepth/.test(n)&&(n=`#extension GL_EXT_frag_depth : enable
| ${n}`,n=n.replaceAll(/gl_FragDepth/g,"gl_FragDepthEXT")),n=`#ifdef GL_EXT_shader_texture_lod
| #extension GL_EXT_shader_texture_lod : enable
| #endif
| ${n}`,n=`#ifdef GL_OES_standard_derivatives
| #extension GL_OES_standard_derivatives : enable
| #endif
| ${n}`):(n=n.replaceAll(/(in)\s+(vec\d|mat\d|float)/g,"attribute $2"),n=n.replaceAll(/(out)\s+(vec\d|mat\d|float)\s+([\w]+);/g,"varying $2 $3;")),n=`#version 100
| ${n}`,n}var Z1=EAe;function qZ(e){return e=e.replace(/\/\/.*/g,""),e.replace(/\/\*\*[\s\S]*?\*\//gm,function(t){let n=t.match(/\n/gm).length,i="";for(let o=0;o<n;++o)i+=`
| `;return i})}function YZ(e,t,n){let i;for(let o=0;o<n.length;++o)n[o].name===e&&(i=n[o]);return c(i)||(t=qZ(t),i={name:e,glslSource:t,dependsOn:[],requiredBy:[],evaluated:!1},n.push(i)),i}function XZ(e,t){if(e.evaluated)return;e.evaluated=!0;let n=e.glslSource.match(/\bczm_[a-zA-Z0-9_]*/g);c(n)&&n!==null&&(n=n.filter(function(i,o){return n.indexOf(i)===o}),n.forEach(function(i){if(i!==e.name&&ys._czmBuiltinsAndUniforms.hasOwnProperty(i)){let o=YZ(i,ys._czmBuiltinsAndUniforms[i],t);e.dependsOn.push(o),o.requiredBy.push(e),XZ(o,t)}}))}function wAe(e){let t=[],n=[];for(;e.length>0;){let o=e.pop();n.push(o),o.requiredBy.length===0&&t.push(o)}for(;t.length>0;){let o=t.shift();e.push(o);for(let r=0;r<o.dependsOn.length;++r){let s=o.dependsOn[r],a=s.requiredBy.indexOf(o);s.requiredBy.splice(a,1),s.requiredBy.length===0&&t.push(s)}}let i=[];for(let o=0;o<n.length;++o)n[o].requiredBy.length!==0&&i.push(n[o]);if(i.length!==0){let o=`A circular dependency was found in the following built-in functions/structs/constants:
| `;for(let r=0;r<i.length;++r)o=`${o+i[r].name}
| `;throw new w(o)}}function SAe(e){let t=[],n=YZ("main",e,t);XZ(n,t),wAe(t);let i="";for(let o=t.length-1;o>=0;--o)i=`${i+t[o].glslSource}
| `;return i.replace(n.glslSource,"")}function KZ(e,t,n){let i,o,r="",s=e.sources;if(c(s))for(i=0,o=s.length;i<o;++i)r+=`
| #line 0
| ${s[i]}`;r=qZ(r);let a;r=r.replace(/#version\s+(.*?)\n/gm,function(b,x){if(c(a)&&a!==x)throw new w(`inconsistent versions found: ${a} and ${x}`);return a=x,`
| `});let l=[];r=r.replace(/#extension.*\n/gm,function(b){return l.push(b),`
| `}),r=r.replace(/precision\s(lowp|mediump|highp)\s(float|int);/,"");let u=e.pickColorQualifier;c(u)&&(r=ys.createPickFragmentShaderSource(r,u));let f="",h=l.length;for(i=0;i<h;i++)f+=l[i];t&&(f+=`#ifdef GL_FRAGMENT_PRECISION_HIGH
| precision highp float;
| precision highp int;
| #else
| precision mediump float;
| precision mediump int;
| #define highp mediump
| #endif
|
| `);let m=e.defines;if(c(m))for(i=0,o=m.length;i<o;++i){let b=m[i];b.length!==0&&(f+=`#define ${b}
| `)}n.textureFloatLinear&&(f+=`#define OES_texture_float_linear
|
| `),n.floatingPointTexture&&(f+=`#define OES_texture_float
|
| `);let p="";e.includeBuiltIns&&(p=SAe(r)),f+=`
| #line 0
| `;let _=p+r;return n.webgl2&&t&&!/layout\s*\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g.test(_)&&!/czm_out_FragColor/g.test(_)&&/out_FragColor/g.test(_)&&(f+=`layout(location = 0) out vec4 out_FragColor;
|
| `),f+=p,f+=r,n.webgl2?f=`#version 300 es
| ${f}`:f=Z1(f,t),f}function ys(e){e=g(e,g.EMPTY_OBJECT);let t=e.pickColorQualifier;if(c(t)&&t!=="uniform"&&t!=="in")throw new w("options.pickColorQualifier must be 'uniform' or 'in'.");this.defines=c(e.defines)?e.defines.slice(0):[],this.sources=c(e.sources)?e.sources.slice(0):[],this.pickColorQualifier=t,this.includeBuiltIns=g(e.includeBuiltIns,!0)}ys.prototype.clone=function(){return new ys({sources:this.sources,defines:this.defines,pickColorQualifier:this.pickColorQualifier,includeBuiltIns:this.includeBuiltIns})};ys.replaceMain=function(e,t){return t=`void ${t}()`,e.replace(/void\s+main\s*\(\s*(?:void)?\s*\)/g,t)};ys.prototype.getCacheKey=function(){let t=this.defines.slice().sort().join(","),n=this.pickColorQualifier,i=this.includeBuiltIns,o=this.sources.join(`
| `);return`${t}:${n}:${i}:${o}`};ys.prototype.createCombinedVertexShader=function(e){return KZ(this,!1,e)};ys.prototype.createCombinedFragmentShader=function(e){return KZ(this,!0,e)};ys._czmBuiltinsAndUniforms={};for(let e in Wx)Wx.hasOwnProperty(e)&&(ys._czmBuiltinsAndUniforms[e]=Wx[e]);for(let e in r_)if(r_.hasOwnProperty(e)){let t=r_[e];typeof t.getDeclaration=="function"&&(ys._czmBuiltinsAndUniforms[e]=t.getDeclaration(e))}ys.createPickVertexShaderSource=function(e){return`${ys.replaceMain(e,"czm_old_main")}
| in vec4 pickColor;
| out vec4 czm_pickColor;
| void main()
| {
| czm_old_main();
| czm_pickColor = pickColor;
| }`};ys.createPickFragmentShaderSource=function(e,t){let n=ys.replaceMain(e,"czm_old_main"),i=`${t} vec4 czm_pickColor;
| void main()
| {
| czm_old_main();
| if (out_FragColor.a == 0.0) {
| discard;
| }
| out_FragColor = czm_pickColor;
| }`;return`${n}
| ${i}`};function AAe(e,t){let n=e.defines,i=n.length;for(let o=0;o<i;++o)if(n[o]===t)return!0;return!1}function $Z(e,t){let n=e.sources,i=n.length;for(let o=0;o<i;++o)if(n[o].indexOf(t)!==-1)return!0;return!1}function ZZ(e,t){let n=t.length;for(let i=0;i<n;++i){let o=t[i];if($Z(e,o))return o}}var vAe=["v_normalEC","v_normal"];ys.findNormalVarying=function(e){return $Z(e,"#ifdef HAS_NORMALS")?AAe(e,"HAS_NORMALS")?"v_normalEC":void 0:ZZ(e,vAe)};var DAe=["v_positionEC"];ys.findPositionVarying=function(e){return ZZ(e,DAe)};var Be=ys;function Vf(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}Object.defineProperties(Vf.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}});Vf.prototype.replaceShaderProgram=function(e){return c(e.shaderProgram)&&e.shaderProgram.destroy(),this.getShaderProgram(e)};function IAe(e){let t=Object.keys(e).sort();return JSON.stringify(e,t)}Vf.prototype.getShaderProgram=function(e){let t=e.vertexShaderSource,n=e.fragmentShaderSource,i=e.attributeLocations;typeof t=="string"&&(t=new Be({sources:[t]})),typeof n=="string"&&(n=new Be({sources:[n]}));let o=t.getCacheKey(),r=n.getCacheKey(),s=c(i)?IAe(i):"",a=`${o}:${r}:${s}`,l;if(c(this._shaders[a]))l=this._shaders[a],delete this._shadersToRelease[a];else{let u=this._context,f=t.createCombinedVertexShader(u),h=n.createCombinedFragmentShader(u),m=new en({gl:u._gl,logShaderCompilation:u.logShaderCompilation,debugShaders:u.debugShaders,vertexShaderSource:t,vertexShaderText:f,fragmentShaderSource:n,fragmentShaderText:h,attributeLocations:i});l={cache:this,shaderProgram:m,keyword:a,derivedKeywords:[],count:0},m._cachedShader=l,this._shaders[a]=l,++this._numberOfShaders}return++l.count,l.shaderProgram};Vf.prototype.replaceDerivedShaderProgram=function(e,t,n){let i=e._cachedShader,o=t+i.keyword,r=this._shaders[o];if(c(r)){w8(this,r);let s=i.derivedKeywords.indexOf(t);s>-1&&i.derivedKeywords.splice(s,1)}return this.createDerivedShaderProgram(e,t,n)};Vf.prototype.getDerivedShaderProgram=function(e,t){let n=e._cachedShader,i=t+n.keyword,o=this._shaders[i];if(c(o))return o.shaderProgram};Vf.prototype.createDerivedShaderProgram=function(e,t,n){let i=e._cachedShader,o=t+i.keyword,r=n.vertexShaderSource,s=n.fragmentShaderSource,a=n.attributeLocations;typeof r=="string"&&(r=new Be({sources:[r]})),typeof s=="string"&&(s=new Be({sources:[s]}));let l=this._context,u=r.createCombinedVertexShader(l),f=s.createCombinedFragmentShader(l),h=new en({gl:l._gl,logShaderCompilation:l.logShaderCompilation,debugShaders:l.debugShaders,vertexShaderSource:r,vertexShaderText:u,fragmentShaderSource:s,fragmentShaderText:f,attributeLocations:a}),m={cache:this,shaderProgram:h,keyword:o,derivedKeywords:[],count:0};return i.derivedKeywords.push(t),h._cachedShader=m,this._shaders[o]=m,h};function w8(e,t){let n=t.derivedKeywords,i=n.length;for(let o=0;o<i;++o){let r=n[o]+t.keyword,s=e._shaders[r];w8(e,s)}delete e._shaders[t.keyword],t.shaderProgram.finalDestroy()}Vf.prototype.destroyReleasedShaderPrograms=function(){let e=this._shadersToRelease;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];w8(this,n),--this._numberOfShaders}this._shadersToRelease={}};Vf.prototype.releaseShaderProgram=function(e){if(c(e)){let t=e._cachedShader;t&&--t.count===0&&(this._shadersToRelease[t.keyword]=t)}};Vf.prototype.isDestroyed=function(){return!1};Vf.prototype.destroy=function(){let e=this._shaders;for(let t in e)e.hasOwnProperty(t)&&e[t].shaderProgram.finalDestroy();return ue(this)};var J1=Vf;function Hf(e){var b,x,T,E;e=g(e,g.EMPTY_OBJECT),C.defined("options.context",e.context);let{context:t,source:n,pixelFormat:i=Re.RGBA,pixelDatatype:o=Ne.UNSIGNED_BYTE,flipY:r=!0,skipColorSpaceConversion:s=!1,sampler:a=new Jt}=e,{width:l,height:u}=e;c(n)&&(c(l)||(l=(x=(b=n.videoWidth)!=null?b:n.naturalWidth)!=null?x:n.width),c(u)||(u=(E=(T=n.videoHeight)!=null?T:n.naturalHeight)!=null?E:n.height));let f=e.preMultiplyAlpha||i===Re.RGB||i===Re.LUMINANCE,h=Re.toInternalFormat(i,o,t),m=Re.isCompressedFormat(h);if(!c(l)||!c(u))throw new w("options requires a source field to create an initialized texture or width and height fields to create a blank texture.");if(C.typeOf.number.greaterThan("width",l,0),l>ht.maximumTextureSize)throw new w(`Width must be less than or equal to the maximum texture size (${ht.maximumTextureSize}). Check maximumTextureSize.`);if(C.typeOf.number.greaterThan("height",u,0),u>ht.maximumTextureSize)throw new w(`Height must be less than or equal to the maximum texture size (${ht.maximumTextureSize}). Check maximumTextureSize.`);if(!Re.validate(i))throw new w("Invalid options.pixelFormat.");if(!m&&!Ne.validate(o))throw new w("Invalid options.pixelDatatype.");if(i===Re.DEPTH_COMPONENT&&o!==Ne.UNSIGNED_SHORT&&o!==Ne.UNSIGNED_INT)throw new w("When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.");if(i===Re.DEPTH_STENCIL&&o!==Ne.UNSIGNED_INT_24_8)throw new w("When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.");if(o===Ne.FLOAT&&!t.floatingPointTexture)throw new w("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(o===Ne.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new w("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.");if(Re.isDepthFormat(i)){if(c(n))throw new w("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, source cannot be provided.");if(!t.depthTexture)throw new w("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.")}if(m){if(!c(n)||!c(n.arrayBufferView))throw new w("When options.pixelFormat is compressed, options.source.arrayBufferView must be defined.");if(Re.isDXTFormat(h)&&!t.s3tc)throw new w("When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_compressed_texture_s3tc extension. Check context.s3tc.");if(Re.isPVRTCFormat(h)&&!t.pvrtc)throw new w("When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_compressed_texture_pvrtc extension. Check context.pvrtc.");if(Re.isASTCFormat(h)&&!t.astc)throw new w("When options.pixelFormat is ASTC compressed, this WebGL implementation must support the WEBGL_compressed_texture_astc extension. Check context.astc.");if(Re.isETC2Format(h)&&!t.etc)throw new w("When options.pixelFormat is ETC2 compressed, this WebGL implementation must support the WEBGL_compressed_texture_etc extension. Check context.etc.");if(Re.isETC1Format(h)&&!t.etc1)throw new w("When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_compressed_texture_etc1 extension. Check context.etc1.");if(Re.isBC7Format(h)&&!t.bc7)throw new w("When options.pixelFormat is BC7 compressed, this WebGL implementation must support the EXT_texture_compression_bptc extension. Check context.bc7.");if(Re.compressedTextureSizeInBytes(h,l,u)!==n.arrayBufferView.byteLength)throw new w("The byte length of the array buffer is invalid for the compressed texture with the given width and height.")}let p=t._gl,_=m?Re.compressedTextureSizeInBytes(i,l,u):Re.textureSizeInBytes(i,o,l,u);this._id=Bn(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=p.TEXTURE_2D,this._texture=p.createTexture(),this._internalFormat=h,this._pixelFormat=i,this._pixelDatatype=o,this._width=l,this._height=u,this._dimensions=new k(l,u),this._hasMipmap=!1,this._sizeInBytes=_,this._preMultiplyAlpha=f,this._flipY=r,this._initialized=!1,this._sampler=void 0,this._sampler=a,JZ(this,a),p.activeTexture(p.TEXTURE0),p.bindTexture(this._textureTarget,this._texture),c(n)?(s?p.pixelStorei(p.UNPACK_COLORSPACE_CONVERSION_WEBGL,p.NONE):p.pixelStorei(p.UNPACK_COLORSPACE_CONVERSION_WEBGL,p.BROWSER_DEFAULT_WEBGL),c(n.arrayBufferView)?Re.isCompressedFormat(h)?OAe(this,n):PAe(this,n):c(n.framebuffer)?RAe(this,n):MAe(this,n),this._initialized=!0):LAe(this),p.bindTexture(this._textureTarget,null)}function OAe(e,t){let i=e._context._gl,o=e._textureTarget,r=e._internalFormat,{width:s,height:a}=e;if(i.pixelStorei(i.UNPACK_ALIGNMENT,4),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1),i.compressedTexImage2D(o,0,r,s,a,0,t.arrayBufferView),c(t.mipLevels)){let l=s,u=a;for(let f=0;f<t.mipLevels.length;++f)l=Q1(l),u=Q1(u),i.compressedTexImage2D(o,f+1,r,l,u,0,t.mipLevels[f])}}function PAe(e,t){let n=e._context,i=n._gl,o=e._textureTarget,r=e._internalFormat,{width:s,height:a,pixelFormat:l,pixelDatatype:u,flipY:f}=e,h=Re.alignmentInBytes(l,u,s);i.pixelStorei(i.UNPACK_ALIGNMENT,h),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1);let m=t.arrayBufferView;if(f&&(m=Re.flipY(m,l,u,s,a)),i.texImage2D(o,0,r,s,a,0,l,Ne.toWebGLConstant(u,n),m),c(t.mipLevels)){let p=s,_=a;for(let b=0;b<t.mipLevels.length;++b)p=Q1(p),_=Q1(_),i.texImage2D(o,b+1,r,p,_,0,l,Ne.toWebGLConstant(u,n),t.mipLevels[b])}}function RAe(e,t){let n=e._context,i=n._gl;i.pixelStorei(i.UNPACK_ALIGNMENT,4),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1),t.framebuffer!==n.defaultFramebuffer&&t.framebuffer._bind(),i.copyTexImage2D(e._textureTarget,0,e._internalFormat,t.xOffset,t.yOffset,e.width,e.height,0),t.framebuffer!==n.defaultFramebuffer&&t.framebuffer._unBind()}function MAe(e,t){let n=e._context,i=n._gl;i.pixelStorei(i.UNPACK_ALIGNMENT,4),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.preMultiplyAlpha),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,e.flipY),i.texImage2D(e._textureTarget,0,e._internalFormat,e.pixelFormat,Ne.toWebGLConstant(e.pixelDatatype,n),t)}function Q1(e){let t=Math.floor(e/2)|0;return Math.max(t,1)}function LAe(e){let t=e._context;t._gl.texImage2D(e._textureTarget,0,e._internalFormat,e._width,e._height,0,e._pixelFormat,Ne.toWebGLConstant(e._pixelDatatype,t),null)}Hf.create=function(e){return new Hf(e)};Hf.fromFramebuffer=function(e){e=g(e,g.EMPTY_OBJECT),C.defined("options.context",e.context);let t=e.context,n=t._gl,{pixelFormat:i=Re.RGB,framebufferXOffset:o=0,framebufferYOffset:r=0,width:s=n.drawingBufferWidth,height:a=n.drawingBufferHeight,framebuffer:l}=e;if(!Re.validate(i))throw new w("Invalid pixelFormat.");if(Re.isDepthFormat(i)||Re.isCompressedFormat(i))throw new w("pixelFormat cannot be DEPTH_COMPONENT, DEPTH_STENCIL or a compressed format.");if(C.defined("options.context",t),C.typeOf.number.greaterThanOrEquals("framebufferXOffset",o,0),C.typeOf.number.greaterThanOrEquals("framebufferYOffset",r,0),o+s>n.drawingBufferWidth)throw new w("framebufferXOffset + width must be less than or equal to drawingBufferWidth");if(r+a>n.drawingBufferHeight)throw new w("framebufferYOffset + height must be less than or equal to drawingBufferHeight.");return new Hf({context:t,width:s,height:a,pixelFormat:i,source:{framebuffer:c(l)?l:t.defaultFramebuffer,xOffset:o,yOffset:r,width:s,height:a}})};Object.defineProperties(Hf.prototype,{id:{get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){JZ(this,e),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(this._sizeInBytes*4/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}});function JZ(e,t){let{minificationFilter:n,magnificationFilter:i}=t,o=[Wt.NEAREST_MIPMAP_NEAREST,Wt.NEAREST_MIPMAP_LINEAR,Wt.LINEAR_MIPMAP_NEAREST,Wt.LINEAR_MIPMAP_LINEAR].includes(n),r=e._context,s=e._pixelFormat,a=e._pixelDatatype;(a===Ne.FLOAT&&!r.textureFloatLinear||a===Ne.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(n=o?Wt.NEAREST_MIPMAP_NEAREST:Wt.NEAREST,i=si.NEAREST),r.webgl2&&Re.isDepthFormat(s)&&(n=Wt.NEAREST,i=si.NEAREST);let l=r._gl,u=e._textureTarget;l.activeTexture(l.TEXTURE0),l.bindTexture(u,e._texture),l.texParameteri(u,l.TEXTURE_MIN_FILTER,n),l.texParameteri(u,l.TEXTURE_MAG_FILTER,i),l.texParameteri(u,l.TEXTURE_WRAP_S,t.wrapS),l.texParameteri(u,l.TEXTURE_WRAP_T,t.wrapT),c(e._textureFilterAnisotropic)&&l.texParameteri(u,e._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,t.maximumAnisotropy),l.bindTexture(u,null)}Hf.prototype.copyFrom=function(e){C.defined("options",e);let{xOffset:t=0,yOffset:n=0,source:i,skipColorSpaceConversion:o=!1}=e;if(C.defined("options.source",i),Re.isDepthFormat(this._pixelFormat))throw new w("Cannot call copyFrom when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(Re.isCompressedFormat(this._pixelFormat))throw new w("Cannot call copyFrom with a compressed texture pixel format.");C.typeOf.number.greaterThanOrEquals("xOffset",t,0),C.typeOf.number.greaterThanOrEquals("yOffset",n,0),C.typeOf.number.lessThanOrEquals("xOffset + options.source.width",t+i.width,this._width),C.typeOf.number.lessThanOrEquals("yOffset + options.source.height",n+i.height,this._height);let r=this._context,s=r._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture);let{width:l,height:u}=i,f=i.arrayBufferView;c(i.videoWidth)&&c(i.videoHeight)?(l=i.videoWidth,u=i.videoHeight):c(i.naturalWidth)&&c(i.naturalHeight)&&(l=i.naturalWidth,u=i.naturalHeight);let h=this._width,m=this._height,p=this._internalFormat,_=this._pixelFormat,b=this._pixelDatatype,x=this._preMultiplyAlpha,T=this._flipY,E=4;c(f)&&(E=Re.alignmentInBytes(_,b,l)),s.pixelStorei(s.UNPACK_ALIGNMENT,E),o?s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.NONE):s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.BROWSER_DEFAULT_WEBGL);let S=!1;if(!this._initialized){let A;t===0&&n===0&&l===h&&u===m?(c(f)?(s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),T?A=Re.flipY(f,_,b,h,m):A=f):(s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,x),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,T),A=i),S=!0):(s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),A=Re.createTypedArray(_,b,h,m)),s.texImage2D(a,0,p,h,m,0,_,Ne.toWebGLConstant(b,r),A),this._initialized=!0}if(!S){let A;c(f)?(s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),T?A=Re.flipY(f,_,b,l,u):A=f):(s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,x),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,T),A=i),s.texSubImage2D(a,0,t,n,l,u,_,Ne.toWebGLConstant(b,r),A)}s.bindTexture(a,null)};Hf.prototype.copyFromFramebuffer=function(e,t,n,i,o,r){if(e=g(e,0),t=g(t,0),n=g(n,0),i=g(i,0),o=g(o,this._width),r=g(r,this._height),Re.isDepthFormat(this._pixelFormat))throw new w("Cannot call copyFromFramebuffer when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(this._pixelDatatype===Ne.FLOAT)throw new w("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===Ne.HALF_FLOAT)throw new w("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");if(Re.isCompressedFormat(this._pixelFormat))throw new w("Cannot call copyFrom with a compressed texture pixel format.");C.typeOf.number.greaterThanOrEquals("xOffset",e,0),C.typeOf.number.greaterThanOrEquals("yOffset",t,0),C.typeOf.number.greaterThanOrEquals("framebufferXOffset",n,0),C.typeOf.number.greaterThanOrEquals("framebufferYOffset",i,0),C.typeOf.number.lessThanOrEquals("xOffset + width",e+o,this._width),C.typeOf.number.lessThanOrEquals("yOffset + height",t+r,this._height);let s=this._context._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture),s.copyTexSubImage2D(a,0,e,t,n,i,o,r),s.bindTexture(a,null),this._initialized=!0};Hf.prototype.generateMipmap=function(e){if(e=g(e,zf.DONT_CARE),Re.isDepthFormat(this._pixelFormat))throw new w("Cannot call generateMipmap when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(Re.isCompressedFormat(this._pixelFormat))throw new w("Cannot call generateMipmap with a compressed pixel format.");if(!this._context.webgl2){if(this._width>1&&!O.isPowerOfTwo(this._width))throw new w("width must be a power of two to call generateMipmap() in a WebGL1 context.");if(this._height>1&&!O.isPowerOfTwo(this._height))throw new w("height must be a power of two to call generateMipmap() in a WebGL1 context.")}if(!zf.validate(e))throw new w("hint is invalid.");this._hasMipmap=!0;let t=this._context._gl,n=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(n,this._texture),t.generateMipmap(n),t.bindTexture(n,null)};Hf.prototype.isDestroyed=function(){return!1};Hf.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),ue(this)};var Ot=Hf;function ib(){this._textures={},this._numberOfTextures=0,this._texturesToRelease={}}Object.defineProperties(ib.prototype,{numberOfTextures:{get:function(){return this._numberOfTextures}}});ib.prototype.getTexture=function(e){let t=this._textures[e];if(c(t))return delete this._texturesToRelease[e],++t.count,t.texture};ib.prototype.addTexture=function(e,t){let n={texture:t,count:1};t.finalDestroy=t.destroy;let i=this;t.destroy=function(){--n.count===0&&(i._texturesToRelease[e]=n)},this._textures[e]=n,++this._numberOfTextures};ib.prototype.destroyReleasedTextures=function(){let e=this._texturesToRelease;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];delete this._textures[t],n.texture.finalDestroy(),--this._numberOfTextures}this._texturesToRelease={}};ib.prototype.isDestroyed=function(){return!1};ib.prototype.destroy=function(){let e=this._textures;for(let t in e)e.hasOwnProperty(t)&&e[t].texture.finalDestroy();return ue(this)};var eM=ib;function Iu(e){this.planes=g(e,[])}var yS=[new d,new d,new d];d.clone(d.UNIT_X,yS[0]);d.clone(d.UNIT_Y,yS[1]);d.clone(d.UNIT_Z,yS[2]);var p_=new d,NAe=new d,QZ=new on(new d(1,0,0),0);Iu.fromBoundingSphere=function(e,t){if(!c(e))throw new w("boundingSphere is required.");c(t)||(t=new Iu);let n=yS.length,i=t.planes;i.length=2*n;let o=e.center,r=e.radius,s=0;for(let a=0;a<n;++a){let l=yS[a],u=i[s],f=i[s+1];c(u)||(u=i[s]=new ee),c(f)||(f=i[s+1]=new ee),d.multiplyByScalar(l,-r,p_),d.add(o,p_,p_),u.x=l.x,u.y=l.y,u.z=l.z,u.w=-d.dot(l,p_),d.multiplyByScalar(l,r,p_),d.add(o,p_,p_),f.x=-l.x,f.y=-l.y,f.z=-l.z,f.w=-d.dot(d.negate(l,NAe),p_),s+=2}return t};Iu.prototype.computeVisibility=function(e){if(!c(e))throw new w("boundingVolume is required.");let t=this.planes,n=!1;for(let i=0,o=t.length;i<o;++i){let r=e.intersectPlane(on.fromCartesian4(t[i],QZ));if(r===Gt.OUTSIDE)return Gt.OUTSIDE;r===Gt.INTERSECTING&&(n=!0)}return n?Gt.INTERSECTING:Gt.INSIDE};Iu.prototype.computeVisibilityWithPlaneMask=function(e,t){if(!c(e))throw new w("boundingVolume is required.");if(!c(t))throw new w("parentPlaneMask is required.");if(t===Iu.MASK_OUTSIDE||t===Iu.MASK_INSIDE)return t;let n=Iu.MASK_INSIDE,i=this.planes;for(let o=0,r=i.length;o<r;++o){let s=o<31?1<<o:0;if(o<31&&!(t&s))continue;let a=e.intersectPlane(on.fromCartesian4(i[o],QZ));if(a===Gt.OUTSIDE)return Iu.MASK_OUTSIDE;a===Gt.INTERSECTING&&(n|=s)}return n};Iu.MASK_OUTSIDE=4294967295;Iu.MASK_INSIDE=0;Iu.MASK_INDETERMINATE=2147483647;var rs=Iu;function nh(e){e=g(e,g.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=g(e.near,1),this._near=this.near,this.far=g(e.far,5e8),this._far=this.far,this._cullingVolume=new rs,this._orthographicMatrix=new N}function eJ(e){if(!c(e.right)||!c(e.left)||!c(e.top)||!c(e.bottom)||!c(e.near)||!c(e.far))throw new w("right, left, top, bottom, near, or far parameters are not set.");if(e.top!==e._top||e.bottom!==e._bottom||e.left!==e._left||e.right!==e._right||e.near!==e._near||e.far!==e._far){if(e.left>e.right)throw new w("right must be greater than left.");if(e.bottom>e.top)throw new w("top must be greater than bottom.");if(e.near<=0||e.near>e.far)throw new w("near must be greater than zero and less than far.");e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=N.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix)}}Object.defineProperties(nh.prototype,{projectionMatrix:{get:function(){return eJ(this),this._orthographicMatrix}}});var FAe=new d,BAe=new d,kAe=new d,S8=new d;nh.prototype.computeCullingVolume=function(e,t,n){if(!c(e))throw new w("position is required.");if(!c(t))throw new w("direction is required.");if(!c(n))throw new w("up is required.");let i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,l=this.near,u=this.far,f=d.cross(t,n,FAe);d.normalize(f,f);let h=BAe;d.multiplyByScalar(t,l,h),d.add(e,h,h);let m=kAe;d.multiplyByScalar(f,a,m),d.add(h,m,m);let p=i[0];return c(p)||(p=i[0]=new ee),p.x=f.x,p.y=f.y,p.z=f.z,p.w=-d.dot(f,m),d.multiplyByScalar(f,s,m),d.add(h,m,m),p=i[1],c(p)||(p=i[1]=new ee),p.x=-f.x,p.y=-f.y,p.z=-f.z,p.w=-d.dot(d.negate(f,S8),m),d.multiplyByScalar(n,r,m),d.add(h,m,m),p=i[2],c(p)||(p=i[2]=new ee),p.x=n.x,p.y=n.y,p.z=n.z,p.w=-d.dot(n,m),d.multiplyByScalar(n,o,m),d.add(h,m,m),p=i[3],c(p)||(p=i[3]=new ee),p.x=-n.x,p.y=-n.y,p.z=-n.z,p.w=-d.dot(d.negate(n,S8),m),p=i[4],c(p)||(p=i[4]=new ee),p.x=t.x,p.y=t.y,p.z=t.z,p.w=-d.dot(t,h),d.multiplyByScalar(t,u,m),d.add(e,m,m),p=i[5],c(p)||(p=i[5]=new ee),p.x=-t.x,p.y=-t.y,p.z=-t.z,p.w=-d.dot(d.negate(t,S8),m),this._cullingVolume};nh.prototype.getPixelDimensions=function(e,t,n,i,o){if(eJ(this),!c(e)||!c(t))throw new w("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new w("drawingBufferWidth must be greater than zero.");if(t<=0)throw new w("drawingBufferHeight must be greater than zero.");if(!c(n))throw new w("distance is required.");if(!c(i))throw new w("pixelRatio is required.");if(i<=0)throw new w("pixelRatio must be greater than zero.");if(!c(o))throw new w("A result object is required.");let r=this.right-this.left,s=this.top-this.bottom,a=i*r/e,l=i*s/t;return o.x=a,o.y=l,o};nh.prototype.clone=function(e){return c(e)||(e=new nh),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};nh.prototype.equals=function(e){return c(e)&&e instanceof nh&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};nh.prototype.equalsEpsilon=function(e,t,n){return e===this||c(e)&&e instanceof nh&&O.equalsEpsilon(this.right,e.right,t,n)&&O.equalsEpsilon(this.left,e.left,t,n)&&O.equalsEpsilon(this.top,e.top,t,n)&&O.equalsEpsilon(this.bottom,e.bottom,t,n)&&O.equalsEpsilon(this.near,e.near,t,n)&&O.equalsEpsilon(this.far,e.far,t,n)};var No=nh;function Wc(e){e=g(e,g.EMPTY_OBJECT),this._offCenterFrustum=new No,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=g(e.near,1),this._near=this.near,this.far=g(e.far,5e8),this._far=this.far}Wc.packedLength=4;Wc.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),t[n++]=e.width,t[n++]=e.aspectRatio,t[n++]=e.near,t[n]=e.far,t};Wc.unpack=function(e,t,n){return C.defined("array",e),t=g(t,0),c(n)||(n=new Wc),n.width=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t],n};function __(e){if(!c(e.width)||!c(e.aspectRatio)||!c(e.near)||!c(e.far))throw new w("width, aspectRatio, near, or far parameters are not set.");let t=e._offCenterFrustum;if(e.width!==e._width||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far){if(e.aspectRatio<0)throw new w("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new w("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far;let n=1/e.aspectRatio;t.right=e.width*.5,t.left=-t.right,t.top=n*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}Object.defineProperties(Wc.prototype,{projectionMatrix:{get:function(){return __(this),this._offCenterFrustum.projectionMatrix}},offCenterFrustum:{get:function(){return __(this),this._offCenterFrustum}}});Wc.prototype.computeCullingVolume=function(e,t,n){return __(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};Wc.prototype.getPixelDimensions=function(e,t,n,i,o){return __(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};Wc.prototype.clone=function(e){return c(e)||(e=new Wc),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};Wc.prototype.equals=function(e){return!c(e)||!(e instanceof Wc)?!1:(__(this),__(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};Wc.prototype.equalsEpsilon=function(e,t,n){return!c(e)||!(e instanceof Wc)?!1:(__(this),__(e),O.equalsEpsilon(this.width,e.width,t,n)&&O.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var an=Wc;var A8={};function UAe(e){let t=6.239996+.0172019696544*e;return .001657*Math.sin(t+.01671*Math.sin(t))}var zAe=32.184,VAe=2451545;function xJ(e,t){t=K.addSeconds(e,zAe,t);let n=K.totalDays(t)-VAe;return t=K.addSeconds(t,UAe(n),t),t}var tM=new K(2451545,0,zn.TAI),HAe=1e3,Ou=O.RADIANS_PER_DEGREE,Il=O.RADIANS_PER_ARCSECOND,ra=14959787e4,tJ=new q;function TJ(e,t,n,i,o,r,s){if(n<0&&(n=-n,o+=O.PI),n<0||n>O.PI)throw new w("The inclination is out of range. Inclination must be greater than or equal to zero and less than or equal to Pi radians.");let a=e*(1-t),l=i-o,u=o,f=jAe(r-i,t);if(GAe(t,0)==="Hyperbolic"&&Math.abs(O.negativePiToPi(f))>=Math.acos(-1/t))throw new w("The true anomaly of the hyperbolic orbit lies outside of the bounds of the hyperbola.");XAe(l,n,u,tJ);let m=a*(1+t),p=Math.cos(f),_=Math.sin(f),b=1+t*p;if(b<=O.Epsilon10)throw new w("elements cannot be converted to cartesian");let x=m/b;return c(s)?(s.x=x*p,s.y=x*_,s.z=0):s=new d(x*p,x*_,0),q.multiplyByVector(tJ,s,s)}function GAe(e,t){if(e<0)throw new w("eccentricity cannot be negative.");return e<=t?"Circular":e<1-t?"Elliptical":e<=1+t?"Parabolic":"Hyperbolic"}function jAe(e,t){if(t<0||t>=1)throw new w("eccentricity out of range.");let n=qAe(e,t);return YAe(n,t)}var nJ=50,WAe=O.EPSILON8;function qAe(e,t){if(t<0||t>=1)throw new w("eccentricity out of range.");let n=Math.floor(e/O.TWO_PI);e-=n*O.TWO_PI;let i=e+t*Math.sin(e)/(1-Math.sin(e+t)+Math.sin(e)),o=Number.MAX_VALUE,r;for(r=0;r<nJ&&Math.abs(o-i)>WAe;++r){o=i;let s=o-t*Math.sin(o)-e,a=1-t*Math.cos(o);i=o-s/a}if(r>=nJ)throw new w("Kepler equation did not converge");return o=i+n*O.TWO_PI,o}function YAe(e,t){if(t<0||t>=1)throw new w("eccentricity out of range.");let n=Math.floor(e/O.TWO_PI);e-=n*O.TWO_PI;let i=Math.cos(e)-t,o=Math.sin(e)*Math.sqrt(1-t*t),r=Math.atan2(o,i);return r=O.zeroToTwoPi(r),e<0&&(r-=O.TWO_PI),r+=n*O.TWO_PI,r}function XAe(e,t,n,i){if(t<0||t>O.PI)throw new w("inclination out of range");let o=Math.cos(e),r=Math.sin(e),s=Math.cos(t),a=Math.sin(t),l=Math.cos(n),u=Math.sin(n);return c(i)?(i[0]=l*o-u*r*s,i[1]=u*o+l*r*s,i[2]=r*a,i[3]=-l*r-u*o*s,i[4]=-u*r+l*o*s,i[5]=o*a,i[6]=u*a,i[7]=-l*a,i[8]=s):i=new q(l*o-u*r*s,-l*r-u*o*s,u*a,u*o+l*r*s,-u*r+l*o*s,-l*a,r*a,o*a,s),i}var KAe=1.0000010178*ra,$Ae=100.46645683*Ou,ZAe=129597742283429e-5*Il,iJ=16002,oJ=21863,rJ=32004,sJ=10931,aJ=14529,cJ=16368,lJ=15318,uJ=32794,JAe=64*1e-7*ra,QAe=-152*1e-7*ra,eve=62*1e-7*ra,tve=-8*1e-7*ra,nve=32*1e-7*ra,ive=-41*1e-7*ra,ove=19*1e-7*ra,rve=-11*1e-7*ra,sve=-150*1e-7*ra,ave=-46*1e-7*ra,cve=68*1e-7*ra,lve=54*1e-7*ra,uve=14*1e-7*ra,fve=24*1e-7*ra,dve=-28*1e-7*ra,hve=22*1e-7*ra,fJ=10,dJ=16002,hJ=21863,mJ=10931,pJ=1473,_J=32004,gJ=4387,yJ=73,mve=-325*1e-7,pve=-322*1e-7,_ve=-79*1e-7,gve=232*1e-7,yve=-52*1e-7,bve=97*1e-7,xve=55*1e-7,Tve=-41*1e-7,Cve=-105*1e-7,Eve=-137*1e-7,wve=258*1e-7,Sve=35*1e-7,Ave=-116*1e-7,vve=-88*1e-7,Dve=-112*1e-7,Ive=-80*1e-7,qx=new K(0,0,zn.TAI);function Ove(e,t){xJ(e,qx);let i=(qx.dayNumber-tM.dayNumber+(qx.secondsOfDay-tM.secondsOfDay)/Vn.SECONDS_PER_DAY)/(Vn.DAYS_PER_JULIAN_CENTURY*10),o=.3595362*i,r=KAe+JAe*Math.cos(iJ*o)+sve*Math.sin(iJ*o)+QAe*Math.cos(oJ*o)+ave*Math.sin(oJ*o)+eve*Math.cos(rJ*o)+cve*Math.sin(rJ*o)+tve*Math.cos(sJ*o)+lve*Math.sin(sJ*o)+nve*Math.cos(aJ*o)+uve*Math.sin(aJ*o)+ive*Math.cos(cJ*o)+fve*Math.sin(cJ*o)+ove*Math.cos(lJ*o)+dve*Math.sin(lJ*o)+rve*Math.cos(uJ*o)+hve*Math.sin(uJ*o),s=$Ae+ZAe*i+mve*Math.cos(fJ*o)+Cve*Math.sin(fJ*o)+pve*Math.cos(dJ*o)+Eve*Math.sin(dJ*o)+_ve*Math.cos(hJ*o)+wve*Math.sin(hJ*o)+gve*Math.cos(mJ*o)+Sve*Math.sin(mJ*o)+yve*Math.cos(pJ*o)+Ave*Math.sin(pJ*o)+bve*Math.cos(_J*o)+vve*Math.sin(_J*o)+xve*Math.cos(gJ*o)+Dve*Math.sin(gJ*o)+Tve*Math.cos(yJ*o)+Ive*Math.sin(yJ*o),a=.0167086342-.0004203654*i,l=102.93734808*Ou+11612.3529*Il*i,u=469.97289*Il*i,f=174.87317577*Ou-8679.27034*Il*i;return TJ(r,a,u,l,f,s,t)}function CJ(e,t){xJ(e,qx);let i=(qx.dayNumber-tM.dayNumber+(qx.secondsOfDay-tM.secondsOfDay)/Vn.SECONDS_PER_DAY)/Vn.DAYS_PER_JULIAN_CENTURY,o=i*i,r=o*i,s=r*i,a=383397.7725+.004*i,l=.055545526-16e-9*i,u=5.15668983*Ou,f=-8e-5*i+.02966*o-42e-6*r-13e-8*s,h=83.35324312*Ou,m=146434202669e-4*i-38.2702*o-.045047*r+21301e-8*s,p=125.04455501*Ou,_=-69679193631e-4*i+6.3602*o+.007625*r-3586e-8*s,b=218.31664563*Ou,x=17325593434847e-4*i-6.391*o+.006588*r-3169e-8*s,T=297.85019547*Ou+Il*(1602961601209e-3*i-6.3706*o+.006593*r-3169e-8*s),E=93.27209062*Ou+Il*(17395272628478e-4*i-12.7512*o-.001037*r+417e-8*s),S=134.96340251*Ou+Il*(17179159232178e-4*i+31.8792*o+.051635*r-2447e-7*s),A=357.52910918*Ou+Il*(1295965810481e-4*i-.5532*o+136e-6*r-1149e-8*s),v=310.17137918*Ou-Il*(6967051436e-3*i+6.2068*o+.007618*r-3219e-8*s),D=2*T,R=4*T,P=6*T,L=2*S,F=3*S,y=4*S,I=2*E;a+=3400.4*Math.cos(D)-635.6*Math.cos(D-S)-235.6*Math.cos(S)+218.1*Math.cos(D-A)+181*Math.cos(D+S),l+=.014216*Math.cos(D-S)+.008551*Math.cos(D-L)-.001383*Math.cos(S)+.001356*Math.cos(D+S)-.001147*Math.cos(R-F)-914e-6*Math.cos(R-L)+869e-6*Math.cos(D-A-S)-627e-6*Math.cos(D)-394e-6*Math.cos(R-y)+282e-6*Math.cos(D-A-L)-279e-6*Math.cos(T-S)-236e-6*Math.cos(L)+231e-6*Math.cos(R)+229e-6*Math.cos(P-y)-201e-6*Math.cos(L-I),f+=486.26*Math.cos(D-I)-40.13*Math.cos(D)+37.51*Math.cos(I)+25.73*Math.cos(L-I)+19.97*Math.cos(D-A-I),m+=-55609*Math.sin(D-S)-34711*Math.sin(D-L)-9792*Math.sin(S)+9385*Math.sin(R-F)+7505*Math.sin(R-L)+5318*Math.sin(D+S)+3484*Math.sin(R-y)-3417*Math.sin(D-A-S)-2530*Math.sin(P-y)-2376*Math.sin(D)-2075*Math.sin(D-F)-1883*Math.sin(L)-1736*Math.sin(P-5*S)+1626*Math.sin(A)-1370*Math.sin(P-F),_+=-5392*Math.sin(D-I)-540*Math.sin(A)-441*Math.sin(D)+423*Math.sin(I)-288*Math.sin(L-I),x+=-3332.9*Math.sin(D)+1197.4*Math.sin(D-S)-662.5*Math.sin(A)+396.3*Math.sin(S)-218*Math.sin(D-A);let M=2*v,B=3*v;f+=46.997*Math.cos(v)*i-.614*Math.cos(D-I+v)*i+.614*Math.cos(D-I-v)*i-.0297*Math.cos(M)*o-.0335*Math.cos(v)*o+.0012*Math.cos(D-I+M)*o-16e-5*Math.cos(v)*r+4e-5*Math.cos(B)*r+4e-5*Math.cos(M)*r;let U=2.116*Math.sin(v)*i-.111*Math.sin(D-I-v)*i-.0015*Math.sin(v)*o;m+=U,x+=U,_+=-520.77*Math.sin(v)*i+13.66*Math.sin(D-I+v)*i+1.12*Math.sin(D-v)*i-1.06*Math.sin(I-v)*i+.66*Math.sin(M)*o+.371*Math.sin(v)*o-.035*Math.sin(D-I+M)*o-.015*Math.sin(D-I+v)*o+.0014*Math.sin(v)*r-.0011*Math.sin(B)*r-9e-4*Math.sin(M)*r,a*=HAe;let V=u+f*Il,W=h+m*Il,H=b+x*Il,X=p+_*Il;return TJ(a,l,V,W,X,H,t)}var bJ=.012300034,Pve=bJ/(bJ+1)*-1;function Rve(e,t){return t=CJ(e,t),d.multiplyByScalar(t,Pve,t)}var EJ=new q(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),bS=new d;A8.computeSunPositionInEarthInertialFrame=function(e,t){return c(e)||(e=K.now()),c(t)||(t=new d),bS=Ove(e,bS),t=d.negate(bS,t),Rve(e,bS),d.subtract(t,bS,t),q.multiplyByVector(EJ,t,t),t};A8.computeMoonPositionInEarthInertialFrame=function(e,t){return c(e)||(e=K.now()),t=CJ(e,t),q.multiplyByVector(EJ,t,t),t};var ob=A8;var nM={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3};nM.getMorphTime=function(e){return e===nM.SCENE3D?1:e===nM.MORPHING?void 0:0};var J=Object.freeze(nM);function Mve(e){e=g(e,g.EMPTY_OBJECT),this.color=z.clone(g(e.color,z.WHITE)),this.intensity=g(e.intensity,2)}var g_=Mve;function Yx(){this.globeDepthTexture=void 0,this.gamma=void 0,this._viewport=new je,this._viewportCartesian4=new ee,this._viewportDirty=!1,this._viewportOrthographicMatrix=N.clone(N.IDENTITY),this._viewportTransformation=N.clone(N.IDENTITY),this._model=N.clone(N.IDENTITY),this._view=N.clone(N.IDENTITY),this._inverseView=N.clone(N.IDENTITY),this._projection=N.clone(N.IDENTITY),this._infiniteProjection=N.clone(N.IDENTITY),this._entireFrustum=new k,this._currentFrustum=new k,this._frustumPlanes=new ee,this._farDepthFromNearPlusOne=void 0,this._log2FarDepthFromNearPlusOne=void 0,this._oneOverLog2FarDepthFromNearPlusOne=void 0,this._frameState=void 0,this._temeToPseudoFixed=q.clone(N.IDENTITY),this._view3DDirty=!0,this._view3D=new N,this._inverseView3DDirty=!0,this._inverseView3D=new N,this._inverseModelDirty=!0,this._inverseModel=new N,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new q,this._viewRotation=new q,this._inverseViewRotation=new q,this._viewRotation3D=new q,this._inverseViewRotation3D=new q,this._inverseProjectionDirty=!0,this._inverseProjection=new N,this._modelViewDirty=!0,this._modelView=new N,this._modelView3DDirty=!0,this._modelView3D=new N,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new N,this._inverseModelViewDirty=!0,this._inverseModelView=new N,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new N,this._viewProjectionDirty=!0,this._viewProjection=new N,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new N,this._modelViewProjectionDirty=!0,this._modelViewProjection=new N,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new N,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new N,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new N,this._normalDirty=!0,this._normal=new q,this._normal3DDirty=!0,this._normal3D=new q,this._inverseNormalDirty=!0,this._inverseNormal=new q,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new q,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new kn,this._cameraPosition=new d,this._sunPositionWC=new d,this._sunPositionColumbusView=new d,this._sunDirectionWC=new d,this._sunDirectionEC=new d,this._moonDirectionEC=new d,this._lightDirectionWC=new d,this._lightDirectionEC=new d,this._lightColor=new d,this._lightColorHdr=new d,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._ellipsoid=void 0,this._cameraDirection=new d,this._cameraRight=new d,this._cameraUp=new d,this._frustum2DWidth=0,this._eyeHeight=0,this._eyeHeight2D=new k,this._eyeEllipsoidNormalEC=new d,this._eyeEllipsoidCurvature=new k,this._modelToEnu=new N,this._enuToModel=new N,this._pixelRatio=1,this._orthographicIn3D=!1,this._backgroundColor=new z,this._brdfLut=void 0,this._environmentMap=void 0,this._sphericalHarmonicCoefficients=void 0,this._specularEnvironmentMaps=void 0,this._specularEnvironmentMapsMaximumLOD=void 0,this._fogDensity=void 0,this._fogVisualDensityScalar=void 0,this._fogMinimumBrightness=void 0,this._atmosphereHsbShift=void 0,this._atmosphereLightIntensity=void 0,this._atmosphereRayleighCoefficient=new d,this._atmosphereRayleighScaleHeight=new d,this._atmosphereMieCoefficient=new d,this._atmosphereMieScaleHeight=void 0,this._atmosphereMieAnisotropy=void 0,this._atmosphereDynamicLighting=void 0,this._invertClassificationColor=void 0,this._splitPosition=0,this._pixelSizePerMeter=void 0,this._geometricToleranceOverMeter=void 0,this._minimumDisableDepthTestDistance=void 0}Object.defineProperties(Yx.prototype,{frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){if(!je.equals(e,this._viewport)){je.clone(e,this._viewport);let t=this._viewport,n=this._viewportCartesian4;n.x=t.x,n.y=t.y,n.z=t.width,n.w=t.height,this._viewportDirty=!0}}},viewportCartesian4:{get:function(){return this._viewportCartesian4}},viewportOrthographic:{get:function(){return SJ(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return SJ(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){N.clone(e,this._model),this._modelView3DDirty=!0,this._inverseModelView3DDirty=!0,this._inverseModelDirty=!0,this._inverseTransposeModelDirty=!0,this._modelViewDirty=!0,this._inverseModelViewDirty=!0,this._modelViewRelativeToEyeDirty=!0,this._inverseModelViewDirty=!0,this._modelViewProjectionDirty=!0,this._inverseModelViewProjectionDirty=!0,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewInfiniteProjectionDirty=!0,this._normalDirty=!0,this._inverseNormalDirty=!0,this._normal3DDirty=!0,this._inverseNormal3DDirty=!0,this._encodedCameraPositionMCDirty=!0}},inverseModel:{get:function(){return this._inverseModelDirty&&(this._inverseModelDirty=!1,N.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){let e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,N.getMatrix3(this.inverseModel,e),q.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return D8(this),this._view3D}},viewRotation:{get:function(){return D8(this),this._viewRotation}},viewRotation3D:{get:function(){return D8(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return DJ(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return DJ(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return jve(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return Wve(this),this._modelView}},modelView3D:{get:function(){return qve(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return Jve(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return Yve(this),this._inverseModelView}},inverseModelView3D:{get:function(){return Xve(this),this._inverseModelView3D}},viewProjection:{get:function(){return Kve(this),this._viewProjection}},inverseViewProjection:{get:function(){return $ve(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return Zve(this),this._modelViewProjection}},inverseModelViewProjection:{get:function(){return Qve(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return eDe(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return tDe(this),this._modelViewInfiniteProjection}},normal:{get:function(){return nDe(this),this._normal}},normal3D:{get:function(){return iDe(this),this._normal3D}},inverseNormal:{get:function(){return oDe(this),this._inverseNormal}},inverseNormal3D:{get:function(){return rDe(this),this._inverseNormal3D}},entireFrustum:{get:function(){return this._entireFrustum}},currentFrustum:{get:function(){return this._currentFrustum}},frustumPlanes:{get:function(){return this._frustumPlanes}},farDepthFromNearPlusOne:{get:function(){return this._farDepthFromNearPlusOne}},log2FarDepthFromNearPlusOne:{get:function(){return this._log2FarDepthFromNearPlusOne}},oneOverLog2FarDepthFromNearPlusOne:{get:function(){return this._oneOverLog2FarDepthFromNearPlusOne}},eyeHeight:{get:function(){return this._eyeHeight}},eyeHeight2D:{get:function(){return this._eyeHeight2D}},eyeEllipsoidNormalEC:{get:function(){return this._eyeEllipsoidNormalEC}},eyeEllipsoidCurvature:{get:function(){return this._eyeEllipsoidCurvature}},modelToEnu:{get:function(){return this._modelToEnu}},enuToModel:{get:function(){return this._enuToModel}},sunPositionWC:{get:function(){return this._sunPositionWC}},sunPositionColumbusView:{get:function(){return this._sunPositionColumbusView}},sunDirectionWC:{get:function(){return this._sunDirectionWC}},sunDirectionEC:{get:function(){return this._sunDirectionEC}},moonDirectionEC:{get:function(){return this._moonDirectionEC}},lightDirectionWC:{get:function(){return this._lightDirectionWC}},lightDirectionEC:{get:function(){return this._lightDirectionEC}},lightColor:{get:function(){return this._lightColor}},lightColorHdr:{get:function(){return this._lightColorHdr}},encodedCameraPositionMCHigh:{get:function(){return vJ(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return vJ(this),this._encodedCameraPositionMC.low}},temeToPseudoFixedMatrix:{get:function(){return this._temeToPseudoFixed}},pixelRatio:{get:function(){return this._pixelRatio}},fogDensity:{get:function(){return this._fogDensity}},fogVisualDensityScalar:{get:function(){return this._fogVisualDensityScalar}},fogMinimumBrightness:{get:function(){return this._fogMinimumBrightness}},atmosphereHsbShift:{get:function(){return this._atmosphereHsbShift}},atmosphereLightIntensity:{get:function(){return this._atmosphereLightIntensity}},atmosphereRayleighCoefficient:{get:function(){return this._atmosphereRayleighCoefficient}},atmosphereRayleighScaleHeight:{get:function(){return this._atmosphereRayleighScaleHeight}},atmosphereMieCoefficient:{get:function(){return this._atmosphereMieCoefficient}},atmosphereMieScaleHeight:{get:function(){return this._atmosphereMieScaleHeight}},atmosphereMieAnisotropy:{get:function(){return this._atmosphereMieAnisotropy}},atmosphereDynamicLighting:{get:function(){return this._atmosphereDynamicLighting}},geometricToleranceOverMeter:{get:function(){return this._geometricToleranceOverMeter}},pass:{get:function(){return this._pass}},backgroundColor:{get:function(){return this._backgroundColor}},brdfLut:{get:function(){return this._brdfLut}},environmentMap:{get:function(){return this._environmentMap}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps}},specularEnvironmentMapsMaximumLOD:{get:function(){return this._specularEnvironmentMapsMaximumLOD}},splitPosition:{get:function(){return this._splitPosition}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance}},invertClassificationColor:{get:function(){return this._invertClassificationColor}},orthographicIn3D:{get:function(){return this._orthographicIn3D}},ellipsoid:{get:function(){return g(this._ellipsoid,Z.default)}}});function Lve(e,t){N.clone(t,e._view),N.getMatrix3(t,e._viewRotation),e._view3DDirty=!0,e._inverseView3DDirty=!0,e._modelViewDirty=!0,e._modelView3DDirty=!0,e._modelViewRelativeToEyeDirty=!0,e._inverseModelViewDirty=!0,e._inverseModelView3DDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._modelViewInfiniteProjectionDirty=!0,e._normalDirty=!0,e._inverseNormalDirty=!0,e._normal3DDirty=!0,e._inverseNormal3DDirty=!0}function Nve(e,t){N.clone(t,e._inverseView),N.getMatrix3(t,e._inverseViewRotation)}function Fve(e,t){N.clone(t,e._projection),e._inverseProjectionDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0}function Bve(e,t){N.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}var wJ=new d,kve=new N;function Uve(e,t){d.clone(t.positionWC,e._cameraPosition),d.clone(t.directionWC,e._cameraDirection),d.clone(t.rightWC,e._cameraRight),d.clone(t.upWC,e._cameraUp);let n=e._ellipsoid,i,o=t.positionCartographic;if(c(o)?(e._eyeHeight=o.height,e._eyeEllipsoidNormalEC=n.geodeticSurfaceNormalCartographic(o,e._eyeEllipsoidNormalEC),i=d.fromRadians(o.longitude,o.latitude,0,n,wJ)):(e._eyeHeight=-n.maximumRadius,d.magnitude(t.positionWC)>0&&(e._eyeEllipsoidNormalEC=d.normalize(t.positionWC,e._eyeEllipsoidNormalEC)),i=n.scaleToGeodeticSurface(t.positionWC,wJ)),e._encodedCameraPositionMCDirty=!0,!c(i))return;e._eyeEllipsoidNormalEC=q.multiplyByVector(e._viewRotation,e._eyeEllipsoidNormalEC,e._eyeEllipsoidNormalEC);let r=Lt.eastNorthUpToFixedFrame(i,n,kve);e._enuToModel=N.multiplyTransformation(e.inverseModel,r,e._enuToModel),e._modelToEnu=N.inverseTransformation(e._enuToModel,e._modelToEnu),O.equalsEpsilon(n._radii.x,n._radii.y,O.EPSILON15)&&(e._eyeEllipsoidCurvature=n.getLocalCurvature(i,e._eyeEllipsoidCurvature))}var v8=new q,zve=new re;function Vve(e,t){Lt.computeIcrfToCentralBodyFixedMatrix(t.time,v8);let n=ob.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);q.multiplyByVector(v8,n,n),d.normalize(n,e._sunDirectionWC),n=q.multiplyByVector(e.viewRotation3D,n,e._sunDirectionEC),d.normalize(n,n),n=ob.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),q.multiplyByVector(v8,n,n),q.multiplyByVector(e.viewRotation3D,n,n),d.normalize(n,n);let i=t.mapProjection,r=i.ellipsoid.cartesianToCartographic(e._sunPositionWC,zve);i.project(r,e._sunPositionColumbusView)}Yx.prototype.updateCamera=function(e){Lve(this,e.viewMatrix),Nve(this,e.inverseViewMatrix),Uve(this,e),this._entireFrustum.x=e.frustum.near,this._entireFrustum.y=e.frustum.far,this.updateFrustum(e.frustum),this._orthographicIn3D=this._mode!==J.SCENE2D&&e.frustum instanceof an};Yx.prototype.updateFrustum=function(e){Fve(this,e.projectionMatrix),c(e.infiniteProjectionMatrix)&&Bve(this,e.infiniteProjectionMatrix),this._currentFrustum.x=e.near,this._currentFrustum.y=e.far,this._farDepthFromNearPlusOne=e.far-e.near+1,this._log2FarDepthFromNearPlusOne=O.log2(this._farDepthFromNearPlusOne),this._oneOverLog2FarDepthFromNearPlusOne=1/this._log2FarDepthFromNearPlusOne;let t=e.offCenterFrustum;c(t)&&(e=t),this._frustumPlanes.x=e.top,this._frustumPlanes.y=e.bottom,this._frustumPlanes.z=e.left,this._frustumPlanes.w=e.right};Yx.prototype.updatePass=function(e){this._pass=e};var Hve=[],Gve=new g_;Yx.prototype.update=function(e){this._mode=e.mode,this._mapProjection=e.mapProjection,this._ellipsoid=e.mapProjection.ellipsoid,this._pixelRatio=e.pixelRatio;let t=e.camera;this.updateCamera(t),e.mode===J.SCENE2D?(this._frustum2DWidth=t.frustum.right-t.frustum.left,this._eyeHeight2D.x=this._frustum2DWidth*.5,this._eyeHeight2D.y=this._eyeHeight2D.x*this._eyeHeight2D.x):(this._frustum2DWidth=0,this._eyeHeight2D.x=0,this._eyeHeight2D.y=0),Vve(this,e);let n=g(e.light,Gve);n instanceof g_?(this._lightDirectionWC=d.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=d.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=d.normalize(d.negate(n.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=q.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));let i=n.color,o=d.fromElements(i.red,i.green,i.blue,this._lightColorHdr);o=d.multiplyByScalar(o,n.intensity,o);let r=d.maximumComponent(o);r>1?d.divideByScalar(o,r,this._lightColor):d.clone(o,this._lightColor);let s=e.brdfLutGenerator,a=c(s)?s.colorTexture:void 0;this._brdfLut=a,this._environmentMap=g(e.environmentMap,e.context.defaultCubeMap),this._sphericalHarmonicCoefficients=g(e.sphericalHarmonicCoefficients,Hve),this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapsMaximumLOD=e.specularEnvironmentMapsMaximumLOD,this._fogDensity=e.fog.density,this._fogVisualDensityScalar=e.fog.visualDensityScalar,this._fogMinimumBrightness=e.fog.minimumBrightness;let l=e.atmosphere;c(l)&&(this._atmosphereHsbShift=d.fromElements(l.hueShift,l.saturationShift,l.brightnessShift,this._atmosphereHsbShift),this._atmosphereLightIntensity=l.lightIntensity,this._atmosphereRayleighCoefficient=d.clone(l.rayleighCoefficient,this._atmosphereRayleighCoefficient),this._atmosphereRayleighScaleHeight=l.rayleighScaleHeight,this._atmosphereMieCoefficient=d.clone(l.mieCoefficient,this._atmosphereMieCoefficient),this._atmosphereMieScaleHeight=l.mieScaleHeight,this._atmosphereMieAnisotropy=l.mieAnisotropy,this._atmosphereDynamicLighting=l.dynamicLighting),this._invertClassificationColor=e.invertClassificationColor,this._frameState=e,this._temeToPseudoFixed=Lt.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._splitPosition=e.splitPosition*e.context.drawingBufferWidth;let u=t.frustum.fov,f=this._viewport,h;c(u)?f.height>f.width?h=Math.tan(.5*u)*2/f.height:h=Math.tan(.5*u)*2/f.width:h=1/Math.max(f.width,f.height),this._geometricToleranceOverMeter=h*e.maximumScreenSpaceError,z.clone(e.backgroundColor,this._backgroundColor),this._minimumDisableDepthTestDistance=e.minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance*=this._minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance===Number.POSITIVE_INFINITY&&(this._minimumDisableDepthTestDistance=-1)};function SJ(e){if(e._viewportDirty){let t=e._viewport;N.computeOrthographicOffCenter(t.x,t.x+t.width,t.y,t.y+t.height,0,1,e._viewportOrthographicMatrix),N.computeViewportTransformation(t,0,1,e._viewportTransformation),e._viewportDirty=!1}}function jve(e){e._inverseProjectionDirty&&(e._inverseProjectionDirty=!1,e._mode!==J.SCENE2D&&e._mode!==J.MORPHING&&!e._orthographicIn3D?N.inverse(e._projection,e._inverseProjection):N.clone(N.ZERO,e._inverseProjection))}function Wve(e){e._modelViewDirty&&(e._modelViewDirty=!1,N.multiplyTransformation(e._view,e._model,e._modelView))}function qve(e){e._modelView3DDirty&&(e._modelView3DDirty=!1,N.multiplyTransformation(e.view3D,e._model,e._modelView3D))}function Yve(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,N.inverse(e.modelView,e._inverseModelView))}function Xve(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,N.inverse(e.modelView3D,e._inverseModelView3D))}function Kve(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,N.multiply(e._projection,e._view,e._viewProjection))}function $ve(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,N.inverse(e.viewProjection,e._inverseViewProjection))}function Zve(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,N.multiply(e._projection,e.modelView,e._modelViewProjection))}function Jve(e){if(e._modelViewRelativeToEyeDirty){e._modelViewRelativeToEyeDirty=!1;let t=e.modelView,n=e._modelViewRelativeToEye;n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=0,n[13]=0,n[14]=0,n[15]=t[15]}}function Qve(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,N.inverse(e.modelViewProjection,e._inverseModelViewProjection))}function eDe(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,N.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}function tDe(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,N.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}function nDe(e){if(e._normalDirty){e._normalDirty=!1;let t=e._normal;N.getMatrix3(e.inverseModelView,t),q.transpose(t,t)}}function iDe(e){if(e._normal3DDirty){e._normal3DDirty=!1;let t=e._normal3D;N.getMatrix3(e.inverseModelView3D,t),q.transpose(t,t)}}function oDe(e){if(e._inverseNormalDirty){e._inverseNormalDirty=!1;let t=e._inverseNormal;N.getMatrix3(e.modelView,t),q.transpose(t,t)}}function rDe(e){if(e._inverseNormal3DDirty){e._inverseNormal3DDirty=!1;let t=e._inverseNormal3D;N.getMatrix3(e.modelView3D,t),q.transpose(t,t)}}var AJ=new d;function vJ(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,N.multiplyByPoint(e.inverseModel,e._cameraPosition,AJ),kn.fromCartesian(AJ,e._encodedCameraPositionMC))}var sDe=new d,aDe=new d,cDe=new d,lDe=new d,uDe=new re,fDe=new d,dDe=new N;function hDe(e,t,n,i,o,r,s,a){let l=sDe;l.x=e.y,l.y=e.z,l.z=e.x;let u=aDe;u.x=n.y,u.y=n.z,u.z=n.x;let f=cDe;f.x=i.y,f.y=i.z,f.z=i.x;let h=lDe;h.x=t.y,h.y=t.z,h.z=t.x,r===J.SCENE2D&&(l.z=o*.5);let m=s.unproject(l,uDe);m.longitude=O.clamp(m.longitude,-Math.PI,Math.PI),m.latitude=O.clamp(m.latitude,-O.PI_OVER_TWO,O.PI_OVER_TWO);let p=s.ellipsoid,_=p.cartographicToCartesian(m,fDe),b=Lt.eastNorthUpToFixedFrame(_,p,dDe);return N.multiplyByPointAsVector(b,u,u),N.multiplyByPointAsVector(b,f,f),N.multiplyByPointAsVector(b,h,h),c(a)||(a=new N),a[0]=u.x,a[1]=f.x,a[2]=-h.x,a[3]=0,a[4]=u.y,a[5]=f.y,a[6]=-h.y,a[7]=0,a[8]=u.z,a[9]=f.z,a[10]=-h.z,a[11]=0,a[12]=-d.dot(u,_),a[13]=-d.dot(f,_),a[14]=d.dot(h,_),a[15]=1,a}function D8(e){e._view3DDirty&&(e._mode===J.SCENE3D?N.clone(e._view,e._view3D):hDe(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),N.getMatrix3(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function DJ(e){e._inverseView3DDirty&&(N.inverseTransformation(e.view3D,e._inverseView3D),N.getMatrix3(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}var iM=Yx;function Ol(e,t){C.defined("canvas",e);let{getWebGLStub:n,requestWebgl1:i,webgl:o={},allowTextureFilterAnisotropic:r=!0}=g(t,{});o.alpha=g(o.alpha,!1),o.stencil=g(o.stencil,!0),o.powerPreference=g(o.powerPreference,"high-performance");let s=c(n)?n(e,o):mDe(e,o,i),l=typeof WebGL2RenderingContext!="undefined"&&s instanceof WebGL2RenderingContext;this._canvas=e,this._originalGLContext=s,this._gl=s,this._webgl2=l,this._id=Bn(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new J1(this),this._textureCache=new eM;let u=s;this._stencilBits=u.getParameter(u.STENCIL_BITS),ht._maximumCombinedTextureImageUnits=u.getParameter(u.MAX_COMBINED_TEXTURE_IMAGE_UNITS),ht._maximumCubeMapSize=u.getParameter(u.MAX_CUBE_MAP_TEXTURE_SIZE),ht._maximumFragmentUniformVectors=u.getParameter(u.MAX_FRAGMENT_UNIFORM_VECTORS),ht._maximumTextureImageUnits=u.getParameter(u.MAX_TEXTURE_IMAGE_UNITS),ht._maximumRenderbufferSize=u.getParameter(u.MAX_RENDERBUFFER_SIZE),ht._maximumTextureSize=u.getParameter(u.MAX_TEXTURE_SIZE),ht._maximumVaryingVectors=u.getParameter(u.MAX_VARYING_VECTORS),ht._maximumVertexAttributes=u.getParameter(u.MAX_VERTEX_ATTRIBS),ht._maximumVertexTextureImageUnits=u.getParameter(u.MAX_VERTEX_TEXTURE_IMAGE_UNITS),ht._maximumVertexUniformVectors=u.getParameter(u.MAX_VERTEX_UNIFORM_VECTORS),ht._maximumSamples=this._webgl2?u.getParameter(u.MAX_SAMPLES):0;let f=u.getParameter(u.ALIASED_LINE_WIDTH_RANGE);ht._minimumAliasedLineWidth=f[0],ht._maximumAliasedLineWidth=f[1];let h=u.getParameter(u.ALIASED_POINT_SIZE_RANGE);ht._minimumAliasedPointSize=h[0],ht._maximumAliasedPointSize=h[1];let m=u.getParameter(u.MAX_VIEWPORT_DIMS);ht._maximumViewportWidth=m[0],ht._maximumViewportHeight=m[1];let p=u.getShaderPrecisionFormat(u.FRAGMENT_SHADER,u.HIGH_FLOAT);ht._highpFloatSupported=p.precision!==0;let _=u.getShaderPrecisionFormat(u.FRAGMENT_SHADER,u.HIGH_INT);ht._highpIntSupported=_.rangeMax!==0,this._antialias=u.getContextAttributes().antialias,this._standardDerivatives=!!sr(u,["OES_standard_derivatives"]),this._blendMinmax=!!sr(u,["EXT_blend_minmax"]),this._elementIndexUint=!!sr(u,["OES_element_index_uint"]),this._depthTexture=!!sr(u,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),this._fragDepth=!!sr(u,["EXT_frag_depth"]),this._debugShaders=sr(u,["WEBGL_debug_shaders"]),this._textureFloat=!!sr(u,["OES_texture_float"]),this._textureHalfFloat=!!sr(u,["OES_texture_half_float"]),this._textureFloatLinear=!!sr(u,["OES_texture_float_linear"]),this._textureHalfFloatLinear=!!sr(u,["OES_texture_half_float_linear"]),this._supportsTextureLod=!!sr(u,["EXT_shader_texture_lod"]),this._colorBufferFloat=!!sr(u,["EXT_color_buffer_float","WEBGL_color_buffer_float"]),this._floatBlend=!!sr(u,["EXT_float_blend"]),this._colorBufferHalfFloat=!!sr(u,["EXT_color_buffer_half_float"]),this._s3tc=!!sr(u,["WEBGL_compressed_texture_s3tc","MOZ_WEBGL_compressed_texture_s3tc","WEBKIT_WEBGL_compressed_texture_s3tc"]),this._pvrtc=!!sr(u,["WEBGL_compressed_texture_pvrtc","WEBKIT_WEBGL_compressed_texture_pvrtc"]),this._astc=!!sr(u,["WEBGL_compressed_texture_astc"]),this._etc=!!sr(u,["WEBG_compressed_texture_etc"]),this._etc1=!!sr(u,["WEBGL_compressed_texture_etc1"]),this._bc7=!!sr(u,["EXT_texture_compression_bptc"]),vl.setKTX2SupportedFormats(this._s3tc,this._pvrtc,this._astc,this._etc,this._etc1,this._bc7);let b=r?sr(u,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;this._textureFilterAnisotropic=b,ht._maximumTextureFilterAnisotropy=c(b)?u.getParameter(b.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1;let x,T,E,S,A,v,D,R,P,L;if(l){let M=this;x=function(){return M._gl.createVertexArray()},T=function(B){M._gl.bindVertexArray(B)},E=function(B){M._gl.deleteVertexArray(B)},S=function(B,U,V,W,H){u.drawElementsInstanced(B,U,V,W,H)},A=function(B,U,V,W){u.drawArraysInstanced(B,U,V,W)},v=function(B,U){u.vertexAttribDivisor(B,U)},D=function(B){u.drawBuffers(B)}}else R=sr(u,["OES_vertex_array_object"]),c(R)&&(x=function(){return R.createVertexArrayOES()},T=function(M){R.bindVertexArrayOES(M)},E=function(M){R.deleteVertexArrayOES(M)}),P=sr(u,["ANGLE_instanced_arrays"]),c(P)&&(S=function(M,B,U,V,W){P.drawElementsInstancedANGLE(M,B,U,V,W)},A=function(M,B,U,V){P.drawArraysInstancedANGLE(M,B,U,V)},v=function(M,B){P.vertexAttribDivisorANGLE(M,B)}),L=sr(u,["WEBGL_draw_buffers"]),c(L)&&(D=function(M){L.drawBuffersWEBGL(M)});this.glCreateVertexArray=x,this.glBindVertexArray=T,this.glDeleteVertexArray=E,this.glDrawElementsInstanced=S,this.glDrawArraysInstanced=A,this.glVertexAttribDivisor=v,this.glDrawBuffers=D,this._vertexArrayObject=!!R,this._instancedArrays=!!P,this._drawBuffers=!!L,ht._maximumDrawBuffers=this.drawBuffers?u.getParameter(Y.MAX_DRAW_BUFFERS):1,ht._maximumColorAttachments=this.drawBuffers?u.getParameter(Y.MAX_COLOR_ATTACHMENTS):1,this._clearColor=new z(0,0,0,0),this._clearDepth=1,this._clearStencil=0;let F=new iM,y=new ic(this),I=Fe.fromCache();this._defaultPassState=y,this._defaultRenderState=I,this._defaultTexture=void 0,this._defaultEmissiveTexture=void 0,this._defaultNormalTexture=void 0,this._defaultCubeMap=void 0,this._us=F,this._currentRenderState=I,this._currentPassState=y,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(let M=0;M<ht._maximumVertexAttributes;M++)this._vertexAttribDivisors.push(0);this._pickObjects={},this._nextPickColor=new Uint32Array(1),this.options={getWebGLStub:n,requestWebgl1:i,webgl:o,allowTextureFilterAnisotropic:r},this.cache={},Fe.apply(u,I,y)}function mDe(e,t,n){if(typeof WebGLRenderingContext=="undefined")throw new ie("The browser does not support WebGL. Visit http://get.webgl.org.");!n&&!(typeof WebGL2RenderingContext!="undefined")&&(n=!0);let o=n?"webgl":"webgl2",r=e.getContext(o,t);if(!c(r))throw new ie("The browser supports WebGL, but initialization failed.");return r}function pDe(e,t){let n="WebGL Error: ";switch(t){case e.INVALID_ENUM:n+="INVALID_ENUM";break;case e.INVALID_VALUE:n+="INVALID_VALUE";break;case e.INVALID_OPERATION:n+="INVALID_OPERATION";break;case e.OUT_OF_MEMORY:n+="OUT_OF_MEMORY";break;case e.CONTEXT_LOST_WEBGL:n+="CONTEXT_LOST_WEBGL lost";break;default:n+=`Unknown (${t})`}return n}function _De(e,t,n,i){let o=`${pDe(e,i)}: ${t.name}(`;for(let r=0;r<n.length;++r)r!==0&&(o+=", "),o+=n[r];return o+=");",o}function gDe(e,t,n){let i=e.getError();if(i!==e.NO_ERROR)throw new ie(_De(e,t,n,i))}function yDe(e,t,n){return{get:function(){let i=e[t];return n(e,`get: ${t}`,i),e[t]},set:function(i){e[t]=i,n(e,`set: ${t}`,i)}}}function bDe(e,t){if(!c(t))return e;function n(o){return function(){let r=o.apply(e,arguments);return t(e,o,arguments),r}}let i={};for(let o in e){let r=e[o];r instanceof Function?i[o]=n(r):Object.defineProperty(i,o,yDe(e,o,t))}return i}function sr(e,t){let n=t.length;for(let i=0;i<n;++i){let o=e.getExtension(t[i]);if(o)return o}}var xDe={};Object.defineProperties(Ol.prototype,{id:{get:function(){return this._id}},webgl2:{get:function(){return this._webgl2}},canvas:{get:function(){return this._canvas}},shaderCache:{get:function(){return this._shaderCache}},textureCache:{get:function(){return this._textureCache}},uniformState:{get:function(){return this._us}},stencilBits:{get:function(){return this._stencilBits}},stencilBuffer:{get:function(){return this._stencilBits>=8}},antialias:{get:function(){return this._antialias}},msaa:{get:function(){return this._webgl2}},standardDerivatives:{get:function(){return this._standardDerivatives||this._webgl2}},floatBlend:{get:function(){return this._floatBlend}},blendMinmax:{get:function(){return this._blendMinmax||this._webgl2}},elementIndexUint:{get:function(){return this._elementIndexUint||this._webgl2}},depthTexture:{get:function(){return this._depthTexture||this._webgl2}},floatingPointTexture:{get:function(){return this._webgl2||this._textureFloat}},halfFloatingPointTexture:{get:function(){return this._webgl2||this._textureHalfFloat}},textureFloatLinear:{get:function(){return this._textureFloatLinear}},textureHalfFloatLinear:{get:function(){return this._webgl2&&this._textureFloatLinear||!this._webgl2&&this._textureHalfFloatLinear}},supportsTextureLod:{get:function(){return this._webgl2||this._supportsTextureLod}},textureFilterAnisotropic:{get:function(){return!!this._textureFilterAnisotropic}},s3tc:{get:function(){return this._s3tc}},pvrtc:{get:function(){return this._pvrtc}},astc:{get:function(){return this._astc}},etc:{get:function(){return this._etc}},etc1:{get:function(){return this._etc1}},bc7:{get:function(){return this._bc7}},supportsBasis:{get:function(){return this._s3tc||this._pvrtc||this._astc||this._etc||this._etc1||this._bc7}},vertexArrayObject:{get:function(){return this._vertexArrayObject||this._webgl2}},fragmentDepth:{get:function(){return this._fragDepth||this._webgl2}},instancedArrays:{get:function(){return this._instancedArrays||this._webgl2}},colorBufferFloat:{get:function(){return this._colorBufferFloat}},colorBufferHalfFloat:{get:function(){return this._webgl2&&this._colorBufferFloat||!this._webgl2&&this._colorBufferHalfFloat}},drawBuffers:{get:function(){return this._drawBuffers||this._webgl2}},debugShaders:{get:function(){return this._debugShaders}},throwOnWebGLError:{get:function(){return this._throwOnWebGLError},set:function(e){this._throwOnWebGLError=e,this._gl=bDe(this._originalGLContext,e?gDe:void 0)}},defaultTexture:{get:function(){return this._defaultTexture===void 0&&(this._defaultTexture=new Ot({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1})),this._defaultTexture}},defaultEmissiveTexture:{get:function(){return this._defaultEmissiveTexture===void 0&&(this._defaultEmissiveTexture=new Ot({context:this,pixelFormat:Re.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([0,0,0])},flipY:!1})),this._defaultEmissiveTexture}},defaultNormalTexture:{get:function(){return this._defaultNormalTexture===void 0&&(this._defaultNormalTexture=new Ot({context:this,pixelFormat:Re.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([128,128,255])},flipY:!1})),this._defaultNormalTexture}},defaultCubeMap:{get:function(){if(this._defaultCubeMap===void 0){let e={width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])};this._defaultCubeMap=new Lo({context:this,source:{positiveX:e,negativeX:e,positiveY:e,negativeY:e,positiveZ:e,negativeZ:e},flipY:!1})}return this._defaultCubeMap}},drawingBufferHeight:{get:function(){return this._gl.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._gl.drawingBufferWidth}},defaultFramebuffer:{get:function(){return xDe}}});function TDe(e){if(e.validateFramebuffer){let t=e._gl,n=t.checkFramebufferStatus(t.FRAMEBUFFER);if(n!==t.FRAMEBUFFER_COMPLETE){let i;switch(n){case t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:i="Framebuffer is not complete. Incomplete attachment: at least one attachment point with a renderbuffer or texture attached has its attached object no longer in existence or has an attached image with a width or height of zero, or the color attachment point has a non-color-renderable image attached, or the depth attachment point has a non-depth-renderable image attached, or the stencil attachment point has a non-stencil-renderable image attached. Color-renderable formats include GL_RGBA4, GL_RGB5_A1, and GL_RGB565. GL_DEPTH_COMPONENT16 is the only depth-renderable format. GL_STENCIL_INDEX8 is the only stencil-renderable format.";break;case t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:i="Framebuffer is not complete. Incomplete dimensions: not all attached images have the same width and height.";break;case t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:i="Framebuffer is not complete. Missing attachment: no images are attached to the framebuffer.";break;case t.FRAMEBUFFER_UNSUPPORTED:i="Framebuffer is not complete. Unsupported: the combination of internal formats of the attached images violates an implementation-dependent set of restrictions.";break}throw new w(i)}}}function IJ(e,t,n,i){let o=e._currentRenderState,r=e._currentPassState;e._currentRenderState=t,e._currentPassState=n,Fe.partialApply(e._gl,o,t,r,n,i)}var I8;typeof WebGLRenderingContext!="undefined"&&(I8=[Y.BACK]);function O8(e,t){if(t!==e._currentFramebuffer){e._currentFramebuffer=t;let n=I8;if(c(t))t._bind(),TDe(e),n=t._getActiveColorAttachments();else{let i=e._gl;i.bindFramebuffer(i.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(n)}}var CDe=new $n;Ol.prototype.clear=function(e,t){e=g(e,CDe),t=g(t,this._defaultPassState);let n=this._gl,i=0,o=e.color,r=e.depth,s=e.stencil;c(o)&&(z.equals(this._clearColor,o)||(z.clone(o,this._clearColor),n.clearColor(o.red,o.green,o.blue,o.alpha)),i|=n.COLOR_BUFFER_BIT),c(r)&&(r!==this._clearDepth&&(this._clearDepth=r,n.clearDepth(r)),i|=n.DEPTH_BUFFER_BIT),c(s)&&(s!==this._clearStencil&&(this._clearStencil=s,n.clearStencil(s)),i|=n.STENCIL_BUFFER_BIT);let a=g(e.renderState,this._defaultRenderState);IJ(this,a,t,!0);let l=g(e.framebuffer,t.framebuffer);O8(this,l),n.clear(i)};function EDe(e,t,n,i,o){if(c(t)&&o.depthTest&&o.depthTest.enabled&&!t.hasDepthAttachment)throw new w("The depth test can not be enabled (drawCommand.renderState.depthTest.enabled) because the framebuffer (drawCommand.framebuffer) does not have a depth or depth-stencil renderbuffer.");O8(e,t),IJ(e,o,n,!1),i._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,i.maximumTextureUnitIndex)}function wDe(e,t,n,i){let o=t._primitiveType,r=t._vertexArray,s=t._offset,a=t._count,l=t.instanceCount;if(!Se.validate(o))throw new w("drawCommand.primitiveType is required and must be valid.");if(C.defined("drawCommand.vertexArray",r),C.typeOf.number.greaterThanOrEquals("drawCommand.offset",s,0),c(a)&&C.typeOf.number.greaterThanOrEquals("drawCommand.count",a,0),C.typeOf.number.greaterThanOrEquals("drawCommand.instanceCount",l,0),l>0&&!e.instancedArrays)throw new w("Instanced arrays extension is not supported");e._us.model=g(t._modelMatrix,N.IDENTITY),n._setUniforms(i,e._us,e.validateShaderProgram),r._bind();let u=r.indexBuffer;c(u)?(s=s*u.bytesPerIndex,c(a)?a=Math.min(a,u.numberOfIndices):a=u.numberOfIndices,l===0?e._gl.drawElements(o,a,u.indexDatatype,s):e.glDrawElementsInstanced(o,a,u.indexDatatype,s,l)):(c(a)?a=Math.min(a,r.numberOfVertices):a=r.numberOfVertices,l===0?e._gl.drawArrays(o,s,a):e.glDrawArraysInstanced(o,s,a,l)),r._unBind()}Ol.prototype.draw=function(e,t,n,i){C.defined("drawCommand",e),C.defined("drawCommand.shaderProgram",e._shaderProgram),t=g(t,this._defaultPassState);let o=g(e._framebuffer,t.framebuffer),r=g(e._renderState,this._defaultRenderState);n=g(n,e._shaderProgram),i=g(i,e._uniformMap),EDe(this,o,t,n,r),wDe(this,e,n,i)};Ol.prototype.endFrame=function(){let e=this._gl;e.useProgram(null),this._currentFramebuffer=void 0,e.bindFramebuffer(e.FRAMEBUFFER,null);let t=I8;this.drawBuffers&&this.glDrawBuffers(t);let n=this._maxFrameTextureUnitIndex;this._maxFrameTextureUnitIndex=0;for(let i=0;i<n;++i)e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,null),e.bindTexture(e.TEXTURE_CUBE_MAP,null)};Ol.prototype.readPixels=function(e){let t=this._gl;e=g(e,g.EMPTY_OBJECT);let n=Math.max(g(e.x,0),0),i=Math.max(g(e.y,0),0),o=g(e.width,t.drawingBufferWidth),r=g(e.height,t.drawingBufferHeight),s=e.framebuffer;C.typeOf.number.greaterThan("readState.width",o,0),C.typeOf.number.greaterThan("readState.height",r,0);let a=Ne.UNSIGNED_BYTE;c(s)&&s.numberOfColorAttachments>0&&(a=s.getColorTexture(0).pixelDatatype);let l=Re.createTypedArray(Re.RGBA,a,o,r);return O8(this,s),t.readPixels(n,i,o,r,Re.RGBA,Ne.toWebGLConstant(a,this),l),l};var OJ={position:0,textureCoordinates:1};Ol.prototype.getViewportQuadVertexArray=function(){let e=this.cache.viewportQuad_vertexArray;if(!c(e)){let t=new st({attributes:{position:new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:Se.TRIANGLES});e=Zn.fromGeometry({context:this,geometry:t,attributeLocations:OJ,bufferUsage:Pe.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=e}return e};Ol.prototype.createViewportQuadCommand=function(e,t){return t=g(t,g.EMPTY_OBJECT),new Ke({vertexArray:this.getViewportQuadVertexArray(),primitiveType:Se.TRIANGLES,renderState:t.renderState,shaderProgram:en.fromCache({context:this,vertexShaderSource:Fx,fragmentShaderSource:e,attributeLocations:OJ}),uniformMap:t.uniformMap,owner:t.owner,framebuffer:t.framebuffer,pass:t.pass})};Ol.prototype.getObjectByPickColor=function(e){return C.defined("pickColor",e),this._pickObjects[e.toRgba()]};function P8(e,t,n){this._pickObjects=e,this.key=t,this.color=n}Object.defineProperties(P8.prototype,{object:{get:function(){return this._pickObjects[this.key]},set:function(e){this._pickObjects[this.key]=e}}});P8.prototype.destroy=function(){delete this._pickObjects[this.key]};Ol.prototype.createPickId=function(e){C.defined("object",e),++this._nextPickColor[0];let t=this._nextPickColor[0];if(t===0)throw new ie("Out of unique Pick IDs.");return this._pickObjects[t]=e,new P8(this._pickObjects,t,z.fromRgba(t))};Ol.prototype.isDestroyed=function(){return!1};Ol.prototype.destroy=function(){let e=this.cache;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];c(n.destroy)&&n.destroy()}return this._shaderCache=this._shaderCache.destroy(),this._textureCache=this._textureCache.destroy(),this._defaultTexture=this._defaultTexture&&this._defaultTexture.destroy(),this._defaultEmissiveTexture=this._defaultEmissiveTexture&&this._defaultEmissiveTexture.destroy(),this._defaultNormalTexture=this._defaultNormalTexture&&this._defaultNormalTexture.destroy(),this._defaultCubeMap=this._defaultCubeMap&&this._defaultCubeMap.destroy(),ue(this)};Ol._deprecationWarning=os;var oM=Ol;function Xx(e){e=g(e,g.EMPTY_OBJECT);let{context:t,width:n,height:i,colorRenderbuffers:o,colorTextures:r,depthStencilRenderbuffer:s,depthStencilTexture:a,destroyAttachments:l}=e;if(C.defined("options.context",t),C.defined("options.width",n),C.defined("options.height",i),this._width=n,this._height=i,c(o)!==c(r))throw new w("Both color renderbuffer and texture attachments must be provided.");if(c(s)!==c(a))throw new w("Both depth-stencil renderbuffer and texture attachments must be provided.");this._renderFramebuffer=new Lr({context:t,colorRenderbuffers:o,depthStencilRenderbuffer:s,destroyAttachments:l}),this._colorFramebuffer=new Lr({context:t,colorTextures:r,depthStencilTexture:a,destroyAttachments:l})}Xx.prototype.getRenderFramebuffer=function(){return this._renderFramebuffer};Xx.prototype.getColorFramebuffer=function(){return this._colorFramebuffer};Xx.prototype.blitFramebuffers=function(e,t){this._renderFramebuffer.bindRead(),this._colorFramebuffer.bindDraw();let n=e._gl,i=0;this._colorFramebuffer._colorTextures.length>0&&(i|=n.COLOR_BUFFER_BIT),c(this._colorFramebuffer.depthStencilTexture)&&(i|=n.DEPTH_BUFFER_BIT|(t?n.STENCIL_BUFFER_BIT:0)),n.blitFramebuffer(0,0,this._width,this._height,0,0,this._width,this._height,i,n.NEAREST),n.bindFramebuffer(n.READ_FRAMEBUFFER,null),n.bindFramebuffer(n.DRAW_FRAMEBUFFER,null)};Xx.prototype.isDestroyed=function(){return!1};Xx.prototype.destroy=function(){return this._renderFramebuffer.destroy(),this._colorFramebuffer.destroy(),ue(this)};var rM=Xx;var qc={RGBA4:Y.RGBA4,RGBA8:Y.RGBA8,RGBA16F:Y.RGBA16F,RGBA32F:Y.RGBA32F,RGB5_A1:Y.RGB5_A1,RGB565:Y.RGB565,DEPTH_COMPONENT16:Y.DEPTH_COMPONENT16,STENCIL_INDEX8:Y.STENCIL_INDEX8,DEPTH_STENCIL:Y.DEPTH_STENCIL,DEPTH24_STENCIL8:Y.DEPTH24_STENCIL8,validate:function(e){return e===qc.RGBA4||e===qc.RGBA8||e===qc.RGBA16F||e===qc.RGBA32F||e===qc.RGB5_A1||e===qc.RGB565||e===qc.DEPTH_COMPONENT16||e===qc.STENCIL_INDEX8||e===qc.DEPTH_STENCIL||e===qc.DEPTH24_STENCIL8},getColorFormat:function(e){return e===Y.FLOAT?qc.RGBA32F:e===Y.HALF_FLOAT_OES?qc.RGBA16F:qc.RGBA8}},oc=Object.freeze(qc);function xS(e){e=g(e,g.EMPTY_OBJECT),C.defined("options.context",e.context);let n=e.context._gl,i=ht.maximumRenderbufferSize,o=g(e.format,oc.RGBA4),r=c(e.width)?e.width:n.drawingBufferWidth,s=c(e.height)?e.height:n.drawingBufferHeight,a=g(e.numSamples,1);if(!oc.validate(o))throw new w("Invalid format.");if(C.typeOf.number.greaterThan("width",r,0),r>i)throw new w(`Width must be less than or equal to the maximum renderbuffer size (${i}). Check maximumRenderbufferSize.`);if(C.typeOf.number.greaterThan("height",s,0),s>i)throw new w(`Height must be less than or equal to the maximum renderbuffer size (${i}). Check maximumRenderbufferSize.`);this._gl=n,this._format=o,this._width=r,this._height=s,this._renderbuffer=this._gl.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,this._renderbuffer),a>1?n.renderbufferStorageMultisample(n.RENDERBUFFER,a,o,r,s):n.renderbufferStorage(n.RENDERBUFFER,o,r,s),n.bindRenderbuffer(n.RENDERBUFFER,null)}Object.defineProperties(xS.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});xS.prototype._getRenderbuffer=function(){return this._renderbuffer};xS.prototype.isDestroyed=function(){return!1};xS.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),ue(this)};var Pu=xS;function ss(e){if(e=g(e,g.EMPTY_OBJECT),this._numSamples=g(e.numSamples,1),this._colorAttachmentsLength=g(e.colorAttachmentsLength,1),this._color=g(e.color,!0),this._depth=g(e.depth,!1),this._depthStencil=g(e.depthStencil,!1),this._supportsDepthTexture=g(e.supportsDepthTexture,!1),!this._color&&!this._depth&&!this._depthStencil)throw new w("Must enable at least one type of framebuffer attachment.");if(this._depth&&this._depthStencil)throw new w("Cannot have both a depth and depth-stencil attachment.");this._createColorAttachments=g(e.createColorAttachments,!0),this._createDepthAttachments=g(e.createDepthAttachments,!0),this._pixelDatatype=e.pixelDatatype,this._pixelFormat=e.pixelFormat,this._width=void 0,this._height=void 0,this._framebuffer=void 0,this._multisampleFramebuffer=void 0,this._colorTextures=void 0,this._color&&(this._colorTextures=new Array(this._colorAttachmentsLength),this._colorRenderbuffers=new Array(this._colorAttachmentsLength)),this._colorRenderbuffer=void 0,this._depthStencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthRenderbuffer=void 0,this._depthTexture=void 0,this._attachmentsDirty=!1}Object.defineProperties(ss.prototype,{framebuffer:{get:function(){return this._numSamples>1?this._multisampleFramebuffer.getRenderFramebuffer():this._framebuffer}},numSamples:{get:function(){return this._numSamples}},status:{get:function(){return this.framebuffer.status}}});ss.prototype.isDirty=function(e,t,n,i,o){n=g(n,1);let r=this._width!==e||this._height!==t,s=this._numSamples!==n,a=c(i)&&this._pixelDatatype!==i||c(o)&&this._pixelFormat!==o,l=n===1?c(this._framebuffer):c(this._multisampleFramebuffer);return this._attachmentsDirty||r||s||a||!l||this._color&&!c(this._colorTextures[0])};ss.prototype.update=function(e,t,n,i,o,r){if(!c(t)||!c(n))throw new w("width and height must be defined.");if(i=e.msaa?g(i,1):1,o=g(o,this._color?g(this._pixelDatatype,Ne.UNSIGNED_BYTE):void 0),r=g(r,this._color?g(this._pixelFormat,Re.RGBA):void 0),this.isDirty(t,n,i,o,r)){if(this.destroy(),this._width=t,this._height=n,this._numSamples=i,this._pixelDatatype=o,this._pixelFormat=r,this._attachmentsDirty=!1,this._color&&this._createColorAttachments){for(let s=0;s<this._colorAttachmentsLength;++s)if(this._colorTextures[s]=new Ot({context:e,width:t,height:n,pixelFormat:r,pixelDatatype:o,sampler:Jt.NEAREST}),this._numSamples>1){let a=oc.getColorFormat(o);this._colorRenderbuffers[s]=new Pu({context:e,width:t,height:n,format:a,numSamples:this._numSamples})}}this._depthStencil&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?(this._depthStencilTexture=new Ot({context:e,width:t,height:n,pixelFormat:Re.DEPTH_STENCIL,pixelDatatype:Ne.UNSIGNED_INT_24_8,sampler:Jt.NEAREST}),this._numSamples>1&&(this._depthStencilRenderbuffer=new Pu({context:e,width:t,height:n,format:oc.DEPTH24_STENCIL8,numSamples:this._numSamples}))):this._depthStencilRenderbuffer=new Pu({context:e,width:t,height:n,format:oc.DEPTH_STENCIL})),this._depth&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?this._depthTexture=new Ot({context:e,width:t,height:n,pixelFormat:Re.DEPTH_COMPONENT,pixelDatatype:Ne.UNSIGNED_INT,sampler:Jt.NEAREST}):this._depthRenderbuffer=new Pu({context:e,width:t,height:n,format:oc.DEPTH_COMPONENT16})),this._numSamples>1?this._multisampleFramebuffer=new rM({context:e,width:this._width,height:this._height,colorTextures:this._colorTextures,colorRenderbuffers:this._colorRenderbuffers,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1}):this._framebuffer=new Lr({context:e,colorTextures:this._colorTextures,depthTexture:this._depthTexture,depthRenderbuffer:this._depthRenderbuffer,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1})}};ss.prototype.getColorTexture=function(e){if(e=g(e,0),e>=this._colorAttachmentsLength)throw new w("index must be smaller than total number of color attachments.");return this._colorTextures[e]};ss.prototype.setColorTexture=function(e,t){if(t=g(t,0),this._createColorAttachments)throw new w("createColorAttachments must be false if setColorTexture is called.");if(t>=this._colorAttachmentsLength)throw new w("index must be smaller than total number of color attachments.");this._attachmentsDirty=e!==this._colorTextures[t],this._colorTextures[t]=e};ss.prototype.getColorRenderbuffer=function(e){if(e=g(e,0),e>=this._colorAttachmentsLength)throw new w("index must be smaller than total number of color attachments.");return this._colorRenderbuffers[e]};ss.prototype.setColorRenderbuffer=function(e,t){if(t=g(t,0),this._createColorAttachments)throw new w("createColorAttachments must be false if setColorRenderbuffer is called.");if(t>=this._colorAttachmentsLength)throw new w("index must be smaller than total number of color attachments.");this._attachmentsDirty=e!==this._colorRenderbuffers[t],this._colorRenderbuffers[t]=e};ss.prototype.getDepthRenderbuffer=function(){return this._depthRenderbuffer};ss.prototype.setDepthRenderbuffer=function(e){if(this._createDepthAttachments)throw new w("createDepthAttachments must be false if setDepthRenderbuffer is called.");this._attachmentsDirty=e!==this._depthRenderbuffer,this._depthRenderbuffer=e};ss.prototype.getDepthTexture=function(){return this._depthTexture};ss.prototype.setDepthTexture=function(e){if(this._createDepthAttachments)throw new w("createDepthAttachments must be false if setDepthTexture is called.");this._attachmentsDirty=e!==this._depthTexture,this._depthTexture=e};ss.prototype.getDepthStencilRenderbuffer=function(){return this._depthStencilRenderbuffer};ss.prototype.setDepthStencilRenderbuffer=function(e){if(this._createDepthAttachments)throw new w("createDepthAttachments must be false if setDepthStencilRenderbuffer is called.");this._attachmentsDirty=e!==this._depthStencilRenderbuffer,this._depthStencilRenderbuffer=e};ss.prototype.getDepthStencilTexture=function(){return this._depthStencilTexture};ss.prototype.setDepthStencilTexture=function(e){if(this._createDepthAttachments)throw new w("createDepthAttachments must be false if setDepthStencilTexture is called.");this._attachmentsDirty=e!==this._depthStencilTexture,this._depthStencilTexture=e};ss.prototype.prepareTextures=function(e,t){this._numSamples>1&&this._multisampleFramebuffer.blitFramebuffers(e,t)};ss.prototype.clear=function(e,t,n){let i=t.framebuffer;t.framebuffer=this.framebuffer,t.execute(e,n),t.framebuffer=i};ss.prototype.destroyFramebuffer=function(){this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._multisampleFramebuffer=this._multisampleFramebuffer&&this._multisampleFramebuffer.destroy()};ss.prototype.destroy=function(){if(this._color){let e=this._colorTextures,t=this._colorRenderbuffers;for(let n=0;n<e.length;++n){let i=e[n];this._createColorAttachments&&c(i)&&!i.isDestroyed()&&i.destroy(),c(i)&&i.isDestroyed()&&(e[n]=void 0);let o=t[n];this._createColorAttachments&&c(o)&&!o.isDestroyed()&&o.destroy(),c(o)&&o.isDestroyed()&&(t[n]=void 0)}}this._depthStencil&&(this._createDepthAttachments&&(this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()),c(this._depthStencilTexture)&&this._depthStencilTexture.isDestroyed()&&(this._depthStencilTexture=void 0),c(this._depthStencilRenderbuffer)&&this._depthStencilRenderbuffer.isDestroyed()&&(this._depthStencilRenderbuffer=void 0)),this._depth&&(this._createDepthAttachments&&(this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy()),c(this._depthTexture)&&this._depthTexture.isDestroyed()&&(this._depthTexture=void 0),c(this._depthRenderbuffer)&&this._depthRenderbuffer.isDestroyed()&&(this._depthRenderbuffer=void 0)),this.destroyFramebuffer()};var ui=ss;var rb={VERTEX:0,FRAGMENT:1,BOTH:2};rb.includesVertexShader=function(e){return C.typeOf.number("destination",e),e===rb.VERTEX||e===rb.BOTH};rb.includesFragmentShader=function(e){return C.typeOf.number("destination",e),e===rb.FRAGMENT||e===rb.BOTH};var ce=Object.freeze(rb);function R8(e){this.name=e,this.fields=[]}R8.prototype.addField=function(e,t){let n=` ${e} ${t};`;this.fields.push(n)};R8.prototype.generateGlslLines=function(){let e=this.fields;return e.length===0&&(e=[" float _empty;"]),[].concat(`struct ${this.name}`,"{",e,"};")};var sM=R8;function M8(e){this.signature=e,this.body=[]}M8.prototype.addLines=function(e){if(typeof e!="string"&&!Array.isArray(e))throw new w(`Expected lines to be a string or an array of strings, actual value was ${e}`);let t=this.body;if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++)t.push(` ${e[i]}`)}else t.push(` ${e}`)};M8.prototype.generateGlslLines=function(){return[].concat(this.signature,"{",this.body,"}")};var aM=M8;function rc(){this._positionAttributeLine=void 0,this._nextAttributeLocation=1,this._attributeLocations={},this._attributeLines=[],this._structs={},this._functions={},this._vertexShaderParts={defineLines:[],uniformLines:[],shaderLines:[],varyingLines:[],structIds:[],functionIds:[]},this._fragmentShaderParts={defineLines:[],uniformLines:[],shaderLines:[],varyingLines:[],structIds:[],functionIds:[]}}Object.defineProperties(rc.prototype,{attributeLocations:{get:function(){return this._attributeLocations}}});rc.prototype.addDefine=function(e,t,n){C.typeOf.string("identifier",e),n=g(n,ce.BOTH);let i=e;c(t)&&(i+=` ${t.toString()}`),ce.includesVertexShader(n)&&this._vertexShaderParts.defineLines.push(i),ce.includesFragmentShader(n)&&this._fragmentShaderParts.defineLines.push(i)};rc.prototype.addStruct=function(e,t,n){C.typeOf.string("structId",e),C.typeOf.string("structName",t),C.typeOf.number("destination",n),this._structs[e]=new sM(t),ce.includesVertexShader(n)&&this._vertexShaderParts.structIds.push(e),ce.includesFragmentShader(n)&&this._fragmentShaderParts.structIds.push(e)};rc.prototype.addStructField=function(e,t,n){C.typeOf.string("structId",e),C.typeOf.string("type",t),C.typeOf.string("identifier",n),this._structs[e].addField(t,n)};rc.prototype.addFunction=function(e,t,n){C.typeOf.string("functionName",e),C.typeOf.string("signature",t),C.typeOf.number("destination",n),this._functions[e]=new aM(t),ce.includesVertexShader(n)&&this._vertexShaderParts.functionIds.push(e),ce.includesFragmentShader(n)&&this._fragmentShaderParts.functionIds.push(e)};rc.prototype.addFunctionLines=function(e,t){if(C.typeOf.string("functionName",e),typeof t!="string"&&!Array.isArray(t))throw new w(`Expected lines to be a string or an array of strings, actual value was ${t}`);this._functions[e].addLines(t)};rc.prototype.addUniform=function(e,t,n){C.typeOf.string("type",e),C.typeOf.string("identifier",t),n=g(n,ce.BOTH);let i=`uniform ${e} ${t};`;ce.includesVertexShader(n)&&this._vertexShaderParts.uniformLines.push(i),ce.includesFragmentShader(n)&&this._fragmentShaderParts.uniformLines.push(i)};rc.prototype.setPositionAttribute=function(e,t){if(C.typeOf.string("type",e),C.typeOf.string("identifier",t),c(this._positionAttributeLine))throw new w("setPositionAttribute() must be called exactly once for the attribute used for gl_Position. For other attributes, use addAttribute()");return this._positionAttributeLine=`in ${e} ${t};`,this._attributeLocations[t]=0,0};rc.prototype.addAttribute=function(e,t){C.typeOf.string("type",e),C.typeOf.string("identifier",t);let n=`in ${e} ${t};`;this._attributeLines.push(n);let i=this._nextAttributeLocation;return this._attributeLocations[t]=i,this._nextAttributeLocation+=ADe(e),i};rc.prototype.addVarying=function(e,t,n){C.typeOf.string("type",e),C.typeOf.string("identifier",t),n=c(n)?`${n} `:"";let i=`${e} ${t};`;this._vertexShaderParts.varyingLines.push(`${n}out ${i}`),this._fragmentShaderParts.varyingLines.push(`${n}in ${i}`)};rc.prototype.addVertexLines=function(e){if(typeof e!="string"&&!Array.isArray(e))throw new w(`Expected lines to be a string or an array of strings, actual value was ${e}`);let t=this._vertexShaderParts.shaderLines;Array.isArray(e)?t.push.apply(t,e):t.push(e)};rc.prototype.addFragmentLines=function(e){if(typeof e!="string"&&!Array.isArray(e))throw new w(`Expected lines to be a string or an array of strings, actual value was ${e}`);let t=this._fragmentShaderParts.shaderLines;Array.isArray(e)?t.push.apply(t,e):t.push(e)};rc.prototype.buildShaderProgram=function(e){C.typeOf.object("context",e);let t=c(this._positionAttributeLine)?[this._positionAttributeLine]:[],n=SDe(this),i=vDe(this),o=t.concat(this._attributeLines,this._vertexShaderParts.uniformLines,this._vertexShaderParts.varyingLines,n.vertexLines,i.vertexLines,this._vertexShaderParts.shaderLines).join(`
| `),r=new Be({defines:this._vertexShaderParts.defineLines,sources:[o]}),s=this._fragmentShaderParts.uniformLines.concat(this._fragmentShaderParts.varyingLines,n.fragmentLines,i.fragmentLines,this._fragmentShaderParts.shaderLines).join(`
| `),a=new Be({defines:this._fragmentShaderParts.defineLines,sources:[s]});return en.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:a,attributeLocations:this._attributeLocations})};rc.prototype.clone=function(){return ze(this,!0)};function SDe(e){let t=[],n=[],i,o=e._vertexShaderParts.structIds,r,s,a;for(i=0;i<o.length;i++)r=o[i],s=e._structs[r],a=s.generateGlslLines(),t.push.apply(t,a);for(o=e._fragmentShaderParts.structIds,i=0;i<o.length;i++)r=o[i],s=e._structs[r],a=s.generateGlslLines(),n.push.apply(n,a);return{vertexLines:t,fragmentLines:n}}function ADe(e){switch(e){case"mat2":return 2;case"mat3":return 3;case"mat4":return 4;default:return 1}}function vDe(e){let t=[],n=[],i,o=e._vertexShaderParts.functionIds,r,s,a;for(i=0;i<o.length;i++)r=o[i],s=e._functions[r],a=s.generateGlslLines(),t.push.apply(t,a);for(o=e._fragmentShaderParts.functionIds,i=0;i<o.length;i++)r=o[i],s=e._functions[r],a=s.generateGlslLines(),n.push.apply(n,a);return{vertexLines:t,fragmentLines:n}}var Kx=rc;function bs(e,t,n,i){if(C.defined("context",e),!t||t.length===0)throw new w("At least one attribute is required.");let o=bs._verifyAttributes(t);n=g(n,0);let r=[],s={},a,l,u=o.length;for(let h=0;h<u;++h){let m=o[h];if(m.vertexBuffer){r.push(m);continue}l=m.usage,a=s[l],c(a)||(a=s[l]=[]),a.push(m)}function f(h,m){return j.getSizeInBytes(m.componentDatatype)-j.getSizeInBytes(h.componentDatatype)}this._allBuffers=[];for(l in s)if(s.hasOwnProperty(l)){a=s[l],a.sort(f);let h=bs._vertexSizeInBytes(a),m=a[0].usage,p={vertexSizeInBytes:h,vertexBuffer:void 0,usage:m,needsCommit:!1,arrayBuffer:void 0,arrayViews:bs._createArrayViews(a,h)};this._allBuffers.push(p)}this._size=0,this._instanced=g(i,!1),this._precreated=r,this._context=e,this.writers=void 0,this.va=void 0,this.resize(n)}bs._verifyAttributes=function(e){let t=[];for(let i=0;i<e.length;++i){let o=e[i],r={index:g(o.index,i),enabled:g(o.enabled,!0),componentsPerAttribute:o.componentsPerAttribute,componentDatatype:g(o.componentDatatype,j.FLOAT),normalize:g(o.normalize,!1),vertexBuffer:o.vertexBuffer,usage:g(o.usage,Pe.STATIC_DRAW)};if(t.push(r),r.componentsPerAttribute!==1&&r.componentsPerAttribute!==2&&r.componentsPerAttribute!==3&&r.componentsPerAttribute!==4)throw new w("attribute.componentsPerAttribute must be in the range [1, 4].");let s=r.componentDatatype;if(!j.validate(s))throw new w("Attribute must have a valid componentDatatype or not specify it.");if(!Pe.validate(r.usage))throw new w("Attribute must have a valid usage or not specify it.")}let n=new Array(t.length);for(let i=0;i<t.length;++i){let r=t[i].index;if(n[r])throw new w(`Index ${r} is used by more than one attribute.`);n[r]=!0}return t};bs._vertexSizeInBytes=function(e){let t=0,n=e.length;for(let s=0;s<n;++s){let a=e[s];t+=a.componentsPerAttribute*j.getSizeInBytes(a.componentDatatype)}let i=n>0?j.getSizeInBytes(e[0].componentDatatype):0,o=i>0?t%i:0,r=o===0?0:i-o;return t+=r,t};bs._createArrayViews=function(e,t){let n=[],i=0,o=e.length;for(let r=0;r<o;++r){let s=e[r],a=s.componentDatatype;n.push({index:s.index,enabled:s.enabled,componentsPerAttribute:s.componentsPerAttribute,componentDatatype:a,normalize:s.normalize,offsetInBytes:i,vertexSizeInComponentType:t/j.getSizeInBytes(a),view:void 0}),i+=s.componentsPerAttribute*j.getSizeInBytes(a)}return n};bs.prototype.resize=function(e){this._size=e;let t=this._allBuffers;this.writers=[];for(let n=0,i=t.length;n<i;++n){let o=t[n];bs._resize(o,this._size),bs._appendWriters(this.writers,o)}L8(this)};bs._resize=function(e,t){if(e.vertexSizeInBytes>0){let n=new ArrayBuffer(t*e.vertexSizeInBytes);if(c(e.arrayBuffer)){let r=new Uint8Array(n),s=new Uint8Array(e.arrayBuffer),a=s.length;for(let l=0;l<a;++l)r[l]=s[l]}let i=e.arrayViews,o=i.length;for(let r=0;r<o;++r){let s=i[r];s.view=j.createArrayBufferView(s.componentDatatype,n,s.offsetInBytes)}e.arrayBuffer=n}};var DDe=[function(e,t,n){return function(i,o){t[i*n]=o,e.needsCommit=!0}},function(e,t,n){return function(i,o,r){let s=i*n;t[s]=o,t[s+1]=r,e.needsCommit=!0}},function(e,t,n){return function(i,o,r,s){let a=i*n;t[a]=o,t[a+1]=r,t[a+2]=s,e.needsCommit=!0}},function(e,t,n){return function(i,o,r,s,a){let l=i*n;t[l]=o,t[l+1]=r,t[l+2]=s,t[l+3]=a,e.needsCommit=!0}}];bs._appendWriters=function(e,t){let n=t.arrayViews,i=n.length;for(let o=0;o<i;++o){let r=n[o];e[r.index]=DDe[r.componentsPerAttribute-1](t,r.view,r.vertexSizeInComponentType)}};bs.prototype.commit=function(e){let t=!1,n=this._allBuffers,i,o,r;for(o=0,r=n.length;o<r;++o)i=n[o],t=IDe(this,i)||t;if(t||!c(this.va)){L8(this);let s=this.va=[],a=O.SIXTY_FOUR_KILOBYTES-4,l=c(e)&&!this._instanced?Math.ceil(this._size/a):1;for(let u=0;u<l;++u){let f=[];for(o=0,r=n.length;o<r;++o){i=n[o];let h=u*(i.vertexSizeInBytes*a);bs._appendAttributes(f,i,h,this._instanced)}f=f.concat(this._precreated),s.push({va:new Zn({context:this._context,attributes:f,indexBuffer:e}),indicesCount:1.5*(u!==l-1?a:this._size%a)})}}};function IDe(e,t){if(t.needsCommit&&t.vertexSizeInBytes>0){t.needsCommit=!1;let n=t.vertexBuffer,i=e._size*t.vertexSizeInBytes,o=c(n);if(!o||n.sizeInBytes<i)return o&&n.destroy(),t.vertexBuffer=yt.createVertexBuffer({context:e._context,typedArray:t.arrayBuffer,usage:t.usage}),t.vertexBuffer.vertexArrayDestroyable=!1,!0;t.vertexBuffer.copyFromArrayView(t.arrayBuffer)}return!1}bs._appendAttributes=function(e,t,n,i){let o=t.arrayViews,r=o.length;for(let s=0;s<r;++s){let a=o[s];e.push({index:a.index,enabled:a.enabled,componentsPerAttribute:a.componentsPerAttribute,componentDatatype:a.componentDatatype,normalize:a.normalize,vertexBuffer:t.vertexBuffer,offsetInBytes:n+a.offsetInBytes,strideInBytes:t.vertexSizeInBytes,instanceDivisor:i?1:0})}};bs.prototype.subCommit=function(e,t){if(e<0||e>=this._size)throw new w("offsetInVertices must be greater than or equal to zero and less than the vertex array size.");if(e+t>this._size)throw new w("offsetInVertices + lengthInVertices cannot exceed the vertex array size.");let n=this._allBuffers;for(let i=0,o=n.length;i<o;++i)ODe(n[i],e,t)};function ODe(e,t,n){if(e.needsCommit&&e.vertexSizeInBytes>0){let i=e.vertexSizeInBytes*t,o=e.vertexSizeInBytes*n;e.vertexBuffer.copyFromArrayView(new Uint8Array(e.arrayBuffer,i,o),i)}}bs.prototype.endSubCommits=function(){let e=this._allBuffers;for(let t=0,n=e.length;t<n;++t)e[t].needsCommit=!1};function L8(e){let t=e.va;if(!c(t))return;let n=t.length;for(let i=0;i<n;++i)t[i].va.destroy();e.va=void 0}bs.prototype.isDestroyed=function(){return!1};bs.prototype.destroy=function(){let e=this._allBuffers;for(let t=0,n=e.length;t<n;++t){let i=e[t];i.vertexBuffer=i.vertexBuffer&&i.vertexBuffer.destroy()}return L8(this),ue(this)};var y_=bs;function PDe(e,t,n){if(C.defined("context",e),C.defined("urls",t),Object.values(Lo.FaceName).some(r=>!c(t[r])))throw new w("urls must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");let i={flipY:!0,skipColorSpaceConversion:n,preferImageBitmap:!0},o=[Te.createIfNeeded(t.positiveX).fetchImage(i),Te.createIfNeeded(t.negativeX).fetchImage(i),Te.createIfNeeded(t.positiveY).fetchImage(i),Te.createIfNeeded(t.negativeY).fetchImage(i),Te.createIfNeeded(t.positiveZ).fetchImage(i),Te.createIfNeeded(t.negativeZ).fetchImage(i)];return Promise.all(o).then(function(r){return new Lo({context:e,source:{positiveX:r[0],negativeX:r[1],positiveY:r[2],negativeY:r[3],positiveZ:r[4],negativeZ:r[5]}})})}var cM=PDe;function b_(e){this._value=void 0,this._hasClone=!1,this._hasEquals=!1,this._definitionChanged=new fe,this.setValue(e)}Object.defineProperties(b_.prototype,{isConstant:{value:!0},definitionChanged:{get:function(){return this._definitionChanged}}});b_.prototype.getValue=function(e,t){return this._hasClone?this._value.clone(t):this._value};b_.prototype.setValue=function(e){let t=this._value;if(t!==e){let n=c(e),i=n&&typeof e.clone=="function",o=n&&typeof e.equals=="function";(!o||!e.equals(t))&&(this._hasClone=i,this._hasEquals=o,this._value=i?e.clone(this._value):e,this._definitionChanged.raiseEvent(this))}};b_.prototype.equals=function(e){return this===e||e instanceof b_&&(!this._hasEquals&&this._value===e._value||this._hasEquals&&this._value.equals(e._value))};b_.prototype.valueOf=function(){return this._value};b_.prototype.toString=function(){return String(this._value)};var jn=b_;function RDe(e,t,n,i,o){return{configurable:i,get:function(){return this[t]},set:function(r){let s=this[t],a=this[n];c(a)&&(a(),this[n]=void 0),r!==void 0&&(!c(r)||!c(r.getValue))&&c(o)&&(r=o(r)),s!==r&&(this[t]=r,this._definitionChanged.raiseEvent(this,e,r,s)),c(r)&&c(r.definitionChanged)&&(this[n]=r.definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this,e,r,r)},this))}}}function MDe(e){return new jn(e)}function LDe(e,t,n){return RDe(e,`_${e.toString()}`,`_${e.toString()}Subscription`,g(t,!1),g(n,MDe))}var oe=LDe;function TS(e){this._definitionChanged=new fe,this._show=void 0,this._showSubscription=void 0,this._image=void 0,this._imageSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._alignedAxis=void 0,this._alignedAxisSubscription=void 0,this._sizeInMeters=void 0,this._sizeInMetersSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._imageSubRegion=void 0,this._imageSubRegionSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this._splitDirection=void 0,this._splitDirectionSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(TS.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:oe("show"),image:oe("image"),scale:oe("scale"),pixelOffset:oe("pixelOffset"),eyeOffset:oe("eyeOffset"),horizontalOrigin:oe("horizontalOrigin"),verticalOrigin:oe("verticalOrigin"),heightReference:oe("heightReference"),color:oe("color"),rotation:oe("rotation"),alignedAxis:oe("alignedAxis"),sizeInMeters:oe("sizeInMeters"),width:oe("width"),height:oe("height"),scaleByDistance:oe("scaleByDistance"),translucencyByDistance:oe("translucencyByDistance"),pixelOffsetScaleByDistance:oe("pixelOffsetScaleByDistance"),imageSubRegion:oe("imageSubRegion"),distanceDisplayCondition:oe("distanceDisplayCondition"),disableDepthTestDistance:oe("disableDepthTestDistance"),splitDirection:oe("splitDirection")});TS.prototype.clone=function(e){return c(e)?(e.show=this._show,e.image=this._image,e.scale=this._scale,e.pixelOffset=this._pixelOffset,e.eyeOffset=this._eyeOffset,e.horizontalOrigin=this._horizontalOrigin,e.verticalOrigin=this._verticalOrigin,e.heightReference=this._heightReference,e.color=this._color,e.rotation=this._rotation,e.alignedAxis=this._alignedAxis,e.sizeInMeters=this._sizeInMeters,e.width=this._width,e.height=this._height,e.scaleByDistance=this._scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.pixelOffsetScaleByDistance=this._pixelOffsetScaleByDistance,e.imageSubRegion=this._imageSubRegion,e.distanceDisplayCondition=this._distanceDisplayCondition,e.disableDepthTestDistance=this._disableDepthTestDistance,e.splitDirection=this._splitDirection,e):new TS(this)};TS.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.show=g(this._show,e.show),this.image=g(this._image,e.image),this.scale=g(this._scale,e.scale),this.pixelOffset=g(this._pixelOffset,e.pixelOffset),this.eyeOffset=g(this._eyeOffset,e.eyeOffset),this.horizontalOrigin=g(this._horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=g(this._verticalOrigin,e.verticalOrigin),this.heightReference=g(this._heightReference,e.heightReference),this.color=g(this._color,e.color),this.rotation=g(this._rotation,e.rotation),this.alignedAxis=g(this._alignedAxis,e.alignedAxis),this.sizeInMeters=g(this._sizeInMeters,e.sizeInMeters),this.width=g(this._width,e.width),this.height=g(this._height,e.height),this.scaleByDistance=g(this._scaleByDistance,e.scaleByDistance),this.translucencyByDistance=g(this._translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=g(this._pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.imageSubRegion=g(this._imageSubRegion,e.imageSubRegion),this.distanceDisplayCondition=g(this._distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=g(this._disableDepthTestDistance,e.disableDepthTestDistance),this.splitDirection=g(this.splitDirection,e.splitDirection)};var sc=TS;function sb(){this._array=[],this._hash={}}Object.defineProperties(sb.prototype,{length:{get:function(){return this._array.length}},values:{get:function(){return this._array}}});sb.prototype.contains=function(e){if(typeof e!="string"&&typeof e!="number")throw new w("key is required to be a string or number.");return c(this._hash[e])};sb.prototype.set=function(e,t){if(typeof e!="string"&&typeof e!="number")throw new w("key is required to be a string or number.");let n=this._hash[e];t!==n&&(this.remove(e),this._hash[e]=t,this._array.push(t))};sb.prototype.get=function(e){if(typeof e!="string"&&typeof e!="number")throw new w("key is required to be a string or number.");return this._hash[e]};sb.prototype.remove=function(e){if(c(e)&&typeof e!="string"&&typeof e!="number")throw new w("key is required to be a string or number.");let t=this._hash[e],n=c(t);if(n){let i=this._array;i.splice(i.indexOf(t),1),delete this._hash[e]}return n};sb.prototype.removeAll=function(){let e=this._array;e.length>0&&(this._hash={},e.length=0)};var Et=sb;function Pl(e,t){e=g(e,0),this._near=e,t=g(t,Number.MAX_VALUE),this._far=t}Object.defineProperties(Pl.prototype,{near:{get:function(){return this._near},set:function(e){this._near=e}},far:{get:function(){return this._far},set:function(e){this._far=e}}});Pl.packedLength=2;Pl.pack=function(e,t,n){if(!c(e))throw new w("value is required");if(!c(t))throw new w("array is required");return n=g(n,0),t[n++]=e.near,t[n]=e.far,t};Pl.unpack=function(e,t,n){if(!c(e))throw new w("array is required");return t=g(t,0),c(n)||(n=new Pl),n.near=e[t++],n.far=e[t],n};Pl.equals=function(e,t){return e===t||c(e)&&c(t)&&e.near===t.near&&e.far===t.far};Pl.clone=function(e,t){if(c(e))return c(t)||(t=new Pl),t.near=e.near,t.far=e.far,t};Pl.prototype.clone=function(e){return Pl.clone(this,e)};Pl.prototype.equals=function(e){return Pl.equals(this,e)};var Nt=Pl;function Ru(e,t,n,i){this.near=g(e,0),this.nearValue=g(t,0),this.far=g(n,1),this.farValue=g(i,0)}Ru.clone=function(e,t){if(c(e))return c(t)?(t.near=e.near,t.nearValue=e.nearValue,t.far=e.far,t.farValue=e.farValue,t):new Ru(e.near,e.nearValue,e.far,e.farValue)};Ru.packedLength=4;Ru.pack=function(e,t,n){if(!c(e))throw new w("value is required");if(!c(t))throw new w("array is required");return n=g(n,0),t[n++]=e.near,t[n++]=e.nearValue,t[n++]=e.far,t[n]=e.farValue,t};Ru.unpack=function(e,t,n){if(!c(e))throw new w("array is required");return t=g(t,0),c(n)||(n=new Ru),n.near=e[t++],n.nearValue=e[t++],n.far=e[t++],n.farValue=e[t],n};Ru.equals=function(e,t){return e===t||c(e)&&c(t)&&e.near===t.near&&e.nearValue===t.nearValue&&e.far===t.far&&e.farValue===t.farValue};Ru.prototype.clone=function(e){return Ru.clone(this,e)};Ru.prototype.equals=function(e){return Ru.equals(this,e)};var Bt=Ru;var ab={NONE:0,CLAMP_TO_GROUND:1,RELATIVE_TO_GROUND:2,CLAMP_TO_TERRAIN:3,RELATIVE_TO_TERRAIN:4,CLAMP_TO_3D_TILE:5,RELATIVE_TO_3D_TILE:6},qe=Object.freeze(ab);function Mu(e){return e===ab.CLAMP_TO_GROUND||e===ab.CLAMP_TO_3D_TILE||e===ab.CLAMP_TO_TERRAIN}function $x(e){return e===ab.RELATIVE_TO_GROUND||e===ab.RELATIVE_TO_3D_TILE||e===ab.RELATIVE_TO_TERRAIN}var NDe={CENTER:0,LEFT:1,RIGHT:-1},mi=Object.freeze(NDe);var FDe={CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1},Dn=Object.freeze(FDe);var BDe={DONE:0,PENDING:1,FAILED:2},lt=Object.freeze(BDe);function Gf(){w.throwInstantiationError()}Object.defineProperties(Gf.prototype,{isConstant:{get:w.throwInstantiationError},definitionChanged:{get:w.throwInstantiationError}});Gf.prototype.getValue=w.throwInstantiationError;Gf.prototype.equals=w.throwInstantiationError;Gf.equals=function(e,t){return e===t||c(e)&&e.equals(t)};Gf.arrayEquals=function(e,t){if(e===t)return!0;if(!c(e)||!c(t)||e.length!==t.length)return!1;let n=e.length;for(let i=0;i<n;i++)if(!Gf.equals(e[i],t[i]))return!1;return!0};Gf.isConstant=function(e){return!c(e)||e.isConstant};Gf.getValueOrUndefined=function(e,t,n){return c(e)?e.getValue(t,n):void 0};Gf.getValueOrDefault=function(e,t,n,i){return c(e)?g(e.getValue(t,i),n):n};Gf.getValueOrClonedDefault=function(e,t,n,i){let o;return c(e)&&(o=e.getValue(t,i)),c(o)||(o=n.clone(o)),o};var G=Gf;var kDe={LEFT:-1,NONE:0,RIGHT:1},Nr=Object.freeze(kDe);var UDe=z.WHITE,zDe=d.ZERO,VDe=qe.NONE,HDe=k.ZERO,GDe=1,jDe=0,WDe=d.ZERO,qDe=mi.CENTER,YDe=Dn.CENTER,XDe=!1,KDe=Nr.NONE,$De=new d,ZDe=new z,JDe=new d,QDe=new k,eIe=new Bt,tIe=new Bt,nIe=new Bt,iIe=new je,oIe=new Nt;function PJ(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function x_(e,t){if(!c(e))throw new w("entityCluster is required.");if(!c(t))throw new w("entityCollection is required.");t.collectionChanged.addEventListener(x_.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new Et,this._onCollectionChanged(t,t.values,[],[])}x_.prototype.update=function(e){if(!c(e))throw new w("time is required.");let t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){let r=t[i],s=r.entity,a=s._billboard,l,u=r.billboard,f=s.isShowing&&s.isAvailable(e)&&G.getValueOrDefault(a._show,e,!0),h;if(f&&(h=G.getValueOrUndefined(s._position,e,$De),l=G.getValueOrUndefined(a._image,e),f=c(h)&&c(l)),!f){N8(r,s,n);continue}G.isConstant(s._position)||(n._clusterDirty=!0),c(u)||(u=n.getBillboard(s),u.id=s,u.image=void 0,r.billboard=u),u.show=f,(!c(u.image)||r.textureValue!==l)&&(u.image=l,r.textureValue=l),u.position=h,u.color=G.getValueOrDefault(a._color,e,UDe,ZDe),u.eyeOffset=G.getValueOrDefault(a._eyeOffset,e,zDe,JDe),u.heightReference=G.getValueOrDefault(a._heightReference,e,VDe),u.pixelOffset=G.getValueOrDefault(a._pixelOffset,e,HDe,QDe),u.scale=G.getValueOrDefault(a._scale,e,GDe),u.rotation=G.getValueOrDefault(a._rotation,e,jDe),u.alignedAxis=G.getValueOrDefault(a._alignedAxis,e,WDe),u.horizontalOrigin=G.getValueOrDefault(a._horizontalOrigin,e,qDe),u.verticalOrigin=G.getValueOrDefault(a._verticalOrigin,e,YDe),u.width=G.getValueOrUndefined(a._width,e),u.height=G.getValueOrUndefined(a._height,e),u.scaleByDistance=G.getValueOrUndefined(a._scaleByDistance,e,eIe),u.translucencyByDistance=G.getValueOrUndefined(a._translucencyByDistance,e,tIe),u.pixelOffsetScaleByDistance=G.getValueOrUndefined(a._pixelOffsetScaleByDistance,e,nIe),u.sizeInMeters=G.getValueOrDefault(a._sizeInMeters,e,XDe),u.distanceDisplayCondition=G.getValueOrUndefined(a._distanceDisplayCondition,e,oIe),u.disableDepthTestDistance=G.getValueOrUndefined(a._disableDepthTestDistance,e),u.splitDirection=G.getValueOrDefault(a._splitDirection,e,KDe);let m=G.getValueOrUndefined(a._imageSubRegion,e,iIe);c(m)&&u.setImageSubRegion(u._imageId,m)}return!0};x_.prototype.getBoundingSphere=function(e,t){if(!c(e))throw new w("entity is required.");if(!c(t))throw new w("result is required.");let n=this._items.get(e.id);if(!c(n)||!c(n.billboard))return lt.FAILED;let i=n.billboard;if(i.heightReference===qe.NONE)t.center=d.clone(i.position,t.center);else{if(!c(i._clampedPosition))return lt.PENDING;t.center=d.clone(i._clampedPosition,t.center)}return t.radius=0,lt.DONE};x_.prototype.isDestroyed=function(){return!1};x_.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(x_.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removeBillboard(e[t]);return ue(this)};x_.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._items,a=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],c(r._billboard)&&c(r._position)&&s.set(r.id,new PJ(r));for(o=i.length-1;o>-1;o--)r=i[o],c(r._billboard)&&c(r._position)?s.contains(r.id)||s.set(r.id,new PJ(r)):(N8(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],N8(s.get(r.id),r,a),s.remove(r.id)};function N8(e,t,n){c(e)&&(e.billboard=void 0,n.removeBillboard(t))}var lM=x_;var rIe=new d;function ih(e){e=g(e,g.EMPTY_OBJECT);let t=e.minimum,n=e.maximum;if(C.typeOf.object("min",t),C.typeOf.object("max",n),c(e.offsetAttribute)&&e.offsetAttribute===Zt.TOP)throw new w("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=d.clone(t),this._max=d.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}ih.fromDimensions=function(e){e=g(e,g.EMPTY_OBJECT);let t=e.dimensions;C.typeOf.object("dimensions",t),C.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),C.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),C.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);let n=d.multiplyByScalar(t,.5,new d);return new ih({minimum:d.negate(n,new d),maximum:n,offsetAttribute:e.offsetAttribute})};ih.fromAxisAlignedBoundingBox=function(e){return C.typeOf.object("boundindBox",e),new ih({minimum:e.minimum,maximum:e.maximum})};ih.packedLength=2*d.packedLength+1;ih.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),d.pack(e._min,t,n),d.pack(e._max,t,n+d.packedLength),t[n+d.packedLength*2]=g(e._offsetAttribute,-1),t};var MJ=new d,LJ=new d,RJ={minimum:MJ,maximum:LJ,offsetAttribute:void 0};ih.unpack=function(e,t,n){C.defined("array",e),t=g(t,0);let i=d.unpack(e,t,MJ),o=d.unpack(e,t+d.packedLength,LJ),r=e[t+d.packedLength*2];return c(n)?(n._min=d.clone(i,n._min),n._max=d.clone(o,n._max),n._offsetAttribute=r===-1?void 0:r,n):(RJ.offsetAttribute=r===-1?void 0:r,new ih(RJ))};ih.createGeometry=function(e){let t=e._min,n=e._max;if(d.equals(t,n))return;let i=new fn,o=new Uint16Array(12*2),r=new Float64Array(8*3);r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=n.x,r[4]=t.y,r[5]=t.z,r[6]=n.x,r[7]=n.y,r[8]=t.z,r[9]=t.x,r[10]=n.y,r[11]=t.z,r[12]=t.x,r[13]=t.y,r[14]=n.z,r[15]=n.x,r[16]=t.y,r[17]=n.z,r[18]=n.x,r[19]=n.y,r[20]=n.z,r[21]=t.x,r[22]=n.y,r[23]=n.z,i.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:r}),o[0]=4,o[1]=5,o[2]=5,o[3]=6,o[4]=6,o[5]=7,o[6]=7,o[7]=4,o[8]=0,o[9]=1,o[10]=1,o[11]=2,o[12]=2,o[13]=3,o[14]=3,o[15]=0,o[16]=0,o[17]=4,o[18]=1,o[19]=5,o[20]=2,o[21]=6,o[22]=3,o[23]=7;let s=d.subtract(n,t,rIe),a=d.magnitude(s)*.5;if(c(e._offsetAttribute)){let l=r.length,u=e._offsetAttribute===Zt.NONE?0:1,f=new Uint8Array(l/3).fill(u);i.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}return new st({attributes:i,indices:o,primitiveType:Se.LINES,boundingSphere:new ne(d.ZERO,a),offsetAttribute:e._offsetAttribute})};var oh=ih;function Zx(e,t,n,i){e=g(e,1),t=g(t,1),n=g(n,1),i=g(i,1),this.value=new Uint8Array([z.floatToByte(e),z.floatToByte(t),z.floatToByte(n),z.floatToByte(i)])}Object.defineProperties(Zx.prototype,{componentDatatype:{get:function(){return j.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}});Zx.fromColor=function(e){if(!c(e))throw new w("color is required.");return new Zx(e.red,e.green,e.blue,e.alpha)};Zx.toValue=function(e,t){if(!c(e))throw new w("color is required.");return c(t)?e.toBytes(t):new Uint8Array(e.toBytes())};Zx.equals=function(e,t){return e===t||c(e)&&c(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]};var Ht=Zx;function CS(e,t){if(e=g(e,0),t=g(t,Number.MAX_VALUE),t<=e)throw new w("far distance must be greater than near distance.");this.value=new Float32Array([e,t])}Object.defineProperties(CS.prototype,{componentDatatype:{get:function(){return j.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}});CS.fromDistanceDisplayCondition=function(e){if(!c(e))throw new w("distanceDisplayCondition is required.");if(e.far<=e.near)throw new w("distanceDisplayCondition.far distance must be greater than distanceDisplayCondition.near distance.");return new CS(e.near,e.far)};CS.toValue=function(e,t){if(!c(e))throw new w("distanceDisplayCondition is required.");return c(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])};var Mn=CS;function sIe(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.geometry))throw new w("options.geometry is required.");this.geometry=e.geometry,this.modelMatrix=N.clone(g(e.modelMatrix,N.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=g(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}var wt=sIe;function Fo(e){e=g(e,g.EMPTY_OBJECT),this.start=c(e.start)?K.clone(e.start):new K,this.stop=c(e.stop)?K.clone(e.stop):new K,this.data=e.data,this.isStartIncluded=g(e.isStartIncluded,!0),this.isStopIncluded=g(e.isStopIncluded,!0)}Object.defineProperties(Fo.prototype,{isEmpty:{get:function(){let e=K.compare(this.stop,this.start);return e<0||e===0&&(!this.isStartIncluded||!this.isStopIncluded)}}});var Jx={start:void 0,stop:void 0,isStartIncluded:void 0,isStopIncluded:void 0,data:void 0};Fo.fromIso8601=function(e,t){C.typeOf.object("options",e),C.typeOf.string("options.iso8601",e.iso8601);let n=e.iso8601.split("/");if(n.length!==2)throw new w("options.iso8601 is an invalid ISO 8601 interval.");let i=K.fromIso8601(n[0]),o=K.fromIso8601(n[1]),r=g(e.isStartIncluded,!0),s=g(e.isStopIncluded,!0),a=e.data;return c(t)?(t.start=i,t.stop=o,t.isStartIncluded=r,t.isStopIncluded=s,t.data=a,t):(Jx.start=i,Jx.stop=o,Jx.isStartIncluded=r,Jx.isStopIncluded=s,Jx.data=a,new Fo(Jx))};Fo.toIso8601=function(e,t){return C.typeOf.object("timeInterval",e),`${K.toIso8601(e.start,t)}/${K.toIso8601(e.stop,t)}`};Fo.clone=function(e,t){if(c(e))return c(t)?(t.start=e.start,t.stop=e.stop,t.isStartIncluded=e.isStartIncluded,t.isStopIncluded=e.isStopIncluded,t.data=e.data,t):new Fo(e)};Fo.equals=function(e,t,n){return e===t||c(e)&&c(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&K.equals(e.start,t.start)&&K.equals(e.stop,t.stop)&&(e.data===t.data||c(n)&&n(e.data,t.data)))};Fo.equalsEpsilon=function(e,t,n,i){return n=g(n,0),e===t||c(e)&&c(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&K.equalsEpsilon(e.start,t.start,n)&&K.equalsEpsilon(e.stop,t.stop,n)&&(e.data===t.data||c(i)&&i(e.data,t.data)))};Fo.intersect=function(e,t,n,i){if(C.typeOf.object("left",e),!c(t))return Fo.clone(Fo.EMPTY,n);let o=e.start,r=e.stop,s=t.start,a=t.stop,l=K.greaterThanOrEquals(s,o)&&K.greaterThanOrEquals(r,s),u=!l&&K.lessThanOrEquals(s,o)&&K.lessThanOrEquals(o,a);if(!l&&!u)return Fo.clone(Fo.EMPTY,n);let f=e.isStartIncluded,h=e.isStopIncluded,m=t.isStartIncluded,p=t.isStopIncluded,_=K.lessThan(r,a);return c(n)||(n=new Fo),n.start=l?s:o,n.isStartIncluded=f&&m||!K.equals(s,o)&&(l&&m||u&&f),n.stop=_?r:a,n.isStopIncluded=_?h:h&&p||!K.equals(a,r)&&p,n.data=c(i)?i(e.data,t.data):e.data,n};Fo.contains=function(e,t){if(C.typeOf.object("timeInterval",e),C.typeOf.object("julianDate",t),e.isEmpty)return!1;let n=K.compare(e.start,t);if(n===0)return e.isStartIncluded;let i=K.compare(t,e.stop);return i===0?e.isStopIncluded:n<0&&i<0};Fo.prototype.clone=function(e){return Fo.clone(this,e)};Fo.prototype.equals=function(e,t){return Fo.equals(this,e,t)};Fo.prototype.equalsEpsilon=function(e,t,n){return Fo.equalsEpsilon(this,e,t,n)};Fo.prototype.toString=function(){return Fo.toIso8601(this)};Fo.EMPTY=Object.freeze(new Fo({start:new K,stop:new K,isStartIncluded:!1,isStopIncluded:!1}));var En=Fo;var NJ=Object.freeze(K.fromIso8601("0000-01-01T00:00:00Z")),FJ=Object.freeze(K.fromIso8601("9999-12-31T24:00:00Z")),aIe=Object.freeze(new En({start:NJ,stop:FJ})),cIe={MINIMUM_VALUE:NJ,MAXIMUM_VALUE:FJ,MAXIMUM_INTERVAL:aIe},Ue=cIe;function ES(e,t,n){e=g(e,0),t=g(t,0),n=g(n,0),this.value=new Float32Array([e,t,n])}Object.defineProperties(ES.prototype,{componentDatatype:{get:function(){return j.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}});ES.fromCartesian3=function(e){return C.defined("offset",e),new ES(e.x,e.y,e.z)};ES.toValue=function(e,t){return C.defined("offset",e),c(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t};var qi=ES;function uM(e){e=g(e,!0),this.value=uM.toValue(e)}Object.defineProperties(uM.prototype,{componentDatatype:{get:function(){return j.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}});uM.toValue=function(e,t){if(!c(e))throw new w("show is required.");return c(t)?(t[0]=e,t):new Uint8Array([e])};var gn=uM;var fM=`in vec3 v_positionEC;
| in vec3 v_normalEC;
| in vec3 v_tangentEC;
| in vec3 v_bitangentEC;
| in vec2 v_st;
|
| void main()
| {
| vec3 positionToEyeEC = -v_positionEC;
| mat3 tangentToEyeMatrix = czm_tangentToEyeSpaceMatrix(v_normalEC, v_tangentEC, v_bitangentEC);
|
| vec3 normalEC = normalize(v_normalEC);
| #ifdef FACE_FORWARD
| normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
| #endif
|
| czm_materialInput materialInput;
| materialInput.normalEC = normalEC;
| materialInput.tangentToEyeMatrix = tangentToEyeMatrix;
| materialInput.positionToEyeEC = positionToEyeEC;
| materialInput.st = v_st;
| czm_material material = czm_getMaterial(materialInput);
|
| #ifdef FLAT
| out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
| #else
| out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
| #endif
| }
| `;var dM=`in vec3 position3DHigh;
| in vec3 position3DLow;
| in vec3 normal;
| in vec3 tangent;
| in vec3 bitangent;
| in vec2 st;
| in float batchId;
|
| out vec3 v_positionEC;
| out vec3 v_normalEC;
| out vec3 v_tangentEC;
| out vec3 v_bitangentEC;
| out vec2 v_st;
|
| void main()
| {
| vec4 p = czm_computePosition();
|
| v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
| v_normalEC = czm_normal * normal; // normal in eye coordinates
| v_tangentEC = czm_normal * tangent; // tangent in eye coordinates
| v_bitangentEC = czm_normal * bitangent; // bitangent in eye coordinates
| v_st = st;
|
| gl_Position = czm_modelViewProjectionRelativeToEye * p;
| }
| `;var hM=`in vec3 v_positionEC;
| in vec3 v_normalEC;
|
| void main()
| {
| vec3 positionToEyeEC = -v_positionEC;
|
| vec3 normalEC = normalize(v_normalEC);
| #ifdef FACE_FORWARD
| normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
| #endif
|
| czm_materialInput materialInput;
| materialInput.normalEC = normalEC;
| materialInput.positionToEyeEC = positionToEyeEC;
| czm_material material = czm_getMaterial(materialInput);
|
| #ifdef FLAT
| out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
| #else
| out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
| #endif
| }
| `;var mM=`in vec3 position3DHigh;
| in vec3 position3DLow;
| in vec3 normal;
| in float batchId;
|
| out vec3 v_positionEC;
| out vec3 v_normalEC;
|
| void main()
| {
| vec4 p = czm_computePosition();
|
| v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
| v_normalEC = czm_normal * normal; // normal in eye coordinates
|
| gl_Position = czm_modelViewProjectionRelativeToEye * p;
| }
| `;var pM=`in vec3 v_positionEC;
| in vec3 v_normalEC;
| in vec2 v_st;
|
| void main()
| {
| vec3 positionToEyeEC = -v_positionEC;
|
| vec3 normalEC = normalize(v_normalEC);
| #ifdef FACE_FORWARD
| normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
| #endif
|
| czm_materialInput materialInput;
| materialInput.normalEC = normalEC;
| materialInput.positionToEyeEC = positionToEyeEC;
| materialInput.st = v_st;
| czm_material material = czm_getMaterial(materialInput);
|
| #ifdef FLAT
| out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
| #else
| out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
| #endif
| }
| `;var _M=`in vec3 position3DHigh;
| in vec3 position3DLow;
| in vec3 normal;
| in vec2 st;
| in float batchId;
|
| out vec3 v_positionEC;
| out vec3 v_normalEC;
| out vec2 v_st;
|
| void main()
| {
| vec4 p = czm_computePosition();
|
| v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
| v_normalEC = czm_normal * normal; // normal in eye coordinates
| v_st = st;
|
| gl_Position = czm_modelViewProjectionRelativeToEye * p;
| }
| `;var lIe={ADD:Y.FUNC_ADD,SUBTRACT:Y.FUNC_SUBTRACT,REVERSE_SUBTRACT:Y.FUNC_REVERSE_SUBTRACT,MIN:Y.MIN,MAX:Y.MAX},Oa=Object.freeze(lIe);var uIe={ZERO:Y.ZERO,ONE:Y.ONE,SOURCE_COLOR:Y.SRC_COLOR,ONE_MINUS_SOURCE_COLOR:Y.ONE_MINUS_SRC_COLOR,DESTINATION_COLOR:Y.DST_COLOR,ONE_MINUS_DESTINATION_COLOR:Y.ONE_MINUS_DST_COLOR,SOURCE_ALPHA:Y.SRC_ALPHA,ONE_MINUS_SOURCE_ALPHA:Y.ONE_MINUS_SRC_ALPHA,DESTINATION_ALPHA:Y.DST_ALPHA,ONE_MINUS_DESTINATION_ALPHA:Y.ONE_MINUS_DST_ALPHA,CONSTANT_COLOR:Y.CONSTANT_COLOR,ONE_MINUS_CONSTANT_COLOR:Y.ONE_MINUS_CONSTANT_COLOR,CONSTANT_ALPHA:Y.CONSTANT_ALPHA,ONE_MINUS_CONSTANT_ALPHA:Y.ONE_MINUS_CONSTANT_ALPHA,SOURCE_ALPHA_SATURATE:Y.SRC_ALPHA_SATURATE},bo=Object.freeze(uIe);var fIe={DISABLED:Object.freeze({enabled:!1}),ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:Oa.ADD,equationAlpha:Oa.ADD,functionSourceRgb:bo.SOURCE_ALPHA,functionSourceAlpha:bo.ONE,functionDestinationRgb:bo.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:bo.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:Oa.ADD,equationAlpha:Oa.ADD,functionSourceRgb:bo.ONE,functionSourceAlpha:bo.ONE,functionDestinationRgb:bo.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:bo.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:Object.freeze({enabled:!0,equationRgb:Oa.ADD,equationAlpha:Oa.ADD,functionSourceRgb:bo.SOURCE_ALPHA,functionSourceAlpha:bo.ONE,functionDestinationRgb:bo.ONE,functionDestinationAlpha:bo.ONE})},cn=Object.freeze(fIe);var dIe={FRONT:Y.FRONT,BACK:Y.BACK,FRONT_AND_BACK:Y.FRONT_AND_BACK},pi=Object.freeze(dIe);function Qx(e){e=g(e,g.EMPTY_OBJECT),this.material=e.material,this.translucent=g(e.translucent,!0),this._vertexShaderSource=e.vertexShaderSource,this._fragmentShaderSource=e.fragmentShaderSource,this._renderState=e.renderState,this._closed=g(e.closed,!1)}Object.defineProperties(Qx.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}}});Qx.prototype.getFragmentShaderSource=function(){let e=[];return this.flat&&e.push("#define FLAT"),this.faceForward&&e.push("#define FACE_FORWARD"),c(this.material)&&e.push(this.material.shaderSource),e.push(this.fragmentShaderSource),e.join(`
| `)};Qx.prototype.isTranslucent=function(){return c(this.material)&&this.material.isTranslucent()||!c(this.material)&&this.translucent};Qx.prototype.getRenderState=function(){let e=this.isTranslucent(),t=ze(this.renderState,!1);return e?(t.depthMask=!1,t.blending=cn.ALPHA_BLEND):t.depthMask=!0,t};Qx.getDefaultRenderState=function(e,t,n){let i={depthTest:{enabled:!0}};return e&&(i.depthMask=!1,i.blending=cn.ALPHA_BLEND),t&&(i.cull={enabled:!0,face:pi.BACK}),c(n)&&(i=bt(n,i,!0)),i};var $i=Qx;var gM=`uniform sampler2D image;
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
| vec4 rampColor = texture(image, vec2(materialInput.aspect / (2.0 * czm_pi), 0.5));
| rampColor = czm_gammaCorrect(rampColor);
| material.diffuse = rampColor.rgb;
| material.alpha = rampColor.a;
| return material;
| }
| `;var yM=`uniform sampler2D image;
| uniform float strength;
| uniform vec2 repeat;
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
|
| vec2 st = materialInput.st;
|
| vec2 centerPixel = fract(repeat * st);
| float centerBump = texture(image, centerPixel).channel;
|
| float imageWidth = float(imageDimensions.x);
| vec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));
| float rightBump = texture(image, rightPixel).channel;
|
| float imageHeight = float(imageDimensions.y);
| vec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));
| float topBump = texture(image, leftPixel).channel;
|
| vec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));
| vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;
|
| material.normal = normalEC;
| material.diffuse = vec3(0.01);
|
| return material;
| }
| `;var bM=`uniform vec4 lightColor;
| uniform vec4 darkColor;
| uniform vec2 repeat;
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
|
| vec2 st = materialInput.st;
|
| // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights
| float b = mod(floor(repeat.s * st.s) + floor(repeat.t * st.t), 2.0); // 0.0 or 1.0
|
| // Find the distance from the closest separator (region between two colors)
| float scaledWidth = fract(repeat.s * st.s);
| scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));
| float scaledHeight = fract(repeat.t * st.t);
| scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));
| float value = min(scaledWidth, scaledHeight);
|
| vec4 currentColor = mix(lightColor, darkColor, b);
| vec4 color = czm_antialias(lightColor, darkColor, currentColor, value, 0.03);
|
| color = czm_gammaCorrect(color);
| material.diffuse = color.rgb;
| material.alpha = color.a;
|
| return material;
| }
| `;var xM=`uniform vec4 lightColor;
| uniform vec4 darkColor;
| uniform vec2 repeat;
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
|
| // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights
| float b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5)); // 0.0 or 1.0
|
| vec4 color = mix(lightColor, darkColor, b);
| color = czm_gammaCorrect(color);
| material.diffuse = color.rgb;
| material.alpha = color.a;
|
| return material;
| }
| `;var TM=`uniform sampler2D heights;
| uniform sampler2D colors;
|
| // This material expects heights to be sorted from lowest to highest.
|
| float getHeight(int idx, float invTexSize)
| {
| vec2 uv = vec2((float(idx) + 0.5) * invTexSize, 0.5);
| #ifdef OES_texture_float
| return texture(heights, uv).x;
| #else
| return czm_unpackFloat(texture(heights, uv));
| #endif
| }
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
|
| float height = materialInput.height;
| float invTexSize = 1.0 / float(heightsDimensions.x);
|
| float minHeight = getHeight(0, invTexSize);
| float maxHeight = getHeight(heightsDimensions.x - 1, invTexSize);
|
| // early-out when outside the height range
| if (height < minHeight || height > maxHeight) {
| material.diffuse = vec3(0.0);
| material.alpha = 0.0;
| return material;
| }
|
| // Binary search to find heights above and below.
| int idxBelow = 0;
| int idxAbove = heightsDimensions.x;
| float heightBelow = minHeight;
| float heightAbove = maxHeight;
|
| // while loop not allowed, so use for loop with max iterations.
| // maxIterations of 16 supports a texture size up to 65536 (2^16).
| const int maxIterations = 16;
| for (int i = 0; i < maxIterations; i++) {
| if (idxBelow >= idxAbove - 1) {
| break;
| }
|
| int idxMid = (idxBelow + idxAbove) / 2;
| float heightTex = getHeight(idxMid, invTexSize);
|
| if (height > heightTex) {
| idxBelow = idxMid;
| heightBelow = heightTex;
| } else {
| idxAbove = idxMid;
| heightAbove = heightTex;
| }
| }
|
| float lerper = heightBelow == heightAbove ? 1.0 : (height - heightBelow) / (heightAbove - heightBelow);
| vec2 colorUv = vec2(invTexSize * (float(idxBelow) + 0.5 + lerper), 0.5);
| vec4 color = texture(colors, colorUv);
|
| // undo preumultiplied alpha
| if (color.a > 0.0)
| {
| color.rgb /= color.a;
| }
|
| color.rgb = czm_gammaCorrect(color.rgb);
|
| material.diffuse = color.rgb;
| material.alpha = color.a;
| return material;
| }
| `;var CM=`uniform vec4 color;
| uniform float spacing;
| uniform float width;
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
|
| float distanceToContour = mod(materialInput.height, spacing);
|
| #if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
| float dxc = abs(dFdx(materialInput.height));
| float dyc = abs(dFdy(materialInput.height));
| float dF = max(dxc, dyc) * czm_pixelRatio * width;
| float alpha = (distanceToContour < dF) ? 1.0 : 0.0;
| #else
| // If no derivatives available (IE 10?), use pixel ratio
| float alpha = (distanceToContour < (czm_pixelRatio * width)) ? 1.0 : 0.0;
| #endif
|
| vec4 outColor = czm_gammaCorrect(vec4(color.rgb, alpha * color.a));
| material.diffuse = outColor.rgb;
| material.alpha = outColor.a;
|
| return material;
| }
| `;var EM=`uniform sampler2D image;
| uniform float minimumHeight;
| uniform float maximumHeight;
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
| float scaledHeight = clamp((materialInput.height - minimumHeight) / (maximumHeight - minimumHeight), 0.0, 1.0);
| vec4 rampColor = texture(image, vec2(scaledHeight, 0.5));
| rampColor = czm_gammaCorrect(rampColor);
| material.diffuse = rampColor.rgb;
| material.alpha = rampColor.a;
| return material;
| }
| `;var wM=`uniform vec4 fadeInColor;
| uniform vec4 fadeOutColor;
| uniform float maximumDistance;
| uniform bool repeat;
| uniform vec2 fadeDirection;
| uniform vec2 time;
|
| float getTime(float t, float coord)
| {
| float scalar = 1.0 / maximumDistance;
| float q = distance(t, coord) * scalar;
| if (repeat)
| {
| float r = distance(t, coord + 1.0) * scalar;
| float s = distance(t, coord - 1.0) * scalar;
| q = min(min(r, s), q);
| }
| return clamp(q, 0.0, 1.0);
| }
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
|
| vec2 st = materialInput.st;
| float s = getTime(time.x, st.s) * fadeDirection.s;
| float t = getTime(time.y, st.t) * fadeDirection.t;
|
| float u = length(vec2(s, t));
| vec4 color = mix(fadeInColor, fadeOutColor, u);
|
| color = czm_gammaCorrect(color);
| material.emission = color.rgb;
| material.alpha = color.a;
|
| return material;
| }
| `;var SM=`uniform vec4 color;
| uniform float cellAlpha;
| uniform vec2 lineCount;
| uniform vec2 lineThickness;
| uniform vec2 lineOffset;
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
|
| vec2 st = materialInput.st;
|
| float scaledWidth = fract(lineCount.s * st.s - lineOffset.s);
| scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));
| float scaledHeight = fract(lineCount.t * st.t - lineOffset.t);
| scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));
|
| float value;
|
| // Fuzz Factor - Controls blurriness of lines
| #if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
| const float fuzz = 1.2;
| vec2 thickness = (lineThickness * czm_pixelRatio) - 1.0;
|
| // From "3D Engine Design for Virtual Globes" by Cozzi and Ring, Listing 4.13.
| vec2 dx = abs(dFdx(st));
| vec2 dy = abs(dFdy(st));
| vec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;
| value = min(
| smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),
| smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));
| #else
| // If no derivatives available (IE 10?), revert to view-dependent fuzz
| const float fuzz = 0.05;
|
| vec2 range = 0.5 - (lineThickness * 0.05);
| value = min(
| 1.0 - smoothstep(range.s, range.s + fuzz, scaledWidth),
| 1.0 - smoothstep(range.t, range.t + fuzz, scaledHeight));
| #endif
|
| // Edges taken from RimLightingMaterial.glsl
| // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html
| float dRim = 1.0 - abs(dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC)));
| float sRim = smoothstep(0.8, 1.0, dRim);
| value *= (1.0 - sRim);
|
| vec4 halfColor;
| halfColor.rgb = color.rgb * 0.5;
| halfColor.a = color.a * (1.0 - ((1.0 - cellAlpha) * value));
| halfColor = czm_gammaCorrect(halfColor);
| material.diffuse = halfColor.rgb;
| material.emission = halfColor.rgb;
| material.alpha = halfColor.a;
|
| return material;
| }
| `;var AM=`uniform sampler2D image;
| uniform float strength;
| uniform vec2 repeat;
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
|
| vec4 textureValue = texture(image, fract(repeat * materialInput.st));
| vec3 normalTangentSpace = textureValue.channels;
| normalTangentSpace.xy = normalTangentSpace.xy * 2.0 - 1.0;
| normalTangentSpace.z = clamp(1.0 - strength, 0.1, 1.0);
| normalTangentSpace = normalize(normalTangentSpace);
| vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;
|
| material.normal = normalEC;
|
| return material;
| }
| `;var vM=`uniform vec4 color;
|
| float getPointOnLine(vec2 p0, vec2 p1, float x)
| {
| float slope = (p0.y - p1.y) / (p0.x - p1.x);
| return slope * (x - p0.x) + p0.y;
| }
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
|
| vec2 st = materialInput.st;
|
| #if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
| float base = 1.0 - abs(fwidth(st.s)) * 10.0 * czm_pixelRatio;
| #else
| // If no derivatives available (IE 10?), 2.5% of the line will be the arrow head
| float base = 0.975;
| #endif
|
| vec2 center = vec2(1.0, 0.5);
| float ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);
| float ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);
|
| float halfWidth = 0.15;
| float s = step(0.5 - halfWidth, st.t);
| s *= 1.0 - step(0.5 + halfWidth, st.t);
| s *= 1.0 - step(base, st.s);
|
| float t = step(base, materialInput.st.s);
| t *= 1.0 - step(ptOnUpperLine, st.t);
| t *= step(ptOnLowerLine, st.t);
|
| // Find the distance from the closest separator (region between two colors)
| float dist;
| if (st.s < base)
| {
| float d1 = abs(st.t - (0.5 - halfWidth));
| float d2 = abs(st.t - (0.5 + halfWidth));
| dist = min(d1, d2);
| }
| else
| {
| float d1 = czm_infinity;
| if (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)
| {
| d1 = abs(st.s - base);
| }
| float d2 = abs(st.t - ptOnUpperLine);
| float d3 = abs(st.t - ptOnLowerLine);
| dist = min(min(d1, d2), d3);
| }
|
| vec4 outsideColor = vec4(0.0);
| vec4 currentColor = mix(outsideColor, color, clamp(s + t, 0.0, 1.0));
| vec4 outColor = czm_antialias(outsideColor, color, currentColor, dist);
|
| outColor = czm_gammaCorrect(outColor);
| material.diffuse = outColor.rgb;
| material.alpha = outColor.a;
| return material;
| }
| `;var DM=`uniform vec4 color;
| uniform vec4 gapColor;
| uniform float dashLength;
| uniform float dashPattern;
| in float v_polylineAngle;
|
| const float maskLength = 16.0;
|
| mat2 rotate(float rad) {
| float c = cos(rad);
| float s = sin(rad);
| return mat2(
| c, s,
| -s, c
| );
| }
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
|
| vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;
|
| // Get the relative position within the dash from 0 to 1
| float dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));
| // Figure out the mask index.
| float maskIndex = floor(dashPosition * maskLength);
| // Test the bit mask.
| float maskTest = floor(dashPattern / pow(2.0, maskIndex));
| vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;
| if (fragColor.a < 0.005) { // matches 0/255 and 1/255
| discard;
| }
|
| fragColor = czm_gammaCorrect(fragColor);
| material.emission = fragColor.rgb;
| material.alpha = fragColor.a;
| return material;
| }
| `;var IM=`uniform vec4 color;
| uniform float glowPower;
| uniform float taperPower;
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
|
| vec2 st = materialInput.st;
| float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);
|
| if (taperPower <= 0.99999) {
| glow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));
| }
|
| vec4 fragColor;
| fragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);
| fragColor.a = clamp(0.0, 1.0, glow) * color.a;
| fragColor = czm_gammaCorrect(fragColor);
|
| material.emission = fragColor.rgb;
| material.alpha = fragColor.a;
|
| return material;
| }
| `;var OM=`uniform vec4 color;
| uniform vec4 outlineColor;
| uniform float outlineWidth;
|
| in float v_width;
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
|
| vec2 st = materialInput.st;
| float halfInteriorWidth = 0.5 * (v_width - outlineWidth) / v_width;
| float b = step(0.5 - halfInteriorWidth, st.t);
| b *= 1.0 - step(0.5 + halfInteriorWidth, st.t);
|
| // Find the distance from the closest separator (region between two colors)
| float d1 = abs(st.t - (0.5 - halfInteriorWidth));
| float d2 = abs(st.t - (0.5 + halfInteriorWidth));
| float dist = min(d1, d2);
|
| vec4 currentColor = mix(outlineColor, color, b);
| vec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);
| outColor = czm_gammaCorrect(outColor);
|
| material.diffuse = outColor.rgb;
| material.alpha = outColor.a;
|
| return material;
| }
| `;var PM=`uniform vec4 color;
| uniform vec4 rimColor;
| uniform float width;
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
|
| // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html
| float d = 1.0 - dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC));
| float s = smoothstep(1.0 - width, 1.0, d);
|
| vec4 outColor = czm_gammaCorrect(color);
| vec4 outRimColor = czm_gammaCorrect(rimColor);
|
| material.diffuse = outColor.rgb;
| material.emission = outRimColor.rgb * s;
| material.alpha = mix(outColor.a, outRimColor.a, s);
|
| return material;
| }
| `;var RM=`uniform sampler2D image;
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
| vec4 rampColor = texture(image, vec2(materialInput.slope / (czm_pi / 2.0), 0.5));
| rampColor = czm_gammaCorrect(rampColor);
| material.diffuse = rampColor.rgb;
| material.alpha = rampColor.a;
| return material;
| }
| `;var MM=`uniform vec4 evenColor;
| uniform vec4 oddColor;
| uniform float offset;
| uniform float repeat;
| uniform bool horizontal;
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
|
| // Based on the Stripes Fragment Shader in the Orange Book (11.1.2)
| float coord = mix(materialInput.st.s, materialInput.st.t, float(horizontal));
| float value = fract((coord - offset) * (repeat * 0.5));
| float dist = min(value, min(abs(value - 0.5), 1.0 - value));
|
| vec4 currentColor = mix(evenColor, oddColor, step(0.5, value));
| vec4 color = czm_antialias(evenColor, oddColor, currentColor, dist);
| color = czm_gammaCorrect(color);
|
| material.diffuse = color.rgb;
| material.alpha = color.a;
|
| return material;
| }
| `;var LM=`uniform vec4 waterColor;
| uniform vec4 landColor;
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
|
| vec4 outColor = mix(landColor, waterColor, materialInput.waterMask);
| outColor = czm_gammaCorrect(outColor);
|
| material.diffuse = outColor.rgb;
| material.alpha = outColor.a;
|
| return material;
| }
| `;var NM=`// Thanks for the contribution Jonas
| // http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog
|
| uniform sampler2D specularMap;
| uniform sampler2D normalMap;
| uniform vec4 baseWaterColor;
| uniform vec4 blendColor;
| uniform float frequency;
| uniform float animationSpeed;
| uniform float amplitude;
| uniform float specularIntensity;
| uniform float fadeFactor;
|
| czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| czm_material material = czm_getDefaultMaterial(materialInput);
|
| float time = czm_frameNumber * animationSpeed;
|
| // fade is a function of the distance from the fragment and the frequency of the waves
| float fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);
|
| float specularMapValue = texture(specularMap, materialInput.st).r;
|
| // note: not using directional motion at this time, just set the angle to 0.0;
| vec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);
| vec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));
|
| // fade out the normal perturbation as we move further from the water surface
| normalTangentSpace.xy /= fade;
|
| // attempt to fade out the normal perturbation as we approach non water areas (low specular map value)
| normalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);
|
| normalTangentSpace = normalize(normalTangentSpace);
|
| // get ratios for alignment of the new normal vector with a vector perpendicular to the tangent plane
| float tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);
|
| // fade out water effect as specular map value decreases
| material.alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;
|
| // base color is a blend of the water and non-water color based on the value from the specular map
| // may need a uniform blend factor to better control this
| material.diffuse = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);
|
| // diffuse highlights are based on how perturbed the normal is
| material.diffuse += (0.1 * tsPerturbationRatio);
|
| material.diffuse = material.diffuse;
|
| material.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);
|
| material.specular = specularIntensity;
| material.shininess = 10.0;
|
| return material;
| }
| `;function Ve(e){this.type=void 0,this.shaderSource=void 0,this.materials=void 0,this.uniforms=void 0,this._uniforms=void 0,this.translucent=void 0,this._minificationFilter=g(e.minificationFilter,Wt.LINEAR),this._magnificationFilter=g(e.magnificationFilter,si.LINEAR),this._strict=void 0,this._template=void 0,this._count=void 0,this._texturePaths={},this._loadedImages=[],this._loadedCubeMaps=[],this._textures={},this._updateFunctions=[],this._defaultTexture=void 0,hIe(e,this),Object.defineProperties(this,{type:{value:this.type,writable:!1}}),c(Ve._uniformList[this.type])||(Ve._uniformList[this.type]=Object.keys(this._uniforms))}Ve._uniformList={};Ve.fromType=function(e,t){if(!c(Ve._materialCache.getMaterial(e)))throw new w(`material with type '${e}' does not exist.`);let n=new Ve({fabric:{type:e}});if(c(t))for(let i in t)t.hasOwnProperty(i)&&(n.uniforms[i]=t[i]);return n};Ve.prototype.isTranslucent=function(){if(c(this.translucent))return typeof this.translucent=="function"?this.translucent():this.translucent;let e=!0,t=this._translucentFunctions,n=t.length;for(let i=0;i<n;++i){let o=t[i];if(typeof o=="function"?e=e&&o():e=e&&o,!e)break}return e};Ve.prototype.update=function(e){this._defaultTexture=e.defaultTexture;let t,n,i=this._loadedImages,o=i.length;for(t=0;t<o;++t){let l=i[t];n=l.id;let u=l.image,f;Array.isArray(u)&&(f=u.slice(1,u.length).map(function(b){return b.bufferView}),u=u[0]);let h=new Jt({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter}),m;c(u.internalFormat)?m=new Ot({context:e,pixelFormat:u.internalFormat,width:u.width,height:u.height,source:{arrayBufferView:u.bufferView,mipLevels:f},sampler:h}):m=new Ot({context:e,source:u,sampler:h});let p=this._textures[n];c(p)&&p!==this._defaultTexture&&p.destroy(),this._textures[n]=m;let _=`${n}Dimensions`;if(this.uniforms.hasOwnProperty(_)){let b=this.uniforms[_];b.x=m._width,b.y=m._height}}i.length=0;let r=this._loadedCubeMaps;for(o=r.length,t=0;t<o;++t){let l=r[t];n=l.id;let u=l.images,f=new Lo({context:e,source:{positiveX:u[0],negativeX:u[1],positiveY:u[2],negativeY:u[3],positiveZ:u[4],negativeZ:u[5]},sampler:new Jt({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter})});this._textures[n]=f}r.length=0;let s=this._updateFunctions;for(o=s.length,t=0;t<o;++t)s[t](this,e);let a=this.materials;for(let l in a)a.hasOwnProperty(l)&&a[l].update(e)};Ve.prototype.isDestroyed=function(){return!1};Ve.prototype.destroy=function(){let e=this._textures;for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];i!==this._defaultTexture&&i.destroy()}let t=this.materials;for(let n in t)t.hasOwnProperty(n)&&t[n].destroy();return ue(this)};function hIe(e,t){e=g(e,g.EMPTY_OBJECT),t._strict=g(e.strict,!1),t._count=g(e.count,0),t._template=ze(g(e.fabric,g.EMPTY_OBJECT)),t._template.uniforms=ze(g(t._template.uniforms,g.EMPTY_OBJECT)),t._template.materials=ze(g(t._template.materials,g.EMPTY_OBJECT)),t.type=c(t._template.type)?t._template.type:Bn(),t.shaderSource="",t.materials={},t.uniforms={},t._uniforms={},t._translucentFunctions=[];let n,i=Ve._materialCache.getMaterial(t.type);if(c(i)){let r=ze(i.fabric,!0);t._template=bt(t._template,r,!0),n=i.translucent}gIe(t),c(i)||Ve._materialCache.addMaterial(t.type,t),bIe(t),EIe(t),SIe(t);let o=t._translucentFunctions.length===0?!0:void 0;if(n=g(n,o),n=g(e.translucent,n),c(n))if(typeof n=="function"){let r=function(){return n(t)};t._translucentFunctions.push(r)}else t._translucentFunctions.push(n)}function F8(e,t,n,i){if(c(e)){for(let o in e)if(e.hasOwnProperty(o)){let r=t.indexOf(o)!==-1;(i&&!r||!i&&r)&&n(o,t)}}}function BJ(e,t){let n=`fabric: property name '${e}' is not valid. It should be `;for(let i=0;i<t.length;i++){let o=`'${t[i]}'`;n+=i===t.length-1?`or ${o}.`:`${o}, `}throw new w(n)}function mIe(e,t){let n=`fabric: uniforms and materials cannot share the same property '${e}'`;throw new w(n)}var pIe=["type","materials","uniforms","components","source"],_Ie=["diffuse","specular","shininess","normal","emission","alpha"];function gIe(e){let t=e._template,n=t.uniforms,i=t.materials,o=t.components;if(c(o)&&c(t.source))throw new w("fabric: cannot have source and components in the same template.");F8(t,pIe,BJ,!0),F8(o,_Ie,BJ,!0);let r=[];for(let s in i)i.hasOwnProperty(s)&&r.push(s);F8(n,r,mIe,!1)}function yIe(e,t){let n=t._template.materials;for(let i in n)if(n.hasOwnProperty(i)&&e.indexOf(i)>-1)return!0;return!1}function bIe(e){let t=e._template.components,n=e._template.source;if(c(n))e.shaderSource+=`${n}
| `;else{if(e.shaderSource+=`czm_material czm_getMaterial(czm_materialInput materialInput)
| {
| `,e.shaderSource+=`czm_material material = czm_getDefaultMaterial(materialInput);
| `,c(t)){let i=Object.keys(e._template.materials).length>0;for(let o in t)if(t.hasOwnProperty(o))if(o==="diffuse"||o==="emission"){let s=i&&yIe(t[o],e)?t[o]:`czm_gammaCorrect(${t[o]})`;e.shaderSource+=`material.${o} = ${s};
| `}else o==="alpha"?e.shaderSource+=`material.alpha = ${t.alpha};
| `:e.shaderSource+=`material.${o} = ${t[o]};
| `}e.shaderSource+=`return material;
| }
| `}}var kJ={mat2:Li,mat3:q,mat4:N},xIe=/\.ktx2$/i;function TIe(e){let t;return function(n,i){let o=n.uniforms,r=o[e],s=t!==r,a=!c(r)||r===Ve.DefaultImageId;t=r;let l=n._textures[e],u,f;if(r instanceof HTMLVideoElement){if(r.readyState>=2){if(s&&c(l)&&(l!==i.defaultTexture&&l.destroy(),l=void 0),!c(l)||l===i.defaultTexture){let m=new Jt({minificationFilter:n._minificationFilter,magnificationFilter:n._magnificationFilter});l=new Ot({context:i,source:r,sampler:m}),n._textures[e]=l;return}l.copyFrom({source:r})}else c(l)||(n._textures[e]=i.defaultTexture);return}if(r instanceof Ot&&r!==l){n._texturePaths[e]=void 0;let m=n._textures[e];c(m)&&m!==n._defaultTexture&&m.destroy(),n._textures[e]=r,u=`${e}Dimensions`,o.hasOwnProperty(u)&&(f=o[u],f.x=r._width,f.y=r._height);return}if(s&&c(l)&&a&&(l!==n._defaultTexture&&l.destroy(),l=void 0),c(l)||(n._texturePaths[e]=void 0,l=n._textures[e]=n._defaultTexture,u=`${e}Dimensions`,o.hasOwnProperty(u)&&(f=o[u],f.x=l._width,f.y=l._height)),a)return;let h=r instanceof Te;if(!c(n._texturePaths[e])||h&&r.url!==n._texturePaths[e].url||!h&&r!==n._texturePaths[e]){if(typeof r=="string"||h){let m=h?r:Te.createIfNeeded(r),p;xIe.test(m.url)?p=vl(m.url):p=m.fetchImage(),Promise.resolve(p).then(function(_){n._loadedImages.push({id:e,image:_})}).catch(function(){c(l)&&l!==n._defaultTexture&&l.destroy(),n._textures[e]=n._defaultTexture})}else(r instanceof HTMLCanvasElement||r instanceof HTMLImageElement)&&n._loadedImages.push({id:e,image:r});n._texturePaths[e]=r}}}function CIe(e){return function(t,n){let i=t.uniforms[e];if(i instanceof Lo){let r=t._textures[e];r!==t._defaultTexture&&r.destroy(),t._texturePaths[e]=void 0,t._textures[e]=i;return}if(c(t._textures[e])||(t._texturePaths[e]=void 0,t._textures[e]=n.defaultCubeMap),i===Ve.DefaultCubeMapId)return;let o=i.positiveX+i.negativeX+i.positiveY+i.negativeY+i.positiveZ+i.negativeZ;if(o!==t._texturePaths[e]){let r=[Te.createIfNeeded(i.positiveX).fetchImage(),Te.createIfNeeded(i.negativeX).fetchImage(),Te.createIfNeeded(i.positiveY).fetchImage(),Te.createIfNeeded(i.negativeY).fetchImage(),Te.createIfNeeded(i.positiveZ).fetchImage(),Te.createIfNeeded(i.negativeZ).fetchImage()];Promise.all(r).then(function(s){t._loadedCubeMaps.push({id:e,images:s})}),t._texturePaths[e]=o}}}function EIe(e){let t=e._template.uniforms;for(let n in t)t.hasOwnProperty(n)&&UJ(e,n)}function UJ(e,t){let n=e._strict,i=e._template.uniforms,o=i[t],r=wIe(o);if(!c(r))throw new w(`fabric: uniform '${t}' has invalid type.`);let s;if(r==="channels"){if(s=wS(e,t,o,!1),s===0&&n)throw new w(`strict: shader source does not use channels '${t}'.`)}else{if(r==="sampler2D"){let u=`${t}Dimensions`;AIe(e,u)>0&&(i[u]={type:"ivec3",x:1,y:1},UJ(e,u))}if(!new RegExp(`uniform\\s+${r}\\s+${t}\\s*;`).test(e.shaderSource)){let u=`uniform ${r} ${t};`;e.shaderSource=u+e.shaderSource}let l=`${t}_${e._count++}`;if(s=wS(e,t,l),s===1&&n)throw new w(`strict: shader source does not use uniform '${t}'.`);if(e.uniforms[t]=o,r==="sampler2D")e._uniforms[l]=function(){return e._textures[t]},e._updateFunctions.push(TIe(t));else if(r==="samplerCube")e._uniforms[l]=function(){return e._textures[t]},e._updateFunctions.push(CIe(t));else if(r.indexOf("mat")!==-1){let u=new kJ[r];e._uniforms[l]=function(){return kJ[r].fromColumnMajorArray(e.uniforms[t],u)}}else e._uniforms[l]=function(){return e.uniforms[t]}}}function wIe(e){let t=e.type;if(!c(t)){let n=typeof e;if(n==="number")t="float";else if(n==="boolean")t="bool";else if(n==="string"||e instanceof Te||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)/^([rgba]){1,4}$/i.test(e)?t="channels":e===Ve.DefaultCubeMapId?t="samplerCube":t="sampler2D";else if(n==="object")if(Array.isArray(e))(e.length===4||e.length===9||e.length===16)&&(t=`mat${Math.sqrt(e.length)}`);else{let i=0;for(let o in e)e.hasOwnProperty(o)&&(i+=1);i>=2&&i<=4?t=`vec${i}`:i===6&&(t="samplerCube")}}return t}function SIe(e){let t=e._strict,n=e._template.materials;for(let i in n)if(n.hasOwnProperty(i)){let o=new Ve({strict:t,fabric:n[i],count:e._count});e._count=o._count,e._uniforms=bt(e._uniforms,o._uniforms,!0),e.materials[i]=o,e._translucentFunctions=e._translucentFunctions.concat(o._translucentFunctions);let r="czm_getMaterial",s=`${r}_${e._count++}`;wS(o,r,s),e.shaderSource=o.shaderSource+e.shaderSource;let a=`${s}(materialInput)`;if(wS(e,i,a)===0&&t)throw new w(`strict: shader source does not use material '${i}'.`)}}function wS(e,t,n,i){i=g(i,!0);let o=0,r="([\\w])?",s=`([\\w${i?".":""}])?`,a=new RegExp(s+t+r,"g");return e.shaderSource=e.shaderSource.replace(a,function(l,u,f){return u||f?l:(o+=1,n)}),o}function AIe(e,t,n){return wS(e,t,t,n)}Ve._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}};Ve.DefaultImageId="czm_defaultImage";Ve.DefaultCubeMapId="czm_defaultCubeMap";Ve.ColorType="Color";Ve._materialCache.addMaterial(Ve.ColorType,{fabric:{type:Ve.ColorType,uniforms:{color:new z(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}});Ve.ImageType="Image";Ve._materialCache.addMaterial(Ve.ImageType,{fabric:{type:Ve.ImageType,uniforms:{image:Ve.DefaultImageId,repeat:new k(1,1),color:new z(1,1,1,1)},components:{diffuse:"texture(image, fract(repeat * materialInput.st)).rgb * color.rgb",alpha:"texture(image, fract(repeat * materialInput.st)).a * color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}});Ve.DiffuseMapType="DiffuseMap";Ve._materialCache.addMaterial(Ve.DiffuseMapType,{fabric:{type:Ve.DiffuseMapType,uniforms:{image:Ve.DefaultImageId,channels:"rgb",repeat:new k(1,1)},components:{diffuse:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1});Ve.AlphaMapType="AlphaMap";Ve._materialCache.addMaterial(Ve.AlphaMapType,{fabric:{type:Ve.AlphaMapType,uniforms:{image:Ve.DefaultImageId,channel:"a",repeat:new k(1,1)},components:{alpha:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!0});Ve.SpecularMapType="SpecularMap";Ve._materialCache.addMaterial(Ve.SpecularMapType,{fabric:{type:Ve.SpecularMapType,uniforms:{image:Ve.DefaultImageId,channel:"r",repeat:new k(1,1)},components:{specular:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!1});Ve.EmissionMapType="EmissionMap";Ve._materialCache.addMaterial(Ve.EmissionMapType,{fabric:{type:Ve.EmissionMapType,uniforms:{image:Ve.DefaultImageId,channels:"rgb",repeat:new k(1,1)},components:{emission:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1});Ve.BumpMapType="BumpMap";Ve._materialCache.addMaterial(Ve.BumpMapType,{fabric:{type:Ve.BumpMapType,uniforms:{image:Ve.DefaultImageId,channel:"r",strength:.8,repeat:new k(1,1)},source:yM},translucent:!1});Ve.NormalMapType="NormalMap";Ve._materialCache.addMaterial(Ve.NormalMapType,{fabric:{type:Ve.NormalMapType,uniforms:{image:Ve.DefaultImageId,channels:"rgb",strength:.8,repeat:new k(1,1)},source:AM},translucent:!1});Ve.GridType="Grid";Ve._materialCache.addMaterial(Ve.GridType,{fabric:{type:Ve.GridType,uniforms:{color:new z(0,1,0,1),cellAlpha:.1,lineCount:new k(8,8),lineThickness:new k(1,1),lineOffset:new k(0,0)},source:SM},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.cellAlpha<1}});Ve.StripeType="Stripe";Ve._materialCache.addMaterial(Ve.StripeType,{fabric:{type:Ve.StripeType,uniforms:{horizontal:!0,evenColor:new z(1,1,1,.5),oddColor:new z(0,0,1,.5),offset:0,repeat:5},source:MM},translucent:function(e){let t=e.uniforms;return t.evenColor.alpha<1||t.oddColor.alpha<1}});Ve.CheckerboardType="Checkerboard";Ve._materialCache.addMaterial(Ve.CheckerboardType,{fabric:{type:Ve.CheckerboardType,uniforms:{lightColor:new z(1,1,1,.5),darkColor:new z(0,0,0,.5),repeat:new k(5,5)},source:bM},translucent:function(e){let t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}});Ve.DotType="Dot";Ve._materialCache.addMaterial(Ve.DotType,{fabric:{type:Ve.DotType,uniforms:{lightColor:new z(1,1,0,.75),darkColor:new z(0,1,1,.75),repeat:new k(5,5)},source:xM},translucent:function(e){let t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}});Ve.WaterType="Water";Ve._materialCache.addMaterial(Ve.WaterType,{fabric:{type:Ve.WaterType,uniforms:{baseWaterColor:new z(.2,.3,.6,1),blendColor:new z(0,1,.699,1),specularMap:Ve.DefaultImageId,normalMap:Ve.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:NM},translucent:function(e){let t=e.uniforms;return t.baseWaterColor.alpha<1||t.blendColor.alpha<1}});Ve.RimLightingType="RimLighting";Ve._materialCache.addMaterial(Ve.RimLightingType,{fabric:{type:Ve.RimLightingType,uniforms:{color:new z(1,0,0,.7),rimColor:new z(1,1,1,.4),width:.3},source:PM},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.rimColor.alpha<1}});Ve.FadeType="Fade";Ve._materialCache.addMaterial(Ve.FadeType,{fabric:{type:Ve.FadeType,uniforms:{fadeInColor:new z(1,0,0,1),fadeOutColor:new z(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new k(.5,.5)},source:wM},translucent:function(e){let t=e.uniforms;return t.fadeInColor.alpha<1||t.fadeOutColor.alpha<1}});Ve.PolylineArrowType="PolylineArrow";Ve._materialCache.addMaterial(Ve.PolylineArrowType,{fabric:{type:Ve.PolylineArrowType,uniforms:{color:new z(1,1,1,1)},source:vM},translucent:!0});Ve.PolylineDashType="PolylineDash";Ve._materialCache.addMaterial(Ve.PolylineDashType,{fabric:{type:Ve.PolylineDashType,uniforms:{color:new z(1,0,1,1),gapColor:new z(0,0,0,0),dashLength:16,dashPattern:255},source:DM},translucent:!0});Ve.PolylineGlowType="PolylineGlow";Ve._materialCache.addMaterial(Ve.PolylineGlowType,{fabric:{type:Ve.PolylineGlowType,uniforms:{color:new z(0,.5,1,1),glowPower:.25,taperPower:1},source:IM},translucent:!0});Ve.PolylineOutlineType="PolylineOutline";Ve._materialCache.addMaterial(Ve.PolylineOutlineType,{fabric:{type:Ve.PolylineOutlineType,uniforms:{color:new z(1,1,1,1),outlineColor:new z(1,0,0,1),outlineWidth:1},source:OM},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.outlineColor.alpha<1}});Ve.ElevationContourType="ElevationContour";Ve._materialCache.addMaterial(Ve.ElevationContourType,{fabric:{type:Ve.ElevationContourType,uniforms:{spacing:100,color:new z(1,0,0,1),width:1},source:CM},translucent:!1});Ve.ElevationRampType="ElevationRamp";Ve._materialCache.addMaterial(Ve.ElevationRampType,{fabric:{type:Ve.ElevationRampType,uniforms:{image:Ve.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:EM},translucent:!1});Ve.SlopeRampMaterialType="SlopeRamp";Ve._materialCache.addMaterial(Ve.SlopeRampMaterialType,{fabric:{type:Ve.SlopeRampMaterialType,uniforms:{image:Ve.DefaultImageId},source:RM},translucent:!1});Ve.AspectRampMaterialType="AspectRamp";Ve._materialCache.addMaterial(Ve.AspectRampMaterialType,{fabric:{type:Ve.AspectRampMaterialType,uniforms:{image:Ve.DefaultImageId},source:gM},translucent:!1});Ve.ElevationBandType="ElevationBand";Ve._materialCache.addMaterial(Ve.ElevationBandType,{fabric:{type:Ve.ElevationBandType,uniforms:{heights:Ve.DefaultImageId,colors:Ve.DefaultImageId},source:TM},translucent:!0});Ve.WaterMaskType="WaterMask";Ve._materialCache.addMaterial(Ve.WaterMaskType,{fabric:{type:Ve.WaterMaskType,source:LM,uniforms:{waterColor:new z(1,1,1,1),landColor:new z(0,0,0,0)}},translucent:!1});var Vi=Ve;function cb(e){e=g(e,g.EMPTY_OBJECT);let t=g(e.translucent,!0),n=g(e.closed,!1),i=g(e.materialSupport,cb.MaterialSupport.TEXTURED);this.material=c(e.material)?e.material:Vi.fromType(Vi.ColorType),this.translucent=t,this._vertexShaderSource=g(e.vertexShaderSource,i.vertexShaderSource),this._fragmentShaderSource=g(e.fragmentShaderSource,i.fragmentShaderSource),this._renderState=$i.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._materialSupport=i,this._vertexFormat=i.vertexFormat,this._flat=g(e.flat,!1),this._faceForward=g(e.faceForward,!n)}Object.defineProperties(cb.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},materialSupport:{get:function(){return this._materialSupport}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}});cb.prototype.getFragmentShaderSource=$i.prototype.getFragmentShaderSource;cb.prototype.isTranslucent=$i.prototype.isTranslucent;cb.prototype.getRenderState=$i.prototype.getRenderState;cb.MaterialSupport={BASIC:Object.freeze({vertexFormat:Ce.POSITION_AND_NORMAL,vertexShaderSource:mM,fragmentShaderSource:hM}),TEXTURED:Object.freeze({vertexFormat:Ce.POSITION_NORMAL_AND_ST,vertexShaderSource:_M,fragmentShaderSource:pM}),ALL:Object.freeze({vertexFormat:Ce.ALL,vertexShaderSource:dM,fragmentShaderSource:fM})};var eo=cb;var FM=`in vec3 v_positionEC;
| in vec3 v_normalEC;
| in vec4 v_color;
|
| void main()
| {
| vec3 positionToEyeEC = -v_positionEC;
|
| vec3 normalEC = normalize(v_normalEC);
| #ifdef FACE_FORWARD
| normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
| #endif
|
| vec4 color = czm_gammaCorrect(v_color);
|
| czm_materialInput materialInput;
| materialInput.normalEC = normalEC;
| materialInput.positionToEyeEC = positionToEyeEC;
| czm_material material = czm_getDefaultMaterial(materialInput);
| material.diffuse = color.rgb;
| material.alpha = color.a;
|
| out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
| }
| `;var BM=`in vec3 position3DHigh;
| in vec3 position3DLow;
| in vec3 normal;
| in vec4 color;
| in float batchId;
|
| out vec3 v_positionEC;
| out vec3 v_normalEC;
| out vec4 v_color;
|
| void main()
| {
| vec4 p = czm_computePosition();
|
| v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
| v_normalEC = czm_normal * normal; // normal in eye coordinates
| v_color = color;
|
| gl_Position = czm_modelViewProjectionRelativeToEye * p;
| }
| `;var eT=`in vec4 v_color;
|
| void main()
| {
| out_FragColor = czm_gammaCorrect(v_color);
| }
| `;var kM=`in vec3 position3DHigh;
| in vec3 position3DLow;
| in vec4 color;
| in float batchId;
|
| out vec4 v_color;
|
| void main()
| {
| vec4 p = czm_computePosition();
|
| v_color = color;
|
| gl_Position = czm_modelViewProjectionRelativeToEye * p;
| }
| `;function Bm(e){e=g(e,g.EMPTY_OBJECT);let t=g(e.translucent,!0),n=g(e.closed,!1),i=g(e.flat,!1),o=i?kM:BM,r=i?eT:FM,s=i?Bm.FLAT_VERTEX_FORMAT:Bm.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=g(e.vertexShaderSource,o),this._fragmentShaderSource=g(e.fragmentShaderSource,r),this._renderState=$i.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=s,this._flat=i,this._faceForward=g(e.faceForward,!n)}Object.defineProperties(Bm.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}});Bm.VERTEX_FORMAT=Ce.POSITION_AND_NORMAL;Bm.FLAT_VERTEX_FORMAT=Ce.POSITION_ONLY;Bm.prototype.getFragmentShaderSource=$i.prototype.getFragmentShaderSource;Bm.prototype.isTranslucent=$i.prototype.isTranslucent;Bm.prototype.getRenderState=$i.prototype.getRenderState;var nn=Bm;function tT(e){this._definitionChanged=new fe,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(tT.prototype,{isConstant:{get:function(){return G.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:oe("color")});tT.prototype.getType=function(e){return"Color"};var vIe=new K;tT.prototype.getValue=function(e,t){return c(e)||(e=K.now(vIe)),c(t)||(t={}),t.color=G.getValueOrClonedDefault(this._color,e,z.WHITE,t.color),t};tT.prototype.equals=function(e){return this===e||e instanceof tT&&G.equals(this._color,e._color)};var Ut=tT;function T_(e){e=g(e,g.EMPTY_OBJECT),this._ellipsoid=g(e.ellipsoid,Z.default),this._rectangle=g(e.rectangle,te.MAX_VALUE),this._projection=new Ei(this._ellipsoid),this._numberOfLevelZeroTilesX=g(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=g(e.numberOfLevelZeroTilesY,1)}Object.defineProperties(T_.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});T_.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e};T_.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e};T_.prototype.rectangleToNativeRectangle=function(e,t){C.defined("rectangle",e);let n=O.toDegrees(e.west),i=O.toDegrees(e.south),o=O.toDegrees(e.east),r=O.toDegrees(e.north);return c(t)?(t.west=n,t.south=i,t.east=o,t.north=r,t):new te(n,i,o,r)};T_.prototype.tileXYToNativeRectangle=function(e,t,n,i){let o=this.tileXYToRectangle(e,t,n,i);return o.west=O.toDegrees(o.west),o.south=O.toDegrees(o.south),o.east=O.toDegrees(o.east),o.north=O.toDegrees(o.north),o};T_.prototype.tileXYToRectangle=function(e,t,n,i){let o=this._rectangle,r=this.getNumberOfXTilesAtLevel(n),s=this.getNumberOfYTilesAtLevel(n),a=o.width/r,l=e*a+o.west,u=(e+1)*a+o.west,f=o.height/s,h=o.north-t*f,m=o.north-(t+1)*f;return c(i)||(i=new te(l,m,u,h)),i.west=l,i.south=m,i.east=u,i.north=h,i};T_.prototype.positionToTileXY=function(e,t,n){let i=this._rectangle;if(!te.contains(i,e))return;let o=this.getNumberOfXTilesAtLevel(t),r=this.getNumberOfYTilesAtLevel(t),s=i.width/o,a=i.height/r,l=e.longitude;i.east<i.west&&(l+=O.TWO_PI);let u=(l-i.west)/s|0;u>=o&&(u=o-1);let f=(i.north-e.latitude)/a|0;return f>=r&&(f=r-1),c(n)?(n.x=u,n.y=f,n):new k(u,f)};var Hi=T_;var zJ=new d,VJ=new d,HJ=new re,B8=new d,DIe=new d,GJ=new ne,IIe=new Hi,SS=[new re,new re,new re,new re],AS=new k,ar={};ar.initialize=function(){let e=ar._initPromise;return c(e)||(e=Te.fetchJson(Mi("Assets/approximateTerrainHeights.json")).then(function(t){ar._terrainHeights=t}),ar._initPromise=e),e};ar.getMinimumMaximumHeights=function(e,t){if(C.defined("rectangle",e),!c(ar._terrainHeights))throw new w("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");t=g(t,Z.default);let n=jJ(e),i=ar._defaultMinTerrainHeight,o=ar._defaultMaxTerrainHeight;if(c(n)){let r=`${n.level}-${n.x}-${n.y}`,s=ar._terrainHeights[r];c(s)&&(i=s[0],o=s[1]),t.cartographicToCartesian(te.northeast(e,HJ),zJ),t.cartographicToCartesian(te.southwest(e,HJ),VJ),d.midpoint(VJ,zJ,B8);let a=t.scaleToGeodeticSurface(B8,DIe);if(c(a)){let l=d.distance(B8,a);i=Math.min(i,-l)}else i=ar._defaultMinTerrainHeight}return i=Math.max(ar._defaultMinTerrainHeight,i),{minimumTerrainHeight:i,maximumTerrainHeight:o}};ar.getBoundingSphere=function(e,t){if(C.defined("rectangle",e),!c(ar._terrainHeights))throw new w("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");t=g(t,Z.default);let n=jJ(e),i=ar._defaultMaxTerrainHeight;if(c(n)){let r=`${n.level}-${n.x}-${n.y}`,s=ar._terrainHeights[r];c(s)&&(i=s[1])}let o=ne.fromRectangle3D(e,t,0);return ne.fromRectangle3D(e,t,i,GJ),ne.union(o,GJ,o)};function jJ(e){re.fromRadians(e.east,e.north,0,SS[0]),re.fromRadians(e.west,e.north,0,SS[1]),re.fromRadians(e.east,e.south,0,SS[2]),re.fromRadians(e.west,e.south,0,SS[3]);let t=0,n=0,i=0,o=0,r=ar._terrainHeightsMaxLevel,s;for(s=0;s<=r;++s){let a=!1;for(let l=0;l<4;++l){let u=SS[l];if(IIe.positionToTileXY(u,s,AS),l===0)i=AS.x,o=AS.y;else if(i!==AS.x||o!==AS.y){a=!0;break}}if(a)break;t=i,n=o}if(s!==0)return{x:t,y:n,level:s>r?r:s-1}}ar._terrainHeightsMaxLevel=6;ar._defaultMaxTerrainHeight=9e3;ar._defaultMinTerrainHeight=-1e5;ar._terrainHeights=void 0;ar._initPromise=void 0;Object.defineProperties(ar,{initialized:{get:function(){return c(ar._terrainHeights)}}});var ai=ar;function ac(e,t,n){this.minimum=d.clone(g(e,d.ZERO)),this.maximum=d.clone(g(t,d.ZERO)),c(n)?n=d.clone(n):n=d.midpoint(this.minimum,this.maximum,new d),this.center=n}ac.fromCorners=function(e,t,n){return C.defined("minimum",e),C.defined("maximum",t),c(n)||(n=new ac),n.minimum=d.clone(e,n.minimum),n.maximum=d.clone(t,n.maximum),n.center=d.midpoint(e,t,n.center),n};ac.fromPoints=function(e,t){if(c(t)||(t=new ac),!c(e)||e.length===0)return t.minimum=d.clone(d.ZERO,t.minimum),t.maximum=d.clone(d.ZERO,t.maximum),t.center=d.clone(d.ZERO,t.center),t;let n=e[0].x,i=e[0].y,o=e[0].z,r=e[0].x,s=e[0].y,a=e[0].z,l=e.length;for(let h=1;h<l;h++){let m=e[h],p=m.x,_=m.y,b=m.z;n=Math.min(p,n),r=Math.max(p,r),i=Math.min(_,i),s=Math.max(_,s),o=Math.min(b,o),a=Math.max(b,a)}let u=t.minimum;u.x=n,u.y=i,u.z=o;let f=t.maximum;return f.x=r,f.y=s,f.z=a,t.center=d.midpoint(u,f,t.center),t};ac.clone=function(e,t){if(c(e))return c(t)?(t.minimum=d.clone(e.minimum,t.minimum),t.maximum=d.clone(e.maximum,t.maximum),t.center=d.clone(e.center,t.center),t):new ac(e.minimum,e.maximum,e.center)};ac.equals=function(e,t){return e===t||c(e)&&c(t)&&d.equals(e.center,t.center)&&d.equals(e.minimum,t.minimum)&&d.equals(e.maximum,t.maximum)};var UM=new d;ac.intersectPlane=function(e,t){C.defined("box",e),C.defined("plane",t),UM=d.subtract(e.maximum,e.minimum,UM);let n=d.multiplyByScalar(UM,.5,UM),i=t.normal,o=n.x*Math.abs(i.x)+n.y*Math.abs(i.y)+n.z*Math.abs(i.z),r=d.dot(e.center,i)+t.distance;return r-o>0?Gt.INSIDE:r+o<0?Gt.OUTSIDE:Gt.INTERSECTING};ac.prototype.clone=function(e){return ac.clone(this,e)};ac.prototype.intersectPlane=function(e){return ac.intersectPlane(this,e)};ac.prototype.equals=function(e){return ac.equals(this,e)};var lb=ac;var k8=new ee;function rh(e,t){if(C.defined("origin",e),t=g(t,Z.default),e=t.scaleToGeodeticSurface(e),!c(e))throw new w("origin must not be at the center of the ellipsoid.");let n=Lt.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=d.fromCartesian4(N.getColumn(n,0,k8)),this._yAxis=d.fromCartesian4(N.getColumn(n,1,k8));let i=d.fromCartesian4(N.getColumn(n,2,k8));this._plane=on.fromPointNormal(e,i)}Object.defineProperties(rh.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var OIe=new lb;rh.fromPoints=function(e,t){C.defined("cartesians",e);let n=lb.fromPoints(e,OIe);return new rh(n.center,t)};var WJ=new mn,zM=new d;rh.prototype.projectPointOntoPlane=function(e,t){C.defined("cartesian",e);let n=WJ;n.origin=e,d.normalize(e,n.direction);let i=Yn.rayPlane(n,this._plane,zM);if(c(i)||(d.negate(n.direction,n.direction),i=Yn.rayPlane(n,this._plane,zM)),c(i)){let o=d.subtract(i,this._origin,i),r=d.dot(this._xAxis,o),s=d.dot(this._yAxis,o);return c(t)?(t.x=r,t.y=s,t):new k(r,s)}};rh.prototype.projectPointsOntoPlane=function(e,t){C.defined("cartesians",e),c(t)||(t=[]);let n=0,i=e.length;for(let o=0;o<i;o++){let r=this.projectPointOntoPlane(e[o],t[n]);c(r)&&(t[n]=r,n++)}return t.length=n,t};rh.prototype.projectPointToNearestOnPlane=function(e,t){C.defined("cartesian",e),c(t)||(t=new k);let n=WJ;n.origin=e,d.clone(this._plane.normal,n.direction);let i=Yn.rayPlane(n,this._plane,zM);c(i)||(d.negate(n.direction,n.direction),i=Yn.rayPlane(n,this._plane,zM));let o=d.subtract(i,this._origin,i),r=d.dot(this._xAxis,o),s=d.dot(this._yAxis,o);return t.x=r,t.y=s,t};rh.prototype.projectPointsToNearestOnPlane=function(e,t){C.defined("cartesians",e),c(t)||(t=[]);let n=e.length;t.length=n;for(let i=0;i<n;i++)t[i]=this.projectPointToNearestOnPlane(e[i],t[i]);return t};var PIe=new d;rh.prototype.projectPointOntoEllipsoid=function(e,t){C.defined("cartesian",e),c(t)||(t=new d);let n=this._ellipsoid,i=this._origin,o=this._xAxis,r=this._yAxis,s=PIe;return d.multiplyByScalar(o,e.x,s),t=d.add(i,s,t),d.multiplyByScalar(r,e.y,s),d.add(t,s,t),n.scaleToGeocentricSurface(t,t),t};rh.prototype.projectPointsOntoEllipsoid=function(e,t){C.defined("cartesians",e);let n=e.length;c(t)?t.length=n:t=new Array(n);for(let i=0;i<n;++i)t[i]=this.projectPointOntoEllipsoid(e[i],t[i]);return t};var Wr=rh;function wi(e,t){this.center=d.clone(g(e,d.ZERO)),this.halfAxes=q.clone(g(t,q.ZERO))}wi.packedLength=d.packedLength+q.packedLength;wi.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),d.pack(e.center,t,n),q.pack(e.halfAxes,t,n+d.packedLength),t};wi.unpack=function(e,t,n){return C.defined("array",e),t=g(t,0),c(n)||(n=new wi),d.unpack(e,t,n.center),q.unpack(e,t+d.packedLength,n.halfAxes),n};var RIe=new d,MIe=new d,LIe=new d,NIe=new d,FIe=new d,BIe=new d,kIe=new q,UIe={unitary:new q,diagonal:new q};wi.fromPoints=function(e,t){if(c(t)||(t=new wi),!c(e)||e.length===0)return t.halfAxes=q.ZERO,t.center=d.ZERO,t;let n,i=e.length,o=d.clone(e[0],RIe);for(n=1;n<i;n++)d.add(o,e[n],o);let r=1/i;d.multiplyByScalar(o,r,o);let s=0,a=0,l=0,u=0,f=0,h=0,m;for(n=0;n<i;n++)m=d.subtract(e[n],o,MIe),s+=m.x*m.x,a+=m.x*m.y,l+=m.x*m.z,u+=m.y*m.y,f+=m.y*m.z,h+=m.z*m.z;s*=r,a*=r,l*=r,u*=r,f*=r,h*=r;let p=kIe;p[0]=s,p[1]=a,p[2]=l,p[3]=a,p[4]=u,p[5]=f,p[6]=l,p[7]=f,p[8]=h;let _=q.computeEigenDecomposition(p,UIe),b=q.clone(_.unitary,t.halfAxes),x=q.getColumn(b,0,NIe),T=q.getColumn(b,1,FIe),E=q.getColumn(b,2,BIe),S=-Number.MAX_VALUE,A=-Number.MAX_VALUE,v=-Number.MAX_VALUE,D=Number.MAX_VALUE,R=Number.MAX_VALUE,P=Number.MAX_VALUE;for(n=0;n<i;n++)m=e[n],S=Math.max(d.dot(x,m),S),A=Math.max(d.dot(T,m),A),v=Math.max(d.dot(E,m),v),D=Math.min(d.dot(x,m),D),R=Math.min(d.dot(T,m),R),P=Math.min(d.dot(E,m),P);x=d.multiplyByScalar(x,.5*(D+S),x),T=d.multiplyByScalar(T,.5*(R+A),T),E=d.multiplyByScalar(E,.5*(P+v),E);let L=d.add(x,T,t.center);d.add(L,E,L);let F=LIe;return F.x=S-D,F.y=A-R,F.z=v-P,d.multiplyByScalar(F,.5,F),q.multiplyByScale(t.halfAxes,F,t.halfAxes),t};var ZJ=new d,zIe=new d;function qJ(e,t,n,i,o,r,s,a,l,u,f){if(!c(o)||!c(r)||!c(s)||!c(a)||!c(l)||!c(u))throw new w("all extents (minimum/maximum X/Y/Z) are required.");c(f)||(f=new wi);let h=f.halfAxes;q.setColumn(h,0,t,h),q.setColumn(h,1,n,h),q.setColumn(h,2,i,h);let m=ZJ;m.x=(o+r)/2,m.y=(s+a)/2,m.z=(l+u)/2;let p=zIe;p.x=(r-o)/2,p.y=(a-s)/2,p.z=(u-l)/2;let _=f.center;return m=q.multiplyByVector(h,m,m),d.add(e,m,_),q.multiplyByScale(h,p,h),f}var YJ=new re,VIe=new d,HIe=new re,GIe=new re,jIe=new re,WIe=new re,qIe=new re,YIe=new d,XJ=new d,XIe=new d,KJ=new d,KIe=new d,$Ie=new k,ZIe=new k,JIe=new k,QIe=new k,eOe=new k,tOe=new d,nOe=new d,iOe=new d,oOe=new d,rOe=new k,sOe=new d,aOe=new d,cOe=new d,lOe=new on(d.UNIT_X,0);wi.fromRectangle=function(e,t,n,i,o){if(!c(e))throw new w("rectangle is required");if(e.width<0||e.width>O.TWO_PI)throw new w("Rectangle width must be between 0 and 2 * pi");if(e.height<0||e.height>O.PI)throw new w("Rectangle height must be between 0 and pi");if(c(i)&&!O.equalsEpsilon(i.radii.x,i.radii.y,O.EPSILON15))throw new w("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");t=g(t,0),n=g(n,0),i=g(i,Z.default);let r,s,a,l,u,f,h;if(e.width<=O.PI){let R=te.center(e,YJ),P=i.cartographicToCartesian(R,VIe),L=new Wr(P,i);h=L.plane;let F=R.longitude,y=e.south<0&&e.north>0?0:R.latitude,I=re.fromRadians(F,e.north,n,HIe),M=re.fromRadians(e.west,e.north,n,GIe),B=re.fromRadians(e.west,y,n,jIe),U=re.fromRadians(e.west,e.south,n,WIe),V=re.fromRadians(F,e.south,n,qIe),W=i.cartographicToCartesian(I,YIe),H=i.cartographicToCartesian(M,XJ),X=i.cartographicToCartesian(B,XIe),$=i.cartographicToCartesian(U,KJ),ae=i.cartographicToCartesian(V,KIe),se=L.projectPointToNearestOnPlane(W,$Ie),he=L.projectPointToNearestOnPlane(H,ZIe),ge=L.projectPointToNearestOnPlane(X,JIe),le=L.projectPointToNearestOnPlane($,QIe),me=L.projectPointToNearestOnPlane(ae,eOe);return r=Math.min(he.x,ge.x,le.x),s=-r,l=Math.max(he.y,se.y),a=Math.min(le.y,me.y),M.height=U.height=t,H=i.cartographicToCartesian(M,XJ),$=i.cartographicToCartesian(U,KJ),u=Math.min(on.getPointDistance(h,H),on.getPointDistance(h,$)),f=n,qJ(L.origin,L.xAxis,L.yAxis,L.zAxis,r,s,a,l,u,f,o)}let m=e.south>0,p=e.north<0,_=m?e.south:p?e.north:0,b=te.center(e,YJ).longitude,x=d.fromRadians(b,_,n,i,tOe);x.z=0;let E=Math.abs(x.x)<O.EPSILON10&&Math.abs(x.y)<O.EPSILON10?d.UNIT_X:d.normalize(x,nOe),S=d.UNIT_Z,A=d.cross(E,S,iOe);h=on.fromPointNormal(x,E,lOe);let v=d.fromRadians(b+O.PI_OVER_TWO,_,n,i,oOe);s=d.dot(on.projectPointOntoPlane(h,v,rOe),A),r=-s,l=d.fromRadians(0,e.north,p?t:n,i,sOe).z,a=d.fromRadians(0,e.south,m?t:n,i,aOe).z;let D=d.fromRadians(e.east,_,n,i,cOe);return u=on.getPointDistance(h,D),f=0,qJ(x,A,S,E,r,s,a,l,u,f,o)};wi.fromTransformation=function(e,t){return C.typeOf.object("transformation",e),c(t)||(t=new wi),t.center=N.getTranslation(e,t.center),t.halfAxes=N.getMatrix3(e,t.halfAxes),t.halfAxes=q.multiplyByScalar(t.halfAxes,.5,t.halfAxes),t};wi.clone=function(e,t){if(c(e))return c(t)?(d.clone(e.center,t.center),q.clone(e.halfAxes,t.halfAxes),t):new wi(e.center,e.halfAxes)};wi.intersectPlane=function(e,t){if(!c(e))throw new w("box is required.");if(!c(t))throw new w("plane is required.");let n=e.center,i=t.normal,o=e.halfAxes,r=i.x,s=i.y,a=i.z,l=Math.abs(r*o[q.COLUMN0ROW0]+s*o[q.COLUMN0ROW1]+a*o[q.COLUMN0ROW2])+Math.abs(r*o[q.COLUMN1ROW0]+s*o[q.COLUMN1ROW1]+a*o[q.COLUMN1ROW2])+Math.abs(r*o[q.COLUMN2ROW0]+s*o[q.COLUMN2ROW1]+a*o[q.COLUMN2ROW2]),u=d.dot(i,n)+t.distance;return u<=-l?Gt.OUTSIDE:u>=l?Gt.INSIDE:Gt.INTERSECTING};var JJ=new d,QJ=new d,eQ=new d,uOe=new d,$J=new d,fOe=new d;wi.distanceSquaredTo=function(e,t){if(!c(e))throw new w("box is required.");if(!c(t))throw new w("cartesian is required.");let n=d.subtract(t,e.center,ZJ),i=e.halfAxes,o=q.getColumn(i,0,JJ),r=q.getColumn(i,1,QJ),s=q.getColumn(i,2,eQ),a=d.magnitude(o),l=d.magnitude(r),u=d.magnitude(s),f=!0,h=!0,m=!0;a>0?d.divideByScalar(o,a,o):f=!1,l>0?d.divideByScalar(r,l,r):h=!1,u>0?d.divideByScalar(s,u,s):m=!1;let p=!f+!h+!m,_,b,x;if(p===1){let A=o;_=r,b=s,h?m||(A=s,b=o):(A=r,_=o),x=d.cross(_,b,$J),A===o?o=x:A===r?r=x:A===s&&(s=x)}else if(p===2){_=o,h?_=r:m&&(_=s);let A=d.UNIT_Y;A.equalsEpsilon(_,O.EPSILON3)&&(A=d.UNIT_X),b=d.cross(_,A,uOe),d.normalize(b,b),x=d.cross(_,b,$J),d.normalize(x,x),_===o?(r=b,s=x):_===r?(s=b,o=x):_===s&&(o=b,r=x)}else p===3&&(o=d.UNIT_X,r=d.UNIT_Y,s=d.UNIT_Z);let T=fOe;T.x=d.dot(n,o),T.y=d.dot(n,r),T.z=d.dot(n,s);let E=0,S;return T.x<-a?(S=T.x+a,E+=S*S):T.x>a&&(S=T.x-a,E+=S*S),T.y<-l?(S=T.y+l,E+=S*S):T.y>l&&(S=T.y-l,E+=S*S),T.z<-u?(S=T.z+u,E+=S*S):T.z>u&&(S=T.z-u,E+=S*S),E};var dOe=new d,hOe=new d;wi.computePlaneDistances=function(e,t,n,i){if(!c(e))throw new w("box is required.");if(!c(t))throw new w("position is required.");if(!c(n))throw new w("direction is required.");c(i)||(i=new Da);let o=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,s=e.center,a=e.halfAxes,l=q.getColumn(a,0,JJ),u=q.getColumn(a,1,QJ),f=q.getColumn(a,2,eQ),h=d.add(l,u,dOe);d.add(h,f,h),d.add(h,s,h);let m=d.subtract(h,t,hOe),p=d.dot(n,m);return o=Math.min(p,o),r=Math.max(p,r),d.add(s,l,h),d.add(h,u,h),d.subtract(h,f,h),d.subtract(h,t,m),p=d.dot(n,m),o=Math.min(p,o),r=Math.max(p,r),d.add(s,l,h),d.subtract(h,u,h),d.add(h,f,h),d.subtract(h,t,m),p=d.dot(n,m),o=Math.min(p,o),r=Math.max(p,r),d.add(s,l,h),d.subtract(h,u,h),d.subtract(h,f,h),d.subtract(h,t,m),p=d.dot(n,m),o=Math.min(p,o),r=Math.max(p,r),d.subtract(s,l,h),d.add(h,u,h),d.add(h,f,h),d.subtract(h,t,m),p=d.dot(n,m),o=Math.min(p,o),r=Math.max(p,r),d.subtract(s,l,h),d.add(h,u,h),d.subtract(h,f,h),d.subtract(h,t,m),p=d.dot(n,m),o=Math.min(p,o),r=Math.max(p,r),d.subtract(s,l,h),d.subtract(h,u,h),d.add(h,f,h),d.subtract(h,t,m),p=d.dot(n,m),o=Math.min(p,o),r=Math.max(p,r),d.subtract(s,l,h),d.subtract(h,u,h),d.subtract(h,f,h),d.subtract(h,t,m),p=d.dot(n,m),o=Math.min(p,o),r=Math.max(p,r),i.start=o,i.stop=r,i};var mOe=new d,pOe=new d,_Oe=new d;wi.computeCorners=function(e,t){C.typeOf.object("box",e),c(t)||(t=[new d,new d,new d,new d,new d,new d,new d,new d]);let n=e.center,i=e.halfAxes,o=q.getColumn(i,0,mOe),r=q.getColumn(i,1,pOe),s=q.getColumn(i,2,_Oe);return d.clone(n,t[0]),d.subtract(t[0],o,t[0]),d.subtract(t[0],r,t[0]),d.subtract(t[0],s,t[0]),d.clone(n,t[1]),d.subtract(t[1],o,t[1]),d.subtract(t[1],r,t[1]),d.add(t[1],s,t[1]),d.clone(n,t[2]),d.subtract(t[2],o,t[2]),d.add(t[2],r,t[2]),d.subtract(t[2],s,t[2]),d.clone(n,t[3]),d.subtract(t[3],o,t[3]),d.add(t[3],r,t[3]),d.add(t[3],s,t[3]),d.clone(n,t[4]),d.add(t[4],o,t[4]),d.subtract(t[4],r,t[4]),d.subtract(t[4],s,t[4]),d.clone(n,t[5]),d.add(t[5],o,t[5]),d.subtract(t[5],r,t[5]),d.add(t[5],s,t[5]),d.clone(n,t[6]),d.add(t[6],o,t[6]),d.add(t[6],r,t[6]),d.subtract(t[6],s,t[6]),d.clone(n,t[7]),d.add(t[7],o,t[7]),d.add(t[7],r,t[7]),d.add(t[7],s,t[7]),t};var gOe=new q;wi.computeTransformation=function(e,t){C.typeOf.object("box",e),c(t)||(t=new N);let n=e.center,i=q.multiplyByUniformScale(e.halfAxes,2,gOe);return N.fromRotationTranslation(i,n,t)};var yOe=new ne;wi.isOccluded=function(e,t){if(!c(e))throw new w("box is required.");if(!c(t))throw new w("occluder is required.");let n=ne.fromOrientedBoundingBox(e,yOe);return!t.isBoundingSphereVisible(n)};wi.prototype.intersectPlane=function(e){return wi.intersectPlane(this,e)};wi.prototype.distanceSquaredTo=function(e){return wi.distanceSquaredTo(this,e)};wi.prototype.computePlaneDistances=function(e,t,n){return wi.computePlaneDistances(this,e,t,n)};wi.prototype.computeCorners=function(e){return wi.computeCorners(this,e)};wi.prototype.computeTransformation=function(e){return wi.computeTransformation(this,e)};wi.prototype.isOccluded=function(e){return wi.isOccluded(this,e)};wi.equals=function(e,t){return e===t||c(e)&&c(t)&&d.equals(e.center,t.center)&&q.equals(e.halfAxes,t.halfAxes)};wi.prototype.clone=function(e){return wi.clone(this,e)};wi.prototype.equals=function(e){return wi.equals(this,e)};var wn=wi;var VM={};VM.getHeight=function(e,t,n){if(!Number.isFinite(t))throw new w("scale must be a finite number.");if(!Number.isFinite(n))throw new w("relativeHeight must be a finite number.");return(e-n)*t+n};var bOe=new re;VM.getPosition=function(e,t,n,i,o){let r=t.cartesianToCartographic(e,bOe);if(!c(r))return d.clone(e,o);let s=VM.getHeight(r.height,n,i);return d.fromRadians(r.longitude,r.latitude,s,t,o)};var Cr=VM;var HM=`in vec3 position3DHigh;
| in vec3 position3DLow;
| in float batchId;
|
| #ifdef EXTRUDED_GEOMETRY
| in vec3 extrudeDirection;
|
| uniform float u_globeMinimumAltitude;
| #endif // EXTRUDED_GEOMETRY
|
| #ifdef PER_INSTANCE_COLOR
| out vec4 v_color;
| #endif // PER_INSTANCE_COLOR
|
| #ifdef TEXTURE_COORDINATES
| #ifdef SPHERICAL
| out vec4 v_sphericalExtents;
| #else // SPHERICAL
| out vec2 v_inversePlaneExtents;
| out vec4 v_westPlane;
| out vec4 v_southPlane;
| #endif // SPHERICAL
| out vec3 v_uvMinAndSphericalLongitudeRotation;
| out vec3 v_uMaxAndInverseDistance;
| out vec3 v_vMaxAndInverseDistance;
| #endif // TEXTURE_COORDINATES
|
| void main()
| {
| vec4 position = czm_computePosition();
|
| #ifdef EXTRUDED_GEOMETRY
| float delta = min(u_globeMinimumAltitude, czm_geometricToleranceOverMeter * length(position.xyz));
| delta *= czm_sceneMode == czm_sceneMode3D ? 1.0 : 0.0;
|
| //extrudeDirection is zero for the top layer
| position = position + vec4(extrudeDirection * delta, 0.0);
| #endif
|
| #ifdef TEXTURE_COORDINATES
| #ifdef SPHERICAL
| v_sphericalExtents = czm_batchTable_sphericalExtents(batchId);
| v_uvMinAndSphericalLongitudeRotation.z = czm_batchTable_longitudeRotation(batchId);
| #else // SPHERICAL
| #ifdef COLUMBUS_VIEW_2D
| vec4 planes2D_high = czm_batchTable_planes2D_HIGH(batchId);
| vec4 planes2D_low = czm_batchTable_planes2D_LOW(batchId);
|
| // If the primitive is split across the IDL (planes2D_high.x > planes2D_high.w):
| // - If this vertex is on the east side of the IDL (position3DLow.y > 0.0, comparison with position3DHigh may produce artifacts)
| // - existing "east" is on the wrong side of the world, far away (planes2D_high/low.w)
| // - so set "east" as beyond the eastmost extent of the projection (idlSplitNewPlaneHiLow)
| vec2 idlSplitNewPlaneHiLow = vec2(EAST_MOST_X_HIGH - (WEST_MOST_X_HIGH - planes2D_high.w), EAST_MOST_X_LOW - (WEST_MOST_X_LOW - planes2D_low.w));
| bool idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y > 0.0;
| planes2D_high.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.w);
| planes2D_low.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.w);
|
| // - else, if this vertex is on the west side of the IDL (position3DLow.y < 0.0)
| // - existing "west" is on the wrong side of the world, far away (planes2D_high/low.x)
| // - so set "west" as beyond the westmost extent of the projection (idlSplitNewPlaneHiLow)
| idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y < 0.0;
| idlSplitNewPlaneHiLow = vec2(WEST_MOST_X_HIGH - (EAST_MOST_X_HIGH - planes2D_high.x), WEST_MOST_X_LOW - (EAST_MOST_X_LOW - planes2D_low.x));
| planes2D_high.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.x);
| planes2D_low.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.x);
|
| vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.xy), vec3(0.0, planes2D_low.xy))).xyz;
| vec3 northWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.x, planes2D_high.z), vec3(0.0, planes2D_low.x, planes2D_low.z))).xyz;
| vec3 southEastCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.w, planes2D_high.y), vec3(0.0, planes2D_low.w, planes2D_low.y))).xyz;
| #else // COLUMBUS_VIEW_2D
| // 3D case has smaller "plane extents," so planes encoded as a 64 bit position and 2 vec3s for distances/direction
| vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(czm_batchTable_southWest_HIGH(batchId), czm_batchTable_southWest_LOW(batchId))).xyz;
| vec3 northWestCorner = czm_normal * czm_batchTable_northward(batchId) + southWestCorner;
| vec3 southEastCorner = czm_normal * czm_batchTable_eastward(batchId) + southWestCorner;
| #endif // COLUMBUS_VIEW_2D
|
| vec3 eastWard = southEastCorner - southWestCorner;
| float eastExtent = length(eastWard);
| eastWard /= eastExtent;
|
| vec3 northWard = northWestCorner - southWestCorner;
| float northExtent = length(northWard);
| northWard /= northExtent;
|
| v_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));
| v_southPlane = vec4(northWard, -dot(northWard, southWestCorner));
| v_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);
| #endif // SPHERICAL
| vec4 uvMinAndExtents = czm_batchTable_uvMinAndExtents(batchId);
| vec4 uMaxVmax = czm_batchTable_uMaxVmax(batchId);
|
| v_uMaxAndInverseDistance = vec3(uMaxVmax.xy, uvMinAndExtents.z);
| v_vMaxAndInverseDistance = vec3(uMaxVmax.zw, uvMinAndExtents.w);
| v_uvMinAndSphericalLongitudeRotation.xy = uvMinAndExtents.xy;
| #endif // TEXTURE_COORDINATES
|
| #ifdef PER_INSTANCE_COLOR
| v_color = czm_batchTable_color(batchId);
| #endif
|
| gl_Position = czm_depthClamp(czm_modelViewProjectionRelativeToEye * position);
| }
| `;var ub=`#ifdef VECTOR_TILE
| uniform vec4 u_highlightColor;
| #endif
|
| void main(void)
| {
| #ifdef VECTOR_TILE
| out_FragColor = czm_gammaCorrect(u_highlightColor);
| #else
| out_FragColor = vec4(1.0);
| #endif
| czm_writeDepthClamp();
| }
| `;var tQ={TERRAIN:0,CESIUM_3D_TILE:1,BOTH:2};tQ.NUMBER_OF_CLASSIFICATION_TYPES=3;var Ln=Object.freeze(tQ);var xOe={NEVER:Y.NEVER,LESS:Y.LESS,EQUAL:Y.EQUAL,LESS_OR_EQUAL:Y.LEQUAL,GREATER:Y.GREATER,NOT_EQUAL:Y.NOTEQUAL,GREATER_OR_EQUAL:Y.GEQUAL,ALWAYS:Y.ALWAYS},cc=Object.freeze(xOe);function TOe(e,t){if(!c(e))throw new w("array is required.");if(!c(t)||t<1)throw new w("numberOfArrays must be greater than 0.");let n=[],i=e.length,o=0;for(;o<i;){let r=Math.ceil((i-o)/t--);n.push(e.slice(o,o+r)),o+=r}return n}var GM=TOe;function km(e,t,n){if(!c(e))throw new w("context is required");if(!c(t))throw new w("attributes is required");if(!c(n))throw new w("numberOfInstances is required");if(this._attributes=t,this._numberOfInstances=n,t.length===0)return;let i=COe(t),o=e.floatingPointTexture,r=i===Ne.FLOAT&&!o,s=EOe(t,r),a=wOe(s,t,r),l=Math.floor(ht.maximumTextureSize/a),u=Math.min(n,l),f=a*u,h=Math.ceil(n/u),m=1/f,p=m*.5,_=1/h,b=_*.5;this._textureDimensions=new k(f,h),this._textureStep=new ee(m,p,_,b),this._pixelDatatype=r?Ne.UNSIGNED_BYTE:i,this._packFloats=r,this._offsets=s,this._stride=a,this._texture=void 0;let x=4*f*h;this._batchValues=i===Ne.FLOAT&&!r?new Float32Array(x):new Uint8Array(x),this._batchValuesDirty=!1}Object.defineProperties(km.prototype,{attributes:{get:function(){return this._attributes}},numberOfInstances:{get:function(){return this._numberOfInstances}}});function COe(e){let t=!1,n=e.length;for(let i=0;i<n;++i)if(e[i].componentDatatype!==j.UNSIGNED_BYTE){t=!0;break}return t?Ne.FLOAT:Ne.UNSIGNED_BYTE}function iQ(e,t){let n=e[t].componentsPerAttribute;return n===2?k:n===3?d:n===4?ee:Number}function EOe(e,t){let n=new Array(e.length),i=0,o=e.length;for(let r=0;r<o;++r){let a=e[r].componentDatatype;n[r]=i,a!==j.UNSIGNED_BYTE&&t?i+=4:++i}return n}function wOe(e,t,n){let i=e.length,o=e[i-1];return t[i-1].componentDatatype!==j.UNSIGNED_BYTE&&n?o+4:o+1}var vS=new ee;function SOe(e,t,n){let i=ee.unpack(e,t,vS),o=ee.unpackFloat(i);i=ee.unpack(e,t+4,vS);let r=ee.unpackFloat(i);i=ee.unpack(e,t+8,vS);let s=ee.unpackFloat(i);i=ee.unpack(e,t+12,vS);let a=ee.unpackFloat(i);return ee.fromElements(o,r,s,a,n)}function AOe(e,t,n){let i=ee.packFloat(e.x,vS);ee.pack(i,t,n),i=ee.packFloat(e.y,i),ee.pack(i,t,n+4),i=ee.packFloat(e.z,i),ee.pack(i,t,n+8),i=ee.packFloat(e.w,i),ee.pack(i,t,n+12)}var nQ=new ee;km.prototype.getBatchedAttribute=function(e,t,n){if(e<0||e>=this._numberOfInstances)throw new w("instanceIndex is out of range.");if(t<0||t>=this._attributes.length)throw new w("attributeIndex is out of range");let i=this._attributes,o=this._offsets[t],s=4*this._stride*e+4*o,a;this._packFloats&&i[t].componentDatatype!==Ne.UNSIGNED_BYTE?a=SOe(this._batchValues,s,nQ):a=ee.unpack(this._batchValues,s,nQ);let l=iQ(i,t);return c(l.fromCartesian4)?l.fromCartesian4(a,n):c(l.clone)?l.clone(a,n):a.x};var vOe=[void 0,void 0,new k,new d,new ee],DOe=new ee;km.prototype.setBatchedAttribute=function(e,t,n){if(e<0||e>=this._numberOfInstances)throw new w("instanceIndex is out of range.");if(t<0||t>=this._attributes.length)throw new w("attributeIndex is out of range");if(!c(n))throw new w("value is required.");let i=this._attributes,o=vOe[i[t].componentsPerAttribute],r=this.getBatchedAttribute(e,t,o),s=iQ(this._attributes,t);if(c(s.equals)?s.equals(r,n):r===n)return;let l=DOe;l.x=c(n.x)?n.x:n,l.y=c(n.y)?n.y:0,l.z=c(n.z)?n.z:0,l.w=c(n.w)?n.w:0;let u=this._offsets[t],h=4*this._stride*e+4*u;this._packFloats&&i[t].componentDatatype!==Ne.UNSIGNED_BYTE?AOe(l,this._batchValues,h):ee.pack(l,this._batchValues,h),this._batchValuesDirty=!0};function IOe(e,t){let n=e._textureDimensions;e._texture=new Ot({context:t,pixelFormat:Re.RGBA,pixelDatatype:e._pixelDatatype,width:n.x,height:n.y,sampler:Jt.NEAREST,flipY:!1})}function OOe(e){let t=e._textureDimensions;e._texture.copyFrom({source:{width:t.x,height:t.y,arrayBufferView:e._batchValues}})}km.prototype.update=function(e){c(this._texture)&&!this._batchValuesDirty||this._attributes.length===0||(this._batchValuesDirty=!1,c(this._texture)||IOe(this,e.context),OOe(this))};km.prototype.getUniformMapCallback=function(){let e=this;return function(t){return e._attributes.length===0?t:bt(t,{batchTexture:function(){return e._texture},batchTextureDimensions:function(){return e._textureDimensions},batchTextureStep:function(){return e._textureStep}})}};function POe(e){let t=e._stride;return e._textureDimensions.y===1?`uniform vec4 batchTextureStep;
| vec2 computeSt(float batchId)
| {
| float stepX = batchTextureStep.x;
| float centerX = batchTextureStep.y;
| float numberOfAttributes = float(${t});
| return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5);
| }
| `:`uniform vec4 batchTextureStep;
| uniform vec2 batchTextureDimensions;
| vec2 computeSt(float batchId)
| {
| float stepX = batchTextureStep.x;
| float centerX = batchTextureStep.y;
| float stepY = batchTextureStep.z;
| float centerY = batchTextureStep.w;
| float numberOfAttributes = float(${t});
| float xId = mod(batchId * numberOfAttributes, batchTextureDimensions.x);
| float yId = floor(batchId * numberOfAttributes / batchTextureDimensions.x);
| return vec2(centerX + (xId * stepX), centerY + (yId * stepY));
| }
| `}function ROe(e){return e===1?"float":`vec${e}`}function MOe(e){return e===1?".x":e===2?".xy":e===3?".xyz":""}function LOe(e,t){let i=e._attributes[t],o=i.componentsPerAttribute,r=i.functionName,s=ROe(o),a=MOe(o),l=e._offsets[t],u=`${s} ${r}(float batchId)
| {
| vec2 st = computeSt(batchId);
| st.x += batchTextureStep.x * float(${l});
| `;return e._packFloats&&i.componentDatatype!==Ne.UNSIGNED_BYTE?u+=`vec4 textureValue;
| textureValue.x = czm_unpackFloat(texture(batchTexture, st));
| textureValue.y = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x, 0.0)));
| textureValue.z = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x * 2.0, 0.0)));
| textureValue.w = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x * 3.0, 0.0)));
| `:u+=` vec4 textureValue = texture(batchTexture, st);
| `,u+=` ${s} value = textureValue${a};
| `,e._pixelDatatype===Ne.UNSIGNED_BYTE&&i.componentDatatype===j.UNSIGNED_BYTE&&!i.normalize?u+=`value *= 255.0;
| `:e._pixelDatatype===Ne.FLOAT&&i.componentDatatype===j.UNSIGNED_BYTE&&i.normalize&&(u+=`value /= 255.0;
| `),u+=` return value;
| }
| `,u}km.prototype.getVertexShaderCallback=function(){let e=this._attributes;if(e.length===0)return function(i){return i};let t=`uniform highp sampler2D batchTexture;
| `;t+=`${POe(this)}
| `;let n=e.length;for(let i=0;i<n;++i)t+=LOe(this,i);return function(i){let o=i.indexOf("void main"),r=i.substring(0,o),s=i.substring(o);return`${r}
| ${t}
| ${s}`}};km.prototype.isDestroyed=function(){return!1};km.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),ue(this)};var nT=km;function Yc(e){this._ellipsoid=g(e,Z.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(Yc.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});Yc.mercatorAngleToGeodeticLatitude=function(e){return O.PI_OVER_TWO-2*Math.atan(Math.exp(-e))};Yc.geodeticLatitudeToMercatorAngle=function(e){e>Yc.MaximumLatitude?e=Yc.MaximumLatitude:e<-Yc.MaximumLatitude&&(e=-Yc.MaximumLatitude);let t=Math.sin(e);return .5*Math.log((1+t)/(1-t))};Yc.MaximumLatitude=Yc.mercatorAngleToGeodeticLatitude(Math.PI);Yc.prototype.project=function(e,t){let n=this._semimajorAxis,i=e.longitude*n,o=Yc.geodeticLatitudeToMercatorAngle(e.latitude)*n,r=e.height;return c(t)?(t.x=i,t.y=o,t.z=r,t):new d(i,o,r)};Yc.prototype.unproject=function(e,t){if(!c(e))throw new w("cartesian is required");let n=this._oneOverSemimajorAxis,i=e.x*n,o=Yc.mercatorAngleToGeodeticLatitude(e.y*n),r=e.z;return c(t)?(t.longitude=i,t.latitude=o,t.height=r,t):new re(i,o,r)};var Si=Yc;function NOe(e,t,n){let i=!n,o=e.length,r;if(!i&&o>1){let s=e[0].modelMatrix;for(r=1;r<o;++r)if(!N.equals(s,e[r].modelMatrix)){i=!0;break}}if(i)for(r=0;r<o;++r)c(e[r].geometry)&&Pn.transformToWorldCoordinates(e[r]);else N.multiplyTransformation(t,e[0].modelMatrix,t)}function U8(e,t){let n=e.attributes,i=n.position,o=i.values.length/i.componentsPerAttribute;n.batchId=new be({componentDatatype:j.FLOAT,componentsPerAttribute:1,values:new Float32Array(o)});let r=n.batchId.values;for(let s=0;s<o;++s)r[s]=t}function FOe(e){let t=e.length;for(let n=0;n<t;++n){let i=e[n];c(i.geometry)?U8(i.geometry,n):c(i.westHemisphereGeometry)&&c(i.eastHemisphereGeometry)&&(U8(i.westHemisphereGeometry,n),U8(i.eastHemisphereGeometry,n))}}function BOe(e){let t=e.instances,n=e.projection,i=e.elementIndexUintSupported,o=e.scene3DOnly,r=e.vertexCacheOptimize,s=e.compressVertices,a=e.modelMatrix,l,u,f,h=t.length;for(l=0;l<h;++l)if(c(t[l].geometry)){f=t[l].geometry.primitiveType;break}for(l=1;l<h;++l)if(c(t[l].geometry)&&t[l].geometry.primitiveType!==f)throw new w("All instance geometries must have the same primitiveType.");if(NOe(t,a,o),!o)for(l=0;l<h;++l)c(t[l].geometry)&&Pn.splitLongitude(t[l]);if(FOe(t),r)for(l=0;l<h;++l){let p=t[l];c(p.geometry)?(Pn.reorderForPostVertexCache(p.geometry),Pn.reorderForPreVertexCache(p.geometry)):c(p.westHemisphereGeometry)&&c(p.eastHemisphereGeometry)&&(Pn.reorderForPostVertexCache(p.westHemisphereGeometry),Pn.reorderForPreVertexCache(p.westHemisphereGeometry),Pn.reorderForPostVertexCache(p.eastHemisphereGeometry),Pn.reorderForPreVertexCache(p.eastHemisphereGeometry))}let m=Pn.combineInstances(t);for(h=m.length,l=0;l<h;++l){u=m[l];let p=u.attributes;if(o)for(let _ in p)p.hasOwnProperty(_)&&p[_].componentDatatype===j.DOUBLE&&Pn.encodeAttribute(u,_,`${_}3DHigh`,`${_}3DLow`);else for(let _ in p)if(p.hasOwnProperty(_)&&p[_].componentDatatype===j.DOUBLE){let b=`${_}3D`,x=`${_}2D`;Pn.projectTo2D(u,_,b,x,n),c(u.boundingSphere)&&_==="position"&&(u.boundingSphereCV=ne.fromVertices(u.attributes.position2D.values)),Pn.encodeAttribute(u,b,`${b}High`,`${b}Low`),Pn.encodeAttribute(u,x,`${x}High`,`${x}Low`)}s&&Pn.compressVertices(u)}if(!i){let p=[];for(h=m.length,l=0;l<h;++l)u=m[l],p=p.concat(Pn.fitToUnsignedShortIndices(u));m=p}return m}function z8(e,t,n,i){let o,r,s,a=i.length-1;if(a>=0){let u=i[a];o=u.offset+u.count,s=u.index,r=n[s].indices.length}else o=0,s=0,r=n[s].indices.length;let l=e.length;for(let u=0;u<l;++u){let h=e[u][t];if(!c(h))continue;let m=h.indices.length;o+m>r&&(o=0,r=n[++s].indices.length),i.push({index:s,offset:o,count:m}),o+=m}}function kOe(e,t){let n=[];return z8(e,"geometry",t,n),z8(e,"westHemisphereGeometry",t,n),z8(e,"eastHemisphereGeometry",t,n),n}var Um={};Um.combineGeometry=function(e){let t,n,i=e.instances,o=i.length,r,s,a=!1;o>0&&(t=BOe(e),t.length>0&&(n=Pn.createAttributeLocations(t[0]),e.createPickOffsets&&(r=kOe(i,t))),c(i[0].attributes)&&c(i[0].attributes.offset)&&(s=new Array(o),a=!0));let l=new Array(o),u=new Array(o);for(let f=0;f<o;++f){let h=i[f],m=h.geometry;c(m)&&(l[f]=m.boundingSphere,u[f]=m.boundingSphereCV,a&&(s[f]=h.geometry.offsetAttribute));let p=h.eastHemisphereGeometry,_=h.westHemisphereGeometry;c(p)&&c(_)&&(c(p.boundingSphere)&&c(_.boundingSphere)&&(l[f]=ne.union(p.boundingSphere,_.boundingSphere)),c(p.boundingSphereCV)&&c(_.boundingSphereCV)&&(u[f]=ne.union(p.boundingSphereCV,_.boundingSphereCV)))}return{geometries:t,modelMatrix:e.modelMatrix,attributeLocations:n,pickOffsets:r,offsetInstanceExtend:s,boundingSpheres:l,boundingSpheresCV:u}};function UOe(e,t){let n=e.attributes;for(let i in n)if(n.hasOwnProperty(i)){let o=n[i];c(o)&&c(o.values)&&t.push(o.values.buffer)}c(e.indices)&&t.push(e.indices.buffer)}function zOe(e,t){let n=e.length;for(let i=0;i<n;++i)UOe(e[i],t)}function VOe(e){let t=1,n=e.length;for(let i=0;i<n;i++){let o=e[i];if(++t,!c(o))continue;let r=o.attributes;t+=7+2*ne.packedLength+(c(o.indices)?o.indices.length:0);for(let s in r)if(r.hasOwnProperty(s)&&c(r[s])){let a=r[s];t+=5+a.values.length}}return t}Um.packCreateGeometryResults=function(e,t){let n=new Float64Array(VOe(e)),i=[],o={},r=e.length,s=0;n[s++]=r;for(let a=0;a<r;a++){let l=e[a],u=c(l);if(n[s++]=u?1:0,!u)continue;n[s++]=l.primitiveType,n[s++]=l.geometryType,n[s++]=g(l.offsetAttribute,-1);let f=c(l.boundingSphere)?1:0;n[s++]=f,f&&ne.pack(l.boundingSphere,n,s),s+=ne.packedLength;let h=c(l.boundingSphereCV)?1:0;n[s++]=h,h&&ne.pack(l.boundingSphereCV,n,s),s+=ne.packedLength;let m=l.attributes,p=[];for(let b in m)m.hasOwnProperty(b)&&c(m[b])&&(p.push(b),c(o[b])||(o[b]=i.length,i.push(b)));n[s++]=p.length;for(let b=0;b<p.length;b++){let x=p[b],T=m[x];n[s++]=o[x],n[s++]=T.componentDatatype,n[s++]=T.componentsPerAttribute,n[s++]=T.normalize?1:0,n[s++]=T.values.length,n.set(T.values,s),s+=T.values.length}let _=c(l.indices)?l.indices.length:0;n[s++]=_,_>0&&(n.set(l.indices,s),s+=_)}return t.push(n.buffer),{stringTable:i,packedData:n}};Um.unpackCreateGeometryResults=function(e){let t=e.stringTable,n=e.packedData,i,o=new Array(n[0]),r=0,s=1;for(;s<n.length;){if(!(n[s++]===1)){o[r++]=void 0;continue}let l=n[s++],u=n[s++],f=n[s++];f===-1&&(f=void 0);let h,m;n[s++]===1&&(h=ne.unpack(n,s)),s+=ne.packedLength,n[s++]===1&&(m=ne.unpack(n,s)),s+=ne.packedLength;let b,x,T,E=new fn,S=n[s++];for(i=0;i<S;i++){let v=t[n[s++]],D=n[s++];T=n[s++];let R=n[s++]!==0;b=n[s++],x=j.createTypedArray(D,b);for(let P=0;P<b;P++)x[P]=n[s++];E[v]=new be({componentDatatype:D,componentsPerAttribute:T,normalize:R,values:x})}let A;if(b=n[s++],b>0){let v=x.length/T;for(A=Oe.createTypedArray(v,b),i=0;i<b;i++)A[i]=n[s++]}o[r++]=new st({primitiveType:l,geometryType:u,boundingSphere:h,boundingSphereCV:m,indices:A,attributes:E,offsetAttribute:f})}return o};function HOe(e,t){let n=e.length,i=new Float64Array(1+n*19),o=0;i[o++]=n;for(let r=0;r<n;r++){let s=e[r];if(N.pack(s.modelMatrix,i,o),o+=N.packedLength,c(s.attributes)&&c(s.attributes.offset)){let a=s.attributes.offset.value;i[o]=a[0],i[o+1]=a[1],i[o+2]=a[2]}o+=3}return t.push(i.buffer),i}function GOe(e){let t=e,n=new Array(t[0]),i=0,o=1;for(;o<t.length;){let r=N.unpack(t,o),s;o+=N.packedLength,c(t[o])&&(s={offset:new qi(t[o],t[o+1],t[o+2])}),o+=3,n[i++]={modelMatrix:r,attributes:s}}return n}Um.packCombineGeometryParameters=function(e,t){let n=e.createGeometryResults,i=n.length;for(let o=0;o<i;o++)t.push(n[o].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:HOe(e.instances,t),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof Ei,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}};Um.unpackCombineGeometryParameters=function(e){let t=GOe(e.packedInstances),n=e.createGeometryResults,i=n.length,o=0;for(let a=0;a<i;a++){let l=Um.unpackCreateGeometryResults(n[a]),u=l.length;for(let f=0;f<u;f++){let h=l[f],m=t[o];m.geometry=h,++o}}let r=Z.clone(e.ellipsoid),s=e.isGeographic?new Ei(r):new Si(r);return{instances:t,ellipsoid:r,projection:s,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:N.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}};function oQ(e){let t=e.length,n=1+(ne.packedLength+1)*t,i=new Float32Array(n),o=0;i[o++]=t;for(let r=0;r<t;++r){let s=e[r];c(s)?(i[o++]=1,ne.pack(e[r],i,o)):i[o++]=0,o+=ne.packedLength}return i}function rQ(e){let t=new Array(e[0]),n=0,i=1;for(;i<e.length;)e[i++]===1&&(t[n]=ne.unpack(e,i)),++n,i+=ne.packedLength;return t}Um.packCombineGeometryResults=function(e,t){c(e.geometries)&&zOe(e.geometries,t);let n=oQ(e.boundingSpheres),i=oQ(e.boundingSpheresCV);return t.push(n.buffer,i.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:n,boundingSpheresCV:i}};Um.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:rQ(e.boundingSpheres),boundingSpheresCV:rQ(e.boundingSpheresCV)}};var iT=Um;var jOe={READY:0,CREATING:1,CREATED:2,COMBINING:3,COMBINED:4,COMPLETE:5,FAILED:6},Er=Object.freeze(jOe);var Rl={DISABLED:0,ENABLED:1,CAST_ONLY:2,RECEIVE_ONLY:3};Rl.NUMBER_OF_SHADOW_MODES=4;Rl.castShadows=function(e){return e===Rl.ENABLED||e===Rl.CAST_ONLY};Rl.receiveShadows=function(e){return e===Rl.ENABLED||e===Rl.RECEIVE_ONLY};Rl.fromCastReceive=function(e,t){return e&&t?Rl.ENABLED:e?Rl.CAST_ONLY:t?Rl.RECEIVE_ONLY:Rl.DISABLED};var yn=Object.freeze(Rl);function cr(e){if(e=g(e,g.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this.appearance=e.appearance,this._appearance=void 0,this._material=void 0,this.depthFailAppearance=e.depthFailAppearance,this._depthFailAppearance=void 0,this._depthFailMaterial=void 0,this.modelMatrix=N.clone(g(e.modelMatrix,N.IDENTITY)),this._modelMatrix=new N,this.show=g(e.show,!0),this._vertexCacheOptimize=g(e.vertexCacheOptimize,!1),this._interleave=g(e.interleave,!1),this._releaseGeometryInstances=g(e.releaseGeometryInstances,!0),this._allowPicking=g(e.allowPicking,!0),this._asynchronous=g(e.asynchronous,!0),this._compressVertices=g(e.compressVertices,!0),this.cull=g(e.cull,!0),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.rtcCenter=e.rtcCenter,c(this.rtcCenter)&&(!c(this.geometryInstances)||Array.isArray(this.geometryInstances)&&this.geometryInstances.length!==1))throw new w("Relative-to-center rendering only supports one geometry instance.");this.shadows=g(e.shadows,yn.DISABLED),this._translucent=void 0,this._state=Er.READY,this._geometries=[],this._error=void 0,this._numberOfInstances=0,this._boundingSpheres=[],this._boundingSphereWC=[],this._boundingSphereCV=[],this._boundingSphere2D=[],this._boundingSphereMorph=[],this._perInstanceAttributeCache=new Map,this._instanceIds=[],this._lastPerInstanceAttributeIndex=0,this._va=[],this._attributeLocations=void 0,this._primitiveType=void 0,this._frontFaceRS=void 0,this._backFaceRS=void 0,this._sp=void 0,this._depthFailAppearance=void 0,this._spDepthFail=void 0,this._frontFaceDepthFailRS=void 0,this._backFaceDepthFailRS=void 0,this._pickIds=[],this._colorCommands=[],this._pickCommands=[],this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._createRenderStatesFunction=e._createRenderStatesFunction,this._createShaderProgramFunction=e._createShaderProgramFunction,this._createCommandsFunction=e._createCommandsFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._createPickOffsets=e._createPickOffsets,this._pickOffsets=void 0,this._createGeometryResults=void 0,this._ready=!1,this._batchTable=void 0,this._batchTableAttributeIndices=void 0,this._offsetInstanceExtend=void 0,this._batchTableOffsetAttribute2DIndex=void 0,this._batchTableOffsetsUpdated=!1,this._instanceBoundingSpheres=void 0,this._instanceBoundingSpheresCV=void 0,this._tempBoundingSpheres=void 0,this._recomputeBoundingSpheres=!1,this._batchTableBoundingSpheresUpdated=!1,this._batchTableBoundingSphereAttributeIndices=void 0}Object.defineProperties(cr.prototype,{vertexCacheOptimize:{get:function(){return this._vertexCacheOptimize}},interleave:{get:function(){return this._interleave}},releaseGeometryInstances:{get:function(){return this._releaseGeometryInstances}},allowPicking:{get:function(){return this._allowPicking}},asynchronous:{get:function(){return this._asynchronous}},compressVertices:{get:function(){return this._compressVertices}},ready:{get:function(){return this._ready}}});function WOe(e){let t=e.length,n=[],i=e[0].attributes,o;for(o in i)if(i.hasOwnProperty(o)&&c(i[o])){let r=i[o],s=!0;for(let a=1;a<t;++a){let l=e[a].attributes[o];if(!c(l)||r.componentDatatype!==l.componentDatatype||r.componentsPerAttribute!==l.componentsPerAttribute||r.normalize!==l.normalize){s=!1;break}}s&&n.push(o)}return n}var qOe=new k,YOe=new d,mQ=new ee;function pQ(e){let t=e.length;if(t===1)return e[0];if(t===2)return k.unpack(e,0,qOe);if(t===3)return d.unpack(e,0,YOe);if(t===4)return ee.unpack(e,0,mQ)}function XOe(e,t){let n=e.geometryInstances,i=Array.isArray(n)?n:[n],o=i.length;if(o===0)return;let r=WOe(i),s=r.length,a=[],l={},u={},f,m=i[0].attributes,p,_,b;for(p=0;p<s;++p)_=r[p],b=m[_],l[_]=p,a.push({functionName:`czm_batchTable_${_}`,componentDatatype:b.componentDatatype,componentsPerAttribute:b.componentsPerAttribute,normalize:b.normalize});r.indexOf("distanceDisplayCondition")!==-1&&(a.push({functionName:"czm_batchTable_boundingSphereCenter3DHigh",componentDatatype:j.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter3DLow",componentDatatype:j.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DHigh",componentDatatype:j.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DLow",componentDatatype:j.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereRadius",componentDatatype:j.FLOAT,componentsPerAttribute:1}),u.center3DHigh=a.length-5,u.center3DLow=a.length-4,u.center2DHigh=a.length-3,u.center2DLow=a.length-2,u.radius=a.length-1),r.indexOf("offset")!==-1&&(a.push({functionName:"czm_batchTable_offset2D",componentDatatype:j.FLOAT,componentsPerAttribute:3}),f=a.length-1),a.push({functionName:"czm_batchTable_pickColor",componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0});let x=a.length,T=new nT(t,a,o);for(p=0;p<o;++p){let E=i[p];m=E.attributes;for(let R=0;R<s;++R){_=r[R],b=m[_];let P=pQ(b.value),L=l[_];T.setBatchedAttribute(p,L,P)}let S={primitive:g(E.pickPrimitive,e)};c(E.id)&&(S.id=E.id);let A=t.createPickId(S);e._pickIds.push(A);let v=A.color,D=mQ;D.x=z.floatToByte(v.red),D.y=z.floatToByte(v.green),D.z=z.floatToByte(v.blue),D.w=z.floatToByte(v.alpha),T.setBatchedAttribute(p,x-1,D)}e._batchTable=T,e._batchTableAttributeIndices=l,e._batchTableBoundingSphereAttributeIndices=u,e._batchTableOffsetAttribute2DIndex=f}function KOe(e){let t;return Array.isArray(e.values)?t=e.values.slice(0):t=new e.values.constructor(e.values),new be({componentDatatype:e.componentDatatype,componentsPerAttribute:e.componentsPerAttribute,normalize:e.normalize,values:t})}function $Oe(e){let t=e.attributes,n=new fn;for(let o in t)t.hasOwnProperty(o)&&c(t[o])&&(n[o]=KOe(t[o]));let i;if(c(e.indices)){let o=e.indices;Array.isArray(o)?i=o.slice(0):i=new o.constructor(o)}return new st({attributes:n,indices:i,primitiveType:e.primitiveType,boundingSphere:ne.clone(e.boundingSphere)})}function ZOe(e,t){return{geometry:t,attributes:e.attributes,modelMatrix:N.clone(e.modelMatrix),pickPrimitive:e.pickPrimitive,id:e.id}}var JOe=/in\s+vec(?:3|4)\s+(.*)3DHigh;/g;cr._modifyShaderPosition=function(e,t,n){let i,o="",r="",s="";for(;(i=JOe.exec(t))!==null;){let a=i[1],l=`vec4 czm_compute${a[0].toUpperCase()}${a.substr(1)}()`;l!=="vec4 czm_computePosition()"&&(o+=`${l};
| `),c(e.rtcCenter)?(t=t.replace(/in\s+vec(?:3|4)\s+position3DHigh;/g,""),t=t.replace(/in\s+vec(?:3|4)\s+position3DLow;/g,""),o+=`uniform mat4 u_modifiedModelView;
| `,r+=`in vec4 position;
| `,s+=`${l}
| {
| return u_modifiedModelView * position;
| }
|
| `,t=t.replace(/czm_modelViewRelativeToEye\s+\*\s+/g,""),t=t.replace(/czm_modelViewProjectionRelativeToEye/g,"czm_projection")):n?s+=`${l}
| {
| return czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow);
| }
|
| `:(r+=`in vec3 ${a}2DHigh;
| in vec3 ${a}2DLow;
| `,s+=`${l}
| {
| vec4 p;
| if (czm_morphTime == 1.0)
| {
| p = czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow);
| }
| else if (czm_morphTime == 0.0)
| {
| p = czm_translateRelativeToEye(${a}2DHigh.zxy, ${a}2DLow.zxy);
| }
| else
| {
| p = czm_columbusViewMorph(
| czm_translateRelativeToEye(${a}2DHigh.zxy, ${a}2DLow.zxy),
| czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow),
| czm_morphTime);
| }
| return p;
| }
|
| `)}return[o,r,t,s].join(`
| `)};cr._appendShowToShader=function(e,t){return c(e._batchTableAttributeIndices.show)?`${Be.replaceMain(t,"czm_non_show_main")}
| void main()
| {
| czm_non_show_main();
| gl_Position *= czm_batchTable_show(batchId);
| }`:t};cr._updateColorAttribute=function(e,t,n){if(!c(e._batchTableAttributeIndices.color)&&!c(e._batchTableAttributeIndices.depthFailColor)||t.search(/in\s+vec4\s+color;/g)===-1)return t;if(n&&!c(e._batchTableAttributeIndices.depthFailColor))throw new w("A depthFailColor per-instance attribute is required when using a depth fail appearance that uses a color attribute.");let i=t;return i=i.replace(/in\s+vec4\s+color;/g,""),n?i=i.replace(/(\b)color(\b)/g,"$1czm_batchTable_depthFailColor(batchId)$2"):i=i.replace(/(\b)color(\b)/g,"$1czm_batchTable_color(batchId)$2"),i};function sQ(e){return`${Be.replaceMain(e,"czm_non_pick_main")}
| out vec4 v_pickColor;
| void main()
| {
| czm_non_pick_main();
| v_pickColor = czm_batchTable_pickColor(batchId);
| }`}function aQ(e){return`in vec4 v_pickColor;
| ${e}`}cr._updatePickColorAttribute=function(e){let t=e.replace(/in\s+vec4\s+pickColor;/g,"");return t=t.replace(/(\b)pickColor(\b)/g,"$1czm_batchTable_pickColor(batchId)$2"),t};cr._appendOffsetToShader=function(e,t){if(!c(e._batchTableAttributeIndices.offset))return t;let n=`in float batchId;
| `;n+="in float applyOffset;";let i=t.replace(/in\s+float\s+batchId;/g,n),o=`vec4 $1 = czm_computePosition();
| `;return o+=` if (czm_sceneMode == czm_sceneMode3D)
| `,o+=` {
| `,o+=" $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);",o+=` }
| `,o+=` else
| `,o+=` {
| `,o+=" $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);",o+=` }
| `,i=i.replace(/vec4\s+([A-Za-z0-9_]+)\s+=\s+czm_computePosition\(\);/g,o),i};cr._appendDistanceDisplayConditionToShader=function(e,t,n){if(!c(e._batchTableAttributeIndices.distanceDisplayCondition))return t;let i=Be.replaceMain(t,"czm_non_distanceDisplayCondition_main"),o=`void main()
| {
| czm_non_distanceDisplayCondition_main();
| vec2 distanceDisplayCondition = czm_batchTable_distanceDisplayCondition(batchId);
| vec3 boundingSphereCenter3DHigh = czm_batchTable_boundingSphereCenter3DHigh(batchId);
| vec3 boundingSphereCenter3DLow = czm_batchTable_boundingSphereCenter3DLow(batchId);
| float boundingSphereRadius = czm_batchTable_boundingSphereRadius(batchId);
| `;return n?o+=` vec4 centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);
| `:o+=` vec3 boundingSphereCenter2DHigh = czm_batchTable_boundingSphereCenter2DHigh(batchId);
| vec3 boundingSphereCenter2DLow = czm_batchTable_boundingSphereCenter2DLow(batchId);
| vec4 centerRTE;
| if (czm_morphTime == 1.0)
| {
| centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);
| }
| else if (czm_morphTime == 0.0)
| {
| centerRTE = czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy);
| }
| else
| {
| centerRTE = czm_columbusViewMorph(
| czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy),
| czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow),
| czm_morphTime);
| }
| `,o+=` float radiusSq = boundingSphereRadius * boundingSphereRadius;
| float distanceSq;
| if (czm_sceneMode == czm_sceneMode2D)
| {
| distanceSq = czm_eyeHeight2D.y - radiusSq;
| }
| else
| {
| distanceSq = dot(centerRTE.xyz, centerRTE.xyz) - radiusSq;
| }
| distanceSq = max(distanceSq, 0.0);
| float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;
| float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;
| float show = (distanceSq >= nearSq && distanceSq <= farSq) ? 1.0 : 0.0;
| gl_Position *= show;
| }`,`${i}
| ${o}`};function cQ(e,t){if(!e.compressVertices)return t;let n=t.search(/in\s+vec3\s+normal;/g)!==-1,i=t.search(/in\s+vec2\s+st;/g)!==-1;if(!n&&!i)return t;let o=t.search(/in\s+vec3\s+tangent;/g)!==-1,r=t.search(/in\s+vec3\s+bitangent;/g)!==-1,s=i&&n?2:1;s+=o||r?1:0;let a=s>1?`vec${s}`:"float",l="compressedAttributes",u=`in ${a} ${l};`,f="",h="";if(i){f+=`vec2 st;
| `;let _=s>1?`${l}.x`:l;h+=` st = czm_decompressTextureCoordinates(${_});
| `}n&&o&&r?(f+=`vec3 normal;
| vec3 tangent;
| vec3 bitangent;
| `,h+=` czm_octDecode(${l}.${i?"yz":"xy"}, normal, tangent, bitangent);
| `):(n&&(f+=`vec3 normal;
| `,h+=` normal = czm_octDecode(${l}${s>1?`.${i?"y":"x"}`:""});
| `),o&&(f+=`vec3 tangent;
| `,h+=` tangent = czm_octDecode(${l}.${i&&n?"z":"y"});
| `),r&&(f+=`vec3 bitangent;
| `,h+=` bitangent = czm_octDecode(${l}.${i&&n?"z":"y"});
| `));let m=t;m=m.replace(/in\s+vec3\s+normal;/g,""),m=m.replace(/in\s+vec2\s+st;/g,""),m=m.replace(/in\s+vec3\s+tangent;/g,""),m=m.replace(/in\s+vec3\s+bitangent;/g,""),m=Be.replaceMain(m,"czm_non_compressed_main");let p=`void main()
| {
| ${h} czm_non_compressed_main();
| }`;return[u,f,m,p].join(`
| `)}function QOe(e){let t=Be.replaceMain(e,"czm_non_depth_clamp_main");return t+=`void main() {
| czm_non_depth_clamp_main();
| gl_Position = czm_depthClamp(gl_Position);}
| `,t}function ePe(e){let t=Be.replaceMain(e,"czm_non_depth_clamp_main");return t+=`void main() {
| czm_non_depth_clamp_main();
| #if defined(LOG_DEPTH)
| czm_writeLogDepth();
| #else
| czm_writeDepthClamp();
| #endif
| }
| `,t}function lQ(e,t){let n=e.vertexAttributes;for(let i in n)if(n.hasOwnProperty(i)&&!c(t[i]))throw new w(`Appearance/Geometry mismatch. The appearance requires vertex shader attribute input '${i}', which was not computed as part of the Geometry. Use the appearance's vertexFormat property when constructing the geometry.`)}function tPe(e,t){return function(){return e[t]}}var V8=Math.max(sn.hardwareConcurrency-1,1),jM,nPe=new hi("combineGeometry");function iPe(e,t){let n,i,o,r,s=e._instanceIds;if(e._state===Er.READY){n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];let a=e._numberOfInstances=n.length,l=[],u=[];for(o=0;o<a;++o){if(i=n[o].geometry,s.push(n[o].id),c(i._workerName)&&c(i._workerPath)||!c(i._workerName)&&!c(i._workerPath))throw new w("Must define either _workerName or _workerPath for asynchronous geometry.");u.push({moduleName:i._workerName,modulePath:i._workerPath,geometry:i})}if(!c(jM))for(jM=new Array(V8),o=0;o<V8;o++)jM[o]=new hi("createGeometry");let f;for(u=GM(u,V8),o=0;o<u.length;o++){let h=0,m=u[o],p=m.length;for(r=0;r<p;++r)f=m[r],i=f.geometry,c(i.constructor.pack)&&(f.offset=h,h+=g(i.constructor.packedLength,i.packedLength));let _;if(h>0){let b=new Float64Array(h);for(_=[b.buffer],r=0;r<p;++r)f=m[r],i=f.geometry,c(i.constructor.pack)&&(i.constructor.pack(i,b,f.offset),f.geometry=b)}l.push(jM[o].scheduleTask({subTasks:u[o]},_))}e._state=Er.CREATING,Promise.all(l).then(function(h){e._createGeometryResults=h,e._state=Er.CREATED}).catch(function(h){IS(e,t,Er.FAILED,h)})}else if(e._state===Er.CREATED){let a=[];n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];let l=t.scene3DOnly,u=t.mapProjection,f=nPe.scheduleTask(iT.packCombineGeometryParameters({createGeometryResults:e._createGeometryResults,instances:n,ellipsoid:u.ellipsoid,projection:u,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:l,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets},a),a);e._createGeometryResults=void 0,e._state=Er.COMBINING,Promise.resolve(f).then(function(h){let m=iT.unpackCombineGeometryResults(h);e._geometries=m.geometries,e._attributeLocations=m.attributeLocations,e.modelMatrix=N.clone(m.modelMatrix,e.modelMatrix),e._pickOffsets=m.pickOffsets,e._offsetInstanceExtend=m.offsetInstanceExtend,e._instanceBoundingSpheres=m.boundingSpheres,e._instanceBoundingSpheresCV=m.boundingSpheresCV,c(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=Er.COMBINED):IS(e,t,Er.FAILED,void 0)}).catch(function(h){IS(e,t,Er.FAILED,h)})}}function oPe(e,t){let n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],i=e._numberOfInstances=n.length,o=new Array(i),r=e._instanceIds,s,a,l=0;for(a=0;a<i;a++){s=n[a];let m=s.geometry,p;c(m.attributes)&&c(m.primitiveType)?p=$Oe(m):p=m.constructor.createGeometry(m),o[l++]=ZOe(s,p),r.push(s.id)}o.length=l;let u=t.scene3DOnly,f=t.mapProjection,h=iT.combineGeometry({instances:o,ellipsoid:f.ellipsoid,projection:f,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:u,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets});e._geometries=h.geometries,e._attributeLocations=h.attributeLocations,e.modelMatrix=N.clone(h.modelMatrix,e.modelMatrix),e._pickOffsets=h.pickOffsets,e._offsetInstanceExtend=h.offsetInstanceExtend,e._instanceBoundingSpheres=h.boundingSpheres,e._instanceBoundingSpheresCV=h.boundingSpheresCV,c(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=Er.COMBINED):IS(e,t,Er.FAILED,void 0)}function rPe(e,t){let n=e._batchTableAttributeIndices.offset;if(!e._recomputeBoundingSpheres||!c(n)){e._recomputeBoundingSpheres=!1;return}let i,o=e._offsetInstanceExtend,r=e._instanceBoundingSpheres,s=r.length,a=e._tempBoundingSpheres;if(!c(a)){for(a=new Array(s),i=0;i<s;i++)a[i]=new ne;e._tempBoundingSpheres=a}for(i=0;i<s;++i){let b=a[i],x=e._batchTable.getBatchedAttribute(i,n,new d);b=r[i].clone(b),bQ(b,x,o[i])}let l=[],u=[],f=[];for(i=0;i<s;++i){let b=a[i];b.center.x-b.radius>0||ne.intersectPlane(b,on.ORIGIN_ZX_PLANE)!==Gt.INTERSECTING?l.push(b):(u.push(b),f.push(b))}let h=l[0],m=f[0],p=u[0];for(i=1;i<l.length;i++)h=ne.union(h,l[i]);for(i=1;i<f.length;i++)m=ne.union(m,f[i]);for(i=1;i<u.length;i++)p=ne.union(p,u[i]);let _=[];for(c(h)&&_.push(h),c(m)&&_.push(m),c(p)&&_.push(p),i=0;i<_.length;i++){let b=_[i].clone(e._boundingSpheres[i]);e._boundingSpheres[i]=b,e._boundingSphereCV[i]=ne.projectTo2D(b,t.mapProjection,e._boundingSphereCV[i])}cr._updateBoundingVolumes(e,t,e.modelMatrix,!0),e._recomputeBoundingSpheres=!1}var uQ=new kn,_Q=new re,gQ=new d,yQ=new ne;function sPe(e,t){if(!c(e._batchTableAttributeIndices.distanceDisplayCondition)||e._batchTableBoundingSpheresUpdated)return;let i=e._batchTableBoundingSphereAttributeIndices,o=i.center3DHigh,r=i.center3DLow,s=i.center2DHigh,a=i.center2DLow,l=i.radius,u=t.mapProjection,f=u.ellipsoid,h=e._batchTable,m=e._instanceBoundingSpheres,p=m.length;for(let _=0;_<p;++_){let b=m[_];if(!c(b))continue;let x=e.modelMatrix;c(x)&&(b=ne.transform(b,x,yQ));let T=b.center,E=b.radius,S=kn.fromCartesian(T,uQ);if(h.setBatchedAttribute(_,o,S.high),h.setBatchedAttribute(_,r,S.low),!t.scene3DOnly){let A=f.cartesianToCartographic(T,_Q),v=u.project(A,gQ);S=kn.fromCartesian(v,uQ),h.setBatchedAttribute(_,s,S.high),h.setBatchedAttribute(_,a,S.low)}h.setBatchedAttribute(_,l,E)}e._batchTableBoundingSpheresUpdated=!0}var H8=new d,aPe=new d;function fQ(e,t){if(!c(e._batchTableAttributeIndices.offset)||e._batchTableOffsetsUpdated||t.scene3DOnly)return;let i=e._batchTableOffsetAttribute2DIndex,o=t.mapProjection,r=o.ellipsoid,s=e._batchTable,a=e._instanceBoundingSpheres,l=a.length;for(let u=0;u<l;++u){let f=a[u];if(!c(f))continue;let h=s.getBatchedAttribute(u,e._batchTableAttributeIndices.offset);if(d.equals(h,d.ZERO)){s.setBatchedAttribute(u,i,d.ZERO);continue}let m=e.modelMatrix;c(m)&&(f=ne.transform(f,m,yQ));let p=f.center;p=r.scaleToGeodeticSurface(p,aPe);let _=r.cartesianToCartographic(p,_Q),b=o.project(_,gQ),x=d.add(h,p,H8);_=r.cartesianToCartographic(x,_);let T=o.project(_,H8),E=d.subtract(T,b,H8),S=E.x;E.x=E.z,E.z=E.y,E.y=S,s.setBatchedAttribute(u,i,E)}e._batchTableOffsetsUpdated=!0}function cPe(e,t){let n=e._attributeLocations,i=e._geometries,o=t.scene3DOnly,r=t.context,s=[],a=i.length;for(let l=0;l<a;++l){let u=i[l];if(s.push(Zn.fromGeometry({context:r,geometry:u,attributeLocations:n,bufferUsage:Pe.STATIC_DRAW,interleave:e._interleave})),c(e._createBoundingVolumeFunction))e._createBoundingVolumeFunction(t,u);else if(e._boundingSpheres.push(ne.clone(u.boundingSphere)),e._boundingSphereWC.push(new ne),!o){let f=u.boundingSphereCV.center,h=f.x,m=f.y,p=f.z;f.x=p,f.y=h,f.z=m,e._boundingSphereCV.push(ne.clone(u.boundingSphereCV)),e._boundingSphere2D.push(new ne),e._boundingSphereMorph.push(new ne)}}e._va=s,e._primitiveType=i[0].primitiveType,e.releaseGeometryInstances&&(e.geometryInstances=void 0),e._geometries=void 0,IS(e,t,Er.COMPLETE,void 0)}function lPe(e,t,n,i){let o=n.getRenderState(),r;i?(r=ze(o,!1),r.cull={enabled:!0,face:pi.BACK},e._frontFaceRS=Fe.fromCache(r),r.cull.face=pi.FRONT,e._backFaceRS=Fe.fromCache(r)):(e._frontFaceRS=Fe.fromCache(o),e._backFaceRS=e._frontFaceRS),r=ze(o,!1),c(e._depthFailAppearance)&&(r.depthTest.enabled=!1),c(e._depthFailAppearance)&&(o=e._depthFailAppearance.getRenderState(),r=ze(o,!1),r.depthTest.func=cc.GREATER,i?(r.cull={enabled:!0,face:pi.BACK},e._frontFaceDepthFailRS=Fe.fromCache(r),r.cull.face=pi.FRONT,e._backFaceDepthFailRS=Fe.fromCache(r)):(e._frontFaceDepthFailRS=Fe.fromCache(r),e._backFaceDepthFailRS=e._frontFaceRS))}function uPe(e,t,n){let i=t.context,o=e._attributeLocations,r=e._batchTable.getVertexShaderCallback()(n.vertexShaderSource);r=cr._appendOffsetToShader(e,r),r=cr._appendShowToShader(e,r),r=cr._appendDistanceDisplayConditionToShader(e,r,t.scene3DOnly),r=sQ(r),r=cr._updateColorAttribute(e,r,!1),r=cQ(e,r),r=cr._modifyShaderPosition(e,r,t.scene3DOnly);let s=n.getFragmentShaderSource();s=aQ(s),e._sp=en.replaceCache({context:i,shaderProgram:e._sp,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:o}),lQ(e._sp,o),c(e._depthFailAppearance)&&(r=e._batchTable.getVertexShaderCallback()(e._depthFailAppearance.vertexShaderSource),r=cr._appendShowToShader(e,r),r=cr._appendDistanceDisplayConditionToShader(e,r,t.scene3DOnly),r=sQ(r),r=cr._updateColorAttribute(e,r,!0),r=cQ(e,r),r=cr._modifyShaderPosition(e,r,t.scene3DOnly),r=QOe(r),s=e._depthFailAppearance.getFragmentShaderSource(),s=aQ(s),s=ePe(s),e._spDepthFail=en.replaceCache({context:i,shaderProgram:e._spDepthFail,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:o}),lQ(e._spDepthFail,o))}var DS=new N,dQ=new d;function hQ(e,t,n,i){let o=c(n)?n._uniforms:void 0,r={},s=t.uniforms;if(c(s)){for(let l in s)if(s.hasOwnProperty(l)){if(c(o)&&c(o[l]))throw new w(`Appearance and material have a uniform with the same name: ${l}`);r[l]=tPe(s,l)}}let a=bt(r,o);return a=e._batchTable.getUniformMapCallback()(a),c(e.rtcCenter)&&(a.u_modifiedModelView=function(){let l=i.context.uniformState.view;return N.multiply(l,e._modelMatrix,DS),N.multiplyByPoint(DS,e.rtcCenter,dQ),N.setTranslation(DS,dQ,DS),DS}),a}function fPe(e,t,n,i,o,r,s,a){let l=hQ(e,t,n,a),u;c(e._depthFailAppearance)&&(u=hQ(e,e._depthFailAppearance,e._depthFailAppearance.material,a));let f=i?xe.TRANSLUCENT:xe.OPAQUE,h=o?2:1;h*=c(e._depthFailAppearance)?2:1,r.length=e._va.length*h;let m=r.length,p=0;for(let _=0;_<m;++_){let b;o&&(b=r[_],c(b)||(b=r[_]=new Ke({owner:e,primitiveType:e._primitiveType})),b.vertexArray=e._va[p],b.renderState=e._backFaceRS,b.shaderProgram=e._sp,b.uniformMap=l,b.pass=f,++_),b=r[_],c(b)||(b=r[_]=new Ke({owner:e,primitiveType:e._primitiveType})),b.vertexArray=e._va[p],b.renderState=e._frontFaceRS,b.shaderProgram=e._sp,b.uniformMap=l,b.pass=f,c(e._depthFailAppearance)&&(o&&(++_,b=r[_],c(b)||(b=r[_]=new Ke({owner:e,primitiveType:e._primitiveType})),b.vertexArray=e._va[p],b.renderState=e._backFaceDepthFailRS,b.shaderProgram=e._spDepthFail,b.uniformMap=u,b.pass=f),++_,b=r[_],c(b)||(b=r[_]=new Ke({owner:e,primitiveType:e._primitiveType})),b.vertexArray=e._va[p],b.renderState=e._frontFaceDepthFailRS,b.shaderProgram=e._spDepthFail,b.uniformMap=u,b.pass=f),++p}}cr._updateBoundingVolumes=function(e,t,n,i){let o,r,s;if(i||!N.equals(n,e._modelMatrix))for(N.clone(n,e._modelMatrix),r=e._boundingSpheres.length,o=0;o<r;++o)s=e._boundingSpheres[o],c(s)&&(e._boundingSphereWC[o]=ne.transform(s,n,e._boundingSphereWC[o]),t.scene3DOnly||(e._boundingSphere2D[o]=ne.clone(e._boundingSphereCV[o],e._boundingSphere2D[o]),e._boundingSphere2D[o].center.x=0,e._boundingSphereMorph[o]=ne.union(e._boundingSphereWC[o],e._boundingSphereCV[o])));let a=e.appearance.pixelSize;if(c(a))for(r=e._boundingSpheres.length,o=0;o<r;++o){s=e._boundingSpheres[o];let l=e._boundingSphereWC[o],f=t.camera.getPixelSize(s,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*a;l.radius=s.radius+f}};function dPe(e,t,n,i,o,r,s,a){if(t.mode!==J.SCENE3D&&!N.equals(o,N.IDENTITY))throw new w("Primitive.modelMatrix is only supported in 3D mode.");cr._updateBoundingVolumes(e,t,o);let l;t.mode===J.SCENE3D?l=e._boundingSphereWC:t.mode===J.COLUMBUS_VIEW?l=e._boundingSphereCV:t.mode===J.SCENE2D&&c(e._boundingSphere2D)?l=e._boundingSphere2D:c(e._boundingSphereMorph)&&(l=e._boundingSphereMorph);let u=t.commandList,f=t.passes;if(f.render||f.pick){let h=e.allowPicking,m=yn.castShadows(e.shadows),p=yn.receiveShadows(e.shadows),_=n.length,b=a?2:1;b*=c(e._depthFailAppearance)?2:1;for(let x=0;x<_;++x){let T=Math.floor(x/b),E=n[x];E.modelMatrix=o,E.boundingVolume=l[T],E.cull=r,E.debugShowBoundingVolume=s,E.castShadows=m,E.receiveShadows=p,h?E.pickId="v_pickColor":E.pickId=void 0,u.push(E)}}}cr.prototype.update=function(e){if(!c(this.geometryInstances)&&this._va.length===0||c(this.geometryInstances)&&Array.isArray(this.geometryInstances)&&this.geometryInstances.length===0||!c(this.appearance)||e.mode!==J.SCENE3D&&e.scene3DOnly||!e.passes.render&&!e.passes.pick)return;if(c(this._error))throw this._error;if(c(this.rtcCenter)&&!e.scene3DOnly)throw new w("RTC rendering is only available for 3D only scenes.");if(this._state===Er.FAILED)return;let t=e.context;if(c(this._batchTable)||XOe(this,t),this._batchTable.attributes.length>0){if(ht.maximumVertexTextureImageUnits===0)throw new ie("Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.");this._batchTable.update(e)}if(this._state!==Er.COMPLETE&&this._state!==Er.COMBINED&&(this.asynchronous?iPe(this,e):oPe(this,e)),this._state===Er.COMBINED&&(sPe(this,e),fQ(this,e),cPe(this,e)),!this.show||this._state!==Er.COMPLETE)return;this._batchTableOffsetsUpdated||fQ(this,e),this._recomputeBoundingSpheres&&rPe(this,e);let n=this.appearance,i=n.material,o=!1,r=!1;this._appearance!==n?(this._appearance=n,this._material=i,o=!0,r=!0):this._material!==i&&(this._material=i,r=!0);let s=this.depthFailAppearance,a=c(s)?s.material:void 0;this._depthFailAppearance!==s?(this._depthFailAppearance=s,this._depthFailMaterial=a,o=!0,r=!0):this._depthFailMaterial!==a&&(this._depthFailMaterial=a,r=!0);let l=this._appearance.isTranslucent();this._translucent!==l&&(this._translucent=l,o=!0),c(this._material)&&this._material.update(t);let u=n.closed&&l;o&&g(this._createRenderStatesFunction,lPe)(this,t,n,u),r&&g(this._createShaderProgramFunction,uPe)(this,e,n),(o||r)&&g(this._createCommandsFunction,fPe)(this,n,i,l,u,this._colorCommands,this._pickCommands,e),g(this._updateAndQueueCommandsFunction,dPe)(this,e,this._colorCommands,this._pickCommands,this.modelMatrix,this.cull,this.debugShowBoundingVolume,u)};var hPe=new ne,mPe=new ne;function bQ(e,t,n){if(n===Zt.TOP){let i=ne.clone(e,hPe),o=ne.clone(e,mPe);o.center=d.add(o.center,t,o.center),e=ne.union(i,o,e)}else n===Zt.ALL&&(e.center=d.add(e.center,t,e.center));return e}function pPe(e,t,n){return function(){let i=e.getBatchedAttribute(t,n),o=e.attributes[n],r=o.componentsPerAttribute,s=j.createTypedArray(o.componentDatatype,r);return c(i.constructor.pack)?i.constructor.pack(i,s,0):s[0]=i,s}}function _Pe(e,t,n,i,o){return function(r){if(!c(r)||!c(r.length)||r.length<1||r.length>4)throw new w("value must be and array with length between 1 and 4.");let s=pQ(r);e.setBatchedAttribute(t,n,s),o==="offset"&&(i._recomputeBoundingSpheres=!0,i._batchTableOffsetsUpdated=!1)}}var gPe=new d;function yPe(e,t,n){t.boundingSphere={get:function(){let i=e._instanceBoundingSpheres[n];if(c(i)){i=i.clone();let o=e.modelMatrix,r=t.offset;c(r)&&bQ(i,d.fromArray(r.get(),0,gPe),e._offsetInstanceExtend[n]),c(o)&&(i=ne.transform(i,o))}return i}},t.boundingSphereCV={get:function(){return e._instanceBoundingSpheresCV[n]}}}function bPe(e,t,n){t.pickId={get:function(){return e._pickIds[n]}}}cr.prototype.getGeometryInstanceAttributes=function(e){if(!c(e))throw new w("id is required");if(!c(this._batchTable))throw new w("must call update before calling getGeometryInstanceAttributes");let t=this._perInstanceAttributeCache.get(e);if(c(t))return t;let n=-1,i=this._lastPerInstanceAttributeIndex,o=this._instanceIds,r=o.length;for(let u=0;u<r;++u){let f=(i+u)%r;if(e===o[f]){n=f;break}}if(n===-1)return;let s=this._batchTable,a=this._batchTableAttributeIndices;t={};let l={};for(let u in a)if(a.hasOwnProperty(u)){let f=a[u];l[u]={get:pPe(s,n,f),set:_Pe(s,n,f,this,u)}}return yPe(this,l,n),bPe(this,l,n),Object.defineProperties(t,l),this._lastPerInstanceAttributeIndex=n,this._perInstanceAttributeCache.set(e,t),t};cr.prototype.isDestroyed=function(){return!1};cr.prototype.destroy=function(){let e,t;this._sp=this._sp&&this._sp.destroy(),this._spDepthFail=this._spDepthFail&&this._spDepthFail.destroy();let n=this._va;for(e=n.length,t=0;t<e;++t)n[t].destroy();this._va=void 0;let i=this._pickIds;for(e=i.length,t=0;t<e;++t)i[t].destroy();return this._pickIds=void 0,this._batchTable=this._batchTable&&this._batchTable.destroy(),this._instanceIds=void 0,this._perInstanceAttributeCache=void 0,this._attributeLocations=void 0,ue(this)};function IS(e,t,n,i){e._error=i,e._state=n,t.afterRender.push(function(){e._ready=e._state===Er.COMPLETE||e._state===Er.FAILED})}var An=cr;function xPe(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.componentDatatype))throw new w("options.componentDatatype is required.");if(!c(e.componentsPerAttribute))throw new w("options.componentsPerAttribute is required.");if(e.componentsPerAttribute<1||e.componentsPerAttribute>4)throw new w("options.componentsPerAttribute must be between 1 and 4.");if(!c(e.value))throw new w("options.value is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=g(e.normalize,!1),this.value=e.value}var lc=xPe;var OS=`#ifdef TEXTURE_COORDINATES
| #ifdef SPHERICAL
| in vec4 v_sphericalExtents;
| #else // SPHERICAL
| in vec2 v_inversePlaneExtents;
| in vec4 v_westPlane;
| in vec4 v_southPlane;
| #endif // SPHERICAL
| in vec3 v_uvMinAndSphericalLongitudeRotation;
| in vec3 v_uMaxAndInverseDistance;
| in vec3 v_vMaxAndInverseDistance;
| #endif // TEXTURE_COORDINATES
|
| #ifdef PER_INSTANCE_COLOR
| in vec4 v_color;
| #endif
|
| #ifdef NORMAL_EC
| vec3 getEyeCoordinate3FromWindowCoordinate(vec2 fragCoord, float logDepthOrDepth) {
| vec4 eyeCoordinate = czm_windowToEyeCoordinates(fragCoord, logDepthOrDepth);
| return eyeCoordinate.xyz / eyeCoordinate.w;
| }
|
| vec3 vectorFromOffset(vec4 eyeCoordinate, vec2 positiveOffset) {
| vec2 glFragCoordXY = gl_FragCoord.xy;
| // Sample depths at both offset and negative offset
| float upOrRightLogDepth = czm_unpackDepth(texture(czm_globeDepthTexture, (glFragCoordXY + positiveOffset) / czm_viewport.zw));
| float downOrLeftLogDepth = czm_unpackDepth(texture(czm_globeDepthTexture, (glFragCoordXY - positiveOffset) / czm_viewport.zw));
| // Explicitly evaluate both paths
| // Necessary for multifrustum and for edges of the screen
| bvec2 upOrRightInBounds = lessThan(glFragCoordXY + positiveOffset, czm_viewport.zw);
| float useUpOrRight = float(upOrRightLogDepth > 0.0 && upOrRightInBounds.x && upOrRightInBounds.y);
| float useDownOrLeft = float(useUpOrRight == 0.0);
| vec3 upOrRightEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY + positiveOffset, upOrRightLogDepth);
| vec3 downOrLeftEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY - positiveOffset, downOrLeftLogDepth);
| return (upOrRightEC - (eyeCoordinate.xyz / eyeCoordinate.w)) * useUpOrRight + ((eyeCoordinate.xyz / eyeCoordinate.w) - downOrLeftEC) * useDownOrLeft;
| }
| #endif // NORMAL_EC
|
| void main(void)
| {
| #ifdef REQUIRES_EC
| float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));
| vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
| #endif
|
| #ifdef REQUIRES_WC
| vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;
| vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;
| #endif
|
| #ifdef TEXTURE_COORDINATES
| vec2 uv;
| #ifdef SPHERICAL
| // Treat world coords as a sphere normal for spherical coordinates
| vec2 sphericalLatLong = czm_approximateSphericalCoordinates(worldCoordinate);
| sphericalLatLong.y += v_uvMinAndSphericalLongitudeRotation.z;
| sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);
| uv.x = (sphericalLatLong.y - v_sphericalExtents.y) * v_sphericalExtents.w;
| uv.y = (sphericalLatLong.x - v_sphericalExtents.x) * v_sphericalExtents.z;
| #else // SPHERICAL
| // Unpack planes and transform to eye space
| uv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;
| uv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;
| #endif // SPHERICAL
| #endif // TEXTURE_COORDINATES
|
| #ifdef PICK
| #ifdef CULL_FRAGMENTS
| // When classifying translucent geometry, logDepthOrDepth == 0.0
| // indicates a region that should not be classified, possibly due to there
| // being opaque pixels there in another buffer.
| // Check for logDepthOrDepth != 0.0 to make sure this should be classified.
| if (0.0 <= uv.x && uv.x <= 1.0 && 0.0 <= uv.y && uv.y <= 1.0 || logDepthOrDepth != 0.0) {
| out_FragColor.a = 1.0; // 0.0 alpha leads to discard from ShaderSource.createPickFragmentShaderSource
| czm_writeDepthClamp();
| }
| #else // CULL_FRAGMENTS
| out_FragColor.a = 1.0;
| #endif // CULL_FRAGMENTS
| #else // PICK
|
| #ifdef CULL_FRAGMENTS
| // When classifying translucent geometry, logDepthOrDepth == 0.0
| // indicates a region that should not be classified, possibly due to there
| // being opaque pixels there in another buffer.
| if (uv.x <= 0.0 || 1.0 <= uv.x || uv.y <= 0.0 || 1.0 <= uv.y || logDepthOrDepth == 0.0) {
| discard;
| }
| #endif
|
| #ifdef NORMAL_EC
| // Compute normal by sampling adjacent pixels in 2x2 block in screen space
| vec3 downUp = vectorFromOffset(eyeCoordinate, vec2(0.0, 1.0));
| vec3 leftRight = vectorFromOffset(eyeCoordinate, vec2(1.0, 0.0));
| vec3 normalEC = normalize(cross(leftRight, downUp));
| #endif
|
|
| #ifdef PER_INSTANCE_COLOR
|
| vec4 color = czm_gammaCorrect(v_color);
| #ifdef FLAT
| out_FragColor = color;
| #else // FLAT
| czm_materialInput materialInput;
| materialInput.normalEC = normalEC;
| materialInput.positionToEyeEC = -eyeCoordinate.xyz;
| czm_material material = czm_getDefaultMaterial(materialInput);
| material.diffuse = color.rgb;
| material.alpha = color.a;
|
| out_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);
| #endif // FLAT
|
| // Premultiply alpha. Required for classification primitives on translucent globe.
| out_FragColor.rgb *= out_FragColor.a;
|
| #else // PER_INSTANCE_COLOR
|
| // Material support.
| // USES_ is distinct from REQUIRES_, because some things are dependencies of each other or
| // dependencies for culling but might not actually be used by the material.
|
| czm_materialInput materialInput;
|
| #ifdef USES_NORMAL_EC
| materialInput.normalEC = normalEC;
| #endif
|
| #ifdef USES_POSITION_TO_EYE_EC
| materialInput.positionToEyeEC = -eyeCoordinate.xyz;
| #endif
|
| #ifdef USES_TANGENT_TO_EYE
| materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(worldCoordinate, normalEC);
| #endif
|
| #ifdef USES_ST
| // Remap texture coordinates from computed (approximately aligned with cartographic space) to the desired
| // texture coordinate system, which typically forms a tight oriented bounding box around the geometry.
| // Shader is provided a set of reference points for remapping.
| materialInput.st.x = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_uMaxAndInverseDistance.xy, uv) * v_uMaxAndInverseDistance.z;
| materialInput.st.y = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_vMaxAndInverseDistance.xy, uv) * v_vMaxAndInverseDistance.z;
| #endif
|
| czm_material material = czm_getMaterial(materialInput);
|
| #ifdef FLAT
| out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
| #else // FLAT
| out_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);
| #endif // FLAT
|
| // Premultiply alpha. Required for classification primitives on translucent globe.
| out_FragColor.rgb *= out_FragColor.a;
|
| #endif // PER_INSTANCE_COLOR
| czm_writeDepthClamp();
| #endif // PICK
| }
| `;function Lu(e,t,n){C.typeOf.bool("extentsCulling",e),C.typeOf.bool("planarExtents",t),C.typeOf.object("appearance",n),this._projectionExtentDefines={eastMostYhighDefine:"",eastMostYlowDefine:"",westMostYhighDefine:"",westMostYlowDefine:""};let i=new G8;i.requiresTextureCoordinates=e,i.requiresEC=!n.flat;let o=new G8;if(o.requiresTextureCoordinates=e,n instanceof nn)i.requiresNormalEC=!n.flat;else{let r=`${n.material.shaderSource}
| ${n.fragmentShaderSource}`;i.normalEC=r.indexOf("materialInput.normalEC")!==-1||r.indexOf("czm_getDefaultMaterial")!==-1,i.positionToEyeEC=r.indexOf("materialInput.positionToEyeEC")!==-1,i.tangentToEyeMatrix=r.indexOf("materialInput.tangentToEyeMatrix")!==-1,i.st=r.indexOf("materialInput.st")!==-1}this._colorShaderDependencies=i,this._pickShaderDependencies=o,this._appearance=n,this._extentsCulling=e,this._planarExtents=t}Lu.prototype.createFragmentShader=function(e){C.typeOf.bool("columbusView2D",e);let t=this._appearance,n=this._colorShaderDependencies,i=[];!e&&!this._planarExtents&&i.push("SPHERICAL"),n.requiresEC&&i.push("REQUIRES_EC"),n.requiresWC&&i.push("REQUIRES_WC"),n.requiresTextureCoordinates&&i.push("TEXTURE_COORDINATES"),this._extentsCulling&&i.push("CULL_FRAGMENTS"),n.requiresNormalEC&&i.push("NORMAL_EC"),t instanceof nn&&i.push("PER_INSTANCE_COLOR"),n.normalEC&&i.push("USES_NORMAL_EC"),n.positionToEyeEC&&i.push("USES_POSITION_TO_EYE_EC"),n.tangentToEyeMatrix&&i.push("USES_TANGENT_TO_EYE"),n.st&&i.push("USES_ST"),t.flat&&i.push("FLAT");let o="";return t instanceof nn||(o=t.material.shaderSource),new Be({defines:i,sources:[o,OS]})};Lu.prototype.createPickFragmentShader=function(e){C.typeOf.bool("columbusView2D",e);let t=this._pickShaderDependencies,n=["PICK"];return!e&&!this._planarExtents&&n.push("SPHERICAL"),t.requiresEC&&n.push("REQUIRES_EC"),t.requiresWC&&n.push("REQUIRES_WC"),t.requiresTextureCoordinates&&n.push("TEXTURE_COORDINATES"),this._extentsCulling&&n.push("CULL_FRAGMENTS"),new Be({defines:n,sources:[OS],pickColorQualifier:"in"})};Lu.prototype.createVertexShader=function(e,t,n,i){return C.defined("defines",e),C.typeOf.string("vertexShaderSource",t),C.typeOf.bool("columbusView2D",n),C.defined("mapProjection",i),vQ(this._colorShaderDependencies,this._planarExtents,n,e,t,this._appearance,i,this._projectionExtentDefines)};Lu.prototype.createPickVertexShader=function(e,t,n,i){return C.defined("defines",e),C.typeOf.string("vertexShaderSource",t),C.typeOf.bool("columbusView2D",n),C.defined("mapProjection",i),vQ(this._pickShaderDependencies,this._planarExtents,n,e,t,void 0,i,this._projectionExtentDefines)};var xQ=new d,TQ=new re,CQ={high:0,low:0};function vQ(e,t,n,i,o,r,s,a){let l=i.slice();if(a.eastMostYhighDefine===""){let u=TQ;u.longitude=O.PI,u.latitude=0,u.height=0;let f=s.project(u,xQ),h=kn.encode(f.x,CQ);a.eastMostYhighDefine=`EAST_MOST_X_HIGH ${h.high.toFixed(`${h.high}`.length+1)}`,a.eastMostYlowDefine=`EAST_MOST_X_LOW ${h.low.toFixed(`${h.low}`.length+1)}`;let m=TQ;m.longitude=-O.PI,m.latitude=0,m.height=0;let p=s.project(m,xQ);h=kn.encode(p.x,CQ),a.westMostYhighDefine=`WEST_MOST_X_HIGH ${h.high.toFixed(`${h.high}`.length+1)}`,a.westMostYlowDefine=`WEST_MOST_X_LOW ${h.low.toFixed(`${h.low}`.length+1)}`}return n&&(l.push(a.eastMostYhighDefine),l.push(a.eastMostYlowDefine),l.push(a.westMostYhighDefine),l.push(a.westMostYlowDefine)),c(r)&&r instanceof nn&&l.push("PER_INSTANCE_COLOR"),e.requiresTextureCoordinates&&(l.push("TEXTURE_COORDINATES"),t||n||l.push("SPHERICAL"),n&&l.push("COLUMBUS_VIEW_2D")),new Be({defines:l,sources:[o]})}function G8(){this._requiresEC=!1,this._requiresWC=!1,this._requiresNormalEC=!1,this._requiresTextureCoordinates=!1,this._usesNormalEC=!1,this._usesPositionToEyeEC=!1,this._usesTangentToEyeMat=!1,this._usesSt=!1}Object.defineProperties(G8.prototype,{requiresEC:{get:function(){return this._requiresEC},set:function(e){this._requiresEC=e||this._requiresEC}},requiresWC:{get:function(){return this._requiresWC},set:function(e){this._requiresWC=e||this._requiresWC,this.requiresEC=this._requiresWC}},requiresNormalEC:{get:function(){return this._requiresNormalEC},set:function(e){this._requiresNormalEC=e||this._requiresNormalEC,this.requiresEC=this._requiresNormalEC}},requiresTextureCoordinates:{get:function(){return this._requiresTextureCoordinates},set:function(e){this._requiresTextureCoordinates=e||this._requiresTextureCoordinates,this.requiresWC=this._requiresTextureCoordinates}},normalEC:{set:function(e){this.requiresNormalEC=e,this._usesNormalEC=e},get:function(){return this._usesNormalEC}},tangentToEyeMatrix:{set:function(e){this.requiresWC=e,this.requiresNormalEC=e,this._usesTangentToEyeMat=e},get:function(){return this._usesTangentToEyeMat}},positionToEyeEC:{set:function(e){this.requiresEC=e,this._usesPositionToEyeEC=e},get:function(){return this._usesPositionToEyeEC}},st:{set:function(e){this.requiresTextureCoordinates=e,this._usesSt=e},get:function(){return this._usesSt}}});function EQ(e,t,n){return Math.abs((t.y-e.y)*n.x-(t.x-e.x)*n.y+t.x*e.y-t.y*e.x)/k.distance(t,e)}var TPe=[new k,new k,new k,new k];function DQ(e,t){let n=TPe,i=k.unpack(t,0,n[0]),o=k.unpack(t,2,n[1]),r=k.unpack(t,4,n[2]);e.uMaxVmax=new lc({componentDatatype:j.FLOAT,componentsPerAttribute:4,normalize:!1,value:[o.x,o.y,r.x,r.y]});let s=1/EQ(i,o,r),a=1/EQ(i,r,o);e.uvMinAndExtents=new lc({componentDatatype:j.FLOAT,componentsPerAttribute:4,normalize:!1,value:[i.x,i.y,s,a]})}var IQ=new re,OQ=new d,CPe=new d,EPe=new d,WM={high:0,low:0};function PQ(e,t,n){let i=IQ;i.height=0,i.longitude=e.west,i.latitude=e.south;let o=t.project(i,OQ);i.latitude=e.north;let r=t.project(i,CPe);i.longitude=e.east,i.latitude=e.south;let s=t.project(i,EPe),a=[0,0,0,0],l=[0,0,0,0],u=kn.encode(o.x,WM);a[0]=u.high,l[0]=u.low,u=kn.encode(o.y,WM),a[1]=u.high,l[1]=u.low,u=kn.encode(r.y,WM),a[2]=u.high,l[2]=u.low,u=kn.encode(s.x,WM),a[3]=u.high,l[3]=u.low,n.planes2D_HIGH=new lc({componentDatatype:j.FLOAT,componentsPerAttribute:4,normalize:!1,value:a}),n.planes2D_LOW=new lc({componentDatatype:j.FLOAT,componentsPerAttribute:4,normalize:!1,value:l})}var wPe=new N,SPe=new N,wQ=new d,APe=new re,vPe=[new re,new re,new re,new re,new re,new re,new re,new re];function DPe(e,t,n,i,o,r){let s=te.center(e,APe);s.height=n;let a=re.toCartesian(s,t,wQ),l=Lt.eastNorthUpToFixedFrame(a,t,wPe),u=N.inverse(l,SPe),f=e.west,h=e.east,m=e.north,p=e.south,_=vPe;_[0].latitude=p,_[0].longitude=f,_[1].latitude=m,_[1].longitude=f,_[2].latitude=m,_[2].longitude=h,_[3].latitude=p,_[3].longitude=h;let b=(f+h)*.5,x=(m+p)*.5;_[4].latitude=p,_[4].longitude=b,_[5].latitude=m,_[5].longitude=b,_[6].latitude=x,_[6].longitude=f,_[7].latitude=x,_[7].longitude=h;let T=Number.POSITIVE_INFINITY,E=Number.NEGATIVE_INFINITY,S=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY;for(let P=0;P<8;P++){_[P].height=n;let L=re.toCartesian(_[P],t,wQ);N.multiplyByPoint(u,L,L),L.z=0,T=Math.min(T,L.x),E=Math.max(E,L.x),S=Math.min(S,L.y),A=Math.max(A,L.y)}let v=i;v.x=T,v.y=S,v.z=0,N.multiplyByPoint(l,v,v);let D=o;D.x=E,D.y=S,D.z=0,N.multiplyByPoint(l,D,D),d.subtract(D,v,o);let R=r;R.x=T,R.y=A,R.z=0,N.multiplyByPoint(l,R,R),d.subtract(R,v,r)}var IPe=new d,OPe=new d,PPe=new kn;Lu.getPlanarTextureCoordinateAttributes=function(e,t,n,i,o){C.typeOf.object("boundingRectangle",e),C.defined("textureCoordinateRotationPoints",t),C.typeOf.object("ellipsoid",n),C.typeOf.object("projection",i);let r=OQ,s=IPe,a=OPe;DPe(e,n,g(o,0),r,s,a);let l={};DQ(l,t);let u=kn.fromCartesian(r,PPe);return l.southWest_HIGH=new lc({componentDatatype:j.FLOAT,componentsPerAttribute:3,normalize:!1,value:d.pack(u.high,[0,0,0])}),l.southWest_LOW=new lc({componentDatatype:j.FLOAT,componentsPerAttribute:3,normalize:!1,value:d.pack(u.low,[0,0,0])}),l.eastward=new lc({componentDatatype:j.FLOAT,componentsPerAttribute:3,normalize:!1,value:d.pack(s,[0,0,0])}),l.northward=new lc({componentDatatype:j.FLOAT,componentsPerAttribute:3,normalize:!1,value:d.pack(a,[0,0,0])}),PQ(e,i,l),l};var RPe=new d;function SQ(e,t,n,i){let o=IQ;o.latitude=e,o.longitude=t,o.height=0;let r=re.toCartesian(o,n,RPe),s=Math.sqrt(r.x*r.x+r.y*r.y),a=O.fastApproximateAtan2(s,r.z),l=O.fastApproximateAtan2(r.x,r.y);return i.x=a,i.y=l,i}var AQ=new k;Lu.getSphericalExtentGeometryInstanceAttributes=function(e,t,n,i){C.typeOf.object("boundingRectangle",e),C.defined("textureCoordinateRotationPoints",t),C.typeOf.object("ellipsoid",n),C.typeOf.object("projection",i);let o=SQ(e.south,e.west,n,AQ),r=o.x,s=o.y,a=SQ(e.north,e.east,n,AQ),l=a.x,u=a.y,f=0;s>u&&(f=O.PI-s,s=-O.PI,u+=f),r-=O.EPSILON5,s-=O.EPSILON5,l+=O.EPSILON5,u+=O.EPSILON5;let h=1/(u-s),m=1/(l-r),p={sphericalExtents:new lc({componentDatatype:j.FLOAT,componentsPerAttribute:4,normalize:!1,value:[r,s,m,h]}),longitudeRotation:new lc({componentDatatype:j.FLOAT,componentsPerAttribute:1,normalize:!1,value:[f]})};return DQ(p,t),PQ(e,i,p),p};Lu.hasAttributesForTextureCoordinatePlanes=function(e){return c(e.southWest_HIGH)&&c(e.southWest_LOW)&&c(e.northward)&&c(e.eastward)&&c(e.planes2D_HIGH)&&c(e.planes2D_LOW)&&c(e.uMaxVmax)&&c(e.uvMinAndExtents)};Lu.hasAttributesForSphericalExtents=function(e){return c(e.sphericalExtents)&&c(e.longitudeRotation)&&c(e.planes2D_HIGH)&&c(e.planes2D_LOW)&&c(e.uMaxVmax)&&c(e.uvMinAndExtents)};function MPe(e){return Math.max(e.width,e.height)>Lu.MAX_WIDTH_FOR_PLANAR_EXTENTS}Lu.shouldUseSphericalCoordinates=function(e){return C.typeOf.object("rectangle",e),MPe(e)};Lu.MAX_WIDTH_FOR_PLANAR_EXTENTS=O.toRadians(1);var Nu=Lu;var LPe={NEVER:Y.NEVER,LESS:Y.LESS,EQUAL:Y.EQUAL,LESS_OR_EQUAL:Y.LEQUAL,GREATER:Y.GREATER,NOT_EQUAL:Y.NOTEQUAL,GREATER_OR_EQUAL:Y.GEQUAL,ALWAYS:Y.ALWAYS},Nn=Object.freeze(LPe);var NPe={ZERO:Y.ZERO,KEEP:Y.KEEP,REPLACE:Y.REPLACE,INCREMENT:Y.INCR,DECREMENT:Y.DECR,INVERT:Y.INVERT,INCREMENT_WRAP:Y.INCR_WRAP,DECREMENT_WRAP:Y.DECR_WRAP},ut=Object.freeze(NPe);var qM={CESIUM_3D_TILE_MASK:128,SKIP_LOD_MASK:112,SKIP_LOD_BIT_SHIFT:4,CLASSIFICATION_MASK:15};qM.setCesium3DTileBit=function(){return{enabled:!0,frontFunction:Nn.ALWAYS,frontOperation:{fail:ut.KEEP,zFail:ut.KEEP,zPass:ut.REPLACE},backFunction:Nn.ALWAYS,backOperation:{fail:ut.KEEP,zFail:ut.KEEP,zPass:ut.REPLACE},reference:qM.CESIUM_3D_TILE_MASK,mask:qM.CESIUM_3D_TILE_MASK}};var kt=Object.freeze(qM);function fb(e){e=g(e,g.EMPTY_OBJECT);let t=e.geometryInstances;this.geometryInstances=t,this.show=g(e.show,!0),this.classificationType=g(e.classificationType,Ln.BOTH),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=g(e.debugShowShadowVolume,!1),this._debugShowShadowVolume=!1,this._extruded=g(e._extruded,!1),this._uniformMap=e._uniformMap,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._spColor=void 0,this._spPick2D=void 0,this._spColor2D=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._commandsIgnoreShow=[],this._ready=!1,this._primitive=void 0,this._pickPrimitive=e._pickPrimitive,this._hasSphericalExtentsAttribute=!1,this._hasPlanarExtentsAttributes=!1,this._hasPerColorAttribute=!1,this.appearance=e.appearance,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._usePickOffsets=!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:g(e.vertexCacheOptimize,!1),interleave:g(e.interleave,!1),releaseGeometryInstances:g(e.releaseGeometryInstances,!0),allowPicking:g(e.allowPicking,!0),asynchronous:g(e.asynchronous,!0),compressVertices:g(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_createRenderStatesFunction:void 0,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0,_createPickOffsets:!0}}Object.defineProperties(fb.prototype,{vertexCacheOptimize:{get:function(){return this._primitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},compressVertices:{get:function(){return this._primitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},_needs2DShader:{get:function(){return this._hasPlanarExtentsAttributes||this._hasSphericalExtentsAttribute}}});fb.isSupported=function(e){return e.context.stencilBuffer};function oT(e,t){let n=t?Nn.EQUAL:Nn.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:n,frontOperation:{fail:ut.KEEP,zFail:ut.DECREMENT_WRAP,zPass:ut.KEEP},backFunction:n,backOperation:{fail:ut.KEEP,zFail:ut.INCREMENT_WRAP,zPass:ut.KEEP},reference:kt.CESIUM_3D_TILE_MASK,mask:kt.CESIUM_3D_TILE_MASK},stencilMask:kt.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:cc.LESS_OR_EQUAL},depthMask:!1}}function W8(e){return{stencilTest:{enabled:e,frontFunction:Nn.NOT_EQUAL,frontOperation:{fail:ut.ZERO,zFail:ut.ZERO,zPass:ut.ZERO},backFunction:Nn.NOT_EQUAL,backOperation:{fail:ut.ZERO,zFail:ut.ZERO,zPass:ut.ZERO},reference:0,mask:kt.CLASSIFICATION_MASK},stencilMask:kt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:cn.PRE_MULTIPLIED_ALPHA_BLEND}}var FPe={stencilTest:{enabled:!0,frontFunction:Nn.NOT_EQUAL,frontOperation:{fail:ut.ZERO,zFail:ut.ZERO,zPass:ut.ZERO},backFunction:Nn.NOT_EQUAL,backOperation:{fail:ut.ZERO,zFail:ut.ZERO,zPass:ut.ZERO},reference:0,mask:kt.CLASSIFICATION_MASK},stencilMask:kt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function BPe(e,t,n,i){if(c(e._rsStencilDepthPass))return;let o=!e.debugShowShadowVolume;e._rsStencilDepthPass=Fe.fromCache(oT(o,!1)),e._rsStencilDepthPass3DTiles=Fe.fromCache(oT(o,!0)),e._rsColorPass=Fe.fromCache(W8(o,!1)),e._rsPickPass=Fe.fromCache(FPe)}function kPe(e,t){if(!e.compressVertices)return t;if(t.search(/in\s+vec3\s+extrudeDirection;/g)!==-1){let n="compressedAttributes",i=`in vec2 ${n};`,o=`vec3 extrudeDirection;
| `,r=` extrudeDirection = czm_octDecode(${n}, 65535.0);
| `,s=t;s=s.replace(/in\s+vec3\s+extrudeDirection;/g,""),s=Be.replaceMain(s,"czm_non_compressed_main");let a=`void main()
| {
| ${r} czm_non_compressed_main();
| }`;return[i,o,s,a].join(`
| `)}}function UPe(e,t){let n=t.context,i=e._primitive,o=HM;o=e._primitive._batchTable.getVertexShaderCallback()(o),o=An._appendDistanceDisplayConditionToShader(i,o),o=An._modifyShaderPosition(e,o,t.scene3DOnly),o=An._updateColorAttribute(i,o);let r=e._hasPlanarExtentsAttributes,s=r||e._hasSphericalExtentsAttribute;e._extruded&&(o=kPe(i,o));let a=e._extruded?"EXTRUDED_GEOMETRY":"",l=new Be({defines:[a],sources:[o]}),u=new Be({sources:[ub]}),f=e._primitive._attributeLocations,h=new Nu(s,r,e.appearance);if(e._spStencil=en.replaceCache({context:n,shaderProgram:e._spStencil,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:f}),e._primitive.allowPicking){let _=Be.createPickVertexShaderSource(o);_=An._appendShowToShader(i,_),_=An._updatePickColorAttribute(_);let b=h.createPickFragmentShader(!1),x=h.createPickVertexShader([a],_,!1,t.mapProjection);if(e._spPick=en.replaceCache({context:n,shaderProgram:e._spPick,vertexShaderSource:x,fragmentShaderSource:b,attributeLocations:f}),s){let T=n.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick");if(!c(T)){let E=h.createPickFragmentShader(!0),S=h.createPickVertexShader([a],_,!0,t.mapProjection);T=n.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:S,fragmentShaderSource:E,attributeLocations:f})}e._spPick2D=T}}else e._spPick=en.fromCache({context:n,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:f});o=An._appendShowToShader(i,o),l=new Be({defines:[a],sources:[o]}),e._sp=en.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:f});let m=h.createFragmentShader(!1),p=h.createVertexShader([a],o,!1,t.mapProjection);if(e._spColor=en.replaceCache({context:n,shaderProgram:e._spColor,vertexShaderSource:p,fragmentShaderSource:m,attributeLocations:f}),s){let _=n.shaderCache.getDerivedShaderProgram(e._spColor,"2dColor");if(!c(_)){let b=h.createFragmentShader(!0),x=h.createVertexShader([a],o,!0,t.mapProjection);_=n.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:x,fragmentShaderSource:b,attributeLocations:f})}e._spColor2D=_}}function zPe(e,t){let n=e._primitive,i=n._va.length*2;t.length=i;let o,r,s,a=0,l=n._batchTable.getUniformMapCallback()(e._uniformMap),u=e._needs2DShader;for(o=0;o<i;o+=2){let p=n._va[a++];r=t[o],c(r)||(r=t[o]=new Ke({owner:e,primitiveType:n._primitiveType})),r.vertexArray=p,r.renderState=e._rsStencilDepthPass,r.shaderProgram=e._sp,r.uniformMap=l,r.pass=xe.TERRAIN_CLASSIFICATION,s=Ke.shallowClone(r,r.derivedCommands.tileset),s.renderState=e._rsStencilDepthPass3DTiles,s.pass=xe.CESIUM_3D_TILE_CLASSIFICATION,r.derivedCommands.tileset=s,r=t[o+1],c(r)||(r=t[o+1]=new Ke({owner:e,primitiveType:n._primitiveType})),r.vertexArray=p,r.renderState=e._rsColorPass,r.shaderProgram=e._spColor,r.pass=xe.TERRAIN_CLASSIFICATION;let b=e.appearance.material;if(c(b)&&(l=bt(l,b._uniforms)),r.uniformMap=l,s=Ke.shallowClone(r,r.derivedCommands.tileset),s.pass=xe.CESIUM_3D_TILE_CLASSIFICATION,r.derivedCommands.tileset=s,u){let x=Ke.shallowClone(r,r.derivedCommands.appearance2D);x.shaderProgram=e._spColor2D,r.derivedCommands.appearance2D=x,x=Ke.shallowClone(s,s.derivedCommands.appearance2D),x.shaderProgram=e._spColor2D,s.derivedCommands.appearance2D=x}}let f=e._commandsIgnoreShow,h=e._spStencil,m=0;i=f.length=i/2;for(let p=0;p<i;++p){let _=f[p]=Ke.shallowClone(t[m],f[p]);_.shaderProgram=h,_.pass=xe.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,m+=2}}function VPe(e,t){let n=e._usePickOffsets,i=e._primitive,o=i._va.length*2,r,s=0,a;n&&(r=i._pickOffsets,o=r.length*2),t.length=o;let l,u,f,h=0,m=i._batchTable.getUniformMapCallback()(e._uniformMap),p=e._needs2DShader;for(l=0;l<o;l+=2){let _=i._va[h++];if(n&&(a=r[s++],_=i._va[a.index]),u=t[l],c(u)||(u=t[l]=new Ke({owner:e,primitiveType:i._primitiveType,pickOnly:!0})),u.vertexArray=_,u.renderState=e._rsStencilDepthPass,u.shaderProgram=e._sp,u.uniformMap=m,u.pass=xe.TERRAIN_CLASSIFICATION,n&&(u.offset=a.offset,u.count=a.count),f=Ke.shallowClone(u,u.derivedCommands.tileset),f.renderState=e._rsStencilDepthPass3DTiles,f.pass=xe.CESIUM_3D_TILE_CLASSIFICATION,u.derivedCommands.tileset=f,u=t[l+1],c(u)||(u=t[l+1]=new Ke({owner:e,primitiveType:i._primitiveType,pickOnly:!0})),u.vertexArray=_,u.renderState=e._rsPickPass,u.shaderProgram=e._spPick,u.uniformMap=m,u.pass=xe.TERRAIN_CLASSIFICATION,n&&(u.offset=a.offset,u.count=a.count),f=Ke.shallowClone(u,u.derivedCommands.tileset),f.pass=xe.CESIUM_3D_TILE_CLASSIFICATION,u.derivedCommands.tileset=f,p){let b=Ke.shallowClone(u,u.derivedCommands.pick2D);b.shaderProgram=e._spPick2D,u.derivedCommands.pick2D=b,b=Ke.shallowClone(f,f.derivedCommands.pick2D),b.shaderProgram=e._spPick2D,f.derivedCommands.pick2D=b}}}function HPe(e,t,n,i,o,r,s){zPe(e,r),VPe(e,s)}function RQ(e,t){return Math.floor(e%t/2)}function j8(e,t,n,i,o,r){e.modelMatrix=n,e.boundingVolume=o,e.cull=i,e.debugShowBoundingVolume=r,t.commandList.push(e)}function MQ(e,t,n,i,o){e.modelMatrix=n,e.boundingVolume=o,e.cull=i,t.commandList.push(e)}function GPe(e,t,n,i,o,r,s,a){let l=e._primitive;An._updateBoundingVolumes(l,t,o);let u;t.mode===J.SCENE3D?u=l._boundingSphereWC:t.mode===J.COLUMBUS_VIEW?u=l._boundingSphereCV:t.mode===J.SCENE2D&&c(l._boundingSphere2D)?u=l._boundingSphere2D:c(l._boundingSphereMorph)&&(u=l._boundingSphereMorph);let f=e.classificationType,h=f!==Ln.CESIUM_3D_TILE,m=f!==Ln.TERRAIN,p=t.passes,_,b,x;if(p.render){let T=n.length;for(_=0;_<T;++_)b=u[RQ(_,T)],h&&(x=n[_],j8(x,t,o,r,b,s)),m&&(x=n[_].derivedCommands.tileset,j8(x,t,o,r,b,s));if(t.invertClassification){let E=e._commandsIgnoreShow,S=E.length;for(_=0;_<S;++_)b=u[_],x=E[_],j8(x,t,o,r,b,s)}}if(p.pick){let T=i.length,E=l._pickOffsets;for(_=0;_<T;++_){let S=E[RQ(_,T)];b=u[S.index],h&&(x=i[_],MQ(x,t,o,r,b)),m&&(x=i[_].derivedCommands.tileset,MQ(x,t,o,r,b))}}}fb.prototype.update=function(e){if(!c(this._primitive)&&!c(this.geometryInstances))return;let t=this.appearance;c(t)&&c(t.material)&&t.material.update(e.context);let n=this,i=this._primitiveOptions;if(!c(this._primitive)){let o=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],r=o.length,s,a,l,u=!1,f=!0,h,m=!1,p=!1;for(r>0&&(l=o[0].attributes,m=Nu.hasAttributesForSphericalExtents(l),p=Nu.hasAttributesForTextureCoordinatePlanes(l),h=l.color),s=0;s<r;s++){a=o[s];let b=a.attributes.color;if(c(b))u=!0;else if(u)throw new w("All GeometryInstances must have color attributes to use per-instance color.");f=f&&c(b)&&Ht.equals(h,b)}if(!f&&!m&&!p)throw new w("All GeometryInstances must have the same color attribute except via GroundPrimitives");if(u&&!c(t)&&(t=new nn({flat:!0}),this.appearance=t),!u&&t instanceof nn)throw new w("PerInstanceColorAppearance requires color GeometryInstanceAttributes on all GeometryInstances");if(c(t.material)&&!m&&!p)throw new w("Materials on ClassificationPrimitives are not supported except via GroundPrimitives");this._usePickOffsets=!m&&!p,this._hasSphericalExtentsAttribute=m,this._hasPlanarExtentsAttributes=p,this._hasPerColorAttribute=u;let _=new Array(r);for(s=0;s<r;++s)a=o[s],_[s]=new wt({geometry:a.geometry,attributes:a.attributes,modelMatrix:a.modelMatrix,id:a.id,pickPrimitive:g(this._pickPrimitive,n)});i.appearance=t,i.geometryInstances=_,c(this._createBoundingVolumeFunction)&&(i._createBoundingVolumeFunction=function(b,x){n._createBoundingVolumeFunction(b,x)}),i._createRenderStatesFunction=function(b,x,T,E){BPe(n,x)},i._createShaderProgramFunction=function(b,x,T){UPe(n,x)},i._createCommandsFunction=function(b,x,T,E,S,A,v){HPe(n,void 0,void 0,!0,!1,A,v)},c(this._updateAndQueueCommandsFunction)?i._updateAndQueueCommandsFunction=function(b,x,T,E,S,A,v,D){n._updateAndQueueCommandsFunction(b,x,T,E,S,A,v,D)}:i._updateAndQueueCommandsFunction=function(b,x,T,E,S,A,v,D){GPe(n,x,T,E,S,A,v,D)},this._primitive=new An(i)}if(this.debugShowShadowVolume&&!this._debugShowShadowVolume&&this._ready?(this._debugShowShadowVolume=!0,this._rsStencilDepthPass=Fe.fromCache(oT(!1,!1)),this._rsStencilDepthPass3DTiles=Fe.fromCache(oT(!1,!0)),this._rsColorPass=Fe.fromCache(W8(!1))):!this.debugShowShadowVolume&&this._debugShowShadowVolume&&(this._debugShowShadowVolume=!1,this._rsStencilDepthPass=Fe.fromCache(oT(!0,!1)),this._rsStencilDepthPass3DTiles=Fe.fromCache(oT(!0,!0)),this._rsColorPass=Fe.fromCache(W8(!0))),this._primitive.appearance!==t){if(!this._hasSphericalExtentsAttribute&&!this._hasPlanarExtentsAttributes&&c(t.material))throw new w("Materials on ClassificationPrimitives are not supported except via GroundPrimitive");if(!this._hasPerColorAttribute&&t instanceof nn)throw new w("PerInstanceColorAppearance requires color GeometryInstanceAttribute");this._primitive.appearance=t}this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{c(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};fb.prototype.getGeometryInstanceAttributes=function(e){if(!c(this._primitive))throw new w("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)};fb.prototype.isDestroyed=function(){return!1};fb.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._spColor=this._spColor&&this._spColor.destroy(),this._spPick2D=void 0,this._spColor2D=void 0,ue(this)};var PS=fb;var jPe={u_globeMinimumAltitude:function(){return 55e3}};function Xc(e){e=g(e,g.EMPTY_OBJECT);let t=e.appearance,n=e.geometryInstances;if(!c(t)&&c(n)){let o=Array.isArray(n)?n:[n],r=o.length;for(let s=0;s<r;s++){let a=o[s].attributes;if(c(a)&&c(a.color)){t=new nn({flat:!0});break}}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=g(e.show,!0),this.classificationType=g(e.classificationType,Ln.BOTH),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=g(e.debugShowShadowVolume,!1),this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=ai._defaultMaxTerrainHeight,this._minTerrainHeight=ai._defaultMinTerrainHeight,this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0;let i=this;this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:g(e.vertexCacheOptimize,!1),interleave:g(e.interleave,!1),releaseGeometryInstances:g(e.releaseGeometryInstances,!0),allowPicking:g(e.allowPicking,!0),asynchronous:g(e.asynchronous,!0),compressVertices:g(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:i,_extruded:!0,_uniformMap:jPe}}Object.defineProperties(Xc.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}}});Xc.isSupported=PS.isSupported;function LQ(e){return function(t,n){let i=n.maximumRadius,o=i/Math.cos(t*.5)-i;return e._maxHeight+o}}function NQ(e){return function(t,n){return e._minHeight}}var WPe=new d,qPe=new d,YPe=new d,XPe=new re,KPe=new te;function YM(e,t){let n=e.mapProjection.ellipsoid;if(!c(t.attributes)||!c(t.attributes.position3DHigh))return c(t.rectangle)?t.rectangle:void 0;let i=t.attributes.position3DHigh.values,o=t.attributes.position3DLow.values,r=i.length,s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.NEGATIVE_INFINITY;for(let h=0;h<r;h+=3){let m=d.unpack(i,h,WPe),p=d.unpack(o,h,qPe),_=d.add(m,p,YPe),b=n.cartesianToCartographic(_,XPe),x=b.latitude,T=b.longitude;s=Math.min(s,x),a=Math.min(a,T),l=Math.max(l,x),u=Math.max(u,T)}let f=KPe;return f.north=l,f.south=s,f.east=u,f.west=a,f}function $Pe(e,t,n){let i=ai.getMinimumMaximumHeights(t,n);e._minTerrainHeight=i.minimumTerrainHeight,e._maxTerrainHeight=i.maximumTerrainHeight}function ZPe(e,t,n){let i=t.mapProjection.ellipsoid,o=YM(t,n),r=wn.fromRectangle(o,e._minHeight,e._maxHeight,i);if(e._boundingVolumes.push(r),!t.scene3DOnly){let s=t.mapProjection,a=ne.fromRectangleWithHeights2D(o,s,e._maxHeight,e._minHeight);d.fromElements(a.center.z,a.center.x,a.center.y,a.center),e._boundingVolumes2D.push(a)}}function q8(e,t){return Math.floor(e%t/2)}function Y8(e,t,n,i,o,r,s){let a=e._primitive;n.mode!==J.SCENE3D&&t.shaderProgram===a._spColor&&a._needs2DShader&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=i,t.boundingVolume=r,t.cull=o,t.debugShowBoundingVolume=s,n.commandList.push(t)}function FQ(e,t,n,i,o,r){let s=e._primitive;n.mode!==J.SCENE3D&&t.shaderProgram===s._spPick&&s._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=i,t.boundingVolume=r,t.cull=o,n.commandList.push(t)}function JPe(e,t,n,i,o,r,s,a){let l;t.mode===J.SCENE3D?l=e._boundingVolumes:l=e._boundingVolumes2D;let u=e.classificationType,f=u!==Ln.CESIUM_3D_TILE,h=u!==Ln.TERRAIN,m=t.passes,p=e._primitive,_,b,x;if(m.render){let T=n.length;for(_=0;_<T;++_)b=l[q8(_,T)],f&&(x=n[_],Y8(e,x,t,o,r,b,s)),h&&(x=n[_].derivedCommands.tileset,Y8(e,x,t,o,r,b,s));if(t.invertClassification){let E=p._commandsIgnoreShow,S=E.length;for(_=0;_<S;++_)b=l[_],x=E[_],Y8(e,x,t,o,r,b,s)}}if(m.pick){let T=i.length,E;for(e._useFragmentCulling||(E=p._primitive._pickOffsets),_=0;_<T;++_){if(b=l[q8(_,T)],!e._useFragmentCulling){let S=E[q8(_,T)];b=l[S.index]}f&&(x=i[_],FQ(e,x,t,o,r,b)),h&&(x=i[_].derivedCommands.tileset,FQ(e,x,t,o,r,b))}}}Xc.initializeTerrainHeights=function(){return ai.initialize()};Xc.prototype.update=function(e){if(!c(this._primitive)&&!c(this.geometryInstances))return;if(!ai.initialized){if(!this.asynchronous)throw new w("For synchronous GroundPrimitives, you must call GroundPrimitive.initializeTerrainHeights() and wait for the returned promise to resolve.");Xc.initializeTerrainHeights();return}let t=this,n=this._classificationPrimitiveOptions;if(!c(this._primitive)){let i=e.mapProjection.ellipsoid,o,r,s,a=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],l=a.length,u=new Array(l),f,h;for(f=0;f<l;++f){o=a[f],r=o.geometry;let b=YM(e,r);c(h)?c(b)&&te.union(h,b,h):h=te.clone(b);let x=o.id;if(c(x)&&c(b)){let T=ai.getBoundingSphere(b,i);this._boundingSpheresKeys.push(x),this._boundingSpheres.push(T)}if(s=r.constructor,!c(s)||!c(s.createShadowVolume))throw new w("Not all of the geometry instances have GroundPrimitive support.")}$Pe(this,h,i);let m=e.verticalExaggeration,p=e.verticalExaggerationRelativeHeight;this._minHeight=Cr.getHeight(this._minTerrainHeight,m,p),this._maxHeight=Cr.getHeight(this._maxTerrainHeight,m,p);let _=Xc._supportsMaterials(e.context);if(this._useFragmentCulling=_,_){let b,x=!0;for(f=0;f<l;++f)if(o=a[f],r=o.geometry,h=YM(e,r),Nu.shouldUseSphericalCoordinates(h)){x=!1;break}for(f=0;f<l;++f){o=a[f],r=o.geometry,s=r.constructor;let T=YM(e,r),E=r.textureCoordinateRotationPoints;x?b=Nu.getPlanarTextureCoordinateAttributes(T,E,i,e.mapProjection,this._maxHeight):b=Nu.getSphericalExtentGeometryInstanceAttributes(T,E,i,e.mapProjection);let S=o.attributes;for(let A in S)S.hasOwnProperty(A)&&(b[A]=S[A]);u[f]=new wt({geometry:s.createShadowVolume(r,NQ(this),LQ(this)),attributes:b,id:o.id})}}else for(f=0;f<l;++f)o=a[f],r=o.geometry,s=r.constructor,u[f]=new wt({geometry:s.createShadowVolume(r,NQ(this),LQ(this)),attributes:o.attributes,id:o.id});n.geometryInstances=u,n.appearance=this.appearance,n._createBoundingVolumeFunction=function(b,x){ZPe(t,b,x)},n._updateAndQueueCommandsFunction=function(b,x,T,E,S,A,v,D){JPe(t,x,T,E,S,A,v,D)},this._primitive=new PS(n)}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{!this._ready&&c(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};Xc.prototype.getBoundingSphere=function(e){let t=this._boundingSpheresKeys.indexOf(e);if(t!==-1)return this._boundingSpheres[t]};Xc.prototype.getGeometryInstanceAttributes=function(e){if(!c(this._primitive))throw new w("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)};Xc.prototype.isDestroyed=function(){return!1};Xc.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),ue(this)};Xc._supportsMaterials=function(e){return e.depthTexture};Xc.supportsMaterials=function(e){return C.typeOf.object("scene",e),Xc._supportsMaterials(e.frameState.context)};var Kc=Xc;function rT(){w.throwInstantiationError()}Object.defineProperties(rT.prototype,{isConstant:{get:w.throwInstantiationError},definitionChanged:{get:w.throwInstantiationError}});rT.prototype.getType=w.throwInstantiationError;rT.prototype.getValue=w.throwInstantiationError;rT.prototype.equals=w.throwInstantiationError;var QPe=new K;rT.getValue=function(e,t,n){let i;return c(e)||(e=K.now(QPe)),c(t)&&(i=t.getType(e),c(i))?((!c(n)||n.type!==i)&&(n=Vi.fromType(i)),t.getValue(e,n.uniforms),n):((!c(n)||n.type!==Vi.ColorType)&&(n=Vi.fromType(Vi.ColorType)),z.clone(z.WHITE,n.uniforms.color),n)};var $o=rT;function db(e,t,n){C.defined("geometryUpdater",e),C.defined("primitives",t),C.defined("orderedGroundPrimitives",n),this._primitives=t,this._orderedGroundPrimitives=n,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=e,this._options=e._options,this._entity=e._entity,this._material=void 0}db.prototype._isHidden=function(e,t,n){return!e.isShowing||!e.isAvailable(n)||!G.getValueOrDefault(t.show,n,!0)};db.prototype._setOptions=w.throwInstantiationError;db.prototype.update=function(e){C.defined("time",e);let t=this._geometryUpdater,n=t._onTerrain,i=this._primitives,o=this._orderedGroundPrimitives;n?o.remove(this._primitive):(i.removeAndDestroy(this._primitive),i.removeAndDestroy(this._outlinePrimitive),this._outlinePrimitive=void 0),this._primitive=void 0;let r=this._entity,s=r[this._geometryUpdater._geometryPropertyName];if(this._setOptions(r,s,e),this._isHidden(r,s,e))return;let a=this._geometryUpdater.shadowsProperty.getValue(e),l=this._options;if(!c(s.fill)||s.fill.getValue(e)){let u=t.fillMaterialProperty,f=u instanceof Ut,h,m=t._getIsClosed(l);if(f)h=new nn({closed:m,flat:n&&!t._supportsMaterialsforEntitiesOnTerrain});else{let p=$o.getValue(e,u,this._material);this._material=p,h=new eo({material:p,translucent:p.isTranslucent(),closed:m})}if(n)l.vertexFormat=nn.VERTEX_FORMAT,this._primitive=o.add(new Kc({geometryInstances:this._geometryUpdater.createFillGeometryInstance(e),appearance:h,asynchronous:!1,shadows:a,classificationType:this._geometryUpdater.classificationTypeProperty.getValue(e)}),G.getValueOrUndefined(this._geometryUpdater.zIndex,e));else{l.vertexFormat=h.vertexFormat;let p=this._geometryUpdater.createFillGeometryInstance(e);f&&(h.translucent=p.attributes.color.value[3]!==255),this._primitive=i.add(new An({geometryInstances:p,appearance:h,asynchronous:!1,shadows:a}))}}if(!n&&c(s.outline)&&s.outline.getValue(e)){let u=this._geometryUpdater.createOutlineGeometryInstance(e),f=G.getValueOrDefault(s.outlineWidth,e,1);this._outlinePrimitive=i.add(new An({geometryInstances:u,appearance:new nn({flat:!0,translucent:u.attributes.color.value[3]!==255,renderState:{lineWidth:t._scene.clampLineWidth(f)}}),asynchronous:!1,shadows:a}))}};db.prototype.getBoundingSphere=function(e){if(!c(e))throw new w("result is required.");let t=this._entity,n=this._primitive,i=this._outlinePrimitive,o;return c(n)&&n.show&&n.ready&&(o=n.getGeometryInstanceAttributes(t),c(o)&&c(o.boundingSphere))?(ne.clone(o.boundingSphere,e),lt.DONE):c(i)&&i.show&&i.ready&&(o=i.getGeometryInstanceAttributes(t),c(o)&&c(o.boundingSphere))?(ne.clone(o.boundingSphere,e),lt.DONE):c(n)&&!n.ready||c(i)&&!i.ready?lt.PENDING:lt.FAILED};db.prototype.isDestroyed=function(){return!1};db.prototype.destroy=function(){let e=this._primitives,t=this._orderedGroundPrimitives;this._geometryUpdater._onTerrain?t.remove(this._primitive):e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),ue(this)};var Jn=db;var eRe={NONE:0,GEODESIC:1,RHUMB:2},jt=Object.freeze(eRe);var BQ=O.EPSILON10;function tRe(e,t,n,i){if(C.defined("equalsEpsilon",t),!c(e))return;n=g(n,!1);let o=c(i),r=e.length;if(r<2)return e;let s,a=e[0],l,u,f=0,h=-1;for(s=1;s<r;++s)l=e[s],t(a,l,BQ)?(c(u)||(u=e.slice(0,s),f=s-1,h=0),o&&i.push(s)):(c(u)&&(u.push(l),f=s,o&&(h=i.length)),a=l);return n&&t(e[0],e[r-1],BQ)&&(o&&(c(u)?i.splice(h,0,f):i.push(r-1)),c(u)?u.length-=1:u=e.slice(0,-1)),c(u)?u:e}var po=tRe;function nRe(e){let t=e._uSquared,n=e._ellipsoid.maximumRadius,i=e._ellipsoid.minimumRadius,o=(n-i)/n,r=Math.cos(e._startHeading),s=Math.sin(e._startHeading),a=(1-o)*Math.tan(e._start.latitude),l=1/Math.sqrt(1+a*a),u=l*a,f=Math.atan2(a,r),h=l*s,m=h*h,p=1-m,_=Math.sqrt(p),b=t/4,x=b*b,T=x*b,E=x*x,S=1+b-3*x/4+5*T/4-175*E/64,A=1-b+15*x/8-35*T/8,v=1-3*b+35*x/4,D=1-5*b,R=S*f-A*Math.sin(2*f)*b/2-v*Math.sin(4*f)*x/16-D*Math.sin(6*f)*T/48-Math.sin(8*f)*5*E/512,P=e._constants;P.a=n,P.b=i,P.f=o,P.cosineHeading=r,P.sineHeading=s,P.tanU=a,P.cosineU=l,P.sineU=u,P.sigma=f,P.sineAlpha=h,P.sineSquaredAlpha=m,P.cosineSquaredAlpha=p,P.cosineAlpha=_,P.u2Over4=b,P.u4Over16=x,P.u6Over64=T,P.u8Over256=E,P.a0=S,P.a1=A,P.a2=v,P.a3=D,P.distanceRatio=R}function iRe(e,t){return e*t*(4+e*(4-3*t))/16}function kQ(e,t,n,i,o,r,s){let a=iRe(e,n);return(1-a)*e*t*(i+a*o*(s+a*r*(2*s*s-1)))}function oRe(e,t,n,i,o,r,s){let a=(t-n)/t,l=r-i,u=Math.atan((1-a)*Math.tan(o)),f=Math.atan((1-a)*Math.tan(s)),h=Math.cos(u),m=Math.sin(u),p=Math.cos(f),_=Math.sin(f),b=h*p,x=h*_,T=m*_,E=m*p,S=l,A=O.TWO_PI,v=Math.cos(S),D=Math.sin(S),R,P,L,F,y;do{v=Math.cos(S),D=Math.sin(S);let $=x-E*v;L=Math.sqrt(p*p*D*D+$*$),P=T+b*v,R=Math.atan2(L,P);let ae;L===0?(ae=0,F=1):(ae=b*D/L,F=1-ae*ae),A=S,y=P-2*T/F,isFinite(y)||(y=0),S=l+kQ(a,ae,F,R,L,P,y)}while(Math.abs(S-A)>O.EPSILON12);let I=F*(t*t-n*n)/(n*n),M=1+I*(4096+I*(I*(320-175*I)-768))/16384,B=I*(256+I*(I*(74-47*I)-128))/1024,U=y*y,V=B*L*(y+B*(P*(2*U-1)-B*y*(4*L*L-3)*(4*U-3)/6)/4),W=n*M*(R-V),H=Math.atan2(p*D,x-E*v),X=Math.atan2(h*D,x*v-E);e._distance=W,e._startHeading=H,e._endHeading=X,e._uSquared=I}var rRe=new d,X8=new d;function UQ(e,t,n,i){let o=d.normalize(i.cartographicToCartesian(t,X8),rRe),r=d.normalize(i.cartographicToCartesian(n,X8),X8);C.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(d.angleBetween(o,r))-Math.PI),.0125),oRe(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude),e._start=re.clone(t,e._start),e._end=re.clone(n,e._end),e._start.height=0,e._end.height=0,nRe(e)}function RS(e,t,n){let i=g(n,Z.default);this._ellipsoid=i,this._start=new re,this._end=new re,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,c(e)&&c(t)&&UQ(this,e,t,i)}Object.defineProperties(RS.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return C.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return C.defined("distance",this._distance),this._startHeading}},endHeading:{get:function(){return C.defined("distance",this._distance),this._endHeading}}});RS.prototype.setEndPoints=function(e,t){C.defined("start",e),C.defined("end",t),UQ(this,e,t,this._ellipsoid)};RS.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)};RS.prototype.interpolateUsingSurfaceDistance=function(e,t){C.defined("distance",this._distance);let n=this._constants,i=n.distanceRatio+e/n.b,o=Math.cos(2*i),r=Math.cos(4*i),s=Math.cos(6*i),a=Math.sin(2*i),l=Math.sin(4*i),u=Math.sin(6*i),f=Math.sin(8*i),h=i*i,m=i*h,p=n.u8Over256,_=n.u2Over4,b=n.u6Over64,x=n.u4Over16,T=2*m*p*o/3+i*(1-_+7*x/4-15*b/4+579*p/64-(x-15*b/4+187*p/16)*o-(5*b/4-115*p/16)*r-29*p*s/16)+(_/2-x+71*b/32-85*p/16)*a+(5*x/16-5*b/4+383*p/96)*l-h*((b-11*p/2)*a+5*p*l/2)+(29*b/96-29*p/16)*u+539*p*f/1536,E=Math.asin(Math.sin(T)*n.cosineAlpha),S=Math.atan(n.a/n.b*Math.tan(E));T=T-n.sigma;let A=Math.cos(2*n.sigma+T),v=Math.sin(T),D=Math.cos(T),R=n.cosineU*D,P=n.sineU*v,F=Math.atan2(v*n.sineHeading,R-P*n.cosineHeading)-kQ(n.f,n.sineAlpha,n.cosineSquaredAlpha,T,v,D,A);return c(t)?(t.longitude=this._start.longitude+F,t.latitude=S,t.height=0,t):new re(this._start.longitude+F,S,0)};var C_=RS;function $8(e,t,n){if(e===0)return t*n;let i=e*e,o=i*i,r=o*i,s=r*i,a=s*i,l=a*i,u=n,f=Math.sin(2*u),h=Math.sin(4*u),m=Math.sin(6*u),p=Math.sin(8*u),_=Math.sin(10*u),b=Math.sin(12*u);return t*((1-i/4-3*o/64-5*r/256-175*s/16384-441*a/65536-4851*l/1048576)*u-(3*i/8+3*o/32+45*r/1024+105*s/4096+2205*a/131072+6237*l/524288)*f+(15*o/256+45*r/1024+525*s/16384+1575*a/65536+155925*l/8388608)*h-(35*r/3072+175*s/12288+3675*a/262144+13475*l/1048576)*m+(315*s/131072+2205*a/524288+43659*l/8388608)*p-(693*a/1310720+6237*l/5242880)*_+1001*l/8388608*b)}function sRe(e,t,n){let i=e/n;if(t===0)return i;let o=i*i,r=o*i,s=r*i,a=t,l=a*a,u=l*l,f=u*l,h=f*l,m=h*l,p=m*l,_=Math.sin(2*i),b=Math.cos(2*i),x=Math.sin(4*i),T=Math.cos(4*i),E=Math.sin(6*i),S=Math.cos(6*i),A=Math.sin(8*i),v=Math.cos(8*i),D=Math.sin(10*i),R=Math.cos(10*i),P=Math.sin(12*i);return i+i*l/4+7*i*u/64+15*i*f/256+579*i*h/16384+1515*i*m/65536+16837*i*p/1048576+(3*i*u/16+45*i*f/256-i*(32*o-561)*h/4096-i*(232*o-1677)*m/16384+i*(399985-90560*o+512*s)*p/5242880)*b+(21*i*f/256+483*i*h/4096-i*(224*o-1969)*m/16384-i*(33152*o-112599)*p/1048576)*T+(151*i*h/4096+4681*i*m/65536+1479*i*p/16384-453*r*p/32768)*S+(1097*i*m/65536+42783*i*p/1048576)*v+8011*i*p/1048576*R+(3*l/8+3*u/16+213*f/2048-3*o*f/64+255*h/4096-33*o*h/512+20861*m/524288-33*o*m/512+s*m/1024+28273*p/1048576-471*o*p/8192+9*s*p/4096)*_+(21*u/256+21*f/256+533*h/8192-21*o*h/512+197*m/4096-315*o*m/4096+584039*p/16777216-12517*o*p/131072+7*s*p/2048)*x+(151*f/6144+151*h/4096+5019*m/131072-453*o*m/16384+26965*p/786432-8607*o*p/131072)*E+(1097*h/131072+1097*m/65536+225797*p/10485760-1097*o*p/65536)*A+(8011*m/2621440+8011*p/1048576)*D+293393*p/251658240*P}function sT(e,t){if(e===0)return Math.log(Math.tan(.5*(O.PI_OVER_TWO+t)));let n=e*Math.sin(t);return Math.log(Math.tan(.5*(O.PI_OVER_TWO+t)))-e/2*Math.log((1+n)/(1-n))}function aRe(e,t,n,i,o){let r=sT(e._ellipticity,n),s=sT(e._ellipticity,o);return Math.atan2(O.negativePiToPi(i-t),s-r)}function cRe(e,t,n,i,o,r,s){let a=e._heading,l=r-i,u=0;if(O.equalsEpsilon(Math.abs(a),O.PI_OVER_TWO,O.EPSILON8))if(t===n)u=t*Math.cos(o)*O.negativePiToPi(l);else{let f=Math.sin(o);u=t*Math.cos(o)*O.negativePiToPi(l)/Math.sqrt(1-e._ellipticitySquared*f*f)}else{let f=$8(e._ellipticity,t,o);u=($8(e._ellipticity,t,s)-f)/Math.cos(a)}return Math.abs(u)}var lRe=new d,K8=new d;function zQ(e,t,n,i){let o=d.normalize(i.cartographicToCartesian(t,K8),lRe),r=d.normalize(i.cartographicToCartesian(n,K8),K8);C.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(d.angleBetween(o,r))-Math.PI),.0125);let s=i.maximumRadius,a=i.minimumRadius,l=s*s,u=a*a;e._ellipticitySquared=(l-u)/l,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=re.clone(t,e._start),e._start.height=0,e._end=re.clone(n,e._end),e._end.height=0,e._heading=aRe(e,t.longitude,t.latitude,n.longitude,n.latitude),e._distance=cRe(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude)}function VQ(e,t,n,i,o,r){if(n===0)return re.clone(e,r);let s=o*o,a,l,u;if(Math.abs(O.PI_OVER_TWO-Math.abs(t))>O.EPSILON8){let f=$8(o,i,e.latitude),h=n*Math.cos(t),m=f+h;if(l=sRe(m,o,i),Math.abs(t)<O.EPSILON10)a=O.negativePiToPi(e.longitude);else{let p=sT(o,e.latitude),_=sT(o,l);u=Math.tan(t)*(_-p),a=O.negativePiToPi(e.longitude+u)}}else{l=e.latitude;let f;if(o===0)f=i*Math.cos(e.latitude);else{let h=Math.sin(e.latitude);f=i*Math.cos(e.latitude)/Math.sqrt(1-s*h*h)}u=n/f,t>0?a=O.negativePiToPi(e.longitude+u):a=O.negativePiToPi(e.longitude-u)}return c(r)?(r.longitude=a,r.latitude=l,r.height=0,r):new re(a,l,0)}function zm(e,t,n){let i=g(n,Z.default);this._ellipsoid=i,this._start=new re,this._end=new re,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,c(e)&&c(t)&&zQ(this,e,t,i)}Object.defineProperties(zm.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return C.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return C.defined("distance",this._distance),this._heading}}});zm.fromStartHeadingDistance=function(e,t,n,i,o){C.defined("start",e),C.defined("heading",t),C.defined("distance",n),C.typeOf.number.greaterThan("distance",n,0);let r=g(i,Z.default),s=r.maximumRadius,a=r.minimumRadius,l=s*s,u=a*a,f=Math.sqrt((l-u)/l);t=O.negativePiToPi(t);let h=VQ(e,t,n,r.maximumRadius,f);return!c(o)||c(i)&&!i.equals(o.ellipsoid)?new zm(e,h,r):(o.setEndPoints(e,h),o)};zm.prototype.setEndPoints=function(e,t){C.defined("start",e),C.defined("end",t),zQ(this,e,t,this._ellipsoid)};zm.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)};zm.prototype.interpolateUsingSurfaceDistance=function(e,t){if(C.typeOf.number("distance",e),!c(this._distance)||this._distance===0)throw new w("EllipsoidRhumbLine must have distinct start and end set.");return VQ(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)};zm.prototype.findIntersectionWithLongitude=function(e,t){if(C.typeOf.number("intersectionLongitude",e),!c(this._distance)||this._distance===0)throw new w("EllipsoidRhumbLine must have distinct start and end set.");let n=this._ellipticity,i=this._heading,o=Math.abs(i),r=this._start;if(e=O.negativePiToPi(e),O.equalsEpsilon(Math.abs(e),Math.PI,O.EPSILON14)&&(e=O.sign(r.longitude)*Math.PI),c(t)||(t=new re),Math.abs(O.PI_OVER_TWO-o)<=O.EPSILON8)return t.longitude=e,t.latitude=r.latitude,t.height=0,t;if(O.equalsEpsilon(Math.abs(O.PI_OVER_TWO-o),O.PI_OVER_TWO,O.EPSILON8))return O.equalsEpsilon(e,r.longitude,O.EPSILON12)?void 0:(t.longitude=e,t.latitude=O.PI_OVER_TWO*O.sign(O.PI_OVER_TWO-i),t.height=0,t);let s=r.latitude,a=n*Math.sin(s),l=Math.tan(.5*(O.PI_OVER_TWO+s))*Math.exp((e-r.longitude)/Math.tan(i)),u=(1+a)/(1-a),f=r.latitude,h;do{h=f;let m=n*Math.sin(h),p=(1+m)/(1-m);f=2*Math.atan(l*Math.pow(p/u,n/2))-O.PI_OVER_TWO}while(!O.equalsEpsilon(f,h,O.EPSILON12));return t.longitude=e,t.latitude=f,t.height=0,t};zm.prototype.findIntersectionWithLatitude=function(e,t){if(C.typeOf.number("intersectionLatitude",e),!c(this._distance)||this._distance===0)throw new w("EllipsoidRhumbLine must have distinct start and end set.");let n=this._ellipticity,i=this._heading,o=this._start;if(O.equalsEpsilon(Math.abs(i),O.PI_OVER_TWO,O.EPSILON8))return;let r=sT(n,o.latitude),s=sT(n,e),a=Math.tan(i)*(s-r),l=O.negativePiToPi(o.longitude+a);return c(t)?(t.longitude=l,t.latitude=e,t.height=0,t):new re(l,e,0)};var Pa=zm;var oj=[Ei,Si],uRe=oj.length,aee=Math.cos(O.toRadians(30)),HQ=Math.cos(O.toRadians(150)),cee=0,lee=1e3;function w_(e){e=g(e,g.EMPTY_OBJECT);let t=e.positions;if(!c(t)||t.length<2)throw new w("At least two positions are required.");if(c(e.arcType)&&e.arcType!==jt.GEODESIC&&e.arcType!==jt.RHUMB)throw new w("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=g(e.width,1),this._positions=t,this.granularity=g(e.granularity,9999),this.loop=g(e.loop,!1),this.arcType=g(e.arcType,jt.GEODESIC),this._ellipsoid=Z.default,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(w_.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+Z.packedLength+1+1}}});w_.setProjectionAndEllipsoid=function(e,t){let n=0;for(let i=0;i<uRe;i++)if(t instanceof oj[i]){n=i;break}e._projectionIndex=n,e._ellipsoid=t.ellipsoid};var fRe=new d,GQ=new d,jQ=new d;function ij(e,t,n,i,o){let r=uc(i,e,0,fRe),s=uc(i,e,n,GQ),a=uc(i,t,0,jQ),l=Vm(s,r,GQ),u=Vm(a,r,jQ);return d.cross(u,l,o),d.normalize(o,o)}var dRe=new re,hRe=new d,mRe=new d,pRe=new d;function Z8(e,t,n,i,o,r,s,a,l,u,f){if(o===0)return;let h;r===jt.GEODESIC?h=new C_(e,t,s):r===jt.RHUMB&&(h=new Pa(e,t,s));let m=h.surfaceDistance;if(m<o)return;let p=ij(e,t,i,s,pRe),_=Math.ceil(m/o),b=m/_,x=b,T=_-1,E=a.length;for(let S=0;S<T;S++){let A=h.interpolateUsingSurfaceDistance(x,dRe),v=uc(s,A,n,hRe),D=uc(s,A,i,mRe);d.pack(p,a,E),d.pack(v,l,E),d.pack(D,u,E),f.push(A.latitude),f.push(A.longitude),E+=3,x+=b}}var J8=new re;function uc(e,t,n,i){return re.clone(t,J8),J8.height=n,re.toCartesian(J8,e,i)}w_.pack=function(e,t,n){C.typeOf.object("value",e),C.defined("array",t);let i=g(n,0),o=e._positions,r=o.length;t[i++]=r;for(let s=0;s<r;++s){let a=o[s];d.pack(a,t,i),i+=3}return t[i++]=e.granularity,t[i++]=e.loop?1:0,t[i++]=e.arcType,Z.pack(e._ellipsoid,t,i),i+=Z.packedLength,t[i++]=e._projectionIndex,t[i++]=e._scene3DOnly?1:0,t};w_.unpack=function(e,t,n){C.defined("array",e);let i=g(t,0),o=e[i++],r=new Array(o);for(let m=0;m<o;m++)r[m]=d.unpack(e,i),i+=3;let s=e[i++],a=e[i++]===1,l=e[i++],u=Z.unpack(e,i);i+=Z.packedLength;let f=e[i++],h=e[i++]===1;return c(n)||(n=new w_({positions:r})),n._positions=r,n.granularity=s,n.loop=a,n.arcType=l,n._ellipsoid=u,n._projectionIndex=f,n._scene3DOnly=h,n};function Vm(e,t,n){return d.subtract(e,t,n),d.normalize(n,n),n}function WQ(e,t,n,i){return i=Vm(e,t,i),i=d.cross(i,n,i),i=d.normalize(i,i),i=d.cross(n,i,i),i}var _Re=new d,gRe=new d,yRe=new d,uee=new d,bRe=0,xRe=-1;function Q8(e,t,n,i,o){let r=Vm(n,t,uee),s=WQ(e,t,r,_Re),a=WQ(i,t,r,gRe);if(O.equalsEpsilon(d.dot(s,a),xRe,O.EPSILON5))return o=d.cross(r,s,o),o=d.normalize(o,o),o;o=d.add(a,s,o),o=d.normalize(o,o);let l=d.cross(r,o,yRe);return d.dot(a,l)<bRe&&(o=d.negate(o,o)),o}var ZM=on.fromPointNormal(d.ZERO,d.UNIT_Y),TRe=new d,CRe=new d,ERe=new d,wRe=new d,SRe=new d,XM=new d,KM=new re,qQ=new re,YQ=new re;w_.createGeometry=function(e){let t=!e._scene3DOnly,n=e.loop,i=e._ellipsoid,o=e.granularity,r=e.arcType,s=new oj[e._projectionIndex](i),a=cee,l=lee,u,f,h=e._positions,m=h.length;m===2&&(n=!1);let p,_,b,x,T=new Pa(void 0,void 0,i),E,S,A,v=[h[0]];for(f=0;f<m-1;f++)p=h[f],_=h[f+1],E=Yn.lineSegmentPlane(p,_,ZM,XM),c(E)&&!d.equalsEpsilon(E,p,O.EPSILON7)&&!d.equalsEpsilon(E,_,O.EPSILON7)&&(e.arcType===jt.GEODESIC?v.push(d.clone(E)):e.arcType===jt.RHUMB&&(A=i.cartesianToCartographic(E,KM).longitude,b=i.cartesianToCartographic(p,KM),x=i.cartesianToCartographic(_,qQ),T.setEndPoints(b,x),S=T.findIntersectionWithLongitude(A,YQ),E=i.cartographicToCartesian(S,XM),c(E)&&!d.equalsEpsilon(E,p,O.EPSILON7)&&!d.equalsEpsilon(E,_,O.EPSILON7)&&v.push(d.clone(E)))),v.push(_);n&&(p=h[m-1],_=h[0],E=Yn.lineSegmentPlane(p,_,ZM,XM),c(E)&&!d.equalsEpsilon(E,p,O.EPSILON7)&&!d.equalsEpsilon(E,_,O.EPSILON7)&&(e.arcType===jt.GEODESIC?v.push(d.clone(E)):e.arcType===jt.RHUMB&&(A=i.cartesianToCartographic(E,KM).longitude,b=i.cartesianToCartographic(p,KM),x=i.cartesianToCartographic(_,qQ),T.setEndPoints(b,x),S=T.findIntersectionWithLongitude(A,YQ),E=i.cartographicToCartesian(S,XM),c(E)&&!d.equalsEpsilon(E,p,O.EPSILON7)&&!d.equalsEpsilon(E,_,O.EPSILON7)&&v.push(d.clone(E)))));let D=v.length,R=new Array(D);for(f=0;f<D;f++){let se=re.fromCartesian(v[f],i);se.height=0,R[f]=se}if(R=po(R,re.equalsEpsilon),D=R.length,D<2)return;let P=[],L=[],F=[],y=[],I=TRe,M=CRe,B=ERe,U=wRe,V=SRe,W=R[0],H=R[1],X=R[D-1];for(I=uc(i,X,a,I),U=uc(i,H,a,U),M=uc(i,W,a,M),B=uc(i,W,l,B),n?V=Q8(I,M,B,U,V):V=ij(W,H,l,i,V),d.pack(V,L,0),d.pack(M,F,0),d.pack(B,y,0),P.push(W.latitude),P.push(W.longitude),Z8(W,H,a,l,o,r,i,L,F,y,P),f=1;f<D-1;++f){I=d.clone(M,I),M=d.clone(U,M);let se=R[f];uc(i,se,l,B),uc(i,R[f+1],a,U),Q8(I,M,B,U,V),u=L.length,d.pack(V,L,u),d.pack(M,F,u),d.pack(B,y,u),P.push(se.latitude),P.push(se.longitude),Z8(R[f],R[f+1],a,l,o,r,i,L,F,y,P)}let $=R[D-1],ae=R[D-2];if(M=uc(i,$,a,M),B=uc(i,$,l,B),n){let se=R[0];I=uc(i,ae,a,I),U=uc(i,se,a,U),V=Q8(I,M,B,U,V)}else V=ij(ae,$,l,i,V);if(u=L.length,d.pack(V,L,u),d.pack(M,F,u),d.pack(B,y,u),P.push($.latitude),P.push($.longitude),n){for(Z8($,W,a,l,o,r,i,L,F,y,P),u=L.length,f=0;f<3;++f)L[u+f]=L[f],F[u+f]=F[f],y[u+f]=y[f];P.push(W.latitude),P.push(W.longitude)}return ZRe(n,s,F,y,L,P,t)};var ARe=new d,vRe=new q,DRe=new ve;function XQ(e,t,n,i){let o=Vm(n,t,ARe),r=d.dot(o,e);if(r>aee||r<HQ){let s=Vm(i,n,uee),a=r<HQ?O.PI_OVER_TWO:-O.PI_OVER_TWO,l=ve.fromAxisAngle(s,a,DRe),u=q.fromQuaternion(l,vRe);return q.multiplyByVector(u,e,e),!0}return!1}var KQ=new re,IRe=new d,$Q=new d;function MS(e,t,n,i,o){let r=re.toCartesian(t,e._ellipsoid,IRe),s=d.add(r,n,$Q),a=!1,l=e._ellipsoid,u=l.cartesianToCartographic(s,KQ);Math.abs(t.longitude-u.longitude)>O.PI_OVER_TWO&&(a=!0,s=d.subtract(r,n,$Q),u=l.cartesianToCartographic(s,KQ)),u.height=0;let f=e.project(u,o);return o=d.subtract(f,i,o),o.z=0,o=d.normalize(o,o),a&&d.negate(o,o),o}var ORe=new d,ZQ=new d;function JQ(e,t,n,i,o,r){let s=d.subtract(t,e,ORe);d.normalize(s,s);let a=n-cee,l=d.multiplyByScalar(s,a,ZQ);d.add(e,l,o);let u=i-lee;l=d.multiplyByScalar(s,u,ZQ),d.add(t,l,r)}var PRe=new d;function $M(e,t){let n=on.getPointDistance(ZM,e),i=on.getPointDistance(ZM,t),o=PRe;O.equalsEpsilon(n,0,O.EPSILON2)?(o=Vm(t,e,o),d.multiplyByScalar(o,O.EPSILON2,o),d.add(e,o,e)):O.equalsEpsilon(i,0,O.EPSILON2)&&(o=Vm(e,t,o),d.multiplyByScalar(o,O.EPSILON2,o),d.add(t,o,t))}function RRe(e,t){let n=Math.abs(e.longitude),i=Math.abs(t.longitude);if(O.equalsEpsilon(n,O.PI,O.EPSILON11)){let o=O.sign(t.longitude);return e.longitude=o*(n-O.EPSILON11),1}else if(O.equalsEpsilon(i,O.PI,O.EPSILON11)){let o=O.sign(e.longitude);return t.longitude=o*(i-O.EPSILON11),2}return 0}var fee=new re,dee=new re,QQ=new d,ej=new d,eee=new d,tee=new d,MRe=new d,nee=new d,LRe=[fee,dee],NRe=new te,FRe=new d,BRe=new d,kRe=new d,URe=new d,zRe=new d,VRe=new d,tj=new d,nj=new d,HRe=new d,GRe=new d,jRe=new d,iee=new d,WRe=new d,qRe=new d,YRe=new kn,XRe=new kn,oee=new d,KRe=new d,ree=new d,$Re=[new ne,new ne],hee=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],see=hee.length;function ZRe(e,t,n,i,o,r,s){let a,l,u=t._ellipsoid,f=n.length/3-1,h=f*8,m=h*4,p=f*36,_=h>65535?new Uint32Array(p):new Uint16Array(p),b=new Float64Array(h*3),x=new Float32Array(m),T=new Float32Array(m),E=new Float32Array(m),S=new Float32Array(m),A=new Float32Array(m),v,D,R,P;s&&(v=new Float32Array(m),D=new Float32Array(m),R=new Float32Array(m),P=new Float32Array(h*2));let L=r.length/2,F=0,y=fee;y.height=0;let I=dee;I.height=0;let M=QQ,B=ej;if(s)for(l=0,a=1;a<L;a++)y.latitude=r[l],y.longitude=r[l+1],I.latitude=r[l+2],I.longitude=r[l+3],M=t.project(y,M),B=t.project(I,B),F+=d.distance(M,B),l+=2;let U=i.length/3;B=d.unpack(i,0,B);let V=0;for(l=3,a=1;a<U;a++)M=d.clone(B,M),B=d.unpack(i,l,B),V+=d.distance(M,B),l+=3;let W;l=3;let H=0,X=0,$=0,ae=0,se=!1,he=d.unpack(n,0,tee),ge=d.unpack(i,0,ej),le=d.unpack(o,0,nee);if(e){let Ie=d.unpack(n,n.length-6,eee);XQ(le,Ie,he,ge)&&(le=d.negate(le,le))}let me=0,Me=0,Ge=0;for(a=0;a<f;a++){let Ie=d.clone(he,eee),Kt=d.clone(ge,QQ),Pt=d.clone(le,MRe);se&&(Pt=d.negate(Pt,Pt)),he=d.unpack(n,l,tee),ge=d.unpack(i,l,ej),le=d.unpack(o,l,nee),se=XQ(le,Ie,he,ge),y.latitude=r[H],y.longitude=r[H+1],I.latitude=r[H+2],I.longitude=r[H+3];let dt,rn,Vt,Ae;if(s){let Gn=RRe(y,I);dt=t.project(y,zRe),rn=t.project(I,VRe);let ts=Vm(rn,dt,oee);ts.y=Math.abs(ts.y),Vt=tj,Ae=nj,Gn===0||d.dot(ts,d.UNIT_Y)>aee?(Vt=MS(t,y,Pt,dt,tj),Ae=MS(t,I,le,rn,nj)):Gn===1?(Ae=MS(t,I,le,rn,nj),Vt.x=0,Vt.y=O.sign(y.longitude-Math.abs(I.longitude)),Vt.z=0):(Vt=MS(t,y,Pt,dt,tj),Ae.x=0,Ae.y=O.sign(y.longitude-I.longitude),Ae.z=0)}let Qe=d.distance(Kt,ge),et=kn.fromCartesian(Ie,YRe),at=d.subtract(he,Ie,HRe),$t=d.normalize(at,iee),pe=d.subtract(Kt,Ie,GRe);pe=d.normalize(pe,pe);let _e=d.cross($t,pe,iee);_e=d.normalize(_e,_e);let rt=d.cross(pe,Pt,WRe);rt=d.normalize(rt,rt);let Ri=d.subtract(ge,he,jRe);Ri=d.normalize(Ri,Ri);let ot=d.cross(le,Ri,qRe);ot=d.normalize(ot,ot);let uo=Qe/V,ir=me/V,Ja=0,gr,Vr,Le,it=0,We=0;if(s){Ja=d.distance(dt,rn),gr=kn.fromCartesian(dt,XRe),Vr=d.subtract(rn,dt,oee),Le=d.normalize(Vr,KRe);let Gn=Le.x;Le.x=Le.y,Le.y=-Gn,it=Ja/F,We=Me/F}for(W=0;W<8;W++){let Gn=ae+W*4,ts=X+W*2,yr=Gn+3,Bc=W<4?1:-1,fo=W===2||W===3||W===6||W===7?1:-1;d.pack(et.high,x,Gn),x[yr]=at.x,d.pack(et.low,T,Gn),T[yr]=at.y,d.pack(rt,E,Gn),E[yr]=at.z,d.pack(ot,S,Gn),S[yr]=uo*Bc,d.pack(_e,A,Gn);let Rr=ir*fo;Rr===0&&fo<0&&(Rr=9),A[yr]=Rr,s&&(v[Gn]=gr.high.x,v[Gn+1]=gr.high.y,v[Gn+2]=gr.low.x,v[Gn+3]=gr.low.y,R[Gn]=-Vt.y,R[Gn+1]=Vt.x,R[Gn+2]=Ae.y,R[Gn+3]=-Ae.x,D[Gn]=Vr.x,D[Gn+1]=Vr.y,D[Gn+2]=Le.x,D[Gn+3]=Le.y,P[ts]=it*Bc,Rr=We*fo,Rr===0&&fo<0&&(Rr=9),P[ts+1]=Rr)}let Ye=kRe,ct=URe,At=FRe,hn=BRe,ao=te.fromCartographicArray(LRe,NRe),Yo=ai.getMinimumMaximumHeights(ao,u),ya=Yo.minimumTerrainHeight,ba=Yo.maximumTerrainHeight;Ge+=Math.abs(ya),Ge+=Math.abs(ba),JQ(Ie,Kt,ya,ba,Ye,At),JQ(he,ge,ya,ba,ct,hn);let Hr=d.multiplyByScalar(_e,O.EPSILON5,ree);d.add(Ye,Hr,Ye),d.add(ct,Hr,ct),d.add(At,Hr,At),d.add(hn,Hr,hn),$M(Ye,ct),$M(At,hn),d.pack(Ye,b,$),d.pack(ct,b,$+3),d.pack(hn,b,$+6),d.pack(At,b,$+9),Hr=d.multiplyByScalar(_e,-2*O.EPSILON5,ree),d.add(Ye,Hr,Ye),d.add(ct,Hr,ct),d.add(At,Hr,At),d.add(hn,Hr,hn),$M(Ye,ct),$M(At,hn),d.pack(Ye,b,$+12),d.pack(ct,b,$+15),d.pack(hn,b,$+18),d.pack(At,b,$+21),H+=2,l+=3,X+=16,$+=24,ae+=32,me+=Qe,Me+=Ja}l=0;let De=0;for(a=0;a<f;a++){for(W=0;W<see;W++)_[l+W]=hee[W]+De;De+=8,l+=see}let ke=$Re;ne.fromVertices(n,d.ZERO,3,ke[0]),ne.fromVertices(i,d.ZERO,3,ke[1]);let He=ne.fromBoundingSpheres(ke);He.radius+=Ge/(f*2);let ft={position:new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,normalize:!1,values:b}),startHiAndForwardOffsetX:E_(x),startLoAndForwardOffsetY:E_(T),startNormalAndForwardOffsetZ:E_(E),endNormalAndTextureCoordinateNormalizationX:E_(S),rightNormalAndTextureCoordinateNormalizationY:E_(A)};return s&&(ft.startHiLo2D=E_(v),ft.offsetAndRight2D=E_(D),ft.startEndNormals2D=E_(R),ft.texcoordNormalization2D=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,normalize:!1,values:P})),new st({attributes:ft,indices:_,boundingSphere:He})}function E_(e){return new be({componentDatatype:j.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}w_._projectNormal=MS;var aT=w_;var JM=`in vec4 v_startPlaneNormalEcAndHalfWidth;
| in vec4 v_endPlaneNormalEcAndBatchId;
| in vec4 v_rightPlaneEC; // Technically can compute distance for this here
| in vec4 v_endEcAndStartEcX;
| in vec4 v_texcoordNormalizationAndStartEcYZ;
|
| #ifdef PER_INSTANCE_COLOR
| in vec4 v_color;
| #endif
|
| void main(void)
| {
| float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));
| vec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);
|
| // Discard for sky
| if (logDepthOrDepth == 0.0) {
| #ifdef DEBUG_SHOW_VOLUME
| out_FragColor = vec4(1.0, 0.0, 0.0, 0.5);
| return;
| #else // DEBUG_SHOW_VOLUME
| discard;
| #endif // DEBUG_SHOW_VOLUME
| }
|
| vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
| eyeCoordinate /= eyeCoordinate.w;
|
| float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);
| // Check distance of the eye coordinate against the right-facing plane
| float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);
|
| // Check eye coordinate against the mitering planes
| float distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);
| float distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);
|
| if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {
| #ifdef DEBUG_SHOW_VOLUME
| out_FragColor = vec4(1.0, 0.0, 0.0, 0.5);
| return;
| #else // DEBUG_SHOW_VOLUME
| discard;
| #endif // DEBUG_SHOW_VOLUME
| }
|
| // Check distance of the eye coordinate against start and end planes with normals in the right plane.
| // For computing unskewed lengthwise texture coordinate.
| // Can also be used for clipping extremely pointy miters, but in practice unnecessary because of miter breaking.
|
| // aligned plane: cross the right plane normal with miter plane normal, then cross the result with right again to point it more "forward"
| vec3 alignedPlaneNormal;
|
| // start aligned plane
| alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);
| alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));
| distanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);
|
| // end aligned plane
| alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);
| alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));
| distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);
|
| #ifdef PER_INSTANCE_COLOR
| out_FragColor = czm_gammaCorrect(v_color);
| #else // PER_INSTANCE_COLOR
| // Clamp - distance to aligned planes may be negative due to mitering,
| // so fragment texture coordinate might be out-of-bounds.
| float s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);
| s = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;
| float t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);
|
| czm_materialInput materialInput;
|
| materialInput.s = s;
| materialInput.st = vec2(s, t);
| materialInput.str = vec3(s, t, 0.0);
|
| czm_material material = czm_getMaterial(materialInput);
| out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
| #endif // PER_INSTANCE_COLOR
|
| // Premultiply alpha. Required for classification primitives on translucent globe.
| out_FragColor.rgb *= out_FragColor.a;
|
| czm_writeDepthClamp();
| }
| `;var QM=`in vec3 v_forwardDirectionEC;
| in vec3 v_texcoordNormalizationAndHalfWidth;
| in float v_batchId;
|
| #ifdef PER_INSTANCE_COLOR
| in vec4 v_color;
| #else
| in vec2 v_alignedPlaneDistances;
| in float v_texcoordT;
| #endif
|
| float rayPlaneDistanceUnsafe(vec3 origin, vec3 direction, vec3 planeNormal, float planeDistance) {
| // We don't expect the ray to ever be parallel to the plane
| return (-planeDistance - dot(planeNormal, origin)) / dot(planeNormal, direction);
| }
|
| void main(void)
| {
| vec4 eyeCoordinate = gl_FragCoord;
| eyeCoordinate /= eyeCoordinate.w;
|
| #ifdef PER_INSTANCE_COLOR
| out_FragColor = czm_gammaCorrect(v_color);
| #else // PER_INSTANCE_COLOR
| // Use distances for planes aligned with segment to prevent skew in dashing
| float distanceFromStart = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, -v_forwardDirectionEC, v_forwardDirectionEC.xyz, v_alignedPlaneDistances.x);
| float distanceFromEnd = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, v_forwardDirectionEC, -v_forwardDirectionEC.xyz, v_alignedPlaneDistances.y);
|
| // Clamp - distance to aligned planes may be negative due to mitering
| distanceFromStart = max(0.0, distanceFromStart);
| distanceFromEnd = max(0.0, distanceFromEnd);
|
| float s = distanceFromStart / (distanceFromStart + distanceFromEnd);
| s = (s * v_texcoordNormalizationAndHalfWidth.x) + v_texcoordNormalizationAndHalfWidth.y;
|
| czm_materialInput materialInput;
|
| materialInput.s = s;
| materialInput.st = vec2(s, v_texcoordT);
| materialInput.str = vec3(s, v_texcoordT, 0.0);
|
| czm_material material = czm_getMaterial(materialInput);
| out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
| #endif // PER_INSTANCE_COLOR
| }
| `;var eL=`in vec3 position3DHigh;
| in vec3 position3DLow;
|
| in vec4 startHiAndForwardOffsetX;
| in vec4 startLoAndForwardOffsetY;
| in vec4 startNormalAndForwardOffsetZ;
| in vec4 endNormalAndTextureCoordinateNormalizationX;
| in vec4 rightNormalAndTextureCoordinateNormalizationY;
| in vec4 startHiLo2D;
| in vec4 offsetAndRight2D;
| in vec4 startEndNormals2D;
| in vec2 texcoordNormalization2D;
|
| in float batchId;
|
| out vec3 v_forwardDirectionEC;
| out vec3 v_texcoordNormalizationAndHalfWidth;
| out float v_batchId;
|
| // For materials
| #ifdef WIDTH_VARYING
| out float v_width;
| #endif
| #ifdef ANGLE_VARYING
| out float v_polylineAngle;
| #endif
|
| #ifdef PER_INSTANCE_COLOR
| out vec4 v_color;
| #else
| out vec2 v_alignedPlaneDistances;
| out float v_texcoordT;
| #endif
|
| // Morphing planes using SLERP or NLERP doesn't seem to work, so instead draw the material directly on the shadow volume.
| // Morph views are from very far away and aren't meant to be used precisely, so this should be sufficient.
| void main()
| {
| v_batchId = batchId;
|
| // Start position
| vec4 posRelativeToEye2D = czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw));
| vec4 posRelativeToEye3D = czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz);
| vec4 posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);
| vec3 posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;
| vec3 posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;
| vec3 startEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;
|
| // Start plane
| vec4 startPlane2D;
| vec4 startPlane3D;
| startPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);
| startPlane3D.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;
| startPlane2D.w = -dot(startPlane2D.xyz, posEc2D);
| startPlane3D.w = -dot(startPlane3D.xyz, posEc3D);
|
| // Right plane
| vec4 rightPlane2D;
| vec4 rightPlane3D;
| rightPlane2D.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);
| rightPlane3D.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;
| rightPlane2D.w = -dot(rightPlane2D.xyz, posEc2D);
| rightPlane3D.w = -dot(rightPlane3D.xyz, posEc3D);
|
| // End position
| posRelativeToEye2D = posRelativeToEye2D + vec4(0.0, offsetAndRight2D.xy, 0.0);
| posRelativeToEye3D = posRelativeToEye3D + vec4(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w, 0.0);
| posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);
| posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;
| posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;
| vec3 endEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;
| vec3 forwardEc3D = czm_normal * normalize(vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w));
| vec3 forwardEc2D = czm_normal * normalize(vec3(0.0, offsetAndRight2D.xy));
|
| // End plane
| vec4 endPlane2D;
| vec4 endPlane3D;
| endPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);
| endPlane3D.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;
| endPlane2D.w = -dot(endPlane2D.xyz, posEc2D);
| endPlane3D.w = -dot(endPlane3D.xyz, posEc3D);
|
| // Forward direction
| v_forwardDirectionEC = normalize(endEC - startEC);
|
| vec2 cleanTexcoordNormalization2D;
| cleanTexcoordNormalization2D.x = abs(texcoordNormalization2D.x);
| cleanTexcoordNormalization2D.y = czm_branchFreeTernary(texcoordNormalization2D.y > 1.0, 0.0, abs(texcoordNormalization2D.y));
| vec2 cleanTexcoordNormalization3D;
| cleanTexcoordNormalization3D.x = abs(endNormalAndTextureCoordinateNormalizationX.w);
| cleanTexcoordNormalization3D.y = rightNormalAndTextureCoordinateNormalizationY.w;
| cleanTexcoordNormalization3D.y = czm_branchFreeTernary(cleanTexcoordNormalization3D.y > 1.0, 0.0, abs(cleanTexcoordNormalization3D.y));
|
| v_texcoordNormalizationAndHalfWidth.xy = mix(cleanTexcoordNormalization2D, cleanTexcoordNormalization3D, czm_morphTime);
|
| #ifdef PER_INSTANCE_COLOR
| v_color = czm_batchTable_color(batchId);
| #else // PER_INSTANCE_COLOR
| // For computing texture coordinates
|
| v_alignedPlaneDistances.x = -dot(v_forwardDirectionEC, startEC);
| v_alignedPlaneDistances.y = -dot(-v_forwardDirectionEC, endEC);
| #endif // PER_INSTANCE_COLOR
|
| #ifdef WIDTH_VARYING
| float width = czm_batchTable_width(batchId);
| float halfWidth = width * 0.5;
| v_width = width;
| v_texcoordNormalizationAndHalfWidth.z = halfWidth;
| #else
| float halfWidth = 0.5 * czm_batchTable_width(batchId);
| v_texcoordNormalizationAndHalfWidth.z = halfWidth;
| #endif
|
| // Compute a normal along which to "push" the position out, extending the miter depending on view distance.
| // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.
| // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.
| // Since this is morphing, compute both 3D and 2D positions and then blend.
|
| // ****** 3D ******
| // Check distance to the end plane and start plane, pick the plane that is closer
| vec4 positionEc3D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow); // w = 1.0, see czm_computePosition
| float absStartPlaneDistance = abs(czm_planeDistance(startPlane3D, positionEc3D.xyz));
| float absEndPlaneDistance = abs(czm_planeDistance(endPlane3D, positionEc3D.xyz));
| vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane3D.xyz, endPlane3D.xyz);
| vec3 upOrDown = normalize(cross(rightPlane3D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.
| vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.
|
| // Nudge the top vertex upwards to prevent flickering
| vec3 geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc3D));
| geodeticSurfaceNormal *= float(0.0 <= rightNormalAndTextureCoordinateNormalizationY.w && rightNormalAndTextureCoordinateNormalizationY.w <= 1.0);
| geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;
| positionEc3D.xyz += geodeticSurfaceNormal;
|
| // Determine if this vertex is on the "left" or "right"
| normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);
|
| // A "perfect" implementation would push along normals according to the angle against forward.
| // In practice, just pushing the normal out by halfWidth is sufficient for morph views.
| positionEc3D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc3D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)
|
| // ****** 2D ******
| // Check distance to the end plane and start plane, pick the plane that is closer
| vec4 positionEc2D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy); // w = 1.0, see czm_computePosition
| absStartPlaneDistance = abs(czm_planeDistance(startPlane2D, positionEc2D.xyz));
| absEndPlaneDistance = abs(czm_planeDistance(endPlane2D, positionEc2D.xyz));
| planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane2D.xyz, endPlane2D.xyz);
| upOrDown = normalize(cross(rightPlane2D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.
| normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.
|
| // Nudge the top vertex upwards to prevent flickering
| geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc2D));
| geodeticSurfaceNormal *= float(0.0 <= texcoordNormalization2D.y && texcoordNormalization2D.y <= 1.0);
| geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;
| positionEc2D.xyz += geodeticSurfaceNormal;
|
| // Determine if this vertex is on the "left" or "right"
| normalEC *= sign(texcoordNormalization2D.x);
| #ifndef PER_INSTANCE_COLOR
| // Use vertex's sidedness to compute its texture coordinate.
| v_texcoordT = clamp(sign(texcoordNormalization2D.x), 0.0, 1.0);
| #endif
|
| // A "perfect" implementation would push along normals according to the angle against forward.
| // In practice, just pushing the normal out by halfWidth is sufficient for morph views.
| positionEc2D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc2D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)
|
| // Blend for actual position
| gl_Position = czm_projection * mix(positionEc2D, positionEc3D, czm_morphTime);
|
| #ifdef ANGLE_VARYING
| // Approximate relative screen space direction of the line.
| vec2 approxLineDirection = normalize(vec2(v_forwardDirectionEC.x, -v_forwardDirectionEC.y));
| approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);
| v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);
| #endif
| }
| `;var tL=`in vec3 position3DHigh;
| in vec3 position3DLow;
|
| // In 2D and in 3D, texture coordinate normalization component signs encodes:
| // * X sign - sidedness relative to right plane
| // * Y sign - is negative OR magnitude is greater than 1.0 if vertex is on bottom of volume
| #ifndef COLUMBUS_VIEW_2D
| in vec4 startHiAndForwardOffsetX;
| in vec4 startLoAndForwardOffsetY;
| in vec4 startNormalAndForwardOffsetZ;
| in vec4 endNormalAndTextureCoordinateNormalizationX;
| in vec4 rightNormalAndTextureCoordinateNormalizationY;
| #else
| in vec4 startHiLo2D;
| in vec4 offsetAndRight2D;
| in vec4 startEndNormals2D;
| in vec2 texcoordNormalization2D;
| #endif
|
| in float batchId;
|
| out vec4 v_startPlaneNormalEcAndHalfWidth;
| out vec4 v_endPlaneNormalEcAndBatchId;
| out vec4 v_rightPlaneEC;
| out vec4 v_endEcAndStartEcX;
| out vec4 v_texcoordNormalizationAndStartEcYZ;
|
| // For materials
| #ifdef WIDTH_VARYING
| out float v_width;
| #endif
| #ifdef ANGLE_VARYING
| out float v_polylineAngle;
| #endif
|
| #ifdef PER_INSTANCE_COLOR
| out vec4 v_color;
| #endif
|
| void main()
| {
| #ifdef COLUMBUS_VIEW_2D
| vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw))).xyz;
|
| vec3 forwardDirectionEC = czm_normal * vec3(0.0, offsetAndRight2D.xy);
| vec3 ecEnd = forwardDirectionEC + ecStart;
| forwardDirectionEC = normalize(forwardDirectionEC);
|
| // Right plane
| v_rightPlaneEC.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);
| v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);
|
| // start plane
| vec4 startPlaneEC;
| startPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);
| startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);
|
| // end plane
| vec4 endPlaneEC;
| endPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);
| endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);
|
| v_texcoordNormalizationAndStartEcYZ.x = abs(texcoordNormalization2D.x);
| v_texcoordNormalizationAndStartEcYZ.y = texcoordNormalization2D.y;
|
| #else // COLUMBUS_VIEW_2D
| vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;
| vec3 offset = czm_normal * vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);
| vec3 ecEnd = ecStart + offset;
|
| vec3 forwardDirectionEC = normalize(offset);
|
| // start plane
| vec4 startPlaneEC;
| startPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;
| startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);
|
| // end plane
| vec4 endPlaneEC;
| endPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;
| endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);
|
| // Right plane
| v_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;
| v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);
|
| v_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);
| v_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;
|
| #endif // COLUMBUS_VIEW_2D
|
| v_endEcAndStartEcX.xyz = ecEnd;
| v_endEcAndStartEcX.w = ecStart.x;
| v_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;
|
| #ifdef PER_INSTANCE_COLOR
| v_color = czm_batchTable_color(batchId);
| #endif // PER_INSTANCE_COLOR
|
| // Compute a normal along which to "push" the position out, extending the miter depending on view distance.
| // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.
| // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.
| vec4 positionRelativeToEye = czm_computePosition();
|
| // Check distance to the end plane and start plane, pick the plane that is closer
| vec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye; // w = 1.0, see czm_computePosition
| float absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));
| float absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));
| vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);
| vec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.
| vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.
|
| // Extrude bottom vertices downward for far view distances, like for GroundPrimitives
| upOrDown = cross(forwardDirectionEC, normalEC);
| upOrDown = float(czm_sceneMode == czm_sceneMode3D) * upOrDown;
| upOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;
| upOrDown = min(GLOBE_MINIMUM_ALTITUDE, czm_geometricToleranceOverMeter * length(positionRelativeToEye.xyz)) * upOrDown;
| positionEC.xyz += upOrDown;
|
| v_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));
|
| // Determine distance along normalEC to push for a volume of appropriate width.
| // Make volumes about double pixel width for a conservative fit - in practice the
| // extra cost here is minimal compared to the loose volume heights.
| //
| // N = normalEC (guaranteed "right-facing")
| // R = rightEC
| // p = angle between N and R
| // w = distance to push along R if R == N
| // d = distance to push along N
| //
| // N R
| // { p| } * cos(p) = dot(N, R) = w / d
| // d | |w * d = w / dot(N, R)
| // { | }
| // o---------- polyline segment ---->
| //
| float width = czm_batchTable_width(batchId);
| #ifdef WIDTH_VARYING
| v_width = width;
| #endif
|
| v_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;
| v_startPlaneNormalEcAndHalfWidth.w = width * 0.5;
|
| v_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;
| v_endPlaneNormalEcAndBatchId.w = batchId;
|
| width = width * max(0.0, czm_metersPerPixel(positionEC)); // width = distance to push along R
| width = width / dot(normalEC, v_rightPlaneEC.xyz); // width = distance to push along N
|
| // Determine if this vertex is on the "left" or "right"
| #ifdef COLUMBUS_VIEW_2D
| normalEC *= sign(texcoordNormalization2D.x);
| #else
| normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);
| #endif
|
| positionEC.xyz += width * normalEC;
| gl_Position = czm_depthClamp(czm_projection * positionEC);
|
| #ifdef ANGLE_VARYING
| // Approximate relative screen space direction of the line.
| vec2 approxLineDirection = normalize(vec2(forwardDirectionEC.x, -forwardDirectionEC.y));
| approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);
| v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);
| #endif
| }
| `;var nL=`in vec3 position3DHigh;
| in vec3 position3DLow;
| in vec3 prevPosition3DHigh;
| in vec3 prevPosition3DLow;
| in vec3 nextPosition3DHigh;
| in vec3 nextPosition3DLow;
| in vec2 expandAndWidth;
| in vec4 color;
| in float batchId;
|
| out vec4 v_color;
|
| void main()
| {
| float expandDir = expandAndWidth.x;
| float width = abs(expandAndWidth.y) + 0.5;
| bool usePrev = expandAndWidth.y < 0.0;
|
| vec4 p = czm_computePosition();
| vec4 prev = czm_computePrevPosition();
| vec4 next = czm_computeNextPosition();
|
| float angle;
| vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);
| gl_Position = czm_viewportOrthographic * positionWC;
|
| v_color = color;
| }
| `;var Fu=`void clipLineSegmentToNearPlane(
| vec3 p0,
| vec3 p1,
| out vec4 positionWC,
| out bool clipped,
| out bool culledByNearPlane,
| out vec4 clippedPositionEC)
| {
| culledByNearPlane = false;
| clipped = false;
|
| vec3 p0ToP1 = p1 - p0;
| float magnitude = length(p0ToP1);
| vec3 direction = normalize(p0ToP1);
|
| // Distance that p0 is behind the near plane. Negative means p0 is
| // in front of the near plane.
| float endPoint0Distance = czm_currentFrustum.x + p0.z;
|
| // Camera looks down -Z.
| // When moving a point along +Z: LESS VISIBLE
| // * Points in front of the camera move closer to the camera.
| // * Points behind the camrea move farther away from the camera.
| // When moving a point along -Z: MORE VISIBLE
| // * Points in front of the camera move farther away from the camera.
| // * Points behind the camera move closer to the camera.
|
| // Positive denominator: -Z, becoming more visible
| // Negative denominator: +Z, becoming less visible
| // Nearly zero: parallel to near plane
| float denominator = -direction.z;
|
| if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)
| {
| // p0 is behind the near plane and the line to p1 is nearly parallel to
| // the near plane, so cull the segment completely.
| culledByNearPlane = true;
| }
| else if (endPoint0Distance > 0.0)
| {
| // p0 is behind the near plane, and the line to p1 is moving distinctly
| // toward or away from it.
|
| // t = (-plane distance - dot(plane normal, ray origin)) / dot(plane normal, ray direction)
| float t = endPoint0Distance / denominator;
| if (t < 0.0 || t > magnitude)
| {
| // Near plane intersection is not between the two points.
| // We already confirmed p0 is behind the naer plane, so now
| // we know the entire segment is behind it.
| culledByNearPlane = true;
| }
| else
| {
| // Segment crosses the near plane, update p0 to lie exactly on it.
| p0 = p0 + t * direction;
|
| // Numerical noise might put us a bit on the wrong side of the near plane.
| // Don't let that happen.
| p0.z = min(p0.z, -czm_currentFrustum.x);
|
| clipped = true;
| }
| }
|
| clippedPositionEC = vec4(p0, 1.0);
| positionWC = czm_eyeToWindowCoordinates(clippedPositionEC);
| }
|
| vec4 getPolylineWindowCoordinatesEC(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)
| {
| // expandDirection +1 is to the _left_ when looking from positionEC toward nextEC.
|
| #ifdef POLYLINE_DASH
| // Compute the window coordinates of the points.
| vec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);
| vec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);
| vec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);
|
| // Determine the relative screen space direction of the line.
| vec2 lineDir;
| if (usePrevious) {
| lineDir = normalize(positionWindow.xy - previousWindow.xy);
| }
| else {
| lineDir = normalize(nextWindow.xy - positionWindow.xy);
| }
| angle = atan(lineDir.x, lineDir.y) - 1.570796327; // precomputed atan(1,0)
|
| // Quantize the angle so it doesn't change rapidly between segments.
| angle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;
| #endif
|
| vec4 clippedPrevWC, clippedPrevEC;
| bool prevSegmentClipped, prevSegmentCulled;
| clipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);
|
| vec4 clippedNextWC, clippedNextEC;
| bool nextSegmentClipped, nextSegmentCulled;
| clipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);
|
| bool segmentClipped, segmentCulled;
| vec4 clippedPositionWC, clippedPositionEC;
| clipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);
|
| if (segmentCulled)
| {
| return vec4(0.0, 0.0, 0.0, 1.0);
| }
|
| vec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);
| vec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);
|
| // If a segment was culled, we can't use the corresponding direction
| // computed above. We should never see both of these be true without
| // \`segmentCulled\` above also being true.
| if (prevSegmentCulled)
| {
| directionToPrevWC = -directionToNextWC;
| }
| else if (nextSegmentCulled)
| {
| directionToNextWC = -directionToPrevWC;
| }
|
| vec2 thisSegmentForwardWC, otherSegmentForwardWC;
| if (usePrevious)
| {
| thisSegmentForwardWC = -directionToPrevWC;
| otherSegmentForwardWC = directionToNextWC;
| }
| else
| {
| thisSegmentForwardWC = directionToNextWC;
| otherSegmentForwardWC = -directionToPrevWC;
| }
|
| vec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);
|
| vec2 leftWC = thisSegmentLeftWC;
| float expandWidth = width * 0.5;
|
| // When lines are split at the anti-meridian, the position may be at the
| // same location as the next or previous position, and we need to handle
| // that to avoid producing NaNs.
| if (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))
| {
| vec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);
|
| vec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;
| float leftSumLength = length(leftSumWC);
| leftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);
|
| // The sine of the angle between the two vectors is given by the formula
| // |a x b| = |a||b|sin(theta)
| // which is
| // float sinAngle = length(cross(vec3(leftWC, 0.0), vec3(-thisSegmentForwardWC, 0.0)));
| // Because the z components of both vectors are zero, the x and y coordinate will be zero.
| // Therefore, the sine of the angle is just the z component of the cross product.
| vec2 u = -thisSegmentForwardWC;
| vec2 v = leftWC;
| float sinAngle = abs(u.x * v.y - u.y * v.x);
| expandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);
| }
|
| vec2 offset = leftWC * expandDirection * expandWidth * czm_pixelRatio;
| return vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (czm_projection * clippedPositionEC).w;
| }
|
| vec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)
| {
| vec4 positionEC = czm_modelViewRelativeToEye * position;
| vec4 prevEC = czm_modelViewRelativeToEye * previous;
| vec4 nextEC = czm_modelViewRelativeToEye * next;
| return getPolylineWindowCoordinatesEC(positionEC, prevEC, nextEC, expandDirection, width, usePrevious, angle);
| }
| `;var rj=`${Fu}
| ${nL}`,JRe=eT;sn.isInternetExplorer()||(rj=`#define CLIP_POLYLINE
| ${rj}`);function hb(e){e=g(e,g.EMPTY_OBJECT);let t=g(e.translucent,!0),n=!1,i=hb.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=g(e.vertexShaderSource,rj),this._fragmentShaderSource=g(e.fragmentShaderSource,JRe),this._renderState=$i.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=i}Object.defineProperties(hb.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}});hb.VERTEX_FORMAT=Ce.POSITION_ONLY;hb.prototype.getFragmentShaderSource=$i.prototype.getFragmentShaderSource;hb.prototype.isTranslucent=$i.prototype.isTranslucent;hb.prototype.getRenderState=$i.prototype.getRenderState;var qr=hb;var iL=`in vec3 position3DHigh;
| in vec3 position3DLow;
| in vec3 prevPosition3DHigh;
| in vec3 prevPosition3DLow;
| in vec3 nextPosition3DHigh;
| in vec3 nextPosition3DLow;
| in vec2 expandAndWidth;
| in vec2 st;
| in float batchId;
|
| out float v_width;
| out vec2 v_st;
| out float v_polylineAngle;
|
| void main()
| {
| float expandDir = expandAndWidth.x;
| float width = abs(expandAndWidth.y) + 0.5;
| bool usePrev = expandAndWidth.y < 0.0;
|
| vec4 p = czm_computePosition();
| vec4 prev = czm_computePrevPosition();
| vec4 next = czm_computeNextPosition();
|
| float angle;
| vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);
| gl_Position = czm_viewportOrthographic * positionWC;
|
| v_width = width;
| v_st.s = st.s;
| v_st.t = czm_writeNonPerspective(st.t, gl_Position.w);
| v_polylineAngle = angle;
| }
| `;var cT=`#ifdef VECTOR_TILE
| uniform vec4 u_highlightColor;
| #endif
|
| in vec2 v_st;
|
| void main()
| {
| czm_materialInput materialInput;
|
| vec2 st = v_st;
| st.t = czm_readNonPerspective(st.t, gl_FragCoord.w);
|
| materialInput.s = st.s;
| materialInput.st = st;
| materialInput.str = vec3(st, 0.0);
|
| czm_material material = czm_getMaterial(materialInput);
| out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
| #ifdef VECTOR_TILE
| out_FragColor *= u_highlightColor;
| #endif
|
| czm_writeLogDepth();
| }
| `;var sj=`${Fu}
| ${iL}`,QRe=cT;sn.isInternetExplorer()||(sj=`#define CLIP_POLYLINE
| ${sj}`);function mb(e){e=g(e,g.EMPTY_OBJECT);let t=g(e.translucent,!0),n=!1,i=mb.VERTEX_FORMAT;this.material=c(e.material)?e.material:Vi.fromType(Vi.ColorType),this.translucent=t,this._vertexShaderSource=g(e.vertexShaderSource,sj),this._fragmentShaderSource=g(e.fragmentShaderSource,QRe),this._renderState=$i.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=i}Object.defineProperties(mb.prototype,{vertexShaderSource:{get:function(){let e=this._vertexShaderSource;return this.material.shaderSource.search(/in\s+float\s+v_polylineAngle;/g)!==-1&&(e=`#define POLYLINE_DASH
| ${e}`),e}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}});mb.VERTEX_FORMAT=Ce.POSITION_AND_ST;mb.prototype.getFragmentShaderSource=$i.prototype.getFragmentShaderSource;mb.prototype.isTranslucent=$i.prototype.isTranslucent;mb.prototype.getRenderState=$i.prototype.getRenderState;var sa=mb;function Hm(e){e=g(e,g.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this._hasPerInstanceColors=!0;let t=e.appearance;c(t)||(t=new sa),this.appearance=t,this.show=g(e.show,!0),this.classificationType=g(e.classificationType,Ln.BOTH),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this._debugShowShadowVolume=g(e.debugShowShadowVolume,!1),this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:!1,interleave:g(e.interleave,!1),releaseGeometryInstances:g(e.releaseGeometryInstances,!0),allowPicking:g(e.allowPicking,!0),asynchronous:g(e.asynchronous,!0),compressVertices:!1,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0},this._zIndex=void 0,this._ready=!1,this._primitive=void 0,this._sp=void 0,this._sp2D=void 0,this._spMorph=void 0,this._renderState=mee(!1),this._renderState3DTiles=mee(!0),this._renderStateMorph=Fe.fromCache({cull:{enabled:!0,face:pi.FRONT},depthTest:{enabled:!0},blending:cn.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1})}Object.defineProperties(Hm.prototype,{interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},ready:{get:function(){return this._ready}},debugShowShadowVolume:{get:function(){return this._debugShowShadowVolume}}});Hm.initializeTerrainHeights=function(){return ai.initialize()};function e1e(e,t,n){let i=t.context,o=e._primitive,r=o._attributeLocations,s=o._batchTable.getVertexShaderCallback()(tL);s=An._appendShowToShader(o,s),s=An._appendDistanceDisplayConditionToShader(o,s),s=An._modifyShaderPosition(e,s,t.scene3DOnly);let a=o._batchTable.getVertexShaderCallback()(eL);a=An._appendShowToShader(o,a),a=An._appendDistanceDisplayConditionToShader(o,a),a=An._modifyShaderPosition(e,a,t.scene3DOnly);let l=o._batchTable.getVertexShaderCallback()(JM),u=[`GLOBE_MINIMUM_ALTITUDE ${t.mapProjection.ellipsoid.minimumRadius.toFixed(1)}`],f="",h="";c(n.material)?(h=c(n.material)?n.material.shaderSource:"",h.search(/in\s+float\s+v_polylineAngle;/g)!==-1&&u.push("ANGLE_VARYING"),h.search(/in\s+float\s+v_width;/g)!==-1&&u.push("WIDTH_VARYING")):f="PER_INSTANCE_COLOR",u.push(f);let m=e.debugShowShadowVolume?["DEBUG_SHOW_VOLUME",f]:[f],p=new Be({defines:u,sources:[s]}),_=new Be({defines:m,sources:[h,l]});e._sp=en.replaceCache({context:i,shaderProgram:o._sp,vertexShaderSource:p,fragmentShaderSource:_,attributeLocations:r});let b=i.shaderCache.getDerivedShaderProgram(e._sp,"2dColor");if(!c(b)){let T=new Be({defines:u.concat(["COLUMBUS_VIEW_2D"]),sources:[s]});b=i.shaderCache.createDerivedShaderProgram(e._sp,"2dColor",{context:i,shaderProgram:e._sp2D,vertexShaderSource:T,fragmentShaderSource:_,attributeLocations:r})}e._sp2D=b;let x=i.shaderCache.getDerivedShaderProgram(e._sp,"MorphColor");if(!c(x)){let T=new Be({defines:u.concat([`MAX_TERRAIN_HEIGHT ${ai._defaultMaxTerrainHeight.toFixed(1)}`]),sources:[a]});l=o._batchTable.getVertexShaderCallback()(QM);let E=new Be({defines:m,sources:[h,l]});x=i.shaderCache.createDerivedShaderProgram(e._sp,"MorphColor",{context:i,shaderProgram:e._spMorph,vertexShaderSource:T,fragmentShaderSource:E,attributeLocations:r})}e._spMorph=x}function mee(e){return Fe.fromCache({cull:{enabled:!0},blending:cn.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:Nn.EQUAL,frontOperation:{fail:ut.KEEP,zFail:ut.KEEP,zPass:ut.KEEP},backFunction:Nn.EQUAL,backOperation:{fail:ut.KEEP,zFail:ut.KEEP,zPass:ut.KEEP},reference:kt.CESIUM_3D_TILE_MASK,mask:kt.CESIUM_3D_TILE_MASK}})}function t1e(e,t,n,i,o,r){let s=e._primitive,a=s._va.length;o.length=a,r.length=a;let u=t instanceof qr?{}:n._uniforms,f=s._batchTable.getUniformMapCallback()(u);for(let h=0;h<a;h++){let m=s._va[h],p=o[h];c(p)||(p=o[h]=new Ke({owner:e,primitiveType:s._primitiveType})),p.vertexArray=m,p.renderState=e._renderState,p.shaderProgram=e._sp,p.uniformMap=f,p.pass=xe.TERRAIN_CLASSIFICATION,p.pickId="czm_batchTable_pickColor(v_endPlaneNormalEcAndBatchId.w)";let _=Ke.shallowClone(p,p.derivedCommands.tileset);_.renderState=e._renderState3DTiles,_.pass=xe.CESIUM_3D_TILE_CLASSIFICATION,p.derivedCommands.tileset=_;let b=Ke.shallowClone(p,p.derivedCommands.color2D);b.shaderProgram=e._sp2D,p.derivedCommands.color2D=b;let x=Ke.shallowClone(_,_.derivedCommands.color2D);x.shaderProgram=e._sp2D,_.derivedCommands.color2D=x;let T=Ke.shallowClone(p,p.derivedCommands.colorMorph);T.renderState=e._renderStateMorph,T.shaderProgram=e._spMorph,T.pickId="czm_batchTable_pickColor(v_batchId)",p.derivedCommands.colorMorph=T}}function pee(e,t,n,i,o,r,s){n.mode===J.MORPHING?t=t.derivedCommands.colorMorph:n.mode!==J.SCENE3D&&(t=t.derivedCommands.color2D),t.modelMatrix=i,t.boundingVolume=r,t.cull=o,t.debugShowBoundingVolume=s,n.commandList.push(t)}function n1e(e,t,n,i,o,r,s){let a=e._primitive;An._updateBoundingVolumes(a,t,o);let l;t.mode===J.SCENE3D?l=a._boundingSphereWC:t.mode===J.COLUMBUS_VIEW?l=a._boundingSphereCV:t.mode===J.SCENE2D&&c(a._boundingSphere2D)?l=a._boundingSphere2D:c(a._boundingSphereMorph)&&(l=a._boundingSphereMorph);let u=t.mode===J.MORPHING,f=e.classificationType,h=f!==Ln.CESIUM_3D_TILE,m=f!==Ln.TERRAIN&&!u,p,_=t.passes;if(_.render||_.pick&&a.allowPicking){let b=n.length;for(let x=0;x<b;++x){let T=l[x];h&&(p=n[x],pee(e,p,t,o,r,T,s)),m&&(p=n[x].derivedCommands.tileset,pee(e,p,t,o,r,T,s))}}}Hm.prototype.update=function(e){if(!c(this._primitive)&&!c(this.geometryInstances))return;if(!ai.initialized){if(!this.asynchronous)throw new w("For synchronous GroundPolylinePrimitives, you must call GroundPolylinePrimitives.initializeTerrainHeights() and wait for the returned promise to resolve.");Hm.initializeTerrainHeights();return}let t,n=this,i=this._primitiveOptions;if(!c(this._primitive)){let o=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],r=o.length,s=new Array(r),a;for(t=0;t<r;++t)if(a=o[t].attributes,!c(a)||!c(a.color)){this._hasPerInstanceColors=!1;break}for(t=0;t<r;++t){let l=o[t];a={};let u=l.attributes;for(let f in u)u.hasOwnProperty(f)&&(a[f]=u[f]);c(a.width)||(a.width=new lc({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,value:[l.geometry.width]})),l.geometry._scene3DOnly=e.scene3DOnly,aT.setProjectionAndEllipsoid(l.geometry,e.mapProjection),s[t]=new wt({geometry:l.geometry,attributes:a,id:l.id,pickPrimitive:n})}i.geometryInstances=s,i.appearance=this.appearance,i._createShaderProgramFunction=function(l,u,f){e1e(n,u,f)},i._createCommandsFunction=function(l,u,f,h,m,p,_){t1e(n,u,f,h,p,_)},i._updateAndQueueCommandsFunction=function(l,u,f,h,m,p,_,b){n1e(n,u,f,h,m,p,_)},this._primitive=new An(i)}if(this.appearance instanceof qr&&!this._hasPerInstanceColors)throw new w("All GeometryInstances must have color attributes to use PolylineColorAppearance with GroundPolylinePrimitive.");this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{!this._ready&&c(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};Hm.prototype.getGeometryInstanceAttributes=function(e){if(!c(this._primitive))throw new w("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)};Hm.isSupported=function(e){return e.frameState.context.depthTexture};Hm.prototype.isDestroyed=function(){return!1};Hm.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._sp2D=void 0,this._spMorph=void 0,ue(this)};var sh=Hm;var i1e=new k(1,1),o1e=!1,r1e=z.WHITE;function lT(e){e=g(e,g.EMPTY_OBJECT),this._definitionChanged=new fe,this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._transparent=void 0,this._transparentSubscription=void 0,this.image=e.image,this.repeat=e.repeat,this.color=e.color,this.transparent=e.transparent}Object.defineProperties(lT.prototype,{isConstant:{get:function(){return G.isConstant(this._image)&&G.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},image:oe("image"),repeat:oe("repeat"),color:oe("color"),transparent:oe("transparent")});lT.prototype.getType=function(e){return"Image"};var s1e=new K;lT.prototype.getValue=function(e,t){return c(e)||(e=K.now(s1e)),c(t)||(t={}),t.image=G.getValueOrUndefined(this._image,e),t.repeat=G.getValueOrClonedDefault(this._repeat,e,i1e,t.repeat),t.color=G.getValueOrClonedDefault(this._color,e,r1e,t.color),G.getValueOrDefault(this._transparent,e,o1e)&&(t.color.alpha=Math.min(.99,t.color.alpha)),t};lT.prototype.equals=function(e){return this===e||e instanceof lT&&G.equals(this._image,e._image)&&G.equals(this._repeat,e._repeat)&&G.equals(this._color,e._color)&&G.equals(this._transparent,e._transparent)};var pb=lT;function a1e(e){if(e instanceof z)return new Ut(e);if(typeof e=="string"||e instanceof Te||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement){let t=new pb;return t.image=e,t}throw new w(`Unable to infer material type: ${e}`)}function c1e(e,t){return oe(e,t,a1e)}var Ao=c1e;function LS(e){this._definitionChanged=new fe,this._show=void 0,this._showSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(LS.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:oe("show"),dimensions:oe("dimensions"),heightReference:oe("heightReference"),fill:oe("fill"),material:Ao("material"),outline:oe("outline"),outlineColor:oe("outlineColor"),outlineWidth:oe("outlineWidth"),shadows:oe("shadows"),distanceDisplayCondition:oe("distanceDisplayCondition")});LS.prototype.clone=function(e){return c(e)?(e.show=this.show,e.dimensions=this.dimensions,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new LS(this)};LS.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.show=g(this.show,e.show),this.dimensions=g(this.dimensions,e.dimensions),this.heightReference=g(this.heightReference,e.heightReference),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};var uT=LS;var l1e={FIXED:0,INERTIAL:1},Ni=Object.freeze(l1e);function fT(){w.throwInstantiationError()}Object.defineProperties(fT.prototype,{isConstant:{get:w.throwInstantiationError},definitionChanged:{get:w.throwInstantiationError},referenceFrame:{get:w.throwInstantiationError}});fT.prototype.getValue=w.throwInstantiationError;fT.prototype.getValueInReferenceFrame=w.throwInstantiationError;fT.prototype.equals=w.throwInstantiationError;var _ee=new q;fT.convertToReferenceFrame=function(e,t,n,i,o){if(!c(t))return t;if(c(o)||(o=new d),n===i)return d.clone(t,o);let r=Lt.computeIcrfToCentralBodyFixedMatrix(e,_ee);if(n===Ni.INERTIAL)return q.multiplyByVector(r,t,o);if(n===Ni.FIXED)return q.multiplyByVector(q.transpose(r,_ee),t,o)};var ah=fT;function _b(e,t){this._definitionChanged=new fe,this._value=d.clone(e),this._referenceFrame=g(t,Ni.FIXED)}Object.defineProperties(_b.prototype,{isConstant:{get:function(){return!c(this._value)||this._referenceFrame===Ni.FIXED}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});var u1e=new K;_b.prototype.getValue=function(e,t){return c(e)||(e=K.now(u1e)),this.getValueInReferenceFrame(e,Ni.FIXED,t)};_b.prototype.setValue=function(e,t){let n=!1;d.equals(this._value,e)||(n=!0,this._value=d.clone(e)),c(t)&&this._referenceFrame!==t&&(n=!0,this._referenceFrame=t),n&&this._definitionChanged.raiseEvent(this)};_b.prototype.getValueInReferenceFrame=function(e,t,n){if(!c(e))throw new w("time is required.");if(!c(t))throw new w("referenceFrame is required.");return ah.convertToReferenceFrame(e,this._value,this._referenceFrame,t,n)};_b.prototype.equals=function(e){return this===e||e instanceof _b&&d.equals(this._value,e._value)&&this._referenceFrame===e._referenceFrame};var Bu=_b;function NS(e){this._definitionChanged=new fe,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(NS.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:oe("show"),positions:oe("positions"),width:oe("width"),height:oe("height"),heightReference:oe("heightReference"),extrudedHeight:oe("extrudedHeight"),extrudedHeightReference:oe("extrudedHeightReference"),cornerType:oe("cornerType"),granularity:oe("granularity"),fill:oe("fill"),material:Ao("material"),outline:oe("outline"),outlineColor:oe("outlineColor"),outlineWidth:oe("outlineWidth"),shadows:oe("shadows"),distanceDisplayCondition:oe("distanceDisplayCondition"),classificationType:oe("classificationType"),zIndex:oe("zIndex")});NS.prototype.clone=function(e){return c(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.cornerType=this.cornerType,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new NS(this)};NS.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.show=g(this.show,e.show),this.positions=g(this.positions,e.positions),this.width=g(this.width,e.width),this.height=g(this.height,e.height),this.heightReference=g(this.heightReference,e.heightReference),this.extrudedHeight=g(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=g(this.extrudedHeightReference,e.extrudedHeightReference),this.cornerType=g(this.cornerType,e.cornerType),this.granularity=g(this.granularity,e.granularity),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=g(this.classificationType,e.classificationType),this.zIndex=g(this.zIndex,e.zIndex)};var dT=NS;function f1e(e){return e}function d1e(e,t){return oe(e,t,f1e)}var Ml=d1e;function FS(e){this._definitionChanged=new fe,this._show=void 0,this._showSubscription=void 0,this._length=void 0,this._lengthSubscription=void 0,this._topRadius=void 0,this._topRadiusSubscription=void 0,this._bottomRadius=void 0,this._bottomRadiusSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._slices=void 0,this._slicesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(FS.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:oe("show"),length:oe("length"),topRadius:oe("topRadius"),bottomRadius:oe("bottomRadius"),heightReference:oe("heightReference"),fill:oe("fill"),material:Ao("material"),outline:oe("outline"),outlineColor:oe("outlineColor"),outlineWidth:oe("outlineWidth"),numberOfVerticalLines:oe("numberOfVerticalLines"),slices:oe("slices"),shadows:oe("shadows"),distanceDisplayCondition:oe("distanceDisplayCondition")});FS.prototype.clone=function(e){return c(e)?(e.show=this.show,e.length=this.length,e.topRadius=this.topRadius,e.bottomRadius=this.bottomRadius,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.slices=this.slices,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new FS(this)};FS.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.show=g(this.show,e.show),this.length=g(this.length,e.length),this.topRadius=g(this.topRadius,e.topRadius),this.bottomRadius=g(this.bottomRadius,e.bottomRadius),this.heightReference=g(this.heightReference,e.heightReference),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=g(this.numberOfVerticalLines,e.numberOfVerticalLines),this.slices=g(this.slices,e.slices),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};var hT=FS;function BS(e){this._definitionChanged=new fe,this._show=void 0,this._showSubscription=void 0,this._semiMajorAxis=void 0,this._semiMajorAxisSubscription=void 0,this._semiMinorAxis=void 0,this._semiMinorAxisSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(BS.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:oe("show"),semiMajorAxis:oe("semiMajorAxis"),semiMinorAxis:oe("semiMinorAxis"),height:oe("height"),heightReference:oe("heightReference"),extrudedHeight:oe("extrudedHeight"),extrudedHeightReference:oe("extrudedHeightReference"),rotation:oe("rotation"),stRotation:oe("stRotation"),granularity:oe("granularity"),fill:oe("fill"),material:Ao("material"),outline:oe("outline"),outlineColor:oe("outlineColor"),outlineWidth:oe("outlineWidth"),numberOfVerticalLines:oe("numberOfVerticalLines"),shadows:oe("shadows"),distanceDisplayCondition:oe("distanceDisplayCondition"),classificationType:oe("classificationType"),zIndex:oe("zIndex")});BS.prototype.clone=function(e){return c(e)?(e.show=this.show,e.semiMajorAxis=this.semiMajorAxis,e.semiMinorAxis=this.semiMinorAxis,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new BS(this)};BS.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.show=g(this.show,e.show),this.semiMajorAxis=g(this.semiMajorAxis,e.semiMajorAxis),this.semiMinorAxis=g(this.semiMinorAxis,e.semiMinorAxis),this.height=g(this.height,e.height),this.heightReference=g(this.heightReference,e.heightReference),this.extrudedHeight=g(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=g(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=g(this.rotation,e.rotation),this.stRotation=g(this.stRotation,e.stRotation),this.granularity=g(this.granularity,e.granularity),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.numberOfVerticalLines=g(this.numberOfVerticalLines,e.numberOfVerticalLines),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=g(this.classificationType,e.classificationType),this.zIndex=g(this.zIndex,e.zIndex)};var mT=BS;function kS(e){this._definitionChanged=new fe,this._show=void 0,this._showSubscription=void 0,this._radii=void 0,this._radiiSubscription=void 0,this._innerRadii=void 0,this._innerRadiiSubscription=void 0,this._minimumClock=void 0,this._minimumClockSubscription=void 0,this._maximumClock=void 0,this._maximumClockSubscription=void 0,this._minimumCone=void 0,this._minimumConeSubscription=void 0,this._maximumCone=void 0,this._maximumConeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._stackPartitions=void 0,this._stackPartitionsSubscription=void 0,this._slicePartitions=void 0,this._slicePartitionsSubscription=void 0,this._subdivisions=void 0,this._subdivisionsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(kS.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:oe("show"),radii:oe("radii"),innerRadii:oe("innerRadii"),minimumClock:oe("minimumClock"),maximumClock:oe("maximumClock"),minimumCone:oe("minimumCone"),maximumCone:oe("maximumCone"),heightReference:oe("heightReference"),fill:oe("fill"),material:Ao("material"),outline:oe("outline"),outlineColor:oe("outlineColor"),outlineWidth:oe("outlineWidth"),stackPartitions:oe("stackPartitions"),slicePartitions:oe("slicePartitions"),subdivisions:oe("subdivisions"),shadows:oe("shadows"),distanceDisplayCondition:oe("distanceDisplayCondition")});kS.prototype.clone=function(e){return c(e)?(e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new kS(this)};kS.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.show=g(this.show,e.show),this.radii=g(this.radii,e.radii),this.innerRadii=g(this.innerRadii,e.innerRadii),this.minimumClock=g(this.minimumClock,e.minimumClock),this.maximumClock=g(this.maximumClock,e.maximumClock),this.minimumCone=g(this.minimumCone,e.minimumCone),this.maximumCone=g(this.maximumCone,e.maximumCone),this.heightReference=g(this.heightReference,e.heightReference),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.stackPartitions=g(this.stackPartitions,e.stackPartitions),this.slicePartitions=g(this.slicePartitions,e.slicePartitions),this.subdivisions=g(this.subdivisions,e.subdivisions),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};var pT=kS;function US(e){this._definitionChanged=new fe,this._show=void 0,this._showSubscription=void 0,this._text=void 0,this._textSubscription=void 0,this._font=void 0,this._fontSubscription=void 0,this._style=void 0,this._styleSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._showBackground=void 0,this._showBackgroundSubscription=void 0,this._backgroundColor=void 0,this._backgroundColorSubscription=void 0,this._backgroundPadding=void 0,this._backgroundPaddingSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fillColor=void 0,this._fillColorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(US.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:oe("show"),text:oe("text"),font:oe("font"),style:oe("style"),scale:oe("scale"),showBackground:oe("showBackground"),backgroundColor:oe("backgroundColor"),backgroundPadding:oe("backgroundPadding"),pixelOffset:oe("pixelOffset"),eyeOffset:oe("eyeOffset"),horizontalOrigin:oe("horizontalOrigin"),verticalOrigin:oe("verticalOrigin"),heightReference:oe("heightReference"),fillColor:oe("fillColor"),outlineColor:oe("outlineColor"),outlineWidth:oe("outlineWidth"),translucencyByDistance:oe("translucencyByDistance"),pixelOffsetScaleByDistance:oe("pixelOffsetScaleByDistance"),scaleByDistance:oe("scaleByDistance"),distanceDisplayCondition:oe("distanceDisplayCondition"),disableDepthTestDistance:oe("disableDepthTestDistance")});US.prototype.clone=function(e){return c(e)?(e.show=this.show,e.text=this.text,e.font=this.font,e.style=this.style,e.scale=this.scale,e.showBackground=this.showBackground,e.backgroundColor=this.backgroundColor,e.backgroundPadding=this.backgroundPadding,e.pixelOffset=this.pixelOffset,e.eyeOffset=this.eyeOffset,e.horizontalOrigin=this.horizontalOrigin,e.verticalOrigin=this.verticalOrigin,e.heightReference=this.heightReference,e.fillColor=this.fillColor,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.translucencyByDistance=this.translucencyByDistance,e.pixelOffsetScaleByDistance=this.pixelOffsetScaleByDistance,e.scaleByDistance=this.scaleByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new US(this)};US.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.show=g(this.show,e.show),this.text=g(this.text,e.text),this.font=g(this.font,e.font),this.style=g(this.style,e.style),this.scale=g(this.scale,e.scale),this.showBackground=g(this.showBackground,e.showBackground),this.backgroundColor=g(this.backgroundColor,e.backgroundColor),this.backgroundPadding=g(this.backgroundPadding,e.backgroundPadding),this.pixelOffset=g(this.pixelOffset,e.pixelOffset),this.eyeOffset=g(this.eyeOffset,e.eyeOffset),this.horizontalOrigin=g(this.horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=g(this.verticalOrigin,e.verticalOrigin),this.heightReference=g(this.heightReference,e.heightReference),this.fillColor=g(this.fillColor,e.fillColor),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.translucencyByDistance=g(this.translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=g(this.pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.scaleByDistance=g(this.scaleByDistance,e.scaleByDistance),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=g(this.disableDepthTestDistance,e.disableDepthTestDistance)};var ch=US;var h1e=new d(1,1,1),m1e=d.ZERO,p1e=ve.IDENTITY;function gee(e,t,n){this.translation=d.clone(g(e,m1e)),this.rotation=ve.clone(g(t,p1e)),this.scale=d.clone(g(n,h1e))}gee.prototype.equals=function(e){return this===e||c(e)&&d.equals(this.translation,e.translation)&&ve.equals(this.rotation,e.rotation)&&d.equals(this.scale,e.scale)};var gb=gee;var aj=new gb;function zS(e){e=g(e,g.EMPTY_OBJECT),this._definitionChanged=new fe,this._translation=void 0,this._translationSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this.translation=e.translation,this.rotation=e.rotation,this.scale=e.scale}Object.defineProperties(zS.prototype,{isConstant:{get:function(){return G.isConstant(this._translation)&&G.isConstant(this._rotation)&&G.isConstant(this._scale)}},definitionChanged:{get:function(){return this._definitionChanged}},translation:oe("translation"),rotation:oe("rotation"),scale:oe("scale")});var _1e=new K;zS.prototype.getValue=function(e,t){return c(e)||(e=K.now(_1e)),c(t)||(t=new gb),t.translation=G.getValueOrClonedDefault(this._translation,e,aj.translation,t.translation),t.rotation=G.getValueOrClonedDefault(this._rotation,e,aj.rotation,t.rotation),t.scale=G.getValueOrClonedDefault(this._scale,e,aj.scale,t.scale),t};zS.prototype.equals=function(e){return this===e||e instanceof zS&&G.equals(this._translation,e._translation)&&G.equals(this._rotation,e._rotation)&&G.equals(this._scale,e._scale)};var _T=zS;function Gm(e,t){this._propertyNames=[],this._definitionChanged=new fe,c(e)&&this.merge(e,t)}Object.defineProperties(Gm.prototype,{propertyNames:{get:function(){return this._propertyNames}},isConstant:{get:function(){let e=this._propertyNames;for(let t=0,n=e.length;t<n;t++)if(!G.isConstant(this[e[t]]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}});Gm.prototype.hasProperty=function(e){return this._propertyNames.indexOf(e)!==-1};function g1e(e){return new jn(e)}Gm.prototype.addProperty=function(e,t,n){let i=this._propertyNames;if(!c(e))throw new w("propertyName is required.");if(i.indexOf(e)!==-1)throw new w(`${e} is already a registered property.`);i.push(e),Object.defineProperty(this,e,oe(e,!0,g(n,g1e))),c(t)&&(this[e]=t),this._definitionChanged.raiseEvent(this)};Gm.prototype.removeProperty=function(e){let n=this._propertyNames.indexOf(e);if(!c(e))throw new w("propertyName is required.");if(n===-1)throw new w(`${e} is not a registered property.`);this._propertyNames.splice(n,1),delete this[e],this._definitionChanged.raiseEvent(this)};var y1e=new K;Gm.prototype.getValue=function(e,t){c(e)||(e=K.now(y1e)),c(t)||(t={});let n=this._propertyNames;for(let i=0,o=n.length;i<o;i++){let r=n[i];t[r]=G.getValueOrUndefined(this[r],e,t[r])}return t};Gm.prototype.merge=function(e,t){if(!c(e))throw new w("source is required.");let n=this._propertyNames,i=c(e._propertyNames)?e._propertyNames:Object.keys(e);for(let o=0,r=i.length;o<r;o++){let s=i[o],a=this[s],l=e[s];a===void 0&&n.indexOf(s)===-1&&this.addProperty(s,void 0,t),l!==void 0&&(a!==void 0?c(a)&&c(a.merge)&&a.merge(l):c(l)&&c(l.merge)&&c(l.clone)?this[s]=l.clone():this[s]=l)}};function b1e(e,t){let n=e._propertyNames,i=t._propertyNames,o=n.length;if(o!==i.length)return!1;for(let r=0;r<o;++r){let s=n[r];if(i.indexOf(s)===-1||!G.equals(e[s],t[s]))return!1}return!0}Gm.prototype.equals=function(e){return this===e||e instanceof Gm&&b1e(this,e)};var Ll=Gm;function yee(e){return new _T(e)}function x1e(e){return new Ll(e,yee)}function T1e(e){return new Ll(e)}function VS(e){this._definitionChanged=new fe,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._hasVerticalExaggeration=void 0,this._hasVerticalExaggerationSubscription=void 0,this._enableVerticalExaggeration=void 0,this._enableVerticalExaggerationSubscription=void 0,this._minimumPixelSize=void 0,this._minimumPixelSizeSubscription=void 0,this._maximumScale=void 0,this._maximumScaleSubscription=void 0,this._incrementallyLoadTextures=void 0,this._incrementallyLoadTexturesSubscription=void 0,this._runAnimations=void 0,this._runAnimationsSubscription=void 0,this._clampAnimations=void 0,this._clampAnimationsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._silhouetteColor=void 0,this._silhouetteColorSubscription=void 0,this._silhouetteSize=void 0,this._silhouetteSizeSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._colorBlendMode=void 0,this._colorBlendModeSubscription=void 0,this._colorBlendAmount=void 0,this._colorBlendAmountSubscription=void 0,this._imageBasedLightingFactor=void 0,this._imageBasedLightingFactorSubscription=void 0,this._lightColor=void 0,this._lightColorSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._nodeTransformations=void 0,this._nodeTransformationsSubscription=void 0,this._articulations=void 0,this._articulationsSubscription=void 0,this._clippingPlanes=void 0,this._clippingPlanesSubscription=void 0,this._customShader=void 0,this._customShaderSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(VS.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:oe("show"),uri:oe("uri"),scale:oe("scale"),enableVerticalExaggeration:oe("enableVerticalExaggeration"),minimumPixelSize:oe("minimumPixelSize"),maximumScale:oe("maximumScale"),incrementallyLoadTextures:oe("incrementallyLoadTextures"),runAnimations:oe("runAnimations"),clampAnimations:oe("clampAnimations"),shadows:oe("shadows"),heightReference:oe("heightReference"),silhouetteColor:oe("silhouetteColor"),silhouetteSize:oe("silhouetteSize"),color:oe("color"),colorBlendMode:oe("colorBlendMode"),colorBlendAmount:oe("colorBlendAmount"),imageBasedLightingFactor:oe("imageBasedLightingFactor"),lightColor:oe("lightColor"),distanceDisplayCondition:oe("distanceDisplayCondition"),nodeTransformations:oe("nodeTransformations",void 0,x1e),articulations:oe("articulations",void 0,T1e),clippingPlanes:oe("clippingPlanes"),customShader:oe("customShader")});VS.prototype.clone=function(e){return c(e)?(e.show=this.show,e.uri=this.uri,e.scale=this.scale,e.enableVerticalExaggeration=this.enableVerticalExaggeration,e.minimumPixelSize=this.minimumPixelSize,e.maximumScale=this.maximumScale,e.incrementallyLoadTextures=this.incrementallyLoadTextures,e.runAnimations=this.runAnimations,e.clampAnimations=this.clampAnimations,e.heightReference=this._heightReference,e.silhouetteColor=this.silhouetteColor,e.silhouetteSize=this.silhouetteSize,e.color=this.color,e.colorBlendMode=this.colorBlendMode,e.colorBlendAmount=this.colorBlendAmount,e.imageBasedLightingFactor=this.imageBasedLightingFactor,e.lightColor=this.lightColor,e.distanceDisplayCondition=this.distanceDisplayCondition,e.nodeTransformations=this.nodeTransformations,e.articulations=this.articulations,e.clippingPlanes=this.clippingPlanes,e.customShader=this.customShader,e):new VS(this)};VS.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.show=g(this.show,e.show),this.uri=g(this.uri,e.uri),this.scale=g(this.scale,e.scale),this.enableVerticalExaggeration=g(this.enableVerticalExaggeration,e.enableVerticalExaggeration),this.minimumPixelSize=g(this.minimumPixelSize,e.minimumPixelSize),this.maximumScale=g(this.maximumScale,e.maximumScale),this.incrementallyLoadTextures=g(this.incrementallyLoadTextures,e.incrementallyLoadTextures),this.runAnimations=g(this.runAnimations,e.runAnimations),this.clampAnimations=g(this.clampAnimations,e.clampAnimations),this.shadows=g(this.shadows,e.shadows),this.heightReference=g(this.heightReference,e.heightReference),this.silhouetteColor=g(this.silhouetteColor,e.silhouetteColor),this.silhouetteSize=g(this.silhouetteSize,e.silhouetteSize),this.color=g(this.color,e.color),this.colorBlendMode=g(this.colorBlendMode,e.colorBlendMode),this.colorBlendAmount=g(this.colorBlendAmount,e.colorBlendAmount),this.imageBasedLightingFactor=g(this.imageBasedLightingFactor,e.imageBasedLightingFactor),this.lightColor=g(this.lightColor,e.lightColor),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.clippingPlanes=g(this.clippingPlanes,e.clippingPlanes),this.customShader=g(this.customShader,e.customShader);let t=e.nodeTransformations;if(c(t)){let i=this.nodeTransformations;c(i)?i.merge(t):this.nodeTransformations=new Ll(t,yee)}let n=e.articulations;if(c(n)){let i=this.articulations;c(i)?i.merge(n):this.articulations=new Ll(n)}};var S_=VS;function HS(e){this._definitionChanged=new fe,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._maximumScreenSpaceError=void 0,this._maximumScreenSpaceErrorSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(HS.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:oe("show"),uri:oe("uri"),maximumScreenSpaceError:oe("maximumScreenSpaceError")});HS.prototype.clone=function(e){return c(e)?(e.show=this.show,e.uri=this.uri,e.maximumScreenSpaceError=this.maximumScreenSpaceError,e):new HS(this)};HS.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.show=g(this.show,e.show),this.uri=g(this.uri,e.uri),this.maximumScreenSpaceError=g(this.maximumScreenSpaceError,e.maximumScreenSpaceError)};var gT=HS;function GS(e){this._definitionChanged=new fe,this._show=void 0,this._showSubscription=void 0,this._leadTime=void 0,this._leadTimeSubscription=void 0,this._trailTime=void 0,this._trailTimeSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._resolution=void 0,this._resolutionSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(GS.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:oe("show"),leadTime:oe("leadTime"),trailTime:oe("trailTime"),width:oe("width"),resolution:oe("resolution"),material:Ao("material"),distanceDisplayCondition:oe("distanceDisplayCondition")});GS.prototype.clone=function(e){return c(e)?(e.show=this.show,e.leadTime=this.leadTime,e.trailTime=this.trailTime,e.width=this.width,e.resolution=this.resolution,e.material=this.material,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new GS(this)};GS.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.show=g(this.show,e.show),this.leadTime=g(this.leadTime,e.leadTime),this.trailTime=g(this.trailTime,e.trailTime),this.width=g(this.width,e.width),this.resolution=g(this.resolution,e.resolution),this.material=g(this.material,e.material),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};var A_=GS;function jS(e){this._definitionChanged=new fe,this._show=void 0,this._showSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(jS.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:oe("show"),plane:oe("plane"),dimensions:oe("dimensions"),fill:oe("fill"),material:Ao("material"),outline:oe("outline"),outlineColor:oe("outlineColor"),outlineWidth:oe("outlineWidth"),shadows:oe("shadows"),distanceDisplayCondition:oe("distanceDisplayCondition")});jS.prototype.clone=function(e){return c(e)?(e.show=this.show,e.plane=this.plane,e.dimensions=this.dimensions,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new jS(this)};jS.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.show=g(this.show,e.show),this.plane=g(this.plane,e.plane),this.dimensions=g(this.dimensions,e.dimensions),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};var oL=jS;function WS(e){this._definitionChanged=new fe,this._show=void 0,this._showSubscription=void 0,this._pixelSize=void 0,this._pixelSizeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this._splitDirection=void 0,this._splitDirectionSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(WS.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:oe("show"),pixelSize:oe("pixelSize"),heightReference:oe("heightReference"),color:oe("color"),outlineColor:oe("outlineColor"),outlineWidth:oe("outlineWidth"),scaleByDistance:oe("scaleByDistance"),translucencyByDistance:oe("translucencyByDistance"),distanceDisplayCondition:oe("distanceDisplayCondition"),disableDepthTestDistance:oe("disableDepthTestDistance"),splitDirection:oe("splitDirection")});WS.prototype.clone=function(e){return c(e)?(e.show=this.show,e.pixelSize=this.pixelSize,e.heightReference=this.heightReference,e.color=this.color,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.scaleByDistance=this.scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e.splitDirection=this.splitDirection,e):new WS(this)};WS.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.show=g(this.show,e.show),this.pixelSize=g(this.pixelSize,e.pixelSize),this.heightReference=g(this.heightReference,e.heightReference),this.color=g(this.color,e.color),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.scaleByDistance=g(this.scaleByDistance,e.scaleByDistance),this.translucencyByDistance=g(this._translucencyByDistance,e.translucencyByDistance),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=g(this.disableDepthTestDistance,e.disableDepthTestDistance),this.splitDirection=g(this.splitDirection,e.splitDirection)};var yT=WS;function C1e(e,t){this.positions=c(e)?e:[],this.holes=c(t)?t:[]}var Ra=C1e;function E1e(e){return Array.isArray(e)&&(e=new Ra(e)),new jn(e)}function qS(e){this._definitionChanged=new fe,this._show=void 0,this._showSubscription=void 0,this._hierarchy=void 0,this._hierarchySubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._perPositionHeight=void 0,this._perPositionHeightSubscription=void 0,this._closeTop=void 0,this._closeTopSubscription=void 0,this._closeBottom=void 0,this._closeBottomSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this._textureCoordinates=void 0,this._textureCoordinatesSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(qS.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:oe("show"),hierarchy:oe("hierarchy",void 0,E1e),height:oe("height"),heightReference:oe("heightReference"),extrudedHeight:oe("extrudedHeight"),extrudedHeightReference:oe("extrudedHeightReference"),stRotation:oe("stRotation"),granularity:oe("granularity"),fill:oe("fill"),material:Ao("material"),outline:oe("outline"),outlineColor:oe("outlineColor"),outlineWidth:oe("outlineWidth"),perPositionHeight:oe("perPositionHeight"),closeTop:oe("closeTop"),closeBottom:oe("closeBottom"),arcType:oe("arcType"),shadows:oe("shadows"),distanceDisplayCondition:oe("distanceDisplayCondition"),classificationType:oe("classificationType"),zIndex:oe("zIndex"),textureCoordinates:oe("textureCoordinates")});qS.prototype.clone=function(e){return c(e)?(e.show=this.show,e.hierarchy=this.hierarchy,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.perPositionHeight=this.perPositionHeight,e.closeTop=this.closeTop,e.closeBottom=this.closeBottom,e.arcType=this.arcType,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e.textureCoordinates=this.textureCoordinates,e):new qS(this)};qS.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.show=g(this.show,e.show),this.hierarchy=g(this.hierarchy,e.hierarchy),this.height=g(this.height,e.height),this.heightReference=g(this.heightReference,e.heightReference),this.extrudedHeight=g(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=g(this.extrudedHeightReference,e.extrudedHeightReference),this.stRotation=g(this.stRotation,e.stRotation),this.granularity=g(this.granularity,e.granularity),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.perPositionHeight=g(this.perPositionHeight,e.perPositionHeight),this.closeTop=g(this.closeTop,e.closeTop),this.closeBottom=g(this.closeBottom,e.closeBottom),this.arcType=g(this.arcType,e.arcType),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=g(this.classificationType,e.classificationType),this.zIndex=g(this.zIndex,e.zIndex),this.textureCoordinates=g(this.textureCoordinates,e.textureCoordinates)};var lh=qS;function YS(e){this._definitionChanged=new fe,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._depthFailMaterial=void 0,this._depthFailMaterialSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._clampToGround=void 0,this._clampToGroundSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(YS.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:oe("show"),positions:oe("positions"),width:oe("width"),granularity:oe("granularity"),material:Ao("material"),depthFailMaterial:Ao("depthFailMaterial"),arcType:oe("arcType"),clampToGround:oe("clampToGround"),shadows:oe("shadows"),distanceDisplayCondition:oe("distanceDisplayCondition"),classificationType:oe("classificationType"),zIndex:oe("zIndex")});YS.prototype.clone=function(e){return c(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.granularity=this.granularity,e.material=this.material,e.depthFailMaterial=this.depthFailMaterial,e.arcType=this.arcType,e.clampToGround=this.clampToGround,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new YS(this)};YS.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.show=g(this.show,e.show),this.positions=g(this.positions,e.positions),this.width=g(this.width,e.width),this.granularity=g(this.granularity,e.granularity),this.material=g(this.material,e.material),this.depthFailMaterial=g(this.depthFailMaterial,e.depthFailMaterial),this.arcType=g(this.arcType,e.arcType),this.clampToGround=g(this.clampToGround,e.clampToGround),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=g(this.classificationType,e.classificationType),this.zIndex=g(this.zIndex,e.zIndex)};var fc=YS;function XS(e){this._definitionChanged=new fe,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._shape=void 0,this._shapeSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubsription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(XS.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:oe("show"),positions:oe("positions"),shape:oe("shape"),cornerType:oe("cornerType"),granularity:oe("granularity"),fill:oe("fill"),material:Ao("material"),outline:oe("outline"),outlineColor:oe("outlineColor"),outlineWidth:oe("outlineWidth"),shadows:oe("shadows"),distanceDisplayCondition:oe("distanceDisplayCondition")});XS.prototype.clone=function(e){return c(e)?(e.show=this.show,e.positions=this.positions,e.shape=this.shape,e.cornerType=this.cornerType,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new XS(this)};XS.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.show=g(this.show,e.show),this.positions=g(this.positions,e.positions),this.shape=g(this.shape,e.shape),this.cornerType=g(this.cornerType,e.cornerType),this.granularity=g(this.granularity,e.granularity),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};var bT=XS;function KS(e){this._definitionChanged=new fe,this._show=void 0,this._showSubscription=void 0,this._coordinates=void 0,this._coordinatesSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distancedisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties(KS.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:oe("show"),coordinates:oe("coordinates"),height:oe("height"),heightReference:oe("heightReference"),extrudedHeight:oe("extrudedHeight"),extrudedHeightReference:oe("extrudedHeightReference"),rotation:oe("rotation"),stRotation:oe("stRotation"),granularity:oe("granularity"),fill:oe("fill"),material:Ao("material"),outline:oe("outline"),outlineColor:oe("outlineColor"),outlineWidth:oe("outlineWidth"),shadows:oe("shadows"),distanceDisplayCondition:oe("distanceDisplayCondition"),classificationType:oe("classificationType"),zIndex:oe("zIndex")});KS.prototype.clone=function(e){return c(e)?(e.show=this.show,e.coordinates=this.coordinates,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new KS(this)};KS.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.show=g(this.show,e.show),this.coordinates=g(this.coordinates,e.coordinates),this.height=g(this.height,e.height),this.heightReference=g(this.heightReference,e.heightReference),this.extrudedHeight=g(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=g(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=g(this.rotation,e.rotation),this.stRotation=g(this.stRotation,e.stRotation),this.granularity=g(this.granularity,e.granularity),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=g(this.classificationType,e.classificationType),this.zIndex=g(this.zIndex,e.zIndex)};var uh=KS;function $S(e){this._definitionChanged=new fe,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._minimumHeights=void 0,this._minimumHeightsSubscription=void 0,this._maximumHeights=void 0,this._maximumHeightsSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(g(e,g.EMPTY_OBJECT))}Object.defineProperties($S.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:oe("show"),positions:oe("positions"),minimumHeights:oe("minimumHeights"),maximumHeights:oe("maximumHeights"),granularity:oe("granularity"),fill:oe("fill"),material:Ao("material"),outline:oe("outline"),outlineColor:oe("outlineColor"),outlineWidth:oe("outlineWidth"),shadows:oe("shadows"),distanceDisplayCondition:oe("distanceDisplayCondition")});$S.prototype.clone=function(e){return c(e)?(e.show=this.show,e.positions=this.positions,e.minimumHeights=this.minimumHeights,e.maximumHeights=this.maximumHeights,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new $S(this)};$S.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.show=g(this.show,e.show),this.positions=g(this.positions,e.positions),this.minimumHeights=g(this.minimumHeights,e.minimumHeights),this.maximumHeights=g(this.maximumHeights,e.maximumHeights),this.granularity=g(this.granularity,e.granularity),this.fill=g(this.fill,e.fill),this.material=g(this.material,e.material),this.outline=g(this.outline,e.outline),this.outlineColor=g(this.outlineColor,e.outlineColor),this.outlineWidth=g(this.outlineWidth,e.outlineWidth),this.shadows=g(this.shadows,e.shadows),this.distanceDisplayCondition=g(this.distanceDisplayCondition,e.distanceDisplayCondition)};var v_=$S;var w1e=new re,cj=[];function S1e(e){return new Bu(e)}function A1e(e){return oe(e,void 0,S1e)}function xs(e,t){return oe(e,void 0,function(n){return n instanceof t?n:new t(n)})}function ku(e){e=g(e,g.EMPTY_OBJECT);let t=e.id;c(t)||(t=Bn()),this._availability=void 0,this._id=t,this._definitionChanged=new fe,this._name=e.name,this._show=g(e.show,!0),this._parent=void 0,this._propertyNames=["billboard","box","corridor","cylinder","description","ellipse","ellipsoid","label","model","tileset","orientation","path","plane","point","polygon","polyline","polylineVolume","position","properties","rectangle","viewFrom","wall",...cj],this._billboard=void 0,this._billboardSubscription=void 0,this._box=void 0,this._boxSubscription=void 0,this._corridor=void 0,this._corridorSubscription=void 0,this._cylinder=void 0,this._cylinderSubscription=void 0,this._description=void 0,this._descriptionSubscription=void 0,this._ellipse=void 0,this._ellipseSubscription=void 0,this._ellipsoid=void 0,this._ellipsoidSubscription=void 0,this._label=void 0,this._labelSubscription=void 0,this._model=void 0,this._modelSubscription=void 0,this._tileset=void 0,this._tilesetSubscription=void 0,this._orientation=void 0,this._orientationSubscription=void 0,this._path=void 0,this._pathSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._point=void 0,this._pointSubscription=void 0,this._polygon=void 0,this._polygonSubscription=void 0,this._polyline=void 0,this._polylineSubscription=void 0,this._polylineVolume=void 0,this._polylineVolumeSubscription=void 0,this._position=void 0,this._positionSubscription=void 0,this._properties=void 0,this._propertiesSubscription=void 0,this._rectangle=void 0,this._rectangleSubscription=void 0,this._viewFrom=void 0,this._viewFromSubscription=void 0,this._wall=void 0,this._wallSubscription=void 0,this._children=[],this.entityCollection=void 0,this.parent=e.parent,this.merge(e)}function lj(e,t,n){let i=t.length;for(let o=0;o<i;o++){let r=t[o],s=r._show;(!n&&s)!==(n&&s)&&lj(r,r._children,n)}e._definitionChanged.raiseEvent(e,"isShowing",n,!n)}Object.defineProperties(ku.prototype,{availability:Ml("availability"),id:{get:function(){return this._id}},definitionChanged:{get:function(){return this._definitionChanged}},name:Ml("name"),show:{get:function(){return this._show},set:function(e){if(!c(e))throw new w("value is required.");if(e===this._show)return;let t=this.isShowing;this._show=e;let n=this.isShowing;t!==n&&lj(this,this._children,n),this._definitionChanged.raiseEvent(this,"show",e,!e)}},isShowing:{get:function(){return this._show&&(!c(this.entityCollection)||this.entityCollection.show)&&(!c(this._parent)||this._parent.isShowing)}},parent:{get:function(){return this._parent},set:function(e){let t=this._parent;if(t===e)return;let n=this.isShowing;if(c(t)){let o=t._children.indexOf(this);t._children.splice(o,1)}this._parent=e,c(e)&&e._children.push(this);let i=this.isShowing;n!==i&&lj(this,this._children,i),this._definitionChanged.raiseEvent(this,"parent",e,t)}},propertyNames:{get:function(){return this._propertyNames}},billboard:xs("billboard",sc),box:xs("box",uT),corridor:xs("corridor",dT),cylinder:xs("cylinder",hT),description:oe("description"),ellipse:xs("ellipse",mT),ellipsoid:xs("ellipsoid",pT),label:xs("label",ch),model:xs("model",S_),tileset:xs("tileset",gT),orientation:oe("orientation"),path:xs("path",A_),plane:xs("plane",oL),point:xs("point",yT),polygon:xs("polygon",lh),polyline:xs("polyline",fc),polylineVolume:xs("polylineVolume",bT),properties:xs("properties",Ll),position:A1e("position"),rectangle:xs("rectangle",uh),viewFrom:oe("viewFrom"),wall:xs("wall",v_)});ku.registerEntityType=function(e,t){Object.defineProperties(ku.prototype,{[e]:xs(e,t)}),cj.includes(e)||cj.push(e)};ku.prototype.isAvailable=function(e){if(!c(e))throw new w("time is required.");let t=this._availability;return!c(t)||t.contains(e)};ku.prototype.addProperty=function(e){let t=this._propertyNames;if(!c(e))throw new w("propertyName is required.");if(t.indexOf(e)!==-1)throw new w(`${e} is already a registered property.`);if(e in this)throw new w(`${e} is a reserved property name.`);t.push(e),Object.defineProperty(this,e,Ml(e,!0))};ku.prototype.removeProperty=function(e){let n=this._propertyNames.indexOf(e);if(!c(e))throw new w("propertyName is required.");if(n===-1)throw new w(`${e} is not a registered property.`);this._propertyNames.splice(n,1),delete this[e]};ku.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.name=g(this.name,e.name),this.availability=g(this.availability,e.availability);let t=this._propertyNames,n=c(e._propertyNames)?e._propertyNames:Object.keys(e),i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r==="parent"||r==="name"||r==="availability"||r==="children")continue;let s=this[r],a=e[r];!c(s)&&t.indexOf(r)===-1&&this.addProperty(r),c(a)&&(c(s)?c(s.merge)&&s.merge(a):c(a.merge)&&c(a.clone)?this[r]=a.clone():this[r]=a)}};var bee=new q,xee=new d,Tee=new ve;ku.prototype.computeModelMatrix=function(e,t){C.typeOf.object("time",e);let n=G.getValueOrUndefined(this._position,e,xee);if(!c(n))return;let i=G.getValueOrUndefined(this._orientation,e,Tee);return c(i)?t=N.fromRotationTranslation(q.fromQuaternion(i,bee),n,t):t=Lt.eastNorthUpToFixedFrame(n,void 0,t),t};ku.prototype.computeModelMatrixForHeightReference=function(e,t,n,i,o){C.typeOf.object("time",e);let r=G.getValueOrDefault(t,e,qe.NONE),s=G.getValueOrUndefined(this._position,e,xee);if(r===qe.NONE||!c(s)||d.equalsEpsilon(s,d.ZERO,O.EPSILON8))return this.computeModelMatrix(e,o);let a=i.cartesianToCartographic(s,w1e);Mu(r)?a.height=n:a.height+=n,s=i.cartographicToCartesian(a,s);let l=G.getValueOrUndefined(this._orientation,e,Tee);return c(l)?o=N.fromRotationTranslation(q.fromQuaternion(l,bee),s,o):o=Lt.eastNorthUpToFixedFrame(s,void 0,o),o};ku.supportsMaterialsforEntitiesOnTerrain=function(e){return Kc.supportsMaterials(e)};ku.supportsPolylinesOnTerrain=function(e){return sh.isSupported(e)};var Ts=ku;var v1e=new Ut(z.WHITE),D1e=new jn(!0),I1e=new jn(!0),O1e=new jn(!1),P1e=new jn(z.BLACK),R1e=new jn(yn.DISABLED),M1e=new jn(new Nt),L1e=new jn(Ln.BOTH);function dc(e){C.defined("options.entity",e.entity),C.defined("options.scene",e.scene),C.defined("options.geometryOptions",e.geometryOptions),C.defined("options.geometryPropertyName",e.geometryPropertyName),C.defined("options.observedPropertyNames",e.observedPropertyNames);let t=e.entity,n=e.geometryPropertyName;this._entity=t,this._scene=e.scene,this._fillEnabled=!1,this._isClosed=!1,this._onTerrain=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new fe,this._showProperty=void 0,this._materialProperty=void 0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._options=e.geometryOptions,this._geometryPropertyName=n,this._id=`${n}-${t.id}`,this._observedPropertyNames=e.observedPropertyNames,this._supportsMaterialsforEntitiesOnTerrain=Ts.supportsMaterialsforEntitiesOnTerrain(e.scene)}Object.defineProperties(dc.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!c(this._entity.availability)&&G.isConstant(this._showProperty)&&G.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!c(this._entity.availability)&&G.isConstant(this._showProperty)&&G.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return this._isClosed}},onTerrain:{get:function(){return this._onTerrain}},geometryChanged:{get:function(){return this._geometryChanged}}});dc.prototype.isOutlineVisible=function(e){let t=this._entity,n=this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e);return g(n,!1)};dc.prototype.isFilled=function(e){let t=this._entity,n=this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e);return g(n,!1)};dc.prototype.createFillGeometryInstance=w.throwInstantiationError;dc.prototype.createOutlineGeometryInstance=w.throwInstantiationError;dc.prototype.isDestroyed=function(){return!1};dc.prototype.destroy=function(){ue(this)};dc.prototype._isHidden=function(e,t){let n=t.show;return c(n)&&n.isConstant&&!n.getValue(Ue.MINIMUM_VALUE)};dc.prototype._isOnTerrain=function(e,t){return!1};dc.prototype._getIsClosed=function(e){return!0};dc.prototype._isDynamic=w.throwInstantiationError;dc.prototype._setStaticOptions=w.throwInstantiationError;dc.prototype._onEntityPropertyChanged=function(e,t,n,i){if(this._observedPropertyNames.indexOf(t)===-1)return;let o=this._entity[this._geometryPropertyName];if(!c(o)){(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this));return}let r=o.fill,s=c(r)&&r.isConstant?r.getValue(Ue.MINIMUM_VALUE):!0,a=o.outline,l=c(a);if(l&&a.isConstant&&(l=a.getValue(Ue.MINIMUM_VALUE)),!s&&!l){(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this));return}let u=o.show;if(this._isHidden(e,o)){(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this));return}this._materialProperty=g(o.material,v1e),this._fillProperty=g(r,I1e),this._showProperty=g(u,D1e),this._showOutlineProperty=g(o.outline,O1e),this._outlineColorProperty=l?g(o.outlineColor,P1e):void 0,this._shadowsProperty=g(o.shadows,R1e),this._distanceDisplayConditionProperty=g(o.distanceDisplayCondition,M1e),this._classificationTypeProperty=g(o.classificationType,L1e),this._fillEnabled=s;let f=this._isOnTerrain(e,o)&&(this._supportsMaterialsforEntitiesOnTerrain||this._materialProperty instanceof Ut);if(l&&f&&(mt(mt.geometryOutlines),l=!1),this._onTerrain=f,this._outlineEnabled=l,this._isDynamic(e,o))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{this._setStaticOptions(e,o),this._isClosed=this._getIsClosed(this._options);let h=o.outlineWidth;this._outlineWidth=c(h)?h.getValue(Ue.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}};dc.prototype.createDynamicUpdater=function(e,t){if(C.defined("primitives",e),C.defined("groundPrimitives",t),!this._dynamic)throw new w("This instance does not represent dynamic geometry.");return new this.constructor.DynamicGeometryUpdater(this,e,t)};var Qn=dc;function xT(e,t){this._callback=void 0,this._isConstant=void 0,this._definitionChanged=new fe,this.setCallback(e,t)}Object.defineProperties(xT.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}}});var N1e=new K;xT.prototype.getValue=function(e,t){return c(e)||(e=K.now(N1e)),this._callback(e,t)};xT.prototype.setCallback=function(e,t){if(!c(e))throw new w("callback is required.");if(!c(t))throw new w("isConstant is required.");let n=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,n&&this._definitionChanged.raiseEvent(this)};xT.prototype.equals=function(e){return this===e||e instanceof xT&&this._callback===e._callback&&this._isConstant===e._isConstant};var fh=xT;var Cee=new d;function TT(e,t,n,i){C.defined("scene",e),C.defined("positionProperty",t),this._scene=e,this._heightReference=n,this._extrudedHeightReference=i,this._positionProperty=t,this._position=new d,this._cartographicPosition=new re,this._normal=new d,this._definitionChanged=new fe,this._terrainHeight=0,this._removeCallbackFunc=void 0,this._removeEventListener=void 0,this._removeModeListener=void 0;let o=this;if(c(e.globe)&&(this._removeEventListener=e.terrainProviderChanged.addEventListener(function(){o._updateClamping()}),this._removeModeListener=e.morphComplete.addEventListener(function(){o._updateClamping()})),t.isConstant){let r=t.getValue(Ue.MINIMUM_VALUE,Cee);if(!c(r)||d.equals(r,d.ZERO)||!c(e.globe))return;this._position=d.clone(r,this._position),this._updateClamping(),this._normal=e.ellipsoid.geodeticSurfaceNormal(r,this._normal)}}Object.defineProperties(TT.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}});TT.prototype._updateClamping=function(){c(this._removeCallbackFunc)&&this._removeCallbackFunc();let e=this._scene,t=this._position;if(d.equals(t,d.ZERO)){this._terrainHeight=0;return}let i=e.ellipsoid.cartesianToCartographic(t,this._cartographicPosition),o=e.getHeight(i,this._heightReference);c(o)?this._terrainHeight=o:this._terrainHeight=0;let r=s=>{this._terrainHeight=s.height,this.definitionChanged.raiseEvent()};this._removeCallbackFunc=e.updateHeight(i,r,this._heightReference)};var F1e=new K;TT.prototype.getValue=function(e,t){c(e)||(e=K.now(F1e));let n=G.getValueOrDefault(this._heightReference,e,qe.NONE),i=G.getValueOrDefault(this._extrudedHeightReference,e,qe.NONE);if(n===qe.NONE&&!$x(i))return this._position=d.clone(d.ZERO,this._position),d.clone(d.ZERO,t);if(this._positionProperty.isConstant)return d.multiplyByScalar(this._normal,this._terrainHeight,t);let o=this._scene,r=this._positionProperty.getValue(e,Cee);if(!c(r)||d.equals(r,d.ZERO)||!c(o.globe))return d.clone(d.ZERO,t);if(d.equalsEpsilon(this._position,r,O.EPSILON10))return d.multiplyByScalar(this._normal,this._terrainHeight,t);this._position=d.clone(r,this._position),this._updateClamping();let s=o.ellipsoid.geodeticSurfaceNormal(r,this._normal);return d.multiplyByScalar(s,this._terrainHeight,t)};TT.prototype.isDestroyed=function(){return!1};TT.prototype.destroy=function(){return c(this._removeEventListener)&&this._removeEventListener(),c(this._removeModeListener)&&this._removeModeListener(),c(this._removeCallbackFunc)&&this._removeCallbackFunc(),ue(this)};var CT=TT;function B1e(e,t,n,i){if(Qn.prototype._onEntityPropertyChanged.call(this,e,t,n,i),this._observedPropertyNames.indexOf(t)===-1)return;let o=this._entity[this._geometryPropertyName];if(!c(o))return;c(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);let r=o.heightReference;if(c(r)){let s=new fh(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new CT(this._scene,s,r)}}var D_=B1e;var Eee=d.ZERO,wee=new d,k1e=new d,See=new z;function U1e(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function Nl(e,t){Qn.call(this,{entity:e,scene:t,geometryOptions:new U1e(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}c(Object.create)&&(Nl.prototype=Object.create(Qn.prototype),Nl.prototype.constructor=Nl);Object.defineProperties(Nl.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});Nl.prototype.createFillGeometryInstance=function(e){if(C.defined("time",e),!this._fillEnabled)throw new w("This instance does not represent a filled geometry.");let t=this._entity,n=t.isAvailable(e),i=new gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=Mn.fromDistanceDisplayCondition(o),s={show:i,distanceDisplayCondition:r,color:void 0,offset:void 0};if(this._materialProperty instanceof Ut){let a;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,See)),c(a)||(a=z.WHITE),s.color=Ht.fromColor(a)}return c(this._options.offsetAttribute)&&(s.offset=qi.fromCartesian3(G.getValueOrDefault(this._terrainOffsetProperty,e,Eee,wee))),new wt({id:t,geometry:Ia.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,this._options.dimensions.z*.5,this._scene.ellipsoid),attributes:s})};Nl.prototype.createOutlineGeometryInstance=function(e){if(C.defined("time",e),!this._outlineEnabled)throw new w("This instance does not represent an outlined geometry.");let t=this._entity,n=t.isAvailable(e),i=G.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,See),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(i),distanceDisplayCondition:Mn.fromDistanceDisplayCondition(o),offset:void 0};return c(this._options.offsetAttribute)&&(r.offset=qi.fromCartesian3(G.getValueOrDefault(this._terrainOffsetProperty,e,Eee,wee))),new wt({id:t,geometry:oh.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,this._options.dimensions.z*.5,this._scene.ellipsoid),attributes:r})};Nl.prototype._computeCenter=function(e,t){return G.getValueOrUndefined(this._entity.position,e,t)};Nl.prototype._isHidden=function(e,t){return!c(t.dimensions)||!c(e.position)||Qn.prototype._isHidden.call(this,e,t)};Nl.prototype._isDynamic=function(e,t){return!e.position.isConstant||!G.isConstant(e.orientation)||!t.dimensions.isConstant||!G.isConstant(t.outlineWidth)};Nl.prototype._setStaticOptions=function(e,t){let n=G.getValueOrDefault(t.heightReference,Ue.MINIMUM_VALUE,qe.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Ut?nn.VERTEX_FORMAT:eo.MaterialSupport.TEXTURED.vertexFormat,i.dimensions=t.dimensions.getValue(Ue.MINIMUM_VALUE,i.dimensions),i.offsetAttribute=n!==qe.NONE?Zt.ALL:void 0};Nl.prototype._onEntityPropertyChanged=D_;Nl.DynamicGeometryUpdater=ET;function ET(e,t,n){Jn.call(this,e,t,n)}c(Object.create)&&(ET.prototype=Object.create(Jn.prototype),ET.prototype.constructor=ET);ET.prototype._isHidden=function(e,t,n){let i=G.getValueOrUndefined(e.position,n,k1e),o=this._options.dimensions;return!c(i)||!c(o)||Jn.prototype._isHidden.call(this,e,t,n)};ET.prototype._setOptions=function(e,t,n){let i=G.getValueOrDefault(t.heightReference,n,qe.NONE),o=this._options;o.dimensions=G.getValueOrUndefined(t.dimensions,n,o.dimensions),o.offsetAttribute=i!==qe.NONE?Zt.ALL:void 0};var rL=Nl;function yb(e,t,n){this._callback=void 0,this._isConstant=void 0,this._referenceFrame=g(n,Ni.FIXED),this._definitionChanged=new fe,this.setCallback(e,t)}Object.defineProperties(yb.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});var z1e=new K;yb.prototype.getValue=function(e,t){return c(e)||(e=K.now(z1e)),this.getValueInReferenceFrame(e,Ni.FIXED,t)};yb.prototype.setCallback=function(e,t){if(!c(e))throw new w("callback is required.");if(!c(t))throw new w("isConstant is required.");let n=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,n&&this._definitionChanged.raiseEvent(this)};yb.prototype.getValueInReferenceFrame=function(e,t,n){if(!c(e))throw new w("time is required.");if(!c(t))throw new w("referenceFrame is required.");let i=this._callback(e,n);return ah.convertToReferenceFrame(e,i,this._referenceFrame,t,n)};yb.prototype.equals=function(e){return this===e||e instanceof yb&&this._callback===e._callback&&this._isConstant===e._isConstant&&this._referenceFrame===e._referenceFrame};var sL=yb;var vee=Mr(Aee(),1);var V1e=0,dj={};function dh(e,t){C.typeOf.string("html",e);let n,i=e;c(dj[i])?n=dj[i]:(n=V1e++,dj[i]=n),t=g(t,!1),this._id=n,this._html=e,this._showOnScreen=t,this._element=void 0}Object.defineProperties(dh.prototype,{html:{get:function(){return this._html}},id:{get:function(){return this._id}},showOnScreen:{get:function(){return this._showOnScreen},set:function(e){this._showOnScreen=e}},element:{get:function(){if(!c(this._element)){let e=vee.default.sanitize(this._html),t=document.createElement("div");t.className="cesium-credit-wrapper",t._creditId=this._id,t.style.display="inline",t.innerHTML=e;let n=t.querySelectorAll("a");for(let i=0;i<n.length;i++)n[i].setAttribute("target","_blank");this._element=t}return this._element}}});dh.equals=function(e,t){return e===t||c(e)&&c(t)&&e._id===t._id&&e._showOnScreen===t._showOnScreen};dh.prototype.equals=function(e){return dh.equals(this,e)};dh.prototype.isIon=function(){return this.html.indexOf("ion-credit.png")!==-1};dh.getIonCredit=function(e){let t=c(e.collapsible)&&!e.collapsible;return new dh(e.html,t)};dh.clone=function(e){if(c(e))return new dh(e.html,e.showOnScreen)};var St=dh;function bb(e){this._url=e,this._cubeMapBuffers=void 0,this._texture=void 0,this._maximumMipmapLevel=void 0,this._loading=!1,this._ready=!1,this._errorEvent=new fe}Object.defineProperties(bb.prototype,{url:{get:function(){return this._url}},errorEvent:{get:function(){return this._errorEvent}},texture:{get:function(){return this._texture}},maximumMipmapLevel:{get:function(){return this._maximumMipmapLevel}},ready:{get:function(){return this._ready}}});bb.isSupported=function(e){return(e.colorBufferHalfFloat&&e.halfFloatingPointTexture||e.floatingPointTexture&&e.colorBufferFloat)&&e.supportsTextureLod};function hj(e){e._cubeMapBuffers=void 0}bb.prototype.update=function(e){let{context:t}=e;if(!bb.isSupported(t))return;if(c(this._texture)){hj(this);return}if(!c(this._texture)&&!this._loading){let f=t.textureCache.getTexture(this._url);c(f)&&(hj(this),this._texture=f,this._maximumMipmapLevel=this._texture.maximumMipmapLevel,this._ready=!0)}let n=this._cubeMapBuffers;if(!c(n)&&!this._loading){let f=this;vl(this._url).then(function(h){f._cubeMapBuffers=h,f._loading=!1}).catch(function(h){f.isDestroyed()||f._errorEvent.raiseEvent(h)}),this._loading=!0}if(!c(this._cubeMapBuffers))return;let{pixelDatatype:i}=n[0].positiveX;c(i)||(i=t.halfFloatingPointTexture?Ne.HALF_FLOAT:Ne.FLOAT);let o=Re.RGBA,r=n.length;this._maximumMipmapLevel=r-1;let s=n[0].positiveX.width,a=Math.log2(s)+1;if(r!==a){let f={};Object.values(Lo.FaceName).forEach(h=>{f[h]=void 0});for(let h=r;h<a;h++)n.push(f)}let l=new Jt({minificationFilter:Wt.LINEAR_MIPMAP_LINEAR}),u=new Lo({context:t,source:n[0],flipY:!1,pixelDatatype:i,pixelFormat:o,sampler:l});u.loadMipmaps(n.slice(1)),this._texture=u,this._texture.maximumMipmapLevel=this._maximumMipmapLevel,t.textureCache.addTexture(this._url,this._texture),this._ready=!0};bb.prototype.isDestroyed=function(){return!1};bb.prototype.destroy=function(){return hj(this),this._texture=this._texture&&this._texture.destroy(),ue(this)};var hh=bb;function ZS(e){e=g(e,g.EMPTY_OBJECT);let t=c(e.imageBasedLightingFactor)?k.clone(e.imageBasedLightingFactor):new k(1,1);C.typeOf.object("options.imageBasedLightingFactor",t),C.typeOf.number.greaterThanOrEquals("options.imageBasedLightingFactor.x",t.x,0),C.typeOf.number.lessThanOrEquals("options.imageBasedLightingFactor.x",t.x,1),C.typeOf.number.greaterThanOrEquals("options.imageBasedLightingFactor.y",t.y,0),C.typeOf.number.lessThanOrEquals("options.imageBasedLightingFactor.y",t.y,1),this._imageBasedLightingFactor=t;let n=e.sphericalHarmonicCoefficients;if(c(n)&&(!Array.isArray(n)||n.length!==9))throw new w("options.sphericalHarmonicCoefficients must be an array of 9 Cartesian3 values.");this._sphericalHarmonicCoefficients=n,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentCubeMap=void 0,this._specularEnvironmentCubeMapDirty=!0,this._specularEnvironmentMapLoaded=!1,this._previousSpecularEnvironmentMapLoaded=!1,this._useDefaultSpecularMaps=!1,this._useDefaultSphericalHarmonics=!1,this._shouldRegenerateShaders=!1,this._previousFrameNumber=void 0,this._previousImageBasedLightingFactor=k.clone(t),this._previousSphericalHarmonicCoefficients=n,this._removeErrorListener=void 0}Object.defineProperties(ZS.prototype,{imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){C.typeOf.object("imageBasedLightingFactor",e),C.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),C.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),C.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),C.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1),this._previousImageBasedLightingFactor=k.clone(this._imageBasedLightingFactor,this._previousImageBasedLightingFactor),this._imageBasedLightingFactor=k.clone(e,this._imageBasedLightingFactor)}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients},set:function(e){if(c(e)&&(!Array.isArray(e)||e.length!==9))throw new w("sphericalHarmonicCoefficients must be an array of 9 Cartesian3 values.");this._previousSphericalHarmonicCoefficients=this._sphericalHarmonicCoefficients,this._sphericalHarmonicCoefficients=e}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps},set:function(e){e!==this._specularEnvironmentMaps&&(this._specularEnvironmentCubeMapDirty=this._specularEnvironmentCubeMapDirty||e!==this._specularEnvironmentMaps,this._specularEnvironmentMapLoaded=!1),this._specularEnvironmentMaps=e}},enabled:{get:function(){return this._imageBasedLightingFactor.x>0||this._imageBasedLightingFactor.y>0}},shouldRegenerateShaders:{get:function(){return this._shouldRegenerateShaders}},specularEnvironmentCubeMap:{get:function(){return this._specularEnvironmentCubeMap}},useDefaultSphericalHarmonics:{get:function(){return this._useDefaultSphericalHarmonics}},useDefaultSpecularMaps:{get:function(){return this._useDefaultSpecularMaps}},useSpecularEnvironmentMaps:{get:function(){return c(this._specularEnvironmentCubeMap)&&this._specularEnvironmentCubeMap.ready||this._useDefaultSpecularMaps}}});function H1e(e,t){if(hh.isSupported(t)){if(e._specularEnvironmentCubeMap=e._specularEnvironmentCubeMap&&e._specularEnvironmentCubeMap.destroy(),c(e._specularEnvironmentMaps)){let n=new hh(e._specularEnvironmentMaps);e._specularEnvironmentCubeMap=n,e._removeErrorListener=n.errorEvent.addEventListener(i=>{console.error(`Error loading specularEnvironmentMaps: ${i}`)})}e._shouldRegenerateShaders=!0}}ZS.prototype.update=function(e){if(e.frameNumber===this._previousFrameNumber)return;this._previousFrameNumber=e.frameNumber;let t=e.context;e.brdfLutGenerator.update(e),this._shouldRegenerateShaders=!1;let n=this._imageBasedLightingFactor,i=this._previousImageBasedLightingFactor;k.equals(n,i)||(this._shouldRegenerateShaders=n.x>0&&i.x===0||n.x===0&&i.x>0,this._shouldRegenerateShaders=this._shouldRegenerateShaders||n.y>0&&i.y===0||n.y===0&&i.y>0,this._previousImageBasedLightingFactor=k.clone(this._imageBasedLightingFactor,this._previousImageBasedLightingFactor)),this._previousSphericalHarmonicCoefficients!==this._sphericalHarmonicCoefficients&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||c(this._previousSphericalHarmonicCoefficients)!==c(this._sphericalHarmonicCoefficients),this._previousSphericalHarmonicCoefficients=this._sphericalHarmonicCoefficients),this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._previousSpecularEnvironmentMapLoaded!==this._specularEnvironmentMapLoaded,this._previousSpecularEnvironmentMapLoaded=this._specularEnvironmentMapLoaded,this._specularEnvironmentCubeMapDirty&&(H1e(this,t),this._specularEnvironmentCubeMapDirty=!1),c(this._specularEnvironmentCubeMap)&&(this._specularEnvironmentCubeMap.update(e),this._specularEnvironmentCubeMap.ready&&(this._specularEnvironmentMapLoaded=!0));let o=!c(this._specularEnvironmentCubeMap)&&c(e.specularEnvironmentMaps)&&!this._useDefaultSpecularMaps,r=!c(e.specularEnvironmentMaps)&&this._useDefaultSpecularMaps,s=!c(this._sphericalHarmonicCoefficients)&&c(e.sphericalHarmonicCoefficients)&&!this._useDefaultSphericalHarmonics,a=!c(e.sphericalHarmonicCoefficients)&&this._useDefaultSphericalHarmonics;this._shouldRegenerateShaders=this._shouldRegenerateShaders||o||r||s||a,this._useDefaultSpecularMaps=!c(this._specularEnvironmentCubeMap)&&c(e.specularEnvironmentMaps),this._useDefaultSphericalHarmonics=!c(this._sphericalHarmonicCoefficients)&&c(e.sphericalHarmonicCoefficients)};ZS.prototype.isDestroyed=function(){return!1};ZS.prototype.destroy=function(){return this._specularEnvironmentCubeMap=this._specularEnvironmentCubeMap&&this._specularEnvironmentCubeMap.destroy(),this._removeErrorListener=this._removeErrorListener&&this._removeErrorListener(),ue(this)};var wT=ZS;var pj=Mr(Sl(),1);var mj,Dee="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiZjBmMDE4Ny05M2JlLTRlMzgtYjIxYi05YmJjM2QwMzJkYWMiLCJpZCI6MjU5LCJpYXQiOjE3MzA0NjY3MDl9.t-7gCGPUe-oGCyCoeXPtYmlMVdgqUQD9mn-Da23yUoI",aL={};aL.defaultAccessToken=Dee;aL.defaultServer=new Te({url:"https://api.cesium.com/"});aL.getDefaultTokenCredit=function(e){if(e===Dee){if(!c(mj)){let t=`<b> This application is using Cesium's default ion access token. Please assign <i>Cesium.Ion.defaultAccessToken</i> with an access token from your ion account before making any Cesium API calls. You can sign up for a free ion account at <a href="https://cesium.com">https://cesium.com</a>.</b>`;mj=new St(t,!0)}return mj}};var mh=aL;function hc(e,t){C.defined("endpoint",e),C.defined("endpointResource",t);let n,i=e.externalType,o=c(i);if(!o)n={url:e.url,retryAttempts:1,retryCallback:G1e};else if(i==="3DTILES"||i==="STK_TERRAIN_SERVER")n={url:e.options.url};else throw new ie("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");Te.call(this,n),this._ionEndpoint=e,this._ionEndpointDomain=o?void 0:new pj.default(e.url).authority(),this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=o}c(Object.create)&&(hc.prototype=Object.create(Te.prototype),hc.prototype.constructor=hc);hc.fromAssetId=function(e,t){let n=hc._createEndpointResource(e,t);return n.fetchJson().then(function(i){return new hc(i,n)})};Object.defineProperties(hc.prototype,{credits:{get:function(){return c(this._ionRoot)?this._ionRoot.credits:c(this._credits)?this._credits:(this._credits=hc.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource),this._credits)}}});hc.getCreditsFromEndpoint=function(e,t){let n=e.attributions.map(St.getIonCredit),i=mh.getDefaultTokenCredit(t.queryParameters.access_token);return c(i)&&n.push(St.clone(i)),n};hc.prototype.clone=function(e){let t=g(this._ionRoot,this);return c(e)||(e=new hc(t._ionEndpoint,t._ionEndpointResource)),e=Te.prototype.clone.call(this,e),e._ionRoot=t,e._isExternal=this._isExternal,e};hc.prototype.fetchImage=function(e){if(!this._isExternal){let t=e;e={preferBlob:!0},c(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return Te.prototype.fetchImage.call(this,e)};hc.prototype._makeRequest=function(e){return this._isExternal||new pj.default(this.url).authority()!==this._ionEndpointDomain?Te.prototype._makeRequest.call(this,e):(c(e.headers)||(e.headers={}),e.headers.Authorization=`Bearer ${this._ionEndpoint.accessToken}`,e.headers["X-Cesium-Client"]="CesiumJS",typeof CESIUM_VERSION!="undefined"&&(e.headers["X-Cesium-Client-Version"]=CESIUM_VERSION),Te.prototype._makeRequest.call(this,e))};hc._createEndpointResource=function(e,t){C.defined("assetId",e),t=g(t,g.EMPTY_OBJECT);let n=g(t.server,mh.defaultServer),i=g(t.accessToken,mh.defaultAccessToken);n=Te.createIfNeeded(n);let o={url:`v1/assets/${e}/endpoint`};return c(i)&&(o.queryParameters={access_token:i}),n.getDerivedResource(o)};function G1e(e,t){let n=g(e._ionRoot,e),i=n._ionEndpointResource,o=typeof Image!="undefined";return!c(t)||t.statusCode!==401&&!(o&&t.target instanceof Image)?Promise.resolve(!1):(c(n._pendingPromise)||(n._pendingPromise=i.fetchJson().then(function(r){return n._ionEndpoint=r,r}).finally(function(r){return n._pendingPromise=void 0,r})),n._pendingPromise.then(function(r){return e._ionEndpoint=r,!0}))}var Uu=hc;function ph(e){e=g(e,0),this._array=new Array(e),this._length=e}Object.defineProperties(ph.prototype,{length:{get:function(){return this._length},set:function(e){C.typeOf.number.greaterThanOrEquals("length",e,0);let t=this._array,n=this._length;if(e<n)for(let i=e;i<n;++i)t[i]=void 0;else e>t.length&&(t.length=e);this._length=e}},values:{get:function(){return this._array}}});ph.prototype.get=function(e){return C.typeOf.number.lessThan("index",e,this._array.length),this._array[e]};ph.prototype.set=function(e,t){C.typeOf.number("index",e),e>=this._length&&(this.length=e+1),this._array[e]=t};ph.prototype.peek=function(){return this._array[this._length-1]};ph.prototype.push=function(e){let t=this.length++;this._array[t]=e};ph.prototype.pop=function(){if(this._length===0)return;let e=this._array[this._length-1];return--this.length,e};ph.prototype.reserve=function(e){C.typeOf.number.greaterThanOrEquals("length",e,0),e>this._array.length&&(this._array.length=e)};ph.prototype.resize=function(e){C.typeOf.number.greaterThanOrEquals("length",e,0),this.length=e};ph.prototype.trim=function(e){e=g(e,this._length),this._array.length=e};var $c=ph;var jm={X:0,Y:1,Z:2};jm.Y_UP_TO_Z_UP=N.fromRotationTranslation(q.fromArray([1,0,0,0,0,1,0,-1,0]));jm.Z_UP_TO_Y_UP=N.fromRotationTranslation(q.fromArray([1,0,0,0,0,-1,0,1,0]));jm.X_UP_TO_Z_UP=N.fromRotationTranslation(q.fromArray([0,0,1,0,1,0,-1,0,0]));jm.Z_UP_TO_X_UP=N.fromRotationTranslation(q.fromArray([0,0,-1,0,1,0,1,0,0]));jm.X_UP_TO_Y_UP=N.fromRotationTranslation(q.fromArray([0,1,0,-1,0,0,0,0,1]));jm.Y_UP_TO_X_UP=N.fromRotationTranslation(q.fromArray([0,-1,0,1,0,0,0,0,1]));jm.fromName=function(e){return C.typeOf.string("name",e),jm[e]};var vo=Object.freeze(jm);function Iee(e){e=g(e,g.EMPTY_OBJECT),C.typeOf.object("options.metadata",e.metadata),this._metadata=e.metadata}Object.defineProperties(Iee.prototype,{metadata:{get:function(){return this._metadata}}});var ST=Iee;function I_(e,t,n){if(!c(e))throw new w("uint8Array is required.");if(t<0)throw new w("byteOffset cannot be negative.");if(n<0)throw new w("byteLength cannot be negative.");if(t+n>e.byteLength)throw new w("sub-region exceeds array bounds.");return t=g(t,0),n=g(n,e.byteLength-t),e=e.subarray(t,t+n),I_.decode(e)}I_.decodeWithTextDecoder=function(e){return new TextDecoder("utf-8").decode(e)};I_.decodeWithFromCharCode=function(e){let t="",n=j1e(e),i=n.length;for(let o=0;o<i;++o){let r=n[o];r<=65535?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode((r>>10)+55296,(r&1023)+56320))}return t};function JS(e,t,n){return t<=e&&e<=n}function j1e(e){let t=0,n=0,i=0,o=128,r=191,s=[],a=e.length;for(let l=0;l<a;++l){let u=e[l];if(i===0){if(JS(u,0,127)){s.push(u);continue}if(JS(u,194,223)){i=1,t=u&31;continue}if(JS(u,224,239)){u===224&&(o=160),u===237&&(r=159),i=2,t=u&15;continue}if(JS(u,240,244)){u===240&&(o=144),u===244&&(r=143),i=3,t=u&7;continue}throw new ie("String decoding failed.")}if(!JS(u,o,r)){t=i=n=0,o=128,r=191,--l;continue}o=128,r=191,t=t<<6|u&63,++n,n===i&&(s.push(t),t=i=n=0)}return s}typeof TextDecoder!="undefined"?I_.decode=I_.decodeWithTextDecoder:I_.decode=I_.decodeWithFromCharCode;var Fl=I_;function W1e(e,t){return t=g(t,0),Fl(e,t,Math.min(4,e.length))}var _h=W1e;function zu(e,t,n,i){this._tileset=e,this._tile=t,this._resource=n,c(i)||(i=[]),this._contents=i,this._metadata=void 0,this._group=void 0,this._ready=!1}Object.defineProperties(zu.prototype,{featurePropertiesDirty:{get:function(){let e=this._contents,t=e.length;for(let n=0;n<t;++n)if(e[n].featurePropertiesDirty)return!0;return!1},set:function(e){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].featurePropertiesDirty=e}},featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){return this._contents}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e;let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].metadata=e}},batchTable:{get:function(){}},group:{get:function(){return this._group},set:function(e){this._group=e;let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].group=e}}});var QS=Uint32Array.BYTES_PER_ELEMENT;zu.fromTileType=async function(e,t,n,i,o,r){o=g(o,0);let s=new Uint8Array(i),a=new DataView(i);o+=QS;let l=a.getUint32(o,!0);if(l!==1)throw new ie(`Only Composite Tile version 1 is supported. Version ${l} is not.`);o+=QS,o+=QS;let u=a.getUint32(o,!0);o+=QS;let f=n.queryParameters.compositeIndex;c(f)?f=`${f}_`:f="";let h=[];h.length=u;for(let _=0;_<u;++_){let b=_h(s,o),x=a.getUint32(o+QS*2,!0),T=r[b],E=`${f}${_}`,S=n.getDerivedResource({queryParameters:{compositeIndex:E}});if(c(T))h[_]=Promise.resolve(T(e,t,S,i,o));else throw new ie(`Unknown tile content type, ${b}, inside Composite tile`);o+=x}let m=await Promise.all(h);return new zu(e,t,n,m)};zu.prototype.hasProperty=function(e,t){return!1};zu.prototype.getFeature=function(e){};zu.prototype.applyDebugSettings=function(e,t){let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].applyDebugSettings(e,t)};zu.prototype.applyStyle=function(e){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].applyStyle(e)};zu.prototype.update=function(e,t){let n=this._contents,i=n.length,o=!0;for(let r=0;r<i;++r)n[r].update(e,t),o=o&&n[r].ready;!this._ready&&o&&(this._ready=!0)};zu.prototype.pick=function(e,t,n){if(!this._ready)return;let i,o=Number.POSITIVE_INFINITY,r=this._contents,s=r.length;for(let a=0;a<s;++a){let l=r[a].pick(e,t,n);if(!c(l))continue;let u=d.distance(e.origin,l);u<o&&(i=l,o=u)}if(c(i))return n};zu.prototype.isDestroyed=function(){return!1};zu.prototype.destroy=function(){let e=this._contents,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return ue(this)};var cL=zu;function q1e(e,t,n){return JSON.parse(Fl(e,t,n))}var Do=q1e;function Ma(e){C.typeOf.number("options.featuresLength",e.featuresLength),C.typeOf.object("options.owner",e.owner),this._id=Bn();let t=e.featuresLength;this._showAlphaProperties=void 0,this._batchValues=void 0,this._batchValuesDirty=!1,this._batchTexture=void 0,this._defaultTexture=void 0,this._pickTexture=void 0,this._pickIds=[];let n,i;if(t>0){let o=Math.min(t,ht.maximumTextureSize),r=Math.ceil(t/ht.maximumTextureSize),s=1/o,a=s*.5,l=1/r,u=l*.5;n=new k(o,r),i=new ee(s,a,l,u)}this._translucentFeaturesLength=0,this._featuresLength=t,this._textureDimensions=n,this._textureStep=i,this._owner=e.owner,this._statistics=e.statistics,this._colorChangedCallback=e.colorChangedCallback}Object.defineProperties(Ma.prototype,{translucentFeaturesLength:{get:function(){return this._translucentFeaturesLength}},byteLength:{get:function(){let e=0;return c(this._pickTexture)&&(e+=this._pickTexture.sizeInBytes),c(this._batchTexture)&&(e+=this._batchTexture.sizeInBytes),e}},textureDimensions:{get:function(){return this._textureDimensions}},textureStep:{get:function(){return this._textureStep}},batchTexture:{get:function(){return this._batchTexture}},defaultTexture:{get:function(){return this._defaultTexture}},pickTexture:{get:function(){return this._pickTexture}}});Ma.DEFAULT_COLOR_VALUE=z.WHITE;Ma.DEFAULT_SHOW_VALUE=!0;function Oee(e){let t=e._textureDimensions;return t.x*t.y*4}function Pee(e){if(!c(e._batchValues)){let t=Oee(e),n=new Uint8Array(t).fill(255);e._batchValues=n}return e._batchValues}function Ree(e){if(!c(e._showAlphaProperties)){let t=2*e._featuresLength,n=new Uint8Array(t).fill(255);e._showAlphaProperties=n}return e._showAlphaProperties}function eA(e,t){if(!c(e)||e<0||e>=t)throw new w(`batchId is required and between zero and featuresLength - 1 (${t}`-+").")}Ma.prototype.setShow=function(e,t){if(eA(e,this._featuresLength),C.typeOf.bool("show",t),t&&!c(this._showAlphaProperties))return;let n=Ree(this),i=e*2,o=t?255:0;if(n[i]!==o){n[i]=o;let r=Pee(this),s=e*4+3;r[s]=t?n[i+1]:0,this._batchValuesDirty=!0}};Ma.prototype.setAllShow=function(e){C.typeOf.bool("show",e);let t=this._featuresLength;for(let n=0;n<t;++n)this.setShow(n,e)};Ma.prototype.getShow=function(e){if(eA(e,this._featuresLength),!c(this._showAlphaProperties))return!0;let t=e*2;return this._showAlphaProperties[t]===255};var Y1e=new Array(4);Ma.prototype.setColor=function(e,t){if(eA(e,this._featuresLength),C.typeOf.object("color",t),z.equals(t,Ma.DEFAULT_COLOR_VALUE)&&!c(this._batchValues))return;let n=t.toBytes(Y1e),i=n[3],o=Pee(this),r=e*4,s=Ree(this),a=e*2;if(o[r]!==n[0]||o[r+1]!==n[1]||o[r+2]!==n[2]||s[a+1]!==i){o[r]=n[0],o[r+1]=n[1],o[r+2]=n[2];let l=s[a+1]!==255,u=s[a]!==0;o[r+3]=u?i:0,s[a+1]=i;let f=i!==255;f&&!l?++this._translucentFeaturesLength:!f&&l&&--this._translucentFeaturesLength,this._batchValuesDirty=!0,c(this._colorChangedCallback)&&this._colorChangedCallback(e,t)}};Ma.prototype.setAllColor=function(e){C.typeOf.object("color",e);let t=this._featuresLength;for(let n=0;n<t;++n)this.setColor(n,e)};Ma.prototype.getColor=function(e,t){if(eA(e,this._featuresLength),C.typeOf.object("result",t),!c(this._batchValues))return z.clone(Ma.DEFAULT_COLOR_VALUE,t);let n=this._batchValues,i=e*4,o=this._showAlphaProperties,r=e*2;return z.fromBytes(n[i],n[i+1],n[i+2],o[r+1],t)};Ma.prototype.getPickColor=function(e){return eA(e,this._featuresLength),this._pickIds[e]};function Mee(e,t,n){let i=e._textureDimensions;return new Ot({context:t,pixelFormat:Re.RGBA,pixelDatatype:Ne.UNSIGNED_BYTE,source:{width:i.x,height:i.y,arrayBufferView:n},flipY:!1,sampler:Jt.NEAREST})}function X1e(e,t){let n=e._featuresLength;if(!c(e._pickTexture)&&n>0){let i=e._pickIds,o=Oee(e),r=new Uint8Array(o),s=e._owner,a=e._statistics;for(let l=0;l<n;++l){let u=t.createPickId(s.getFeature(l));i.push(u);let f=u.color,h=l*4;r[h]=z.floatToByte(f.red),r[h+1]=z.floatToByte(f.green),r[h+2]=z.floatToByte(f.blue),r[h+3]=z.floatToByte(f.alpha)}e._pickTexture=Mee(e,t,r),c(a)&&(a.batchTableByteLength+=e._pickTexture.sizeInBytes)}}function K1e(e){let t=e._textureDimensions;e._batchTexture.copyFrom({source:{width:t.x,height:t.y,arrayBufferView:e._batchValues}})}Ma.prototype.update=function(e,t){let n=t.context;this._defaultTexture=n.defaultTexture;let i=t.passes;(i.pick||i.postProcess)&&X1e(this,n),this._batchValuesDirty&&(this._batchValuesDirty=!1,c(this._batchTexture)||(this._batchTexture=Mee(this,n,this._batchValues),c(this._statistics)&&(this._statistics.batchTableByteLength+=this._batchTexture.sizeInBytes)),K1e(this))};Ma.prototype.isDestroyed=function(){return!1};Ma.prototype.destroy=function(){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),this._pickTexture=this._pickTexture&&this._pickTexture.destroy();let e=this._pickIds,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return ue(this)};var Zc=Ma;var $1e={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Z1e={SCALAR:void 0,VEC2:k,VEC3:d,VEC4:ee,MAT2:Li,MAT3:q,MAT4:N};function J1e(e){let t=e.componentType,n;typeof t=="string"?n=j.fromName(t):n=t;let i=$1e[e.type],o=Z1e[e.type];return{componentsPerAttribute:i,classType:o,createArrayBufferView:function(r,s,a){return j.createArrayBufferView(n,r,s,i*a)}}}var Vu=J1e;function Wm(e){this._classes=void 0,this._classIds=void 0,this._classIndexes=void 0,this._parentCounts=void 0,this._parentIndexes=void 0,this._parentIds=void 0,this._byteLength=0,C.typeOf.object("options.extension",e.extension),Q1e(this,e.extension,e.binaryBody),iMe(this)}Object.defineProperties(Wm.prototype,{byteLength:{get:function(){return this._byteLength}}});function Q1e(e,t,n){let i,o,r,s=t.instancesLength,a=t.classes,l=t.classIds,u=t.parentCounts,f=t.parentIds,h=s,m=0;c(l.byteOffset)&&(l.componentType=g(l.componentType,j.UNSIGNED_SHORT),l.type=tn.SCALAR,r=Vu(l),l=r.createArrayBufferView(n.buffer,n.byteOffset+l.byteOffset,s),m+=l.byteLength);let p;if(c(u)){for(c(u.byteOffset)&&(u.componentType=g(u.componentType,j.UNSIGNED_SHORT),u.type=tn.SCALAR,r=Vu(u),u=r.createArrayBufferView(n.buffer,n.byteOffset+u.byteOffset,s),m+=u.byteLength),p=new Uint16Array(s),h=0,i=0;i<s;++i)p[i]=h,h+=u[i];m+=p.byteLength}c(f)&&c(f.byteOffset)&&(f.componentType=g(f.componentType,j.UNSIGNED_SHORT),f.type=tn.SCALAR,r=Vu(f),f=r.createArrayBufferView(n.buffer,n.byteOffset+f.byteOffset,h),m+=f.byteLength);let _=a.length;for(i=0;i<_;++i){let T=a[i].length,E=a[i].instances,S=eMe(T,E,n);m+=tMe(S),a[i].instances=bt(S,E)}let b=new Array(_).fill(0),x=new Uint16Array(s);for(i=0;i<s;++i)o=l[i],x[i]=b[o],++b[o];m+=x.byteLength,e._classes=a,e._classIds=l,e._classIndexes=x,e._parentCounts=u,e._parentIndexes=p,e._parentIds=f,e._byteLength=m}function eMe(e,t,n){let i;for(let o in t)if(t.hasOwnProperty(o)){let r=t[o],s=r.byteOffset;if(c(s)){let a=r.componentType,l=r.type;if(!c(a))throw new ie("componentType is required.");if(!c(l))throw new ie("type is required.");if(!c(n))throw new ie(`Property ${o} requires a batch table binary.`);let u=Vu(r),f=u.componentsPerAttribute,h=u.classType,m=u.createArrayBufferView(n.buffer,n.byteOffset+s,e);c(i)||(i={}),i[o]={typedArray:m,componentCount:f,type:h}}}return i}function tMe(e){let t=0;for(let n in e)e.hasOwnProperty(n)&&(t+=e[n].typedArray.byteLength);return t}var nMe=[];function iMe(e){let t=nMe;t.length=0;let i=e._classIds.length;for(let o=0;o<i;++o)Lee(e,o,t)}function Lee(e,t,n){let i=e._parentCounts,o=e._parentIds,r=e._parentIndexes,a=e._classIds.length;if(!c(o))return;if(t>=a)throw new w(`Parent index ${t} exceeds the total number of instances: ${a}`);if(n.indexOf(t)>-1)throw new w("Circular dependency detected in the batch table hierarchy.");n.push(t);let l=c(i)?i[t]:1,u=c(i)?r[t]:t;for(let f=0;f<l;++f){let h=o[u+f];h!==t&&Lee(e,h,n)}n.pop(t)}var oMe=[],rMe=[],sMe=0;function aMe(e,t,n){let i=e._classIds,o=e._parentCounts,r=e._parentIds,s=e._parentIndexes,a=i.length,l=oMe;l.length=Math.max(l.length,a);let u=++sMe,f=rMe;for(f.length=0,f.push(t);f.length>0;){if(t=f.pop(),l[t]===u)continue;l[t]=u;let h=n(e,t);if(c(h))return h;let m=o[t],p=s[t];for(let _=0;_<m;++_){let b=r[p+_];b!==t&&f.push(b)}}}function cMe(e,t,n){let i=!0;for(;i;){let o=n(e,t);if(c(o))return o;let r=e._parentIds[t];i=r!==t,t=r}}function tA(e,t,n){let i=e._parentCounts,o=e._parentIds;if(c(o)){if(c(i))return aMe(e,t,n)}else return n(e,t);return cMe(e,t,n)}Wm.prototype.hasProperty=function(e,t){let n=tA(this,e,function(i,o){let r=i._classIds[o],s=i._classes[r].instances;if(c(s[t]))return!0});return c(n)};Wm.prototype.propertyExists=function(e){let t=this._classes,n=t.length;for(let i=0;i<n;++i){let o=t[i].instances;if(c(o[e]))return!0}return!1};Wm.prototype.getPropertyIds=function(e,t){return t=c(t)?t:[],t.length=0,tA(this,e,function(n,i){let o=n._classIds[i],r=n._classes[o].instances;for(let s in r)r.hasOwnProperty(s)&&t.indexOf(s)===-1&&t.push(s)}),t};Wm.prototype.getProperty=function(e,t){return tA(this,e,function(n,i){let o=n._classIds[i],r=n._classes[o],s=n._classIndexes[i],a=r.instances[t];if(c(a))return c(a.typedArray)?lMe(a,s):ze(a[s],!0)})};function lMe(e,t){let n=e.typedArray,i=e.componentCount;return i===1?n[t]:e.type.unpack(n,t*i)}Wm.prototype.setProperty=function(e,t,n){let i=tA(this,e,function(o,r){let s=o._classIds[r],a=o._classes[s],l=o._classIndexes[r],u=a.instances[t];if(c(u)){if(r!==e)throw new w(`Inherited property "${t}" is read-only.`);return c(u.typedArray)?uMe(u,l,n):u[l]=ze(n,!0),!0}});return c(i)};function uMe(e,t,n){let i=e.typedArray,o=e.componentCount;o===1?i[t]=n:e.type.pack(n,i,t*o)}Wm.prototype.isClass=function(e,t){let n=tA(this,e,function(i,o){let r=i._classIds[o];if(i._classes[r].name===t)return!0});return c(n)};Wm.prototype.getClassName=function(e){let t=this._classIds[e];return this._classes[t].name};var AT=Wm;var fMe={HIGHLIGHT:0,REPLACE:1,MIX:2},O_=Object.freeze(fMe);var _j=Zc.DEFAULT_COLOR_VALUE,gj=Zc.DEFAULT_SHOW_VALUE;function to(e,t,n,i,o){this.featuresLength=t;let r;c(n)&&(r=n.extensions),this._extensions=g(r,{});let s=dMe(n);this._properties=s,this._batchTableHierarchy=hMe(this,n,i);let a=Fee(t,s,i);this._binaryPropertiesByteLength=mMe(a),this._batchTableBinaryProperties=a,this._content=e,this._batchTexture=new Zc({featuresLength:t,colorChangedCallback:o,owner:e,statistics:e.tileset.statistics})}to._deprecationWarning=os;Object.defineProperties(to.prototype,{batchTableByteLength:{get:function(){let e=this._binaryPropertiesByteLength;return c(this._batchTableHierarchy)&&(e+=this._batchTableHierarchy.byteLength),e+=this._batchTexture.byteLength,e}}});function dMe(e){let t={};if(!c(e))return t;for(let n in e)e.hasOwnProperty(n)&&n!=="HIERARCHY"&&n!=="extensions"&&n!=="extras"&&(t[n]=ze(e[n],!0));return t}function hMe(e,t,n){if(!c(t))return;let i=e._extensions["3DTILES_batch_table_hierarchy"],o=t.HIERARCHY;if(c(o)&&(to._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),e._extensions["3DTILES_batch_table_hierarchy"]=o,i=o),!!c(i))return new AT({extension:i,binaryBody:n})}function Fee(e,t,n){let i;for(let o in t)if(t.hasOwnProperty(o)){let r=t[o],s=r.byteOffset;if(c(s)){let a=r.componentType,l=r.type;if(!c(a))throw new ie("componentType is required.");if(!c(l))throw new ie("type is required.");if(!c(n))throw new ie(`Property ${o} requires a batch table binary.`);let u=Vu(r),f=u.componentsPerAttribute,h=u.classType,m=u.createArrayBufferView(n.buffer,n.byteOffset+s,e);c(i)||(i={}),i[o]={typedArray:m,componentCount:f,type:h}}}return i}function mMe(e){if(!c(e))return 0;let t=0;for(let n in e)e.hasOwnProperty(n)&&(t+=e[n].typedArray.byteLength);return t}to.getBinaryProperties=function(e,t,n){return Fee(e,t,n)};to.prototype.setShow=function(e,t){this._batchTexture.setShow(e,t)};to.prototype.setAllShow=function(e){this._batchTexture.setAllShow(e)};to.prototype.getShow=function(e){return this._batchTexture.getShow(e)};to.prototype.setColor=function(e,t){this._batchTexture.setColor(e,t)};to.prototype.setAllColor=function(e){this._batchTexture.setAllColor(e)};to.prototype.getColor=function(e,t){return this._batchTexture.getColor(e,t)};to.prototype.getPickColor=function(e){return this._batchTexture.getPickColor(e)};var pMe=new z;to.prototype.applyStyle=function(e){if(!c(e)){this.setAllColor(_j),this.setAllShow(gj);return}let t=this._content,n=this.featuresLength;for(let i=0;i<n;++i){let o=t.getFeature(i),r=c(e.color)?g(e.color.evaluateColor(o,pMe),_j):_j,s=c(e.show)?g(e.show.evaluate(o),gj):gj;this.setColor(i,r),this.setShow(i,s)}};function _Me(e,t){let n=e.typedArray,i=e.componentCount;return i===1?n[t]:e.type.unpack(n,t*i)}function gMe(e,t,n){let i=e.typedArray,o=e.componentCount;o===1?i[t]=n:e.type.pack(n,i,t*o)}function vT(e,t){if(!c(e)||e<0||e>=t)throw new w(`batchId is required and must be between zero and featuresLength - 1 (${t}`-+").")}to.prototype.isClass=function(e,t){vT(e,this.featuresLength),C.typeOf.string("className",t);let n=this._batchTableHierarchy;return c(n)?n.isClass(e,t):!1};to.prototype.isExactClass=function(e,t){return C.typeOf.string("className",t),this.getExactClassName(e)===t};to.prototype.getExactClassName=function(e){vT(e,this.featuresLength);let t=this._batchTableHierarchy;if(c(t))return t.getClassName(e)};to.prototype.hasProperty=function(e,t){return vT(e,this.featuresLength),C.typeOf.string("name",t),c(this._properties[t])||c(this._batchTableHierarchy)&&this._batchTableHierarchy.hasProperty(e,t)};to.prototype.hasPropertyBySemantic=function(){return!1};to.prototype.getPropertyIds=function(e,t){vT(e,this.featuresLength),t=c(t)?t:[],t.length=0;let n=Object.keys(this._properties);return t.push.apply(t,n),c(this._batchTableHierarchy)&&t.push.apply(t,this._batchTableHierarchy.getPropertyIds(e,n)),t};to.prototype.getPropertyBySemantic=function(e,t){};to.prototype.getProperty=function(e,t){if(vT(e,this.featuresLength),C.typeOf.string("name",t),c(this._batchTableBinaryProperties)){let i=this._batchTableBinaryProperties[t];if(c(i))return _Me(i,e)}let n=this._properties[t];if(c(n))return ze(n[e],!0);if(c(this._batchTableHierarchy)){let i=this._batchTableHierarchy.getProperty(e,t);if(c(i))return i}};to.prototype.setProperty=function(e,t,n){let i=this.featuresLength;if(vT(e,i),C.typeOf.string("name",t),c(this._batchTableBinaryProperties)){let r=this._batchTableBinaryProperties[t];if(c(r)){gMe(r,e,n);return}}if(c(this._batchTableHierarchy)&&this._batchTableHierarchy.setProperty(e,t,n))return;let o=this._properties[t];c(o)||(this._properties[t]=new Array(i),o=this._properties[t]),o[e]=ze(n,!0)};function yMe(e){return e._batchTexture.textureDimensions.y===1?`uniform vec4 tile_textureStep;
| vec2 computeSt(float batchId)
| {
| float stepX = tile_textureStep.x;
| float centerX = tile_textureStep.y;
| return vec2(centerX + (batchId * stepX), 0.5);
| }
| `:`uniform vec4 tile_textureStep;
| uniform vec2 tile_textureDimensions;
| vec2 computeSt(float batchId)
| {
| float stepX = tile_textureStep.x;
| float centerX = tile_textureStep.y;
| float stepY = tile_textureStep.z;
| float centerY = tile_textureStep.w;
| float xId = mod(batchId, tile_textureDimensions.x);
| float yId = floor(batchId / tile_textureDimensions.x);
| return vec2(centerX + (xId * stepX), centerY + (yId * stepY));
| }
| `}to.prototype.getVertexShaderCallback=function(e,t,n){if(this.featuresLength===0)return;let i=this;return function(o){let r=Bee(o,n,!1),s;return ht.maximumVertexTextureImageUnits>0?(s="",e&&(s+=`uniform bool tile_translucentCommand;
| `),s+=`uniform sampler2D tile_batchTexture;
| out vec4 tile_featureColor;
| out vec2 tile_featureSt;
| void main()
| {
| vec2 st = computeSt(${t});
| vec4 featureProperties = texture(tile_batchTexture, st);
| tile_color(featureProperties);
| float show = ceil(featureProperties.a);
| gl_Position *= show;
| `,e&&(s+=` bool isStyleTranslucent = (featureProperties.a != 1.0);
| if (czm_pass == czm_passTranslucent)
| {
| if (!isStyleTranslucent && !tile_translucentCommand)
| {
| gl_Position *= 0.0;
| }
| }
| else
| {
| if (isStyleTranslucent)
| {
| gl_Position *= 0.0;
| }
| }
| `),s+=` tile_featureColor = featureProperties;
| tile_featureSt = st;
| }`):s=`out vec2 tile_featureSt;
| void main()
| {
| tile_color(vec4(1.0));
| tile_featureSt = computeSt(${t});
| }`,`${r}
| ${yMe(i)}${s}`}};function Nee(e,t){return e=Be.replaceMain(e,"tile_main"),t?`${e}uniform float tile_colorBlend;
| void tile_color(vec4 tile_featureColor)
| {
| tile_main();
| tile_featureColor = czm_gammaCorrect(tile_featureColor);
| out_FragColor.a *= tile_featureColor.a;
| float highlight = ceil(tile_colorBlend);
| out_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight);
| }
| `:`${e}void tile_color(vec4 tile_featureColor)
| {
| tile_main();
| }
| `}function bMe(e,t){let n=`texture(${t}`,i=0,o=e.indexOf(n,i),r;for(;o>-1;){let s=0;for(let u=o;u<e.length;++u){let f=e.charAt(u);if(f==="(")++s;else if(f===")"&&(--s,s===0)){r=u+1;break}}let l=`tile_diffuse_final(${e.slice(o,r)}, tile_diffuse)`;e=e.slice(0,o)+l+e.slice(r),i=o+l.length,o=e.indexOf(n,i)}return e}function Bee(e,t,n){if(!c(t))return Nee(e,n);let i=new RegExp(`(uniform|attribute|in)\\s+(vec[34]|sampler2D)\\s+${t};`),o=e.match(i);if(!c(o))return Nee(e,n);let r=o[0],s=o[2];e=Be.replaceMain(e,"tile_main"),e=e.replace(r,"");let a=`bool isWhite(vec3 color)
| {
| return all(greaterThan(color, vec3(1.0 - czm_epsilon3)));
| }
| vec4 tile_diffuse_final(vec4 sourceDiffuse, vec4 tileDiffuse)
| {
| vec4 blendDiffuse = mix(sourceDiffuse, tileDiffuse, tile_colorBlend);
| vec4 diffuse = isWhite(tileDiffuse.rgb) ? sourceDiffuse : blendDiffuse;
| return vec4(diffuse.rgb, sourceDiffuse.a);
| }
| `,l=` tile_featureColor = czm_gammaCorrect(tile_featureColor);
| out_FragColor.a *= tile_featureColor.a;
| float highlight = ceil(tile_colorBlend);
| out_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight);
| `,u;if(s==="vec3"||s==="vec4"){let f=s==="vec3"?`vec4(${t}, 1.0)`:t,h=s==="vec3"?"tile_diffuse.xyz":"tile_diffuse";i=new RegExp(t,"g"),e=e.replace(i,h),u=` vec4 source = ${f};
| tile_diffuse = tile_diffuse_final(source, tile_featureColor);
| tile_main();
| `}else s==="sampler2D"&&(e=bMe(e,t),u=` tile_diffuse = tile_featureColor;
| tile_main();
| `);return e=`uniform float tile_colorBlend;
| vec4 tile_diffuse = vec4(1.0);
| ${a}${r}
| ${e}
| void tile_color(vec4 tile_featureColor)
| {
| ${u}`,n&&(e+=l),e+=`}
| `,e}to.prototype.getFragmentShaderCallback=function(e,t,n){if(this.featuresLength!==0)return function(i){return i=Bee(i,t,!0),ht.maximumVertexTextureImageUnits>0?(i+=`uniform sampler2D tile_pickTexture;
| in vec2 tile_featureSt;
| in vec4 tile_featureColor;
| void main()
| {
| tile_color(tile_featureColor);
| `,n&&(i+=` out_FragColor.rgb *= out_FragColor.a;
| `),i+="}"):(e&&(i+=`uniform bool tile_translucentCommand;
| `),i+=`uniform sampler2D tile_pickTexture;
| uniform sampler2D tile_batchTexture;
| in vec2 tile_featureSt;
| void main()
| {
| vec4 featureProperties = texture(tile_batchTexture, tile_featureSt);
| if (featureProperties.a == 0.0) {
| discard;
| }
| `,e&&(i+=` bool isStyleTranslucent = (featureProperties.a != 1.0);
| if (czm_pass == czm_passTranslucent)
| {
| if (!isStyleTranslucent && !tile_translucentCommand)
| {
| discard;
| }
| }
| else
| {
| if (isStyleTranslucent)
| {
| discard;
| }
| }
| `),i+=` tile_color(featureProperties);
| `,n&&(i+=` out_FragColor.rgb *= out_FragColor.a;
| `),i+=`}
| `),i}};to.prototype.getClassificationFragmentShaderCallback=function(){if(this.featuresLength!==0)return function(e){return e=Be.replaceMain(e,"tile_main"),ht.maximumVertexTextureImageUnits>0?e+=`uniform sampler2D tile_pickTexture;
| in vec2 tile_featureSt;
| in vec4 tile_featureColor;
| void main()
| {
| tile_main();
| out_FragColor = tile_featureColor;
| out_FragColor.rgb *= out_FragColor.a;
| }`:e+=`uniform sampler2D tile_batchTexture;
| uniform sampler2D tile_pickTexture;
| in vec2 tile_featureSt;
| void main()
| {
| tile_main();
| vec4 featureProperties = texture(tile_batchTexture, tile_featureSt);
| if (featureProperties.a == 0.0) {
| discard;
| }
| out_FragColor = featureProperties;
| out_FragColor.rgb *= out_FragColor.a;
| }
| `,e}};function xMe(e){let t=e._content.tileset,n=t.colorBlendMode,i=t.colorBlendAmount;if(n===O_.HIGHLIGHT)return 0;if(n===O_.REPLACE)return 1;if(n===O_.MIX)return O.clamp(i,O.EPSILON4,1);throw new w(`Invalid color blend mode "${n}".`)}to.prototype.getUniformMapCallback=function(){if(this.featuresLength===0)return;let e=this;return function(t){return bt(t,{tile_batchTexture:function(){return g(e._batchTexture.batchTexture,e._batchTexture.defaultTexture)},tile_textureDimensions:function(){return e._batchTexture.textureDimensions},tile_textureStep:function(){return e._batchTexture.textureStep},tile_colorBlend:function(){return xMe(e)},tile_pickTexture:function(){return e._batchTexture.pickTexture}})}};to.prototype.getPickId=function(){return"texture(tile_pickTexture, tile_featureSt)"};var P_={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};to.prototype.addDerivedCommands=function(e,t){let n=e.commandList,i=n.length,o=this._content._tile,r=o._finalResolution,s=o.tileset,a=s.isSkippingLevelOfDetail&&s.hasMixedContent&&e.context.stencilBuffer,l=TMe(this);for(let u=t;u<i;++u){let f=n[u];if(f.pass===xe.COMPUTE)continue;let h=f.derivedCommands.tileset;(!c(h)||f.dirty)&&(h={},f.derivedCommands.tileset=h,h.originalCommand=CMe(f),f.dirty=!1);let m=h.originalCommand;l!==P_.ALL_OPAQUE&&f.pass!==xe.TRANSLUCENT&&(c(h.translucent)||(h.translucent=EMe(m))),l!==P_.ALL_TRANSLUCENT&&f.pass!==xe.TRANSLUCENT&&(c(h.opaque)||(h.opaque=wMe(m)),a&&(r||(c(h.zback)||(h.zback=AMe(e.context,m)),s._backfaceCommands.push(h.zback)),(!c(h.stencil)||o._selectionDepth!==DMe(h.stencil))&&(f.renderState.depthMask?h.stencil=vMe(m,o._selectionDepth):h.stencil=h.opaque)));let p=a?h.stencil:h.opaque,_=h.translucent;f.pass!==xe.TRANSLUCENT?(l===P_.ALL_OPAQUE&&(n[u]=p),l===P_.ALL_TRANSLUCENT&&(n[u]=_),l===P_.OPAQUE_AND_TRANSLUCENT&&(n[u]=p,n.push(_))):n[u]=m}};function TMe(e){let t=e._batchTexture.translucentFeaturesLength;return t===0?P_.ALL_OPAQUE:t===e.featuresLength?P_.ALL_TRANSLUCENT:P_.OPAQUE_AND_TRANSLUCENT}function CMe(e){let t=Ke.shallowClone(e),n=t.pass===xe.TRANSLUCENT;return t.uniformMap=c(t.uniformMap)?t.uniformMap:{},t.uniformMap.tile_translucentCommand=function(){return n},t}function EMe(e){let t=Ke.shallowClone(e);return t.pass=xe.TRANSLUCENT,t.renderState=IMe(e.renderState),t}function wMe(e){let t=Ke.shallowClone(e);return t.renderState=OMe(e.renderState),t}function SMe(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");if(!c(n)){let i=t.fragmentShaderSource.clone();i.defines=c(i.defines)?i.defines.slice(0):[],i.defines.push("POLYGON_OFFSET"),n=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:i,attributeLocations:t._attributeLocations})}return n}function AMe(e,t){let n=Ke.shallowClone(t),i=ze(n.renderState,!0);i.cull.enabled=!0,i.cull.face=pi.FRONT,i.colorMask={red:!1,green:!1,blue:!1,alpha:!1},i.polygonOffset={enabled:!0,factor:5,units:5},i.stencilTest=kt.setCesium3DTileBit(),i.stencilMask=kt.CESIUM_3D_TILE_MASK,n.renderState=Fe.fromCache(i),n.castShadows=!1,n.receiveShadows=!1,n.uniformMap=ze(t.uniformMap);let o=new k(5,5);return n.uniformMap.u_polygonOffset=function(){return o},n.shaderProgram=SMe(e,t.shaderProgram),n}function vMe(e,t){let n=Ke.shallowClone(e),i=ze(n.renderState,!0);return i.stencilTest.enabled=!0,i.stencilTest.mask=kt.SKIP_LOD_MASK,i.stencilTest.reference=kt.CESIUM_3D_TILE_MASK|t<<kt.SKIP_LOD_BIT_SHIFT,i.stencilTest.frontFunction=Nn.GREATER_OR_EQUAL,i.stencilTest.frontOperation.zPass=ut.REPLACE,i.stencilTest.backFunction=Nn.GREATER_OR_EQUAL,i.stencilTest.backOperation.zPass=ut.REPLACE,i.stencilMask=kt.CESIUM_3D_TILE_MASK|kt.SKIP_LOD_MASK,n.renderState=Fe.fromCache(i),n}function DMe(e){return(e.renderState.stencilTest.reference&kt.SKIP_LOD_MASK)>>>kt.SKIP_LOD_BIT_SHIFT}function IMe(e){let t=ze(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=cn.ALPHA_BLEND,t.stencilTest=kt.setCesium3DTileBit(),t.stencilMask=kt.CESIUM_3D_TILE_MASK,Fe.fromCache(t)}function OMe(e){let t=ze(e,!0);return t.stencilTest=kt.setCesium3DTileBit(),t.stencilMask=kt.CESIUM_3D_TILE_MASK,Fe.fromCache(t)}to.prototype.update=function(e,t){this._batchTexture.update(e,t)};to.prototype.isDestroyed=function(){return!1};to.prototype.destroy=function(){return this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),ue(this)};var R_=to;function PMe(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var qm=PMe;var nA=`in vec3 position;
| in float a_batchId;
|
| uniform mat4 u_modifiedModelViewProjection;
|
| void main()
| {
| gl_Position = czm_depthClamp(u_modifiedModelViewProjection * vec4(position, 1.0));
| }
| `;function Hu(e,t){this._content=e,this._batchId=t,this._color=void 0}Object.defineProperties(Hu.prototype,{show:{get:function(){return this._content.batchTable.getShow(this._batchId)},set:function(e){this._content.batchTable.setShow(this._batchId,e)}},color:{get:function(){return c(this._color)||(this._color=new z),this._content.batchTable.getColor(this._batchId,this._color)},set:function(e){this._content.batchTable.setColor(this._batchId,e)}},polylinePositions:{get:function(){if(c(this._content.getPolylinePositions))return this._content.getPolylinePositions(this._batchId)}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},featureId:{get:function(){return this._batchId}},pickId:{get:function(){return this._content.batchTable.getPickColor(this._batchId)}}});Hu.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)};Hu.prototype.getPropertyIds=function(e){return this._content.batchTable.getPropertyIds(this._batchId,e)};Hu.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)};Hu.getPropertyInherited=function(e,t,n){let i=e.batchTable;if(c(i)){if(i.hasPropertyBySemantic(t,n))return i.getPropertyBySemantic(t,n);if(i.hasProperty(t,n))return i.getProperty(t,n)}let o=e.metadata;if(c(o)){if(o.hasPropertyBySemantic(n))return o.getPropertyBySemantic(n);if(o.hasProperty(n))return o.getProperty(n)}let r=e.tile,s=r.metadata;if(c(s)){if(s.hasPropertyBySemantic(n))return s.getPropertyBySemantic(n);if(s.hasProperty(n))return s.getProperty(n)}let a;if(c(r.implicitSubtree)&&(a=r.implicitSubtree.metadata),c(a)){if(a.hasPropertyBySemantic(n))return a.getPropertyBySemantic(n);if(a.hasProperty(n))return a.getProperty(n)}let l=c(e.group)?e.group.metadata:void 0;if(c(l)){if(l.hasPropertyBySemantic(n))return l.getPropertyBySemantic(n);if(l.hasProperty(n))return l.getProperty(n)}let u=e.tileset.metadata;if(c(u)){if(u.hasPropertyBySemantic(n))return u.getPropertyBySemantic(n);if(u.hasProperty(n))return u.getProperty(n)}};Hu.prototype.getPropertyInherited=function(e){return Hu.getPropertyInherited(this._content,this._batchId,e)};Hu.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0};Hu.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)};Hu.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)};Hu.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)};var Jc=Hu;var yj=class{add(t,n,i){if(typeof arguments[0]!="string")for(let o in arguments[0])this.add(o,arguments[0][o],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(o){this[o]=this[o]||[],n&&this[o][i?"unshift":"push"](n)},this)}run(t,n){this[t]=this[t]||[],this[t].forEach(function(i){i.call(n&&n.context?n.context:n,n)})}},bj=class{constructor(t){this.jsep=t,this.registered={}}register(...t){t.forEach(n=>{if(typeof n!="object"||!n.name||!n.init)throw new Error("Invalid JSEP plugin format");this.registered[n.name]||(n.init(this.jsep),this.registered[n.name]=n)})}},Qc=class e{static get version(){return"1.3.9"}static toString(){return"JavaScript Expression Parser (JSEP) v"+e.version}static addUnaryOp(t){return e.max_unop_len=Math.max(t.length,e.max_unop_len),e.unary_ops[t]=1,e}static addBinaryOp(t,n,i){return e.max_binop_len=Math.max(t.length,e.max_binop_len),e.binary_ops[t]=n,i?e.right_associative.add(t):e.right_associative.delete(t),e}static addIdentifierChar(t){return e.additional_identifier_chars.add(t),e}static addLiteral(t,n){return e.literals[t]=n,e}static removeUnaryOp(t){return delete e.unary_ops[t],t.length===e.max_unop_len&&(e.max_unop_len=e.getMaxKeyLen(e.unary_ops)),e}static removeAllUnaryOps(){return e.unary_ops={},e.max_unop_len=0,e}static removeIdentifierChar(t){return e.additional_identifier_chars.delete(t),e}static removeBinaryOp(t){return delete e.binary_ops[t],t.length===e.max_binop_len&&(e.max_binop_len=e.getMaxKeyLen(e.binary_ops)),e.right_associative.delete(t),e}static removeAllBinaryOps(){return e.binary_ops={},e.max_binop_len=0,e}static removeLiteral(t){return delete e.literals[t],e}static removeAllLiterals(){return e.literals={},e}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new e(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(n=>n.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return e.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!e.binary_ops[String.fromCharCode(t)]||e.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return e.isIdentifierStart(t)||e.isDecimalDigit(t)}throwError(t){let n=new Error(t+" at character "+this.index);throw n.index=this.index,n.description=t,n}runHook(t,n){if(e.hooks[t]){let i={context:this,node:n};return e.hooks.run(t,i),i.node}return n}searchHook(t){if(e.hooks[t]){let n={context:this};return e.hooks[t].find(function(i){return i.call(n.context,n),n.node}),n.node}}gobbleSpaces(){let t=this.code;for(;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let t=this.gobbleExpressions(),n=t.length===1?t[0]:{type:e.COMPOUND,body:t};return this.runHook("after-all",n)}gobbleExpressions(t){let n=[],i,o;for(;this.index<this.expr.length;)if(i=this.code,i===e.SEMCOL_CODE||i===e.COMMA_CODE)this.index++;else if(o=this.gobbleExpression())n.push(o);else if(this.index<this.expr.length){if(i===t)break;this.throwError('Unexpected "'+this.char+'"')}return n}gobbleExpression(){let t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,e.max_binop_len),n=t.length;for(;n>0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=n,t;t=t.substr(0,--n)}return!1}gobbleBinaryExpression(){let t,n,i,o,r,s,a,l,u;if(s=this.gobbleToken(),!s||(n=this.gobbleBinaryOp(),!n))return s;for(r={value:n,prec:e.binaryPrecedence(n),right_a:e.right_associative.has(n)},a=this.gobbleToken(),a||this.throwError("Expected expression after "+n),o=[s,r,a];n=this.gobbleBinaryOp();){if(i=e.binaryPrecedence(n),i===0){this.index-=n.length;break}r={value:n,prec:i,right_a:e.right_associative.has(n)},u=n;let f=h=>r.right_a&&h.right_a?i>h.prec:i<=h.prec;for(;o.length>2&&f(o[o.length-2]);)a=o.pop(),n=o.pop().value,s=o.pop(),t={type:e.BINARY_EXP,operator:n,left:s,right:a},o.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+u),o.push(r,t)}for(l=o.length-1,t=o[l];l>1;)t={type:e.BINARY_EXP,operator:o[l-1].value,left:o[l-2],right:t},l-=2;return t}gobbleToken(){let t,n,i,o;if(this.gobbleSpaces(),o=this.searchHook("gobble-token"),o)return this.runHook("after-token",o);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)o=this.gobbleArray();else{for(n=this.expr.substr(this.index,e.max_unop_len),i=n.length;i>0;){if(e.unary_ops.hasOwnProperty(n)&&(!e.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+n.length)))){this.index+=i;let r=this.gobbleToken();return r||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:e.UNARY_EXP,operator:n,argument:r,prefix:!0})}n=n.substr(0,--i)}e.isIdentifierStart(t)?(o=this.gobbleIdentifier(),e.literals.hasOwnProperty(o.name)?o={type:e.LITERAL,value:e.literals[o.name],raw:o.name}:o.name===e.this_str&&(o={type:e.THIS_EXP})):t===e.OPAREN_CODE&&(o=this.gobbleGroup())}return o?(o=this.gobbleTokenProperty(o),this.runHook("after-token",o)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let n=this.code;for(;n===e.PERIOD_CODE||n===e.OBRACK_CODE||n===e.OPAREN_CODE||n===e.QUMARK_CODE;){let i;if(n===e.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==e.PERIOD_CODE)break;i=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===e.OBRACK_CODE?(t={type:e.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),n=this.code,n!==e.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):n===e.OPAREN_CODE?t={type:e.CALL_EXP,arguments:this.gobbleArguments(e.CPAREN_CODE),callee:t}:(n===e.PERIOD_CODE||i)&&(i&&this.index--,this.gobbleSpaces(),t={type:e.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),i&&(t.optional=!0),this.gobbleSpaces(),n=this.code}return t}gobbleNumericLiteral(){let t="",n,i;for(;e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===e.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(n=this.char,n==="e"||n==="E"){for(t+=this.expr.charAt(this.index++),n=this.char,(n==="+"||n==="-")&&(t+=this.expr.charAt(this.index++));e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return i=this.code,e.isIdentifierStart(i)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(i===e.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===e.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:e.LITERAL,value:parseFloat(t),raw:t}}gobbleStringLiteral(){let t="",n=this.index,i=this.expr.charAt(this.index++),o=!1;for(;this.index<this.expr.length;){let r=this.expr.charAt(this.index++);if(r===i){o=!0;break}else if(r==="\\")switch(r=this.expr.charAt(this.index++),r){case"n":t+=`
| `;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=r}else t+=r}return o||this.throwError('Unclosed quote after "'+t+'"'),{type:e.LITERAL,value:t,raw:this.expr.substring(n,this.index)}}gobbleIdentifier(){let t=this.code,n=this.index;for(e.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,e.isIdentifierPart(t));)this.index++;return{type:e.IDENTIFIER,name:this.expr.slice(n,this.index)}}gobbleArguments(t){let n=[],i=!1,o=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let r=this.code;if(r===t){i=!0,this.index++,t===e.CPAREN_CODE&&o&&o>=n.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(r===e.COMMA_CODE){if(this.index++,o++,o!==n.length){if(t===e.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===e.CBRACK_CODE)for(let s=n.length;s<o;s++)n.push(null)}}else if(n.length!==o&&o!==0)this.throwError("Expected comma");else{let s=this.gobbleExpression();(!s||s.type===e.COMPOUND)&&this.throwError("Expected comma"),n.push(s)}}return i||this.throwError("Expected "+String.fromCharCode(t)),n}gobbleGroup(){this.index++;let t=this.gobbleExpressions(e.CPAREN_CODE);if(this.code===e.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:e.SEQUENCE_EXP,expressions:t}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:e.ARRAY_EXP,elements:this.gobbleArguments(e.CBRACK_CODE)}}},RMe=new yj;Object.assign(Qc,{hooks:RMe,plugins:new bj(Qc),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},right_associative:new Set,additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"});Qc.max_unop_len=Qc.getMaxKeyLen(Qc.unary_ops);Qc.max_binop_len=Qc.getMaxKeyLen(Qc.binary_ops);var M_=e=>new Qc(e).parse(),MMe=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(Qc).filter(e=>!MMe.includes(e)&&M_[e]===void 0).forEach(e=>{M_[e]=Qc[e]});M_.Jsep=Qc;var LMe="ConditionalExpression",NMe={name:"ternary",init(e){e.hooks.add("after-expression",function(n){if(n.node&&this.code===e.QUMARK_CODE){this.index++;let i=n.node,o=this.gobbleExpression();if(o||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let r=this.gobbleExpression();if(r||this.throwError("Expected expression"),n.node={type:LMe,test:i,consequent:o,alternate:r},i.operator&&e.binary_ops[i.operator]<=.9){let s=i;for(;s.right.operator&&e.binary_ops[s.right.operator]<=.9;)s=s.right;n.node.test=s.right,s.right=n.node,n.node=i}}else this.throwError("Expected :")}})}};M_.plugins.register(NMe);var FMe={VARIABLE:0,UNARY:1,BINARY:2,TERNARY:3,CONDITIONAL:4,MEMBER:5,FUNCTION_CALL:6,ARRAY:7,REGEX:8,VARIABLE_IN_STRING:9,LITERAL_NULL:10,LITERAL_BOOLEAN:11,LITERAL_NUMBER:12,LITERAL_STRING:13,LITERAL_COLOR:14,LITERAL_VECTOR:15,LITERAL_REGEX:16,LITERAL_UNDEFINED:17,BUILTIN_VARIABLE:18},pt=Object.freeze(FMe);function jf(e,t){C.typeOf.string("expression",e),this._expression=e,e=KMe(e,t),e=ZMe($Me(e)),M_.addBinaryOp("=~",0),M_.addBinaryOp("!~",0);let n;try{n=M_(e)}catch(i){throw new ie(i)}this._runtimeAst=_i(this,n)}Object.defineProperties(jf.prototype,{expression:{get:function(){return this._expression}}});var vn={arrayIndex:0,arrayArray:[[]],cartesian2Index:0,cartesian3Index:0,cartesian4Index:0,cartesian2Array:[new k],cartesian3Array:[new d],cartesian4Array:[new ee],reset:function(){this.arrayIndex=0,this.cartesian2Index=0,this.cartesian3Index=0,this.cartesian4Index=0},getArray:function(){this.arrayIndex>=this.arrayArray.length&&this.arrayArray.push([]);let e=this.arrayArray[this.arrayIndex++];return e.length=0,e},getCartesian2:function(){return this.cartesian2Index>=this.cartesian2Array.length&&this.cartesian2Array.push(new k),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new d),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new ee),this.cartesian4Array[this.cartesian4Index++]}};jf.prototype.evaluate=function(e,t){vn.reset();let n=this._runtimeAst.evaluate(e);return t instanceof z&&n instanceof ee?z.fromCartesian4(n,t):n instanceof k||n instanceof d||n instanceof ee?n.clone(t):n};jf.prototype.evaluateColor=function(e,t){vn.reset();let n=this._runtimeAst.evaluate(e);return z.fromCartesian4(n,t)};jf.prototype.getShaderFunction=function(e,t,n,i){let o=this.getShaderExpression(t,n);return o=`${i} ${e}
| {
| return ${o};
| }
| `,o};jf.prototype.getShaderExpression=function(e,t){return this._runtimeAst.getShaderExpression(e,t)};jf.prototype.getVariables=function(){let e=[];return this._runtimeAst.getVariables(e),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};var BMe=["!","-","+"],kee=["+","-","*","/","%","===","!==",">",">=","<","<=","&&","||","!~","=~"],fL=/\${(.*?)}/g,kMe=/\\/g,UMe="@#%",zMe=/@#%/g,dL=new z,hL={abs:Cs(Math.abs),sqrt:Cs(Math.sqrt),cos:Cs(Math.cos),sin:Cs(Math.sin),tan:Cs(Math.tan),acos:Cs(Math.acos),asin:Cs(Math.asin),atan:Cs(Math.atan),radians:Cs(O.toRadians),degrees:Cs(O.toDegrees),sign:Cs(O.sign),floor:Cs(Math.floor),ceil:Cs(Math.ceil),round:Cs(Math.round),exp:Cs(Math.exp),exp2:Cs(HMe),log:Cs(Math.log),log2:Cs(GMe),fract:Cs(VMe),length:jMe,normalize:WMe},mL={atan2:lL(Math.atan2,!1),pow:lL(Math.pow,!1),min:lL(Math.min,!0),max:lL(Math.max,!0),distance:qMe,dot:YMe,cross:XMe},Cj={clamp:Uee(O.clamp,!0),mix:Uee(O.lerp,!0)};function VMe(e){return e-Math.floor(e)}function HMe(e){return Math.pow(2,e)}function GMe(e){return O.log2(e)}function Cs(e){return function(t,n){if(typeof n=="number")return e(n);if(n instanceof k)return k.fromElements(e(n.x),e(n.y),vn.getCartesian2());if(n instanceof d)return d.fromElements(e(n.x),e(n.y),e(n.z),vn.getCartesian3());if(n instanceof ee)return ee.fromElements(e(n.x),e(n.y),e(n.z),e(n.w),vn.getCartesian4());throw new ie(`Function "${t}" requires a vector or number argument. Argument is ${n}.`)}}function lL(e,t){return function(n,i,o){if(t&&typeof o=="number"){if(typeof i=="number")return e(i,o);if(i instanceof k)return k.fromElements(e(i.x,o),e(i.y,o),vn.getCartesian2());if(i instanceof d)return d.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),vn.getCartesian3());if(i instanceof ee)return ee.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),e(i.w,o),vn.getCartesian4())}if(typeof i=="number"&&typeof o=="number")return e(i,o);if(i instanceof k&&o instanceof k)return k.fromElements(e(i.x,o.x),e(i.y,o.y),vn.getCartesian2());if(i instanceof d&&o instanceof d)return d.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),vn.getCartesian3());if(i instanceof ee&&o instanceof ee)return ee.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),e(i.w,o.w),vn.getCartesian4());throw new ie(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i} and ${o}.`)}}function Uee(e,t){return function(n,i,o,r){if(t&&typeof r=="number"){if(typeof i=="number"&&typeof o=="number")return e(i,o,r);if(i instanceof k&&o instanceof k)return k.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),vn.getCartesian2());if(i instanceof d&&o instanceof d)return d.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),e(i.z,o.z,r),vn.getCartesian3());if(i instanceof ee&&o instanceof ee)return ee.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),e(i.z,o.z,r),e(i.w,o.w,r),vn.getCartesian4())}if(typeof i=="number"&&typeof o=="number"&&typeof r=="number")return e(i,o,r);if(i instanceof k&&o instanceof k&&r instanceof k)return k.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),vn.getCartesian2());if(i instanceof d&&o instanceof d&&r instanceof d)return d.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),e(i.z,o.z,r.z),vn.getCartesian3());if(i instanceof ee&&o instanceof ee&&r instanceof ee)return ee.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),e(i.z,o.z,r.z),e(i.w,o.w,r.w),vn.getCartesian4());throw new ie(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i}, ${o}, and ${r}.`)}}function jMe(e,t){if(typeof t=="number")return Math.abs(t);if(t instanceof k)return k.magnitude(t);if(t instanceof d)return d.magnitude(t);if(t instanceof ee)return ee.magnitude(t);throw new ie(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}function WMe(e,t){if(typeof t=="number")return 1;if(t instanceof k)return k.normalize(t,vn.getCartesian2());if(t instanceof d)return d.normalize(t,vn.getCartesian3());if(t instanceof ee)return ee.normalize(t,vn.getCartesian4());throw new ie(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}function qMe(e,t,n){if(typeof t=="number"&&typeof n=="number")return Math.abs(t-n);if(t instanceof k&&n instanceof k)return k.distance(t,n);if(t instanceof d&&n instanceof d)return d.distance(t,n);if(t instanceof ee&&n instanceof ee)return ee.distance(t,n);throw new ie(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)}function YMe(e,t,n){if(typeof t=="number"&&typeof n=="number")return t*n;if(t instanceof k&&n instanceof k)return k.dot(t,n);if(t instanceof d&&n instanceof d)return d.dot(t,n);if(t instanceof ee&&n instanceof ee)return ee.dot(t,n);throw new ie(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)}function XMe(e,t,n){if(t instanceof d&&n instanceof d)return d.cross(t,n,vn.getCartesian3());throw new ie(`Function "${e}" requires vec3 arguments. Arguments are ${t} and ${n}.`)}function xt(e,t,n,i,o){this._type=e,this._value=t,this._left=n,this._right=i,this._test=o,this.evaluate=void 0,aLe(this)}function KMe(e,t){if(!c(t))return e;for(let n in t)if(t.hasOwnProperty(n)){let i=new RegExp(`\\$\\{${n}\\}`,"g"),o=`(${t[n]})`;c(o)&&(e=e.replace(i,o))}return e}function $Me(e){return e.replace(kMe,UMe)}function Tj(e){return e.replace(zMe,"\\")}function ZMe(e){let t=e,n="",i=t.indexOf("${");for(;i>=0;){let o=t.indexOf("'"),r=t.indexOf('"'),s;if(o>=0&&o<i)s=t.indexOf("'",o+1),n+=t.substr(0,s+1),t=t.substr(s+1),i=t.indexOf("${");else if(r>=0&&r<i)s=t.indexOf('"',r+1),n+=t.substr(0,s+1),t=t.substr(s+1),i=t.indexOf("${");else{n+=t.substr(0,i);let a=t.indexOf("}");if(a<0)throw new ie("Unmatched {.");n+=`czm_${t.substr(i+2,a-(i+2))}`,t=t.substr(a+1),i=t.indexOf("${")}}return n+=t,n}function JMe(e){let t=typeof e.value;if(e.value===null)return new xt(pt.LITERAL_NULL,null);if(t==="boolean")return new xt(pt.LITERAL_BOOLEAN,e.value);if(t==="number")return new xt(pt.LITERAL_NUMBER,e.value);if(t==="string")return e.value.indexOf("${")>=0?new xt(pt.VARIABLE_IN_STRING,e.value):new xt(pt.LITERAL_STRING,Tj(e.value))}function QMe(e,t){let n=t.arguments,i=n.length,o,r,s,a;if(t.callee.type==="MemberExpression"){o=t.callee.property.name;let l=t.callee.object;if(o==="test"||o==="exec"){if(!c(l.callee)||l.callee.name!=="regExp")throw new ie(`${o} is not a function.`);return i===0?o==="test"?new xt(pt.LITERAL_BOOLEAN,!1):new xt(pt.LITERAL_NULL,null):(s=_i(e,l),a=_i(e,n[0]),new xt(pt.FUNCTION_CALL,o,s,a))}else if(o==="toString")return r=_i(e,l),new xt(pt.FUNCTION_CALL,o,r);throw new ie(`Unexpected function call "${o}".`)}if(o=t.callee.name,o==="color"){if(i===0)return new xt(pt.LITERAL_COLOR,o);if(r=_i(e,n[0]),c(n[1])){let l=_i(e,n[1]);return new xt(pt.LITERAL_COLOR,o,[r,l])}return new xt(pt.LITERAL_COLOR,o,[r])}else if(o==="rgb"||o==="hsl"){if(i<3)throw new ie(`${o} requires three arguments.`);return r=[_i(e,n[0]),_i(e,n[1]),_i(e,n[2])],new xt(pt.LITERAL_COLOR,o,r)}else if(o==="rgba"||o==="hsla"){if(i<4)throw new ie(`${o} requires four arguments.`);return r=[_i(e,n[0]),_i(e,n[1]),_i(e,n[2]),_i(e,n[3])],new xt(pt.LITERAL_COLOR,o,r)}else if(o==="vec2"||o==="vec3"||o==="vec4"){r=new Array(i);for(let l=0;l<i;++l)r[l]=_i(e,n[l]);return new xt(pt.LITERAL_VECTOR,o,r)}else{if(o==="isNaN"||o==="isFinite")return i===0?o==="isNaN"?new xt(pt.LITERAL_BOOLEAN,!0):new xt(pt.LITERAL_BOOLEAN,!1):(r=_i(e,n[0]),new xt(pt.UNARY,o,r));if(o==="isExactClass"||o==="isClass"){if(i<1||i>1)throw new ie(`${o} requires exactly one argument.`);return r=_i(e,n[0]),new xt(pt.UNARY,o,r)}else if(o==="getExactClassName"){if(i>0)throw new ie(`${o} does not take any argument.`);return new xt(pt.UNARY,o)}else if(c(hL[o])){if(i!==1)throw new ie(`${o} requires exactly one argument.`);return r=_i(e,n[0]),new xt(pt.UNARY,o,r)}else if(c(mL[o])){if(i!==2)throw new ie(`${o} requires exactly two arguments.`);return s=_i(e,n[0]),a=_i(e,n[1]),new xt(pt.BINARY,o,s,a)}else if(c(Cj[o])){if(i!==3)throw new ie(`${o} requires exactly three arguments.`);s=_i(e,n[0]),a=_i(e,n[1]);let l=_i(e,n[2]);return new xt(pt.TERNARY,o,s,a,l)}else{if(o==="Boolean")return i===0?new xt(pt.LITERAL_BOOLEAN,!1):(r=_i(e,n[0]),new xt(pt.UNARY,o,r));if(o==="Number")return i===0?new xt(pt.LITERAL_NUMBER,0):(r=_i(e,n[0]),new xt(pt.UNARY,o,r));if(o==="String")return i===0?new xt(pt.LITERAL_STRING,""):(r=_i(e,n[0]),new xt(pt.UNARY,o,r));if(o==="regExp")return eLe(e,t)}}throw new ie(`Unexpected function call "${o}".`)}function eLe(e,t){let n=t.arguments;if(n.length===0)return new xt(pt.LITERAL_REGEX,new RegExp);let i=_i(e,n[0]),o;if(n.length>1){let r=_i(e,n[1]);if(xj(i)&&xj(r)){try{o=new RegExp(Tj(String(i._value)),r._value)}catch(s){throw new ie(s)}return new xt(pt.LITERAL_REGEX,o)}return new xt(pt.REGEX,i,r)}if(xj(i)){try{o=new RegExp(Tj(String(i._value)))}catch(r){throw new ie(r)}return new xt(pt.LITERAL_REGEX,o)}return new xt(pt.REGEX,i)}function tLe(e){if(rLe(e.name)){let t=sLe(e.name);return t.substr(0,8)==="tiles3d_"?new xt(pt.BUILTIN_VARIABLE,t):new xt(pt.VARIABLE,t)}else{if(e.name==="NaN")return new xt(pt.LITERAL_NUMBER,NaN);if(e.name==="Infinity")return new xt(pt.LITERAL_NUMBER,1/0);if(e.name==="undefined")return new xt(pt.LITERAL_UNDEFINED,void 0)}throw new ie(`${e.name} is not defined.`)}function nLe(e){let t=e.property.name;if(t==="PI")return new xt(pt.LITERAL_NUMBER,Math.PI);if(t==="E")return new xt(pt.LITERAL_NUMBER,Math.E)}function iLe(e){if(e.property.name==="POSITIVE_INFINITY")return new xt(pt.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}function oLe(e,t){if(t.object.name==="Math")return nLe(t);if(t.object.name==="Number")return iLe(t);let n,i=_i(e,t.object);return t.computed?(n=_i(e,t.property),new xt(pt.MEMBER,"brackets",i,n)):(n=new xt(pt.LITERAL_STRING,t.property.name),new xt(pt.MEMBER,"dot",i,n))}function xj(e){return e._type>=pt.LITERAL_NULL}function rLe(e){return e.substr(0,4)==="czm_"}function sLe(e){return e.substr(4)}function _i(e,t){let n,i,o,r;if(t.type==="Literal")n=JMe(t);else if(t.type==="CallExpression")n=QMe(e,t);else if(t.type==="Identifier")n=tLe(t);else if(t.type==="UnaryExpression"){i=t.operator;let s=_i(e,t.argument);if(BMe.indexOf(i)>-1)n=new xt(pt.UNARY,i,s);else throw new ie(`Unexpected operator "${i}".`)}else if(t.type==="BinaryExpression")if(i=t.operator,o=_i(e,t.left),r=_i(e,t.right),kee.indexOf(i)>-1)n=new xt(pt.BINARY,i,o,r);else throw new ie(`Unexpected operator "${i}".`);else if(t.type==="LogicalExpression")i=t.operator,o=_i(e,t.left),r=_i(e,t.right),kee.indexOf(i)>-1&&(n=new xt(pt.BINARY,i,o,r));else if(t.type==="ConditionalExpression"){let s=_i(e,t.test);o=_i(e,t.consequent),r=_i(e,t.alternate),n=new xt(pt.CONDITIONAL,"?",o,r,s)}else if(t.type==="MemberExpression")n=oLe(e,t);else if(t.type==="ArrayExpression"){let s=[];for(let a=0;a<t.elements.length;a++)s[a]=_i(e,t.elements[a]);n=new xt(pt.ARRAY,s)}else throw t.type==="Compound"?new ie("Provide exactly one expression."):new ie("Cannot parse expression.");return n}function aLe(e){e._type===pt.CONDITIONAL?e.evaluate=e._evaluateConditional:e._type===pt.FUNCTION_CALL?e._value==="test"?e.evaluate=e._evaluateRegExpTest:e._value==="exec"?e.evaluate=e._evaluateRegExpExec:e._value==="toString"&&(e.evaluate=e._evaluateToString):e._type===pt.UNARY?e._value==="!"?e.evaluate=e._evaluateNot:e._value==="-"?e.evaluate=e._evaluateNegative:e._value==="+"?e.evaluate=e._evaluatePositive:e._value==="isNaN"?e.evaluate=e._evaluateNaN:e._value==="isFinite"?e.evaluate=e._evaluateIsFinite:e._value==="isExactClass"?e.evaluate=e._evaluateIsExactClass:e._value==="isClass"?e.evaluate=e._evaluateIsClass:e._value==="getExactClassName"?e.evaluate=e._evaluateGetExactClassName:e._value==="Boolean"?e.evaluate=e._evaluateBooleanConversion:e._value==="Number"?e.evaluate=e._evaluateNumberConversion:e._value==="String"?e.evaluate=e._evaluateStringConversion:c(hL[e._value])&&(e.evaluate=lLe(e._value)):e._type===pt.BINARY?e._value==="+"?e.evaluate=e._evaluatePlus:e._value==="-"?e.evaluate=e._evaluateMinus:e._value==="*"?e.evaluate=e._evaluateTimes:e._value==="/"?e.evaluate=e._evaluateDivide:e._value==="%"?e.evaluate=e._evaluateMod:e._value==="==="?e.evaluate=e._evaluateEqualsStrict:e._value==="!=="?e.evaluate=e._evaluateNotEqualsStrict:e._value==="<"?e.evaluate=e._evaluateLessThan:e._value==="<="?e.evaluate=e._evaluateLessThanOrEquals:e._value===">"?e.evaluate=e._evaluateGreaterThan:e._value===">="?e.evaluate=e._evaluateGreaterThanOrEquals:e._value==="&&"?e.evaluate=e._evaluateAnd:e._value==="||"?e.evaluate=e._evaluateOr:e._value==="=~"?e.evaluate=e._evaluateRegExpMatch:e._value==="!~"?e.evaluate=e._evaluateRegExpNotMatch:c(mL[e._value])&&(e.evaluate=uLe(e._value)):e._type===pt.TERNARY?e.evaluate=fLe(e._value):e._type===pt.MEMBER?e._value==="brackets"?e.evaluate=e._evaluateMemberBrackets:e.evaluate=e._evaluateMemberDot:e._type===pt.ARRAY?e.evaluate=e._evaluateArray:e._type===pt.VARIABLE?e.evaluate=e._evaluateVariable:e._type===pt.VARIABLE_IN_STRING?e.evaluate=e._evaluateVariableString:e._type===pt.LITERAL_COLOR?e.evaluate=e._evaluateLiteralColor:e._type===pt.LITERAL_VECTOR?e.evaluate=e._evaluateLiteralVector:e._type===pt.LITERAL_STRING?e.evaluate=e._evaluateLiteralString:e._type===pt.REGEX?e.evaluate=e._evaluateRegExp:e._type===pt.BUILTIN_VARIABLE?e._value==="tiles3d_tileset_time"&&(e.evaluate=cLe):e.evaluate=e._evaluateLiteral}function cLe(e){return c(e)?e.content.tileset.timeSinceLoad:0}function lLe(e){let t=hL[e];return function(n){let i=this._left.evaluate(n);return t(e,i)}}function uLe(e){let t=mL[e];return function(n){let i=this._left.evaluate(n),o=this._right.evaluate(n);return t(e,i,o)}}function fLe(e){let t=Cj[e];return function(n){let i=this._left.evaluate(n),o=this._right.evaluate(n),r=this._test.evaluate(n);return t(e,i,o,r)}}function pL(e,t){if(c(e))return e.getPropertyInherited(t)}xt.prototype._evaluateLiteral=function(){return this._value};xt.prototype._evaluateLiteralColor=function(e){let t=dL,n=this._left;if(this._value==="color")c(n)?n.length>1?(z.fromCssColorString(n[0].evaluate(e),t),t.alpha=n[1].evaluate(e)):z.fromCssColorString(n[0].evaluate(e),t):z.fromBytes(255,255,255,255,t);else if(this._value==="rgb")z.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),255,t);else if(this._value==="rgba"){let i=n[3].evaluate(e)*255;z.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),i,t)}else this._value==="hsl"?z.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),1,t):this._value==="hsla"&&z.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),n[3].evaluate(e),t);return ee.fromColor(t,vn.getCartesian4())};xt.prototype._evaluateLiteralVector=function(e){let t=vn.getArray(),n=this._value,i=this._left,o=i.length;for(let a=0;a<o;++a){let l=i[a].evaluate(e);if(typeof l=="number")t.push(l);else if(l instanceof k)t.push(l.x,l.y);else if(l instanceof d)t.push(l.x,l.y,l.z);else if(l instanceof ee)t.push(l.x,l.y,l.z,l.w);else throw new ie(`${n} argument must be a vector or number. Argument is ${l}.`)}let r=t.length,s=parseInt(n.charAt(3));if(r===0)throw new ie(`Invalid ${n} constructor. No valid arguments.`);if(r<s&&r>1)throw new ie(`Invalid ${n} constructor. Not enough arguments.`);if(r>s&&o>1)throw new ie(`Invalid ${n} constructor. Too many arguments.`);if(r===1){let a=t[0];t.push(a,a,a)}if(n==="vec2")return k.fromArray(t,0,vn.getCartesian2());if(n==="vec3")return d.fromArray(t,0,vn.getCartesian3());if(n==="vec4")return ee.fromArray(t,0,vn.getCartesian4())};xt.prototype._evaluateLiteralString=function(){return this._value};xt.prototype._evaluateVariableString=function(e){let t=this._value,n=fL.exec(t);for(;n!==null;){let i=n[0],o=n[1],r=pL(e,o);c(r)||(r=""),t=t.replace(i,r),n=fL.exec(t)}return t};xt.prototype._evaluateVariable=function(e){return pL(e,this._value)};function xb(e){return e._value==="feature"}xt.prototype._evaluateMemberDot=function(e){if(xb(this._left))return pL(e,this._right.evaluate(e));let t=this._left.evaluate(e);if(!c(t))return;let n=this._right.evaluate(e);if(t instanceof k||t instanceof d||t instanceof ee){if(n==="r")return t.x;if(n==="g")return t.y;if(n==="b")return t.z;if(n==="a")return t.w}return t[n]};xt.prototype._evaluateMemberBrackets=function(e){if(xb(this._left))return pL(e,this._right.evaluate(e));let t=this._left.evaluate(e);if(!c(t))return;let n=this._right.evaluate(e);if(t instanceof k||t instanceof d||t instanceof ee){if(n===0||n==="r")return t.x;if(n===1||n==="g")return t.y;if(n===2||n==="b")return t.z;if(n===3||n==="a")return t.w}return t[n]};xt.prototype._evaluateArray=function(e){let t=[];for(let n=0;n<this._value.length;n++)t[n]=this._value[n].evaluate(e);return t};xt.prototype._evaluateNot=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new ie(`Operator "!" requires a boolean argument. Argument is ${t}.`);return!t};xt.prototype._evaluateNegative=function(e){let t=this._left.evaluate(e);if(t instanceof k)return k.negate(t,vn.getCartesian2());if(t instanceof d)return d.negate(t,vn.getCartesian3());if(t instanceof ee)return ee.negate(t,vn.getCartesian4());if(typeof t=="number")return-t;throw new ie(`Operator "-" requires a vector or number argument. Argument is ${t}.`)};xt.prototype._evaluatePositive=function(e){let t=this._left.evaluate(e);if(!(t instanceof k||t instanceof d||t instanceof ee||typeof t=="number"))throw new ie(`Operator "+" requires a vector or number argument. Argument is ${t}.`);return t};xt.prototype._evaluateLessThan=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new ie(`Operator "<" requires number arguments. Arguments are ${t} and ${n}.`);return t<n};xt.prototype._evaluateLessThanOrEquals=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new ie(`Operator "<=" requires number arguments. Arguments are ${t} and ${n}.`);return t<=n};xt.prototype._evaluateGreaterThan=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new ie(`Operator ">" requires number arguments. Arguments are ${t} and ${n}.`);return t>n};xt.prototype._evaluateGreaterThanOrEquals=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new ie(`Operator ">=" requires number arguments. Arguments are ${t} and ${n}.`);return t>=n};xt.prototype._evaluateOr=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new ie(`Operator "||" requires boolean arguments. First argument is ${t}.`);if(t)return!0;let n=this._right.evaluate(e);if(typeof n!="boolean")throw new ie(`Operator "||" requires boolean arguments. Second argument is ${n}.`);return t||n};xt.prototype._evaluateAnd=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new ie(`Operator "&&" requires boolean arguments. First argument is ${t}.`);if(!t)return!1;let n=this._right.evaluate(e);if(typeof n!="boolean")throw new ie(`Operator "&&" requires boolean arguments. Second argument is ${n}.`);return t&&n};xt.prototype._evaluatePlus=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof k&&t instanceof k)return k.add(t,n,vn.getCartesian2());if(n instanceof d&&t instanceof d)return d.add(t,n,vn.getCartesian3());if(n instanceof ee&&t instanceof ee)return ee.add(t,n,vn.getCartesian4());if(typeof t=="string"||typeof n=="string")return t+n;if(typeof t=="number"&&typeof n=="number")return t+n;throw new ie(`Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are ${t} and ${n}.`)};xt.prototype._evaluateMinus=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof k&&t instanceof k)return k.subtract(t,n,vn.getCartesian2());if(n instanceof d&&t instanceof d)return d.subtract(t,n,vn.getCartesian3());if(n instanceof ee&&t instanceof ee)return ee.subtract(t,n,vn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t-n;throw new ie(`Operator "-" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)};xt.prototype._evaluateTimes=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof k&&t instanceof k)return k.multiplyComponents(t,n,vn.getCartesian2());if(n instanceof k&&typeof t=="number")return k.multiplyByScalar(n,t,vn.getCartesian2());if(t instanceof k&&typeof n=="number")return k.multiplyByScalar(t,n,vn.getCartesian2());if(n instanceof d&&t instanceof d)return d.multiplyComponents(t,n,vn.getCartesian3());if(n instanceof d&&typeof t=="number")return d.multiplyByScalar(n,t,vn.getCartesian3());if(t instanceof d&&typeof n=="number")return d.multiplyByScalar(t,n,vn.getCartesian3());if(n instanceof ee&&t instanceof ee)return ee.multiplyComponents(t,n,vn.getCartesian4());if(n instanceof ee&&typeof t=="number")return ee.multiplyByScalar(n,t,vn.getCartesian4());if(t instanceof ee&&typeof n=="number")return ee.multiplyByScalar(t,n,vn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t*n;throw new ie(`Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are ${t} and ${n}.`)};xt.prototype._evaluateDivide=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof k&&t instanceof k)return k.divideComponents(t,n,vn.getCartesian2());if(t instanceof k&&typeof n=="number")return k.divideByScalar(t,n,vn.getCartesian2());if(n instanceof d&&t instanceof d)return d.divideComponents(t,n,vn.getCartesian3());if(t instanceof d&&typeof n=="number")return d.divideByScalar(t,n,vn.getCartesian3());if(n instanceof ee&&t instanceof ee)return ee.divideComponents(t,n,vn.getCartesian4());if(t instanceof ee&&typeof n=="number")return ee.divideByScalar(t,n,vn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t/n;throw new ie(`Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are ${t} and ${n}.`)};xt.prototype._evaluateMod=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof k&&t instanceof k)return k.fromElements(t.x%n.x,t.y%n.y,vn.getCartesian2());if(n instanceof d&&t instanceof d)return d.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,vn.getCartesian3());if(n instanceof ee&&t instanceof ee)return ee.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,t.w%n.w,vn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t%n;throw new ie(`Operator "%" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)};xt.prototype._evaluateEqualsStrict=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof k&&t instanceof k||n instanceof d&&t instanceof d||n instanceof ee&&t instanceof ee?t.equals(n):t===n};xt.prototype._evaluateNotEqualsStrict=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof k&&t instanceof k||n instanceof d&&t instanceof d||n instanceof ee&&t instanceof ee?!t.equals(n):t!==n};xt.prototype._evaluateConditional=function(e){let t=this._test.evaluate(e);if(typeof t!="boolean")throw new ie(`Conditional argument of conditional expression must be a boolean. Argument is ${t}.`);return t?this._left.evaluate(e):this._right.evaluate(e)};xt.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))};xt.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))};xt.prototype._evaluateIsExactClass=function(e){return c(e)?e.isExactClass(this._left.evaluate(e)):!1};xt.prototype._evaluateIsClass=function(e){return c(e)?e.isClass(this._left.evaluate(e)):!1};xt.prototype._evaluateGetExactClassName=function(e){if(c(e))return e.getExactClassName()};xt.prototype._evaluateBooleanConversion=function(e){return!!this._left.evaluate(e)};xt.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))};xt.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))};xt.prototype._evaluateRegExp=function(e){let t=this._value.evaluate(e),n="";c(this._left)&&(n=this._left.evaluate(e));let i;try{i=new RegExp(t,n)}catch(o){throw new ie(o)}return i};xt.prototype._evaluateRegExpTest=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&typeof n=="string"))throw new ie(`RegExp.test requires the first argument to be a RegExp and the second argument to be a string. Arguments are ${t} and ${n}.`);return t.test(n)};xt.prototype._evaluateRegExpMatch=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(t instanceof RegExp&&typeof n=="string")return t.test(n);if(n instanceof RegExp&&typeof t=="string")return n.test(t);throw new ie(`Operator "=~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)};xt.prototype._evaluateRegExpNotMatch=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(t instanceof RegExp&&typeof n=="string")return!t.test(n);if(n instanceof RegExp&&typeof t=="string")return!n.test(t);throw new ie(`Operator "!~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)};xt.prototype._evaluateRegExpExec=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&typeof n=="string"))throw new ie(`RegExp.exec requires the first argument to be a RegExp and the second argument to be a string. Arguments are ${t} and ${n}.`);let i=t.exec(n);return c(i)?i[1]:null};xt.prototype._evaluateToString=function(e){let t=this._left.evaluate(e);if(t instanceof RegExp||t instanceof k||t instanceof d||t instanceof ee)return String(t);throw new ie(`Unexpected function call "${this._value}".`)};function zee(e){let t=e._left,n=t.length;for(let a=0;a<n;++a)if(t[a]._type!==pt.LITERAL_NUMBER)return;let i=t[0]._value,o=t[1]._value,r=t[2]._value,s=n===4?t[3]._value:1;return z.fromHsl(i,o,r,s,dL)}function Vee(e){let t=e._left,n=t.length;for(let o=0;o<n;++o)if(t[o]._type!==pt.LITERAL_NUMBER)return;let i=dL;return i.red=t[0]._value/255,i.green=t[1]._value/255,i.blue=t[2]._value/255,i.alpha=n===4?t[3]._value:1,i}function L_(e){return e%1===0?e.toFixed(1):e.toString()}function dLe(e){let t=L_(e.red),n=L_(e.green),i=L_(e.blue);return`vec3(${t}, ${n}, ${i})`}function uL(e){let t=L_(e.red),n=L_(e.green),i=L_(e.blue),o=L_(e.alpha);return`vec4(${t}, ${n}, ${i}, ${o})`}function Hee(e,t,n,i){let o=e.length,r=new Array(o);for(let s=0;s<o;++s)r[s]=e[s].getShaderExpression(t,n,i);return r}function Gee(e,t){return c(t[e])?t[e]:jf.NULL_SENTINEL}jf.NULL_SENTINEL="czm_infinity";xt.prototype.getShaderExpression=function(e,t,n){let i,o,r,s,a=this._type,l=this._value;c(this._left)&&(Array.isArray(this._left)?o=Hee(this._left,e,t,this):o=this._left.getShaderExpression(e,t,this)),c(this._right)&&(r=this._right.getShaderExpression(e,t,this)),c(this._test)&&(s=this._test.getShaderExpression(e,t,this)),Array.isArray(this._value)&&(l=Hee(this._value,e,t,this));let u,f,h;switch(a){case pt.VARIABLE:return xb(this)?void 0:Gee(l,e);case pt.UNARY:if(l==="Boolean")return`bool(${o})`;if(l==="Number")return`float(${o})`;if(l==="round")return`floor(${o} + 0.5)`;if(c(hL[l]))return`${l}(${o})`;if(l==="isNaN")return`(${o} != ${o})`;if(l==="isFinite")return`(abs(${o}) < czm_infinity)`;if(l==="String"||l==="isExactClass"||l==="isClass"||l==="getExactClassName")throw new ie(`Error generating style shader: "${l}" is not supported.`);return l+o;case pt.BINARY:return l==="%"?`mod(${o}, ${r})`:l==="==="?`(${o} == ${r})`:l==="!=="?`(${o} != ${r})`:l==="atan2"?`atan(${o}, ${r})`:c(mL[l])?`${l}(${o}, ${r})`:`(${o} ${l} ${r})`;case pt.TERNARY:if(c(Cj[l]))return`${l}(${o}, ${r}, ${s})`;break;case pt.CONDITIONAL:return`(${s} ? ${o} : ${r})`;case pt.MEMBER:return xb(this._left)?Gee(r,e):r==="r"||r==="x"||r==="0.0"?`${o}[0]`:r==="g"||r==="y"||r==="1.0"?`${o}[1]`:r==="b"||r==="z"||r==="2.0"?`${o}[2]`:r==="a"||r==="w"||r==="3.0"?`${o}[3]`:`${o}[int(${r})]`;case pt.FUNCTION_CALL:throw new ie(`Error generating style shader: "${l}" is not supported.`);case pt.ARRAY:if(l.length===4)return`vec4(${l[0]}, ${l[1]}, ${l[2]}, ${l[3]})`;if(l.length===3)return`vec3(${l[0]}, ${l[1]}, ${l[2]})`;if(l.length===2)return`vec2(${l[0]}, ${l[1]})`;throw new ie("Error generating style shader: Invalid array length. Array length should be 2, 3, or 4.");case pt.REGEX:throw new ie("Error generating style shader: Regular expressions are not supported.");case pt.VARIABLE_IN_STRING:throw new ie("Error generating style shader: Converting a variable to a string is not supported.");case pt.LITERAL_NULL:return jf.NULL_SENTINEL;case pt.LITERAL_BOOLEAN:return l?"true":"false";case pt.LITERAL_NUMBER:return L_(l);case pt.LITERAL_STRING:if(c(n)&&n._type===pt.MEMBER&&(l==="r"||l==="g"||l==="b"||l==="a"||l==="x"||l==="y"||l==="z"||l==="w"||xb(n._left)))return l;if(i=z.fromCssColorString(l,dL),c(i))return dLe(i);throw new ie("Error generating style shader: String literals are not supported.");case pt.LITERAL_COLOR:if(u=o,l==="color"){if(c(u)){if(u.length>1){let m=u[0],p=u[1];return p!=="1.0"&&(t.translucent=!0),`vec4(${m}, ${p})`}}else return"vec4(1.0)";return`vec4(${u[0]}, 1.0)`}else{if(l==="rgb")return i=Vee(this),c(i)?uL(i):`vec4(${u[0]} / 255.0, ${u[1]} / 255.0, ${u[2]} / 255.0, 1.0)`;if(l==="rgba")return u[3]!=="1.0"&&(t.translucent=!0),i=Vee(this),c(i)?uL(i):`vec4(${u[0]} / 255.0, ${u[1]} / 255.0, ${u[2]} / 255.0, ${u[3]})`;if(l==="hsl")return i=zee(this),c(i)?uL(i):`vec4(czm_HSLToRGB(vec3(${u[0]}, ${u[1]}, ${u[2]})), 1.0)`;if(l==="hsla")return i=zee(this),c(i)?(i.alpha!==1&&(t.translucent=!0),uL(i)):(u[3]!=="1.0"&&(t.translucent=!0),`vec4(czm_HSLToRGB(vec3(${u[0]}, ${u[1]}, ${u[2]})), ${u[3]})`)}break;case pt.LITERAL_VECTOR:if(!c(o))throw new w("left should always be defined for type ExpressionNodeType.LITERAL_VECTOR");f=o.length,h=`${l}(`;for(let m=0;m<f;++m)h+=o[m],m<f-1&&(h+=", ");return h+=")",h;case pt.LITERAL_REGEX:throw new ie("Error generating style shader: Regular expressions are not supported.");case pt.LITERAL_UNDEFINED:return jf.NULL_SENTINEL;case pt.BUILTIN_VARIABLE:if(l==="tiles3d_tileset_time")return l}};xt.prototype.getVariables=function(e,t){let n,i,o,r=this._type,s=this._value;if(c(this._left))if(Array.isArray(this._left))for(n=this._left,i=n.length,o=0;o<i;++o)n[o].getVariables(e,this);else this._left.getVariables(e,this);if(c(this._right)&&this._right.getVariables(e,this),c(this._test)&&this._test.getVariables(e,this),Array.isArray(this._value))for(n=this._value,i=n.length,o=0;o<i;++o)n[o].getVariables(e,this);let a;switch(r){case pt.VARIABLE:xb(this)||e.push(s);break;case pt.VARIABLE_IN_STRING:for(a=fL.exec(s);a!==null;)e.push(a[1]),a=fL.exec(s);break;case pt.LITERAL_STRING:c(t)&&t._type===pt.MEMBER&&xb(t._left)&&e.push(s);break}};var Wf=jf;function Ym(e){e=g(e,g.EMPTY_OBJECT),this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._vertexBatchIds=e.vertexBatchIds,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=e.indexOffsets,this._batchedIndices=e.batchedIndices,this._boundingVolume=e.boundingVolume,this._boundingVolumes=e.boundingVolumes,this._center=g(e.center,d.ZERO),this._va=void 0,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._uniformMap=void 0,this._vaSwap=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._rsWireframe=void 0,this._commands=[],this._commandsIgnoreShow=[],this._pickCommands=[],this._constantColor=z.clone(z.WHITE),this._highlightColor=this._constantColor,this._batchDirty=!0,this._pickCommandsDirty=!0,this._framesSinceLastRebatch=0,this._updatingAllCommands=!1,this._trianglesLength=this._indices.length/3,this._geometryByteLength=this._indices.byteLength+this._positions.byteLength+this._vertexBatchIds.byteLength,this.debugWireframe=!1,this._debugWireframe=this.debugWireframe,this._wireframeDirty=!1,this.forceRebatch=!1,this.classificationType=g(e.classificationType,Ln.BOTH),this._vertexShaderSource=e._vertexShaderSource,this._fragmentShaderSource=e._fragmentShaderSource,this._attributeLocations=e._attributeLocations,this._uniformMap=e._uniformMap,this._pickId=e._pickId,this._modelMatrix=e._modelMatrix,this._boundingSphere=e._boundingSphere,this._batchIdLookUp={};let t=this._batchIds.length;for(let n=0;n<t;++n){let i=this._batchIds[n];this._batchIdLookUp[i]=n}}Object.defineProperties(Ym.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}}});var hLe={position:0,a_batchId:1};function mLe(e,t){if(c(e._va))return;let n=yt.createVertexBuffer({context:t,typedArray:e._positions,usage:Pe.STATIC_DRAW}),i=yt.createVertexBuffer({context:t,typedArray:e._vertexBatchIds,usage:Pe.STATIC_DRAW}),o=yt.createIndexBuffer({context:t,typedArray:e._indices,usage:Pe.DYNAMIC_DRAW,indexDatatype:e._indices.BYTES_PER_ELEMENT===2?Oe.UNSIGNED_SHORT:Oe.UNSIGNED_INT}),r=[{index:0,vertexBuffer:n,componentDatatype:j.fromTypedArray(e._positions),componentsPerAttribute:3},{index:1,vertexBuffer:i,componentDatatype:j.fromTypedArray(e._vertexBatchIds),componentsPerAttribute:1}];e._va=new Zn({context:t,attributes:r,indexBuffer:o}),t.webgl2&&(e._vaSwap=new Zn({context:t,attributes:r,indexBuffer:yt.createIndexBuffer({context:t,sizeInBytes:o.sizeInBytes,usage:Pe.DYNAMIC_DRAW,indexDatatype:o.indexDatatype})})),e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0}function pLe(e,t){if(c(e._sp))return;let n=e._batchTable,i=g(e._attributeLocations,hLe),o=e._pickId,r=e._vertexShaderSource,s=e._fragmentShaderSource;if(c(r)){e._sp=en.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:i}),e._spStencil=e._sp,s=Be.replaceMain(s,"czm_non_pick_main"),s=`${s}void main()
| {
| czm_non_pick_main();
| out_FragColor = ${o};
| }
| `,e._spPick=en.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:i});return}let a=n.getVertexShaderCallback(!1,"a_batchId",void 0)(nA),l=n.getFragmentShaderCallback(!1,void 0,!0)(ub);o=n.getPickId();let u=new Be({sources:[a]}),f=new Be({defines:["VECTOR_TILE"],sources:[l]});e._sp=en.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:f,attributeLocations:i}),u=new Be({sources:[nA]}),f=new Be({defines:["VECTOR_TILE"],sources:[ub]}),e._spStencil=en.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:f,attributeLocations:i}),l=Be.replaceMain(l,"czm_non_pick_main"),l=`${l}
| void main()
| {
| czm_non_pick_main();
| out_FragColor = ${o};
| }
| `;let h=new Be({sources:[a]}),m=new Be({defines:["VECTOR_TILE"],sources:[l]});e._spPick=en.fromCache({context:t,vertexShaderSource:h,fragmentShaderSource:m,attributeLocations:i})}function jee(e){let t=e?Nn.EQUAL:Nn.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:t,frontOperation:{fail:ut.KEEP,zFail:ut.DECREMENT_WRAP,zPass:ut.KEEP},backFunction:t,backOperation:{fail:ut.KEEP,zFail:ut.INCREMENT_WRAP,zPass:ut.KEEP},reference:kt.CESIUM_3D_TILE_MASK,mask:kt.CESIUM_3D_TILE_MASK},stencilMask:kt.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:cc.LESS_OR_EQUAL},depthMask:!1}}var _Le={stencilTest:{enabled:!0,frontFunction:Nn.NOT_EQUAL,frontOperation:{fail:ut.ZERO,zFail:ut.ZERO,zPass:ut.ZERO},backFunction:Nn.NOT_EQUAL,backOperation:{fail:ut.ZERO,zFail:ut.ZERO,zPass:ut.ZERO},reference:0,mask:kt.CLASSIFICATION_MASK},stencilMask:kt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:cn.PRE_MULTIPLIED_ALPHA_BLEND},gLe={stencilTest:{enabled:!0,frontFunction:Nn.NOT_EQUAL,frontOperation:{fail:ut.ZERO,zFail:ut.ZERO,zPass:ut.ZERO},backFunction:Nn.NOT_EQUAL,backOperation:{fail:ut.ZERO,zFail:ut.ZERO,zPass:ut.ZERO},reference:0,mask:kt.CLASSIFICATION_MASK},stencilMask:kt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function yLe(e){c(e._rsStencilDepthPass)||(e._rsStencilDepthPass=Fe.fromCache(jee(!1)),e._rsStencilDepthPass3DTiles=Fe.fromCache(jee(!0)),e._rsColorPass=Fe.fromCache(_Le),e._rsPickPass=Fe.fromCache(gLe))}var Tb=new N,Wee=new d;function bLe(e,t){if(c(e._uniformMap))return;let n={u_modifiedModelViewProjection:function(){let i=t.uniformState.view,o=t.uniformState.projection;return N.clone(i,Tb),N.multiplyByPoint(Tb,e._center,Wee),N.setTranslation(Tb,Wee,Tb),N.multiply(o,Tb,Tb),Tb},u_highlightColor:function(){return e._highlightColor}};e._uniformMap=e._batchTable.getUniformMapCallback()(n)}function Ej(e,t,n,i,o,r,s){let a=e.constructor.BYTES_PER_ELEMENT,l=r.length;for(let u=0;u<l;++u){let f=r[u],h=s[f],m=i[h],p=o[h],_=new e.constructor(e.buffer,a*m,p);t.set(_,n),i[h]=n,n+=p}return n}function xLe(e,t){let n=e._indices,i=e._indexOffsets,o=e._indexCounts,r=e._batchIdLookUp,s=new n.constructor(n.length),a=t.pop(),l=[a],u=Ej(n,s,0,i,o,a.batchIds,r);for(a.offset=0,a.count=u;t.length>0;){let f=t.pop();if(z.equals(f.color,a.color))u=Ej(n,s,u,i,o,f.batchIds,r),a.batchIds=a.batchIds.concat(f.batchIds),a.count=u-a.offset;else{let h=u;u=Ej(n,s,u,i,o,f.batchIds,r),f.offset=h,f.count=u-h,l.push(f),a=f}}e._va.indexBuffer.copyFromArrayView(s),e._indices=s,e._batchedIndices=l}function wj(e,t,n,i,o,r,s){let a=e.bytesPerIndex,l=r.length;for(let u=0;u<l;++u){let f=r[u],h=s[f],m=i[h],p=o[h];t.copyFromBuffer(e,m*a,n*a,p*a),i[h]=n,n+=p}return n}function TLe(e,t){let n=e._indexOffsets,i=e._indexCounts,o=e._batchIdLookUp,r=t.pop(),s=[r],a=e._va.indexBuffer,l=e._vaSwap.indexBuffer,u=wj(a,l,0,n,i,r.batchIds,o);for(r.offset=0,r.count=u;t.length>0;){let h=t.pop();if(z.equals(h.color,r.color))u=wj(a,l,u,n,i,h.batchIds,o),r.batchIds=r.batchIds.concat(h.batchIds),r.count=u-r.offset;else{let m=u;u=wj(a,l,u,n,i,h.batchIds,o),h.offset=m,h.count=u-m,s.push(h),r=h}}let f=e._va;e._va=e._vaSwap,e._vaSwap=f,e._batchedIndices=s}function CLe(e,t){return t.color.toRgba()-e.color.toRgba()}function ELe(e,t){if(!e._batchDirty)return!1;let n=e._batchedIndices,i=n.length,o=!1,r={};for(let s=0;s<i;++s){let l=n[s].color.toRgba();if(c(r[l])){o=!0;break}else r[l]=!0}if(!o)return e._batchDirty=!1,!1;if(o&&!e.forceRebatch&&e._framesSinceLastRebatch<120){++e._framesSinceLastRebatch;return}return n.sort(CLe),t.webgl2?TLe(e,n):xLe(e,n),e._framesSinceLastRebatch=0,e._batchDirty=!1,e._pickCommandsDirty=!0,e._wireframeDirty=!0,!0}function wLe(e,t){let n=ELe(e,t),i=e._commands,o=e._batchedIndices,r=o.length,s=r*2;if(c(i)&&!n&&i.length===s)return;i.length=s;let a=e._va,l=e._sp,u=g(e._modelMatrix,N.IDENTITY),f=e._uniformMap,h=e._boundingVolume;for(let m=0;m<r;++m){let p=o[m].offset,_=o[m].count,b=i[m*2];c(b)||(b=i[m*2]=new Ke({owner:e})),b.vertexArray=a,b.modelMatrix=u,b.offset=p,b.count=_,b.renderState=e._rsStencilDepthPass,b.shaderProgram=l,b.uniformMap=f,b.boundingVolume=h,b.cull=!1,b.pass=xe.TERRAIN_CLASSIFICATION;let x=Ke.shallowClone(b,b.derivedCommands.tileset);x.renderState=e._rsStencilDepthPass3DTiles,x.pass=xe.CESIUM_3D_TILE_CLASSIFICATION,b.derivedCommands.tileset=x;let T=i[m*2+1];c(T)||(T=i[m*2+1]=new Ke({owner:e})),T.vertexArray=a,T.modelMatrix=u,T.offset=p,T.count=_,T.renderState=e._rsColorPass,T.shaderProgram=l,T.uniformMap=f,T.boundingVolume=h,T.cull=!1,T.pass=xe.TERRAIN_CLASSIFICATION;let E=Ke.shallowClone(T,T.derivedCommands.tileset);E.pass=xe.CESIUM_3D_TILE_CLASSIFICATION,T.derivedCommands.tileset=E}e._commandsDirty=!0}function SLe(e,t){if(e.classificationType===Ln.TERRAIN||!t.invertClassification||c(e._commandsIgnoreShow)&&!e._commandsDirty)return;let n=e._commands,i=e._commandsIgnoreShow,o=e._spStencil,r=n.length,s=i.length=r/2,a=0;for(let l=0;l<s;++l){let u=i[l]=Ke.shallowClone(n[a],i[l]);u.shaderProgram=o,u.pass=xe.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,a+=2}e._commandsDirty=!1}function ALe(e){if(!e._pickCommandsDirty)return;let t=e._indexOffsets.length,n=e._pickCommands;n.length=t*2;let i=e._va,o=e._spStencil,r=e._spPick,s=g(e._modelMatrix,N.IDENTITY),a=e._uniformMap;for(let l=0;l<t;++l){let u=e._indexOffsets[l],f=e._indexCounts[l],h=c(e._boundingVolumes)?e._boundingVolumes[l]:e.boundingVolume,m=n[l*2];c(m)||(m=n[l*2]=new Ke({owner:e,pickOnly:!0})),m.vertexArray=i,m.modelMatrix=s,m.offset=u,m.count=f,m.renderState=e._rsStencilDepthPass,m.shaderProgram=o,m.uniformMap=a,m.boundingVolume=h,m.pass=xe.TERRAIN_CLASSIFICATION;let p=Ke.shallowClone(m,m.derivedCommands.tileset);p.renderState=e._rsStencilDepthPass3DTiles,p.pass=xe.CESIUM_3D_TILE_CLASSIFICATION,m.derivedCommands.tileset=p;let _=n[l*2+1];c(_)||(_=n[l*2+1]=new Ke({owner:e,pickOnly:!0})),_.vertexArray=i,_.modelMatrix=s,_.offset=u,_.count=f,_.renderState=e._rsPickPass,_.shaderProgram=r,_.uniformMap=a,_.boundingVolume=h,_.pass=xe.TERRAIN_CLASSIFICATION;let b=Ke.shallowClone(_,_.derivedCommands.tileset);b.pass=xe.CESIUM_3D_TILE_CLASSIFICATION,_.derivedCommands.tileset=b}e._pickCommandsDirty=!1}Ym.prototype.createFeatures=function(e,t){let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o];t[r]=new Jc(e,r)}};Ym.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function vLe(e,t){e._updatingAllCommands=!0;let n=e._batchIds,i=n.length,o;for(o=0;o<i;++o){let s=n[o],a=t[s];a.show=!0,a.color=z.WHITE}let r=e._batchedIndices;for(i=r.length,o=0;o<i;++o)r[o].color=z.clone(z.WHITE);e._updatingAllCommands=!1,e._batchDirty=!0}var DLe=new z,ILe=z.WHITE,OLe=!0,PLe=/\$/;Ym.prototype.applyStyle=function(e,t){if(!c(e)){vLe(this,t);return}let n=e.color,i=n instanceof Wf&&!PLe.test(n.expression);this._updatingAllCommands=i;let o=this._batchIds,r=o.length,s;for(s=0;s<r;++s){let a=o[s],l=t[a];l.color=c(e.color)?e.color.evaluateColor(l,DLe):ILe,l.show=c(e.show)?e.show.evaluate(l):OLe}if(i){let a=this._batchedIndices;for(r=a.length,s=0;s<r;++s)a[s].color=z.clone(z.WHITE);this._updatingAllCommands=!1,this._batchDirty=!0}};Ym.prototype.updateCommands=function(e,t){if(this._updatingAllCommands)return;let n=this._batchIdLookUp,i=n[e];if(!c(i))return;let o=this._indexOffsets,r=this._indexCounts,s=o[i],a=r[i],l=this._batchedIndices,u=l.length,f;for(f=0;f<u;++f){let b=l[f].offset,x=l[f].count;if(s>=b&&s<b+x)break}l.push(new qm({color:z.clone(t),offset:s,count:a,batchIds:[e]}));let h=[],m=[],p=l[f].batchIds,_=p.length;for(let b=0;b<_;++b){let x=p[b];if(x===e)continue;let T=n[x];o[T]<s?h.push(x):m.push(x)}m.length!==0&&l.push(new qm({color:z.clone(l[f].color),offset:s+a,count:l[f].offset+l[f].count-(s+a),batchIds:m})),h.length!==0?(l[f].count=s-l[f].offset,l[f].batchIds=h):l.splice(f,1),this._batchDirty=!0};function qee(e,t,n,i){let o=e.classificationType,r=o!==Ln.CESIUM_3D_TILE,s=o!==Ln.TERRAIN,a=t.commandList,l=n.length,u,f;for(f=0;f<l;++f)r&&(u=n[f],u.pass=xe.TERRAIN_CLASSIFICATION,a.push(u)),s&&(u=n[f].derivedCommands.tileset,u.pass=xe.CESIUM_3D_TILE_CLASSIFICATION,a.push(u));if(!(!t.invertClassification||!c(i)))for(l=i.length,f=0;f<l;++f)a.push(i[f])}function RLe(e,t){let n=e.commandList,i=t.length;for(let o=0;o<i;o+=2){let r=t[o+1];r.pass=xe.OPAQUE,n.push(r)}}function MLe(e){let t=e.debugWireframe===e._debugWireframe;if(t=t&&!(e.debugWireframe&&e._wireframeDirty),t)return;c(e._rsWireframe)||(e._rsWireframe=Fe.fromCache({}));let n,i;e.debugWireframe?(n=e._rsWireframe,i=Se.LINES):(n=e._rsColorPass,i=Se.TRIANGLES);let o=e._commands,r=o.length;for(let s=0;s<r;s+=2){let a=o[s+1];a.renderState=n,a.primitiveType=i}e._debugWireframe=e.debugWireframe,e._wireframeDirty=!1}Ym.prototype.update=function(e){let t=e.context;mLe(this,t),pLe(this,t),yLe(this),bLe(this,t);let n=e.passes;n.render&&(wLe(this,t),SLe(this,e),MLe(this),this._debugWireframe?RLe(e,this._commands):qee(this,e,this._commands,this._commandsIgnoreShow)),n.pick&&(ALe(this),qee(this,e,this._pickCommands))};Ym.prototype.isDestroyed=function(){return!1};Ym.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaSwap=this._vaSwap&&this._vaSwap.destroy(),ue(this)};var DT=Ym;function Bl(e){this._boxes=e.boxes,this._boxBatchIds=e.boxBatchIds,this._cylinders=e.cylinders,this._cylinderBatchIds=e.cylinderBatchIds,this._ellipsoids=e.ellipsoids,this._ellipsoidBatchIds=e.ellipsoidBatchIds,this._spheres=e.spheres,this._sphereBatchIds=e.sphereBatchIds,this._modelMatrix=e.modelMatrix,this._batchTable=e.batchTable,this._boundingVolume=e.boundingVolume,this._center=e.center,c(this._center)||(c(this._boundingVolume)?this._center=d.clone(this._boundingVolume.center):this._center=d.clone(d.ZERO)),this._boundingVolumes=void 0,this._batchedIndices=void 0,this._indices=void 0,this._indexOffsets=void 0,this._indexCounts=void 0,this._positions=void 0,this._vertexBatchIds=void 0,this._batchIds=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._ready=!1,this._promise=void 0,this._error=void 0,this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=Ln.BOTH}Object.defineProperties(Bl.prototype,{trianglesLength:{get:function(){return c(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return c(this._primitive)?this._primitive.geometryByteLength:0}},ready:{get:function(){return this._ready}}});Bl.packedBoxLength=N.packedLength+d.packedLength;Bl.packedCylinderLength=N.packedLength+2;Bl.packedEllipsoidLength=N.packedLength+d.packedLength;Bl.packedSphereLength=d.packedLength+1;function LLe(e){let t=new Float64Array(N.packedLength+d.packedLength),n=0;return d.pack(e._center,t,n),n+=d.packedLength,N.pack(e._modelMatrix,t,n),t}function NLe(e,t){let n=0,i=t[n++],o=t[n++],r=e._boundingVolumes=new Array(o);for(let l=0;l<o;++l)r[l]=ne.unpack(t,n),n+=ne.packedLength;let s=t[n++],a=e._batchedIndices=new Array(s);for(let l=0;l<s;++l){let u=z.unpack(t,n);n+=z.packedLength;let f=t[n++],h=t[n++],m=t[n++],p=new Array(m);for(let _=0;_<m;++_)p[_]=t[n++];a[l]=new qm({color:u,offset:f,count:h,batchIds:p})}return i}var FLe=new hi("createVectorTileGeometries",5),BLe=new z;function kLe(e){if(!c(e._primitive)&&!c(e._verticesPromise)){let t=e._boxes,n=e._boxBatchIds,i=e._cylinders,o=e._cylinderBatchIds,r=e._ellipsoids,s=e._ellipsoidBatchIds,a=e._spheres,l=e._sphereBatchIds,u=e._batchTableColors,f=e._packedBuffer;if(!c(u)){let _=0;c(e._boxes)&&(t=e._boxes=t.slice(),n=e._boxBatchIds=n.slice(),_+=n.length),c(e._cylinders)&&(i=e._cylinders=i.slice(),o=e._cylinderBatchIds=o.slice(),_+=o.length),c(e._ellipsoids)&&(r=e._ellipsoids=r.slice(),s=e._ellipsoidBatchIds=s.slice(),_+=s.length),c(e._spheres)&&(a=e._sphere=a.slice(),l=e._sphereBatchIds=l.slice(),_+=l.length),u=e._batchTableColors=new Uint32Array(_);let b=e._batchTable;for(let x=0;x<_;++x){let T=b.getColor(x,BLe);u[x]=T.toRgba()}f=e._packedBuffer=LLe(e)}let h=[];c(t)&&h.push(t.buffer,n.buffer),c(i)&&h.push(i.buffer,o.buffer),c(r)&&h.push(r.buffer,s.buffer),c(a)&&h.push(a.buffer,l.buffer),h.push(u.buffer,f.buffer);let m={boxes:c(t)?t.buffer:void 0,boxBatchIds:c(t)?n.buffer:void 0,cylinders:c(i)?i.buffer:void 0,cylinderBatchIds:c(i)?o.buffer:void 0,ellipsoids:c(r)?r.buffer:void 0,ellipsoidBatchIds:c(r)?s.buffer:void 0,spheres:c(a)?a.buffer:void 0,sphereBatchIds:c(a)?l.buffer:void 0,batchTableColors:u.buffer,packedBuffer:f.buffer},p=e._verticesPromise=FLe.scheduleTask(m,h);return c(p)?p.then(function(_){if(e.isDestroyed())return;let b=new Float64Array(_.packedBuffer);NLe(e,b)===2?e._indices=new Uint16Array(_.indices):e._indices=new Uint32Array(_.indices),e._indexOffsets=new Uint32Array(_.indexOffsets),e._indexCounts=new Uint32Array(_.indexCounts),e._positions=new Float32Array(_.positions),e._vertexBatchIds=new Uint16Array(_.vertexBatchIds),e._batchIds=new Uint16Array(_.batchIds),ULe(e),e._ready=!0}).catch(_=>{e.isDestroyed()||(e._error=_)}):void 0}}function ULe(e){c(e._primitive)||(e._primitive=new DT({batchTable:e._batchTable,positions:e._positions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center,pickObject:g(e._pickObject,e)}),e._boxes=void 0,e._boxBatchIds=void 0,e._cylinders=void 0,e._cylinderBatchIds=void 0,e._ellipsoids=void 0,e._ellipsoidBatchIds=void 0,e._spheres=void 0,e._sphereBatchIds=void 0,e._center=void 0,e._modelMatrix=void 0,e._batchTable=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._indices=void 0,e._indexOffsets=void 0,e._indexCounts=void 0,e._positions=void 0,e._vertexBatchIds=void 0,e._batchIds=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._verticesPromise=void 0)}Bl.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)};Bl.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)};Bl.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)};Bl.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)};Bl.prototype.update=function(e){if(!this._ready){if(c(this._promise)||(this._promise=kLe(this)),c(this._error)){let t=this._error;throw this._error=void 0,t}return}this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e)};Bl.prototype.isDestroyed=function(){return!1};Bl.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),ue(this)};var N_=Bl;function gh(e,t,n,i,o){this._tileset=e,this._tile=t,this._resource=n,this._geometries=void 0,this._metadata=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,this._group=void 0,this._ready=!1,HLe(this,i,o)}Object.defineProperties(gh.prototype,{featuresLength:{get:function(){return c(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return c(this._geometries)?this._geometries.trianglesLength:0}},geometryByteLength:{get:function(){return c(this._geometries)?this._geometries.geometryByteLength:0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return c(this._batchTable)?this._batchTable.batchTableByteLength:0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},batchTable:{get:function(){return this._batchTable}},group:{get:function(){return this._group},set:function(e){this._group=e}}});function zLe(e){return function(t,n){c(e._geometries)&&e._geometries.updateCommands(t,n)}}function VLe(e,t){let n,i,o,r,s,a=g(e.BOXES_LENGTH,0),l=g(e.CYLINDERS_LENGTH,0),u=g(e.ELLIPSOIDS_LENGTH,0),f=g(e.SPHERES_LENGTH,0);if(a>0&&c(e.BOX_BATCH_IDS)){let _=t.byteOffset+e.BOX_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,_,a)}if(l>0&&c(e.CYLINDER_BATCH_IDS)){let _=t.byteOffset+e.CYLINDER_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,_,l)}if(u>0&&c(e.ELLIPSOID_BATCH_IDS)){let _=t.byteOffset+e.ELLIPSOID_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,_,u)}if(f>0&&c(e.SPHERE_BATCH_IDS)){let _=t.byteOffset+e.SPHERE_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,_,f)}let h=c(n)||c(i)||c(o)||c(r),m=a>0&&!c(n)||l>0&&!c(i)||u>0&&!c(o)||f>0&&!c(r);if(h&&m)throw new ie("If one group of batch ids is defined, then all batch ids must be defined");if(!c(n)&&!c(i)&&!c(o)&&!c(r)){let _=0;if(!c(n)&&a>0)for(n=new Uint16Array(a),s=0;s<a;++s)n[s]=_++;if(!c(i)&&l>0)for(i=new Uint16Array(l),s=0;s<l;++s)i[s]=_++;if(!c(o)&&u>0)for(o=new Uint16Array(u),s=0;s<u;++s)o[s]=_++;if(!c(r)&&f>0)for(r=new Uint16Array(f),s=0;s<f;++s)r[s]=_++}return{boxes:n,cylinders:i,ellipsoids:o,spheres:r}}var Cb=Uint32Array.BYTES_PER_ELEMENT;function HLe(e,t,n){n=g(n,0);let i=new Uint8Array(t),o=new DataView(t);n+=Cb;let r=o.getUint32(n,!0);if(r!==1)throw new ie(`Only Geometry tile version 1 is supported. Version ${r} is not.`);n+=Cb;let s=o.getUint32(n,!0);if(n+=Cb,s===0){e._ready=!0;return}let a=o.getUint32(n,!0);if(n+=Cb,a===0)throw new ie("Feature table must have a byte length greater than zero");let l=o.getUint32(n,!0);n+=Cb;let u=o.getUint32(n,!0);n+=Cb;let f=o.getUint32(n,!0);n+=Cb;let h=Do(i,n,a);n+=a;let m=new Uint8Array(t,n,l);n+=l;let p,_;u>0&&(p=Do(i,n,u),n+=u,f>0&&(_=new Uint8Array(t,n,f),_=new Uint8Array(_)));let b=g(h.BOXES_LENGTH,0),x=g(h.CYLINDERS_LENGTH,0),T=g(h.ELLIPSOIDS_LENGTH,0),E=g(h.SPHERES_LENGTH,0),S=b+x+T+E,A=new R_(e,S,p,_,zLe(e));if(e._batchTable=A,S===0)return;let v=e.tile.computedTransform,D;c(h.RTC_CENTER)&&(D=d.unpack(h.RTC_CENTER),N.multiplyByPoint(v,D,D));let R=VLe(h,m);if(b>0||x>0||T>0||E>0){let P,L,F,y;if(b>0){let I=m.byteOffset+h.BOXES.byteOffset;P=new Float32Array(m.buffer,I,N_.packedBoxLength*b)}if(x>0){let I=m.byteOffset+h.CYLINDERS.byteOffset;L=new Float32Array(m.buffer,I,N_.packedCylinderLength*x)}if(T>0){let I=m.byteOffset+h.ELLIPSOIDS.byteOffset;F=new Float32Array(m.buffer,I,N_.packedEllipsoidLength*T)}if(E>0){let I=m.byteOffset+h.SPHERES.byteOffset;y=new Float32Array(m.buffer,I,N_.packedSphereLength*E)}return e._geometries=new N_({boxes:P,boxBatchIds:R.boxes,cylinders:L,cylinderBatchIds:R.cylinders,ellipsoids:F,ellipsoidBatchIds:R.ellipsoids,spheres:y,sphereBatchIds:R.spheres,center:D,modelMatrix:v,batchTable:A,boundingVolume:e.tile.boundingVolume.boundingVolume}),e}return Promise.resolve(e)}function Yee(e){let t=e.featuresLength;if(!c(e._features)&&t>0){let n=new Array(t);c(e._geometries)&&e._geometries.createFeatures(e,n),e._features=n}}gh.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)};gh.prototype.getFeature=function(e){let t=this.featuresLength;if(!c(e)||e<0||e>=t)throw new w(`batchId is required and between zero and featuresLength - 1 (${t-1}).`);return Yee(this),this._features[e]};gh.prototype.applyDebugSettings=function(e,t){c(this._geometries)&&this._geometries.applyDebugSettings(e,t)};gh.prototype.applyStyle=function(e){Yee(this),c(this._geometries)&&this._geometries.applyStyle(e,this._features)};gh.prototype.update=function(e,t){c(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(t)),c(this._batchTable)&&this._geometries.ready&&(this._batchTable.update(e,t),this._ready=!0)};gh.prototype.pick=function(e,t,n){};gh.prototype.isDestroyed=function(){return!1};gh.prototype.destroy=function(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),ue(this)};var _L=gh;var Sj={};Sj.encode2D=function(e,t,n){let i=Math.pow(2,e);if(C.typeOf.number("level",e),C.typeOf.number("x",t),C.typeOf.number("y",n),e<1)throw new w("Hilbert level cannot be less than 1.");if(t<0||t>=i||n<0||n>=i)throw new w("Invalid coordinates for given level.");let o={x:t,y:n},r,s,a,l=BigInt(0);for(a=i/2;a>0;a/=2)r=(o.x&a)>0?1:0,s=(o.y&a)>0?1:0,l+=BigInt((3*r^s)*a*a),Xee(i,o,r,s);return l};Sj.decode2D=function(e,t){if(C.typeOf.number("level",e),C.typeOf.bigint("index",t),e<1)throw new w("Hilbert level cannot be less than 1.");if(t<BigInt(0)||t>=BigInt(Math.pow(4,e)))throw new w("Hilbert index exceeds valid maximum for given level.");let n=Math.pow(2,e),i={x:0,y:0},o,r,s,a;for(s=1,a=t;s<n;s*=2)o=1&Number(a/BigInt(2)),r=1&Number(a^BigInt(o)),Xee(s,i,o,r),i.x+=s*o,i.y+=s*r,a/=BigInt(4);return[i.x,i.y]};function Xee(e,t,n,i){if(i!==0)return;n===1&&(t.x=e-1-t.x,t.y=e-1-t.y);let o=t.x;t.x=t.y,t.y=o}var iA=Sj;var U_=30,GLe=1<<U_,jLe=1<<U_+1>>>0,Aj=2*U_+1,F_=4,Zee=[],Jee=[],WLe=[[0,1,3,2],[0,2,3,1],[3,2,0,1],[3,1,0,2]],B_=1,IT=2,gL=[B_,0,0,B_|IT];function Zo(e){if(!sn.supportsBigInt())throw new ie("S2 required BigInt support");if(!c(e))throw new w("cell ID is required.");if(!Zo.isValidId(e))throw new w("cell ID is invalid.");this._cellId=e,this._level=Zo.getLevel(e)}Zo.fromToken=function(e){if(C.typeOf.string("token",e),!Zo.isValidToken(e))throw new w("token is invalid.");return new Zo(Zo.getIdFromToken(e))};Zo.isValidId=function(e){return C.typeOf.bigint("cellId",e),!(e<=0||e>>BigInt(Aj)>5||!(e&~e+BigInt(1)&BigInt("0x1555555555555555")))};Zo.isValidToken=function(e){return C.typeOf.string("token",e),/^[0-9a-fA-F]{1,16}$/.test(e)?Zo.isValidId(Zo.getIdFromToken(e)):!1};Zo.getIdFromToken=function(e){return C.typeOf.string("token",e),BigInt("0x"+e+"0".repeat(16-e.length))};Zo.getTokenFromId=function(e){C.typeOf.bigint("cellId",e);let t=Math.floor(tNe(e)/4),n=e.toString(16).replace(/0*$/,"");return Array(17-t-n.length).join("0")+n};Zo.getLevel=function(e){if(C.typeOf.bigint("cellId",e),!Zo.isValidId(e))throw new w;let t=0;for(;e!==BigInt(0)&&!(e&BigInt(1));)t++,e=e>>BigInt(1);return U_-(t>>1)};Zo.prototype.getChild=function(e){if(C.typeOf.number("index",e),e<0||e>3)throw new w("child index must be in the range [0-3].");if(this._level===30)throw new w("cannot get child of leaf cell.");let t=tte(this._cellId)>>BigInt(2),n=this._cellId+BigInt(2*e+1-4)*t;return new Zo(n)};Zo.prototype.getParent=function(){if(this._level===0)throw new w("cannot get parent of root cell.");let e=tte(this._cellId)<<BigInt(2);return new Zo(this._cellId&~e+BigInt(1)|e)};Zo.prototype.getParentAtLevel=function(e){if(this._level===0||e<0||this._level<e)throw new w("cannot get parent at invalid level.");let t=QLe(e);return new Zo(this._cellId&-t|t)};Zo.prototype.getCenter=function(e){e=g(e,Z.WGS84);let t=qLe(this._cellId,this._level);t=d.normalize(t,t);let n=new re.fromCartesian(t,Z.UNIT_SPHERE);return re.toCartesian(n,e,new d)};Zo.prototype.getVertex=function(e,t){if(C.typeOf.number("index",e),e<0||e>3)throw new w("vertex index must be in the range [0-3].");t=g(t,Z.WGS84);let n=YLe(this._cellId,this._level,e);n=d.normalize(n,n);let i=new re.fromCartesian(n,Z.UNIT_SPHERE);return re.toCartesian(i,t,new d)};Zo.fromFacePositionLevel=function(e,t,n){if(C.typeOf.bigint("position",t),e<0||e>5)throw new w("Invalid S2 Face (must be within 0-5)");if(n<0||n>U_)throw new w("Invalid level (must be within 0-30)");if(t<0||t>=Math.pow(4,n))throw new w("Invalid Hilbert position for level");let i=(e<4?"0":"")+(e<2?"0":"")+e.toString(2),o=t.toString(2),r=Array(2*n-o.length+1).join("0"),s=Array(Aj-2*n).join("0"),a=BigInt(`0b${i}${r}${o}1${s}`);return new Zo(a)};function qLe(e,t){let n=XLe(e,t);return KLe(n[0],n[1],n[2])}function YLe(e,t,n){let i=Qee(e,t),o=$Le([i[1],i[2]],t),r=n>>1&1;return ete(i[0],o[0][r^n&1],o[1][r])}function XLe(e,t){let n=Qee(e),i=n[0],o=n[1],r=n[2],s=t===30,a=!s&&(BigInt(o)^e>>BigInt(2))&BigInt(1),l=s?1:a?2:0,u=(o<<1)+l,f=(r<<1)+l;return[i,u,f]}function Qee(e){Zee.length===0&&JLe();let t=Number(e>>BigInt(Aj)),n=t&B_,i=(1<<F_)-1,o=0,r=0;for(let s=7;s>=0;s--){let l=(1<<2*(s===7?U_-7*F_:F_))-1;n+=Number(e>>BigInt(s*2*F_+1)&BigInt(l))<<2,n=Jee[n];let u=s*F_;o+=n>>F_+2<<u,r+=(n>>2&i)<<u,n&=B_|IT}return[t,o,r]}function KLe(e,t,n){let i=Kee(t),o=Kee(n),r=yL(i),s=yL(o);return ete(e,r,s)}function ete(e,t,n){switch(e){case 0:return new d(1,t,n);case 1:return new d(-t,1,n);case 2:return new d(-t,-n,1);case 3:return new d(-1,-n,-t);case 4:return new d(n,-1,-t);default:return new d(n,t,-1)}}function yL(e){return e>=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function Kee(e){return 1/jLe*e}function $Le(e,t){let n=[[],[]],i=ZLe(t);for(let o=0;o<2;++o){let r=e[o]&-i,s=r+i;n[o][0]=yL($ee(r)),n[o][1]=yL($ee(s))}return n}function ZLe(e){return 1<<U_-e>>>0}function $ee(e){return 1/GLe*e}function k_(e,t,n,i,o,r){if(e===F_){let s=(t<<F_)+n;Zee[(s<<2)+i]=(o<<2)+r,Jee[(o<<2)+i]=(s<<2)+r}else{e++,t<<=1,n<<=1,o<<=2;let s=WLe[r];k_(e,t+(s[0]>>1),n+(s[0]&1),i,o,r^gL[0]),k_(e,t+(s[1]>>1),n+(s[1]&1),i,o+1,r^gL[1]),k_(e,t+(s[2]>>1),n+(s[2]&1),i,o+2,r^gL[2]),k_(e,t+(s[3]>>1),n+(s[3]&1),i,o+3,r^gL[3])}}function JLe(){k_(0,0,0,0,0,0),k_(0,0,0,B_,0,B_),k_(0,0,0,IT,0,IT),k_(0,0,0,B_|IT,0,B_|IT)}function tte(e){return e&~e+BigInt(1)}function QLe(e){return BigInt(1)<<BigInt(2*(U_-e))}var eNe=[64,0,1,39,2,15,40,23,3,12,16,59,41,19,24,54,4,64,13,10,17,62,60,28,42,30,20,51,25,44,55,47,5,32,65,38,14,22,11,58,18,53,63,9,61,27,29,50,43,46,31,37,21,57,52,8,26,49,45,36,56,7,48,35,6,34,33,0];function tNe(e){return eNe[(-e&e)%BigInt(67)]}var z_=Zo;function nNe(e,t){return c(e)&&c(e.extensions)&&c(e.extensions[t])}var ei=nNe;function vj(e){let t=e.lengthBits,n=e.availableCount;C.typeOf.number("options.lengthBits",t);let i=e.constant,o=e.bitstream;if(c(i))n=t;else{let r=Math.ceil(t/8);if(o.length!==r)throw new ie(`Availability bitstream must be exactly ${r} bytes long to store ${t} bits. Actual bitstream was ${o.length} bytes long.`);let s=g(e.computeAvailableCountEnabled,!1);!c(n)&&s&&(n=iNe(o,t))}this._lengthBits=t,this._availableCount=n,this._constant=i,this._bitstream=o}function iNe(e,t){let n=0;for(let i=0;i<t;i++){let o=i>>3,r=i%8;n+=e[o]>>r&1}return n}Object.defineProperties(vj.prototype,{lengthBits:{get:function(){return this._lengthBits}},availableCount:{get:function(){return this._availableCount}}});vj.prototype.getBit=function(e){if(e<0||e>=this._lengthBits)throw new w("Bit index out of bounds.");if(c(this._constant))return this._constant;let t=e>>3,n=e%8;return(this._bitstream[t]>>n&1)===1};var oA=vj;function Xm(e){e=g(e,g.EMPTY_OBJECT);let t=e.metadataTable,n=e.class,i=e.entityId,o=e.propertyTableJson;C.typeOf.object("options.metadataTable",t),C.typeOf.object("options.class",n),C.typeOf.number("options.entityId",i),C.typeOf.object("options.propertyTableJson",o),this._class=n,this._metadataTable=t,this._entityId=i,this._extensions=o.extensions,this._extras=o.extras}Object.defineProperties(Xm.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});Xm.prototype.hasProperty=function(e){return this._metadataTable.hasProperty(e)};Xm.prototype.hasPropertyBySemantic=function(e){return this._metadataTable.hasPropertyBySemantic(e)};Xm.prototype.getPropertyIds=function(e){return this._metadataTable.getPropertyIds(e)};Xm.prototype.getProperty=function(e){return this._metadataTable.getProperty(this._entityId,e)};Xm.prototype.setProperty=function(e,t){return this._metadataTable.setProperty(this._entityId,e,t)};Xm.prototype.getPropertyBySemantic=function(e){return this._metadataTable.getPropertyBySemantic(this._entityId,e)};Xm.prototype.setPropertyBySemantic=function(e,t){return this._metadataTable.setPropertyBySemantic(this._entityId,e,t)};var rA=Xm;var bL={QUADTREE:"QUADTREE",OCTREE:"OCTREE"};bL.getBranchingFactor=function(e){switch(e){case bL.OCTREE:return 8;case bL.QUADTREE:return 4;default:throw new w("subdivisionScheme is not a valid value.")}};var Jo=Object.freeze(bL);function Us(){}Object.defineProperties(Us.prototype,{class:{get:function(){w.throwInstantiationError()}}});Us.prototype.hasProperty=function(e){w.throwInstantiationError()};Us.prototype.hasPropertyBySemantic=function(e){w.throwInstantiationError()};Us.prototype.getPropertyIds=function(e){w.throwInstantiationError()};Us.prototype.getProperty=function(e){w.throwInstantiationError()};Us.prototype.setProperty=function(e,t){w.throwInstantiationError()};Us.prototype.getPropertyBySemantic=function(e){w.throwInstantiationError()};Us.prototype.setPropertyBySemantic=function(e,t){w.throwInstantiationError()};Us.hasProperty=function(e,t,n){if(C.typeOf.string("propertyId",e),C.typeOf.object("properties",t),C.typeOf.object("classDefinition",n),c(t[e]))return!0;let i=n.properties;if(!c(i))return!1;let o=i[e];return!!(c(o)&&c(o.default))};Us.hasPropertyBySemantic=function(e,t,n){C.typeOf.string("semantic",e),C.typeOf.object("properties",t),C.typeOf.object("classDefinition",n);let i=n.propertiesBySemantic;if(!c(i))return!1;let o=i[e];return c(o)};Us.getPropertyIds=function(e,t,n){C.typeOf.object("properties",e),C.typeOf.object("classDefinition",t),n=c(n)?n:[],n.length=0;for(let o in e)e.hasOwnProperty(o)&&c(e[o])&&n.push(o);let i=t.properties;if(c(i))for(let o in i)i.hasOwnProperty(o)&&!c(e[o])&&c(i[o].default)&&n.push(o);return n};Us.getProperty=function(e,t,n){if(C.typeOf.string("propertyId",e),C.typeOf.object("properties",t),C.typeOf.object("classDefinition",n),!c(n.properties[e]))throw new w(`Class definition missing property ${e}`);let i=n.properties[e],o=t[e];Array.isArray(o)&&(o=o.slice());let r=!0;if(o=i.handleNoData(o),!c(o)&&c(i.default))return o=ze(i.default,!0),i.unpackVectorAndMatrixTypes(o,r);if(c(o))return o=i.normalize(o),o=i.applyValueTransform(o),i.unpackVectorAndMatrixTypes(o,r)};Us.setProperty=function(e,t,n,i){if(C.typeOf.string("propertyId",e),C.defined("value",t),C.typeOf.object("properties",n),C.typeOf.object("classDefinition",i),!c(n[e]))return!1;Array.isArray(t)&&(t=t.slice());let o,r=i.properties;return c(r)&&(o=r[e]),c(o)&&(t=o.packVectorAndMatrixTypes(t,!0),t=o.unapplyValueTransform(t),t=o.unnormalize(t)),n[e]=t,!0};Us.getPropertyBySemantic=function(e,t,n){C.typeOf.string("semantic",e),C.typeOf.object("properties",t),C.typeOf.object("classDefinition",n);let i=n.propertiesBySemantic;if(!c(i))return;let o=i[e];if(c(o))return Us.getProperty(o.id,t,n)};Us.setPropertyBySemantic=function(e,t,n,i){C.typeOf.string("semantic",e),C.defined("value",t),C.typeOf.object("properties",n),C.typeOf.object("classDefinition",i);let o=i.propertiesBySemantic;if(!c(o))return!1;let r=i.propertiesBySemantic[e];return c(r)?Us.setProperty(r.id,t,n,i):!1};var Rn=Us;function Km(e){e=g(e,g.EMPTY_OBJECT);let t=e.subtreeMetadata,n=e.class;C.typeOf.object("options.subtreeMetadata",t),C.typeOf.object("options.class",n);let i=c(t.properties)?t.properties:{};this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(Km.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});Km.prototype.hasProperty=function(e){return Rn.hasProperty(e,this._properties,this._class)};Km.prototype.hasPropertyBySemantic=function(e){return Rn.hasPropertyBySemantic(e,this._properties,this._class)};Km.prototype.getPropertyIds=function(e){return Rn.getPropertyIds(this._properties,this._class,e)};Km.prototype.getProperty=function(e){return Rn.getProperty(e,this._properties,this._class)};Km.prototype.setProperty=function(e,t){return Rn.setProperty(e,t,this._properties,this._class)};Km.prototype.getPropertyBySemantic=function(e){return Rn.getPropertyBySemantic(e,this._properties,this._class)};Km.prototype.setPropertyBySemantic=function(e,t){return Rn.setPropertyBySemantic(e,t,this._properties,this._class)};var xL=Km;var Mt={INT8:"INT8",UINT8:"UINT8",INT16:"INT16",UINT16:"UINT16",INT32:"INT32",UINT32:"UINT32",INT64:"INT64",UINT64:"UINT64",FLOAT32:"FLOAT32",FLOAT64:"FLOAT64"};Mt.getMinimum=function(e){switch(C.typeOf.string("type",e),e){case Mt.INT8:return-128;case Mt.UINT8:return 0;case Mt.INT16:return-32768;case Mt.UINT16:return 0;case Mt.INT32:return-2147483648;case Mt.UINT32:return 0;case Mt.INT64:return sn.supportsBigInt()?BigInt("-9223372036854775808"):-Math.pow(2,63);case Mt.UINT64:return sn.supportsBigInt()?BigInt(0):0;case Mt.FLOAT32:return-34028234663852886e22;case Mt.FLOAT64:return-Number.MAX_VALUE}};Mt.getMaximum=function(e){switch(C.typeOf.string("type",e),e){case Mt.INT8:return 127;case Mt.UINT8:return 255;case Mt.INT16:return 32767;case Mt.UINT16:return 65535;case Mt.INT32:return 2147483647;case Mt.UINT32:return 4294967295;case Mt.INT64:return sn.supportsBigInt()?BigInt("9223372036854775807"):Math.pow(2,63)-1;case Mt.UINT64:return sn.supportsBigInt()?BigInt("18446744073709551615"):Math.pow(2,64)-1;case Mt.FLOAT32:return 34028234663852886e22;case Mt.FLOAT64:return Number.MAX_VALUE}};Mt.isIntegerType=function(e){switch(C.typeOf.string("type",e),e){case Mt.INT8:case Mt.UINT8:case Mt.INT16:case Mt.UINT16:case Mt.INT32:case Mt.UINT32:case Mt.INT64:case Mt.UINT64:return!0;default:return!1}};Mt.isUnsignedIntegerType=function(e){switch(C.typeOf.string("type",e),e){case Mt.UINT8:case Mt.UINT16:case Mt.UINT32:case Mt.UINT64:return!0;default:return!1}};Mt.isVectorCompatible=function(e){switch(C.typeOf.string("type",e),e){case Mt.INT8:case Mt.UINT8:case Mt.INT16:case Mt.UINT16:case Mt.INT32:case Mt.UINT32:case Mt.FLOAT32:case Mt.FLOAT64:return!0;default:return!1}};Mt.normalize=function(e,t){if(typeof e!="number"&&typeof e!="bigint")throw new w("value must be a number or a BigInt");if(!Mt.isIntegerType(t))throw new w("type must be an integer type");return Math.max(Number(e)/Number(Mt.getMaximum(t)),-1)};Mt.unnormalize=function(e,t){if(C.typeOf.number("value",e),!Mt.isIntegerType(t))throw new w("type must be an integer type");let n=Mt.getMaximum(t),i=Mt.isUnsignedIntegerType(t)?0:-n;return e=O.sign(e)*Math.round(Math.abs(e)*Number(n)),(t===Mt.INT64||t===Mt.UINT64)&&sn.supportsBigInt()&&(e=BigInt(e)),e>n?n:e<i?i:e};Mt.applyValueTransform=function(e,t,n){return n*e+t};Mt.unapplyValueTransform=function(e,t,n){return n===0?0:(e-t)/n};Mt.getSizeInBytes=function(e){switch(C.typeOf.string("type",e),e){case Mt.INT8:case Mt.UINT8:return 1;case Mt.INT16:case Mt.UINT16:return 2;case Mt.INT32:case Mt.UINT32:return 4;case Mt.INT64:case Mt.UINT64:return 8;case Mt.FLOAT32:return 4;case Mt.FLOAT64:return 8}};Mt.fromComponentDatatype=function(e){switch(C.typeOf.number("componentDatatype",e),e){case j.BYTE:return Mt.INT8;case j.UNSIGNED_BYTE:return Mt.UINT8;case j.SHORT:return Mt.INT16;case j.UNSIGNED_SHORT:return Mt.UINT16;case j.INT:return Mt.INT32;case j.UNSIGNED_INT:return Mt.UINT32;case j.FLOAT:return Mt.FLOAT32;case j.DOUBLE:return Mt.FLOAT64}};Mt.toComponentDatatype=function(e){switch(C.typeOf.string("type",e),e){case Mt.INT8:return j.BYTE;case Mt.UINT8:return j.UNSIGNED_BYTE;case Mt.INT16:return j.SHORT;case Mt.UINT16:return j.UNSIGNED_SHORT;case Mt.INT32:return j.INT;case Mt.UINT32:return j.UNSIGNED_INT;case Mt.FLOAT32:return j.FLOAT;case Mt.FLOAT64:return j.DOUBLE}};var zt=Object.freeze(Mt);var Io={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4",BOOLEAN:"BOOLEAN",STRING:"STRING",ENUM:"ENUM"};Io.isVectorType=function(e){switch(C.typeOf.string("type",e),e){case Io.VEC2:case Io.VEC3:case Io.VEC4:return!0;default:return!1}};Io.isMatrixType=function(e){switch(C.typeOf.string("type",e),e){case Io.MAT2:case Io.MAT3:case Io.MAT4:return!0;default:return!1}};Io.getComponentCount=function(e){switch(C.typeOf.string("type",e),e){case Io.SCALAR:case Io.STRING:case Io.ENUM:case Io.BOOLEAN:return 1;case Io.VEC2:return 2;case Io.VEC3:return 3;case Io.VEC4:return 4;case Io.MAT2:return 4;case Io.MAT3:return 9;case Io.MAT4:return 16;default:throw new w(`Invalid metadata type ${e}`)}};Io.getMathType=function(e){switch(e){case Io.VEC2:return k;case Io.VEC3:return d;case Io.VEC4:return ee;case Io.MAT2:return Li;case Io.MAT3:return q;case Io.MAT4:return N;default:return}};var Ct=Object.freeze(Io);function aa(e){e=g(e,g.EMPTY_OBJECT);let t=e.id,n=e.type;C.typeOf.string("options.id",t),C.typeOf.string("options.type",n);let i=e.componentType,o=e.enumType,r=c(i)&&zt.isIntegerType(i)&&g(e.normalized,!1);this._id=t,this._name=e.name,this._description=e.description,this._semantic=e.semantic,this._isLegacyExtension=e.isLegacyExtension,this._type=n,this._componentType=i,this._enumType=o,this._valueType=c(o)?o.valueType:i,this._isArray=g(e.isArray,!1),this._isVariableLengthArray=g(e.isVariableLengthArray,!1),this._arrayLength=e.arrayLength,this._min=ze(e.min,!0),this._max=ze(e.max,!0),this._normalized=r;let s=ze(e.offset,!0),a=ze(e.scale,!0),l=c(s)||c(a),u=!0;c(s)||(s=this.expandConstant(0,u)),c(a)||(a=this.expandConstant(1,u)),this._offset=s,this._scale=a,this._hasValueTransform=l,this._noData=ze(e.noData,!0),this._default=ze(e.default,!0),this._required=g(e.required,!0),this._extras=ze(e.extras,!0),this._extensions=ze(e.extensions,!0)}aa.fromJson=function(e){e=g(e,g.EMPTY_OBJECT);let t=e.id,n=e.property;C.typeOf.string("options.id",t),C.typeOf.object("options.property",n),C.typeOf.string("options.property.type",n.type);let i=oNe(n),o=rNe(n,e.enums),r;return c(i)?i?r=c(n.optional)?!n.optional:!0:r=g(n.required,!1):r=!1,new aa({id:t,type:o.type,componentType:o.componentType,enumType:o.enumType,isArray:o.isArray,isVariableLengthArray:o.isVariableLengthArray,arrayLength:o.arrayLength,normalized:n.normalized,min:n.min,max:n.max,offset:n.offset,scale:n.scale,noData:n.noData,default:n.default,required:r,name:n.name,description:n.description,semantic:n.semantic,extras:n.extras,extensions:n.extensions,isLegacyExtension:i})};Object.defineProperties(aa.prototype,{id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},type:{get:function(){return this._type}},enumType:{get:function(){return this._enumType}},componentType:{get:function(){return this._componentType}},valueType:{get:function(){return this._valueType}},isArray:{get:function(){return this._isArray}},isVariableLengthArray:{get:function(){return this._isVariableLengthArray}},arrayLength:{get:function(){return this._arrayLength}},normalized:{get:function(){return this._normalized}},max:{get:function(){return this._max}},min:{get:function(){return this._min}},noData:{get:function(){return this._noData}},default:{get:function(){return this._default}},required:{get:function(){return this._required}},semantic:{get:function(){return this._semantic}},hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});function oNe(e){if(e.type==="ARRAY")return!0;let t=e.type;if(t===Ct.SCALAR||Ct.isMatrixType(t)||Ct.isVectorType(t))return!1;if(c(zt[t]))return!0;if(c(e.noData)||c(e.scale)||c(e.offset)||c(e.required)||c(e.count)||c(e.array)||c(e.optional))return!1}function rNe(e,t){let n=e.type,i=e.componentType,o=n==="ARRAY",r,s,a;o?(r=!0,s=e.componentCount,a=!c(s)):e.array?(r=!0,s=e.count,a=!c(e.count)):(r=!1,s=void 0,a=!1);let l;if(c(e.enumType)&&(l=t[e.enumType]),n===Ct.ENUM)return{type:n,componentType:void 0,enumType:l,valueType:l.valueType,isArray:r,isVariableLengthArray:a,arrayLength:s};if(o&&i===Ct.ENUM)return{type:i,componentType:void 0,enumType:l,valueType:l.valueType,isArray:r,isVariableLengthArray:a,arrayLength:s};if(n===Ct.SCALAR||Ct.isMatrixType(n)||Ct.isVectorType(n))return{type:n,componentType:i,enumType:void 0,valueType:i,isArray:r,isVariableLengthArray:a,arrayLength:s};if(n===Ct.BOOLEAN||n===Ct.STRING)return{type:n,componentType:void 0,enumType:void 0,valueType:void 0,isArray:r,isVariableLengthArray:a,arrayLength:s};if(o&&(i===Ct.BOOLEAN||i===Ct.STRING))return{type:i,componentType:void 0,enumType:void 0,valueType:void 0,isArray:r,isVariableLengthArray:a,arrayLength:s};if(c(i)&&c(zt[i]))return{type:Ct.SCALAR,componentType:i,enumType:void 0,valueType:i,isArray:r,isVariableLengthArray:a,arrayLength:s};if(c(zt[n]))return{type:Ct.SCALAR,componentType:n,enumType:void 0,valueType:n,isArray:r,isVariableLengthArray:a,arrayLength:s};throw new w(`unknown metadata type {type: ${n}, componentType: ${i})`)}aa.prototype.normalize=function(e){return this._normalized?Dj(e,this._valueType,zt.normalize):e};aa.prototype.unnormalize=function(e){return this._normalized?Dj(e,this._valueType,zt.unnormalize):e};aa.prototype.applyValueTransform=function(e){return!this._hasValueTransform||this._isVariableLengthArray?e:aa.valueTransformInPlace(e,this._offset,this._scale,zt.applyValueTransform)};aa.prototype.unapplyValueTransform=function(e){return!this._hasValueTransform||this._isVariableLengthArray?e:aa.valueTransformInPlace(e,this._offset,this._scale,zt.unapplyValueTransform)};aa.prototype.expandConstant=function(e,t){t=g(t,!1);let n=this._isArray,i=this._arrayLength,o=Ct.getComponentCount(this._type),r=n&&o>1;if(!n&&o===1)return e;if(!n)return new Array(o).fill(e);if(!r)return new Array(i).fill(e);if(!t)return new Array(this._arrayLength*o).fill(e);let s=new Array(o).fill(e);return new Array(this._arrayLength).fill(s)};aa.prototype.handleNoData=function(e){let t=this._noData;if(!c(t))return e;if(!rte(e,t))return e};function rte(e,t){if(!Array.isArray(e))return e===t;if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!rte(e[n],t[n]))return!1;return!0}aa.prototype.unpackVectorAndMatrixTypes=function(e,t){t=g(t,!1);let n=Ct.getMathType(this._type),i=this._isArray,o=Ct.getComponentCount(this._type),r=i&&o>1;return c(n)?t&&r?e.map(function(s){return n.unpack(s)}):i?n.unpackArray(e):n.unpack(e):e};aa.prototype.packVectorAndMatrixTypes=function(e,t){t=g(t,!1);let n=Ct.getMathType(this._type),i=this._isArray,o=Ct.getComponentCount(this._type),r=i&&o>1;return c(n)?t&&r?e.map(function(s){return n.pack(s,[])}):i?n.packArray(e,[]):n.pack(e,[]):e};aa.prototype.validate=function(e){if(!(!c(e)&&c(this._default)))return this._required&&!c(e)?"required property must have a value":this._isArray?sNe(this,e):ste(this,e)};function sNe(e,t){if(!Array.isArray(t))return`value ${t} must be an array`;let n=t.length;if(!e._isVariableLengthArray&&n!==e._arrayLength)return"Array length does not match property.arrayLength";for(let i=0;i<n;i++){let o=ste(e,t[i]);if(c(o))return o}}function ste(e,t){let n=e._type,i=e._componentType,o=e._enumType,r=e._normalized;return Ct.isVectorType(n)?aNe(t,n,i):Ct.isMatrixType(n)?cNe(t,n,i):n===Ct.STRING?lNe(t):n===Ct.BOOLEAN?uNe(t):n===Ct.ENUM?fNe(t,o):dNe(t,i,r)}function aNe(e,t,n){if(!zt.isVectorCompatible(n))return`componentType ${n} is incompatible with vector type ${t}`;if(t===Ct.VEC2&&!(e instanceof k))return`vector value ${e} must be a Cartesian2`;if(t===Ct.VEC3&&!(e instanceof d))return`vector value ${e} must be a Cartesian3`;if(t===Ct.VEC4&&!(e instanceof ee))return`vector value ${e} must be a Cartesian4`}function cNe(e,t,n){if(!zt.isVectorCompatible(n))return`componentType ${n} is incompatible with matrix type ${t}`;if(t===Ct.MAT2&&!(e instanceof Li))return`matrix value ${e} must be a Matrix2`;if(t===Ct.MAT3&&!(e instanceof q))return`matrix value ${e} must be a Matrix3`;if(t===Ct.MAT4&&!(e instanceof N))return`matrix value ${e} must be a Matrix4`}function lNe(e){if(typeof e!="string")return TL(e,Ct.STRING)}function uNe(e){if(typeof e!="boolean")return TL(e,Ct.BOOLEAN)}function fNe(e,t){let n=typeof e;if(c(t))return n!=="string"||!c(t.valuesByName[e])?`value ${e} is not a valid enum name for ${t.id}`:void 0}function dNe(e,t,n){let i=typeof e;switch(t){case zt.INT8:case zt.UINT8:case zt.INT16:case zt.UINT16:case zt.INT32:case zt.UINT32:case zt.FLOAT32:case zt.FLOAT64:return i!=="number"?TL(e,t):isFinite(e)?ite(e,t,n):ote(e,t);case zt.INT64:case zt.UINT64:return i!=="number"&&i!=="bigint"?TL(e,t):i==="number"&&!isFinite(e)?ote(e,t):ite(e,t,n)}}function TL(e,t){return`value ${e} does not match type ${t}`}function nte(e,t,n){let i=`value ${e} is out of range for type ${t}`;return n&&(i+=" (normalized)"),i}function ite(e,t,n){if(n){let i=zt.isUnsignedIntegerType(t)?0:-1;return e<i||e>1?nte(e,t,n):void 0}if(e<zt.getMinimum(t)||e>zt.getMaximum(t))return nte(e,t,n)}function ote(e,t){return`value ${e} of type ${t} must be finite`}function Dj(e,t,n){if(!Array.isArray(e))return n(e,t);for(let i=0;i<e.length;i++)e[i]=Dj(e[i],t,n);return e}aa.valueTransformInPlace=function(e,t,n,i){if(!Array.isArray(e))return i(e,t,n);for(let o=0;o<e.length;o++)e[o]=aa.valueTransformInPlace(e[o],t[o],n[o],i);return e};var Eb=aa;function sA(e){e=g(e,g.EMPTY_OBJECT);let t=e.count,n=e.property,i=e.classProperty,o=e.bufferViews;C.typeOf.number.greaterThan("options.count",t,0),C.typeOf.object("options.property",n),C.typeOf.object("options.classProperty",i),C.typeOf.object("options.bufferViews",o);let r=i.type,s=i.isArray,a=i.isVariableLengthArray,l=i.valueType,u=i.enumType,f=r===Ct.STRING,h=r===Ct.BOOLEAN,m=0,p;if(a){let y=g(n.arrayOffsetType,n.offsetType);y=g(zt[y],zt.UINT32);let I=g(n.arrayOffsets,n.arrayOffsetBufferView);p=new Ij(o[I],y,t+1),m+=p.typedArray.byteLength}let _=Ct.getComponentCount(r),b;a?b=p.get(t)-p.get(0):s?b=t*i.arrayLength:b=t;let x=_*b,T;if(f){let y=g(n.stringOffsetType,n.offsetType);y=g(zt[y],zt.UINT32);let I=g(n.stringOffsets,n.stringOffsetBufferView);T=new Ij(o[I],y,x+1),m+=T.typedArray.byteLength}(f||h)&&(l=zt.UINT8);let E;f?E=T.get(x)-T.get(0):h?E=Math.ceil(x/8):E=x;let S=g(n.values,n.bufferView),A=new Ij(o[S],l,E);m+=A.typedArray.byteLength;let v=n.offset,D=n.scale,R=i.hasValueTransform||c(v)||c(D);v=g(v,i.offset),D=g(D,i.scale),v=ate(v),D=ate(D);let P,L,F=this;f?P=function(y){return pNe(y,F._values,F._stringOffsets)}:h?(P=function(y){return _Ne(y,F._values)},L=function(y,I){gNe(y,F._values,I)}):c(u)?(P=function(y){let I=F._values.get(y);return u.namesByValue[I]},L=function(y,I){let M=u.valuesByName[I];F._values.set(y,M)}):(P=function(y){return F._values.get(y)},L=function(y,I){F._values.set(y,I)}),this._arrayOffsets=p,this._stringOffsets=T,this._values=A,this._classProperty=i,this._count=t,this._vectorComponentCount=_,this._min=n.min,this._max=n.max,this._offset=v,this._scale=D,this._hasValueTransform=R,this._getValue=P,this._setValue=L,this._unpackedValues=void 0,this._extras=n.extras,this._extensions=n.extensions,this._byteLength=m}Object.defineProperties(sA.prototype,{hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},byteLength:{get:function(){return this._byteLength}}});sA.prototype.get=function(e){cte(this,e);let t=hNe(this,e);return t=this._classProperty.handleNoData(t),c(t)?(t=this._classProperty.normalize(t),t=SNe(this,t),this._classProperty.unpackVectorAndMatrixTypes(t)):(t=this._classProperty.default,this._classProperty.unpackVectorAndMatrixTypes(t))};sA.prototype.set=function(e,t){let n=this._classProperty;C.defined("value",t),cte(this,e);let i=n.validate(t);if(c(i))throw new w(i);t=n.packVectorAndMatrixTypes(t),t=ANe(this,t),t=n.unnormalize(t),mNe(this,e,t)};sA.prototype.getTypedArray=function(){if(c(this._values))return this._values.typedArray};function ate(e){if(!Array.isArray(e))return e;let t=[];for(let n=0;n<e.length;n++){let i=e[n];Array.isArray(i)?t.push.apply(t,i):t.push(i)}return t}function cte(e,t){let n=e._count;if(!c(t)||t<0||t>=n){let i=n-1;throw new w(`index is required and between zero and count - 1. Actual value: ${i}`)}}function hNe(e,t){ute(e)&&fte(e);let n=e._classProperty,i=n.isArray,o=n.type,r=Ct.getComponentCount(o);if(c(e._unpackedValues)){let s=e._unpackedValues[t];return i?ze(s,!0):s}return!i&&r===1?e._getValue(t):lte(e,n,t)}function lte(e,t,n){let i,o;if(t.isVariableLengthArray){i=e._arrayOffsets.get(n),o=e._arrayOffsets.get(n+1)-i;let s=Ct.getComponentCount(t.type);i*=s,o*=s}else{let a=g(t.arrayLength,1)*e._vectorComponentCount;i=n*a,o=a}let r=new Array(o);for(let s=0;s<o;s++)r[s]=e._getValue(i+s);return r}function mNe(e,t,n){ENe(e,t,n)&&fte(e);let i=e._classProperty,o=i.isArray,r=i.type,s=Ct.getComponentCount(r);if(c(e._unpackedValues)){i.isArray&&(n=ze(n,!0)),e._unpackedValues[t]=n;return}if(!o&&s===1){e._setValue(t,n);return}let a,l;if(i.isVariableLengthArray)a=e._arrayOffsets.get(t),l=e._arrayOffsets.get(t+1)-a;else{let f=g(i.arrayLength,1)*e._vectorComponentCount;a=t*f,l=f}for(let u=0;u<l;++u)e._setValue(a+u,n[u])}function pNe(e,t,n){let i=n.get(e),o=n.get(e+1)-i;return Fl(t.typedArray,i,o)}function _Ne(e,t){let n=e>>3,i=e%8;return(t.typedArray[n]>>i&1)===1}function gNe(e,t,n){let i=e>>3,o=e%8;n?t.typedArray[i]|=1<<o:t.typedArray[i]&=~(1<<o)}function yNe(e,t){let n=t.dataView,i=e*8,o=0,r=(n.getUint8(i+7)&128)>0,s=!0;for(let a=0;a<8;++a){let l=n.getUint8(i+a);r&&(s?l!==0&&(l=~(l-1)&255,s=!1):l=~l&255),o+=l*Math.pow(256,a)}return r&&(o=-o),o}function bNe(e,t){let n=t.dataView,i=e*8,o=BigInt(0),r=(n.getUint8(i+7)&128)>0,s=!0;for(let a=0;a<8;++a){let l=n.getUint8(i+a);r&&(s?l!==0&&(l=~(l-1)&255,s=!1):l=~l&255),o+=BigInt(l)*(BigInt(1)<<BigInt(a*8))}return r&&(o=-o),o}function xNe(e,t){let n=t.dataView,i=e*8,o=n.getUint32(i,!0),r=n.getUint32(i+4,!0);return o+4294967296*r}function TNe(e,t){let n=t.dataView,i=e*8,o=BigInt(n.getUint32(i,!0)),r=BigInt(n.getUint32(i+4,!0));return o+BigInt(4294967296)*r}function CNe(e){switch(e){case zt.INT8:return j.BYTE;case zt.UINT8:return j.UNSIGNED_BYTE;case zt.INT16:return j.SHORT;case zt.UINT16:return j.UNSIGNED_SHORT;case zt.INT32:return j.INT;case zt.UINT32:return j.UNSIGNED_INT;case zt.FLOAT32:return j.FLOAT;case zt.FLOAT64:return j.DOUBLE}}function ute(e){if(c(e._unpackedValues))return!1;let t=e._classProperty,n=t.type,i=t.valueType;return n===Ct.STRING||i===zt.INT64&&!sn.supportsBigInt64Array()||i===zt.UINT64&&!sn.supportsBigUint64Array()}function ENe(e,t,n){if(ute(e))return!0;let i=e._arrayOffsets;if(c(i)){let o=i.get(t+1)-i.get(t),r=n.length;if(o!==r)return!0}return!1}function fte(e){e._unpackedValues=wNe(e),e._arrayOffsets=void 0,e._stringOffsets=void 0,e._values=void 0}function wNe(e){let t=e._count,n=new Array(t),i=e._classProperty,o=i.isArray,r=i.type,s=Ct.getComponentCount(r);if(!o&&s===1){for(let a=0;a<t;++a)n[a]=e._getValue(a);return n}for(let a=0;a<t;a++)n[a]=lte(e,i,a);return n}function SNe(e,t){let i=e._classProperty.isVariableLengthArray;return!e._hasValueTransform||i?t:Eb.valueTransformInPlace(t,e._offset,e._scale,zt.applyValueTransform)}function ANe(e,t){let i=e._classProperty.isVariableLengthArray;return!e._hasValueTransform||i?t:Eb.valueTransformInPlace(t,e._offset,e._scale,zt.unapplyValueTransform)}function Ij(e,t,n){let i=this,o,r,s;if(t===zt.INT64)sn.supportsBigInt()?sn.supportsBigInt64Array()?(o=new BigInt64Array(e.buffer,e.byteOffset,n),s=function(a,l){i.typedArray[a]=BigInt(l)}):(o=new Uint8Array(e.buffer,e.byteOffset,n*8),r=function(a){return bNe(a,i)}):(mt("INT64 type is not fully supported on this platform. Values greater than 2^53 - 1 or less than -(2^53 - 1) may lose precision when read."),o=new Uint8Array(e.buffer,e.byteOffset,n*8),r=function(a){return yNe(a,i)});else if(t===zt.UINT64)sn.supportsBigInt()?sn.supportsBigUint64Array()?(o=new BigUint64Array(e.buffer,e.byteOffset,n),s=function(a,l){i.typedArray[a]=BigInt(l)}):(o=new Uint8Array(e.buffer,e.byteOffset,n*8),r=function(a){return TNe(a,i)}):(mt("UINT64 type is not fully supported on this platform. Values greater than 2^53 - 1 may lose precision when read."),o=new Uint8Array(e.buffer,e.byteOffset,n*8),r=function(a){return xNe(a,i)});else{let a=CNe(t);o=j.createArrayBufferView(a,e.buffer,e.byteOffset,n),s=function(l,u){i.typedArray[l]=u}}c(r)||(r=function(a){return i.typedArray[a]}),this.typedArray=o,this.dataView=new DataView(o.buffer,o.byteOffset),this.get=r,this.set=s,this._componentType=t}var CL=sA;function qf(e){e=g(e,g.EMPTY_OBJECT);let t=e.count,n=e.class;C.typeOf.number.greaterThan("options.count",t,0),C.typeOf.object("options.class",n);let i=0,o={};if(c(e.properties)){for(let r in e.properties)if(e.properties.hasOwnProperty(r)){let s=new CL({count:t,property:e.properties[r],classProperty:n.properties[r],bufferViews:e.bufferViews});o[r]=s,i+=s.byteLength}}this._count=t,this._class=n,this._properties=o,this._byteLength=i}Object.defineProperties(qf.prototype,{count:{get:function(){return this._count}},class:{get:function(){return this._class}},byteLength:{get:function(){return this._byteLength}}});qf.prototype.hasProperty=function(e){return Rn.hasProperty(e,this._properties,this._class)};qf.prototype.hasPropertyBySemantic=function(e){return Rn.hasPropertyBySemantic(e,this._properties,this._class)};qf.prototype.getPropertyIds=function(e){return Rn.getPropertyIds(this._properties,this._class,e)};qf.prototype.getProperty=function(e,t){C.typeOf.string("propertyId",t);let n=this._properties[t],i;return c(n)?i=n.get(e):i=vNe(this._class,t),i};qf.prototype.setProperty=function(e,t,n){C.typeOf.string("propertyId",t);let i=this._properties[t];return c(i)?(i.set(e,n),!0):!1};qf.prototype.getPropertyBySemantic=function(e,t){C.typeOf.string("semantic",t);let n,i=this._class.propertiesBySemantic;if(c(i)&&(n=i[t]),c(n))return this.getProperty(e,n.id)};qf.prototype.setPropertyBySemantic=function(e,t,n){C.typeOf.string("semantic",t);let i,o=this._class.propertiesBySemantic;return c(o)&&(i=o[t]),c(i)?this.setProperty(e,i.id,n):!1};qf.prototype.getPropertyTypedArray=function(e){C.typeOf.string("propertyId",e);let t=this._properties[e];if(c(t))return t.getTypedArray()};qf.prototype.getPropertyTypedArrayBySemantic=function(e){C.typeOf.string("semantic",e);let t,n=this._class.propertiesBySemantic;if(c(n)&&(t=n[e]),c(t))return this.getPropertyTypedArray(t.id)};function vNe(e,t){let n=e.properties;if(!c(n))return;let i=n[t];if(c(i)&&c(i.default)){let o=i.default;return i.isArray&&(o=ze(o,!0)),o=i.normalize(o),i.unpackVectorAndMatrixTypes(o)}}var kl=qf;function V_(){}Object.defineProperties(V_.prototype,{cacheKey:{get:function(){w.throwInstantiationError()}}});V_.prototype.load=function(){w.throwInstantiationError()};V_.prototype.unload=function(){};V_.prototype.process=function(e){return!1};V_.prototype.getError=function(e,t){C.typeOf.string("errorMessage",e),c(t)&&c(t.message)&&(e+=`
| ${t.message}`);let n=new ie(e);return c(t)&&(n.stack=`Original stack:
| ${t.stack}
| Handler stack:
| ${n.stack}`),n};V_.prototype.isDestroyed=function(){return!1};V_.prototype.destroy=function(){return this.unload(),ue(this)};var Gi=V_;var DNe={UNLOADED:0,LOADING:1,LOADED:2,PROCESSING:3,READY:4,FAILED:5},_t=Object.freeze(DNe);function $m(e){e=g(e,g.EMPTY_OBJECT);let t=e.typedArray,n=e.resource,i=e.cacheKey;if(c(t)===c(n))throw new w("One of options.typedArray and options.resource must be defined.");this._typedArray=t,this._resource=n,this._cacheKey=i,this._state=_t.UNLOADED,this._promise=void 0}c(Object.create)&&($m.prototype=Object.create(Gi.prototype),$m.prototype.constructor=$m);Object.defineProperties($m.prototype,{cacheKey:{get:function(){return this._cacheKey}},typedArray:{get:function(){return this._typedArray}}});$m.prototype.load=async function(){return c(this._promise)?this._promise:c(this._typedArray)?(this._promise=Promise.resolve(this),this._promise):(this._promise=INe(this),this._promise)};async function INe(e){let t=e._resource;e._state=_t.LOADING;try{let n=await $m._fetchArrayBuffer(t);return e.isDestroyed()?void 0:(e._typedArray=new Uint8Array(n),e._state=_t.READY,e)}catch(n){if(e.isDestroyed())return;e._state=_t.FAILED;let i=`Failed to load external buffer: ${t.url}`;throw e.getError(i,n)}}$m._fetchArrayBuffer=function(e){return e.fetchArrayBuffer()};$m.prototype.unload=function(){this._typedArray=void 0};var OT=$m;var nQt=function(){var e="b9H79TebbbeJq9Geueu9Geub9Gbb9Gvuuuuueu9Gduueu9Gluuuueu9Gvuuuuub9Gouuuuuub9Gluuuub9GiuuueuiKLdilevlevlooroowwvwbDDbelve9Weiiviebeoweuec:G:Qdkr;RiOo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWVbe8F9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWV9c9V919U9KbdE9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949wWV79P9V9UbiY9TW79O9V9Wt9FW9U9J9V9KW69U9KW949c919M9MWVbl8E9TW79O9V9Wt9FW9U9J9V9KW69U9KW949c919M9MWV9c9V919U9Kbv8A9TW79O9V9Wt9FW9U9J9V9KW69U9KW949wWV79P9V9UboE9TW79O9V9Wt9FW9U9J9V9KW69U9KW949tWG91W9U9JWbra9TW79O9V9Wt9FW9U9J9V9KW69U9KW949tWG91W9U9JW9c9V919U9KbwL9TW79O9V9Wt9FW9U9J9V9KWS9P2tWV9p9JtbDK9TW79O9V9Wt9FW9U9J9V9KWS9P2tWV9r919HtbqL9TW79O9V9Wt9FW9U9J9V9KWS9P2tWVT949WbkE9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94J9H9J9OWbPa9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94J9H9J9OW9ttV9P9Wbsa9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9WbzK9TW79O9V9Wt9F79W9Ht9P9H29t9VVt9sW9T9H9WbHl79IV9RbODwebcekdQXq;A9pLdbk;QqeKu8Jjjjjbcjo9Rgv8Kjjjjbcbhodnalcefae0mbabcbRbN:kjjbc:GeV86bbavcjdfcbcjdzNjjjb8AdnaiTmbavcjdfadalz:tjjjb8Akabaefhrabcefhwavalfcbcbcjdal9RalcFe0EzNjjjb8Aavavcjdfalz:tjjjbhDcj;abal9Uc;WFbGgecjdaecjd6Ehqcbhkindndnaiak9nmbaDcjlfcbcjdzNjjjb8Aaqaiak9Rakaqfai6Egxcsfgecl4cifcd4hmadakal2fhPdndndnaec9WGgsTmbcbhzaPhHawhOxekdnaxmbalheinaraw9Ram6miawcbamzNjjjbamfhwaecufgembxvkkcbhAaPhOinaDaAfRbbhCaDcjlfheaOhoaxhXinaeaoRbbgQaC9RgCcetaCcKtcK91cr4786bbaoalfhoaecefheaQhCaXcufgXmbkaraw9Ram6mdaOcefhOawcbamzNjjjbamfhwaAcefgAal9hmbxlkkindnaxTmbaDazfRbbhCaDcjlfheaHhoaxhXinaeaoRbbgQaC9RgCcetaCcKtcK91cr4786bbaoalfhoaecefheaQhCaXcufgXmbkkaraO9Ram6mearaOcbamzNjjjbgLamfgw9RcK6mecbhKaDcjlfhOinaDcjlfaKfhYcwhAczhQceheindndnaegXce9hmbcuhoaYRbbmecbhodninaogecsSmeaecefhoaOaefcefRbbTmbkkcucbaecs6EhoxekaXcethocuaXtc;:bGcFb7hCcbheinaoaCaOaefRbb9nfhoaecefgecz9hmbkkaoaQaoaQ6geEhQaXaAaeEhAaXcetheaXcl6mbkdndndndnaAcufPdiebkaLaKco4fgeaeRbbcdciaAclSEaKci4coGtV86bbaAcw9hmeawaY8Pbb83bbawcwfaYcwf8Pbb83bbawczfhwxdkaLaKco4fgeaeRbbceaKci4coGtV86bbkdncwaA9Tg8Ambinawcb86bbawcefhwxbkkcuaAtcu7hYcbhEaOh3ina3hea8AhCcbhoinaeRbbgQaYcFeGgXaQaX6EaoaAtVhoaecefheaCcufgCmbkawao86bba3a8Afh3awcefhwaEa8AfgEcz6mbkcbheindnaOaefRbbgoaX6mbawao86bbawcefhwkaecefgecz9hmbkkdnaKczfgKas9pmbaOczfhOaraw9RcL0mekkaKas6meawTmeaHcefhHawhOazcefgzalSmixbkkcbhoxikcbhoaraw9Ralcaalca0E6mddnalc8F0mbawcbcaal9RgezNjjjbaefhwkawaDcjdfalz:tjjjbalfab9RhoxdkaDaPaxcufal2falz:tjjjb8Aaxakfhkawmbkcbhokavcjof8Kjjjjbaok9heeuaecaaeca0Eabcj;abae9Uc;WFbGgdcjdadcjd6Egdfcufad9Uae2adcl4cifcd4adV2fcefkmbcbabBdN:kjjbk:zse5u8Jjjjjbc;ae9Rgl8Kjjjjbcbhvdnaici9UgocHfae0mbabcbyd:e:kjjbgrc;GeV86bbalc;abfcFecjezNjjjb8AalcUfgw9cu83ibalc8WfgD9cu83ibalcyfgq9cu83ibalcafgk9cu83ibalcKfgx9cu83ibalczfgm9cu83ibal9cu83iwal9cu83ibabaefc9WfhPabcefgsaofhednaiTmbcmcsarcb9kgzEhHcbhOcbhAcbhCcbhXcbhQindnaeaP9nmbcbhvxikaQcufhvadaCcdtfgLydbhKaLcwfydbhYaLclfydbh8AcbhEdndndninalc;abfavcsGcitfgoydlh3dndndnaoydbgoaK9hmba3a8ASmekdnaoa8A9hmba3aY9hmbaEcefhExekaoaY9hmea3aK9hmeaEcdfhEkaEc870mdaXcufhvaLaEciGcx2goc:y1jjbfydbcdtfydbh3aLaocN1jjbfydbcdtfydbh8AaLaoc:q1jjbfydbcdtfydbhKcbhodnindnalavcsGcdtfydba39hmbaohYxdkcuhYavcufhvaocefgocz9hmbkkaOa3aOSgvaYce9iaYaH9oVgoGfhOdndndncbcsavEaYaoEgvcs9hmbarce9imba3a3aAa3cefaASgvEgAcefSmecmcsavEhvkasavaEcdtc;WeGV86bbavcs9hmea3aA9Rgvcetavc8F917hvinaeavcFb0crtavcFbGV86bbaecefheavcje6hoavcr4hvaoTmbka3hAxvkcPhvasaEcdtcPV86bba3hAkavTmiavaH9omicdhocehEaQhYxlkavcufhvaEclfgEc;ab9hmbkkdnaLceaYaOSceta8AaOSEcx2gvc:q1jjbfydbcdtfydbgKTaLavcN1jjbfydbcdtfydbg8AceSGaLavc:y1jjbfydbcdtfydbg3cdSGaOcb9hGazGg5ce9hmbaw9cu83ibaD9cu83ibaq9cu83ibak9cu83ibax9cu83ibam9cu83ibal9cu83iwal9cu83ibcbhOkcbhEaXcufgvhodnindnalaocsGcdtfydba8A9hmbaEhYxdkcuhYaocufhoaEcefgEcz9hmbkkcbhodnindnalavcsGcdtfydba39hmbaohExdkcuhEavcufhvaocefgocz9hmbkkaOaKaOSg8EfhLdndnaYcm0mbaYcefhYxekcbcsa8AaLSgvEhYaLavfhLkdndnaEcm0mbaEcefhExekcbcsa3aLSgvEhEaLavfhLkc9:cua8EEh8FcbhvaEaYcltVgacFeGhodndndninavcj1jjbfRbbaoSmeavcefgvcz9hmbxdkka5aKaO9havcm0VVmbasavc;WeV86bbxekasa8F86bbaeaa86bbaecefhekdna8EmbaKaA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombkaKhAkdnaYcs9hmba8AaA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombka8AhAkdnaEcs9hmba3aA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombka3hAkalaXcdtfaKBdbaXcefcsGhvdndnaYPzbeeeeeeeeeeeeeebekalavcdtfa8ABdbaXcdfcsGhvkdndnaEPzbeeeeeeeeeeeeeebekalavcdtfa3BdbavcefcsGhvkcihoalc;abfaQcitfgEaKBdlaEa8ABdbaQcefcsGhYcdhEavhXaLhOxekcdhoalaXcdtfa3BdbcehEaXcefcsGhXaQhYkalc;abfaYcitfgva8ABdlava3Bdbalc;abfaQaEfcsGcitfgva3BdlavaKBdbascefhsaQaofcsGhQaCcifgCai6mbkkcbhvaeaP0mbcbhvinaeavfavcj1jjbfRbb86bbavcefgvcz9hmbkaeab9Ravfhvkalc;aef8KjjjjbavkZeeucbhddninadcefgdc8F0meceadtae6mbkkadcrfcFeGcr9Uci2cdfabci9U2cHfkmbcbabBd:e:kjjbk:ydewu8Jjjjjbcz9Rhlcbhvdnaicvfae0mbcbhvabcbRb:e:kjjbc;qeV86bbal9cb83iwabcefhoabaefc98fhrdnaiTmbcbhwcbhDindnaoar6mbcbskadaDcdtfydbgqalcwfawaqav9Rgvavc8F91gv7av9Rc507gwcdtfgkydb9Rgvc8E91c9:Gavcdt7awVhvinaoavcFb0gecrtavcFbGV86bbavcr4hvaocefhoaembkakaqBdbaqhvaDcefgDai9hmbkkcbhvaoar0mbaocbBbbaoab9RclfhvkavkBeeucbhddninadcefgdc8F0meceadtae6mbkkadcwfcFeGcr9Uab2cvfk:bvli99dui99ludnaeTmbcuadcetcuftcu7:Yhvdndncuaicuftcu7:YgoJbbbZMgr:lJbbb9p9DTmbar:Ohwxekcjjjj94hwkcbhicbhDinalclfIdbgrJbbbbJbbjZalIdbgq:lar:lMalcwfIdbgk:lMgr:varJbbbb9BEgrNhxaqarNhrdndnakJbbbb9GTmbaxhqxekJbbjZar:l:tgqaq:maxJbbbb9GEhqJbbjZax:l:tgxax:marJbbbb9GEhrkdndnalcxfIdbgxJbbj:;axJbbj:;9GEgkJbbjZakJbbjZ9FEavNJbbbZJbbb:;axJbbbb9GEMgx:lJbbb9p9DTmbax:Ohmxekcjjjj94hmkdndnaqJbbj:;aqJbbj:;9GEgxJbbjZaxJbbjZ9FEaoNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:OhPxekcjjjj94hPkdndnarJbbj:;arJbbj:;9GEgqJbbjZaqJbbjZ9FEaoNJbbbZJbbb:;arJbbbb9GEMgr:lJbbb9p9DTmbar:Ohsxekcjjjj94hskdndnadcl9hmbabaifgzas86bbazcifam86bbazcdfaw86bbazcefaP86bbxekabaDfgzas87ebazcofam87ebazclfaw87ebazcdfaP87ebkalczfhlaiclfhiaDcwfhDaecufgembkkk;hlld99eud99eudnaeTmbdndncuaicuftcu7:YgvJbbbZMgo:lJbbb9p9DTmbao:Ohixekcjjjj94hikaic;8FiGhrinabcofcicdalclfIdb:lalIdb:l9EgialcwfIdb:lalaicdtfIdb:l9EEgialcxfIdb:lalaicdtfIdb:l9EEgiarV87ebdndnJbbj:;JbbjZalaicdtfIdbJbbbb9DEgoalaicd7cdtfIdbJ;Zl:1ZNNgwJbbj:;awJbbj:;9GEgDJbbjZaDJbbjZ9FEavNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohqxekcjjjj94hqkabcdfaq87ebdndnalaicefciGcdtfIdbJ;Zl:1ZNaoNgwJbbj:;awJbbj:;9GEgDJbbjZaDJbbjZ9FEavNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohqxekcjjjj94hqkabaq87ebdndnaoalaicufciGcdtfIdbJ;Zl:1ZNNgoJbbj:;aoJbbj:;9GEgwJbbjZawJbbjZ9FEavNJbbbZJbbb:;aoJbbbb9GEMgo:lJbbb9p9DTmbao:Ohixekcjjjj94hikabclfai87ebabcwfhbalczfhlaecufgembkkk;3viDue99eu8Jjjjjbcjd9Rgo8Kjjjjbadcd4hrdndndndnavcd9hmbadcl6meaohwarhDinawc:CuBdbawclfhwaDcufgDmbkaeTmiadcl6mdarcdthqalhkcbhxinaohwakhDarhminawawydbgPcbaDIdbgs:8cL4cFeGc:cufasJbbbb9BEgzaPaz9kEBdbaDclfhDawclfhwamcufgmmbkakaqfhkaxcefgxaeSmixbkkaeTmdxekaeTmekarcdthkavce9hhqadcl6hdcbhxindndndnaqmbadmdc:CuhDalhwarhminaDcbawIdbgs:8cL4cFeGc:cufasJbbbb9BEgPaDaP9kEhDawclfhwamcufgmmbxdkkc:CuhDdndnavPleddbdkadmdaohwalhmarhPinawcbamIdbgs:8cL4cFeGgzc;:bazc;:b9kEc:cufasJbbbb9BEBdbamclfhmawclfhwaPcufgPmbxdkkadmecbhwarhminaoawfcbalawfIdbgs:8cL4cFeGgPc8AaPc8A9kEc:cufasJbbbb9BEBdbawclfhwamcufgmmbkkadmbcbhwarhPinaDhmdnavceSmbaoawfydbhmkdndnalawfIdbgscjjj;8iamai9RcefgmcLt9R::NJbbbZJbbb:;asJbbbb9GEMgs:lJbbb9p9DTmbas:Ohzxekcjjjj94hzkabawfazcFFFrGamcKtVBdbawclfhwaPcufgPmbkkabakfhbalakfhlaxcefgxae9hmbkkaocjdf8Kjjjjbk;HqdCui998Jjjjjbc:qd9Rgv8Kjjjjbavc:Sefcbc;KbzNjjjb8AcbhodnadTmbcbhoaiTmbdnabae9hmbavcuadcdtgradcFFFFi0Ecbyd:m:kjjbHjjjjbbgeBd:SeavceBd:mdaeabarz:tjjjb8Akavc:GefcwfcbBdbav9cb83i:Geavc:Gefaeadaiavc:Sefz:njjjbavyd:Gehwadci9UgDcbyd:m:kjjbHjjjjbbhravc:Sefavyd:mdgqcdtfarBdbavaqcefgkBd:mdarcbaDzNjjjbhxavc:SefakcdtfcuaicdtaicFFFFi0Ecbyd:m:kjjbHjjjjbbgmBdbavaqcdfgPBd:mdawhramhkinakalIdbalarydbgscwascw6Ecdtfc;ebfIdbMUdbarclfhrakclfhkaicufgimbkavc:SefaPcdtfcuaDcdtadcFFFF970Ecbyd:m:kjjbHjjjjbbgPBdbdnadci6mbaehraPhkaDhiinakamarydbcdtfIdbamarclfydbcdtfIdbMamarcwfydbcdtfIdbMUdbarcxfhrakclfhkaicufgimbkkaqcifhoavc;qbfhzavhravyd:KehHavyd:OehOcbhscbhkcbhAcehCinarhXcihQaeakci2gLcdtfgrydbhdarclfydbhqabaAcx2fgicwfarcwfydbgKBdbaiclfaqBdbaiadBdbaxakfce86bbazaKBdwazaqBdlazadBdbaPakcdtfcbBdbdnasTmbcihQaXhiinazaQcdtfaiydbgrBdbaQaraK9harad9haraq9hGGfhQaiclfhiascufgsmbkkaAcefhAcbhsinaOaHaeasaLfcdtfydbcdtgifydbcdtfgKhrawaifgqydbgdhidnadTmbdninarydbakSmearclfhraicufgiTmdxbkkaraKadcdtfc98fydbBdbaqaqydbcufBdbkascefgsci9hmbkdndnaQTmbcuhkJbbbbhYcbhqavyd:KehKavyd:OehLindndnawazaqcdtfydbcdtgsfydbgrmbaqcefhqxekaqcs0hiamasfgdIdbh8AadalcbaqcefgqaiEcdtfIdbalarcwarcw6Ecdtfc;ebfIdbMgEUdbaEa8A:thEarcdthiaLaKasfydbcdtfhrinaParydbgscdtfgdaEadIdbMg8AUdba8AaYaYa8A9DgdEhYasakadEhkarclfhraic98fgimbkkaqaQ9hmbkakcu9hmekaCaD9pmdindnaxaCfRbbmbaChkxdkaDaCcefgC9hmbxikkaQczaQcz6EhsazhraXhzakcu9hmbkkaocdtavc:Seffc98fhrdninaoTmearydbcbyd1:kjjbH:bjjjbbarc98fhraocufhoxbkkavc:qdf8Kjjjjbk;IlevucuaicdtgvaicFFFFi0Egocbyd:m:kjjbHjjjjbbhralalyd9GgwcdtfarBdbalawcefBd9GabarBdbaocbyd:m:kjjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdlcuadcdtadcFFFFi0Ecbyd:m:kjjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdwabydbcbavzNjjjb8Aadci9UhDdnadTmbabydbhoaehladhrinaoalydbcdtfgvavydbcefBdbalclfhlarcufgrmbkkdnaiTmbabydbhlabydlhrcbhvaihoinaravBdbarclfhralydbavfhvalclfhlaocufgombkkdnadci6mbabydlhrabydwhvcbhlinaecwfydbhoaeclfydbhdaraeydbcdtfgwawydbgwcefBdbavawcdtfalBdbaradcdtfgdadydbgdcefBdbavadcdtfalBdbaraocdtfgoaoydbgocefBdbavaocdtfalBdbaecxfheaDalcefgl9hmbkkdnaiTmbabydlheabydbhlinaeaeydbalydb9RBdbalclfhlaeclfheaicufgimbkkkQbabaeadaic:01jjbz:mjjjbkQbabaeadaic:C:jjjbz:mjjjbk9DeeuabcFeaicdtzNjjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk;Wkivuo99lu8Jjjjjbc;W;Gb9Rgl8Kjjjjbcbhvalcj;Gbfcbc;KbzNjjjb8AalcuadcdtadcFFFFi0Egocbyd:m:kjjbHjjjjbbgrBdj9GalceBd;G9GalcFFF;7rBdwal9cFFF;7;3FF:;Fb83dbalcFFF97Bd;S9Gal9cFFF;7FFF:;u83d;K9Gaicd4hwdndnadmbJFFuFhDJFFuuhqJFFuuhkJFFuFhxJFFuuhmJFFuFhPxekawcdthsaehzincbhiinalaifgHazaifIdbgDaHIdbgxaxaD9EEUdbalc;K;GbfaifgHaDaHIdbgxaxaD9DEUdbaiclfgicx9hmbkazasfhzavcefgvad9hmbkalIdwhqalId;S9GhDalIdlhkalId;O9GhxalIdbhmalId;K9GhPkdndnadTmbJbbbbJbbjZJbbbbaPam:tgPaPJbbbb9DEgPaxak:tgxaxaP9DEgxaDaq:tgDaDax9DEgD:vaDJbbbb9BEhDawcdthsarhHadhzindndnaDaeIdbam:tNJb;au9eNJbbbZMgx:lJbbb9p9DTmbax:Ohixekcjjjj94hikaicztaicwtcj;GiGVaicsGVc:p;G:dKGcH2c;d;H:WKGcv2c;j:KM;jbGhvdndnaDaeclfIdbak:tNJb;au9eNJbbbZMgx:lJbbb9p9DTmbax:Ohixekcjjjj94hikaicztaicwtcj;GiGVaicsGVc:p;G:dKGcH2c;d;H:WKGcq2cM;j:KMeGavVhvdndnaDaecwfIdbaq:tNJb;au9eNJbbbZMgx:lJbbb9p9DTmbax:Ohixekcjjjj94hikaHavaicztaicwtcj;GiGVaicsGVc:p;G:dKGcH2c;d;H:WKGcC2c:KM;j:KdGVBdbaeasfheaHclfhHazcufgzmbkalcbcj;GbzNjjjbhiarhHadheinaiaHydbgzcFrGcx2fgvavydbcefBdbaiazcq4cFrGcx2fgvavydlcefBdlaiazcC4cFrGcx2fgzazydwcefBdwaHclfhHaecufgembxdkkalcbcj;GbzNjjjb8AkcbhHcbhzcbhecbhvinalaHfgiydbhsaiazBdbaicwfgwydbhOawavBdbaiclfgiydbhwaiaeBdbasazfhzaOavfhvawaefheaHcxfgHcj;Gb9hmbkcbhHalaocbyd:m:kjjbHjjjjbbgiBd:e9GdnadTmbabhzinazaHBdbazclfhzadaHcefgH9hmbkabhHadhzinalaraHydbgecdtfydbcFrGcx2fgvavydbgvcefBdbaiavcdtfaeBdbaHclfhHazcufgzmbkaihHadhzinalaraHydbgecdtfydbcq4cFrGcx2fgvavydlgvcefBdlabavcdtfaeBdbaHclfhHazcufgzmbkabhHadhzinalaraHydbgecdtfydbcC4cFrGcx2fgvavydwgvcefBdwaiavcdtfaeBdbaHclfhHazcufgzmbkcbhHinabaiydbcdtfaHBdbaiclfhiadaHcefgH9hmbkkclhidninaic98Smealcj;Gbfaifydbcbyd1:kjjbH:bjjjbbaic98fhixbkkalc;W;Gbf8Kjjjjbk9teiucbcbyd:q:kjjbgeabcifc98GfgbBd:q:kjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd:q:kjjbgeabcrfc94GfgbBd:q:kjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik9:eiuZbhedndncbyd:q:kjjbgdaecztgi9nmbcuheadai9RcFFifcz4nbcuSmekadhekcbabae9Rcifc98Gcbyd:q:kjjbfgdBd:q:kjjbdnadZbcztge9nmbadae9RcFFifcz4nb8Akkk:Iddbcjwk:edb4:h9w9N94:P:gW:j9O:ye9Pbbbbbbebbbdbbbebbbdbbbbbbbdbbbbbbbebbbbbbb:l29hZ;69:9kZ;N;76Z;rg97Z;z;o9xZ8J;B85Z;:;u9yZ;b;k9HZ:2;Z9DZ9e:l9mZ59A8KZ:r;T3Z:A:zYZ79OHZ;j4::8::Y:D9V8:bbbb9s:49:Z8R:hBZ9M9M;M8:L;z;o8:;8:PG89q;x:J878R:hQ8::M:B;e87bbbbbbjZbbjZbbjZ:E;V;N8::Y:DsZ9i;H;68:xd;R8:;h0838:;W:NoZbbbb:WV9O8:uf888:9i;H;68:9c9G;L89;n;m9m89;D8Ko8:bbbbf:8tZ9m836ZS:2AZL;zPZZ818EZ9e:lxZ;U98F8:819E;68:bc:eqkzebbbebbbdbbba:vbb",t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var n,i=WebAssembly.instantiate(o(e),{}).then(function(p){n=p.instance,n.exports.__wasm_call_ctors(),n.exports.meshopt_encodeVertexVersion(0),n.exports.meshopt_encodeIndexVersion(1)});function o(p){for(var _=new Uint8Array(p.length),b=0;b<p.length;++b){var x=p.charCodeAt(b);_[b]=x>96?x-97:x>64?x-39:x+4}for(var T=0,b=0;b<p.length;++b)_[T++]=_[b]<60?t[_[b]]:(_[b]-60)*64+_[++b];return _.buffer.slice(0,T)}function r(p){if(!p)throw new Error("Assertion failed")}function s(p){return new Uint8Array(p.buffer,p.byteOffset,p.byteLength)}function a(p,_,b,x){var T=n.exports.sbrk,E=T(_.length*4),S=T(b*4),A=new Uint8Array(n.exports.memory.buffer),v=s(_);A.set(v,E),x&&x(E,E,_.length,b);var D=p(S,E,_.length,b);A=new Uint8Array(n.exports.memory.buffer);var R=new Uint32Array(b);new Uint8Array(R.buffer).set(A.subarray(S,S+b*4)),v.set(A.subarray(E,E+_.length*4)),T(E-T(0));for(var P=0;P<_.length;++P)_[P]=R[_[P]];return[R,D]}function l(p,_,b,x){var T=n.exports.sbrk,E=T(b*4),S=T(b*x),A=new Uint8Array(n.exports.memory.buffer);A.set(s(_),S),p(E,S,b,x),A=new Uint8Array(n.exports.memory.buffer);var v=new Uint32Array(b);return new Uint8Array(v.buffer).set(A.subarray(E,E+b*4)),T(E-T(0)),v}function u(p,_,b,x,T){var E=n.exports.sbrk,S=E(_),A=E(x*T),v=new Uint8Array(n.exports.memory.buffer);v.set(s(b),A);var D=p(S,_,A,x,T),R=new Uint8Array(D);return R.set(v.subarray(S,S+D)),E(S-E(0)),R}function f(p){for(var _=0,b=0;b<p.length;++b){var x=p[b];_=_<x?x:_}return _}function h(p,_){if(r(_==2||_==4),_==4)return new Uint32Array(p.buffer,p.byteOffset,p.byteLength/4);var b=new Uint16Array(p.buffer,p.byteOffset,p.byteLength/2);return new Uint32Array(b)}function m(p,_,b,x,T,E,S){var A=n.exports.sbrk,v=A(b*x),D=A(b*E),R=new Uint8Array(n.exports.memory.buffer);R.set(s(_),D),p(v,b,x,T,D,S);var P=new Uint8Array(b*x);return P.set(R.subarray(v,v+b*x)),A(v-A(0)),P}return{ready:i,supported:!0,reorderMesh:function(p,_,b){var x=_?b?n.exports.meshopt_optimizeVertexCacheStrip:n.exports.meshopt_optimizeVertexCache:void 0;return a(n.exports.meshopt_optimizeVertexFetchRemap,p,f(p)+1,x)},reorderPoints:function(p,_){return r(p instanceof Float32Array),r(p.length%_==0),r(_>=3),l(n.exports.meshopt_spatialSortRemap,p,p.length/_,_*4)},encodeVertexBuffer:function(p,_,b){r(b>0&&b<=256),r(b%4==0);var x=n.exports.meshopt_encodeVertexBufferBound(_,b);return u(n.exports.meshopt_encodeVertexBuffer,x,p,_,b)},encodeIndexBuffer:function(p,_,b){r(b==2||b==4),r(_%3==0);var x=h(p,b),T=n.exports.meshopt_encodeIndexBufferBound(_,f(x)+1);return u(n.exports.meshopt_encodeIndexBuffer,T,x,_,4)},encodeIndexSequence:function(p,_,b){r(b==2||b==4);var x=h(p,b),T=n.exports.meshopt_encodeIndexSequenceBound(_,f(x)+1);return u(n.exports.meshopt_encodeIndexSequence,T,x,_,4)},encodeGltfBuffer:function(p,_,b,x){var T={ATTRIBUTES:this.encodeVertexBuffer,TRIANGLES:this.encodeIndexBuffer,INDICES:this.encodeIndexSequence};return r(T[x]),T[x](p,_,b)},encodeFilterOct:function(p,_,b,x){return r(b==4||b==8),r(x>=1&&x<=16),m(n.exports.meshopt_encodeFilterOct,p,_,b,x,16)},encodeFilterQuat:function(p,_,b,x){return r(b==8),r(x>=4&&x<=16),m(n.exports.meshopt_encodeFilterQuat,p,_,b,x,16)},encodeFilterExp:function(p,_,b,x,T){r(b>0&&b%4==0),r(x>=1&&x<=24);var E={Separate:0,SharedVector:1,SharedComponent:2,Clamped:3};return m(n.exports.meshopt_encodeFilterExp,p,_,b,x,b,T?E[T]:1)}}}();var dte=function(){var e="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q:Odkr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq;w8Wqdbk;esezu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9Uc;WFbGgocjdaocjd6EhDaicefhocbhqdnindndndnaeaq9nmbaDaeaq9RaqaDfae6Egkcsfglcl4cifcd4hxalc9WGgmTmecbhPawcjdfhsaohzinaraz9Rax6mvarazaxfgo9RcK6mvczhlcbhHinalgic9WfgOawcj;cbffhldndndndndnazaOco4fRbbaHcoG4ciGPlbedibkal9cb83ibalcwf9cb83ibxikalaoRblaoRbbgOco4gAaAciSgAE86bbawcj;cbfaifglcGfaoclfaAfgARbbaOcl4ciGgCaCciSgCE86bbalcVfaAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc7faAaCfgARbbaOciGgOaOciSgOE86bbalctfaAaOfgARbbaoRbegOco4gCaCciSgCE86bbalc91faAaCfgARbbaOcl4ciGgCaCciSgCE86bbalc4faAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc93faAaCfgARbbaOciGgOaOciSgOE86bbalc94faAaOfgARbbaoRbdgOco4gCaCciSgCE86bbalc95faAaCfgARbbaOcl4ciGgCaCciSgCE86bbalc96faAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc97faAaCfgARbbaOciGgOaOciSgOE86bbalc98faAaOfgORbbaoRbigoco4gAaAciSgAE86bbalc99faOaAfgORbbaocl4ciGgAaAciSgAE86bbalc9:faOaAfgORbbaocd4ciGgAaAciSgAE86bbalcufaOaAfglRbbaociGgoaociSgoE86bbalaofhoxdkalaoRbwaoRbbgOcl4gAaAcsSgAE86bbawcj;cbfaifglcGfaocwfaAfgARbbaOcsGgOaOcsSgOE86bbalcVfaAaOfgORbbaoRbegAcl4gCaCcsSgCE86bbalc7faOaCfgORbbaAcsGgAaAcsSgAE86bbalctfaOaAfgORbbaoRbdgAcl4gCaCcsSgCE86bbalc91faOaCfgORbbaAcsGgAaAcsSgAE86bbalc4faOaAfgORbbaoRbigAcl4gCaCcsSgCE86bbalc93faOaCfgORbbaAcsGgAaAcsSgAE86bbalc94faOaAfgORbbaoRblgAcl4gCaCcsSgCE86bbalc95faOaCfgORbbaAcsGgAaAcsSgAE86bbalc96faOaAfgORbbaoRbvgAcl4gCaCcsSgCE86bbalc97faOaCfgORbbaAcsGgAaAcsSgAE86bbalc98faOaAfgORbbaoRbogAcl4gCaCcsSgCE86bbalc99faOaCfgORbbaAcsGgAaAcsSgAE86bbalc9:faOaAfgORbbaoRbrgocl4gAaAcsSgAE86bbalcufaOaAfglRbbaocsGgoaocsSgoE86bbalaofhoxekalao8Pbb83bbalcwfaocwf8Pbb83bbaoczfhokdnaiam9pmbaHcdfhHaiczfhlarao9RcL0mekkaiam6mvaoTmvdnakTmbawaPfRbbhHawcj;cbfhlashiakhOinaialRbbgzce4cbazceG9R7aHfgH86bbaiadfhialcefhlaOcufgOmbkkascefhsaohzaPcefgPad9hmbxikkcbc99arao9Radcaadca0ESEhoxlkaoaxad2fhCdnakmbadhlinaoTmlarao9Rax6mlaoaxfhoalcufglmbkaChoxekcbhmawcjdfhAinarao9Rax6miawamfRbbhHawcj;cbfhlaAhiakhOinaialRbbgzce4cbazceG9R7aHfgH86bbaiadfhialcefhlaOcufgOmbkaAcefhAaoaxfhoamcefgmad9hmbkaChokabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqaombkc9:hoxekc9:hokavcj;ebf8Kjjjjbaok;cseHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgwce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhDaicefgqarfhidnaeTmbcmcsawceSEhkcbhxcbhmcbhPcbhwcbhlindnaiaD9nmbc9:hoxikdndnaqRbbgoc;Ve0mbavc;abfalaocu7gscl4fcsGcitfgzydlhrazydbhzdnaocsGgHak9pmbavawasfcsGcdtfydbaxaHEhoaHThsdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkaxasfhxcdhHavawcdtfaoBdbawasfhwcehsalhOxdkdndnaHcsSmbaHc987aHamffcefhoxekaicefhoai8SbbgHcFeGhsdndnaHcu9mmbaohixekaicvfhiascFbGhscrhHdninao8SbbgOcFbGaHtasVhsaOcu9kmeaocefhoaHcrfgHc8J9hmbxdkkaocefhikasce4cbasceG9R7amfhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhHavawcdtfaoBdbcehsawcefhwalhOaohmxekdnaocpe0mbaxcefgHavawaDaocsGfRbbgocl49RcsGcdtfydbaocz6gzEhravawao9RcsGcdtfydbaHazfgAaocsGgHEhoaHThCdndnadcd9hmbabaPcetfgHax87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHaxBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfaxBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgOaxBdlaOarBdbavawazfgwcsGcdtfaoBdbalcefcsGhOawaCfhwaxhzaAaCfhxxekaxcbaiRbbgOEgzaoc;:eSgHfhraOcsGhCaOcl4hAdndnaOcs0mbarcefhoxekarhoavawaA9RcsGcdtfydbhrkdndnaCmbaocefhxxekaohxavawaO9RcsGcdtfydbhokdndnaHTmbaicefhHxekaicdfhHai8SbegscFeGhzdnascu9kmbaicofhXazcFbGhzcrhidninaH8SbbgscFbGaitazVhzascu9kmeaHcefhHaicrfgic8J9hmbkaXhHxekaHcefhHkazce4cbazceG9R7amfgmhzkdndnaAcsSmbaHhsxekaHcefhsaH8SbbgicFeGhrdnaicu9kmbaHcvfhXarcFbGhrcrhidninas8SbbgHcFbGaitarVhraHcu9kmeascefhsaicrfgic8J9hmbkaXhsxekascefhskarce4cbarceG9R7amfgmhrkdndnaCcsSmbashixekascefhias8SbbgocFeGhHdnaocu9kmbascvfhXaHcFbGhHcrhodninai8SbbgscFbGaotaHVhHascu9kmeaicefhiaocrfgoc8J9hmbkaXhixekaicefhikaHce4cbaHceG9R7amfgmhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfazBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgXazBdlaXarBdbavawaOcz6aAcsSVfgwcsGcdtfaoBdbawaCTaCcsSVfhwalcefcsGhOkaqcefhqavc;abfaOcitfgOarBdlaOaoBdbavc;abfalasfcsGcitfgraoBdlarazBdbawcsGhwalaHfcsGhlaPcifgPae6mbkkcbc99aiaDSEhokavc;aef8Kjjjjbaok:flevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;oiliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabaiavcefciGfcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:OhDxekcjjjj94hDkabaiavciGfgkcd7cetfaD87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:OhDxekcjjjj94hDkabaiavcufciGfcetfaD87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohvxekcjjjj94hvkabakcetfav87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2gdTmbinababydbgecwtcw91:Yaece91cjjj98Gcjjj;8if::NUdbabclfhbadcufgdmbkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklzNbb",t="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q:6dkr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq:p9sqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk:N8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhlaicefhodnaeTmbadTmbalc;WFbGglcjdalcjd6EhwcbhDinawaeaD9RaDawfae6Egqcsfglc9WGgkci2hxakcethmalcl4cifcd4hPabaDad2fhsakc;ab6hzcbhHincbhOaohAdndninaraA9RaP6meavcj;cbfaOak2fhCaAaPfhocbhidnazmbarao9Rc;Gb6mbcbhlinaCalfhidndndndndnaAalco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklbaoczfhokdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklzaoczfhokdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklaaoczfhokdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WaoclfaYpQbfaXc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WaocwfaYpQbfaXc:q:yjjbfRbbfhoxekaiaopbbbpkl8Waoczfhokalc;abfhialcjefak0meaihlarao9Rc;Fb0mbkkdnaiak9pmbaici4hlinarao9RcK6miaCaifhXdndndndndnaAaico4fRbbalcoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpkbbxikaXaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkbbaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaXaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkbbaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaXaopbbbpkbbaoczfhokalcdfhlaiczfgiak6mbkkaoTmeaohAaOcefgOclSmdxbkkc9:hoxlkdnakTmbavcjdfaHfhiavaHfpbdbhYcbhXinaiavcj;cbfaXfglpblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLalakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEalamfpblbg3cep9Ta3aQp9op9Hp9rg3alaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfhiaXczfgXak6mbkkaHclfgHad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfgDae6mbkkcbc99arao9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk::seHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgwce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhDaicefgqarfhidnaeTmbcmcsawceSEhkcbhxcbhmcbhPcbhwcbhlindnaiaD9nmbc9:hoxikdndnaqRbbgoc;Ve0mbavc;abfalaocu7gscl4fcsGcitfgzydlhrazydbhzdnaocsGgHak9pmbavawasfcsGcdtfydbaxaHEhoaHThsdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkaxasfhxcdhHavawcdtfaoBdbawasfhwcehsalhOxdkdndnaHcsSmbaHc987aHamffcefhoxekaicefhoai8SbbgHcFeGhsdndnaHcu9mmbaohixekaicvfhiascFbGhscrhHdninao8SbbgOcFbGaHtasVhsaOcu9kmeaocefhoaHcrfgHc8J9hmbxdkkaocefhikasce4cbasceG9R7amfhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhHavawcdtfaoBdbcehsawcefhwalhOaohmxekdnaocpe0mbaxcefgHavawaDaocsGfRbbgocl49RcsGcdtfydbaocz6gzEhravawao9RcsGcdtfydbaHazfgAaocsGgHEhoaHThCdndnadcd9hmbabaPcetfgHax87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHaxBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfaxBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgOaxBdlaOarBdbavawazfgwcsGcdtfaoBdbalcefcsGhOawaCfhwaxhzaAaCfhxxekaxcbaiRbbgOEgzaoc;:eSgHfhraOcsGhCaOcl4hAdndnaOcs0mbarcefhoxekarhoavawaA9RcsGcdtfydbhrkdndnaCmbaocefhxxekaohxavawaO9RcsGcdtfydbhokdndnaHTmbaicefhHxekaicdfhHai8SbegscFeGhzdnascu9kmbaicofhXazcFbGhzcrhidninaH8SbbgscFbGaitazVhzascu9kmeaHcefhHaicrfgic8J9hmbkaXhHxekaHcefhHkazce4cbazceG9R7amfgmhzkdndnaAcsSmbaHhsxekaHcefhsaH8SbbgicFeGhrdnaicu9kmbaHcvfhXarcFbGhrcrhidninas8SbbgHcFbGaitarVhraHcu9kmeascefhsaicrfgic8J9hmbkaXhsxekascefhskarce4cbarceG9R7amfgmhrkdndnaCcsSmbashixekascefhias8SbbgocFeGhHdnaocu9kmbascvfhXaHcFbGhHcrhodninai8SbbgscFbGaotaHVhHascu9kmeaicefhiaocrfgoc8J9hmbkaXhixekaicefhikaHce4cbaHceG9R7amfgmhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfazBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgXazBdlaXarBdbavawaOcz6aAcsSVfgwcsGcdtfaoBdbawaCTaCcsSVfhwalcefcsGhOkaqcefhqavc;abfaOcitfgOarBdlaOaoBdbavc;abfalasfcsGcitfgraoBdlarazBdbawcsGhwalaHfcsGhlaPcifgPae6mbkkcbc99aiaDSEhokavc;aef8Kjjjjbaok:flevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:wPliuo97eue978Jjjjjbca9Rhiaec98Ghldndnadcl9hmbdnalTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalaeSmeaipxbbbbbbbbbbbbbbbbgqpklbaiabalcdtfgdaeciGglcdtgv;8qbbdnalTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDaqp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkadaiav;8qbbskdnalTmbcbhvabhdinadczfgxaxpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;Meawaqawamp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oaoarpmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgval6mbkkalaeSmbaiaeciGgvcitgdfcbcaad9R;8kbaiabalcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;Meawaqawamp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oaoarpmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaDakp;Mearp;Keamp9oaqakp;Mearp;Keczp:Rep9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalaeSmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaDakp;Mearp;Keamp9oaqakp;Mearp;Keczp:Rep9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbheabhdinadadpbbbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepkbbadczfhdaeclfgeav6mbkkdnavalSmbaialciGgecdtgdVcbc;abad9R;8kbaiabavcdtfgvad;8qbbdnaeTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepklbkavaiad;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz:Dbb",n=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),i=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var o=WebAssembly.validate(n)?a(t):a(e),r,s=WebAssembly.instantiate(o,{}).then(function(T){r=T.instance,r.exports.__wasm_call_ctors()});function a(T){for(var E=new Uint8Array(T.length),S=0;S<T.length;++S){var A=T.charCodeAt(S);E[S]=A>96?A-97:A>64?A-39:A+4}for(var v=0,S=0;S<T.length;++S)E[v++]=E[S]<60?i[E[S]]:(E[S]-60)*64+E[++S];return E.buffer.slice(0,v)}function l(T,E,S,A,v,D,R){var P=T.exports.sbrk,L=A+3&-4,F=P(L*v),y=P(D.length),I=new Uint8Array(T.exports.memory.buffer);I.set(D,y);var M=E(F,A,v,y,D.length);if(M==0&&R&&R(F,L,v),S.set(I.subarray(F,F+A*v)),P(F-P(0)),M!=0)throw new Error("Malformed buffer data: "+M)}var u={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},f={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},h=[],m=0;function p(T){var E={object:new Worker(T),pending:0,requests:{}};return E.object.onmessage=function(S){var A=S.data;E.pending-=A.count,E.requests[A.id][A.action](A.value),delete E.requests[A.id]},E}function _(T){for(var E="self.ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(o)+"]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = "+x.name+";"+l.toString()+x.toString(),S=new Blob([E],{type:"text/javascript"}),A=URL.createObjectURL(S),v=h.length;v<T;++v)h[v]=p(A);for(var v=T;v<h.length;++v)h[v].object.postMessage({});h.length=T,URL.revokeObjectURL(A)}function b(T,E,S,A,v){for(var D=h[0],R=1;R<h.length;++R)h[R].pending<D.pending&&(D=h[R]);return new Promise(function(P,L){var F=new Uint8Array(S),y=++m;D.pending+=T,D.requests[y]={resolve:P,reject:L},D.object.postMessage({id:y,count:T,size:E,source:F,mode:A,filter:v},[F.buffer])})}function x(T){var E=T.data;if(!E.id)return self.close();self.ready.then(function(S){try{var A=new Uint8Array(E.count*E.size);l(S,S.exports[E.mode],A,E.count,E.size,E.source,S.exports[E.filter]),self.postMessage({id:E.id,count:E.count,action:"resolve",value:A},[A.buffer])}catch(v){self.postMessage({id:E.id,count:E.count,action:"reject",value:v})}})}return{ready:s,supported:!0,useWorkers:function(T){_(T)},decodeVertexBuffer:function(T,E,S,A,v){l(r,r.exports.meshopt_decodeVertexBuffer,T,E,S,A,r.exports[u[v]])},decodeIndexBuffer:function(T,E,S,A){l(r,r.exports.meshopt_decodeIndexBuffer,T,E,S,A)},decodeIndexSequence:function(T,E,S,A){l(r,r.exports.meshopt_decodeIndexSequence,T,E,S,A)},decodeGltfBuffer:function(T,E,S,A,v,D){l(r,r.exports[f[v]],T,E,S,A,r.exports[u[D]])},decodeGltfBufferAsync:function(T,E,S,A,v){return h.length>0?b(T,E,S,f[A],u[v]):s.then(function(){var D=new Uint8Array(T*E);return l(r,r.exports[f[A]],D,T,E,S,r.exports[u[v]]),D})}}}();var rQt=function(){var e="b9H79Tebbbe9Hk9Geueu9Geub9Gbb9Gsuuuuuuuuuuuu99uueu9Gvuuuuub9Gvuuuuue999Gquuuuuuu99uueu9Gwuuuuuu99ueu9Giuuue999Gluuuueu9GiuuueuizsdilvoirwDbqqbeqlve9Weiiviebeoweuecj:Pdkr:Tewo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bbz9TW79O9V9Wt9F79P9T9W29P9M95bl8E9TW79O9V9Wt9F79P9T9W29P9M959x9Pt9OcttV9P9I91tW7bvQ9TW79O9V9Wt9F79P9T9W29P9M959q9V9P9Ut7boX9TW79O9V9Wt9F79P9T9W29P9M959t9J9H2Wbra9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9Wbwl79IV9RbDDwebcekdmxq;UMesdbk:kfvKue99euY99Qu8Jjjjjbc;W;qb9Rgs8Kjjjjbcbhzascxfcbc;Kbz:ljjjb8AdnabaeSmbabaeadcdtz:kjjjb8AkdnamcdGTmbalcrfci4gHcbyd;S1jjbHjjjjbbheascxfasyd2gOcdtfaeBdbasaOcefBd2aecbaHz:ljjjbhAcbhlcbhednadTmbcbhlabheadhHinaAaeydbgOci4fgCaCRbbgCceaOcrGgOtV86bbaCcu7aO4ceGalfhlaeclfheaHcufgHmbkcualcdtalcFFFFi0Ehekaecbyd;S1jjbHjjjjbbhzascxfasyd2gecdtfazBdbasaecefBd2alcd4alfhOcehHinaHgecethHaeaO6mbkcbhXcuaecdtgOaecFFFFi0Ecbyd;S1jjbHjjjjbbhHascxfasyd2gCcdtfaHBdbasaCcefBd2aHcFeaOz:ljjjbhQdnadTmbaecufhCcbhLinabaXcdtfgKydbgAc:v;t;h;Ev2hOcbhedndninaQaOaCGgOcdtfgYydbgHcuSmeazaHcdtfydbaASmdaecefgeaOfhOaeaC9nmbxdkkazaLcdtfaABdbaYaLBdbaLhHaLcefhLkaKaHBdbaXcefgXad9hmbkkaQcbyd;O1jjbH:bjjjbbasasyd2cufBd2kcualcefgecdtaecFFFFi0Ecbyd;S1jjbHjjjjbbh8Aascxfasyd2gecdtfa8ABdbasa8ABdlasaecefBd2cuadcitadcFFFFe0Ecbyd;S1jjbHjjjjbbhEascxfasyd2gecdtfaEBdbasaEBdwasaecefBd2asclfabadalcbz:cjjjbcualcdtg3alcFFFFi0Eg5cbyd;S1jjbHjjjjbbhQascxfasyd2gecdtfaQBdbasaecefBd2a5cbyd;S1jjbHjjjjbbh8Eascxfasyd2gecdtfa8EBdbasaecefBd2alcd4alfhOcehHinaHgecethHaeaO6mbkcbhLcuaecdtgOaecFFFFi0Ecbyd;S1jjbHjjjjbbhHascxfasyd2gCcdtfaHBdbasaCcefBd2aHcFeaOz:ljjjbhXdnalTmbavcd4hCaecufhHinaLhednazTmbazaLcdtfydbhekaiaeaC2cdtfgeydlgOcH4aO7c:F:b:DD2aeydbgOcH4aO7c;D;O:B8J27aeydwgecH4ae7c:3F;N8N27aHGheaLcdth8FdndndndndnazTmbaza8FfhKcbhOinaXaecdtfgYydbgAcuSmlaiazaAcdtfydbaC2cdtfaiaKydbaC2cdtfcxz:ojjjbTmiaOcefgOaefaHGheaOaH9nmbxdkkaiaLaC2cdtfhKcbhOinaXaecdtfgYydbgAcuSmiaiaAaC2cdtfaKcxz:ojjjbTmdaOcefgOaefaHGheaOaH9nmbkkcbhYkaYydbgecu9hmekaYaLBdbaLhekaQa8FfaeBdbaLcefgLal9hmbkcbhea8EhHinaHaeBdbaHclfhHalaecefge9hmbkcbheaQhHa8EhOindnaeaHydbgCSmbaOa8EaCcdtfgCydbBdbaCaeBdbkaHclfhHaOclfhOalaecefge9hmbkkcbhaaXcbyd;O1jjbH:bjjjbbasasyd2cufBd2alcbyd;S1jjbHjjjjbbhXascxfasyd2gecdtfaXBdbasaecefBd2a5cbyd;S1jjbHjjjjbbheascxfasyd2gHcdtfaeBdbasaHcefBd2a5cbyd;S1jjbHjjjjbbhHascxfasyd2gOcdtfaHBdbasaOcefBd2aecFea3z:ljjjbhhaHcFea3z:ljjjbhgdnalTmbaEcwfh8Jindna8AaagOcefgacdtfydbgCa8AaOcdtgefydbgHSmbaCaH9Rh8FaEaHcitfh3agaefh8KahaefhLcbhAindndna3aAcitfydbgYaO9hmbaLaOBdba8KaOBdbxekdna8AaYcdtg8LfgeclfydbgHaeydbgeSmbaEaecitgCfydbaOSmeaHae9Rh8Maecu7aHfhKa8JaCfhHcbheinaKaeSmeaecefheaHydbhCaHcwfhHaCaO9hmbkaea8M6mekaga8LfgeaOaYaeydbcuSEBdbaLaYaOaLydbcuSEBdbkaAcefgAa8F9hmbkkaaal9hmbkaQhHa8EhOaghCahhAcbheindndnaeaHydbgY9hmbdnaeaOydbgY9hmbaAydbhYdnaCydbgKcu9hmbaYcu9hmbaXaefcb86bbxikaXaefhLdnaeaKSmbaeaYSmbaLce86bbxikaLcl86bbxdkdnaea8EaYcdtgKfydb9hmbdnaCydbgLcuSmbaeaLSmbaAydbg8FcuSmbaea8FSmbagaKfydbg3cuSmba3aYSmbahaKfydbgKcuSmbaKaYSmbdnaQaLcdtfydbgYaQaKcdtfydb9hmbaYaQa8FcdtfydbgKSmbaKaQa3cdtfydb9hmbaXaefcd86bbxlkaXaefcl86bbxikaXaefcl86bbxdkaXaefcl86bbxekaXaefaXaYfRbb86bbkaHclfhHaOclfhOaCclfhCaAclfhAalaecefge9hmbkdnaqTmbdndnazTmbazheaQhHalhOindnaqaeydbfRbbTmbaXaHydbfcl86bbkaeclfheaHclfhHaOcufgOmbxdkkaQhealhHindnaqRbbTmbaXaeydbfcl86bbkaqcefhqaeclfheaHcufgHmbkkaQhealhOaXhHindnaXaeydbfRbbcl9hmbaHcl86bbkaeclfheaHcefhHaOcufgOmbkkamceGTmbaXhealhHindnaeRbbce9hmbaecl86bbkaecefheaHcufgHmbkkcualcx2alc;v:Q;v:Qe0Ecbyd;S1jjbHjjjjbbhaascxfasyd2gecdtfaaBdbasaecefBd2aaaialavazz:djjjbh8NdndnaDmbcbhycbh8Jxekcbh8JawhecbhHindnaeIdbJbbbb9ETmbasc;Wbfa8JcdtfaHBdba8Jcefh8JkaeclfheaDaHcefgH9hmbkcua8Jal2gecdtaecFFFFi0Ecbyd;S1jjbHjjjjbbhyascxfasyd2gecdtfayBdbasaecefBd2alTmba8JTmbarcd4hLdnazTmba8JcdthicbhYayhKinaoazaYcdtfydbaL2cdtfhAasc;WbfheaKhHa8JhOinaHaAaeydbcdtgCfIdbawaCfIdbNUdbaeclfheaHclfhHaOcufgOmbkaKaifhKaYcefgYal9hmbxdkka8JcdthicbhYayhKinaoaYaL2cdtfhAasc;WbfheaKhHa8JhOinaHaAaeydbcdtgCfIdbawaCfIdbNUdbaeclfheaHclfhHaOcufgOmbkaKaifhKaYcefgYal9hmbkkcualc8S2gHalc;D;O;f8U0EgCcbyd;S1jjbHjjjjbbheascxfasyd2gOcdtfaeBdbasaOcefBd2aecbaHz:ljjjbhqdndndndna8JTmbaCcbyd;S1jjbHjjjjbbhvascxfasyd2gecdtfavBdbcehOasaecefBd2avcbaHz:ljjjb8Acua8Jal2gecltgHaecFFFFb0Ecbyd;S1jjbHjjjjbbhrascxfasyd2gecdtfarBdbasaecefBd2arcbaHz:ljjjb8AadmexikcbhvadTmecbhrkcbhAabhHindnaaaHclfydbgYcx2fgeIdbaaaHydbgKcx2fgOIdbg8P:tgIaaaHcwfydbgLcx2fgCIdlaOIdlg8R:tg8SNaCIdba8P:tgRaeIdla8R:tg8UN:tg8Va8VNa8UaCIdwaOIdwg8W:tg8XNa8SaeIdwa8W:tg8UN:tg8Sa8SNa8UaRNa8XaIN:tgIaINMM:rgRJbbbb9ETmba8VaR:vh8VaIaR:vhIa8SaR:vh8SkaqaQaKcdtfydbc8S2fgea8SaR:rgRa8SNNg8UaeIdbMUdbaeaIaRaINg8YNg8XaeIdlMUdlaea8VaRa8VNg8ZNg80aeIdwMUdwaea8Ya8SNg8YaeIdxMUdxaea8Za8SNg81aeIdzMUdzaea8ZaINg8ZaeIdCMUdCaea8SaRa8Va8WNa8Sa8PNa8RaINMM:mg8RNg8PNg8SaeIdKMUdKaeaIa8PNgIaeId3MUd3aea8Va8PNg8VaeIdaMUdaaea8Pa8RNg8PaeId8KMUd8KaeaRaeIdyMUdyaqaQaYcdtfydbc8S2fgea8UaeIdbMUdbaea8XaeIdlMUdlaea80aeIdwMUdwaea8YaeIdxMUdxaea81aeIdzMUdzaea8ZaeIdCMUdCaea8SaeIdKMUdKaeaIaeId3MUd3aea8VaeIdaMUdaaea8PaeId8KMUd8KaeaRaeIdyMUdyaqaQaLcdtfydbc8S2fgea8UaeIdbMUdbaea8XaeIdlMUdlaea80aeIdwMUdwaea8YaeIdxMUdxaea81aeIdzMUdzaea8ZaeIdCMUdCaea8SaeIdKMUdKaeaIaeId3MUd3aea8VaeIdaMUdaaea8PaeId8KMUd8KaeaRaeIdyMUdyaHcxfhHaAcifgAad6mbkcbhiabhKinabaicdtfhYcbhHinaXaYaHc:G1jjbfydbcdtfydbgOfRbbhedndnaXaKaHfydbgCfRbbgAc99fcFeGcpe0mbaeceSmbaecd9hmekdnaAcufcFeGce0mbahaCcdtfydbaO9hmekdnaecufcFeGce0mbagaOcdtfydbaC9hmekdnaAcv2aefcj1jjbfRbbTmbaQaOcdtfydbaQaCcdtfydb0mekJbbacJbbacJbbjZaeceSEaAceSEh8ZdnaaaYaHc:K1jjbfydbcdtfydbcx2fgeIdwaaaCcx2fgAIdwg8R:tg8VaaaOcx2fgLIdwa8R:tg8Sa8SNaLIdbaAIdbg8W:tgIaINaLIdlaAIdlg8U:tgRaRNMMg8PNa8Va8SNaeIdba8W:tg80aINaRaeIdla8U:tg8YNMMg8Xa8SN:tg8Va8VNa80a8PNa8XaIN:tg8Sa8SNa8Ya8PNa8XaRN:tgIaINMM:rgRJbbbb9ETmba8VaR:vh8VaIaR:vhIa8SaR:vh8SkaqaQaCcdtfydbc8S2fgea8Sa8Za8P:rNgRa8SNNg8XaeIdbMUdbaeaIaRaINg8ZNg80aeIdlMUdlaea8VaRa8VNg8PNg8YaeIdwMUdwaea8Za8SNg8ZaeIdxMUdxaea8Pa8SNg81aeIdzMUdzaea8PaINgBaeIdCMUdCaea8SaRa8Va8RNa8Sa8WNa8UaINMM:mg8RNg8PNg8SaeIdKMUdKaeaIa8PNgIaeId3MUd3aea8Va8PNg8VaeIdaMUdaaea8Pa8RNg8PaeId8KMUd8KaeaRaeIdyMUdyaqaQaOcdtfydbc8S2fgea8XaeIdbMUdbaea80aeIdlMUdlaea8YaeIdwMUdwaea8ZaeIdxMUdxaea81aeIdzMUdzaeaBaeIdCMUdCaea8SaeIdKMUdKaeaIaeId3MUd3aea8VaeIdaMUdaaea8PaeId8KMUd8KaeaRaeIdyMUdykaHclfgHcx9hmbkaKcxfhKaicifgiad6mbkdna8JTmbcbhKinJbbbbh8WaaabaKcdtfgeclfydbgLcx2fgHIdwaaaeydbgicx2fgOIdwg8Y:tgIaINaHIdbaOIdbg81:tg8Va8VNaHIdlaOIdlgB:tgRaRNMMg8Zaaaecwfydbg8Fcx2fgeIdwa8Y:tg8PNaIaIa8PNa8VaeIdba81:tg8RNaRaeIdlaB:tg8UNMMg8SN:tJbbbbJbbjZa8Za8Pa8PNa8Ra8RNa8Ua8UNMMg80Na8Sa8SN:tg8X:va8XJbbbb9BEg8XNh83a80aINa8Pa8SN:ta8XNhUa8Za8UNaRa8SN:ta8XNh85a80aRNa8Ua8SN:ta8XNh86a8Za8RNa8Va8SN:ta8XNh87a80a8VNa8Ra8SN:ta8XNh88a8Va8UNa8RaRN:tg8Sa8SNaRa8PNa8UaIN:tg8Sa8SNaIa8RNa8Pa8VN:tg8Sa8SNMM:rJbbbZNh8Sayaia8J2g3cdtfhHaya8Fa8J2gwcdtfhOayaLa8J2g8LcdtfhCa8Y:mh89aB:mh8:a81:mhZcbhAa8JhYJbbbbh8UJbbbbh8XJbbbbh8ZJbbbbh80Jbbbbh8YJbbbbh81JbbbbhBJbbbbhnJbbbbhcinasc;WbfaAfgecwfa8SaUaCIdbaHIdbg8P:tgRNa83aOIdba8P:tg8RNMgINUdbaeclfa8Sa86aRNa85a8RNMg8VNUdbaea8Sa88aRNa87a8RNMgRNUdbaecxfa8Sa89aINa8:a8VNa8PaZaRNMMMg8PNUdba8SaIa8VNNa80Mh80a8SaIaRNNa8YMh8Ya8Sa8VaRNNa81Mh81a8Sa8Pa8PNNa8WMh8Wa8SaIa8PNNa8UMh8Ua8Sa8Va8PNNa8XMh8Xa8SaRa8PNNa8ZMh8Za8SaIaINNaBMhBa8Sa8Va8VNNanMhna8SaRaRNNacMhcaHclfhHaCclfhCaOclfhOaAczfhAaYcufgYmbkavaic8S2fgeacaeIdbMUdbaeanaeIdlMUdlaeaBaeIdwMUdwaea81aeIdxMUdxaea8YaeIdzMUdzaea80aeIdCMUdCaea8ZaeIdKMUdKaea8XaeId3MUd3aea8UaeIdaMUdaaea8WaeId8KMUd8Kaea8SaeIdyMUdyavaLc8S2fgeacaeIdbMUdbaeanaeIdlMUdlaeaBaeIdwMUdwaea81aeIdxMUdxaea8YaeIdzMUdzaea80aeIdCMUdCaea8ZaeIdKMUdKaea8XaeId3MUd3aea8UaeIdaMUdaaea8WaeId8KMUd8Kaea8SaeIdyMUdyava8Fc8S2fgeacaeIdbMUdbaeanaeIdlMUdlaeaBaeIdwMUdwaea81aeIdxMUdxaea8YaeIdzMUdzaea80aeIdCMUdCaea8ZaeIdKMUdKaea8XaeId3MUd3aea8UaeIdaMUdaaea8WaeId8KMUd8Kaea8SaeIdyMUdyara3cltfhYcbhHa8JhCinaYaHfgeasc;WbfaHfgOIdbaeIdbMUdbaeclfgAaOclfIdbaAIdbMUdbaecwfgAaOcwfIdbaAIdbMUdbaecxfgeaOcxfIdbaeIdbMUdbaHczfhHaCcufgCmbkara8LcltfhYcbhHa8JhCinaYaHfgeasc;WbfaHfgOIdbaeIdbMUdbaeclfgAaOclfIdbaAIdbMUdbaecwfgAaOcwfIdbaAIdbMUdbaecxfgeaOcxfIdbaeIdbMUdbaHczfhHaCcufgCmbkarawcltfhYcbhHa8JhCinaYaHfgeasc;WbfaHfgOIdbaeIdbMUdbaeclfgAaOclfIdbaAIdbMUdbaecwfgAaOcwfIdbaAIdbMUdbaecxfgeaOcxfIdbaeIdbMUdbaHczfhHaCcufgCmbkaKcifgKad6mbkkcbhOxekcehOcbhrkcbh8FdndnamcwGg9cmbJbbbbh8ZcbhJcbhocbhCxekcbhea5cbyd;S1jjbHjjjjbbhCascxfasyd2gHcdtfaCBdbasaHcefBd2dnalTmbaChHinaHaeBdbaHclfhHalaecefge9hmbkkdnaOmbcbhiinabaicdtfhLcbhKinaQaLaKcdtgec:G1jjbfydbcdtfydbcdtfydbhHdnaCaQaLaefydbcdtfydbgOcdtfgAydbgeaOSmbinaAaCaegOcdtfgYydbgeBdbaYhAaOae9hmbkkdnaCaHcdtfgAydbgeaHSmbinaAaCaegHcdtfgYydbgeBdbaYhAaHae9hmbkkdnaOaHSmbaCaOaHaOaH0EcdtfaOaHaOaH6EBdbkaKcefgKci9hmbkaicifgiad6mbkkcbhJdnalTmbcbhYindnaQaYcdtgefydbaY9hmbaYhHdnaCaefgKydbgeaYSmbaKhOinaOaCaegHcdtfgAydbgeBdbaAhOaHae9hmbkkaKaHBdbkaYcefgYal9hmbkcbheaQhOaChHcbhJindndnaeaOydbgA9hmbdnaeaHydbgA9hmbaHaJBdbaJcefhJxdkaHaCaAcdtfydbBdbxekaHaCaAcdtfydbBdbkaOclfhOaHclfhHalaecefge9hmbkkcuaJcltgeaJcjjjjiGEcbyd;S1jjbHjjjjbbhoascxfasyd2gHcdtfaoBdbasaHcefBd2aocbaez:ljjjbhAdnalTmbaChOaahealhYinaecwfIdbh8SaeclfIdbhIaAaOydbcltfgHaeIdbaHIdbMUdbaHclfgKaIaKIdbMUdbaHcwfgKa8SaKIdbMUdbaHcxfgHaHIdbJbbjZMUdbaOclfhOaecxfheaYcufgYmbkkdnaJTmbaAheaJhHinaecxfgOIdbh8SaOcbBdbaeaeIdbJbbbbJbbjZa8S:va8SJbbbb9BEg8SNUdbaeclfgOa8SaOIdbNUdbaecwfgOa8SaOIdbNUdbaeczfheaHcufgHmbkkdnalTmbaChOaahealhYinaAaOydbcltfgHcxfgKaecwfIdbaHcwfIdb:tg8Sa8SNaeIdbaHIdb:tg8Sa8SNaeclfIdbaHclfIdb:tg8Sa8SNMMg8SaKIdbgIaIa8S9DEUdbaOclfhOaecxfheaYcufgYmbkkdnaJmbcbhJJFFuuh8ZxekaAcxfheaAhHaJhOinaHaeIdbUdbaeczfheaHclfhHaOcufgOmbkJFFuuh8ZaAheaJhHinaeIdbg8Sa8Za8Za8S9EEh8ZaeclfheaHcufgHmbkkasydlh9ednalTmba9eclfhea9eydbhAaXhHalhYcbhOincbaeydbgKaA9RaHRbbcpeGEaOfhOaHcefhHaeclfheaKhAaYcufgYmbkaOce4h8Fkcuada8F9RcifgTcx2aTc;v:Q;v:Qe0Ecbyd;S1jjbHjjjjbbhDascxfasyd2gecdtfaDBdbasaecefBd2cuaTcdtaTcFFFFi0Ecbyd;S1jjbHjjjjbbhSascxfasyd2gecdtfaSBdbasaecefBd2a5cbyd;S1jjbHjjjjbbh8Mascxfasyd2gecdtfa8MBdbasaecefBd2alcbyd;S1jjbHjjjjbbh9hascxfasyd2gecdtfa9hBdbasaecefBd2axaxNa8NJbbjZamclGEg83a83N:vhcJbbbbhndnadak9nmbdnaTci6mba8Jclth9iaDcwfh6JbbbbhBJbbbbhninasclfabadalaQz:cjjjbabh8FcbhEcbh5inaba5cdtfh3cbheindnaQa8FaefydbgOcdtgifydbgYaQa3aec:W1jjbfydbcdtfydbgHcdtgwfydbgKSmbaXaHfRbbgLcv2aXaOfRbbgAfc;a1jjbfRbbg8AaAcv2aLfg8Lc;a1jjbfRbbg8KVcFeGTmbdnaKaY9nmba8Lcj1jjbfRbbcFeGmekaAcufhYdnaAaL9hmbaYcFeGce0mbahaifydbaH9hmekdndnaAclSmbaLcl9hmekdnaYcFeGce0mbahaifydbaH9hmdkaLcufcFeGce0mbagawfydbaO9hmekaDaEcx2fgAaHaOa8KcFeGgYEBdlaAaOaHaYEBdbaAaYa8AGcb9hBdwaEcefhEkaeclfgecx9hmbkdna5cifg5ad9pmba8Fcxfh8FaEcifaT9nmekkaETmdcbhiinJbbbbJbbjZaqaQaDaicx2fgAydlgKaAydbgYaAydwgHEgLcdtfydbc8S2fgeIdyg8S:va8SJbbbb9BEaeIdwaaaYaKaHEg8Fcx2fgHIdwgRNaeIdzaHIdbg8PNaeIdaMg8Sa8SMMaRNaeIdlaHIdlg8RNaeIdCaRNaeId3Mg8Sa8SMMa8RNaeIdba8PNaeIdxa8RNaeIdKMg8Sa8SMMa8PNaeId8KMMM:lNh80JbbbbJbbjZaqaQaYcdtfydbc8S2fgeIdyg8S:va8SJbbbb9BEaeIdwaaaKcx2fgHIdwg8VNaeIdzaHIdbg8WNaeIdaMg8Sa8SMMa8VNaeIdlaHIdlg8UNaeIdCa8VNaeId3Mg8Sa8SMMa8UNaeIdba8WNaeIdxa8UNaeIdKMg8Sa8SMMa8WNaeId8KMMM:lNh8YaAcwfh3aAclfhwdna8JTmbavaYc8S2fgOIdwa8VNaOIdza8WNaOIdaMg8Sa8SMMa8VNaOIdla8UNaOIdCa8VNaOId3Mg8Sa8SMMa8UNaOIdba8WNaOIdxa8UNaOIdKMg8Sa8SMMa8WNaOId8KMMMh8SayaKa8J2cdtfhHaraYa8J2cltfheaOIdyh8Xa8JhOinaHIdbgIaIa8XNaecxfIdba8VaecwfIdbNa8WaeIdbNa8UaeclfIdbNMMMgIaIM:tNa8SMh8SaHclfhHaeczfheaOcufgOmbkavaLc8S2fgOIdwaRNaOIdza8PNaOIdaMgIaIMMaRNaOIdla8RNaOIdCaRNaOId3MgIaIMMa8RNaOIdba8PNaOIdxa8RNaOIdKMgIaIMMa8PNaOId8KMMMhIaya8Fa8J2cdtfhHaraLa8J2cltfheaOIdyh8Wa8JhOinaHIdbg8Va8Va8WNaecxfIdbaRaecwfIdbNa8PaeIdbNa8RaeclfIdbNMMMg8Va8VM:tNaIMhIaHclfhHaeczfheaOcufgOmbka80aI:lMh80a8Ya8S:lMh8YkawaKa8Fa8Ya809FgeEBdbaAaYaLaeEBdba3a8Ya80aeEUdbaicefgiaE9hmbkasc;Wbfcbcj;qbz:ljjjb8Aa6heaEhHinasc;WbfaeydbcA4cF8FGgOcFAaOcFA6EcdtfgOaOydbcefBdbaecxfheaHcufgHmbkcbhecbhHinasc;WbfaefgOydbhAaOaHBdbaAaHfhHaeclfgecj;qb9hmbkcbhea6hHinasc;WbfaHydbcA4cF8FGgOcFAaOcFA6EcdtfgOaOydbgOcefBdbaSaOcdtfaeBdbaHcxfhHaEaecefge9hmbkadak9RgOci9Uh9kdnalTmbcbhea8MhHinaHaeBdbaHclfhHalaecefge9hmbkkcbh0a9hcbalz:ljjjbh9maOcO9Uh9na9kce4h9oasydwh9pcbh8KcbhwdninaDaSawcdtfydbcx2fg3Idwg8Sac9Emea8Ka9k9pmeJFFuuhIdna9oaE9pmbaDaSa9ocdtfydbcx2fIdwJbb;aZNhIkdna8SaI9ETmba8San9ETmba8Ka9n0mdkdna9maQa3ydlgicdtg9qfydbgAfg9rRbba9maQa3ydbgLcdtg9sfydbgHfg9tRbbVmbaXaLfRbbh9udna9eaHcdtfgeclfydbgOaeydbgeSmbaOae9RhKa9paecitfheaaaAcx2fg8Lcwfh5a8Lclfh9vaaaHcx2fg8Acwfh9wa8Aclfh9xcbhHceh8Fdnindna8MaeydbcdtfydbgOaASmba8MaeclfydbcdtfydbgYaASmbaOaYSmbaaaYcx2fgYIdbaaaOcx2fgOIdbg8V:tg8Sa9xIdbaOIdlgR:tg8WNa8AIdba8V:tg8UaYIdlaR:tgIN:tg8Pa8Sa9vIdbaR:tg8XNa8LIdba8V:tg80aIN:tgRNaIa9wIdbaOIdwg8R:tg8YNa8WaYIdwa8R:tg8VN:tg8WaIa5Idba8R:tg81Na8Xa8VN:tgINa8Va8UNa8Ya8SN:tg8Ra8Va80Na81a8SN:tg8SNMMa8Pa8PNa8Wa8WNa8Ra8RNMMaRaRNaIaINa8Sa8SNMMN:rJbbj8:N9FmdkaecwfheaHcefgHaK6h8FaKaH9hmbkka8FceGTmba9ocefh9oxeka3cwfhHdndndndna9uc9:fPdebdkaLheina8MaecdtgefaiBdba8EaefydbgeaL9hmbxikkdnagahaha9sfydbaiSEa8Ea9sfydbgLcdtfydbgecu9hmba8Ea9qfydbheka8Ma9sfaiBdbaehika8MaLcdtfaiBdbka9tce86bba9rce86bbaHIdbg8Sanana8S9DEhna0cefh0cecda9uceSEa8Kfh8KkawcefgwaE9hmbkka0TmddnalTmbcbhKcbhiindna8MaicdtgefydbgOaiSmbaQaOcdtfydbh8FdnaiaQaefydb9hg3mbaqa8Fc8S2fgeaqaic8S2fgHIdbaeIdbMUdbaeaHIdlaeIdlMUdlaeaHIdwaeIdwMUdwaeaHIdxaeIdxMUdxaeaHIdzaeIdzMUdzaeaHIdCaeIdCMUdCaeaHIdKaeIdKMUdKaeaHId3aeId3MUd3aeaHIdaaeIdaMUdaaeaHId8KaeId8KMUd8KaeaHIdyaeIdyMUdyka8JTmbavaOc8S2fgeavaic8S2gwfgHIdbaeIdbMUdbaeaHIdlaeIdlMUdlaeaHIdwaeIdwMUdwaeaHIdxaeIdxMUdxaeaHIdzaeIdzMUdzaeaHIdCaeIdCMUdCaeaHIdKaeIdKMUdKaeaHId3aeId3MUd3aeaHIdaaeIdaMUdaaeaHId8KaeId8KMUd8KaeaHIdyaeIdyMUdya9iaO2hLarhHa8JhAinaHaLfgeaHaKfgOIdbaeIdbMUdbaeclfgYaOclfIdbaYIdbMUdbaecwfgYaOcwfIdbaYIdbMUdbaecxfgeaOcxfIdbaeIdbMUdbaHczfhHaAcufgAmbka3mbJbbbbJbbjZaqawfgeIdyg8S:va8SJbbbb9BEaeIdwaaa8Fcx2fgHIdwg8SNaeIdzaHIdbgINaeIdaMg8Va8VMMa8SNaeIdlaHIdlg8VNaeIdCa8SNaeId3Mg8Sa8SMMa8VNaeIdbaINaeIdxa8VNaeIdKMg8Sa8SMMaINaeId8KMMM:lNg8SaBaBa8S9DEhBkaKa9ifhKaicefgial9hmbkcbhHahheindnaeydbgOcuSmbdnaHa8MaOcdtgAfydbgO9hmbcuhOahaAfydbgAcuSmba8MaAcdtfydbhOkaeaOBdbkaeclfhealaHcefgH9hmbkcbhHagheindnaeydbgOcuSmbdnaHa8MaOcdtgAfydbgO9hmbcuhOagaAfydbgAcuSmba8MaAcdtfydbhOkaeaOBdbkaeclfhealaHcefgH9hmbkkaBana8JEhBcbhYabhecbhKindna8MaeydbcdtfydbgHa8MaeclfydbcdtfydbgOSmbaHa8MaecwfydbcdtfydbgASmbaOaASmbabaYcdtfgLaHBdbaLcwfaABdbaLclfaOBdbaYcifhYkaecxfheaKcifgKad6mbkdndna9cTmbaYak9nmba8ZaB9FTmbcbhdabhecbhHindnaoaCaeydbgOcdtfydbcdtfIdbaB9ETmbabadcdtfgAaOBdbaAclfaeclfydbBdbaAcwfaecwfydbBdbadcifhdkaecxfheaHcifgHaY6mbkJFFuuh8ZaJTmeaoheaJhHJFFuuh8SinaeIdbgIa8Sa8SaI9EEg8Va8SaIaB9EgOEh8Sa8Va8ZaOEh8ZaeclfheaHcufgHmbxdkkaYhdkadak0mbxdkkasclfabadalaQz:cjjjbkdndnadak0mbadhOxekdna9cmbadhOxekdna8Zac9FmbadhOxekina8ZJbb;aZNg8Saca8Sac9DEh8VJbbbbh8SdnaJTmbaoheaJhHinaeIdbgIa8SaIa8V9FEa8SaIa8S9EEh8SaeclfheaHcufgHmbkkcbhOabhecbhHindnaoaCaeydbgAcdtfydbcdtfIdba8V9ETmbabaOcdtfgYaABdbaYclfaeclfydbBdbaYcwfaecwfydbBdbaOcifhOkaecxfheaHcifgHad6mbkJFFuuh8ZdnaJTmbaoheaJhHJFFuuhIinaeIdbgRaIaIaR9EEg8PaIaRa8V9EgAEhIa8Pa8ZaAEh8ZaeclfheaHcufgHmbkkdnaOad9hmbadhOxdka8Sanana8S9DEhnaOak9nmeaOhda8Zac9FmbkkdnamcjjjjlGTmbazmbaOTmbcbhQabheinaXaeydbgAfRbbc3thKaecwfgLydbhHdndnahaAcdtg8FfydbaeclfgiydbgCSmbcbhYagaCcdtfydbaA9hmekcjjjj94hYkaeaKaYVaAVBdbaXaCfRbbc3thKdndnahaCcdtfydbaHSmbcbhYagaHcdtfydbaC9hmekcjjjj94hYkaiaKaYVaCVBdbaXaHfRbbc3thYdndnahaHcdtfydbaASmbcbhCaga8FfydbaH9hmekcjjjj94hCkaLaYaCVaHVBdbaecxfheaQcifgQaO6mbkkdnazTmbaOTmbaOheinabazabydbcdtfydbBdbabclfhbaecufgembkkdnaPTmbaPa83an:rNUdbkasyd2gecdtascxffc98fhHdninaeTmeaHydbcbyd;O1jjbH:bjjjbbaHc98fhHaecufhexbkkasc;W;qbf8KjjjjbaOk;Yieouabydlhvabydbclfcbaicdtz:ljjjbhoadci9UhrdnadTmbdnalTmbaehwadhDinaoalawydbcdtfydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbxdkkaehwadhDinaoawydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbkkdnaiTmbcbhDaohwinawydbhqawaDBdbawclfhwaqaDfhDaicufgimbkkdnadci6mbinaecwfydbhwaeclfydbhDaeydbhidnalTmbalawcdtfydbhwalaDcdtfydbhDalaicdtfydbhikavaoaicdtfgqydbcitfaDBdbavaqydbcitfawBdlaqaqydbcefBdbavaoaDcdtfgqydbcitfawBdbavaqydbcitfaiBdlaqaqydbcefBdbavaoawcdtfgwydbcitfaiBdbavawydbcitfaDBdlawawydbcefBdbaecxfhearcufgrmbkkabydbcbBdbk;Podvuv998Jjjjjbca9RgvcFFF;7rBd3av9cFFF;7;3FF:;Fb83dCavcFFF97Bdzav9cFFF;7FFF:;u83dwdnadTmbaicd4hodnabmbdnalTmbcbhrinaealarcdtfydbao2cdtfhwcbhiinavcCfaifgDawaifIdbgqaDIdbgkakaq9EEUdbavcwfaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkarcefgrad9hmbxikkaocdthrcbhwincbhiinavcCfaifgDaeaifIdbgqaDIdbgkakaq9EEUdbavcwfaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkaearfheawcefgwad9hmbxdkkdnalTmbcbhrinabarcx2fgiaealarcdtfydbao2cdtfgwIdbUdbaiawIdlUdlaiawIdwUdwcbhiinavcCfaifgDawaifIdbgqaDIdbgkakaq9EEUdbavcwfaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkarcefgrad9hmbxdkkaocdthlcbhraehwinabarcx2fgiaearao2cdtfgDIdbUdbaiaDIdlUdlaiaDIdwUdwcbhiinavcCfaifgDawaifIdbgqaDIdbgkakaq9EEUdbavcwfaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkawalfhwarcefgrad9hmbkkJbbbbavIdwavIdCgk:tgqaqJbbbb9DEgqavIdxavIdKgx:tgmamaq9DEgqavIdzavId3gm:tgPaPaq9DEhPdnabTmbadTmbJbbbbJbbjZaP:vaPJbbbb9BEhqinabaqabIdbak:tNUdbabclfgvaqavIdbax:tNUdbabcwfgvaqavIdbam:tNUdbabcxfhbadcufgdmbkkaPk8MbabaeadaialavcbcbcbcbcbaoarawaDz:bjjjbk8MbabaeadaialavaoarawaDaqakaxamaPz:bjjjbk:nCoDud99rue99lul998Jjjjjbc;Wb9Rgw8KjjjjbdndnarmbcbhDxekawcxfcbc;Kbz:ljjjb8Aawcuadcx2adc;v:Q;v:Qe0Ecbyd;S1jjbHjjjjbbgqBdxawceBd2aqaeadaicbz:djjjb8AawcuadcdtadcFFFFi0Egkcbyd;S1jjbHjjjjbbgxBdzawcdBd2adcd4adfhmceheinaegicetheaiam6mbkcbhPawcuaicdtgsaicFFFFi0Ecbyd;S1jjbHjjjjbbgzBdCawciBd2dndnar:ZgH:rJbbbZMgO:lJbbb9p9DTmbaO:Ohexekcjjjj94hekaicufhAc:bwhmcbhCadhXcbhQinaChLaeamgKcufaeaK9iEaPgDcefaeaD9kEhYdndnadTmbaYcuf:YhOaqhiaxheadhmindndnaiIdbaONJbbbZMg8A:lJbbb9p9DTmba8A:OhCxekcjjjj94hCkaCcCthCdndnaiclfIdbaONJbbbZMg8A:lJbbb9p9DTmba8A:OhExekcjjjj94hEkaEcqtaCVhCdndnaicwfIdbaONJbbbZMg8A:lJbbb9p9DTmba8A:OhExekcjjjj94hEkaeaCaEVBdbaicxfhiaeclfheamcufgmmbkazcFeasz:ljjjbh3cbh5cbh8Eindna3axa8EcdtfydbgCcm4aC7c:v;t;h;Ev2gics4ai7aAGgmcdtfgEydbgecuSmbaeaCSmbcehiina3amaifaAGgmcdtfgEydbgecuSmeaicefhiaeaC9hmbkkaEaCBdba5aecuSfh5a8Ecefg8Ead9hmbxdkkazcFeasz:ljjjb8Acbh5kaDaYa5ar0giEhPaLa5aiEhCdna5arSmbaYaKaiEgmaP9Rcd9imbdndnaQcl0mbdnaX:ZgOaL:Zg8A:taY:Yg8FaD:Y:tgaa8FaK:Y:tgha5:ZggaH:tNNNaOaH:tahNa8Aag:tNa8AaH:taaNagaO:tNM:va8FMJbbbZMgO:lJbbb9p9DTmbaO:Ohexdkcjjjj94hexekaPamfcd9Theka5aXaiEhXaQcefgQcs9hmekkdndnaCmbcihicbhDxekcbhiawakcbyd;S1jjbHjjjjbbg8EBdKawclBd2aPcuf:Yh8AdndnadTmbaqhiaxheadhmindndnaiIdba8ANJbbbZMgO:lJbbb9p9DTmbaO:OhCxekcjjjj94hCkaCcCthCdndnaiclfIdba8ANJbbbZMgO:lJbbb9p9DTmbaO:OhExekcjjjj94hEkaEcqtaCVhCdndnaicwfIdba8ANJbbbZMgO:lJbbb9p9DTmbaO:OhExekcjjjj94hEkaeaCaEVBdbaicxfhiaeclfheamcufgmmbkazcFeasz:ljjjbh3cbhDcbh5inaxa5cdtgYfydbgCcm4aC7c:v;t;h;Ev2gics4ai7hecbhidndnina3aeaAGgmcdtfgEydbgecuSmednaxaecdtgEfydbaCSmbaicefgiamfheaiaA9nmekka8EaEfydbhixekaEa5BdbaDhiaDcefhDka8EaYfaiBdba5cefg5ad9hmbkcuaDc32giaDc;j:KM;jb0EhexekazcFeasz:ljjjb8AcbhDcbhekawaecbyd;S1jjbHjjjjbbgeBd3awcvBd2aecbaiz:ljjjbhEavcd4hxdnadTmbdnalTmbaxcdth3a8EhCalheaqhmadhAinaEaCydbc32fgiamIdbaiIdbMUdbaiamclfIdbaiIdlMUdlaiamcwfIdbaiIdwMUdwaiaeIdbaiIdxMUdxaiaeclfIdbaiIdzMUdzaiaecwfIdbaiIdCMUdCaiaiIdKJbbjZMUdKaCclfhCaea3fheamcxfhmaAcufgAmbxdkka8EhmaqheadhCinaEamydbc32fgiaeIdbaiIdbMUdbaiaeclfIdbaiIdlMUdlaiaecwfIdbaiIdwMUdwaiaiIdxJbbbbMUdxaiaiIdzJbbbbMUdzaiaiIdCJbbbbMUdCaiaiIdKJbbjZMUdKamclfhmaecxfheaCcufgCmbkkdnaDTmbaEhiaDheinaiaiIdbJbbbbJbbjZaicKfIdbgO:vaOJbbbb9BEgONUdbaiclfgmaOamIdbNUdbaicwfgmaOamIdbNUdbaicxfgmaOamIdbNUdbaiczfgmaOamIdbNUdbaicCfgmaOamIdbNUdbaic3fhiaecufgembkkcbhCawcuaDcdtgYaDcFFFFi0Egicbyd;S1jjbHjjjjbbgeBdaawcoBd2awaicbyd;S1jjbHjjjjbbg3Bd8KaecFeaYz:ljjjbh5dnadTmbJbbjZJbbjZa8A:vaPceSEaoNgOaONh8Aaxcdthxalheina8Aaec;C1jjbalEgmIdwaEa8EydbgAc32fgiIdC:tgOaONamIdbaiIdx:tgOaONamIdlaiIdz:tgOaONMMNaqcwfIdbaiIdw:tgOaONaqIdbaiIdb:tgOaONaqclfIdbaiIdl:tgOaONMMMhOdndna5aAcdtgifgmydbcuSmba3aifIdbaO9ETmekamaCBdba3aifaOUdbka8Eclfh8EaeaxfheaqcxfhqadaCcefgC9hmbkkaba5aYz:kjjjb8AcrhikaicdthiinaiTmeaic98fgiawcxffydbcbyd;O1jjbH:bjjjbbxbkkawc;Wbf8KjjjjbaDk:Odieui99iu8Jjjjjbca9RgicFFF;7rBd3ai9cFFF;7;3FF:;Fb83dCaicFFF97Bdzai9cFFF;7FFF:;u83dwdndnaembJbbjFhlJbbjFhvJbbjFhoxekadcd4cdthrcbhwincbhdinaicCfadfgDabadfIdbglaDIdbgvaval9EEUdbaicwfadfgDalaDIdbgvaval9DEUdbadclfgdcx9hmbkabarfhbawcefgwae9hmbkaiIdzaiId3:thoaiIdxaiIdK:thvaiIdwaiIdC:thlkJbbbbalalJbbbb9DEglavaval9DEglaoaoal9DEk9DeeuabcFeaicdtz:ljjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk9teiucbcbyd;W1jjbgeabcifc98GfgbBd;W1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd;W1jjbgeabcrfc94GfgbBd;W1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik9:eiuZbhedndncbyd;W1jjbgdaecztgi9nmbcuheadai9RcFFifcz4nbcuSmekadhekcbabae9Rcifc98Gcbyd;W1jjbfgdBd;W1jjbdnadZbcztge9nmbadae9RcFFifcz4nb8Akk6eiucbhidnadTmbdninabRbbglaeRbbgv9hmeaecefheabcefhbadcufgdmbxdkkalav9Rhikaikk:bedbcjwk9Oeeebeebebbeeebebbbbbebebbbbbbbbbebbbdbbbbbbbebbbebbbdbbbbbbbbbbbeeeeebebbebbebebbbeebbbbbbbbbbbbbbbbbbbbbc;OwkxebbbdbbbjNbb",t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var n,i=WebAssembly.instantiate(o(e),{}).then(function(_){n=_.instance,n.exports.__wasm_call_ctors()});function o(_){for(var b=new Uint8Array(_.length),x=0;x<_.length;++x){var T=_.charCodeAt(x);b[x]=T>96?T-97:T>64?T-39:T+4}for(var E=0,x=0;x<_.length;++x)b[E++]=b[x]<60?t[b[x]]:(b[x]-60)*64+b[++x];return b.buffer.slice(0,E)}function r(_){if(!_)throw new Error("Assertion failed")}function s(_){return new Uint8Array(_.buffer,_.byteOffset,_.byteLength)}function a(_,b,x){var T=n.exports.sbrk,E=T(b.length*4),S=T(x*4),A=new Uint8Array(n.exports.memory.buffer),v=s(b);A.set(v,E);var D=_(S,E,b.length,x);A=new Uint8Array(n.exports.memory.buffer);var R=new Uint32Array(x);new Uint8Array(R.buffer).set(A.subarray(S,S+x*4)),v.set(A.subarray(E,E+b.length*4)),T(E-T(0));for(var P=0;P<b.length;++P)b[P]=R[b[P]];return[R,D]}function l(_){for(var b=0,x=0;x<_.length;++x){var T=_[x];b=b<T?T:b}return b}function u(_,b,x,T,E,S,A,v,D){var R=n.exports.sbrk,P=R(4),L=R(x*4),F=R(E*S),y=R(x*4),I=new Uint8Array(n.exports.memory.buffer);I.set(s(T),F),I.set(s(b),y);var M=_(L,y,x,F,E,S,A,v,D,P);I=new Uint8Array(n.exports.memory.buffer);var B=new Uint32Array(M);s(B).set(I.subarray(L,L+M*4));var U=new Float32Array(1);return s(U).set(I.subarray(P,P+4)),R(P-R(0)),[B,U[0]]}function f(_,b,x,T,E,S,A,v,D,R,P,L,F){var y=n.exports.sbrk,I=y(4),M=y(x*4),B=y(E*S),U=y(E*v),V=y(D.length*4),W=y(x*4),H=R?y(E):0,X=new Uint8Array(n.exports.memory.buffer);X.set(s(T),B),X.set(s(A),U),X.set(s(D),V),X.set(s(b),W),R&&X.set(s(R),H);var $=_(M,W,x,B,E,S,U,v,V,D.length,H,P,L,F,I);X=new Uint8Array(n.exports.memory.buffer);var ae=new Uint32Array($);s(ae).set(X.subarray(M,M+$*4));var se=new Float32Array(1);return s(se).set(X.subarray(I,I+4)),y(I-y(0)),[ae,se[0]]}function h(_,b,x,T){var E=n.exports.sbrk,S=E(x*T),A=new Uint8Array(n.exports.memory.buffer);A.set(s(b),S);var v=_(S,x,T);return E(S-E(0)),v}function m(_,b,x,T,E,S,A,v){var D=n.exports.sbrk,R=D(v*4),P=D(x*T),L=D(x*S),F=new Uint8Array(n.exports.memory.buffer);F.set(s(b),P),E&&F.set(s(E),L);var y=_(R,P,x,T,L,S,A,v);F=new Uint8Array(n.exports.memory.buffer);var I=new Uint32Array(y);return s(I).set(F.subarray(R,R+y*4)),D(R-D(0)),I}var p={LockBorder:1,Sparse:2,ErrorAbsolute:4,Prune:8,_InternalDebug:1<<30};return{ready:i,supported:!0,useExperimentalFeatures:!1,compactMesh:function(_){r(_ instanceof Uint32Array||_ instanceof Int32Array||_ instanceof Uint16Array||_ instanceof Int16Array),r(_.length%3==0);var b=_.BYTES_PER_ELEMENT==4?_:new Uint32Array(_);return a(n.exports.meshopt_optimizeVertexFetchRemap,b,l(_)+1)},simplify:function(_,b,x,T,E,S){r(_ instanceof Uint32Array||_ instanceof Int32Array||_ instanceof Uint16Array||_ instanceof Int16Array),r(_.length%3==0),r(b instanceof Float32Array),r(b.length%x==0),r(x>=3),r(T>=0&&T<=_.length),r(T%3==0),r(E>=0);for(var A=0,v=0;v<(S?S.length:0);++v)r(S[v]in p),r(this.useExperimentalFeatures||S[v]!="Prune"),A|=p[S[v]];var D=_.BYTES_PER_ELEMENT==4?_:new Uint32Array(_),R=u(n.exports.meshopt_simplify,D,_.length,b,b.length/x,x*4,T,E,A);return R[0]=_ instanceof Uint32Array?R[0]:new _.constructor(R[0]),R},simplifyWithAttributes:function(_,b,x,T,E,S,A,v,D,R){r(this.useExperimentalFeatures),r(_ instanceof Uint32Array||_ instanceof Int32Array||_ instanceof Uint16Array||_ instanceof Int16Array),r(_.length%3==0),r(b instanceof Float32Array),r(b.length%x==0),r(x>=3),r(T instanceof Float32Array),r(T.length%E==0),r(E>=0),r(A==null||A instanceof Uint8Array),r(A==null||A.length==b.length/x),r(v>=0&&v<=_.length),r(v%3==0),r(D>=0),r(Array.isArray(S)),r(E>=S.length),r(S.length<=32);for(var P=0;P<S.length;++P)r(S[P]>=0);for(var L=0,P=0;P<(R?R.length:0);++P)r(R[P]in p),L|=p[R[P]];var F=_.BYTES_PER_ELEMENT==4?_:new Uint32Array(_),y=f(n.exports.meshopt_simplifyWithAttributes,F,_.length,b,b.length/x,x*4,T,E*4,new Float32Array(S),A?new Uint8Array(A):null,v,D,L);return y[0]=_ instanceof Uint32Array?y[0]:new _.constructor(y[0]),y},getScale:function(_,b){return r(_ instanceof Float32Array),r(_.length%b==0),r(b>=3),h(n.exports.meshopt_simplifyScale,_,_.length/b,b*4)},simplifyPoints:function(_,b,x,T,E,S){return r(this.useExperimentalFeatures),r(_ instanceof Float32Array),r(_.length%b==0),r(b>=3),r(x>=0&&x<=_.length/b),T?(r(T instanceof Float32Array),r(T.length%E==0),r(E>=3),r(_.length/b==T.length/E),m(n.exports.meshopt_simplifyPoints,_,_.length/b,b*4,T,E*4,S,x)):m(n.exports.meshopt_simplifyPoints,_,_.length/b,b*4,void 0,0,0,x)}}}();var aQt=function(){var e="b9H79Tebbbefx9Geueu9Geub9Gbb9Giuuueu9Gkuuuuuuuuuu99eu9Gvuuuuueu9Gkuuuuuuuuu9999eu9Gruuuuuuub9Gkuuuuuuuuuuueu9Gouuuuuub9Giuuub9GluuuubiOHdilvorwDqrkbiibeilve9Weiiviebeoweuec:q:Odkr:Yewo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9I919P29K9nW79O2Wt79c9V919U9KbeX9TW79O9V9Wt9F9I919P29K9nW79O2Wt7bd39TW79O9V9Wt9F9J9V9T9W91tWJ2917tWV9c9V919U9K7br39TW79O9V9Wt9F9J9V9T9W91tW9nW79O2Wt9c9V919U9K7bDL9TW79O9V9Wt9F9V9Wt9P9T9P96W9nW79O2Wtbql79IV9RbkDwebcekdsPq;L9kHdbkIbabaec9:fgefcufae9Ugeabci9Uadfcufad9Ugbaeab0Ek:oAlPue99eux998Jjjjjbc:We9Rgk8Kjjjjbakc;mbfcbc;Kbz:njjjb8AakcuaocdtgxaocFFFFi0Egmcbyd:e1jjbHjjjjbbgPBd9makceBd:SeakaPBdnakamcbyd:e1jjbHjjjjbbgsBd9qakcdBd:SeakasBd9eakcualcdtalcFFFFi0Ecbyd:e1jjbHjjjjbbgzBd9uakazBd9iakciBd:SeaPcbaxz:njjjbhHalci9UhOdnalTmbaihPalhAinaHaPydbcdtfgCaCydbcefBdbaPclfhPaAcufgAmbkkdnaoTmbcbhPashAaHhCaohXinaAaPBdbaAclfhAaCydbaPfhPaCclfhCaXcufgXmbkkdnalci6mbcbhPaihAinaAcwfydbhCaAclfydbhXasaAydbcdtfgQaQydbgQcefBdbazaQcdtfaPBdbasaXcdtfgXaXydbgXcefBdbazaXcdtfaPBdbasaCcdtfgCaCydbgCcefBdbazaCcdtfaPBdbaAcxfhAaOaPcefgP9hmbkkdnaoTmbaHhAashPaohCinaPaPydbaAydb9RBdbaAclfhAaPclfhPaCcufgCmbkkakamcbyd:e1jjbHjjjjbbgPBd9yakclBd:SeaPaHaxz:mjjjbhmakaOcbyd:e1jjbHjjjjbbgPBd9CakcvBd:SeaPcbaOz:njjjbhLakcuaOcK2alcjjjjd0Ecbyd:e1jjbHjjjjbbgKBd9GakcoBd:SeJbbbbhYdnalci6g8Ambarcd4hxaihAaKhPaOhrJbbbbhEinavaAclfydbax2cdtfgCIdlh3avaAydbax2cdtfgXIdlhYavaAcwfydbax2cdtfgQIdlh5aCIdwh8EaXIdwh8FaQIdwhaaPaCIdbghaXIdbggMaQIdbg8JMJbbnn:vUdbaPclfaXIdlaCIdlMaQIdlMJbbnn:vUdbaQIdwh8KaCIdwh8LaXIdwh8MaPcxfa3aY:tg3aaa8F:tgaNa5aY:tg5a8Ea8F:tg8EN:tgYJbbbbJbbjZahag:tgha5Na8Jag:tgga3N:tg8Fa8FNaYaYNa8EagNaaahN:tgYaYNMM:rgg:vagJbbbb9BEg3NUdbaPczfaYa3NUdbaPcCfa8Fa3NUdbaPcwfa8Ka8Ma8LMMJbbnn:vUdbaEagMhEaAcxfhAaPcKfhParcufgrmbkaEaO:Z:vJbbbZNhYkakcuaOcdtalcFFFF970Ecbyd:e1jjbHjjjjbbgCBd9KakcrBd:SeaYaD:ZN:rhYdna8AmbcbhPaChAinaAaPBdbaAclfhAaOaPcefgP9hmbkkaYJbbbZNh8MakcuaOcltalcFFFFd0Ecbyd:e1jjbHjjjjbbg8ABd9OakcwBd:Secba8AaKaCaOz:djjjb8Aakaocbyd:e1jjbHjjjjbbgPBd2aPcFeaoz:njjjbhrakc8Wfcwf9cb83ibak9cb83i8WcbhPJbbbbhEJbbbbh5Jbbbbh8EJbbbbhYJbbbbh8FJbbbbhgcbhlinJbbbbh3dnaPTmbJbbjZaP:Z:vh3kaka8Ea3NgaUdaaka5a3NghUd3akaEa3Ng8JUdKJbbbbh3dnagagNaYaYNa8Fa8FNMMg8KJbbbb9BmbJbbjZa8K:r:vh3kakaga3NUd8Saka8Fa3NUdyakaYa3NUd8Kdndndnakyd8WgQakydUgAakcKfaeaiakc;abfaKamara8Maqz:ejjjbgCcuSmbdnaPaD9pmbaAaraiaCcx2fgXydbfRbbcFeSfaraXclfydbfRbbcFeSfaraXcwfydbfRbbcFeSfaw9nmdkaQaAcbaeaiakc;abfaKamara8MJbbbbz:ejjjbgCcu9hmekakaaUdCakahUdzaka8JUdxakcuBdwakcFFF;7rBdla8AcbaKaLakcxfakcwfakclfz:fjjjbakydwgCcuSmekdnakc8WfaiaCcx2fgOydbgPaOclfydbgAaOcwfydbgXarabaeadalawaDz:gjjjbTmbalcefhlJbbbbhEJbbbbh5Jbbbbh8EJbbbbhYJbbbbh8FJbbbbhgkamaPcdtfgPaPydbcufBdbamaAcdtfgPaPydbcufBdbamaXcdtfgPaPydbcufBdbcbhXinazasaOaXcdtfydbcdtgAfydbcdtfgxhPaHaAfgvydbgQhAdnaQTmbdninaPydbaCSmeaPclfhPaAcufgATmdxbkkaPaxaQcdtfc98fydbBdbavavydbcufBdbkaXcefgXci9hmbkaKaCcK2fgPIdbh3aPIdlhaaPIdwhhaPIdxh8JaPIdzh8KaPIdCh8LaLaCfce86bbaga8LMhga8Fa8KMh8FaYa8JMhYa8EahMh8Ea5aaMh5aEa3MhEakyd88hPxekkdnaPTmbdnakyd80gAaPci2fgCciGTmbadaCfcbaPaAcu7fciGcefz:njjjb8AkabalcltfgPak8Pi8W83dbaPcwfakc8Wfcwf8Pib83dbalcefhlkcahPdninaPc98Smeakc;mbfaPfydbcbydj1jjbH:bjjjbbaPc98fhPxbkkakc:Wef8Kjjjjbalk;3vivuv99lu8Jjjjjbca9Rgv8Kjjjjbdndnalcw0mbaiydbhoaeabcitfgralcdtcufBdlaraoBdbdnalcd6mbaiclfhoalcufhwarcxfhrinaoydbhDarcuBdbarc98faDBdbarcwfhraoclfhoawcufgwmbkkalabfhrxekcbhDavczfcwfcbBdbav9cb83izavcwfcbBdbav9cb83ibJbbjZhqJbbjZhkinadaiaDcdtfydbcK2fhwcbhrinavczfarfgoawarfIdbgxaoIdbgm:tgPakNamMgmUdbavarfgoaPaxam:tNaoIdbMUdbarclfgrcx9hmbkJbbjZaqJbbjZMgq:vhkaDcefgDal9hmbkcbhoadcbcecdavIdlgxavIdwgm9GEgravIdbgPam9GEaraPax9GEgscdtgrfhzavczfarfIdbhxaihralhwinaiaocdtfgDydbhHaDarydbgOBdbaraHBdbarclfhraoazaOcK2fIdbax9Dfhoawcufgwmbkaeabcitfhrdndnaocv6mbaoalc98f6mekaraiydbBdbaralcdtcufBdlaiclfhoalcufhwarcxfhrinaoydbhDarcuBdbarc98faDBdbarcwfhraoclfhoawcufgwmbkalabfhrxekaraxUdbaeabcitfgrarydlc98GasVBdlabcefaeadaiaoz:djjjbhwararydlciGawabcu7fcdtVBdlawaeadaiaocdtfalao9Rz:djjjbhrkavcaf8Kjjjjbark;Bloeue99vue99Due99dndnaembcuhkxekJbbjZaq:thxaiabcdtfhmavydbhPavydlhsavydwhzcbhHJFFuuhOcvhbcuhkindnaPamaHcdtfydbcdtgvfydbgATmbazasavfydbcdtfhiindndnawalaiydbgCcx2fgvclfydbgXfRbbcFeSawavydbgQfRbbcFeSfawavcwfydbgLfRbbcFeSfgKmbcbhvxekcehvaraQcdtfydbgYceSmbcehvaraXcdtfydbg8AceSmbcehvaraLcdtfydbgEceSmbdna8AcdSaYcdSfaEcdSfcd6mbaKcefhvxekaKcdfhvkdnavab9kmbdndnadTmbaoaCcK2fgQIdwadIdw:tg3a3NaQIdbadIdb:tg3a3NaQIdladIdl:tg3a3NMM:raD:vaxNJbbjZMJ9VO:d86JbbjZaQIdCadIdCNaQIdxadIdxNaQIdzadIdzNMMaqN:tg3a3J9VO:d869DENh3xekaraQcdtfydbaraXcdtfydbfaraLcdtfydbfc99f:Zh3kaCakavab6a3aO9DVgQEhkavabaQEhba3aOaQEhOkaiclfhiaAcufgAmbkkaHcefgHae9hmbkkakk;bddlue99dndndnabaecitfgrydlgwciGgDci9hmbarclfhqxekinabcbawcd4gwalaDcdtfIdbabaecitfIdb:tgkJbbbb9FEgDaecefgefadaialavaoz:fjjjbak:laoIdb9FTmdabaDaw7aefgecitfgrydlgwciGgDci9hmbkarclfhqkabaecitfhecuhbindnaiaeydbgDfRbbmbadaDcK2fgrIdwalIdw:tgkakNarIdbalIdb:tgkakNarIdlalIdl:tgkakNMM:rgkaoIdb9DTmbaoakUdbavaDBdbaqydbhwkaecwfheabcefgbawcd46mbkkk;yleoudnaladfgkRbbcFeSalaefgxRbbgmcFeSfabydwgPfalaifgsRbbcFeSfaD0abydxaq9pVgzce9hmbavawcltfgmab8Pdb83dbamcwfabcwfgm8Pdb83dbdndnamydbmbcbhqxekcbhDaohminalamabydbcdtfydbfcFe86bbamclfhmaDcefgDabydwgq6mbkkdnabydxglci2gDabydlgmfgPciGTmbaraPfcbalamcu7fciGcefz:njjjb8Aabydxci2hDabydlhmabydwhqkab9cb83dwababydbaqfBdbabaDcifc98GamfBdlaxRbbhmcbhPkdnamcFeGcFe9hmbaxaP86bbababydwgmcefBdwaoabydbcdtfamcdtfaeBdbkdnakRbbcFe9hmbakabydw86bbababydwgmcefBdwaoabydbcdtfamcdtfadBdbkdnasRbbcFe9hmbasabydw86bbababydwgmcefBdwaoabydbcdtfamcdtfaiBdbkarabydlfabydxci2faxRbb86bbarabydlfabydxci2fcefakRbb86bbarabydlfabydxci2fcdfasRbb86bbababydxcefBdxazk;Ckovud99euv99eul998Jjjjjbc:G;ae9Rgo8KjjjjbdndnadTmbavcd4hrcbhwcbhDindnaiaeclfydbar2cdtfgvIdbaiaeydbar2cdtfgqIdbgk:tgxaiaecwfydbar2cdtfgmIdlaqIdlgP:tgsNamIdbak:tgzavIdlaP:tgPN:tgkakNaPamIdwaqIdwgH:tgONasavIdwaH:tgHN:tgPaPNaHazNaOaxN:tgxaxNMM:rgsJbbbb9Bmbaoc:G:qefawcx2fgAakas:vUdwaAaxas:vUdlaAaPas:vUdbaocafawc8K2fgAaq8Pdb83dbaAav8Pdb83dxaAam8Pdb83dKaAcwfaqcwfydbBdbaAcCfavcwfydbBdbaAcafamcwfydbBdbawcefhwkaecxfheaDcifgDad6mbkab9cb83dbabcyf9cb83dbabcaf9cb83dbabcKf9cb83dbabczf9cb83dbabcwf9cb83dbawTmeao9cb83iKao9cb83izaoczfaocafawci2z1jjjbaoIdKhCaoIdChXaoIdzhQao9cb83iwao9cb83ibaoaoc:G:qefawz1jjjbJbbjZhkaoIdwgPJbbbbJbbjZaPaPNaoIdbgPaPNaoIdlgsasNMM:rgx:vaxJbbbb9BEgzNhxasazNhsaPazNhzaoc:G:qefheawhvinaecwfIdbaxNaeIdbazNasaeclfIdbNMMgPakaPak9DEhkaecxfheavcufgvmbkabaCUdwabaXUdlabaQUdbabaoId3UdxdndnakJ;n;m;m899FmbJbbbbhPaoc:G:qefheaocafhvinaCavcwfIdb:taecwfIdbgHNaQavIdb:taeIdbgONaXavclfIdb:taeclfIdbgLNMMaxaHNazaONasaLNMM:vgHaPaHaP9EEhPavc8KfhvaecxfheawcufgwmbkabazUd3abc8KfaxUdbabcafasUdbabcKfaCaxaPN:tUdbabcCfaXasaPN:tUdbabaQazaPN:tUdzabJbbjZakakN:t:rgkUdydndnaxJbbj:;axJbbj:;9GEgPJbbjZaPJbbjZ9FEJbb;:9cNJbbbZJbbb:;axJbbbb9GEMgP:lJbbb9p9DTmbaP:Ohexekcjjjj94hekabc8Ufae86bbdndnasJbbj:;asJbbj:;9GEgPJbbjZaPJbbjZ9FEJbb;:9cNJbbbZJbbb:;asJbbbb9GEMgP:lJbbb9p9DTmbaP:Ohvxekcjjjj94hvkabcRfav86bbdndnazJbbj:;azJbbj:;9GEgPJbbjZaPJbbjZ9FEJbb;:9cNJbbbZJbbb:;azJbbbb9GEMgP:lJbbb9p9DTmbaP:Ohqxekcjjjj94hqkabaq86b8SdndnaecKtcK91:YJbb;:9c:vax:t:lavcKtcK91:YJbb;:9c:vas:t:laqcKtcK91:YJbb;:9c:vaz:t:lakMMMJbb;:9cNJbbjZMgk:lJbbb9p9DTmbak:Ohexekcjjjj94hekaecFbaecFb9iEhexekabcjjj;8iBdycFbhekabae86b8Vxekab9cb83dbabcyf9cb83dbabcaf9cb83dbabcKf9cb83dbabczf9cb83dbabcwf9cb83dbkaoc:G;aef8Kjjjjbk:mvdouq99cbhi8Jjjjjbca9RglczfcwfcbBdbal9cb83izalcwfcbBdbal9cb83ibdnadTmbcbhvinaeaifhocbhrinalczfarfgwavawydbgwaoarfIdbgDaearawcx2ffIdb9DEBdbalarfgwavawydbgwaDaearawcx2ffIdb9EEBdbarclfgrcx9hmbkaicxfhiavcefgvad9hmbkkJbbbbhDcbhrcbhicbhvinaealarfydbcx2fgwIdwaealczfarfydbcx2fgoIdw:tgqaqNawIdbaoIdb:tgqaqNawIdlaoIdl:tgqaqNMMgqaDaqaD9EgwEhDavaiawEhiarclfhravcefgvci9hmbkaealczfaicdtgvfydbcx2fgrIdwaealavfydbcx2fglIdwMJbbbZNhqarIdlalIdlMJbbbZNhkarIdbalIdbMJbbbZNhxaD:rJbbbZNhDdnadTmbindnaecwfIdbgmaq:tgPaPNaeIdbgsax:tgPaPNaeclfIdbgzak:tgPaPNMMgPaDaDN9ETmbaqaDaP:rgH:vJbbbZNJbbbZMgPNamJbbjZaP:tgONMhqakaPNazaONMhkaxaPNasaONMhxaDaHMJbbbZNhDkaecxfheadcufgdmbkkabaDUdxabaqUdwabakUdlabaxUdbkjeeiu8Jjjjjbcj8W9Rgr8Kjjjjbaici2hwdnaiTmbawceawce0EhDarhiinaiaeadRbbcdtfydbBdbadcefhdaiclfhiaDcufgDmbkkabarawaladaoz:hjjjbarcj8Wf8Kjjjjbk:Ylequ8Jjjjjbcjx9Rgl8Kjjjjbcbhvalcjqfcbaiz:njjjb8AdndnadTmbcjehoaehrincuhwarhDcuhqavhkdninawakaoalcjqfaDcefRbbfRbb9RcFeGci6aoalcjqfaDRbbfRbb9RcFeGci6faoalcjqfaDcdfRbbfRbb9RcFeGci6fgxaq9mgmEhwdnammbaxce0mdkaxaqaxaq9kEhqaDcifhDadakcefgk9hmbkkaeawci2fgDcdfRbbhqaDcefRbbhxaDRbbhkaeavci2fgDcifaDawav9Rci2z:qjjjb8Aakalcjqffaocefgo86bbaxalcjqffao86bbaDcdfaq86bbaDcefax86bbaDak86bbaqalcjqffao86bbarcifhravcefgvad9hmbkalcFeaiz:njjjbhoadci2gDceaDce0EhqcbhxindnaoaeRbbgkfgwRbbgDcFe9hmbawax86bbaocjdfaxcdtfabakcdtfydbBdbaxhDaxcefhxkaeaD86bbaecefheaqcufgqmbkaxcdthDxekcbhDkabalcjdfaDz:mjjjb8Aalcjxf8Kjjjjbk9teiucbcbyd11jjbgeabcifc98GfgbBd11jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd11jjbgeabcrfc94GfgbBd11jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik9:eiuZbhedndncbyd11jjbgdaecztgi9nmbcuheadai9RcFFifcz4nbcuSmekadhekcbabae9Rcifc98Gcbyd11jjbfgdBd11jjbdnadZbcztge9nmbadae9RcFFifcz4nb8Akk:;Deludndndnadch9pmbabaeSmdaeabadfgi9Rcbadcet9R0mekabaead;8qbbxekaeab7ciGhldndndnabae9pmbdnalTmbadhvabhixikdnabciGmbadhvabhixdkadTmiabaeRbb86bbadcufhvdnabcefgiciGmbaecefhexdkavTmiabaeRbe86beadc9:fhvdnabcdfgiciGmbaecdfhexdkavTmiabaeRbd86bdadc99fhvdnabcifgiciGmbaecifhexdkavTmiabaeRbi86biabclfhiaeclfheadc98fhvxekdnalmbdnaiciGTmbadTmlabadcufgifglaeaifRbb86bbdnalciGmbaihdxekaiTmlabadc9:fgifglaeaifRbb86bbdnalciGmbaihdxekaiTmlabadc99fgifglaeaifRbb86bbdnalciGmbaihdxekaiTmlabadc98fgdfaeadfRbb86bbkadcl6mbdnadc98fgocd4cefciGgiTmbaec98fhlabc98fhvinavadfaladfydbBdbadc98fhdaicufgimbkkaocx6mbaec9Wfhvabc9WfhoinaoadfgicxfavadfglcxfydbBdbaicwfalcwfydbBdbaiclfalclfydbBdbaialydbBdbadc9Wfgdci0mbkkadTmdadhidnadciGglTmbaecufhvabcufhoadhiinaoaifavaifRbb86bbaicufhialcufglmbkkadcl6mdaec98fhlabc98fhvinavaifgecifalaifgdcifRbb86bbaecdfadcdfRbb86bbaecefadcefRbb86bbaeadRbb86bbaic98fgimbxikkavcl6mbdnavc98fglcd4cefcrGgdTmbavadcdt9RhvinaiaeydbBdbaeclfheaiclfhiadcufgdmbkkalc36mbinaiaeydbBdbaiaeydlBdlaiaeydwBdwaiaeydxBdxaiaeydzBdzaiaeydCBdCaiaeydKBdKaiaeyd3Bd3aecafheaicafhiavc9Gfgvci0mbkkavTmbdndnavcrGgdmbavhlxekavc94GhlinaiaeRbb86bbaicefhiaecefheadcufgdmbkkavcw6mbinaiaeRbb86bbaiaeRbe86beaiaeRbd86bdaiaeRbi86biaiaeRbl86blaiaeRbv86bvaiaeRbo86boaiaeRbr86braicwfhiaecwfhealc94fglmbkkabkkAebcjwkxebbbdbbbzNbb",t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var n,i=WebAssembly.instantiate(o(e),{}).then(function(_){n=_.instance,n.exports.__wasm_call_ctors()});function o(_){for(var b=new Uint8Array(_.length),x=0;x<_.length;++x){var T=_.charCodeAt(x);b[x]=T>96?T-97:T>64?T-39:T+4}for(var E=0,x=0;x<_.length;++x)b[E++]=b[x]<60?t[b[x]]:(b[x]-60)*64+b[++x];return b.buffer.slice(0,E)}function r(_){if(!_)throw new Error("Assertion failed")}function s(_){return new Uint8Array(_.buffer,_.byteOffset,_.byteLength)}var a=48,l=16;function u(_,b){var x=_.meshlets[b*4+0],T=_.meshlets[b*4+1],E=_.meshlets[b*4+2],S=_.meshlets[b*4+3];return{vertices:_.vertices.subarray(x,x+E),triangles:_.triangles.subarray(T,T+S*3)}}function f(_,b,x,T,E,S,A){var v=n.exports.sbrk,D=n.exports.meshopt_buildMeshletsBound(_.length,E,S),R=v(D*l),P=v(D*E*4),L=v(D*S*3),F=v(_.byteLength),y=v(b.byteLength),I=new Uint8Array(n.exports.memory.buffer);I.set(s(_),F),I.set(s(b),y);var M=n.exports.meshopt_buildMeshlets(R,P,L,F,_.length,y,x,T,E,S,A);I=new Uint8Array(n.exports.memory.buffer);for(var B=I.subarray(R,R+M*l),U=new Uint32Array(B.buffer,B.byteOffset,B.byteLength/4).slice(),V=0;V<M;++V){var W=U[V*4+0],H=U[V*4+1],x=U[V*4+2],X=U[V*4+3];n.exports.meshopt_optimizeMeshlet(P+W*4,L+H,X,x)}var $=U[(M-1)*4+0],ae=U[(M-1)*4+1],se=U[(M-1)*4+2],he=U[(M-1)*4+3],ge=$+se,le=ae+(he*3+3&-4),me={meshlets:U,vertices:new Uint32Array(I.buffer,P,ge).slice(),triangles:new Uint8Array(I.buffer,L,le*3).slice(),meshletCount:M};return v(R-v(0)),me}function h(_){var b=new Float32Array(n.exports.memory.buffer,_,a/4);return{centerX:b[0],centerY:b[1],centerZ:b[2],radius:b[3],coneApexX:b[4],coneApexY:b[5],coneApexZ:b[6],coneAxisX:b[7],coneAxisY:b[8],coneAxisZ:b[9],coneCutoff:b[10]}}function m(_,b,x,T){var E=n.exports.sbrk,S=[],A=E(b.byteLength),v=E(_.vertices.byteLength),D=E(_.triangles.byteLength),R=E(a),P=new Uint8Array(n.exports.memory.buffer);P.set(s(b),A),P.set(s(_.vertices),v),P.set(s(_.triangles),D);for(var L=0;L<_.meshletCount;++L){var F=_.meshlets[L*4+0],y=_.meshlets[L*4+0+1],I=_.meshlets[L*4+0+3];n.exports.meshopt_computeMeshletBounds(R,v+F*4,D+y,I,A,x,T),S.push(h(R))}return E(A-E(0)),S}function p(_,b,x,T){var E=n.exports.sbrk,S=E(a),A=E(_.byteLength),v=E(b.byteLength),D=new Uint8Array(n.exports.memory.buffer);D.set(s(_),A),D.set(s(b),v),n.exports.meshopt_computeClusterBounds(S,A,_.length,v,x,T);var R=h(S);return E(S-E(0)),R}return{ready:i,supported:!0,buildMeshlets:function(_,b,x,T,E,S){r(_.length%3==0),r(b instanceof Float32Array),r(b.length%x==0),r(x>=3),r(T<=255||T>0),r(E<=512),r(E%4==0),S=S||0;var A=_.BYTES_PER_ELEMENT==4?_:new Uint32Array(_);return f(A,b,b.length/x,x*4,T,E,S)},computeClusterBounds:function(_,b,x){r(_.length%3==0),r(_.length/3<=512),r(b instanceof Float32Array),r(b.length%x==0),r(x>=3);var T=_.BYTES_PER_ELEMENT==4?_:new Uint32Array(_);return p(T,b,b.length/x,x*4)},computeMeshletBounds:function(_,b,x){return r(_.meshletCount!=0),r(b instanceof Float32Array),r(b.length%x==0),r(x>=3),m(_,b,b.length/x,x*4)},extractMeshlet:function(_,b){return r(b>=0&&b<_.meshletCount),u(_,b)}}}();function wb(e){e=g(e,g.EMPTY_OBJECT);let t=e.resourceCache,n=e.gltf,i=e.bufferViewId,o=e.gltfResource,r=e.baseResource,s=e.cacheKey;C.typeOf.func("options.resourceCache",t),C.typeOf.object("options.gltf",n),C.typeOf.number("options.bufferViewId",i),C.typeOf.object("options.gltfResource",o),C.typeOf.object("options.baseResource",r);let a=n.bufferViews[i],l=a.buffer,u=a.byteOffset,f=a.byteLength,h=!1,m,p,_,b;if(ei(a,"EXT_meshopt_compression")){let T=a.extensions.EXT_meshopt_compression;l=T.buffer,u=g(T.byteOffset,0),f=T.byteLength,h=!0,m=T.byteStride,p=T.count,_=T.mode,b=g(T.filter,"NONE")}let x=n.buffers[l];this._hasMeshopt=h,this._meshoptByteStride=m,this._meshoptCount=p,this._meshoptMode=_,this._meshoptFilter=b,this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._buffer=x,this._bufferId=l,this._byteOffset=u,this._byteLength=f,this._cacheKey=s,this._bufferLoader=void 0,this._typedArray=void 0,this._state=_t.UNLOADED,this._promise=void 0}c(Object.create)&&(wb.prototype=Object.create(Gi.prototype),wb.prototype.constructor=wb);Object.defineProperties(wb.prototype,{cacheKey:{get:function(){return this._cacheKey}},typedArray:{get:function(){return this._typedArray}}});async function ONe(e){try{let t=PNe(e);if(e._bufferLoader=t,await t.load(),e.isDestroyed())return;let n=t.typedArray,i=new Uint8Array(n.buffer,n.byteOffset+e._byteOffset,e._byteLength);if(e.unload(),e._typedArray=i,e._hasMeshopt){let o=e._meshoptCount,r=e._meshoptByteStride,s=new Uint8Array(o*r);dte.decodeGltfBuffer(s,o,r,e._typedArray,e._meshoptMode,e._meshoptFilter),e._typedArray=s}return e._state=_t.READY,e}catch(t){if(e.isDestroyed())return;throw e.unload(),e._state=_t.FAILED,e.getError("Failed to load buffer view",t)}}wb.prototype.load=async function(){return c(this._promise)?this._promise:(this._state=_t.LOADING,this._promise=ONe(this),this._promise)};function PNe(e){let t=e._resourceCache,n=e._buffer;if(c(n.uri)){let o=e._baseResource.getDerivedResource({url:n.uri});return t.getExternalBufferLoader({resource:o})}return t.getEmbeddedBufferLoader({parentResource:e._gltfResource,bufferId:e._bufferId})}wb.prototype.unload=function(){c(this._bufferLoader)&&!this._bufferLoader.isDestroyed()&&this._resourceCache.unload(this._bufferLoader),this._bufferLoader=void 0,this._typedArray=void 0};var aA=wb;function wr(){}wr._maxDecodingConcurrency=Math.max(sn.hardwareConcurrency-1,1);wr._decoderTaskProcessor=void 0;wr._taskProcessorReady=!1;wr._error=void 0;wr._getDecoderTaskProcessor=function(){if(!c(wr._decoderTaskProcessor)){let e=new hi("decodeDraco",wr._maxDecodingConcurrency);e.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}).then(function(t){t?wr._taskProcessorReady=!0:wr._error=new ie("Draco decoder could not be initialized.")}).catch(t=>{wr._error=t}),wr._decoderTaskProcessor=e}return wr._decoderTaskProcessor};wr.decodePointCloud=function(e){let t=wr._getDecoderTaskProcessor();if(c(wr._error))throw wr._error;if(wr._taskProcessorReady)return t.scheduleTask(e,[e.buffer.buffer])};wr.decodeBufferView=function(e){let t=wr._getDecoderTaskProcessor();if(c(wr._error))throw wr._error;if(wr._taskProcessorReady)return t.scheduleTask(e,[e.array.buffer])};var H_=wr;function G_(e){e=g(e,g.EMPTY_OBJECT);let t=e.resourceCache,n=e.gltf,i=e.draco,o=e.gltfResource,r=e.baseResource,s=e.cacheKey;C.typeOf.func("options.resourceCache",t),C.typeOf.object("options.gltf",n),C.typeOf.object("options.draco",i),C.typeOf.object("options.gltfResource",o),C.typeOf.object("options.baseResource",r),this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._gltf=n,this._draco=i,this._cacheKey=s,this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodePromise=void 0,this._decodedData=void 0,this._state=_t.UNLOADED,this._promise=void 0,this._dracoError=void 0}c(Object.create)&&(G_.prototype=Object.create(Gi.prototype),G_.prototype.constructor=G_);Object.defineProperties(G_.prototype,{cacheKey:{get:function(){return this._cacheKey}},decodedData:{get:function(){return this._decodedData}}});async function RNe(e){let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._draco.bufferView,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoader=n,await n.load(),e.isDestroyed()?void 0:(e._bufferViewTypedArray=n.typedArray,e._state=_t.PROCESSING,e)}catch(n){if(e.isDestroyed())return;hte(e,n)}}G_.prototype.load=async function(){return c(this._promise)?this._promise:(this._state=_t.LOADING,this._promise=RNe(this),this._promise)};function hte(e,t){throw e.unload(),e._state=_t.FAILED,e.getError("Failed to load Draco",t)}async function MNe(e,t){try{let n=await t;return e.isDestroyed()?void 0:(e.unload(),e._decodedData={indices:n.indexArray,vertexAttributes:n.attributeData},e._state=_t.READY,e._baseResource)}catch(n){if(e.isDestroyed())return;e._dracoError=n}}G_.prototype.process=function(e){if(C.typeOf.object("frameState",e),this._state===_t.READY)return!0;if(this._state!==_t.PROCESSING||(c(this._dracoError)&&hte(this,this._dracoError),!c(this._bufferViewTypedArray))||c(this._decodePromise))return!1;let t=this._draco,i=this._gltf.bufferViews,o=t.bufferView,r=i[o],s=t.attributes,a={array:new Uint8Array(this._bufferViewTypedArray),bufferView:r,compressedAttributes:s,dequantizeInShader:!0},l=H_.decodeBufferView(a);if(!c(l))return!1;this._decodePromise=MNe(this,l)};G_.prototype.unload=function(){c(this._bufferViewLoader)&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodedData=void 0,this._gltf=void 0};var cA=G_;function LNe(e){let t=e.uint8Array,n=e.format,i=e.request,o=g(e.flipY,!1),r=g(e.skipColorSpaceConversion,!1);C.typeOf.object("uint8Array",t),C.typeOf.string("format",n);let s=new Blob([t],{type:n}),a;return Te.supportsImageBitmapOptions().then(function(l){return l?Promise.resolve(Te.createImageBitmapFromBlob(s,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:r})):(a=window.URL.createObjectURL(s),new Te({url:a,request:i}).fetchImage({flipY:o,skipColorSpaceConversion:r}))}).then(function(l){return c(a)&&window.URL.revokeObjectURL(a),l}).catch(function(l){return c(a)&&window.URL.revokeObjectURL(a),Promise.reject(l)})}var PT=LNe;function Zm(e){e=g(e,g.EMPTY_OBJECT);let t=e.resourceCache,n=e.gltf,i=e.imageId,o=e.gltfResource,r=e.baseResource,s=e.cacheKey;C.typeOf.func("options.resourceCache",t),C.typeOf.object("options.gltf",n),C.typeOf.number("options.imageId",i),C.typeOf.object("options.gltfResource",o),C.typeOf.object("options.baseResource",r);let a=n.images[i],l=a.bufferView,u=a.uri;this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._gltf=n,this._bufferViewId=l,this._uri=u,this._cacheKey=s,this._bufferViewLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._state=_t.UNLOADED,this._promise=void 0}c(Object.create)&&(Zm.prototype=Object.create(Gi.prototype),Zm.prototype.constructor=Zm);Object.defineProperties(Zm.prototype,{cacheKey:{get:function(){return this._cacheKey}},image:{get:function(){return this._image}},mipLevels:{get:function(){return this._mipLevels}}});Zm.prototype.load=function(){return c(this._promise)?this._promise:c(this._bufferViewId)?(this._promise=NNe(this),this._promise):(this._promise=FNe(this),this._promise)};function mte(e){let t;return Array.isArray(e)&&(t=e.slice(1,e.length).map(function(n){return n.bufferView}),e=e[0]),{image:e,mipLevels:t}}async function NNe(e){e._state=_t.LOADING;let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._bufferViewId,gltfResource:e._gltfResource,baseResource:e._baseResource});if(e._bufferViewLoader=n,await n.load(),e.isDestroyed())return;let i=n.typedArray,o=await kNe(i);if(e.isDestroyed())return;let r=mte(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=_t.READY,e}catch(n){return e.isDestroyed()?void 0:pte(e,n,"Failed to load embedded image")}}async function FNe(e){e._state=_t.LOADING;let t=e._baseResource,n=e._uri,i=t.getDerivedResource({url:n});try{let o=await zNe(i);if(e.isDestroyed())return;let r=mte(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=_t.READY,e}catch(o){return e.isDestroyed()?void 0:pte(e,o,`Failed to load image: ${n}`)}}function pte(e,t,n){return e.unload(),e._state=_t.FAILED,Promise.reject(e.getError(n,t))}function BNe(e){let t=e.subarray(0,2),n=e.subarray(0,4),i=e.subarray(8,12);if(t[0]===255&&t[1]===216)return"image/jpeg";if(t[0]===137&&t[1]===80)return"image/png";if(t[0]===171&&t[1]===75)return"image/ktx2";if(n[0]===82&&n[1]===73&&n[2]===70&&n[3]===70&&i[0]===87&&i[1]===69&&i[2]===66&&i[3]===80)return"image/webp";throw new ie("Image format is not recognized")}async function kNe(e){let t=BNe(e);if(t==="image/ktx2"){let n=new Uint8Array(e);return vl(n)}return Zm._loadImageFromTypedArray({uint8Array:e,format:t,flipY:!1,skipColorSpaceConversion:!0})}var UNe=/(^data:image\/ktx2)|(\.ktx2$)/i;function zNe(e){let t=e.getUrlComponent(!1,!0);return UNe.test(t)?vl(e):e.fetchImage({skipColorSpaceConversion:!0,preferImageBitmap:!0})}Zm.prototype.unload=function(){c(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._uri=void 0,this._image=void 0,this._mipLevels=void 0,this._gltf=void 0};Zm._loadImageFromTypedArray=PT;var lA=Zm;var VNe={TEXTURE:0,PROGRAM:1,BUFFER:2,NUMBER_OF_JOB_TYPES:3},ca=Object.freeze(VNe);function j_(e){e=g(e,g.EMPTY_OBJECT);let t=e.resourceCache,n=e.gltf,i=e.accessorId,o=e.gltfResource,r=e.baseResource,s=e.draco,a=e.cacheKey,l=g(e.asynchronous,!0),u=g(e.loadBuffer,!1),f=g(e.loadTypedArray,!1);if(C.typeOf.func("options.resourceCache",t),C.typeOf.object("options.gltf",n),C.typeOf.number("options.accessorId",i),C.typeOf.object("options.gltfResource",o),C.typeOf.object("options.baseResource",r),!u&&!f)throw new w("At least one of loadBuffer and loadTypedArray must be true.");let h=n.accessors[i].componentType;this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._gltf=n,this._accessorId=i,this._indexDatatype=h,this._draco=s,this._cacheKey=a,this._asynchronous=l,this._loadBuffer=u,this._loadTypedArray=f,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=_t.UNLOADED,this._promise=void 0}c(Object.create)&&(j_.prototype=Object.create(Gi.prototype),j_.prototype.constructor=j_);Object.defineProperties(j_.prototype,{cacheKey:{get:function(){return this._cacheKey}},buffer:{get:function(){return this._buffer}},typedArray:{get:function(){return this._typedArray}},indexDatatype:{get:function(){return this._indexDatatype}}});var HNe=new Pj;j_.prototype.load=async function(){return c(this._promise)?this._promise:c(this._draco)?(this._promise=GNe(this),this._promise):(this._promise=jNe(this),this._promise)};async function GNe(e){e._state=_t.LOADING;let t=e._resourceCache;try{let n=t.getDracoLoader({gltf:e._gltf,draco:e._draco,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._dracoLoader=n,await n.load(),e.isDestroyed()?void 0:(e._state=_t.LOADED,e)}catch(n){if(e.isDestroyed())return;Oj(e,n)}}async function jNe(e){let t=e._gltf,n=e._accessorId,o=t.accessors[n].bufferView;e._state=_t.LOADING;let r=e._resourceCache;try{let s=r.getBufferViewLoader({gltf:t,bufferViewId:o,gltfResource:e._gltfResource,baseResource:e._baseResource});if(e._bufferViewLoader=s,await s.load(),e.isDestroyed())return;let a=s.typedArray;return e._typedArray=WNe(e,a),e._state=_t.PROCESSING,e}catch(s){if(e.isDestroyed())return;Oj(e,s)}}function WNe(e,t){let n=e._gltf,i=e._accessorId,o=n.accessors[i],r=o.count,s=o.componentType,a=Oe.getSizeInBytes(s),l=t.buffer,u=t.byteOffset+o.byteOffset;if(u%a!==0){let h=r*a,m=new Uint8Array(l,u,h);l=new Uint8Array(m).buffer,u=0,os("index-buffer-unaligned",`The index array is not aligned to a ${a}-byte boundary.`)}let f;return s===Oe.UNSIGNED_BYTE?f=new Uint8Array(l,u,r):s===Oe.UNSIGNED_SHORT?f=new Uint16Array(l,u,r):s===Oe.UNSIGNED_INT&&(f=new Uint32Array(l,u,r)),f}function Oj(e,t){throw e.unload(),e._state=_t.FAILED,e.getError("Failed to load index buffer",t)}function Pj(){this.typedArray=void 0,this.indexDatatype=void 0,this.context=void 0,this.buffer=void 0}Pj.prototype.set=function(e,t,n){this.typedArray=e,this.indexDatatype=t,this.context=n};Pj.prototype.execute=function(){this.buffer=_te(this.typedArray,this.indexDatatype,this.context)};function _te(e,t,n){let i=yt.createIndexBuffer({typedArray:e,context:n,usage:Pe.STATIC_DRAW,indexDatatype:t});return i.vertexArrayDestroyable=!1,i}j_.prototype.process=function(e){if(C.typeOf.object("frameState",e),this._state===_t.READY)return!0;if(this._state!==_t.LOADED&&this._state!==_t.PROCESSING)return!1;let t=this._typedArray,n=this._indexDatatype;if(c(this._dracoLoader))try{this._dracoLoader.process(e)&&(t=this._dracoLoader.decodedData.indices.typedArray,this._typedArray=t,n=j.fromTypedArray(t),this._indexDatatype=n)}catch(o){Oj(this,o)}if(!c(t))return!1;let i;if(this._loadBuffer&&this._asynchronous){let o=HNe;if(o.set(t,n,e.context),!e.jobScheduler.execute(o,ca.BUFFER))return!1;i=o.buffer}else this._loadBuffer&&(i=_te(t,n,e.context));return this.unload(),this._buffer=i,this._typedArray=this._loadTypedArray?t:void 0,this._state=_t.READY,this._resourceCache.statistics.addGeometryLoader(this),!0};j_.prototype.unload=function(){c(this._buffer)&&this._buffer.destroy();let e=this._resourceCache;c(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&e.unload(this._bufferViewLoader),c(this._dracoLoader)&&e.unload(this._dracoLoader),this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._gltf=void 0};var uA=j_;function qNe(e,t,n){if(n=g(n,!1),n){let i=e.indexOf(t);if(i>-1)return i}return e.push(t),e.length-1}var Es=qNe;function YNe(e,t){return c(e.extensionsUsed)&&e.extensionsUsed.indexOf(t)>=0}var lr=YNe;function qt(){}qt.objectLegacy=function(e,t){if(c(e)){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let i=e[n],o=t(i,n);if(c(o))return o}}};qt.object=function(e,t){if(c(e)){let n=e.length;for(let i=0;i<n;i++){let o=e[i],r=t(o,i);if(c(r))return r}}};qt.topLevel=function(e,t,n){let i=e[t];return c(i)&&!Array.isArray(i)?qt.objectLegacy(i,n):qt.object(i,n)};qt.accessor=function(e,t){return qt.topLevel(e,"accessors",t)};qt.accessorWithSemantic=function(e,t,n){let i={};return qt.mesh(e,function(o){return qt.meshPrimitive(o,function(r){let s=qt.meshPrimitiveAttribute(r,function(a,l){if(l.indexOf(t)===0&&!c(i[a])){i[a]=!0;let u=n(a);if(c(u))return u}});return c(s)?s:qt.meshPrimitiveTarget(r,function(a){return qt.meshPrimitiveTargetAttribute(a,function(l,u){if(u.indexOf(t)===0&&!c(i[l])){i[l]=!0;let f=n(l);if(c(f))return f}})})})})};qt.accessorContainingVertexAttributeData=function(e,t){let n={};return qt.mesh(e,function(i){return qt.meshPrimitive(i,function(o){let r=qt.meshPrimitiveAttribute(o,function(s){if(!c(n[s])){n[s]=!0;let a=t(s);if(c(a))return a}});return c(r)?r:qt.meshPrimitiveTarget(o,function(s){return qt.meshPrimitiveTargetAttribute(s,function(a){if(!c(n[a])){n[a]=!0;let l=t(a);if(c(l))return l}})})})})};qt.accessorContainingIndexData=function(e,t){let n={};return qt.mesh(e,function(i){return qt.meshPrimitive(i,function(o){let r=o.indices;if(c(r)&&!c(n[r])){n[r]=!0;let s=t(r);if(c(s))return s}})})};qt.animation=function(e,t){return qt.topLevel(e,"animations",t)};qt.animationChannel=function(e,t){let n=e.channels;return qt.object(n,t)};qt.animationSampler=function(e,t){let n=e.samplers;return qt.object(n,t)};qt.buffer=function(e,t){return qt.topLevel(e,"buffers",t)};qt.bufferView=function(e,t){return qt.topLevel(e,"bufferViews",t)};qt.camera=function(e,t){return qt.topLevel(e,"cameras",t)};qt.image=function(e,t){return qt.topLevel(e,"images",t)};qt.material=function(e,t){return qt.topLevel(e,"materials",t)};qt.materialValue=function(e,t){let n=e.values;c(e.extensions)&&c(e.extensions.KHR_techniques_webgl)&&(n=e.extensions.KHR_techniques_webgl.values);for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let o=t(n[i],i);if(c(o))return o}};qt.mesh=function(e,t){return qt.topLevel(e,"meshes",t)};qt.meshPrimitive=function(e,t){let n=e.primitives;if(c(n)){let i=n.length;for(let o=0;o<i;o++){let r=n[o],s=t(r,o);if(c(s))return s}}};qt.meshPrimitiveAttribute=function(e,t){let n=e.attributes;for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let o=t(n[i],i);if(c(o))return o}};qt.meshPrimitiveTarget=function(e,t){let n=e.targets;if(c(n)){let i=n.length;for(let o=0;o<i;++o){let r=t(n[o],o);if(c(r))return r}}};qt.meshPrimitiveTargetAttribute=function(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let i=e[n],o=t(i,n);if(c(o))return o}};qt.node=function(e,t){return qt.topLevel(e,"nodes",t)};qt.nodeInTree=function(e,t,n){let i=e.nodes;if(c(i)){let o=t.length;for(let r=0;r<o;r++){let s=t[r],a=i[s];if(c(a)){let l=n(a,s);if(c(l))return l;let u=a.children;if(c(u)&&(l=qt.nodeInTree(e,u,n),c(l)))return l}}}};qt.nodeInScene=function(e,t,n){let i=t.nodes;if(c(i))return qt.nodeInTree(e,i,n)};qt.program=function(e,t){return lr(e,"KHR_techniques_webgl")?qt.object(e.extensions.KHR_techniques_webgl.programs,t):qt.topLevel(e,"programs",t)};qt.sampler=function(e,t){return qt.topLevel(e,"samplers",t)};qt.scene=function(e,t){return qt.topLevel(e,"scenes",t)};qt.shader=function(e,t){return lr(e,"KHR_techniques_webgl")?qt.object(e.extensions.KHR_techniques_webgl.shaders,t):qt.topLevel(e,"shaders",t)};qt.skin=function(e,t){return qt.topLevel(e,"skins",t)};qt.skinJoint=function(e,t){let n=e.joints;if(c(n)){let i=n.length;for(let o=0;o<i;o++){let r=n[o],s=t(r);if(c(s))return s}}};qt.techniqueAttribute=function(e,t){let n=e.attributes;for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let o=t(n[i],i);if(c(o))return o}};qt.techniqueUniform=function(e,t){let n=e.uniforms;for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let o=t(n[i],i);if(c(o))return o}};qt.techniqueParameter=function(e,t){let n=e.parameters;for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let o=t(n[i],i);if(c(o))return o}};qt.technique=function(e,t){return lr(e,"KHR_techniques_webgl")?qt.object(e.extensions.KHR_techniques_webgl.techniques,t):qt.topLevel(e,"techniques",t)};qt.texture=function(e,t){return qt.topLevel(e,"textures",t)};var Ee=qt;function XNe(e){switch(e){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}}var Gu=XNe;function KNe(e,t){let n=t.bufferView;if(c(n)){let i=e.bufferViews[n];if(c(i.byteStride)&&i.byteStride>0)return i.byteStride}return j.getSizeInBytes(t.componentType)*Gu(t.type)}var Ul=KNe;function $Ne(e){Ee.accessor(e,function(n){c(n.bufferView)&&(n.byteOffset=g(n.byteOffset,0))}),Ee.bufferView(e,function(n){c(n.buffer)&&(n.byteOffset=g(n.byteOffset,0))}),Ee.mesh(e,function(n){Ee.meshPrimitive(n,function(i){if(i.mode=g(i.mode,Y.TRIANGLES),!c(i.material)){c(e.materials)||(e.materials=[]);let o={name:"default"};i.material=Es(e.materials,o)}})}),Ee.accessorContainingVertexAttributeData(e,function(n){let i=e.accessors[n],o=i.bufferView;if(i.normalized=g(i.normalized,!1),c(o)){let r=e.bufferViews[o];r.byteStride=Ul(e,i),r.target=Y.ARRAY_BUFFER}}),Ee.accessorContainingIndexData(e,function(n){let o=e.accessors[n].bufferView;if(c(o)){let r=e.bufferViews[o];r.target=Y.ELEMENT_ARRAY_BUFFER}}),Ee.material(e,function(n){let i=g(n.extensions,g.EMPTY_OBJECT),o=i.KHR_materials_common;if(c(o)){let l=o.technique,u=c(o.values)?o.values:{};o.values=u,u.ambient=c(u.ambient)?u.ambient:[0,0,0,1],u.emission=c(u.emission)?u.emission:[0,0,0,1],u.transparency=g(u.transparency,1),l!=="CONSTANT"&&(u.diffuse=c(u.diffuse)?u.diffuse:[0,0,0,1],l!=="LAMBERT"&&(u.specular=c(u.specular)?u.specular:[0,0,0,1],u.shininess=g(u.shininess,0))),o.transparent=g(o.transparent,!1),o.doubleSided=g(o.doubleSided,!1);return}n.emissiveFactor=g(n.emissiveFactor,[0,0,0]),n.alphaMode=g(n.alphaMode,"OPAQUE"),n.doubleSided=g(n.doubleSided,!1),n.alphaMode==="MASK"&&(n.alphaCutoff=g(n.alphaCutoff,.5));let r=i.KHR_techniques_webgl;c(r)&&Ee.materialValue(n,function(l){c(l.index)&&Sb(l)}),Sb(n.emissiveTexture),Sb(n.normalTexture),Sb(n.occlusionTexture);let s=n.pbrMetallicRoughness;c(s)&&(s.baseColorFactor=g(s.baseColorFactor,[1,1,1,1]),s.metallicFactor=g(s.metallicFactor,1),s.roughnessFactor=g(s.roughnessFactor,1),Sb(s.baseColorTexture),Sb(s.metallicRoughnessTexture));let a=i.KHR_materials_pbrSpecularGlossiness;c(a)&&(a.diffuseFactor=g(a.diffuseFactor,[1,1,1,1]),a.specularFactor=g(a.specularFactor,[1,1,1]),a.glossinessFactor=g(a.glossinessFactor,1),Sb(a.specularGlossinessTexture))}),Ee.animation(e,function(n){Ee.animationSampler(n,function(i){i.interpolation=g(i.interpolation,"LINEAR")})});let t=ZNe(e);return Ee.node(e,function(n,i){c(t[i])||c(n.translation)||c(n.rotation)||c(n.scale)?(n.translation=g(n.translation,[0,0,0]),n.rotation=g(n.rotation,[0,0,0,1]),n.scale=g(n.scale,[1,1,1])):n.matrix=g(n.matrix,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}),Ee.sampler(e,function(n){n.wrapS=g(n.wrapS,Y.REPEAT),n.wrapT=g(n.wrapT,Y.REPEAT)}),c(e.scenes)&&!c(e.scene)&&(e.scene=0),e}function ZNe(e){let t={};return Ee.animation(e,function(n){Ee.animationChannel(n,function(i){let o=i.target,r=o.node,s=o.path;(s==="translation"||s==="rotation"||s==="scale")&&(t[r]=!0)})}),t}function Sb(e){c(e)&&(e.texCoord=g(e.texCoord,0))}var EL=$Ne;function JNe(e){return Ee.shader(e,function(t){wL(t)}),Ee.buffer(e,function(t){wL(t)}),Ee.image(e,function(t){wL(t)}),wL(e),e}function wL(e){e.extras=c(e.extras)?e.extras:{},e.extras._pipeline=c(e.extras._pipeline)?e.extras._pipeline:{}}var Ab=JNe;function QNe(e,t){let n=e.extensionsRequired;if(c(n)){let i=n.indexOf(t);i>=0&&n.splice(i,1),n.length===0&&delete e.extensionsRequired}}var SL=QNe;function eFe(e,t){let n=e.extensionsUsed;if(c(n)){let i=n.indexOf(t);i>=0&&n.splice(i,1),SL(e,t),n.length===0&&delete e.extensionsUsed}}var RT=eFe;var tFe=4;function nFe(e){if(_h(e)!=="glTF")throw new ie("File is not valid binary glTF");let n=gte(e,0,5),i=n[1];if(i!==1&&i!==2)throw new ie("Binary glTF version is not 1 or 2");return i===1?iFe(e,n):oFe(e,n)}function gte(e,t,n){let i=new DataView(e.buffer),o=new Array(n);for(let r=0;r<n;++r)o[r]=i.getUint32(e.byteOffset+t+r*tFe,!0);return o}function iFe(e,t){let n=t[2],i=t[3];if(t[4]!==0)throw new ie("Binary glTF scene format is not JSON");let r=20,s=r+i,a=Fl(e,r,i),l=JSON.parse(a);Ab(l);let u=e.subarray(s,n),f=l.buffers;if(c(f)&&Object.keys(f).length>0){let h=g(f.binary_glTF,f.KHR_binary_glTF);c(h)&&(h.extras._pipeline.source=u,delete h.uri)}return RT(l,"KHR_binary_glTF"),l}function oFe(e,t){let n=t[2],i=12,o,r;for(;i<n;){let s=gte(e,i,2),a=s[0],l=s[1];i+=8;let u=e.subarray(i,i+a);if(i+=a,l===1313821514){let f=Fl(u);o=JSON.parse(f),Ab(o)}else l===5130562&&(r=u)}if(c(o)&&c(r)){let s=o.buffers;if(c(s)&&s.length>0){let a=s[0];a.extras._pipeline.source=r}}return o}var AL=nFe;function rFe(e){return Ee.shader(e,function(t){vL(t)}),Ee.buffer(e,function(t){vL(t)}),Ee.image(e,function(t){vL(t)}),vL(e),e}function vL(e){c(e.extras)&&(c(e.extras._pipeline)&&delete e.extras._pipeline,Object.keys(e.extras).length===0&&delete e.extras)}var DL=rFe;function sFe(e,t){let n=e.extensionsUsed;c(n)||(n=[],e.extensionsUsed=n),Es(n,t,!0)}var Yf=sFe;function aFe(e){switch(e){case j.BYTE:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getInt8(n+s*o)};case j.UNSIGNED_BYTE:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getUint8(n+s*o)};case j.SHORT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getInt16(n+s*o,!0)};case j.UNSIGNED_SHORT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getUint16(n+s*o,!0)};case j.INT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getInt32(n+s*o,!0)};case j.UNSIGNED_INT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getUint32(n+s*o,!0)};case j.FLOAT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getFloat32(n+s*o,!0)};case j.DOUBLE:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getFloat64(n+s*o,!0)}}}var W_=aFe;function cFe(e,t){let n=e.bufferViews,i=e.buffers,o=t.bufferView,r=Gu(t.type);if(!c(t.bufferView))return{min:new Array(r).fill(0),max:new Array(r).fill(0)};let s=new Array(r).fill(Number.POSITIVE_INFINITY),a=new Array(r).fill(Number.NEGATIVE_INFINITY),l=n[o],u=l.buffer,h=i[u].extras._pipeline.source,m=t.count,p=Ul(e,t),_=t.byteOffset+l.byteOffset+h.byteOffset,b=t.componentType,x=j.getSizeInBytes(b),T=new DataView(h.buffer),E=new Array(r),S=W_(b);for(let A=0;A<m;A++){S(T,_,r,x,E);for(let v=0;v<r;v++){let D=E[v];s[v]=Math.min(s[v],D),a[v]=Math.max(a[v],D)}_+=p}return{min:s,max:a}}var MT=cFe;var lFe=[Y.FUNC_ADD,Y.FUNC_ADD],uFe=[Y.ONE,Y.ZERO,Y.ONE,Y.ZERO];function yte(e,t){let n=e.enable;return c(n)?n.indexOf(t)>-1:!1}var fFe=[Y.ZERO,Y.ONE,Y.SRC_COLOR,Y.ONE_MINUS_SRC_COLOR,Y.SRC_ALPHA,Y.ONE_MINUS_SRC_ALPHA,Y.DST_ALPHA,Y.ONE_MINUS_DST_ALPHA,Y.DST_COLOR,Y.ONE_MINUS_DST_COLOR];function dFe(e,t){if(!c(e))return t;for(let n=0;n<4;n++)if(fFe.indexOf(e[n])===-1)return t;return e}function hFe(e){let t={},n={},i=e.techniques;return c(i)&&(Ee.technique(e,function(o,r){let s=o.states;if(c(s)){let a=n[r]={};if(yte(s,Y.BLEND)){a.alphaMode="BLEND";let l=s.functions;c(l)&&(c(l.blendEquationSeparate)||c(l.blendFuncSeparate))&&(t[r]={blendEquation:g(l.blendEquationSeparate,lFe),blendFactors:dFe(l.blendFuncSeparate,uFe)})}yte(s,Y.CULL_FACE)||(a.doubleSided=!0),delete o.states}}),Object.keys(t).length>0&&(c(e.extensions)||(e.extensions={}),Yf(e,"KHR_blend")),Ee.material(e,function(o){if(c(o.technique)){let r=n[o.technique];Ee.objectLegacy(r,function(a,l){o[l]=a});let s=t[o.technique];c(s)&&(c(o.extensions)||(o.extensions={}),o.extensions.KHR_blend=s)}})),e}var IL=hFe;function mFe(e,t){let n=e.extensionsRequired;c(n)||(n=[],e.extensionsRequired=n),Es(n,t,!0),Yf(e,t)}var OL=mFe;function pFe(e){let t=e.techniques,n={},i={},o={};if(c(t)){let r={programs:[],shaders:[],techniques:[]},s=e.glExtensionsUsed;delete e.glExtensionsUsed,Ee.technique(e,function(a,l){let u={name:a.name,program:void 0,attributes:{},uniforms:{}},f;if(Ee.techniqueAttribute(a,function(h,m){f=a.parameters[h],u.attributes[m]={semantic:f.semantic}}),Ee.techniqueUniform(a,function(h,m){f=a.parameters[h],u.uniforms[m]={count:f.count,node:f.node,type:f.type,semantic:f.semantic,value:f.value},c(n[l])||(n[l]={}),n[l][h]=m}),c(o[a.program]))u.program=o[a.program];else{let h=e.programs[a.program],m={name:h.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:s},p=e.shaders[h.fragmentShader];m.fragmentShader=Es(r.shaders,p,!0);let _=e.shaders[h.vertexShader];m.vertexShader=Es(r.shaders,_,!0),u.program=Es(r.programs,m),o[a.program]=u.program}i[l]=Es(r.techniques,u)}),r.techniques.length>0&&(c(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=r,Yf(e,"KHR_techniques_webgl"),OL(e,"KHR_techniques_webgl"))}return Ee.material(e,function(r){if(c(r.technique)){let s={technique:i[r.technique]};Ee.objectLegacy(r.values,function(a,l){c(s.values)||(s.values={});let u=n[r.technique][l];c(u)&&(s.values[u]=a)}),c(r.extensions)||(r.extensions={}),r.extensions.KHR_techniques_webgl=s}delete r.technique,delete r.values}),delete e.techniques,delete e.programs,delete e.shaders,e}var PL=pFe;function _Fe(e,t){C.typeOf.object("material",e),C.defined("handler",t);let n=e.pbrMetallicRoughness;if(c(n)){if(c(n.baseColorTexture)){let r=n.baseColorTexture,s=t(r.index,r);if(c(s))return s}if(c(n.metallicRoughnessTexture)){let r=n.metallicRoughnessTexture,s=t(r.index,r);if(c(s))return s}}let{extensions:i}=e;if(c(i)){let r=i.KHR_materials_pbrSpecularGlossiness;if(c(r)){if(c(r.diffuseTexture)){let l=r.diffuseTexture,u=t(l.index,l);if(c(u))return u}if(c(r.specularGlossinessTexture)){let l=r.specularGlossinessTexture,u=t(l.index,l);if(c(u))return u}}let s=i.KHR_materials_specular;if(c(s)){let{specularTexture:l,specularColorTexture:u}=s;if(c(l)){let f=t(l.index,l);if(c(f))return f}if(c(u)){let f=t(u.index,u);if(c(f))return f}}let a=i.KHR_materials_common;if(c(a)&&c(a.values)){let{diffuse:l,ambient:u,emission:f,specular:h}=a.values;if(c(l)&&c(l.index)){let m=t(l.index,l);if(c(m))return m}if(c(u)&&c(u.index)){let m=t(u.index,u);if(c(m))return m}if(c(f)&&c(f.index)){let m=t(f.index,f);if(c(m))return m}if(c(h)&&c(h.index)){let m=t(h.index,h);if(c(m))return m}}}let o=Ee.materialValue(e,function(r){if(c(r.index)){let s=t(r.index,r);if(c(s))return s}});if(c(o))return o;if(c(e.emissiveTexture)){let r=e.emissiveTexture,s=t(r.index,r);if(c(s))return s}if(c(e.normalTexture)){let r=e.normalTexture,s=t(r.index,r);if(c(s))return s}if(c(e.occlusionTexture)){let r=e.occlusionTexture,s=t(r.index,r);if(c(s))return s}}var fA=_Fe;var bte=["mesh","node","material","accessor","bufferView","buffer","texture","sampler","image"];function gFe(e,t){return t=g(t,bte),bte.forEach(function(n){t.indexOf(n)>-1&&bFe(e,n)}),e}var yFe={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",image:"images",node:"nodes",material:"materials",mesh:"meshes",sampler:"samplers",texture:"textures"};function bFe(e,t){let n=yFe[t],i=e[n];if(c(i)){let o=0,r=bh[t](e),s=i.length;for(let a=0;a<s;++a)r[a]||(yh[t](e,a-o),o++)}}function yh(){}yh.accessor=function(e,t){e.accessors.splice(t,1),Ee.mesh(e,function(i){Ee.meshPrimitive(i,function(o){Ee.meshPrimitiveAttribute(o,function(a,l){a>t&&o.attributes[l]--}),Ee.meshPrimitiveTarget(o,function(a){Ee.meshPrimitiveTargetAttribute(a,function(l,u){l>t&&a[u]--})});let r=o.indices;c(r)&&r>t&&o.indices--;let s=o.extensions;c(s)&&c(s.CESIUM_primitive_outline)&&s.CESIUM_primitive_outline.indices>t&&--s.CESIUM_primitive_outline.indices})}),Ee.skin(e,function(i){c(i.inverseBindMatrices)&&i.inverseBindMatrices>t&&i.inverseBindMatrices--}),Ee.animation(e,function(i){Ee.animationSampler(i,function(o){c(o.input)&&o.input>t&&o.input--,c(o.output)&&o.output>t&&o.output--})})};yh.buffer=function(e,t){e.buffers.splice(t,1),Ee.bufferView(e,function(i){c(i.buffer)&&i.buffer>t&&i.buffer--,c(i.extensions)&&c(i.extensions.EXT_meshopt_compression)&&i.extensions.EXT_meshopt_compression.buffer--})};yh.bufferView=function(e,t){if(e.bufferViews.splice(t,1),Ee.accessor(e,function(i){c(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Ee.shader(e,function(i){c(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Ee.image(e,function(i){c(i.bufferView)&&i.bufferView>t&&i.bufferView--}),lr(e,"KHR_draco_mesh_compression")&&Ee.mesh(e,function(i){Ee.meshPrimitive(i,function(o){c(o.extensions)&&c(o.extensions.KHR_draco_mesh_compression)&&o.extensions.KHR_draco_mesh_compression.bufferView>t&&o.extensions.KHR_draco_mesh_compression.bufferView--})}),lr(e,"EXT_feature_metadata")){let o=e.extensions.EXT_feature_metadata.featureTables;for(let r in o)if(o.hasOwnProperty(r)){let a=o[r].properties;if(c(a)){for(let l in a)if(a.hasOwnProperty(l)){let u=a[l];c(u.bufferView)&&u.bufferView>t&&u.bufferView--,c(u.arrayOffsetBufferView)&&u.arrayOffsetBufferView>t&&u.arrayOffsetBufferView--,c(u.stringOffsetBufferView)&&u.stringOffsetBufferView>t&&u.stringOffsetBufferView--}}}}if(lr(e,"EXT_structural_metadata")){let o=e.extensions.EXT_structural_metadata.propertyTables;if(c(o)){let r=o.length;for(let s=0;s<r;++s){let l=o[s].properties;for(let u in l)if(l.hasOwnProperty(u)){let f=l[u];c(f.values)&&f.values>t&&f.values--,c(f.arrayOffsets)&&f.arrayOffsets>t&&f.arrayOffsets--,c(f.stringOffsets)&&f.stringOffsets>t&&f.stringOffsets--}}}}};yh.image=function(e,t){e.images.splice(t,1),Ee.texture(e,function(i){c(i.source)&&i.source>t&&--i.source;let o=i.extensions;c(o)&&c(o.EXT_texture_webp)&&o.EXT_texture_webp.source>t?--i.extensions.EXT_texture_webp.source:c(o)&&c(o.KHR_texture_basisu)&&o.KHR_texture_basisu.source>t&&--i.extensions.KHR_texture_basisu.source})};yh.mesh=function(e,t){e.meshes.splice(t,1),Ee.node(e,function(i){c(i.mesh)&&(i.mesh>t?i.mesh--:i.mesh===t&&delete i.mesh)})};yh.node=function(e,t){e.nodes.splice(t,1),Ee.skin(e,function(i){c(i.skeleton)&&i.skeleton>t&&i.skeleton--,i.joints=i.joints.map(function(o){return o>t?o-1:o})}),Ee.animation(e,function(i){Ee.animationChannel(i,function(o){c(o.target)&&c(o.target.node)&&o.target.node>t&&o.target.node--})}),Ee.technique(e,function(i){Ee.techniqueUniform(i,function(o){c(o.node)&&o.node>t&&o.node--})}),Ee.node(e,function(i){c(i.children)&&(i.children=i.children.filter(function(o){return o!==t}).map(function(o){return o>t?o-1:o}))}),Ee.scene(e,function(i){i.nodes=i.nodes.filter(function(o){return o!==t}).map(function(o){return o>t?o-1:o})})};yh.material=function(e,t){e.materials.splice(t,1),Ee.mesh(e,function(i){Ee.meshPrimitive(i,function(o){c(o.material)&&o.material>t&&o.material--})})};yh.sampler=function(e,t){e.samplers.splice(t,1),Ee.texture(e,function(i){c(i.sampler)&&i.sampler>t&&--i.sampler})};yh.texture=function(e,t){if(e.textures.splice(t,1),Ee.material(e,function(i){fA(i,function(o,r){r.index>t&&--r.index})}),lr(e,"EXT_feature_metadata")){Ee.mesh(e,function(r){Ee.meshPrimitive(r,function(s){let a=s.extensions;if(c(a)&&c(a.EXT_feature_metadata)){let u=a.EXT_feature_metadata.featureIdTextures;if(c(u)){let f=u.length;for(let h=0;h<f;++h){let p=u[h].featureIds.texture;p.index>t&&--p.index}}}})});let o=e.extensions.EXT_feature_metadata.featureTextures;for(let r in o)if(o.hasOwnProperty(r)){let a=o[r].properties;if(c(a)){for(let l in a)if(a.hasOwnProperty(l)){let f=a[l].texture;f.index>t&&--f.index}}}}if(lr(e,"EXT_mesh_features")&&Ee.mesh(e,function(i){Ee.meshPrimitive(i,function(o){let r=o.extensions;if(c(r)&&c(r.EXT_mesh_features)){let a=r.EXT_mesh_features.featureIds;if(c(a)){let l=a.length;for(let u=0;u<l;++u){let f=a[u];c(f.texture)&&f.texture.index>t&&--f.texture.index}}}})}),lr(e,"EXT_structural_metadata")){let o=e.extensions.EXT_structural_metadata.propertyTextures;if(c(o)){let r=o.length;for(let s=0;s<r;++s){let l=o[s].properties;for(let u in l)if(l.hasOwnProperty(u)){let f=l[u];f.index>t&&--f.index}}}}};function bh(){}bh.accessor=function(e){let t={};return Ee.mesh(e,function(n){Ee.meshPrimitive(n,function(i){Ee.meshPrimitiveAttribute(i,function(r){t[r]=!0}),Ee.meshPrimitiveTarget(i,function(r){Ee.meshPrimitiveTargetAttribute(r,function(s){t[s]=!0})});let o=i.indices;c(o)&&(t[o]=!0)})}),Ee.skin(e,function(n){c(n.inverseBindMatrices)&&(t[n.inverseBindMatrices]=!0)}),Ee.animation(e,function(n){Ee.animationSampler(n,function(i){c(i.input)&&(t[i.input]=!0),c(i.output)&&(t[i.output]=!0)})}),lr(e,"EXT_mesh_gpu_instancing")&&Ee.node(e,function(n){c(n.extensions)&&c(n.extensions.EXT_mesh_gpu_instancing)&&Object.keys(n.extensions.EXT_mesh_gpu_instancing.attributes).forEach(function(i){let o=n.extensions.EXT_mesh_gpu_instancing.attributes[i];t[o]=!0})}),lr(e,"CESIUM_primitive_outline")&&Ee.mesh(e,function(n){Ee.meshPrimitive(n,function(i){let o=i.extensions;if(c(o)&&c(o.CESIUM_primitive_outline)){let s=o.CESIUM_primitive_outline.indices;c(s)&&(t[s]=!0)}})}),t};bh.buffer=function(e){let t={};return Ee.bufferView(e,function(n){c(n.buffer)&&(t[n.buffer]=!0),c(n.extensions)&&c(n.extensions.EXT_meshopt_compression)&&(t[n.extensions.EXT_meshopt_compression.buffer]=!0)}),t};bh.bufferView=function(e){let t={};if(Ee.accessor(e,function(n){c(n.bufferView)&&(t[n.bufferView]=!0)}),Ee.shader(e,function(n){c(n.bufferView)&&(t[n.bufferView]=!0)}),Ee.image(e,function(n){c(n.bufferView)&&(t[n.bufferView]=!0)}),lr(e,"KHR_draco_mesh_compression")&&Ee.mesh(e,function(n){Ee.meshPrimitive(n,function(i){c(i.extensions)&&c(i.extensions.KHR_draco_mesh_compression)&&(t[i.extensions.KHR_draco_mesh_compression.bufferView]=!0)})}),lr(e,"EXT_feature_metadata")){let i=e.extensions.EXT_feature_metadata.featureTables;for(let o in i)if(i.hasOwnProperty(o)){let s=i[o].properties;if(c(s)){for(let a in s)if(s.hasOwnProperty(a)){let l=s[a];c(l.bufferView)&&(t[l.bufferView]=!0),c(l.arrayOffsetBufferView)&&(t[l.arrayOffsetBufferView]=!0),c(l.stringOffsetBufferView)&&(t[l.stringOffsetBufferView]=!0)}}}}if(lr(e,"EXT_structural_metadata")){let i=e.extensions.EXT_structural_metadata.propertyTables;if(c(i)){let o=i.length;for(let r=0;r<o;++r){let a=i[r].properties;for(let l in a)if(a.hasOwnProperty(l)){let u=a[l];c(u.values)&&(t[u.values]=!0),c(u.arrayOffsets)&&(t[u.arrayOffsets]=!0),c(u.stringOffsets)&&(t[u.stringOffsets]=!0)}}}}return t};bh.image=function(e){let t={};return Ee.texture(e,function(n){c(n.source)&&(t[n.source]=!0),c(n.extensions)&&c(n.extensions.EXT_texture_webp)?t[n.extensions.EXT_texture_webp.source]=!0:c(n.extensions)&&c(n.extensions.KHR_texture_basisu)&&(t[n.extensions.KHR_texture_basisu.source]=!0)}),t};bh.mesh=function(e){let t={};return Ee.node(e,function(n){if(c(n.mesh&&c(e.meshes))){let i=e.meshes[n.mesh];c(i)&&c(i.primitives)&&i.primitives.length>0&&(t[n.mesh]=!0)}}),t};function xte(e,t,n){let i=e.nodes[t];return c(i.mesh)||c(i.camera)||c(i.skin)||c(i.weights)||c(i.extras)||c(i.extensions)&&Object.keys(i.extensions).length!==0||c(n[t])?!1:!c(i.children)||i.children.filter(function(o){return!xte(e,o,n)}).length===0}bh.node=function(e){let t={};return Ee.skin(e,function(n){c(n.skeleton)&&(t[n.skeleton]=!0),Ee.skinJoint(n,function(i){t[i]=!0})}),Ee.animation(e,function(n){Ee.animationChannel(n,function(i){c(i.target)&&c(i.target.node)&&(t[i.target.node]=!0)})}),Ee.technique(e,function(n){Ee.techniqueUniform(n,function(i){c(i.node)&&(t[i.node]=!0)})}),Ee.node(e,function(n,i){xte(e,i,t)||(t[i]=!0)}),t};bh.material=function(e){let t={};return Ee.mesh(e,function(n){Ee.meshPrimitive(n,function(i){c(i.material)&&(t[i.material]=!0)})}),t};bh.texture=function(e){let t={};if(Ee.material(e,function(n){fA(n,function(i){t[i]=!0})}),lr(e,"EXT_feature_metadata")){Ee.mesh(e,function(o){Ee.meshPrimitive(o,function(r){let s=r.extensions;if(c(s)&&c(s.EXT_feature_metadata)){let l=s.EXT_feature_metadata.featureIdTextures;if(c(l)){let u=l.length;for(let f=0;f<u;++f){let m=l[f].featureIds.texture;t[m.index]=!0}}}})});let i=e.extensions.EXT_feature_metadata.featureTextures;for(let o in i)if(i.hasOwnProperty(o)){let s=i[o].properties;if(c(s)){for(let a in s)if(s.hasOwnProperty(a)){let u=s[a].texture;t[u.index]=!0}}}}if(lr(e,"EXT_mesh_features")&&Ee.mesh(e,function(n){Ee.meshPrimitive(n,function(i){let o=i.extensions;if(c(o)&&c(o.EXT_mesh_features)){let s=o.EXT_mesh_features.featureIds;if(c(s)){let a=s.length;for(let l=0;l<a;++l){let u=s[l];c(u.texture)&&(t[u.texture.index]=!0)}}}})}),lr(e,"EXT_structural_metadata")){let i=e.extensions.EXT_structural_metadata.propertyTextures;if(c(i)){let o=i.length;for(let r=0;r<o;++r){let a=i[r].properties;for(let l in a)if(a.hasOwnProperty(l)){let u=a[l];t[u.index]=!0}}}}return t};bh.sampler=function(e){let t={};return Ee.texture(e,function(n){c(n.sampler)&&(t[n.sampler]=!0)}),t};var RL=gFe;function xFe(e,t){let n={byteLength:t.length,extras:{_pipeline:{source:t}}},o={buffer:Es(e.buffers,n),byteOffset:0,byteLength:t.length};return Es(e.bufferViews,o)}var ML=xFe;function TFe(e,t){let n=Ul(e,t),i=j.getSizeInBytes(t.componentType),o=Gu(t.type),r=t.count,s=new Array(o*r);if(!c(t.bufferView))return s.fill(0);let a=e.bufferViews[t.bufferView],l=e.buffers[a.buffer].extras._pipeline.source,u=t.byteOffset+a.byteOffset+l.byteOffset,f=new DataView(l.buffer),h=new Array(o),m=W_(t.componentType);for(let p=0;p<r;++p){m(f,u,o,i,h);for(let _=0;_<o;++_)s[p*o+_]=h[_];u+=n}return s}var LL=TFe;function CFe(e){let t;return Ee.accessorWithSemantic(e,"JOINTS_0",function(n){let i=e.accessors[n];t=i.componentType,t===Y.BYTE?NL(e,i,j.UNSIGNED_BYTE):t!==Y.UNSIGNED_BYTE&&t!==Y.UNSIGNED_SHORT&&NL(e,i,j.UNSIGNED_SHORT)}),Ee.accessorWithSemantic(e,"WEIGHTS_0",function(n){let i=e.accessors[n];t=i.componentType,t===Y.BYTE?NL(e,i,j.UNSIGNED_BYTE):t===Y.SHORT&&NL(e,i,j.UNSIGNED_SHORT)}),e}function NL(e,t,n){let i=j.createTypedArray(n,LL(e,t)),o=new Uint8Array(i.buffer);t.bufferView=ML(e,o),t.componentType=n,t.byteOffset=0}var FL=CFe;function EFe(e,t){return RT(e,t),t==="CESIUM_RTC"&&wFe(e),Rj(e,t)}function wFe(e){Ee.technique(e,function(t){Ee.techniqueUniform(t,function(n){n.semantic==="CESIUM_RTC_MODELVIEW"&&(n.semantic="MODELVIEW")})})}function Rj(e,t){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;++i)Rj(e[i],t)}else if(e!==null&&typeof e=="object"&&e.constructor===Object){let n=e.extensions,i;c(n)&&(i=n[t],c(i)&&(delete n[t],Object.keys(n).length===0&&delete e.extensions));for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&Rj(e[o],t);return i}}var LT=EFe;var BL={.8:OFe,"1.0":ZFe,"2.0":void 0};function SFe(e,t){t=g(t,g.EMPTY_OBJECT);let n=t.targetVersion,i=e.version;e.asset=g(e.asset,{version:"1.0"}),e.asset.version=g(e.asset.version,"1.0"),i=g(i,e.asset.version).toString(),Object.prototype.hasOwnProperty.call(BL,i)||(c(i)&&(i=i.substring(0,3)),Object.prototype.hasOwnProperty.call(BL,i)||(i="1.0"));let o=BL[i];for(;c(o)&&i!==n;)o(e,t),i=e.asset.version,o=BL[i];return t.keepLegacyExtensions||(e2e(e,t),t2e(e)),e}function Ete(e){let t=e.materials;for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let i=t[n],o=i.instanceTechnique;c(o)&&(i.technique=o.technique,i.values=o.values,delete i.instanceTechnique)}}function AFe(e){let t=e.meshes;for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let o=t[n].primitives;if(c(o)){let r=o.length;for(let s=0;s<r;++s){let a=o[s],l=g(a.primitive,Y.TRIANGLES);a.mode=g(a.mode,l),delete a.primitive}}}}function vFe(e){let t=e.nodes,n=new d,i=new ve;for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let r=t[o];if(c(r.rotation)){let a=r.rotation;d.fromArray(a,0,n),ve.fromAxisAngle(n,a[3],i),r.rotation=[i.x,i.y,i.z,i.w]}let s=r.instanceSkin;c(s)&&(r.skeletons=s.skeletons,r.skin=s.skin,r.meshes=s.meshes,delete r.instanceSkin)}}function DFe(e){let t=e.animations,n=e.accessors,i=e.bufferViews,o=e.buffers,r={},s=new d,a=new ve;for(let l in t)if(Object.prototype.hasOwnProperty.call(t,l)){let u=t[l],f=u.channels,h=u.parameters,m=u.samplers;if(c(f)){let p=f.length;for(let _=0;_<p;++_){let b=f[_];if(b.target.path==="rotation"){let x=h[m[b.sampler].output];if(c(r[x]))continue;r[x]=!0;let T=n[x],E=i[T.bufferView],A=o[E.buffer].extras._pipeline.source,v=A.byteOffset+E.byteOffset+T.byteOffset,D=T.componentType,R=T.count,P=Gu(T.type),L=T.count*P,F=j.createArrayBufferView(D,A.buffer,v,L);for(let y=0;y<R;y++){let I=y*P;d.unpack(F,I,s);let M=F[I+3];ve.fromAxisAngle(s,M,a),ve.pack(a,F,I)}}}}}}function IFe(e){let t=e.techniques;for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let i=t[n],o=i.passes;if(c(o)){let r=g(i.pass,"defaultPass");if(Object.prototype.hasOwnProperty.call(o,r)){let s=o[r],a=s.instanceProgram;i.attributes=g(i.attributes,a.attributes),i.program=g(i.program,a.program),i.uniforms=g(i.uniforms,a.uniforms),i.states=g(i.states,s.states)}delete i.passes,delete i.pass}}}function OFe(e){c(e.asset)||(e.asset={});let t=e.asset;if(t.version="1.0",typeof t.profile=="string"){let n=t.profile.split(" ");t.profile={api:n[0],version:n[1]}}else t.profile={};if(c(e.version)&&delete e.version,Ete(e),AFe(e),vFe(e),DFe(e),IFe(e),c(e.allExtensions)&&(e.extensionsUsed=e.allExtensions,delete e.allExtensions),c(e.lights)){let n=g(e.extensions,{});e.extensions=n;let i=g(n.KHR_materials_common,{});n.KHR_materials_common=i,i.lights=e.lights,delete e.lights,Yf(e,"KHR_materials_common")}}function PFe(e){let t=e.animations;for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let i=t[n],o=i.parameters;if(c(o)){let r=i.samplers;for(let s in r)if(Object.prototype.hasOwnProperty.call(r,s)){let a=r[s];a.input=o[a.input],a.output=o[a.output]}delete i.parameters}}}function Tte(e,t){let n=[];for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let o=e[i];t[i]=n.length,n.push(o),c(o.name)||(o.name=i)}return n}function RFe(e){let t,n={accessors:{},animations:{},buffers:{},bufferViews:{},cameras:{},images:{},materials:{},meshes:{},nodes:{},programs:{},samplers:{},scenes:{},shaders:{},skins:{},textures:{},techniques:{}},i,o={},r=e.nodes;for(let s in r)Object.prototype.hasOwnProperty.call(r,s)&&(i=r[s].jointName,c(i)&&(o[i]=s));for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&c(n[s])){let a={},l=e[s];e[s]=Tte(l,a),n[s]=a}for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&(o[i]=n.nodes[o[i]]);c(e.scene)&&(e.scene=n.scenes[e.scene]),Ee.bufferView(e,function(s){c(s.buffer)&&(s.buffer=n.buffers[s.buffer])}),Ee.accessor(e,function(s){c(s.bufferView)&&(s.bufferView=n.bufferViews[s.bufferView])}),Ee.shader(e,function(s){let a=s.extensions;if(c(a)){let l=a.KHR_binary_glTF;c(l)&&(s.bufferView=n.bufferViews[l.bufferView],delete a.KHR_binary_glTF),Object.keys(a).length===0&&delete s.extensions}}),Ee.program(e,function(s){c(s.vertexShader)&&(s.vertexShader=n.shaders[s.vertexShader]),c(s.fragmentShader)&&(s.fragmentShader=n.shaders[s.fragmentShader])}),Ee.technique(e,function(s){c(s.program)&&(s.program=n.programs[s.program]),Ee.techniqueParameter(s,function(a){c(a.node)&&(a.node=n.nodes[a.node]);let l=a.value;typeof l=="string"&&(a.value={index:n.textures[l]})})}),Ee.mesh(e,function(s){Ee.meshPrimitive(s,function(a){c(a.indices)&&(a.indices=n.accessors[a.indices]),Ee.meshPrimitiveAttribute(a,function(l,u){a.attributes[u]=n.accessors[l]}),c(a.material)&&(a.material=n.materials[a.material])})}),Ee.node(e,function(s){let a=s.children;if(c(a)){let l=a.length;for(t=0;t<l;++t)a[t]=n.nodes[a[t]]}if(c(s.meshes)){let l=s.meshes,u=l.length;if(u>0)for(s.mesh=n.meshes[l[0]],t=1;t<u;++t){let f={mesh:n.meshes[l[t]]},h=Es(e.nodes,f);c(a)||(a=[],s.children=a),a.push(h)}delete s.meshes}if(c(s.camera)&&(s.camera=n.cameras[s.camera]),c(s.skin)&&(s.skin=n.skins[s.skin]),c(s.skeletons)){let l=s.skeletons;if(l.length>0&&c(s.skin)){let f=e.skins[s.skin];f.skeleton=n.nodes[l[0]]}delete s.skeletons}c(s.jointName)&&delete s.jointName}),Ee.skin(e,function(s){c(s.inverseBindMatrices)&&(s.inverseBindMatrices=n.accessors[s.inverseBindMatrices]);let a=s.jointNames;if(c(a)){let l=[],u=a.length;for(t=0;t<u;++t)l[t]=o[a[t]];s.joints=l,delete s.jointNames}}),Ee.scene(e,function(s){let a=s.nodes;if(c(a)){let l=a.length;for(t=0;t<l;++t)a[t]=n.nodes[a[t]]}}),Ee.animation(e,function(s){let a={};s.samplers=Tte(s.samplers,a),Ee.animationSampler(s,function(l){l.input=n.accessors[l.input],l.output=n.accessors[l.output]}),Ee.animationChannel(s,function(l){l.sampler=a[l.sampler];let u=l.target;c(u)&&(u.node=n.nodes[u.id],delete u.id)})}),Ee.material(e,function(s){c(s.technique)&&(s.technique=n.techniques[s.technique]),Ee.materialValue(s,function(l,u){typeof l=="string"&&(s.values[u]={index:n.textures[l]})});let a=s.extensions;if(c(a)){let l=a.KHR_materials_common;c(l)&&c(l.values)&&Ee.materialValue(l,function(u,f){typeof u=="string"&&(l.values[f]={index:n.textures[u]})})}}),Ee.image(e,function(s){let a=s.extensions;if(c(a)){let l=a.KHR_binary_glTF;c(l)&&(s.bufferView=n.bufferViews[l.bufferView],s.mimeType=l.mimeType,delete a.KHR_binary_glTF),Object.keys(a).length===0&&delete s.extensions}}),Ee.texture(e,function(s){c(s.sampler)&&(s.sampler=n.samplers[s.sampler]),c(s.source)&&(s.source=n.images[s.source])})}function MFe(e){Ee.animation(e,function(t){Ee.animationSampler(t,function(n){delete n.name})})}function LFe(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];Array.isArray(n)&&n.length===0&&delete e[t]}Ee.node(e,function(t){c(t.children)&&t.children.length===0&&delete t.children})}function NFe(e){let t=e.asset;delete t.profile,delete t.premultipliedAlpha}var FFe={CESIUM_RTC:!0,KHR_materials_common:!0,WEB3D_quantized_attributes:!0};function BFe(e){let t=e.extensionsUsed;if(e.extensionsRequired=g(e.extensionsRequired,[]),c(t)){let n=t.length;for(let i=0;i<n;++i){let o=t[i];c(FFe[o])&&e.extensionsRequired.push(o)}}}function kFe(e){Ee.buffer(e,function(t){delete t.type})}function UFe(e){Ee.texture(e,function(t){delete t.format,delete t.internalFormat,delete t.target,delete t.type})}function zFe(e){Ee.mesh(e,function(t){Ee.meshPrimitive(t,function(n){Ee.meshPrimitiveAttribute(n,function(i,o){o==="TEXCOORD"?n.attributes.TEXCOORD_0=i:o==="COLOR"&&(n.attributes.COLOR_0=i)}),delete n.attributes.TEXCOORD,delete n.attributes.COLOR})}),Ee.technique(e,function(t){Ee.techniqueParameter(t,function(n){let i=n.semantic;c(i)&&(i==="TEXCOORD"?n.semantic="TEXCOORD_0":i==="COLOR"&&(n.semantic="COLOR_0"))})})}var VFe={POSITION:!0,NORMAL:!0,TANGENT:!0},HFe={COLOR:"COLOR",JOINT:"JOINTS",JOINTS:"JOINTS",TEXCOORD:"TEXCOORD",WEIGHT:"WEIGHTS",WEIGHTS:"WEIGHTS"};function GFe(e){let t={};Ee.mesh(e,function(n){Ee.meshPrimitive(n,function(i){Ee.meshPrimitiveAttribute(i,function(o,r){if(r.charAt(0)!=="_"){let s=r.search(/_[0-9]+/g),a=r,l="_0";s>=0&&(a=r.substring(0,s),l=r.substring(s));let u,f=HFe[a];c(f)?(u=f+l,t[r]=u):c(VFe[a])||(u=`_${r}`,t[r]=u)}});for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let r=t[o],s=i.attributes[o];c(s)&&(delete i.attributes[o],i.attributes[r]=s)}})}),Ee.technique(e,function(n){Ee.techniqueParameter(n,function(i){let o=t[i.semantic];c(o)&&(i.semantic=o)})})}function jFe(e){Ee.camera(e,function(t){let n=t.perspective;if(c(n)){let i=n.aspectRatio;c(i)&&i===0&&delete n.aspectRatio;let o=n.yfov;c(o)&&o===0&&(n.yfov=1)}})}function Lj(e,t){return c(t.byteStride)&&t.byteStride!==0?t.byteStride:Ul(e,t)}function WFe(e){Ee.buffer(e,function(t){c(t.byteLength)||(t.byteLength=t.extras._pipeline.source.length)}),Ee.accessor(e,function(t){let n=t.bufferView;if(c(n)){let i=e.bufferViews[n],o=Lj(e,t),r=t.byteOffset+t.count*o;i.byteLength=Math.max(g(i.byteLength,0),r)}})}function qFe(e){let t,n,i,o=e.bufferViews,r={};Ee.accessorContainingVertexAttributeData(e,function(a){let l=e.accessors[a];c(l.bufferView)&&(r[l.bufferView]=!0)});let s={};Ee.accessor(e,function(a){c(a.bufferView)&&(s[a.bufferView]=g(s[a.bufferView],[]),s[a.bufferView].push(a))});for(let a in s)if(Object.prototype.hasOwnProperty.call(s,a)){i=o[a];let l=s[a];l.sort(function(m,p){return m.byteOffset-p.byteOffset});let u=0,f=0,h=l.length;for(t=0;t<h;++t){let m=l[t],p=Lj(e,m),_=m.byteOffset,b=m.count*p;delete m.byteStride;let x=t<h-1,T=x?Lj(e,l[t+1]):void 0;if(p!==T){let E=ze(i,!0);r[a]&&(E.byteStride=p),E.byteOffset+=u,E.byteLength=_+b-u;let S=Es(o,E);for(n=f;n<=t;++n)m=l[n],m.bufferView=S,m.byteOffset=m.byteOffset-u;u=x?l[t+1].byteOffset:void 0,f=t+1}}}RL(e,["accessor","bufferView","buffer"])}function YFe(e){Ee.accessorWithSemantic(e,"POSITION",function(t){let n=e.accessors[t];if(!c(n.min)||!c(n.max)){let i=MT(e,n);n.min=i.min,n.max=i.max}})}function wte(e){return(!c(e.children)||e.children.length===0)&&(!c(e.meshes)||e.meshes.length===0)&&!c(e.camera)&&!c(e.skin)&&!c(e.skeletons)&&!c(e.jointName)&&(!c(e.translation)||d.fromArray(e.translation).equals(d.ZERO))&&(!c(e.scale)||d.fromArray(e.scale).equals(new d(1,1,1)))&&(!c(e.rotation)||ee.fromArray(e.rotation).equals(new ee(0,0,0,1)))&&(!c(e.matrix)||N.fromColumnMajorArray(e.matrix).equals(N.IDENTITY))&&!c(e.extensions)&&!c(e.extras)}function Ste(e,t){Ee.scene(e,function(n){let i=n.nodes;if(c(i)){let o=i.length;for(let r=o;r>=0;--r)if(i[r]===t){i.splice(r,1);return}}}),Ee.node(e,function(n,i){if(c(n.children)){let o=n.children.indexOf(t);o>-1&&(n.children.splice(o,1),wte(n)&&Ste(e,i))}}),delete e.nodes[t]}function XFe(e){return Ee.node(e,function(t,n){wte(t)&&Ste(e,n)}),e}function KFe(e){Ee.animation(e,function(t){Ee.animationSampler(t,function(n){let i=e.accessors[n.input];if(!c(i.min)||!c(i.max)){let o=MT(e,i);i.min=o.min,i.max=o.max}})})}function $Fe(e){Ee.accessor(e,function(t){if(c(t.min)||c(t.max)){let n=MT(e,t);c(t.min)&&(t.min=n.min),c(t.max)&&(t.max=n.max)}})}function ZFe(e){e.asset=g(e.asset,{}),e.asset.version="2.0",Ete(e),PFe(e),XFe(e),RFe(e),MFe(e),NFe(e),BFe(e),WFe(e),qFe(e),YFe(e),KFe(e),$Fe(e),kFe(e),UFe(e),zFe(e),GFe(e),FL(e),jFe(e),IL(e),PL(e),LFe(e)}var JFe=["u_tex","u_diffuse","u_emission","u_diffuse_tex"],QFe=["u_diffuse","u_diffuse_mat"];function Nj(e){e.pbrMetallicRoughness=c(e.pbrMetallicRoughness)?e.pbrMetallicRoughness:{},e.pbrMetallicRoughness.roughnessFactor=1,e.pbrMetallicRoughness.metallicFactor=0}function Fj(e){return c(e.index)}function Bj(e){return Array.isArray(e)&&e.length===4}function Ate(e){let t=new Array(4);t[3]=e[3];for(let n=0;n<3;n++){let i=e[n];i<=.04045?t[n]=e[n]*.07739938080495357:t[n]=Math.pow((i+.055)*.9478672985781991,2.4)}return t}function e2e(e,t){t=g(t,g.EMPTY_OBJECT);let n=g(t.baseColorTextureNames,JFe),i=g(t.baseColorFactorNames,QFe);Ee.material(e,function(o){Ee.materialValue(o,function(r,s){n.indexOf(s)!==-1&&Fj(r)?(Nj(o),o.pbrMetallicRoughness.baseColorTexture=r):i.indexOf(s)!==-1&&Bj(r)&&(Nj(o),o.pbrMetallicRoughness.baseColorFactor=Ate(r))})}),LT(e,"KHR_techniques_webgl"),LT(e,"KHR_blend")}function Mj(e,t){c(t)&&(Bj(t)?e.pbrMetallicRoughness.baseColorFactor=Ate(t):Fj(t)&&(e.pbrMetallicRoughness.baseColorTexture=t))}function Cte(e,t){c(t)&&(Bj(t)?e.emissiveFactor=t.slice(0,3):Fj(t)&&(e.emissiveTexture=t))}function t2e(e){Ee.material(e,function(t){let n=g(t.extensions,g.EMPTY_OBJECT).KHR_materials_common;if(!c(n))return;let i=g(n.values,{}),o=i.ambient,r=i.diffuse,s=i.emission,a=i.transparency,l=n.doubleSided,u=n.transparent;Nj(t),n.technique==="CONSTANT"?(Yf(e,"KHR_materials_unlit"),t.extensions=c(t.extensions)?t.extensions:{},t.extensions.KHR_materials_unlit={},Mj(t,s),Mj(t,o)):(Mj(t,r),Cte(t,o),Cte(t,s)),c(l)&&(t.doubleSided=l),c(a)&&(c(t.pbrMetallicRoughness.baseColorFactor)?t.pbrMetallicRoughness.baseColorFactor[3]*=a:t.pbrMetallicRoughness.baseColorFactor=[1,1,1,a]),c(u)&&(t.alphaMode=u?"BLEND":"OPAQUE")}),LT(e,"KHR_materials_common")}var kL=SFe;var Xn={POSITION:"POSITION",NORMAL:"NORMAL",TANGENT:"TANGENT",TEXCOORD:"TEXCOORD",COLOR:"COLOR",JOINTS:"JOINTS",WEIGHTS:"WEIGHTS",FEATURE_ID:"_FEATURE_ID"};function n2e(e){switch(e){case Xn.POSITION:return"positionMC";case Xn.NORMAL:return"normalMC";case Xn.TANGENT:return"tangentMC";case Xn.TEXCOORD:return"texCoord";case Xn.COLOR:return"color";case Xn.JOINTS:return"joints";case Xn.WEIGHTS:return"weights";case Xn.FEATURE_ID:return"featureId";default:throw new w("semantic is not a valid value.")}}Xn.hasSetIndex=function(e){switch(C.typeOf.string("semantic",e),e){case Xn.POSITION:case Xn.NORMAL:case Xn.TANGENT:return!1;case Xn.TEXCOORD:case Xn.COLOR:case Xn.JOINTS:case Xn.WEIGHTS:case Xn.FEATURE_ID:return!0;default:throw new w("semantic is not a valid value.")}};Xn.fromGltfSemantic=function(e){C.typeOf.string("gltfSemantic",e);let t=e,i=/^(\w+)_\d+$/.exec(e);switch(i!==null&&(t=i[1]),t){case"POSITION":return Xn.POSITION;case"NORMAL":return Xn.NORMAL;case"TANGENT":return Xn.TANGENT;case"TEXCOORD":return Xn.TEXCOORD;case"COLOR":return Xn.COLOR;case"JOINTS":return Xn.JOINTS;case"WEIGHTS":return Xn.WEIGHTS;case"_FEATURE_ID":return Xn.FEATURE_ID}};Xn.fromPntsSemantic=function(e){switch(C.typeOf.string("pntsSemantic",e),e){case"POSITION":case"POSITION_QUANTIZED":return Xn.POSITION;case"RGBA":case"RGB":case"RGB565":return Xn.COLOR;case"NORMAL":case"NORMAL_OCT16P":return Xn.NORMAL;case"BATCH_ID":return Xn.FEATURE_ID;default:throw new w("pntsSemantic is not a valid value.")}};Xn.getGlslType=function(e){switch(C.typeOf.string("semantic",e),e){case Xn.POSITION:case Xn.NORMAL:case Xn.TANGENT:return"vec3";case Xn.TEXCOORD:return"vec2";case Xn.COLOR:return"vec4";case Xn.JOINTS:return"ivec4";case Xn.WEIGHTS:return"vec4";case Xn.FEATURE_ID:return"int";default:throw new w("semantic is not a valid value.")}};Xn.getVariableName=function(e,t){C.typeOf.string("semantic",e);let n=n2e(e);return c(t)&&(n+=`_${t}`),n};var Tt=Object.freeze(Xn);function La(){}La.getError=function(e,t,n){let i=`Failed to load ${e}: ${t}`;c(n)&&c(n.message)&&(i+=`
| ${n.message}`);let o=new ie(i);return c(n)&&(o.stack=`Original stack:
| ${n.stack}
| Handler stack:
| ${o.stack}`),o};La.getNodeTransform=function(e){return c(e.matrix)?e.matrix:N.fromTranslationQuaternionRotationScale(c(e.translation)?e.translation:d.ZERO,c(e.rotation)?e.rotation:ve.IDENTITY,c(e.scale)?e.scale:d.ONE)};La.getAttributeBySemantic=function(e,t,n){let i=e.attributes,o=i.length;for(let r=0;r<o;++r){let s=i[r],a=c(n)?s.setIndex===n:!0;if(s.semantic===t&&a)return s}};La.getAttributeByName=function(e,t){let n=e.attributes,i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.name===t)return r}};La.getFeatureIdsByLabel=function(e,t){for(let n=0;n<e.length;n++){let i=e[n];if(i.positionalLabel===t||i.label===t)return i}};La.hasQuantizedAttributes=function(e){if(!c(e))return!1;for(let t=0;t<e.length;t++){let n=e[t];if(c(n.quantization))return!0}return!1};La.getAttributeInfo=function(e){let t=e.semantic,n=e.setIndex,i,o=!1;c(t)?(i=Tt.getVariableName(t,n),o=!0):(i=e.name,i=i.replace(/^_/,""),i=i.toLowerCase());let r=/^color_\d+$/.test(i),s=e.type,a=tn.getGlslType(s);r&&(a="vec4");let l=c(e.quantization),u;return l&&(u=r?"vec4":tn.getGlslType(e.quantization.type)),{attribute:e,isQuantized:l,variableName:i,hasSemantic:o,glslType:a,quantizedGlslType:u}};var i2e=new d,o2e=new d;La.getPositionMinMax=function(e,t,n){let i=La.getAttributeBySemantic(e,"POSITION"),o=i.max,r=i.min;return c(n)&&c(t)&&(r=d.add(r,t,o2e),o=d.add(o,n,i2e)),{min:r,max:o}};La.getAxisCorrectionMatrix=function(e,t,n){return n=N.clone(N.IDENTITY,n),e===vo.Y?n=N.clone(vo.Y_UP_TO_Z_UP,n):e===vo.X&&(n=N.clone(vo.X_UP_TO_Z_UP,n)),t===vo.Z&&(n=N.multiplyTransformation(n,vo.Z_UP_TO_X_UP,n)),n};var r2e=new q;La.getCullFace=function(e,t){if(!Se.isTriangles(t))return pi.BACK;let n=N.getMatrix3(e,r2e);return q.determinant(n)<0?pi.FRONT:pi.BACK};La.sanitizeGlslIdentifier=function(e){let t=e.replaceAll(/[^A-Za-z0-9]+/g,"_");return t=t.replace(/^gl_/,""),/^\d/.test(t)&&(t=`_${t}`),t};La.supportedExtensions={AGI_articulations:!0,CESIUM_primitive_outline:!0,CESIUM_RTC:!0,EXT_feature_metadata:!0,EXT_instance_features:!0,EXT_mesh_features:!0,EXT_mesh_gpu_instancing:!0,EXT_meshopt_compression:!0,EXT_structural_metadata:!0,EXT_texture_webp:!0,KHR_blend:!0,KHR_draco_mesh_compression:!0,KHR_techniques_webgl:!0,KHR_materials_common:!0,KHR_materials_pbrSpecularGlossiness:!0,KHR_materials_specular:!0,KHR_materials_anisotropy:!0,KHR_materials_clearcoat:!0,KHR_materials_unlit:!0,KHR_mesh_quantization:!0,KHR_texture_basisu:!0,KHR_texture_transform:!0,WEB3D_quantized_attributes:!0};La.checkSupportedExtensions=function(e){let t=e.length;for(let n=0;n<t;n++){let i=e[n];if(!La.supportedExtensions[i])throw new ie(`Unsupported glTF Extension: ${i}`)}};var Xt=La;function q_(e){e=g(e,g.EMPTY_OBJECT);let t=e.resourceCache,n=e.gltfResource,i=e.baseResource,o=e.typedArray,r=e.gltfJson,s=e.cacheKey;C.typeOf.func("options.resourceCache",t),C.typeOf.object("options.gltfResource",n),C.typeOf.object("options.baseResource",i),this._resourceCache=t,this._gltfResource=n,this._baseResource=i,this._typedArray=o,this._gltfJson=r,this._cacheKey=s,this._gltf=void 0,this._bufferLoaders=[],this._state=_t.UNLOADED,this._promise=void 0}c(Object.create)&&(q_.prototype=Object.create(Gi.prototype),q_.prototype.constructor=q_);Object.defineProperties(q_.prototype,{cacheKey:{get:function(){return this._cacheKey}},gltf:{get:function(){return this._gltf}}});q_.prototype.load=async function(){return c(this._promise)?this._promise:(this._state=_t.LOADING,c(this._gltfJson)?(this._promise=vte(this,this._gltfJson),this._promise):c(this._typedArray)?(this._promise=Dte(this,this._typedArray),this._promise):(this._promise=s2e(this),this._promise))};async function s2e(e){let t;try{let n=await e._fetchGltf();if(e.isDestroyed())return;t=new Uint8Array(n)}catch(n){if(e.isDestroyed())return;kj(e,n)}return Dte(e,t)}function kj(e,t){e.unload(),e._state=_t.FAILED;let n=`Failed to load glTF: ${e._gltfResource.url}`;throw e.getError(n,t)}async function a2e(e,t){if(c(t.asset)&&t.asset.version==="2.0"&&!lr(t,"KHR_techniques_webgl")&&!lr(t,"KHR_materials_common"))return Promise.resolve();let n=[];Ee.buffer(t,function(i){if(!c(i.extras._pipeline.source)&&c(i.uri)){let o=e._baseResource.getDerivedResource({url:i.uri}),s=e._resourceCache.getExternalBufferLoader({resource:o});e._bufferLoaders.push(s),n.push(s.load().then(function(){s.isDestroyed()||(i.extras._pipeline.source=s.typedArray)}))}}),await Promise.all(n),kL(t)}function c2e(e){let t=[];return Ee.buffer(e,function(n){let i=n.uri;!c(n.extras._pipeline.source)&&c(i)&&c_(i)&&(delete n.uri,t.push(Te.fetchArrayBuffer(i).then(function(o){n.extras._pipeline.source=new Uint8Array(o)})))}),Promise.all(t)}function l2e(e,t){let n=[];return Ee.buffer(t,function(i,o){let r=i.extras._pipeline.source;if(c(r)&&!c(i.uri)){let a=e._resourceCache.getEmbeddedBufferLoader({parentResource:e._gltfResource,bufferId:o,typedArray:r});e._bufferLoaders.push(a),n.push(a.load())}}),Promise.all(n)}async function vte(e,t){try{Ab(t),await c2e(t),await a2e(e,t),EL(t),await l2e(e,t),DL(t);let n=t.asset.version;if(n!=="1.0"&&n!=="2.0")throw new ie(`Unsupported glTF version: ${n}`);let i=t.extensionsRequired;return c(i)&&Xt.checkSupportedExtensions(i),e._gltf=t,e._state=_t.READY,e}catch(n){if(e.isDestroyed())return;kj(e,n)}}async function Dte(e,t){let n;try{_h(t)==="glTF"?n=AL(t):n=Do(t)}catch(i){if(e.isDestroyed())return;kj(e,i)}return vte(e,n)}q_.prototype.unload=function(){let e=this._bufferLoaders,t=e.length;for(let n=0;n<t;++n)e[n]=!e[n].isDestroyed()&&this._resourceCache.unload(e[n]);this._bufferLoaders.length=0,this._gltf=void 0};q_.prototype._fetchGltf=function(){return this._gltfResource.fetchArrayBuffer()};var dA=q_;var u2e={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"},Jm=Object.freeze(u2e);var _o={};function f2e(){this.octEncoded=!1,this.octEncodedZXY=!1,this.normalizationRange=void 0,this.quantizedVolumeOffset=void 0,this.quantizedVolumeDimensions=void 0,this.quantizedVolumeStepSize=void 0,this.componentDatatype=void 0,this.type=void 0}function d2e(){this.name=void 0,this.semantic=void 0,this.setIndex=void 0,this.componentDatatype=void 0,this.type=void 0,this.normalized=!1,this.count=void 0,this.min=void 0,this.max=void 0,this.constant=void 0,this.quantization=void 0,this.typedArray=void 0,this.buffer=void 0,this.byteOffset=0,this.byteStride=void 0}function h2e(){this.indexDatatype=void 0,this.count=void 0,this.buffer=void 0,this.typedArray=void 0}function m2e(){this.featureCount=void 0,this.nullFeatureId=void 0,this.propertyTableId=void 0,this.setIndex=void 0,this.label=void 0,this.positionalLabel=void 0}function p2e(){this.featureCount=void 0,this.nullFeatureId=void 0,this.propertyTableId=void 0,this.offset=0,this.repeat=void 0,this.label=void 0,this.positionalLabel=void 0}function _2e(){this.featureCount=void 0,this.nullFeatureId=void 0,this.propertyTableId=void 0,this.textureReader=void 0,this.label=void 0,this.positionalLabel=void 0}function g2e(){this.attributes=[]}function y2e(){this.attributes=[],this.morphTargets=[],this.indices=void 0,this.material=void 0,this.primitiveType=void 0,this.featureIds=[],this.propertyTextureIds=[],this.propertyAttributeIds=[],this.outlineCoordinates=void 0}function b2e(){this.attributes=[],this.featureIds=[],this.transformInWorldSpace=!1}function x2e(){this.index=void 0,this.joints=[],this.inverseBindMatrices=[]}function T2e(){this.name=void 0,this.index=void 0,this.children=[],this.primitives=[],this.instances=void 0,this.skin=void 0,this.matrix=void 0,this.translation=void 0,this.rotation=void 0,this.scale=void 0,this.morphWeights=[],this.articulationName=void 0}function C2e(){this.nodes=[]}var E2e={TRANSLATION:"translation",ROTATION:"rotation",SCALE:"scale",WEIGHTS:"weights"};function w2e(){this.input=[],this.interpolation=void 0,this.output=[]}function S2e(){this.node=void 0,this.path=void 0}function A2e(){this.sampler=void 0,this.target=void 0}function v2e(){this.name=void 0,this.samplers=[],this.channels=[]}function D2e(){this.name=void 0,this.type=void 0,this.minimumValue=void 0,this.maximumValue=void 0,this.initialValue=void 0}function I2e(){this.name=void 0,this.stages=[]}function Ite(){this.credits=[]}function O2e(){this.asset=new Ite,this.scene=void 0,this.nodes=[],this.skins=[],this.animations=[],this.articulations=[],this.structuralMetadata=void 0,this.upAxis=void 0,this.forwardAxis=void 0,this.transform=N.clone(N.IDENTITY),this.extensions={}}function P2e(){this.texture=void 0,this.index=void 0,this.texCoord=0,this.transform=q.clone(q.IDENTITY),this.scale=1,this.channels=void 0}function Y_(){this.baseColorTexture=void 0,this.metallicRoughnessTexture=void 0,this.baseColorFactor=ee.clone(Y_.DEFAULT_BASE_COLOR_FACTOR),this.metallicFactor=Y_.DEFAULT_METALLIC_FACTOR,this.roughnessFactor=Y_.DEFAULT_ROUGHNESS_FACTOR}Y_.DEFAULT_BASE_COLOR_FACTOR=ee.ONE;Y_.DEFAULT_METALLIC_FACTOR=1;Y_.DEFAULT_ROUGHNESS_FACTOR=1;function vb(){this.diffuseTexture=void 0,this.specularGlossinessTexture=void 0,this.diffuseFactor=ee.clone(vb.DEFAULT_DIFFUSE_FACTOR),this.specularFactor=d.clone(vb.DEFAULT_SPECULAR_FACTOR),this.glossinessFactor=vb.DEFAULT_GLOSSINESS_FACTOR}vb.DEFAULT_DIFFUSE_FACTOR=ee.ONE;vb.DEFAULT_SPECULAR_FACTOR=d.ONE;vb.DEFAULT_GLOSSINESS_FACTOR=1;function hA(){this.specularFactor=hA.DEFAULT_SPECULAR_FACTOR,this.specularTexture=void 0,this.specularColorFactor=d.clone(hA.DEFAULT_SPECULAR_COLOR_FACTOR),this.specularColorTexture=void 0}hA.DEFAULT_SPECULAR_FACTOR=1;hA.DEFAULT_SPECULAR_COLOR_FACTOR=d.ONE;function mA(){this.anisotropyStrength=mA.DEFAULT_ANISOTROPY_STRENGTH,this.anisotropyRotation=mA.DEFAULT_ANISOTROPY_ROTATION,this.anisotropyTexture=void 0}mA.DEFAULT_ANISOTROPY_STRENGTH=0;mA.DEFAULT_ANISOTROPY_ROTATION=0;function pA(){this.clearcoatFactor=pA.DEFAULT_CLEARCOAT_FACTOR,this.clearcoatTexture=void 0,this.clearcoatRoughnessFactor=pA.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR,this.clearcoatRoughnessTexture=void 0,this.clearcoatNormalTexture=void 0}pA.DEFAULT_CLEARCOAT_FACTOR=0;pA.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR=0;function Uj(){this.metallicRoughness=new Y_,this.specularGlossiness=void 0,this.specular=void 0,this.anisotropy=void 0,this.clearcoat=void 0,this.emissiveTexture=void 0,this.normalTexture=void 0,this.occlusionTexture=void 0,this.emissiveFactor=d.clone(Uj.DEFAULT_EMISSIVE_FACTOR),this.alphaMode=Jm.OPAQUE,this.alphaCutoff=.5,this.doubleSided=!1,this.unlit=!1}Uj.DEFAULT_EMISSIVE_FACTOR=d.ZERO;_o.Quantization=f2e;_o.Attribute=d2e;_o.Indices=h2e;_o.FeatureIdAttribute=m2e;_o.FeatureIdTexture=_2e;_o.FeatureIdImplicitRange=p2e;_o.MorphTarget=g2e;_o.Primitive=y2e;_o.Instances=b2e;_o.Skin=x2e;_o.Node=T2e;_o.Scene=C2e;_o.AnimatedPropertyType=Object.freeze(E2e);_o.AnimationSampler=w2e;_o.AnimationTarget=S2e;_o.AnimationChannel=A2e;_o.Animation=v2e;_o.ArticulationStage=D2e;_o.Articulation=I2e;_o.Asset=Ite;_o.Components=O2e;_o.TextureReader=P2e;_o.MetallicRoughness=Y_;_o.SpecularGlossiness=vb;_o.Specular=hA;_o.Anisotropy=mA;_o.Clearcoat=pA;_o.Material=Uj;var bn=_o;var UL={};UL.getImageIdFromTexture=function(e){e=g(e,g.EMPTY_OBJECT);let{gltf:t,textureId:n,supportedImageFormats:i}=e;C.typeOf.object("options.gltf",t),C.typeOf.number("options.textureId",n),C.typeOf.object("options.supportedImageFormats",i);let o=t.textures[n],r=o.extensions;if(c(r)){if(i.webp&&c(r.EXT_texture_webp))return r.EXT_texture_webp.source;if(i.basis&&c(r.KHR_texture_basisu))return r.KHR_texture_basisu.source}return o.source};UL.createSampler=function(e){e=g(e,g.EMPTY_OBJECT);let{gltf:t,textureInfo:n,compressedTextureNoMipmap:i=!1}=e;C.typeOf.object("options.gltf",t),C.typeOf.object("options.textureInfo",n);let o=pn.REPEAT,r=pn.REPEAT,s=Wt.LINEAR,a=si.LINEAR,l=n.index,f=t.textures[l].sampler;if(c(f)){let h=t.samplers[f];o=g(h.wrapS,o),r=g(h.wrapT,r),s=g(h.minFilter,s),a=g(h.magFilter,a)}return i&&s!==Wt.LINEAR&&s!==Wt.NEAREST&&(s===Wt.NEAREST_MIPMAP_NEAREST||s===Wt.NEAREST_MIPMAP_LINEAR?s=Wt.NEAREST:s=Wt.LINEAR),new Jt({wrapS:o,wrapT:r,minificationFilter:s,magnificationFilter:a})};var R2e=new k(1,1);UL.createModelTextureReader=function(e){var l;e=g(e,g.EMPTY_OBJECT);let{textureInfo:t,channels:n,texture:i}=e;C.typeOf.object("options.textureInfo",t);let o=g(t.texCoord,0),r,s=(l=t.extensions)==null?void 0:l.KHR_texture_transform;if(c(s)){o=g(s.texCoord,o);let u=c(s.offset)?k.unpack(s.offset):k.ZERO,f=g(s.rotation,0),h=c(s.scale)?k.unpack(s.scale):R2e;f=-f,r=new q(Math.cos(f)*h.x,-Math.sin(f)*h.y,u.x,Math.sin(f)*h.x,Math.cos(f)*h.y,u.y,0,0,1)}let a=new bn.TextureReader;return a.index=t.index,a.texture=i,a.texCoord=o,a.scale=t.scale,a.transform=r,a.channels=n,a};var zl=UL;function M2e(e){let t=document.createElement("canvas");return t.width=O.nextPowerOfTwo(e.width),t.height=O.nextPowerOfTwo(e.height),t.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t.width,t.height),t}var Db=M2e;function X_(e){e=g(e,g.EMPTY_OBJECT);let t=e.resourceCache,n=e.gltf,i=e.textureInfo,o=e.gltfResource,r=e.baseResource,s=e.supportedImageFormats,a=e.cacheKey,l=g(e.asynchronous,!0);C.typeOf.func("options.resourceCache",t),C.typeOf.object("options.gltf",n),C.typeOf.object("options.textureInfo",i),C.typeOf.object("options.gltfResource",o),C.typeOf.object("options.baseResource",r),C.typeOf.object("options.supportedImageFormats",s);let u=i.index,f=zl.getImageIdFromTexture({gltf:n,textureId:u,supportedImageFormats:s});this._resourceCache=t,this._gltf=n,this._textureInfo=i,this._imageId=f,this._gltfResource=o,this._baseResource=r,this._cacheKey=a,this._asynchronous=l,this._imageLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._texture=void 0,this._state=_t.UNLOADED,this._promise=void 0}c(Object.create)&&(X_.prototype=Object.create(Gi.prototype),X_.prototype.constructor=X_);Object.defineProperties(X_.prototype,{cacheKey:{get:function(){return this._cacheKey}},texture:{get:function(){return this._texture}}});var L2e=new zj;async function N2e(e){let t=e._resourceCache;try{let n=t.getImageLoader({gltf:e._gltf,imageId:e._imageId,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._imageLoader=n,await n.load(),e.isDestroyed()?void 0:(e._image=n.image,e._mipLevels=n.mipLevels,e._state=_t.LOADED,e)}catch(n){if(e.isDestroyed())return;throw e.unload(),e._state=_t.FAILED,e.getError("Failed to load texture",n)}}X_.prototype.load=async function(){return c(this._promise)?this._promise:(this._state=_t.LOADING,this._promise=N2e(this),this._promise)};function zj(){this.gltf=void 0,this.textureInfo=void 0,this.image=void 0,this.context=void 0,this.texture=void 0}zj.prototype.set=function(e,t,n,i,o){this.gltf=e,this.textureInfo=t,this.image=n,this.mipLevels=i,this.context=o};zj.prototype.execute=function(){this.texture=Ote(this.gltf,this.textureInfo,this.image,this.mipLevels,this.context)};function Ote(e,t,n,i,o){let r=n.internalFormat,s=!1;Re.isCompressedFormat(r)&&!c(i)&&(s=!0);let a=zl.createSampler({gltf:e,textureInfo:t,compressedTextureNoMipmap:s}),l=a.minificationFilter,u=a.wrapS,f=a.wrapT,h=l===Wt.NEAREST_MIPMAP_NEAREST||l===Wt.NEAREST_MIPMAP_LINEAR||l===Wt.LINEAR_MIPMAP_NEAREST||l===Wt.LINEAR_MIPMAP_LINEAR,m=!c(r)&&h,p=m||u===pn.REPEAT||u===pn.MIRRORED_REPEAT||f===pn.REPEAT||f===pn.MIRRORED_REPEAT,_=!O.isPowerOfTwo(n.width)||!O.isPowerOfTwo(n.height),b=p&&_,x;return c(r)?(!o.webgl2&&Re.isCompressedFormat(r)&&_&&p&&console.warn("Compressed texture uses REPEAT or MIRRORED_REPEAT texture wrap mode and dimensions are not powers of two. The texture may be rendered incorrectly."),x=Ot.create({context:o,source:{arrayBufferView:n.bufferView,mipLevels:i},width:n.width,height:n.height,pixelFormat:n.internalFormat,sampler:a})):(b&&(n=Db(n)),x=Ot.create({context:o,source:n,sampler:a,flipY:!1,skipColorSpaceConversion:!0})),m&&x.generateMipmap(),x}X_.prototype.process=function(e){if(C.typeOf.object("frameState",e),this._state===_t.READY)return!0;if(this._state!==_t.LOADED&&this._state!==_t.PROCESSING||c(this._texture)||!c(this._image))return!1;this._state=_t.PROCESSING;let t;if(this._asynchronous){let n=L2e;if(n.set(this._gltf,this._textureInfo,this._image,this._mipLevels,e.context),!e.jobScheduler.execute(n,ca.TEXTURE))return;t=n.texture}else t=Ote(this._gltf,this._textureInfo,this._image,this._mipLevels,e.context);return this.unload(),this._texture=t,this._state=_t.READY,this._resourceCache.statistics.addTextureLoader(this),!0};X_.prototype.unload=function(){c(this._texture)&&this._texture.destroy(),c(this._imageLoader)&&!this._imageLoader.isDestroyed()&&this._resourceCache.unload(this._imageLoader),this._imageLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._texture=void 0,this._gltf=void 0};var _A=X_;function K_(e){e=g(e,g.EMPTY_OBJECT);let t=e.resourceCache,n=e.gltf,i=e.gltfResource,o=e.baseResource,r=e.bufferViewId,s=e.draco,a=e.attributeSemantic,l=e.accessorId,u=e.cacheKey,f=g(e.asynchronous,!0),h=g(e.loadBuffer,!1),m=g(e.loadTypedArray,!1);if(C.typeOf.func("options.resourceCache",t),C.typeOf.object("options.gltf",n),C.typeOf.object("options.gltfResource",i),C.typeOf.object("options.baseResource",o),!h&&!m)throw new w("At least one of loadBuffer and loadTypedArray must be true.");let p=c(r),_=Pte(s,a),b=c(a),x=c(l);if(p===_)throw new w("One of options.bufferViewId and options.draco must be defined.");if(_&&!b)throw new w("When options.draco is defined options.attributeSemantic must also be defined.");if(_&&!x)throw new w("When options.draco is defined options.accessorId must also be defined.");_&&(C.typeOf.object("options.draco",s),C.typeOf.string("options.attributeSemantic",a),C.typeOf.number("options.accessorId",l)),this._resourceCache=t,this._gltfResource=i,this._baseResource=o,this._gltf=n,this._bufferViewId=r,this._draco=s,this._attributeSemantic=a,this._accessorId=l,this._cacheKey=u,this._asynchronous=f,this._loadBuffer=h,this._loadTypedArray=m,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._quantization=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=_t.UNLOADED,this._promise=void 0}c(Object.create)&&(K_.prototype=Object.create(Gi.prototype),K_.prototype.constructor=K_);Object.defineProperties(K_.prototype,{cacheKey:{get:function(){return this._cacheKey}},buffer:{get:function(){return this._buffer}},typedArray:{get:function(){return this._typedArray}},quantization:{get:function(){return this._quantization}}});function Pte(e,t){return c(e)&&c(e.attributes)&&c(e.attributes[t])}K_.prototype.load=async function(){return c(this._promise)?this._promise:Pte(this._draco,this._attributeSemantic)?(this._promise=B2e(this),this._promise):(this._promise=U2e(this),this._promise)};function F2e(e,t,n,i){let r=(1<<e.quantizationBits)-1,s=1/r,a=new bn.Quantization;if(a.componentDatatype=t,a.octEncoded=e.octEncoded,a.octEncodedZXY=!0,a.type=i,a.octEncoded)a.type=tn.VEC2,a.normalizationRange=r;else{let l=tn.getMathType(i);if(l===Number){let u=e.range;a.quantizedVolumeOffset=e.minValues[0],a.quantizedVolumeDimensions=u,a.normalizationRange=r,a.quantizedVolumeStepSize=u*s}else{a.quantizedVolumeOffset=l.unpack(e.minValues),a.normalizationRange=l.unpack(new Array(n).fill(r));let u=new Array(n).fill(e.range);a.quantizedVolumeDimensions=l.unpack(u);let f=u.map(function(h){return h*s});a.quantizedVolumeStepSize=l.unpack(f)}}return a}async function B2e(e){e._state=_t.LOADING;let t=e._resourceCache;try{let n=t.getDracoLoader({gltf:e._gltf,draco:e._draco,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._dracoLoader=n,await n.load(),e.isDestroyed()?void 0:(e._state=_t.LOADED,e)}catch{if(e.isDestroyed())return;Vj(e)}}function k2e(e){e._state=_t.PROCESSING;let n=e._dracoLoader.decodedData.vertexAttributes,i=e._attributeSemantic,o=n[i],r=e._accessorId,a=e._gltf.accessors[r].type,l=o.array,u=o.data.quantization;c(u)&&(e._quantization=F2e(u,o.data.componentDatatype,o.data.componentsPerAttribute,a)),e._typedArray=new Uint8Array(l.buffer,l.byteOffset,l.byteLength)}async function U2e(e){e._state=_t.LOADING;let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._bufferViewId,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoader=n,await n.load(),e.isDestroyed()?void 0:(e._typedArray=n.typedArray,e._state=_t.PROCESSING,e)}catch(n){if(e.isDestroyed())return;Vj(e,n)}}function Vj(e,t){throw e.unload(),e._state=_t.FAILED,e.getError("Failed to load vertex buffer",t)}function Hj(){this.typedArray=void 0,this.context=void 0,this.buffer=void 0}Hj.prototype.set=function(e,t){this.typedArray=e,this.context=t};Hj.prototype.execute=function(){this.buffer=Rte(this.typedArray,this.context)};function Rte(e,t){let n=yt.createVertexBuffer({typedArray:e,context:t,usage:Pe.STATIC_DRAW});return n.vertexArrayDestroyable=!1,n}var z2e=new Hj;K_.prototype.process=function(e){if(C.typeOf.object("frameState",e),this._state===_t.READY)return!0;if(this._state!==_t.LOADED&&this._state!==_t.PROCESSING)return!1;if(c(this._dracoLoader)){try{if(!this._dracoLoader.process(e))return!1}catch(i){Vj(this,i)}k2e(this)}let t,n=this._typedArray;if(this._loadBuffer&&this._asynchronous){let i=z2e;if(i.set(n,e.context),!e.jobScheduler.execute(i,ca.BUFFER))return!1;t=i.buffer}else this._loadBuffer&&(t=Rte(n,e.context));return this.unload(),this._buffer=t,this._typedArray=this._loadTypedArray?n:void 0,this._state=_t.READY,this._resourceCache.statistics.addGeometryLoader(this),!0};K_.prototype.unload=function(){c(this._buffer)&&this._buffer.destroy();let e=this._resourceCache;c(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&e.unload(this._bufferViewLoader),c(this._dracoLoader)&&e.unload(this._dracoLoader),this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._gltf=void 0};var gA=K_;function yA(e){e=g(e,g.EMPTY_OBJECT);let t=e.id;C.typeOf.string("options.id",t);let n=g(e.properties,{}),i={};for(let o in n)if(n.hasOwnProperty(o)){let r=n[o];c(r.semantic)&&(i[r.semantic]=r)}this._id=t,this._name=e.name,this._description=e.description,this._properties=n,this._propertiesBySemantic=i,this._extras=ze(e.extras,!0),this._extensions=ze(e.extensions,!0)}yA.fromJson=function(e){e=g(e,g.EMPTY_OBJECT);let t=e.id,n=e.class;C.typeOf.string("options.id",t),C.typeOf.object("options.class",n);let i={};for(let o in n.properties)if(n.properties.hasOwnProperty(o)){let r=Eb.fromJson({id:o,property:n.properties[o],enums:e.enums});i[o]=r}return new yA({id:t,name:n.name,description:n.description,properties:i,extras:n.extras,extensions:n.extensions})};Object.defineProperties(yA.prototype,{properties:{get:function(){return this._properties}},propertiesBySemantic:{get:function(){return this._propertiesBySemantic}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});yA.BATCH_TABLE_CLASS_NAME="_batchTable";var xh=yA;function zL(e){e=g(e,g.EMPTY_OBJECT);let t=e.value,n=e.name;C.typeOf.number("options.value",t),C.typeOf.string("options.name",n),this._value=t,this._name=n,this._description=e.description,this._extras=ze(e.extras,!0),this._extensions=ze(e.extensions,!0)}zL.fromJson=function(e){return C.typeOf.object("value",e),new zL({value:e.value,name:e.name,description:e.description,extras:e.extras,extensions:e.extensions})};Object.defineProperties(zL.prototype,{value:{get:function(){return this._value}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var VL=zL;function HL(e){e=g(e,g.EMPTY_OBJECT);let t=e.id,n=e.values;C.typeOf.string("options.id",t),C.defined("options.values",n);let i={},o={},r=n.length;for(let a=0;a<r;++a){let l=n[a];i[l.value]=l.name,o[l.name]=l.value}let s=g(e.valueType,zt.UINT16);this._values=n,this._namesByValue=i,this._valuesByName=o,this._valueType=s,this._id=t,this._name=e.name,this._description=e.description,this._extras=ze(e.extras,!0),this._extensions=ze(e.extensions,!0)}HL.fromJson=function(e){e=g(e,g.EMPTY_OBJECT);let t=e.id,n=e.enum;C.typeOf.string("options.id",t),C.typeOf.object("options.enum",n);let i=n.values.map(function(o){return VL.fromJson(o)});return new HL({id:t,values:i,valueType:zt[n.valueType],name:n.name,description:n.description,extras:n.extras,extensions:n.extensions})};Object.defineProperties(HL.prototype,{values:{get:function(){return this._values}},namesByValue:{get:function(){return this._namesByValue}},valuesByName:{get:function(){return this._valuesByName}},valueType:{get:function(){return this._valueType}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var GL=HL;function jL(e){e=g(e,g.EMPTY_OBJECT);let t=g(e.classes,{}),n=g(e.enums,{});this._classes=t,this._enums=n,this._id=e.id,this._name=e.name,this._description=e.description,this._version=e.version,this._extras=ze(e.extras,!0),this._extensions=ze(e.extensions,!0)}jL.fromJson=function(e){C.typeOf.object("schema",e);let t={};if(c(e.enums))for(let i in e.enums)e.enums.hasOwnProperty(i)&&(t[i]=GL.fromJson({id:i,enum:e.enums[i]}));let n={};if(c(e.classes))for(let i in e.classes)e.classes.hasOwnProperty(i)&&(n[i]=xh.fromJson({id:i,class:e.classes[i],enums:t}));return new jL({id:e.id,name:e.name,description:e.description,version:e.version,classes:n,enums:t,extras:e.extras,extensions:e.extensions})};Object.defineProperties(jL.prototype,{classes:{get:function(){return this._classes}},enums:{get:function(){return this._enums}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},version:{get:function(){return this._version}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var ju=jL;function Ib(e){e=g(e,g.EMPTY_OBJECT);let t=e.schema,n=e.resource,i=e.cacheKey;if(c(t)===c(n))throw new w("One of options.schema and options.resource must be defined.");this._schema=c(t)?ju.fromJson(t):void 0,this._resource=n,this._cacheKey=i,this._state=_t.UNLOADED,this._promise=void 0}c(Object.create)&&(Ib.prototype=Object.create(Gi.prototype),Ib.prototype.constructor=Ib);Object.defineProperties(Ib.prototype,{cacheKey:{get:function(){return this._cacheKey}},schema:{get:function(){return this._schema}}});Ib.prototype.load=async function(){return c(this._promise)?this._promise:c(this._schema)?(this._promise=Promise.resolve(this),this._promise):(this._promise=V2e(this),this._promise)};async function V2e(e){let t=e._resource;e._state=_t.LOADING;try{let n=await t.fetchJson();return e.isDestroyed()?void 0:(e._schema=ju.fromJson(n),e._state=_t.READY,e)}catch(n){if(e.isDestroyed())return;e._state=_t.FAILED;let i=`Failed to load schema: ${t.url}`;throw e.getError(i,n)}}Ib.prototype.unload=function(){this._schema=void 0};var bA=Ib;var Xf={};function NT(e){return Dm(e.url)}function WL(e){let{byteOffset:t,byteLength:n}=e;if(ei(e,"EXT_meshopt_compression")){let i=e.extensions.EXT_meshopt_compression;t=g(i.byteOffset,0),n=i.byteLength}return`${t}-${t+n}`}function H2e(e,t){let n=t.byteOffset+e.byteOffset,{componentType:i,type:o,count:r}=e;return`${n}-${i}-${o}-${r}`}function Mte(e,t){return`${NT(e)}-buffer-id-${t}`}function xA(e,t,n,i){if(c(e.uri)){let o=i.getDerivedResource({url:e.uri});return NT(o)}return Mte(n,t)}function Gj(e,t,n,i){let o=t.bufferView,r=e.bufferViews[o],s=r.buffer,a=e.buffers[s],l=xA(a,s,n,i),u=WL(r);return`${l}-range-${u}`}function Lte(e,t,n,i){let o=e.images[t],r=o.bufferView,s=o.uri;if(c(s)){let m=i.getDerivedResource({url:s});return NT(m)}let a=e.bufferViews[r],l=a.buffer,u=e.buffers[l],f=xA(u,l,n,i),h=WL(a);return`${f}-range-${h}`}function G2e(e,t){let n=zl.createSampler({gltf:e,textureInfo:t});return`${n.wrapS}-${n.wrapT}-${n.minificationFilter}-${n.magnificationFilter}`}Xf.getSchemaCacheKey=function(e){let{schema:t,resource:n}=e;if(c(t)===c(n))throw new w("One of options.schema and options.resource must be defined.");return c(t)?`embedded-schema:${JSON.stringify(t)}`:`external-schema:${NT(n)}`};Xf.getExternalBufferCacheKey=function(e){e=g(e,g.EMPTY_OBJECT);let{resource:t}=e;return C.typeOf.object("options.resource",t),`external-buffer:${NT(t)}`};Xf.getEmbeddedBufferCacheKey=function(e){e=g(e,g.EMPTY_OBJECT);let{parentResource:t,bufferId:n}=e;return C.typeOf.object("options.parentResource",t),C.typeOf.number("options.bufferId",n),`embedded-buffer:${Mte(t,n)}`};Xf.getGltfCacheKey=function(e){e=g(e,g.EMPTY_OBJECT);let{gltfResource:t}=e;return C.typeOf.object("options.gltfResource",t),`gltf:${NT(t)}`};Xf.getBufferViewCacheKey=function(e){e=g(e,g.EMPTY_OBJECT);let{gltf:t,bufferViewId:n,gltfResource:i,baseResource:o}=e;C.typeOf.object("options.gltf",t),C.typeOf.number("options.bufferViewId",n),C.typeOf.object("options.gltfResource",i),C.typeOf.object("options.baseResource",o);let r=t.bufferViews[n],s=r.buffer,a=t.buffers[s];ei(r,"EXT_meshopt_compression")&&(s=r.extensions.EXT_meshopt_compression.buffer);let l=xA(a,s,i,o),u=WL(r);return`buffer-view:${l}-range-${u}`};Xf.getDracoCacheKey=function(e){e=g(e,g.EMPTY_OBJECT);let{gltf:t,draco:n,gltfResource:i,baseResource:o}=e;return C.typeOf.object("options.gltf",t),C.typeOf.object("options.draco",n),C.typeOf.object("options.gltfResource",i),C.typeOf.object("options.baseResource",o),`draco:${Gj(t,n,i,o)}`};Xf.getVertexBufferCacheKey=function(e){e=g(e,g.EMPTY_OBJECT);let{gltf:t,gltfResource:n,baseResource:i,frameState:o,bufferViewId:r,draco:s,attributeSemantic:a,dequantize:l=!1,loadBuffer:u=!1,loadTypedArray:f=!1}=e;C.typeOf.object("options.gltf",t),C.typeOf.object("options.gltfResource",n),C.typeOf.object("options.baseResource",i),C.typeOf.object("options.frameState",o);let h=c(r),m=j2e(s,a),p=c(a);if(h===m)throw new w("One of options.bufferViewId and options.draco must be defined.");if(m&&!p)throw new w("When options.draco is defined options.attributeSemantic must also be defined.");if(m&&(C.typeOf.object("options.draco",s),C.typeOf.string("options.attributeSemantic",a)),!u&&!f)throw new w("At least one of loadBuffer and loadTypedArray must be true.");let _="";if(l&&(_+="-dequantize"),u&&(_+="-buffer",_+=`-context-${o.context.id}`),f&&(_+="-typed-array"),c(s))return`vertex-buffer:${Gj(t,s,n,i)}-draco-${a}${_}`;let b=t.bufferViews[r],x=b.buffer,T=t.buffers[x],E=xA(T,x,n,i),S=WL(b);return`vertex-buffer:${E}-range-${S}${_}`};function j2e(e,t){return c(e)&&c(e.attributes)&&c(e.attributes[t])}Xf.getIndexBufferCacheKey=function(e){e=g(e,g.EMPTY_OBJECT);let{gltf:t,accessorId:n,gltfResource:i,baseResource:o,frameState:r,draco:s,loadBuffer:a=!1,loadTypedArray:l=!1}=e;if(C.typeOf.object("options.gltf",t),C.typeOf.number("options.accessorId",n),C.typeOf.object("options.gltfResource",i),C.typeOf.object("options.baseResource",o),C.typeOf.object("options.frameState",r),!a&&!l)throw new w("At least one of loadBuffer and loadTypedArray must be true.");let u="";if(a&&(u+="-buffer",u+=`-context-${r.context.id}`),l&&(u+="-typed-array"),c(s))return`index-buffer:${Gj(t,s,i,o)}-draco${u}`;let f=t.accessors[n],h=f.bufferView,m=t.bufferViews[h],p=m.buffer,_=t.buffers[p],b=xA(_,p,i,o),x=H2e(f,m);return`index-buffer:${b}-accessor-${x}${u}`};Xf.getImageCacheKey=function(e){e=g(e,g.EMPTY_OBJECT);let{gltf:t,imageId:n,gltfResource:i,baseResource:o}=e;return C.typeOf.object("options.gltf",t),C.typeOf.number("options.imageId",n),C.typeOf.object("options.gltfResource",i),C.typeOf.object("options.baseResource",o),`image:${Lte(t,n,i,o)}`};Xf.getTextureCacheKey=function(e){e=g(e,g.EMPTY_OBJECT);let{gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,frameState:s}=e;C.typeOf.object("options.gltf",t),C.typeOf.object("options.textureInfo",n),C.typeOf.object("options.gltfResource",i),C.typeOf.object("options.baseResource",o),C.typeOf.object("options.supportedImageFormats",r),C.typeOf.object("options.frameState",s);let a=n.index,l=zl.getImageIdFromTexture({gltf:t,textureId:a,supportedImageFormats:r}),u=Lte(t,l,i,o),f=G2e(t,n);return`texture:${u}-sampler-${f}-context-${s.context.id}`};var Vl=Xf;function TA(){this.geometryByteLength=0,this.texturesByteLength=0,this._geometrySizes={},this._textureSizes={}}TA.prototype.clear=function(){this.geometryByteLength=0,this.texturesByteLength=0,this._geometrySizes={},this._textureSizes={}};TA.prototype.addGeometryLoader=function(e){C.typeOf.object("loader",e);let t=e.cacheKey;if(this._geometrySizes.hasOwnProperty(t))return;this._geometrySizes[t]=0;let n=e.buffer,i=e.typedArray,o=0;c(n)&&(o+=n.sizeInBytes),c(i)&&(o+=i.byteLength),this.geometryByteLength+=o,this._geometrySizes[t]=o};TA.prototype.addTextureLoader=function(e){C.typeOf.object("loader",e);let t=e.cacheKey;if(this._textureSizes.hasOwnProperty(t))return;this._textureSizes[t]=0;let n=e.texture.sizeInBytes;this.texturesByteLength+=e.texture.sizeInBytes,this._textureSizes[t]=n};TA.prototype.removeLoader=function(e){C.typeOf.object("loader",e);let t=e.cacheKey,n=this._geometrySizes[t];delete this._geometrySizes[t],c(n)&&(this.geometryByteLength-=n);let i=this._textureSizes[t];delete this._textureSizes[t],c(i)&&(this.texturesByteLength-=i)};var qL=TA;function In(){}In.cacheEntries={};In.statistics=new qL;function W2e(e){this.referenceCount=1,this.resourceLoader=e,this._statisticsPromise=void 0}In.get=function(e){C.typeOf.string("cacheKey",e);let t=In.cacheEntries[e];if(c(t))return++t.referenceCount,t.resourceLoader};In.add=function(e){C.typeOf.object("resourceLoader",e);let t=e.cacheKey;if(C.typeOf.string("options.resourceLoader.cacheKey",t),c(In.cacheEntries[t]))throw new w(`Resource with this cacheKey is already in the cache: ${t}`);return In.cacheEntries[t]=new W2e(e),e};In.unload=function(e){C.typeOf.object("resourceLoader",e);let t=e.cacheKey,n=In.cacheEntries[t];if(!c(n))throw new w(`Resource is not in the cache: ${t}`);--n.referenceCount,n.referenceCount===0&&(In.statistics.removeLoader(e),e.destroy(),delete In.cacheEntries[t])};In.getSchemaLoader=function(e){e=g(e,g.EMPTY_OBJECT);let{schema:t,resource:n}=e;if(c(t)===c(n))throw new w("One of options.schema and options.resource must be defined.");let i=Vl.getSchemaCacheKey({schema:t,resource:n}),o=In.get(i);return c(o)?o:(o=new bA({schema:t,resource:n,cacheKey:i}),In.add(o))};In.getEmbeddedBufferLoader=function(e){e=g(e,g.EMPTY_OBJECT);let{parentResource:t,bufferId:n,typedArray:i}=e;C.typeOf.object("options.parentResource",t),C.typeOf.number("options.bufferId",n);let o=Vl.getEmbeddedBufferCacheKey({parentResource:t,bufferId:n}),r=In.get(o);return c(r)?r:(C.typeOf.object("options.typedArray",i),r=new OT({typedArray:i,cacheKey:o}),In.add(r))};In.getExternalBufferLoader=function(e){e=g(e,g.EMPTY_OBJECT);let{resource:t}=e;C.typeOf.object("options.resource",t);let n=Vl.getExternalBufferCacheKey({resource:t}),i=In.get(n);return c(i)?i:(i=new OT({resource:t,cacheKey:n}),In.add(i))};In.getGltfJsonLoader=function(e){e=g(e,g.EMPTY_OBJECT);let{gltfResource:t,baseResource:n,typedArray:i,gltfJson:o}=e;C.typeOf.object("options.gltfResource",t),C.typeOf.object("options.baseResource",n);let r=Vl.getGltfCacheKey({gltfResource:t}),s=In.get(r);return c(s)?s:(s=new dA({resourceCache:In,gltfResource:t,baseResource:n,typedArray:i,gltfJson:o,cacheKey:r}),In.add(s))};In.getBufferViewLoader=function(e){e=g(e,g.EMPTY_OBJECT);let{gltf:t,bufferViewId:n,gltfResource:i,baseResource:o}=e;C.typeOf.object("options.gltf",t),C.typeOf.number("options.bufferViewId",n),C.typeOf.object("options.gltfResource",i),C.typeOf.object("options.baseResource",o);let r=Vl.getBufferViewCacheKey({gltf:t,bufferViewId:n,gltfResource:i,baseResource:o}),s=In.get(r);return c(s)?s:(s=new aA({resourceCache:In,gltf:t,bufferViewId:n,gltfResource:i,baseResource:o,cacheKey:r}),In.add(s))};In.getDracoLoader=function(e){e=g(e,g.EMPTY_OBJECT);let{gltf:t,draco:n,gltfResource:i,baseResource:o}=e;C.typeOf.object("options.gltf",t),C.typeOf.object("options.draco",n),C.typeOf.object("options.gltfResource",i),C.typeOf.object("options.baseResource",o);let r=Vl.getDracoCacheKey({gltf:t,draco:n,gltfResource:i,baseResource:o}),s=In.get(r);return c(s)?s:(s=new cA({resourceCache:In,gltf:t,draco:n,gltfResource:i,baseResource:o,cacheKey:r}),In.add(s))};In.getVertexBufferLoader=function(e){e=g(e,g.EMPTY_OBJECT);let{gltf:t,gltfResource:n,baseResource:i,frameState:o,bufferViewId:r,draco:s,attributeSemantic:a,accessorId:l,asynchronous:u=!0,dequantize:f=!1,loadBuffer:h=!1,loadTypedArray:m=!1}=e;if(C.typeOf.object("options.gltf",t),C.typeOf.object("options.gltfResource",n),C.typeOf.object("options.baseResource",i),C.typeOf.object("options.frameState",o),!h&&!m)throw new w("At least one of loadBuffer and loadTypedArray must be true.");let p=c(r),_=q2e(s,a),b=c(a),x=c(l);if(p===_)throw new w("One of options.bufferViewId and options.draco must be defined.");if(_&&!b)throw new w("When options.draco is defined options.attributeSemantic must also be defined.");if(_&&!x)throw new w("When options.draco is defined options.haAccessorId must also be defined.");_&&(C.typeOf.object("options.draco",s),C.typeOf.string("options.attributeSemantic",a),C.typeOf.number("options.accessorId",l));let T=Vl.getVertexBufferCacheKey({gltf:t,gltfResource:n,baseResource:i,frameState:o,bufferViewId:r,draco:s,attributeSemantic:a,dequantize:f,loadBuffer:h,loadTypedArray:m}),E=In.get(T);return c(E)?E:(E=new gA({resourceCache:In,gltf:t,gltfResource:n,baseResource:i,bufferViewId:r,draco:s,attributeSemantic:a,accessorId:l,cacheKey:T,asynchronous:u,dequantize:f,loadBuffer:h,loadTypedArray:m}),In.add(E))};function q2e(e,t){return c(e)&&c(e.attributes)&&c(e.attributes[t])}In.getIndexBufferLoader=function(e){e=g(e,g.EMPTY_OBJECT);let{gltf:t,accessorId:n,gltfResource:i,baseResource:o,frameState:r,draco:s,asynchronous:a=!0,loadBuffer:l=!1,loadTypedArray:u=!1}=e;if(C.typeOf.object("options.gltf",t),C.typeOf.number("options.accessorId",n),C.typeOf.object("options.gltfResource",i),C.typeOf.object("options.baseResource",o),C.typeOf.object("options.frameState",r),!l&&!u)throw new w("At least one of loadBuffer and loadTypedArray must be true.");let f=Vl.getIndexBufferCacheKey({gltf:t,accessorId:n,gltfResource:i,baseResource:o,frameState:r,draco:s,loadBuffer:l,loadTypedArray:u}),h=In.get(f);return c(h)?h:(h=new uA({resourceCache:In,gltf:t,accessorId:n,gltfResource:i,baseResource:o,draco:s,cacheKey:f,asynchronous:a,loadBuffer:l,loadTypedArray:u}),In.add(h))};In.getImageLoader=function(e){e=g(e,g.EMPTY_OBJECT);let{gltf:t,imageId:n,gltfResource:i,baseResource:o}=e;C.typeOf.object("options.gltf",t),C.typeOf.number("options.imageId",n),C.typeOf.object("options.gltfResource",i),C.typeOf.object("options.baseResource",o);let r=Vl.getImageCacheKey({gltf:t,imageId:n,gltfResource:i,baseResource:o}),s=In.get(r);return c(s)?s:(s=new lA({resourceCache:In,gltf:t,imageId:n,gltfResource:i,baseResource:o,cacheKey:r}),In.add(s))};In.getTextureLoader=function(e){e=g(e,g.EMPTY_OBJECT);let{gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,frameState:s,asynchronous:a=!0}=e;C.typeOf.object("options.gltf",t),C.typeOf.object("options.textureInfo",n),C.typeOf.object("options.gltfResource",i),C.typeOf.object("options.baseResource",o),C.typeOf.object("options.supportedImageFormats",r),C.typeOf.object("options.frameState",s);let l=Vl.getTextureCacheKey({gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,frameState:s}),u=In.get(l);return c(u)?u:(u=new _A({resourceCache:In,gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,cacheKey:l,asynchronous:a}),In.add(u))};In.clearForSpecs=function(){let e=[gA,uA,cA,_A,lA,aA,OT,bA,dA],t,n=In.cacheEntries,i=[];for(t in n)n.hasOwnProperty(t)&&i.push(n[t]);i.sort(function(r,s){let a=e.indexOf(r.resourceLoader.constructor),l=e.indexOf(s.resourceLoader.constructor);return a-l});let o=i.length;for(let r=0;r<o;++r){let s=i[r];t=s.resourceLoader.cacheKey,c(n[t])&&(s.resourceLoader.destroy(),delete n[t])}In.statistics.clear()};var Fi=In;function zs(e,t,n){C.typeOf.object("resource",e),C.typeOf.object("implicitTileset",t),C.typeOf.object("implicitCoordinates",n),this._resource=e,this._subtreeJson=void 0,this._bufferLoader=void 0,this._tileAvailability=void 0,this._contentAvailabilityBitstreams=[],this._childSubtreeAvailability=void 0,this._implicitCoordinates=n,this._subtreeLevels=t.subtreeLevels,this._subdivisionScheme=t.subdivisionScheme,this._branchingFactor=t.branchingFactor,this._metadata=void 0,this._tileMetadataTable=void 0,this._tilePropertyTableJson=void 0,this._contentMetadataTables=[],this._contentPropertyTableJsons=[],this._tileJumpBuffer=void 0,this._contentJumpBuffers=[],this._ready=!1}Object.defineProperties(zs.prototype,{ready:{get:function(){return this._ready}},metadata:{get:function(){return this._metadata}},tileMetadataTable:{get:function(){return this._tileMetadataTable}},tilePropertyTableJson:{get:function(){return this._tilePropertyTableJson}},contentMetadataTables:{get:function(){return this._contentMetadataTables}},contentPropertyTableJsons:{get:function(){return this._contentPropertyTableJsons}},implicitCoordinates:{get:function(){return this._implicitCoordinates}}});zs.prototype.tileIsAvailableAtIndex=function(e){return this._tileAvailability.getBit(e)};zs.prototype.tileIsAvailableAtCoordinates=function(e){let t=this.getTileIndex(e);return this.tileIsAvailableAtIndex(t)};zs.prototype.contentIsAvailableAtIndex=function(e,t){if(t=g(t,0),t<0||t>=this._contentAvailabilityBitstreams.length)throw new w("contentIndex out of bounds.");return this._contentAvailabilityBitstreams[t].getBit(e)};zs.prototype.contentIsAvailableAtCoordinates=function(e,t){let n=this.getTileIndex(e);return this.contentIsAvailableAtIndex(n,t)};zs.prototype.childSubtreeIsAvailableAtIndex=function(e){return this._childSubtreeAvailability.getBit(e)};zs.prototype.childSubtreeIsAvailableAtCoordinates=function(e){let t=this.getChildSubtreeIndex(e);return this.childSubtreeIsAvailableAtIndex(t)};zs.prototype.getLevelOffset=function(e){let t=this._branchingFactor;return(Math.pow(t,e)-1)/(t-1)};zs.prototype.getParentMortonIndex=function(e){let t=2;return this._subdivisionScheme===Jo.OCTREE&&(t=3),e>>t};zs.fromSubtreeJson=async function(e,t,n,i,o){if(C.typeOf.object("resource",e),c(t)===c(n))throw new w("One of json and subtreeView must be defined.");C.typeOf.object("implicitTileset",i),C.typeOf.object("implicitCoordinates",o);let r=new zs(e,i,o),s;c(t)?s={json:t,binary:void 0}:s=Y2e(n);let a=s.json;r._subtreeJson=a;let l;if(ei(a,"3DTILES_metadata"))l=a.extensions["3DTILES_metadata"];else if(c(a.tileMetadata)){let E=a.tileMetadata;l=a.propertyTables[E]}let u=[];if(c(a.contentMetadata)){let E=a.contentMetadata.length;for(let S=0;S<E;S++){let A=a.contentMetadata[S];u.push(a.propertyTables[A])}}let f,h=i.metadataSchema,m=a.subtreeMetadata;if(c(m)){let E=m.class,S=h.classes[E];f=new xL({subtreeMetadata:m,class:S})}r._metadata=f,r._tilePropertyTableJson=l,r._contentPropertyTableJsons=u;let p={constant:0};a.contentAvailabilityHeaders=[],ei(a,"3DTILES_multiple_contents")?a.contentAvailabilityHeaders=a.extensions["3DTILES_multiple_contents"].contentAvailability:Array.isArray(a.contentAvailability)?a.contentAvailabilityHeaders=a.contentAvailability:a.contentAvailabilityHeaders.push(g(a.contentAvailability,p));let _=X2e(a.buffers),b=K2e(a.bufferViews,_);$2e(a,b),c(l)&&Nte(l,b);for(let E=0;E<u.length;E++){let S=u[E];Nte(S,b)}let x=await Z2e(r,_,s.binary),T=Q2e(b,x);return eBe(r,a,i,T),c(l)&&(tBe(r,i,T),iBe(r)),nBe(r,i,T),oBe(r),r._ready=!0,r};function Y2e(e){let n=new DataView(e.buffer,e.byteOffset),i=8,o=n.getUint32(i,!0);i+=8;let r=n.getUint32(i,!0);i+=8;let s=Do(e,i,o);i+=o;let a=e.subarray(i,i+r);return{json:s,binary:a}}function X2e(e){e=c(e)?e:[];for(let t=0;t<e.length;t++){let n=e[t];n.isExternal=c(n.uri),n.isActive=!1}return e}function K2e(e,t){e=c(e)?e:[];for(let n=0;n<e.length;n++){let i=e[n],o=t[i.buffer];i.bufferHeader=o,i.isActive=!1}return e}function $2e(e,t){let n,i=e.tileAvailability;c(i.bitstream)?n=t[i.bitstream]:c(i.bufferView)&&(n=t[i.bufferView]),c(n)&&(n.isActive=!0,n.bufferHeader.isActive=!0);let o=e.contentAvailabilityHeaders;for(let s=0;s<o.length;s++)n=void 0,c(o[s].bitstream)?n=t[o[s].bitstream]:c(o[s].bufferView)&&(n=t[o[s].bufferView]),c(n)&&(n.isActive=!0,n.bufferHeader.isActive=!0);n=void 0;let r=e.childSubtreeAvailability;c(r.bitstream)?n=t[r.bitstream]:c(r.bufferView)&&(n=t[r.bufferView]),c(n)&&(n.isActive=!0,n.bufferHeader.isActive=!0)}function Nte(e,t){let n=e.properties,i;for(let o in n)if(n.hasOwnProperty(o)){let r=n[o],s=g(r.values,r.bufferView);i=t[s],i.isActive=!0,i.bufferHeader.isActive=!0;let a=g(r.stringOffsets,r.stringOffsetBufferView);c(a)&&(i=t[a],i.isActive=!0,i.bufferHeader.isActive=!0);let l=g(r.arrayOffsets,r.arrayOffsetBufferView);c(l)&&(i=t[l],i.isActive=!0,i.bufferHeader.isActive=!0)}}function Z2e(e,t,n){let i=[];for(let o=0;o<t.length;o++){let r=t[o];if(!r.isActive)i.push(Promise.resolve(void 0));else if(r.isExternal){let s=J2e(e,r);i.push(s)}else i.push(Promise.resolve(n))}return Promise.all(i).then(function(o){let r={};for(let s=0;s<o.length;s++){let a=o[s];c(a)&&(r[s]=a)}return r})}async function J2e(e,t){let i=e._resource.getDerivedResource({url:t.uri}),o=Fi.getExternalBufferLoader({resource:i});e._bufferLoader=o;try{await o.load()}catch(r){if(o.isDestroyed())return;throw r}return o.typedArray}function Q2e(e,t){let n={};for(let i=0;i<e.length;i++){let o=e[i];if(!o.isActive)continue;let r=o.byteOffset,s=r+o.byteLength,l=t[o.buffer].subarray(r,s);n[i]=l}return n}function eBe(e,t,n,i){let o=n.branchingFactor,r=n.subtreeLevels,s=(Math.pow(o,r)-1)/(o-1),a=Math.pow(o,r),l=ei(t,"3DTILES_metadata"),u=c(e._tilePropertyTableJson),f=l||u;e._tileAvailability=jj(t.tileAvailability,i,s,f);let h=e._contentPropertyTableJsons.length>0;f=f||h;for(let m=0;m<t.contentAvailabilityHeaders.length;m++){let p=jj(t.contentAvailabilityHeaders[m],i,s,f);e._contentAvailabilityBitstreams.push(p)}e._childSubtreeAvailability=jj(t.childSubtreeAvailability,i,a)}function jj(e,t,n,i){if(c(e.constant))return new oA({constant:!!e.constant,lengthBits:n,availableCount:e.availableCount});let o;return c(e.bitstream)?o=t[e.bitstream]:c(e.bufferView)&&(o=t[e.bufferView]),new oA({bitstream:o,lengthBits:n,availableCount:e.availableCount,computeAvailableCountEnabled:i})}function tBe(e,t,n){let i=e._tilePropertyTableJson,o=e._tileAvailability.availableCount,r=t.metadataSchema,s=i.class,a=r.classes[s];e._tileMetadataTable=new kl({class:a,count:o,properties:i.properties,bufferViews:n})}function nBe(e,t,n){let i=e._contentPropertyTableJsons,o=e._contentAvailabilityBitstreams,r=t.metadataSchema,s=e._contentMetadataTables;for(let a=0;a<i.length;a++){let l=i[a],f=o[a].availableCount,h=l.class,m=r.classes[h],p=new kl({class:m,count:f,properties:l.properties,bufferViews:n});s.push(p)}}function Fte(e){let t=0,n=e.lengthBits,i=e.availableCount,o;i<256?o=new Uint8Array(n):i<65536?o=new Uint16Array(n):o=new Uint32Array(n);for(let r=0;r<e.lengthBits;r++)e.getBit(r)&&(o[r]=t,t++);return o}function iBe(e){let t=Fte(e._tileAvailability);e._tileJumpBuffer=t}function oBe(e){let t=e._contentJumpBuffers,n=e._contentAvailabilityBitstreams;for(let i=0;i<n.length;i++){let o=n[i],r=Fte(o);t.push(r)}}zs.prototype.getTileIndex=function(e){let t=e.level-this._implicitCoordinates.level;if(t<0||this._subtreeLevels<=t)throw new ie("level is out of bounds for this subtree");return e.getSubtreeCoordinates().getOffsetCoordinates(e).tileIndex};zs.prototype.getChildSubtreeIndex=function(e){if(e.level-this._implicitCoordinates.level!==this._implicitCoordinates.subtreeLevels)throw new ie("level is out of bounds for this subtree");return e.getParentSubtreeCoordinates().getOffsetCoordinates(e).mortonIndex};function rBe(e,t){if(!c(e._tileMetadataTable))return;let n=e.getTileIndex(t);if(e._tileAvailability.getBit(n))return e._tileJumpBuffer[n]}function sBe(e,t,n){let i=e._contentMetadataTables;if(!c(i))return;let o=i[n];if(!c(o))return;let r=e._contentAvailabilityBitstreams[n],s=e.getTileIndex(t);if(r.getBit(s))return e._contentJumpBuffers[n][s]}zs.prototype.getTileMetadataView=function(e){let t=rBe(this,e);if(!c(t))return;let n=this._tileMetadataTable;return new rA({class:n.class,metadataTable:n,entityId:t,propertyTableJson:this._tilePropertyTableJson})};zs.prototype.getContentMetadataView=function(e,t){let n=sBe(this,e,t);if(!c(n))return;let i=this._contentMetadataTables[t],o=this._contentPropertyTableJsons[t];return new rA({class:i.class,metadataTable:i,entityId:n,contentIndex:t,propertyTableJson:o})};zs.prototype.isDestroyed=function(){return!1};zs.prototype.destroy=function(){return c(this._bufferLoader)&&Fi.unload(this._bufferLoader),ue(this)};var FT=zs;var aBe={ID:"ID",NAME:"NAME",DESCRIPTION:"DESCRIPTION",TILESET_TILE_COUNT:"TILESET_TILE_COUNT",TILE_BOUNDING_BOX:"TILE_BOUNDING_BOX",TILE_BOUNDING_REGION:"TILE_BOUNDING_REGION",TILE_BOUNDING_SPHERE:"TILE_BOUNDING_SPHERE",TILE_MINIMUM_HEIGHT:"TILE_MINIMUM_HEIGHT",TILE_MAXIMUM_HEIGHT:"TILE_MAXIMUM_HEIGHT",TILE_HORIZON_OCCLUSION_POINT:"TILE_HORIZON_OCCLUSION_POINT",TILE_GEOMETRIC_ERROR:"TILE_GEOMETRIC_ERROR",CONTENT_BOUNDING_BOX:"CONTENT_BOUNDING_BOX",CONTENT_BOUNDING_REGION:"CONTENT_BOUNDING_REGION",CONTENT_BOUNDING_SPHERE:"CONTENT_BOUNDING_SPHERE",CONTENT_MINIMUM_HEIGHT:"CONTENT_MINIMUM_HEIGHT",CONTENT_MAXIMUM_HEIGHT:"CONTENT_MAXIMUM_HEIGHT",CONTENT_HORIZON_OCCLUSION_POINT:"CONTENT_HORIZON_OCCLUSION_POINT"},BT=Object.freeze(aBe);var Kf={};Kf.parseAllBoundingVolumeSemantics=function(e){return C.typeOf.object("tileMetadata",e),{tile:{boundingVolume:Kf.parseBoundingVolumeSemantic("TILE",e),minimumHeight:Kf._parseMinimumHeight("TILE",e),maximumHeight:Kf._parseMaximumHeight("TILE",e)},content:{boundingVolume:Kf.parseBoundingVolumeSemantic("CONTENT",e),minimumHeight:Kf._parseMinimumHeight("CONTENT",e),maximumHeight:Kf._parseMaximumHeight("CONTENT",e)}}};Kf.parseBoundingVolumeSemantic=function(e,t){if(C.typeOf.string("prefix",e),e!=="TILE"&&e!=="CONTENT")throw new w("prefix must be either 'TILE' or 'CONTENT'");C.typeOf.object("tileMetadata",t);let n=`${e}_BOUNDING_BOX`,i=t.getPropertyBySemantic(n);if(c(i))return{box:i};let o=`${e}_BOUNDING_REGION`,r=t.getPropertyBySemantic(o);if(c(r))return{region:r};let s=`${e}_BOUNDING_SPHERE`,a=t.getPropertyBySemantic(s);if(c(a))return{sphere:a}};Kf._parseMinimumHeight=function(e,t){if(C.typeOf.string("prefix",e),e!=="TILE"&&e!=="CONTENT")throw new w("prefix must be either 'TILE' or 'CONTENT'");C.typeOf.object("tileMetadata",t);let n=`${e}_MINIMUM_HEIGHT`;return t.getPropertyBySemantic(n)};Kf._parseMaximumHeight=function(e,t){if(C.typeOf.string("prefix",e),e!=="TILE"&&e!=="CONTENT")throw new w("prefix must be either 'TILE' or 'CONTENT'");C.typeOf.object("tileMetadata",t);let n=`${e}_MAXIMUM_HEIGHT`;return t.getPropertyBySemantic(n)};var kT=Kf;function mc(e,t,n){C.defined("tile.implicitTileset",t.implicitTileset),C.defined("tile.implicitCoordinates",t.implicitCoordinates);let i=t.implicitTileset,o=t.implicitCoordinates;this._implicitTileset=i,this._implicitCoordinates=o,this._implicitSubtree=void 0,this._tileset=e,this._tile=t,this._resource=n,this._metadata=void 0,this.featurePropertiesDirty=!1,this._group=void 0;let r=o.getTemplateValues(),s=i.subtreeUriTemplate.getDerivedResource({templateValues:r});this._url=s.getUrlComponent(!0),this._ready=!1}Object.defineProperties(mc.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._url}},metadata:{get:function(){},set:function(){throw new w("Implicit3DTileContent cannot have metadata")}},batchTable:{get:function(){}},group:{get:function(){return this._group},set:function(e){this._group=e}}});mc.fromSubtreeJson=async function(e,t,n,i,o,r){if(C.defined("tile.implicitTileset",t.implicitTileset),C.defined("tile.implicitCoordinates",t.implicitCoordinates),c(i)===c(o))throw new w("One of json and arrayBuffer must be defined.");r=g(r,0);let s;c(o)&&(s=new Uint8Array(o,r));let a=t.implicitTileset,l=t.implicitCoordinates,u=await FT.fromSubtreeJson(n,i,s,a,l),f=new mc(e,t,n);return f._implicitSubtree=u,cBe(f,u),f._ready=!0,f};function cBe(e,t){let n=e._tile,i=e._implicitCoordinates.childIndex,o=uBe(e,t,n,i),r=e._tileset.statistics;n.children.push(o.rootTile),r.numberOfTilesTotal++;let s=lBe(e,t,o.bottomRow);for(let a=0;a<s.length;a++){let l=s[a],u=l.tile,f=bBe(e,u,l.childIndex);u.children.push(f),r.numberOfTilesTotal++}}function lBe(e,t,n){let i=[],o=e._implicitTileset.branchingFactor;for(let r=0;r<n.length;r++){let s=n[r];if(c(s))for(let a=0;a<o;a++){let l=r*o+a;t.childSubtreeIsAvailableAtIndex(l)&&i.push({tile:s,childIndex:a})}}return i}function uBe(e,t,n,i){let s=Bte(e,t,n,i,0,!0),a=e._tileset.statistics,l=[s],u=[],f=e._implicitTileset;for(let h=1;h<f.subtreeLevels;h++){let m=t.getLevelOffset(h),p=f.branchingFactor*l.length;for(let _=0;_<p;_++){let b=m+_;if(!t.tileIsAvailableAtIndex(b)){u.push(void 0);continue}let x=t.getParentMortonIndex(_),T=l[x],E=_%f.branchingFactor,S=Bte(e,t,T,E,b);T.children.push(S),a.numberOfTilesTotal++,u.push(S)}l=u,u=[]}return{rootTile:s,bottomRow:l}}function kte(e,t,n){let i=BT.TILE_GEOMETRIC_ERROR;return c(e)&&e.hasPropertyBySemantic(i)?e.getPropertyBySemantic(i):t.geometricError/Math.pow(2,n.level)}function Bte(e,t,n,i,o,r){let s=e._implicitTileset,a;g(r,!1)?a=n.implicitCoordinates:a=n.implicitCoordinates.getChildCoordinates(i);let l,u,f;if(c(t.tilePropertyTableJson)){l=t.getTileMetadataView(a);let D=kT.parseAllBoundingVolumeSemantics(l);u=D.tile,f=D.content}let m=t.contentPropertyTableJsons.length,p=!1;for(let D=0;D<m;D++)if(t.contentIsAvailableAtCoordinates(a,D)){p=!0;break}let _=hBe(s,a,i,r,n,u),b=[];for(let D=0;D<s.contentCount;D++){if(!t.contentIsAvailableAtIndex(o,D))continue;let L={uri:s.contentUriTemplates[D].getDerivedResource({templateValues:a.getTemplateValues()}).url},F=mBe(_,f);c(F)&&(L.boundingVolume=F),b.push(bt(L,s.contentHeaders[D]))}let x=kte(l,s,a),T={boundingVolume:_,geometricError:x,refine:s.refine,contents:b},E=!0,S=ze(s.tileHeader,E);delete S.boundingVolume,delete S.transform,delete S.metadata;let A=bt(T,S,E),v=Gte(e,s.baseResource,A,n);return v.implicitCoordinates=a,v.implicitSubtree=t,v.metadata=l,v.hasImplicitContentMetadata=p,v}function YL(e,t){return c(e)&&c(t)&&(c(t.minimumHeight)||c(t.maximumHeight))&&(ei(e,"3DTILES_bounding_volume_S2")||c(e.region))}function qj(e,t){c(t)&&(ei(e,"3DTILES_bounding_volume_S2")?dBe(e.extensions["3DTILES_bounding_volume_S2"],t.minimumHeight,t.maximumHeight):c(e.region)&&fBe(e.region,t.minimumHeight,t.maximumHeight))}function fBe(e,t,n){c(t)&&(e[4]=t),c(n)&&(e[5]=n)}function dBe(e,t,n){c(t)&&(e.minimumHeight=t),c(n)&&(e.maximumHeight=n)}function hBe(e,t,n,i,o,r){let s;return!c(r)||!c(r.boundingVolume)||!YL(r.boundingVolume,r)&&YL(e.boundingVolume,r)?s=Ute(e,t,n,g(i,!1),o):s=r.boundingVolume,qj(s,r),s}function mBe(e,t){let n;return c(t)&&(n=t.boundingVolume),YL(n,t)?qj(n,t):YL(e,t)&&(n=ze(e,!0),qj(n,t)),n}function Ute(e,t,n,i,o){let r=e.boundingVolume;return ei(r,"3DTILES_bounding_volume_S2")?zte(i,o,n,t.level,t.x,t.y,t.z):c(r.region)?{region:Hte(r.region,t.level,t.x,t.y,t.z)}:{box:Vte(r.box,t.level,t.x,t.y,t.z)}}function zte(e,t,n,i,o,r,s){C.typeOf.bool("parentIsPlaceholderTile",e),C.typeOf.object("parentTile",t),C.typeOf.number("childIndex",n),C.typeOf.number("level",i),C.typeOf.number("x",o),C.typeOf.number("y",r),c(s)&&C.typeOf.number("z",s);let a=t._boundingVolume;if(e)return{extensions:{"3DTILES_bounding_volume_S2":{token:z_.getTokenFromId(a.s2Cell._cellId),minimumHeight:a.minimumHeight,maximumHeight:a.maximumHeight}}};let l=Number(t._boundingVolume.s2Cell._cellId>>BigInt(61)),u=l%2===0?iA.encode2D(i,o,r):iA.encode2D(i,r,o),f=z_.fromFacePositionLevel(l,BigInt(u),i),h,m;if(c(s)){let p=(a.maximumHeight+a.minimumHeight)/2;h=n<4?a.minimumHeight:p,m=n<4?p:a.maximumHeight}else h=a.minimumHeight,m=a.maximumHeight;return{extensions:{"3DTILES_bounding_volume_S2":{token:z_.getTokenFromId(f._cellId),minimumHeight:h,maximumHeight:m}}}}var pBe=new d,_Be=new d,Wj=new d,gBe=new q;function Vte(e,t,n,i,o){if(C.typeOf.object("rootBox",e),C.typeOf.number("level",t),C.typeOf.number("x",n),C.typeOf.number("y",i),c(o)&&C.typeOf.number("z",o),t===0)return e;let r=d.unpack(e,0,_Be),s=q.unpack(e,3,gBe),a=Math.pow(2,-t),l=-1+(2*n+1)*a,u=-1+(2*i+1)*a,f=0,h=d.fromElements(a,a,1,pBe);c(o)&&(f=-1+(2*o+1)*a,h.z=a);let m=d.fromElements(l,u,f,Wj);m=q.multiplyByVector(s,m,Wj),m=d.add(m,r,Wj);let p=q.clone(s);p=q.multiplyByScale(p,h,p);let _=new Array(12);return d.pack(m,_),q.pack(p,_,3),_}var yBe=new te;function Hte(e,t,n,i,o){if(C.typeOf.object("rootRegion",e),C.typeOf.number("level",t),C.typeOf.number("x",n),C.typeOf.number("y",i),c(o)&&C.typeOf.number("z",o),t===0)return e.slice();let r=te.unpack(e,0,yBe),s=e[4],a=e[5],l=Math.pow(2,-t),u=l*r.width,f=O.negativePiToPi(r.west+n*u),h=O.negativePiToPi(f+u),m=l*r.height,p=O.negativePiToPi(r.south+i*m),_=O.negativePiToPi(p+m),b=s,x=a;if(c(o)){let T=l*(a-s);b+=o*T,x=b+T}return[f,p,h,_,b,x]}function bBe(e,t,n){let i=e._implicitTileset,o=t.implicitCoordinates.getChildCoordinates(n),r=Ute(i,o,n,!1,t),s=kte(void 0,i,o),a=i.subtreeUriTemplate.getDerivedResource({templateValues:o.getTemplateValues()}).url,l={boundingVolume:r,geometricError:s,refine:i.refine,contents:[{uri:a}]},u=Gte(e,i.baseResource,l,t);return u.implicitTileset=i,u.implicitCoordinates=o,u}function Gte(e,t,n,i){let o=e._tile.constructor;return new o(e._tileset,t,n,i)}mc.prototype.hasProperty=function(e,t){return!1};mc.prototype.getFeature=function(e){};mc.prototype.applyDebugSettings=function(e,t){};mc.prototype.applyStyle=function(e){};mc.prototype.update=function(e,t){};mc.prototype.pick=function(e,t,n){};mc.prototype.isDestroyed=function(){return!1};mc.prototype.destroy=function(){return this._implicitSubtree=this._implicitSubtree&&this._implicitSubtree.destroy(),ue(this)};mc._deriveBoundingBox=Vte;mc._deriveBoundingRegion=Hte;mc._deriveBoundingVolumeS2=zte;var CA=mc;var xBe={NONE:0,REPEAT:1,MIRRORED_REPEAT:2},Hl=Object.freeze(xBe);function UT(e,t){C.typeOf.object("normal",e),C.typeOf.number("distance",t),this._distance=t,this._normal=new jte(e,this),this.onChangeCallback=void 0,this.index=-1}Object.defineProperties(UT.prototype,{distance:{get:function(){return this._distance},set:function(e){C.typeOf.number("value",e),c(this.onChangeCallback)&&e!==this._distance&&this.onChangeCallback(this.index),this._distance=e}},normal:{get:function(){return this._normal},set:function(e){C.typeOf.object("value",e),c(this.onChangeCallback)&&!d.equals(this._normal._cartesian3,e)&&this.onChangeCallback(this.index),d.clone(e,this._normal._cartesian3)}}});UT.fromPlane=function(e,t){return C.typeOf.object("plane",e),c(t)?(t.normal=e.normal,t.distance=e.distance):t=new UT(e.normal,e.distance),t};UT.clone=function(e,t){return c(t)?(t.normal=e.normal,t.distance=e.distance,t):new UT(e.normal,e.distance)};function jte(e,t){this._clippingPlane=t,this._cartesian3=d.clone(e)}Object.defineProperties(jte.prototype,{x:{get:function(){return this._cartesian3.x},set:function(e){C.typeOf.number("value",e),c(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.x&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.x=e}},y:{get:function(){return this._cartesian3.y},set:function(e){C.typeOf.number("value",e),c(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.y&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.y=e}},z:{get:function(){return this._cartesian3.z},set:function(e){C.typeOf.number("value",e),c(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.z&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.z=e}}});var zT=UT;function Na(e){e=g(e,g.EMPTY_OBJECT),this._planes=[],this._dirtyIndex=-1,this._multipleDirtyPlanes=!1,this._enabled=g(e.enabled,!0),this.modelMatrix=N.clone(g(e.modelMatrix,N.IDENTITY)),this.edgeColor=z.clone(g(e.edgeColor,z.WHITE)),this.edgeWidth=g(e.edgeWidth,0),this.planeAdded=new fe,this.planeRemoved=new fe,this._owner=void 0;let t=g(e.unionClippingRegions,!1);this._unionClippingRegions=t,this._testIntersection=t?Kte:$te,this._uint8View=void 0,this._float32View=void 0,this._clippingPlanesTexture=void 0;let n=e.planes;if(c(n)){let i=n.length;for(let o=0;o<i;++o)this.add(n[o])}}function Kte(e){return e===Gt.OUTSIDE}function $te(e){return e===Gt.INSIDE}Object.defineProperties(Na.prototype,{length:{get:function(){return this._planes.length}},unionClippingRegions:{get:function(){return this._unionClippingRegions},set:function(e){this._unionClippingRegions!==e&&(this._unionClippingRegions=e,this._testIntersection=e?Kte:$te)}},enabled:{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e)}},texture:{get:function(){return this._clippingPlanesTexture}},owner:{get:function(){return this._owner}},clippingPlanesState:{get:function(){return this._unionClippingRegions?this._planes.length:-this._planes.length}}});function Wte(e,t){e._multipleDirtyPlanes=e._multipleDirtyPlanes||e._dirtyIndex!==-1&&e._dirtyIndex!==t,e._dirtyIndex=t}Na.prototype.add=function(e){let t=this._planes.length,n=this;e.onChangeCallback=function(i){Wte(n,i)},e.index=t,Wte(this,t),this._planes.push(e),this.planeAdded.raiseEvent(e,t)};Na.prototype.get=function(e){return C.typeOf.number("index",e),this._planes[e]};function Zte(e,t){let n=e.length;for(let i=0;i<n;++i)if(on.equals(e[i],t))return i;return-1}Na.prototype.contains=function(e){return Zte(this._planes,e)!==-1};Na.prototype.remove=function(e){let t=this._planes,n=Zte(t,e);if(n===-1)return!1;e instanceof zT&&(e.onChangeCallback=void 0,e.index=-1);let i=t.length-1;for(let o=n;o<i;++o){let r=t[o+1];t[o]=r,r instanceof zT&&(r.index=o)}return this._multipleDirtyPlanes=!0,t.length=i,this.planeRemoved.raiseEvent(e,n),!0};Na.prototype.removeAll=function(){let e=this._planes,t=e.length;for(let n=0;n<t;++n){let i=e[n];i instanceof zT&&(i.onChangeCallback=void 0,i.index=-1),this.planeRemoved.raiseEvent(i,n)}this._multipleDirtyPlanes=!0,this._planes=[]};var TBe=new ee,CBe=new ee;function qte(e,t,n){let i=e._uint8View,o=e._planes,r=0;for(let s=t;s<n;++s){let a=o[s],l=On.octEncodeToCartesian4(a.normal,CBe);i[r]=l.x,i[r+1]=l.y,i[r+2]=l.z,i[r+3]=l.w;let u=ee.packFloat(a.distance,TBe);i[r+4]=u.x,i[r+5]=u.y,i[r+6]=u.z,i[r+7]=u.w,r+=8}}function Yte(e,t,n){let i=e._float32View,o=e._planes,r=0;for(let s=t;s<n;++s){let a=o[s],l=a.normal;i[r]=l.x,i[r+1]=l.y,i[r+2]=l.z,i[r+3]=a.distance,r+=4}}function Jte(e,t){let n=ht.maximumTextureSize;return t.x=Math.min(e,n),t.y=Math.ceil(e/t.x),t}var EBe=new k;Na.prototype.update=function(e){let t=this._clippingPlanesTexture,n=e.context,i=Na.useFloatTexture(n),o=i?this.length:this.length*2;if(c(t)){let s=t.width*t.height;(s<o||o<.25*s)&&(t.destroy(),t=void 0,this._clippingPlanesTexture=void 0)}if(this.length===0)return;if(!c(t)){let s=Jte(o,EBe);s.y*=2,i?(t=new Ot({context:n,width:s.x,height:s.y,pixelFormat:Re.RGBA,pixelDatatype:Ne.FLOAT,sampler:Jt.NEAREST,flipY:!1}),this._float32View=new Float32Array(s.x*s.y*4)):(t=new Ot({context:n,width:s.x,height:s.y,pixelFormat:Re.RGBA,pixelDatatype:Ne.UNSIGNED_BYTE,sampler:Jt.NEAREST,flipY:!1}),this._uint8View=new Uint8Array(s.x*s.y*4)),this._clippingPlanesTexture=t,this._multipleDirtyPlanes=!0}let r=this._dirtyIndex;if(!(!this._multipleDirtyPlanes&&r===-1)){if(this._multipleDirtyPlanes)i?(Yte(this,0,this._planes.length),t.copyFrom({source:{width:t.width,height:t.height,arrayBufferView:this._float32View}})):(qte(this,0,this._planes.length),t.copyFrom({source:{width:t.width,height:t.height,arrayBufferView:this._uint8View}}));else{let s=0,a=0;i?(a=Math.floor(r/t.width),s=Math.floor(r-a*t.width),Yte(this,r,r+1),t.copyFrom({source:{width:1,height:1,arrayBufferView:this._float32View},xOffset:s,yOffset:a})):(a=Math.floor(r*2/t.width),s=Math.floor(r*2-a*t.width),qte(this,r,r+1),t.copyFrom({source:{width:2,height:1,arrayBufferView:this._uint8View},xOffset:s,yOffset:a}))}this._multipleDirtyPlanes=!1,this._dirtyIndex=-1}};var wBe=new N,Xte=new on(d.UNIT_X,0);Na.prototype.computeIntersectionWithBoundingVolume=function(e,t){let n=this._planes,i=n.length,o=this.modelMatrix;c(t)&&(o=N.multiply(t,o,wBe));let r=Gt.INSIDE;!this.unionClippingRegions&&i>0&&(r=Gt.OUTSIDE);for(let s=0;s<i;++s){let a=n[s];on.transform(a,o,Xte);let l=e.intersectPlane(Xte);if(l===Gt.INTERSECTING)r=l;else if(this._testIntersection(l))return l}return r};Na.setOwner=function(e,t,n){if(e!==t[n]&&(t[n]=t[n]&&t[n].destroy(),c(e))){if(c(e._owner))throw new w("ClippingPlaneCollection should only be assigned to one object");e._owner=t,t[n]=e}};Na.useFloatTexture=function(e){return e.floatingPointTexture};Na.getTextureResolution=function(e,t,n){let i=e.texture;if(c(i))return n.x=i.width,n.y=i.height,n;let o=Na.useFloatTexture(t)?e.length:e.length*2,r=Jte(o,n);return r.y*=2,r};Na.prototype.isDestroyed=function(){return!1};Na.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),ue(this)};var as=Na;function Kj(e,t,n=2){let i=t&&t.length,o=i?t[0]*n:e.length,r=ene(e,0,o,n,!0),s=[];if(!r||r.next===r.prev)return s;let a,l,u;if(i&&(r=IBe(e,t,r,n)),e.length>80*n){a=1/0,l=1/0;let f=-1/0,h=-1/0;for(let m=n;m<o;m+=n){let p=e[m],_=e[m+1];p<a&&(a=p),_<l&&(l=_),p>f&&(f=p),_>h&&(h=_)}u=Math.max(f-a,h-l),u=u!==0?32767/u:0}return EA(r,s,n,a,l,u,0),s}function ene(e,t,n,i,o){let r;if(o===zBe(e,t,n,i)>0)for(let s=t;s<n;s+=i)r=Qte(s/i|0,e[s],e[s+1],r);else for(let s=n-i;s>=t;s-=i)r=Qte(s/i|0,e[s],e[s+1],r);return r&&$L(r,r.next)&&(SA(r),r=r.next),r}function Ob(e,t){if(!e)return e;t||(t=e);let n=e,i;do if(i=!1,!n.steiner&&($L(n,n.next)||Sr(n.prev,n,n.next)===0)){if(SA(n),n=t=n.prev,n===n.next)break;i=!0}else n=n.next;while(i||n!==t);return t}function EA(e,t,n,i,o,r,s){if(!e)return;!s&&r&&LBe(e,i,o,r);let a=e;for(;e.prev!==e.next;){let l=e.prev,u=e.next;if(r?ABe(e,i,o,r):SBe(e)){t.push(l.i,e.i,u.i),SA(e),e=u.next,a=u.next;continue}if(e=u,e===a){s?s===1?(e=vBe(Ob(e),t),EA(e,t,n,i,o,r,2)):s===2&&DBe(e,t,n,i,o,r):EA(Ob(e),t,n,i,o,r,1);break}}}function SBe(e){let t=e.prev,n=e,i=e.next;if(Sr(t,n,i)>=0)return!1;let o=t.x,r=n.x,s=i.x,a=t.y,l=n.y,u=i.y,f=o<r?o<s?o:s:r<s?r:s,h=a<l?a<u?a:u:l<u?l:u,m=o>r?o>s?o:s:r>s?r:s,p=a>l?a>u?a:u:l>u?l:u,_=i.next;for(;_!==t;){if(_.x>=f&&_.x<=m&&_.y>=h&&_.y<=p&&VT(o,a,r,l,s,u,_.x,_.y)&&Sr(_.prev,_,_.next)>=0)return!1;_=_.next}return!0}function ABe(e,t,n,i){let o=e.prev,r=e,s=e.next;if(Sr(o,r,s)>=0)return!1;let a=o.x,l=r.x,u=s.x,f=o.y,h=r.y,m=s.y,p=a<l?a<u?a:u:l<u?l:u,_=f<h?f<m?f:m:h<m?h:m,b=a>l?a>u?a:u:l>u?l:u,x=f>h?f>m?f:m:h>m?h:m,T=Yj(p,_,t,n,i),E=Yj(b,x,t,n,i),S=e.prevZ,A=e.nextZ;for(;S&&S.z>=T&&A&&A.z<=E;){if(S.x>=p&&S.x<=b&&S.y>=_&&S.y<=x&&S!==o&&S!==s&&VT(a,f,l,h,u,m,S.x,S.y)&&Sr(S.prev,S,S.next)>=0||(S=S.prevZ,A.x>=p&&A.x<=b&&A.y>=_&&A.y<=x&&A!==o&&A!==s&&VT(a,f,l,h,u,m,A.x,A.y)&&Sr(A.prev,A,A.next)>=0))return!1;A=A.nextZ}for(;S&&S.z>=T;){if(S.x>=p&&S.x<=b&&S.y>=_&&S.y<=x&&S!==o&&S!==s&&VT(a,f,l,h,u,m,S.x,S.y)&&Sr(S.prev,S,S.next)>=0)return!1;S=S.prevZ}for(;A&&A.z<=E;){if(A.x>=p&&A.x<=b&&A.y>=_&&A.y<=x&&A!==o&&A!==s&&VT(a,f,l,h,u,m,A.x,A.y)&&Sr(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function vBe(e,t){let n=e;do{let i=n.prev,o=n.next.next;!$L(i,o)&&tne(i,n,n.next,o)&&wA(i,o)&&wA(o,i)&&(t.push(i.i,n.i,o.i),SA(n),SA(n.next),n=e=o),n=n.next}while(n!==e);return Ob(n)}function DBe(e,t,n,i,o,r){let s=e;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&BBe(s,a)){let l=nne(s,a);s=Ob(s,s.next),l=Ob(l,l.next),EA(s,t,n,i,o,r,0),EA(l,t,n,i,o,r,0);return}a=a.next}s=s.next}while(s!==e)}function IBe(e,t,n,i){let o=[];for(let r=0,s=t.length;r<s;r++){let a=t[r]*i,l=r<s-1?t[r+1]*i:e.length,u=ene(e,a,l,i,!1);u===u.next&&(u.steiner=!0),o.push(FBe(u))}o.sort(OBe);for(let r=0;r<o.length;r++)n=PBe(o[r],n);return n}function OBe(e,t){return e.x-t.x}function PBe(e,t){let n=RBe(e,t);if(!n)return t;let i=nne(n,e);return Ob(i,i.next),Ob(n,n.next)}function RBe(e,t){let n=t,i=e.x,o=e.y,r=-1/0,s;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){let h=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(h<=i&&h>r&&(r=h,s=n.x<n.next.x?n:n.next,h===i))return s}n=n.next}while(n!==t);if(!s)return null;let a=s,l=s.x,u=s.y,f=1/0;n=s;do{if(i>=n.x&&n.x>=l&&i!==n.x&&VT(o<u?i:r,o,l,u,o<u?r:i,o,n.x,n.y)){let h=Math.abs(o-n.y)/(i-n.x);wA(n,e)&&(h<f||h===f&&(n.x>s.x||n.x===s.x&&MBe(s,n)))&&(s=n,f=h)}n=n.next}while(n!==a);return s}function MBe(e,t){return Sr(e.prev,e,t.prev)<0&&Sr(t.next,e,e.next)<0}function LBe(e,t,n,i){let o=e;do o.z===0&&(o.z=Yj(o.x,o.y,t,n,i)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next;while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,NBe(o)}function NBe(e){let t,n=1;do{let i=e,o;e=null;let r=null;for(t=0;i;){t++;let s=i,a=0;for(let u=0;u<n&&(a++,s=s.nextZ,!!s);u++);let l=n;for(;a>0||l>0&&s;)a!==0&&(l===0||!s||i.z<=s.z)?(o=i,i=i.nextZ,a--):(o=s,s=s.nextZ,l--),r?r.nextZ=o:e=o,o.prevZ=r,r=o;i=s}r.nextZ=null,n*=2}while(t>1);return e}function Yj(e,t,n,i,o){return e=(e-n)*o|0,t=(t-i)*o|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function FBe(e){let t=e,n=e;do(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next;while(t!==e);return n}function VT(e,t,n,i,o,r,s,a){return(o-s)*(t-a)>=(e-s)*(r-a)&&(e-s)*(i-a)>=(n-s)*(t-a)&&(n-s)*(r-a)>=(o-s)*(i-a)}function BBe(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!kBe(e,t)&&(wA(e,t)&&wA(t,e)&&UBe(e,t)&&(Sr(e.prev,e,t.prev)||Sr(e,t.prev,t))||$L(e,t)&&Sr(e.prev,e,e.next)>0&&Sr(t.prev,t,t.next)>0)}function Sr(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function $L(e,t){return e.x===t.x&&e.y===t.y}function tne(e,t,n,i){let o=KL(Sr(e,t,n)),r=KL(Sr(e,t,i)),s=KL(Sr(n,i,e)),a=KL(Sr(n,i,t));return!!(o!==r&&s!==a||o===0&&XL(e,n,t)||r===0&&XL(e,i,t)||s===0&&XL(n,e,i)||a===0&&XL(n,t,i))}function XL(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function KL(e){return e>0?1:e<0?-1:0}function kBe(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&tne(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function wA(e,t){return Sr(e.prev,e,e.next)<0?Sr(e,t,e.next)>=0&&Sr(e,e.prev,t)>=0:Sr(e,t,e.prev)<0||Sr(e,e.next,t)<0}function UBe(e,t){let n=e,i=!1,o=(e.x+t.x)/2,r=(e.y+t.y)/2;do n.y>r!=n.next.y>r&&n.next.y!==n.y&&o<(n.next.x-n.x)*(r-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next;while(n!==e);return i}function nne(e,t){let n=Xj(e.i,e.x,e.y),i=Xj(t.i,t.x,t.y),o=e.next,r=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,i.next=n,n.prev=i,r.next=i,i.prev=r,i}function Qte(e,t,n,i){let o=Xj(e,t,n);return i?(o.next=i.next,o.prev=i,i.next.prev=o,i.next=o):(o.prev=o,o.next=o),o}function SA(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Xj(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function zBe(e,t,n,i){let o=0;for(let r=t,s=n-i;r<n;r+=i)o+=(e[s]-e[r])*(e[r+1]+e[s+1]),s=r;return o}var VBe=new d,HBe=new d,$_={};$_.computeArea2D=function(e){C.defined("positions",e),C.typeOf.number.greaterThanOrEquals("positions.length",e.length,3);let t=e.length,n=0;for(let i=t-1,o=0;o<t;i=o++){let r=e[i],s=e[o];n+=r.x*s.y-s.x*r.y}return n*.5};$_.computeWindingOrder2D=function(e){return $_.computeArea2D(e)>0?Gr.COUNTER_CLOCKWISE:Gr.CLOCKWISE};$_.triangulate=function(e,t){C.defined("positions",e);let n=k.packArray(e);return Kj(n,t,2)};var sne=new d,ane=new d,cne=new d,ine=new d,one=new d,rne=new d,Qm=new d,lne=new k,une=new k,fne=new k,HT=new k;$_.computeSubdivision=function(e,t,n,i,o){o=g(o,O.RADIANS_PER_DEGREE);let r=c(i);C.typeOf.object("ellipsoid",e),C.defined("positions",t),C.defined("indices",n),C.typeOf.number.greaterThanOrEquals("indices.length",n.length,3),C.typeOf.number.equals("indices.length % 3","0",n.length%3,0),C.typeOf.number.greaterThan("granularity",o,0);let s=n.slice(0),a,l=t.length,u=new Array(l*3),f=new Array(l*2),h=0,m=0;for(a=0;a<l;a++){let S=t[a];if(u[h++]=S.x,u[h++]=S.y,u[h++]=S.z,r){let A=i[a];f[m++]=A.x,f[m++]=A.y}}let p=[],_={},b=e.maximumRadius,x=O.chordLength(o,b),T=x*x;for(;s.length>0;){let S=s.pop(),A=s.pop(),v=s.pop(),D=d.fromArray(u,v*3,sne),R=d.fromArray(u,A*3,ane),P=d.fromArray(u,S*3,cne),L,F,y;r&&(L=k.fromArray(f,v*2,lne),F=k.fromArray(f,A*2,une),y=k.fromArray(f,S*2,fne));let I=d.multiplyByScalar(d.normalize(D,ine),b,ine),M=d.multiplyByScalar(d.normalize(R,one),b,one),B=d.multiplyByScalar(d.normalize(P,rne),b,rne),U=d.magnitudeSquared(d.subtract(I,M,Qm)),V=d.magnitudeSquared(d.subtract(M,B,Qm)),W=d.magnitudeSquared(d.subtract(B,I,Qm)),H=Math.max(U,V,W),X,$,ae;H>T?U===H?(X=`${Math.min(v,A)} ${Math.max(v,A)}`,a=_[X],c(a)||($=d.add(D,R,Qm),d.multiplyByScalar($,.5,$),u.push($.x,$.y,$.z),a=u.length/3-1,_[X]=a,r&&(ae=k.add(L,F,HT),k.multiplyByScalar(ae,.5,ae),f.push(ae.x,ae.y))),s.push(v,a,S),s.push(a,A,S)):V===H?(X=`${Math.min(A,S)} ${Math.max(A,S)}`,a=_[X],c(a)||($=d.add(R,P,Qm),d.multiplyByScalar($,.5,$),u.push($.x,$.y,$.z),a=u.length/3-1,_[X]=a,r&&(ae=k.add(F,y,HT),k.multiplyByScalar(ae,.5,ae),f.push(ae.x,ae.y))),s.push(A,a,v),s.push(a,S,v)):W===H&&(X=`${Math.min(S,v)} ${Math.max(S,v)}`,a=_[X],c(a)||($=d.add(P,D,Qm),d.multiplyByScalar($,.5,$),u.push($.x,$.y,$.z),a=u.length/3-1,_[X]=a,r&&(ae=k.add(y,L,HT),k.multiplyByScalar(ae,.5,ae),f.push(ae.x,ae.y))),s.push(S,a,A),s.push(a,v,A)):(p.push(v),p.push(A),p.push(S))}let E={attributes:{position:new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:u})},indices:p,primitiveType:Se.TRIANGLES};return r&&(E.attributes.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:f})),new st(E)};var GBe=new re,jBe=new re,WBe=new re,$j=new re;$_.computeRhumbLineSubdivision=function(e,t,n,i,o){o=g(o,O.RADIANS_PER_DEGREE);let r=c(i);C.typeOf.object("ellipsoid",e),C.defined("positions",t),C.defined("indices",n),C.typeOf.number.greaterThanOrEquals("indices.length",n.length,3),C.typeOf.number.equals("indices.length % 3","0",n.length%3,0),C.typeOf.number.greaterThan("granularity",o,0);let s=n.slice(0),a,l=t.length,u=new Array(l*3),f=new Array(l*2),h=0,m=0;for(a=0;a<l;a++){let v=t[a];if(u[h++]=v.x,u[h++]=v.y,u[h++]=v.z,r){let D=i[a];f[m++]=D.x,f[m++]=D.y}}let p=[],_={},b=e.maximumRadius,x=O.chordLength(o,b),T=new Pa(void 0,void 0,e),E=new Pa(void 0,void 0,e),S=new Pa(void 0,void 0,e);for(;s.length>0;){let v=s.pop(),D=s.pop(),R=s.pop(),P=d.fromArray(u,R*3,sne),L=d.fromArray(u,D*3,ane),F=d.fromArray(u,v*3,cne),y,I,M;r&&(y=k.fromArray(f,R*2,lne),I=k.fromArray(f,D*2,une),M=k.fromArray(f,v*2,fne));let B=e.cartesianToCartographic(P,GBe),U=e.cartesianToCartographic(L,jBe),V=e.cartesianToCartographic(F,WBe);T.setEndPoints(B,U);let W=T.surfaceDistance;E.setEndPoints(U,V);let H=E.surfaceDistance;S.setEndPoints(V,B);let X=S.surfaceDistance,$=Math.max(W,H,X),ae,se,he,ge,le;$>x?W===$?(ae=`${Math.min(R,D)} ${Math.max(R,D)}`,a=_[ae],c(a)||(se=T.interpolateUsingFraction(.5,$j),he=(B.height+U.height)*.5,ge=d.fromRadians(se.longitude,se.latitude,he,e,Qm),u.push(ge.x,ge.y,ge.z),a=u.length/3-1,_[ae]=a,r&&(le=k.add(y,I,HT),k.multiplyByScalar(le,.5,le),f.push(le.x,le.y))),s.push(R,a,v),s.push(a,D,v)):H===$?(ae=`${Math.min(D,v)} ${Math.max(D,v)}`,a=_[ae],c(a)||(se=E.interpolateUsingFraction(.5,$j),he=(U.height+V.height)*.5,ge=d.fromRadians(se.longitude,se.latitude,he,e,Qm),u.push(ge.x,ge.y,ge.z),a=u.length/3-1,_[ae]=a,r&&(le=k.add(I,M,HT),k.multiplyByScalar(le,.5,le),f.push(le.x,le.y))),s.push(D,a,R),s.push(a,v,R)):X===$&&(ae=`${Math.min(v,R)} ${Math.max(v,R)}`,a=_[ae],c(a)||(se=S.interpolateUsingFraction(.5,$j),he=(V.height+B.height)*.5,ge=d.fromRadians(se.longitude,se.latitude,he,e,Qm),u.push(ge.x,ge.y,ge.z),a=u.length/3-1,_[ae]=a,r&&(le=k.add(M,y,HT),k.multiplyByScalar(le,.5,le),f.push(le.x,le.y))),s.push(v,a,D),s.push(a,R,D)):(p.push(R),p.push(D),p.push(v))}let A={attributes:{position:new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:u})},indices:p,primitiveType:Se.TRIANGLES};return r&&(A.attributes.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:f})),new st(A)};$_.scaleToGeodeticHeight=function(e,t,n,i){n=g(n,Z.default);let o=VBe,r=HBe;if(t=g(t,0),i=g(i,!0),c(e)){let s=e.length;for(let a=0;a<s;a+=3)d.fromArray(e,a,r),i&&(r=n.scaleToGeodeticSurface(r,r)),t!==0&&(o=n.geodeticSurfaceNormal(r,o),d.multiplyByScalar(o,t,o),d.add(r,o,r)),e[a]=r.x,e[a+1]=r.y,e[a+2]=r.z}return e};var ti=$_;function Z_(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(Z_.prototype,{length:{get:function(){return this._length}}});Z_.prototype.enqueue=function(e){this._array.push(e),this._length++};Z_.prototype.dequeue=function(){if(this._length===0)return;let e=this._array,t=this._offset,n=e[t];return e[t]=void 0,t++,t>10&&t*2>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,n};Z_.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};Z_.prototype.contains=function(e){return this._array.indexOf(e)!==-1};Z_.prototype.clear=function(){this._array.length=this._offset=this._length=0};Z_.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var Pb=Z_;var Bo={};Bo.computeHierarchyPackedLength=function(e,t){let n=0,i=[e];for(;i.length>0;){let o=i.pop();if(!c(o))continue;n+=2;let r=o.positions,s=o.holes;if(c(r)&&r.length>0&&(n+=r.length*t.packedLength),c(s)){let a=s.length;for(let l=0;l<a;++l)i.push(s[l])}}return n};Bo.packPolygonHierarchy=function(e,t,n,i){let o=[e];for(;o.length>0;){let r=o.pop();if(!c(r))continue;let s=r.positions,a=r.holes;if(t[n++]=c(s)?s.length:0,t[n++]=c(a)?a.length:0,c(s)){let l=s.length;for(let u=0;u<l;++u,n+=i.packedLength)i.pack(s[u],t,n)}if(c(a)){let l=a.length;for(let u=0;u<l;++u)o.push(a[u])}}return n};Bo.unpackPolygonHierarchy=function(e,t,n){let i=e[t++],o=e[t++],r=new Array(i),s=o>0?new Array(o):void 0;for(let a=0;a<i;++a,t+=n.packedLength)r[a]=n.unpack(e,t);for(let a=0;a<o;++a)s[a]=Bo.unpackPolygonHierarchy(e,t,n),t=s[a].startingIndex,delete s[a].startingIndex;return{positions:r,holes:s,startingIndex:t}};var Rb=new k;function mne(e,t,n,i){return k.subtract(t,e,Rb),k.multiplyByScalar(Rb,n/i,Rb),k.add(e,Rb,Rb),[Rb.x,Rb.y]}var J_=new d;function qBe(e,t,n,i){return d.subtract(t,e,J_),d.multiplyByScalar(J_,n/i,J_),d.add(e,J_,J_),[J_.x,J_.y,J_.z]}Bo.subdivideLineCount=function(e,t,n){let o=d.distance(e,t)/n,r=Math.max(0,Math.ceil(O.log2(o)));return Math.pow(2,r)};var JL=new re,QL=new re,YBe=new re,XBe=new d,ZL=new Pa;Bo.subdivideRhumbLineCount=function(e,t,n,i){let o=e.cartesianToCartographic(t,JL),r=e.cartesianToCartographic(n,QL),a=new Pa(o,r,e).surfaceDistance/i,l=Math.max(0,Math.ceil(O.log2(a)));return Math.pow(2,l)};Bo.subdivideTexcoordLine=function(e,t,n,i,o,r){let s=Bo.subdivideLineCount(n,i,o),a=k.distance(e,t),l=a/s,u=r;u.length=s*2;let f=0;for(let h=0;h<s;h++){let m=mne(e,t,h*l,a);u[f++]=m[0],u[f++]=m[1]}return u};Bo.subdivideLine=function(e,t,n,i){let o=Bo.subdivideLineCount(e,t,n),r=d.distance(e,t),s=r/o;c(i)||(i=[]);let a=i;a.length=o*3;let l=0;for(let u=0;u<o;u++){let f=qBe(e,t,u*s,r);a[l++]=f[0],a[l++]=f[1],a[l++]=f[2]}return a};Bo.subdivideTexcoordRhumbLine=function(e,t,n,i,o,r,s){let a=n.cartesianToCartographic(i,JL),l=n.cartesianToCartographic(o,QL);ZL.setEndPoints(a,l);let u=ZL.surfaceDistance/r,f=Math.max(0,Math.ceil(O.log2(u))),h=Math.pow(2,f),m=k.distance(e,t),p=m/h,_=s;_.length=h*2;let b=0;for(let x=0;x<h;x++){let T=mne(e,t,x*p,m);_[b++]=T[0],_[b++]=T[1]}return _};Bo.subdivideRhumbLine=function(e,t,n,i,o){let r=e.cartesianToCartographic(t,JL),s=e.cartesianToCartographic(n,QL),a=new Pa(r,s,e),l=a.surfaceDistance/i,u=Math.max(0,Math.ceil(O.log2(l))),f=Math.pow(2,u),h=a.surfaceDistance/f;c(o)||(o=[]);let m=o;m.length=f*3;let p=0;for(let _=0;_<f;_++){let b=a.interpolateUsingSurfaceDistance(_*h,YBe),x=e.cartographicToCartesian(b,XBe);m[p++]=x.x,m[p++]=x.y,m[p++]=x.z}return m};var KBe=new d,$Be=new d,ZBe=new d,JBe=new d;Bo.scaleToGeodeticHeightExtruded=function(e,t,n,i,o){i=g(i,Z.default);let r=KBe,s=$Be,a=ZBe,l=JBe;if(c(e)&&c(e.attributes)&&c(e.attributes.position)){let u=e.attributes.position.values,f=u.length/2;for(let h=0;h<f;h+=3)d.fromArray(u,h,a),i.geodeticSurfaceNormal(a,r),l=i.scaleToGeodeticSurface(a,l),s=d.multiplyByScalar(r,n,s),s=d.add(l,s,s),u[h+f]=s.x,u[h+1+f]=s.y,u[h+2+f]=s.z,o&&(l=d.clone(a,l)),s=d.multiplyByScalar(r,t,s),s=d.add(l,s,s),u[h]=s.x,u[h+1]=s.y,u[h+2]=s.z}return e};Bo.polygonOutlinesFromHierarchy=function(e,t,n){let i=[],o=new Pb;o.enqueue(e);let r,s,a;for(;o.length!==0;){let l=o.dequeue(),u=l.positions;if(t)for(a=u.length,r=0;r<a;r++)n.scaleToGeodeticSurface(u[r],u[r]);if(u=po(u,d.equalsEpsilon,!0),u.length<3)continue;let f=l.holes?l.holes.length:0;for(r=0;r<f;r++){let h=l.holes[r],m=h.positions;if(t)for(a=m.length,s=0;s<a;++s)n.scaleToGeodeticSurface(m[s],m[s]);if(m=po(m,d.equalsEpsilon,!0),m.length<3)continue;i.push(m);let p=0;for(c(h.holes)&&(p=h.holes.length),s=0;s<p;s++)o.enqueue(h.holes[s])}i.push(u)}return i};var QBe=new re;function e3e(e,t,n){let i=n.cartesianToCartographic(e,JL),o=n.cartesianToCartographic(t,QL);if(Math.sign(i.latitude)===Math.sign(o.latitude))return;ZL.setEndPoints(i,o);let r=ZL.findIntersectionWithLatitude(0,QBe);if(!c(r))return;let s=Math.min(i.longitude,o.longitude),a=Math.max(i.longitude,o.longitude);if(Math.abs(a-s)>O.PI){let l=s;s=a,a=l}if(!(r.longitude<s||r.longitude>a))return n.cartographicToCartesian(r)}function t3e(e,t,n,i){if(i===jt.RHUMB)return e3e(e,t,n);let o=Yn.lineSegmentPlane(e,t,on.ORIGIN_XY_PLANE);if(c(o))return n.scaleToGeodeticSurface(o,o)}var n3e=new re;function i3e(e,t,n){let i=[],o,r,s,a,l,u=0;for(;u<e.length;){o=e[u],r=e[(u+1)%e.length],s=O.sign(o.z),a=O.sign(r.z);let f=h=>t.cartesianToCartographic(h,n3e).longitude;if(s===0)i.push({position:u,type:s,visited:!1,next:a,theta:f(o)});else if(a!==0){if(l=t3e(o,r,t,n),++u,!c(l))continue;e.splice(u,0,l),i.push({position:u,type:s,visited:!1,next:a,theta:f(l)})}++u}return i}function pne(e,t,n,i,o,r,s){let a=[],l=r,u=h=>m=>m.position===h,f=[];do{let h=n[l];a.push(h);let m=i.findIndex(u(l)),p=i[m];if(!c(p)){++l;continue}let{visited:_,type:b,next:x}=p;if(p.visited=!0,b===0){if(x===0){let A=i[m-(s?1:-1)];if((A==null?void 0:A.position)===l+1)A.visited=!0;else{++l;continue}}if(!_&&s&&x>0||r===l&&!s&&x<0){++l;continue}}if(!(s?b>=0:b<=0)){++l;continue}_||f.push(l);let E=m+(s?1:-1),S=i[E];if(!c(S)){++l;continue}l=S.position}while(l<n.length&&l>=0&&l!==r&&a.length<n.length);e.splice(t,o,a);for(let h of f)t=pne(e,++t,n,i,0,h,!s);return t}Bo.splitPolygonsOnEquator=function(e,t,n,i){c(i)||(i=[]),i.splice(0,0,...e),i.length=e.length;let o=0;for(;o<i.length;){let r=i[o],s=r.slice();if(r.length<3){i[o]=s,++o;continue}let a=i3e(s,t,n);if(s.length===r.length||a.length<=1){i[o]=s,++o;continue}a.sort((u,f)=>u.theta-f.theta);let l=s[0].z>=0;o=pne(i,o,s,a,1,0,l)}return i};Bo.polygonsFromHierarchy=function(e,t,n,i,o,r){let s=[],a=[],l=new Pb;l.enqueue(e);let u=c(r);for(;l.length!==0;){let f=l.dequeue(),h=f.positions,m=f.holes,p,_;if(i)for(_=h.length,p=0;p<_;p++)o.scaleToGeodeticSurface(h[p],h[p]);if(t||(h=po(h,d.equalsEpsilon,!0)),h.length<3)continue;let b=n(h);if(!c(b))continue;let x=[],T=ti.computeWindingOrder2D(b);if(T===Gr.CLOCKWISE&&(b.reverse(),h=h.slice().reverse()),u){u=!1;let D=[h];if(D=r(D,D),D.length>1){for(let R of D)l.enqueue(new Ra(R,m));continue}}let E=h.slice(),S=c(m)?m.length:0,A=[],v;for(p=0;p<S;p++){let D=m[p],R=D.positions;if(i)for(_=R.length,v=0;v<_;++v)o.scaleToGeodeticSurface(R[v],R[v]);if(t||(R=po(R,d.equalsEpsilon,!0)),R.length<3)continue;let P=n(R);if(!c(P))continue;T=ti.computeWindingOrder2D(P),T===Gr.CLOCKWISE&&(P.reverse(),R=R.slice().reverse()),A.push(R),x.push(E.length),E=E.concat(R),b=b.concat(P);let L=0;for(c(D.holes)&&(L=D.holes.length),v=0;v<L;v++)l.enqueue(D.holes[v])}s.push({outerRing:h,holes:A}),a.push({positions:E,positions2D:b,holes:x})}return{hierarchy:s,polygons:a}};var o3e=new k,r3e=new d,s3e=new ve,a3e=new q;Bo.computeBoundingRectangle=function(e,t,n,i,o){let r=ve.fromAxisAngle(e,i,s3e),s=q.fromQuaternion(r,a3e),a=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,h=n.length;for(let m=0;m<h;++m){let p=d.clone(n[m],r3e);q.multiplyByVector(s,p,p);let _=t(p,o3e);c(_)&&(a=Math.min(a,_.x),l=Math.max(l,_.x),u=Math.min(u,_.y),f=Math.max(f,_.y))}return o.x=a,o.y=u,o.width=l-a,o.height=f-u,o};Bo.createGeometryFromPositions=function(e,t,n,i,o,r,s){let a=ti.triangulate(t.positions2D,t.holes);a.length<3&&(a=[0,1,2]);let l=t.positions,u=c(n),f=u?n.positions:void 0;if(o){let h=l.length,m=new Array(h*3),p=0;for(let x=0;x<h;x++){let T=l[x];m[p++]=T.x,m[p++]=T.y,m[p++]=T.z}let _={attributes:{position:new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:m})},indices:a,primitiveType:Se.TRIANGLES};u&&(_.attributes.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:k.packArray(f)}));let b=new st(_);return r.normal?Pn.computeNormal(b):b}if(s===jt.GEODESIC)return ti.computeSubdivision(e,l,a,f,i);if(s===jt.RHUMB)return ti.computeRhumbLineSubdivision(e,l,a,f,i)};var dne=[],hne=[],c3e=new d,l3e=new d;Bo.computeWallGeometry=function(e,t,n,i,o,r){let s,a,l,u,f,h,m,p,_,b=e.length,x=0,T=0,E=c(t),S=E?t.positions:void 0;if(o)for(a=b*3*2,s=new Array(a*2),E&&(_=b*2*2,p=new Array(_*2)),l=0;l<b;l++)u=e[l],f=e[(l+1)%b],s[x]=s[x+a]=u.x,++x,s[x]=s[x+a]=u.y,++x,s[x]=s[x+a]=u.z,++x,s[x]=s[x+a]=f.x,++x,s[x]=s[x+a]=f.y,++x,s[x]=s[x+a]=f.z,++x,E&&(h=S[l],m=S[(l+1)%b],p[T]=p[T+_]=h.x,++T,p[T]=p[T+_]=h.y,++T,p[T]=p[T+_]=m.x,++T,p[T]=p[T+_]=m.y,++T);else{let P=O.chordLength(i,n.maximumRadius),L=0;if(r===jt.GEODESIC)for(l=0;l<b;l++)L+=Bo.subdivideLineCount(e[l],e[(l+1)%b],P);else if(r===jt.RHUMB)for(l=0;l<b;l++)L+=Bo.subdivideRhumbLineCount(n,e[l],e[(l+1)%b],P);for(a=(L+b)*3,s=new Array(a*2),E&&(_=(L+b)*2,p=new Array(_*2)),l=0;l<b;l++){u=e[l],f=e[(l+1)%b];let F,y;E&&(h=S[l],m=S[(l+1)%b]),r===jt.GEODESIC?(F=Bo.subdivideLine(u,f,P,hne),E&&(y=Bo.subdivideTexcoordLine(h,m,u,f,P,dne))):r===jt.RHUMB&&(F=Bo.subdivideRhumbLine(n,u,f,P,hne),E&&(y=Bo.subdivideTexcoordRhumbLine(h,m,n,u,f,P,dne)));let I=F.length;for(let M=0;M<I;++M,++x)s[x]=F[M],s[x+a]=F[M];if(s[x]=f.x,s[x+a]=f.x,++x,s[x]=f.y,s[x+a]=f.y,++x,s[x]=f.z,s[x+a]=f.z,++x,E){let M=y.length;for(let B=0;B<M;++B,++T)p[T]=y[B],p[T+_]=y[B];p[T]=m.x,p[T+_]=m.x,++T,p[T]=m.y,p[T+_]=m.y,++T}}}b=s.length;let A=Oe.createTypedArray(b/3,b-e.length*6),v=0;for(b/=6,l=0;l<b;l++){let P=l,L=P+1,F=P+b,y=F+1;u=d.fromArray(s,P*3,c3e),f=d.fromArray(s,L*3,l3e),!d.equalsEpsilon(u,f,O.EPSILON10,O.EPSILON10)&&(A[v++]=P,A[v++]=F,A[v++]=L,A[v++]=L,A[v++]=F,A[v++]=y)}let D={attributes:new fn({position:new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:s})}),indices:A,primitiveType:Se.TRIANGLES};return E&&(D.attributes.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:p})),new st(D)};var Fn=Bo;function Ar(e,t){this.position=e,c(this.position)||(this.position=new k),this.tangentPlane=t,c(this.tangentPlane)||(this.tangentPlane=Ar.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(Ar.prototype,{ellipsoid:{get:function(){return this.tangentPlane.ellipsoid}},x:{get:function(){return this.position.x}},y:{get:function(){return this.position.y}},conformalLatitude:{get:function(){let e=k.magnitude(this.position),t=2*this.ellipsoid.maximumRadius;return this.tangentPlane.plane.normal.z*(O.PI_OVER_TWO-2*Math.atan2(e,t))}},longitude:{get:function(){let e=O.PI_OVER_TWO+Math.atan2(this.y,this.x);return e>Math.PI&&(e-=O.TWO_PI),e}}});var GT=new re,u3e=new d;Ar.prototype.getLatitude=function(e){c(e)||(e=Z.default),GT.latitude=this.conformalLatitude,GT.longitude=this.longitude,GT.height=0;let t=this.ellipsoid.cartographicToCartesian(GT,u3e);return e.cartesianToCartographic(t,GT),GT.latitude};var f3e=new mn,d3e=new d,h3e=new d;Ar.fromCartesian=function(e,t){C.defined("cartesian",e);let n=O.signNotZero(e.z),i=Ar.NORTH_POLE_TANGENT_PLANE,o=Ar.SOUTH_POLE;n<0&&(i=Ar.SOUTH_POLE_TANGENT_PLANE,o=Ar.NORTH_POLE);let r=f3e;r.origin=i.ellipsoid.scaleToGeocentricSurface(e,r.origin),r.direction=d.subtract(r.origin,o,d3e),d.normalize(r.direction,r.direction);let s=Yn.rayPlane(r,i.plane,h3e),a=d.subtract(s,o,s),l=d.dot(i.xAxis,a),u=n*d.dot(i.yAxis,a);return c(t)?(t.position=new k(l,u),t.tangentPlane=i,t):new Ar(new k(l,u),i)};Ar.fromCartesianArray=function(e,t){C.defined("cartesians",e);let n=e.length;c(t)?t.length=n:t=new Array(n);for(let i=0;i<n;i++)t[i]=Ar.fromCartesian(e[i],t[i]);return t};Ar.clone=function(e,t){if(c(e))return c(t)?(t.position=e.position,t.tangentPlane=e.tangentPlane,t):new Ar(e.position,e.tangentPlane)};Ar.HALF_UNIT_SPHERE=Object.freeze(new Z(.5,.5,.5));Ar.NORTH_POLE=Object.freeze(new d(0,0,.5));Ar.SOUTH_POLE=Object.freeze(new d(0,0,-.5));Ar.NORTH_POLE_TANGENT_PLANE=Object.freeze(new Wr(Ar.NORTH_POLE,Ar.HALF_UNIT_SPHERE));Ar.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new Wr(Ar.SOUTH_POLE,Ar.HALF_UNIT_SPHERE));var pc=Ar;var m3e=new re,_ne=new re;function p3e(e,t,n,i){let r=i.cartesianToCartographic(e,m3e).height,s=i.cartesianToCartographic(t,_ne);s.height=r,i.cartographicToCartesian(s,t);let a=i.cartesianToCartographic(n,_ne);a.height=r-100,i.cartographicToCartesian(a,n)}var gne=new je,_3e=new d,g3e=new d,y3e=new d,b3e=new d,x3e=new d,T3e=new d,eN=new d,Th=new d,jT=new d,C3e=new k,E3e=new k,w3e=new d,yne=new ve,S3e=new q,A3e=new q;function Zj(e){let t=e.vertexFormat,n=e.geometry,i=e.shadowVolume,o=n.attributes.position.values,r=c(n.attributes.st)?n.attributes.st.values:void 0,s=o.length,a=e.wall,l=e.top||a,u=e.bottom||a;if(t.st||t.normal||t.tangent||t.bitangent||i){let f=e.boundingRectangle,h=e.rotationAxis,m=e.projectTo2d,p=e.ellipsoid,_=e.stRotation,b=e.perPositionHeight,x=C3e;x.x=f.x,x.y=f.y;let T=t.st?new Float32Array(2*(s/3)):void 0,E;t.normal&&(b&&l&&!a?E=n.attributes.normal.values:E=new Float32Array(s));let S=t.tangent?new Float32Array(s):void 0,A=t.bitangent?new Float32Array(s):void 0,v=i?new Float32Array(s):void 0,D=0,R=0,P=g3e,L=y3e,F=b3e,y=!0,I=S3e,M=A3e;if(_!==0){let V=ve.fromAxisAngle(h,_,yne);I=q.fromQuaternion(V,I),V=ve.fromAxisAngle(h,-_,yne),M=q.fromQuaternion(V,M)}else I=q.clone(q.IDENTITY,I),M=q.clone(q.IDENTITY,M);let B=0,U=0;l&&u&&(B=s/2,U=s/3,s/=2);for(let V=0;V<s;V+=3){let W=d.fromArray(o,V,w3e);if(t.st&&!c(r)){let H=q.multiplyByVector(I,W,_3e);H=p.scaleToGeodeticSurface(H,H);let X=m([H],E3e)[0];k.subtract(X,x,X);let $=O.clamp(X.x/f.width,0,1),ae=O.clamp(X.y/f.height,0,1);u&&(T[D+U]=$,T[D+1+U]=ae),l&&(T[D]=$,T[D+1]=ae),D+=2}if(t.normal||t.tangent||t.bitangent||i){let H=R+1,X=R+2;if(a){if(V+3<s){let $=d.fromArray(o,V+3,x3e);if(y){let ae=d.fromArray(o,V+s,T3e);b&&p3e(W,$,ae,p),d.subtract($,W,$),d.subtract(ae,W,ae),P=d.normalize(d.cross(ae,$,P),P),y=!1}d.equalsEpsilon($,W,O.EPSILON10)&&(y=!0)}(t.tangent||t.bitangent)&&(F=p.geodeticSurfaceNormal(W,F),t.tangent&&(L=d.normalize(d.cross(F,P,L),L)))}else P=p.geodeticSurfaceNormal(W,P),(t.tangent||t.bitangent)&&(b&&(eN=d.fromArray(E,R,eN),Th=d.cross(d.UNIT_Z,eN,Th),Th=d.normalize(q.multiplyByVector(M,Th,Th),Th),t.bitangent&&(jT=d.normalize(d.cross(eN,Th,jT),jT))),L=d.cross(d.UNIT_Z,P,L),L=d.normalize(q.multiplyByVector(M,L,L),L),t.bitangent&&(F=d.normalize(d.cross(P,L,F),F)));t.normal&&(e.wall?(E[R+B]=P.x,E[H+B]=P.y,E[X+B]=P.z):u&&(E[R+B]=-P.x,E[H+B]=-P.y,E[X+B]=-P.z),(l&&!b||a)&&(E[R]=P.x,E[H]=P.y,E[X]=P.z)),i&&(a&&(P=p.geodeticSurfaceNormal(W,P)),v[R+B]=-P.x,v[H+B]=-P.y,v[X+B]=-P.z),t.tangent&&(e.wall?(S[R+B]=L.x,S[H+B]=L.y,S[X+B]=L.z):u&&(S[R+B]=-L.x,S[H+B]=-L.y,S[X+B]=-L.z),l&&(b?(S[R]=Th.x,S[H]=Th.y,S[X]=Th.z):(S[R]=L.x,S[H]=L.y,S[X]=L.z))),t.bitangent&&(u&&(A[R+B]=F.x,A[H+B]=F.y,A[X+B]=F.z),l&&(b?(A[R]=jT.x,A[H]=jT.y,A[X]=jT.z):(A[R]=F.x,A[H]=F.y,A[X]=F.z))),R+=3}}t.st&&!c(r)&&(n.attributes.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:T})),t.normal&&(n.attributes.normal=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:E})),t.tangent&&(n.attributes.tangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:S})),t.bitangent&&(n.attributes.bitangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:A})),i&&(n.attributes.extrudeDirection=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:v}))}if(e.extrude&&c(e.offsetAttribute)){let f=o.length/3,h=new Uint8Array(f);if(e.offsetAttribute===Zt.TOP)l&&u||a?h=h.fill(1,0,f/2):l&&(h=h.fill(1));else{let m=e.offsetAttribute===Zt.NONE?0:1;h=h.fill(m)}n.attributes.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}return n}var bne=[];function v3e(e,t,n,i,o,r,s,a,l,u){let f={walls:[]},h;if(s||a){let E=Fn.createGeometryFromPositions(e,t,n,i,r,l,u),S=E.attributes.position.values,A=E.indices,v,D;if(s&&a){let R=S.concat(S);v=R.length/3,D=Oe.createTypedArray(v,A.length*2),D.set(A);let P=A.length,L=v/2;for(h=0;h<P;h+=3){let F=D[h]+L,y=D[h+1]+L,I=D[h+2]+L;D[h+P]=I,D[h+1+P]=y,D[h+2+P]=F}if(E.attributes.position.values=R,r&&l.normal){let F=E.attributes.normal.values;E.attributes.normal.values=new Float32Array(R.length),E.attributes.normal.values.set(F)}if(l.st&&c(n)){let F=E.attributes.st.values;E.attributes.st.values=new Float32Array(v*2),E.attributes.st.values=F.concat(F)}E.indices=D}else if(a){for(v=S.length/3,D=Oe.createTypedArray(v,A.length),h=0;h<A.length;h+=3)D[h]=A[h+2],D[h+1]=A[h+1],D[h+2]=A[h];E.indices=D}f.topAndBottom=new wt({geometry:E})}let m=o.outerRing,p=Wr.fromPoints(m,e),_=p.projectPointsOntoPlane(m,bne),b=ti.computeWindingOrder2D(_);b===Gr.CLOCKWISE&&(m=m.slice().reverse());let x=Fn.computeWallGeometry(m,n,e,i,r,u);f.walls.push(new wt({geometry:x}));let T=o.holes;for(h=0;h<T.length;h++){let E=T[h];_=p.projectPointsOntoPlane(E,bne),b=ti.computeWindingOrder2D(_),b===Gr.COUNTER_CLOCKWISE&&(E=E.slice().reverse()),x=Fn.computeWallGeometry(E,n,e,i,r,u),f.walls.push(new wt({geometry:x}))}return f}function qu(e){if(C.typeOf.object("options",e),C.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),c(e.perPositionHeight)&&e.perPositionHeight&&c(e.height))throw new w("Cannot use both options.perPositionHeight and options.height");if(c(e.arcType)&&e.arcType!==jt.GEODESIC&&e.arcType!==jt.RHUMB)throw new w("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let t=e.polygonHierarchy,n=g(e.vertexFormat,Ce.DEFAULT),i=g(e.ellipsoid,Z.default),o=g(e.granularity,O.RADIANS_PER_DEGREE),r=g(e.stRotation,0),s=e.textureCoordinates,a=g(e.perPositionHeight,!1),l=a&&c(e.extrudedHeight),u=g(e.height,0),f=g(e.extrudedHeight,u);if(!l){let h=Math.max(u,f);f=Math.min(u,f),u=h}this._vertexFormat=Ce.clone(n),this._ellipsoid=Z.clone(i),this._granularity=o,this._stRotation=r,this._height=u,this._extrudedHeight=f,this._closeTop=g(e.closeTop,!0),this._closeBottom=g(e.closeBottom,!0),this._polygonHierarchy=t,this._perPositionHeight=a,this._perPositionHeightExtrude=l,this._shadowVolume=g(e.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=e.offsetAttribute,this._arcType=g(e.arcType,jt.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=s,this.packedLength=Fn.computeHierarchyPackedLength(t,d)+Z.packedLength+Ce.packedLength+(s?Fn.computeHierarchyPackedLength(s,k):1)+12}qu.fromPositions=function(e){e=g(e,g.EMPTY_OBJECT),C.defined("options.positions",e.positions);let t={polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute,arcType:e.arcType,textureCoordinates:e.textureCoordinates};return new qu(t)};qu.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),n=Fn.packPolygonHierarchy(e._polygonHierarchy,t,n,d),Z.pack(e._ellipsoid,t,n),n+=Z.packedLength,Ce.pack(e._vertexFormat,t,n),n+=Ce.packedLength,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._granularity,t[n++]=e._stRotation,t[n++]=e._perPositionHeightExtrude?1:0,t[n++]=e._perPositionHeight?1:0,t[n++]=e._closeTop?1:0,t[n++]=e._closeBottom?1:0,t[n++]=e._shadowVolume?1:0,t[n++]=g(e._offsetAttribute,-1),t[n++]=e._arcType,c(e._textureCoordinates)?n=Fn.packPolygonHierarchy(e._textureCoordinates,t,n,k):t[n++]=-1,t[n++]=e.packedLength,t};var D3e=Z.clone(Z.UNIT_SPHERE),I3e=new Ce,O3e={polygonHierarchy:{}};qu.unpack=function(e,t,n){C.defined("array",e),t=g(t,0);let i=Fn.unpackPolygonHierarchy(e,t,d);t=i.startingIndex,delete i.startingIndex;let o=Z.unpack(e,t,D3e);t+=Z.packedLength;let r=Ce.unpack(e,t,I3e);t+=Ce.packedLength;let s=e[t++],a=e[t++],l=e[t++],u=e[t++],f=e[t++]===1,h=e[t++]===1,m=e[t++]===1,p=e[t++]===1,_=e[t++]===1,b=e[t++],x=e[t++],T=e[t]===-1?void 0:Fn.unpackPolygonHierarchy(e,t,k);c(T)?(t=T.startingIndex,delete T.startingIndex):t++;let E=e[t++];return c(n)||(n=new qu(O3e)),n._polygonHierarchy=i,n._ellipsoid=Z.clone(o,n._ellipsoid),n._vertexFormat=Ce.clone(r,n._vertexFormat),n._height=s,n._extrudedHeight=a,n._granularity=l,n._stRotation=u,n._perPositionHeightExtrude=f,n._perPositionHeight=h,n._closeTop=m,n._closeBottom=p,n._shadowVolume=_,n._offsetAttribute=b===-1?void 0:b,n._arcType=x,n._textureCoordinates=T,n.packedLength=E,n};var P3e=new k,R3e=new k,M3e=new pc;function xne(e,t,n,i,o,r){let s=e.longitude,a=s>=0?s:s+O.TWO_PI;o.westOverIdl=Math.min(o.westOverIdl,a),o.eastOverIdl=Math.max(o.eastOverIdl,a),r.west=Math.min(r.west,s),r.east=Math.max(r.east,s);let l=e.getLatitude(n),u=l;if(r.south=Math.min(r.south,l),r.north=Math.max(r.north,l),i!==jt.RHUMB){let m=k.subtract(t.position,e.position,P3e),p=k.dot(t.position,m)/k.dot(m,m);if(p>0&&p<1){let _=k.add(t.position,k.multiplyByScalar(m,-p,m),R3e),b=pc.clone(t,M3e);b.position=_;let x=b.getLatitude(n);r.south=Math.min(r.south,x),r.north=Math.max(r.north,x),Math.abs(l)>Math.abs(x)&&(u=x)}}let f=t.x*e.y-e.x*t.y,h=Math.sign(f);h!==0&&(h*=k.angleBetween(t.position,e.position)),u>=0&&(o.northAngle+=h),u<=0&&(o.southAngle+=h)}var Tne=new pc,L3e=new pc,Wu={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};qu.computeRectangleFromPositions=function(e,t,n,i){if(C.defined("positions",e),c(i)||(i=new te),e.length<3)return i;i.west=Number.POSITIVE_INFINITY,i.east=Number.NEGATIVE_INFINITY,i.south=Number.POSITIVE_INFINITY,i.north=Number.NEGATIVE_INFINITY,Wu.northAngle=0,Wu.southAngle=0,Wu.westOverIdl=Number.POSITIVE_INFINITY,Wu.eastOverIdl=Number.NEGATIVE_INFINITY;let o=e.length,r=pc.fromCartesian(e[0],L3e);for(let s=1;s<o;s++){let a=pc.fromCartesian(e[s],Tne);xne(a,r,t,n,Wu,i),r=pc.clone(a,r)}return xne(pc.fromCartesian(e[0],Tne),r,t,n,Wu,i),i.east-i.west>Wu.eastOverIdl-Wu.westOverIdl&&(i.west=Wu.westOverIdl,i.east=Wu.eastOverIdl,i.east>O.PI&&(i.east=i.east-O.TWO_PI),i.west>O.PI&&(i.west=i.west-O.TWO_PI)),O.equalsEpsilon(Math.abs(Wu.northAngle),O.TWO_PI,O.EPSILON10)&&(i.north=O.PI_OVER_TWO,i.east=O.PI,i.west=-O.PI),O.equalsEpsilon(Math.abs(Wu.southAngle),O.TWO_PI,O.EPSILON10)&&(i.south=-O.PI_OVER_TWO,i.east=O.PI,i.west=-O.PI),i};var N3e=new pc;function F3e(e,t,n){return e.height>=O.PI||e.width>=O.PI?pc.fromCartesian(t[0],N3e).tangentPlane:Wr.fromPoints(t,n)}var Cne=new re;function B3e(e,t,n){return(i,o)=>{if(e.height>=O.PI||e.width>=O.PI){if(e.south<0&&e.north>0){c(o)||(o=[]);for(let s=0;s<i.length;++s){let a=n.cartesianToCartographic(i[s],Cne);o[s]=new k(a.longitude/O.PI,a.latitude/O.PI_OVER_TWO)}return o.length=i.length,o}return pc.fromCartesianArray(i,o)}return Wr.fromPoints(t,n).projectPointsOntoPlane(i,o)}}function k3e(e,t,n){if(e.height>=O.PI||e.width>=O.PI)return(o,r)=>{if(e.south<0&&e.north>0){let s=n.cartesianToCartographic(o,Cne);return c(r)||(r=new k),r.x=s.longitude/O.PI,r.y=s.latitude/O.PI_OVER_TWO,r}return pc.fromCartesian(o,r)};let i=Wr.fromPoints(t,n);return(o,r)=>i.projectPointsOntoPlane(o,r)}function U3e(e,t,n,i){return(o,r)=>!i&&(e.height>=O.PI_OVER_TWO||e.width>=2*O.PI_OVER_THREE)?Fn.splitPolygonsOnEquator(o,t,n,r):o}function z3e(e,t,n,i){if(t.height>=O.PI||t.width>=O.PI)return je.fromRectangle(t,void 0,gne);let o=e,r=Wr.fromPoints(o,n);return Fn.computeBoundingRectangle(r.plane.normal,r.projectPointOntoPlane.bind(r),o,i,gne)}qu.createGeometry=function(e){let t=e._vertexFormat,n=e._ellipsoid,i=e._granularity,o=e._stRotation,r=e._polygonHierarchy,s=e._perPositionHeight,a=e._closeTop,l=e._closeBottom,u=e._arcType,f=e._textureCoordinates,h=c(f),m=r.positions;if(m.length<3)return;let p=e.rectangle,_=Fn.polygonsFromHierarchy(r,h,B3e(p,m,n),!s,n,U3e(p,n,u,s)),b=_.hierarchy,x=_.polygons,T=function(B){return B},E=h?Fn.polygonsFromHierarchy(f,!0,T,!1,n).polygons:void 0;if(b.length===0)return;let S=b[0].outerRing,A=z3e(S,p,n,o),v=[],D=e._height,R=e._extrudedHeight,P=e._perPositionHeightExtrude||!O.equalsEpsilon(D,R,0,O.EPSILON2),L={perPositionHeight:s,vertexFormat:t,geometry:void 0,rotationAxis:F3e(p,S,n).plane.normal,projectTo2d:k3e(p,S,n),boundingRectangle:A,ellipsoid:n,stRotation:o,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:u},F;if(P)for(L.extrude=!0,L.top=a,L.bottom=l,L.shadowVolume=e._shadowVolume,L.offsetAttribute=e._offsetAttribute,F=0;F<x.length;F++){let B=v3e(n,x[F],h?E[F]:void 0,i,b[F],s,a,l,t,u),U;a&&l?(U=B.topAndBottom,L.geometry=Fn.scaleToGeodeticHeightExtruded(U.geometry,D,R,n,s)):a?(U=B.topAndBottom,U.geometry.attributes.position.values=ti.scaleToGeodeticHeight(U.geometry.attributes.position.values,D,n,!s),L.geometry=U.geometry):l&&(U=B.topAndBottom,U.geometry.attributes.position.values=ti.scaleToGeodeticHeight(U.geometry.attributes.position.values,R,n,!0),L.geometry=U.geometry),(a||l)&&(L.wall=!1,U.geometry=Zj(L),v.push(U));let V=B.walls;L.wall=!0;for(let W=0;W<V.length;W++){let H=V[W];L.geometry=Fn.scaleToGeodeticHeightExtruded(H.geometry,D,R,n,s),H.geometry=Zj(L),v.push(H)}}else for(F=0;F<x.length;F++){let B=new wt({geometry:Fn.createGeometryFromPositions(n,x[F],h?E[F]:void 0,i,s,t,u)});if(B.geometry.attributes.position.values=ti.scaleToGeodeticHeight(B.geometry.attributes.position.values,D,n,!s),L.geometry=B.geometry,B.geometry=Zj(L),c(e._offsetAttribute)){let U=B.geometry.attributes.position.values.length,V=e._offsetAttribute===Zt.NONE?0:1,W=new Uint8Array(U/3).fill(V);B.geometry.attributes.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:W})}v.push(B)}let y=Pn.combineInstances(v)[0];y.attributes.position.values=new Float64Array(y.attributes.position.values),y.indices=Oe.createTypedArray(y.attributes.position.values.length/3,y.indices);let I=y.attributes,M=ne.fromVertices(I.position.values);return t.position||delete I.position,new st({attributes:I,indices:y.indices,primitiveType:y.primitiveType,boundingSphere:M,offsetAttribute:e._offsetAttribute})};qu.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new qu({polygonHierarchy:e._polygonHierarchy,ellipsoid:o,stRotation:e._stRotation,granularity:i,perPositionHeight:!1,extrudedHeight:r,height:s,vertexFormat:Ce.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})};function V3e(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let n=e._ellipsoid,i=e._polygonHierarchy.positions,o=e.rectangle;return st._textureCoordinateRotationPoints(i,t,n,o)}Object.defineProperties(qu.prototype,{rectangle:{get:function(){if(!c(this._rectangle)){let e=this._polygonHierarchy.positions;this._rectangle=qu.computeRectangleFromPositions(e,this._ellipsoid,this._arcType)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return c(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=V3e(this)),this._textureCoordinateRotationPoints}}});var Q_=qu;function Mb(e){C.typeOf.object("options",e),C.typeOf.object("options.positions",e.positions),C.typeOf.number.greaterThanOrEquals("options.positions.length",e.positions.length,3),this._ellipsoid=g(e.ellipsoid,Z.default),this._positions=[...e.positions]}Object.defineProperties(Mb.prototype,{length:{get:function(){return this._positions.length}},positions:{get:function(){return this._positions}},ellipsoid:{get:function(){return this._ellipsoid}}});Mb.clone=function(e,t){return C.typeOf.object("polygon",e),c(t)?(t._ellipsoid=e.ellipsoid,t._positions.length=0,t._positions.push(...e.positions),t):new Mb({positions:e.positions,ellipsoid:e.ellipsoid})};Mb.equals=function(e,t){return C.typeOf.object("left",e),C.typeOf.object("right",t),e.ellipsoid.equals(t.ellipsoid)&&e.positions===t.positions};Mb.prototype.computeRectangle=function(e){return Q_.computeRectangleFromPositions(this.positions,this.ellipsoid,void 0,e)};var H3e=new te,Ene=new d;Mb.prototype.computeSphericalExtents=function(e){c(e)||(e=new te);let t=this.computeRectangle(H3e),n=re.toCartesian(te.southwest(t),this.ellipsoid,Ene),i=Math.sqrt(n.x*n.x+n.y*n.y),o=O.fastApproximateAtan2(i,n.z),r=O.fastApproximateAtan2(n.x,n.y);return e.south=o,e.west=r,n=re.toCartesian(te.northeast(t),this.ellipsoid,Ene),i=Math.sqrt(n.x*n.x+n.y*n.y),o=O.fastApproximateAtan2(i,n.z),r=O.fastApproximateAtan2(n.x,n.y),e.north=o,e.east=r,e};var AA=Mb;var tN=`in vec2 v_textureCoordinates;
|
| uniform int u_polygonsLength;
| uniform int u_extentsLength;
| uniform highp sampler2D u_polygonTexture;
| uniform highp sampler2D u_extentsTexture;
|
| int getPolygonIndex(float dimension, vec2 coord) {
| vec2 uv = coord.xy * dimension;
| return int(floor(uv.y) * dimension + floor(uv.x));
| }
|
| vec2 getLookupUv(ivec2 dimensions, int i) {
| int pixY = i / dimensions.x;
| int pixX = i - (pixY * dimensions.x);
| float pixelWidth = 1.0 / float(dimensions.x);
| float pixelHeight = 1.0 / float(dimensions.y);
| float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
| float v = (float(pixY) + 0.5) * pixelHeight;
| return vec2(u, v);
| }
|
| vec4 getExtents(int i) {
| return texture(u_extentsTexture, getLookupUv(textureSize(u_extentsTexture, 0), i));
| }
|
| ivec2 getPositionsLengthAndExtentsIndex(int i) {
| vec2 uv = getLookupUv(textureSize(u_polygonTexture, 0), i);
| vec4 value = texture(u_polygonTexture, uv);
| return ivec2(int(value.x), int(value.y));
| }
|
| vec2 getPolygonPosition(int i) {
| vec2 uv = getLookupUv(textureSize(u_polygonTexture, 0), i);
| return texture(u_polygonTexture, uv).xy;
| }
|
| vec2 getCoordinates(vec2 textureCoordinates, vec4 extents) {
| float latitude = mix(extents.x, extents.x + 1.0 / extents.z, textureCoordinates.y);
| float longitude = mix(extents.y, extents.y + 1.0 / extents.w, textureCoordinates.x);
| return vec2(latitude, longitude);
| }
|
| void main() {
| int lastPolygonIndex = 0;
| out_FragColor = vec4(1.0);
|
| // Get the relevant region of the texture
| float dimension = float(u_extentsLength);
| if (u_extentsLength > 2) {
| dimension = ceil(log2(float(u_extentsLength)));
| }
| int regionIndex = getPolygonIndex(dimension, v_textureCoordinates);
|
| for (int polygonIndex = 0; polygonIndex < u_polygonsLength; polygonIndex++) {
| ivec2 positionsLengthAndExtents = getPositionsLengthAndExtentsIndex(lastPolygonIndex);
| int positionsLength = positionsLengthAndExtents.x;
| int polygonExtentsIndex = positionsLengthAndExtents.y;
| lastPolygonIndex += 1;
|
| // Only compute signed distance for the relevant part of the atlas
| if (polygonExtentsIndex == regionIndex) {
| float clipAmount = czm_infinity;
| vec4 extents = getExtents(polygonExtentsIndex);
| vec2 textureOffset = vec2(mod(float(polygonExtentsIndex), dimension), floor(float(polygonExtentsIndex) / dimension)) / dimension;
| vec2 p = getCoordinates((v_textureCoordinates - textureOffset) * dimension, extents);
| float s = 1.0;
|
| // Check each edge for absolute distance
| for (int i = 0, j = positionsLength - 1; i < positionsLength; j = i, i++) {
| vec2 a = getPolygonPosition(lastPolygonIndex + i);
| vec2 b = getPolygonPosition(lastPolygonIndex + j);
|
| vec2 ab = b - a;
| vec2 pa = p - a;
| float t = dot(pa, ab) / dot(ab, ab);
| t = clamp(t, 0.0, 1.0);
|
| vec2 pq = pa - t * ab;
| float d = length(pq);
|
| // Inside / outside computation to determine sign
| bvec3 cond = bvec3(p.y >= a.y,
| p.y < b.y,
| ab.x * pa.y > ab.y * pa.x);
| if (all(cond) || all(not(cond))) s = -s;
| if (abs(d) < abs(clipAmount)) {
| clipAmount = d;
| }
| }
|
| // Normalize the range to [0,1]
| vec4 result = (s * vec4(clipAmount * length(extents.zw))) / 2.0 + 0.5;
| // In the case where we've iterated through multiple polygons, take the minimum
| out_FragColor = min(out_FragColor, result);
| }
|
| lastPolygonIndex += positionsLength;
| }
| }`;function Fr(e){e=g(e,g.EMPTY_OBJECT),this._polygons=[],this._totalPositions=0,this.enabled=g(e.enabled,!0),this.inverse=g(e.inverse,!1),this.polygonAdded=new fe,this.polygonRemoved=new fe,this._owner=void 0,this._float32View=void 0,this._extentsFloat32View=void 0,this._extentsCount=0,this._polygonsTexture=void 0,this._extentsTexture=void 0,this._signedDistanceTexture=void 0,this._signedDistanceComputeCommand=void 0;let t=e.polygons;if(c(t)){let n=t.length;for(let i=0;i<n;++i)this._polygons.push(t[i])}}Object.defineProperties(Fr.prototype,{length:{get:function(){return this._polygons.length}},totalPositions:{get:function(){return this._totalPositions}},extentsTexture:{get:function(){return this._extentsTexture}},extentsCount:{get:function(){return this._extentsCount}},pixelsNeededForExtents:{get:function(){return this.length}},pixelsNeededForPolygonPositions:{get:function(){return this.totalPositions+this.length}},clippingTexture:{get:function(){return this._signedDistanceTexture}},owner:{get:function(){return this._owner}},clippingPolygonsState:{get:function(){return this.inverse?-this.extentsCount:this.extentsCount}}});Fr.prototype.add=function(e){C.typeOf.object("polygon",e);let t=this._polygons.length;return this._polygons.push(e),this.polygonAdded.raiseEvent(e,t),e};Fr.prototype.get=function(e){return C.typeOf.number("index",e),this._polygons[e]};Fr.prototype.contains=function(e){return C.typeOf.object("polygon",e),this._polygons.some(t=>AA.equals(t,e))};Fr.prototype.remove=function(e){C.typeOf.object("polygon",e);let t=this._polygons,n=t.findIndex(i=>AA.equals(i,e));return n===-1?!1:(t.splice(n,1),this.polygonRemoved.raiseEvent(e,n),!0)};var G3e=new te;function j3e(e){let t=[],n=[],i=e.length;for(let r=0;r<i;++r){let a=e[r].computeSphericalExtents(),l=Math.max(a.height*2.5,.001),u=Math.max(a.width*2.5,.001),f=te.clone(a);f.south-=l,f.west-=u,f.north+=l,f.east+=u,f.south=Math.max(f.south,-Math.PI),f.west=Math.max(f.west,-Math.PI),f.north=Math.min(f.north,Math.PI),f.east=Math.min(f.east,Math.PI);let h=[r];for(let m=0;m<t.length;++m){let p=t[m];if(c(p)&&c(te.simpleIntersection(p,f))&&!te.equals(p,f)){let _=n[m];h.push(..._),_.reduce((b,x)=>te.union(e[x].computeSphericalExtents(G3e),b,b),a),t[m]=void 0,n[m]=void 0,l=Math.max(a.height*2.5,.001),u=Math.max(a.width*2.5,.001),f=te.clone(a,f),f.south-=l,f.west-=u,f.north+=l,f.east+=u,f.south=Math.max(f.south,-Math.PI),f.west=Math.max(f.west,-Math.PI),f.north=Math.min(f.north,Math.PI),f.east=Math.min(f.east,Math.PI),m=-1}}t.push(f),n.push(h)}let o=new Map;return n.filter(c).forEach((r,s)=>r.forEach(a=>o.set(a,s))),{extentsList:t.filter(c),extentsIndexByPolygon:o}}Fr.prototype.removeAll=function(){let e=this._polygons,t=e.length;for(let n=0;n<t;++n){let i=e[n];this.polygonRemoved.raiseEvent(i,n)}this._polygons=[]};function W3e(e){let t=e._float32View,n=e._extentsFloat32View,i=e._polygons,{extentsList:o,extentsIndexByPolygon:r}=j3e(i),s=0;for(let[l,u]of i.entries()){let f=u.length;t[s++]=f,t[s++]=r.get(l);for(let h=0;h<f;++h){let m=u.positions[h],p=Math.hypot(m.x,m.y),_=O.fastApproximateAtan2(p,m.z),b=O.fastApproximateAtan2(m.x,m.y);t[s++]=_,t[s++]=b}}let a=0;for(let l of o){let u=1/(l.east-l.west),f=1/(l.north-l.south);n[a++]=l.south,n[a++]=l.west,n[a++]=f,n[a++]=u}e._extentsCount=o.length}var Jj=new k;Fr.prototype.update=function(e){let t=e.context;if(!Fr.isSupported(e))throw new ie("ClippingPolygonCollections are only supported for WebGL 2.");let n=this._polygons.reduce((s,a)=>s+a.length,0);if(n===this.totalPositions||(this._totalPositions=n,this.length===0))return;c(this._signedDistanceComputeCommand)&&(this._signedDistanceComputeCommand.canceled=!0,this._signedDistanceComputeCommand=void 0);let i=this._polygonsTexture,o=this._extentsTexture,r=this._signedDistanceTexture;if(c(i)){let s=i.width*i.height;(s<this.pixelsNeededForPolygonPositions||this.pixelsNeededForPolygonPositions<.25*s)&&(i.destroy(),i=void 0,this._polygonsTexture=void 0)}if(!c(i)){let s=Fr.getTextureResolution(i,this.pixelsNeededForPolygonPositions,Jj);i=new Ot({context:t,width:s.x,height:s.y,pixelFormat:Re.RG,pixelDatatype:Ne.FLOAT,sampler:Jt.NEAREST,flipY:!1}),this._float32View=new Float32Array(s.x*s.y*2),this._polygonsTexture=i}if(c(o)){let s=o.width*o.height;(s<this.pixelsNeededForExtents||this.pixelsNeededForExtents<.25*s)&&(o.destroy(),o=void 0,this._extentsTexture=void 0)}if(!c(o)){let s=Fr.getTextureResolution(o,this.pixelsNeededForExtents,Jj);o=new Ot({context:t,width:s.x,height:s.y,pixelFormat:Re.RGBA,pixelDatatype:Ne.FLOAT,sampler:Jt.NEAREST,flipY:!1}),this._extentsFloat32View=new Float32Array(s.x*s.y*4),this._extentsTexture=o}if(W3e(this),o.copyFrom({source:{width:o.width,height:o.height,arrayBufferView:this._extentsFloat32View}}),i.copyFrom({source:{width:i.width,height:i.height,arrayBufferView:this._float32View}}),!c(r)){let s=Fr.getClippingDistanceTextureResolution(this,Jj);r=new Ot({context:t,width:s.x,height:s.y,pixelFormat:t.webgl2?Re.RED:Re.LUMINANCE,pixelDatatype:Ne.FLOAT,sampler:new Jt({wrapS:pn.CLAMP_TO_EDGE,wrapT:pn.CLAMP_TO_EDGE,minificationFilter:Wt.LINEAR,magnificationFilter:si.LINEAR}),flipY:!1}),this._signedDistanceTexture=r}this._signedDistanceComputeCommand=q3e(this)};Fr.prototype.queueCommands=function(e){c(this._signedDistanceComputeCommand)&&e.commandList.push(this._signedDistanceComputeCommand)};function q3e(e){let t=e._polygonsTexture,n=e._extentsTexture;return new Vc({fragmentShaderSource:tN,outputTexture:e._signedDistanceTexture,uniformMap:{u_polygonsLength:function(){return e.length},u_extentsLength:function(){return e.extentsCount},u_extentsTexture:function(){return n},u_polygonTexture:function(){return t}},persists:!1,owner:e,postExecute:()=>{e._signedDistanceComputeCommand=void 0}})}var wne=new te,Y3e=new te;Fr.prototype.computeIntersectionWithBoundingVolume=function(e,t){var r;let n=this._polygons,i=n.length,o=Gt.OUTSIDE;this.inverse&&(o=Gt.INSIDE);for(let s=0;s<i;++s){let l=n[s].computeRectangle(),u=e.rectangle;if(!c(u)&&c((r=e.boundingVolume)==null?void 0:r.computeCorners)){let h=e.boundingVolume.computeCorners();u=te.fromCartesianArray(h,t,wne)}c(u)||(u=te.fromBoundingSphere(e.boundingSphere,t,wne));let f=te.simpleIntersection(u,l,Y3e);c(f)&&(o=Gt.INTERSECTING)}return o};Fr.setOwner=function(e,t,n){if(e!==t[n]&&(t[n]=t[n]&&t[n].destroy(),c(e))){if(c(e._owner))throw new w("ClippingPolygonCollection should only be assigned to one object");e._owner=t,t[n]=e}};Fr.isSupported=function(e){return e==null?void 0:e.context.webgl2};Fr.getTextureResolution=function(e,t,n){if(c(e))return n.x=e.width,n.y=e.height,n;let i=ht.maximumTextureSize;return n.x=Math.min(t,i),n.y=Math.ceil(t/n.x),n.y*=2,n};Fr.getClippingDistanceTextureResolution=function(e,t){let n=e.signedDistanceTexture;return c(n)?(t.x=n.width,t.y=n.height,t):(t.x=Math.min(ht.maximumTextureSize,4096),t.y=Math.min(ht.maximumTextureSize,4096),t)};Fr.getClippingExtentsTextureResolution=function(e,t){let n=e.extentsTexture;return c(n)?(t.x=n.width,t.y=n.height,t):Fr.getTextureResolution(n,e.pixelsNeededForExtents,t)};Fr.prototype.isDestroyed=function(){return!1};Fr.prototype.destroy=function(){return c(this._signedDistanceComputeCommand)&&(this._signedDistanceComputeCommand.canceled=!0),this._polygonsTexture=this._polygonsTexture&&this._polygonsTexture.destroy(),this._extentsTexture=this._extentsTexture&&this._extentsTexture.destroy(),this._signedDistanceTexture=this._signedDistanceTexture&&this._signedDistanceTexture.destroy(),ue(this)};var Ch=Fr;var vA={NONE:0,SCENE_LIGHT:1,SUNLIGHT:2};vA.fromGlobeFlags=function(e){return e.enableLighting&&e.dynamicAtmosphereLighting?e.dynamicAtmosphereLightingFromSun?vA.SUNLIGHT:vA.SCENE_LIGHT:vA.NONE};var eg=Object.freeze(vA);function Sne(){this.lightIntensity=10,this.rayleighCoefficient=new d(55e-7,13e-6,284e-7),this.mieCoefficient=new d(21e-6,21e-6,21e-6),this.rayleighScaleHeight=1e4,this.mieScaleHeight=3200,this.mieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.dynamicLighting=eg.NONE}Sne.requiresColorCorrect=function(e){return!(O.equalsEpsilon(e.hueShift,0,O.EPSILON7)&&O.equalsEpsilon(e.saturationShift,0,O.EPSILON7)&&O.equalsEpsilon(e.brightnessShift,0,O.EPSILON7))};var WT=Sne;var Eh=`uniform vec3 u_radiiAndDynamicAtmosphereColor;
|
| uniform float u_atmosphereLightIntensity;
| uniform float u_atmosphereRayleighScaleHeight;
| uniform float u_atmosphereMieScaleHeight;
| uniform float u_atmosphereMieAnisotropy;
| uniform vec3 u_atmosphereRayleighCoefficient;
| uniform vec3 u_atmosphereMieCoefficient;
|
| const float ATMOSPHERE_THICKNESS = 111e3; // The thickness of the atmosphere in meters.
| const int PRIMARY_STEPS_MAX = 16; // Maximum number of times the ray from the camera to the world position (primary ray) is sampled.
| const int LIGHT_STEPS_MAX = 4; // Maximum number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.
|
| /**
| * This function computes the colors contributed by Rayliegh and Mie scattering on a given ray, as well as
| * the transmittance value for the ray.
| *
| * @param {czm_ray} primaryRay The ray from the camera to the position.
| * @param {float} primaryRayLength The length of the primary ray.
| * @param {vec3} lightDirection The direction of the light to calculate the scattering from.
| * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.
| * @param {vec3} mieColor The variable the Mie scattering will be written to.
| * @param {float} opacity The variable the transmittance will be written to.
| * @glslFunction
| */
| void computeScattering(
| czm_ray primaryRay,
| float primaryRayLength,
| vec3 lightDirection,
| float atmosphereInnerRadius,
| out vec3 rayleighColor,
| out vec3 mieColor,
| out float opacity
| ) {
|
| // Initialize the default scattering amounts to 0.
| rayleighColor = vec3(0.0);
| mieColor = vec3(0.0);
| opacity = 0.0;
|
| float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;
|
| vec3 origin = vec3(0.0);
|
| // Calculate intersection from the camera to the outer ring of the atmosphere.
| czm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);
|
| // Return empty colors if no intersection with the atmosphere geometry.
| if (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {
| return;
| }
|
| // To deal with smaller values of PRIMARY_STEPS (e.g. 4)
| // we implement a split strategy: sky or horizon.
| // For performance reasons, instead of a if/else branch
| // a soft choice is implemented through a weight 0.0 <= w_stop_gt_lprl <= 1.0
| float x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);
| // Value close to 0.0: close to the horizon
| // Value close to 1.0: above in the sky
| float w_stop_gt_lprl = 0.5 * (1.0 + czm_approximateTanh(x));
|
| // The ray should start from the first intersection with the outer atmopshere, or from the camera position, if it is inside the atmosphere.
| float start_0 = primaryRayAtmosphereIntersect.start;
| primaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);
| // The ray should end at the exit from the atmosphere or at the distance to the vertex, whichever is smaller.
| primaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));
|
| // For the number of ray steps, distinguish inside or outside atmosphere (outer space)
| // (1) from outer space we have to use more ray steps to get a realistic rendering
| // (2) within atmosphere we need fewer steps for faster rendering
| float x_o_a = start_0 - ATMOSPHERE_THICKNESS; // ATMOSPHERE_THICKNESS used as an ad-hoc constant, no precise meaning here, only the order of magnitude matters
| float w_inside_atmosphere = 1.0 - 0.5 * (1.0 + czm_approximateTanh(x_o_a));
| int PRIMARY_STEPS = PRIMARY_STEPS_MAX - int(w_inside_atmosphere * 12.0); // Number of times the ray from the camera to the world position (primary ray) is sampled.
| int LIGHT_STEPS = LIGHT_STEPS_MAX - int(w_inside_atmosphere * 2.0); // Number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.
|
| // Setup for sampling positions along the ray - starting from the intersection with the outer ring of the atmosphere.
| float rayPositionLength = primaryRayAtmosphereIntersect.start;
| // (1) Outside the atmosphere: constant rayStepLength
| // (2) Inside atmosphere: variable rayStepLength to compensate the rough rendering of the smaller number of ray steps
| float totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;
| float rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));
| float rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));
|
| vec3 rayleighAccumulation = vec3(0.0);
| vec3 mieAccumulation = vec3(0.0);
| vec2 opticalDepth = vec2(0.0);
| vec2 heightScale = vec2(u_atmosphereRayleighScaleHeight, u_atmosphereMieScaleHeight);
|
| // Sample positions on the primary ray.
| for (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {
|
| // The loop should be: for (int i = 0; i < PRIMARY_STEPS; ++i) {...} but WebGL1 cannot
| // loop with non-constant condition, so it has to break early instead
| if (i >= PRIMARY_STEPS) {
| break;
| }
|
| // Calculate sample position along viewpoint ray.
| vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);
|
| // Calculate height of sample position above ellipsoid.
| float sampleHeight = length(samplePosition) - atmosphereInnerRadius;
|
| // Calculate and accumulate density of particles at the sample position.
| vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;
| opticalDepth += sampleDensity;
|
| // Generate ray from the sample position segment to the light source, up to the outer ring of the atmosphere.
| czm_ray lightRay = czm_ray(samplePosition, lightDirection);
| czm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);
|
| float lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);
| float lightPositionLength = 0.0;
|
| vec2 lightOpticalDepth = vec2(0.0);
|
| // Sample positions along the light ray, to accumulate incidence of light on the latest sample segment.
| for (int j = 0; j < LIGHT_STEPS_MAX; ++j) {
|
| // The loop should be: for (int j = 0; i < LIGHT_STEPS; ++j) {...} but WebGL1 cannot
| // loop with non-constant condition, so it has to break early instead
| if (j >= LIGHT_STEPS) {
| break;
| }
|
| // Calculate sample position along light ray.
| vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);
|
| // Calculate height of the light sample position above ellipsoid.
| float lightHeight = length(lightPosition) - atmosphereInnerRadius;
|
| // Calculate density of photons at the light sample position.
| lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;
|
| // Increment distance on light ray.
| lightPositionLength += lightStepLength;
| }
|
| // Compute attenuation via the primary ray and the light ray.
| vec3 attenuation = exp(-((u_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (u_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));
|
| // Accumulate the scattering.
| rayleighAccumulation += sampleDensity.x * attenuation;
| mieAccumulation += sampleDensity.y * attenuation;
|
| // Increment distance on primary ray.
| rayPositionLength += (rayStepLength += rayStepLengthIncrease);
| }
|
| // Compute the scattering amount.
| rayleighColor = u_atmosphereRayleighCoefficient * rayleighAccumulation;
| mieColor = u_atmosphereMieCoefficient * mieAccumulation;
|
| // Compute the transmittance i.e. how much light is passing through the atmosphere.
| opacity = length(exp(-((u_atmosphereMieCoefficient * opticalDepth.y) + (u_atmosphereRayleighCoefficient * opticalDepth.x))));
| }
|
| vec4 computeAtmosphereColor(
| vec3 positionWC,
| vec3 lightDirection,
| vec3 rayleighColor,
| vec3 mieColor,
| float opacity
| ) {
| // Setup the primary ray: from the camera position to the vertex position.
| vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
| vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
|
| float cosAngle = dot(cameraToPositionWCDirection, lightDirection);
| float cosAngleSq = cosAngle * cosAngle;
|
| float G = u_atmosphereMieAnisotropy;
| float GSq = G * G;
|
| // The Rayleigh phase function.
| float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
| // The Mie phase function.
| float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));
|
| // The final color is generated by combining the effects of the Rayleigh and Mie scattering.
| vec3 rayleigh = rayleighPhase * rayleighColor;
| vec3 mie = miePhase * mieColor;
|
| vec3 color = (rayleigh + mie) * u_atmosphereLightIntensity;
|
| return vec4(color, opacity);
| }
| `;var nN=`uniform samplerCube u_radianceMap;
|
| in vec2 v_textureCoordinates;
|
|
| const float twoSqrtPi = 2.0 * sqrt(czm_pi);
|
| // Coutesy of https://www.ppsloan.org/publications/StupidSH36.pdf
| float computeShBasis(int index, vec3 s) {
| if (index == 0) { // l = 0, m = 0
| return 1.0 / twoSqrtPi;
| }
|
| if (index == 1) { // l = 1, m = -1
| return -sqrt(3.0) * s.y / twoSqrtPi;
| }
|
| if (index == 2) { // l = 1, m = 0
| return sqrt(3.0) * s.z / twoSqrtPi;
| }
|
| if (index == 3) { // l = 1, m = 1
| return -sqrt(3.0) * s.x / twoSqrtPi;
| }
|
| if (index == 4) { // l = 2, m = -2
| return sqrt(15.0) * s.y * s.x / twoSqrtPi;
| }
|
| if (index == 5) { // l = 2, m = -1
| return -sqrt(15.0) * s.y * s.z / twoSqrtPi;
| }
|
| if (index == 6) { // l = 2, m = 0
| return sqrt(5.0) * (3.0 * s.z * s.z - 1.0) / 2.0 / twoSqrtPi;
| }
|
| if (index == 7) { // l = 2, m = 1
| return -sqrt(15.0) * s.x * s.z / twoSqrtPi;
| }
|
| if (index == 8) { // l = 2, m = 2
| return sqrt(15.0) * (s.x * s.x - s.y * s.y) / 2.0 / twoSqrtPi;
| }
|
| return 0.0;
| }
|
| float vdcRadicalInverse(int i)
| {
| float r;
| float base = 2.0;
| float value = 0.0;
| float invBase = 1.0 / base;
| float invBi = invBase;
| for (int x = 0; x < 100; x++)
| {
| if (i <= 0)
| {
| break;
| }
| r = mod(float(i), base);
| value += r * invBi;
| invBi *= invBase;
| i = int(float(i) * invBase);
| }
| return value;
| }
|
| vec2 hammersley2D(int i, int N)
| {
| return vec2(float(i) / float(N), vdcRadicalInverse(i));
| }
|
| // Sample count is relatively low for the sake of performance, but should still be enough to capture directionality needed for third-order harmonics
| const int samples = 256;
| const float solidAngle = 1.0 / float(samples);
|
| void main() {
| // Get the current coefficient based on the uv
| vec2 uv = v_textureCoordinates.xy * 3.0;
| int coefficientIndex = int(floor(uv.y) * 3.0 + floor(uv.x));
|
| for (int i = 0; i < samples; ++i) {
| vec2 xi = hammersley2D(i, samples);
| float phi = czm_twoPi * xi.x;
| float cosTheta = 1.0 - 2.0 * sqrt(1.0 - xi.y * xi.y);
| float sinTheta = sqrt(1.0 - cosTheta * cosTheta);
| vec3 direction = normalize(vec3(sinTheta * cos(phi), cosTheta, sinTheta * sin(phi)));
|
| // Generate the spherical harmonics basis from the direction
| float Ylm = computeShBasis(coefficientIndex, direction);
|
| vec3 lookupDirection = -direction.xyz;
| lookupDirection.z = -lookupDirection.z;
|
| vec4 color = czm_textureCube(u_radianceMap, lookupDirection, 0.0);
|
| // Use the relevant function for this coefficient
| out_FragColor += Ylm * color * solidAngle * sinTheta;
| }
|
| }
| `;var iN=`precision highp float;
|
| in vec2 v_textureCoordinates;
|
| uniform vec3 u_faceDirection; // Current cubemap face
| uniform vec3 u_positionWC;
| uniform mat4 u_enuToFixedFrame;
| uniform vec4 u_brightnessSaturationGammaIntensity;
| uniform vec4 u_groundColor; // alpha component represent albedo
|
| vec4 getCubeMapDirection(vec2 uv, vec3 faceDir) {
| vec2 scaledUV = uv * 2.0 - 1.0;
|
| if (faceDir.x != 0.0) {
| return vec4(faceDir.x, scaledUV.x * faceDir.x, -scaledUV.y, 0.0);
| } else if (faceDir.y != 0.0) {
| return vec4(scaledUV.x, -scaledUV.y * faceDir.y, faceDir.y, 0.0);
| } else {
| return vec4(scaledUV.x * faceDir.z, -faceDir.z, -scaledUV.y, 0.0);
| }
| }
|
| void main() {
| float height = length(u_positionWC);
| float atmosphereInnerRadius = u_radiiAndDynamicAtmosphereColor.y;
| float ellipsoidHeight = max(height - atmosphereInnerRadius, 0.0);
|
| // Scale the position to ensure the sky color is present, even when underground.
| vec3 positionWC = u_positionWC / height * (ellipsoidHeight + atmosphereInnerRadius);
|
| float atmosphereOuterRadius = u_radiiAndDynamicAtmosphereColor.x;
| float atmosphereHeight = atmosphereOuterRadius - atmosphereInnerRadius;
|
| vec3 direction = (u_enuToFixedFrame * getCubeMapDirection(v_textureCoordinates, u_faceDirection)).xyz;
| vec3 normalizedDirection = normalize(direction);
|
| czm_ray ray = czm_ray(positionWC, normalizedDirection);
| czm_raySegment intersection = czm_raySphereIntersectionInterval(ray, vec3(0.0), atmosphereInnerRadius);
| if (!czm_isEmpty(intersection)) {
| intersection = czm_rayEllipsoidIntersectionInterval(ray, vec3(0.0), czm_ellipsoidInverseRadii);
| }
|
| bool onEllipsoid = intersection.start >= 0.0;
| float rayLength = czm_branchFreeTernary(onEllipsoid, intersection.start, atmosphereOuterRadius);
|
| // Compute sky color for each position on a sphere at radius centered around the provided position's origin
| vec3 skyPositionWC = positionWC + normalizedDirection * rayLength;
|
| float lightEnum = u_radiiAndDynamicAtmosphereColor.z;
| vec3 lightDirectionWC = normalize(czm_getDynamicAtmosphereLightDirection(skyPositionWC, lightEnum));
| vec3 mieColor;
| vec3 rayleighColor;
| float opacity;
| czm_computeScattering(
| ray,
| rayLength,
| lightDirectionWC,
| atmosphereInnerRadius,
| rayleighColor,
| mieColor,
| opacity
| );
|
| vec4 atmopshereColor = czm_computeAtmosphereColor(ray, lightDirectionWC, rayleighColor, mieColor, opacity);
|
| #ifdef ATMOSPHERE_COLOR_CORRECT
| const bool ignoreBlackPixels = true;
| atmopshereColor.rgb = czm_applyHSBShift(atmopshereColor.rgb, czm_atmosphereHsbShift, ignoreBlackPixels);
| #endif
|
| vec3 lookupDirection = -normalizedDirection;
| // Flipping the X vector is a cheap way to get the inverse of czm_temeToPseudoFixed, since that's a rotation about Z.
| lookupDirection.x = -lookupDirection.x;
| lookupDirection = -normalize(czm_temeToPseudoFixed * lookupDirection);
| lookupDirection.x = -lookupDirection.x;
|
| // Values outside the atmopshere are rendered as black, when they should be treated as transparent
| float skyAlpha = clamp((1.0 - ellipsoidHeight / atmosphereHeight) * atmopshereColor.a, 0.0, 1.0);
| skyAlpha = czm_branchFreeTernary(length(atmopshereColor.rgb) <= czm_epsilon7, 0.0, skyAlpha); // Treat black as transparent
|
| // Blend starmap with atmopshere scattering
| float intensity = u_brightnessSaturationGammaIntensity.w;
| vec4 sceneSkyBoxColor = czm_textureCube(czm_environmentMap, lookupDirection);
| vec3 skyBackgroundColor = mix(czm_backgroundColor.rgb, sceneSkyBoxColor.rgb, sceneSkyBoxColor.a);
| vec4 combinedSkyColor = vec4(mix(skyBackgroundColor, atmopshereColor.rgb * intensity, skyAlpha), 1.0);
|
| // Compute ground color based on amount of reflected light, then blend it with ground atmosphere based on height
| vec3 up = normalize(positionWC);
| float occlusion = max(dot(lightDirectionWC, up), 0.05);
| vec4 groundColor = vec4(u_groundColor.rgb * u_groundColor.a * (vec3(intensity * occlusion) + atmopshereColor.rgb), 1.0);
| vec4 blendedGroundColor = mix(groundColor, atmopshereColor, clamp(ellipsoidHeight / atmosphereHeight, 0.0, 1.0));
|
| vec4 color = czm_branchFreeTernary(onEllipsoid, blendedGroundColor, combinedSkyColor);
|
| float brightness = u_brightnessSaturationGammaIntensity.x;
| float saturation = u_brightnessSaturationGammaIntensity.y;
| float gamma = u_brightnessSaturationGammaIntensity.z;
|
| #ifdef ENVIRONMENT_COLOR_CORRECT
| color.rgb = mix(vec3(0.0), color.rgb, brightness);
| color.rgb = czm_saturation(color.rgb, saturation);
| #endif
| color.rgb = pow(color.rgb, vec3(gamma)); // Normally this would be in the ifdef above, but there is a precision issue with the atmopshere scattering transmittance (alpha). Having this line is a workaround for that issue, even when gamma is 1.0.
| color.rgb = czm_gammaCorrect(color.rgb);
|
| out_FragColor = color;
| }
| `;var oN=`precision highp float;
|
| in vec3 v_textureCoordinates;
|
| uniform float u_roughness;
| uniform samplerCube u_radianceTexture;
| uniform vec3 u_faceDirection;
|
| float vdcRadicalInverse(int i)
| {
| float r;
| float base = 2.0;
| float value = 0.0;
| float invBase = 1.0 / base;
| float invBi = invBase;
| for (int x = 0; x < 100; x++)
| {
| if (i <= 0)
| {
| break;
| }
| r = mod(float(i), base);
| value += r * invBi;
| invBi *= invBase;
| i = int(float(i) * invBase);
| }
| return value;
| }
|
| vec2 hammersley2D(int i, int N)
| {
| return vec2(float(i) / float(N), vdcRadicalInverse(i));
| }
|
| vec3 importanceSampleGGX(vec2 xi, float alphaRoughness, vec3 N)
| {
| float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
| float phi = czm_twoPi * xi.x;
| float cosTheta = sqrt((1.0 - xi.y) / (1.0 + (alphaRoughnessSquared - 1.0) * xi.y));
| float sinTheta = sqrt(1.0 - cosTheta * cosTheta);
| vec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);
| vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
| vec3 tangentX = normalize(cross(upVector, N));
| vec3 tangentY = cross(N, tangentX);
| return tangentX * H.x + tangentY * H.y + N * H.z;
| }
|
| // Sample count is relatively low for the sake of performance, but should still be enough to prevent artifacting in lower roughnesses
| const int samples = 128;
|
| void main() {
| vec3 normal = u_faceDirection;
| vec3 V = normalize(v_textureCoordinates);
| float roughness = u_roughness;
|
| vec4 color = vec4(0.0);
| float weight = 0.0;
| for (int i = 0; i < samples; ++i) {
| vec2 xi = hammersley2D(i, samples);
| vec3 H = importanceSampleGGX(xi, roughness, V);
| vec3 L = 2.0 * dot(V, H) * H - V; // reflected vector
|
| float NdotL = max(dot(V, L), 0.0);
| if (NdotL > 0.0) {
| color += vec4(texture(u_radianceTexture, L).rgb, 1.0) * NdotL;
| weight += NdotL;
| }
| }
| out_FragColor = color / weight;
| }
| `;var rN=`in vec3 position;
| out vec3 v_textureCoordinates;
|
| uniform vec3 u_faceDirection;
|
| vec3 getCubeMapDirection(vec2 uv, vec3 faceDir) {
| vec2 scaledUV = uv;
|
| if (faceDir.x != 0.0) {
| return vec3(faceDir.x, scaledUV.y, scaledUV.x * faceDir.x);
| } else if (faceDir.y != 0.0) {
| return vec3(scaledUV.x, -faceDir.y, -scaledUV.y * faceDir.y);
| } else {
| return vec3(scaledUV.x * faceDir.z, scaledUV.y, -faceDir.z);
| }
| }
|
| void main()
| {
| v_textureCoordinates = getCubeMapDirection(position.xy, u_faceDirection);
| v_textureCoordinates.y = -v_textureCoordinates.y;
| v_textureCoordinates.z = -v_textureCoordinates.z;
| gl_Position = vec4(position, 1.0);
| }
| `;function ep(e){this._position=void 0,this._radianceMapDirty=!1,this._radianceCommandsDirty=!1,this._convolutionsCommandsDirty=!1,this._irradianceCommandDirty=!1,this._irradianceTextureDirty=!1,this._sphericalHarmonicCoefficientsDirty=!1,this._shouldRegenerateShaders=!1,e=g(e,g.EMPTY_OBJECT);let t=g(e.mipmapLevels,10);this._mipmapLevels=t,this._radianceMapComputeCommands=new Array(6),this._convolutionComputeCommands=new Array((t-1)*6),this._irradianceComputeCommand=void 0,this._radianceMapFS=void 0,this._irradianceMapFS=void 0,this._convolveSP=void 0,this._va=void 0,this._radianceMapTextures=new Array(6),this._specularMapTextures=new Array((t-1)*6),this._radianceCubeMap=void 0,this._irradianceMapTexture=void 0,this._sphericalHarmonicCoefficients=new Array(9),this._lastTime=new K;let n=Math.pow(2,t-1);this._textureDimensions=new k(n,n),this._radiiAndDynamicAtmosphereColor=new d,this._sceneEnvironmentMap=void 0,this._backgroundColor=void 0,this._owner=void 0,this.enabled=g(e.enabled,!0),this.shouldUpdate=!0,this.maximumSecondsDifference=g(e.maximumSecondsDifference,60*60),this.maximumPositionEpsilon=g(e.maximumPositionEpsilon,1e3),this.atmosphereScatteringIntensity=g(e.atmosphereScatteringIntensity,2),this.gamma=g(e.gamma,1),this.brightness=g(e.brightness,1),this.saturation=g(e.saturation,1),this.groundColor=g(e.groundColor,ep.AVERAGE_EARTH_GROUND_COLOR),this.groundAlbedo=g(e.groundAlbedo,.31)}Object.defineProperties(ep.prototype,{owner:{get:function(){return this._owner}},shouldRegenerateShaders:{get:function(){return this._shouldRegenerateShaders}},position:{get:function(){return this._position},set:function(e){d.equalsEpsilon(e,this._position,0,this.maximumPositionEpsilon)||(this._position=d.clone(e,this._position),this.reset())}},radianceCubeMap:{get:function(){return this._radianceCubeMap}},maximumMipmapLevel:{get:function(){return this._mipmapLevels}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}}});ep.setOwner=function(e,t,n){if(e!==t[n]&&(t[n]=t[n]&&t[n].destroy(),c(e))){if(c(e._owner))throw new w("DynamicEnvironmentMapManager should only be assigned to one object");e._owner=t,t[n]=e}};ep.prototype.reset=function(){let e=this._radianceMapComputeCommands.length;for(let t=0;t<e;++t)this._radianceMapComputeCommands[t]=void 0;e=this._convolutionComputeCommands.length;for(let t=0;t<e;++t)this._convolutionComputeCommands[t]=void 0;c(this._irradianceComputeCommand)&&(this._irradianceComputeCommand=void 0),this._radianceMapDirty=!0,this._radianceCommandsDirty=!0};var X3e=new d,K3e=new d;function $3e(e,t){let n=e._position,i=t.atmosphere,o=t.mapProjection.ellipsoid,r=o.scaleToGeodeticSurface(n,K3e),s=1.025,a=X3e,l=c(r)?d.magnitude(r):o.maximumRadius;return a.x=l*s,a.y=l,a.z=i.dynamicLighting,!d.equalsEpsilon(e._radiiAndDynamicAtmosphereColor,a)||t.environmentMap!==e._sceneEnvironmentMap||t.backgroundColor!==e._backgroundColor?(d.clone(a,e._radiiAndDynamicAtmosphereColor),e._sceneEnvironmentMap=t.environmentMap,e._backgroundColor=t.backgroundColor,!0):!1}var Ane=new d,Z3e=new N,J3e=new ee,Q3e=new z;function eke(e,t){let n=t.context,i=e._textureDimensions;if(c(e._radianceCubeMap)||(e._radianceCubeMap=new Lo({context:n,width:i.x,height:i.y,pixelDatatype:Ne.UNSIGNED_BYTE,pixelFormat:Re.RGBA})),e._radianceCommandsDirty){let o=e._radianceMapFS;c(o)||(o=new Be({sources:[Eh,iN]}),e._radianceMapFS=o),WT.requiresColorCorrect(t.atmosphere)&&o.defines.push("ATMOSPHERE_COLOR_CORRECT");let r=e._position,s=e._radiiAndDynamicAtmosphereColor,a=t.mapProjection.ellipsoid,l=Lt.eastNorthUpToFixedFrame(r,a,Z3e),u=J3e;u.x=e.brightness,u.y=e.saturation,u.z=e.gamma,u.w=e.atmosphereScatteringIntensity,(e.brightness!==1||e.saturation!==1||e.gamma!==1)&&o.defines.push("ENVIRONMENT_COLOR_CORRECT");let f=0;for(let h of Lo.faceNames()){let m=e._radianceMapTextures[f];c(m)&&m.destroy(),m=new Ot({context:n,width:i.x,height:i.y,pixelDatatype:Ne.UNSIGNED_BYTE,pixelFormat:Re.RGBA}),e._radianceMapTextures[f]=m;let p=f,_=new Vc({fragmentShaderSource:o,outputTexture:m,uniformMap:{u_radiiAndDynamicAtmosphereColor:()=>s,u_enuToFixedFrame:()=>l,u_faceDirection:()=>Lo.getDirection(h,Ane),u_positionWC:()=>r,u_brightnessSaturationGammaIntensity:()=>u,u_groundColor:()=>e.groundColor.withAlpha(e.groundAlbedo,Q3e)},persists:!0,owner:e,postExecute:()=>{let b=e._radianceMapComputeCommands;if(!c(b[p]))return;b[p]=void 0;let x=new Lr({context:n,colorTextures:[e._radianceMapTextures[p]],destroyAttachments:!1});x._bind(),e._radianceCubeMap[h].copyFromFramebuffer(),x._unBind(),x.destroy(),b.some(c)||(e._convolutionsCommandsDirty=!0,e._shouldRegenerateShaders=!0)}});t.commandList.push(_),e._radianceMapComputeCommands[f]=_,f++}e._radianceCommandsDirty=!1}}function tke(e,t){let n=e._radianceCubeMap;n.generateMipmap();let i=e._mipmapLevels,o=e._textureDimensions,r=o.x/2,s=o.y/2,a=t.context,l=0,u=(h,m,p,_)=>()=>{let b=e._convolutionComputeCommands;c(b[h])&&(b[h]=void 0,n.copyFace(t,m,p,_),l++,l===e._specularMapTextures.length&&(e._irradianceCommandDirty=!0,n.sampler=new Jt({minificationFilter:Wt.LINEAR_MIPMAP_LINEAR}),e._shouldRegenerateShaders=!0))},f=0;for(let h=1;h<i;++h){for(let m of Lo.faceNames()){let p=e._specularMapTextures[f]=new Ot({context:a,width:r,height:s,pixelDatatype:Ne.UNSIGNED_BYTE,pixelFormat:Re.RGBA}),_=e._va;c(_)||(_=Lo.createVertexArray(a,m),e._va=_);let b=e._convolveSP;c(b)||(b=en.fromCache({context:a,vertexShaderSource:rN,fragmentShaderSource:oN,attributeLocations:{positions:0}}),e._convolveSP=b);let x=new Vc({shaderProgram:b,vertexArray:_,outputTexture:p,persists:!0,owner:e,uniformMap:{u_roughness:()=>h/(i-1),u_radianceTexture:()=>n,u_faceDirection:()=>Lo.getDirection(m,Ane)},postExecute:u(f,p,m,h)});e._convolutionComputeCommands[f]=x,t.commandList.push(x),++f}r/=2,s/=2}}var vne=new k(3,3);function nke(e,t){let n=t.context,i=vne,o=e._irradianceMapTexture;c(o)||(o=new Ot({context:n,width:i.x,height:i.y,pixelDatatype:Ne.FLOAT,pixelFormat:Re.RGBA}),e._irradianceMapTexture=o);let r=e._irradianceMapFS;c(r)||(r=new Be({sources:[nN]}),e._irradianceMapFS=r);let s=new Vc({fragmentShaderSource:r,outputTexture:o,uniformMap:{u_radianceMap:()=>e._radianceCubeMap},postExecute:()=>{c(e._irradianceComputeCommand)&&(e._irradianceTextureDirty=!1,e._irradianceComputeCommand=void 0,e._sphericalHarmonicCoefficientsDirty=!0)}});e._irradianceComputeCommand=s,t.commandList.push(s),e._irradianceTextureDirty=!0}function ike(e,t){let n=t.context,i=new Lr({context:n,colorTextures:[e._irradianceMapTexture],destroyAttachments:!1}),o=vne,r=n.readPixels({x:0,y:0,width:o.x,height:o.y,framebuffer:i});for(let s=0;s<9;++s)e._sphericalHarmonicCoefficients[s]=d.unpack(r,s*4),d.multiplyByScalar(e._sphericalHarmonicCoefficients[s],e.atmosphereScatteringIntensity,e._sphericalHarmonicCoefficients[s]);i.destroy(),e._shouldRegenerateShaders=!0}ep.prototype.update=function(e){let t=e.mode;if(!this.enabled||!this.shouldUpdate||!c(this._position)||t===J.MORPHING){this._shouldRegenerateShaders=!1;return}let n=e.atmosphere.dynamicLighting;if(($3e(this,e)||n===eg.SUNLIGHT&&!K.equalsEpsilon(e.time,this._lastTime,this.maximumSecondsDifference))&&(this.reset(),this._lastTime=K.clone(e.time,this._lastTime)),this._radianceMapDirty&&(eke(this,e),this._radianceMapDirty=!1),this._convolutionsCommandsDirty&&(tke(this,e),this._convolutionsCommandsDirty=!1),this._irradianceCommandDirty&&(nke(this,e),this._irradianceCommandDirty=!1),this._irradianceTextureDirty){this._shouldRegenerateShaders=!1;return}if(this._sphericalHarmonicCoefficientsDirty){ike(this,e),this._sphericalHarmonicCoefficientsDirty=!1;return}this._shouldRegenerateShaders=!1};ep.prototype.isDestroyed=function(){return!1};ep.prototype.destroy=function(){let e=this._radianceMapComputeCommands.length;for(let t=0;t<e;++t)this._radianceMapComputeCommands[t]=void 0;e=this._convolutionComputeCommands.length;for(let t=0;t<e;++t)this._convolutionComputeCommands[t]=void 0;this._irradianceMapComputeCommand=void 0,e=this._radianceMapTextures.length;for(let t=0;t<e;++t)this._radianceMapTextures[t]=this._radianceMapTextures[t]&&this._radianceMapTextures[t].destroy();e=this._specularMapTextures.length;for(let t=0;t<e;++t)this._specularMapTextures[t]=this._specularMapTextures[t]&&this._specularMapTextures[t].destroy();return this._radianceCubeMap=this._radianceCubeMap&&this._radianceCubeMap.destroy(),this._irradianceMapTexture=this._irradianceMapTexture&&this._irradianceMapTexture.destroy(),ue(this)};ep.AVERAGE_EARTH_GROUND_COLOR=Object.freeze(z.fromCssColorString("#717145"));var tg=ep;var DA={HIGHLIGHT:0,REPLACE:1,MIX:2};DA.getColorBlend=function(e,t){if(e===DA.HIGHLIGHT)return 0;if(e===DA.REPLACE)return 1;if(e===DA.MIX)return O.clamp(t,O.EPSILON4,1)};var _c=Object.freeze(DA);var oke={XTRANSLATE:"xTranslate",YTRANSLATE:"yTranslate",ZTRANSLATE:"zTranslate",XROTATE:"xRotate",YROTATE:"yRotate",ZROTATE:"zRotate",XSCALE:"xScale",YSCALE:"yScale",ZSCALE:"zScale",UNIFORMSCALE:"uniformScale"},gc=Object.freeze(oke);var rke={STEP:0,LINEAR:1,CUBICSPLINE:2},wh=Object.freeze(rke);var Dne={};function IA(e){C.typeOf.number.greaterThan("options.count",e.count,0),C.typeOf.object("options.properties",e.properties),this._count=e.count,this._properties=ze(e.properties,!0)}IA.prototype.hasProperty=function(e){return Rn.hasProperty(e,this._properties,Dne)};IA.prototype.getPropertyIds=function(e){return Rn.getPropertyIds(this._properties,Dne,e)};IA.prototype.getProperty=function(e,t){if(C.typeOf.number("index",e),C.typeOf.string("propertyId",t),e<0||e>=this._count)throw new w(`index must be in the range [0, ${this._count})`);let n=this._properties[t];if(c(n))return ze(n[e],!0)};IA.prototype.setProperty=function(e,t,n){if(C.typeOf.number("index",e),C.typeOf.string("propertyId",t),e<0||e>=this._count)throw new w(`index must be in the range [0, ${this._count})`);let i=this._properties[t];c(i)||(i=new Array(this._count),this._properties[t]=i),i[e]=ze(n,!0)};var ng=IA;function Fa(e){e=g(e,g.EMPTY_OBJECT),C.typeOf.number("options.count",e.count),this._name=e.name,this._id=e.id,this._count=e.count,this._extras=e.extras,this._extensions=e.extensions,this._metadataTable=e.metadataTable,this._jsonMetadataTable=e.jsonMetadataTable,this._batchTableHierarchy=e.batchTableHierarchy}Object.defineProperties(Fa.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},count:{get:function(){return this._count}},class:{get:function(){if(c(this._metadataTable))return this._metadataTable.class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},byteLength:{get:function(){let e=0;return c(this._metadataTable)&&(e+=this._metadataTable.byteLength),c(this._batchTableHierarchy)&&(e+=this._batchTableHierarchy.byteLength),e}}});Fa.prototype.hasProperty=function(e,t){return C.typeOf.number("index",e),C.typeOf.string("propertyId",t),!!(c(this._metadataTable)&&this._metadataTable.hasProperty(t)||c(this._batchTableHierarchy)&&this._batchTableHierarchy.hasProperty(e,t)||c(this._jsonMetadataTable)&&this._jsonMetadataTable.hasProperty(t))};Fa.prototype.hasPropertyBySemantic=function(e,t){return C.typeOf.number("index",e),C.typeOf.string("semantic",t),c(this._metadataTable)?this._metadataTable.hasPropertyBySemantic(t):!1};Fa.prototype.propertyExists=function(e){return C.typeOf.string("propertyId",e),!!(c(this._metadataTable)&&this._metadataTable.hasProperty(e)||c(this._batchTableHierarchy)&&this._batchTableHierarchy.propertyExists(e)||c(this._jsonMetadataTable)&&this._jsonMetadataTable.hasProperty(e))};Fa.prototype.propertyExistsBySemantic=function(e){return C.typeOf.string("semantic",e),c(this._metadataTable)?this._metadataTable.hasPropertyBySemantic(e):!1};var Qj=[];Fa.prototype.getPropertyIds=function(e,t){return t=c(t)?t:[],t.length=0,c(this._metadataTable)&&t.push.apply(t,this._metadataTable.getPropertyIds(Qj)),c(this._batchTableHierarchy)&&t.push.apply(t,this._batchTableHierarchy.getPropertyIds(e,Qj)),c(this._jsonMetadataTable)&&t.push.apply(t,this._jsonMetadataTable.getPropertyIds(Qj)),t};Fa.prototype.getProperty=function(e,t){let n;if(c(this._metadataTable)&&(n=this._metadataTable.getProperty(e,t),c(n))||c(this._batchTableHierarchy)&&(n=this._batchTableHierarchy.getProperty(e,t),c(n))||c(this._jsonMetadataTable)&&(n=this._jsonMetadataTable.getProperty(e,t),c(n)))return n};Fa.prototype.setProperty=function(e,t,n){c(this._metadataTable)&&this._metadataTable.setProperty(e,t,n)||c(this._batchTableHierarchy)&&this._batchTableHierarchy.setProperty(e,t,n)||(c(this._jsonMetadataTable)||(this._jsonMetadataTable=new ng({count:this._count,properties:{}})),this._jsonMetadataTable.setProperty(e,t,n))};Fa.prototype.getPropertyBySemantic=function(e,t){if(c(this._metadataTable))return this._metadataTable.getPropertyBySemantic(e,t)};Fa.prototype.setPropertyBySemantic=function(e,t,n){return c(this._metadataTable)?this._metadataTable.setPropertyBySemantic(e,t,n):!1};Fa.prototype.getPropertyTypedArray=function(e){if(C.typeOf.string("propertyId",e),c(this._metadataTable))return this._metadataTable.getPropertyTypedArray(e)};Fa.prototype.getPropertyTypedArrayBySemantic=function(e){if(C.typeOf.string("semantic",e),c(this._metadataTable))return this._metadataTable.getPropertyTypedArrayBySemantic(e)};function e5(e,t){if(!c(e)||e<0||e>=t)throw new w(`featureId is required and must be between zero and featuresLength - 1 (${t}`-+").")}Fa.prototype.isClass=function(e,t){e5(e,this.count),C.typeOf.string("className",t);let n=this._batchTableHierarchy;return c(n)?n.isClass(e,t):!1};Fa.prototype.isExactClass=function(e,t){return e5(e,this.count),C.typeOf.string("className",t),this.getExactClassName(e)===t};Fa.prototype.getExactClassName=function(e){e5(e,this.count);let t=this._batchTableHierarchy;if(c(t))return t.getClassName(e)};var el=Fa;function OA(e){e=g(e,g.EMPTY_OBJECT);let t=e.property,n=e.classProperty,i=e.textures;C.typeOf.object("options.property",t),C.typeOf.object("options.classProperty",n),C.typeOf.object("options.textures",i);let o=c(t.channels)?t.channels:[0],r=t,s=zl.createModelTextureReader({textureInfo:r,channels:cke(o),texture:i[r.index]});this._min=t.min,this._max=t.max;let a=t.offset,l=t.scale,u=n.hasValueTransform||c(a)||c(l);a=g(a,n.offset),l=g(l,n.scale),a=n.unpackVectorAndMatrixTypes(a),l=n.unpackVectorAndMatrixTypes(l),this._offset=a,this._scale=l,this._hasValueTransform=u,this._textureReader=s,this._classProperty=n,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(OA.prototype,{textureReader:{get:function(){return this._textureReader}},hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},classProperty:{get:function(){return this._classProperty}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});OA.prototype.isGpuCompatible=function(){let e=this._classProperty,t=e.type,n=e.componentType;return e.isArray?e.isVariableLengthArray?(mt(`Property texture property ${e.id} is a variable-length array, which is not supported`),!1):e.arrayLength>4?(mt(`Property texture property ${e.id} is an array of length ${e.arrayLength}, but may have at most a length of 4`),!1):t!==Ct.SCALAR?(mt(`Property texture property ${e.id} is an array of type ${t}, but only SCALAR is supported`),!1):n!==zt.UINT8?(mt(`Property texture property ${e.id} is an array with component type ${n}, but only UINT8 is supported`),!1):!0:Ct.isVectorType(t)||t===Ct.SCALAR?n!==zt.UINT8?(mt(`Property texture property ${e.id} has component type ${n}, but only UINT8 is supported`),!1):!0:(mt(`Property texture property ${e.id} has an unsupported type`),!1)};var ske=[void 0,"float","vec2","vec3","vec4"],ake=[void 0,"int","ivec2","ivec3","ivec4"];OA.prototype.getGlslType=function(){let e=this._classProperty,t=Ct.getComponentCount(e.type);return e.isArray&&(t=e.arrayLength),e.normalized?ske[t]:ake[t]};OA.prototype.unpackInShader=function(e){return this._classProperty.normalized?e:`${this.getGlslType()}(255.0 * ${e})`};function cke(e){return e.map(function(t){return"rgba".charAt(t)}).join("")}var sN=OA;function t5(e){e=g(e,g.EMPTY_OBJECT);let t=e.propertyTexture,n=e.class,i=e.textures;C.typeOf.object("options.propertyTexture",t),C.typeOf.object("options.class",n),C.typeOf.object("options.textures",i);let o=t.extensions,r=t.extras,s={};if(c(t.properties))for(let a in t.properties)t.properties.hasOwnProperty(a)&&(s[a]=new sN({property:t.properties[a],classProperty:n.properties[a],textures:i}));this._name=e.name,this._id=e.id,this._class=n,this._properties=s,this._extras=r,this._extensions=o}Object.defineProperties(t5.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},class:{get:function(){return this._class}},properties:{get:function(){return this._properties}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});t5.prototype.getProperty=function(e){return C.typeOf.string("propertyId",e),this._properties[e]};var ig=t5;function Ine(e){e=g(e,g.EMPTY_OBJECT);let t=e.property,n=e.classProperty;C.typeOf.object("options.property",t),C.typeOf.object("options.classProperty",n),this._attribute=t.attribute,this._classProperty=n,this._min=t.min,this._max=t.max;let i=t.offset,o=t.scale,r=n.hasValueTransform||c(i)||c(o);i=g(i,n.offset),o=g(o,n.scale),i=n.unpackVectorAndMatrixTypes(i),o=n.unpackVectorAndMatrixTypes(o),this._offset=i,this._scale=o,this._hasValueTransform=r,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(Ine.prototype,{attribute:{get:function(){return this._attribute}},hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},classProperty:{get:function(){return this._classProperty}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var aN=Ine;function n5(e){e=g(e,g.EMPTY_OBJECT);let t=e.propertyAttribute,n=e.class;C.typeOf.object("options.propertyAttribute",t),C.typeOf.object("options.class",n);let i={};if(c(t.properties))for(let o in t.properties)t.properties.hasOwnProperty(o)&&(i[o]=new aN({property:t.properties[o],classProperty:n.properties[o]}));this._name=e.name,this._id=e.id,this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(n5.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},class:{get:function(){return this._class}},properties:{get:function(){return this._properties}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});n5.prototype.getProperty=function(e){return C.typeOf.string("propertyId",e),this._properties[e]};var qT=n5;function PA(e){e=g(e,g.EMPTY_OBJECT),C.typeOf.object("options.schema",e.schema),this._schema=e.schema;let t=e.propertyTables;this._propertyTableCount=c(t)?t.length:0,this._propertyTables=t,this._propertyTextures=e.propertyTextures,this._propertyAttributes=e.propertyAttributes,this._statistics=e.statistics,this._extras=e.extras,this._extensions=e.extensions}Object.defineProperties(PA.prototype,{schema:{get:function(){return this._schema}},statistics:{get:function(){return this._statistics}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},propertyTableCount:{get:function(){return this._propertyTableCount}},propertyTables:{get:function(){return this._propertyTables}},propertyTextures:{get:function(){return this._propertyTextures}},propertyAttributes:{get:function(){return this._propertyAttributes}},propertyTablesByteLength:{get:function(){if(!c(this._propertyTables))return 0;let e=0,t=this._propertyTables.length;for(let n=0;n<t;n++)e+=this._propertyTables[n].byteLength;return e}}});PA.prototype.getPropertyTable=function(e){return C.typeOf.number("propertyTableId",e),this._propertyTables[e]};PA.prototype.getPropertyTexture=function(e){return C.typeOf.number("propertyTextureId",e),this._propertyTextures[e]};PA.prototype.getPropertyAttribute=function(e){return C.typeOf.number("propertyAttributeId",e),this._propertyAttributes[e]};var Vs=PA;function lke(e){e=g(e,g.EMPTY_OBJECT);let t=e.extension,n=e.schema;C.typeOf.object("options.extension",t),C.typeOf.object("options.schema",n);let i=[];if(c(t.propertyTables))for(let s=0;s<t.propertyTables.length;s++){let a=t.propertyTables[s],l=n.classes[a.class],u=new kl({count:a.count,properties:a.properties,class:l,bufferViews:e.bufferViews});i.push(new el({id:s,name:a.name,count:a.count,metadataTable:u,extras:a.extras,extensions:a.extensions}))}let o=[];if(c(t.propertyTextures))for(let s=0;s<t.propertyTextures.length;s++){let a=t.propertyTextures[s];o.push(new ig({id:s,name:a.name,propertyTexture:a,class:n.classes[a.class],textures:e.textures}))}let r=[];if(c(t.propertyAttributes))for(let s=0;s<t.propertyAttributes.length;s++){let a=t.propertyAttributes[s];r.push(new qT({id:s,name:a.name,class:n.classes[a.class],propertyAttribute:a}))}return new Vs({schema:n,propertyTables:i,propertyTextures:o,propertyAttributes:r,statistics:t.statistics,extras:t.extras,extensions:t.extensions})}var cN=lke;function uke(e){e=g(e,g.EMPTY_OBJECT);let t=e.extension,n=e.schema;C.typeOf.object("options.extension",t),C.typeOf.object("options.schema",n);let i,o=[],r;if(c(t.featureTables))for(r=Object.keys(t.featureTables).sort(),i=0;i<r.length;i++){let a=r[i],l=t.featureTables[a],u=n.classes[l.class],f=new kl({count:l.count,properties:l.properties,class:u,bufferViews:e.bufferViews});o.push(new el({id:a,count:l.count,metadataTable:f,extras:l.extras,extensions:l.extensions}))}let s=[];if(c(t.featureTextures))for(r=Object.keys(t.featureTextures).sort(),i=0;i<r.length;i++){let a=r[i],l=t.featureTextures[a];s.push(new ig({id:a,propertyTexture:fke(l),class:n.classes[l.class],textures:e.textures}))}return new Vs({schema:n,propertyTables:o,propertyTextures:s,statistics:t.statistics,extras:t.extras,extensions:t.extensions})}function fke(e){let t={class:e.class,properties:{}},n=e.properties;for(let i in n)if(n.hasOwnProperty(i)){let o=n[i],r={channels:dke(o.channels),extras:o.extras,extensions:o.extensions};t.properties[i]=bt(o.texture,r,!0)}return t}function dke(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]="rgba".indexOf(e[i]);return n}var lN=uke;function og(e){e=g(e,g.EMPTY_OBJECT);let{gltf:t,extension:n,extensionLegacy:i,gltfResource:o,baseResource:r,supportedImageFormats:s,frameState:a,cacheKey:l,asynchronous:u=!0}=e;if(C.typeOf.object("options.gltf",t),C.typeOf.object("options.gltfResource",o),C.typeOf.object("options.baseResource",r),C.typeOf.object("options.supportedImageFormats",s),C.typeOf.object("options.frameState",a),!c(e.extension)&&!c(e.extensionLegacy))throw new w("One of options.extension or options.extensionLegacy must be specified");this._gltfResource=o,this._baseResource=r,this._gltf=t,this._extension=n,this._extensionLegacy=i,this._supportedImageFormats=s,this._frameState=a,this._cacheKey=l,this._asynchronous=u,this._bufferViewLoaders=[],this._bufferViewIds=[],this._textureLoaders=[],this._textureIds=[],this._schemaLoader=void 0,this._structuralMetadata=void 0,this._state=_t.UNLOADED,this._promise=void 0}c(Object.create)&&(og.prototype=Object.create(Gi.prototype),og.prototype.constructor=og);Object.defineProperties(og.prototype,{cacheKey:{get:function(){return this._cacheKey}},structuralMetadata:{get:function(){return this._structuralMetadata}}});async function hke(e){try{let t=yke(e),n=Eke(e),i=wke(e);return await Promise.all([t,n,i]),e.isDestroyed()?void 0:(e._gltf=void 0,e._state=_t.LOADED,e)}catch(t){if(e.isDestroyed())return;throw e.unload(),e._state=_t.FAILED,e.getError("Failed to load structural metadata",t)}}og.prototype.load=function(){return c(this._promise)?this._promise:(this._state=_t.LOADING,this._promise=hke(this),this._promise)};function mke(e,t){for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],o=i.values,r=i.arrayOffsets,s=i.stringOffsets;c(o)&&(t[o]=!0),c(r)&&(t[r]=!0),c(s)&&(t[s]=!0)}}function pke(e,t){for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],o=i.bufferView,r=i.arrayOffsetBufferView,s=i.stringOffsetBufferView;c(o)&&(t[o]=!0),c(r)&&(t[r]=!0),c(s)&&(t[s]=!0)}}function _ke(e){let t=e.propertyTables,n={};if(c(t))for(let i=0;i<t.length;i++){let o=t[i];mke(o.properties,n)}return n}function gke(e){let t=e.featureTables,n={};if(c(t)){for(let i in t)if(t.hasOwnProperty(i)){let r=t[i].properties;c(r)&&pke(r,n)}}return n}async function yke(e){let t;c(e._extension)?t=_ke(e._extension):t=gke(e._extensionLegacy);let n=[];for(let i in t)if(t.hasOwnProperty(i)){let o=Fi.getBufferViewLoader({gltf:e._gltf,bufferViewId:parseInt(i),gltfResource:e._gltfResource,baseResource:e._baseResource});e._bufferViewLoaders.push(o),e._bufferViewIds.push(i),n.push(o.load())}return Promise.all(n)}function bke(e){let t={},n=e.propertyTextures;if(c(n))for(let i=0;i<n.length;i++){let r=n[i].properties;c(r)&&xke(r,t)}return t}function xke(e,t){for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];t[i.index]=i}}function Tke(e){let t={},n=e.featureTextures;if(c(n)){for(let i in n)if(n.hasOwnProperty(i)){let r=n[i].properties;c(r)&&Cke(r,t)}}return t}function Cke(e,t){for(let n in e)if(e.hasOwnProperty(n)){let o=e[n].texture;t[o.index]=o}}function Eke(e){let t;c(e._extension)?t=bke(e._extension):t=Tke(e._extensionLegacy);let n=e._gltf,i=e._gltfResource,o=e._baseResource,r=e._supportedImageFormats,s=e._frameState,a=e._asynchronous,l=[];for(let u in t)if(t.hasOwnProperty(u)){let f=Fi.getTextureLoader({gltf:n,textureInfo:t[u],gltfResource:i,baseResource:o,supportedImageFormats:r,frameState:s,asynchronous:a});e._textureLoaders.push(f),e._textureIds.push(u),l.push(f.load())}return Promise.all(l)}async function wke(e){let t=g(e._extension,e._extensionLegacy),n;if(c(t.schemaUri)){let i=e._baseResource.getDerivedResource({url:t.schemaUri});n=Fi.getSchemaLoader({resource:i})}else n=Fi.getSchemaLoader({schema:t.schema});if(e._schemaLoader=n,await n.load(),!n.isDestroyed())return n.schema}og.prototype.process=function(e){if(C.typeOf.object("frameState",e),this._state===_t.READY)return!0;if(this._state!==_t.LOADED)return!1;let t=this._textureLoaders,n=t.length,i=!0;for(let a=0;a<n;++a){let u=t[a].process(e);i=i&&u}if(!i)return!1;let o=this._schemaLoader.schema,r={};for(let a=0;a<this._bufferViewIds.length;++a){let l=this._bufferViewIds[a],u=this._bufferViewLoaders[a];if(!u.isDestroyed()){let f=new Uint8Array(u.typedArray);r[l]=f}}let s={};for(let a=0;a<this._textureIds.length;++a){let l=this._textureIds[a],u=t[a];u.isDestroyed()||(s[l]=u.texture)}return c(this._extension)?this._structuralMetadata=cN({extension:this._extension,schema:o,bufferViews:r,textures:s}):this._structuralMetadata=lN({extension:this._extensionLegacy,schema:o,bufferViews:r,textures:s}),One(this),this._state=_t.READY,!0};function One(e){let t=e._bufferViewLoaders,n=t.length;for(let i=0;i<n;++i)Fi.unload(t[i]);e._bufferViewLoaders.length=0,e._bufferViewIds.length=0}function Ske(e){let t=e._textureLoaders,n=t.length;for(let i=0;i<n;++i)Fi.unload(t[i]);e._textureLoaders.length=0,e._textureIds.length=0}og.prototype.unload=function(){One(this),Ske(this),c(this._schemaLoader)&&Fi.unload(this._schemaLoader),this._schemaLoader=void 0,this._structuralMetadata=void 0};var uN=og;var YT={TRANSLATION:"TRANSLATION",ROTATION:"ROTATION",SCALE:"SCALE",FEATURE_ID:"_FEATURE_ID"};YT.fromGltfSemantic=function(e){C.typeOf.string("gltfSemantic",e);let t=e,i=/^(\w+)_\d+$/.exec(e);switch(i!==null&&(t=i[1]),t){case"TRANSLATION":return YT.TRANSLATION;case"ROTATION":return YT.ROTATION;case"SCALE":return YT.SCALE;case"_FEATURE_ID":return YT.FEATURE_ID}};var Yr=Object.freeze(YT);var Ake=65534,vke=255;function fN(e){e=g(e,g.EMPTY_OBJECT);let t=e.triangleIndices,n=e.outlineIndices,i=e.originalVertexCount;C.typeOf.object("options.triangleIndices",t),C.typeOf.object("options.outlineIndices",n),C.typeOf.number("options.originalVertexCount",i),this._triangleIndices=t,this._originalVertexCount=i,this._edges=new Mne(n,i),this._outlineCoordinatesTypedArray=void 0,this._extraVertices=[],Dke(this)}Object.defineProperties(fN.prototype,{updatedTriangleIndices:{get:function(){return this._triangleIndices}},outlineCoordinates:{get:function(){return this._outlineCoordinatesTypedArray}}});function Dke(e){let t=e._triangleIndices,n=e._edges,i=[],o=e._extraVertices,r=e._originalVertexCount,s={};for(let a=0;a<t.length;a+=3){let l=t[a],u=t[a+1],f=t[a+2],h=!1,m=h||n.hasEdge(l,u),p=h||n.hasEdge(u,f),_=h||n.hasEdge(f,l),b=Pne(i,l,u,f,m,p,_);for(;c(b);){let x=s[b];if(!c(x)){x=r+o.length;let T=b;for(;T>=r;)T=o[T-r];o.push(T),s[b]=x}x>Ake&&(t instanceof Uint16Array||t instanceof Uint8Array)?t=new Uint32Array(t):x>vke&&t instanceof Uint8Array&&(t=new Uint16Array(t)),b===l?(l=x,t[a]=x):b===u?(u=x,t[a+1]=x):(f=x,t[a+2]=x),b=Pne(i,l,u,f,m,p,_)}}e._triangleIndices=t,e._outlineCoordinatesTypedArray=new Float32Array(i)}function Pne(e,t,n,i,o,r,s){let a=s?1:0,l=o?1:0,u=0,f=i5(e,t,a,l,u);if(f===0)return t;let h=0,m=o?1:0,p=r?1:0,_=i5(e,n,h,m,p);if(_===0)return n;let b=s?1:0,x=0,T=r?1:0,E=i5(e,i,b,x,T);if(E===0)return i;let S=f&_&E,A,v,D;if(S&1)A=0,v=1,D=2;else if(S&2)A=0,D=1,v=2;else if(S&4)v=0,A=1,D=2;else if(S&8)v=0,D=1,A=2;else if(S&16)D=0,A=1,v=2;else if(S&32)D=0,v=1,A=2;else{let F=o5(f),y=o5(_),I=o5(E);return F<y&&F<I?t:y<I?n:i}let R=t*3;e[R+A]=a,e[R+v]=l,e[R+D]=u;let P=n*3;e[P+A]=h,e[P+v]=m,e[P+D]=p;let L=i*3;e[L+A]=b,e[L+v]=x,e[L+D]=T}function i5(e,t,n,i,o){let r=t*3,s=e[r],a=e[r+1],l=e[r+2];return c(s)?(s===n&&a===i&&l===o)<<0|(s===n&&a===o&&l===i)<<1|(s===i&&a===n&&l===o)<<2|(s===i&&a===o&&l===n)<<3|(s===o&&a===n&&l===i)<<4|(s===o&&a===i&&l===n)<<5:63}function o5(e){return(e&1)+(e>>1&1)+(e>>2&1)+(e>>3&1)+(e>>4&1)+(e>>5&1)}fN.prototype.updateAttribute=function(e){let t=this._extraVertices,n=e.length,i=n/this._originalVertexCount,o=t.length,r=e.constructor,s=new r(e.length+o*i);s.set(e);for(let a=0;a<o;a++){let l=t[a]*i,u=n+a*i;for(let f=0;f<i;f++)s[u+f]=s[l+f]}return s};fN.createTexture=function(e){let t=e.cache.modelOutliningCache;if(c(t)||(t=e.cache.modelOutliningCache={}),c(t.outlineTexture))return t.outlineTexture;let n=Math.min(4096,ht.maximumTextureSize),i=n,o=Rne(i),r=[];for(;i>1;)i>>=1,r.push(Rne(i));let s=new Ot({context:e,source:{arrayBufferView:o,mipLevels:r},width:n,height:1,pixelFormat:Re.LUMINANCE,sampler:new Jt({wrapS:pn.CLAMP_TO_EDGE,wrapT:pn.CLAMP_TO_EDGE,minificationFilter:Wt.LINEAR_MIPMAP_LINEAR,magnificationFilter:si.LINEAR})});return t.outlineTexture=s,s};function Rne(e){let t=new Uint8Array(e);return t[e-1]=192,e===8?t[e-1]=96:e===4?t[e-1]=48:e===2?t[e-1]=24:e===1&&(t[e-1]=12),t}function Mne(e,t){this._originalVertexCount=t,this._edges=new Set;for(let n=0;n<e.length;n+=2){let i=e[n],o=e[n+1],r=Math.min(i,o),s=Math.max(i,o),a=r*this._originalVertexCount+s;this._edges.add(a)}}Mne.prototype.hasEdge=function(e,t){let n=Math.min(e,t),i=Math.max(e,t),o=n*this._originalVertexCount+i;return this._edges.has(o)};var XT=fN;function Lne(e){C.typeOf.object("attribute",e),this.attribute=e,this.loadBuffer=!1,this.loadTypedArray=!1}function Ike(e){C.typeOf.object("indices",e),this.indices=e,this.loadBuffer=!1,this.loadTypedArray=!1}function dN(e){C.typeOf.object("primitive",e),this.primitive=e,this.attributePlans=[],this.indicesPlan=void 0,this.needsOutlines=!1,this.outlineIndices=void 0}dN.prototype.postProcess=function(e){this.needsOutlines&&(Oke(this),Rke(this,e))};function Oke(e){let t=e.primitive,n=t.indices,i=t.attributes[0].count,o=new XT({triangleIndices:n.typedArray,outlineIndices:e.outlineIndices,originalVertexCount:i});n.typedArray=o.updatedTriangleIndices,n.indexDatatype=Oe.fromTypedArray(n.typedArray);let r=Pke(o.outlineCoordinates),s=new Lne(r);s.loadBuffer=!0,s.loadTypedArray=!1,e.attributePlans.push(s),t.outlineCoordinates=s.attribute;let a=e.attributePlans,l=e.attributePlans.length;for(let u=0;u<l;u++){let f=a[u].attribute;f.typedArray=o.updateAttribute(f.typedArray)}}function Pke(e){let t=new bn.Attribute;return t.name="_OUTLINE_COORDINATES",t.typedArray=e,t.componentDatatype=j.FLOAT,t.type=tn.VEC3,t.normalized=!1,t.count=e.length/3,t}function Rke(e,t){Mke(e.attributePlans,t),c(e.indicesPlan)&&Lke(e.indicesPlan,t)}function Mke(e,t){let n=e.length;for(let i=0;i<n;i++){let o=e[i],r=o.attribute,s=r.typedArray;if(o.loadBuffer){let a=yt.createVertexBuffer({typedArray:s,context:t,usage:Pe.STATIC_DRAW});a.vertexArrayDestroyable=!1,r.buffer=a}o.loadTypedArray||(r.typedArray=void 0)}}function Lke(e,t){let n=e.indices;if(e.loadBuffer){let i=yt.createIndexBuffer({typedArray:n.typedArray,context:t,usage:Pe.STATIC_DRAW,indexDatatype:n.indexDatatype});n.buffer=i,i.vertexArrayDestroyable=!1}e.loadTypedArray||(n.typedArray=void 0)}dN.AttributeLoadPlan=Lne;dN.IndicesLoadPlan=Ike;var KT=dN;function Nke(e){e=g(e,g.EMPTY_OBJECT),this.webp=g(e.webp,!1),this.basis=g(e.basis,!1)}var hN=Nke;function Nne(e){C.typeOf.object("options.position",e.position),C.typeOf.object("options.adjustmentParams",e.adjustmentParams),this._position=e.position,this._adjustmentParams=e.adjustmentParams}Object.defineProperties(Nne.prototype,{position:{get:function(){return this._position}},adjustmentParams:{get:function(){return this._adjustmentParams}}});var mN=Nne;function Fne(e){C.typeOf.object("options.position",e.position),C.typeOf.object("options.adjustmentParams",e.adjustmentParams),C.typeOf.object("options.covarianceMatrix",e.covarianceMatrix),this._position=e.position,this._adjustmentParams=e.adjustmentParams,this._covarianceMatrix=e.covarianceMatrix}Object.defineProperties(Fne.prototype,{position:{get:function(){return this._position}},adjustmentParams:{get:function(){return this._adjustmentParams}},covarianceMatrix:{get:function(){return this._covarianceMatrix}}});var pN=Fne;function Bne(e){C.typeOf.object("options.groupFlags",e.groupFlags),C.typeOf.object("options.rotationThetas",e.rotationThetas),C.typeOf.object("options.params",e.params),this._groupFlags=e.groupFlags,this._rotationThetas=e.rotationThetas,this._params=e.params}Object.defineProperties(Bne.prototype,{groupFlags:{get:function(){return this._groupFlags}},rotationThetas:{get:function(){return this._rotationThetas}},params:{get:function(){return this._params}}});var _N=Bne;var Fke={Direct:"Direct",Indirect:"Indirect"},tp=Object.freeze(Fke);function kne(e){if(C.typeOf.string("options.storageType",e.storageType),this._storageType=e.storageType,this._anchorPointsIndirect=e.anchorPointsIndirect,this._anchorPointsDirect=e.anchorPointsDirect,this._intraTileCorrelationGroups=e.intraTileCorrelationGroups,this._covarianceDirect=e.covarianceDirect,this.storageType===tp.Indirect){if(!c(this.anchorPointsIndirect))throw new ie("The anchorPointsIndirect are required for 'Indirect' storage");if(!c(this.intraTileCorrelationGroups))throw new ie("The intraTileCorrelationGroups are required for 'Indirect' storage");if(c(this.anchorPointsDirect))throw new ie("The anchorPointsDirect must be omitted for 'Indirect' storage");if(c(this.covarianceDirect))throw new ie("The covarianceDirect must be omitted for 'Indirect' storage")}else{if(!c(this.anchorPointsDirect))throw new ie("The anchorPointsDirect are required for 'Direct' storage");if(!c(this.covarianceDirect))throw new ie("The covarianceDirect is required for 'Direct' storage");if(c(this.anchorPointsIndirect))throw new ie("The anchorPointsIndirect must be omitted for 'Direct' storage");if(c(this.intraTileCorrelationGroups))throw new ie("The intraTileCorrelationGroups must be omitted for 'Direct' storage")}}Object.defineProperties(kne.prototype,{storageType:{get:function(){return this._storageType}},anchorPointsIndirect:{get:function(){return this._anchorPointsIndirect}},anchorPointsDirect:{get:function(){return this._anchorPointsDirect}},intraTileCorrelationGroups:{get:function(){return this._intraTileCorrelationGroups}},covarianceDirect:{get:function(){return this._covarianceDirect}}});var RA=kne;function Une(e){C.typeOf.number.greaterThan("options.A",e.A,0),C.typeOf.number.lessThanOrEquals("options.A",e.A,1),C.typeOf.number.greaterThanOrEquals("options.alpha",e.alpha,0),C.typeOf.number.lessThan("options.alpha",e.alpha,1),C.typeOf.number.greaterThanOrEquals("options.beta",e.beta,0),C.typeOf.number.lessThanOrEquals("options.beta",e.beta,10),C.typeOf.number.greaterThan("options.T",e.T,0),this._A=e.A,this._alpha=e.alpha,this._beta=e.beta,this._T=e.T}Object.defineProperties(Une.prototype,{A:{get:function(){return this._A}},alpha:{get:function(){return this._alpha}},beta:{get:function(){return this._beta}},T:{get:function(){return this._T}}});var gN=Une;function $T(){}function zne(e){return new q(e[0],e[1],e[3],e[1],e[2],e[4],e[3],e[4],e[5])}function Bke(e){let t=d.fromArray(e.position,0,new d),n=d.fromArray(e.adjustmentParams,0,new d);return new mN({position:t,adjustmentParams:n})}function kke(e){let t=d.fromArray(e.position,0,new d),n=d.fromArray(e.adjustmentParams,0,new d),i=zne(e.covarianceMatrix);return new pN({position:t,adjustmentParams:n,covarianceMatrix:i})}function Uke(e){let t=e.groupFlags,n=d.fromArray(e.rotationThetas,0,new d),i=[];for(let r of e.params){let s=new gN({A:r.A,alpha:r.alpha,beta:r.beta,T:r.T});i.push(s)}return new _N({groupFlags:t,rotationThetas:n,params:i})}$T.load=function(e){C.typeOf.object("gltfGpmLocalJson",e);let t=e.storageType;if(t===tp.Direct)return $T.loadDirect(e);if(t===tp.Indirect)return $T.loadIndirect(e);throw new ie(`Invalid storage type in NGA_gpm_local - expected 'Direct' or 'Indirect', but found ${t}`)};$T.loadDirect=function(e){C.typeOf.object("gltfGpmLocalJson",e),C.typeOf.object("gltfGpmLocalJson.anchorPointsDirect",e.anchorPointsDirect),C.typeOf.object("gltfGpmLocalJson.covarianceDirectUpperTriangle",e.covarianceDirectUpperTriangle);let t=[],n=e.anchorPointsDirect;for(let r of n){let s=Bke(r);t.push(s)}let i=zne(e.covarianceDirectUpperTriangle);return new RA({storageType:tp.Direct,anchorPointsDirect:t,covarianceDirect:i})};$T.loadIndirect=function(e){C.typeOf.object("gltfGpmLocalJson",e),C.typeOf.object("gltfGpmLocalJson.anchorPointsIndirect",e.anchorPointsIndirect),C.typeOf.object("gltfGpmLocalJson.intraTileCorrelationGroups",e.intraTileCorrelationGroups);let t=[],n=e.anchorPointsIndirect;for(let s of n){let a=kke(s);t.push(a)}let i=e.intraTileCorrelationGroups,o=[];for(let s of i){let a=Uke(s);o.push(a)}return new RA({storageType:tp.Indirect,anchorPointsIndirect:t,intraTileCorrelationGroups:o})};var yN=$T;function Vne(e){C.typeOf.object("options.traits",e.traits),C.typeOf.number.greaterThanOrEquals("options.index",e.index,0),this._traits=e.traits,this._noData=e.noData,this._offset=e.offset,this._scale=e.scale,this._index=e.index,this._texCoord=e.texCoord}Object.defineProperties(Vne.prototype,{traits:{get:function(){return this._traits}},noData:{get:function(){return this._noData}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},index:{get:function(){return this._index}},texCoord:{get:function(){return this._texCoord}}});var bN=Vne;function Hne(e){C.typeOf.string("options.source",e.source),this._min=e.min,this._max=e.max,this._source=e.source}Object.defineProperties(Hne.prototype,{min:{get:function(){return this._min}},max:{get:function(){return this._max}},source:{get:function(){return this._source}}});var xN=Hne;function Gne(e){this._ppeTextures=e}Object.defineProperties(Gne.prototype,{ppeTextures:{get:function(){return this._ppeTextures}}});var TN=Gne;function ur(e){e=g(e,g.EMPTY_OBJECT);let t=e.gltf,n=e.extension,i=e.gltfResource,o=e.baseResource,r=e.supportedImageFormats,s=e.frameState,a=e.cacheKey,l=g(e.asynchronous,!0);C.typeOf.object("options.gltf",t),C.typeOf.object("options.extension",n),C.typeOf.object("options.gltfResource",i),C.typeOf.object("options.baseResource",o),C.typeOf.object("options.supportedImageFormats",r),C.typeOf.object("options.frameState",s),this._gltfResource=i,this._baseResource=o,this._gltf=t,this._extension=n,this._supportedImageFormats=r,this._frameState=s,this._cacheKey=a,this._asynchronous=l,this._textureLoaders=[],this._textureIds=[],this._meshPrimitiveGpmLocal=void 0,this._structuralMetadata=void 0,this._state=_t.UNLOADED,this._promise=void 0}c(Object.create)&&(ur.prototype=Object.create(Gi.prototype),ur.prototype.constructor=ur);Object.defineProperties(ur.prototype,{cacheKey:{get:function(){return this._cacheKey}},meshPrimitiveGpmLocal:{get:function(){return this._meshPrimitiveGpmLocal}},structuralMetadata:{get:function(){return this._structuralMetadata}}});ur.prototype._loadResources=async function(){try{return await this._loadTextures(),this.isDestroyed()?void 0:(this._gltf=void 0,this._state=_t.LOADED,this)}catch(e){if(this.isDestroyed())return;throw this.unload(),this._state=_t.FAILED,this.getError("Failed to load GPM data",e)}};ur.prototype.load=function(){return c(this._promise)?this._promise:(this._state=_t.LOADING,this._promise=this._loadResources(this),this._promise)};function zke(e){let t={},n=e.ppeTextures;if(c(n))for(let i=0;i<n.length;i++){let o=n[i];t[o.index]=o}return t}ur.prototype._loadTextures=function(){let e;c(this._extension)&&(e=zke(this._extension));let t=this._gltf,n=this._gltfResource,i=this._baseResource,o=this._supportedImageFormats,r=this._frameState,s=this._asynchronous,a=[];for(let l in e)if(e.hasOwnProperty(l)){let u=Fi.getTextureLoader({gltf:t,textureInfo:e[l],gltfResource:n,baseResource:i,supportedImageFormats:o,frameState:r,asynchronous:s});this._textureLoaders.push(u),this._textureIds.push(l),a.push(u.load())}return Promise.all(a)};ur.ppeTexturesMetadataSchemaCache=new Map;ur._createPpeTextureClassJson=function(e,t){let n=e.traits,i=n.source;return{name:`PPE texture class ${t}`,properties:{[i]:{name:"PPE",type:"SCALAR",componentType:"UINT8",normalized:!0,min:n.min,max:n.max}}}};ur._obtainPpeTexturesMetadataSchema=function(e){let n=ur._collectPpeTexturePropertyIdentifiers(e).toString(),i=ur.ppeTexturesMetadataSchemaCache.get(n);if(c(i))return i;let r={id:`PPE_TEXTURE_SCHEMA_${ur.ppeTexturesMetadataSchemaCache.size}`,classes:{}},s=e.ppeTextures;for(let a=0;a<s.length;a++){let l=s[a],u=`ppeTexture_${a}`,f=ur._createPpeTextureClassJson(l,a);r.classes[u]=f}return i=ju.fromJson(r),ur.ppeTexturesMetadataSchemaCache.set(n,i),i};ur._collectPpeTexturePropertyIdentifiers=function(e){let t=[],n=e.ppeTextures;for(let i=0;i<n.length;i++){let o=n[i],r=ur._createPpeTextureClassJson(o,i),s=JSON.stringify(r);t.push(s)}return t};ur._convertToStructuralMetadata=function(e,t){var s;let n=[],i=ur._obtainPpeTexturesMetadataSchema(e),o=e.ppeTextures;for(let a=0;a<o.length;a++){let l=o[a],u=`ppeTexture_${a}`,h=l.traits.source,m=i.classes[u],p=((s=l.scale)!=null?s:1)*255,_={class:u,properties:{[h]:{index:l.index,texCoord:l.texCoord,offset:l.offset,scale:p}}};n.push(new ig({id:a,name:l.name,propertyTexture:_,class:m,textures:t}))}return new Vs({schema:i,propertyTables:[],propertyTextures:n,propertyAttributes:[]})};ur.prototype.process=function(e){if(C.typeOf.object("frameState",e),this._state===_t.READY)return!0;if(this._state!==_t.LOADED)return!1;let t=this._textureLoaders,n=t.length,i=!0;for(let u=0;u<n;++u){let h=t[u].process(e);i=i&&h}if(!i)return!1;let o={};for(let u=0;u<this._textureIds.length;++u){let f=this._textureIds[u],h=t[u];h.isDestroyed()||(o[f]=h.texture)}let r=[],s=this._extension;if(c(s.ppeTextures)){let u=s.ppeTextures;for(let f of u){let h=f.traits,m=new xN({min:h.min,max:h.max,source:h.source}),p=new bN({traits:m,noData:f.noData,offset:f.offset,scale:f.scale,index:f.index,texCoord:f.texCoord});r.push(p)}}let a=new TN(r);this._meshPrimitiveGpmLocal=a;let l=ur._convertToStructuralMetadata(a,o);return this._structuralMetadata=l,this._state=_t.READY,!0};ur.prototype._unloadTextures=function(){let e=this._textureLoaders,t=e.length;for(let n=0;n<t;++n)Fi.unload(e[n]);this._textureLoaders.length=0,this._textureIds.length=0};ur.prototype.unload=function(){this._unloadTextures(),this._gltf=void 0,this._extension=void 0,this._structuralMetadata=void 0};var CN=ur;var{Attribute:Vke,Indices:Hke,FeatureIdAttribute:jne,FeatureIdTexture:Wne,FeatureIdImplicitRange:qne,MorphTarget:Gke,Primitive:jke,Instances:Wke,Skin:qke,Node:Yke,AnimatedPropertyType:Xke,AnimationSampler:Kke,AnimationTarget:$ke,AnimationChannel:Zke,Animation:Jke,ArticulationStage:Qke,Articulation:eUe,Asset:tUe,Scene:nUe,Components:iUe,MetallicRoughness:oUe,SpecularGlossiness:rUe,Specular:sUe,Anisotropy:r5,Clearcoat:s5,Material:aUe}=bn,xo={NOT_LOADED:0,LOADING:1,LOADED:2,PROCESSING:3,POST_PROCESSING:4,PROCESSED:5,READY:6,FAILED:7,UNLOADED:8};function $f(e){e=g(e,g.EMPTY_OBJECT);let{gltfResource:t,typedArray:n,releaseGltfJson:i=!1,asynchronous:o=!0,incrementallyLoadTextures:r=!0,upAxis:s=vo.Y,forwardAxis:a=vo.Z,loadAttributesAsTypedArray:l=!1,loadAttributesFor2D:u=!1,enablePick:f=!1,loadIndicesForWireframe:h=!1,loadPrimitiveOutline:m=!0,loadForClassification:p=!1,renameBatchIdSemantic:_=!1}=e;C.typeOf.object("options.gltfResource",t);let{baseResource:b=t.clone()}=e;this._gltfJson=e.gltfJson,this._gltfResource=t,this._baseResource=b,this._typedArray=n,this._releaseGltfJson=i,this._asynchronous=o,this._incrementallyLoadTextures=r,this._upAxis=s,this._forwardAxis=a,this._loadAttributesAsTypedArray=l,this._loadAttributesFor2D=u,this._enablePick=f,this._loadIndicesForWireframe=h,this._loadPrimitiveOutline=m,this._loadForClassification=p,this._renameBatchIdSemantic=_,this._sortedPropertyTableIds=void 0,this._sortedFeatureTextureIds=void 0,this._gltfJsonLoader=void 0,this._state=xo.NOT_LOADED,this._textureState=xo.NOT_LOADED,this._promise=void 0,this._processError=void 0,this._textureErrors=[],this._primitiveLoadPlans=[],this._loaderPromises=[],this._textureLoaders=[],this._texturesPromises=[],this._textureCallbacks=[],this._bufferViewLoaders=[],this._geometryLoaders=[],this._geometryCallbacks=[],this._structuralMetadataLoader=void 0,this._meshPrimitiveGpmLoader=void 0,this._loadResourcesPromise=void 0,this._resourcesLoaded=!1,this._texturesLoaded=!1,this._supportedImageFormats=void 0,this._postProcessBuffers=[],this._components=void 0}c(Object.create)&&($f.prototype=Object.create(Gi.prototype),$f.prototype.constructor=$f);Object.defineProperties($f.prototype,{cacheKey:{get:function(){}},components:{get:function(){return this._components}},gltfJson:{get:function(){return c(this._gltfJsonLoader)?this._gltfJsonLoader.gltf:this._gltfJson}},incrementallyLoadTextures:{get:function(){return this._incrementallyLoadTextures}},texturesLoaded:{get:function(){return this._texturesLoaded}}});async function cUe(e){e._state=xo.LOADING,e._textureState=xo.LOADING;try{let t=Fi.getGltfJsonLoader({gltfResource:e._gltfResource,baseResource:e._baseResource,typedArray:e._typedArray,gltfJson:e._gltfJson});return e._gltfJsonLoader=t,await t.load(),e.isDestroyed()||e.isUnloaded()||t.isDestroyed()?void 0:(e._state=xo.LOADED,e._textureState=xo.LOADED,e)}catch(t){if(e.isDestroyed())return;e._state=xo.FAILED,e._textureState=xo.FAILED,EN(e,t)}}async function lUe(e,t){sn.supportsWebP.initialized||await sn.supportsWebP.initialize(),e._supportedImageFormats=new hN({webp:sn.supportsWebP(),basis:t.context.supportsBasis});let n=dze(e,t);return e._state=xo.PROCESSING,e._textureState=xo.PROCESSING,c(e._gltfJsonLoader)&&e._releaseGltfJson&&(Fi.unload(e._gltfJsonLoader),e._gltfJsonLoader=void 0),n}$f.prototype.load=async function(){return c(this._promise)?this._promise:(this._promise=cUe(this),this._promise)};function EN(e,t){throw e.unload(),e.getError("Failed to load glTF",t)}function uUe(e,t){let n=!0,i=e._geometryLoaders;for(let s=0;s<i.length;++s){let a=i[s].process(t);a&&c(e._geometryCallbacks[s])&&(e._geometryCallbacks[s](),e._geometryCallbacks[s]=void 0),n=n&&a}let o=e._structuralMetadataLoader;if(c(o)){let s=o.process(t);s&&(e._components.structuralMetadata=o.structuralMetadata),n=n&&s}let r=e._meshPrimitiveGpmLoader;if(c(r)){let s=r.process(t);s&&(c(e._components.structuralMetadata)&&mt("structural-metadata-gpm","The model defines both the 'EXT_structural_metadata' extension and the 'NGA_gpm_local' extension. The data from the 'EXT_structural_metadata' extension will be replaced with the data from the 'NGA_gpm_local' extension, and will no longer be available for styling and picking."),e._components.structuralMetadata=r.structuralMetadata),n=n&&s}n&&(e._state=xo.POST_PROCESSING)}function fUe(e,t){let n=e._primitiveLoadPlans;for(let i=0;i<n.length;i++){let o=n[i];o.postProcess(t),o.needsOutlines&&dUe(e,o)}}function dUe(e,t){let n=e._postProcessBuffers,i=t.primitive,o=i.outlineCoordinates;c(o)&&n.push(o.buffer);let r=i.attributes;for(let a=0;a<r.length;a++){let l=r[a];c(l.buffer)&&n.push(l.buffer)}let s=i.indices;c(s)&&c(s.buffer)&&n.push(s.buffer)}$f.prototype._process=function(e){return this._state===xo.READY?!0:(this._state===xo.PROCESSING&&uUe(this,e),this._resourcesLoaded&&this._state===xo.POST_PROCESSING&&(fUe(this,e.context),this._state=xo.PROCESSED),this._resourcesLoaded&&this._state===xo.PROCESSED?(tie(this),this._typedArray=void 0,this._state=xo.READY,!0):!1)};$f.prototype._processTextures=function(e){if(this._textureState===xo.READY)return!0;if(this._textureState!==xo.PROCESSING)return!1;let t=!0,n=this._textureLoaders;for(let i=0;i<n.length;++i){let o=n[i].process(e);o&&c(this._textureCallbacks[i])&&(this._textureCallbacks[i](),this._textureCallbacks[i]=void 0),t=t&&o}return t?(this._textureState=xo.READY,this._texturesLoaded=!0,!0):!1};$f.prototype.process=function(e){if(C.typeOf.object("frameState",e),this._state===xo.LOADED&&!c(this._loadResourcesPromise)&&(this._loadResourcesPromise=lUe(this,e).then(()=>{this._resourcesLoaded=!0}).catch(o=>{this._processError=o})),c(this._processError)){this._state=xo.FAILED;let o=this._processError;this._processError=void 0,EN(this,o)}let t=this._textureErrors.pop();if(c(t)){let o=this.getError("Failed to load glTF texture",t);throw o.name="TextureError",o}if(this._state===xo.FAILED)return!1;let n=!1;try{n=this._process(e)}catch(o){this._state=xo.FAILED,EN(this,o)}let i=!1;try{i=this._processTextures(e)}catch(o){this._textureState=xo.FAILED,EN(this,o)}return this._incrementallyLoadTextures?n:n&&i};function hUe(e,t,n,i,o,r,s){let a=e.gltfJson,u=a.accessors[t].bufferView;return Fi.getVertexBufferLoader({gltf:a,gltfResource:e._gltfResource,baseResource:e._baseResource,frameState:s,bufferViewId:u,draco:i,attributeSemantic:n,accessorId:t,asynchronous:e._asynchronous,loadBuffer:o,loadTypedArray:r})}function mUe(e,t,n,i,o,r){return Fi.getIndexBufferLoader({gltf:e.gltfJson,accessorId:t,gltfResource:e._gltfResource,baseResource:e._baseResource,frameState:r,draco:n,asynchronous:e._asynchronous,loadBuffer:i,loadTypedArray:o})}function pUe(e,t){let n=Fi.getBufferViewLoader({gltf:e.gltfJson,bufferViewId:t,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoaders.push(n),n}function Yne(e,t,n){let i=t.byteOffset,o=Ul(e,t),r=t.count,s=Gu(t.type),a=t.componentType,l=j.getSizeInBytes(a),u=l*s,f=r*s;if(o===u)return n=new Uint8Array(n),j.createArrayBufferView(a,n.buffer,n.byteOffset+i,f);let h=j.createTypedArray(a,f),m=new DataView(n.buffer),p=new Array(s),_=W_(t.componentType);i=n.byteOffset+i;for(let b=0;b<r;++b){_(m,i,s,l,p);for(let x=0;x<s;++x)h[b*s+x]=p[x];i+=o}return h}function _Ue(e,t){let n=e.type;if(n===tn.SCALAR)return t.fill(0);let i=tn.getMathType(n);return t.fill(i.clone(i.ZERO))}function gUe(e,t,n,i){let o=e.type,r=e.count;if(o===tn.SCALAR)for(let s=0;s<r;s++)n[s]=t[s];else if(o===tn.VEC4&&i)for(let s=0;s<r;s++)n[s]=ve.unpack(t,s*4);else{let s=tn.getMathType(o),a=tn.getNumberOfComponents(o);for(let l=0;l<r;l++)n[l]=s.unpack(t,l*a)}return n}async function yUe(e,t,n,i,o){let{gltfJson:r}=e;if(await t.load(),e.isDestroyed())return;let s=Yne(r,n,t.typedArray);i=g(i,!1),gUe(n,s,o,i)}function wN(e,t,n){let i=new Array(t.count),o=t.bufferView;if(c(o)){let r=pUe(e,o),s=yUe(e,r,t,n,i);return e._loaderPromises.push(s),i}return _Ue(t,i)}function Gl(e,t){if(c(t))return e===Number?t[0]:e.unpack(t)}function bUe(e){return e===Number?0:new e}function xUe(e){switch(e){case j.BYTE:return 127;case j.UNSIGNED_BYTE:return 255;case j.SHORT:return 32767;case j.UNSIGNED_SHORT:return 65535;default:return 1}}var TUe={VEC2:new k(-1,-1),VEC3:new d(-1,-1,-1),VEC4:new ee(-1,-1,-1,-1)};function CUe(e,t){let n=xUe(e.componentDatatype),i=TUe[e.type],o=e.min;c(o)&&(o=t.divideByScalar(o,n,o),o=t.maximumByComponent(o,i,o));let r=e.max;c(r)&&(r=t.divideByScalar(r,n,r),r=t.maximumByComponent(r,i,r)),e.min=o,e.max=r}function EUe(e,t,n){let i=e.decodeMatrix,o=Gl(n,e.decodedMin),r=Gl(n,e.decodedMax);c(o)&&c(r)&&(t.min=o,t.max=r);let s=new bn.Quantization;s.componentDatatype=t.componentDatatype,s.type=t.type,i.length===4?(s.quantizedVolumeOffset=i[2],s.quantizedVolumeStepSize=i[0]):i.length===9?(s.quantizedVolumeOffset=new k(i[6],i[7]),s.quantizedVolumeStepSize=new k(i[0],i[4])):i.length===16?(s.quantizedVolumeOffset=new d(i[12],i[13],i[14]),s.quantizedVolumeStepSize=new d(i[0],i[5],i[10])):i.length===25&&(s.quantizedVolumeOffset=new ee(i[20],i[21],i[22],i[23]),s.quantizedVolumeStepSize=new ee(i[0],i[6],i[12],i[18])),t.quantization=s}function wUe(e,t,n,i,o){var h;let r=e.accessors[t],s=tn.getMathType(r.type),a=g(r.normalized,!1),l=new Vke;l.name=n,l.semantic=i,l.setIndex=o,l.constant=bUe(s),l.componentDatatype=r.componentType,l.normalized=a,l.count=r.count,l.type=r.type,l.min=Gl(s,r.min),l.max=Gl(s,r.max),l.byteOffset=r.byteOffset,l.byteStride=Ul(e,r),ei(r,"WEB3D_quantized_attributes")&&EUe(r.extensions.WEB3D_quantized_attributes,l,s);let u=l.semantic===Tt.POSITION||l.semantic===Tt.NORMAL||l.semantic===Tt.TANGENT||l.semantic===Tt.TEXCOORD;return((h=e.extensionsRequired)==null?void 0:h.includes("KHR_mesh_quantization"))&&a&&u&&CUe(l,s),l}function Xne(e){let n=/^\w+_(\d+)$/.exec(e);if(n!==null)return parseInt(n[1])}var SUe={gltfSemantic:void 0,renamedSemantic:void 0,modelSemantic:void 0};function a5(e,t,n){let i=n;e._renameBatchIdSemantic&&(n==="_BATCHID"||n==="BATCHID")&&(i="_FEATURE_ID_0");let o=t.fromGltfSemantic(i),r=SUe;return r.gltfSemantic=n,r.renamedSemantic=i,r.modelSemantic=o,r}function AUe(e){let t=e===Tt.POSITION,n=e===Tt.FEATURE_ID,i=e===Tt.TEXCOORD;return t||n||i}function vUe(e,t,n,i){if(e.byteOffset=0,e.byteStride=void 0,e.quantization=t.quantization,n&&(e.buffer=t.buffer),i){let o=c(t.quantization)?t.quantization.componentDatatype:e.componentDatatype;e.typedArray=j.createArrayBufferView(o,t.typedArray.buffer)}}function DUe(e,t,n,i,o,r){if(o&&(n.buffer=i.buffer),r){let s=i.typedArray;n.typedArray=Yne(e,t,s),o||(n.byteOffset=0,n.byteStride=void 0)}}function Kne(e,t,n,i,o,r,s){let a=e.gltfJson,l=a.accessors[t],u=l.bufferView,f=n.gltfSemantic,h=n.renamedSemantic,m=n.modelSemantic,p=c(m)?Xne(h):void 0,b=wUe(a,t,f,m,p);if(!c(i)&&!c(u))return b;let x=hUe(e,t,f,i,o,r,s),T=e._geometryLoaders.length;e._geometryLoaders.push(x);let E=x.load();return e._loaderPromises.push(E),e._geometryCallbacks[T]=()=>{c(i)&&c(i.attributes)&&c(i.attributes[f])?vUe(b,x,o,r):DUe(a,l,b,x,o,r)},b}function $ne(e,t,n,i,o,r,s){let a=n.modelSemantic,l=a===Tt.POSITION,u=a===Tt.FEATURE_ID,f=l&&!o&&e._loadAttributesFor2D&&!s.scene3DOnly,h=l&&e._enablePick&&!s.context.webgl2,m=e._loadForClassification&&u,p=e._loadAttributesAsTypedArray,_=!p,b=p||f||h||m,E=Kne(e,t,n,i,r?!1:_,r?!0:b,s),S=new KT.AttributeLoadPlan(E);return S.loadBuffer=_,S.loadTypedArray=b,S}function IUe(e,t,n,i,o){let r=e.gltfJson.accessors,s=c(n.ROTATION),a=c(n.TRANSLATION)&&c(r[n.TRANSLATION].min)&&c(r[n.TRANSLATION].max),l=a5(e,Yr,i),u=l.modelSemantic,f=u===Yr.TRANSLATION||u===Yr.ROTATION||u===Yr.SCALE,h=u===Yr.TRANSLATION,m=e._loadAttributesAsTypedArray||s&&f||!o.context.instancedArrays,p=e._enablePick&&!o.context.webgl2,_=!m,b=e._loadAttributesFor2D&&!o.scene3DOnly;return Kne(e,t,l,void 0,_,m||h&&(!a||b||p),o)}function OUe(e,t,n,i,o,r){let s=e.gltfJson.accessors[t],a=s.bufferView;if(!c(n)&&!c(a))return;let l=new Hke;l.count=s.count;let u=e._loadAttributesAsTypedArray,f=(e._loadIndicesForWireframe||e._enablePick)&&!r.context.webgl2,h=e._loadForClassification&&i,p=!u,_=u||f||h,T=mUe(e,t,n,o?!1:p,o?!0:_,r),E=e._geometryLoaders.length;e._geometryLoaders.push(T);let S=T.load();e._loaderPromises.push(S),e._geometryCallbacks[E]=()=>{l.indexDatatype=T.indexDatatype,l.buffer=T.buffer,l.typedArray=T.typedArray};let A=new KT.IndicesLoadPlan(l);return A.loadBuffer=p,A.loadTypedArray=_,A}function yc(e,t,n,i){let o=e.gltfJson,r=zl.getImageIdFromTexture({gltf:o,textureId:t.index,supportedImageFormats:e._supportedImageFormats});if(!c(r))return;let s=Fi.getTextureLoader({gltf:o,textureInfo:t,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:n,asynchronous:e._asynchronous}),a=zl.createModelTextureReader({textureInfo:t}),l=e._textureLoaders.length;e._textureLoaders.push(s);let u=s.load().catch(f=>{if(!e.isDestroyed()){if(!e._incrementallyLoadTextures)throw f;e._textureState=xo.FAILED,e._textureErrors.push(f)}});return e._texturesPromises.push(u),e._textureCallbacks[l]=()=>{a.texture=s.texture,c(i)&&(a.texture.sampler=i)},a}function PUe(e,t,n){let{diffuseTexture:i,specularGlossinessTexture:o,diffuseFactor:r,specularFactor:s,glossinessFactor:a}=t,l=new rUe;return c(i)&&(l.diffuseTexture=yc(e,i,n)),c(o)&&(l.specularGlossinessTexture=yc(e,o,n)),l.diffuseFactor=Gl(ee,r),l.specularFactor=Gl(d,s),l.glossinessFactor=a,l}function RUe(e,t,n){let{baseColorTexture:i,metallicRoughnessTexture:o,baseColorFactor:r,metallicFactor:s,roughnessFactor:a}=t,l=new oUe;return c(i)&&(l.baseColorTexture=yc(e,i,n)),c(o)&&(l.metallicRoughnessTexture=yc(e,o,n)),l.baseColorFactor=Gl(ee,r),l.metallicFactor=s,l.roughnessFactor=a,l}function MUe(e,t,n){let{specularFactor:i,specularTexture:o,specularColorFactor:r,specularColorTexture:s}=t,a=new sUe;return c(o)&&(a.specularTexture=yc(e,o,n)),c(s)&&(a.specularColorTexture=yc(e,s,n)),a.specularFactor=i,a.specularColorFactor=Gl(d,r),a}function LUe(e,t,n){let{anisotropyStrength:i=r5.DEFAULT_ANISOTROPY_STRENGTH,anisotropyRotation:o=r5.DEFAULT_ANISOTROPY_ROTATION,anisotropyTexture:r}=t,s=new r5;return c(r)&&(s.anisotropyTexture=yc(e,r,n)),s.anisotropyStrength=i,s.anisotropyRotation=o,s}function NUe(e,t,n){let{clearcoatFactor:i=s5.DEFAULT_CLEARCOAT_FACTOR,clearcoatTexture:o,clearcoatRoughnessFactor:r=s5.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR,clearcoatRoughnessTexture:s,clearcoatNormalTexture:a}=t,l=new s5;return c(o)&&(l.clearcoatTexture=yc(e,o,n)),c(s)&&(l.clearcoatRoughnessTexture=yc(e,s,n)),c(a)&&(l.clearcoatNormalTexture=yc(e,a,n)),l.clearcoatFactor=i,l.clearcoatRoughnessFactor=r,l}function FUe(e,t,n){let i=new aUe,o=g(t.extensions,g.EMPTY_OBJECT),r=o.KHR_materials_pbrSpecularGlossiness,s=o.KHR_materials_specular,a=o.KHR_materials_anisotropy,l=o.KHR_materials_clearcoat,u=t.pbrMetallicRoughness;return i.unlit=c(o.KHR_materials_unlit),c(r)?i.specularGlossiness=PUe(e,r,n):(c(u)&&(i.metallicRoughness=RUe(e,u,n)),c(s)&&!i.unlit&&(i.specular=MUe(e,s,n)),c(a)&&!i.unlit&&(i.anisotropy=LUe(e,a,n)),c(l)&&!i.unlit&&(i.clearcoat=NUe(e,l,n))),c(t.emissiveTexture)&&(i.emissiveTexture=yc(e,t.emissiveTexture,n)),c(t.normalTexture)&&!e._loadForClassification&&(i.normalTexture=yc(e,t.normalTexture,n)),c(t.occlusionTexture)&&(i.occlusionTexture=yc(e,t.occlusionTexture,n)),i.emissiveFactor=Gl(d,t.emissiveFactor),i.alphaMode=t.alphaMode,i.alphaCutoff=t.alphaCutoff,i.doubleSided=t.doubleSided,i}function Zne(e,t){let n=new jne;return n.featureCount=e.featureCount,n.nullFeatureId=e.nullFeatureId,n.propertyTableId=e.propertyTable,n.setIndex=e.attribute,n.label=e.label,n.positionalLabel=t,n}function Jne(e,t,n,i){let o=new jne,r=e.featureIds;return o.featureCount=n,o.propertyTableId=t,o.setIndex=Xne(r.attribute),o.positionalLabel=i,o}function Qne(e,t){let n=new qne;return n.propertyTableId=e.propertyTable,n.featureCount=e.featureCount,n.nullFeatureId=e.nullFeatureId,n.label=e.label,n.positionalLabel=t,n.offset=0,n.repeat=1,n}function eie(e,t,n,i){let o=new qne,r=e.featureIds;o.propertyTableId=t,o.featureCount=n,o.offset=g(r.constant,0);let s=g(r.divisor,0);return o.repeat=s===0?void 0:s,o.positionalLabel=i,o}function BUe(e,t,n,i){let o=new Wne;o.featureCount=t.featureCount,o.nullFeatureId=t.nullFeatureId,o.propertyTableId=t.propertyTable,o.label=t.label,o.positionalLabel=i;let r=t.texture;o.textureReader=yc(e,r,n,Jt.NEAREST);let a=(c(r.channels)?r.channels:[0]).map(function(l){return"rgba".charAt(l)}).join("");return o.textureReader.channels=a,o}function kUe(e,t,n,i,o,r){let s=new Wne,a=t.featureIds,l=a.texture;return s.featureCount=o,s.propertyTableId=n,s.textureReader=yc(e,l,i,Jt.NEAREST),s.textureReader.channels=a.channels,s.positionalLabel=r,s}function UUe(e,t,n,i,o){let r=new Gke,s=void 0,a=!1;for(let l in t){if(!t.hasOwnProperty(l))continue;let u=t[l],f=a5(e,Tt,l),h=$ne(e,u,f,s,a,n,o);r.attributes.push(h.attribute),i.attributePlans.push(h)}return r}function zUe(e,t,n,i){let o=new jke,r=new KT(o);e._primitiveLoadPlans.push(r);let s=t.material;c(s)&&(o.material=FUe(e,e.gltfJson.materials[s],i));let a=g(t.extensions,g.EMPTY_OBJECT),l=!1,u=a.CESIUM_primitive_outline;e._loadPrimitiveOutline&&c(u)&&(l=!0,r.needsOutlines=!0,r.outlineIndices=VUe(e,u,r));let f=e._loadForClassification,h=a.KHR_draco_mesh_compression,m=!1,p=t.attributes;if(c(p))for(let v in p){if(!p.hasOwnProperty(v))continue;let D=p[v],R=a5(e,Tt,v),P=R.modelSemantic;if(f&&!AUe(P))continue;P===Tt.FEATURE_ID&&(m=!0);let L=$ne(e,D,R,h,n,l,i);r.attributePlans.push(L),o.attributes.push(L.attribute)}let _=t.targets;if(c(_)&&!f)for(let v=0;v<_.length;++v)o.morphTargets.push(UUe(e,_[v],l,r,i));let b=t.indices;if(c(b)){let v=OUe(e,b,h,m,l,i);c(v)&&(r.indicesPlan=v,o.indices=v.indices)}let x=a.EXT_structural_metadata,T=a.EXT_mesh_features,E=a.EXT_feature_metadata,S=c(E);c(T)?HUe(e,o,T,i):S&&GUe(e,o,E,i),c(x)?jUe(o,x):S&&WUe(e,o,E);let A=t.mode;if(f&&A!==Se.TRIANGLES)throw new ie("Only triangle meshes can be used for classification.");return o.primitiveType=A,o}function VUe(e,t){let n=t.indices,i=e.gltfJson.accessors[n];return wN(e,i,!1)}function HUe(e,t,n,i){let o;c(n)&&c(n.featureIds)?o=n.featureIds:o=[];for(let r=0;r<o.length;r++){let s=o[r],a=`featureId_${r}`,l;c(s.texture)?l=BUe(e,s,i,a):c(s.attribute)?l=Zne(s,a):l=Qne(s,a),t.featureIds.push(l)}}function GUe(e,t,n,i){let{featureTables:o}=e.gltfJson.extensions.EXT_feature_metadata,r=0,s=n.featureIdAttributes;if(c(s))for(let l=0;l<s.length;++l){let u=s[l],f=u.featureTable,h=e._sortedPropertyTableIds.indexOf(f),m=o[f].count,p=`featureId_${r}`;r++;let _;c(u.featureIds.attribute)?_=Jne(u,h,m,p):_=eie(u,h,m,p),t.featureIds.push(_)}let a=n.featureIdTextures;if(c(a))for(let l=0;l<a.length;++l){let u=a[l],f=u.featureTable,h=e._sortedPropertyTableIds.indexOf(f),m=o[f].count,p=`featureId_${r}`;r++;let _=kUe(e,u,h,i,m,p);t.featureIds.push(_)}}function jUe(e,t){c(t)&&(c(t.propertyTextures)&&(e.propertyTextureIds=t.propertyTextures),c(t.propertyAttributes)&&(e.propertyAttributeIds=t.propertyAttributes))}function WUe(e,t,n){c(n.featureTextures)&&(t.propertyTextureIds=n.featureTextures.map(function(i){return e._sortedFeatureTextureIds.indexOf(i)}))}function qUe(e,t,n){let i=t.EXT_mesh_gpu_instancing,o=new Wke,r=i.attributes;if(c(r))for(let u in r){if(!r.hasOwnProperty(u))continue;let f=r[u];o.attributes.push(IUe(e,f,r,u,n))}let s=g(i.extensions,g.EMPTY_OBJECT),a=t.EXT_instance_features,l=s.EXT_feature_metadata;return c(a)?YUe(o,a):c(l)&&XUe(e.gltfJson,o,l,e._sortedPropertyTableIds),o}function YUe(e,t){let n=t.featureIds;for(let i=0;i<n.length;i++){let o=n[i],r=`instanceFeatureId_${i}`,s;c(o.attribute)?s=Zne(o,r):s=Qne(o,r),e.featureIds.push(s)}}function XUe(e,t,n,i){let o=e.extensions.EXT_feature_metadata.featureTables,r=n.featureIdAttributes;if(c(r))for(let s=0;s<r.length;++s){let a=r[s],l=a.featureTable,u=i.indexOf(l),f=o[l].count,h=`instanceFeatureId_${s}`,m;c(a.featureIds.attribute)?m=Jne(a,u,f,h):m=eie(a,u,f,h),t.featureIds.push(m)}}function KUe(e,t,n){let i=new Yke;i.name=t.name,i.matrix=Gl(N,t.matrix),i.translation=Gl(d,t.translation),i.rotation=Gl(ve,t.rotation),i.scale=Gl(d,t.scale);let o=g(t.extensions,g.EMPTY_OBJECT),r=o.EXT_mesh_gpu_instancing,s=o.AGI_articulations;if(c(r)){if(e._loadForClassification)throw new ie("Models with the EXT_mesh_gpu_instancing extension cannot be used for classification.");i.instances=qUe(e,o,n)}c(s)&&(i.articulationName=s.articulationName);let a=t.mesh;if(c(a)){let l=e.gltfJson.meshes[a],u=l.primitives;for(let m=0;m<u.length;++m)i.primitives.push(zUe(e,u[m],c(i.instances),n));let f=g(t.weights,l.weights),h=i.primitives[0].morphTargets;i.morphWeights=c(f)?f.slice():new Array(h.length).fill(0)}return i}function $Ue(e,t){let n=e.gltfJson.nodes;if(!c(n))return[];let i=n.map(function(o,r){let s=KUe(e,o,t);return s.index=r,s});for(let o=0;o<i.length;++o){let r=n[o].children;if(c(r))for(let s=0;s<r.length;++s)i[o].children.push(i[r[s]])}return i}function ZUe(e,t,n){let i=new qke,o=t.joints;i.joints=o.map(s=>n[s]);let r=t.inverseBindMatrices;if(c(r)){let s=e.gltfJson.accessors[r];i.inverseBindMatrices=wN(e,s)}else i.inverseBindMatrices=new Array(o.length).fill(N.IDENTITY);return i}function JUe(e,t){let n=e.gltfJson.skins;if(e._loadForClassification||!c(n))return[];let i=n.map(function(r,s){let a=ZUe(e,r,t);return a.index=s,a}),o=e.gltfJson.nodes;for(let r=0;r<t.length;++r){let s=o[r].skin;c(s)&&(t[r].skin=i[s])}return i}async function QUe(e,t,n,i){let o=new uN({gltf:e.gltfJson,extension:t,extensionLegacy:n,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:i,asynchronous:e._asynchronous});return e._structuralMetadataLoader=o,o.load()}async function eze(e,t,n,i){let o=new CN({gltf:t,extension:n,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:i,asynchronous:e._asynchronous});return e._meshPrimitiveGpmLoader=o,o.load()}function tze(e,t){let n=new Kke,i=e.gltfJson.accessors,o=i[t.input];n.input=wN(e,o);let r=t.interpolation;n.interpolation=g(wh[r],wh.LINEAR);let s=i[t.output];return n.output=wN(e,s,!0),n}function nze(e,t){let n=new $ke,i=e.node;if(!c(i))return;n.node=t[i];let o=e.path.toUpperCase();return n.path=Xke[o],n}function ize(e,t,n){let i=new Zke,o=e.sampler;return i.sampler=t[o],i.target=nze(e.target,n),i}function oze(e,t,n){let i=new Jke;i.name=t.name;let o=t.samplers.map(function(s,a){let l=tze(e,s);return l.index=a,l}),r=t.channels.map(function(s){return ize(s,o,n)});return i.samplers=o,i.channels=r,i}function rze(e,t){let n=e.gltfJson.animations;return e._loadForClassification||!c(n)?[]:n.map(function(o,r){let s=oze(e,o,t);return s.index=r,s})}function sze(e){let t=new Qke;t.name=e.name;let n=e.type.toUpperCase();return t.type=gc[n],t.minimumValue=e.minimumValue,t.maximumValue=e.maximumValue,t.initialValue=e.initialValue,t}function aze(e){let t=new eUe;return t.name=e.name,t.stages=e.stages.map(sze),t}function cze(e){var i;let n=(i=g(e.extensions,g.EMPTY_OBJECT).AGI_articulations)==null?void 0:i.articulations;return c(n)?n.map(aze):[]}function lze(e){let t;return c(e.scenes)&&c(e.scene)&&(t=e.scenes[e.scene].nodes),t=g(t,e.nodes),t=c(t)?t:[],t}function uze(e,t){let n=new nUe,i=lze(e);return n.nodes=i.map(function(o){return t[o]}),n}var fze=new d;function dze(e,t){let n=e.gltfJson,i=g(n.extensions,g.EMPTY_OBJECT),o=i.EXT_structural_metadata,r=i.EXT_feature_metadata,s=i.CESIUM_RTC;if(c(r)){let E=r.featureTables,S=r.featureTextures,A=c(E)?E:[],v=c(S)?S:[];e._sortedPropertyTableIds=Object.keys(A).sort(),e._sortedFeatureTextureIds=Object.keys(v).sort()}let a=$Ue(e,t),l=JUe(e,a),u=rze(e,a),f=cze(n),h=uze(n,a),m=new iUe,p=new tUe,_=n.asset.copyright;if(c(_)){let E=_.split(";").map(function(S){return new St(S.trim())});p.credits=E}if(m.asset=p,m.scene=h,m.nodes=a,m.skins=l,m.animations=u,m.articulations=f,m.upAxis=e._upAxis,m.forwardAxis=e._forwardAxis,c(s)){let E=d.fromArray(s.center,0,fze);m.transform=N.fromTranslation(E,m.transform)}if(e._components=m,c(o)||c(r)){let E=QUe(e,o,r,t);e._loaderPromises.push(E)}let b=i.NGA_gpm_local;if(c(b)){let E=yN.load(b);e._components.extensions.NGA_gpm_local=E}let x=n.meshes;if(c(x))for(let E of x){let S=E.primitives;if(c(S))for(let A of S){let v=A.extensions;if(c(v)){let D=v.NGA_gpm_local;if(c(D)){let R=eze(e,n,D,t);e._loaderPromises.push(R)}}}}let T=[];return T.push.apply(T,e._loaderPromises),e._incrementallyLoadTextures||T.push.apply(T,e._texturesPromises),Promise.all(T)}function hze(e){let t=e._textureLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&Fi.unload(t[n]);e._textureLoaders.length=0}function tie(e){let t=e._bufferViewLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&Fi.unload(t[n]);e._bufferViewLoaders.length=0}function mze(e){let t=e._geometryLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&Fi.unload(t[n]);e._geometryLoaders.length=0}function pze(e){let t=e._postProcessBuffers;for(let n=0;n<t.length;n++){let i=t[n];i.isDestroyed()||i.destroy()}t.length=0}function _ze(e){c(e._structuralMetadataLoader)&&!e._structuralMetadataLoader.isDestroyed()&&(e._structuralMetadataLoader.destroy(),e._structuralMetadataLoader=void 0)}function gze(e){c(e._meshPrimitiveGpmLoader)&&!e._meshPrimitiveGpmLoader.isDestroyed()&&(e._meshPrimitiveGpmLoader.destroy(),e._meshPrimitiveGpmLoader=void 0)}$f.prototype.isUnloaded=function(){return this._state===xo.UNLOADED};$f.prototype.unload=function(){c(this._gltfJsonLoader)&&!this._gltfJsonLoader.isDestroyed()&&Fi.unload(this._gltfJsonLoader),this._gltfJsonLoader=void 0,hze(this),tie(this),mze(this),pze(this),_ze(this),gze(this),this._components=void 0,this._typedArray=void 0,this._state=xo.UNLOADED};var rg=$f;var SN=`uniform sampler2D u_pointCloud_colorGBuffer;
| uniform sampler2D u_pointCloud_depthGBuffer;
| uniform vec2 u_distanceAndEdlStrength;
| in vec2 v_textureCoordinates;
|
| vec2 neighborContribution(float log2Depth, vec2 offset)
| {
| float dist = u_distanceAndEdlStrength.x;
| vec2 texCoordOrig = v_textureCoordinates + offset * dist;
| vec2 texCoord0 = v_textureCoordinates + offset * floor(dist);
| vec2 texCoord1 = v_textureCoordinates + offset * ceil(dist);
|
| float depthOrLogDepth0 = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, texCoord0));
| float depthOrLogDepth1 = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, texCoord1));
|
| // ignore depth values that are the clear depth
| if (depthOrLogDepth0 == 0.0 || depthOrLogDepth1 == 0.0) {
| return vec2(0.0);
| }
|
| // interpolate the two adjacent depth values
| float depthMix = mix(depthOrLogDepth0, depthOrLogDepth1, fract(dist));
| vec4 eyeCoordinate = czm_windowToEyeCoordinates(texCoordOrig, depthMix);
| return vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);
| }
|
| void main()
| {
| float depthOrLogDepth = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, v_textureCoordinates));
|
| vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);
| eyeCoordinate /= eyeCoordinate.w;
|
| float log2Depth = log2(-eyeCoordinate.z);
|
| if (depthOrLogDepth == 0.0) // 0.0 is the clear value for the gbuffer
| {
| discard;
| }
|
| vec4 color = texture(u_pointCloud_colorGBuffer, v_textureCoordinates);
|
| // sample from neighbors left, right, down, up
| vec2 texelSize = 1.0 / czm_viewport.zw;
|
| vec2 responseAndCount = vec2(0.0);
|
| responseAndCount += neighborContribution(log2Depth, vec2(-texelSize.x, 0.0));
| responseAndCount += neighborContribution(log2Depth, vec2(+texelSize.x, 0.0));
| responseAndCount += neighborContribution(log2Depth, vec2(0.0, -texelSize.y));
| responseAndCount += neighborContribution(log2Depth, vec2(0.0, +texelSize.y));
|
| float response = responseAndCount.x / responseAndCount.y;
| float strength = u_distanceAndEdlStrength.y;
| float shade = exp(-response * 300.0 * strength);
| color.rgb *= shade;
| out_FragColor = vec4(color);
|
| // Input and output depth are the same.
| gl_FragDepth = depthOrLogDepth;
| }
| `;function ZT(){this._framebuffer=new ui({colorAttachmentsLength:2,depth:!0,supportsDepthTexture:!0}),this._drawCommand=void 0,this._clearCommand=void 0,this._strength=1,this._radius=1}Object.defineProperties(ZT.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}},colorGBuffer:{get:function(){return this._framebuffer.getColorTexture(0)}},depthGBuffer:{get:function(){return this._framebuffer.getColorTexture(1)}}});function yze(e){e._framebuffer.destroy(),e._drawCommand=void 0,e._clearCommand=void 0}var c5=new k;function bze(e,t){let n=new Be({defines:["LOG_DEPTH_WRITE"],sources:[SN]}),i={u_pointCloud_colorGBuffer:function(){return e.colorGBuffer},u_pointCloud_depthGBuffer:function(){return e.depthGBuffer},u_distanceAndEdlStrength:function(){return c5.x=e._radius,c5.y=e._strength,c5}},o=Fe.fromCache({blending:cn.ALPHA_BLEND,depthMask:!0,depthTest:{enabled:!0},stencilTest:kt.setCesium3DTileBit(),stencilMask:kt.CESIUM_3D_TILE_MASK});e._drawCommand=t.createViewportQuadCommand(n,{uniformMap:i,renderState:o,pass:xe.CESIUM_3D_TILE,owner:e}),e._clearCommand=new $n({framebuffer:e.framebuffer,color:new z(0,0,0,0),depth:1,renderState:Fe.fromCache(),pass:xe.CESIUM_3D_TILE,owner:e})}function xze(e,t){let n=t.drawingBufferWidth,i=t.drawingBufferHeight;e._framebuffer.update(t,n,i),bze(e,t)}function nie(e){return e.drawBuffers&&e.fragmentDepth}ZT.isSupported=nie;function Tze(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"EC");if(!c(n)){let i=t._attributeLocations,o=t.fragmentShaderSource.clone();o.sources.splice(0,0,`layout (location = 0) out vec4 out_FragData_0;
| layout (location = 1) out vec4 out_FragData_1;`),o.sources=o.sources.map(function(r){return r=Be.replaceMain(r,"czm_point_cloud_post_process_main"),r=r.replaceAll(/out_FragColor/g,"out_FragData_0"),r}),o.sources.push(`void main()
| {
| czm_point_cloud_post_process_main();
| #ifdef LOG_DEPTH
| czm_writeLogDepth();
| out_FragData_1 = czm_packDepth(gl_FragDepth);
| #else
| out_FragData_1 = czm_packDepth(gl_FragCoord.z);
| #endif
| }`),n=e.shaderCache.createDerivedShaderProgram(t,"EC",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:o,attributeLocations:i})}return n}ZT.prototype.update=function(e,t,n,i){if(!nie(e.context))return;this._strength=n.eyeDomeLightingStrength,this._radius=n.eyeDomeLightingRadius*e.pixelRatio,xze(this,e.context);let o,r=e.commandList,s=r.length;for(o=t;o<s;++o){let u=r[o];if(u.primitiveType!==Se.POINTS||u.pass===xe.TRANSLUCENT)continue;let f,h,m=u.derivedCommands.pointCloudProcessor;c(m)&&(f=m.command,h=m.originalShaderProgram),(!c(f)||u.dirty||h!==u.shaderProgram||f.framebuffer!==this.framebuffer)&&(f=Ke.shallowClone(u,f),f.framebuffer=this.framebuffer,f.shaderProgram=Tze(e.context,u.shaderProgram),f.castShadows=!1,f.receiveShadows=!1,c(m)||(m={command:f,originalShaderProgram:u.shaderProgram},u.derivedCommands.pointCloudProcessor=m),m.originalShaderProgram=u.shaderProgram),r[o]=f}let a=this._clearCommand,l=this._drawCommand;l.boundingVolume=i,r.push(l),r.push(a)};ZT.prototype.isDestroyed=function(){return!1};ZT.prototype.destroy=function(){return yze(this),ue(this)};var sg=ZT;function iie(e){let t=g(e,{});this.attenuation=g(t.attenuation,!1),this.geometricErrorScale=g(t.geometricErrorScale,1),this.maximumAttenuation=t.maximumAttenuation,this.baseResolution=t.baseResolution,this.eyeDomeLighting=g(t.eyeDomeLighting,!0),this.eyeDomeLightingStrength=g(t.eyeDomeLightingStrength,1),this.eyeDomeLightingRadius=g(t.eyeDomeLightingRadius,1),this.backFaceCulling=g(t.backFaceCulling,!1),this.normalShading=g(t.normalShading,!0)}iie.isSupported=function(e){return sg.isSupported(e.context)};var np=iie;var la={},Cze=new ee(0,0,0,1),Ba=new ee,Eze=new je,l5=new k,u5=new k;la.worldToWindowCoordinates=function(e,t,n){return la.worldWithEyeOffsetToWindowCoordinates(e,t,d.ZERO,n)};var oie=new ee,rie=new d;function MA(e,t,n,i){let o=n.viewMatrix,r=N.multiplyByVector(o,ee.fromElements(e.x,e.y,e.z,1,oie),oie),s=d.multiplyComponents(t,d.normalize(r,rie),rie);return r.x+=t.x+s.x,r.y+=t.y+s.y,r.z+=s.z,N.multiplyByVector(n.frustum.projectionMatrix,r,i)}var wze=new re(Math.PI,O.PI_OVER_TWO),Sze=new d,Aze=new d;la.worldWithEyeOffsetToWindowCoordinates=function(e,t,n,i){if(!c(e))throw new w("scene is required.");if(!c(t))throw new w("position is required.");let o=e.frameState,r=la.computeActualEllipsoidPosition(o,t,Cze);if(!c(r))return;let s=e.canvas,a=Eze;a.x=0,a.y=0,a.width=s.clientWidth,a.height=s.clientHeight;let l=e.camera,u=!1;if(o.mode===J.SCENE2D){let f=e.mapProjection,h=wze,m=f.project(h,Sze),p=d.clone(l.position,Aze),_=l.frustum.clone(),b=N.computeViewportTransformation(a,0,1,new N),x=l.frustum.projectionMatrix,T=l.positionWC.y,E=d.fromElements(O.sign(T)*m.x-T,0,-l.positionWC.x),S=Lt.pointToGLWindowCoordinates(x,b,E);if(T===0||S.x<=0||S.x>=s.clientWidth)u=!0;else{if(S.x>s.clientWidth*.5){a.width=S.x,l.frustum.right=m.x-T,Ba=MA(r,n,l,Ba),la.clipToGLWindowCoordinates(a,Ba,l5),a.x+=S.x,l.position.x=-l.position.x;let A=l.frustum.right;l.frustum.right=-l.frustum.left,l.frustum.left=-A,Ba=MA(r,n,l,Ba),la.clipToGLWindowCoordinates(a,Ba,u5)}else{a.x+=S.x,a.width-=S.x,l.frustum.left=-m.x-T,Ba=MA(r,n,l,Ba),la.clipToGLWindowCoordinates(a,Ba,l5),a.x=a.x-a.width,l.position.x=-l.position.x;let A=l.frustum.left;l.frustum.left=-l.frustum.right,l.frustum.right=-A,Ba=MA(r,n,l,Ba),la.clipToGLWindowCoordinates(a,Ba,u5)}d.clone(p,l.position),l.frustum=_.clone(),i=k.clone(l5,i),(i.x<0||i.x>s.clientWidth)&&(i.x=u5.x)}}if(o.mode!==J.SCENE2D||u){if(Ba=MA(r,n,l,Ba),Ba.z<0&&!(l.frustum instanceof an)&&!(l.frustum instanceof No))return;i=la.clipToGLWindowCoordinates(a,Ba,i)}return i.y=s.clientHeight-i.y,i};la.worldToDrawingBufferCoordinates=function(e,t,n){if(n=la.worldToWindowCoordinates(e,t,n),!!c(n))return la.transformWindowToDrawingBuffer(e,n,n)};var ip=new d,vze=new re;la.computeActualEllipsoidPosition=function(e,t,n){let i=e.mode;if(i===J.SCENE3D)return d.clone(t,n);let o=e.mapProjection,r=o.ellipsoid.cartesianToCartographic(t,vze);if(!c(r))return;if(o.project(r,ip),i===J.COLUMBUS_VIEW)return d.fromElements(ip.z,ip.x,ip.y,n);if(i===J.SCENE2D)return d.fromElements(0,ip.x,ip.y,n);let s=e.morphTime;return d.fromElements(O.lerp(ip.z,t.x,s),O.lerp(ip.x,t.y,s),O.lerp(ip.y,t.z,s),n)};var sie=new d,aie=new d,cie=new N;la.clipToGLWindowCoordinates=function(e,t,n){return d.divideByScalar(t,t.w,sie),N.computeViewportTransformation(e,0,1,cie),N.multiplyByPoint(cie,sie,aie),k.fromCartesian3(aie,n)};la.transformWindowToDrawingBuffer=function(e,t,n){let i=e.canvas,o=e.drawingBufferWidth/i.clientWidth,r=e.drawingBufferHeight/i.clientHeight;return k.fromElements(t.x*o,t.y*r,n)};var Dze=new ee,lie=new ee;la.drawingBufferToWorldCoordinates=function(e,t,n,i){let r=e.context.uniformState,s=r.currentFrustum,a=s.x,l=s.y;if(e.frameState.useLogDepth){let p=n*r.log2FarDepthFromNearPlusOne,_=Math.pow(2,p)-1;n=l*(1-a/(_+a))/(l-a)}let u=e.view.passState.viewport,f=ee.clone(ee.UNIT_W,Dze);f.x=(t.x-u.x)/u.width*2-1,f.y=(t.y-u.y)/u.height*2-1,f.z=n*2-1,f.w=1;let h,m=e.camera.frustum;if(c(m.fovy)){h=N.multiplyByVector(r.inverseViewProjection,f,lie);let p=1/h.w;d.multiplyByScalar(h,p,h)}else{let p=m.offCenterFrustum;c(p)&&(m=p),h=lie,h.x=(f.x*(m.right-m.left)+m.left+m.right)*.5,h.y=(f.y*(m.top-m.bottom)+m.bottom+m.top)*.5,h.z=(f.z*(a-l)-a-l)*.5,h.w=1,h=N.multiplyByVector(r.inverseView,h,h)}return d.fromCartesian4(h,i)};var Yi=la;var JT={};JT._deprecationWarning=os;var op=Uint32Array.BYTES_PER_ELEMENT;JT.parse=function(e,t){let n=g(t,0);C.defined("arrayBuffer",e),t=n;let i=new Uint8Array(e),o=new DataView(e);t+=op;let r=o.getUint32(t,!0);if(r!==1)throw new ie(`Only Batched 3D Model version 1 is supported. Version ${r} is not.`);t+=op;let s=o.getUint32(t,!0);t+=op;let a=o.getUint32(t,!0);t+=op;let l=o.getUint32(t,!0);t+=op;let u=o.getUint32(t,!0);t+=op;let f=o.getUint32(t,!0);t+=op;let h;u>=570425344?(t-=op*2,h=a,u=l,f=0,a=0,l=0,JT._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchLength] [batchTableByteLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel.")):f>=570425344&&(t-=op,h=u,u=a,f=l,a=0,l=0,JT._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchTableJsonByteLength] [batchTableBinaryByteLength] [batchLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel."));let m;a===0?m={BATCH_LENGTH:g(h,0)}:(m=Do(i,t,a),t+=a);let p=new Uint8Array(e,t,l);t+=l;let _,b;u>0&&(_=Do(i,t,u),t+=u,f>0&&(b=new Uint8Array(e,t,f),b=new Uint8Array(b),t+=f));let x=n+s-t;if(x===0)throw new ie("glTF byte length must be greater than 0.");let T;return t%4===0?T=new Uint8Array(e,t,x):(JT._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),T=new Uint8Array(i.subarray(t,t+x))),{batchLength:h,featureTableJson:m,featureTableBinary:p,batchTableJson:_,batchTableBinary:b,gltf:T}};var AN=JT;function LA(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function uie(e,t,n,i,o,r){let s=e._cachedTypedArrays,a=s[t];return c(a)||(a=j.createArrayBufferView(n,e.buffer.buffer,e.buffer.byteOffset+r,o*i),s[t]=a),a}function Ize(e,t,n,i){let o=e._cachedTypedArrays,r=o[t];return c(r)||(r=j.createTypedArray(n,i),o[t]=r),r}LA.prototype.getGlobalProperty=function(e,t,n){let i=this.json[e];if(c(i))return c(i.byteOffset)?(t=g(t,j.UNSIGNED_INT),n=g(n,1),uie(this,e,t,n,1,i.byteOffset)):i};LA.prototype.hasProperty=function(e){return c(this.json[e])};LA.prototype.getPropertyArray=function(e,t,n){let i=this.json[e];if(c(i))return c(i.byteOffset)?(c(i.componentType)&&(t=j.fromName(i.componentType)),uie(this,e,t,n,this.featuresLength,i.byteOffset)):Ize(this,e,t,i)};LA.prototype.getProperty=function(e,t,n,i,o){let r=this.json[e];if(!c(r))return;let s=this.getPropertyArray(e,t,n);if(n===1)return s[i];for(let a=0;a<n;++a)o[a]=s[n*i+a];return o};var Sh=LA;function NA(e){C.typeOf.number("options.count",e.count),C.typeOf.object("options.batchTable",e.batchTable);let t=e.count,n=e.batchTable,i=e.binaryBody,o=g(e.parseAsPropertyAttributes,!1),r=e.customAttributeOutput;if(o&&!c(r))throw new w("customAttributeOutput is required when parsing batch table as property attributes");let s=Oze(n),a;c(s.jsonProperties)&&(a=new ng({count:t,properties:s.jsonProperties}));let l;c(s.hierarchy)&&(l=new AT({extension:s.hierarchy,binaryBody:i}));let u=xh.BATCH_TABLE_CLASS_NAME,f=s.binaryProperties,h,m,p;if(o){let x=Rze(t,u,f,i,r);p=x.transcodedSchema,m=[new qT({propertyAttribute:x.propertyAttributeJson,class:x.transcodedClass})]}else{let x=Pze(t,u,f,i);p=x.transcodedSchema;let T=x.featureTableJson;h=new kl({count:T.count,properties:T.properties,class:x.transcodedClass,bufferViews:x.bufferViewsTypedArrays}),m=[]}let _=[];if(c(h)||c(a)||c(l)){let x=new el({id:0,name:"Batch Table",count:t,metadataTable:h,jsonMetadataTable:a,batchTableHierarchy:l});_.push(x)}let b={schema:p,propertyTables:_,propertyAttributes:m,extensions:s.extensions,extras:s.extras};return new Vs(b)}function Oze(e){let t=e.HIERARCHY,n=e.extras,i=e.extensions,o;c(t)?(NA._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),o=t):c(i)&&(o=i["3DTILES_batch_table_hierarchy"]);let r,s={};for(let a in e){if(!e.hasOwnProperty(a)||a==="HIERARCHY"||a==="extensions"||a==="extras")continue;let l=e[a];Array.isArray(l)?(r=c(r)?r:{},r[a]=l):s[a]=l}return{binaryProperties:s,jsonProperties:r,hierarchy:o,extras:n,extensions:i}}function Pze(e,t,n,i){let o={},r={},s={},a=0;for(let h in n){if(!n.hasOwnProperty(h))continue;if(!c(i))throw new ie(`Property ${h} requires a batch table binary.`);let m=n[h],p=Vu(m);r[h]={bufferView:a},o[h]=fie(m),s[a]=p.createArrayBufferView(i.buffer,i.byteOffset+m.byteOffset,e),a++}let l={classes:{}};l.classes[t]={properties:o};let u=ju.fromJson(l);return{featureTableJson:{class:t,count:e,properties:r},bufferViewsTypedArrays:s,transcodedSchema:u,transcodedClass:u.classes[t]}}function Rze(e,t,n,i,o){let r={},s={},a=0;for(let h in n){if(!n.hasOwnProperty(h))continue;let m=n[h];if(!c(i)&&!c(m.typedArray))throw new ie(`Property ${h} requires a batch table binary.`);let p=Xt.sanitizeGlslIdentifier(h);(p===""||r.hasOwnProperty(p))&&(p=`property_${a}`,a++);let _=fie(m);_.name=h,r[p]=_;let b=p.toUpperCase();b.startsWith("_")||(b=`_${b}`);let x=m.typedArray;c(x)||(x=Vu(m).createArrayBufferView(i.buffer,i.byteOffset+m.byteOffset,e));let T=new bn.Attribute;T.name=b,T.count=e,T.type=m.type;let E=j.fromTypedArray(x);(E===j.INT||E===j.UNSIGNED_INT||E===j.DOUBLE)&&(NA._oneTimeWarning("Cast pnts property to floats",`Point cloud property "${b}" will be cast to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.`),x=new Float32Array(x)),T.componentDatatype=j.fromTypedArray(x),T.typedArray=x,o.push(T),s[p]={attribute:b}}let l={classes:{}};l.classes[t]={properties:r};let u=ju.fromJson(l);return{class:t,propertyAttributeJson:{properties:s},transcodedSchema:u,transcodedClass:u.classes[t]}}function fie(e){let t=Mze(e.componentType);return{type:e.type,componentType:t}}function Mze(e){switch(e){case"BYTE":return"INT8";case"UNSIGNED_BYTE":return"UINT8";case"SHORT":return"INT16";case"UNSIGNED_SHORT":return"UINT16";case"INT":return"INT32";case"UNSIGNED_INT":return"UINT32";case"FLOAT":return"FLOAT32";case"DOUBLE":return"FLOAT64"}}NA._deprecationWarning=os;NA._oneTimeWarning=mt;var ag=NA;var Lb={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,FAILED:4},Lze=bn.FeatureIdAttribute;function cg(e){e=g(e,g.EMPTY_OBJECT);let t=e.b3dmResource,n=e.baseResource,i=e.arrayBuffer,o=g(e.byteOffset,0),r=g(e.releaseGltfJson,!1),s=g(e.asynchronous,!0),a=g(e.incrementallyLoadTextures,!0),l=g(e.upAxis,vo.Y),u=g(e.forwardAxis,vo.X),f=g(e.loadAttributesAsTypedArray,!1),h=g(e.loadAttributesFor2D,!1),m=g(e.enablePick,!1),p=g(e.loadIndicesForWireframe,!1),_=g(e.loadPrimitiveOutline,!0),b=g(e.loadForClassification,!1);C.typeOf.object("options.b3dmResource",t),C.typeOf.object("options.arrayBuffer",i),n=c(n)?n:t.clone(),this._b3dmResource=t,this._baseResource=n,this._arrayBuffer=i,this._byteOffset=o,this._releaseGltfJson=r,this._asynchronous=s,this._incrementallyLoadTextures=a,this._upAxis=l,this._forwardAxis=u,this._loadAttributesAsTypedArray=f,this._loadAttributesFor2D=h,this._enablePick=m,this._loadIndicesForWireframe=p,this._loadPrimitiveOutline=_,this._loadForClassification=b,this._state=Lb.UNLOADED,this._promise=void 0,this._gltfLoader=void 0,this._batchLength=0,this._propertyTable=void 0,this._batchTable=void 0,this._components=void 0,this._transform=N.IDENTITY}c(Object.create)&&(cg.prototype=Object.create(Gi.prototype),cg.prototype.constructor=cg);Object.defineProperties(cg.prototype,{texturesLoaded:{get:function(){var e;return(e=this._gltfLoader)==null?void 0:e.texturesLoaded}},cacheKey:{get:function(){}},components:{get:function(){return this._components}}});cg.prototype.load=function(){if(c(this._promise))return this._promise;let e=AN.parse(this._arrayBuffer,this._byteOffset),t=e.batchLength,n=e.featureTableJson,i=e.featureTableBinary,o=e.batchTableJson,r=e.batchTableBinary,s=new Sh(n,i);t=s.getGlobalProperty("BATCH_LENGTH"),this._batchLength=t;let a=s.getGlobalProperty("RTC_CENTER",j.FLOAT,3);c(a)&&(this._transform=N.fromTranslation(d.fromArray(a))),this._batchTable={json:o,binary:r};let l=new rg({typedArray:e.gltf,upAxis:this._upAxis,forwardAxis:this._forwardAxis,gltfResource:this._b3dmResource,baseResource:this._baseResource,releaseGltfJson:this._releaseGltfJson,incrementallyLoadTextures:this._incrementallyLoadTextures,loadAttributesAsTypedArray:this._loadAttributesAsTypedArray,loadAttributesFor2D:this._loadAttributesFor2D,enablePick:this._enablePick,loadIndicesForWireframe:this._loadIndicesForWireframe,loadPrimitiveOutline:this._loadPrimitiveOutline,loadForClassification:this._loadForClassification,renameBatchIdSemantic:!0});this._gltfLoader=l,this._state=Lb.LOADING;let u=this;return this._promise=l.load().then(function(){if(!u.isDestroyed())return u._state=Lb.PROCESSING,u}).catch(function(f){if(!u.isDestroyed())return Nze(u,f)}),this._promise};function Nze(e,t){return e.unload(),e._state=Lb.FAILED,t=e.getError("Failed to load b3dm",t),Promise.reject(t)}cg.prototype.process=function(e){if(C.typeOf.object("frameState",e),this._state===Lb.READY)return!0;if(this._state!==Lb.PROCESSING||!this._gltfLoader.process(e))return!1;let n=this._gltfLoader.components;return n.transform=N.multiplyTransformation(this._transform,n.transform,n.transform),Fze(this,n),this._components=n,this._arrayBuffer=void 0,this._state=Lb.READY,!0};function Fze(e,t){let n=e._batchTable,i=e._batchLength;if(i===0)return;let o;if(c(n.json))o=ag({count:i,batchTable:n.json,binaryBody:n.binary});else{let a=new el({name:xh.BATCH_TABLE_CLASS_NAME,count:i});o=new Vs({schema:{},propertyTables:[a]})}let r=t.scene.nodes,s=r.length;for(let a=0;a<s;a++)die(r[a]);t.structuralMetadata=o}function die(e){let t=e.children.length;for(let i=0;i<t;i++)die(e.children[i]);let n=e.primitives.length;for(let i=0;i<n;i++){let o=e.primitives[i],r=Xt.getAttributeBySemantic(o,Tt.FEATURE_ID);if(c(r)){r.setIndex=0;let s=new Lze;s.propertyTableId=0,s.setIndex=0,s.positionalLabel="featureId_0",o.featureIds.push(s)}}}cg.prototype.unload=function(){c(this._gltfLoader)&&!this._gltfLoader.isDestroyed()&&this._gltfLoader.unload(),this._components=void 0,this._arrayBuffer=void 0};var vN=cg;function lg(e){e=g(e,g.EMPTY_OBJECT),C.typeOf.object("options.geoJson",e.geoJson),this._geoJson=e.geoJson,this._components=void 0}c(Object.create)&&(lg.prototype=Object.create(Gi.prototype),lg.prototype.constructor=lg);Object.defineProperties(lg.prototype,{cacheKey:{get:function(){}},components:{get:function(){return this._components}}});lg.prototype.load=function(){return Promise.resolve(this)};lg.prototype.process=function(e){return C.typeOf.object("frameState",e),c(this._components)||(this._components=Kze(this._geoJson,e),this._geoJson=void 0),!0};function Bze(){this.lines=void 0,this.points=void 0,this.properties=void 0}function kze(){this.features=[]}function f5(e){let t=e[0],n=e[1],i=g(e[2],0);return new d(t,n,i)}function d5(e){let t=e.length,n=new Array(t);for(let o=0;o<t;o++)n[o]=f5(e[o]);return[n]}function Uze(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=d5(e[i])[0];return n}function hie(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=d5(e[i])[0];return n}function zze(e){let t=e.length,n=[];for(let i=0;i<t;i++)Array.prototype.push.apply(n,hie(e[i]));return n}function Vze(e){return[f5(e)]}function Hze(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=f5(e[i]);return n}var Gze={LineString:d5,MultiLineString:Uze,MultiPolygon:zze,Polygon:hie,MultiPoint:Hze,Point:Vze},jze={LineString:Se.LINES,MultiLineString:Se.LINES,MultiPolygon:Se.LINES,Polygon:Se.LINES,MultiPoint:Se.POINTS,Point:Se.POINTS};function mie(e,t){if(!c(e.geometry))return;let n=e.geometry.type,i=Gze[n],o=jze[n],r=e.geometry.coordinates;if(!c(i)||!c(r))return;let s=new Bze;o===Se.LINES?s.lines=i(r):o===Se.POINTS&&(s.points=i(r)),s.properties=e.properties,t.features.push(s)}function Wze(e,t){let n=e.features,i=n.length;for(let o=0;o<i;o++)mie(n[o],t)}var qze={FeatureCollection:Wze,Feature:mie},DN=new d;function Yze(e,t,n){let i=0,o=0,r=e.length;for(let L=0;L<r;L++){let F=e[L];if(c(F.lines)){let y=F.lines.length;for(let I=0;I<y;I++){let M=F.lines[I];i+=M.length,o+=(M.length-1)*2}}}let s=new Float32Array(i*3),a=new Float32Array(i),l=Oe.createTypedArray(i,o),u=Oe.fromTypedArray(l),f=new d(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),h=new d(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),m=0,p=0;for(let L=0;L<r;L++){let F=e[L];if(!c(F.lines))continue;let y=F.lines.length;for(let I=0;I<y;I++){let M=F.lines[I],B=M.length;for(let U=0;U<B;U++){let V=M[U],W=d.fromDegrees(V.x,V.y,V.z,Z.WGS84,DN),H=N.multiplyByPoint(t,W,DN);d.minimumByComponent(f,H,f),d.maximumByComponent(h,H,h),d.pack(H,s,m*3),a[m]=L,U<B-1&&(l[p*2]=m,l[p*2+1]=m+1,p++),m++}}}let _=yt.createVertexBuffer({typedArray:s,context:n.context,usage:Pe.STATIC_DRAW});_.vertexArrayDestroyable=!1;let b=yt.createVertexBuffer({typedArray:a,context:n.context,usage:Pe.STATIC_DRAW});b.vertexArrayDestroyable=!1;let x=yt.createIndexBuffer({typedArray:l,context:n.context,usage:Pe.STATIC_DRAW,indexDatatype:u});x.vertexArrayDestroyable=!1;let T=new bn.Attribute;T.semantic=Tt.POSITION,T.componentDatatype=j.FLOAT,T.type=tn.VEC3,T.count=i,T.min=f,T.max=h,T.buffer=_;let E=new bn.Attribute;E.semantic=Tt.FEATURE_ID,E.setIndex=0,E.componentDatatype=j.FLOAT,E.type=tn.SCALAR,E.count=i,E.buffer=b;let S=[T,E],A=new bn.Material;A.unlit=!0;let v=new bn.Indices;v.indexDatatype=u,v.count=l.length,v.buffer=x;let D=new bn.FeatureIdAttribute;D.featureCount=r,D.propertyTableId=0,D.setIndex=0,D.positionalLabel="featureId_0";let R=[D],P=new bn.Primitive;return P.attributes=S,P.indices=v,P.featureIds=R,P.primitiveType=Se.LINES,P.material=A,P}function Xze(e,t,n){let i=0,o=e.length;for(let S=0;S<o;S++){let A=e[S];c(A.points)&&(i+=A.points.length)}let r=new Float32Array(i*3),s=new Float32Array(i),a=new d(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),l=new d(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),u=0;for(let S=0;S<o;S++){let A=e[S];if(!c(A.points))continue;let v=A.points.length;for(let D=0;D<v;D++){let R=A.points[D],P=d.fromDegrees(R.x,R.y,R.z,Z.WGS84,DN),L=N.multiplyByPoint(t,P,DN);d.minimumByComponent(a,L,a),d.maximumByComponent(l,L,l),d.pack(L,r,u*3),s[u]=S,u++}}let f=yt.createVertexBuffer({typedArray:r,context:n.context,usage:Pe.STATIC_DRAW});f.vertexArrayDestroyable=!1;let h=yt.createVertexBuffer({typedArray:s,context:n.context,usage:Pe.STATIC_DRAW});h.vertexArrayDestroyable=!1;let m=new bn.Attribute;m.semantic=Tt.POSITION,m.componentDatatype=j.FLOAT,m.type=tn.VEC3,m.count=i,m.min=a,m.max=l,m.buffer=f;let p=new bn.Attribute;p.semantic=Tt.FEATURE_ID,p.setIndex=0,p.componentDatatype=j.FLOAT,p.type=tn.SCALAR,p.count=i,p.buffer=h;let _=[m,p],b=new bn.Material;b.unlit=!0;let x=new bn.FeatureIdAttribute;x.featureCount=o,x.propertyTableId=0,x.setIndex=0,x.positionalLabel="featureId_0";let T=[x],E=new bn.Primitive;return E.attributes=_,E.featureIds=T,E.primitiveType=Se.POINTS,E.material=b,E}function Kze(e,t){let n=new kze,i=qze[e.type];c(i)&&i(e,n);let o=n.features,r=o.length;if(r===0)throw new ie("GeoJSON must have at least one feature");let s={};for(let L=0;L<r;L++){let F=o[L],y=g(F.properties,g.EMPTY_OBJECT);for(let I in y)y.hasOwnProperty(I)&&(c(s[I])||(s[I]=new Array(r)))}for(let L=0;L<r;L++){let F=o[L];for(let y in s)if(s.hasOwnProperty(y)){let I=g(F.properties[y],"");s[y][L]=I}}let a=new ng({count:r,properties:s}),u=[new el({id:0,count:r,jsonMetadataTable:a})],f=ju.fromJson({}),h=new Vs({schema:f,propertyTables:u}),m=new d(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),p=new d(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),_=!1,b=!1;for(let L=0;L<r;L++){let F=o[L];if(c(F.lines)){_=!0;let y=F.lines.length;for(let I=0;I<y;I++){let M=F.lines[I],B=M.length;for(let U=0;U<B;U++)d.minimumByComponent(m,M[U],m),d.maximumByComponent(p,M[U],p)}}if(c(F.points)){b=!0;let y=F.points.length;for(let I=0;I<y;I++){let M=F.points[I];d.minimumByComponent(m,M,m),d.maximumByComponent(p,M,p)}}}let x=d.midpoint(m,p,new d),T=d.fromDegrees(x.x,x.y,x.z,Z.WGS84,new d),E=Lt.eastNorthUpToFixedFrame(T,Z.WGS84,new N),S=N.inverseTransformation(E,new N),A=[];_&&A.push(Yze(o,S,t)),b&&A.push(Xze(o,S,t));let v=new bn.Node;v.index=0,v.primitives=A;let D=[v],R=new bn.Scene;R.nodes=D;let P=new bn.Components;return P.scene=R,P.nodes=D,P.transform=E,P.structuralMetadata=h,P}lg.prototype.unload=function(){this._components=void 0};var IN=lg;var ON={};ON._deprecationWarning=os;var ug=Uint32Array.BYTES_PER_ELEMENT;ON.parse=function(e,t){C.defined("arrayBuffer",e);let n=g(t,0);t=n;let i=new Uint8Array(e),o=new DataView(e);t+=ug;let r=o.getUint32(t,!0);if(r!==1)throw new ie(`Only Instanced 3D Model version 1 is supported. Version ${r} is not.`);t+=ug;let s=o.getUint32(t,!0);t+=ug;let a=o.getUint32(t,!0);if(a===0)throw new ie("featureTableJsonByteLength is zero, the feature table must be defined.");t+=ug;let l=o.getUint32(t,!0);t+=ug;let u=o.getUint32(t,!0);t+=ug;let f=o.getUint32(t,!0);t+=ug;let h=o.getUint32(t,!0);if(h!==1&&h!==0)throw new ie(`Only glTF format 0 (uri) or 1 (embedded) are supported. Format ${h} is not.`);t+=ug;let m=Do(i,t,a);t+=a;let p=new Uint8Array(e,t,l);t+=l;let _,b;u>0&&(_=Do(i,t,u),t+=u,f>0&&(b=new Uint8Array(e,t,f),b=new Uint8Array(b),t+=f));let x=n+s-t;if(x===0)throw new ie("glTF byte length must be greater than 0.");let T;return t%4===0?T=new Uint8Array(e,t,x):(ON._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),T=new Uint8Array(i.subarray(t,t+x))),{gltfFormat:h,featureTableJson:m,featureTableBinary:p,batchTableJson:_,batchTableBinary:b,gltf:T}};var PN=ON;var rp={NOT_LOADED:0,LOADING:1,PROCESSING:2,POST_PROCESSING:3,READY:4,FAILED:5,UNLOADED:6},RN=bn.Attribute,$ze=bn.FeatureIdAttribute,_ie=bn.Instances;function sp(e){e=g(e,g.EMPTY_OBJECT);let t=e.i3dmResource,n=e.arrayBuffer,i=e.baseResource,o=g(e.byteOffset,0),r=g(e.releaseGltfJson,!1),s=g(e.asynchronous,!0),a=g(e.incrementallyLoadTextures,!0),l=g(e.upAxis,vo.Y),u=g(e.forwardAxis,vo.X),f=g(e.loadAttributesAsTypedArray,!1),h=g(e.loadIndicesForWireframe,!1),m=g(e.loadPrimitiveOutline,!0),p=g(e.enablePick,!1);C.typeOf.object("options.i3dmResource",t),C.typeOf.object("options.arrayBuffer",n),i=c(i)?i:t.clone(),this._i3dmResource=t,this._baseResource=i,this._arrayBuffer=n,this._byteOffset=o,this._releaseGltfJson=r,this._asynchronous=s,this._incrementallyLoadTextures=a,this._upAxis=l,this._forwardAxis=u,this._loadAttributesAsTypedArray=f,this._loadIndicesForWireframe=h,this._loadPrimitiveOutline=m,this._enablePick=p,this._state=rp.NOT_LOADED,this._promise=void 0,this._gltfLoader=void 0,this._buffers=[],this._components=void 0,this._transform=N.IDENTITY,this._batchTable=void 0,this._featureTable=void 0,this._instancesLength=0}c(Object.create)&&(sp.prototype=Object.create(Gi.prototype),sp.prototype.constructor=sp);Object.defineProperties(sp.prototype,{texturesLoaded:{get:function(){var e;return(e=this._gltfLoader)==null?void 0:e.texturesLoaded}},cacheKey:{get:function(){}},components:{get:function(){return this._components}}});sp.prototype.load=function(){if(c(this._promise))return this._promise;let e=PN.parse(this._arrayBuffer,this._byteOffset),t=e.featureTableJson,n=e.featureTableBinary,i=e.batchTableJson,o=e.batchTableBinary,r=e.gltfFormat,s=new Sh(t,n);this._featureTable=s;let a=s.getGlobalProperty("INSTANCES_LENGTH");if(s.featuresLength=a,!c(a))throw new ie("Feature table global property: INSTANCES_LENGTH must be defined");this._instancesLength=a;let l=s.getGlobalProperty("RTC_CENTER",j.FLOAT,3);c(l)&&(this._transform=N.fromTranslation(d.fromArray(l))),this._batchTable={json:i,binary:o};let u={upAxis:this._upAxis,forwardAxis:this._forwardAxis,releaseGltfJson:this._releaseGltfJson,incrementallyLoadTextures:this._incrementallyLoadTextures,loadAttributesAsTypedArray:this._loadAttributesAsTypedArray,enablePick:this._enablePick,loadIndicesForWireframe:this._loadIndicesForWireframe,loadPrimitiveOutline:this._loadPrimitiveOutline};if(r===0){let h=Fl(e.gltf);h=h.replace(/[\s\0]+$/,"");let m=this._baseResource.getDerivedResource({url:h});u.gltfResource=m,u.baseResource=m}else u.gltfResource=this._i3dmResource,u.typedArray=e.gltf;let f=new rg(u);return this._gltfLoader=f,this._state=rp.LOADING,this._promise=f.load().then(()=>{if(!this.isDestroyed())return this._state=rp.PROCESSING,this}).catch(h=>{if(!this.isDestroyed())throw Zze(this,h)}),this._promise};function Zze(e,t){return e.unload(),e._state=rp.FAILED,e.getError("Failed to load i3dm",t)}sp.prototype.process=function(e){if(C.typeOf.object("frameState",e),this._state===rp.READY)return!0;let t=this._gltfLoader,n=!1;if(this._state===rp.PROCESSING&&(n=t.process(e)),!n)return!1;let i=t.components;return i.transform=N.multiplyTransformation(this._transform,i.transform,i.transform),eVe(this,i,e),Jze(this,i),this._components=i,this._arrayBuffer=void 0,this._state=rp.READY,!0};function Jze(e,t){let n=e._batchTable,i=e._instancesLength;if(i===0)return;let o;if(c(n.json))o=ag({count:i,batchTable:n.json,binaryBody:n.binary});else{let r=new el({name:xh.BATCH_TABLE_CLASS_NAME,count:i});o=new Vs({schema:{},propertyTables:[r]})}t.structuralMetadata=o}var MN=new d,h5=new Array(4),Qze=new N;function eVe(e,t,n){let i,o=e._featureTable,r=e._instancesLength;if(r===0)return;let s=o.getGlobalProperty("RTC_CENTER",j.FLOAT,3),a=o.getGlobalProperty("EAST_NORTH_UP"),l=o.hasProperty("NORMAL_UP")||o.hasProperty("NORMAL_UP_OCT32P")||a,u=o.hasProperty("SCALE")||o.hasProperty("SCALE_NON_UNIFORM"),f=nVe(o,r),h;l&&(h=new Float32Array(4*r));let m;u&&(m=new Float32Array(3*r));let p=new Float32Array(r),_=d.unpackArray(f),b=new d,x=new d,T=new d,E=new d,S=new q,A=new ve,v=new Array(4),D=new d,R=new Array(3),P=new N;if(!c(s)||d.equals(d.unpack(s),d.ZERO)){let H=ne.fromPoints(_);for(i=0;i<_.length;i++)d.subtract(_[i],H.center,MN),f[3*i+0]=MN.x,f[3*i+1]=MN.y,f[3*i+2]=MN.z;let X=N.fromTranslation(H.center,Qze);t.transform=N.multiplyTransformation(X,t.transform,t.transform)}for(i=0;i<r;i++){b=d.clone(_[i]),c(s)&&d.add(b,d.unpack(s),b),l&&(iVe(o,a,i,A,b,T,x,E,S,P),ve.pack(A,v,0),h[4*i+0]=v[0],h[4*i+1]=v[1],h[4*i+2]=v[2],h[4*i+3]=v[3]),u&&(oVe(o,i,D),d.pack(D,R,0),m[3*i+0]=R[0],m[3*i+1]=R[1],m[3*i+2]=R[2]);let H=o.getProperty("BATCH_ID",j.UNSIGNED_SHORT,1,i);c(H)||(H=i),p[i]=H}let L=new _ie;L.transformInWorldSpace=!0;let F=e._buffers,y=new RN;if(y.name="Instance Translation",y.semantic=Yr.TRANSLATION,y.componentDatatype=j.FLOAT,y.type=tn.VEC3,y.count=r,y.typedArray=f,!l){let H=yt.createVertexBuffer({context:n.context,typedArray:f,usage:Pe.STATIC_DRAW});H.vertexArrayDestroyable=!1,F.push(H),y.buffer=H}if(L.attributes.push(y),l){let H=new RN;H.name="Instance Rotation",H.semantic=Yr.ROTATION,H.componentDatatype=j.FLOAT,H.type=tn.VEC4,H.count=r,H.typedArray=h,L.attributes.push(H)}if(u){let H=new RN;if(H.name="Instance Scale",H.semantic=Yr.SCALE,H.componentDatatype=j.FLOAT,H.type=tn.VEC3,H.count=r,l)H.typedArray=m;else{let X=yt.createVertexBuffer({context:n.context,typedArray:m,usage:Pe.STATIC_DRAW});X.vertexArrayDestroyable=!1,F.push(X),H.buffer=X}L.attributes.push(H)}let I=new RN;I.name="Instance Feature ID",I.setIndex=0,I.semantic=Yr.FEATURE_ID,I.componentDatatype=j.FLOAT,I.type=tn.SCALAR,I.count=r;let M=yt.createVertexBuffer({context:n.context,typedArray:p,usage:Pe.STATIC_DRAW});M.vertexArrayDestroyable=!1,F.push(M),I.buffer=M,L.attributes.push(I);let B=new $ze;B.propertyTableId=0,B.setIndex=0,B.positionalLabel="instanceFeatureId_0",L.featureIds.push(B);let U=t.nodes,V=U.length,W=!1;for(i=0;i<V;i++){let H=U[i];H.primitives.length>0&&(H.instances=W?tVe(L):L,W=!0)}}function tVe(e){let t=new _ie;t.transformInWorldSpace=e.transformInWorldSpace;let n=e.attributes,i=n.length;for(let o=0;o<i;o++){let r=ze(n[o],!1);t.attributes.push(r)}return t.featureIds=e.featureIds,t}function nVe(e,t){if(e.hasProperty("POSITION"))return e.getPropertyArray("POSITION",j.FLOAT,3);if(e.hasProperty("POSITION_QUANTIZED")){let n=e.getPropertyArray("POSITION_QUANTIZED",j.UNSIGNED_SHORT,3),i=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",j.FLOAT,3);if(!c(i))throw new ie("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");let o=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",j.FLOAT,3);if(!c(o))throw new ie("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");let r=new Float32Array(n.length);for(let s=0;s<n.length/3;s++)for(let a=0;a<3;a++){let l=3*s+a;r[l]=n[l]/65535*o[a]+i[a]}return r}else throw new ie("Either POSITION or POSITION_QUANTIZED must be defined for each instance.")}var pie=new Array(4);function iVe(e,t,n,i,o,r,s,a,l,u){let f=e.getProperty("NORMAL_UP",j.FLOAT,3,n,h5),h=e.getProperty("NORMAL_RIGHT",j.FLOAT,3,n,pie),m=!1;if(c(f)){if(!c(h))throw new ie("To define a custom orientation, both NORMAL_UP and NORMAL_RIGHT must be defined.");d.unpack(f,0,r),d.unpack(h,0,s),m=!0}else{let p=e.getProperty("NORMAL_UP_OCT32P",j.UNSIGNED_SHORT,2,n,h5),_=e.getProperty("NORMAL_RIGHT_OCT32P",j.UNSIGNED_SHORT,2,n,pie);if(c(p)){if(!c(_))throw new ie("To define a custom orientation with oct-encoded vectors, both NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P must be defined.");On.octDecodeInRange(p[0],p[1],65535,r),On.octDecodeInRange(_[0],_[1],65535,s),m=!0}else t?(Lt.eastNorthUpToFixedFrame(o,Z.WGS84,u),N.getMatrix3(u,l)):q.clone(q.IDENTITY,l)}m&&(d.cross(s,r,a),d.normalize(a,a),q.setColumn(l,0,s,l),q.setColumn(l,1,r,l),q.setColumn(l,2,a,l)),ve.fromRotationMatrix(l,i)}function oVe(e,t,n){n=d.fromElements(1,1,1,n);let i=e.getProperty("SCALE",j.FLOAT,1,t);c(i)&&d.multiplyByScalar(n,i,n);let o=e.getProperty("SCALE_NON_UNIFORM",j.FLOAT,3,t,h5);c(o)&&(n.x*=o[0],n.y*=o[1],n.z*=o[2])}function rVe(e){let t=e._buffers,n=t.length;for(let i=0;i<n;i++){let o=t[i];o.isDestroyed()||o.destroy()}t.length=0}sp.prototype.isUnloaded=function(){return this._state===rp.UNLOADED};sp.prototype.unload=function(){c(this._gltfLoader)&&!this._gltfLoader.isDestroyed()&&this._gltfLoader.unload(),rVe(this),this._components=void 0,this._arrayBuffer=void 0,this._state=rp.UNLOADED};var LN=sp;var sVe={STOPPED:0,ANIMATING:1},Ah=Object.freeze(sVe);function QT(){this.times=void 0,this.points=void 0,w.throwInstantiationError()}QT.getPointType=function(e){if(typeof e=="number")return Number;if(e instanceof d)return d;if(e instanceof ve)return ve;throw new w("point must be a Cartesian3, Quaternion, or number.")};QT.prototype.evaluate=w.throwInstantiationError;QT.prototype.findTimeInterval=function(e,t){let n=this.times,i=n.length;if(C.typeOf.number("time",e),e<n[0]||e>n[i-1])throw new w("time is out of range.");if(t=g(t,0),e>=n[t]){if(t+1<i&&e<n[t+1])return t;if(t+2<i&&e<n[t+2])return t+1}else if(t-1>=0&&e>=n[t-1])return t-1;let o;if(e>n[t])for(o=t;o<i-1&&!(e>=n[o]&&e<n[o+1]);++o);else for(o=t-1;o>=0&&!(e>=n[o]&&e<n[o+1]);--o);return o===i-1&&(o=i-2),o};QT.prototype.wrapTime=function(e){C.typeOf.number("time",e);let t=this.times,n=t[t.length-1],i=t[0],o=n-i,r;return e<i&&(r=Math.floor((i-e)/o)+1,e+=r*o),e>n&&(r=Math.floor((e-n)/o)+1,e-=r*o),e};QT.prototype.clampTime=function(e){C.typeOf.number("time",e);let t=this.times;return O.clamp(e,t[0],t[t.length-1])};var Ai=QT;function eC(e){this._value=e,this._valueType=Ai.getPointType(e)}Object.defineProperties(eC.prototype,{value:{get:function(){return this._value}}});eC.prototype.findTimeInterval=function(e){throw new w("findTimeInterval cannot be called on a ConstantSpline.")};eC.prototype.wrapTime=function(e){return C.typeOf.number("time",e),0};eC.prototype.clampTime=function(e){return C.typeOf.number("time",e),0};eC.prototype.evaluate=function(e,t){C.typeOf.number("time",e);let n=this._value,i=this._valueType;return i===Number?n:i.clone(n,t)};var NN=eC;function tC(e){e=g(e,g.EMPTY_OBJECT);let t=e.points,n=e.times;if(!c(t)||!c(n))throw new w("points and times are required.");if(t.length<2)throw new w("points.length must be greater than or equal to 2.");if(n.length!==t.length)throw new w("times.length must be equal to points.length.");this._times=n,this._points=t,this._pointType=Ai.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(tC.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});tC.prototype.findTimeInterval=Ai.prototype.findTimeInterval;tC.prototype.wrapTime=Ai.prototype.wrapTime;tC.prototype.clampTime=Ai.prototype.clampTime;tC.prototype.evaluate=function(e,t){let n=this.points,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);return this._pointType===Number?(1-r)*n[o]+r*n[o+1]:(c(t)||(t=new d),d.lerp(n[o],n[o+1],r,t))};var Nb=tC;var gie={};gie.solve=function(e,t,n,i){if(!c(e)||!(e instanceof Array))throw new w("The array lower is required.");if(!c(t)||!(t instanceof Array))throw new w("The array diagonal is required.");if(!c(n)||!(n instanceof Array))throw new w("The array upper is required.");if(!c(i)||!(i instanceof Array))throw new w("The array right is required.");if(t.length!==i.length)throw new w("diagonal and right must have the same lengths.");if(e.length!==n.length)throw new w("lower and upper must have the same lengths.");if(e.length!==t.length-1)throw new w("lower and upper must be one less than the length of diagonal.");let o=new Array(n.length),r=new Array(i.length),s=new Array(i.length),a;for(a=0;a<r.length;a++)r[a]=new d,s[a]=new d;o[0]=n[0]/t[0],r[0]=d.multiplyByScalar(i[0],1/t[0],r[0]);let l;for(a=1;a<o.length;++a)l=1/(t[a]-o[a-1]*e[a-1]),o[a]=n[a]*l,r[a]=d.subtract(i[a],d.multiplyByScalar(r[a-1],e[a-1],r[a]),r[a]),r[a]=d.multiplyByScalar(r[a],l,r[a]);for(l=1/(t[a]-o[a-1]*e[a-1]),r[a]=d.subtract(i[a],d.multiplyByScalar(r[a-1],e[a-1],r[a]),r[a]),r[a]=d.multiplyByScalar(r[a],l,r[a]),s[s.length-1]=r[r.length-1],a=s.length-2;a>=0;--a)s[a]=d.subtract(r[a],d.multiplyByScalar(s[a+1],o[a],s[a]),s[a]);return s};var FA=gie;var yie=[],bie=[],xie=[],Tie=[];function aVe(e,t,n){let i=yie,o=xie,r=bie,s=Tie;i.length=o.length=e.length-1,r.length=s.length=e.length;let a;i[0]=r[0]=1,o[0]=0;let l=s[0];for(c(l)||(l=s[0]=new d),d.clone(t,l),a=1;a<i.length-1;++a)i[a]=o[a]=1,r[a]=4,l=s[a],c(l)||(l=s[a]=new d),d.subtract(e[a+1],e[a-1],l),d.multiplyByScalar(l,3,l);return i[a]=0,o[a]=1,r[a]=4,l=s[a],c(l)||(l=s[a]=new d),d.subtract(e[a+1],e[a-1],l),d.multiplyByScalar(l,3,l),r[a+1]=1,l=s[a+1],c(l)||(l=s[a+1]=new d),d.clone(n,l),FA.solve(i,r,o,s)}function cVe(e){let t=yie,n=xie,i=bie,o=Tie;t.length=n.length=e.length-1,i.length=o.length=e.length;let r;t[0]=n[0]=1,i[0]=2;let s=o[0];for(c(s)||(s=o[0]=new d),d.subtract(e[1],e[0],s),d.multiplyByScalar(s,3,s),r=1;r<t.length;++r)t[r]=n[r]=1,i[r]=4,s=o[r],c(s)||(s=o[r]=new d),d.subtract(e[r+1],e[r-1],s),d.multiplyByScalar(s,3,s);return i[r]=2,s=o[r],c(s)||(s=o[r]=new d),d.subtract(e[r],e[r-1],s),d.multiplyByScalar(s,3,s),FA.solve(t,i,n,o)}function tl(e){e=g(e,g.EMPTY_OBJECT);let t=e.points,n=e.times,i=e.inTangents,o=e.outTangents;if(!c(t)||!c(n)||!c(i)||!c(o))throw new w("times, points, inTangents, and outTangents are required.");if(t.length<2)throw new w("points.length must be greater than or equal to 2.");if(n.length!==t.length)throw new w("times.length must be equal to points.length.");if(i.length!==o.length||i.length!==t.length-1)throw new w("inTangents and outTangents must have a length equal to points.length - 1.");if(this._times=n,this._points=t,this._pointType=Ai.getPointType(t[0]),this._pointType!==Ai.getPointType(i[0])||this._pointType!==Ai.getPointType(o[0]))throw new w("inTangents and outTangents must be of the same type as points.");this._inTangents=i,this._outTangents=o,this._lastTimeIndex=0}Object.defineProperties(tl.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},inTangents:{get:function(){return this._inTangents}},outTangents:{get:function(){return this._outTangents}}});tl.createC1=function(e){e=g(e,g.EMPTY_OBJECT);let t=e.times,n=e.points,i=e.tangents;if(!c(n)||!c(t)||!c(i))throw new w("points, times and tangents are required.");if(n.length<2)throw new w("points.length must be greater than or equal to 2.");if(t.length!==n.length||t.length!==i.length)throw new w("times, points and tangents must have the same length.");let o=i.slice(0,i.length-1),r=i.slice(1,i.length);return new tl({times:t,points:n,inTangents:r,outTangents:o})};tl.createNaturalCubic=function(e){e=g(e,g.EMPTY_OBJECT);let t=e.times,n=e.points;if(!c(n)||!c(t))throw new w("points and times are required.");if(n.length<2)throw new w("points.length must be greater than or equal to 2.");if(t.length!==n.length)throw new w("times.length must be equal to points.length.");if(n.length<3)return new Nb({points:n,times:t});let i=cVe(n),o=i.slice(0,i.length-1),r=i.slice(1,i.length);return new tl({times:t,points:n,inTangents:r,outTangents:o})};tl.createClampedCubic=function(e){e=g(e,g.EMPTY_OBJECT);let t=e.times,n=e.points,i=e.firstTangent,o=e.lastTangent;if(!c(n)||!c(t)||!c(i)||!c(o))throw new w("points, times, firstTangent and lastTangent are required.");if(n.length<2)throw new w("points.length must be greater than or equal to 2.");if(t.length!==n.length)throw new w("times.length must be equal to points.length.");let r=Ai.getPointType(n[0]);if(r!==Ai.getPointType(i)||r!==Ai.getPointType(o))throw new w("firstTangent and lastTangent must be of the same type as points.");if(n.length<3)return new Nb({points:n,times:t});let s=aVe(n,i,o),a=s.slice(0,s.length-1),l=s.slice(1,s.length);return new tl({times:t,points:n,inTangents:l,outTangents:a})};tl.hermiteCoefficientMatrix=new N(2,-3,0,1,-2,3,0,0,1,-2,1,0,1,-1,0,0);tl.prototype.findTimeInterval=Ai.prototype.findTimeInterval;var lVe=new ee,nC=new d;tl.prototype.wrapTime=Ai.prototype.wrapTime;tl.prototype.clampTime=Ai.prototype.clampTime;tl.prototype.evaluate=function(e,t){let n=this.points,i=this.times,o=this.inTangents,r=this.outTangents;this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);let s=this._lastTimeIndex,a=i[s+1]-i[s],l=(e-i[s])/a,u=lVe;u.z=l,u.y=l*l,u.x=u.y*l,u.w=1;let f=N.multiplyByVector(tl.hermiteCoefficientMatrix,u,u);f.z*=a,f.w*=a;let h=this._pointType;return h===Number?n[s]*f.x+n[s+1]*f.y+r[s]*f.z+o[s]*f.w:(c(t)||(t=new h),t=h.multiplyByScalar(n[s],f.x,t),h.multiplyByScalar(n[s+1],f.y,nC),h.add(t,nC,t),h.multiplyByScalar(r[s],f.z,nC),h.add(t,nC,t),h.multiplyByScalar(o[s],f.w,nC),h.add(t,nC,t))};var Fb=tl;function iC(e){e=g(e,g.EMPTY_OBJECT);let t=e.points,n=e.times;if(!c(t)||!c(n))throw new w("points and times are required.");if(t.length<2)throw new w("points.length must be greater than or equal to 2.");if(n.length!==t.length)throw new w("times.length must be equal to points.length.");this._times=n,this._points=t,this._pointType=Ai.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(iC.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});iC.prototype.findTimeInterval=Ai.prototype.findTimeInterval;iC.prototype.wrapTime=Ai.prototype.wrapTime;iC.prototype.clampTime=Ai.prototype.clampTime;iC.prototype.evaluate=function(e,t){let n=this.points;this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);let i=this._lastTimeIndex,o=this._pointType;return o===Number?n[i]:(c(t)||(t=new o),o.clone(n[i],t))};var FN=iC;function uVe(e){let t=e.points,n=e.times;return function(i,o){c(o)||(o=new ve);let r=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),s=(i-n[r])/(n[r+1]-n[r]),a=t[r],l=t[r+1];return ve.fastSlerp(a,l,s,o)}}function oC(e){e=g(e,g.EMPTY_OBJECT);let t=e.points,n=e.times;if(!c(t)||!c(n))throw new w("points and times are required.");if(t.length<2)throw new w("points.length must be greater than or equal to 2.");if(n.length!==t.length)throw new w("times.length must be equal to points.length.");this._times=n,this._points=t,this._evaluateFunction=uVe(this),this._lastTimeIndex=0}Object.defineProperties(oC.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});oC.prototype.findTimeInterval=Ai.prototype.findTimeInterval;oC.prototype.wrapTime=Ai.prototype.wrapTime;oC.prototype.clampTime=Ai.prototype.clampTime;oC.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var BN=oC;var rC=bn.AnimatedPropertyType;function m5(e){e=g(e,g.EMPTY_OBJECT);let t=e.channel,n=e.runtimeAnimation,i=e.runtimeNode;C.typeOf.object("options.channel",t),C.typeOf.object("options.runtimeAnimation",n),C.typeOf.object("options.runtimeNode",i),this._channel=t,this._runtimeAnimation=n,this._runtimeNode=i,this._splines=[],this._path=void 0,pVe(this)}Object.defineProperties(m5.prototype,{channel:{get:function(){return this._channel}},runtimeAnimation:{get:function(){return this._runtimeAnimation}},runtimeNode:{get:function(){return this._runtimeNode}},splines:{get:function(){return this._splines}}});function fVe(e,t){let n=[],i=[],o=[],r=t.length;for(let s=0;s<r;s+=3)i.push(t[s]),n.push(t[s+1]),o.push(t[s+2]);return i.splice(0,1),o.length=o.length-1,new Fb({times:e,points:n,inTangents:i,outTangents:o})}function Cie(e,t,n,i){if(e.length===1&&t.length===1)return new NN(t[0]);switch(n){case wh.STEP:return new FN({times:e,points:t});case wh.CUBICSPLINE:return fVe(e,t);case wh.LINEAR:return i===rC.ROTATION?new BN({times:e,points:t}):new Nb({times:e,points:t})}}function dVe(e,t,n,i,o){let r=[];if(i===rC.WEIGHTS){let a=t.length/o,l,u;for(l=0;l<o;l++){let f=new Array(a),h=l;if(n===wh.CUBICSPLINE)for(u=0;u<a;u+=3)f[u]=t[h],f[u+1]=t[h+o],f[u+2]=t[h+2*o],h+=o*3;else for(u=0;u<a;u++)f[u]=t[h],h+=o;r.push(Cie(e,f,n,i))}}else r.push(Cie(e,t,n,i));return r}var hVe=new d,mVe=new ve;function pVe(e){let t=e._channel,n=t.sampler,i=n.input,o=n.output,r=n.interpolation,a=t.target.path,l=e._runtimeNode,u=c(l.morphWeights)?l.morphWeights.length:1,f=dVe(i,o,r,a,u);e._splines=f,e._path=a}m5.prototype.animate=function(e){let t=this._splines,n=this._path,i=this._runtimeAnimation.model,o=this._runtimeNode;if(n===rC.WEIGHTS){let r=o.morphWeights,s=r.length;for(let a=0;a<s;a++){let l=t[a],u=i.clampAnimations?l.clampTime(e):l.wrapTime(e);r[a]=l.evaluate(u)}}else{if(o.userAnimated)return;{let r=t[0],s=i.clampAnimations?r.clampTime(e):r.wrapTime(e);n===rC.TRANSLATION||n===rC.SCALE?o[n]=r.evaluate(s,hVe):n===rC.ROTATION&&(o[n]=r.evaluate(s,mVe))}}};var kN=m5;function p5(e,t,n){this._animation=t,this._name=t.name,this._runtimeChannels=void 0,this._startTime=K.clone(n.startTime),this._delay=g(n.delay,0),this._stopTime=K.clone(n.stopTime),this.removeOnStop=g(n.removeOnStop,!1),this._multiplier=g(n.multiplier,1),this._reverse=g(n.reverse,!1),this._loop=g(n.loop,Hl.NONE),this._animationTime=n.animationTime,this._prevAnimationDelta=void 0,this.start=new fe,this.update=new fe,this.stop=new fe,this._state=Ah.STOPPED,this._computedStartTime=void 0,this._duration=void 0;let i=this;this._raiseStartEvent=function(){i.start.raiseEvent(e,i)},this._updateEventTime=0,this._raiseUpdateEvent=function(){i.update.raiseEvent(e,i,i._updateEventTime)},this._raiseStopEvent=function(){i.stop.raiseEvent(e,i)},this._model=e,this._localStartTime=void 0,this._localStopTime=void 0,_Ve(this)}Object.defineProperties(p5.prototype,{animation:{get:function(){return this._animation}},name:{get:function(){return this._name}},runtimeChannels:{get:function(){return this._runtimeChannels}},model:{get:function(){return this._model}},localStartTime:{get:function(){return this._localStartTime}},localStopTime:{get:function(){return this._localStopTime}},startTime:{get:function(){return this._startTime}},delay:{get:function(){return this._delay}},stopTime:{get:function(){return this._stopTime}},multiplier:{get:function(){return this._multiplier}},reverse:{get:function(){return this._reverse}},loop:{get:function(){return this._loop}},animationTime:{get:function(){return this._animationTime}}});function _Ve(e){let t=Number.MAX_VALUE,n=-Number.MAX_VALUE,i=e._model.sceneGraph,r=e._animation.channels,s=r.length,a=[];for(let l=0;l<s;l++){let u=r[l],f=u.target;if(!c(f))continue;let h=f.node.index,m=i._runtimeNodes[h],p=new kN({channel:u,runtimeAnimation:e,runtimeNode:m}),_=u.sampler.input;t=Math.min(t,_[0]),n=Math.max(n,_[_.length-1]),a.push(p)}e._runtimeChannels=a,e._localStartTime=t,e._localStopTime=n}p5.prototype.animate=function(e){let t=this._runtimeChannels,n=t.length;for(let i=0;i<n;i++)t[i].animate(e)};var UN=p5;function ap(e){this.animationAdded=new fe,this.animationRemoved=new fe,this.animateWhilePaused=!1,this._model=e,this._runtimeAnimations=[],this._previousTime=void 0}Object.defineProperties(ap.prototype,{length:{get:function(){return this._runtimeAnimations.length}},model:{get:function(){return this._model}}});function _5(e,t,n){let i=e._model,o=new UN(i,t,n);return e._runtimeAnimations.push(o),e.animationAdded.raiseEvent(i,o),o}ap.prototype.add=function(e){e=g(e,g.EMPTY_OBJECT);let t=this._model;if(!t.ready)throw new w("Animations are not loaded. Wait for Model.ready to be true.");let n=t.sceneGraph.components.animations;if(!c(e.name)&&!c(e.index))throw new w("Either options.name or options.index must be defined.");if(c(e.multiplier)&&e.multiplier<=0)throw new w("options.multiplier must be greater than zero.");if(c(e.index)&&(e.index>=n.length||e.index<0))throw new w("options.index must be a valid animation index.");let i=e.index;if(c(i))return _5(this,n[i],e);let o=n.length;for(let r=0;r<o;++r)if(n[r].name===e.name){i=r;break}if(!c(i))throw new w("options.name must be a valid animation name.");return _5(this,n[i],e)};ap.prototype.addAll=function(e){e=g(e,g.EMPTY_OBJECT);let t=this._model;if(!t.ready)throw new w("Animations are not loaded. Wait for Model.ready to be true.");if(c(e.multiplier)&&e.multiplier<=0)throw new w("options.multiplier must be greater than zero.");let n=t.sceneGraph.components.animations,i=[],o=n.length;for(let r=0;r<o;++r){let s=_5(this,n[r],e);i.push(s)}return i};ap.prototype.remove=function(e){if(!c(e))return!1;let t=this._runtimeAnimations,n=t.indexOf(e);return n!==-1?(t.splice(n,1),this.animationRemoved.raiseEvent(this._model,e),!0):!1};ap.prototype.removeAll=function(){let e=this._model,t=this._runtimeAnimations,n=t.length;this._runtimeAnimations.length=0;for(let i=0;i<n;++i)this.animationRemoved.raiseEvent(e,t[i])};ap.prototype.contains=function(e){return c(e)?this._runtimeAnimations.indexOf(e)!==-1:!1};ap.prototype.get=function(e){if(!c(e))throw new w("index is required.");if(e>=this._runtimeAnimations.length||e<0)throw new w("index must be valid within the range of the collection");return this._runtimeAnimations[e]};var zN=[];function gVe(e,t,n){return function(){e.animationRemoved.raiseEvent(t,n)}}ap.prototype.update=function(e){let t=this._runtimeAnimations,n=t.length;if(n===0)return this._previousTime=void 0,!1;if(!this.animateWhilePaused&&K.equals(e.time,this._previousTime))return!1;this._previousTime=K.clone(e.time,this._previousTime);let i=!1,o=e.time,r=this._model;for(let s=0;s<n;++s){let a=t[s];c(a._computedStartTime)||(a._computedStartTime=K.addSeconds(g(a.startTime,o),a.delay,new K)),c(a._duration)||(a._duration=a.localStopTime*(1/a.multiplier));let l=a._computedStartTime,u=a._duration,f=a.stopTime,h=K.lessThanOrEquals(l,o),m=c(f)&&K.greaterThan(o,f),p=0;if(u!==0){let x=K.secondsDifference(m?f:o,l);p=c(a._animationTime)?a._animationTime(u,x):x/u}let _=a.loop===Hl.REPEAT||a.loop===Hl.MIRRORED_REPEAT,b=(h||_&&!c(a.startTime))&&(p<=1||_)&&!m;if(p===a._prevAnimationDelta){let x=a._state===Ah.STOPPED;if(b!==x)continue}if(a._prevAnimationDelta=p,b||a._state===Ah.ANIMATING){if(b&&a._state===Ah.STOPPED&&(a._state=Ah.ANIMATING,a.start.numberOfListeners>0&&e.afterRender.push(a._raiseStartEvent)),a.loop===Hl.REPEAT)p=p-Math.floor(p);else if(a.loop===Hl.MIRRORED_REPEAT){let T=Math.floor(p),E=p-T;p=T%2===1?1-E:E}a.reverse&&(p=1-p);let x=p*u*a.multiplier;x=O.clamp(x,a.localStartTime,a.localStopTime),a.animate(x),a.update.numberOfListeners>0&&(a._updateEventTime=x,e.afterRender.push(a._raiseUpdateEvent)),i=!0,b||(a._state=Ah.STOPPED,a.stop.numberOfListeners>0&&e.afterRender.push(a._raiseStopEvent),a.removeOnStop&&zN.push(a))}}n=zN.length;for(let s=0;s<n;++s){let a=zN[s];t.splice(t.indexOf(a),1),e.afterRender.push(gVe(this,r,a))}return zN.length=0,i};var VN=ap;function Bb(e){this._model=e.model,this._featureTable=e.featureTable,this._featureId=e.featureId,this._color=void 0}Object.defineProperties(Bb.prototype,{show:{get:function(){return this._featureTable.getShow(this._featureId)},set:function(e){this._featureTable.setShow(this._featureId,e)}},color:{get:function(){return c(this._color)||(this._color=new z),this._featureTable.getColor(this._featureId,this._color)},set:function(e){this._featureTable.setColor(this._featureId,e)}},primitive:{get:function(){return this._model}},featureTable:{get:function(){return this._featureTable}},featureId:{get:function(){return this._featureId}}});Bb.prototype.hasProperty=function(e){return this._featureTable.hasProperty(this._featureId,e)};Bb.prototype.getProperty=function(e){return this._featureTable.getProperty(this._featureId,e)};Bb.prototype.getPropertyInherited=function(e){return this._featureTable.hasPropertyBySemantic(this._featureId,e)?this._featureTable.getPropertyBySemantic(this._featureId,e):this._featureTable.getProperty(this._featureId,e)};Bb.prototype.getPropertyIds=function(e){return this._featureTable.getPropertyIds(e)};Bb.prototype.setProperty=function(e,t){return this._featureTable.setProperty(this._featureId,e,t)};var HN=Bb;var BA={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};BA.getStyleCommandsNeeded=function(e,t){return t===0?BA.ALL_OPAQUE:t===e?BA.ALL_TRANSLUCENT:BA.OPAQUE_AND_TRANSLUCENT};var vh=Object.freeze(BA);var fg={GLTF:"GLTF",TILE_GLTF:"TILE_GLTF",TILE_B3DM:"B3DM",TILE_I3DM:"I3DM",TILE_PNTS:"PNTS",TILE_GEOJSON:"TILE_GEOJSON"};fg.is3DTiles=function(e){switch(C.typeOf.string("modelType",e),e){case fg.TILE_GLTF:case fg.TILE_B3DM:case fg.TILE_I3DM:case fg.TILE_PNTS:case fg.TILE_GEOJSON:return!0;case fg.GLTF:return!1;default:throw new w("modelType is not a valid value.")}};var fr=Object.freeze(fg);function vr(e){let t=e.model,n=e.propertyTable;C.typeOf.object("propertyTable",n),C.typeOf.object("model",t),this._propertyTable=n,this._model=t,this._features=void 0,this._featuresLength=0,this._batchTexture=void 0,this._styleCommandsNeededDirty=!1,this._styleCommandsNeeded=vh.ALL_OPAQUE,yVe(this)}Object.defineProperties(vr.prototype,{batchTexture:{get:function(){return this._batchTexture}},featuresLength:{get:function(){return this._featuresLength}},batchTextureByteLength:{get:function(){return c(this._batchTexture)?this._batchTexture.byteLength:0}},styleCommandsNeededDirty:{get:function(){return this._styleCommandsNeededDirty}}});function yVe(e){let t=e._model,n=fr.is3DTiles(t.type),i=e._propertyTable.count;if(i===0)return;let o,r=new Array(i);if(n){let s=t.content;for(o=0;o<i;o++)r[o]=new Jc(s,o)}else for(o=0;o<i;o++)r[o]=new HN({model:t,featureId:o,featureTable:e});e._features=r,e._featuresLength=i,e._batchTexture=new Zc({featuresLength:i,owner:e,statistics:n?t.content.tileset.statistics:void 0})}vr.prototype.update=function(e){this._styleCommandsNeededDirty=!1,this._batchTexture.update(void 0,e);let t=vh.getStyleCommandsNeeded(this._featuresLength,this._batchTexture.translucentFeaturesLength);this._styleCommandsNeeded!==t&&(this._styleCommandsNeededDirty=!0,this._styleCommandsNeeded=t)};vr.prototype.setShow=function(e,t){this._batchTexture.setShow(e,t)};vr.prototype.setAllShow=function(e){this._batchTexture.setAllShow(e)};vr.prototype.getShow=function(e){return this._batchTexture.getShow(e)};vr.prototype.setColor=function(e,t){this._batchTexture.setColor(e,t)};vr.prototype.setAllColor=function(e){this._batchTexture.setAllColor(e)};vr.prototype.getColor=function(e,t){return this._batchTexture.getColor(e,t)};vr.prototype.getPickColor=function(e){return this._batchTexture.getPickColor(e)};vr.prototype.getFeature=function(e){return this._features[e]};vr.prototype.hasProperty=function(e,t){return this._propertyTable.hasProperty(e,t)};vr.prototype.hasPropertyBySemantic=function(e,t){return this._propertyTable.hasPropertyBySemantic(e,t)};vr.prototype.getProperty=function(e,t){return this._propertyTable.getProperty(e,t)};vr.prototype.getPropertyBySemantic=function(e,t){return this._propertyTable.getPropertyBySemantic(e,t)};vr.prototype.getPropertyIds=function(e){return this._propertyTable.getPropertyIds(e)};vr.prototype.setProperty=function(e,t,n){return this._propertyTable.setProperty(e,t,n)};vr.prototype.isClass=function(e,t){return this._propertyTable.isClass(e,t)};vr.prototype.isExactClass=function(e,t){return this._propertyTable.isExactClass(e,t)};vr.prototype.getExactClassName=function(e){return this._propertyTable.getExactClassName(e)};var bVe=new z;vr.prototype.applyStyle=function(e){if(!c(e)){this.setAllColor(Zc.DEFAULT_COLOR_VALUE),this.setAllShow(Zc.DEFAULT_SHOW_VALUE);return}for(let t=0;t<this._featuresLength;t++){let n=this.getFeature(t),i=c(e.color)?g(e.color.evaluateColor(n,bVe),Zc.DEFAULT_COLOR_VALUE):Zc.DEFAULT_COLOR_VALUE,o=c(e.show)?g(e.show.evaluate(n),Zc.DEFAULT_SHOW_VALUE):Zc.DEFAULT_SHOW_VALUE;this.setColor(t,i),this.setShow(t,o)}};vr.prototype.isDestroyed=function(){return!1};vr.prototype.destroy=function(e){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),ue(this)};var GN=vr;var Eie={name:"TilesetPipelineStage"};Eie.process=function(e,t,n){if(t.hasSkipLevelOfDetail(n)){e.shaderBuilder.addDefine("POLYGON_OFFSET",void 0,ce.FRAGMENT);let r={u_polygonOffset:function(){return k.ZERO}};e.uniformMap=bt(r,e.uniformMap),e.hasSkipLevelOfDetail=!0}let i=e.renderStateOptions;i.stencilTest=kt.setCesium3DTileBit(),i.stencilMask=kt.CESIUM_3D_TILE_MASK};var jN=Eie;var WN=`// robust iterative solution without trig functions
| // https://github.com/0xfaded/ellipse_demo/issues/1
| // https://stackoverflow.com/questions/22959698/distance-from-given-point-to-given-ellipse
| //
| // This version uses only a single iteration for best performance. For fog
| // rendering, the difference is negligible.
| vec2 nearestPointOnEllipseFast(vec2 pos, vec2 radii) {
| vec2 p = abs(pos);
| vec2 inverseRadii = 1.0 / radii;
| vec2 evoluteScale = (radii.x * radii.x - radii.y * radii.y) * vec2(1.0, -1.0) * inverseRadii;
|
| // We describe the ellipse parametrically: v = radii * vec2(cos(t), sin(t))
| // but store the cos and sin of t in a vec2 for efficiency.
| // Initial guess: t = cos(pi/4)
| vec2 tTrigs = vec2(0.70710678118);
| vec2 v = radii * tTrigs;
|
| // Find the evolute of the ellipse (center of curvature) at v.
| vec2 evolute = evoluteScale * tTrigs * tTrigs * tTrigs;
| // Find the (approximate) intersection of p - evolute with the ellipsoid.
| vec2 q = normalize(p - evolute) * length(v - evolute);
| // Update the estimate of t.
| tTrigs = (q + evolute) * inverseRadii;
| tTrigs = normalize(clamp(tTrigs, 0.0, 1.0));
| v = radii * tTrigs;
|
| return v * sign(pos);
| }
|
| vec3 computeEllipsoidPositionWC(vec3 positionMC) {
| // Get the world-space position and project onto a meridian plane of
| // the ellipsoid
| vec3 positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;
|
| vec2 positionEllipse = vec2(length(positionWC.xy), positionWC.z);
| vec2 nearestPoint = nearestPointOnEllipseFast(positionEllipse, czm_ellipsoidRadii.xz);
|
| // Reconstruct a 3D point in world space
| return vec3(nearestPoint.x * normalize(positionWC.xy), nearestPoint.y);
| }
|
| void applyFog(inout vec4 color, vec4 groundAtmosphereColor, vec3 lightDirection, float distanceToCamera) {
|
| vec3 fogColor = groundAtmosphereColor.rgb;
|
| // If there is dynamic lighting, apply that to the fog.
| const float NONE = 0.0;
| if (czm_atmosphereDynamicLighting != NONE) {
| float darken = clamp(dot(normalize(czm_viewerPositionWC), lightDirection), czm_fogMinimumBrightness, 1.0);
| fogColor *= darken;
| }
|
| // Tonemap if HDR rendering is disabled
| #ifndef HDR
| fogColor.rgb = czm_pbrNeutralTonemapping(fogColor.rgb);
| fogColor.rgb = czm_inverseGamma(fogColor.rgb);
| #endif
|
| vec3 withFog = czm_fog(distanceToCamera, color.rgb, fogColor, czm_fogVisualDensityScalar);
| color = vec4(withFog, color.a);
| }
|
| void atmosphereStage(inout vec4 color, in ProcessedAttributes attributes) {
| vec3 rayleighColor;
| vec3 mieColor;
| float opacity;
|
| vec3 positionWC;
| vec3 lightDirection;
|
| // When the camera is in space, compute the position per-fragment for
| // more accurate ground atmosphere. All other cases will use
| //
| // The if condition will be added in https://github.com/CesiumGS/cesium/issues/11717
| if (false) {
| positionWC = computeEllipsoidPositionWC(attributes.positionMC);
| lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC, czm_atmosphereDynamicLighting);
|
| // The fog color is derived from the ground atmosphere color
| czm_computeGroundAtmosphereScattering(
| positionWC,
| lightDirection,
| rayleighColor,
| mieColor,
| opacity
| );
| } else {
| positionWC = attributes.positionWC;
| lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC, czm_atmosphereDynamicLighting);
| rayleighColor = v_atmosphereRayleighColor;
| mieColor = v_atmosphereMieColor;
| opacity = v_atmosphereOpacity;
| }
|
| //color correct rayleigh and mie colors
| const bool ignoreBlackPixels = true;
| rayleighColor = czm_applyHSBShift(rayleighColor, czm_atmosphereHsbShift, ignoreBlackPixels);
| mieColor = czm_applyHSBShift(mieColor, czm_atmosphereHsbShift, ignoreBlackPixels);
|
| vec4 groundAtmosphereColor = czm_computeAtmosphereColor(positionWC, lightDirection, rayleighColor, mieColor, opacity);
|
| if (u_isInFog) {
| float distanceToCamera = length(attributes.positionEC);
| applyFog(color, groundAtmosphereColor, lightDirection, distanceToCamera);
| } else {
| // Ground atmosphere
| }
| }
| `;var qN=`void atmosphereStage(ProcessedAttributes attributes) {
| vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(v_positionWC, czm_atmosphereDynamicLighting);
|
| czm_computeGroundAtmosphereScattering(
| // This assumes the geometry stage came before this.
| v_positionWC,
| lightDirection,
| v_atmosphereRayleighColor,
| v_atmosphereMieColor,
| v_atmosphereOpacity
| );
| }
| `;var wie={name:"AtmospherePipelineStage"};wie.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_ATMOSPHERE",void 0,ce.BOTH),i.addDefine("COMPUTE_POSITION_WC_ATMOSPHERE",void 0,ce.BOTH),i.addVarying("vec3","v_atmosphereRayleighColor"),i.addVarying("vec3","v_atmosphereMieColor"),i.addVarying("float","v_atmosphereOpacity"),i.addVertexLines([qN]),i.addFragmentLines([WN]),i.addUniform("bool","u_isInFog",ce.FRAGMENT),e.uniformMap.u_isInFog=function(){let o=d.distance(n.camera.positionWC,t.boundingSphere.center);return O.fog(o,n.fog.density)>O.EPSILON3}};var YN=wie;var XN=`#ifdef DIFFUSE_IBL
| vec3 sampleDiffuseEnvironment(vec3 cubeDir)
| {
| #ifdef CUSTOM_SPHERICAL_HARMONICS
| return czm_sphericalHarmonics(cubeDir, model_sphericalHarmonicCoefficients);
| #else
| return czm_sphericalHarmonics(cubeDir, czm_sphericalHarmonicCoefficients);
| #endif
| }
| #endif
|
| #ifdef SPECULAR_IBL
| vec3 sampleSpecularEnvironment(vec3 cubeDir, float roughness)
| {
| #ifdef CUSTOM_SPECULAR_IBL
| float lod = roughness * model_specularEnvironmentMapsMaximumLOD;
| return czm_textureCube(model_specularEnvironmentMaps, cubeDir, lod).rgb;
| #else
| float lod = roughness * czm_specularEnvironmentMapsMaximumLOD;
| return czm_textureCube(czm_specularEnvironmentMaps, cubeDir, lod).rgb;
| #endif
| }
| vec3 computeSpecularIBL(vec3 cubeDir, float NdotV, vec3 f0, float roughness)
| {
| // see https://bruop.github.io/ibl/ at Single Scattering Results
| // Roughness dependent fresnel, from Fdez-Aguera
| vec3 f90 = max(vec3(1.0 - roughness), f0);
| vec3 F = fresnelSchlick2(f0, f90, NdotV);
|
| vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;
| vec3 specularSample = sampleSpecularEnvironment(cubeDir, roughness);
|
| return specularSample * (F * brdfLut.x + brdfLut.y);
| }
| #endif
|
| #if defined(DIFFUSE_IBL) || defined(SPECULAR_IBL)
| /**
| * Compute the light contributions from environment maps and spherical harmonic coefficients.
| * See Fdez-Aguera, https://www.jcgt.org/published/0008/01/03/paper.pdf, for explanation
| * of the single- and multi-scattering terms.
| *
| * @param {vec3} viewDirectionEC Unit vector pointing from the fragment to the eye position.
| * @param {vec3} normalEC The surface normal in eye coordinates.
| * @param {czm_modelMaterial} The material properties.
| * @return {vec3} The computed HDR color.
| */
| vec3 textureIBL(vec3 viewDirectionEC, vec3 normalEC, czm_modelMaterial material) {
| vec3 f0 = material.specular;
| float roughness = material.roughness;
| float specularWeight = 1.0;
| #ifdef USE_SPECULAR
| specularWeight = material.specularWeight;
| #endif
| float NdotV = clamp(dot(normalEC, viewDirectionEC), 0.0, 1.0);
|
| // see https://bruop.github.io/ibl/ at Single Scattering Results
| // Roughness dependent fresnel, from Fdez-Aguera
| vec3 f90 = max(vec3(1.0 - roughness), f0);
| vec3 singleScatterFresnel = fresnelSchlick2(f0, f90, NdotV);
|
| vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;
| vec3 FssEss = specularWeight * (singleScatterFresnel * brdfLut.x + brdfLut.y);
|
| #ifdef DIFFUSE_IBL
| vec3 normalMC = normalize(model_iblReferenceFrameMatrix * normalEC);
| vec3 irradiance = sampleDiffuseEnvironment(normalMC);
|
| vec3 averageFresnel = f0 + (1.0 - f0) / 21.0;
| float Ems = specularWeight * (1.0 - brdfLut.x - brdfLut.y);
| vec3 FmsEms = FssEss * averageFresnel * Ems / (1.0 - averageFresnel * Ems);
| vec3 dielectricScattering = (1.0 - FssEss - FmsEms) * material.diffuse;
| vec3 diffuseContribution = irradiance * (FmsEms + dielectricScattering) * model_iblFactor.x;
| #else
| vec3 diffuseContribution = vec3(0.0);
| #endif
|
| #ifdef USE_ANISOTROPY
| // Bend normal to account for anisotropic distortion of specular reflection
| vec3 anisotropyDirection = material.anisotropicB;
| vec3 anisotropicTangent = cross(anisotropyDirection, viewDirectionEC);
| vec3 anisotropicNormal = cross(anisotropicTangent, anisotropyDirection);
| float bendFactor = 1.0 - material.anisotropyStrength * (1.0 - roughness);
| float bendFactorPow4 = bendFactor * bendFactor * bendFactor * bendFactor;
| vec3 bentNormal = normalize(mix(anisotropicNormal, normalEC, bendFactorPow4));
| vec3 reflectEC = reflect(-viewDirectionEC, bentNormal);
| #else
| vec3 reflectEC = reflect(-viewDirectionEC, normalEC);
| #endif
|
| #ifdef SPECULAR_IBL
| vec3 reflectMC = normalize(model_iblReferenceFrameMatrix * reflectEC);
| vec3 radiance = sampleSpecularEnvironment(reflectMC, roughness);
| vec3 specularContribution = radiance * FssEss * model_iblFactor.y;
| #else
| vec3 specularContribution = vec3(0.0);
| #endif
|
| return diffuseContribution + specularContribution;
| }
| #endif
| `;var Sie={name:"ImageBasedLightingPipelineStage"},xVe=new k;Sie.process=function(e,t,n){var u;let i=t.imageBasedLighting,o=t.environmentMapManager,r=e.shaderBuilder,s;c(i.specularEnvironmentMaps)||(s=o.radianceCubeMap);let a=(u=i.sphericalHarmonicCoefficients)!=null?u:o.sphericalHarmonicCoefficients;r.addDefine("USE_IBL_LIGHTING",void 0,ce.FRAGMENT),r.addUniform("vec2","model_iblFactor",ce.FRAGMENT),hh.isSupported(n.context)&&((i.useSphericalHarmonics||i.useSpecularEnvironmentMaps||i.enabled)&&r.addUniform("mat3","model_iblReferenceFrameMatrix",ce.FRAGMENT),c(s)&&r.addDefine("COMPUTE_POSITION_WC_ATMOSPHERE",void 0,ce.BOTH),c(a)&&c(a[0])?(r.addDefine("DIFFUSE_IBL",void 0,ce.FRAGMENT),r.addDefine("CUSTOM_SPHERICAL_HARMONICS",void 0,ce.FRAGMENT),r.addUniform("vec3","model_sphericalHarmonicCoefficients[9]",ce.FRAGMENT)):i.useDefaultSphericalHarmonics&&r.addDefine("DIFFUSE_IBL",void 0,ce.FRAGMENT),c(i.specularEnvironmentCubeMap)&&i.specularEnvironmentCubeMap.ready||c(s)?(r.addDefine("SPECULAR_IBL",void 0,ce.FRAGMENT),r.addDefine("CUSTOM_SPECULAR_IBL",void 0,ce.FRAGMENT),r.addUniform("samplerCube","model_specularEnvironmentMaps",ce.FRAGMENT),r.addUniform("float","model_specularEnvironmentMapsMaximumLOD",ce.FRAGMENT)):t.useDefaultSpecularMaps&&r.addDefine("SPECULAR_IBL",void 0,ce.FRAGMENT)),r.addFragmentLines(XN);let l={model_iblFactor:function(){return k.multiplyByScalar(i.imageBasedLightingFactor,(o==null?void 0:o.intensity)||1,xVe)},model_iblReferenceFrameMatrix:function(){return t._iblReferenceFrameMatrix},model_sphericalHarmonicCoefficients:function(){return a},model_specularEnvironmentMaps:function(){return i.specularEnvironmentCubeMap.texture},model_specularEnvironmentMapsMaximumLOD:function(){return i.specularEnvironmentCubeMap.maximumMipmapLevel}};c(s)&&(l.model_specularEnvironmentMaps=function(){return s},l.model_specularEnvironmentMapsMaximumLOD=function(){return o.maximumMipmapLevel}),e.uniformMap=bt(l,e.uniformMap)};var KN=Sie;var TVe=O.EPSILON16;function y5(e){e=g(e,g.EMPTY_OBJECT);let t=e.stage,n=e.runtimeArticulation;C.typeOf.object("options.stage",t),C.typeOf.object("options.runtimeArticulation",n),this._stage=t,this._runtimeArticulation=n,this._name=t.name,this._type=t.type,this._minimumValue=t.minimumValue,this._maximumValue=t.maximumValue,this._currentValue=t.initialValue}Object.defineProperties(y5.prototype,{stage:{get:function(){return this._stage}},runtimeArticulation:{get:function(){return this._runtimeArticulation}},name:{get:function(){return this._name}},type:{get:function(){return this._type}},minimumValue:{get:function(){return this._minimumValue}},maximumValue:{get:function(){return this._maximumValue}},currentValue:{get:function(){return this._currentValue},set:function(e){C.typeOf.number("value",e),e=O.clamp(e,this.minimumValue,this.maximumValue),O.equalsEpsilon(this._currentValue,e,TVe)||(this._currentValue=e,this.runtimeArticulation._dirty=!0)}}});var CVe=new d,g5=new q;y5.prototype.applyStageToMatrix=function(e){C.typeOf.object("result",e);let t=this.type,n=this.currentValue,i=CVe,o;switch(t){case gc.XROTATE:o=q.fromRotationX(O.toRadians(n),g5),e=N.multiplyByMatrix3(e,o,e);break;case gc.YROTATE:o=q.fromRotationY(O.toRadians(n),g5),e=N.multiplyByMatrix3(e,o,e);break;case gc.ZROTATE:o=q.fromRotationZ(O.toRadians(n),g5),e=N.multiplyByMatrix3(e,o,e);break;case gc.XTRANSLATE:i.x=n,i.y=0,i.z=0,e=N.multiplyByTranslation(e,i,e);break;case gc.YTRANSLATE:i.x=0,i.y=n,i.z=0,e=N.multiplyByTranslation(e,i,e);break;case gc.ZTRANSLATE:i.x=0,i.y=0,i.z=n,e=N.multiplyByTranslation(e,i,e);break;case gc.XSCALE:i.x=n,i.y=1,i.z=1,e=N.multiplyByScale(e,i,e);break;case gc.YSCALE:i.x=1,i.y=n,i.z=1,e=N.multiplyByScale(e,i,e);break;case gc.ZSCALE:i.x=1,i.y=1,i.z=n,e=N.multiplyByScale(e,i,e);break;case gc.UNIFORMSCALE:e=N.multiplyByUniformScale(e,n,e);break;default:break}return e};var $N=y5;function ZN(e){e=g(e,g.EMPTY_OBJECT);let t=e.articulation,n=e.sceneGraph;C.typeOf.object("options.articulation",t),C.typeOf.object("options.sceneGraph",n),this._articulation=t,this._sceneGraph=n,this._name=t.name,this._runtimeStages=[],this._runtimeStagesByName={},this._runtimeNodes=[],this._dirty=!0,EVe(this)}Object.defineProperties(ZN.prototype,{articulation:{get:function(){return this._articulation}},sceneGraph:{get:function(){return this._sceneGraph}},name:{get:function(){return this._name}},runtimeStages:{get:function(){return this._runtimeStages}},runtimeNodes:{get:function(){return this._runtimeNodes}}});function EVe(e){let n=e.articulation.stages,i=n.length,o=e._runtimeStages,r=e._runtimeStagesByName;for(let s=0;s<i;s++){let a=n[s],l=new $N({stage:a,runtimeArticulation:e});o.push(l);let u=a.name;r[u]=l}}ZN.prototype.setArticulationStage=function(e,t){let n=this._runtimeStagesByName[e];c(n)&&(n.currentValue=t)};var wVe=new N,SVe=new N;ZN.prototype.apply=function(){if(!this._dirty)return;this._dirty=!1;let e=N.clone(N.IDENTITY,wVe),t,n=this._runtimeStages,i=n.length;for(t=0;t<i;t++)e=n[t].applyStageToMatrix(e);let o=this._runtimeNodes,r=o.length;for(t=0;t<r;t++){let s=o[t],a=N.multiplyTransformation(s.originalTransform,e,SVe);s.transform=a}};var JN=ZN;var QN=`void modelColorStage(inout czm_modelMaterial material)
| {
| material.diffuse = mix(material.diffuse, model_color.rgb, model_colorBlend);
| float highlight = ceil(model_colorBlend);
| material.diffuse *= mix(model_color.rgb, vec3(1.0), highlight);
| material.alpha *= model_color.a;
| }
| `;var sC={name:"ModelColorPipelineStage",COLOR_UNIFORM_NAME:"model_color",COLOR_BLEND_UNIFORM_NAME:"model_colorBlend"};sC.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_MODEL_COLOR",void 0,ce.FRAGMENT),i.addFragmentLines(QN);let o={},r=t.color;r.alpha===0&&!t.hasSilhouette(n)&&(e.renderStateOptions.colorMask={red:!1,green:!1,blue:!1,alpha:!1}),r.alpha<1&&(e.alphaOptions.pass=xe.TRANSLUCENT),i.addUniform("vec4",sC.COLOR_UNIFORM_NAME,ce.FRAGMENT),o[sC.COLOR_UNIFORM_NAME]=function(){return t.color},i.addUniform("float",sC.COLOR_BLEND_UNIFORM_NAME,ce.FRAGMENT),o[sC.COLOR_BLEND_UNIFORM_NAME]=function(){return _c.getColorBlend(t.colorBlendMode,t.colorBlendAmount)},e.uniformMap=bt(o,e.uniformMap)};var kb=sC;var eF=`#ifdef USE_CLIPPING_PLANES_FLOAT_TEXTURE
| vec4 getClippingPlane(
| highp sampler2D packedClippingPlanes,
| int clippingPlaneNumber,
| mat4 transform
| ) {
| int pixY = clippingPlaneNumber / CLIPPING_PLANES_TEXTURE_WIDTH;
| int pixX = clippingPlaneNumber - (pixY * CLIPPING_PLANES_TEXTURE_WIDTH);
| float pixelWidth = 1.0 / float(CLIPPING_PLANES_TEXTURE_WIDTH);
| float pixelHeight = 1.0 / float(CLIPPING_PLANES_TEXTURE_HEIGHT);
| float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
| float v = (float(pixY) + 0.5) * pixelHeight;
| vec4 plane = texture(packedClippingPlanes, vec2(u, v));
| return czm_transformPlane(plane, transform);
| }
| #else
| // Handle uint8 clipping texture instead
| vec4 getClippingPlane(
| highp sampler2D packedClippingPlanes,
| int clippingPlaneNumber,
| mat4 transform
| ) {
| int clippingPlaneStartIndex = clippingPlaneNumber * 2; // clipping planes are two pixels each
| int pixY = clippingPlaneStartIndex / CLIPPING_PLANES_TEXTURE_WIDTH;
| int pixX = clippingPlaneStartIndex - (pixY * CLIPPING_PLANES_TEXTURE_WIDTH);
| float pixelWidth = 1.0 / float(CLIPPING_PLANES_TEXTURE_WIDTH);
| float pixelHeight = 1.0 / float(CLIPPING_PLANES_TEXTURE_HEIGHT);
| float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
| float v = (float(pixY) + 0.5) * pixelHeight;
| vec4 oct32 = texture(packedClippingPlanes, vec2(u, v)) * 255.0;
| vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);
| vec4 plane;
| plane.xyz = czm_octDecode(oct, 65535.0);
| plane.w = czm_unpackFloat(texture(packedClippingPlanes, vec2(u + pixelWidth, v)));
| return czm_transformPlane(plane, transform);
| }
| #endif
|
| float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix) {
| vec4 position = czm_windowToEyeCoordinates(fragCoord);
| vec3 clipNormal = vec3(0.0);
| vec3 clipPosition = vec3(0.0);
| float pixelWidth = czm_metersPerPixel(position);
|
| #ifdef UNION_CLIPPING_REGIONS
| float clipAmount; // For union planes, we want to get the min distance. So we set the initial value to the first plane distance in the loop below.
| #else
| float clipAmount = 0.0;
| bool clipped = true;
| #endif
|
| for (int i = 0; i < CLIPPING_PLANES_LENGTH; ++i) {
| vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
| clipNormal = clippingPlane.xyz;
| clipPosition = -clippingPlane.w * clipNormal;
| float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
|
| #ifdef UNION_CLIPPING_REGIONS
| clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));
| if (amount <= 0.0) {
| discard;
| }
| #else
| clipAmount = max(amount, clipAmount);
| clipped = clipped && (amount <= 0.0);
| #endif
| }
|
| #ifndef UNION_CLIPPING_REGIONS
| if (clipped) {
| discard;
| }
| #endif
|
| return clipAmount;
| }
|
| void modelClippingPlanesStage(inout vec4 color)
| {
| float clipDistance = clip(gl_FragCoord, model_clippingPlanes, model_clippingPlanesMatrix);
| vec4 clippingPlanesEdgeColor = vec4(1.0);
| clippingPlanesEdgeColor.rgb = model_clippingPlanesEdgeStyle.rgb;
| float clippingPlanesEdgeWidth = model_clippingPlanesEdgeStyle.a;
|
| if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) {
| color = clippingPlanesEdgeColor;
| }
| }
| `;var Aie={name:"ModelClippingPlanesPipelineStage"},AVe=new k;Aie.process=function(e,t,n){let i=t.clippingPlanes,o=n.context,r=e.shaderBuilder;r.addDefine("HAS_CLIPPING_PLANES",void 0,ce.FRAGMENT),r.addDefine("CLIPPING_PLANES_LENGTH",i.length,ce.FRAGMENT),i.unionClippingRegions&&r.addDefine("UNION_CLIPPING_REGIONS",void 0,ce.FRAGMENT),as.useFloatTexture(o)&&r.addDefine("USE_CLIPPING_PLANES_FLOAT_TEXTURE",void 0,ce.FRAGMENT);let s=as.getTextureResolution(i,o,AVe);r.addDefine("CLIPPING_PLANES_TEXTURE_WIDTH",s.x,ce.FRAGMENT),r.addDefine("CLIPPING_PLANES_TEXTURE_HEIGHT",s.y,ce.FRAGMENT),r.addUniform("sampler2D","model_clippingPlanes",ce.FRAGMENT),r.addUniform("vec4","model_clippingPlanesEdgeStyle",ce.FRAGMENT),r.addUniform("mat4","model_clippingPlanesMatrix",ce.FRAGMENT),r.addFragmentLines(eF);let a={model_clippingPlanes:function(){return i.texture},model_clippingPlanesEdgeStyle:function(){let l=z.clone(i.edgeColor);return l.alpha=i.edgeWidth,l},model_clippingPlanesMatrix:function(){return t._clippingPlanesMatrix}};e.uniformMap=bt(a,e.uniformMap)};var tF=Aie;var nF=`void modelClippingPolygonsStage(ProcessedAttributes attributes)
| {
| vec2 sphericalLatLong = czm_approximateSphericalCoordinates(v_positionWC);
| sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);
|
| vec2 minDistance = vec2(czm_infinity);
| v_regionIndex = -1;
| v_clippingPosition = vec2(czm_infinity);
|
| for (int regionIndex = 0; regionIndex < CLIPPING_POLYGON_REGIONS_LENGTH; regionIndex++) {
| vec4 extents = czm_unpackClippingExtents(model_clippingExtents, regionIndex);
| vec2 rectUv = (sphericalLatLong.yx - extents.yx) * extents.wz;
|
| vec2 clamped = clamp(rectUv, vec2(0.0), vec2(1.0));
| vec2 distance = abs(rectUv - clamped) * extents.wz;
|
| if (minDistance.x > distance.x || minDistance.y > distance.y) {
| minDistance = distance;
| v_clippingPosition = rectUv;
| }
|
| float threshold = 0.01;
| if (rectUv.x > threshold && rectUv.y > threshold && rectUv.x < 1.0 - threshold && rectUv.y < 1.0 - threshold) {
| v_regionIndex = regionIndex;
| }
| }
| }
| `;var iF=`void modelClippingPolygonsStage()
| {
| vec2 clippingPosition = v_clippingPosition;
| int regionIndex = v_regionIndex;
| czm_clipPolygons(model_clippingDistance, CLIPPING_POLYGON_REGIONS_LENGTH, clippingPosition, regionIndex);
| }
| `;var vie={name:"ModelClippingPolygonsPipelineStage"};vie.process=function(e,t,n){let i=t.clippingPolygons,o=e.shaderBuilder;o.addDefine("ENABLE_CLIPPING_POLYGONS",void 0,ce.BOTH),i.inverse&&o.addDefine("CLIPPING_INVERSE",void 0,ce.FRAGMENT),o.addDefine("CLIPPING_POLYGON_REGIONS_LENGTH",i.extentsCount,ce.BOTH),o.addUniform("sampler2D","model_clippingDistance",ce.FRAGMENT),o.addUniform("sampler2D","model_clippingExtents",ce.VERTEX),o.addVarying("vec2","v_clippingPosition"),o.addVarying("int","v_regionIndex","flat"),o.addVertexLines(nF),o.addFragmentLines(iF);let r={model_clippingDistance:function(){return i.clippingTexture},model_clippingExtents:function(){return i.extentsTexture}};e.uniformMap=bt(r,e.uniformMap)};var oF=vie;function Die(e,t){C.typeOf.object("model",e),C.typeOf.object("runtimeNode",t),this._model=e,this._runtimeNode=t}Object.defineProperties(Die.prototype,{name:{get:function(){return this._runtimeNode._name}},id:{get:function(){return this._runtimeNode._id}},show:{get:function(){return this._runtimeNode.show},set:function(e){this._runtimeNode.show=e}},matrix:{get:function(){return this._runtimeNode.transform},set:function(e){c(e)?(this._runtimeNode.transform=e,this._runtimeNode.userAnimated=!0,this._model._userAnimationDirty=!0):(this._runtimeNode.transform=this.originalMatrix,this._runtimeNode.userAnimated=!1)}},originalMatrix:{get:function(){return this._runtimeNode.originalTransform}}});var rF=Die;var sF=`mat4 getInstancingTransform()
| {
| mat4 instancingTransform;
|
| #ifdef HAS_INSTANCE_MATRICES
| instancingTransform = mat4(
| a_instancingTransformRow0.x, a_instancingTransformRow1.x, a_instancingTransformRow2.x, 0.0, // Column 1
| a_instancingTransformRow0.y, a_instancingTransformRow1.y, a_instancingTransformRow2.y, 0.0, // Column 2
| a_instancingTransformRow0.z, a_instancingTransformRow1.z, a_instancingTransformRow2.z, 0.0, // Column 3
| a_instancingTransformRow0.w, a_instancingTransformRow1.w, a_instancingTransformRow2.w, 1.0 // Column 4
| );
| #else
| vec3 translation = vec3(0.0, 0.0, 0.0);
| vec3 scale = vec3(1.0, 1.0, 1.0);
|
| #ifdef HAS_INSTANCE_TRANSLATION
| translation = a_instanceTranslation;
| #endif
| #ifdef HAS_INSTANCE_SCALE
| scale = a_instanceScale;
| #endif
|
| instancingTransform = mat4(
| scale.x, 0.0, 0.0, 0.0,
| 0.0, scale.y, 0.0, 0.0,
| 0.0, 0.0, scale.z, 0.0,
| translation.x, translation.y, translation.z, 1.0
| );
| #endif
|
| return instancingTransform;
| }
|
| #ifdef USE_2D_INSTANCING
| mat4 getInstancingTransform2D()
| {
| mat4 instancingTransform2D;
|
| #ifdef HAS_INSTANCE_MATRICES
| instancingTransform2D = mat4(
| a_instancingTransform2DRow0.x, a_instancingTransform2DRow1.x, a_instancingTransform2DRow2.x, 0.0, // Column 1
| a_instancingTransform2DRow0.y, a_instancingTransform2DRow1.y, a_instancingTransform2DRow2.y, 0.0, // Column 2
| a_instancingTransform2DRow0.z, a_instancingTransform2DRow1.z, a_instancingTransform2DRow2.z, 0.0, // Column 3
| a_instancingTransform2DRow0.w, a_instancingTransform2DRow1.w, a_instancingTransform2DRow2.w, 1.0 // Column 4
| );
| #else
| vec3 translation2D = vec3(0.0, 0.0, 0.0);
| vec3 scale = vec3(1.0, 1.0, 1.0);
|
| #ifdef HAS_INSTANCE_TRANSLATION
| translation2D = a_instanceTranslation2D;
| #endif
| #ifdef HAS_INSTANCE_SCALE
| scale = a_instanceScale;
| #endif
|
| instancingTransform2D = mat4(
| scale.x, 0.0, 0.0, 0.0,
| 0.0, scale.y, 0.0, 0.0,
| 0.0, 0.0, scale.z, 0.0,
| translation2D.x, translation2D.y, translation2D.z, 1.0
| );
| #endif
|
| return instancingTransform2D;
| }
| #endif
| `;var aF=`void instancingStage(inout ProcessedAttributes attributes)
| {
| vec3 positionMC = attributes.positionMC;
|
| mat4 instancingTransform = getInstancingTransform();
|
| attributes.positionMC = (instancingTransform * vec4(positionMC, 1.0)).xyz;
|
| #ifdef HAS_NORMALS
| vec3 normalMC = attributes.normalMC;
| attributes.normalMC = (instancingTransform * vec4(normalMC, 0.0)).xyz;
| #endif
|
| #ifdef USE_2D_INSTANCING
| mat4 instancingTransform2D = getInstancingTransform2D();
| attributes.position2D = (instancingTransform2D * vec4(positionMC, 1.0)).xyz;
| #endif
| }
| `;var cF=`void legacyInstancingStage(
| inout ProcessedAttributes attributes,
| out mat4 instanceModelView,
| out mat3 instanceModelViewInverseTranspose)
| {
| vec3 positionMC = attributes.positionMC;
|
| mat4 instancingTransform = getInstancingTransform();
|
| mat4 instanceModel = instancingTransform * u_instance_nodeTransform;
| instanceModelView = u_instance_modifiedModelView;
| instanceModelViewInverseTranspose = mat3(u_instance_modifiedModelView * instanceModel);
|
| attributes.positionMC = (instanceModel * vec4(positionMC, 1.0)).xyz;
|
| #ifdef USE_2D_INSTANCING
| mat4 instancingTransform2D = getInstancingTransform2D();
| attributes.position2D = (instancingTransform2D * vec4(positionMC, 1.0)).xyz;
| #endif
| }
| `;var lF=new N,vVe=new N,DVe=new N,Oie={name:"InstancingPipelineStage",_getInstanceTransformsAsMatrices:Nie,_transformsToTypedArray:x5};Oie.process=function(e,t,n){let i=t.instances,o=i.attributes[0].count,r=e.shaderBuilder;r.addDefine("HAS_INSTANCING"),r.addVertexLines(sF);let s=e.model,a=s.sceneGraph,l=e.runtimeNode,u=n.mode!==J.SCENE3D&&!n.scene3DOnly&&s._projectTo2D,f=s._enablePick&&!n.context.webgl2,h=[];GVe(e,n,i,h,u,f),qVe(e,n,i,h);let m={};if(i.transformInWorldSpace?(r.addDefine("USE_LEGACY_INSTANCING",void 0,ce.VERTEX),r.addUniform("mat4","u_instance_modifiedModelView",ce.VERTEX),r.addUniform("mat4","u_instance_nodeTransform",ce.VERTEX),m.u_instance_modifiedModelView=function(){let p=N.multiplyTransformation(s.modelMatrix,a.components.transform,lF);return u?N.multiplyTransformation(n.context.uniformState.view3D,p,lF):(n.mode!==J.SCENE3D&&(p=Lt.basisTo2D(n.mapProjection,p,lF)),N.multiplyTransformation(n.context.uniformState.view,p,lF))},m.u_instance_nodeTransform=function(){return N.multiplyTransformation(a.axisCorrectionMatrix,l.computedTransform,vVe)},r.addVertexLines(cF)):r.addVertexLines(aF),u){r.addDefine("USE_2D_INSTANCING",void 0,ce.VERTEX),r.addUniform("mat4","u_modelView2D",ce.VERTEX);let p=n.context,_=N.fromTranslation(l.instancingReferencePoint2D,new N);m.u_modelView2D=function(){return N.multiplyTransformation(p.uniformState.view,_,DVe)}}e.uniformMap=bt(m,e.uniformMap),e.instanceCount=o,e.attributes.push.apply(e.attributes,h)};var kA=new N,IVe=new d;function OVe(e,t,n,i,o){let r=N.multiplyTransformation(t,e,kA);return r=N.multiplyTransformation(r,n,kA),o=Lt.basisTo2D(i.mapProjection,r,o),o}function PVe(e,t,n,i,o){let r=N.fromTranslation(e,kA),s=N.multiplyTransformation(t,r,kA);s=N.multiplyTransformation(s,n,kA);let a=N.getTranslation(s,IVe);return o=Yi.computeActualEllipsoidPosition(i,a,o),o}function Pie(e,t,n){let i=e.model,o=i.sceneGraph;e.runtimeNode.node.instances.transformInWorldSpace?(t=N.multiplyTransformation(i.modelMatrix,o.components.transform,t),n=N.multiplyTransformation(o.axisCorrectionMatrix,e.runtimeNode.computedTransform,n)):(t=N.clone(o.computedModelMatrix,t),t=N.multiplyTransformation(t,e.runtimeNode.computedTransform,t),n=N.clone(N.IDENTITY,n))}var Rie=new N,Mie=new N,RVe=new N,MVe=new d;function LVe(e,t,n,i){let o=Rie,r=Mie;Pie(t,o,r);let a=t.runtimeNode.instancingReferencePoint2D,l=e.length;for(let u=0;u<l;u++){let f=e[u],h=OVe(f,o,r,n,RVe),m=N.getTranslation(h,MVe),p=d.subtract(m,a,m);i[u]=N.setTranslation(h,p,i[u])}return i}function NVe(e,t,n,i){let o=Rie,r=Mie;Pie(t,o,r);let a=t.runtimeNode.instancingReferencePoint2D,l=e.length;for(let u=0;u<l;u++){let f=e[u],h=PVe(f,o,r,n,f);i[u]=d.subtract(h,a,i[u])}return i}var FVe=new d,BVe=new d;function Lie(e,t){let n=e.runtimeNode,i=e.model.sceneGraph.computedModelMatrix,o=N.multiplyByPoint(i,n.instancingTranslationMin,FVe),r=Yi.computeActualEllipsoidPosition(t,o,o),s=N.multiplyByPoint(i,n.instancingTranslationMax,BVe),a=Yi.computeActualEllipsoidPosition(t,s,s);n.instancingReferencePoint2D=d.lerp(r,a,.5,new d)}function x5(e){let n=e.length,i=new Float32Array(n*12);for(let o=0;o<n;o++){let r=e[o],s=12*o;i[s+0]=r[0],i[s+1]=r[4],i[s+2]=r[8],i[s+3]=r[12],i[s+4]=r[1],i[s+5]=r[5],i[s+6]=r[9],i[s+7]=r[13],i[s+8]=r[2],i[s+9]=r[6],i[s+10]=r[10],i[s+11]=r[14]}return i}function kVe(e){let n=e.length,i=new Float32Array(n*3);for(let o=0;o<n;o++){let r=e[o],s=3*o;i[s+0]=r[0],i[s+1]=r[4],i[s+2]=r[8]}return i}var UVe=new d,zVe=new ve,VVe=new d;function Nie(e,t,n){let i=new Array(t),o=Xt.getAttributeBySemantic(e,Yr.TRANSLATION),r=Xt.getAttributeBySemantic(e,Yr.ROTATION),s=Xt.getAttributeBySemantic(e,Yr.SCALE),a=new d(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),l=new d(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),u=c(o),f=c(r),h=c(s),m=u?o.typedArray:new Float32Array(t*3),p=f?r.typedArray:new Float32Array(t*4);f&&r.normalized&&(p=On.dequantize(p,r.componentDatatype,r.type,t));let _;h?_=s.typedArray:(_=new Float32Array(t*3),_.fill(1));for(let x=0;x<t;x++){let T=new d(m[x*3],m[x*3+1],m[x*3+2],UVe);d.maximumByComponent(a,T,a),d.minimumByComponent(l,T,l);let E=new ve(p[x*4],p[x*4+1],p[x*4+2],f?p[x*4+3]:1,zVe),S=new d(_[x*3],_[x*3+1],_[x*3+2],VVe),A=N.fromTranslationQuaternionRotationScale(T,E,S,new N);i[x]=A}let b=n.runtimeNode;return b.instancingTranslationMin=l,b.instancingTranslationMax=a,u&&(o.typedArray=void 0),f&&(r.typedArray=void 0),h&&(s.typedArray=void 0),i}function HVe(e,t,n){let i=new Array(t),o=e.typedArray,r=new d(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),s=new d(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(let l=0;l<t;l++){let u=new d(o[l*3],o[l*3+1],o[l*3+2]);i[l]=u,d.minimumByComponent(r,u,r),d.maximumByComponent(s,u,s)}let a=n.runtimeNode;return a.instancingTranslationMin=r,a.instancingTranslationMax=s,e.typedArray=void 0,i}function T5(e,t){let n=yt.createVertexBuffer({context:t.context,typedArray:e,usage:Pe.STATIC_DRAW});return n.vertexArrayDestroyable=!1,n}function GVe(e,t,n,i,o,r){let s=Xt.getAttributeBySemantic(n,Yr.ROTATION);c(s)?jVe(e,n,i,t,o,r):WVe(e,n,i,t,o)}function jVe(e,t,n,i,o,r){let s=e.shaderBuilder,a=t.attributes[0].count,l=e.model,u=e.runtimeNode;s.addDefine("HAS_INSTANCE_MATRICES");let f="Transform",h,m=u.instancingTransformsBuffer;if(!c(m)){h=Nie(t,a,e);let x=x5(h);m=T5(x,i),l._modelResources.push(m),r&&(u.transformsTypedArray=x),u.instancingTransformsBuffer=m}if(Iie(e,m,n,f),!o)return;let p=ze(i);p.mode=J.COLUMBUS_VIEW,Lie(e,p);let _=u.instancingTransformsBuffer2D;if(!c(_)){let x=LVe(h,e,p,h),T=x5(x);_=T5(T,i),l._modelResources.push(_),u.instancingTransformsBuffer2D=_}Iie(e,_,n,"Transform2D")}function WVe(e,t,n,i,o,r){let s=e.shaderBuilder,a=e.runtimeNode,l=Xt.getAttributeBySemantic(t,Yr.TRANSLATION),u=Xt.getAttributeBySemantic(t,Yr.SCALE);if(c(u)&&(s.addDefine("HAS_INSTANCE_SCALE"),b5(e,u.buffer,u.byteOffset,u.byteStride,n,"Scale")),!c(l))return;let f,h=l.typedArray;if(c(h)?f=HVe(l,l.count,e):c(a.instancingTranslationMin)||(a.instancingTranslationMin=l.min,a.instancingTranslationMax=l.max),s.addDefine("HAS_INSTANCE_TRANSLATION"),b5(e,l.buffer,l.byteOffset,l.byteStride,n,"Translation"),!o&&!r)return;let p=ze(i);p.mode=J.COLUMBUS_VIEW,Lie(e,p);let _=a.instancingTranslationBuffer2D;if(!c(_)){let E=NVe(f,e,p,f),S=kVe(E);r&&(a.transformsTypedArray=S),_=T5(S,i),e.model._modelResources.push(_),a.instancingTranslationBuffer2D=_}if(!o)return;b5(e,_,0,void 0,n,"Translation2D")}function Iie(e,t,n,i){let r=j.getSizeInBytes(j.FLOAT),s=r*12,a=[{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:j.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:s,instanceDivisor:1},{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:j.FLOAT,normalize:!1,offsetInBytes:r*4,strideInBytes:s,instanceDivisor:1},{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:j.FLOAT,normalize:!1,offsetInBytes:r*8,strideInBytes:s,instanceDivisor:1}],l=e.shaderBuilder;l.addAttribute("vec4",`a_instancing${i}Row0`),l.addAttribute("vec4",`a_instancing${i}Row1`),l.addAttribute("vec4",`a_instancing${i}Row2`),n.push.apply(n,a)}function b5(e,t,n,i,o,r){o.push({index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:3,componentDatatype:j.FLOAT,normalize:!1,offsetInBytes:n,strideInBytes:i,instanceDivisor:1}),e.shaderBuilder.addAttribute("vec3",`a_instance${r}`)}function qVe(e,t,n,i){let o=n.attributes,r=e.shaderBuilder;for(let s=0;s<o.length;s++){let a=o[s];a.semantic===Yr.FEATURE_ID&&(a.setIndex>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=a.setIndex+1),i.push({index:e.attributeIndex++,vertexBuffer:a.buffer,componentsPerAttribute:tn.getNumberOfComponents(a.type),componentDatatype:a.componentDatatype,normalize:!1,offsetInBytes:a.byteOffset,strideInBytes:a.byteStride,instanceDivisor:1}),r.addAttribute("float",`a_instanceFeatureId_${a.setIndex}`))}}var uF=Oie;var C5={};C5.name="ModelMatrixUpdateStage";C5.update=function(e,t,n){let i=n.mode!==J.SCENE3D;if(!(i&&t._model._projectTo2D)&&e._transformDirty){let o=i?t._computedModelMatrix2D:t._computedModelMatrix;Fie(e,t,o,e.transformToRoot),e._transformDirty=!1}};function YVe(e,t,n){e.modelMatrix=N.multiplyTransformation(t,n,e.modelMatrix),e.cullFace=Xt.getCullFace(e.modelMatrix,e.primitiveType)}function Fie(e,t,n,i){let o;i=N.multiplyTransformation(i,e.transform,new N),e.updateComputedTransform();let r=e.runtimePrimitives.length;for(o=0;o<r;o++){let a=e.runtimePrimitives[o];YVe(a.drawCommand,n,i)}let s=e.children.length;for(o=0;o<s;o++){let a=t._runtimeNodes[e.children[o]];a._transformToRoot=N.clone(i,a._transformToRoot),Fie(a,t,n,i),a._transformDirty=!1}}var fF=C5;var Bie={name:"NodeStatisticsPipelineStage",_countInstancingAttributes:kie,_countGeneratedBuffers:Uie};Bie.process=function(e,t,n){let i=e.model.statistics,o=t.instances,r=e.runtimeNode;kie(i,o),Uie(i,r)};function kie(e,t){if(!c(t))return;let n=t.attributes,i=n.length;for(let o=0;o<i;o++){let r=n[o];c(r.buffer)&&e.addBuffer(r.buffer,!1)}}function Uie(e,t){c(t.instancingTransformsBuffer)&&e.addBuffer(t.instancingTransformsBuffer,!1),c(t.instancingTransformsBuffer2D)&&e.addBuffer(t.instancingTransformsBuffer2D,!1),c(t.instancingTranslationBuffer2D)&&e.addBuffer(t.instancingTranslationBuffer2D,!1)}var dF=Bie;function aC(e){e=g(e,g.EMPTY_OBJECT);let t=e.node,n=e.transform,i=e.transformToRoot,o=e.sceneGraph,r=e.children;C.typeOf.object("options.node",t),C.typeOf.object("options.transform",n),C.typeOf.object("options.transformToRoot",i),C.typeOf.object("options.sceneGraph",o),C.typeOf.object("options.children",r),this._node=t,this._name=t.name,this._id=t.index,this._sceneGraph=o,this._children=r,this._originalTransform=N.clone(n,this._originalTransform),this._transform=N.clone(n,this._transform),this._transformToRoot=N.clone(i,this._transformToRoot),this._computedTransform=new N,this._transformDirty=!1,this._transformParameters=void 0,this._morphWeights=[],this._runtimeSkin=void 0,this._computedJointMatrices=[],this.show=!0,this.userAnimated=!1,this.pipelineStages=[],this.runtimePrimitives=[],this.updateStages=[],this.instancingTranslationMin=void 0,this.instancingTranslationMax=void 0,this.instancingTransformsBuffer=void 0,this.instancingTransformsBuffer2D=void 0,this.instancingTranslationBuffer2D=void 0,this.instancingReferencePoint2D=void 0,XVe(this)}Object.defineProperties(aC.prototype,{node:{get:function(){return this._node}},sceneGraph:{get:function(){return this._sceneGraph}},children:{get:function(){return this._children}},transform:{get:function(){return this._transform},set:function(e){this._transformDirty=!0,this._transform=N.clone(e,this._transform)}},transformToRoot:{get:function(){return this._transformToRoot}},computedTransform:{get:function(){return this._computedTransform}},originalTransform:{get:function(){return this._originalTransform}},translation:{get:function(){return c(this._transformParameters)?this._transformParameters.translation:void 0},set:function(e){let t=this._transformParameters;if(!c(t))throw new w("The translation of a node cannot be set if it was defined using a matrix in the model.");let n=t.translation;d.equals(n,e)||(t.translation=d.clone(e,t.translation),E5(this,t))}},rotation:{get:function(){return c(this._transformParameters)?this._transformParameters.rotation:void 0},set:function(e){let t=this._transformParameters;if(!c(t))throw new w("The rotation of a node cannot be set if it was defined using a matrix in the model.");let n=t.rotation;ve.equals(n,e)||(t.rotation=ve.clone(e,t.rotation),E5(this,t))}},scale:{get:function(){return c(this._transformParameters)?this._transformParameters.scale:void 0},set:function(e){let t=this._transformParameters;if(!c(t))throw new w("The scale of a node cannot be set if it was defined using a matrix in the model.");let n=t.scale;d.equals(n,e)||(t.scale=d.clone(e,t.scale),E5(this,t))}},morphWeights:{get:function(){return this._morphWeights},set:function(e){let t=e.length;if(this._morphWeights.length!==t)throw new w("value must have the same length as the original weights array.");for(let n=0;n<t;n++)this._morphWeights[n]=e[n]}},runtimeSkin:{get:function(){return this._runtimeSkin}},computedJointMatrices:{get:function(){return this._computedJointMatrices}}});function XVe(e){let t=e.transform,n=e.transformToRoot,i=e._computedTransform;e._computedTransform=N.multiply(n,t,i);let o=e.node;c(o.matrix)||(e._transformParameters=new gb(o.translation,o.rotation,o.scale)),c(o.morphWeights)&&(e._morphWeights=o.morphWeights.slice());let r=o.articulationName;if(c(r)){let l=e.sceneGraph._runtimeArticulations[r];c(l)&&l.runtimeNodes.push(e)}}function E5(e,t){e._transformDirty=!0,e._transform=N.fromTranslationRotationScale(t,e._transform)}aC.prototype.getChild=function(e){if(C.typeOf.number("index",e),e<0||e>=this.children.length)throw new w("index must be greater than or equal to 0 and less than the number of children.");return this.sceneGraph._runtimeNodes[this.children[e]]};aC.prototype.configurePipeline=function(){let e=this.node,t=this.pipelineStages;t.length=0;let n=this.updateStages;n.length=0,c(e.instances)&&t.push(uF),t.push(dF),n.push(fF)};aC.prototype.updateComputedTransform=function(){this._computedTransform=N.multiply(this._transformToRoot,this._transform,this._computedTransform)};aC.prototype.updateJointMatrices=function(){let e=this._runtimeSkin;if(!c(e))return;e.updateJointMatrices();let t=this._computedJointMatrices,n=e.jointMatrices,i=n.length;for(let o=0;o<i;o++){c(t[o])||(t[o]=new N);let r=N.multiplyTransformation(this.transformToRoot,this.transform,t[o]),s=N.inverseTransformation(r,t[o]);t[o]=N.multiplyTransformation(s,n[o],t[o])}};var hF=aC;var zie={name:"AlphaPipelineStage"};zie.process=function(e,t,n){let i=e.alphaOptions,o=e.model;i.pass=g(i.pass,o.opaquePass);let r=e.renderStateOptions;i.pass===xe.TRANSLUCENT&&(r.cull.enabled=!1,r.depthMask=!1,r.blending=cn.ALPHA_BLEND);let s=e.shaderBuilder,a=e.uniformMap;c(i.alphaCutoff)&&(s.addDefine("ALPHA_MODE_MASK",void 0,ce.FRAGMENT),s.addUniform("float","u_alphaCutoff",ce.FRAGMENT),a.u_alphaCutoff=function(){return i.alphaCutoff})};var mF=zie;var Vie={name:"BatchTexturePipelineStage"};Vie.process=function(e,t,n){let i=e.shaderBuilder,o={},r=e.model,s=r.featureTables[r.featureTableId],a=s.featuresLength;i.addUniform("int","model_featuresLength"),o.model_featuresLength=function(){return a};let l=s.batchTexture;i.addUniform("sampler2D","model_batchTexture"),o.model_batchTexture=function(){return g(l.batchTexture,l.defaultTexture)},i.addUniform("vec4","model_textureStep"),o.model_textureStep=function(){return l.textureStep},l.textureDimensions.y>1&&(i.addDefine("MULTILINE_BATCH_TEXTURE"),i.addUniform("vec2","model_textureDimensions"),o.model_textureDimensions=function(){return l.textureDimensions}),e.uniformMap=bt(o,e.uniformMap)};var pF=Vie;var Hie={name:"ClassificationPipelineStage"};Hie.process=function(e,t,n){e.shaderBuilder.addDefine("HAS_CLASSIFICATION",void 0,ce.BOTH);let o=e.runtimePrimitive;c(o.batchLengths)||KVe(t,o)};function KVe(e,t){let n=Xt.getAttributeBySemantic(e,Tt.POSITION);if(!c(n))throw new ie("Primitives must have a position attribute to be used for classification.");let i,o=e.indices,r=c(o);r&&(i=o.typedArray,o.typedArray=void 0);let s=r?o.count:n.count,a=Xt.getAttributeBySemantic(e,Tt.FEATURE_ID,0);if(!c(a)){t.batchLengths=[s],t.batchOffsets=[0];return}let l=a.typedArray;a.typedArray=void 0;let u=[],f=[0],h=r?i[0]:0,m=l[h],p=0;for(let b=1;b<s;b++){let x=r?i[b]:b,T=l[x];if(T!==m){let E=b-p,S=b;u.push(E),f.push(S),p=S,m=T}}let _=s-p;u.push(_),t.batchLengths=u,t.batchOffsets=f}var _F=Hie;var gF=`void filterByPassType(inout vec3 positionMC, vec4 featureColor)
| {
| bool styleTranslucent = (featureColor.a != 1.0);
| // Only render translucent features in the translucent pass (if the style or the original command has translucency).
| if (czm_pass == czm_passTranslucent && !styleTranslucent && !model_commandTranslucent)
| {
| // If the model has a translucent silhouette, it needs to render during the silhouette color command,
| // (i.e. the command where model_silhouettePass = true), even if the model isn't translucent.
| #ifdef HAS_SILHOUETTE
| positionMC *= float(model_silhouettePass);
| #else
| positionMC *= 0.0;
| #endif
| }
| // If the current pass is not the translucent pass and the style is not translucent, don't render the feature.
| else if (czm_pass != czm_passTranslucent && styleTranslucent)
| {
| positionMC *= 0.0;
| }
| }
|
| void cpuStylingStage(inout vec3 positionMC, inout SelectedFeature feature)
| {
| float show = ceil(feature.color.a);
| positionMC *= show;
|
| #if defined(HAS_SELECTED_FEATURE_ID_ATTRIBUTE) && !defined(HAS_CLASSIFICATION)
| filterByPassType(positionMC, feature.color);
| #endif
| }
| `;var yF=`void filterByPassType(vec4 featureColor)
| {
| bool styleTranslucent = (featureColor.a != 1.0);
| // Only render translucent features in the translucent pass (if the style or the original command has translucency).
| if (czm_pass == czm_passTranslucent && !styleTranslucent && !model_commandTranslucent)
| {
| // If the model has a translucent silhouette, it needs to render during the silhouette color command,
| // (i.e. the command where model_silhouettePass = true), even if the model isn't translucent.
| #ifdef HAS_SILHOUETTE
| if(!model_silhouettePass) {
| discard;
| }
| #else
| discard;
| #endif
| }
| // If the current pass is not the translucent pass and the style is not translucent, don't render the feature.
| else if (czm_pass != czm_passTranslucent && styleTranslucent)
| {
| discard;
| }
| }
|
| void cpuStylingStage(inout czm_modelMaterial material, SelectedFeature feature)
| {
| vec4 featureColor = feature.color;
| if (featureColor.a == 0.0)
| {
| discard;
| }
|
| // If a feature ID vertex attribute is used, the pass type filter is applied in the vertex shader.
| // So, we only apply in in the fragment shader if the feature ID texture is used.
| #if defined(HAS_SELECTED_FEATURE_ID_TEXTURE) && !defined(HAS_CLASSIFICATION)
| filterByPassType(featureColor);
| #endif
|
| featureColor = czm_gammaCorrect(featureColor);
|
| // Classification models compute the diffuse differently.
| #ifdef HAS_CLASSIFICATION
| material.diffuse = featureColor.rgb * featureColor.a;
| #else
| float highlight = ceil(model_colorBlend);
| material.diffuse *= mix(featureColor.rgb, vec3(1.0), highlight);
| #endif
|
| material.alpha *= featureColor.a;
| }
| `;var Gie={name:"CPUStylingPipelineStage"};Gie.process=function(e,t,n){let i=e.model,o=e.shaderBuilder;o.addVertexLines(gF),o.addFragmentLines(yF),o.addDefine("USE_CPU_STYLING",void 0,ce.BOTH),c(i.color)||(o.addUniform("float",kb.COLOR_BLEND_UNIFORM_NAME,ce.FRAGMENT),e.uniformMap[kb.COLOR_BLEND_UNIFORM_NAME]=function(){return _c.getColorBlend(i.colorBlendMode,i.colorBlendAmount)}),o.addUniform("bool","model_commandTranslucent",ce.BOTH),e.uniformMap.model_commandTranslucent=function(){return e.alphaOptions.pass===xe.TRANSLUCENT}};var bF=Gie;var jie={MODIFY_MATERIAL:"MODIFY_MATERIAL",REPLACE_MATERIAL:"REPLACE_MATERIAL"};jie.getDefineName=function(e){return`CUSTOM_SHADER_${e}`};var dg=Object.freeze(jie);var xF=`void customShaderStage(
| inout czm_modelVertexOutput vsOutput,
| inout ProcessedAttributes attributes,
| FeatureIds featureIds,
| Metadata metadata,
| MetadataClass metadataClass,
| MetadataStatistics metadataStatistics
| ) {
| // VertexInput and initializeInputStruct() are dynamically generated in JS,
| // see CustomShaderPipelineStage.js
| VertexInput vsInput;
| initializeInputStruct(vsInput, attributes);
| vsInput.featureIds = featureIds;
| vsInput.metadata = metadata;
| vsInput.metadataClass = metadataClass;
| vsInput.metadataStatistics = metadataStatistics;
| vertexMain(vsInput, vsOutput);
| attributes.positionMC = vsOutput.positionMC;
| }
| `;var TF=`void customShaderStage(
| inout czm_modelMaterial material,
| ProcessedAttributes attributes,
| FeatureIds featureIds,
| Metadata metadata,
| MetadataClass metadataClass,
| MetadataStatistics metadataStatistics
| ) {
| // FragmentInput and initializeInputStruct() are dynamically generated in JS,
| // see CustomShaderPipelineStage.js
| FragmentInput fsInput;
| initializeInputStruct(fsInput, attributes);
| fsInput.featureIds = featureIds;
| fsInput.metadata = metadata;
| fsInput.metadataClass = metadataClass;
| fsInput.metadataStatistics = metadataStatistics;
| fragmentMain(fsInput, material);
| }
| `;var CF=`void featureIdStage(out FeatureIds featureIds, ProcessedAttributes attributes) {
| initializeFeatureIds(featureIds, attributes);
| initializeFeatureIdAliases(featureIds);
| }
| `;var EF=`void featureIdStage(out FeatureIds featureIds, ProcessedAttributes attributes)
| {
| initializeFeatureIds(featureIds, attributes);
| initializeFeatureIdAliases(featureIds);
| setFeatureIdVaryings();
| }
| `;var vi={name:"FeatureIdPipelineStage",STRUCT_ID_FEATURE_IDS_VS:"FeatureIdsVS",STRUCT_ID_FEATURE_IDS_FS:"FeatureIdsFS",STRUCT_NAME_FEATURE_IDS:"FeatureIds",FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS:"initializeFeatureIdsVS",FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS:"initializeFeatureIdsFS",FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS:"initializeFeatureIdAliasesVS",FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS:"initializeFeatureIdAliasesFS",FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS:"void initializeFeatureIds(out FeatureIds featureIds, ProcessedAttributes attributes)",FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES:"void initializeFeatureIdAliases(inout FeatureIds featureIds)",FUNCTION_ID_SET_FEATURE_ID_VARYINGS:"setFeatureIdVaryings",FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS:"void setFeatureIdVaryings()"};vi.process=function(e,t,n){let i=e.shaderBuilder;$Ve(i);let o=e.runtimeNode.node.instances;c(o)&&ZVe(e,o,n),JVe(e,t,n),i.addVertexLines(EF),i.addFragmentLines(CF)};function $Ve(e){e.addStruct(vi.STRUCT_ID_FEATURE_IDS_VS,vi.STRUCT_NAME_FEATURE_IDS,ce.VERTEX),e.addStruct(vi.STRUCT_ID_FEATURE_IDS_FS,vi.STRUCT_NAME_FEATURE_IDS,ce.FRAGMENT),e.addFunction(vi.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,vi.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,ce.VERTEX),e.addFunction(vi.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,vi.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,ce.FRAGMENT),e.addFunction(vi.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS,vi.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES,ce.VERTEX),e.addFunction(vi.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS,vi.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES,ce.FRAGMENT),e.addFunction(vi.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,vi.FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS,ce.VERTEX)}function ZVe(e,t,n){let i=t.featureIds,o=t.attributes[0].count;for(let r=0;r<i.length;r++){let s=i[r],a=s.positionalLabel;s instanceof bn.FeatureIdAttribute?QVe(e,s,a):Wie(e,s,a,o,1,n);let l=s.label;c(l)&&qie(e,a,l,ce.BOTH)}}function JVe(e,t,n){let i=t.featureIds,r=Xt.getAttributeBySemantic(t,Tt.POSITION).count;for(let s=0;s<i.length;s++){let a=i[s],l=a.positionalLabel,u=ce.BOTH;a instanceof bn.FeatureIdAttribute?eHe(e,a,l):a instanceof bn.FeatureIdImplicitRange?Wie(e,a,l,r,void 0,n):(tHe(e,a,l,s,n),u=ce.FRAGMENT);let f=a.label;c(f)&&qie(e,l,f,u)}}function QVe(e,t,n){let i=e.shaderBuilder;i.addStructField(vi.STRUCT_ID_FEATURE_IDS_VS,"int",n),i.addStructField(vi.STRUCT_ID_FEATURE_IDS_FS,"int",n);let o=t.setIndex,r=n.replace(/_\d+$/,"_"),s=`a_${r}${o}`,a=`v_${r}${o}`,l=`featureIds.${n} = int(czm_round(${s}));`,u=`featureIds.${n} = int(czm_round(${a}));`;i.addFunctionLines(vi.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,[l]),i.addFunctionLines(vi.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[u]),i.addVarying("float",a),i.addFunctionLines(vi.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,[`${a} = ${s};`])}function eHe(e,t,n){let i=e.shaderBuilder;i.addStructField(vi.STRUCT_ID_FEATURE_IDS_VS,"int",n),i.addStructField(vi.STRUCT_ID_FEATURE_IDS_FS,"int",n);let o=t.setIndex,r=n.replace(/_\d+$/,"_"),s=[`featureIds.${n} = int(czm_round(attributes.${r}${o}));`];i.addFunctionLines(vi.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,s),i.addFunctionLines(vi.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,s)}function Wie(e,t,n,i,o,r){nHe(e,t,i,o,r);let s=e.shaderBuilder,a=`a_implicit_${n}`;s.addAttribute("float",a);let l=`v_implicit_${n}`;s.addVarying("float",l),s.addStructField(vi.STRUCT_ID_FEATURE_IDS_VS,"int",n),s.addStructField(vi.STRUCT_ID_FEATURE_IDS_FS,"int",n),s.addFunctionLines(vi.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,[`${l} = ${a};`]),s.addFunctionLines(vi.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,[`featureIds.${n} = int(czm_round(${a}));`]),s.addFunctionLines(vi.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[`featureIds.${n} = int(czm_round(${l}));`])}function tHe(e,t,n,i,o){let r=`u_featureIdTexture_${i}`,s=e.uniformMap,a=t.textureReader;s[r]=function(){return g(a.texture,o.context.defaultTexture)};let l=a.channels,u=e.shaderBuilder;u.addStructField(vi.STRUCT_ID_FEATURE_IDS_FS,"int",n),u.addUniform("sampler2D",r,ce.FRAGMENT);let h=`v_texCoord_${a.texCoord}`,m=h,p=a.transform;if(c(p)&&!q.equals(p,q.IDENTITY)){let x=`${r}Transform`;u.addUniform("mat3",x,ce.FRAGMENT),s[x]=function(){return p},m=`vec2(${x} * vec3(${h}, 1.0))`}let _=`texture(${r}, ${m}).${l}`,b=`featureIds.${n} = czm_unpackUint(${_});`;u.addFunctionLines(vi.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[b])}function qie(e,t,n,i){let o=e.shaderBuilder,r=ce.includesVertexShader(i);r&&o.addStructField(vi.STRUCT_ID_FEATURE_IDS_VS,"int",n),o.addStructField(vi.STRUCT_ID_FEATURE_IDS_FS,"int",n);let s=[`featureIds.${n} = featureIds.${t};`];r&&o.addFunctionLines(vi.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS,s),o.addFunctionLines(vi.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS,s)}function nHe(e,t,n,i,o){let r=e.model,s,a;if(c(t.repeat)){let u=iHe(t,n);s=yt.createVertexBuffer({context:o.context,typedArray:u,usage:Pe.STATIC_DRAW}),s.vertexArrayDestroyable=!1,r._pipelineResources.push(s),r.statistics.addBuffer(s,!1)}else a=[t.offset];let l={index:e.attributeIndex++,instanceDivisor:i,value:a,vertexBuffer:s,normalize:!1,componentsPerAttribute:1,componentDatatype:j.FLOAT,strideInBytes:j.getSizeInBytes(j.FLOAT),offsetInBytes:0};e.attributes.push(l)}function iHe(e,t){let n=e.offset,i=e.repeat,o=new Float32Array(t);for(let r=0;r<t;r++)o[r]=n+Math.floor(r/i);return o}var Ub=vi;var wF=`void metadataStage(
| out Metadata metadata,
| out MetadataClass metadataClass,
| out MetadataStatistics metadataStatistics,
| ProcessedAttributes attributes
| )
| {
| initializeMetadata(metadata, metadataClass, metadataStatistics, attributes);
| }
| `;var SF=`void metadataStage(
| out Metadata metadata,
| out MetadataClass metadataClass,
| out MetadataStatistics metadataStatistics,
| ProcessedAttributes attributes
| )
| {
| initializeMetadata(metadata, metadataClass, metadataStatistics, attributes);
| setMetadataVaryings();
| }
| `;var gi={name:"MetadataPipelineStage",STRUCT_ID_METADATA_VS:"MetadataVS",STRUCT_ID_METADATA_FS:"MetadataFS",STRUCT_NAME_METADATA:"Metadata",STRUCT_ID_METADATA_CLASS_VS:"MetadataClassVS",STRUCT_ID_METADATA_CLASS_FS:"MetadataClassFS",STRUCT_NAME_METADATA_CLASS:"MetadataClass",STRUCT_ID_METADATA_STATISTICS_VS:"MetadataStatisticsVS",STRUCT_ID_METADATA_STATISTICS_FS:"MetadataStatisticsFS",STRUCT_NAME_METADATA_STATISTICS:"MetadataStatistics",FUNCTION_ID_INITIALIZE_METADATA_VS:"initializeMetadataVS",FUNCTION_ID_INITIALIZE_METADATA_FS:"initializeMetadataFS",FUNCTION_SIGNATURE_INITIALIZE_METADATA:"void initializeMetadata(out Metadata metadata, out MetadataClass metadataClass, out MetadataStatistics metadataStatistics, ProcessedAttributes attributes)",FUNCTION_ID_SET_METADATA_VARYINGS:"setMetadataVaryings",FUNCTION_SIGNATURE_SET_METADATA_VARYINGS:"void setMetadataVaryings()",METADATA_CLASS_FIELDS:[{specName:"noData",shaderName:"noData"},{specName:"default",shaderName:"defaultValue"},{specName:"min",shaderName:"minValue"},{specName:"max",shaderName:"maxValue"}],METADATA_STATISTICS_FIELDS:[{specName:"min",shaderName:"minValue"},{specName:"max",shaderName:"maxValue"},{specName:"mean",shaderName:"mean",type:"float"},{specName:"median",shaderName:"median"},{specName:"standardDeviation",shaderName:"standardDeviation",type:"float"},{specName:"variance",shaderName:"variance",type:"float"},{specName:"sum",shaderName:"sum"}]};gi.process=function(e,t,n){var h;let{shaderBuilder:i,model:o}=e,{structuralMetadata:r={},content:s}=o,a=(h=s==null?void 0:s.tileset.metadataExtension)==null?void 0:h.statistics,l=oHe(r.propertyAttributes,t,a),u=sHe(r.propertyTextures,a),f=l.concat(u);cHe(i,f),fHe(i),i.addVertexLines(SF),i.addFragmentLines(wF);for(let m=0;m<l.length;m++){let p=l[m];dHe(e,p)}for(let m=0;m<u.length;m++){let p=u[m];mHe(e,p)}};function oHe(e,t,n){return c(e)?e.flatMap(i=>rHe(i,t,n)):[]}function rHe(e,t,n){let{getAttributeByName:i,getAttributeInfo:o,sanitizeGlslIdentifier:r}=Xt,s=e.class.id,a=n==null?void 0:n.classes[s],l=Object.entries(e.properties),u=new Array(l.length);for(let f=0;f<l.length;f++){let[h,m]=l[f],p=i(t,m.attribute),{glslType:_,variableName:b}=o(p);u[f]={metadataVariable:r(h),property:m,type:m.classProperty.type,glslType:_,variableName:b,propertyStatistics:a==null?void 0:a.properties[h],shaderDestination:ce.BOTH}}return u}function sHe(e,t){return c(e)?e.flatMap(n=>aHe(n,t)):[]}function aHe(e,t){let{sanitizeGlslIdentifier:n}=Xt,i=e.class.id,o=t==null?void 0:t.classes[i],r=Object.entries(e.properties).filter(([a,l])=>l.isGpuCompatible()),s=new Array(r.length);for(let a=0;a<r.length;a++){let[l,u]=r[a];s[a]={metadataVariable:n(l),property:u,type:u.classProperty.type,glslType:u.getGlslType(),propertyStatistics:o==null?void 0:o.properties[l],shaderDestination:ce.FRAGMENT}}return s}function cHe(e,t){let n=new Set,i=new Set;for(let a=0;a<t.length;a++){let{type:l,glslType:u,propertyStatistics:f}=t[a];n.add(u),c(f)&&l!==Ct.ENUM&&i.add(u)}let o=gi.METADATA_CLASS_FIELDS;for(let a of n){let l=`${a}MetadataClass`;s(l,a,o)}let r=gi.METADATA_STATISTICS_FIELDS;for(let a of i){let l=`${a}MetadataStatistics`;s(l,a,r)}function s(a,l,u){e.addStruct(a,a,ce.BOTH);for(let f=0;f<u.length;f++){let{shaderName:h}=u[f],m=u[f].type==="float"?uHe(l):l;e.addStructField(a,m,h)}}}var lHe={int:"float",ivec2:"vec2",ivec3:"vec3",ivec4:"vec4"};function uHe(e){let t=lHe[e];return c(t)?t:e}function fHe(e){e.addStruct(gi.STRUCT_ID_METADATA_VS,gi.STRUCT_NAME_METADATA,ce.VERTEX),e.addStruct(gi.STRUCT_ID_METADATA_FS,gi.STRUCT_NAME_METADATA,ce.FRAGMENT),e.addStruct(gi.STRUCT_ID_METADATA_CLASS_VS,gi.STRUCT_NAME_METADATA_CLASS,ce.VERTEX),e.addStruct(gi.STRUCT_ID_METADATA_CLASS_FS,gi.STRUCT_NAME_METADATA_CLASS,ce.FRAGMENT),e.addStruct(gi.STRUCT_ID_METADATA_STATISTICS_VS,gi.STRUCT_NAME_METADATA_STATISTICS,ce.VERTEX),e.addStruct(gi.STRUCT_ID_METADATA_STATISTICS_FS,gi.STRUCT_NAME_METADATA_STATISTICS,ce.FRAGMENT),e.addFunction(gi.FUNCTION_ID_INITIALIZE_METADATA_VS,gi.FUNCTION_SIGNATURE_INITIALIZE_METADATA,ce.VERTEX),e.addFunction(gi.FUNCTION_ID_INITIALIZE_METADATA_FS,gi.FUNCTION_SIGNATURE_INITIALIZE_METADATA,ce.FRAGMENT),e.addFunction(gi.FUNCTION_ID_SET_METADATA_VARYINGS,gi.FUNCTION_SIGNATURE_SET_METADATA_VARYINGS,ce.VERTEX)}function dHe(e,t){hHe(e,t),Yie(e.shaderBuilder,t),Xie(e.shaderBuilder,t)}function hHe(e,t){let{shaderBuilder:n}=e,{metadataVariable:i,property:o,glslType:r}=t,s=$ie({valueExpression:`attributes.${t.variableName}`,renderResources:e,glslType:r,metadataVariable:i,shaderDestination:ce.BOTH,property:o});n.addStructField(gi.STRUCT_ID_METADATA_VS,r,i),n.addStructField(gi.STRUCT_ID_METADATA_FS,r,i);let a=`metadata.${i} = ${s};`;n.addFunctionLines(gi.FUNCTION_ID_INITIALIZE_METADATA_VS,[a]),n.addFunctionLines(gi.FUNCTION_ID_INITIALIZE_METADATA_FS,[a])}function mHe(e,t){pHe(e,t),Yie(e.shaderBuilder,t),Xie(e.shaderBuilder,t)}function pHe(e,t){let{shaderBuilder:n,uniformMap:i}=e,{metadataVariable:o,glslType:r,property:s}=t,{texCoord:a,channels:l,index:u,texture:f,transform:h}=s.textureReader,m=`u_propertyTexture_${u}`;i.hasOwnProperty(m)||(n.addUniform("sampler2D",m,ce.FRAGMENT),i[m]=()=>f),n.addStructField(gi.STRUCT_ID_METADATA_FS,r,o);let p=`attributes.texCoord_${a}`,_=p;if(c(h)&&!q.equals(h,q.IDENTITY)){let S=`${m}Transform`;n.addUniform("mat3",S,ce.FRAGMENT),i[S]=function(){return h},_=`vec2(${S} * vec3(${p}, 1.0))`}let b=`texture(${m}, ${_}).${l}`,x=s.unpackInShader(b),T=$ie({valueExpression:x,renderResources:e,glslType:r,metadataVariable:o,shaderDestination:ce.FRAGMENT,property:s}),E=`metadata.${o} = ${T};`;n.addFunctionLines(gi.FUNCTION_ID_INITIALIZE_METADATA_FS,[E])}function Yie(e,t){let{classProperty:n}=t.property,{metadataVariable:i,glslType:o,shaderDestination:r}=t,s=Kie(gi.METADATA_CLASS_FIELDS,n,`metadataClass.${i}`,o),a=`${o}MetadataClass`;e.addStructField(gi.STRUCT_ID_METADATA_CLASS_FS,a,i),e.addFunctionLines(gi.FUNCTION_ID_INITIALIZE_METADATA_FS,s),ce.includesVertexShader(r)&&(e.addStructField(gi.STRUCT_ID_METADATA_CLASS_VS,a,i),e.addFunctionLines(gi.FUNCTION_ID_INITIALIZE_METADATA_VS,s))}function Xie(e,t){let{propertyStatistics:n}=t;if(!c(n))return;let{metadataVariable:i,type:o,glslType:r}=t;if(o===Ct.ENUM)return;let s=gi.METADATA_STATISTICS_FIELDS,a=`metadataStatistics.${i}`,l=Kie(s,n,a,r),u=`${r}MetadataStatistics`;e.addStructField(gi.STRUCT_ID_METADATA_STATISTICS_FS,u,i),e.addFunctionLines(gi.FUNCTION_ID_INITIALIZE_METADATA_FS,l),ce.includesVertexShader(t.shaderDestination)&&(e.addStructField(gi.STRUCT_ID_METADATA_STATISTICS_VS,u,i),e.addFunctionLines(gi.FUNCTION_ID_INITIALIZE_METADATA_VS,l))}function Kie(e,t,n,i){function o(r){let s=t[r.specName];if(c(s))return`${n}.${r.shaderName} = ${i}(${s});`}return c(t)?e.map(o).filter(c):[]}function $ie(e){let{valueExpression:t,property:n}=e;if(!n.hasValueTransform)return t;let i=e.metadataVariable,o=`u_${i}_offset`,r=`u_${i}_scale`,{shaderBuilder:s,uniformMap:a}=e.renderResources,{glslType:l,shaderDestination:u}=e;s.addUniform(l,o,u),s.addUniform(l,r,u);let{offset:f,scale:h}=n;return a[o]=()=>f,a[r]=()=>h,`czm_valueTransform(${o}, ${r}, ${t})`}var Zf=gi;var _He={INHERIT:0,OPAQUE:1,TRANSLUCENT:2},zb=Object.freeze(_He);var Hs={name:"CustomShaderPipelineStage",STRUCT_ID_ATTRIBUTES_VS:"AttributesVS",STRUCT_ID_ATTRIBUTES_FS:"AttributesFS",STRUCT_NAME_ATTRIBUTES:"Attributes",STRUCT_ID_VERTEX_INPUT:"VertexInput",STRUCT_NAME_VERTEX_INPUT:"VertexInput",STRUCT_ID_FRAGMENT_INPUT:"FragmentInput",STRUCT_NAME_FRAGMENT_INPUT:"FragmentInput",FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS:"initializeInputStructVS",FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS:"void initializeInputStruct(out VertexInput vsInput, ProcessedAttributes attributes)",FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS:"initializeInputStructFS",FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS:"void initializeInputStruct(out FragmentInput fsInput, ProcessedAttributes attributes)",_oneTimeWarning:mt};Hs.process=function(e,t,n){let{shaderBuilder:i,model:o,alphaOptions:r}=e,{customShader:s}=o,{lightingModel:a,translucencyMode:l}=s;c(a)&&(e.lightingOptions.lightingModel=a),l===zb.TRANSLUCENT?r.pass=xe.TRANSLUCENT:l===zb.OPAQUE&&(r.pass=void 0);let u=wHe(s,t);if(!u.customShaderEnabled)return;if(DHe(i,s,u),u.shouldComputePositionWC&&i.addDefine("COMPUTE_POSITION_WC_CUSTOM_SHADER",void 0,ce.BOTH),c(s.vertexShaderText)&&i.addDefine("HAS_CUSTOM_VERTEX_SHADER",void 0,ce.VERTEX),c(s.fragmentShaderText)){i.addDefine("HAS_CUSTOM_FRAGMENT_SHADER",void 0,ce.FRAGMENT);let m=dg.getDefineName(s.mode);i.addDefine(m,void 0,ce.FRAGMENT)}let f=s.uniforms;for(let m in f)if(f.hasOwnProperty(m)){let p=f[m];i.addUniform(p.type,m)}let h=s.varyings;for(let m in h)if(h.hasOwnProperty(m)){let p=h[m];i.addVarying(p,m)}e.uniformMap=bt(e.uniformMap,s.uniformMap)};function gHe(e){let t={};for(let n=0;n<e.length;n++){let i=Xt.getAttributeInfo(e[n]);t[i.variableName]=i}return t}var yHe={position:"vec3",normal:"vec3",tangent:"vec3",bitangent:"vec3",texCoord:"vec2",color:"vec4",joints:"ivec4",weights:"vec4"},bHe={position:"vec3(0.0)",normal:"vec3(0.0, 0.0, 1.0)",tangent:"vec3(1.0, 0.0, 0.0)",bitangent:"vec3(0.0, 1.0, 0.0)",texCoord:"vec2(0.0)",color:"vec4(1.0)",joints:"ivec4(0)",weights:"vec4(0.0)"};function Zie(e){let t=e.replace(/_[0-9]+$/,"");t=t.replace(/(MC|EC)$/,"");let n=yHe[t],i=bHe[t];if(c(n))return{attributeField:[n,e],value:i}}function xHe(e,t){if(!c(e.vertexShaderText))return{enabled:!1};let n=e.usedVariablesVertex.attributeSet,i=Jie(t,n,!1),o=Qie(t,n,!1),r,s=[],a=[];for(let l in i){if(!i.hasOwnProperty(l))continue;let f=[i[l].glslType,l];s.push(f),r=`vsInput.attributes.${l} = attributes.${l};`,a.push(r)}for(let l=0;l<o.length;l++){let u=o[l],f=Zie(u);if(!c(f))return Hs._oneTimeWarning("CustomShaderPipelineStage.incompatiblePrimitiveVS",`Primitive is missing attribute ${u}, disabling custom vertex shader`),{enabled:!1};s.push(f.attributeField),r=`vsInput.attributes.${u} = ${f.value};`,a.push(r)}return{enabled:!0,attributeFields:s,initializationLines:a}}function THe(e){let t=[],n=[],i=e.usedVariablesFragment.attributeSet;return i.hasOwnProperty("positionWC")&&(t.push(["vec3","positionWC"]),n.push("fsInput.attributes.positionWC = attributes.positionWC;")),i.hasOwnProperty("positionEC")&&(t.push(["vec3","positionEC"]),n.push("fsInput.attributes.positionEC = attributes.positionEC;")),{attributeFields:t,initializationLines:n}}function CHe(e,t){if(!c(e.fragmentShaderText))return{enabled:!1};let n=e.usedVariablesFragment.attributeSet,i=Jie(t,n,!0),o=Qie(t,n,!0),r,s=[],a=[];for(let u in i){if(!i.hasOwnProperty(u))continue;let h=[i[u].glslType,u];s.push(h),r=`fsInput.attributes.${u} = attributes.${u};`,a.push(r)}for(let u=0;u<o.length;u++){let f=o[u],h=Zie(f);if(!c(h))return Hs._oneTimeWarning("CustomShaderPipelineStage.incompatiblePrimitiveFS",`Primitive is missing attribute ${f}, disabling custom fragment shader.`),{enabled:!1};s.push(h.attributeField),r=`fsInput.attributes.${f} = ${h.value};`,a.push(r)}let l=THe(e);return{enabled:!0,attributeFields:s.concat(l.attributeFields),initializationLines:l.initializationLines.concat(a)}}var EHe={positionWC:!0,positionEC:!0};function Jie(e,t,n){let i={};for(let o in e){if(!e.hasOwnProperty(o))continue;let r=e[o],s=o;n&&o==="normalMC"?s="normalEC":n&&o==="tangentMC"&&(s="tangentEC",r.glslType="vec3"),t.hasOwnProperty(s)&&(i[s]=r)}return i}function Qie(e,t,n){let i=[];for(let o in t){if(!t.hasOwnProperty(o)||EHe.hasOwnProperty(o))continue;let r=o;n&&o==="normalEC"?r="normalMC":n&&o==="tangentEC"&&(r="tangentMC"),e.hasOwnProperty(r)||i.push(o)}return i}function wHe(e,t){let n=gHe(t.attributes),i=xHe(e,n),o=CHe(e,n),s=e.usedVariablesFragment.attributeSet.hasOwnProperty("positionWC")&&o.enabled;return{vertexLines:i,fragmentLines:o,customShaderEnabled:i.enabled||o.enabled,shouldComputePositionWC:s}}function SHe(e,t){let n=Hs.STRUCT_ID_ATTRIBUTES_VS;e.addStruct(n,Hs.STRUCT_NAME_ATTRIBUTES,ce.VERTEX);let{attributeFields:i,initializationLines:o}=t;for(let s=0;s<i.length;s++){let[a,l]=i[s];e.addStructField(n,a,l)}n=Hs.STRUCT_ID_VERTEX_INPUT,e.addStruct(n,Hs.STRUCT_NAME_VERTEX_INPUT,ce.VERTEX),e.addStructField(n,Hs.STRUCT_NAME_ATTRIBUTES,"attributes"),e.addStructField(n,Ub.STRUCT_NAME_FEATURE_IDS,"featureIds"),e.addStructField(n,Zf.STRUCT_NAME_METADATA,"metadata"),e.addStructField(n,Zf.STRUCT_NAME_METADATA_CLASS,"metadataClass"),e.addStructField(n,Zf.STRUCT_NAME_METADATA_STATISTICS,"metadataStatistics");let r=Hs.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS;e.addFunction(r,Hs.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS,ce.VERTEX),e.addFunctionLines(r,o)}function AHe(e,t){let n=Hs.STRUCT_ID_ATTRIBUTES_FS;e.addStruct(n,Hs.STRUCT_NAME_ATTRIBUTES,ce.FRAGMENT);let{attributeFields:i,initializationLines:o}=t;for(let s=0;s<i.length;s++){let[a,l]=i[s];e.addStructField(n,a,l)}n=Hs.STRUCT_ID_FRAGMENT_INPUT,e.addStruct(n,Hs.STRUCT_NAME_FRAGMENT_INPUT,ce.FRAGMENT),e.addStructField(n,Hs.STRUCT_NAME_ATTRIBUTES,"attributes"),e.addStructField(n,Ub.STRUCT_NAME_FEATURE_IDS,"featureIds"),e.addStructField(n,Zf.STRUCT_NAME_METADATA,"metadata"),e.addStructField(n,Zf.STRUCT_NAME_METADATA_CLASS,"metadataClass"),e.addStructField(n,Zf.STRUCT_NAME_METADATA_STATISTICS,"metadataStatistics");let r=Hs.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS;e.addFunction(r,Hs.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS,ce.FRAGMENT),e.addFunctionLines(r,o)}var vHe=[];function DHe(e,t,n){let{vertexLines:i,fragmentLines:o}=n,r=vHe;i.enabled&&(SHe(e,i),r.length=0,r.push("#line 0",t.vertexShaderText,xF),e.addVertexLines(r)),o.enabled&&(AHe(e,o),r.length=0,r.push("#line 0",t.fragmentShaderText,TF),e.addFragmentLines(r))}var AF=Hs;var UA={name:"DequantizationPipelineStage",FUNCTION_ID_DEQUANTIZATION_STAGE_VS:"dequantizationStage",FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS:"void dequantizationStage(inout ProcessedAttributes attributes)"};UA.process=function(e,t,n){let i=e.shaderBuilder,o=e.model,r=c(o.classificationType);i.addDefine("USE_DEQUANTIZATION",void 0,ce.VERTEX),i.addFunction(UA.FUNCTION_ID_DEQUANTIZATION_STAGE_VS,UA.FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS,ce.VERTEX);let s=t.attributes;for(let a=0;a<s.length;a++){let l=s[a],u=l.quantization;if(!c(u))continue;let f=l.semantic===Tt.POSITION,h=l.semantic===Tt.TEXCOORD;if(r&&!f&&!h)continue;let m=Xt.getAttributeInfo(l);OHe(i,m),IHe(e,m)}};function IHe(e,t){let n=e.shaderBuilder,i=e.uniformMap,o=t.variableName,r=t.attribute.quantization;if(r.octEncoded){let s=`model_normalizationRange_${o}`;n.addUniform("float",s,ce.VERTEX),i[s]=function(){return r.normalizationRange}}else{let s=`model_quantizedVolumeOffset_${o}`,a=`model_quantizedVolumeStepSize_${o}`,l=t.glslType;n.addUniform(l,s,ce.VERTEX),n.addUniform(l,a,ce.VERTEX);let u=r.quantizedVolumeOffset,f=r.quantizedVolumeStepSize;/^color_\d+$/.test(o)&&(u=eoe(u,0),f=eoe(f,1)),i[s]=function(){return u},i[a]=function(){return f}}}function eoe(e,t){return e instanceof ee?e:new ee(e.x,e.y,e.z,t)}function OHe(e,t){let n=t.variableName,i=t.attribute.quantization,o;i.octEncoded?o=PHe(n,i):o=RHe(n),e.addFunctionLines(UA.FUNCTION_ID_DEQUANTIZATION_STAGE_VS,[o])}function PHe(e,t){let n=`attributes.${e}`,i=`a_quantized_${e}`,o=`model_normalizationRange_${e}`,r=t.octEncodedZXY?".zxy":".xyz";return`${n} = czm_octDecode(${i}, ${o})${r};`}function RHe(e){let t=`attributes.${e}`,n=`a_quantized_${e}`,i=`model_quantizedVolumeOffset_${e}`,o=`model_quantizedVolumeStepSize_${e}`;return`${t} = ${i} + ${n} * ${o};`}var vF=UA;var DF=`void geometryStage(out ProcessedAttributes attributes)
| {
| attributes.positionMC = v_positionMC;
| attributes.positionEC = v_positionEC;
|
| #if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE) || defined(COMPUTE_POSITION_WC_ATMOSPHERE)
| attributes.positionWC = v_positionWC;
| #endif
|
| #ifdef HAS_NORMALS
| // renormalize after interpolation
| attributes.normalEC = normalize(v_normalEC);
| #endif
|
| #ifdef HAS_TANGENTS
| attributes.tangentEC = normalize(v_tangentEC);
| #endif
|
| #ifdef HAS_BITANGENTS
| attributes.bitangentEC = normalize(v_bitangentEC);
| #endif
|
| // Everything else is dynamically generated in GeometryPipelineStage
| setDynamicVaryings(attributes);
| }
| `;var IF=`vec4 geometryStage(inout ProcessedAttributes attributes, mat4 modelView, mat3 normal)
| {
| vec4 computedPosition;
|
| // Compute positions in different coordinate systems
| vec3 positionMC = attributes.positionMC;
| v_positionMC = positionMC;
| v_positionEC = (modelView * vec4(positionMC, 1.0)).xyz;
|
| #if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)
| vec3 position2D = attributes.position2D;
| vec3 positionEC = (u_modelView2D * vec4(position2D, 1.0)).xyz;
| computedPosition = czm_projection * vec4(positionEC, 1.0);
| #else
| computedPosition = czm_projection * vec4(v_positionEC, 1.0);
| #endif
|
| // Sometimes the custom shader and/or style needs this
| #if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE) || defined(COMPUTE_POSITION_WC_ATMOSPHERE) || defined(ENABLE_CLIPPING_POLYGONS)
| // Note that this is a 32-bit position which may result in jitter on small
| // scales.
| v_positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;
| #endif
|
| #ifdef HAS_NORMALS
| v_normalEC = normalize(normal * attributes.normalMC);
| #endif
|
| #ifdef HAS_TANGENTS
| v_tangentEC = normalize(normal * attributes.tangentMC);
| #endif
|
| #ifdef HAS_BITANGENTS
| v_bitangentEC = normalize(normal * attributes.bitangentMC);
| #endif
|
| // All other varyings need to be dynamically generated in
| // GeometryPipelineStage
| setDynamicVaryings(attributes);
|
| return computedPosition;
| }
| `;var zA=`vec2 computeSt(float featureId)
| {
| float stepX = model_textureStep.x;
| float centerX = model_textureStep.y;
|
| #ifdef MULTILINE_BATCH_TEXTURE
| float stepY = model_textureStep.z;
| float centerY = model_textureStep.w;
|
| float xId = mod(featureId, model_textureDimensions.x);
| float yId = floor(featureId / model_textureDimensions.x);
|
| return vec2(centerX + (xId * stepX), centerY + (yId * stepY));
| #else
| return vec2(centerX + (featureId * stepX), 0.5);
| #endif
| }
|
| void selectedFeatureIdStage(out SelectedFeature feature, FeatureIds featureIds)
| {
| int featureId = featureIds.SELECTED_FEATURE_ID;
|
|
| if (featureId < model_featuresLength)
| {
| vec2 featureSt = computeSt(float(featureId));
|
| feature.id = featureId;
| feature.st = featureSt;
| feature.color = texture(model_batchTexture, featureSt);
| }
| // Floating point comparisons can be unreliable in GLSL, so we
| // increment the feature ID to make sure it's always greater
| // then the model_featuresLength - a condition we check for in the
| // pick ID, to avoid sampling the pick texture if the feature ID is
| // greater than the number of features.
| else
| {
| feature.id = model_featuresLength + 1;
| feature.st = vec2(0.0);
| feature.color = vec4(1.0);
| }
|
| #ifdef HAS_NULL_FEATURE_ID
| if (featureId == model_nullFeatureId) {
| feature.id = featureId;
| feature.st = vec2(0.0);
| feature.color = vec4(1.0);
| }
| #endif
| }
| `;var VA={name:"SelectedFeatureIdPipelineStage",STRUCT_ID_SELECTED_FEATURE:"SelectedFeature",STRUCT_NAME_SELECTED_FEATURE:"SelectedFeature"};VA.process=function(e,t,n){let i=e.shaderBuilder;e.hasPropertyTable=!0;let o=e.model,r=e.runtimeNode.node,s=MHe(o,r,t),a=s.shaderDestination;i.addDefine("HAS_SELECTED_FEATURE_ID",void 0,a),i.addDefine("SELECTED_FEATURE_ID",s.variableName,a),i.addDefine(s.featureIdDefine,void 0,a),LHe(i);let l=s.featureIds.nullFeatureId,u=e.uniformMap;c(l)&&(i.addDefine("HAS_NULL_FEATURE_ID",void 0,a),i.addUniform("int","model_nullFeatureId",a),u.model_nullFeatureId=function(){return l}),s.shaderDestination===ce.BOTH&&i.addVertexLines(zA),i.addFragmentLines(zA)};function toe(e){return e instanceof bn.FeatureIdTexture?"HAS_SELECTED_FEATURE_ID_TEXTURE":"HAS_SELECTED_FEATURE_ID_ATTRIBUTE"}function noe(e){return e instanceof bn.FeatureIdTexture?ce.FRAGMENT:ce.BOTH}function MHe(e,t,n){let i,o;return c(t.instances)&&(o=Xt.getFeatureIdsByLabel(t.instances.featureIds,e.instanceFeatureIdLabel),c(o))?(i=g(o.label,o.positionalLabel),{featureIds:o,variableName:i,shaderDestination:noe(o),featureIdDefine:toe(o)}):(o=Xt.getFeatureIdsByLabel(n.featureIds,e.featureIdLabel),i=g(o.label,o.positionalLabel),{featureIds:o,variableName:i,shaderDestination:noe(o),featureIdDefine:toe(o)})}function LHe(e){e.addStructField(VA.STRUCT_ID_SELECTED_FEATURE,"int","id"),e.addStructField(VA.STRUCT_ID_SELECTED_FEATURE,"vec2","st"),e.addStructField(VA.STRUCT_ID_SELECTED_FEATURE,"vec4","color")}var Vb=VA;var ws={name:"GeometryPipelineStage",STRUCT_ID_PROCESSED_ATTRIBUTES_VS:"ProcessedAttributesVS",STRUCT_ID_PROCESSED_ATTRIBUTES_FS:"ProcessedAttributesFS",STRUCT_NAME_PROCESSED_ATTRIBUTES:"ProcessedAttributes",FUNCTION_ID_INITIALIZE_ATTRIBUTES:"initializeAttributes",FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES:"void initializeAttributes(out ProcessedAttributes attributes)",FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS:"setDynamicVaryingsVS",FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS:"setDynamicVaryingsFS",FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS:"void setDynamicVaryings(inout ProcessedAttributes attributes)"};ws.process=function(e,t,n){let{shaderBuilder:i,model:o}=e;i.addStruct(ws.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,"ProcessedAttributes",ce.VERTEX),i.addStruct(ws.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"ProcessedAttributes",ce.FRAGMENT),i.addStruct(Vb.STRUCT_ID_SELECTED_FEATURE,Vb.STRUCT_NAME_SELECTED_FEATURE,ce.BOTH),i.addFunction(ws.FUNCTION_ID_INITIALIZE_ATTRIBUTES,ws.FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES,ce.VERTEX),i.addVarying("vec3","v_positionWC"),i.addVarying("vec3","v_positionEC"),i.addStructField(ws.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","positionWC"),i.addStructField(ws.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","positionEC"),i.addFunction(ws.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,ws.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,ce.VERTEX),i.addFunction(ws.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,ws.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,ce.FRAGMENT),o.type===fr.TILE_PNTS&&i.addDefine("HAS_SRGB_COLOR",void 0,ce.FRAGMENT);let r=n.mode!==J.SCENE3D&&!n.scene3DOnly&&o._projectTo2D,s=c(e.runtimeNode.node.instances),a=r&&!s,l=t.attributes.length;for(let u=0;u<l;u++){let f=t.attributes[u],h=tn.getAttributeLocationCount(f.type);if(!c(f.buffer)&&!c(f.constant))throw new w("Attributes must be provided as a Buffer or constant value");let m=f.semantic===Tt.POSITION,p;h>1?(p=e.attributeIndex,e.attributeIndex+=h):m&&!a?p=0:p=e.attributeIndex++,NHe(e,f,p,h,r,s)}jHe(i,t.attributes),t.primitiveType===Se.POINTS&&i.addDefine("PRIMITIVE_TYPE_POINTS"),i.addVertexLines(IF),i.addFragmentLines(DF)};function NHe(e,t,n,i,o,r){let s=e.shaderBuilder,a=Xt.getAttributeInfo(t),l=o&&!r;i>1?kHe(e,t,n,i):BHe(e,t,n,l),zHe(s,a,l),UHe(s,a),c(t.semantic)&&FHe(s,t),VHe(s,a,o),HHe(s,a,l),GHe(s,a)}function FHe(e,t){let{semantic:n,setIndex:i}=t;switch(n){case Tt.NORMAL:e.addDefine("HAS_NORMALS");break;case Tt.TANGENT:e.addDefine("HAS_TANGENTS");break;case Tt.FEATURE_ID:e.addDefine(`HAS${n}_${i}`);break;case Tt.TEXCOORD:case Tt.COLOR:e.addDefine(`HAS_${n}_${i}`)}}function BHe(e,t,n,i){let{quantization:o,semantic:r,setIndex:s}=t,{type:a,componentDatatype:l}=c(o)?o:t;r===Tt.FEATURE_ID&&s>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=s+1);let u=r===Tt.POSITION,f=u?0:n,h=tn.getNumberOfComponents(a),m={index:f,value:c(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,count:t.count,componentsPerAttribute:h,componentDatatype:l,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};if(e.attributes.push(m),!u||!i)return;let p=e.runtimePrimitive.positionBuffer2D,_={index:n,vertexBuffer:p,count:t.count,componentsPerAttribute:h,componentDatatype:j.FLOAT,offsetInBytes:0,strideInBytes:void 0,normalize:t.normalized};e.attributes.push(_)}function kHe(e,t,n,i){let{quantization:o,normalized:r}=t,{type:s,componentDatatype:a}=c(o)?o:t,u=tn.getNumberOfComponents(s)/i,f=j.getSizeInBytes(a),h=u*f,m=t.byteStride;for(let p=0;p<i;p++){let _=t.byteOffset+p*h,b={index:n+p,vertexBuffer:t.buffer,componentsPerAttribute:u,componentDatatype:a,offsetInBytes:_,strideInBytes:m,normalize:r};e.attributes.push(b)}}function UHe(e,t){let n=t.variableName,i=`v_${n}`,o;n==="normalMC"?(i="v_normalEC",o=t.glslType):n==="tangentMC"?(o="vec3",i="v_tangentEC"):o=t.glslType,e.addVarying(o,i)}function zHe(e,t,n){let i=t.attribute.semantic,o=t.variableName,r,s;t.isQuantized?(r=`a_quantized_${o}`,s=t.quantizedGlslType):(r=`a_${o}`,s=t.glslType);let a=i===Tt.POSITION;a?e.setPositionAttribute(s,r):e.addAttribute(s,r),a&&n&&e.addAttribute("vec3","a_position2D")}function VHe(e,t,n){let i=ws.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,o=ws.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,{variableName:r,glslType:s}=t;r==="tangentMC"?(e.addStructField(i,"vec3","tangentMC"),e.addStructField(i,"float","tangentSignMC"),e.addStructField(o,"vec3","tangentEC")):r==="normalMC"?(e.addStructField(i,"vec3","normalMC"),e.addStructField(o,"vec3","normalEC")):(e.addStructField(i,s,r),e.addStructField(o,s,r)),r==="positionMC"&&n&&e.addStructField(i,"vec3","position2D")}function HHe(e,t,n){let i=ws.FUNCTION_ID_INITIALIZE_ATTRIBUTES,o=t.variableName;if(o==="positionMC"&&n&&e.addFunctionLines(i,["attributes.position2D = a_position2D;"]),t.isQuantized)return;let s=[];o==="tangentMC"?(s.push("attributes.tangentMC = a_tangentMC.xyz;"),s.push("attributes.tangentSignMC = a_tangentMC.w;")):s.push(`attributes.${o} = a_${o};`),e.addFunctionLines(i,s)}function GHe(e,t){let{semantic:n,setIndex:i}=t.attribute;if(c(n)&&!c(i))return;let o=ws.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,r=t.variableName,s=`v_${r} = attributes.${r};`;e.addFunctionLines(o,[s]),o=ws.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,s=`attributes.${r} = v_${r};`,e.addFunctionLines(o,[s])}function jHe(e,t){let n=!1,i=!1;for(let o=0;o<t.length;o++){let r=t[o];r.semantic===Tt.NORMAL?n=!0:r.semantic===Tt.TANGENT&&(i=!0)}!n||!i||(e.addDefine("HAS_BITANGENTS"),e.addVarying("vec3","v_bitangentEC"),e.addStructField(ws.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,"vec3","bitangentMC"),e.addStructField(ws.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","bitangentEC"))}var OF=ws;var PF=`#ifdef USE_IBL_LIGHTING
| vec3 computeIBL(vec3 position, vec3 normal, vec3 lightDirection, vec3 lightColorHdr, czm_modelMaterial material)
| {
| #if defined(DIFFUSE_IBL) || defined(SPECULAR_IBL)
| // Environment maps were provided, use them for IBL
| vec3 viewDirection = -normalize(position);
| vec3 iblColor = textureIBL(viewDirection, normal, material);
| return iblColor;
| #endif
|
| return vec3(0.0);
| }
| #endif
|
| #ifdef USE_CLEARCOAT
| vec3 addClearcoatReflection(vec3 baseLayerColor, vec3 position, vec3 lightDirection, vec3 lightColorHdr, czm_modelMaterial material)
| {
| vec3 viewDirection = -normalize(position);
| vec3 halfwayDirection = normalize(viewDirection + lightDirection);
| vec3 normal = material.clearcoatNormal;
| float NdotL = clamp(dot(normal, lightDirection), 0.001, 1.0);
|
| // clearcoatF0 = vec3(pow((ior - 1.0) / (ior + 1.0), 2.0)), but without KHR_materials_ior, ior is a constant 1.5.
| vec3 f0 = vec3(0.04);
| vec3 f90 = vec3(1.0);
| // Note: clearcoat Fresnel computed with dot(n, v) instead of dot(v, h).
| // This is to make it energy conserving with a simple layering function.
| float NdotV = clamp(dot(normal, viewDirection), 0.0, 1.0);
| vec3 F = fresnelSchlick2(f0, f90, NdotV);
|
| // compute specular reflection from direct lighting
| float roughness = material.clearcoatRoughness;
| float alphaRoughness = roughness * roughness;
| float directStrength = computeDirectSpecularStrength(normal, lightDirection, viewDirection, halfwayDirection, alphaRoughness);
| vec3 directReflection = F * directStrength * NdotL;
| vec3 color = lightColorHdr * directReflection;
|
| #ifdef SPECULAR_IBL
| // Find the direction in which to sample the environment map
| vec3 reflectMC = normalize(model_iblReferenceFrameMatrix * reflect(-viewDirection, normal));
| vec3 iblColor = computeSpecularIBL(reflectMC, NdotV, f0, roughness);
| color += iblColor * material.occlusion;
| #endif
|
| float clearcoatFactor = material.clearcoatFactor;
| vec3 clearcoatColor = color * clearcoatFactor;
|
| // Dim base layer based on transmission loss through clearcoat
| return baseLayerColor * (1.0 - clearcoatFactor * F) + clearcoatColor;
| }
| #endif
|
| #if defined(LIGHTING_PBR) && defined(HAS_NORMALS)
| vec3 computePbrLighting(in czm_modelMaterial material, in vec3 position)
| {
| #ifdef USE_CUSTOM_LIGHT_COLOR
| vec3 lightColorHdr = model_lightColorHdr;
| #else
| vec3 lightColorHdr = czm_lightColorHdr;
| #endif
|
| vec3 viewDirection = -normalize(position);
| vec3 normal = material.normalEC;
| vec3 lightDirection = normalize(czm_lightDirectionEC);
|
| vec3 directLighting = czm_pbrLighting(viewDirection, normal, lightDirection, material);
| vec3 directColor = lightColorHdr * directLighting;
|
| // Accumulate colors from base layer
| vec3 color = directColor + material.emissive;
| #ifdef USE_IBL_LIGHTING
| color += computeIBL(position, normal, lightDirection, lightColorHdr, material);
| #endif
|
| #ifdef USE_CLEARCOAT
| color = addClearcoatReflection(color, position, lightDirection, lightColorHdr, material);
| #endif
|
| return color;
| }
| #endif
|
| /**
| * Compute the material color under the current lighting conditions.
| * All other material properties are passed through so further stages
| * have access to them.
| *
| * @param {czm_modelMaterial} material The material properties from {@MaterialStageFS}
| * @param {ProcessedAttributes} attributes
| */
| void lightingStage(inout czm_modelMaterial material, ProcessedAttributes attributes)
| {
| #ifdef LIGHTING_PBR
| #ifdef HAS_NORMALS
| vec3 color = computePbrLighting(material, attributes.positionEC);
| #else
| vec3 color = material.diffuse * material.occlusion + material.emissive;
| #endif
| // In HDR mode, the frame buffer is in linear color space. The
| // post-processing stages (see PostProcessStageCollection) will handle
| // tonemapping. However, if HDR is not enabled, we must tonemap else large
| // values may be clamped to 1.0
| #ifndef HDR
| color = czm_pbrNeutralTonemapping(color);
| #endif
| #else // unlit
| vec3 color = material.diffuse;
| #endif
|
| #ifdef HAS_POINT_CLOUD_COLOR_STYLE
| // The colors resulting from point cloud styles are adjusted differently.
| color = czm_gammaCorrect(color);
| #elif !defined(HDR)
| // If HDR is not enabled, the frame buffer stores sRGB colors rather than
| // linear colors so the linear value must be converted.
| color = czm_linearToSrgb(color);
| #endif
|
| material.diffuse = color;
| }
| `;var WHe={UNLIT:0,PBR:1},cp=Object.freeze(WHe);var ioe={name:"LightingPipelineStage"};ioe.process=function(e,t){let{model:n,lightingOptions:i,shaderBuilder:o}=e;if(c(n.lightColor)){o.addDefine("USE_CUSTOM_LIGHT_COLOR",void 0,ce.FRAGMENT),o.addUniform("vec3","model_lightColorHdr",ce.FRAGMENT);let s=e.uniformMap;s.model_lightColorHdr=function(){return n.lightColor}}let{lightingModel:r}=i;r===cp.PBR?o.addDefine("LIGHTING_PBR",void 0,ce.FRAGMENT):o.addDefine("LIGHTING_UNLIT",void 0,ce.FRAGMENT),o.addFragmentLines(PF)};var RF=ioe;var MF=`// If the style color is white, it implies the feature has not been styled.
| bool isDefaultStyleColor(vec3 color)
| {
| return all(greaterThan(color, vec3(1.0 - czm_epsilon3)));
| }
|
| vec3 blend(vec3 sourceColor, vec3 styleColor, float styleColorBlend)
| {
| vec3 blendColor = mix(sourceColor, styleColor, styleColorBlend);
| vec3 color = isDefaultStyleColor(styleColor.rgb) ? sourceColor : blendColor;
| return color;
| }
|
| vec2 computeTextureTransform(vec2 texCoord, mat3 textureTransform)
| {
| return vec2(textureTransform * vec3(texCoord, 1.0));
| }
|
| #ifdef HAS_NORMAL_TEXTURE
| vec2 getNormalTexCoords()
| {
| vec2 texCoord = TEXCOORD_NORMAL;
| #ifdef HAS_NORMAL_TEXTURE_TRANSFORM
| texCoord = vec2(u_normalTextureTransform * vec3(texCoord, 1.0));
| #endif
| return texCoord;
| }
| #endif
|
| #if defined(HAS_NORMAL_TEXTURE) || defined(HAS_CLEARCOAT_NORMAL_TEXTURE)
| vec3 computeTangent(in vec3 position, in vec2 normalTexCoords)
| {
| vec2 tex_dx = dFdx(normalTexCoords);
| vec2 tex_dy = dFdy(normalTexCoords);
| float determinant = tex_dx.x * tex_dy.y - tex_dy.x * tex_dx.y;
| vec3 tangent = tex_dy.t * dFdx(position) - tex_dx.t * dFdy(position);
| return tangent / determinant;
| }
| #endif
|
| #ifdef USE_ANISOTROPY
| struct NormalInfo {
| vec3 tangent;
| vec3 bitangent;
| vec3 normal;
| vec3 geometryNormal;
| };
|
| NormalInfo getNormalInfo(ProcessedAttributes attributes)
| {
| vec3 geometryNormal = attributes.normalEC;
| #ifdef HAS_NORMAL_TEXTURE
| vec2 normalTexCoords = getNormalTexCoords();
| #endif
|
| #ifdef HAS_BITANGENTS
| vec3 tangent = attributes.tangentEC;
| vec3 bitangent = attributes.bitangentEC;
| #else // Assume HAS_NORMAL_TEXTURE
| vec3 tangent = computeTangent(attributes.positionEC, normalTexCoords);
| tangent = normalize(tangent - geometryNormal * dot(geometryNormal, tangent));
| vec3 bitangent = normalize(cross(geometryNormal, tangent));
| #endif
|
| #ifdef HAS_NORMAL_TEXTURE
| mat3 tbn = mat3(tangent, bitangent, geometryNormal);
| vec3 normalSample = texture(u_normalTexture, normalTexCoords).rgb;
| normalSample = 2.0 * normalSample - 1.0;
| #ifdef HAS_NORMAL_TEXTURE_SCALE
| normalSample.xy *= u_normalTextureScale;
| #endif
| vec3 normal = normalize(tbn * normalSample);
| #else
| vec3 normal = geometryNormal;
| #endif
|
| #ifdef HAS_DOUBLE_SIDED_MATERIAL
| if (czm_backFacing()) {
| tangent *= -1.0;
| bitangent *= -1.0;
| normal *= -1.0;
| geometryNormal *= -1.0;
| }
| #endif
|
| NormalInfo normalInfo;
| normalInfo.tangent = tangent;
| normalInfo.bitangent = bitangent;
| normalInfo.normal = normal;
| normalInfo.geometryNormal = geometryNormal;
|
| return normalInfo;
| }
| #endif
|
| #if defined(HAS_NORMAL_TEXTURE) && !defined(HAS_WIREFRAME)
| vec3 getNormalFromTexture(ProcessedAttributes attributes, vec3 geometryNormal)
| {
| vec2 normalTexCoords = getNormalTexCoords();
|
| // If HAS_BITANGENTS is set, then HAS_TANGENTS is also set
| #ifdef HAS_BITANGENTS
| vec3 t = attributes.tangentEC;
| vec3 b = attributes.bitangentEC;
| #else
| vec3 t = computeTangent(attributes.positionEC, normalTexCoords);
| t = normalize(t - geometryNormal * dot(geometryNormal, t));
| vec3 b = normalize(cross(geometryNormal, t));
| #endif
|
| mat3 tbn = mat3(t, b, geometryNormal);
| vec3 normalSample = texture(u_normalTexture, normalTexCoords).rgb;
| normalSample = 2.0 * normalSample - 1.0;
| #ifdef HAS_NORMAL_TEXTURE_SCALE
| normalSample.xy *= u_normalTextureScale;
| #endif
| return normalize(tbn * normalSample);
| }
| #endif
|
| #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE
| vec3 getClearcoatNormalFromTexture(ProcessedAttributes attributes, vec3 geometryNormal)
| {
| vec2 normalTexCoords = TEXCOORD_CLEARCOAT_NORMAL;
| #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE_TRANSFORM
| normalTexCoords = vec2(u_clearcoatNormalTextureTransform * vec3(normalTexCoords, 1.0));
| #endif
|
| // If HAS_BITANGENTS is set, then HAS_TANGENTS is also set
| #ifdef HAS_BITANGENTS
| vec3 t = attributes.tangentEC;
| vec3 b = attributes.bitangentEC;
| #else
| vec3 t = computeTangent(attributes.positionEC, normalTexCoords);
| t = normalize(t - geometryNormal * dot(geometryNormal, t));
| vec3 b = normalize(cross(geometryNormal, t));
| #endif
|
| mat3 tbn = mat3(t, b, geometryNormal);
| vec3 normalSample = texture(u_clearcoatNormalTexture, normalTexCoords).rgb;
| normalSample = 2.0 * normalSample - 1.0;
| #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE_SCALE
| normalSample.xy *= u_clearcoatNormalTextureScale;
| #endif
| return normalize(tbn * normalSample);
| }
| #endif
|
| #ifdef HAS_NORMALS
| vec3 computeNormal(ProcessedAttributes attributes)
| {
| // Geometry normal. This is already normalized
| vec3 normal = attributes.normalEC;
|
| #if defined(HAS_NORMAL_TEXTURE) && !defined(HAS_WIREFRAME)
| normal = getNormalFromTexture(attributes, normal);
| #endif
|
| #ifdef HAS_DOUBLE_SIDED_MATERIAL
| if (czm_backFacing()) {
| normal = -normal;
| }
| #endif
|
| return normal;
| }
| #endif
|
| #ifdef HAS_BASE_COLOR_TEXTURE
| vec4 getBaseColorFromTexture()
| {
| vec2 baseColorTexCoords = TEXCOORD_BASE_COLOR;
| #ifdef HAS_BASE_COLOR_TEXTURE_TRANSFORM
| baseColorTexCoords = computeTextureTransform(baseColorTexCoords, u_baseColorTextureTransform);
| #endif
|
| vec4 baseColorWithAlpha = czm_srgbToLinear(texture(u_baseColorTexture, baseColorTexCoords));
|
| #ifdef HAS_BASE_COLOR_FACTOR
| baseColorWithAlpha *= u_baseColorFactor;
| #endif
|
| return baseColorWithAlpha;
| }
| #endif
|
| #ifdef HAS_EMISSIVE_TEXTURE
| vec3 getEmissiveFromTexture()
| {
| vec2 emissiveTexCoords = TEXCOORD_EMISSIVE;
| #ifdef HAS_EMISSIVE_TEXTURE_TRANSFORM
| emissiveTexCoords = computeTextureTransform(emissiveTexCoords, u_emissiveTextureTransform);
| #endif
|
| vec3 emissive = czm_srgbToLinear(texture(u_emissiveTexture, emissiveTexCoords).rgb);
| #ifdef HAS_EMISSIVE_FACTOR
| emissive *= u_emissiveFactor;
| #endif
|
| return emissive;
| }
| #endif
|
| #if defined(LIGHTING_PBR) && defined(USE_SPECULAR_GLOSSINESS)
| void setSpecularGlossiness(inout czm_modelMaterial material)
| {
| #ifdef HAS_SPECULAR_GLOSSINESS_TEXTURE
| vec2 specularGlossinessTexCoords = TEXCOORD_SPECULAR_GLOSSINESS;
| #ifdef HAS_SPECULAR_GLOSSINESS_TEXTURE_TRANSFORM
| specularGlossinessTexCoords = computeTextureTransform(specularGlossinessTexCoords, u_specularGlossinessTextureTransform);
| #endif
|
| vec4 specularGlossiness = czm_srgbToLinear(texture(u_specularGlossinessTexture, specularGlossinessTexCoords));
| vec3 specular = specularGlossiness.rgb;
| float glossiness = specularGlossiness.a;
| #ifdef HAS_LEGACY_SPECULAR_FACTOR
| specular *= u_legacySpecularFactor;
| #endif
|
| #ifdef HAS_GLOSSINESS_FACTOR
| glossiness *= u_glossinessFactor;
| #endif
| #else
| #ifdef HAS_LEGACY_SPECULAR_FACTOR
| vec3 specular = clamp(u_legacySpecularFactor, vec3(0.0), vec3(1.0));
| #else
| vec3 specular = vec3(1.0);
| #endif
|
| #ifdef HAS_GLOSSINESS_FACTOR
| float glossiness = clamp(u_glossinessFactor, 0.0, 1.0);
| #else
| float glossiness = 1.0;
| #endif
| #endif
|
| #ifdef HAS_DIFFUSE_TEXTURE
| vec2 diffuseTexCoords = TEXCOORD_DIFFUSE;
| #ifdef HAS_DIFFUSE_TEXTURE_TRANSFORM
| diffuseTexCoords = computeTextureTransform(diffuseTexCoords, u_diffuseTextureTransform);
| #endif
|
| vec4 diffuse = czm_srgbToLinear(texture(u_diffuseTexture, diffuseTexCoords));
| #ifdef HAS_DIFFUSE_FACTOR
| diffuse *= u_diffuseFactor;
| #endif
| #elif defined(HAS_DIFFUSE_FACTOR)
| vec4 diffuse = clamp(u_diffuseFactor, vec4(0.0), vec4(1.0));
| #else
| vec4 diffuse = vec4(1.0);
| #endif
|
| material.diffuse = diffuse.rgb * (1.0 - czm_maximumComponent(specular));
| // the specular glossiness extension's alpha overrides anything set
| // by the base material.
| material.alpha = diffuse.a;
|
| material.specular = specular;
|
| // glossiness is the opposite of roughness, but easier for artists to use.
| material.roughness = 1.0 - glossiness;
| }
| #elif defined(LIGHTING_PBR)
| float setMetallicRoughness(inout czm_modelMaterial material)
| {
| #ifdef HAS_METALLIC_ROUGHNESS_TEXTURE
| vec2 metallicRoughnessTexCoords = TEXCOORD_METALLIC_ROUGHNESS;
| #ifdef HAS_METALLIC_ROUGHNESS_TEXTURE_TRANSFORM
| metallicRoughnessTexCoords = computeTextureTransform(metallicRoughnessTexCoords, u_metallicRoughnessTextureTransform);
| #endif
|
| vec3 metallicRoughness = texture(u_metallicRoughnessTexture, metallicRoughnessTexCoords).rgb;
| float metalness = clamp(metallicRoughness.b, 0.0, 1.0);
| float roughness = clamp(metallicRoughness.g, 0.0, 1.0);
| #ifdef HAS_METALLIC_FACTOR
| metalness = clamp(metalness * u_metallicFactor, 0.0, 1.0);
| #endif
|
| #ifdef HAS_ROUGHNESS_FACTOR
| roughness = clamp(roughness * u_roughnessFactor, 0.0, 1.0);
| #endif
| #else
| #ifdef HAS_METALLIC_FACTOR
| float metalness = clamp(u_metallicFactor, 0.0, 1.0);
| #else
| float metalness = 1.0;
| #endif
|
| #ifdef HAS_ROUGHNESS_FACTOR
| float roughness = clamp(u_roughnessFactor, 0.0, 1.0);
| #else
| float roughness = 1.0;
| #endif
| #endif
|
| // dielectrics use f0 = 0.04, metals use albedo as f0
| const vec3 REFLECTANCE_DIELECTRIC = vec3(0.04);
| vec3 f0 = mix(REFLECTANCE_DIELECTRIC, material.baseColor.rgb, metalness);
|
| material.specular = f0;
|
| // diffuse only applies to dielectrics.
| material.diffuse = mix(material.baseColor.rgb, vec3(0.0), metalness);
|
| // This is perceptual roughness. The square of this value is used for direct lighting
| material.roughness = roughness;
|
| return metalness;
| }
| #ifdef USE_SPECULAR
| void setSpecular(inout czm_modelMaterial material, in float metalness)
| {
| #ifdef HAS_SPECULAR_TEXTURE
| vec2 specularTexCoords = TEXCOORD_SPECULAR;
| #ifdef HAS_SPECULAR_TEXTURE_TRANSFORM
| specularTexCoords = computeTextureTransform(specularTexCoords, u_specularTextureTransform);
| #endif
| float specularWeight = texture(u_specularTexture, specularTexCoords).a;
| #ifdef HAS_SPECULAR_FACTOR
| specularWeight *= u_specularFactor;
| #endif
| #else
| #ifdef HAS_SPECULAR_FACTOR
| float specularWeight = u_specularFactor;
| #else
| float specularWeight = 1.0;
| #endif
| #endif
|
| #ifdef HAS_SPECULAR_COLOR_TEXTURE
| vec2 specularColorTexCoords = TEXCOORD_SPECULAR_COLOR;
| #ifdef HAS_SPECULAR_COLOR_TEXTURE_TRANSFORM
| specularColorTexCoords = computeTextureTransform(specularColorTexCoords, u_specularColorTextureTransform);
| #endif
| vec3 specularColorSample = texture(u_specularColorTexture, specularColorTexCoords).rgb;
| vec3 specularColorFactor = czm_srgbToLinear(specularColorSample);
| #ifdef HAS_SPECULAR_COLOR_FACTOR
| specularColorFactor *= u_specularColorFactor;
| #endif
| #else
| #ifdef HAS_SPECULAR_COLOR_FACTOR
| vec3 specularColorFactor = u_specularColorFactor;
| #else
| vec3 specularColorFactor = vec3(1.0);
| #endif
| #endif
| material.specularWeight = specularWeight;
| vec3 f0 = material.specular;
| vec3 dielectricSpecularF0 = min(f0 * specularColorFactor, vec3(1.0));
| material.specular = mix(dielectricSpecularF0, material.baseColor.rgb, metalness);
| }
| #endif
| #ifdef USE_ANISOTROPY
| void setAnisotropy(inout czm_modelMaterial material, in NormalInfo normalInfo)
| {
| mat2 rotation = mat2(u_anisotropy.xy, -u_anisotropy.y, u_anisotropy.x);
| float anisotropyStrength = u_anisotropy.z;
|
| vec2 direction = vec2(1.0, 0.0);
| #ifdef HAS_ANISOTROPY_TEXTURE
| vec2 anisotropyTexCoords = TEXCOORD_ANISOTROPY;
| #ifdef HAS_ANISOTROPY_TEXTURE_TRANSFORM
| anisotropyTexCoords = computeTextureTransform(anisotropyTexCoords, u_anisotropyTextureTransform);
| #endif
| vec3 anisotropySample = texture(u_anisotropyTexture, anisotropyTexCoords).rgb;
| direction = anisotropySample.rg * 2.0 - vec2(1.0);
| anisotropyStrength *= anisotropySample.b;
| #endif
|
| direction = rotation * direction;
| mat3 tbn = mat3(normalInfo.tangent, normalInfo.bitangent, normalInfo.normal);
| vec3 anisotropicT = tbn * normalize(vec3(direction, 0.0));
| vec3 anisotropicB = cross(normalInfo.geometryNormal, anisotropicT);
|
| material.anisotropicT = anisotropicT;
| material.anisotropicB = anisotropicB;
| material.anisotropyStrength = anisotropyStrength;
| }
| #endif
| #ifdef USE_CLEARCOAT
| void setClearcoat(inout czm_modelMaterial material, in ProcessedAttributes attributes)
| {
| #ifdef HAS_CLEARCOAT_TEXTURE
| vec2 clearcoatTexCoords = TEXCOORD_CLEARCOAT;
| #ifdef HAS_CLEARCOAT_TEXTURE_TRANSFORM
| clearcoatTexCoords = computeTextureTransform(clearcoatTexCoords, u_clearcoatTextureTransform);
| #endif
| float clearcoatFactor = texture(u_clearcoatTexture, clearcoatTexCoords).r;
| #ifdef HAS_CLEARCOAT_FACTOR
| clearcoatFactor *= u_clearcoatFactor;
| #endif
| #else
| #ifdef HAS_CLEARCOAT_FACTOR
| float clearcoatFactor = u_clearcoatFactor;
| #else
| // PERFORMANCE_IDEA: this case should turn the whole extension off
| float clearcoatFactor = 0.0;
| #endif
| #endif
|
| #ifdef HAS_CLEARCOAT_ROUGHNESS_TEXTURE
| vec2 clearcoatRoughnessTexCoords = TEXCOORD_CLEARCOAT_ROUGHNESS;
| #ifdef HAS_CLEARCOAT_ROUGHNESS_TEXTURE_TRANSFORM
| clearcoatRoughnessTexCoords = computeTextureTransform(clearcoatRoughnessTexCoords, u_clearcoatRoughnessTextureTransform);
| #endif
| float clearcoatRoughness = texture(u_clearcoatRoughnessTexture, clearcoatRoughnessTexCoords).g;
| #ifdef HAS_CLEARCOAT_ROUGHNESS_FACTOR
| clearcoatRoughness *= u_clearcoatRoughnessFactor;
| #endif
| #else
| #ifdef HAS_CLEARCOAT_ROUGHNESS_FACTOR
| float clearcoatRoughness = u_clearcoatRoughnessFactor;
| #else
| float clearcoatRoughness = 0.0;
| #endif
| #endif
|
| material.clearcoatFactor = clearcoatFactor;
| // This is perceptual roughness. The square of this value is used for direct lighting
| material.clearcoatRoughness = clearcoatRoughness;
| #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE
| material.clearcoatNormal = getClearcoatNormalFromTexture(attributes, attributes.normalEC);
| #else
| material.clearcoatNormal = attributes.normalEC;
| #endif
| }
| #endif
| #endif
|
| void materialStage(inout czm_modelMaterial material, ProcessedAttributes attributes, SelectedFeature feature)
| {
| #ifdef USE_ANISOTROPY
| NormalInfo normalInfo = getNormalInfo(attributes);
| material.normalEC = normalInfo.normal;
| #elif defined(HAS_NORMALS)
| material.normalEC = computeNormal(attributes);
| #endif
|
| vec4 baseColorWithAlpha = vec4(1.0);
| // Regardless of whether we use PBR, set a base color
| #ifdef HAS_BASE_COLOR_TEXTURE
| baseColorWithAlpha = getBaseColorFromTexture();
| #elif defined(HAS_BASE_COLOR_FACTOR)
| baseColorWithAlpha = u_baseColorFactor;
| #endif
|
| #ifdef HAS_POINT_CLOUD_COLOR_STYLE
| baseColorWithAlpha = v_pointCloudColor;
| #elif defined(HAS_COLOR_0)
| vec4 color = attributes.color_0;
| // .pnts files store colors in the sRGB color space
| #ifdef HAS_SRGB_COLOR
| color = czm_srgbToLinear(color);
| #endif
| baseColorWithAlpha *= color;
| #endif
|
| #ifdef USE_CPU_STYLING
| baseColorWithAlpha.rgb = blend(baseColorWithAlpha.rgb, feature.color.rgb, model_colorBlend);
| #endif
| material.baseColor = baseColorWithAlpha;
| material.diffuse = baseColorWithAlpha.rgb;
| material.alpha = baseColorWithAlpha.a;
|
| #ifdef HAS_OCCLUSION_TEXTURE
| vec2 occlusionTexCoords = TEXCOORD_OCCLUSION;
| #ifdef HAS_OCCLUSION_TEXTURE_TRANSFORM
| occlusionTexCoords = computeTextureTransform(occlusionTexCoords, u_occlusionTextureTransform);
| #endif
| material.occlusion = texture(u_occlusionTexture, occlusionTexCoords).r;
| #endif
|
| #ifdef HAS_EMISSIVE_TEXTURE
| material.emissive = getEmissiveFromTexture();
| #elif defined(HAS_EMISSIVE_FACTOR)
| material.emissive = u_emissiveFactor;
| #endif
|
| #if defined(LIGHTING_PBR) && defined(USE_SPECULAR_GLOSSINESS)
| setSpecularGlossiness(material);
| #elif defined(LIGHTING_PBR)
| float metalness = setMetallicRoughness(material);
| #ifdef USE_SPECULAR
| setSpecular(material, metalness);
| #endif
| #ifdef USE_ANISOTROPY
| setAnisotropy(material, normalInfo);
| #endif
| #ifdef USE_CLEARCOAT
| setClearcoat(material, attributes);
| #endif
| #endif
| }
| `;var{Material:qHe,MetallicRoughness:w5,SpecularGlossiness:S5,Specular:ooe,Clearcoat:roe}=bn,soe={name:"MaterialPipelineStage",_processTexture:nl,_processTextureTransform:aoe};soe.process=function(e,t,n){let i=t.material,{model:o,uniformMap:r,shaderBuilder:s}=e,a=c(o.classificationType),l=a,{defaultTexture:u,defaultNormalTexture:f,defaultEmissiveTexture:h}=n.context;XHe(i,r,s,u,f,h,l),c(i.specularGlossiness)?KHe(i.specularGlossiness,r,s,u,l):(c(i.specular)&&Xt.supportedExtensions.KHR_materials_specular&&$He(i.specular,r,s,u,l),c(i.anisotropy)&&Xt.supportedExtensions.KHR_materials_anisotropy&&JHe(i.anisotropy,r,s,u,l),c(i.clearcoat)&&Xt.supportedExtensions.KHR_materials_clearcoat&&QHe(i.clearcoat,r,s,u,l),e4e(i.metallicRoughness,r,s,u,l));let m=Xt.getAttributeBySemantic(t,Tt.NORMAL),p=e.lightingOptions;i.unlit||!m||a?p.lightingModel=cp.UNLIT:p.lightingModel=cp.PBR;let _=o.backFaceCulling&&!i.doubleSided;e.renderStateOptions.cull.enabled=_;let b=e.alphaOptions;i.alphaMode===Jm.BLEND?b.pass=xe.TRANSLUCENT:i.alphaMode===Jm.MASK&&(b.alphaCutoff=i.alphaCutoff),s.addFragmentLines(MF),i.doubleSided&&s.addDefine("HAS_DOUBLE_SIDED_MATERIAL",void 0,ce.BOTH)};function aoe(e,t,n,i,o){let r=`HAS_${o}_TEXTURE_TRANSFORM`;e.addDefine(r,void 0,ce.FRAGMENT);let s=`${i}Transform`;e.addUniform("mat3",s,ce.FRAGMENT),t[s]=function(){return n.transform}}function YHe(e,t,n,i,o){let r=`HAS_${o}_TEXTURE_SCALE`;e.addDefine(r,void 0,ce.FRAGMENT);let s=`${i}Scale`;e.addUniform("float",s,ce.FRAGMENT),t[s]=function(){return n.scale}}function nl(e,t,n,i,o,r){e.addUniform("sampler2D",i,ce.FRAGMENT),t[i]=function(){return g(n.texture,r)};let s=`HAS_${o}_TEXTURE`;e.addDefine(s,void 0,ce.FRAGMENT);let l=`v_texCoord_${n.texCoord}`,u=`TEXCOORD_${o}`;e.addDefine(u,l,ce.FRAGMENT);let f=n.transform;c(f)&&!q.equals(f,q.IDENTITY)&&aoe(e,t,n,i,o);let{scale:h}=n;c(h)&&h!==1&&YHe(e,t,n,i,o)}function XHe(e,t,n,i,o,r,s){let{emissiveFactor:a,emissiveTexture:l,normalTexture:u,occlusionTexture:f}=e;c(a)&&!d.equals(a,qHe.DEFAULT_EMISSIVE_FACTOR)&&(n.addUniform("vec3","u_emissiveFactor",ce.FRAGMENT),t.u_emissiveFactor=function(){return e.emissiveFactor},n.addDefine("HAS_EMISSIVE_FACTOR",void 0,ce.FRAGMENT),c(l)&&!s&&nl(n,t,l,"u_emissiveTexture","EMISSIVE",r)),c(u)&&!s&&nl(n,t,u,"u_normalTexture","NORMAL",o),c(f)&&!s&&nl(n,t,f,"u_occlusionTexture","OCCLUSION",i)}function KHe(e,t,n,i,o){let{diffuseTexture:r,diffuseFactor:s,specularGlossinessTexture:a,specularFactor:l,glossinessFactor:u}=e;n.addDefine("USE_SPECULAR_GLOSSINESS",void 0,ce.FRAGMENT),c(r)&&!o&&nl(n,t,r,"u_diffuseTexture","DIFFUSE",i),c(s)&&!ee.equals(s,S5.DEFAULT_DIFFUSE_FACTOR)&&(n.addUniform("vec4","u_diffuseFactor",ce.FRAGMENT),t.u_diffuseFactor=function(){return e.diffuseFactor},n.addDefine("HAS_DIFFUSE_FACTOR",void 0,ce.FRAGMENT)),c(a)&&!o&&nl(n,t,a,"u_specularGlossinessTexture","SPECULAR_GLOSSINESS",i),c(l)&&!d.equals(l,S5.DEFAULT_SPECULAR_FACTOR)&&(n.addUniform("vec3","u_legacySpecularFactor",ce.FRAGMENT),t.u_legacySpecularFactor=function(){return e.specularFactor},n.addDefine("HAS_LEGACY_SPECULAR_FACTOR",void 0,ce.FRAGMENT)),c(u)&&u!==S5.DEFAULT_GLOSSINESS_FACTOR&&(n.addUniform("float","u_glossinessFactor",ce.FRAGMENT),t.u_glossinessFactor=function(){return e.glossinessFactor},n.addDefine("HAS_GLOSSINESS_FACTOR",void 0,ce.FRAGMENT))}function $He(e,t,n,i,o){let{specularTexture:r,specularFactor:s,specularColorTexture:a,specularColorFactor:l}=e;n.addDefine("USE_SPECULAR",void 0,ce.FRAGMENT),c(r)&&!o&&nl(n,t,r,"u_specularTexture","SPECULAR",i),c(s)&&s!==ooe.DEFAULT_SPECULAR_FACTOR&&(n.addUniform("float","u_specularFactor",ce.FRAGMENT),t.u_specularFactor=function(){return e.specularFactor},n.addDefine("HAS_SPECULAR_FACTOR",void 0,ce.FRAGMENT)),c(a)&&!o&&nl(n,t,a,"u_specularColorTexture","SPECULAR_COLOR",i),c(l)&&!d.equals(l,ooe.DEFAULT_SPECULAR_COLOR_FACTOR)&&(n.addUniform("vec3","u_specularColorFactor",ce.FRAGMENT),t.u_specularColorFactor=function(){return e.specularColorFactor},n.addDefine("HAS_SPECULAR_COLOR_FACTOR",void 0,ce.FRAGMENT))}var ZHe=new d;function JHe(e,t,n,i,o){let{anisotropyStrength:r,anisotropyRotation:s,anisotropyTexture:a}=e;n.addDefine("USE_ANISOTROPY",void 0,ce.FRAGMENT),c(a)&&!o&&nl(n,t,a,"u_anisotropyTexture","ANISOTROPY",i);let l=Math.cos(s),u=Math.sin(s);n.addUniform("vec3","u_anisotropy",ce.FRAGMENT),t.u_anisotropy=function(){return d.fromElements(l,u,r,ZHe)}}function QHe(e,t,n,i,o){let{clearcoatFactor:r,clearcoatTexture:s,clearcoatRoughnessFactor:a,clearcoatRoughnessTexture:l,clearcoatNormalTexture:u}=e;n.addDefine("USE_CLEARCOAT",void 0,ce.FRAGMENT),c(r)&&r!==roe.DEFAULT_CLEARCOAT_FACTOR&&(n.addUniform("float","u_clearcoatFactor",ce.FRAGMENT),t.u_clearcoatFactor=function(){return e.clearcoatFactor},n.addDefine("HAS_CLEARCOAT_FACTOR",void 0,ce.FRAGMENT)),c(s)&&!o&&nl(n,t,s,"u_clearcoatTexture","CLEARCOAT",i),c(a)&&r!==roe.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR&&(n.addUniform("float","u_clearcoatRoughnessFactor",ce.FRAGMENT),t.u_clearcoatRoughnessFactor=function(){return e.clearcoatRoughnessFactor},n.addDefine("HAS_CLEARCOAT_ROUGHNESS_FACTOR",void 0,ce.FRAGMENT)),c(l)&&!o&&nl(n,t,l,"u_clearcoatRoughnessTexture","CLEARCOAT_ROUGHNESS",i),c(u)&&!o&&nl(n,t,u,"u_clearcoatNormalTexture","CLEARCOAT_NORMAL",i)}function e4e(e,t,n,i,o){n.addDefine("USE_METALLIC_ROUGHNESS",void 0,ce.FRAGMENT);let r=e.baseColorTexture;c(r)&&!o&&nl(n,t,r,"u_baseColorTexture","BASE_COLOR",i);let s=e.baseColorFactor;c(s)&&!ee.equals(s,w5.DEFAULT_BASE_COLOR_FACTOR)&&(n.addUniform("vec4","u_baseColorFactor",ce.FRAGMENT),t.u_baseColorFactor=function(){return e.baseColorFactor},n.addDefine("HAS_BASE_COLOR_FACTOR",void 0,ce.FRAGMENT));let a=e.metallicRoughnessTexture;c(a)&&!o&&nl(n,t,a,"u_metallicRoughnessTexture","METALLIC_ROUGHNESS",i);let l=e.metallicFactor;c(l)&&l!==w5.DEFAULT_METALLIC_FACTOR&&(n.addUniform("float","u_metallicFactor",ce.FRAGMENT),t.u_metallicFactor=function(){return e.metallicFactor},n.addDefine("HAS_METALLIC_FACTOR",void 0,ce.FRAGMENT));let u=e.roughnessFactor;c(u)&&u!==w5.DEFAULT_ROUGHNESS_FACTOR&&(n.addUniform("float","u_roughnessFactor",ce.FRAGMENT),t.u_roughnessFactor=function(){return e.roughnessFactor},n.addDefine("HAS_ROUGHNESS_FACTOR",void 0,ce.FRAGMENT))}var LF=soe;var bc={name:"MetadataPickingPipelineStage",METADATA_PICKING_ENABLED:"METADATA_PICKING_ENABLED",METADATA_PICKING_VALUE_TYPE:"METADATA_PICKING_VALUE_TYPE",METADATA_PICKING_VALUE_STRING:"METADATA_PICKING_VALUE_STRING",METADATA_PICKING_VALUE_COMPONENT_X:"METADATA_PICKING_VALUE_COMPONENT_X",METADATA_PICKING_VALUE_COMPONENT_Y:"METADATA_PICKING_VALUE_COMPONENT_Y",METADATA_PICKING_VALUE_COMPONENT_Z:"METADATA_PICKING_VALUE_COMPONENT_Z",METADATA_PICKING_VALUE_COMPONENT_W:"METADATA_PICKING_VALUE_COMPONENT_W"};bc.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine(bc.METADATA_PICKING_VALUE_TYPE,"float",ce.FRAGMENT),i.addDefine(bc.METADATA_PICKING_VALUE_STRING,"0.0",ce.FRAGMENT),i.addDefine(bc.METADATA_PICKING_VALUE_COMPONENT_X,"0.0",ce.FRAGMENT),i.addDefine(bc.METADATA_PICKING_VALUE_COMPONENT_Y,"0.0",ce.FRAGMENT),i.addDefine(bc.METADATA_PICKING_VALUE_COMPONENT_Z,"0.0",ce.FRAGMENT),i.addDefine(bc.METADATA_PICKING_VALUE_COMPONENT_W,"0.0",ce.FRAGMENT),i.addFunction("metadataPickingStage","void metadataPickingStage(Metadata metadata, MetadataClass metadataClass, inout vec4 metadataValues)",ce.FRAGMENT),i.addFunctionLines("metadataPickingStage",[`${bc.METADATA_PICKING_VALUE_TYPE} value = ${bc.METADATA_PICKING_VALUE_TYPE}(${bc.METADATA_PICKING_VALUE_STRING});`,`metadataValues.x = ${bc.METADATA_PICKING_VALUE_COMPONENT_X};`,`metadataValues.y = ${bc.METADATA_PICKING_VALUE_COMPONENT_Y};`,`metadataValues.z = ${bc.METADATA_PICKING_VALUE_COMPONENT_Z};`,`metadataValues.w = ${bc.METADATA_PICKING_VALUE_COMPONENT_W};`],ce.FRAGMENT)};var Yu=bc;var NF=`void morphTargetsStage(inout ProcessedAttributes attributes)
| {
| vec3 positionMC = attributes.positionMC;
| attributes.positionMC = getMorphedPosition(positionMC);
|
| #ifdef HAS_NORMALS
| vec3 normalMC = attributes.normalMC;
| attributes.normalMC = getMorphedNormal(normalMC);
| #endif
|
| #ifdef HAS_TANGENTS
| vec3 tangentMC = attributes.tangentMC;
| attributes.tangentMC = getMorphedTangent(tangentMC);
| #endif
| }`;var ua={name:"MorphTargetsPipelineStage",FUNCTION_ID_GET_MORPHED_POSITION:"getMorphedPosition",FUNCTION_SIGNATURE_GET_MORPHED_POSITION:"vec3 getMorphedPosition(in vec3 position)",FUNCTION_ID_GET_MORPHED_NORMAL:"getMorphedNormal",FUNCTION_SIGNATURE_GET_MORPHED_NORMAL:"vec3 getMorphedNormal(in vec3 normal)",FUNCTION_ID_GET_MORPHED_TANGENT:"getMorphedTangent",FUNCTION_SIGNATURE_GET_MORPHED_TANGENT:"vec3 getMorphedTangent(in vec3 tangent)"};ua.process=function(e,t){let n=e.shaderBuilder;n.addDefine("HAS_MORPH_TARGETS",void 0,ce.VERTEX),s4e(n);let i=t.morphTargets.length;for(let a=0;a<i;a++){let l=t.morphTargets[a].attributes,u=l.length;for(let f=0;f<u;f++){let h=l[f],m=h.semantic;m!==Tt.POSITION&&m!==Tt.NORMAL&&m!==Tt.TANGENT||(n4e(e,h,e.attributeIndex,a),e.attributeIndex++)}}a4e(n);let r=e.runtimeNode.morphWeights.length;n.addUniform("float",`u_morphWeights[${r}]`,ce.VERTEX),n.addVertexLines(NF);let s={u_morphWeights:function(){return e.runtimeNode.morphWeights}};e.uniformMap=bt(s,e.uniformMap)};var t4e={attributeString:void 0,functionId:void 0};function n4e(e,t,n,i){let o=e.shaderBuilder;i4e(e,t,n);let r=o4e(t,t4e);r4e(o,r,i)}function i4e(e,t,n){let i={index:n,value:c(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,componentsPerAttribute:tn.getNumberOfComponents(t.type),componentDatatype:t.componentDatatype,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};e.attributes.push(i)}function o4e(e,t){switch(e.semantic){case Tt.POSITION:t.attributeString="Position",t.functionId=ua.FUNCTION_ID_GET_MORPHED_POSITION;break;case Tt.NORMAL:t.attributeString="Normal",t.functionId=ua.FUNCTION_ID_GET_MORPHED_NORMAL;break;case Tt.TANGENT:t.attributeString="Tangent",t.functionId=ua.FUNCTION_ID_GET_MORPHED_TANGENT;break;default:break}return t}function r4e(e,t,n){let i=t.attributeString,o=`a_target${i}_${n}`,r=`morphed${i} += u_morphWeights[${n}] * a_target${i}_${n};`;e.addAttribute("vec3",o),e.addFunctionLines(t.functionId,[r])}function s4e(e){e.addFunction(ua.FUNCTION_ID_GET_MORPHED_POSITION,ua.FUNCTION_SIGNATURE_GET_MORPHED_POSITION,ce.VERTEX),e.addFunctionLines(ua.FUNCTION_ID_GET_MORPHED_POSITION,["vec3 morphedPosition = position;"]),e.addFunction(ua.FUNCTION_ID_GET_MORPHED_NORMAL,ua.FUNCTION_SIGNATURE_GET_MORPHED_NORMAL,ce.VERTEX),e.addFunctionLines(ua.FUNCTION_ID_GET_MORPHED_NORMAL,["vec3 morphedNormal = normal;"]),e.addFunction(ua.FUNCTION_ID_GET_MORPHED_TANGENT,ua.FUNCTION_SIGNATURE_GET_MORPHED_TANGENT,ce.VERTEX),e.addFunctionLines(ua.FUNCTION_ID_GET_MORPHED_TANGENT,["vec3 morphedTangent = tangent;"])}function a4e(e){e.addFunctionLines(ua.FUNCTION_ID_GET_MORPHED_POSITION,["return morphedPosition;"]),e.addFunctionLines(ua.FUNCTION_ID_GET_MORPHED_NORMAL,["return morphedNormal;"]),e.addFunctionLines(ua.FUNCTION_ID_GET_MORPHED_TANGENT,["return morphedTangent;"])}var FF=ua;var coe={name:"PickingPipelineStage"};coe.process=function(e,t,n){let i=n.context,o=e.runtimeNode,r=e.shaderBuilder,s=e.model,a=o.node.instances;if(e.hasPropertyTable)c4e(e,t,a,i);else if(c(a))l4e(e,i);else{let l=loe(e),u=i.createPickId(l);s._pipelineResources.push(u),s._pickIds.push(u),r.addUniform("vec4","czm_pickColor",ce.FRAGMENT);let f=e.uniformMap;f.czm_pickColor=function(){return u.color},e.pickId="czm_pickColor"}};function loe(e,t){let n=e.model;if(c(n.pickObject))return n.pickObject;let i={model:n,node:e.runtimeNode,primitive:e.runtimePrimitive},o;if(fr.is3DTiles(n.type)){let r=n.content;o={content:r,primitive:r.tileset,detail:i}}else o={primitive:n,detail:i};return o.id=n.id,c(t)&&(o.instanceId=t),o}function c4e(e,t,n){let i=e.model,o,r,s=i.featureIdLabel,a=i.instanceFeatureIdLabel;c(i.featureTableId)?o=i.featureTableId:c(n)?(r=Xt.getFeatureIdsByLabel(n.featureIds,a),o=r.propertyTableId):(r=Xt.getFeatureIdsByLabel(t.featureIds,s),o=r.propertyTableId);let l=i.featureTables[o];e.shaderBuilder.addUniform("sampler2D","model_pickTexture",ce.FRAGMENT);let f=l.batchTexture;e.uniformMap.model_pickTexture=function(){return g(f.pickTexture,f.defaultTexture)},e.pickId="((selectedFeature.id < int(model_featuresLength)) ? texture(model_pickTexture, selectedFeature.st) : vec4(0.0))"}function l4e(e,t){let n=e.instanceCount,i=new Array(n),o=new Uint8Array(n*4),r=e.model,s=r._pipelineResources;for(let h=0;h<n;h++){let m=loe(e,h),p=t.createPickId(m);s.push(p),i[h]=p;let _=p.color;o[h*4+0]=z.floatToByte(_.red),o[h*4+1]=z.floatToByte(_.green),o[h*4+2]=z.floatToByte(_.blue),o[h*4+3]=z.floatToByte(_.alpha)}r._pickIds=i;let a=yt.createVertexBuffer({context:t,typedArray:o,usage:Pe.STATIC_DRAW});a.vertexArrayDestroyable=!1,r.statistics.addBuffer(a,!1),s.push(a);let u={index:e.attributeIndex++,vertexBuffer:a,componentsPerAttribute:4,componentDatatype:j.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0,instanceDivisor:1};e.attributes.push(u);let f=e.shaderBuilder;f.addDefine("USE_PICKING",void 0,ce.BOTH),f.addAttribute("vec4","a_pickColor"),f.addVarying("vec4","v_pickColor"),e.pickId="v_pickColor"}var BF=coe;var u4e={ADD:0,REPLACE:1},ko=Object.freeze(u4e);var kF=`float getPointSizeFromAttenuation(vec3 positionEC) {
| // Variables are packed into a single vector to minimize gl.uniformXXX() calls
| float pointSize = model_pointCloudParameters.x;
| float geometricError = model_pointCloudParameters.y;
| float depthMultiplier = model_pointCloudParameters.z;
|
| float depth = -positionEC.z;
| return min((geometricError / depth) * depthMultiplier, pointSize);
| }
|
| #ifdef HAS_POINT_CLOUD_SHOW_STYLE
| float pointCloudShowStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
| float tiles3d_tileset_time = model_pointCloudParameters.w;
| return float(getShowFromStyle(attributes, metadata, tiles3d_tileset_time));
| }
| #endif
|
| #ifdef HAS_POINT_CLOUD_COLOR_STYLE
| vec4 pointCloudColorStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
| float tiles3d_tileset_time = model_pointCloudParameters.w;
| return getColorFromStyle(attributes, metadata, tiles3d_tileset_time);
| }
| #endif
|
| #ifdef HAS_POINT_CLOUD_POINT_SIZE_STYLE
| float pointCloudPointSizeStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
| float tiles3d_tileset_time = model_pointCloudParameters.w;
| return float(getPointSizeFromStyle(attributes, metadata, tiles3d_tileset_time));
| }
| #elif defined(HAS_POINT_CLOUD_ATTENUATION)
| float pointCloudPointSizeStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
| return getPointSizeFromAttenuation(v_positionEC);
| }
| #endif
|
| #ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING
| float pointCloudBackFaceCullingStage() {
| #if defined(HAS_NORMALS) && !defined(HAS_DOUBLE_SIDED_MATERIAL)
| // This needs to be computed in eye coordinates so we can't use attributes.normalMC
| return step(-v_normalEC.z, 0.0);
| #else
| return 1.0;
| #endif
| }
| #endif`;var f4e=new ee,foe={name:"PointCloudStylingPipelineStage"};foe.process=function(e,t,n){let i=e.shaderBuilder,o=e.model,r=o.style,s=o.structuralMetadata,a=c(s)?s.propertyAttributes:void 0,l=c(o.featureTableId)&&o.featureTables[o.featureTableId].featuresLength>0,u=!c(a)&&l;if(c(r)&&!u){let b=p4e(a),x=_4e(r,b);g4e(i,x);let E=y4e(x).indexOf("normalMC")>=0,S=Xt.getAttributeBySemantic(t,Tt.NORMAL);if(E&&!S)throw new ie("Style references the NORMAL semantic but the point cloud does not have normals");i.addDefine("COMPUTE_POSITION_WC_STYLE",void 0,ce.VERTEX),x.styleTranslucent&&(e.alphaOptions.pass=xe.TRANSLUCENT)}let f=o.pointCloudShading;f.attenuation&&i.addDefine("HAS_POINT_CLOUD_ATTENUATION",void 0,ce.VERTEX),f.backFaceCulling&&i.addDefine("HAS_POINT_CLOUD_BACK_FACE_CULLING",void 0,ce.VERTEX);let h,m,p;fr.is3DTiles(o.type)&&(m=!0,h=o.content,p=h.tile.refine===ko.ADD),i.addUniform("vec4","model_pointCloudParameters",ce.VERTEX),i.addVertexLines(kF);let _=e.uniformMap;_.model_pointCloudParameters=function(){let b=f4e,x=1;m&&(x=p?5:h.tileset.memoryAdjustedScreenSpaceError),b.x=g(f.maximumAttenuation,x),b.x*=n.pixelRatio;let T=d4e(e,t,f,h);b.y=T*f.geometricErrorScale;let E=n.context,S=n.camera.frustum,A;return n.mode===J.SCENE2D||S instanceof an?A=Number.POSITIVE_INFINITY:A=E.drawingBufferHeight/n.camera.frustum.sseDenominator,b.z=A,m&&(b.w=h.tileset.timeSinceLoad),b}};var uoe=new d;function d4e(e,t,n,i){if(c(i)){let f=i.tile.geometricError;if(f>0)return f}if(c(n.baseResolution))return n.baseResolution;let o=Xt.getAttributeBySemantic(t,Tt.POSITION),r=o.count,s=e.runtimeNode.transform,a=d.subtract(o.max,o.min,uoe);a=N.multiplyByPointAsVector(s,a,uoe);let l=a.x*a.y*a.z;return O.cbrt(l/r)}var h4e={colorStyleFunction:void 0,showStyleFunction:void 0,pointSizeStyleFunction:void 0,styleTranslucent:!1},m4e={POSITION:"attributes.positionMC",POSITION_ABSOLUTE:"v_positionWC",COLOR:"attributes.color_0",NORMAL:"attributes.normalMC"};function p4e(e){let t=ze(m4e);if(!c(e))return t;for(let n=0;n<e.length;n++){let o=e[n].properties;for(let r in o)o.hasOwnProperty(r)&&(t[r]=`metadata.${r}`)}return t}var A5="ProcessedAttributes attributes, Metadata metadata, float tiles3d_tileset_time";function _4e(e,t){let n=h4e,i={translucent:!1};return n.colorStyleFunction=e.getColorShaderFunction(`getColorFromStyle(${A5})`,t,i),n.showStyleFunction=e.getShowShaderFunction(`getShowFromStyle(${A5})`,t,i),n.pointSizeStyleFunction=e.getPointSizeShaderFunction(`getPointSizeFromStyle(${A5})`,t,i),n.styleTranslucent=c(n.colorStyleFunction)&&i.translucent,n}function g4e(e,t){let n=t.colorStyleFunction;c(n)&&(e.addDefine("HAS_POINT_CLOUD_COLOR_STYLE",void 0,ce.BOTH),e.addVertexLines(n),e.addVarying("vec4","v_pointCloudColor"));let i=t.showStyleFunction;c(i)&&(e.addDefine("HAS_POINT_CLOUD_SHOW_STYLE",void 0,ce.VERTEX),e.addVertexLines(i));let o=t.pointSizeStyleFunction;c(o)&&(e.addDefine("HAS_POINT_CLOUD_POINT_SIZE_STYLE",void 0,ce.VERTEX),e.addVertexLines(o))}function v5(e,t){let n=/attributes\.(\w+)/g,i=n.exec(e);for(;i!==null;){let o=i[1];t.indexOf(o)===-1&&t.push(o),i=n.exec(e)}}function y4e(e){let t=e.colorStyleFunction,n=e.showStyleFunction,i=e.pointSizeStyleFunction,o=[];return c(t)&&v5(t,o),c(n)&&v5(n,o),c(i)&&v5(i,o),o}var UF=foe;var zF=`void primitiveOutlineStage() {
| v_outlineCoordinates = a_outlineCoordinates;
| }
| `;var VF=`void primitiveOutlineStage(inout czm_modelMaterial material) {
| if (!model_showOutline) {
| return;
| }
|
| float outlineX =
| texture(model_outlineTexture, vec2(v_outlineCoordinates.x, 0.5)).r;
| float outlineY =
| texture(model_outlineTexture, vec2(v_outlineCoordinates.y, 0.5)).r;
| float outlineZ =
| texture(model_outlineTexture, vec2(v_outlineCoordinates.z, 0.5)).r;
| float outlineness = max(outlineX, max(outlineY, outlineZ));
|
| material.diffuse = mix(material.diffuse, model_outlineColor.rgb, model_outlineColor.a * outlineness);
| }
|
| `;var doe={name:"PrimitiveOutlinePipelineStage"};doe.process=function(e,t,n){let i=e.shaderBuilder,o=e.uniformMap;i.addDefine("HAS_PRIMITIVE_OUTLINE",void 0,ce.BOTH),i.addAttribute("vec3","a_outlineCoordinates"),i.addVarying("vec3","v_outlineCoordinates");let r=t.outlineCoordinates,s={index:e.attributeIndex++,vertexBuffer:r.buffer,componentsPerAttribute:tn.getNumberOfComponents(r.type),componentDatatype:r.componentDatatype,offsetInBytes:r.byteOffset,strideInBytes:r.byteStride,normalize:r.normalized};e.attributes.push(s),i.addUniform("sampler2D","model_outlineTexture",ce.FRAGMENT);let a=XT.createTexture(n.context);o.model_outlineTexture=function(){return a};let l=e.model;i.addUniform("vec4","model_outlineColor",ce.FRAGMENT),o.model_outlineColor=function(){return l.outlineColor},i.addUniform("bool","model_showOutline",ce.FRAGMENT),o.model_showOutline=function(){return l.showOutline},i.addVertexLines(zF),i.addFragmentLines(VF)};var HF=doe;var hoe={name:"PrimitiveStatisticsPipelineStage",_countGeometry:moe,_count2DPositions:poe,_countMorphTargetAttributes:_oe,_countMaterialTextures:goe,_countFeatureIdTextures:yoe,_countBinaryMetadata:boe};hoe.process=function(e,t,n){let i=e.model,o=i.statistics;moe(o,t),poe(o,e.runtimePrimitive),_oe(o,t),goe(o,t.material),yoe(o,t.featureIds),boe(o,i)};function moe(e,t){let n=c(t.indices)?t.indices.count:Xt.getAttributeBySemantic(t,"POSITION").count,i=t.primitiveType;i===Se.POINTS?e.pointsLength+=n:Se.isTriangles(i)&&(e.trianglesLength+=b4e(i,n));let o=t.attributes,r=o.length;for(let l=0;l<r;l++){let u=o[l];if(c(u.buffer)){let f=c(u.typedArray);e.addBuffer(u.buffer,f)}}let s=t.outlineCoordinates;c(s)&&c(s.buffer)&&e.addBuffer(s.buffer,!1);let a=t.indices;if(c(a)&&c(a.buffer)){let l=c(a.typedArray);e.addBuffer(a.buffer,l)}}function b4e(e,t){switch(e){case Se.TRIANGLES:return t/3;case Se.TRIANGLE_STRIP:case Se.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function poe(e,t){let n=t.positionBuffer2D;c(n)&&e.addBuffer(n,!0)}function _oe(e,t){let n=t.morphTargets;if(!c(n))return;let i=!1,o=n.length;for(let r=0;r<o;r++){let s=n[r].attributes,a=s.length;for(let l=0;l<a;l++){let u=s[l];c(u.buffer)&&e.addBuffer(u.buffer,i)}}}function goe(e,t){let n=x4e(t),i=n.length;for(let o=0;o<i;o++){let r=n[o];c(r)&&c(r.texture)&&e.addTexture(r.texture)}}function x4e(e){let t=e.metallicRoughness,n=[e.emissiveTexture,e.normalTexture,e.occlusionTexture,t.baseColorTexture,t.metallicRoughnessTexture],i=e.specularGlossiness;return c(i)&&(n.push(i.diffuseTexture),n.push(i.specularGlossinessTexture)),n}function yoe(e,t){let n=t.length;for(let i=0;i<n;i++){let o=t[i];if(o instanceof bn.FeatureIdTexture){let r=o.textureReader;c(r.texture)&&e.addTexture(r.texture)}}}function boe(e,t){let n=t.structuralMetadata;c(n)&&(T4e(e,n),e.propertyTablesByteLength+=n.propertyTablesByteLength);let i=t.featureTables;if(!c(i))return;let o=i.length;for(let r=0;r<o;r++){let s=i[r];e.addBatchTexture(s.batchTexture)}}function T4e(e,t){let n=t.propertyTextures;if(!c(n))return;let i=n.length;for(let o=0;o<i;o++){let s=n[o].properties;for(let a in s)if(s.hasOwnProperty(a)){let u=s[a].textureReader;c(u.texture)&&e.addTexture(u.texture)}}}var GF=hoe;var C4e=new N,E4e=new N,xoe={name:"SceneMode2DPipelineStage"};xoe.process=function(e,t,n){let i=Xt.getAttributeBySemantic(t,Tt.POSITION),o=e.shaderBuilder,r=e.model,s=r.sceneGraph.computedModelMatrix,a=e.runtimeNode.computedTransform,l=N.multiplyTransformation(s,a,C4e),u=A4e(e,l,n),f=e.runtimePrimitive;f.boundingSphere2D=u;let h=e.runtimeNode.node.instances;if(c(h))return;if(c(i.typedArray)){let b=I4e(i,l,u,n);f.positionBuffer2D=b,r._modelResources.push(b),i.typedArray=void 0}o.addDefine("USE_2D_POSITIONS",void 0,ce.VERTEX),o.addUniform("mat4","u_modelView2D",ce.VERTEX);let m=N.fromTranslation(u.center,new N),p=n.context,_={u_modelView2D:function(){return N.multiplyTransformation(p.uniformState.view,m,E4e)}};e.uniformMap=bt(_,e.uniformMap)};var w4e=new d,S4e=new d;function A4e(e,t,n){let i=N.multiplyByPoint(t,e.positionMin,w4e),o=Yi.computeActualEllipsoidPosition(n,i,i),r=N.multiplyByPoint(t,e.positionMax,S4e),s=Yi.computeActualEllipsoidPosition(n,r,r);return ne.fromCornerPoints(o,s,new ne)}var Toe=new d;function v4e(e,t){let n=e.length,i=new Float32Array(n),o=t.quantizedVolumeOffset,r=t.quantizedVolumeStepSize;for(let s=0;s<n;s+=3){let a=d.fromArray(e,s,Toe),l=d.multiplyComponents(a,r,a),u=d.add(l,o,l);i[s]=u.x,i[s+1]=u.y,i[s+2]=u.z}return i}function D4e(e,t,n,i){let o;c(e.quantization)?o=v4e(e.typedArray,e.quantization):o=e.typedArray.slice();let r=e.byteOffset/Float32Array.BYTES_PER_ELEMENT,s=o.length,a=c(e.byteStride)?e.byteStride/Float32Array.BYTES_PER_ELEMENT:3;for(let l=r;l<s;l+=a){let u=d.fromArray(o,l,Toe);if(isNaN(u.x)||isNaN(u.y)||isNaN(u.z))continue;let f=N.multiplyByPoint(t,u,u),h=Yi.computeActualEllipsoidPosition(i,f,f),m=d.subtract(h,n,h);o[l]=m.x,o[l+1]=m.y,o[l+2]=m.z}return o}function I4e(e,t,n,i){let o=ze(i);o.mode=J.COLUMBUS_VIEW;let r=n.center,s=D4e(e,t,r,o),a=yt.createVertexBuffer({context:i.context,typedArray:s,usage:Pe.STATIC_DRAW});return a.vertexArrayDestroyable=!1,a}var jF=xoe;var WF=`void skinningStage(inout ProcessedAttributes attributes)
| {
| mat4 skinningMatrix = getSkinningMatrix();
| mat3 skinningMatrixMat3 = mat3(skinningMatrix);
|
| vec4 positionMC = vec4(attributes.positionMC, 1.0);
| attributes.positionMC = vec3(skinningMatrix * positionMC);
|
| #ifdef HAS_NORMALS
| vec3 normalMC = attributes.normalMC;
| attributes.normalMC = skinningMatrixMat3 * normalMC;
| #endif
|
| #ifdef HAS_TANGENTS
| vec3 tangentMC = attributes.tangentMC;
| attributes.tangentMC = skinningMatrixMat3 * tangentMC;
| #endif
| }`;var Hb={name:"SkinningPipelineStage",FUNCTION_ID_GET_SKINNING_MATRIX:"getSkinningMatrix",FUNCTION_SIGNATURE_GET_SKINNING_MATRIX:"mat4 getSkinningMatrix()"};Hb.process=function(e,t){let n=e.shaderBuilder;n.addDefine("HAS_SKINNING",void 0,ce.VERTEX),P4e(n,t);let i=e.runtimeNode,o=i.computedJointMatrices;n.addUniform("mat4",`u_jointMatrices[${o.length}]`,ce.VERTEX),n.addVertexLines(WF);let r={u_jointMatrices:function(){return i.computedJointMatrices}};e.uniformMap=bt(r,e.uniformMap)};function O4e(e){let t=-1,n=e.attributes,i=n.length;for(let o=0;o<i;o++){let r=n[o];(r.semantic===Tt.JOINTS||r.semantic===Tt.WEIGHTS)&&(t=Math.max(t,r.setIndex))}return t}function P4e(e,t){e.addFunction(Hb.FUNCTION_ID_GET_SKINNING_MATRIX,Hb.FUNCTION_SIGNATURE_GET_SKINNING_MATRIX,ce.VERTEX),e.addFunctionLines(Hb.FUNCTION_ID_GET_SKINNING_MATRIX,["mat4 skinnedMatrix = mat4(0);"]);let i,o,r=["x","y","z","w"],s=O4e(t);for(i=0;i<=s;i++)for(o=0;o<=3;o++){let l=r[o],u=`skinnedMatrix += a_weights_${i}.${l} * u_jointMatrices[int(a_joints_${i}.${l})];`;e.addFunctionLines(Hb.FUNCTION_ID_GET_SKINNING_MATRIX,[u])}e.addFunctionLines(Hb.FUNCTION_ID_GET_SKINNING_MATRIX,["return skinnedMatrix;"])}var qF=Hb;var YF=`void verticalExaggerationStage(
| inout ProcessedAttributes attributes
| ) {
| // Compute the distance from the camera to the local center of curvature.
| vec4 vertexPositionENU = czm_modelToEnu * vec4(attributes.positionMC, 1.0);
| vec2 vertexAzimuth = normalize(vertexPositionENU.xy);
| // Curvature = 1 / radius of curvature.
| float azimuthalCurvature = dot(vertexAzimuth * vertexAzimuth, czm_eyeEllipsoidCurvature);
| float eyeToCenter = 1.0 / azimuthalCurvature + czm_eyeHeight;
|
| // Compute the approximate ellipsoid normal at the vertex position.
| // Uses a circular approximation for the Earth curvature along the geodesic.
| vec3 vertexPositionEC = (czm_modelView * vec4(attributes.positionMC, 1.0)).xyz;
| vec3 centerToVertex = eyeToCenter * czm_eyeEllipsoidNormalEC + vertexPositionEC;
| vec3 vertexNormal = normalize(centerToVertex);
|
| // Estimate the (sine of the) angle between the camera direction and the vertex normal
| float verticalDistance = dot(vertexPositionEC, czm_eyeEllipsoidNormalEC);
| float horizontalDistance = length(vertexPositionEC - verticalDistance * czm_eyeEllipsoidNormalEC);
| float sinTheta = horizontalDistance / (eyeToCenter + verticalDistance);
| bool isSmallAngle = clamp(sinTheta, 0.0, 0.05) == sinTheta;
|
| // Approximate the change in height above the ellipsoid, from camera to vertex position.
| float exactVersine = 1.0 - dot(czm_eyeEllipsoidNormalEC, vertexNormal);
| float smallAngleVersine = 0.5 * sinTheta * sinTheta;
| float versine = isSmallAngle ? smallAngleVersine : exactVersine;
| float dHeight = dot(vertexPositionEC, vertexNormal) - eyeToCenter * versine;
| float vertexHeight = czm_eyeHeight + dHeight;
|
| // Transform the approximate vertex normal to model coordinates.
| vec3 vertexNormalMC = (czm_inverseModelView * vec4(vertexNormal, 0.0)).xyz;
| vertexNormalMC = normalize(vertexNormalMC);
|
| // Compute the exaggeration and apply it along the approximate vertex normal.
| float stretch = u_verticalExaggerationAndRelativeHeight.x;
| float shift = u_verticalExaggerationAndRelativeHeight.y;
| float exaggeration = (vertexHeight - shift) * (stretch - 1.0);
| attributes.positionMC += exaggeration * vertexNormalMC;
| }
| `;var Coe={name:"VerticalExaggerationPipelineStage"},R4e=new k;Coe.process=function(e,t,n){let{shaderBuilder:i,uniformMap:o}=e;i.addVertexLines(YF),i.addDefine("HAS_VERTICAL_EXAGGERATION",void 0,ce.VERTEX),i.addUniform("vec2","u_verticalExaggerationAndRelativeHeight",ce.VERTEX),o.u_verticalExaggerationAndRelativeHeight=function(){return k.fromElements(n.verticalExaggeration,n.verticalExaggerationRelativeHeight,R4e)}};var XF=Coe;var D5={};function M4e(e){let t=Oe.createTypedArray(e,e*2),n=e,i=0;for(let o=0;o<n;o+=3)t[i++]=o,t[i++]=o+1,t[i++]=o+1,t[i++]=o+2,t[i++]=o+2,t[i++]=o;return t}function L4e(e,t){let n=t.length,i=Oe.createTypedArray(e,n*2),o=0;for(let r=0;r<n;r+=3){let s=t[r],a=t[r+1],l=t[r+2];i[o++]=s,i[o++]=a,i[o++]=a,i[o++]=l,i[o++]=l,i[o++]=s}return i}function N4e(e){let t=e-2,n=2+t*4,i=Oe.createTypedArray(e,n),o=0;i[o++]=0,i[o++]=1;for(let r=0;r<t;r++)i[o++]=r+1,i[o++]=r+2,i[o++]=r+2,i[o++]=r;return i}function F4e(e,t){let i=t.length-2,o=2+i*4,r=Oe.createTypedArray(e,o),s=0;r[s++]=t[0],r[s++]=t[1];for(let a=0;a<i;a++){let l=t[a],u=t[a+1],f=t[a+2];r[s++]=u,r[s++]=f,r[s++]=f,r[s++]=l}return r}function B4e(e){let t=e-2,n=2+t*4,i=Oe.createTypedArray(e,n),o=0;i[o++]=0,i[o++]=1;for(let r=0;r<t;r++)i[o++]=r+1,i[o++]=r+2,i[o++]=r+2,i[o++]=0;return i}function k4e(e,t){let i=t.length-2,o=2+i*4,r=Oe.createTypedArray(e,o),s=0,a=t[0];r[s++]=a,r[s++]=t[1];for(let l=0;l<i;l++){let u=t[l+1],f=t[l+2];r[s++]=u,r[s++]=f,r[s++]=f,r[s++]=a}return r}D5.createWireframeIndices=function(e,t,n){let i=c(n);if(e===Se.TRIANGLES)return i?L4e(t,n):M4e(t);if(e===Se.TRIANGLE_STRIP)return i?F4e(t,n):N4e(t);if(e===Se.TRIANGLE_FAN)return i?k4e(t,n):B4e(t)};D5.getWireframeIndicesCount=function(e,t){return e===Se.TRIANGLES?t*2:e===Se.TRIANGLE_STRIP||e===Se.TRIANGLE_FAN?2+(t-2)*4:t};var HA=D5;var Eoe={name:"WireframePipelineStage"};Eoe.process=function(e,t,n){e.shaderBuilder.addDefine("HAS_WIREFRAME",void 0,ce.FRAGMENT);let o=e.model,r=U4e(t,e.indices,n);o._pipelineResources.push(r),e.wireframeIndexBuffer=r,o.statistics.addBuffer(r,!1);let a=e.primitiveType,l=e.count;e.primitiveType=Se.LINES,e.count=HA.getWireframeIndicesCount(a,l)};function U4e(e,t,n){let o=Xt.getAttributeBySemantic(e,Tt.POSITION).count,r=n.context.webgl2,s;if(c(t)){let f=t.buffer,h=t.count;c(f)&&r?(s=f.sizeInBytes===h?new Uint8Array(h):Oe.createTypedArray(o,h),f.getBufferData(s)):s=t.typedArray}let a=e.primitiveType,l=HA.createWireframeIndices(a,o,s),u=Oe.fromSizeInBytes(l.BYTES_PER_ELEMENT);return yt.createIndexBuffer({context:n.context,typedArray:l,usage:Pe.STATIC_DRAW,indexDatatype:u})}var KF=Eoe;function woe(e){e=g(e,g.EMPTY_OBJECT);let t=e.primitive,n=e.node,i=e.model;C.typeOf.object("options.primitive",t),C.typeOf.object("options.node",n),C.typeOf.object("options.model",i),this.primitive=t,this.node=n,this.model=i,this.pipelineStages=[],this.drawCommand=void 0,this.boundingSphere=void 0,this.boundingSphere2D=void 0,this.positionBuffer2D=void 0,this.batchLengths=void 0,this.batchOffsets=void 0,this.updateStages=[]}woe.prototype.configurePipeline=function(e){let t=this.pipelineStages;t.length=0;let n=this.primitive,i=this.node,o=this.model,r=o.customShader,s=o.style,a=e.context.webgl2,u=e.mode!==J.SCENE3D&&!e.scene3DOnly&&o._projectTo2D,f=e.verticalExaggeration!==1&&o.hasVerticalExaggeration,h=c(n.morphTargets)&&n.morphTargets.length>0,m=c(i.skin),p=c(r),b=!(p&&c(r.fragmentShaderText))||r.mode!==dg.REPLACE_MATERIAL,x=Xt.hasQuantizedAttributes(n.attributes),T=o.debugWireframe&&Se.isTriangles(n.primitiveType)&&(o._enableDebugWireframe||a),E=o.pointCloudShading,S=c(E)&&E.attenuation,A=c(E)&&E.backFaceCulling,v=n.primitiveType===Se.POINTS&&(c(s)||S||A),D=o._enableShowOutline&&c(n.outlineCoordinates),R=z4e(o,i,n),P=c(o.classificationType);u&&t.push(jF),t.push(OF),T&&t.push(KF),P&&t.push(_F),h&&t.push(FF),m&&t.push(qF),v&&t.push(UF),x&&t.push(vF),b&&t.push(LF),t.push(Ub),t.push(Zf),t.push(Yu),R.hasPropertyTable&&(t.push(Vb),t.push(pF),t.push(bF)),f&&t.push(XF),p&&t.push(AF),t.push(RF),o.allowPicking&&t.push(BF),D&&t.push(HF),t.push(mF),t.push(GF)};function z4e(e,t,n){let i;return c(t.instances)&&(i=Xt.getFeatureIdsByLabel(t.instances.featureIds,e.instanceFeatureIdLabel),c(i))?{hasFeatureIds:!0,hasPropertyTable:c(i.propertyTableId)}:(i=Xt.getFeatureIdsByLabel(n.featureIds,e.featureIdLabel),c(i)?{hasFeatureIds:!0,hasPropertyTable:c(i.propertyTableId)}:{hasFeatureIds:!1,hasPropertyTable:!1})}var $F=woe;function I5(e){e=g(e,g.EMPTY_OBJECT),C.typeOf.object("options.skin",e.skin),C.typeOf.object("options.sceneGraph",e.sceneGraph),this._sceneGraph=e.sceneGraph;let t=e.skin;this._skin=t,this._inverseBindMatrices=void 0,this._joints=[],this._jointMatrices=[],V4e(this)}Object.defineProperties(I5.prototype,{skin:{get:function(){return this._skin}},sceneGraph:{get:function(){return this._sceneGraph}},inverseBindMatrices:{get:function(){return this._inverseBindMatrices}},joints:{get:function(){return this._joints}},jointMatrices:{get:function(){return this._jointMatrices}}});function V4e(e){let t=e.skin,n=t.inverseBindMatrices;e._inverseBindMatrices=n;let i=t.joints,o=i.length,r=e.sceneGraph._runtimeNodes,s=e.joints,a=e._jointMatrices;for(let l=0;l<o;l++){let u=i[l].index,f=r[u];s.push(f);let h=n[l],m=Soe(f,h,new N);a.push(m)}}function Soe(e,t,n){let i=N.multiplyTransformation(e.transformToRoot,e.transform,n);return n=N.multiplyTransformation(i,t,n),n}I5.prototype.updateJointMatrices=function(){let e=this._jointMatrices,t=e.length;for(let n=0;n<t;n++){let i=this.joints[n],o=this.inverseBindMatrices[n];e[n]=Soe(i,o,e[n])}};var ZF=I5;function H4e(){this.pass=void 0,this.alphaCutoff=void 0}var JF=H4e;function G4e(e){C.typeOf.object("model",e),this.shaderBuilder=new Kx,this.model=e,this.uniformMap={},this.alphaOptions=new JF,this.renderStateOptions=Fe.getState(Fe.fromCache({depthTest:{enabled:!0,func:cc.LESS_OR_EQUAL}})),this.hasSilhouette=!1,this.hasSkipLevelOfDetail=!1}var QF=G4e;var e2=`void silhouetteStage(inout vec4 color) {
| if(model_silhouettePass) {
| color = czm_gammaCorrect(model_silhouetteColor);
| }
| }`;var t2=`void silhouetteStage(in ProcessedAttributes attributes, inout vec4 positionClip) {
| #ifdef HAS_NORMALS
| if(model_silhouettePass) {
| vec3 normal = normalize(czm_normal3D * attributes.normalMC);
| normal.x *= czm_projection[0][0];
| normal.y *= czm_projection[1][1];
| positionClip.xy += normal.xy * positionClip.w * model_silhouetteSize * czm_pixelRatio / czm_viewport.z;
| }
| #endif
| }
| `;var n2={name:"ModelSilhouettePipelineStage"};n2.silhouettesLength=0;n2.process=function(e,t,n){c(t._silhouetteId)||(t._silhouetteId=++n2.silhouettesLength);let i=e.shaderBuilder;i.addDefine("HAS_SILHOUETTE",void 0,ce.BOTH),i.addVertexLines(t2),i.addFragmentLines(e2),i.addUniform("vec4","model_silhouetteColor",ce.FRAGMENT),i.addUniform("float","model_silhouetteSize",ce.VERTEX),i.addUniform("bool","model_silhouettePass",ce.BOTH);let o={model_silhouetteColor:function(){return t.silhouetteColor},model_silhouetteSize:function(){return t.silhouetteSize},model_silhouettePass:function(){return!1}};e.uniformMap=bt(o,e.uniformMap),e.hasSilhouette=!0};var i2=n2;var o2=`void modelSplitterStage()
| {
| // Don't split when rendering the shadow map, because it is rendered from
| // the perspective of a totally different camera.
| #ifndef SHADOW_MAP
| if (model_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
| if (model_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
| #endif
| }
| `;var r2={name:"ModelSplitterPipelineStage",SPLIT_DIRECTION_UNIFORM_NAME:"model_splitDirection"};r2.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_MODEL_SPLITTER",void 0,ce.FRAGMENT),i.addFragmentLines(o2);let o={};i.addUniform("float",r2.SPLIT_DIRECTION_UNIFORM_NAME,ce.FRAGMENT),o[r2.SPLIT_DIRECTION_UNIFORM_NAME]=function(){return t.splitDirection},e.uniformMap=bt(o,e.uniformMap)};var s2=r2;function j4e(e,t){C.typeOf.object("modelRenderResources",e),C.typeOf.object("runtimeNode",t),this.model=e.model,this.shaderBuilder=e.shaderBuilder.clone(),this.uniformMap=ze(e.uniformMap),this.alphaOptions=ze(e.alphaOptions),this.renderStateOptions=ze(e.renderStateOptions,!0),this.hasSilhouette=e.hasSilhouette,this.hasSkipLevelOfDetail=e.hasSkipLevelOfDetail,this.runtimeNode=t,this.attributes=[],this.attributeIndex=1,this.featureIdVertexAttributeSetIndex=0,this.instanceCount=0}var a2=j4e;function W4e(e){e=g(e,g.EMPTY_OBJECT),this.lightingModel=g(e.lightingModel,cp.UNLIT)}var c2=W4e;function q4e(e,t){C.typeOf.object("nodeRenderResources",e),C.typeOf.object("runtimePrimitive",t),this.model=e.model,this.runtimeNode=e.runtimeNode,this.attributes=e.attributes.slice(),this.attributeIndex=e.attributeIndex,this.featureIdVertexAttributeSetIndex=e.featureIdVertexAttributeSetIndex,this.uniformMap=ze(e.uniformMap),this.alphaOptions=ze(e.alphaOptions),this.renderStateOptions=ze(e.renderStateOptions,!0),this.hasSilhouette=e.hasSilhouette,this.hasSkipLevelOfDetail=e.hasSkipLevelOfDetail,this.shaderBuilder=e.shaderBuilder.clone(),this.instanceCount=e.instanceCount,this.runtimePrimitive=t;let n=t.primitive;this.count=c(n.indices)?n.indices.count:Xt.getAttributeBySemantic(n,"POSITION").count,this.hasPropertyTable=!1,this.indices=n.indices,this.wireframeIndexBuffer=void 0,this.primitiveType=n.primitiveType;let i=Xt.getPositionMinMax(n,this.runtimeNode.instancingTranslationMin,this.runtimeNode.instancingTranslationMax);this.positionMin=d.clone(i.min,new d),this.positionMax=d.clone(i.max,new d),this.boundingSphere=ne.fromCornerPoints(this.positionMin,this.positionMax,new ne),this.lightingOptions=new c2,this.pickId=void 0}var l2=q4e;function P5(e){e=g(e,g.EMPTY_OBJECT);let t=e.command,n=e.primitiveRenderResources;C.typeOf.object("options.command",t),C.typeOf.object("options.primitiveRenderResources",n);let i=n.model;this._command=t,this._model=i,this._runtimePrimitive=n.runtimePrimitive,this._modelMatrix=t.modelMatrix,this._boundingVolume=t.boundingVolume,this._cullFace=t.renderState.cull.face;let o=i.classificationType;this._classificationType=o,this._classifiesTerrain=o!==Ln.CESIUM_3D_TILE,this._classifies3DTiles=o!==Ln.TERRAIN,this._useDebugWireframe=i._enableDebugWireframe&&i.debugWireframe,this._pickId=n.pickId,this._commandListTerrain=[],this._commandList3DTiles=[],this._commandListIgnoreShow=[],this._commandListDebugWireframe=[],this._commandListTerrainPicking=[],this._commandList3DTilesPicking=[],$4e(this)}function Y4e(e){return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:e,frontOperation:{fail:ut.KEEP,zFail:ut.DECREMENT_WRAP,zPass:ut.KEEP},backFunction:e,backOperation:{fail:ut.KEEP,zFail:ut.INCREMENT_WRAP,zPass:ut.KEEP},reference:kt.CESIUM_3D_TILE_MASK,mask:kt.CESIUM_3D_TILE_MASK},stencilMask:kt.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:cc.LESS_OR_EQUAL},depthMask:!1}}var X4e={stencilTest:{enabled:!0,frontFunction:Nn.NOT_EQUAL,frontOperation:{fail:ut.ZERO,zFail:ut.ZERO,zPass:ut.ZERO},backFunction:Nn.NOT_EQUAL,backOperation:{fail:ut.ZERO,zFail:ut.ZERO,zPass:ut.ZERO},reference:0,mask:kt.CLASSIFICATION_MASK},stencilMask:kt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:cn.PRE_MULTIPLIED_ALPHA_BLEND},K4e={stencilTest:{enabled:!0,frontFunction:Nn.NOT_EQUAL,frontOperation:{fail:ut.ZERO,zFail:ut.ZERO,zPass:ut.ZERO},backFunction:Nn.NOT_EQUAL,backOperation:{fail:ut.ZERO,zFail:ut.ZERO,zPass:ut.ZERO},reference:0,mask:kt.CLASSIFICATION_MASK},stencilMask:kt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1},Doe=[];function $4e(e){let t=e._command,n=Doe;if(e._useDebugWireframe){t.pass=xe.OPAQUE,n.length=0,n.push(t),e._commandListDebugWireframe=GA(e,n,e._commandListDebugWireframe);let r=e._commandListDebugWireframe,s=r.length;for(let a=0;a<s;a++){let l=r[a];l.count*=2,l.offset*=2}return}let o=e.model.allowPicking;if(e._classifiesTerrain){let r=xe.TERRAIN_CLASSIFICATION,s=O5(t,r),a=Aoe(t,r);n.length=0,n.push(s,a),e._commandListTerrain=GA(e,n,e._commandListTerrain),o&&(e._commandListTerrainPicking=voe(e,n,e._commandListTerrainPicking))}if(e._classifies3DTiles){let r=xe.CESIUM_3D_TILE_CLASSIFICATION,s=O5(t,r),a=Aoe(t,r);n.length=0,n.push(s,a),e._commandList3DTiles=GA(e,n,e._commandList3DTiles),o&&(e._commandList3DTilesPicking=voe(e,n,e._commandList3DTilesPicking))}}function GA(e,t,n){let i=e._runtimePrimitive,o=i.batchLengths,r=i.batchOffsets,s=o.length,a=t.length;for(let l=0;l<s;l++){let u=o[l],f=r[l];for(let h=0;h<a;h++){let m=t[h],p=Ke.shallowClone(m);p.count=u,p.offset=f,n.push(p)}}return n}function O5(e,t){let n=Ke.shallowClone(e);n.cull=!1,n.pass=t;let i=t===xe.TERRAIN_CLASSIFICATION?Nn.ALWAYS:Nn.EQUAL,o=Y4e(i);return n.renderState=Fe.fromCache(o),n}function Aoe(e,t){let n=Ke.shallowClone(e);return n.cull=!1,n.pass=t,n.renderState=Fe.fromCache(X4e),n}var Z4e=[];function voe(e,t,n){let i=Fe.fromCache(K4e),o=t[0],r=t[1],s=Ke.shallowClone(o);s.cull=!0,s.pickOnly=!0;let a=Ke.shallowClone(r);a.cull=!0,a.pickOnly=!0,a.renderState=i,a.pickId=e._pickId;let l=Z4e;return l.length=0,l.push(s,a),GA(e,l,n)}Object.defineProperties(P5.prototype,{command:{get:function(){return this._command}},runtimePrimitive:{get:function(){return this._runtimePrimitive}},batchLengths:{get:function(){return this._runtimePrimitive.batchLengths}},batchOffsets:{get:function(){return this._runtimePrimitive.batchOffsets}},model:{get:function(){return this._model}},classificationType:{get:function(){return this._classificationType}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=N.clone(e,this._modelMatrix);let t=this._runtimePrimitive.boundingSphere;this._boundingVolume=ne.transform(t,this._modelMatrix,this._boundingVolume)}},boundingVolume:{get:function(){return this._boundingVolume}},cullFace:{get:function(){return this._cullFace},set:function(e){this._cullFace=e}}});P5.prototype.pushCommands=function(e,t){let n=e.passes;if(n.render){if(this._useDebugWireframe){t.push.apply(t,this._commandListDebugWireframe);return}if(this._classifiesTerrain&&t.push.apply(t,this._commandListTerrain),this._classifies3DTiles&&t.push.apply(t,this._commandList3DTiles),e.invertClassification&&this._classifies3DTiles){if(this._commandListIgnoreShow.length===0){let o=xe.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,r=O5(this._command,o),s=Doe;s.length=0,s.push(r),this._commandListIgnoreShow=GA(this,s,this._commandListIgnoreShow)}t.push.apply(t,this._commandListIgnoreShow)}}return n.pick&&(this._classifiesTerrain&&t.push.apply(t,this._commandListTerrainPicking),this._classifies3DTiles&&t.push.apply(t,this._commandList3DTilesPicking)),t};var u2=P5;function f2(e){e=g(e,g.EMPTY_OBJECT);let t=e.command,n=e.primitiveRenderResources;C.typeOf.object("options.command",t),C.typeOf.object("options.primitiveRenderResources",n);let i=n.model;this._model=i;let o=n.runtimePrimitive;this._runtimePrimitive=o;let r=t.pass===xe.TRANSLUCENT,a=!o.primitive.material.doubleSided&&!r,l=n.hasSilhouette,u=!r&&!l,f=n.hasSkipLevelOfDetail&&!r,h=l;this._command=t,this._modelMatrix=N.clone(t.modelMatrix),this._boundingVolume=ne.clone(t.boundingVolume),this._modelMatrix2D=new N,this._boundingVolume2D=new ne,this._modelMatrix2DDirty=!1,this._backFaceCulling=t.renderState.cull.enabled,this._cullFace=t.renderState.cull.face,this._shadows=i.shadows,this._debugShowBoundingVolume=t.debugShowBoundingVolume,this._usesBackFaceCulling=a,this._needsTranslucentCommand=u,this._needsSkipLevelOfDetailCommands=f,this._needsSilhouetteCommands=h,this._originalCommand=void 0,this._translucentCommand=void 0,this._skipLodBackfaceCommand=void 0,this._skipLodStencilCommand=void 0,this._silhouetteModelCommand=void 0,this._silhouetteColorCommand=void 0,this._derivedCommands=[],this._has2DCommands=!1,J4e(this)}function lp(e){this.command=e.command,this.updateShadows=e.updateShadows,this.updateBackFaceCulling=e.updateBackFaceCulling,this.updateCullFace=e.updateCullFace,this.updateDebugShowBoundingVolume=e.updateDebugShowBoundingVolume,this.is2D=g(e.is2D,!1),this.derivedCommand2D=void 0}lp.clone=function(e){return new lp({command:e.command,updateShadows:e.updateShadows,updateBackFaceCulling:e.updateBackFaceCulling,updateCullFace:e.updateCullFace,updateDebugShowBoundingVolume:e.updateDebugShowBoundingVolume,is2D:e.is2D,derivedCommand2D:e.derivedCommand2D})};function J4e(e){let t=e._command;t.modelMatrix=e._modelMatrix,t.boundingVolume=e._boundingVolume;let n=e._model,i=e._usesBackFaceCulling,o=e._derivedCommands;e._originalCommand=new lp({command:t,updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0,is2D:!1}),o.push(e._originalCommand),e._needsTranslucentCommand&&(e._translucentCommand=new lp({command:rGe(t),updateShadows:!0,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!0}),o.push(e._translucentCommand)),e._needsSkipLevelOfDetailCommands&&(e._skipLodBackfaceCommand=new lp({command:fGe(t),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:i,updateDebugShowBoundingVolume:!1}),e._skipLodStencilCommand=new lp({command:dGe(t,n),updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0}),o.push(e._skipLodBackfaceCommand),o.push(e._skipLodStencilCommand)),e._needsSilhouetteCommands&&(e._silhouetteModelCommand=new lp({command:sGe(t,n),updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0}),e._silhouetteColorCommand=new lp({command:aGe(t,n),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!1}),o.push(e._silhouetteModelCommand),o.push(e._silhouetteColorCommand))}Object.defineProperties(f2.prototype,{command:{get:function(){return this._command}},runtimePrimitive:{get:function(){return this._runtimePrimitive}},model:{get:function(){return this._model}},primitiveType:{get:function(){return this._command.primitiveType}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=N.clone(e,this._modelMatrix),this._modelMatrix2DDirty=!0,this._boundingVolume=ne.transform(this.runtimePrimitive.boundingSphere,this._modelMatrix,this._boundingVolume)}},boundingVolume:{get:function(){return this._boundingVolume}},shadows:{get:function(){return this._shadows},set:function(e){this._shadows=e,eGe(this)}},backFaceCulling:{get:function(){return this._backFaceCulling},set:function(e){this._backFaceCulling!==e&&(this._backFaceCulling=e,tGe(this))}},cullFace:{get:function(){return this._cullFace},set:function(e){this._cullFace!==e&&(this._cullFace=e,nGe(this))}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolume=e,iGe(this))}}});function Q4e(e,t){let n=e._modelMatrix;e._modelMatrix2D=N.clone(n,e._modelMatrix2D),e._modelMatrix2D[13]-=O.sign(n[13])*2*O.PI*t.mapProjection.ellipsoid.maximumRadius,e._boundingVolume2D=ne.transform(e.runtimePrimitive.boundingSphere,e._modelMatrix2D,e._boundingVolume2D)}function eGe(e){let t=e.shadows,n=yn.castShadows(t),i=yn.receiveShadows(t),o=e._derivedCommands;for(let r=0;r<o.length;++r){let s=o[r];if(s.updateShadows){let a=s.command;a.castShadows=n,a.receiveShadows=i}}}function tGe(e){let t=e.backFaceCulling,n=e._derivedCommands;for(let i=0;i<n.length;++i){let o=n[i];if(o.updateBackFaceCulling){let r=o.command,s=ze(r.renderState,!0);s.cull.enabled=t,r.renderState=Fe.fromCache(s)}}}function nGe(e){let t=e.cullFace,n=e._derivedCommands;for(let i=0;i<n.length;++i){let o=n[i];if(o.updateCullFace){let r=o.command,s=ze(r.renderState,!0);s.cull.face=t,r.renderState=Fe.fromCache(s)}}}function iGe(e){let t=e.debugShowBoundingVolume,n=e._derivedCommands;for(let i=0;i<n.length;++i){let o=n[i];if(o.updateDebugShowBoundingVolume){let r=o.command;r.debugShowBoundingVolume=t}}}f2.prototype.pushCommands=function(e,t){let n=Ioe(this,e);n&&!this._has2DCommands&&(oGe(this),this._has2DCommands=!0,this._modelMatrix2DDirty=!0),this._modelMatrix2DDirty&&(Q4e(this,e),this._modelMatrix2DDirty=!1);let i=this.model.styleCommandsNeeded;if(!(this._needsTranslucentCommand&&c(i)&&(i!==vh.ALL_OPAQUE&&lC(t,this._translucentCommand,n),i===vh.ALL_TRANSLUCENT))){if(this._needsSkipLevelOfDetailCommands){let{tileset:o,tile:r}=this._model.content;if(o.hasMixedContent){r._finalResolution||lC(o._backfaceCommands,this._skipLodBackfaceCommand,n),cGe(this,r,n),lC(t,this._skipLodStencilCommand,n);return}}if(this._needsSilhouetteCommands){lC(t,this._silhouetteModelCommand,n);return}return lC(t,this._originalCommand,n),t}};f2.prototype.pushSilhouetteCommands=function(e,t){let n=Ioe(this,e);return lC(t,this._silhouetteColorCommand,n),t};function lC(e,t,n){e.push(t.command),n&&e.push(t.derivedCommand2D.command)}function Ioe(e,t){if(t.mode!==J.SCENE2D||e.model._projectTo2D)return!1;let i=e.model.sceneGraph._boundingSphere2D,o=i.center.y-i.radius,r=i.center.y+i.radius,s=t.mapProjection.ellipsoid.maximumRadius*O.PI;return o<s&&r>s||o<-s&&r>-s}function cC(e,t){if(!c(t))return;let n=lp.clone(t),i=Ke.shallowClone(t.command);return i.modelMatrix=e._modelMatrix2D,i.boundingVolume=e._boundingVolume2D,n.command=i,n.updateShadows=!1,n.is2D=!0,t.derivedCommand2D=n,e._derivedCommands.push(n),n}function oGe(e){cC(e,e._originalCommand),cC(e,e._translucentCommand),cC(e,e._skipLodBackfaceCommand),cC(e,e._skipLodStencilCommand),cC(e,e._silhouetteModelCommand),cC(e,e._silhouetteColorCommand)}function rGe(e){let t=Ke.shallowClone(e);t.pass=xe.TRANSLUCENT;let n=ze(e.renderState,!0);return n.cull.enabled=!1,n.depthMask=!1,n.blending=cn.ALPHA_BLEND,t.renderState=Fe.fromCache(n),t}function sGe(e,t){let n=t._silhouetteId%255,i=Ke.shallowClone(e),o=ze(e.renderState,!0);return o.stencilTest={enabled:!0,frontFunction:Y.ALWAYS,backFunction:Y.ALWAYS,reference:n,mask:-1,frontOperation:{fail:Y.KEEP,zFail:Y.KEEP,zPass:Y.REPLACE},backOperation:{fail:Y.KEEP,zFail:Y.KEEP,zPass:Y.REPLACE}},t.isInvisible()&&(o.colorMask={red:!1,green:!1,blue:!1,alpha:!1}),i.renderState=Fe.fromCache(o),i}function aGe(e,t){let n=t._silhouetteId%255,i=Ke.shallowClone(e),o=ze(e.renderState,!0);o.cull.enabled=!1,(e.pass===xe.TRANSLUCENT||t.silhouetteColor.alpha<1)&&(i.pass=xe.TRANSLUCENT,o.depthMask=!1,o.blending=cn.ALPHA_BLEND),o.stencilTest={enabled:!0,frontFunction:Y.NOTEQUAL,backFunction:Y.NOTEQUAL,reference:n,mask:-1,frontOperation:{fail:Y.KEEP,zFail:Y.KEEP,zPass:Y.KEEP},backOperation:{fail:Y.KEEP,zFail:Y.KEEP,zPass:Y.KEEP}};let s=ze(e.uniformMap);return s.model_silhouettePass=function(){return!0},i.renderState=Fe.fromCache(o),i.uniformMap=s,i.castShadows=!1,i.receiveShadows=!1,i}function cGe(e,t,n){let i=e._skipLodStencilCommand,o=i.command,r=t._selectionDepth,s=lGe(o);if(r!==s){let a=uGe(r),l=ze(o.renderState,!0);l.stencilTest.reference=a,o.renderState=Fe.fromCache(l),n&&(i.derivedCommand2D.renderState=l)}}function lGe(e){return(e.renderState.stencilTest.reference&kt.SKIP_LOD_MASK)>>>kt.SKIP_LOD_BIT_SHIFT}function uGe(e){return kt.CESIUM_3D_TILE_MASK|e<<kt.SKIP_LOD_BIT_SHIFT}function fGe(e){let t=Ke.shallowClone(e),n=ze(e.renderState,!0);n.cull.enabled=!0,n.cull.face=pi.FRONT,n.colorMask={red:!1,green:!1,blue:!1,alpha:!1},n.polygonOffset={enabled:!0,factor:5,units:5};let i=ze(t.uniformMap),o=new k(5,5);return i.u_polygonOffset=function(){return o},t.renderState=Fe.fromCache(n),t.uniformMap=i,t.castShadows=!1,t.receiveShadows=!1,t}function dGe(e){let t=Ke.shallowClone(e),n=ze(e.renderState,!0),{stencilTest:i}=n;return i.enabled=!0,i.mask=kt.SKIP_LOD_MASK,i.reference=kt.CESIUM_3D_TILE_MASK,i.frontFunction=Nn.GREATER_OR_EQUAL,i.frontOperation.zPass=ut.REPLACE,i.backFunction=Nn.GREATER_OR_EQUAL,i.backOperation.zPass=ut.REPLACE,n.stencilMask=kt.CESIUM_3D_TILE_MASK|kt.SKIP_LOD_MASK,t.renderState=Fe.fromCache(n),t}var d2=f2;var h2=`precision highp float;
|
| czm_modelVertexOutput defaultVertexOutput(vec3 positionMC) {
| czm_modelVertexOutput vsOutput;
| vsOutput.positionMC = positionMC;
| vsOutput.pointSize = 1.0;
| return vsOutput;
| }
|
| void main()
| {
| // Initialize the attributes struct with all
| // attributes except quantized ones.
| ProcessedAttributes attributes;
| initializeAttributes(attributes);
|
| // Dequantize the quantized ones and add them to the
| // attributes struct.
| #ifdef USE_DEQUANTIZATION
| dequantizationStage(attributes);
| #endif
|
| #ifdef HAS_MORPH_TARGETS
| morphTargetsStage(attributes);
| #endif
|
| #ifdef HAS_SKINNING
| skinningStage(attributes);
| #endif
|
| #ifdef HAS_PRIMITIVE_OUTLINE
| primitiveOutlineStage();
| #endif
|
| // Compute the bitangent according to the formula in the glTF spec.
| // Normal and tangents can be affected by morphing and skinning, so
| // the bitangent should not be computed until their values are finalized.
| #ifdef HAS_BITANGENTS
| attributes.bitangentMC = normalize(cross(attributes.normalMC, attributes.tangentMC) * attributes.tangentSignMC);
| #endif
|
| FeatureIds featureIds;
| featureIdStage(featureIds, attributes);
|
| #ifdef HAS_SELECTED_FEATURE_ID
| SelectedFeature feature;
| selectedFeatureIdStage(feature, featureIds);
| // Handle any show properties that come from the style.
| cpuStylingStage(attributes.positionMC, feature);
| #endif
|
| #if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)
| // The scene mode 2D pipeline stage and instancing stage add a different
| // model view matrix to accurately project the model to 2D. However, the
| // output positions and normals should be transformed by the 3D matrices
| // to keep the data the same for the fragment shader.
| mat4 modelView = czm_modelView3D;
| mat3 normal = czm_normal3D;
| #else
| // These are used for individual model projection because they will
| // automatically change based on the scene mode.
| mat4 modelView = czm_modelView;
| mat3 normal = czm_normal;
| #endif
|
| // Update the position for this instance in place
| #ifdef HAS_INSTANCING
|
| // The legacy instance stage is used when rendering i3dm models that
| // encode instances transforms in world space, as opposed to glTF models
| // that use EXT_mesh_gpu_instancing, where instance transforms are encoded
| // in object space.
| #ifdef USE_LEGACY_INSTANCING
| mat4 instanceModelView;
| mat3 instanceModelViewInverseTranspose;
|
| legacyInstancingStage(attributes, instanceModelView, instanceModelViewInverseTranspose);
|
| modelView = instanceModelView;
| normal = instanceModelViewInverseTranspose;
| #else
| instancingStage(attributes);
| #endif
|
| #ifdef USE_PICKING
| v_pickColor = a_pickColor;
| #endif
|
| #endif
|
| Metadata metadata;
| MetadataClass metadataClass;
| MetadataStatistics metadataStatistics;
| metadataStage(metadata, metadataClass, metadataStatistics, attributes);
|
| #ifdef HAS_VERTICAL_EXAGGERATION
| verticalExaggerationStage(attributes);
| #endif
|
| #ifdef HAS_CUSTOM_VERTEX_SHADER
| czm_modelVertexOutput vsOutput = defaultVertexOutput(attributes.positionMC);
| customShaderStage(vsOutput, attributes, featureIds, metadata, metadataClass, metadataStatistics);
| #endif
|
| // Compute the final position in each coordinate system needed.
| // This returns the value that will be assigned to gl_Position.
| vec4 positionClip = geometryStage(attributes, modelView, normal);
|
| // This must go after the geometry stage as it needs v_positionWC
| #ifdef HAS_ATMOSPHERE
| atmosphereStage(attributes);
| #endif
|
| #ifdef ENABLE_CLIPPING_POLYGONS
| modelClippingPolygonsStage(attributes);
| #endif
|
| #ifdef HAS_SILHOUETTE
| silhouetteStage(attributes, positionClip);
| #endif
|
| #ifdef HAS_POINT_CLOUD_SHOW_STYLE
| float show = pointCloudShowStylingStage(attributes, metadata);
| #else
| float show = 1.0;
| #endif
|
| #ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING
| show *= pointCloudBackFaceCullingStage();
| #endif
|
| #ifdef HAS_POINT_CLOUD_COLOR_STYLE
| v_pointCloudColor = pointCloudColorStylingStage(attributes, metadata);
| #endif
|
| #ifdef PRIMITIVE_TYPE_POINTS
| #ifdef HAS_CUSTOM_VERTEX_SHADER
| gl_PointSize = vsOutput.pointSize;
| #elif defined(HAS_POINT_CLOUD_POINT_SIZE_STYLE) || defined(HAS_POINT_CLOUD_ATTENUATION)
| gl_PointSize = pointCloudPointSizeStylingStage(attributes, metadata);
| #else
| gl_PointSize = 1.0;
| #endif
|
| gl_PointSize *= show;
| #endif
|
| gl_Position = show * positionClip;
| }
| `;var m2=`
| precision highp float;
| czm_modelMaterial defaultModelMaterial()
| {
| czm_modelMaterial material;
| material.diffuse = vec3(0.0);
| material.specular = vec3(1.0);
| material.roughness = 1.0;
| material.occlusion = 1.0;
| material.normalEC = vec3(0.0, 0.0, 1.0);
| material.emissive = vec3(0.0);
| material.alpha = 1.0;
| return material;
| }
|
| vec4 handleAlpha(vec3 color, float alpha)
| {
| #ifdef ALPHA_MODE_MASK
| if (alpha < u_alphaCutoff) {
| discard;
| }
| #endif
|
| return vec4(color, alpha);
| }
|
| SelectedFeature selectedFeature;
|
| void main()
| {
| #ifdef HAS_MODEL_SPLITTER
| modelSplitterStage();
| #endif
|
| czm_modelMaterial material = defaultModelMaterial();
|
| ProcessedAttributes attributes;
| geometryStage(attributes);
|
| FeatureIds featureIds;
| featureIdStage(featureIds, attributes);
|
| Metadata metadata;
| MetadataClass metadataClass;
| MetadataStatistics metadataStatistics;
| metadataStage(metadata, metadataClass, metadataStatistics, attributes);
|
| //========================================================================
| // When not picking metadata START
| #ifndef METADATA_PICKING_ENABLED
|
| #ifdef HAS_SELECTED_FEATURE_ID
| selectedFeatureIdStage(selectedFeature, featureIds);
| #endif
|
| #ifndef CUSTOM_SHADER_REPLACE_MATERIAL
| materialStage(material, attributes, selectedFeature);
| #endif
|
| #ifdef HAS_CUSTOM_FRAGMENT_SHADER
| customShaderStage(material, attributes, featureIds, metadata, metadataClass, metadataStatistics);
| #endif
|
| lightingStage(material, attributes);
|
| #ifdef HAS_SELECTED_FEATURE_ID
| cpuStylingStage(material, selectedFeature);
| #endif
|
| #ifdef HAS_MODEL_COLOR
| modelColorStage(material);
| #endif
|
| #ifdef HAS_PRIMITIVE_OUTLINE
| primitiveOutlineStage(material);
| #endif
|
| vec4 color = handleAlpha(material.diffuse, material.alpha);
|
| // When not picking metadata END
| //========================================================================
| #else
| //========================================================================
| // When picking metadata START
|
| vec4 metadataValues = vec4(0.0, 0.0, 0.0, 0.0);
| metadataPickingStage(metadata, metadataClass, metadataValues);
| vec4 color = metadataValues;
|
| #endif
| // When picking metadata END
| //========================================================================
|
| #ifdef HAS_CLIPPING_PLANES
| modelClippingPlanesStage(color);
| #endif
|
| #ifdef ENABLE_CLIPPING_POLYGONS
| modelClippingPolygonsStage();
| #endif
|
| //========================================================================
| // When not picking metadata START
| #ifndef METADATA_PICKING_ENABLED
|
| #if defined(HAS_SILHOUETTE) && defined(HAS_NORMALS)
| silhouetteStage(color);
| #endif
|
| #ifdef HAS_ATMOSPHERE
| atmosphereStage(color, attributes);
| #endif
|
| #endif
| // When not picking metadata END
| //========================================================================
|
| out_FragColor = color;
| }
| `;function Ooe(){}Ooe.buildModelDrawCommand=function(e,t){let n=e.shaderBuilder,i=hGe(e,n,t),o=mGe(e,i,t),r=e.model;return c(r.classificationType)?new u2({primitiveRenderResources:e,command:o}):new d2({primitiveRenderResources:e,command:o})};function hGe(e,t,n){t.addVertexLines(h2),t.addFragmentLines(m2);let i=e.model,o=t.buildShaderProgram(n.context);return i._pipelineResources.push(o),o}function mGe(e,t,n){let i=pGe(e),o=new Zn({context:n.context,indexBuffer:i,attributes:e.attributes}),r=e.model;r._pipelineResources.push(o);let s=e.alphaOptions.pass,a=r.sceneGraph,l=n.mode===J.SCENE3D,u,f;if(!l&&!n.scene3DOnly&&r._projectTo2D)u=N.multiplyTransformation(a._computedModelMatrix,e.runtimeNode.computedTransform,new N),f=e.runtimePrimitive.boundingSphere2D;else{let T=l?a._computedModelMatrix:a._computedModelMatrix2D;u=N.multiplyTransformation(T,e.runtimeNode.computedTransform,new N),f=ne.transform(e.boundingSphere,u)}let h=ze(Fe.fromCache(e.renderStateOptions),!0);h.cull.face=Xt.getCullFace(u,e.primitiveType),h=Fe.fromCache(h);let m=c(r.classificationType),p=m?!1:yn.castShadows(r.shadows),_=m?!1:yn.receiveShadows(r.shadows),b=m?void 0:e.pickId;return new Ke({boundingVolume:f,modelMatrix:u,uniformMap:e.uniformMap,renderState:h,vertexArray:o,shaderProgram:t,cull:r.cull,pass:s,count:e.count,owner:r,pickId:b,pickMetadataAllowed:!0,instanceCount:e.instanceCount,primitiveType:e.primitiveType,debugShowBoundingVolume:r.debugShowBoundingVolume,castShadows:p,receiveShadows:_})}function pGe(e){let t=e.wireframeIndexBuffer;if(c(t))return t;let n=e.indices;if(c(n)){if(!c(n.buffer))throw new w("Indices must be provided as a Buffer");return n.buffer}}var p2=Ooe;function jl(e){e=g(e,g.EMPTY_OBJECT);let t=e.modelComponents;C.typeOf.object("options.model",e.model),C.typeOf.object("options.modelComponents",t),this._model=e.model,this._components=t,this._pipelineStages=[],this._updateStages=[],this._runtimeNodes=[],this._rootNodes=[],this._skinnedNodes=[],this._runtimeSkins=[],this.modelPipelineStages=[],this._boundingSphere=void 0,this._boundingSphere2D=void 0,this._computedModelMatrix=N.clone(N.IDENTITY),this._computedModelMatrix2D=N.clone(N.IDENTITY),this._axisCorrectionMatrix=Xt.getAxisCorrectionMatrix(t.upAxis,t.forwardAxis,new N),this._runtimeArticulations={},_Ge(this)}Object.defineProperties(jl.prototype,{components:{get:function(){return this._components}},computedModelMatrix:{get:function(){return this._computedModelMatrix}},axisCorrectionMatrix:{get:function(){return this._axisCorrectionMatrix}},boundingSphere:{get:function(){return this._boundingSphere}}});function _Ge(e){let t=e._components,n=t.scene,o=e._model.modelMatrix;Poe(e,o);let r=t.articulations,s=r.length,a=e._runtimeArticulations;for(let E=0;E<s;E++){let S=r[E],A=new JN({articulation:S,sceneGraph:e}),v=A.name;a[v]=A}let l=t.nodes,u=l.length;e._runtimeNodes=new Array(u);let h=n.nodes.length,m=N.IDENTITY;for(let E=0;E<h;E++){let S=n.nodes[E],A=Roe(e,S,m);e._rootNodes.push(A)}let p=t.skins,_=e._runtimeSkins,b=p.length;for(let E=0;E<b;E++){let S=p[E];_.push(new ZF({skin:S,sceneGraph:e}))}let x=e._skinnedNodes,T=x.length;for(let E=0;E<T;E++){let S=x[E],A=e._runtimeNodes[S],D=l[S].skin.index;A._runtimeSkin=_[D],A.updateJointMatrices()}e.applyArticulations()}function Poe(e,t){let n=e._components,i=e._model;e._computedModelMatrix=N.multiplyTransformation(t,n.transform,e._computedModelMatrix),e._computedModelMatrix=N.multiplyTransformation(e._computedModelMatrix,e._axisCorrectionMatrix,e._computedModelMatrix),e._computedModelMatrix=N.multiplyByUniformScale(e._computedModelMatrix,i.computedScale,e._computedModelMatrix)}var gGe=new d;function yGe(e,t){let n=e._computedModelMatrix,i=N.getTranslation(n,gGe);if(!d.equals(i,d.ZERO))e._computedModelMatrix2D=Lt.basisTo2D(t.mapProjection,n,e._computedModelMatrix2D);else{let o=e.boundingSphere.center,r=Lt.ellipsoidTo2DModelMatrix(t.mapProjection,o,e._computedModelMatrix2D);e._computedModelMatrix2D=N.multiply(r,n,e._computedModelMatrix2D)}e._boundingSphere2D=ne.transform(e._boundingSphere,e._computedModelMatrix2D,e._boundingSphere2D)}function Roe(e,t,n){let i=[],o=Xt.getNodeTransform(t),r=t.children.length;for(let f=0;f<r;f++){let h=t.children[f],m=N.multiplyTransformation(n,o,new N),p=Roe(e,h,m);i.push(p)}let s=new hF({node:t,transform:o,transformToRoot:n,children:i,sceneGraph:e}),a=t.primitives.length;for(let f=0;f<a;f++)s.runtimePrimitives.push(new $F({primitive:t.primitives[f],node:t,model:e._model}));let l=t.index;e._runtimeNodes[l]=s,c(t.skin)&&e._skinnedNodes.push(l);let u=t.name;if(c(u)){let f=e._model,h=new rF(f,s);f._nodesByName[u]=h}return l}var bGe=new d,xGe=new d,TGe=new d,CGe=new d;jl.prototype.buildDrawCommands=function(e){let t=this._model,n=new QF(t);t.statistics.clear(),this.configurePipeline(e);let i=this.modelPipelineStages,o,r,s;for(o=0;o<i.length;o++)i[o].process(n,t,e);let a=d.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,bGe),l=d.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,xGe);for(o=0;o<this._runtimeNodes.length;o++){let u=this._runtimeNodes[o];if(!c(u))continue;u.configurePipeline();let f=u.pipelineStages,h=new a2(n,u);for(r=0;r<f.length;r++)f[r].process(h,u.node,e);let m=u.computedTransform;for(r=0;r<u.runtimePrimitives.length;r++){let p=u.runtimePrimitives[r];p.configurePipeline(e);let _=p.pipelineStages,b=new l2(h,p);for(s=0;s<_.length;s++)_[s].process(b,p.primitive,e);p.boundingSphere=ne.clone(b.boundingSphere,new ne);let x=N.multiplyByPoint(m,b.positionMin,TGe),T=N.multiplyByPoint(m,b.positionMax,CGe);d.minimumByComponent(a,x,a),d.maximumByComponent(l,T,l);let E=p2.buildModelDrawCommand(b,e);p.drawCommand=E}}this._boundingSphere=ne.fromCornerPoints(a,l,new ne),this._boundingSphere=ne.transformWithoutScale(this._boundingSphere,this._axisCorrectionMatrix,this._boundingSphere),this._boundingSphere=ne.transform(this._boundingSphere,this._components.transform,this._boundingSphere),t._boundingSphere=ne.transform(this._boundingSphere,t.modelMatrix,t._boundingSphere),t._initialRadius=t._boundingSphere.radius,t._boundingSphere.radius*=t._clampedScale};jl.prototype.configurePipeline=function(e){let t=this.modelPipelineStages;t.length=0;let n=this._model,i=e.fog.enabled&&e.fog.renderable;c(n.color)&&t.push(kb),!c(n.classificationType)&&(n.imageBasedLighting.enabled&&t.push(KN),n.isClippingEnabled()&&t.push(tF),n.isClippingPolygonsEnabled()&&t.push(oF),n.hasSilhouette(e)&&t.push(i2),c(n.splitDirection)&&n.splitDirection!==Nr.NONE&&t.push(s2),fr.is3DTiles(n.type)&&t.push(jN),i&&t.push(YN))};jl.prototype.update=function(e,t){let n,i,o;for(n=0;n<this._runtimeNodes.length;n++){let r=this._runtimeNodes[n];if(!c(r))continue;for(i=0;i<r.updateStages.length;i++)r.updateStages[i].update(r,this,e);let s=e.mode!==J.SCENE3D&&this._model._projectTo2D;for(t&&!s&&this.updateJointMatrices(),i=0;i<r.runtimePrimitives.length;i++){let a=r.runtimePrimitives[i];for(o=0;o<a.updateStages.length;o++)a.updateStages[o].update(a,this)}}};jl.prototype.updateModelMatrix=function(e,t){Poe(this,e),t.mode!==J.SCENE3D&&yGe(this,t);let n=this._rootNodes;for(let i=0;i<n.length;i++){let o=this._runtimeNodes[n[i]];o._transformDirty=!0}};jl.prototype.updateJointMatrices=function(){let e=this._skinnedNodes,t=e.length;for(let n=0;n<t;n++){let i=e[n];this._runtimeNodes[i].updateJointMatrices()}};function Moe(e,t,n,i,o){if(n&&!t.show)return;let r=t.children.length;for(let l=0;l<r;l++){let u=t.getChild(l);Moe(e,u,n,i,o)}let s=t.runtimePrimitives,a=s.length;for(let l=0;l<a;l++){let u=s[l];i(u,o)}}function _2(e,t,n,i){let o=e._rootNodes,r=o.length;for(let s=0;s<r;s++){let a=o[s],l=e._runtimeNodes[a];Moe(e,l,t,n,i)}}var EGe={backFaceCulling:void 0};jl.prototype.updateBackFaceCulling=function(e){let t=EGe;t.backFaceCulling=e,_2(this,!1,wGe,t)};function wGe(e,t){let n=e.drawCommand;n.backFaceCulling=t.backFaceCulling}var SGe={shadowMode:void 0};jl.prototype.updateShadows=function(e){let t=SGe;t.shadowMode=e,_2(this,!1,AGe,t)};function AGe(e,t){let n=e.drawCommand;n.shadows=t.shadowMode}var vGe={debugShowBoundingVolume:void 0};jl.prototype.updateShowBoundingVolume=function(e){let t=vGe;t.debugShowBoundingVolume=e,_2(this,!1,DGe,t)};function DGe(e,t){let n=e.drawCommand;n.debugShowBoundingVolume=t.debugShowBoundingVolume}var Loe=[],IGe={frameState:void 0,hasSilhouette:void 0};jl.prototype.pushDrawCommands=function(e){let t=Loe;t.length=0;let n=IGe;n.hasSilhouette=this._model.hasSilhouette(e),n.frameState=e,_2(this,!0,OGe,n),e.commandList.push.apply(e.commandList,t)};function OGe(e,t){let n=t.frameState,i=t.hasSilhouette,o=n.passes,r=Loe,s=e.drawCommand;s.pushCommands(n,n.commandList),i&&!o.pick&&s.pushSilhouetteCommands(n,r)}jl.prototype.setArticulationStage=function(e,t){let n=e.split(" ");if(n.length!==2)return;let i=n[0],o=n[1],r=this._runtimeArticulations[i];c(r)&&r.setArticulationStage(o,t)};jl.prototype.applyArticulations=function(){let e=this._runtimeArticulations;for(let t in e)e.hasOwnProperty(t)&&e[t].apply()};var g2=jl;function uC(){this.pointsLength=0,this.trianglesLength=0,this.geometryByteLength=0,this.texturesByteLength=0,this.propertyTablesByteLength=0,this._bufferIdSet={},this._textureIdSet={},this._batchTextureIdMap=new Et}Object.defineProperties(uC.prototype,{batchTexturesByteLength:{get:function(){let e=this._batchTextureIdMap.length,t=this._batchTextureIdMap.values,n=0;for(let i=0;i<e;i++)n+=t[i].byteLength;return n}}});uC.prototype.clear=function(){this.pointsLength=0,this.trianglesLength=0,this.geometryByteLength=0,this.texturesByteLength=0,this.propertyTablesByteLength=0,this._bufferIdSet={},this._textureIdSet={},this._batchTextureIdMap.removeAll()};uC.prototype.addBuffer=function(e,t){if(C.typeOf.object("buffer",e),C.typeOf.bool("hasCpuCopy",t),!this._bufferIdSet.hasOwnProperty(e._id)){let n=t?2:1;this.geometryByteLength+=e.sizeInBytes*n}this._bufferIdSet[e._id]=!0};uC.prototype.addTexture=function(e){C.typeOf.object("texture",e),this._textureIdSet.hasOwnProperty(e._id)||(this.texturesByteLength+=e.sizeInBytes),this._textureIdSet[e._id]=!0};uC.prototype.addBatchTexture=function(e){C.typeOf.object("batchTexture",e),this._batchTextureIdMap.contains(e._id)||this._batchTextureIdMap.set(e._id,e)};var y2=uC;var koe=Mr(oO(),1);var Noe={},Gb=Uint32Array.BYTES_PER_ELEMENT;Noe.parse=function(e,t){t=g(t,0),C.defined("arrayBuffer",e);let n=new Uint8Array(e),i=new DataView(e);t+=Gb;let o=i.getUint32(t,!0);if(o!==1)throw new ie(`Only Point Cloud tile version 1 is supported. Version ${o} is not.`);t+=Gb,t+=Gb;let r=i.getUint32(t,!0);if(r===0)throw new ie("Feature table must have a byte length greater than zero");t+=Gb;let s=i.getUint32(t,!0);t+=Gb;let a=i.getUint32(t,!0);t+=Gb;let l=i.getUint32(t,!0);t+=Gb;let u=Do(n,t,r);t+=r;let f=new Uint8Array(e,t,s);t+=s;let h,m;a>0&&(h=Do(n,t,a),t+=a,l>0&&(m=new Uint8Array(e,t,l),t+=l));let p=new Sh(u,f),_=p.getGlobalProperty("POINTS_LENGTH");if(p.featuresLength=_,!c(_))throw new ie("Feature table global property: POINTS_LENGTH must be defined");let b=p.getGlobalProperty("RTC_CENTER",j.FLOAT,3);c(b)&&(b=d.unpack(b));let x=PGe(p,h);if(x.rtcCenter=b,x.pointsLength=_,!x.hasPositions){let T=RGe(p);x.positions=T,x.hasPositions=x.hasPositions||c(T)}if(!x.hasPositions)throw new ie("Either POSITION or POSITION_QUANTIZED must be defined.");if(!x.hasNormals){let T=LGe(p);x.normals=T,x.hasNormals=x.hasNormals||c(T)}if(!x.hasColors){let T=MGe(p);x.colors=T,x.hasColors=x.hasColors||c(T),x.hasConstantColor=c(x.constantColor),x.isTranslucent=c(T)&&T.isTranslucent}if(!x.hasBatchIds){let T=NGe(p);x.batchIds=T,x.hasBatchIds=x.hasBatchIds||c(T)}if(x.hasBatchIds){let T=p.getGlobalProperty("BATCH_LENGTH");if(!c(T))throw new ie("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");x.batchLength=T}return c(m)&&(m=new Uint8Array(m),x.batchTableJson=h,x.batchTableBinary=m),x};function PGe(e,t){let n=e.json,i,o,r,s=c(n.extensions)?n.extensions["3DTILES_draco_point_compression"]:void 0,a=c(t)&&c(t.extensions)?t.extensions["3DTILES_draco_point_compression"]:void 0;c(a)&&(r=a.properties);let l,u,f,h,m;if(c(s)){o=s.properties;let _=s.byteOffset,b=s.byteLength;if(!c(o)||!c(_)||!c(b))throw new ie("Draco properties, byteOffset, and byteLength must be defined");i=e.buffer.slice(_,_+b),l=c(o.POSITION),u=c(o.RGB)||c(o.RGBA),f=c(o.NORMAL),h=c(o.BATCH_ID),m=c(o.RGBA)}let p;return c(i)&&(p={buffer:i,featureTableProperties:o,batchTableProperties:r,properties:bt(o,r),dequantizeInShader:!0}),{draco:p,hasPositions:l,hasColors:u,isTranslucent:m,hasNormals:f,hasBatchIds:h}}function RGe(e){let t=e.json,n;if(c(t.POSITION))return n=e.getPropertyArray("POSITION",j.FLOAT,3),{name:Tt.POSITION,semantic:Tt.POSITION,typedArray:n,isQuantized:!1,componentDatatype:j.FLOAT,type:tn.VEC3};if(c(t.POSITION_QUANTIZED)){n=e.getPropertyArray("POSITION_QUANTIZED",j.UNSIGNED_SHORT,3);let i=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",j.FLOAT,3);if(!c(i))throw new ie("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");let o=65535,r=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",j.FLOAT,3);if(!c(r))throw new ie("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");return{name:Tt.POSITION,semantic:Tt.POSITION,typedArray:n,isQuantized:!0,componentDatatype:j.FLOAT,type:tn.VEC3,quantizedRange:o,quantizedVolumeOffset:d.unpack(r),quantizedVolumeScale:d.unpack(i),quantizedComponentDatatype:j.UNSIGNED_SHORT,quantizedType:tn.VEC3}}}function MGe(e){let t=e.json,n;if(c(t.RGBA))return n=e.getPropertyArray("RGBA",j.UNSIGNED_BYTE,4),{name:Tt.COLOR,semantic:Tt.COLOR,setIndex:0,typedArray:n,componentDatatype:j.UNSIGNED_BYTE,type:tn.VEC4,normalized:!0,isRGB565:!1,isTranslucent:!0};if(c(t.RGB))return n=e.getPropertyArray("RGB",j.UNSIGNED_BYTE,3),{name:"COLOR",semantic:Tt.COLOR,setIndex:0,typedArray:n,componentDatatype:j.UNSIGNED_BYTE,type:tn.VEC3,normalized:!0,isRGB565:!1,isTranslucent:!1};if(c(t.RGB565))return n=e.getPropertyArray("RGB565",j.UNSIGNED_SHORT,1),{name:"COLOR",semantic:Tt.COLOR,setIndex:0,typedArray:n,componentDatatype:j.FLOAT,type:tn.VEC3,normalized:!1,isRGB565:!0,isTranslucent:!1};if(c(t.CONSTANT_RGBA)){let i=e.getGlobalProperty("CONSTANT_RGBA",j.UNSIGNED_BYTE,4),o=i[3],r=z.fromBytes(i[0],i[1],i[2],o),s=o<255;return{name:Tt.COLOR,semantic:Tt.COLOR,setIndex:0,constantColor:r,componentDatatype:j.FLOAT,type:tn.VEC4,isQuantized:!1,isTranslucent:s}}}function LGe(e){let t=e.json,n;if(c(t.NORMAL))return n=e.getPropertyArray("NORMAL",j.FLOAT,3),{name:Tt.NORMAL,semantic:Tt.NORMAL,typedArray:n,octEncoded:!1,octEncodedZXY:!1,componentDatatype:j.FLOAT,type:tn.VEC3};if(c(t.NORMAL_OCT16P))return n=e.getPropertyArray("NORMAL_OCT16P",j.UNSIGNED_BYTE,2),{name:Tt.NORMAL,semantic:Tt.NORMAL,typedArray:n,octEncoded:!0,octEncodedZXY:!1,quantizedRange:(1<<8)-1,quantizedType:tn.VEC2,quantizedComponentDatatype:j.UNSIGNED_BYTE,componentDatatype:j.FLOAT,type:tn.VEC3}}function NGe(e){let t=e.json;if(c(t.BATCH_ID)){let n=e.getPropertyArray("BATCH_ID",j.UNSIGNED_SHORT,1);return{name:Tt.FEATURE_ID,semantic:Tt.FEATURE_ID,setIndex:0,typedArray:n,componentDatatype:j.fromTypedArray(n),type:tn.SCALAR}}}var fC=Noe;var FGe=bn.Components,BGe=bn.Scene,kGe=bn.Node,UGe=bn.Primitive,zGe=bn.Attribute,Foe=bn.Quantization,VGe=bn.FeatureIdAttribute,HGe=bn.Material,GGe=bn.MetallicRoughness;function hg(e){e=g(e,g.EMPTY_OBJECT);let t=e.arrayBuffer,n=g(e.byteOffset,0);C.typeOf.object("options.arrayBuffer",t),this._arrayBuffer=t,this._byteOffset=n,this._loadAttributesFor2D=g(e.loadAttributesFor2D,!1),this._parsedContent=void 0,this._decodePromise=void 0,this._decodedAttributes=void 0,this._promise=void 0,this._error=void 0,this._state=_t.UNLOADED,this._buffers=[],this._components=void 0,this._transform=N.IDENTITY}c(Object.create)&&(hg.prototype=Object.create(Gi.prototype),hg.prototype.constructor=hg);Object.defineProperties(hg.prototype,{cacheKey:{get:function(){}},components:{get:function(){return this._components}},transform:{get:function(){return this._transform}}});hg.prototype.load=function(){if(c(this._promise))return this._promise;this._parsedContent=fC.parse(this._arrayBuffer,this._byteOffset),this._state=_t.PROCESSING,this._promise=Promise.resolve(this)};hg.prototype.process=function(e){if(c(this._error)){let t=this._error;throw this._error=void 0,t}if(this._state===_t.READY)return!0;if(this._state===_t.PROCESSING){if(c(this._decodePromise))return!1;this._decodePromise=jGe(this,e.context)}return!1};function jGe(e,t){let i=e._parsedContent.draco,o;if(c(i)?o=H_.decodePointCloud(i,t):o=Promise.resolve(),!!c(o))return e._decodePromise=o,o.then(function(r){if(!e.isDestroyed())return c(r)&&WGe(e,i,r),n8e(e,t),e._state=_t.READY,e}).catch(function(r){e.unload(),e._state=_t.FAILED;let s="Failed to load Draco pnts";e._error=e.getError(s,r)})}function WGe(e,t,n){e._state=_t.READY;let i=e._parsedContent,o;if(c(n.POSITION)){if(o={name:"POSITION",semantic:Tt.POSITION,typedArray:n.POSITION.array,componentDatatype:j.FLOAT,type:tn.VEC3,isQuantized:!1},c(n.POSITION.data.quantization)){let a=n.POSITION.data.quantization,l=a.range,u=d.fromElements(l,l,l),f=d.unpack(a.minValues),h=(1<<a.quantizationBits)-1;o.isQuantized=!0,o.quantizedRange=h,o.quantizedVolumeOffset=f,o.quantizedVolumeScale=u,o.quantizedComponentDatatype=h<=255?j.UNSIGNED_BYTE:j.UNSIGNED_SHORT,o.quantizedType=tn.VEC3}i.positions=o}if(c(n.NORMAL)){if(o={name:"NORMAL",semantic:Tt.NORMAL,typedArray:n.NORMAL.array,componentDatatype:j.FLOAT,type:tn.VEC3,isQuantized:!1,octEncoded:!1,octEncodedZXY:!1},c(n.NORMAL.data.quantization)){let a=(1<<n.NORMAL.data.quantization.quantizationBits)-1;o.quantizedRange=a,o.octEncoded=!0,o.octEncodedZXY=!0,o.quantizedComponentDatatype=j.UNSIGNED_BYTE,o.quantizedType=tn.VEC2}i.normals=o}if(c(n.RGBA)?i.colors={name:"COLOR",semantic:Tt.COLOR,setIndex:0,typedArray:n.RGBA.array,componentDatatype:j.UNSIGNED_BYTE,type:tn.VEC4,normalized:!0,isTranslucent:!0}:c(n.RGB)&&(i.colors={name:"COLOR",semantic:Tt.COLOR,setIndex:0,typedArray:n.RGB.array,componentDatatype:j.UNSIGNED_BYTE,type:tn.VEC3,normalized:!0,isTranslucent:!1}),c(n.BATCH_ID)){let a=n.BATCH_ID.array;i.batchIds={name:"_FEATURE_ID",semantic:Tt.FEATURE_ID,setIndex:0,typedArray:a,componentDatatype:j.fromTypedArray(a),type:tn.SCALAR}}let r=i.batchTableJson,s=t.batchTableProperties;for(let a in s)if(s.hasOwnProperty(a)){let l=n[a];c(r)||(r={}),i.hasDracoBatchTable=!0;let u=l.data;r[a]={byteOffset:u.byteOffset,type:qGe(u.componentsPerAttribute),componentType:YGe(u.componentDatatype),typedArray:l.array}}i.batchTableJson=r}function qGe(e){switch(e){case 1:return"SCALAR";case 2:return"VEC2";case 3:return"VEC3";case 4:return"VEC4";default:throw new w("componentsPerAttribute must be a number from 1-4")}}function YGe(e){switch(e){case Y.BYTE:return"BYTE";case Y.UNSIGNED_BYTE:return"UNSIGNED_BYTE";case Y.SHORT:return"SHORT";case Y.UNSIGNED_SHORT:return"UNSIGNED_SHORT";case Y.INT:return"INT";case Y.UNSIGNED_INT:return"UNSIGNED_INT";case Y.DOUBLE:return"DOUBLE";case Y.FLOAT:return"FLOAT";default:throw new w("value is not a valid WebGL constant")}}function jA(e,t,n){let i=t.typedArray,o;if(t.octEncoded&&(o=new Foe,o.octEncoded=t.octEncoded,o.octEncodedZXY=t.octEncodedZXY,o.normalizationRange=t.quantizedRange,o.type=t.quantizedType,o.componentDatatype=t.quantizedComponentDatatype),t.isQuantized){o=new Foe;let a=t.quantizedRange;o.normalizationRange=a,o.quantizedVolumeOffset=d.ZERO;let l=t.quantizedVolumeScale;o.quantizedVolumeDimensions=l,o.quantizedVolumeStepSize=d.divideByScalar(l,a,new d),o.componentDatatype=t.quantizedComponentDatatype,o.type=t.quantizedType}let r=new zGe;if(r.name=t.name,r.semantic=t.semantic,r.setIndex=t.setIndex,r.componentDatatype=t.componentDatatype,r.type=t.type,r.normalized=g(t.normalized,!1),r.min=t.min,r.max=t.max,r.quantization=o,t.isRGB565&&(i=On.decodeRGB565(i)),c(t.constantColor)){let a=new Array(4);r.constant=z.pack(t.constantColor,a)}else{let a=yt.createVertexBuffer({typedArray:i,context:n,usage:Pe.STATIC_DRAW});a.vertexArrayDestroyable=!1,e._buffers.push(a),r.buffer=a}let s=e._loadAttributesFor2D;return r.semantic===Tt.POSITION&&s&&(r.typedArray=i),r}var Boe,b2;function XGe(e){if(!c(b2)){Boe=new koe.default(0),b2=new Array(e);for(let t=0;t<e;++t)b2[t]=Boe.random()}return b2}var KGe=new d,$Ge=new d,ZGe=new d;function JGe(e){let t=e.typedArray,n=20,i=t.length/3,o=Math.min(i,n),r=XGe(n),s=Number.MAX_VALUE,a=-Number.MAX_VALUE,l=d.fromElements(s,s,s,KGe),u=d.fromElements(a,a,a,$Ge),f,h,m;if(e.isQuantized)l=d.ZERO,u=e.quantizedVolumeScale;else for(f=0;f<o;++f)h=Math.floor(r[f]*i),m=d.unpack(t,h*3,ZGe),d.minimumByComponent(l,m,l),d.maximumByComponent(u,m,u);e.min=d.clone(l),e.max=d.clone(u)}var QGe={name:Tt.COLOR,semantic:Tt.COLOR,setIndex:0,constantColor:z.DARKGRAY,componentDatatype:j.FLOAT,type:tn.VEC4,isQuantized:!1,isTranslucent:!1};function e8e(e,t,n){let i=[],o,r=t.positions;return c(r)&&(JGe(r),o=jA(e,r,n),o.count=t.pointsLength,i.push(o)),c(t.normals)&&(o=jA(e,t.normals,n),i.push(o)),c(t.colors)?(o=jA(e,t.colors,n),i.push(o)):(o=jA(e,QGe,n),i.push(o)),c(t.batchIds)&&(o=jA(e,t.batchIds,n),i.push(o)),i}function t8e(e,t){let n=e.batchLength,i=e.pointsLength,o=e.batchTableBinary,r=!c(e.batchIds);if(c(o)||e.hasDracoBatchTable){let s=g(n,i);return ag({count:s,batchTable:e.batchTableJson,binaryBody:o,parseAsPropertyAttributes:r,customAttributeOutput:t})}return new Vs({schema:{},propertyTables:[]})}function n8e(e,t){let n=e._parsedContent,i=new GGe;i.metallicFactor=0,i.roughnessFactor=.9;let o=new HGe;o.metallicRoughness=i;let r=n.colors;c(r)&&r.isTranslucent&&(o.alphaMode=Jm.BLEND);let s=!c(n.normals);o.unlit=s;let a=new UGe;if(a.attributes=e8e(e,n,t),a.primitiveType=Se.POINTS,a.material=o,c(n.batchIds)){let p=new VGe;p.propertyTableId=0,p.setIndex=0,p.positionalLabel="featureId_0",a.featureIds.push(p)}let l=new kGe;l.index=0,l.primitives=[a];let u=new BGe;u.nodes=[l],u.upAxis=vo.Z,u.forwardAxis=vo.X;let f=new FGe;f.scene=u,f.nodes=[l];let h=[];f.structuralMetadata=t8e(n,h),h.length>0&&i8e(e,a,h,t),c(n.rtcCenter)&&(f.transform=N.multiplyByTranslation(f.transform,n.rtcCenter,f.transform));let m=n.positions;c(m)&&m.isQuantized&&(f.transform=N.multiplyByTranslation(f.transform,m.quantizedVolumeOffset,f.transform)),e._components=f,e._parsedContent=void 0,e._arrayBuffer=void 0}function i8e(e,t,n,i){let o=t.attributes,r=n.length;for(let s=0;s<r;s++){let a=n[s],l=yt.createVertexBuffer({typedArray:a.typedArray,context:i,usage:Pe.STATIC_DRAW});l.vertexArrayDestroyable=!1,e._buffers.push(l),a.buffer=l,a.typedArray=void 0,o.push(a)}t.propertyAttributeIds=[0]}hg.prototype.unload=function(){let e=this._buffers;for(let t=0;t<e.length;t++)e[t].destroy();e.length=0,this._components=void 0,this._parsedContent=void 0,this._arrayBuffer=void 0};var x2=hg;var o8e=new d,r8e=new d,s8e=new d,a8e=new N,c8e=new N,l8e=new N,u8e=new re,f8e=new ne;function WA(e,t,n,i,o,r,s){if(C.typeOf.object("model",e),C.typeOf.object("ray",t),C.typeOf.object("frameState",n),!e._ready||n.mode===J.MORPHING)return;let a=Number.MAX_VALUE,l=e.sceneGraph,u=l._runtimeNodes;for(let f=0;f<u.length;f++){let h=u[f],m=h.node,p=N.clone(h.computedTransform,a8e),_=N.clone(l.computedModelMatrix,c8e),b=m.instances;c(b)&&b.transformInWorldSpace&&(_=N.multiplyTransformation(e.modelMatrix,l.components.transform,_),p=N.multiplyTransformation(l.axisCorrectionMatrix,h.computedTransform,p));let x=N.multiplyTransformation(_,p,l8e);n.mode!==J.SCENE3D&&(x=Lt.basisTo2D(n.mapProjection,x,x));let T=[];if(c(b)){let S=b.attributes[0].count,A=b.attributes[0].componentDatatype,v=12,D=h.transformsTypedArray;if(!c(D)){let R=h.instancingTransformsBuffer;c(R)&&n.context.webgl2&&(D=j.createTypedArray(A,S*v),R.getBufferData(D))}if(c(D))for(let R=0;R<S;R++){let P=R*v,L=new N(D[P],D[P+1],D[P+2],D[P+3],D[P+4],D[P+5],D[P+6],D[P+7],D[P+8],D[P+9],D[P+10],D[P+11],0,0,0,1);b.transformInWorldSpace?(N.multiplyTransformation(L,p,L),N.multiplyTransformation(_,L,L)):N.multiplyTransformation(L,x,L),T.push(L)}}T.length===0&&T.push(x);let E=h.runtimePrimitives.length;for(let S=0;S<E;S++){let A=h.runtimePrimitives[S],v=A.primitive;if(c(A.boundingSphere)&&!c(b)){let se=ne.transform(A.boundingSphere,x,f8e),he=Yn.raySphere(t,se);if(!c(he))continue}let D=Xt.getAttributeBySemantic(v,Tt.POSITION),R=D.byteOffset,P=D.byteStride,L=D.count;if(!c(v.indices))continue;let F=v.indices.typedArray;if(!c(F)){let se=v.indices.buffer,he=v.indices.count,ge=v.indices.indexDatatype;c(se)&&n.context.webgl2&&(ge===Oe.UNSIGNED_BYTE?F=new Uint8Array(he):ge===Oe.UNSIGNED_SHORT?F=new Uint16Array(he):ge===Oe.UNSIGNED_INT&&(F=new Uint32Array(he)),se.getBufferData(F))}let y=D.typedArray,I=D.componentDatatype,M=D.type,B=D.quantization;c(B)&&(I=D.quantization.componentDatatype,M=D.quantization.type);let U=tn.getNumberOfComponents(M),V=j.getSizeInBytes(I),W=!c(y)&&c(P)&&P!==U*V,H=U,X=0;W&&(H=P/V,X=R/V);let $=L*H;if(!c(y)){let se=D.buffer;c(se)&&n.context.webgl2&&(y=j.createTypedArray(I,$),se.getBufferData(y,W?0:R,0,$)),B&&D.normalized&&(y=On.dequantize(y,I,M,L))}if(!c(F)||!c(y))return;r=g(r,Z.default),i=g(i,1),o=g(o,0);let ae=F.length;for(let se=0;se<ae;se+=3){let he=F[se],ge=F[se+1],le=F[se+2];for(let me of T){let Me=R5(y,he,X,H,B,me,i,o,r,o8e),Ge=R5(y,ge,X,H,B,me,i,o,r,r8e),De=R5(y,le,X,H,B,me,i,o,r,s8e),ke=Yn.rayTriangleParametric(t,Me,Ge,De,g(e.backFaceCulling,!0));c(ke)&&ke<a&&ke>=0&&(a=ke)}}}}if(a!==Number.MAX_VALUE){if(s=mn.getPoint(t,a,s),n.mode!==J.SCENE3D){d.fromElements(s.y,s.z,s.x,s);let f=n.mapProjection,h=f.ellipsoid,m=f.unproject(s,u8e);h.cartographicToCartesian(m,s)}return s}}function R5(e,t,n,i,o,r,s,a,l,u){let f=n+t*i;if(u.x=e[f],u.y=e[f+1],u.z=e[f+2],c(o))if(o.octEncoded){if(u=On.octDecodeInRange(u,o.normalizationRange,u),o.octEncodedZXY){let h=u.x;u.x=u.z,u.z=u.y,u.y=h}}else u=d.multiplyComponents(u,o.quantizedVolumeStepSize,u),u=d.add(u,o.quantizedVolumeOffset,u);return u=N.multiplyByPoint(r,u,u),s!==1&&Cr.getPosition(u,l,s,a,u),u}function Zi(e){e=g(e,g.EMPTY_OBJECT),C.typeOf.object("options.loader",e.loader),C.typeOf.object("options.resource",e.resource),this._loader=e.loader,this._resource=e.resource,this.type=g(e.type,fr.GLTF),this.modelMatrix=N.clone(g(e.modelMatrix,N.IDENTITY)),this._modelMatrix=N.clone(this.modelMatrix),this._scale=g(e.scale,1),this._minimumPixelSize=g(e.minimumPixelSize,0),this._maximumScale=e.maximumScale,this._clampedScale=c(this._maximumScale)?Math.min(this._scale,this._maximumScale):this._scale,this._computedScale=this._clampedScale,this._updateModelMatrix=!1,this.referenceMatrix=void 0,this._iblReferenceFrameMatrix=q.clone(q.IDENTITY),this._resourcesLoaded=!1,this._drawCommandsBuilt=!1,this._ready=!1,this._customShader=e.customShader,this._content=e.content,this._texturesLoaded=!1,this._defaultTexture=void 0,this._activeAnimations=new VN(this),this._clampAnimations=g(e.clampAnimations,!0),this._userAnimationDirty=!1,this._id=e.id,this._idDirty=!1,this._color=z.clone(e.color),this._colorBlendMode=g(e.colorBlendMode,_c.HIGHLIGHT),this._colorBlendAmount=g(e.colorBlendAmount,.5);let t=g(e.silhouetteColor,z.RED);this._silhouetteColor=z.clone(t),this._silhouetteSize=g(e.silhouetteSize,0),this._silhouetteDirty=!1,this._silhouetteId=void 0,this._cull=g(e.cull,!0),this._opaquePass=g(e.opaquePass,xe.OPAQUE),this._allowPicking=g(e.allowPicking,!0),this._show=g(e.show,!0),this._style=void 0,this._styleDirty=!1,this._styleCommandsNeeded=void 0;let n=g(e.featureIdLabel,"featureId_0");typeof n=="number"&&(n=`featureId_${n}`),this._featureIdLabel=n;let i=g(e.instanceFeatureIdLabel,"instanceFeatureId_0");typeof i=="number"&&(i=`instanceFeatureId_${i}`),this._instanceFeatureIdLabel=i,this._featureTables=[],this._featureTableId=void 0,this._featureTableIdDirty=!0,this._pipelineResources=[],this._modelResources=[],this._pickIds=[],this._boundingSphere=new ne,this._initialRadius=void 0,this._heightReference=g(e.heightReference,qe.NONE),this._heightDirty=this._heightReference!==qe.NONE,this._removeUpdateHeightCallback=void 0,this._enableVerticalExaggeration=g(e.enableVerticalExaggeration,!0),this._hasVerticalExaggeration=!1,this._clampedModelMatrix=void 0;let o=e.scene;c(o)&&c(o.terrainProviderChanged)&&(this._terrainProviderChangedCallback=o.terrainProviderChanged.addEventListener(()=>{this._heightDirty=!0})),this._scene=o,this._distanceDisplayCondition=e.distanceDisplayCondition;let r=new np(e.pointCloudShading);this._pointCloudShading=r,this._attenuation=r.attenuation,this._pointCloudBackFaceCulling=r.backFaceCulling;let s=e.clippingPlanes;c(s)&&s.owner===void 0?as.setOwner(s,this,"_clippingPlanes"):this._clippingPlanes=s,this._clippingPlanesState=0,this._clippingPlanesMatrix=N.clone(N.IDENTITY);let a=e.clippingPolygons;c(a)&&a.owner===void 0?Ch.setOwner(a,this,"_clippingPolygons"):this._clippingPolygons=a,this._clippingPolygonsState=0,this._lightColor=d.clone(e.lightColor),this._imageBasedLighting=c(e.imageBasedLighting)?e.imageBasedLighting:new wT,this._shouldDestroyImageBasedLighting=!c(e.imageBasedLighting),this._environmentMapManager=void 0;let l=new tg(e.environmentMapOptions);tg.setOwner(l,this,"_environmentMapManager"),this._backFaceCulling=g(e.backFaceCulling,!0),this._backFaceCullingDirty=!1,this._shadows=g(e.shadows,yn.ENABLED),this._shadowsDirty=!1,this._debugShowBoundingVolumeDirty=!1,this._debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this._enableDebugWireframe=g(e.enableDebugWireframe,!1),this._enableShowOutline=g(e.enableShowOutline,!0),this._debugWireframe=g(e.debugWireframe,!1),this._debugWireframe===!0&&this._enableDebugWireframe===!1&&this.type===fr.GLTF&&mt("model-debug-wireframe-ignored","enableDebugWireframe must be set to true in Model.fromGltf, otherwise debugWireframe will be ignored.");let u=e.credit;typeof u=="string"&&(u=new St(u)),this._credits=[],this._credit=u,this._resourceCredits=[],this._gltfCredits=[],this._showCreditsOnScreen=g(e.showCreditsOnScreen,!1),this._showCreditsOnScreenDirty=!0,this._splitDirection=g(e.splitDirection,Nr.NONE),this._enableShowOutline=g(e.enableShowOutline,!0),this.showOutline=g(e.showOutline,!0),this.outlineColor=g(e.outlineColor,z.BLACK),this._classificationType=e.classificationType,this._statistics=new y2,this._sceneMode=void 0,this._projectTo2D=g(e.projectTo2D,!1),this._enablePick=g(e.enablePick,!1),this._fogRenderable=void 0,this._skipLevelOfDetail=!1,this._ignoreCommands=g(e.ignoreCommands,!1),this._errorEvent=new fe,this._readyEvent=new fe,this._texturesReadyEvent=new fe,this._sceneGraph=void 0,this._nodesByName={},this.pickObject=e.pickObject}function M5(e,t){if(e._errorEvent.numberOfListeners>0){e._errorEvent.raiseEvent(t);return}console.log(t)}function d8e(e,t){let n=e._featureTables,i=t.propertyTables,o=i.length;for(let r=0;r<o;r++){let s=i[r],a=new GN({model:e,propertyTable:s});n.push(a)}return n}function h8e(e,t){let n=t._featureIdLabel,i=t._instanceFeatureIdLabel,o,r,s,a;for(o=0;o<e.nodes.length;o++)if(a=e.nodes[o],c(a.instances)&&(s=Xt.getFeatureIdsByLabel(a.instances.featureIds,i),c(s)&&c(s.propertyTableId)))return s.propertyTableId;for(o=0;o<e.nodes.length;o++)for(a=e.nodes[o],r=0;r<a.primitives.length;r++){let l=a.primitives[r],u=Xt.getFeatureIdsByLabel(l.featureIds,n);if(c(u))return u.propertyTableId}if(t._featureTables.length===1)return 0}function F5(e,t){if(!c(e)&&!c(t))return!1;if(c(e)!==c(t))return!0;let n=e.alpha,i=t.alpha;return Math.floor(n)!==Math.floor(i)||Math.ceil(n)!==Math.ceil(i)}Object.defineProperties(Zi.prototype,{ready:{get:function(){return this._ready}},errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},incrementallyLoadTextures:{get:function(){return g(this._loader.incrementallyLoadTextures,!1)}},texturesReadyEvent:{get:function(){return this._texturesReadyEvent}},loader:{get:function(){return this._loader}},statistics:{get:function(){return this._statistics}},activeAnimations:{get:function(){return this._activeAnimations}},clampAnimations:{get:function(){return this._clampAnimations},set:function(e){this._clampAnimations=e}},cull:{get:function(){return this._cull}},opaquePass:{get:function(){return this._opaquePass}},pointCloudShading:{get:function(){return this._pointCloudShading},set:function(e){C.defined("pointCloudShading",e),e!==this._pointCloudShading&&this.resetDrawCommands(),this._pointCloudShading=e}},customShader:{get:function(){return this._customShader},set:function(e){e!==this._customShader&&this.resetDrawCommands(),this._customShader=e}},sceneGraph:{get:function(){return this._sceneGraph}},content:{get:function(){return this._content}},heightReference:{get:function(){return this._heightReference},set:function(e){e!==this._heightReference&&(this._heightDirty=!0),this._heightReference=e}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(c(e)&&e.far<=e.near)throw new w("far must be greater than near");this._distanceDisplayCondition=Nt.clone(e,this._distanceDisplayCondition)}},structuralMetadata:{get:function(){return this._sceneGraph.components.structuralMetadata}},featureTableId:{get:function(){return this._featureTableId},set:function(e){this._featureTableId=e}},featureTables:{get:function(){return this._featureTables},set:function(e){this._featureTables=e}},id:{get:function(){return this._id},set:function(e){e!==this._id&&(this._idDirty=!0),this._id=e}},allowPicking:{get:function(){return this._allowPicking}},style:{get:function(){return this._style},set:function(e){this._style=e,this._styleDirty=!0}},color:{get:function(){return this._color},set:function(e){F5(e,this._color)&&this.resetDrawCommands(),this._color=z.clone(e,this._color)}},colorBlendMode:{get:function(){return this._colorBlendMode},set:function(e){this._colorBlendMode=e}},colorBlendAmount:{get:function(){return this._colorBlendAmount},set:function(e){this._colorBlendAmount=e}},silhouetteColor:{get:function(){return this._silhouetteColor},set:function(e){if(!z.equals(e,this._silhouetteColor)){let t=F5(e,this._silhouetteColor);this._silhouetteDirty=this._silhouetteDirty||t}this._silhouetteColor=z.clone(e,this._silhouetteColor)}},silhouetteSize:{get:function(){return this._silhouetteSize},set:function(e){if(e!==this._silhouetteSize){let t=this._silhouetteSize,n=e>0&&t===0||e===0&&t>0;this._silhouetteDirty=this._silhouetteDirty||n,this._backFaceCullingDirty=this._backFaceCullingDirty||n}this._silhouetteSize=e}},boundingSphere:{get:function(){if(!this._ready)throw new w("The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.");let e=c(this._clampedModelMatrix)?this._clampedModelMatrix:this.modelMatrix;return Voe(this,e),this._boundingSphere}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolumeDirty=!0),this._debugShowBoundingVolume=e}},debugWireframe:{get:function(){return this._debugWireframe},set:function(e){this._debugWireframe!==e&&this.resetDrawCommands(),this._debugWireframe=e,this._debugWireframe===!0&&this._enableDebugWireframe===!1&&this.type===fr.GLTF&&mt("model-debug-wireframe-ignored","enableDebugWireframe must be set to true in Model.fromGltfAsync, otherwise debugWireframe will be ignored.")}},show:{get:function(){return this._show},set:function(e){this._show=e}},featureIdLabel:{get:function(){return this._featureIdLabel},set:function(e){typeof e=="number"&&(e=`featureId_${e}`),C.typeOf.string("value",e),e!==this._featureIdLabel&&(this._featureTableIdDirty=!0),this._featureIdLabel=e}},instanceFeatureIdLabel:{get:function(){return this._instanceFeatureIdLabel},set:function(e){typeof e=="number"&&(e=`instanceFeatureId_${e}`),C.typeOf.string("value",e),e!==this._instanceFeatureIdLabel&&(this._featureTableIdDirty=!0),this._instanceFeatureIdLabel=e}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){e!==this._clippingPlanes&&(as.setOwner(e,this,"_clippingPlanes"),this.resetDrawCommands())}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){e!==this._clippingPolygons&&(Ch.setOwner(e,this,"_clippingPolygons"),this.resetDrawCommands())}},enableVerticalExaggeration:{get:function(){return this._enableVerticalExaggeration},set:function(e){e!==this._enableVerticalExaggeration&&this.resetDrawCommands(),this._enableVerticalExaggeration=e}},hasVerticalExaggeration:{get:function(){return this._hasVerticalExaggeration}},lightColor:{get:function(){return this._lightColor},set:function(e){c(e)!==c(this._lightColor)&&this.resetDrawCommands(),this._lightColor=d.clone(e,this._lightColor)}},imageBasedLighting:{get:function(){return this._imageBasedLighting},set:function(e){C.typeOf.object("imageBasedLighting",e),e!==this._imageBasedLighting&&(this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=e,this._shouldDestroyImageBasedLighting=!1,this.resetDrawCommands())}},environmentMapManager:{get:function(){return this._environmentMapManager},set:function(e){C.typeOf.object("environmentMapManager",e),e!==this.environmentMapManager&&(tg.setOwner(e,this,"_environmentMapManager"),this.resetDrawCommands())}},backFaceCulling:{get:function(){return this._backFaceCulling},set:function(e){e!==this._backFaceCulling&&(this._backFaceCullingDirty=!0),this._backFaceCulling=e}},scale:{get:function(){return this._scale},set:function(e){e!==this._scale&&(this._updateModelMatrix=!0),this._scale=e}},computedScale:{get:function(){return this._computedScale}},minimumPixelSize:{get:function(){return this._minimumPixelSize},set:function(e){e!==this._minimumPixelSize&&(this._updateModelMatrix=!0),this._minimumPixelSize=e}},maximumScale:{get:function(){return this._maximumScale},set:function(e){e!==this._maximumScale&&(this._updateModelMatrix=!0),this._maximumScale=e}},shadows:{get:function(){return this._shadows},set:function(e){e!==this._shadows&&(this._shadowsDirty=!0),this._shadows=e}},credit:{get:function(){return this._credit}},showCreditsOnScreen:{get:function(){return this._showCreditsOnScreen},set:function(e){this._showCreditsOnScreen!==e&&(this._showCreditsOnScreenDirty=!0),this._showCreditsOnScreen=e}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&this.resetDrawCommands(),this._splitDirection=e}},classificationType:{get:function(){return this._classificationType}},pickIds:{get:function(){return this._pickIds}},styleCommandsNeeded:{get:function(){return this._styleCommandsNeeded}}});Zi.prototype.getNode=function(e){if(!this._ready)throw new w("The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.");return C.typeOf.string("name",e),this._nodesByName[e]};Zi.prototype.setArticulationStage=function(e,t){if(C.typeOf.number("value",t),!this._ready)throw new w("The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.");this._sceneGraph.setArticulationStage(e,t)};Zi.prototype.applyArticulations=function(){if(!this._ready)throw new w("The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.");this._sceneGraph.applyArticulations()};Zi.prototype.getExtension=function(e){if(C.typeOf.string("extensionName",e),!this._ready)throw new w("The model is not loaded. Use Model.readyEvent or wait for Model.ready to be true.");return this._loader.components.extensions[e]};Zi.prototype.makeStyleDirty=function(){this._styleDirty=!0};Zi.prototype.resetDrawCommands=function(){this._drawCommandsBuilt=!1};var m8e=new N,p8e=new q,_8e=new N;Zi.prototype.update=function(e){let t=!1;try{t=g8e(this,e)}catch(n){if(!this._loader.incrementallyLoadTextures&&n.name==="TextureError")M5(this,n);else{let i=Xt.getError("model",this._resource,n);M5(this,i)}}if(y8e(this,e),b8e(this,e),x8e(this,e),!this._resourcesLoaded&&t){this._resourcesLoaded=!0;let n=this._loader.components;if(!c(n)){if(this._loader.isUnloaded())return;let r=Xt.getError("model",this._resource,new ie("Failed to load model."));M5(r),this._rejectLoad=this._rejectLoad&&this._rejectLoad(r)}let i=n.structuralMetadata;c(i)&&i.propertyTableCount>0&&d8e(this,i);let o=new g2({model:this,modelComponents:n});this._sceneGraph=o,this._gltfCredits=o.components.asset.credits}if(!(!this._resourcesLoaded||e.mode===J.MORPHING)){if(T8e(this),C8e(this),E8e(this,e),w8e(this),S8e(this,e),A8e(this,e),v8e(this,e),D8e(this,e),I8e(this,e),O8e(this,e),P8e(this,e),this._defaultTexture=e.context.defaultTexture,R8e(this,e),M8e(this,e),L8e(this),N8e(this,e),U8e(this,e),!this._ready){e.afterRender.push(()=>{this._ready=!0,this._readyEvent.raiseEvent(this)});return}this._loader.incrementallyLoadTextures&&!this._texturesLoaded&&this._loader.texturesLoaded&&(this.resetDrawCommands(),this._texturesLoaded=!0,this._texturesReadyEvent.raiseEvent(this)),B8e(this),z8e(this,e),V8e(this),H8e(this,e)}};function g8e(e,t){return!e._resourcesLoaded||e._loader.incrementallyLoadTextures&&!e._texturesLoaded?(t.afterRender.push(()=>!0),e._loader.process(t)):!0}function y8e(e,t){c(e._customShader)&&e._customShader.update(t)}function b8e(e,t){let n=e._environmentMapManager,i=t.passes.pick||t.passes.pickVoxel;e._ready&&n.owner===e&&!i&&(n.position=e._boundingSphere.center,n.shouldUpdate=!c(e._imageBasedLighting.sphericalHarmonicCoefficients)||!c(e._imageBasedLighting.specularEnvironmentMaps),n.update(t),n.shouldRegenerateShaders&&e.resetDrawCommands())}function x8e(e,t){e._imageBasedLighting.update(t),e._imageBasedLighting.shouldRegenerateShaders&&e.resetDrawCommands()}function T8e(e){if(!e._featureTableIdDirty)return;e._featureTableIdDirty=!1;let t=e._sceneGraph.components,n=t.structuralMetadata;c(n)&&n.propertyTableCount>0&&(e.featureTableId=h8e(t,e),e._styleDirty=!0,e.resetDrawCommands())}function C8e(e){e._styleDirty&&(e.applyStyle(e._style),e._styleDirty=!1)}function E8e(e,t){let n=e._featureTables,i=n.length,o=!1;for(let r=0;r<i;r++)n[r].update(t),n[r].styleCommandsNeededDirty&&(o=!0);o&&zoe(e)}function zoe(e){let t=e.featureTables[e.featureTableId];e._styleCommandsNeeded=vh.getStyleCommandsNeeded(t.featuresLength,t.batchTexture.translucentFeaturesLength)}function w8e(e){let t=e.pointCloudShading;t.attenuation!==e._attenuation&&(e.resetDrawCommands(),e._attenuation=t.attenuation),t.backFaceCulling!==e._pointCloudBackFaceCulling&&(e.resetDrawCommands(),e._pointCloudBackFaceCulling=t.backFaceCulling)}function S8e(e,t){e._silhouetteDirty&&(Hoe(t)&&e.resetDrawCommands(),e._silhouetteDirty=!1)}function A8e(e,t){let n=e.hasSkipLevelOfDetail(t);n!==e._skipLevelOfDetail&&(e.resetDrawCommands(),e._skipLevelOfDetail=n)}function v8e(e,t){let n=0;e.isClippingEnabled()&&(e._clippingPlanes.owner===e&&e._clippingPlanes.update(t),n=e._clippingPlanes.clippingPlanesState),n!==e._clippingPlanesState&&(e.resetDrawCommands(),e._clippingPlanesState=n)}function D8e(e,t){let n=0;e.isClippingPolygonsEnabled()&&(e._clippingPolygons.owner===e&&(e._clippingPolygons.update(t),e._clippingPolygons.queueCommands(t)),n=e._clippingPolygons.clippingPolygonsState),n!==e._clippingPolygonsState&&(e.resetDrawCommands(),e._clippingPolygonsState=n)}function I8e(e,t){t.mode!==e._sceneMode&&(e._projectTo2D?e.resetDrawCommands():e._updateModelMatrix=!0,e._sceneMode=t.mode)}function O8e(e,t){let n=t.fog.enabled&&t.fog.renderable;n!==e._fogRenderable&&(e.resetDrawCommands(),e._fogRenderable=n)}function P8e(e,t){if(e.enableVerticalExaggeration){let n=t.verticalExaggeration!==1;e.hasVerticalExaggeration!==n&&(e.resetDrawCommands(),e._hasVerticalExaggeration=n)}else e.hasVerticalExaggeration&&(e.resetDrawCommands(),e._hasVerticalExaggeration=!1)}function R8e(e,t){e._drawCommandsBuilt||(e.destroyPipelineResources(),e._sceneGraph.buildDrawCommands(t),e._drawCommandsBuilt=!0)}function M8e(e,t){if(!N.equals(e.modelMatrix,e._modelMatrix)){if(t.mode!==J.SCENE3D&&e._projectTo2D)throw new w("Model.modelMatrix cannot be changed in 2D or Columbus View if projectTo2D is true.");e._updateModelMatrix=!0,e._modelMatrix=N.clone(e.modelMatrix,e._modelMatrix)}}var mg=new d,L5=new re;function L8e(e){if(!e._updateModelMatrix&&!e._heightDirty&&e._minimumPixelSize===0)return;c(e._removeUpdateHeightCallback)&&(e._removeUpdateHeightCallback(),e._removeUpdateHeightCallback=void 0);let t=e._scene;if(!c(t)||e.heightReference===qe.NONE){if(e.heightReference!==qe.NONE)throw new w("Height reference is not supported without a scene.");e._clampedModelMatrix=void 0;return}let n=g(t.ellipsoid,Z.default),i=e.modelMatrix;mg.x=i[12],mg.y=i[13],mg.z=i[14];let o=n.cartesianToCartographic(mg);c(e._clampedModelMatrix)||(e._clampedModelMatrix=N.clone(i,new N)),e._removeUpdateHeightCallback=t.updateHeight(o,Uoe(e,n,o),e.heightReference);let r=t.getHeight(o,e.heightReference);if(c(r)){let s=Uoe(e,n,o);re.clone(o,L5),L5.height=r,s(L5)}e._heightDirty=!1,e._updateModelMatrix=!0}function N8e(e,t){if(!e._updateModelMatrix&&e._minimumPixelSize===0)return;let n=c(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;Voe(e,n),F8e(e,n,t)}function Voe(e,t){e._clampedScale=c(e._maximumScale)?Math.min(e._scale,e._maximumScale):e._scale,e._boundingSphere.center=d.multiplyByScalar(e._sceneGraph.boundingSphere.center,e._clampedScale,e._boundingSphere.center),e._boundingSphere.radius=e._initialRadius*e._clampedScale,e._boundingSphere=ne.transform(e._boundingSphere,t,e._boundingSphere)}function F8e(e,t,n){let i=e.scale;if(e.minimumPixelSize!==0&&!e._projectTo2D){let o=n.context,r=Math.max(o.drawingBufferWidth,o.drawingBufferHeight);N.getTranslation(t,mg),e._sceneMode!==J.SCENE3D&&Yi.computeActualEllipsoidPosition(n,mg,mg);let s=e._boundingSphere.radius,a=G8e(mg,s,n),l=1/a;Math.min(l*(2*s),r)<e.minimumPixelSize&&(i=e.minimumPixelSize*a/(2*e._initialRadius))}e._computedScale=c(e.maximumScale)?Math.min(e.maximumScale,i):i}function B8e(e){if(!e._idDirty)return;e._idDirty=!1;let t=e._id,n=e._pickIds,i=n.length;for(let o=0;o<i;++o)n[o].object.id=t}var k8e=new q(1,0,0,0,0,1,0,-1,0);function U8e(e,t){let n=c(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix,i=g(e.referenceMatrix,n),o=t.context,r=p8e,s=m8e;if(s=N.multiply(o.uniformState.view3D,i,s),r=N.getRotation(s,r),r=q.transpose(r,r),e._iblReferenceFrameMatrix=q.multiply(k8e,r,e._iblReferenceFrameMatrix),e.isClippingEnabled()){let a=_8e;a=N.multiply(o.uniformState.view3D,i,a),a=N.multiply(a,e._clippingPlanes.modelMatrix,a),e._clippingPlanesMatrix=N.inverseTranspose(a,e._clippingPlanesMatrix)}}function z8e(e,t){let n=e._sceneGraph;if(e._updateModelMatrix||e._minimumPixelSize!==0){let o=c(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;n.updateModelMatrix(o,t),e._updateModelMatrix=!1}e._backFaceCullingDirty&&(n.updateBackFaceCulling(e._backFaceCulling),e._backFaceCullingDirty=!1),e._shadowsDirty&&(n.updateShadows(e._shadows),e._shadowsDirty=!1),e._debugShowBoundingVolumeDirty&&(n.updateShowBoundingVolume(e._debugShowBoundingVolume),e._debugShowBoundingVolumeDirty=!1);let i=!1;c(e.classificationType)||(i=e._userAnimationDirty||e._activeAnimations.update(t)),n.update(t,i),e._userAnimationDirty=!1}function V8e(e){if(!e._showCreditsOnScreenDirty)return;e._showCreditsOnScreenDirty=!1,e._credits.length=0;let t=e._showCreditsOnScreen;if(c(e._credit)){let s=St.clone(e._credit);s.showOnScreen=s.showOnScreen||t,e._credits.push(s)}let n=e._resourceCredits,i=n.length;for(let s=0;s<i;s++){let a=St.clone(n[s]);a.showOnScreen=a.showOnScreen||t,e._credits.push(a)}let o=e._gltfCredits,r=o.length;for(let s=0;s<r;s++){let a=St.clone(o[s]);a.showOnScreen=a.showOnScreen||t,e._credits.push(a)}}function H8e(e,t){let n=W8e(e,t),i=e.isInvisible(),o=e.hasSilhouette(t),r=e._show&&e._computedScale!==0&&n&&(!i||o),s=t.passes,a=s.render||s.pick&&e.allowPicking;r&&!e._ignoreCommands&&a&&(q8e(e,t),e._sceneGraph.pushDrawCommands(t))}var N5=new ne;function G8e(e,t,n){return N5.center=e,N5.radius=t,n.camera.getPixelSize(N5,n.context.drawingBufferWidth,n.context.drawingBufferHeight)}var T2=new d;function Uoe(e,t,n){return function(i){$x(e.heightReference)&&(i.height+=n.height),t.cartographicToCartesian(i,T2);let o=e._clampedModelMatrix;N.clone(e.modelMatrix,o),o[12]=T2.x,o[13]=T2.y,o[14]=T2.z,e._heightDirty=!0}}var j8e=new d;function W8e(e,t){let n=e.distanceDisplayCondition;if(!c(n))return!0;let i=n.near*n.near,o=n.far*n.far,r;if(t.mode===J.SCENE2D){let a=(t.camera.frustum.right-t.camera.frustum.left)*.5;r=a*a}else{let s=N.getTranslation(e.modelMatrix,j8e);Yi.computeActualEllipsoidPosition(t,s,s),r=d.distanceSquared(s,t.camera.positionWC)}return r>=i&&r<=o}function q8e(e,t){let n=t.creditDisplay,i=e._credits,o=i.length;for(let r=0;r<o;r++)n.addCreditToNextFrame(i[r])}Zi.prototype.isTranslucent=function(){let e=this.color;return c(e)&&e.alpha>0&&e.alpha<1};Zi.prototype.isInvisible=function(){let e=this.color;return c(e)&&e.alpha===0};function Hoe(e){return e.context.stencilBuffer}Zi.prototype.hasSilhouette=function(e){return Hoe(e)&&this._silhouetteSize>0&&this._silhouetteColor.alpha>0&&!c(this._classificationType)};Zi.prototype.hasSkipLevelOfDetail=function(e){if(!fr.is3DTiles(this.type))return!1;let t=e.context.stencilBuffer,n=this._content.tileset;return t&&n.isSkippingLevelOfDetail};Zi.prototype.isClippingEnabled=function(){let e=this._clippingPlanes;return c(e)&&e.enabled&&e.length!==0};Zi.prototype.pick=function(e,t,n,i,o){return WA(this,e,t,n,i,o)};Zi.prototype.isClippingPolygonsEnabled=function(){let e=this._clippingPolygons;return c(e)&&e.enabled&&e.length!==0};Zi.prototype.isDestroyed=function(){return!1};Zi.prototype.destroy=function(){let e=this._loader;c(e)&&e.destroy();let t=this._featureTables;if(c(t)){let r=t.length;for(let s=0;s<r;s++)t[s].destroy()}this.destroyPipelineResources(),this.destroyModelResources(),c(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),c(this._terrainProviderChangedCallback)&&(this._terrainProviderChangedCallback(),this._terrainProviderChangedCallback=void 0);let n=this._clippingPlanes;c(n)&&!n.isDestroyed()&&n.owner===this&&n.destroy(),this._clippingPlanes=void 0;let i=this._clippingPolygons;c(i)&&!i.isDestroyed()&&i.owner===this&&i.destroy(),this._clippingPolygons=void 0,this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=void 0;let o=this._environmentMapManager;!o.isDestroyed()&&o.owner===this&&o.destroy(),this._environmentMapManager=void 0,ue(this)};Zi.prototype.destroyPipelineResources=function(){let e=this._pipelineResources;for(let t=0;t<e.length;t++)e[t].destroy();this._pipelineResources.length=0,this._pickIds.length=0};Zi.prototype.destroyModelResources=function(){let e=this._modelResources;for(let t=0;t<e.length;t++)e[t].destroy();this._modelResources.length=0};Zi.fromGltfAsync=async function(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.url)&&!c(e.gltf))throw new w("options.url is required.");let t=g(e.url,e.gltf),n={releaseGltfJson:e.releaseGltfJson,asynchronous:e.asynchronous,incrementallyLoadTextures:e.incrementallyLoadTextures,upAxis:e.upAxis,forwardAxis:e.forwardAxis,loadAttributesFor2D:e.projectTo2D,enablePick:e.enablePick,loadIndicesForWireframe:e.enableDebugWireframe,loadPrimitiveOutline:e.enableShowOutline,loadForClassification:c(e.classificationType)},i=g(e.basePath,""),o=Te.createIfNeeded(i);c(t.asset)?(n.gltfJson=t,n.baseResource=o,n.gltfResource=o):t instanceof Uint8Array?(n.typedArray=t,n.baseResource=o,n.gltfResource=o):n.gltfResource=Te.createIfNeeded(t);let r=new rg(n),a=c(e.content)?fr.TILE_GLTF:fr.GLTF,l=n.gltfResource,u=qA(r,a,e);u.resource=l,u.environmentMapOptions=e.environmentMapOptions;try{await r.load()}catch(p){throw r.destroy(),Xt.getError("model",l,p)}let f=e.gltfCallback;c(f)&&(C.typeOf.func("options.gltfCallback",f),f(r.gltfJson));let h=new Zi(u),m=h._resource.credits;if(c(m)){let p=m.length;for(let _=0;_<p;_++)h._resourceCredits.push(St.clone(m[_]))}return h};Zi.fromB3dm=async function(e){let t={b3dmResource:e.resource,arrayBuffer:e.arrayBuffer,byteOffset:e.byteOffset,releaseGltfJson:e.releaseGltfJson,asynchronous:e.asynchronous,incrementallyLoadTextures:e.incrementallyLoadTextures,upAxis:e.upAxis,forwardAxis:e.forwardAxis,loadAttributesFor2D:e.projectTo2D,enablePick:e.enablePick,loadIndicesForWireframe:e.enableDebugWireframe,loadPrimitiveOutline:e.enableShowOutline,loadForClassification:c(e.classificationType)},n=new vN(t);try{await n.load();let i=qA(n,fr.TILE_B3DM,e);return new Zi(i)}catch(i){throw n.destroy(),i}};Zi.fromPnts=async function(e){let t={arrayBuffer:e.arrayBuffer,byteOffset:e.byteOffset,loadAttributesFor2D:e.projectTo2D},n=new x2(t);try{await n.load();let i=qA(n,fr.TILE_PNTS,e);return new Zi(i)}catch(i){throw n.destroy(),i}};Zi.fromI3dm=async function(e){let t={i3dmResource:e.resource,arrayBuffer:e.arrayBuffer,byteOffset:e.byteOffset,releaseGltfJson:e.releaseGltfJson,asynchronous:e.asynchronous,incrementallyLoadTextures:e.incrementallyLoadTextures,upAxis:e.upAxis,forwardAxis:e.forwardAxis,loadAttributesFor2D:e.projectTo2D,enablePick:e.enablePick,loadIndicesForWireframe:e.enableDebugWireframe,loadPrimitiveOutline:e.enableShowOutline},n=new LN(t);try{await n.load();let i=qA(n,fr.TILE_I3DM,e);return new Zi(i)}catch(i){throw n.destroy(),i}};Zi.fromGeoJson=async function(e){let t={geoJson:e.geoJson},n=new IN(t),i=qA(n,fr.TILE_GEOJSON,e);return new Zi(i)};var Y8e=new z;Zi.prototype.applyColorAndShow=function(e){let t=z.clone(this._color,Y8e),n=c(e)&&c(e.color),i=c(e)&&c(e.show);this._color=n?e.color.evaluateColor(void 0,this._color):z.clone(z.WHITE,this._color),this._show=i?e.show.evaluate(void 0):!0,F5(t,this._color)&&this.resetDrawCommands()};Zi.prototype.applyStyle=function(e){let t=this.type===fr.TILE_PNTS,n=c(this.featureTableId)&&this.featureTables[this.featureTableId].featuresLength>0,i=c(this.structuralMetadata)?this.structuralMetadata.propertyAttributes:void 0,o=c(i)&&c(i[0]);if(t&&(!n||o)){this.resetDrawCommands();return}n?(this.featureTables[this.featureTableId].applyStyle(e),zoe(this,e)):(this.applyColorAndShow(e),this._styleCommandsNeeded=void 0)};function qA(e,t,n){return{loader:e,type:t,resource:n.resource,show:n.show,modelMatrix:n.modelMatrix,scale:n.scale,enableVerticalExaggeration:n.enableVerticalExaggeration,minimumPixelSize:n.minimumPixelSize,maximumScale:n.maximumScale,id:n.id,allowPicking:n.allowPicking,clampAnimations:n.clampAnimations,shadows:n.shadows,debugShowBoundingVolume:n.debugShowBoundingVolume,enableDebugWireframe:n.enableDebugWireframe,debugWireframe:n.debugWireframe,cull:n.cull,opaquePass:n.opaquePass,customShader:n.customShader,content:n.content,heightReference:n.heightReference,scene:n.scene,distanceDisplayCondition:n.distanceDisplayCondition,color:n.color,colorBlendAmount:n.colorBlendAmount,colorBlendMode:n.colorBlendMode,silhouetteColor:n.silhouetteColor,silhouetteSize:n.silhouetteSize,enableShowOutline:n.enableShowOutline,showOutline:n.showOutline,outlineColor:n.outlineColor,clippingPlanes:n.clippingPlanes,clippingPolygons:n.clippingPolygons,lightColor:n.lightColor,imageBasedLighting:n.imageBasedLighting,backFaceCulling:n.backFaceCulling,credit:n.credit,showCreditsOnScreen:n.showCreditsOnScreen,splitDirection:n.splitDirection,projectTo2D:n.projectTo2D,enablePick:n.enablePick,featureIdLabel:n.featureIdLabel,instanceFeatureIdLabel:n.instanceFeatureIdLabel,pointCloudShading:n.pointCloudShading,classificationType:n.classificationType,pickObject:n.pickObject}}var Dh=Zi;function Xr(e,t,n){this._tileset=e,this._tile=t,this._resource=n,this._model=void 0,this._metadata=void 0,this._group=void 0,this._ready=!1}Object.defineProperties(Xr.prototype,{featuresLength:{get:function(){let e=this._model,t=e.featureTables,n=e.featureTableId;return c(t)&&c(t[n])?t[n].featuresLength:0}},pointsLength:{get:function(){return this._model.statistics.pointsLength}},trianglesLength:{get:function(){return this._model.statistics.trianglesLength}},geometryByteLength:{get:function(){return this._model.statistics.geometryByteLength}},texturesByteLength:{get:function(){return this._model.statistics.texturesByteLength}},batchTableByteLength:{get:function(){let e=this._model.statistics;return e.propertyTablesByteLength+e.batchTexturesByteLength}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){let e=this._model,t=e.featureTables,n=e.featureTableId;if(c(t)&&c(t[n]))return t[n]}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},group:{get:function(){return this._group},set:function(e){this._group=e}}});Xr.prototype.getExtension=function(e){return this._model.getExtension(e)};Xr.prototype.getFeature=function(e){let t=this._model,n=t.featureTableId;if(!c(n))throw new w("No feature ID set is selected. Make sure Cesium3DTileset.featureIdLabel or Cesium3DTileset.instanceFeatureIdLabel is defined");let i=t.featureTables[n];if(!c(i))throw new w("No feature table found for the selected feature ID set");let o=i.featuresLength;if(!c(e)||e<0||e>=o)throw new w(`featureId is required and must be between 0 and featuresLength - 1 (${o-1}).`);return i.getFeature(e)};Xr.prototype.hasProperty=function(e,t){let n=this._model,i=n.featureTableId;return c(i)?n.featureTables[i].hasProperty(e,t):!1};Xr.prototype.applyDebugSettings=function(e,t){t=e?t:z.WHITE,this.featuresLength===0?this._model.color=t:c(this.batchTable)&&this.batchTable.setAllColor(t)};Xr.prototype.applyStyle=function(e){this._model.style=e};Xr.prototype.update=function(e,t){let n=this._model,i=this._tile;n.colorBlendAmount=e.colorBlendAmount,n.colorBlendMode=e.colorBlendMode,n.modelMatrix=i.computedTransform,n.customShader=e.customShader,n.featureIdLabel=e.featureIdLabel,n.instanceFeatureIdLabel=e.instanceFeatureIdLabel,n.lightColor=e.lightColor,n.imageBasedLighting=e.imageBasedLighting,n.backFaceCulling=e.backFaceCulling,n.shadows=e.shadows,n.showCreditsOnScreen=e.showCreditsOnScreen,n.splitDirection=e.splitDirection,n.debugWireframe=e.debugWireframe,n.showOutline=e.showOutline,n.outlineColor=e.outlineColor,n.pointCloudShading=e.pointCloudShading;let o=e.clippingPlanes;n.referenceMatrix=e.clippingPlanesOriginMatrix,c(o)&&i.clippingPlanesDirty&&(n._clippingPlanes=o.enabled&&i._isClipped?o:void 0);let r=e.environmentMapManager;n.environmentMapManager!==o&&(n._environmentMapManager=r),c(o)&&c(n._clippingPlanes)&&n._clippingPlanes!==o&&(n._clippingPlanes=o,n._clippingPlanesState=0);let s=e.clippingPolygons;c(s)&&i.clippingPolygonsDirty&&(n._clippingPolygons=s.enabled&&i._isClippedByPolygon?s:void 0),c(s)&&c(n._clippingPolygons)&&n._clippingPolygons!==s&&(n._clippingPolygons=s,n._clippingPolygonsState=0),n.update(t),!this._ready&&n.ready&&(n.activeAnimations.addAll({loop:Hl.REPEAT}),this._ready=!0)};Xr.prototype.isDestroyed=function(){return!1};Xr.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),ue(this)};Xr.fromGltf=async function(e,t,n,i){let o=new Xr(e,t,n),s=YA(e,t,o,{gltf:i,basePath:n}),a=e.vectorClassificationOnly?void 0:e.classificationType;s.classificationType=a;let l=await Dh.fromGltfAsync(s);return o._model=l,o};Xr.fromB3dm=async function(e,t,n,i,o){let r=new Xr(e,t,n),a=YA(e,t,r,{arrayBuffer:i,byteOffset:o,resource:n}),l=e.vectorClassificationOnly?void 0:e.classificationType;a.classificationType=l;let u=await Dh.fromB3dm(a);return r._model=u,r};Xr.fromI3dm=async function(e,t,n,i,o){let r=new Xr(e,t,n),a=YA(e,t,r,{arrayBuffer:i,byteOffset:o,resource:n}),l=await Dh.fromI3dm(a);return r._model=l,r};Xr.fromPnts=async function(e,t,n,i,o){let r=new Xr(e,t,n),a=YA(e,t,r,{arrayBuffer:i,byteOffset:o,resource:n}),l=await Dh.fromPnts(a);return r._model=l,r};Xr.fromGeoJson=async function(e,t,n,i){let o=new Xr(e,t,n),s=YA(e,t,o,{geoJson:i,resource:n}),a=await Dh.fromGeoJson(s);return o._model=a,o};Xr.prototype.pick=function(e,t,n){if(!c(this._model)||!this._ready)return;let i=t.verticalExaggeration,o=t.verticalExaggerationRelativeHeight;return this._model.pick(e,t,i,o,Z.WGS84,n)};function YA(e,t,n,i){let o={cull:!1,releaseGltfJson:!0,opaquePass:xe.CESIUM_3D_TILE,modelMatrix:t.computedTransform,upAxis:e._modelUpAxis,forwardAxis:e._modelForwardAxis,incrementallyLoadTextures:!1,customShader:e.customShader,content:n,colorBlendMode:e.colorBlendMode,colorBlendAmount:e.colorBlendAmount,lightColor:e.lightColor,imageBasedLighting:e.imageBasedLighting,featureIdLabel:e.featureIdLabel,instanceFeatureIdLabel:e.instanceFeatureIdLabel,pointCloudShading:e.pointCloudShading,clippingPlanes:e.clippingPlanes,backFaceCulling:e.backFaceCulling,shadows:e.shadows,showCreditsOnScreen:e.showCreditsOnScreen,splitDirection:e.splitDirection,enableDebugWireframe:e._enableDebugWireframe,debugWireframe:e.debugWireframe,projectTo2D:e._projectTo2D,enablePick:e._enablePick,enableShowOutline:e._enableShowOutline,showOutline:e.showOutline,outlineColor:e.outlineColor};return bt(i,o)}var up=Xr;function Xu(e,t,n){this._tileset=e,this._tile=t,this._resource=n,this.featurePropertiesDirty=!1,this._metadata=void 0,this._group=void 0,this._ready=!1}Object.defineProperties(Xu.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},group:{get:function(){return this._group},set:function(e){this._group=e}}});Xu.fromJson=function(e,t,n,i){let o=new Xu(e,t,n);return o._tileset.loadTileset(o._resource,i,o._tile),o._ready=!0,o};Xu.prototype.hasProperty=function(e,t){return!1};Xu.prototype.getFeature=function(e){};Xu.prototype.applyDebugSettings=function(e,t){};Xu.prototype.applyStyle=function(e){};Xu.prototype.update=function(e,t){};Xu.prototype.pick=function(e,t,n){};Xu.prototype.isDestroyed=function(){return!1};Xu.prototype.destroy=function(){return ue(this)};var C2=Xu;var E2=`uniform sampler2D u_atlas;
|
| #ifdef VECTOR_TILE
| uniform vec4 u_highlightColor;
| #endif
|
| in vec2 v_textureCoordinates;
| in vec4 v_pickColor;
| in vec4 v_color;
| in float v_splitDirection;
|
| #ifdef SDF
| in vec4 v_outlineColor;
| in float v_outlineWidth;
| #endif
|
| #ifdef FRAGMENT_DEPTH_CHECK
| in vec4 v_textureCoordinateBounds; // the min and max x and y values for the texture coordinates
| in vec4 v_originTextureCoordinateAndTranslate; // texture coordinate at the origin, billboard translate (used for label glyphs)
| in vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize
| in mat2 v_rotationMatrix;
|
| const float SHIFT_LEFT12 = 4096.0;
| const float SHIFT_LEFT1 = 2.0;
|
| const float SHIFT_RIGHT12 = 1.0 / 4096.0;
| const float SHIFT_RIGHT1 = 1.0 / 2.0;
|
| float getGlobeDepth(vec2 adjustedST, vec2 depthLookupST, bool applyTranslate, vec2 dimensions, vec2 imageSize)
| {
| vec2 lookupVector = imageSize * (depthLookupST - adjustedST);
| lookupVector = v_rotationMatrix * lookupVector;
| vec2 labelOffset = (dimensions - imageSize) * (depthLookupST - vec2(0.0, v_originTextureCoordinateAndTranslate.y)); // aligns label glyph with bounding rectangle. Will be zero for billboards because dimensions and imageSize will be equal
|
| vec2 translation = v_originTextureCoordinateAndTranslate.zw;
|
| if (applyTranslate)
| {
| // this is only needed for labels where the horizontal origin is not LEFT
| // it moves the label back to where the "origin" should be since all label glyphs are set to HorizontalOrigin.LEFT
| translation += (dimensions * v_originTextureCoordinateAndTranslate.xy * vec2(1.0, 0.0));
| }
|
| vec2 st = ((lookupVector - translation + labelOffset) + gl_FragCoord.xy) / czm_viewport.zw;
| float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st));
|
| if (logDepthOrDepth == 0.0)
| {
| return 0.0; // not on the globe
| }
|
| vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
| return eyeCoordinate.z / eyeCoordinate.w;
| }
| #endif
|
|
| #ifdef SDF
|
| // Get the distance from the edge of a glyph at a given position sampling an SDF texture.
| float getDistance(vec2 position)
| {
| return texture(u_atlas, position).r;
| }
|
| // Samples the sdf texture at the given position and produces a color based on the fill color and the outline.
| vec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smoothing)
| {
| float distance = getDistance(position);
|
| if (outlineWidth > 0.0)
| {
| // Don't get the outline edge exceed the SDF_EDGE
| float outlineEdge = clamp(SDF_EDGE - outlineWidth, 0.0, SDF_EDGE);
| float outlineFactor = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);
| vec4 sdfColor = mix(outlineColor, v_color, outlineFactor);
| float alpha = smoothstep(outlineEdge - smoothing, outlineEdge + smoothing, distance);
| return vec4(sdfColor.rgb, sdfColor.a * alpha);
| }
| else
| {
| float alpha = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);
| return vec4(v_color.rgb, v_color.a * alpha);
| }
| }
| #endif
|
| void main()
| {
| if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
| if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
|
| vec4 color = texture(u_atlas, v_textureCoordinates);
|
| #ifdef SDF
| float outlineWidth = v_outlineWidth;
| vec4 outlineColor = v_outlineColor;
|
| // Get the current distance
| float distance = getDistance(v_textureCoordinates);
|
| #if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
| float smoothing = fwidth(distance);
| // Get an offset that is approximately half the distance to the neighbor pixels
| // 0.354 is approximately half of 1/sqrt(2)
| vec2 sampleOffset = 0.354 * vec2(dFdx(v_textureCoordinates) + dFdy(v_textureCoordinates));
|
| // Sample the center point
| vec4 center = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);
|
| // Sample the 4 neighbors
| vec4 color1 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);
| vec4 color2 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);
| vec4 color3 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);
| vec4 color4 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);
|
| // Equally weight the center sample and the 4 neighboring samples
| color = (center + color1 + color2 + color3 + color4)/5.0;
| #else
| // If no derivatives available (IE 10?), just do a single sample
| float smoothing = 1.0/32.0;
| color = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);
| #endif
|
| color = czm_gammaCorrect(color);
| #else
| color = czm_gammaCorrect(color);
| color *= czm_gammaCorrect(v_color);
| #endif
|
| // Fully transparent parts of the billboard are not pickable.
| #if !defined(OPAQUE) && !defined(TRANSLUCENT)
| if (color.a < 0.005) // matches 0/255 and 1/255
| {
| discard;
| }
| #else
| // The billboard is rendered twice. The opaque pass discards translucent fragments
| // and the translucent pass discards opaque fragments.
| #ifdef OPAQUE
| if (color.a < 0.995) // matches < 254/255
| {
| discard;
| }
| #else
| if (color.a >= 0.995) // matches 254/255 and 255/255
| {
| discard;
| }
| #endif
| #endif
|
| #ifdef VECTOR_TILE
| color *= u_highlightColor;
| #endif
| out_FragColor = color;
|
| #ifdef LOG_DEPTH
| czm_writeLogDepth();
| #endif
|
| #ifdef FRAGMENT_DEPTH_CHECK
| float temp = v_compressed.y;
|
| temp = temp * SHIFT_RIGHT1;
|
| float temp2 = (temp - floor(temp)) * SHIFT_LEFT1;
| bool enableDepthTest = temp2 != 0.0;
| bool applyTranslate = floor(temp) != 0.0;
|
| if (enableDepthTest) {
| temp = v_compressed.z;
| temp = temp * SHIFT_RIGHT12;
|
| vec2 dimensions;
| dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;
| dimensions.x = floor(temp);
|
| temp = v_compressed.w;
| temp = temp * SHIFT_RIGHT12;
|
| vec2 imageSize;
| imageSize.y = (temp - floor(temp)) * SHIFT_LEFT12;
| imageSize.x = floor(temp);
|
| vec2 adjustedST = v_textureCoordinates - v_textureCoordinateBounds.xy;
| adjustedST = adjustedST / vec2(v_textureCoordinateBounds.z - v_textureCoordinateBounds.x, v_textureCoordinateBounds.w - v_textureCoordinateBounds.y);
|
| float epsilonEyeDepth = v_compressed.x + czm_epsilon1;
| float globeDepth1 = getGlobeDepth(adjustedST, v_originTextureCoordinateAndTranslate.xy, applyTranslate, dimensions, imageSize);
|
| // negative values go into the screen
| if (globeDepth1 != 0.0 && globeDepth1 > epsilonEyeDepth)
| {
| float globeDepth2 = getGlobeDepth(adjustedST, vec2(0.0, 1.0), applyTranslate, dimensions, imageSize); // top left corner
| if (globeDepth2 != 0.0 && globeDepth2 > epsilonEyeDepth)
| {
| float globeDepth3 = getGlobeDepth(adjustedST, vec2(1.0, 1.0), applyTranslate, dimensions, imageSize); // top right corner
| if (globeDepth3 != 0.0 && globeDepth3 > epsilonEyeDepth)
| {
| discard;
| }
| }
| }
| }
| #endif
|
| }
| `;var w2=`#ifdef INSTANCED
| in vec2 direction;
| #endif
| in vec4 positionHighAndScale;
| in vec4 positionLowAndRotation;
| in vec4 compressedAttribute0; // pixel offset, translate, horizontal origin, vertical origin, show, direction, texture coordinates (texture offset)
| in vec4 compressedAttribute1; // aligned axis, translucency by distance, image width
| in vec4 compressedAttribute2; // label horizontal origin, image height, color, pick color, size in meters, valid aligned axis, 13 bits free
| in vec4 eyeOffset; // eye offset in meters, 4 bytes free (texture range)
| in vec4 scaleByDistance; // near, nearScale, far, farScale
| in vec4 pixelOffsetScaleByDistance; // near, nearScale, far, farScale
| in vec4 compressedAttribute3; // distance display condition near, far, disableDepthTestDistance, dimensions
| in vec2 sdf; // sdf outline color (rgb) and width (w)
| in float splitDirection; // splitDirection
| #if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)
| in vec4 textureCoordinateBoundsOrLabelTranslate; // the min and max x and y values for the texture coordinates
| #endif
| #ifdef VECTOR_TILE
| in float a_batchId;
| #endif
|
| out vec2 v_textureCoordinates;
| #ifdef FRAGMENT_DEPTH_CHECK
| out vec4 v_textureCoordinateBounds;
| out vec4 v_originTextureCoordinateAndTranslate;
| out vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize
| out mat2 v_rotationMatrix;
| #endif
|
| out vec4 v_pickColor;
| out vec4 v_color;
| out float v_splitDirection;
| #ifdef SDF
| out vec4 v_outlineColor;
| out float v_outlineWidth;
| #endif
|
| const float UPPER_BOUND = 32768.0;
|
| const float SHIFT_LEFT16 = 65536.0;
| const float SHIFT_LEFT12 = 4096.0;
| const float SHIFT_LEFT8 = 256.0;
| const float SHIFT_LEFT7 = 128.0;
| const float SHIFT_LEFT5 = 32.0;
| const float SHIFT_LEFT3 = 8.0;
| const float SHIFT_LEFT2 = 4.0;
| const float SHIFT_LEFT1 = 2.0;
|
| const float SHIFT_RIGHT12 = 1.0 / 4096.0;
| const float SHIFT_RIGHT8 = 1.0 / 256.0;
| const float SHIFT_RIGHT7 = 1.0 / 128.0;
| const float SHIFT_RIGHT5 = 1.0 / 32.0;
| const float SHIFT_RIGHT3 = 1.0 / 8.0;
| const float SHIFT_RIGHT2 = 1.0 / 4.0;
| const float SHIFT_RIGHT1 = 1.0 / 2.0;
|
| vec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters, out mat2 rotationMatrix, out float mpp)
| {
| // Note the halfSize cannot be computed in JavaScript because it is sent via
| // compressed vertex attributes that coerce it to an integer.
| vec2 halfSize = imageSize * scale * 0.5;
| halfSize *= ((direction * 2.0) - 1.0);
|
| vec2 originTranslate = origin * abs(halfSize);
|
| #if defined(ROTATION) || defined(ALIGNED_AXIS)
| if (validAlignedAxis || rotation != 0.0)
| {
| float angle = rotation;
| if (validAlignedAxis)
| {
| vec4 projectedAlignedAxis = czm_modelView3D * vec4(alignedAxis, 0.0);
| angle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /
| (projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));
| }
|
| float cosTheta = cos(angle);
| float sinTheta = sin(angle);
| rotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);
| halfSize = rotationMatrix * halfSize;
| }
| else
| {
| rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);
| }
| #endif
|
| mpp = czm_metersPerPixel(positionEC);
| positionEC.xy += (originTranslate + halfSize) * czm_branchFreeTernary(sizeInMeters, 1.0, mpp);
| positionEC.xy += (translate + pixelOffset) * mpp;
|
| return positionEC;
| }
|
| #ifdef VERTEX_DEPTH_CHECK
| float getGlobeDepth(vec4 positionEC)
| {
| vec4 posWC = czm_eyeToWindowCoordinates(positionEC);
|
| float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));
|
| if (globeDepth == 0.0)
| {
| return 0.0; // not on the globe
| }
|
| vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);
| return eyeCoordinate.z / eyeCoordinate.w;
| }
| #endif
| void main()
| {
| // Modifying this shader may also require modifications to Billboard._computeScreenSpacePosition
|
| // unpack attributes
| vec3 positionHigh = positionHighAndScale.xyz;
| vec3 positionLow = positionLowAndRotation.xyz;
| float scale = positionHighAndScale.w;
|
| #if defined(ROTATION) || defined(ALIGNED_AXIS)
| float rotation = positionLowAndRotation.w;
| #else
| float rotation = 0.0;
| #endif
|
| float compressed = compressedAttribute0.x;
|
| vec2 pixelOffset;
| pixelOffset.x = floor(compressed * SHIFT_RIGHT7);
| compressed -= pixelOffset.x * SHIFT_LEFT7;
| pixelOffset.x -= UPPER_BOUND;
|
| vec2 origin;
| origin.x = floor(compressed * SHIFT_RIGHT5);
| compressed -= origin.x * SHIFT_LEFT5;
|
| origin.y = floor(compressed * SHIFT_RIGHT3);
| compressed -= origin.y * SHIFT_LEFT3;
|
| #ifdef FRAGMENT_DEPTH_CHECK
| vec2 depthOrigin = origin.xy;
| #endif
| origin -= vec2(1.0);
|
| float show = floor(compressed * SHIFT_RIGHT2);
| compressed -= show * SHIFT_LEFT2;
|
| #ifdef INSTANCED
| vec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);
| vec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);
| vec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;
| #else
| vec2 direction;
| direction.x = floor(compressed * SHIFT_RIGHT1);
| direction.y = compressed - direction.x * SHIFT_LEFT1;
|
| vec2 textureCoordinates = czm_decompressTextureCoordinates(compressedAttribute0.w);
| #endif
|
| float temp = compressedAttribute0.y * SHIFT_RIGHT8;
| pixelOffset.y = -(floor(temp) - UPPER_BOUND);
|
| vec2 translate;
| translate.y = (temp - floor(temp)) * SHIFT_LEFT16;
|
| temp = compressedAttribute0.z * SHIFT_RIGHT8;
| translate.x = floor(temp) - UPPER_BOUND;
|
| translate.y += (temp - floor(temp)) * SHIFT_LEFT8;
| translate.y -= UPPER_BOUND;
|
| temp = compressedAttribute1.x * SHIFT_RIGHT8;
| float temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2);
|
| vec2 imageSize = vec2(floor(temp), temp2);
|
| #ifdef FRAGMENT_DEPTH_CHECK
| float labelHorizontalOrigin = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2));
| float applyTranslate = 0.0;
| if (labelHorizontalOrigin != 0.0) // is a billboard, so set apply translate to false
| {
| applyTranslate = 1.0;
| labelHorizontalOrigin -= 2.0;
| depthOrigin.x = labelHorizontalOrigin + 1.0;
| }
|
| depthOrigin = vec2(1.0) - (depthOrigin * 0.5);
| #endif
|
| #ifdef EYE_DISTANCE_TRANSLUCENCY
| vec4 translucencyByDistance;
| translucencyByDistance.x = compressedAttribute1.z;
| translucencyByDistance.z = compressedAttribute1.w;
|
| translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
|
| temp = compressedAttribute1.y * SHIFT_RIGHT8;
| translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
| #endif
|
| #if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)
| temp = compressedAttribute3.w;
| temp = temp * SHIFT_RIGHT12;
|
| vec2 dimensions;
| dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;
| dimensions.x = floor(temp);
| #endif
|
| #ifdef ALIGNED_AXIS
| vec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));
| temp = compressedAttribute2.z * SHIFT_RIGHT5;
| bool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;
| #else
| vec3 alignedAxis = vec3(0.0);
| bool validAlignedAxis = false;
| #endif
|
| vec4 pickColor;
| vec4 color;
|
| temp = compressedAttribute2.y;
| temp = temp * SHIFT_RIGHT8;
| pickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;
| temp = floor(temp) * SHIFT_RIGHT8;
| pickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;
| pickColor.r = floor(temp);
|
| temp = compressedAttribute2.x;
| temp = temp * SHIFT_RIGHT8;
| color.b = (temp - floor(temp)) * SHIFT_LEFT8;
| temp = floor(temp) * SHIFT_RIGHT8;
| color.g = (temp - floor(temp)) * SHIFT_LEFT8;
| color.r = floor(temp);
|
| temp = compressedAttribute2.z * SHIFT_RIGHT8;
| bool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;
| temp = floor(temp) * SHIFT_RIGHT8;
|
| pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;
| pickColor /= 255.0;
|
| color.a = floor(temp);
| color /= 255.0;
|
| ///////////////////////////////////////////////////////////////////////////
|
| vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
| vec4 positionEC = czm_modelViewRelativeToEye * p;
|
| #if defined(FRAGMENT_DEPTH_CHECK) || defined(VERTEX_DEPTH_CHECK)
| float eyeDepth = positionEC.z;
| #endif
|
| positionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);
| positionEC.xyz *= show;
|
| ///////////////////////////////////////////////////////////////////////////
|
| #if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)
| float lengthSq;
| if (czm_sceneMode == czm_sceneMode2D)
| {
| // 2D camera distance is a special case
| // treat all billboards as flattened to the z=0.0 plane
| lengthSq = czm_eyeHeight2D.y;
| }
| else
| {
| lengthSq = dot(positionEC.xyz, positionEC.xyz);
| }
| #endif
|
| #ifdef EYE_DISTANCE_SCALING
| float distanceScale = czm_nearFarScalar(scaleByDistance, lengthSq);
| scale *= distanceScale;
| translate *= distanceScale;
| // push vertex behind near plane for clipping
| if (scale == 0.0)
| {
| positionEC.xyz = vec3(0.0);
| }
| #endif
|
| float translucency = 1.0;
| #ifdef EYE_DISTANCE_TRANSLUCENCY
| translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);
| // push vertex behind near plane for clipping
| if (translucency == 0.0)
| {
| positionEC.xyz = vec3(0.0);
| }
| #endif
|
| #ifdef EYE_DISTANCE_PIXEL_OFFSET
| float pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);
| pixelOffset *= pixelOffsetScale;
| #endif
|
| #ifdef DISTANCE_DISPLAY_CONDITION
| float nearSq = compressedAttribute3.x;
| float farSq = compressedAttribute3.y;
| if (lengthSq < nearSq || lengthSq > farSq)
| {
| positionEC.xyz = vec3(0.0);
| }
| #endif
|
| mat2 rotationMatrix;
| float mpp;
|
| #ifdef DISABLE_DEPTH_DISTANCE
| float disableDepthTestDistance = compressedAttribute3.z;
| #endif
|
| #ifdef VERTEX_DEPTH_CHECK
| if (lengthSq < disableDepthTestDistance) {
| float depthsilon = 10.0;
|
| vec2 labelTranslate = textureCoordinateBoundsOrLabelTranslate.xy;
| vec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
| float globeDepth1 = getGlobeDepth(pEC1);
|
| if (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1)
| {
| vec4 pEC2 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0, 1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
| float globeDepth2 = getGlobeDepth(pEC2);
|
| if (globeDepth2 != 0.0 && pEC2.z + depthsilon < globeDepth2)
| {
| vec4 pEC3 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
| float globeDepth3 = getGlobeDepth(pEC3);
| if (globeDepth3 != 0.0 && pEC3.z + depthsilon < globeDepth3)
| {
| positionEC.xyz = vec3(0.0);
| }
| }
| }
| }
| #endif
|
| positionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
| gl_Position = czm_projection * positionEC;
| v_textureCoordinates = textureCoordinates;
|
| #ifdef LOG_DEPTH
| czm_vertexLogDepth();
| #endif
|
| #ifdef DISABLE_DEPTH_DISTANCE
| if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)
| {
| disableDepthTestDistance = czm_minimumDisableDepthTestDistance;
| }
|
| if (disableDepthTestDistance != 0.0)
| {
| // Don't try to "multiply both sides" by w. Greater/less-than comparisons won't work for negative values of w.
| float zclip = gl_Position.z / gl_Position.w;
| bool clipped = (zclip < -1.0 || zclip > 1.0);
| if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))
| {
| // Position z on the near plane.
| gl_Position.z = -gl_Position.w;
| #ifdef LOG_DEPTH
| v_depthFromNearPlusOne = 1.0;
| #endif
| }
| }
| #endif
|
| #ifdef FRAGMENT_DEPTH_CHECK
| if (sizeInMeters) {
| translate /= mpp;
| dimensions /= mpp;
| imageSize /= mpp;
| }
|
| #if defined(ROTATION) || defined(ALIGNED_AXIS)
| v_rotationMatrix = rotationMatrix;
| #else
| v_rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);
| #endif
|
| float enableDepthCheck = 0.0;
| if (lengthSq < disableDepthTestDistance)
| {
| enableDepthCheck = 1.0;
| }
|
| float dw = floor(clamp(dimensions.x, 0.0, SHIFT_LEFT12));
| float dh = floor(clamp(dimensions.y, 0.0, SHIFT_LEFT12));
|
| float iw = floor(clamp(imageSize.x, 0.0, SHIFT_LEFT12));
| float ih = floor(clamp(imageSize.y, 0.0, SHIFT_LEFT12));
|
| v_compressed.x = eyeDepth;
| v_compressed.y = applyTranslate * SHIFT_LEFT1 + enableDepthCheck;
| v_compressed.z = dw * SHIFT_LEFT12 + dh;
| v_compressed.w = iw * SHIFT_LEFT12 + ih;
| v_originTextureCoordinateAndTranslate.xy = depthOrigin;
| v_originTextureCoordinateAndTranslate.zw = translate;
| v_textureCoordinateBounds = textureCoordinateBoundsOrLabelTranslate;
|
| #endif
|
| #ifdef SDF
| vec4 outlineColor;
| float outlineWidth;
|
| temp = sdf.x;
| temp = temp * SHIFT_RIGHT8;
| outlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;
| temp = floor(temp) * SHIFT_RIGHT8;
| outlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;
| outlineColor.r = floor(temp);
|
| temp = sdf.y;
| temp = temp * SHIFT_RIGHT8;
| float temp3 = (temp - floor(temp)) * SHIFT_LEFT8;
| temp = floor(temp) * SHIFT_RIGHT8;
| outlineWidth = (temp - floor(temp)) * SHIFT_LEFT8;
| outlineColor.a = floor(temp);
| outlineColor /= 255.0;
|
| v_outlineWidth = outlineWidth / 255.0;
| v_outlineColor = outlineColor;
| v_outlineColor.a *= translucency;
| #endif
|
| v_pickColor = pickColor;
|
| v_color = color;
| v_color.a *= translucency;
| v_splitDirection = splitDirection;
| }
| `;function fi(e,t){if(e=g(e,g.EMPTY_OBJECT),c(e.disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new w("disableDepthTestDistance must be greater than or equal to 0.0.");let n=e.translucencyByDistance,i=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,r=e.distanceDisplayCondition;if(c(n)){if(n.far<=n.near)throw new w("translucencyByDistance.far must be greater than translucencyByDistance.near.");n=Bt.clone(n)}if(c(i)){if(i.far<=i.near)throw new w("pixelOffsetScaleByDistance.far must be greater than pixelOffsetScaleByDistance.near.");i=Bt.clone(i)}if(c(o)){if(o.far<=o.near)throw new w("scaleByDistance.far must be greater than scaleByDistance.near.");o=Bt.clone(o)}if(c(r)){if(r.far<=r.near)throw new w("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");r=Nt.clone(r)}this._show=g(e.show,!0),this._position=d.clone(g(e.position,d.ZERO)),this._actualPosition=d.clone(this._position),this._pixelOffset=k.clone(g(e.pixelOffset,k.ZERO)),this._translate=new k(0,0),this._eyeOffset=d.clone(g(e.eyeOffset,d.ZERO)),this._heightReference=g(e.heightReference,qe.NONE),this._verticalOrigin=g(e.verticalOrigin,Dn.CENTER),this._horizontalOrigin=g(e.horizontalOrigin,mi.CENTER),this._scale=g(e.scale,1),this._color=z.clone(g(e.color,z.WHITE)),this._rotation=g(e.rotation,0),this._alignedAxis=d.clone(g(e.alignedAxis,d.ZERO)),this._width=e.width,this._height=e.height,this._scaleByDistance=o,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=i,this._sizeInMeters=g(e.sizeInMeters,!1),this._distanceDisplayCondition=r,this._disableDepthTestDistance=e.disableDepthTestDistance,this._id=e.id,this._collection=g(e.collection,t),this._pickId=void 0,this._pickPrimitive=g(e._pickPrimitive,this),this._billboardCollection=t,this._dirty=!1,this._index=-1,this._batchIndex=void 0,this._imageIndex=-1,this._imageIndexPromise=void 0,this._imageId=void 0,this._image=void 0,this._imageSubRegion=void 0,this._imageWidth=void 0,this._imageHeight=void 0,this._labelDimensions=void 0,this._labelHorizontalOrigin=void 0,this._labelTranslate=void 0;let s=e.image,a=e.imageId;c(s)&&(c(a)||(typeof s=="string"?a=s:c(s.src)?a=s.src:a=Bn()),this._imageId=a,this._image=s),c(e.imageSubRegion)&&(this._imageId=a,this._imageSubRegion=e.imageSubRegion),c(this._billboardCollection._textureAtlas)&&this._loadImage(),this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=J.SCENE3D,this._clusterShow=!0,this._outlineColor=z.clone(g(e.outlineColor,z.BLACK)),this._outlineWidth=g(e.outlineWidth,0),this._updateClamping(),this._splitDirection=g(e.splitDirection,Nr.NONE)}var Goe=fi.SHOW_INDEX=0,A2=fi.POSITION_INDEX=1,Yoe=fi.PIXEL_OFFSET_INDEX=2,X8e=fi.EYE_OFFSET_INDEX=3,K8e=fi.HORIZONTAL_ORIGIN_INDEX=4,$8e=fi.VERTICAL_ORIGIN_INDEX=5,Z8e=fi.SCALE_INDEX=6,v2=fi.IMAGE_INDEX_INDEX=7,joe=fi.COLOR_INDEX=8,J8e=fi.ROTATION_INDEX=9,Q8e=fi.ALIGNED_AXIS_INDEX=10,eje=fi.SCALE_BY_DISTANCE_INDEX=11,tje=fi.TRANSLUCENCY_BY_DISTANCE_INDEX=12,nje=fi.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=13,ije=fi.DISTANCE_DISPLAY_CONDITION=14,oje=fi.DISABLE_DEPTH_DISTANCE=15;fi.TEXTURE_COORDINATE_BOUNDS=16;var Woe=fi.SDF_INDEX=17,rje=fi.SPLIT_DIRECTION_INDEX=18;fi.NUMBER_OF_PROPERTIES=19;function To(e,t){let n=e._billboardCollection;c(n)&&(n._updateBillboard(e,t),e._dirty=!0)}Object.defineProperties(fi.prototype,{show:{get:function(){return this._show},set:function(e){C.typeOf.bool("value",e),this._show!==e&&(this._show=e,To(this,Goe))}},position:{get:function(){return this._position},set:function(e){C.typeOf.object("value",e);let t=this._position;d.equals(t,e)||(d.clone(e,t),d.clone(e,this._actualPosition),this._updateClamping(),To(this,A2))}},heightReference:{get:function(){return this._heightReference},set:function(e){C.typeOf.number("value",e);let t=this._heightReference;e!==t&&(this._heightReference=e,this._updateClamping(),To(this,A2))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){C.typeOf.object("value",e);let t=this._pixelOffset;k.equals(t,e)||(k.clone(e,t),To(this,Yoe))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(c(e)&&(C.typeOf.object("value",e),e.far<=e.near))throw new w("far distance must be greater than near distance.");let t=this._scaleByDistance;Bt.equals(t,e)||(this._scaleByDistance=Bt.clone(e,t),To(this,eje))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(c(e)&&(C.typeOf.object("value",e),e.far<=e.near))throw new w("far distance must be greater than near distance.");let t=this._translucencyByDistance;Bt.equals(t,e)||(this._translucencyByDistance=Bt.clone(e,t),To(this,tje))}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){if(c(e)&&(C.typeOf.object("value",e),e.far<=e.near))throw new w("far distance must be greater than near distance.");let t=this._pixelOffsetScaleByDistance;Bt.equals(t,e)||(this._pixelOffsetScaleByDistance=Bt.clone(e,t),To(this,nje))}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){C.typeOf.object("value",e);let t=this._eyeOffset;d.equals(t,e)||(d.clone(e,t),To(this,X8e))}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){C.typeOf.number("value",e),this._horizontalOrigin!==e&&(this._horizontalOrigin=e,To(this,K8e))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){C.typeOf.number("value",e),this._verticalOrigin!==e&&(this._verticalOrigin=e,To(this,$8e))}},scale:{get:function(){return this._scale},set:function(e){C.typeOf.number("value",e),this._scale!==e&&(this._scale=e,To(this,Z8e))}},color:{get:function(){return this._color},set:function(e){C.typeOf.object("value",e);let t=this._color;z.equals(t,e)||(z.clone(e,t),To(this,joe))}},rotation:{get:function(){return this._rotation},set:function(e){C.typeOf.number("value",e),this._rotation!==e&&(this._rotation=e,To(this,J8e))}},alignedAxis:{get:function(){return this._alignedAxis},set:function(e){C.typeOf.object("value",e);let t=this._alignedAxis;d.equals(t,e)||(d.clone(e,t),To(this,Q8e))}},width:{get:function(){return g(this._width,this._imageWidth)},set:function(e){c(e)&&C.typeOf.number("value",e),this._width!==e&&(this._width=e,To(this,v2))}},height:{get:function(){return g(this._height,this._imageHeight)},set:function(e){c(e)&&C.typeOf.number("value",e),this._height!==e&&(this._height=e,To(this,v2))}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){C.typeOf.bool("value",e),this._sizeInMeters!==e&&(this._sizeInMeters=e,To(this,joe))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(!Nt.equals(e,this._distanceDisplayCondition)){if(c(e)&&(C.typeOf.object("value",e),e.far<=e.near))throw new w("far distance must be greater than near distance.");this._distanceDisplayCondition=Nt.clone(e,this._distanceDisplayCondition),To(this,ije)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(c(e)&&(C.typeOf.number("value",e),e<0))throw new w("disableDepthTestDistance must be greater than or equal to 0.0.");this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,To(this,oje))}},id:{get:function(){return this._id},set:function(e){this._id=e,c(this._pickId)&&(this._pickId.object.id=e)}},pickPrimitive:{get:function(){return this._pickPrimitive},set:function(e){this._pickPrimitive=e,c(this._pickId)&&(this._pickId.object.primitive=e)}},pickId:{get:function(){return this._pickId}},image:{get:function(){return this._imageId},set:function(e){c(e)?typeof e=="string"?this.setImage(e,e):e instanceof Te?this.setImage(e.url,e):c(e.src)?this.setImage(e.src,e):this.setImage(Bn(),e):(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=void 0,this._image=void 0,this._imageIndexPromise=void 0,To(this,v2))}},ready:{get:function(){return this._imageIndex!==-1}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=d.clone(e,this._actualClampedPosition),To(this,A2)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,To(this,Goe))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!c(e))throw new w("value is required.");let t=this._outlineColor;z.equals(t,e)||(z.clone(e,t),To(this,Woe))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,To(this,Woe))}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,To(this,rje))}}});fi.prototype.getPickId=function(e){return c(this._pickId)||(this._pickId=e.createPickId({primitive:this._pickPrimitive,collection:this._collection,id:this._id})),this._pickId};fi.prototype._updateClamping=function(){fi._updateClamping(this._billboardCollection,this)};var D2=new re;fi._updateClamping=function(e,t){let n=e._scene;if(!c(n)){if(t._heightReference!==qe.NONE)throw new w("Height reference is not supported without a scene.");return}let i=g(n.ellipsoid,Z.default),o=n.frameState.mode,r=o!==t._mode;if(t._mode=o,(t._heightReference===qe.NONE||r)&&c(t._removeCallbackFunc)&&(t._removeCallbackFunc(),t._removeCallbackFunc=void 0,t._clampedPosition=void 0),t._heightReference===qe.NONE||!c(t._position))return;c(t._removeCallbackFunc)&&t._removeCallbackFunc();let s=i.cartesianToCartographic(t._position);if(!c(s)){t._actualClampedPosition=void 0;return}function a(u){let f=i.cartographicToCartesian(u,t._clampedPosition);$x(t._heightReference)&&(t._mode===J.SCENE3D?(u.height+=s.height,i.cartographicToCartesian(u,f)):f.x+=s.height),t._clampedPosition=f}t._removeCallbackFunc=n.updateHeight(s,a,t._heightReference),re.clone(s,D2);let l=n.getHeight(s,t._heightReference);c(l)&&(D2.height=l),a(D2)};fi.prototype._loadImage=function(){let e=this._billboardCollection._textureAtlas,t=this._imageId,n=this._image,i=this._imageSubRegion,o,r=this;function s(l){if(r._imageId!==t||r._image!==n||!je.equals(r._imageSubRegion,i))return;let u=e.textureCoordinates[l];r._imageWidth=e.texture.width*u.width,r._imageHeight=e.texture.height*u.height,r._imageIndex=l,r._ready=!0,r._image=void 0,r._imageIndexPromise=void 0,To(r,v2);let f=r._billboardCollection._scene;c(f)&&f.frameState.afterRender.push(()=>!0)}if(c(n)&&(o=e.addImage(t,n)),c(i)&&(o=e.addSubRegion(t,i)),this._imageIndexPromise=o,!c(o))return;let a=e.getImageIndex(t);if(c(a)&&!c(i)){s(a);return}o.then(s).catch(function(l){console.error(`Error loading image for billboard: ${l}`),r._imageIndexPromise=void 0})};fi.prototype.setImage=function(e,t){if(!c(e))throw new w("id is required.");if(!c(t))throw new w("image is required.");this._imageId!==e&&(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=e,this._image=t,c(this._billboardCollection._textureAtlas)&&this._loadImage())};fi.prototype.setImageSubRegion=function(e,t){if(!c(e))throw new w("id is required.");if(!c(t))throw new w("subRegion is required.");this._imageId===e&&je.equals(this._imageSubRegion,t)||(this._imageIndex=-1,this._imageId=e,this._imageSubRegion=je.clone(t),c(this._billboardCollection._textureAtlas)&&this._loadImage())};fi.prototype._setTranslate=function(e){if(!c(e))throw new w("value is required.");let t=this._translate;k.equals(t,e)||(k.clone(e,t),To(this,Yoe))};fi.prototype._getActualPosition=function(){return c(this._clampedPosition)?this._clampedPosition:this._actualPosition};fi.prototype._setActualPosition=function(e){c(this._clampedPosition)||d.clone(e,this._actualPosition),To(this,A2)};var qoe=new ee;fi._computeActualPosition=function(e,t,n,i){return c(e._clampedPosition)?(n.mode!==e._mode&&e._updateClamping(),e._clampedPosition):n.mode===J.SCENE3D?t:(N.multiplyByPoint(i,t,qoe),Yi.computeActualEllipsoidPosition(n,qoe))};var Xoe=new d;fi._computeScreenSpacePosition=function(e,t,n,i,o,r){let s=N.multiplyByPoint(e,t,Xoe),a=Yi.worldWithEyeOffsetToWindowCoordinates(o,s,n,r);if(c(a))return k.add(a,i,a),a};var S2=new k(0,0);fi.prototype.computeScreenSpacePosition=function(e,t){let n=this._billboardCollection;if(c(t)||(t=new k),!c(n))throw new w("Billboard must be in a collection. Was it removed?");if(!c(e))throw new w("scene is required.");k.clone(this._pixelOffset,S2),k.add(S2,this._translate,S2);let i=n.modelMatrix,o=this._position;if(c(this._clampedPosition)&&(o=this._clampedPosition,e.mode!==J.SCENE3D)){let s=e.mapProjection,a=s.ellipsoid,l=s.unproject(o,D2);o=a.cartographicToCartesian(l,Xoe),i=N.IDENTITY}return fi._computeScreenSpacePosition(i,o,this._eyeOffset,S2,e,t)};fi.getScreenSpaceBoundingBox=function(e,t,n){let i=e.width,o=e.height,r=e.scale;i*=r,o*=r;let s=t.x;e.horizontalOrigin===mi.RIGHT?s-=i:e.horizontalOrigin===mi.CENTER&&(s-=i*.5);let a=t.y;return e.verticalOrigin===Dn.BOTTOM||e.verticalOrigin===Dn.BASELINE?a-=o:e.verticalOrigin===Dn.CENTER&&(a-=o*.5),c(n)||(n=new je),n.x=s,n.y=a,n.width=i,n.height=o,n};fi.prototype.equals=function(e){return this===e||c(e)&&this._id===e._id&&d.equals(this._position,e._position)&&this._imageId===e._imageId&&this._show===e._show&&this._scale===e._scale&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&je.equals(this._imageSubRegion,e._imageSubRegion)&&z.equals(this._color,e._color)&&k.equals(this._pixelOffset,e._pixelOffset)&&k.equals(this._translate,e._translate)&&d.equals(this._eyeOffset,e._eyeOffset)&&Bt.equals(this._scaleByDistance,e._scaleByDistance)&&Bt.equals(this._translucencyByDistance,e._translucencyByDistance)&&Bt.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&Nt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._splitDirection===e._splitDirection};fi.prototype._destroy=function(){c(this._customData)&&(this._billboardCollection._scene.globe._surface.removeTileCustomData(this._customData),this._customData=void 0),c(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this.image=void 0,this._pickId=this._pickId&&this._pickId.destroy(),this._billboardCollection=void 0};var no=fi;var sje={OPAQUE:0,TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2},Co=Object.freeze(sje);var aje={FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25},Gs=Object.freeze(aje);function fp(e,t,n,i,o){this.bottomLeft=g(e,k.ZERO),this.topRight=g(t,k.ZERO),this.childNode1=n,this.childNode2=i,this.imageIndex=o}var cje=new k(16,16);function pg(e){e=g(e,g.EMPTY_OBJECT);let t=g(e.borderWidthInPixels,1),n=g(e.initialSize,cje);if(!c(e.context))throw new w("context is required.");if(t<0)throw new w("borderWidthInPixels must be greater than or equal to zero.");if(n.x<1||n.y<1)throw new w("initialSize must be greater than zero.");this._context=e.context,this._pixelFormat=g(e.pixelFormat,Re.RGBA),this._borderWidthInPixels=t,this._textureCoordinates=[],this._guid=Bn(),this._idHash={},this._indexHash={},this._initialSize=n,this._root=void 0}Object.defineProperties(pg.prototype,{borderWidthInPixels:{get:function(){return this._borderWidthInPixels}},textureCoordinates:{get:function(){return this._textureCoordinates}},texture:{get:function(){return c(this._texture)||(this._texture=new Ot({context:this._context,width:this._initialSize.x,height:this._initialSize.y,pixelFormat:this._pixelFormat})),this._texture}},numberOfImages:{get:function(){return this._textureCoordinates.length}},guid:{get:function(){return this._guid}}});function lje(e,t){let n=e._context,i=e.numberOfImages,o=2,r=e._borderWidthInPixels;if(i>0){let s=e._texture.width,a=e._texture.height,l=o*(s+t.width+r),u=o*(a+t.height+r),f=s/l,h=a/u,m=new fp(new k(s+r,r),new k(l,a)),p=new fp(new k,new k(l,a),e._root,m),_=new fp(new k(r,a+r),new k(l,u)),b=new fp(new k,new k(l,u),p,_);for(let E=0;E<e._textureCoordinates.length;E++){let S=e._textureCoordinates[E];c(S)&&(S.x*=f,S.y*=h,S.width*=f,S.height*=h)}let x=new Ot({context:e._context,width:l,height:u,pixelFormat:e._pixelFormat}),T=new Lr({context:n,colorTextures:[e._texture],destroyAttachments:!1});T._bind(),x.copyFromFramebuffer(0,0,0,0,l,u),T._unBind(),T.destroy(),e._texture=e._texture&&e._texture.destroy(),e._texture=x,e._root=b}else{let s=o*(t.width+2*r),a=o*(t.height+2*r);s<e._initialSize.x&&(s=e._initialSize.x),a<e._initialSize.y&&(a=e._initialSize.y),e._texture=e._texture&&e._texture.destroy(),e._texture=new Ot({context:e._context,width:s,height:a,pixelFormat:e._pixelFormat}),e._root=new fp(new k(r,r),new k(s,a))}}function I2(e,t,n){if(c(t)){if(!c(t.childNode1)&&!c(t.childNode2)){if(c(t.imageIndex))return;let i=t.topRight.x-t.bottomLeft.x,o=t.topRight.y-t.bottomLeft.y,r=i-n.width,s=o-n.height;if(r<0||s<0)return;if(r===0&&s===0)return t;if(r>s){t.childNode1=new fp(new k(t.bottomLeft.x,t.bottomLeft.y),new k(t.bottomLeft.x+n.width,t.topRight.y));let a=t.bottomLeft.x+n.width+e._borderWidthInPixels;a<t.topRight.x&&(t.childNode2=new fp(new k(a,t.bottomLeft.y),new k(t.topRight.x,t.topRight.y)))}else{t.childNode1=new fp(new k(t.bottomLeft.x,t.bottomLeft.y),new k(t.topRight.x,t.bottomLeft.y+n.height));let a=t.bottomLeft.y+n.height+e._borderWidthInPixels;a<t.topRight.y&&(t.childNode2=new fp(new k(t.bottomLeft.x,a),new k(t.topRight.x,t.topRight.y)))}return I2(e,t.childNode1,n)}return I2(e,t.childNode1,n)||I2(e,t.childNode2,n)}}function Koe(e,t,n){let i=I2(e,e._root,t);if(c(i)){i.imageIndex=n;let o=e._texture.width,r=e._texture.height,s=i.topRight.x-i.bottomLeft.x,a=i.topRight.y-i.bottomLeft.y,l=i.bottomLeft.x/o,u=i.bottomLeft.y/r,f=s/o,h=a/r;e._textureCoordinates[n]=new je(l,u,f,h),e._texture.copyFrom({source:t,xOffset:i.bottomLeft.x,yOffset:i.bottomLeft.y})}else lje(e,t),Koe(e,t,n);e._guid=Bn()}function $oe(e,t){if(!c(e)||e.isDestroyed())return-1;let n=e.numberOfImages;return Koe(e,t,n),n}pg.prototype.getImageIndex=function(e){if(!c(e))throw new w("id is required.");return this._indexHash[e]};pg.prototype.addImageSync=function(e,t){if(!c(e))throw new w("id is required.");if(!c(t))throw new w("image is required.");let n=this._indexHash[e];return c(n)||(n=$oe(this,t),this._idHash[e]=Promise.resolve(n),this._indexHash[e]=n),n};pg.prototype.addImage=function(e,t){if(!c(e))throw new w("id is required.");if(!c(t))throw new w("image is required.");let n=this._idHash[e];if(c(n))return n;if(typeof t=="function"){if(t=t(e),!c(t))throw new w("image is required.")}else(typeof t=="string"||t instanceof Te)&&(t=Te.createIfNeeded(t).fetchImage());let i=this;return n=Promise.resolve(t).then(function(o){let r=$oe(i,o);return i._indexHash[e]=r,r}),this._idHash[e]=n,n};pg.prototype.addSubRegion=function(e,t){if(!c(e))throw new w("id is required.");if(!c(t))throw new w("subRegion is required.");let n=this._idHash[e];if(!c(n))throw new ie(`image with id "${e}" not found in the atlas.`);let i=this;return Promise.resolve(n).then(function(o){if(o===-1)return-1;let r=i._texture.width,s=i._texture.height,a=i._textureCoordinates[o],l=a.x+t.x/r,u=a.y+t.y/s,f=t.width/r,h=t.height/s,m=i._textureCoordinates.push(new je(l,u,f,h))-1;return i._indexHash[e]=m,i._guid=Bn(),m})};pg.prototype.isDestroyed=function(){return!1};pg.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),ue(this)};var jb=pg;var uje=no.SHOW_INDEX,KA=no.POSITION_INDEX,Zoe=no.PIXEL_OFFSET_INDEX,Joe=no.EYE_OFFSET_INDEX,fje=no.HORIZONTAL_ORIGIN_INDEX,dje=no.VERTICAL_ORIGIN_INDEX,hje=no.SCALE_INDEX,XA=no.IMAGE_INDEX_INDEX,Qoe=no.COLOR_INDEX,mje=no.ROTATION_INDEX,pje=no.ALIGNED_AXIS_INDEX,ere=no.SCALE_BY_DISTANCE_INDEX,tre=no.TRANSLUCENCY_BY_DISTANCE_INDEX,nre=no.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX,ire=no.DISTANCE_DISPLAY_CONDITION,_je=no.DISABLE_DEPTH_DISTANCE,gje=no.TEXTURE_COORDINATE_BOUNDS,ore=no.SDF_INDEX,rre=no.SPLIT_DIRECTION_INDEX,G5=no.NUMBER_OF_PROPERTIES,Ji,yje={positionHighAndScale:0,positionLowAndRotation:1,compressedAttribute0:2,compressedAttribute1:3,compressedAttribute2:4,eyeOffset:5,scaleByDistance:6,pixelOffsetScaleByDistance:7,compressedAttribute3:8,textureCoordinateBoundsOrLabelTranslate:9,a_batchId:10,sdf:11,splitDirection:12},bje={direction:0,positionHighAndScale:1,positionLowAndRotation:2,compressedAttribute0:3,compressedAttribute1:4,compressedAttribute2:5,eyeOffset:6,scaleByDistance:7,pixelOffsetScaleByDistance:8,compressedAttribute3:9,textureCoordinateBoundsOrLabelTranslate:10,a_batchId:11,sdf:12,splitDirection:13};function Zu(e){e=g(e,g.EMPTY_OBJECT),this._scene=e.scene,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._textureAtlasGUID=void 0,this._destroyTextureAtlas=!0,this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!1,this._shaderRotation=!1,this._compiledShaderRotation=!1,this._shaderAlignedAxis=!1,this._compiledShaderAlignedAxis=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderPixelOffsetScaleByDistance=!1,this._compiledShaderPixelOffsetScaleByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._shaderClampToGround=!1,this._compiledShaderClampToGround=!1,this._propertiesChanged=new Uint32Array(G5),this._maxSize=0,this._maxEyeOffset=0,this._maxScale=1,this._maxPixelOffset=0,this._allHorizontalCenter=!0,this._allVerticalCenter=!0,this._allSizedInMeters=!0,this._baseVolume=new ne,this._baseVolumeWC=new ne,this._baseVolume2D=new ne,this._boundingVolume=new ne,this._boundingVolumeDirty=!1,this._colorCommands=[],this.show=g(e.show,!0),this.modelMatrix=N.clone(g(e.modelMatrix,N.IDENTITY)),this._modelMatrix=N.clone(N.IDENTITY),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.debugShowTextureAtlas=g(e.debugShowTextureAtlas,!1),this.blendOption=g(e.blendOption,Co.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._mode=J.SCENE3D,this._buffersUsage=[Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW],this._highlightColor=z.clone(z.WHITE);let t=this;this._uniforms={u_atlas:function(){return t._textureAtlas.texture},u_highlightColor:function(){return t._highlightColor}};let n=this._scene;c(n)&&c(n.terrainProviderChanged)&&(this._removeCallbackFunc=n.terrainProviderChanged.addEventListener(function(){let i=this._billboards,o=i.length;for(let r=0;r<o;++r)c(i[r])&&i[r]._updateClamping()},this))}Object.defineProperties(Zu.prototype,{length:{get:function(){return j5(this),this._billboards.length}},textureAtlas:{get:function(){return this._textureAtlas},set:function(e){this._textureAtlas!==e&&(this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._textureAtlas=e,this._createVertexArray=!0)}},destroyTextureAtlas:{get:function(){return this._destroyTextureAtlas},set:function(e){this._destroyTextureAtlas=e}}});function sre(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}Zu.prototype.add=function(e){let t=new no(e,this);return t._index=this._billboards.length,this._billboards.push(t),this._createVertexArray=!0,t};Zu.prototype.remove=function(e){return this.contains(e)?(this._billboards[e._index]=void 0,this._billboardsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};Zu.prototype.removeAll=function(){sre(this._billboards),this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0};function j5(e){if(e._billboardsRemoved){e._billboardsRemoved=!1;let t=[],n=e._billboards,i=n.length;for(let o=0,r=0;o<i;++o){let s=n[o];c(s)&&(s._index=r++,t.push(s))}e._billboards=t}}Zu.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]};Zu.prototype.contains=function(e){return c(e)&&e._billboardCollection===this};Zu.prototype.get=function(e){return C.typeOf.number("index",e),j5(this),this._billboards[e]};var B5;function xje(e){let n=e.cache.billboardCollection_indexBufferBatched;if(c(n))return n;let i=16384*6-6,o=new Uint16Array(i);for(let r=0,s=0;r<i;r+=6,s+=4)o[r]=s,o[r+1]=s+1,o[r+2]=s+2,o[r+3]=s+0,o[r+4]=s+2,o[r+5]=s+3;return n=yt.createIndexBuffer({context:e,typedArray:o,usage:Pe.STATIC_DRAW,indexDatatype:Oe.UNSIGNED_SHORT}),n.vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferBatched=n,n}function Tje(e){let t=e.cache.billboardCollection_indexBufferInstanced;return c(t)||(t=yt.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Pe.STATIC_DRAW,indexDatatype:Oe.UNSIGNED_SHORT}),t.vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t),t}function Cje(e){let t=e.cache.billboardCollection_vertexBufferInstanced;return c(t)||(t=yt.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:Pe.STATIC_DRAW}),t.vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t),t}Zu.prototype.computeNewBuffersUsage=function(){let e=this._buffersUsage,t=!1,n=this._propertiesChanged;for(let i=0;i<G5;++i){let o=n[i]===0?Pe.STATIC_DRAW:Pe.STREAM_DRAW;t=t||e[i]!==o,e[i]=o}return t};function Eje(e,t,n,i,o,r){let s=[{index:Ji.positionHighAndScale,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:n[KA]},{index:Ji.positionLowAndRotation,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:n[KA]},{index:Ji.compressedAttribute0,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:n[Zoe]},{index:Ji.compressedAttribute1,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:n[tre]},{index:Ji.compressedAttribute2,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:n[Qoe]},{index:Ji.eyeOffset,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:n[Joe]},{index:Ji.scaleByDistance,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:n[ere]},{index:Ji.pixelOffsetScaleByDistance,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:n[nre]},{index:Ji.compressedAttribute3,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:n[ire]},{index:Ji.textureCoordinateBoundsOrLabelTranslate,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:n[gje]},{index:Ji.splitDirection,componentsPerAttribute:1,componentDatatype:j.FLOAT,usage:n[rre]}];i&&s.push({index:Ji.direction,componentsPerAttribute:2,componentDatatype:j.FLOAT,vertexBuffer:Cje(e)}),c(o)&&s.push({index:Ji.a_batchId,componentsPerAttribute:1,componentDatatype:j.FLOAT,bufferUsage:Pe.STATIC_DRAW}),r&&s.push({index:Ji.sdf,componentsPerAttribute:2,componentDatatype:j.FLOAT,usage:n[ore]});let a=i?t:4*t;return new y_(e,s,a,i)}var k5=new kn;function are(e,t,n,i,o){let r,s=i[Ji.positionHighAndScale],a=i[Ji.positionLowAndRotation],l=o._getActualPosition();e._mode===J.SCENE3D&&(ne.expand(e._baseVolume,l,e._baseVolume),e._boundingVolumeDirty=!0),kn.fromCartesian(l,k5);let u=o.scale,f=o.rotation;f!==0&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,u);let h=k5.high,m=k5.low;e._instanced?(r=o._index,s(r,h.x,h.y,h.z,u),a(r,m.x,m.y,m.z,f)):(r=o._index*4,s(r+0,h.x,h.y,h.z,u),s(r+1,h.x,h.y,h.z,u),s(r+2,h.x,h.y,h.z,u),s(r+3,h.x,h.y,h.z,u),a(r+0,m.x,m.y,m.z,f),a(r+1,m.x,m.y,m.z,f),a(r+2,m.x,m.y,m.z,f),a(r+3,m.x,m.y,m.z,f))}var $u=new k,Ku=32768,dC=65536,U5=4096,Ih=256,wje=128,Sje=32,Aje=8,cre=4,vje=1/256,lre=0,ure=2,fre=3,dre=1;function hre(e,t,n,i,o){let r,s=i[Ji.compressedAttribute0],a=o.pixelOffset,l=a.x,u=a.y,f=o._translate,h=f.x,m=f.y;e._maxPixelOffset=Math.max(e._maxPixelOffset,Math.abs(l+h),Math.abs(-u+m));let p=o.horizontalOrigin,_=o._verticalOrigin,b=o.show&&o.clusterShow;o.color.alpha===0&&(b=!1),_===Dn.BASELINE&&(_=Dn.BOTTOM),e._allHorizontalCenter=e._allHorizontalCenter&&p===mi.CENTER,e._allVerticalCenter=e._allVerticalCenter&&_===Dn.CENTER;let x=0,T=0,E=0,S=0,A=o._imageIndex;if(A!==-1){let W=n[A];if(!c(W))throw new w(`Invalid billboard image index: ${A}`);x=W.x,T=W.y,E=W.width,S=W.height}let v=x+E,D=T+S,R=Math.floor(O.clamp(l,-Ku,Ku)+Ku)*wje;R+=(p+1)*Sje,R+=(_+1)*Aje,R+=(b?1:0)*cre;let P=Math.floor(O.clamp(u,-Ku,Ku)+Ku)*Ih,L=Math.floor(O.clamp(h,-Ku,Ku)+Ku)*Ih,F=(O.clamp(m,-Ku,Ku)+Ku)*vje,y=Math.floor(F),I=Math.floor((F-y)*Ih);P+=y,L+=I,$u.x=x,$u.y=T;let M=On.compressTextureCoordinates($u);$u.x=v;let B=On.compressTextureCoordinates($u);$u.y=D;let U=On.compressTextureCoordinates($u);$u.x=x;let V=On.compressTextureCoordinates($u);e._instanced?(r=o._index,s(r,R,P,L,M)):(r=o._index*4,s(r+0,R+lre,P,L,M),s(r+1,R+ure,P,L,B),s(r+2,R+fre,P,L,U),s(r+3,R+dre,P,L,V))}function mre(e,t,n,i,o){let r,s=i[Ji.compressedAttribute1],a=o.alignedAxis;d.equals(a,d.ZERO)||(e._shaderAlignedAxis=!0);let l=0,u=1,f=1,h=1,m=o.translucencyByDistance;c(m)&&(l=m.near,u=m.nearValue,f=m.far,h=m.farValue,(u!==1||h!==1)&&(e._shaderTranslucencyByDistance=!0));let p=0,_=o._imageIndex;if(_!==-1){let S=n[_];if(!c(S))throw new w(`Invalid billboard image index: ${_}`);p=S.width}let b=e._textureAtlas.texture.width,x=Math.round(g(o.width,b*p));e._maxSize=Math.max(e._maxSize,x);let T=O.clamp(x,0,dC),E=0;Math.abs(d.magnitudeSquared(a)-1)<O.EPSILON6&&(E=On.octEncodeFloat(a)),u=O.clamp(u,0,1),u=u===1?255:u*255|0,T=T*Ih+u,h=O.clamp(h,0,1),h=h===1?255:h*255|0,E=E*Ih+h,e._instanced?(r=o._index,s(r,T,E,l,f)):(r=o._index*4,s(r+0,T,E,l,f),s(r+1,T,E,l,f),s(r+2,T,E,l,f),s(r+3,T,E,l,f))}function V5(e,t,n,i,o){let r,s=i[Ji.compressedAttribute2],a=o.color,l=c(e._batchTable)?z.WHITE:o.getPickId(t.context).color,u=o.sizeInMeters?1:0,f=Math.abs(d.magnitudeSquared(o.alignedAxis)-1)<O.EPSILON6?1:0;e._allSizedInMeters=e._allSizedInMeters&&u===1;let h=0,m=o._imageIndex;if(m!==-1){let R=n[m];if(!c(R))throw new w(`Invalid billboard image index: ${m}`);h=R.height}let p=e._textureAtlas.texture.dimensions,_=Math.round(g(o.height,p.y*h));e._maxSize=Math.max(e._maxSize,_);let b=g(o._labelHorizontalOrigin,-2);b+=2;let x=_*cre+b,T=z.floatToByte(a.red),E=z.floatToByte(a.green),S=z.floatToByte(a.blue),A=T*dC+E*Ih+S;T=z.floatToByte(l.red),E=z.floatToByte(l.green),S=z.floatToByte(l.blue);let v=T*dC+E*Ih+S,D=z.floatToByte(a.alpha)*dC+z.floatToByte(l.alpha)*Ih;D+=u*2+f,e._instanced?(r=o._index,s(r,A,v,D,x)):(r=o._index*4,s(r+0,A,v,D,x),s(r+1,A,v,D,x),s(r+2,A,v,D,x),s(r+3,A,v,D,x))}function H5(e,t,n,i,o){let r,s=i[Ji.eyeOffset],a=o.eyeOffset,l=a.z;if(o._heightReference!==qe.NONE&&(l*=1.005),e._maxEyeOffset=Math.max(e._maxEyeOffset,Math.abs(a.x),Math.abs(a.y),Math.abs(l)),e._instanced){let u=0,f=0,h=o._imageIndex;if(h!==-1){let p=n[h];if(!c(p))throw new w(`Invalid billboard image index: ${h}`);u=p.width,f=p.height}$u.x=u,$u.y=f;let m=On.compressTextureCoordinates($u);r=o._index,s(r,a.x,a.y,l,m)}else r=o._index*4,s(r+0,a.x,a.y,l,0),s(r+1,a.x,a.y,l,0),s(r+2,a.x,a.y,l,0),s(r+3,a.x,a.y,l,0)}function pre(e,t,n,i,o){let r,s=i[Ji.scaleByDistance],a=0,l=1,u=1,f=1,h=o.scaleByDistance;c(h)&&(a=h.near,l=h.nearValue,u=h.far,f=h.farValue,(l!==1||f!==1)&&(e._shaderScaleByDistance=!0)),e._instanced?(r=o._index,s(r,a,l,u,f)):(r=o._index*4,s(r+0,a,l,u,f),s(r+1,a,l,u,f),s(r+2,a,l,u,f),s(r+3,a,l,u,f))}function _re(e,t,n,i,o){let r,s=i[Ji.pixelOffsetScaleByDistance],a=0,l=1,u=1,f=1,h=o.pixelOffsetScaleByDistance;c(h)&&(a=h.near,l=h.nearValue,u=h.far,f=h.farValue,(l!==1||f!==1)&&(e._shaderPixelOffsetScaleByDistance=!0)),e._instanced?(r=o._index,s(r,a,l,u,f)):(r=o._index*4,s(r+0,a,l,u,f),s(r+1,a,l,u,f),s(r+2,a,l,u,f),s(r+3,a,l,u,f))}function gre(e,t,n,i,o){let r,s=i[Ji.compressedAttribute3],a=0,l=Number.MAX_VALUE,u=o.distanceDisplayCondition;c(u)&&(a=u.near,l=u.far,a*=a,l*=l,e._shaderDistanceDisplayCondition=!0);let f=o.disableDepthTestDistance,h=Mu(o.heightReference)&&t.context.depthTexture;c(f)||(f=h?5e3:0),f*=f,(h||f>0)&&(e._shaderDisableDepthDistance=!0,f===Number.POSITIVE_INFINITY&&(f=-1));let m,p;if(c(o._labelDimensions))p=o._labelDimensions.x,m=o._labelDimensions.y;else{let T=0,E=0,S=o._imageIndex;if(S!==-1){let v=n[S];if(!c(v))throw new w(`Invalid billboard image index: ${S}`);T=v.height,E=v.width}m=Math.round(g(o.height,e._textureAtlas.texture.dimensions.y*T));let A=e._textureAtlas.texture.width;p=Math.round(g(o.width,A*E))}let _=Math.floor(O.clamp(p,0,U5)),b=Math.floor(O.clamp(m,0,U5)),x=_*U5+b;e._instanced?(r=o._index,s(r,a,l,f,x)):(r=o._index*4,s(r+0,a,l,f,x),s(r+1,a,l,f,x),s(r+2,a,l,f,x),s(r+3,a,l,f,x))}function yre(e,t,n,i,o){if(Mu(o.heightReference)){let _=e._scene,b=t.context,x=t.globeTranslucencyState.translucent,T=c(_.globe)&&_.globe.depthTestAgainstTerrain;e._shaderClampToGround=b.depthTexture&&!x&&T}let r,s=i[Ji.textureCoordinateBoundsOrLabelTranslate];if(ht.maximumVertexTextureImageUnits>0){let _=0,b=0;c(o._labelTranslate)&&(_=o._labelTranslate.x,b=o._labelTranslate.y),e._instanced?(r=o._index,s(r,_,b,0,0)):(r=o._index*4,s(r+0,_,b,0,0),s(r+1,_,b,0,0),s(r+2,_,b,0,0),s(r+3,_,b,0,0));return}let a=0,l=0,u=0,f=0,h=o._imageIndex;if(h!==-1){let _=n[h];if(!c(_))throw new w(`Invalid billboard image index: ${h}`);a=_.x,l=_.y,u=_.width,f=_.height}let m=a+u,p=l+f;e._instanced?(r=o._index,s(r,a,l,m,p)):(r=o._index*4,s(r+0,a,l,m,p),s(r+1,a,l,m,p),s(r+2,a,l,m,p),s(r+3,a,l,m,p))}function Dje(e,t,n,i,o){if(!c(e._batchTable))return;let r=i[Ji.a_batchId],s=o._batchIndex,a;e._instanced?(a=o._index,r(a,s)):(a=o._index*4,r(a+0,s),r(a+1,s),r(a+2,s),r(a+3,s))}function bre(e,t,n,i,o){if(!e._sdf)return;let r,s=i[Ji.sdf],a=o.outlineColor,l=o.outlineWidth,u=z.floatToByte(a.red),f=z.floatToByte(a.green),h=z.floatToByte(a.blue),m=u*dC+f*Ih+h,p=l/Gs.RADIUS,_=z.floatToByte(a.alpha)*dC+z.floatToByte(p)*Ih;e._instanced?(r=o._index,s(r,m,_)):(r=o._index*4,s(r+0,m+lre,_),s(r+1,m+ure,_),s(r+2,m+fre,_),s(r+3,m+dre,_))}function xre(e,t,n,i,o){let r=i[Ji.splitDirection],s=0,a=o.splitDirection;c(a)&&(s=a);let l;e._instanced?(l=o._index,r(l,s)):(l=o._index*4,r(l+0,s),r(l+1,s),r(l+2,s),r(l+3,s))}function Ije(e,t,n,i,o){are(e,t,n,i,o),hre(e,t,n,i,o),mre(e,t,n,i,o),V5(e,t,n,i,o),H5(e,t,n,i,o),pre(e,t,n,i,o),_re(e,t,n,i,o),gre(e,t,n,i,o),yre(e,t,n,i,o),Dje(e,t,n,i,o),bre(e,t,n,i,o),xre(e,t,n,i,o)}function z5(e,t,n,i,o,r){let s;i.mode===J.SCENE3D?(s=e._baseVolume,e._boundingVolumeDirty=!0):s=e._baseVolume2D;let a=[];for(let l=0;l<n;++l){let u=t[l],f=u.position,h=no._computeActualPosition(u,f,i,o);c(h)&&(u._setActualPosition(h),r?a.push(h):ne.expand(s,h,s))}r&&ne.fromPoints(a,s)}function Oje(e,t){let n=t.mode,i=e._billboards,o=e._billboardsToUpdate,r=e._modelMatrix;e._createVertexArray||e._mode!==n||n!==J.SCENE3D&&!N.equals(r,e.modelMatrix)?(e._mode=n,N.clone(e.modelMatrix,r),e._createVertexArray=!0,(n===J.SCENE3D||n===J.SCENE2D||n===J.COLUMBUS_VIEW)&&z5(e,i,i.length,t,r,!0)):n===J.MORPHING?z5(e,i,i.length,t,r,!0):(n===J.SCENE2D||n===J.COLUMBUS_VIEW)&&z5(e,o,e._billboardsToUpdateIndex,t,r,!1)}function Pje(e,t,n){let i=1;(!e._allSizedInMeters||e._maxPixelOffset!==0)&&(i=t.camera.getPixelSize(n,t.context.drawingBufferWidth,t.context.drawingBufferHeight));let o=i*e._maxScale*e._maxSize*2;e._allHorizontalCenter&&e._allVerticalCenter&&(o*=.5);let r=i*e._maxPixelOffset+e._maxEyeOffset;n.radius+=o+r}function Rje(e,t){let i=t.createViewportQuadCommand(`uniform sampler2D billboard_texture;
| in vec2 v_textureCoordinates;
| void main()
| {
| out_FragColor = texture(billboard_texture, v_textureCoordinates);
| }
| `,{uniformMap:{billboard_texture:function(){return e._textureAtlas.texture}}});return i.pass=xe.OVERLAY,i}var Mje=[];Zu.prototype.update=function(e){if(j5(this),!this.show)return;let t=this._billboards,n=t.length,i=e.context;this._instanced=i.instancedArrays,Ji=this._instanced?bje:yje,B5=this._instanced?Tje:xje;let o=this._textureAtlas;if(!c(o)){o=this._textureAtlas=new jb({context:i});for(let P=0;P<n;++P)t[P]._loadImage()}let r=o.textureCoordinates;if(r.length===0)return;Oje(this,e),t=this._billboards,n=t.length;let s=this._billboardsToUpdate,a=this._billboardsToUpdateIndex,l=this._propertiesChanged,u=o.guid,f=this._createVertexArray||this._textureAtlasGUID!==u;this._textureAtlasGUID=u;let h,m=e.passes,p=m.pick;if(f||!p&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(let P=0;P<G5;++P)l[P]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=Eje(i,n,this._buffersUsage,this._instanced,this._batchTable,this._sdf),h=this._vaf.writers;for(let P=0;P<n;++P){let L=this._billboards[P];L._dirty=!1,Ije(this,e,r,h,L)}this._vaf.commit(B5(i))}this._billboardsToUpdateIndex=0}else if(a>0){let P=Mje;P.length=0,(l[KA]||l[mje]||l[hje])&&P.push(are),(l[XA]||l[Zoe]||l[fje]||l[dje]||l[uje])&&(P.push(hre),this._instanced&&P.push(H5)),(l[XA]||l[pje]||l[tre])&&(P.push(mre),P.push(V5)),(l[XA]||l[Qoe])&&P.push(V5),l[Joe]&&P.push(H5),l[ere]&&P.push(pre),l[nre]&&P.push(_re),(l[ire]||l[_je]||l[XA]||l[KA])&&P.push(gre),(l[XA]||l[KA])&&P.push(yre),l[ore]&&P.push(bre),l[rre]&&P.push(xre);let L=P.length;if(h=this._vaf.writers,a/n>.1){for(let F=0;F<a;++F){let y=s[F];y._dirty=!1;for(let I=0;I<L;++I)P[I](this,e,r,h,y)}this._vaf.commit(B5(i))}else{for(let F=0;F<a;++F){let y=s[F];y._dirty=!1;for(let I=0;I<L;++I)P[I](this,e,r,h,y);this._instanced?this._vaf.subCommit(y._index,1):this._vaf.subCommit(y._index*4,4)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(a>n*1.5&&(s.length=n),!c(this._vaf)||!c(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,ne.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let _,b=N.IDENTITY;e.mode===J.SCENE3D?(b=this.modelMatrix,_=ne.clone(this._baseVolumeWC,this._boundingVolume)):_=ne.clone(this._baseVolume2D,this._boundingVolume),Pje(this,e,_);let x=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,x){this._blendOption===Co.OPAQUE||this._blendOption===Co.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=Fe.fromCache({depthTest:{enabled:!0,func:Y.LESS},depthMask:!0}):this._rsOpaque=void 0;let P=this._blendOption===Co.TRANSLUCENT;this._blendOption===Co.TRANSLUCENT||this._blendOption===Co.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=Fe.fromCache({depthTest:{enabled:!0,func:P?Y.LEQUAL:Y.LESS},depthMask:P,blending:cn.ALPHA_BLEND}):this._rsTranslucent=void 0}this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||e.minimumDisableDepthTestDistance!==0;let T,E,S,A,v,D=ht.maximumVertexTextureImageUnits>0;if(x||this._shaderRotation!==this._compiledShaderRotation||this._shaderAlignedAxis!==this._compiledShaderAlignedAxis||this._shaderScaleByDistance!==this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance!==this._compiledShaderTranslucencyByDistance||this._shaderPixelOffsetScaleByDistance!==this._compiledShaderPixelOffsetScaleByDistance||this._shaderDistanceDisplayCondition!==this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance||this._shaderClampToGround!==this._compiledShaderClampToGround||this._sdf!==this._compiledSDF){T=w2,E=E2,v=[],c(this._batchTable)&&(v.push("VECTOR_TILE"),T=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(T),E=this._batchTable.getFragmentShaderCallback(!1,void 0)(E)),S=new Be({defines:v,sources:[T]}),this._instanced&&S.defines.push("INSTANCED"),this._shaderRotation&&S.defines.push("ROTATION"),this._shaderAlignedAxis&&S.defines.push("ALIGNED_AXIS"),this._shaderScaleByDistance&&S.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&S.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&S.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&S.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&S.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&(D?S.defines.push("VERTEX_DEPTH_CHECK"):S.defines.push("FRAGMENT_DEPTH_CHECK"));let P=1-Gs.CUTOFF;this._sdf&&S.defines.push("SDF");let L=c(this._batchTable)?"VECTOR_TILE":"";this._blendOption===Co.OPAQUE_AND_TRANSLUCENT&&(A=new Be({defines:["OPAQUE",L],sources:[E]}),this._shaderClampToGround&&(D?A.defines.push("VERTEX_DEPTH_CHECK"):A.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(A.defines.push("SDF"),A.defines.push(`SDF_EDGE ${P}`)),this._sp=en.replaceCache({context:i,shaderProgram:this._sp,vertexShaderSource:S,fragmentShaderSource:A,attributeLocations:Ji}),A=new Be({defines:["TRANSLUCENT",L],sources:[E]}),this._shaderClampToGround&&(D?A.defines.push("VERTEX_DEPTH_CHECK"):A.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(A.defines.push("SDF"),A.defines.push(`SDF_EDGE ${P}`)),this._spTranslucent=en.replaceCache({context:i,shaderProgram:this._spTranslucent,vertexShaderSource:S,fragmentShaderSource:A,attributeLocations:Ji})),this._blendOption===Co.OPAQUE&&(A=new Be({defines:[L],sources:[E]}),this._shaderClampToGround&&(D?A.defines.push("VERTEX_DEPTH_CHECK"):A.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(A.defines.push("SDF"),A.defines.push(`SDF_EDGE ${P}`)),this._sp=en.replaceCache({context:i,shaderProgram:this._sp,vertexShaderSource:S,fragmentShaderSource:A,attributeLocations:Ji})),this._blendOption===Co.TRANSLUCENT&&(A=new Be({defines:[L],sources:[E]}),this._shaderClampToGround&&(D?A.defines.push("VERTEX_DEPTH_CHECK"):A.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(A.defines.push("SDF"),A.defines.push(`SDF_EDGE ${P}`)),this._spTranslucent=en.replaceCache({context:i,shaderProgram:this._spTranslucent,vertexShaderSource:S,fragmentShaderSource:A,attributeLocations:Ji})),this._compiledShaderRotation=this._shaderRotation,this._compiledShaderAlignedAxis=this._shaderAlignedAxis,this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderPixelOffsetScaleByDistance=this._shaderPixelOffsetScaleByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance,this._compiledShaderClampToGround=this._shaderClampToGround,this._compiledSDF=this._sdf}let R=e.commandList;if(m.render||m.pick){let P=this._colorCommands,L=this._blendOption===Co.OPAQUE,F=this._blendOption===Co.OPAQUE_AND_TRANSLUCENT,y=this._vaf.va,I=y.length,M=this._uniforms,B;c(this._batchTable)?(M=this._batchTable.getUniformMapCallback()(M),B=this._batchTable.getPickId()):B="v_pickColor",P.length=I;let U=F?I*2:I;for(let V=0;V<U;++V){let W=P[V];c(W)||(W=P[V]=new Ke);let H=L||F&&V%2===0;W.pass=H||!F?xe.OPAQUE:xe.TRANSLUCENT,W.owner=this;let X=F?Math.floor(V/2):V;W.boundingVolume=_,W.modelMatrix=b,W.count=y[X].indicesCount,W.shaderProgram=H?this._sp:this._spTranslucent,W.uniformMap=M,W.vertexArray=y[X].va,W.renderState=H?this._rsOpaque:this._rsTranslucent,W.debugShowBoundingVolume=this.debugShowBoundingVolume,W.pickId=B,this._instanced&&(W.count=6,W.instanceCount=n),R.push(W)}this.debugShowTextureAtlas&&(c(this.debugCommand)||(this.debugCommand=Rje(this,e.context)),R.push(this.debugCommand))}};Zu.prototype.isDestroyed=function(){return!1};Zu.prototype.destroy=function(){return c(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),sre(this._billboards),ue(this)};var Ju=Zu;function Lje(e,t,n,i,o){return function(){let r=document.createElement("canvas"),s=o+2*i;r.height=r.width=s;let a=r.getContext("2d");return a.clearRect(0,0,s,s),i!==0&&(a.beginPath(),a.arc(s/2,s/2,s/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle=n,a.fill(),e<1&&(a.save(),a.globalCompositeOperation="destination-out",a.beginPath(),a.arc(s/2,s/2,o/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle="black",a.fill(),a.restore())),a.beginPath(),a.arc(s/2,s/2,o/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle=t,a.fill(),r}}var hC=Lje;function js(e,t,n,i,o){this._content=e,this._billboard=n,this._label=i,this._polyline=o,this._batchId=t,this._billboardImage=void 0,this._billboardColor=void 0,this._billboardOutlineColor=void 0,this._billboardOutlineWidth=void 0,this._billboardSize=void 0,this._pointSize=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._heightOffset=void 0,this._pickIds=new Array(3),mC(this)}var Nje=new re;Object.defineProperties(js.prototype,{show:{get:function(){return this._label.show},set:function(e){this._label.show=e,this._billboard.show=e,this._polyline.show=e}},color:{get:function(){return this._color},set:function(e){this._color=z.clone(e,this._color),mC(this)}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=e,mC(this)}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=z.clone(e,this._pointOutlineColor),mC(this)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=e,mC(this)}},labelColor:{get:function(){return this._label.fillColor},set:function(e){this._label.fillColor=e,this._polyline.show=this._label.show&&e.alpha>0}},labelOutlineColor:{get:function(){return this._label.outlineColor},set:function(e){this._label.outlineColor=e}},labelOutlineWidth:{get:function(){return this._label.outlineWidth},set:function(e){this._label.outlineWidth=e}},font:{get:function(){return this._label.font},set:function(e){this._label.font=e}},labelStyle:{get:function(){return this._label.style},set:function(e){this._label.style=e}},labelText:{get:function(){return this._label.text},set:function(e){c(e)||(e=""),this._label.text=e}},backgroundColor:{get:function(){return this._label.backgroundColor},set:function(e){this._label.backgroundColor=e}},backgroundPadding:{get:function(){return this._label.backgroundPadding},set:function(e){this._label.backgroundPadding=e}},backgroundEnabled:{get:function(){return this._label.showBackground},set:function(e){this._label.showBackground=e}},scaleByDistance:{get:function(){return this._label.scaleByDistance},set:function(e){this._label.scaleByDistance=e,this._billboard.scaleByDistance=e}},translucencyByDistance:{get:function(){return this._label.translucencyByDistance},set:function(e){this._label.translucencyByDistance=e,this._billboard.translucencyByDistance=e}},distanceDisplayCondition:{get:function(){return this._label.distanceDisplayCondition},set:function(e){this._label.distanceDisplayCondition=e,this._polyline.distanceDisplayCondition=e,this._billboard.distanceDisplayCondition=e}},heightOffset:{get:function(){return this._heightOffset},set:function(e){let t=g(this._heightOffset,0),n=this._content.tileset.ellipsoid,i=n.cartesianToCartographic(this._billboard.position,Nje);i.height=i.height-t+e;let o=n.cartographicToCartesian(i);this._billboard.position=o,this._label.position=this._billboard.position,this._polyline.positions=[this._polyline.positions[0],o],this._heightOffset=e}},anchorLineEnabled:{get:function(){return this._polyline.show},set:function(e){this._polyline.show=e}},anchorLineColor:{get:function(){return this._polyline.material.uniforms.color},set:function(e){this._polyline.material.uniforms.color=z.clone(e,this._polyline.material.uniforms.color)}},image:{get:function(){return this._billboardImage},set:function(e){let t=this._billboardImage!==e;this._billboardImage=e,t&&mC(this)}},disableDepthTestDistance:{get:function(){return this._label.disableDepthTestDistance},set:function(e){this._label.disableDepthTestDistance=e,this._billboard.disableDepthTestDistance=e}},horizontalOrigin:{get:function(){return this._billboard.horizontalOrigin},set:function(e){this._billboard.horizontalOrigin=e}},verticalOrigin:{get:function(){return this._billboard.verticalOrigin},set:function(e){this._billboard.verticalOrigin=e}},labelHorizontalOrigin:{get:function(){return this._label.horizontalOrigin},set:function(e){this._label.horizontalOrigin=e}},labelVerticalOrigin:{get:function(){return this._label.verticalOrigin},set:function(e){this._label.verticalOrigin=e}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickIds:{get:function(){let e=this._pickIds;return e[0]=this._billboard.pickId,e[1]=this._label.pickId,e[2]=this._polyline.pickId,e}}});js.defaultColor=z.WHITE;js.defaultPointOutlineColor=z.BLACK;js.defaultPointOutlineWidth=0;js.defaultPointSize=8;function mC(e){let t=e._billboard;if(c(e._billboardImage)&&e._billboardImage!==t.image){t.image=e._billboardImage;return}if(c(e._billboardImage))return;let n=g(e._color,js.defaultColor),i=g(e._pointOutlineColor,js.defaultPointOutlineColor),o=g(e._pointOutlineWidth,js.defaultPointOutlineWidth),r=g(e._pointSize,js.defaultPointSize),s=e._billboardColor,a=e._billboardOutlineColor,l=e._billboardOutlineWidth,u=e._billboardSize;if(z.equals(n,s)&&z.equals(i,a)&&o===l&&r===u)return;e._billboardColor=z.clone(n,e._billboardColor),e._billboardOutlineColor=z.clone(i,e._billboardOutlineColor),e._billboardOutlineWidth=o,e._billboardSize=r;let f=n.alpha,h=n.toCssColorString(),m=i.toCssColorString(),p=JSON.stringify([h,r,m,o]);t.setImage(p,hC(f,h,m,o,r))}js.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)};js.prototype.getPropertyIds=function(e){return this._content.batchTable.getPropertyIds(this._batchId,e)};js.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)};js.prototype.getPropertyInherited=function(e){return Jc.getPropertyInherited(this._content,this._batchId,e)};js.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0};js.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)};js.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)};js.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)};var _g=js;function Fje(e,t,n,i,o){let r=e.measureText(t);if(!!/\S/.test(t)){let a=document.defaultView.getComputedStyle(e.canvas).getPropertyValue("font-size").replace("px",""),l=document.createElement("canvas"),u=100,f=r.width+u|0,h=3*a,m=h/2;l.width=f,l.height=h;let p=l.getContext("2d");p.font=n,p.fillStyle="white",p.fillRect(0,0,l.width+1,l.height+1),i&&(p.strokeStyle="black",p.lineWidth=e.lineWidth,p.strokeText(t,u/2,m)),o&&(p.fillStyle="black",p.fillText(t,u/2,m));let _=p.getImageData(0,0,f,h).data,b=_.length,x=f*4,T,E,S,A;for(T=0;T<b;++T)if(_[T]!==255){S=T/x|0;break}for(T=b-1;T>=0;--T)if(_[T]!==255){A=T/x|0;break}let v=-1;for(T=0;T<f&&v===-1;++T)for(E=0;E<h;++E){let D=T*4+E*x;if(_[D]!==255||_[D+1]!==255||_[D+2]!==255||_[D+3]!==255){v=T;break}}return{width:r.width,height:A-S,ascent:m-S,descent:A-m,minx:v-u/2}}return{width:r.width,height:0,ascent:0,descent:0,minx:0}}var Wb;function Bje(e,t){if(!c(e))throw new w("text is required.");if(e==="")return;t=g(t,g.EMPTY_OBJECT);let n=g(t.font,"10px sans-serif"),i=g(t.stroke,!1),o=g(t.fill,!0),r=g(t.strokeWidth,1),s=g(t.backgroundColor,z.TRANSPARENT),a=g(t.padding,0),l=a*2,u=document.createElement("canvas");u.width=1,u.height=1,u.style.font=n;let f=u.getContext("2d",{willReadFrequently:!0});c(Wb)||(c(f.imageSmoothingEnabled)?Wb="imageSmoothingEnabled":c(f.mozImageSmoothingEnabled)?Wb="mozImageSmoothingEnabled":c(f.webkitImageSmoothingEnabled)?Wb="webkitImageSmoothingEnabled":c(f.msImageSmoothingEnabled)&&(Wb="msImageSmoothingEnabled")),f.font=n,f.lineJoin="round",f.lineWidth=r,f[Wb]=!1,u.style.visibility="hidden",document.body.appendChild(u);let h=Fje(f,e,n,i,o);u.dimensions=h,document.body.removeChild(u),u.style.visibility="";let m=-h.minx,p=Math.ceil(h.width)+m+l,_=h.height+l,b=_-h.ascent+a,x=_-b+l;if(u.width=p,u.height=_,f.font=n,f.lineJoin="round",f.lineWidth=r,f[Wb]=!1,s!==z.TRANSPARENT&&(f.fillStyle=s.toCssColorString(),f.fillRect(0,0,u.width,u.height)),i){let T=g(t.strokeColor,z.BLACK);f.strokeStyle=T.toCssColorString(),f.strokeText(e,m+a,x)}if(o){let T=g(t.fillColor,z.WHITE);f.fillStyle=T.toCssColorString(),f.fillText(e,m+a,x)}return u}var pC=Bje;var Pre=Mr(wre(),1);var Uje={FILL:0,OUTLINE:1,FILL_AND_OUTLINE:2},Uo=Object.freeze(Uje);var Sre={},Are=0,zje=256,Vje=new z(.165,.165,.165,.8),Hje=new k(7,5),Kr=Object.freeze({LTR:0,RTL:1,WEAK:2,BRACKETS:3});function qb(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._rebindAllGlyphs=!0}function ZA(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._repositionAllGlyphs=!0}function JA(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}function Dre(e){let t=Sre[e._font];if(!c(t)){let n=document.createElement("div");n.style.position="absolute",n.style.opacity=0,n.style.font=e._font,document.body.appendChild(n);let i=parseFloat(JA(n,"line-height"));isNaN(i)&&(i=void 0),t={family:JA(n,"font-family"),size:JA(n,"font-size").replace("px",""),style:JA(n,"font-style"),weight:JA(n,"font-weight"),lineHeight:i},document.body.removeChild(n),Are<zje&&(Sre[e._font]=t,Are++)}e._fontFamily=t.family,e._fontSize=t.size,e._fontStyle=t.style,e._fontWeight=t.weight,e._lineHeight=t.lineHeight}function dp(e,t){if(e=g(e,g.EMPTY_OBJECT),c(e.disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new w("disableDepthTestDistance must be greater than 0.0.");let n=e.translucencyByDistance,i=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,r=e.distanceDisplayCondition;if(c(n)){if(n.far<=n.near)throw new w("translucencyByDistance.far must be greater than translucencyByDistance.near.");n=Bt.clone(n)}if(c(i)){if(i.far<=i.near)throw new w("pixelOffsetScaleByDistance.far must be greater than pixelOffsetScaleByDistance.near.");i=Bt.clone(i)}if(c(o)){if(o.far<=o.near)throw new w("scaleByDistance.far must be greater than scaleByDistance.near.");o=Bt.clone(o)}if(c(r)){if(r.far<=r.near)throw new w("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");r=Nt.clone(r)}this._renderedText=void 0,this._text=void 0,this._show=g(e.show,!0),this._font=g(e.font,"30px sans-serif"),this._fillColor=z.clone(g(e.fillColor,z.WHITE)),this._outlineColor=z.clone(g(e.outlineColor,z.BLACK)),this._outlineWidth=g(e.outlineWidth,1),this._showBackground=g(e.showBackground,!1),this._backgroundColor=z.clone(g(e.backgroundColor,Vje)),this._backgroundPadding=k.clone(g(e.backgroundPadding,Hje)),this._style=g(e.style,Uo.FILL),this._verticalOrigin=g(e.verticalOrigin,Dn.BASELINE),this._horizontalOrigin=g(e.horizontalOrigin,mi.LEFT),this._pixelOffset=k.clone(g(e.pixelOffset,k.ZERO)),this._eyeOffset=d.clone(g(e.eyeOffset,d.ZERO)),this._position=d.clone(g(e.position,d.ZERO)),this._scale=g(e.scale,1),this._id=e.id,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=i,this._scaleByDistance=o,this._heightReference=g(e.heightReference,qe.NONE),this._distanceDisplayCondition=r,this._disableDepthTestDistance=e.disableDepthTestDistance,this._labelCollection=t,this._glyphs=[],this._backgroundBillboard=void 0,this._batchIndex=void 0,this._rebindAllGlyphs=!0,this._repositionAllGlyphs=!0,this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=void 0,this._clusterShow=!0,this.text=g(e.text,""),this._relativeSize=1,Dre(this),this._updateClamping()}Object.defineProperties(dp.prototype,{show:{get:function(){return this._show},set:function(e){if(!c(e))throw new w("value is required.");if(this._show!==e){this._show=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i].billboard;c(r)&&(r.show=e)}let n=this._backgroundBillboard;c(n)&&(n.show=e)}}},position:{get:function(){return this._position},set:function(e){if(!c(e))throw new w("value is required.");let t=this._position;if(!d.equals(t,e)){d.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o].billboard;c(s)&&(s.position=e)}let i=this._backgroundBillboard;c(i)&&(i.position=e),this._updateClamping()}}},heightReference:{get:function(){return this._heightReference},set:function(e){if(!c(e))throw new w("value is required.");if(e!==this._heightReference){this._heightReference=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i].billboard;c(r)&&(r.heightReference=e)}let n=this._backgroundBillboard;c(n)&&(n.heightReference=e),ZA(this),this._updateClamping()}}},text:{get:function(){return this._text},set:function(e){if(!c(e))throw new w("value is required.");if(this._text!==e){this._text=e;let t=e.replace(/\u00ad/g,"");this._renderedText=dp.enableRightToLeftDetection?Xje(t):t,qb(this)}}},font:{get:function(){return this._font},set:function(e){if(!c(e))throw new w("value is required.");this._font!==e&&(this._font=e,qb(this),Dre(this))}},fillColor:{get:function(){return this._fillColor},set:function(e){if(!c(e))throw new w("value is required.");let t=this._fillColor;z.equals(t,e)||(z.clone(e,t),qb(this))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!c(e))throw new w("value is required.");let t=this._outlineColor;z.equals(t,e)||(z.clone(e,t),qb(this))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!c(e))throw new w("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e,qb(this))}},showBackground:{get:function(){return this._showBackground},set:function(e){if(!c(e))throw new w("value is required.");this._showBackground!==e&&(this._showBackground=e,qb(this))}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){if(!c(e))throw new w("value is required.");let t=this._backgroundColor;if(!z.equals(t,e)){z.clone(e,t);let n=this._backgroundBillboard;c(n)&&(n.color=t)}}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){if(!c(e))throw new w("value is required.");let t=this._backgroundPadding;k.equals(t,e)||(k.clone(e,t),ZA(this))}},style:{get:function(){return this._style},set:function(e){if(!c(e))throw new w("value is required.");this._style!==e&&(this._style=e,qb(this))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){if(!c(e))throw new w("value is required.");let t=this._pixelOffset;if(!k.equals(t,e)){k.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];c(s.billboard)&&(s.billboard.pixelOffset=e)}let i=this._backgroundBillboard;c(i)&&(i.pixelOffset=e)}}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(c(e)&&e.far<=e.near)throw new w("far distance must be greater than near distance.");let t=this._translucencyByDistance;if(!Bt.equals(t,e)){this._translucencyByDistance=Bt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];c(s.billboard)&&(s.billboard.translucencyByDistance=e)}let i=this._backgroundBillboard;c(i)&&(i.translucencyByDistance=e)}}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){if(c(e)&&e.far<=e.near)throw new w("far distance must be greater than near distance.");let t=this._pixelOffsetScaleByDistance;if(!Bt.equals(t,e)){this._pixelOffsetScaleByDistance=Bt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];c(s.billboard)&&(s.billboard.pixelOffsetScaleByDistance=e)}let i=this._backgroundBillboard;c(i)&&(i.pixelOffsetScaleByDistance=e)}}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(c(e)&&e.far<=e.near)throw new w("far distance must be greater than near distance.");let t=this._scaleByDistance;if(!Bt.equals(t,e)){this._scaleByDistance=Bt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];c(s.billboard)&&(s.billboard.scaleByDistance=e)}let i=this._backgroundBillboard;c(i)&&(i.scaleByDistance=e)}}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){if(!c(e))throw new w("value is required.");let t=this._eyeOffset;if(!d.equals(t,e)){d.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];c(s.billboard)&&(s.billboard.eyeOffset=e)}let i=this._backgroundBillboard;c(i)&&(i.eyeOffset=e)}}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){if(!c(e))throw new w("value is required.");this._horizontalOrigin!==e&&(this._horizontalOrigin=e,ZA(this))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(!c(e))throw new w("value is required.");if(this._verticalOrigin!==e){this._verticalOrigin=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];c(r.billboard)&&(r.billboard.verticalOrigin=e)}let n=this._backgroundBillboard;c(n)&&(n.verticalOrigin=e),ZA(this)}}},scale:{get:function(){return this._scale},set:function(e){if(!c(e))throw new w("value is required.");if(this._scale!==e){this._scale=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];c(r.billboard)&&(r.billboard.scale=e*this._relativeSize)}let n=this._backgroundBillboard;c(n)&&(n.scale=e*this._relativeSize),ZA(this)}}},totalScale:{get:function(){return this._scale*this._relativeSize}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(c(e)&&e.far<=e.near)throw new w("far must be greater than near");if(!Nt.equals(e,this._distanceDisplayCondition)){this._distanceDisplayCondition=Nt.clone(e,this._distanceDisplayCondition);let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];c(r.billboard)&&(r.billboard.distanceDisplayCondition=e)}let n=this._backgroundBillboard;c(n)&&(n.distanceDisplayCondition=e)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(c(e)&&e<0)throw new w("disableDepthTestDistance must be greater than 0.0.");this._disableDepthTestDistance=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];c(r.billboard)&&(r.billboard.disableDepthTestDistance=e)}let n=this._backgroundBillboard;c(n)&&(n.disableDepthTestDistance=e)}}},id:{get:function(){return this._id},set:function(e){if(this._id!==e){this._id=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];c(r.billboard)&&(r.billboard.id=e)}let n=this._backgroundBillboard;c(n)&&(n.id=e)}}},pickId:{get:function(){if(!(this._glyphs.length===0||!c(this._glyphs[0].billboard)))return this._glyphs[0].billboard.pickId}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=d.clone(e,this._actualClampedPosition);let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];c(r.billboard)&&(r.billboard._clampedPosition=e)}let n=this._backgroundBillboard;c(n)&&(n._clampedPosition=e)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){if(this._clusterShow!==e){this._clusterShow=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];c(r.billboard)&&(r.billboard.clusterShow=e)}let n=this._backgroundBillboard;c(n)&&(n.clusterShow=e)}}}});dp.prototype._updateClamping=function(){no._updateClamping(this._labelCollection,this)};dp.prototype.computeScreenSpacePosition=function(e,t){if(!c(e))throw new w("scene is required.");c(t)||(t=new k);let i=this._labelCollection.modelMatrix,o=c(this._actualClampedPosition)?this._actualClampedPosition:this._position;return no._computeScreenSpacePosition(i,o,this._eyeOffset,this._pixelOffset,e,t)};dp.getScreenSpaceBoundingBox=function(e,t,n){let i=0,o=0,r=0,s=0,a=e.totalScale,l=e._backgroundBillboard;if(c(l))i=t.x+l._translate.x,o=t.y-l._translate.y,r=l.width*a,s=l.height*a,e.verticalOrigin===Dn.BOTTOM||e.verticalOrigin===Dn.BASELINE?o-=s:e.verticalOrigin===Dn.CENTER&&(o-=s*.5);else{i=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;let u=0,f=0,h=e._glyphs,m=h.length;for(let p=0;p<m;++p){let _=h[p],b=_.billboard;if(!c(b))continue;let x=t.x+b._translate.x,T=t.y-b._translate.y,E=_.dimensions.width*a,S=_.dimensions.height*a;e.verticalOrigin===Dn.BOTTOM||e.verticalOrigin===Dn.BASELINE?T-=S:e.verticalOrigin===Dn.CENTER&&(T-=S*.5),e._verticalOrigin===Dn.TOP?T+=Gs.PADDING*a:(e._verticalOrigin===Dn.BOTTOM||e._verticalOrigin===Dn.BASELINE)&&(T-=Gs.PADDING*a),i=Math.min(i,x),o=Math.min(o,T),u=Math.max(u,x+E),f=Math.max(f,T+S)}r=u-i,s=f-o}return c(n)||(n=new je),n.x=i,n.y=o,n.width=r,n.height=s,n};dp.prototype.equals=function(e){return this===e||c(e)&&this._show===e._show&&this._scale===e._scale&&this._outlineWidth===e._outlineWidth&&this._showBackground===e._showBackground&&this._style===e._style&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&this._renderedText===e._renderedText&&this._font===e._font&&d.equals(this._position,e._position)&&z.equals(this._fillColor,e._fillColor)&&z.equals(this._outlineColor,e._outlineColor)&&z.equals(this._backgroundColor,e._backgroundColor)&&k.equals(this._backgroundPadding,e._backgroundPadding)&&k.equals(this._pixelOffset,e._pixelOffset)&&d.equals(this._eyeOffset,e._eyeOffset)&&Bt.equals(this._translucencyByDistance,e._translucencyByDistance)&&Bt.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&Bt.equals(this._scaleByDistance,e._scaleByDistance)&&Nt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._id===e._id};dp.prototype.isDestroyed=function(){return!1};dp.enableRightToLeftDetection=!1;function Gje(e,t){let n=/[a-zA-Z0-9]/,i=/[()[\]{}<>]/,o=[],r="",s=Kr.LTR,a="",l=e.length;for(let u=0;u<l;++u){let f=e.charAt(u);t.test(f)?a=Kr.RTL:n.test(f)?a=Kr.LTR:i.test(f)?a=Kr.BRACKETS:a=Kr.WEAK,u===0&&(s=a),s===a&&a!==Kr.BRACKETS?r+=f:(r!==""&&o.push({Type:s,Word:r}),s=a,r=f)}return o.push({Type:a,Word:r}),o}function jje(e){return e.split("").reverse().join("")}function QA(e,t,n){return e.slice(0,t)+n+e.slice(t)}function Wje(e){switch(e){case"(":return")";case")":return"(";case"[":return"]";case"]":return"[";case"{":return"}";case"}":return"{";case"<":return">";case">":return"<"}}var qje="\u05D0-\u05EA",Yje="\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF",vre=new RegExp(`[${qje}${Yje}]`);function Xje(e){let t=e.split(`
| `),n="";for(let i=0;i<t.length;i++){let o=t[i],r=vre.test(o.charAt(0)),s=Gje(o,vre),a=0,l="";for(let u=0;u<s.length;++u){let f=s[u],h=f.Type===Kr.BRACKETS?Wje(f.Word):jje(f.Word);r?f.Type===Kr.RTL?(l=h+l,a=0):f.Type===Kr.LTR?(l=QA(l,a,f.Word),a+=f.Word.length):(f.Type===Kr.WEAK||f.Type===Kr.BRACKETS)&&(f.Type===Kr.WEAK&&s[u-1].Type===Kr.BRACKETS?l=h+l:s[u-1].Type===Kr.RTL?(l=h+l,a=0):s.length>u+1?s[u+1].Type===Kr.RTL?(l=h+l,a=0):(l=QA(l,a,f.Word),a+=f.Word.length):l=QA(l,0,h)):f.Type===Kr.RTL?l=QA(l,a,h):f.Type===Kr.LTR?(l+=f.Word,a=l.length):(f.Type===Kr.WEAK||f.Type===Kr.BRACKETS)&&(u>0&&s[u-1].Type===Kr.RTL?s.length>u+1?s[u+1].Type===Kr.RTL?l=QA(l,a,h):(l+=f.Word,a=l.length):l+=f.Word:(l+=f.Word,a=l.length))}n+=l,i<t.length-1&&(n+=`
| `)}return n}var Yb=dp;var Rre=Mr(Ire(),1);function $je(){this.textureInfo=void 0,this.dimensions=void 0,this.billboard=void 0}function Zje(e,t,n){this.labelCollection=e,this.index=t,this.dimensions=n}var Jje=1.2,Mre="ID_WHITE_PIXEL",W5=new k(4,4),Qje=new je(1,1,1,1);function e5e(e){let t=document.createElement("canvas");t.width=W5.x,t.height=W5.y;let n=t.getContext("2d");return n.fillStyle="#fff",n.fillRect(0,0,t.width,t.height),e.addImage(Mre,t)}var Qu={};function t5e(e,t,n,i,o,r,s){return Qu.font=t,Qu.fillColor=n,Qu.strokeColor=i,Qu.strokeWidth=o,Qu.padding=Gs.PADDING,s===Dn.CENTER?Qu.textBaseline="middle":s===Dn.TOP?Qu.textBaseline="top":Qu.textBaseline="bottom",Qu.fill=r===Uo.FILL||r===Uo.FILL_AND_OUTLINE,Qu.stroke=r===Uo.OUTLINE||r===Uo.FILL_AND_OUTLINE,Qu.backgroundColor=z.BLACK,pC(e,Qu)}function q5(e,t){t.textureInfo=void 0,t.dimensions=void 0;let n=t.billboard;c(n)&&(n.show=!1,n.image=void 0,c(n._removeCallbackFunc)&&(n._removeCallbackFunc(),n._removeCallbackFunc=void 0),e._spareBillboards.push(n),t.billboard=void 0)}function n5e(e,t,n,i){i.index=e.addImageSync(t,n)}var i5e=new Rre.default;function o5e(e,t){let n=t._renderedText,i=i5e.splitGraphemes(n),o=i.length,r=t._glyphs,s=r.length,a,l,u;if(t._relativeSize=t._fontSize/Gs.FONT_SIZE,o<s)for(l=o;l<s;++l)q5(e,r[l]);r.length=o;let f=t.show&&t._showBackground&&n.split(`
| `).join("").length>0,h=t._backgroundBillboard,m=e._backgroundBillboardCollection;f?(c(h)||(h=m.add({collection:e,image:Mre,imageSubRegion:Qje}),t._backgroundBillboard=h),h.color=t._backgroundColor,h.show=t._show,h.position=t._position,h.eyeOffset=t._eyeOffset,h.pixelOffset=t._pixelOffset,h.horizontalOrigin=mi.LEFT,h.verticalOrigin=t._verticalOrigin,h.heightReference=t._heightReference,h.scale=t.totalScale,h.pickPrimitive=t,h.id=t._id,h.translucencyByDistance=t._translucencyByDistance,h.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,h.scaleByDistance=t._scaleByDistance,h.distanceDisplayCondition=t._distanceDisplayCondition,h.disableDepthTestDistance=t._disableDepthTestDistance,h.clusterShow=t.clusterShow):c(h)&&(m.remove(h),t._backgroundBillboard=h=void 0);let p=e._glyphTextureCache;for(u=0;u<o;++u){let _=i[u],b=t._verticalOrigin,x=JSON.stringify([_,t._fontFamily,t._fontStyle,t._fontWeight,+b]),T=p[x];if(!c(T)){let E=`${t._fontStyle} ${t._fontWeight} ${Gs.FONT_SIZE}px ${t._fontFamily}`,S=t5e(_,E,z.WHITE,z.WHITE,0,Uo.FILL,b);if(T=new Zje(e,-1,S.dimensions),p[x]=T,S.width>0&&S.height>0){let A=(0,Pre.default)(S,{cutoff:Gs.CUTOFF,radius:Gs.RADIUS}),v=S.getContext("2d"),D=S.width,R=S.height,P=v.getImageData(0,0,D,R);for(let L=0;L<D;L++)for(let F=0;F<R;F++){let y=F*D+L,I=A[y]*255,M=y*4;P.data[M+0]=I,P.data[M+1]=I,P.data[M+2]=I,P.data[M+3]=I}v.putImageData(P,0,0),_!==" "&&n5e(e._textureAtlas,x,S,T)}}if(a=r[u],c(a)?T.index===-1?q5(e,a):c(a.textureInfo)&&(a.textureInfo=void 0):(a=new $je,r[u]=a),a.textureInfo=T,a.dimensions=T.dimensions,T.index!==-1){let E=a.billboard,S=e._spareBillboards;c(E)||(S.length>0?E=S.pop():(E=e._billboardCollection.add({collection:e}),E._labelDimensions=new k,E._labelTranslate=new k),a.billboard=E),E.show=t._show,E.position=t._position,E.eyeOffset=t._eyeOffset,E.pixelOffset=t._pixelOffset,E.horizontalOrigin=mi.LEFT,E.verticalOrigin=t._verticalOrigin,E.heightReference=t._heightReference,E.scale=t.totalScale,E.pickPrimitive=t,E.id=t._id,E.image=x,E.translucencyByDistance=t._translucencyByDistance,E.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,E.scaleByDistance=t._scaleByDistance,E.distanceDisplayCondition=t._distanceDisplayCondition,E.disableDepthTestDistance=t._disableDepthTestDistance,E._batchIndex=t._batchIndex,E.outlineColor=t.outlineColor,t.style===Uo.FILL_AND_OUTLINE?(E.color=t._fillColor,E.outlineWidth=t.outlineWidth):t.style===Uo.FILL?(E.color=t._fillColor,E.outlineWidth=0):t.style===Uo.OUTLINE&&(E.color=z.TRANSPARENT,E.outlineWidth=t.outlineWidth)}}t._repositionAllGlyphs=!0}function Ore(e,t,n){return t===mi.CENTER?-e/2:t===mi.RIGHT?-(e+n.x):n.x}var Qo=new k,r5e=new k;function s5e(e){let t=e._glyphs,n=e._renderedText,i,o,r=0,s=0,a=[],l=Number.NEGATIVE_INFINITY,u=0,f=1,h,m=t.length,p=e._backgroundBillboard,_=k.clone(c(p)?e._backgroundPadding:k.ZERO,r5e);for(_.x/=e._relativeSize,_.y/=e._relativeSize,h=0;h<m;++h)n.charAt(h)===`
| `?(a.push(r),++f,r=0):(i=t[h],o=i.dimensions,u=Math.max(u,o.height-o.descent),l=Math.max(l,o.descent),r+=o.width-o.minx,h<m-1&&(r+=t[h+1].dimensions.minx),s=Math.max(s,r));a.push(r);let b=u+l,x=e.totalScale,T=e._horizontalOrigin,E=e._verticalOrigin,S=0,A=a[S],v=Ore(A,T,_),D=(c(e._lineHeight)?e._lineHeight:Jje*e._fontSize)/e._relativeSize,R=D*(f-1),P=s,L=b+R;c(p)&&(P+=_.x*2,L+=_.y*2,p._labelHorizontalOrigin=T),Qo.x=v*x,Qo.y=0;let F=!0,y=0;for(h=0;h<m;++h)if(n.charAt(h)===`
| `)++S,y+=D,A=a[S],v=Ore(A,T,_),Qo.x=v*x,F=!0;else if(i=t[h],o=i.dimensions,E===Dn.TOP?(Qo.y=o.height-u-_.y,Qo.y+=Gs.PADDING):E===Dn.CENTER?Qo.y=(R+o.height-u)/2:E===Dn.BASELINE?(Qo.y=R,Qo.y-=Gs.PADDING):(Qo.y=R+l+_.y,Qo.y-=Gs.PADDING),Qo.y=(Qo.y-o.descent-y)*x,F&&(Qo.x-=Gs.PADDING*x,F=!1),c(i.billboard)&&(i.billboard._setTranslate(Qo),i.billboard._labelDimensions.x=P,i.billboard._labelDimensions.y=L,i.billboard._labelHorizontalOrigin=T),h<m-1){let I=t[h+1];Qo.x+=(o.width-o.minx+I.dimensions.minx)*x}if(c(p)&&n.split(`
| `).join("").length>0&&(T===mi.CENTER?v=-s/2-_.x:T===mi.RIGHT?v=-(s+_.x*2):v=0,Qo.x=v*x,E===Dn.TOP?Qo.y=b-u-l:E===Dn.CENTER?Qo.y=(b-u)/2-l:E===Dn.BASELINE?Qo.y=-_.y-l:Qo.y=0,Qo.y=Qo.y*x,p.width=P,p.height=L,p._setTranslate(Qo),p._labelTranslate=k.clone(Qo,p._labelTranslate)),Mu(e.heightReference))for(h=0;h<m;++h){i=t[h];let I=i.billboard;c(I)&&(I._labelTranslate=k.clone(Qo,I._labelTranslate))}}function Lre(e,t){let n=t._glyphs;for(let i=0,o=n.length;i<o;++i)q5(e,n[i]);c(t._backgroundBillboard)&&(e._backgroundBillboardCollection.remove(t._backgroundBillboard),t._backgroundBillboard=void 0),t._labelCollection=void 0,c(t._removeCallbackFunc)&&t._removeCallbackFunc(),ue(t)}function Oh(e){e=g(e,g.EMPTY_OBJECT),this._scene=e.scene,this._batchTable=e.batchTable,this._textureAtlas=void 0,this._backgroundTextureAtlas=void 0,this._backgroundBillboardCollection=new Ju({scene:this._scene}),this._backgroundBillboardCollection.destroyTextureAtlas=!1,this._billboardCollection=new Ju({scene:this._scene,batchTable:this._batchTable}),this._billboardCollection.destroyTextureAtlas=!1,this._billboardCollection._sdf=!0,this._spareBillboards=[],this._glyphTextureCache={},this._labels=[],this._labelsToUpdate=[],this._totalGlyphCount=0,this._highlightColor=z.clone(z.WHITE),this.show=g(e.show,!0),this.modelMatrix=N.clone(g(e.modelMatrix,N.IDENTITY)),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.blendOption=g(e.blendOption,Co.OPAQUE_AND_TRANSLUCENT)}Object.defineProperties(Oh.prototype,{length:{get:function(){return this._labels.length}}});Oh.prototype.add=function(e){let t=new Yb(e,this);return this._labels.push(t),this._labelsToUpdate.push(t),t};Oh.prototype.remove=function(e){if(c(e)&&e._labelCollection===this){let t=this._labels.indexOf(e);if(t!==-1)return this._labels.splice(t,1),Lre(this,e),!0}return!1};Oh.prototype.removeAll=function(){let e=this._labels;for(let t=0,n=e.length;t<n;++t)Lre(this,e[t]);e.length=0};Oh.prototype.contains=function(e){return c(e)&&e._labelCollection===this};Oh.prototype.get=function(e){if(!c(e))throw new w("index is required.");return this._labels[e]};Oh.prototype.update=function(e){if(!this.show)return;let t=this._billboardCollection,n=this._backgroundBillboardCollection;t.modelMatrix=this.modelMatrix,t.debugShowBoundingVolume=this.debugShowBoundingVolume,n.modelMatrix=this.modelMatrix,n.debugShowBoundingVolume=this.debugShowBoundingVolume;let i=e.context;c(this._textureAtlas)||(this._textureAtlas=new jb({context:i}),t.textureAtlas=this._textureAtlas),c(this._backgroundTextureAtlas)||(this._backgroundTextureAtlas=new jb({context:i,initialSize:W5}),n.textureAtlas=this._backgroundTextureAtlas,e5e(this._backgroundTextureAtlas));let o=this._labelsToUpdate.length;for(let s=0;s<o;++s){let a=this._labelsToUpdate[s];if(a.isDestroyed())continue;let l=a._glyphs.length;a._rebindAllGlyphs&&(o5e(this,a),a._rebindAllGlyphs=!1),a._repositionAllGlyphs&&(s5e(a),a._repositionAllGlyphs=!1);let u=a._glyphs.length-l;this._totalGlyphCount+=u}let r=n.length>0?Co.TRANSLUCENT:this.blendOption;t.blendOption=r,n.blendOption=r,t._highlightColor=this._highlightColor,n._highlightColor=this._highlightColor,this._labelsToUpdate.length=0,n.update(e),t.update(e)};Oh.prototype.isDestroyed=function(){return!1};Oh.prototype.destroy=function(){return this.removeAll(),this._billboardCollection=this._billboardCollection.destroy(),this._textureAtlas=this._textureAtlas&&this._textureAtlas.destroy(),this._backgroundBillboardCollection=this._backgroundBillboardCollection.destroy(),this._backgroundTextureAtlas=this._backgroundTextureAtlas&&this._backgroundTextureAtlas.destroy(),ue(this)};var hp=Oh;var P2=`in vec3 position3DHigh;
| in vec3 position3DLow;
| in vec3 position2DHigh;
| in vec3 position2DLow;
| in vec3 prevPosition3DHigh;
| in vec3 prevPosition3DLow;
| in vec3 prevPosition2DHigh;
| in vec3 prevPosition2DLow;
| in vec3 nextPosition3DHigh;
| in vec3 nextPosition3DLow;
| in vec3 nextPosition2DHigh;
| in vec3 nextPosition2DLow;
| in vec4 texCoordExpandAndBatchIndex;
|
| out vec2 v_st;
| out float v_width;
| out vec4 v_pickColor;
| out float v_polylineAngle;
|
| void main()
| {
| float texCoord = texCoordExpandAndBatchIndex.x;
| float expandDir = texCoordExpandAndBatchIndex.y;
| bool usePrev = texCoordExpandAndBatchIndex.z < 0.0;
| float batchTableIndex = texCoordExpandAndBatchIndex.w;
|
| vec2 widthAndShow = batchTable_getWidthAndShow(batchTableIndex);
| float width = widthAndShow.x + 0.5;
| float show = widthAndShow.y;
|
| if (width < 1.0)
| {
| show = 0.0;
| }
|
| vec4 pickColor = batchTable_getPickColor(batchTableIndex);
|
| vec4 p, prev, next;
| if (czm_morphTime == 1.0)
| {
| p = czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz);
| prev = czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz);
| next = czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz);
| }
| else if (czm_morphTime == 0.0)
| {
| p = czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);
| prev = czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy);
| next = czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy);
| }
| else
| {
| p = czm_columbusViewMorph(
| czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy),
| czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz),
| czm_morphTime);
| prev = czm_columbusViewMorph(
| czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy),
| czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz),
| czm_morphTime);
| next = czm_columbusViewMorph(
| czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy),
| czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz),
| czm_morphTime);
| }
|
| #ifdef DISTANCE_DISPLAY_CONDITION
| vec3 centerHigh = batchTable_getCenterHigh(batchTableIndex);
| vec4 centerLowAndRadius = batchTable_getCenterLowAndRadius(batchTableIndex);
| vec3 centerLow = centerLowAndRadius.xyz;
| float radius = centerLowAndRadius.w;
| vec2 distanceDisplayCondition = batchTable_getDistanceDisplayCondition(batchTableIndex);
|
| float lengthSq;
| if (czm_sceneMode == czm_sceneMode2D)
| {
| lengthSq = czm_eyeHeight2D.y;
| }
| else
| {
| vec4 center = czm_translateRelativeToEye(centerHigh.xyz, centerLow.xyz);
| lengthSq = max(0.0, dot(center.xyz, center.xyz) - radius * radius);
| }
|
| float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;
| float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;
| if (lengthSq < nearSq || lengthSq > farSq)
| {
| show = 0.0;
| }
| #endif
|
| float polylineAngle;
| vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);
| gl_Position = czm_viewportOrthographic * positionWC * show;
|
| v_st.s = texCoord;
| v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);
|
| v_width = width;
| v_pickColor = pickColor;
| v_polylineAngle = polylineAngle;
| }
| `;var xc={};xc.numberOfPoints=function(e,t,n){let i=d.distance(e,t);return Math.ceil(i/n)};xc.numberOfPointsRhumbLine=function(e,t,n){let i=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(i/(n*n))))};var a5e=new re;xc.extractHeights=function(e,t){let n=e.length,i=new Array(n);for(let o=0;o<n;o++){let r=e[o];i[o]=t.cartesianToCartographic(r,a5e).height}return i};var c5e=new N,l5e=new d,Nre=new d,u5e=new on(d.UNIT_X,0),Fre=new d,f5e=new on(d.UNIT_X,0),d5e=new d,h5e=new d,X5=[];function kre(e,t,n){let i=X5;i.length=e;let o;if(t===n){for(o=0;o<e;o++)i[o]=t;return i}let s=(n-t)/e;for(o=0;o<e;o++){let a=t+o*s;i[o]=a}return i}var M2=new re,R2=new re,gg=new d,K5=new d,m5e=new d,Y5=new C_,ev=new Pa;function p5e(e,t,n,i,o,r,s,a){let l=i.scaleToGeodeticSurface(e,K5),u=i.scaleToGeodeticSurface(t,m5e),f=xc.numberOfPoints(e,t,n),h=i.cartesianToCartographic(l,M2),m=i.cartesianToCartographic(u,R2),p=kre(f,o,r);Y5.setEndPoints(h,m);let _=Y5.surfaceDistance/f,b=a;h.height=o;let x=i.cartographicToCartesian(h,gg);d.pack(x,s,b),b+=3;for(let T=1;T<f;T++){let E=Y5.interpolateUsingSurfaceDistance(T*_,R2);E.height=p[T],x=i.cartographicToCartesian(E,gg),d.pack(x,s,b),b+=3}return b}function _5e(e,t,n,i,o,r,s,a){let l=i.cartesianToCartographic(e,M2),u=i.cartesianToCartographic(t,R2),f=xc.numberOfPointsRhumbLine(l,u,n);l.height=0,u.height=0;let h=kre(f,o,r);ev.ellipsoid.equals(i)||(ev=new Pa(void 0,void 0,i)),ev.setEndPoints(l,u);let m=ev.surfaceDistance/f,p=a;l.height=o;let _=i.cartographicToCartesian(l,gg);d.pack(_,s,p),p+=3;for(let b=1;b<f;b++){let x=ev.interpolateUsingSurfaceDistance(b*m,R2);x.height=h[b],_=i.cartographicToCartesian(x,gg),d.pack(_,s,p),p+=3}return p}xc.wrapLongitude=function(e,t){let n=[],i=[];if(c(e)&&e.length>0){t=g(t,N.IDENTITY);let o=N.inverseTransformation(t,c5e),r=N.multiplyByPoint(o,d.ZERO,l5e),s=d.normalize(N.multiplyByPointAsVector(o,d.UNIT_Y,Nre),Nre),a=on.fromPointNormal(r,s,u5e),l=d.normalize(N.multiplyByPointAsVector(o,d.UNIT_X,Fre),Fre),u=on.fromPointNormal(r,l,f5e),f=1;n.push(d.clone(e[0]));let h=n[0],m=e.length;for(let p=1;p<m;++p){let _=e[p];if(on.getPointDistance(u,h)<0||on.getPointDistance(u,_)<0){let b=Yn.lineSegmentPlane(h,_,a,d5e);if(c(b)){let x=d.multiplyByScalar(s,5e-9,h5e);on.getPointDistance(a,h)<0&&d.negate(x,x),n.push(d.add(b,x,new d)),i.push(f+1),d.negate(x,x),n.push(d.add(b,x,new d)),f=1}}n.push(d.clone(e[p])),f++,h=_}i.push(f)}return{positions:n,lengths:i}};xc.generateArc=function(e){c(e)||(e={});let t=e.positions;if(!c(t))throw new w("options.positions is required.");let n=t.length,i=g(e.ellipsoid,Z.default),o=g(e.height,0),r=Array.isArray(o);if(n<1)return[];if(n===1){let b=i.scaleToGeodeticSurface(t[0],K5);if(o=r?o[0]:o,o!==0){let x=i.geodeticSurfaceNormal(b,gg);d.multiplyByScalar(x,o,x),d.add(b,x,b)}return[b.x,b.y,b.z]}let s=e.minDistance;if(!c(s)){let b=g(e.granularity,O.RADIANS_PER_DEGREE);s=O.chordLength(b,i.maximumRadius)}let a=0,l;for(l=0;l<n-1;l++)a+=xc.numberOfPoints(t[l],t[l+1],s);let u=(a+1)*3,f=new Array(u),h=0;for(l=0;l<n-1;l++){let b=t[l],x=t[l+1],T=r?o[l]:o,E=r?o[l+1]:o;h=p5e(b,x,s,i,T,E,f,h)}X5.length=0;let m=t[n-1],p=i.cartesianToCartographic(m,M2);p.height=r?o[n-1]:o;let _=i.cartographicToCartesian(p,gg);return d.pack(_,f,u-3),f};var Bre=new re,g5e=new re;xc.generateRhumbArc=function(e){c(e)||(e={});let t=e.positions;if(!c(t))throw new w("options.positions is required.");let n=t.length,i=g(e.ellipsoid,Z.default),o=g(e.height,0),r=Array.isArray(o);if(n<1)return[];if(n===1){let T=i.scaleToGeodeticSurface(t[0],K5);if(o=r?o[0]:o,o!==0){let E=i.geodeticSurfaceNormal(T,gg);d.multiplyByScalar(E,o,E),d.add(T,E,T)}return[T.x,T.y,T.z]}let s=g(e.granularity,O.RADIANS_PER_DEGREE),a=0,l,u=i.cartesianToCartographic(t[0],Bre),f;for(l=0;l<n-1;l++)f=i.cartesianToCartographic(t[l+1],g5e),a+=xc.numberOfPointsRhumbLine(u,f,s),u=re.clone(f,Bre);let h=(a+1)*3,m=new Array(h),p=0;for(l=0;l<n-1;l++){let T=t[l],E=t[l+1],S=r?o[l]:o,A=r?o[l+1]:o;p=_5e(T,E,s,i,S,A,m,p)}X5.length=0;let _=t[n-1],b=i.cartesianToCartographic(_,M2);b.height=r?o[n-1]:o;let x=i.cartographicToCartesian(b,gg);return d.pack(x,m,h-3),m};xc.generateCartesianArc=function(e){let t=xc.generateArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=d.unpack(t,o*3);return i};xc.generateCartesianRhumbArc=function(e){let t=xc.generateRhumbArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=d.unpack(t,o*3);return i};var Di=xc;function Wl(e,t){e=g(e,g.EMPTY_OBJECT),this._show=g(e.show,!0),this._width=g(e.width,1),this._loop=g(e.loop,!1),this._distanceDisplayCondition=e.distanceDisplayCondition,this._material=e.material,c(this._material)||(this._material=Vi.fromType(Vi.ColorType,{color:new z(1,1,1,1)}));let n=e.positions;c(n)||(n=[]),this._positions=n,this._actualPositions=po(n,d.equalsEpsilon),this._loop&&this._actualPositions.length>2&&(this._actualPositions===this._positions&&(this._actualPositions=n.slice()),this._actualPositions.push(d.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=e.id;let i;c(t)&&(i=N.clone(t.modelMatrix)),this._modelMatrix=i,this._segments=Di.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(zre),this._polylineCollection=t,this._dirty=!1,this._pickId=void 0,this._boundingVolume=ne.fromPoints(this._actualPositions),this._boundingVolumeWC=ne.transform(this._boundingVolume,this._modelMatrix),this._boundingVolume2D=new ne}var Ure=Wl.POSITION_INDEX=0,y5e=Wl.SHOW_INDEX=1,b5e=Wl.WIDTH_INDEX=2,x5e=Wl.MATERIAL_INDEX=3,tv=Wl.POSITION_SIZE_INDEX=4,T5e=Wl.DISTANCE_DISPLAY_CONDITION=5,zre=Wl.NUMBER_OF_PROPERTIES=6;function mp(e,t){++e._propertiesChanged[t];let n=e._polylineCollection;c(n)&&(n._updatePolyline(e,t),e._dirty=!0)}Object.defineProperties(Wl.prototype,{show:{get:function(){return this._show},set:function(e){if(!c(e))throw new w("value is required.");e!==this._show&&(this._show=e,mp(this,y5e))}},positions:{get:function(){return this._positions},set:function(e){if(!c(e))throw new w("value is required.");let t=po(e,d.equalsEpsilon);this._loop&&t.length>2&&(t===e&&(t=e.slice()),t.push(d.clone(t[0]))),(this._actualPositions.length!==t.length||this._actualPositions.length!==this._length)&&mp(this,tv),this._positions=e,this._actualPositions=t,this._length=t.length,this._boundingVolume=ne.fromPoints(this._actualPositions,this._boundingVolume),this._boundingVolumeWC=ne.transform(this._boundingVolume,this._modelMatrix,this._boundingVolumeWC),mp(this,Ure),this.update()}},material:{get:function(){return this._material},set:function(e){if(!c(e))throw new w("material is required.");this._material!==e&&(this._material=e,mp(this,x5e))}},width:{get:function(){return this._width},set:function(e){if(!c(e))throw new w("value is required.");let t=this._width;e!==t&&(this._width=e,mp(this,b5e))}},loop:{get:function(){return this._loop},set:function(e){if(!c(e))throw new w("value is required.");if(e!==this._loop){let t=this._actualPositions;e?t.length>2&&!d.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(d.clone(t[0]))):t.length>2&&d.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,mp(this,tv)}}},id:{get:function(){return this._id},set:function(e){this._id=e,c(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},isDestroyed:{get:function(){return!c(this._polylineCollection)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(c(e)&&e.far<=e.near)throw new w("far distance must be greater than near distance.");Nt.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=Nt.clone(e,this._distanceDisplayCondition),mp(this,T5e))}}});Wl.prototype.update=function(){let e=N.IDENTITY;c(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);let t=this._segments.positions.length,n=this._segments.lengths,i=this._propertiesChanged[Ure]>0||this._propertiesChanged[tv]>0;if((!N.equals(e,this._modelMatrix)||i)&&(this._segments=Di.wrapLongitude(this._actualPositions,e),this._boundingVolumeWC=ne.transform(this._boundingVolume,e,this._boundingVolumeWC)),this._modelMatrix=N.clone(e,this._modelMatrix),this._segments.positions.length!==t)mp(this,tv);else{let o=n.length;for(let r=0;r<o;++r)if(n[r]!==this._segments.lengths[r]){mp(this,tv);break}}};Wl.prototype.getPickId=function(e){return c(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._polylineCollection,id:this._id})),this._pickId};Wl.prototype._clean=function(){this._dirty=!1;let e=this._propertiesChanged;for(let t=0;t<zre-1;++t)e[t]=0};Wl.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._material=this._material&&this._material.destroy(),this._polylineCollection=void 0};var Jf=Wl;var C5e=Jf.SHOW_INDEX,E5e=Jf.WIDTH_INDEX,Z5=Jf.POSITION_INDEX,w5e=Jf.MATERIAL_INDEX,Vre=Jf.POSITION_SIZE_INDEX,S5e=Jf.DISTANCE_DISPLAY_CONDITION,Xre=Jf.NUMBER_OF_PROPERTIES,il={texCoordExpandAndBatchIndex:0,position3DHigh:1,position3DLow:2,position2DHigh:3,position2DLow:4,prevPosition3DHigh:5,prevPosition3DLow:6,prevPosition2DHigh:7,prevPosition2DLow:8,nextPosition3DHigh:9,nextPosition3DLow:10,nextPosition2DHigh:11,nextPosition2DLow:12};function Qf(e){e=g(e,g.EMPTY_OBJECT),this.show=g(e.show,!0),this.modelMatrix=N.clone(g(e.modelMatrix,N.IDENTITY)),this._modelMatrix=N.clone(N.IDENTITY),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this._opaqueRS=void 0,this._translucentRS=void 0,this._colorCommands=[],this._polylinesUpdated=!1,this._polylinesRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(Xre),this._polylines=[],this._polylineBuckets={},this._positionBufferUsage={bufferUsage:Pe.STATIC_DRAW,frameCount:0},this._mode=void 0,this._polylinesToUpdate=[],this._vertexArrays=[],this._positionBuffer=void 0,this._texCoordExpandAndBatchIndexBuffer=void 0,this._batchTable=void 0,this._createBatchTable=!1,this._useHighlightColor=!1,this._highlightColor=z.clone(z.WHITE);let t=this;this._uniformMap={u_highlightColor:function(){return t._highlightColor}}}Object.defineProperties(Qf.prototype,{length:{get:function(){return J5(this),this._polylines.length}}});Qf.prototype.add=function(e){let t=new Jf(e,this);return t._index=this._polylines.length,this._polylines.push(t),this._createVertexArray=!0,this._createBatchTable=!0,t};Qf.prototype.remove=function(e){if(this.contains(e)){if(this._polylinesRemoved=!0,this._createVertexArray=!0,this._createBatchTable=!0,c(e._bucket)){let t=e._bucket;t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()}return e._destroy(),!0}return!1};Qf.prototype.removeAll=function(){Q5(this),Qre(this),this._polylineBuckets={},this._polylinesRemoved=!1,this._polylines.length=0,this._polylinesToUpdate.length=0,this._createVertexArray=!0};Qf.prototype.contains=function(e){return c(e)&&e._polylineCollection===this};Qf.prototype.get=function(e){if(!c(e))throw new w("index is required.");return J5(this),this._polylines[e]};function A5e(e,t){c(e._batchTable)&&e._batchTable.destroy();let n=[{functionName:"batchTable_getWidthAndShow",componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:2},{functionName:"batchTable_getPickColor",componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"batchTable_getCenterHigh",componentDatatype:j.FLOAT,componentsPerAttribute:3},{functionName:"batchTable_getCenterLowAndRadius",componentDatatype:j.FLOAT,componentsPerAttribute:4},{functionName:"batchTable_getDistanceDisplayCondition",componentDatatype:j.FLOAT,componentsPerAttribute:2}];e._batchTable=new nT(t,n,e._polylines.length)}var Kre=new kn,$re=new ee,Zre=new k;Qf.prototype.update=function(e){if(J5(this),this._polylines.length===0||!this.show)return;R5e(this,e);let t=e.context,n=e.mapProjection,i,o=this._propertiesChanged;if(this._createBatchTable){if(ht.maximumVertexTextureImageUnits===0)throw new ie("Vertex texture fetch support is required to render polylines. The maximum number of vertex texture image units must be greater than zero.");A5e(this,t),this._createBatchTable=!1}if(this._createVertexArray||D5e(this))jre(this,t,n);else if(this._polylinesUpdated){let l=this._polylinesToUpdate;if(this._mode!==J.SCENE3D){let u=l.length;for(let f=0;f<u;++f)i=l[f],i.update()}if(o[Vre]||o[w5e])jre(this,t,n);else{let u=l.length,f=this._polylineBuckets;for(let h=0;h<u;++h){i=l[h],o=i._propertiesChanged;let m=i._bucket,p=0;for(let _ in f)if(f.hasOwnProperty(_)){if(f[_]===m){o[Z5]&&m.writeUpdate(p,i,this._positionBuffer,n);break}p+=f[_].lengthOfPositions}if((o[C5e]||o[E5e])&&this._batchTable.setBatchedAttribute(i._index,0,new k(i._width,i._show)),this._batchTable.attributes.length>2){if(o[Z5]||o[Vre]){let _=e.mode===J.SCENE2D?i._boundingVolume2D:i._boundingVolumeWC,b=kn.fromCartesian(_.center,Kre),x=ee.fromElements(b.low.x,b.low.y,b.low.z,_.radius,$re);this._batchTable.setBatchedAttribute(i._index,2,b.high),this._batchTable.setBatchedAttribute(i._index,3,x)}if(o[S5e]){let _=Zre;_.x=0,_.y=Number.MAX_VALUE;let b=i.distanceDisplayCondition;c(b)&&(_.x=b.near,_.y=b.far),this._batchTable.setBatchedAttribute(i._index,4,_)}}i._clean()}}l.length=0,this._polylinesUpdated=!1}o=this._propertiesChanged;for(let l=0;l<Xre;++l)o[l]=0;let r=N.IDENTITY;e.mode===J.SCENE3D&&(r=this.modelMatrix);let s=e.passes,a=e.morphTime!==0;if((!c(this._opaqueRS)||this._opaqueRS.depthTest.enabled!==a)&&(this._opaqueRS=Fe.fromCache({depthMask:a,depthTest:{enabled:a}})),(!c(this._translucentRS)||this._translucentRS.depthTest.enabled!==a)&&(this._translucentRS=Fe.fromCache({blending:cn.ALPHA_BLEND,depthMask:!a,depthTest:{enabled:a}})),this._batchTable.update(e),s.render||s.pick){let l=this._colorCommands;v5e(this,e,l,r)}};var nv=new ne,Hre=new ne;function v5e(e,t,n,i){let o=t.context,r=t.commandList,s=n.length,a=0,l=!0,u=e._vertexArrays,f=e.debugShowBoundingVolume,m=e._batchTable.getUniformMapCallback(),p=u.length;for(let _=0;_<p;++_){let b=u[_],x=b.buckets,T=x.length;for(let E=0;E<T;++E){let S=x[E],A=S.offset,v=S.bucket.shaderProgram,D=S.bucket.polylines,R=D.length,P,L,F=0,y,I;for(let M=0;M<R;++M){let B=D[M],U=O5e(B._material);if(U!==P){if(c(P)&&F>0){let X=L.isTranslucent();a>=s?(y=new Ke({owner:e}),n.push(y)):y=n[a],++a,I=bt(m(L._uniforms),e._uniformMap),y.boundingVolume=ne.clone(nv,y.boundingVolume),y.modelMatrix=i,y.shaderProgram=v,y.vertexArray=b.va,y.renderState=X?e._translucentRS:e._opaqueRS,y.pass=X?xe.TRANSLUCENT:xe.OPAQUE,y.debugShowBoundingVolume=f,y.pickId="v_pickColor",y.uniformMap=I,y.count=F,y.offset=A,A+=F,F=0,l=!0,r.push(y)}L=B._material,L.update(o),P=U}let V=B._locatorBuckets,W=V.length;for(let X=0;X<W;++X){let $=V[X];$.locator===S&&(F+=$.count)}let H;t.mode===J.SCENE3D?H=B._boundingVolumeWC:t.mode===J.COLUMBUS_VIEW?H=B._boundingVolume2D:t.mode===J.SCENE2D?c(B._boundingVolume2D)&&(H=ne.clone(B._boundingVolume2D,Hre),H.center.x=0):c(B._boundingVolumeWC)&&c(B._boundingVolume2D)&&(H=ne.union(B._boundingVolumeWC,B._boundingVolume2D,Hre)),l?(l=!1,ne.clone(H,nv)):ne.union(H,nv,nv)}c(P)&&F>0&&(a>=s?(y=new Ke({owner:e}),n.push(y)):y=n[a],++a,I=bt(m(L._uniforms),e._uniformMap),y.boundingVolume=ne.clone(nv,y.boundingVolume),y.modelMatrix=i,y.shaderProgram=v,y.vertexArray=b.va,y.renderState=L.isTranslucent()?e._translucentRS:e._opaqueRS,y.pass=L.isTranslucent()?xe.TRANSLUCENT:xe.OPAQUE,y.debugShowBoundingVolume=f,y.pickId="v_pickColor",y.uniformMap=I,y.count=F,y.offset=A,l=!0,r.push(y)),P=void 0}}n.length=a}Qf.prototype.isDestroyed=function(){return!1};Qf.prototype.destroy=function(){return Jre(this),Q5(this),Qre(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),ue(this)};function D5e(e){let t=!1,n=e._propertiesChanged,i=e._positionBufferUsage;return n[Z5]?(i.bufferUsage!==Pe.STREAM_DRAW&&(t=!0,i.bufferUsage=Pe.STREAM_DRAW),i.frameCount=100):i.bufferUsage!==Pe.STATIC_DRAW&&(i.frameCount===0?(t=!0,i.bufferUsage=Pe.STATIC_DRAW):i.frameCount--),t}var Gre=[0,0,0];function jre(e,t,n){e._createVertexArray=!1,Q5(e),Jre(e),P5e(e);let i=[[]],o=i[0],r=e._batchTable,s=e._useHighlightColor,a=[0],l=0,u=[[]],f=0,h=e._polylineBuckets,m,p;for(m in h)h.hasOwnProperty(m)&&(p=h[m],p.updateShader(t,r,s),f+=p.lengthOfPositions);if(f>0){let _=e._mode,b=new Float32Array(6*f*3),x=new Float32Array(f*4),T,E=0,S=0,A=0;for(m in h)if(h.hasOwnProperty(m)){p=h[m],p.write(b,x,E,S,A,r,t,n),_===J.MORPHING&&(c(T)||(T=new Float32Array(6*f*3)),p.writeForMorph(T,E));let I=p.lengthOfPositions;E+=6*I*3,S+=I*4,A+=I*4,l=p.updateIndices(i,a,u,l)}let v=e._positionBufferUsage.bufferUsage,D=Pe.STATIC_DRAW;e._positionBuffer=yt.createVertexBuffer({context:t,typedArray:b,usage:v});let R;c(T)&&(R=yt.createVertexBuffer({context:t,typedArray:T,usage:v})),e._texCoordExpandAndBatchIndexBuffer=yt.createVertexBuffer({context:t,typedArray:x,usage:D});let P=3*Float32Array.BYTES_PER_ELEMENT,L=4*Float32Array.BYTES_PER_ELEMENT,F=0,y=i.length;for(let I=0;I<y;++I)if(o=i[I],o.length>0){let M=new Uint16Array(o),B=yt.createIndexBuffer({context:t,typedArray:M,usage:Pe.STATIC_DRAW,indexDatatype:Oe.UNSIGNED_SHORT});F+=a[I];let U=6*(I*(P*O.SIXTY_FOUR_KILOBYTES)-F*P),V=P+U,W=P+V,H=P+W,X=P+H,$=P+X,ae=I*(L*O.SIXTY_FOUR_KILOBYTES)-F*L,se=[{index:il.position3DHigh,componentsPerAttribute:3,componentDatatype:j.FLOAT,offsetInBytes:U,strideInBytes:6*P},{index:il.position3DLow,componentsPerAttribute:3,componentDatatype:j.FLOAT,offsetInBytes:V,strideInBytes:6*P},{index:il.position2DHigh,componentsPerAttribute:3,componentDatatype:j.FLOAT,offsetInBytes:U,strideInBytes:6*P},{index:il.position2DLow,componentsPerAttribute:3,componentDatatype:j.FLOAT,offsetInBytes:V,strideInBytes:6*P},{index:il.prevPosition3DHigh,componentsPerAttribute:3,componentDatatype:j.FLOAT,offsetInBytes:W,strideInBytes:6*P},{index:il.prevPosition3DLow,componentsPerAttribute:3,componentDatatype:j.FLOAT,offsetInBytes:H,strideInBytes:6*P},{index:il.prevPosition2DHigh,componentsPerAttribute:3,componentDatatype:j.FLOAT,offsetInBytes:W,strideInBytes:6*P},{index:il.prevPosition2DLow,componentsPerAttribute:3,componentDatatype:j.FLOAT,offsetInBytes:H,strideInBytes:6*P},{index:il.nextPosition3DHigh,componentsPerAttribute:3,componentDatatype:j.FLOAT,offsetInBytes:X,strideInBytes:6*P},{index:il.nextPosition3DLow,componentsPerAttribute:3,componentDatatype:j.FLOAT,offsetInBytes:$,strideInBytes:6*P},{index:il.nextPosition2DHigh,componentsPerAttribute:3,componentDatatype:j.FLOAT,offsetInBytes:X,strideInBytes:6*P},{index:il.nextPosition2DLow,componentsPerAttribute:3,componentDatatype:j.FLOAT,offsetInBytes:$,strideInBytes:6*P},{index:il.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:j.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:ae}],he,ge,le,me;_===J.SCENE3D?(ge=e._positionBuffer,he="vertexBuffer",le=Gre,me="value"):_===J.SCENE2D||_===J.COLUMBUS_VIEW?(ge=Gre,he="value",le=e._positionBuffer,me="vertexBuffer"):(ge=R,he="vertexBuffer",le=e._positionBuffer,me="vertexBuffer"),se[0][he]=ge,se[1][he]=ge,se[2][me]=le,se[3][me]=le,se[4][he]=ge,se[5][he]=ge,se[6][me]=le,se[7][me]=le,se[8][he]=ge,se[9][he]=ge,se[10][me]=le,se[11][me]=le;let Me=new Zn({context:t,attributes:se,indexBuffer:B});e._vertexArrays.push({va:Me,buckets:u[I]})}}}function I5e(e,t){return t instanceof Ot?t.id:t}var L2=[];function O5e(e){let t=Vi._uniformList[e.type],n=t.length;L2.length=2*n;let i=0;for(let o=0;o<n;++o){let r=t[o];L2[i]=r,L2[i+1]=e._uniforms[r](),i+=2}return`${e.type}:${JSON.stringify(L2,I5e)}`}function P5e(e){let t=e._mode,n=e._modelMatrix,i=e._polylineBuckets={},o=e._polylines,r=o.length;for(let s=0;s<r;++s){let a=o[s];if(a._actualPositions.length>1){a.update();let l=a.material,u=i[l.type];c(u)||(u=i[l.type]=new Ph(l,t,n)),u.addPolyline(a)}}}function R5e(e,t){let n=t.mode;(e._mode!==n||!N.equals(e._modelMatrix,e.modelMatrix))&&(e._mode=n,e._modelMatrix=N.clone(e.modelMatrix),e._createVertexArray=!0)}function J5(e){if(e._polylinesRemoved){e._polylinesRemoved=!1;let t=[],n=[],i=0,o,r=e._polylines.length;for(let s=0;s<r;++s)o=e._polylines[s],o.isDestroyed||(o._index=i++,n.push(o),t.push(o));e._polylines=t,e._polylinesToUpdate=n}}function Q5(e){let t=e._polylines,n=t.length;for(let i=0;i<n;++i)if(!t[i].isDestroyed){let o=t[i]._bucket;c(o)&&(o.shaderProgram=o.shaderProgram&&o.shaderProgram.destroy())}}function Jre(e){let t=e._vertexArrays.length;for(let n=0;n<t;++n)e._vertexArrays[n].va.destroy();e._vertexArrays.length=0}Qf.prototype._updatePolyline=function(e,t){this._polylinesUpdated=!0,e._dirty||this._polylinesToUpdate.push(e),++this._propertiesChanged[t]};function Qre(e){let t=e._polylines,n=t.length;for(let i=0;i<n;++i)t[i].isDestroyed||t[i]._destroy()}function $5(e,t,n){this.count=e,this.offset=t,this.bucket=n}function Ph(e,t,n){this.polylines=[],this.lengthOfPositions=0,this.material=e,this.shaderProgram=void 0,this.mode=t,this.modelMatrix=n}Ph.prototype.addPolyline=function(e){this.polylines.push(e),e._actualLength=this.getPolylinePositionsLength(e),this.lengthOfPositions+=e._actualLength,e._bucket=this};Ph.prototype.updateShader=function(e,t,n){if(c(this.shaderProgram))return;let i=["DISTANCE_DISPLAY_CONDITION"];n&&i.push("VECTOR_TILE"),this.material.shaderSource.search(/in\s+float\s+v_polylineAngle;/g)!==-1&&i.push("POLYLINE_DASH"),sn.isInternetExplorer()||i.push("CLIP_POLYLINE");let o=new Be({defines:i,sources:[`in vec4 v_pickColor;
| `,this.material.shaderSource,cT]}),r=t.getVertexShaderCallback()(P2),s=new Be({defines:i,sources:[Fu,r]});this.shaderProgram=en.fromCache({context:e,vertexShaderSource:s,fragmentShaderSource:o,attributeLocations:il})};function ese(e){return d.dot(d.UNIT_X,e._boundingVolume.center)<0||e._boundingVolume.intersectPlane(on.ORIGIN_ZX_PLANE)===Gt.INTERSECTING}Ph.prototype.getPolylinePositionsLength=function(e){let t;if(this.mode===J.SCENE3D||!ese(e))return t=e._actualPositions.length,t*4-4;let n=0,i=e._segments.lengths;t=i.length;for(let o=0;o<t;++o)n+=i[o]*4-4;return n};var cs=new d,ef=new d,tf=new d,N2=new d,M5e=new ee,L5e=new k;Ph.prototype.write=function(e,t,n,i,o,r,s,a){let l=this.mode,u=a.ellipsoid.maximumRadius*O.PI,f=this.polylines,h=f.length;for(let m=0;m<h;++m){let p=f[m],_=p.width,b=p.show&&_>0,x=p._index,T=this.getSegments(p,a),E=T.positions,S=T.lengths,A=E.length,v=p.getPickId(s).color,D=0,R=0,P;for(let W=0;W<A;++W){W===0?p._loop?P=E[A-2]:(P=N2,d.subtract(E[0],E[1],P),d.add(E[0],P,P)):P=E[W-1],d.clone(P,ef),d.clone(E[W],cs),W===A-1?p._loop?P=E[1]:(P=N2,d.subtract(E[A-1],E[A-2],P),d.add(E[A-1],P,P)):P=E[W+1],d.clone(P,tf);let H=S[D];W===R+H&&(R+=H,++D);let X=W-R===0,$=W===R+S[D]-1;l===J.SCENE2D&&(ef.z=0,cs.z=0,tf.z=0),(l===J.SCENE2D||l===J.MORPHING)&&(X||$)&&u-Math.abs(cs.x)<1&&((cs.x<0&&ef.x>0||cs.x>0&&ef.x<0)&&d.clone(cs,ef),(cs.x<0&&tf.x>0||cs.x>0&&tf.x<0)&&d.clone(cs,tf));let ae=X?2:0,se=$?2:4;for(let he=ae;he<se;++he){kn.writeElements(cs,e,n),kn.writeElements(ef,e,n+6),kn.writeElements(tf,e,n+12);let ge=he-2<0?-1:1;t[o]=W/(A-1),t[o+1]=2*(he%2)-1,t[o+2]=ge,t[o+3]=x,n+=6*3,o+=4}}let L=M5e;L.x=z.floatToByte(v.red),L.y=z.floatToByte(v.green),L.z=z.floatToByte(v.blue),L.w=z.floatToByte(v.alpha);let F=L5e;F.x=_,F.y=b?1:0;let y=l===J.SCENE2D?p._boundingVolume2D:p._boundingVolumeWC,I=kn.fromCartesian(y.center,Kre),M=I.high,B=ee.fromElements(I.low.x,I.low.y,I.low.z,y.radius,$re),U=Zre;U.x=0,U.y=Number.MAX_VALUE;let V=p.distanceDisplayCondition;c(V)&&(U.x=V.near,U.y=V.far),r.setBatchedAttribute(x,0,F),r.setBatchedAttribute(x,1,L),r.attributes.length>2&&(r.setBatchedAttribute(x,2,M),r.setBatchedAttribute(x,3,B),r.setBatchedAttribute(x,4,U))}};var N5e=new d,F5e=new d,B5e=new d,Wre=new d;Ph.prototype.writeForMorph=function(e,t){let n=this.modelMatrix,i=this.polylines,o=i.length;for(let r=0;r<o;++r){let s=i[r],a=s._segments.positions,l=s._segments.lengths,u=a.length,f=0,h=0;for(let m=0;m<u;++m){let p;m===0?s._loop?p=a[u-2]:(p=Wre,d.subtract(a[0],a[1],p),d.add(a[0],p,p)):p=a[m-1],p=N.multiplyByPoint(n,p,F5e);let _=N.multiplyByPoint(n,a[m],N5e),b;m===u-1?s._loop?b=a[1]:(b=Wre,d.subtract(a[u-1],a[u-2],b),d.add(a[u-1],b,b)):b=a[m+1],b=N.multiplyByPoint(n,b,B5e);let x=l[f];m===h+x&&(h+=x,++f);let T=m-h===0,E=m===h+l[f]-1,S=T?2:0,A=E?2:4;for(let v=S;v<A;++v)kn.writeElements(_,e,t),kn.writeElements(p,e,t+6),kn.writeElements(b,e,t+12),t+=6*3}}};var k5e=new Array(1);Ph.prototype.updateIndices=function(e,t,n,i){let o=n.length-1,r=new $5(0,i,this);n[o].push(r);let s=0,a=e[e.length-1],l=0;a.length>0&&(l=a[a.length-1]+1);let u=this.polylines,f=u.length;for(let h=0;h<f;++h){let m=u[h];m._locatorBuckets=[];let p;if(this.mode===J.SCENE3D){p=k5e;let b=m._actualPositions.length;if(b>0)p[0]=b;else continue}else p=m._segments.lengths;let _=p.length;if(_>0){let b=0;for(let x=0;x<_;++x){let T=p[x]-1;for(let E=0;E<T;++E)l+4>O.SIXTY_FOUR_KILOBYTES&&(m._locatorBuckets.push({locator:r,count:b}),b=0,t.push(4),a=[],e.push(a),l=0,r.count=s,s=0,i=0,r=new $5(0,0,this),n[++o]=[r]),a.push(l,l+2,l+1),a.push(l+1,l+2,l+3),b+=6,s+=6,i+=6,l+=4}m._locatorBuckets.push({locator:r,count:b}),l+4>O.SIXTY_FOUR_KILOBYTES&&(t.push(0),a=[],e.push(a),l=0,r.count=s,i=0,s=0,r=new $5(0,0,this),n[++o]=[r])}m._clean()}return r.count=s,i};Ph.prototype.getPolylineStartIndex=function(e){let t=this.polylines,n=0,i=t.length;for(let o=0;o<i;++o){let r=t[o];if(r===e)break;n+=r._actualLength}return n};var _C={positions:void 0,lengths:void 0},qre=new Array(1),U5e=new d,z5e=new re;Ph.prototype.getSegments=function(e,t){let n=e._actualPositions;if(this.mode===J.SCENE3D)return qre[0]=n.length,_C.positions=n,_C.lengths=qre,_C;ese(e)&&(n=e._segments.positions);let i=t.ellipsoid,o=[],r=this.modelMatrix,s=n.length,a,l=U5e;for(let u=0;u<s;++u)a=n[u],l=N.multiplyByPoint(r,a,l),o.push(t.project(i.cartesianToCartographic(l,z5e)));if(o.length>0){e._boundingVolume2D=ne.fromPoints(o,e._boundingVolume2D);let u=e._boundingVolume2D.center;e._boundingVolume2D.center=new d(u.z,u.x,u.y)}return _C.positions=o,_C.lengths=e._segments.lengths,_C};var Yre;Ph.prototype.writeUpdate=function(e,t,n,i){let o=this.mode,r=i.ellipsoid.maximumRadius*O.PI,s=t._actualLength;if(s){e+=this.getPolylineStartIndex(t);let a=Yre,l=6*s*3;!c(a)||a.length<l?a=Yre=new Float32Array(l):a.length>l&&(a=new Float32Array(a.buffer,0,l));let u=this.getSegments(t,i),f=u.positions,h=u.lengths,m=0,p=0,_=0,b;s=f.length;for(let x=0;x<s;++x){x===0?t._loop?b=f[s-2]:(b=N2,d.subtract(f[0],f[1],b),d.add(f[0],b,b)):b=f[x-1],d.clone(b,ef),d.clone(f[x],cs),x===s-1?t._loop?b=f[1]:(b=N2,d.subtract(f[s-1],f[s-2],b),d.add(f[s-1],b,b)):b=f[x+1],d.clone(b,tf);let T=h[p];x===_+T&&(_+=T,++p);let E=x-_===0,S=x===_+h[p]-1;o===J.SCENE2D&&(ef.z=0,cs.z=0,tf.z=0),(o===J.SCENE2D||o===J.MORPHING)&&(E||S)&&r-Math.abs(cs.x)<1&&((cs.x<0&&ef.x>0||cs.x>0&&ef.x<0)&&d.clone(cs,ef),(cs.x<0&&tf.x>0||cs.x>0&&tf.x<0)&&d.clone(cs,tf));let A=E?2:0,v=S?2:4;for(let D=A;D<v;++D)kn.writeElements(cs,a,m),kn.writeElements(ef,a,m+6),kn.writeElements(tf,a,m+12),m+=6*3}n.copyFromArrayView(a,6*3*Float32Array.BYTES_PER_ELEMENT*e)}};var Rh=Qf;function yg(e){this._positions=e.positions,this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._rectangle=e.rectangle,this._minHeight=e.minimumHeight,this._maxHeight=e.maximumHeight,this._billboardCollection=new Ju({batchTable:e.batchTable}),this._labelCollection=new hp({batchTable:e.batchTable}),this._polylineCollection=new Rh,this._polylineCollection._useHighlightColor=!0,this._packedBuffer=void 0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(yg.prototype,{ready:{get:function(){return this._ready}},pointsLength:{get:function(){return this._billboardCollection.length}},texturesByteLength:{get:function(){let e=this._billboardCollection.textureAtlas.texture.sizeInBytes,t=this._labelCollection._textureAtlas.texture.sizeInBytes;return e+t}}});function V5e(e,t){let n=e._rectangle,i=e._minHeight,o=e._maxHeight,r=2+te.packedLength+Z.packedLength,s=new Float64Array(r),a=0;return s[a++]=i,s[a++]=o,te.pack(n,s,a),a+=te.packedLength,Z.pack(t,s,a),s}var H5e=new hi("createVectorTilePoints",5),G5e=new d;function j5e(e,t){let n=e._positions,i=e._packedBuffer;c(i)||(n=e._positions=n.slice(),e._batchIds=e._batchIds.slice(),i=e._packedBuffer=V5e(e,t));let o=[n.buffer,i.buffer],r={positions:n.buffer,packedBuffer:i.buffer},s=H5e.scheduleTask(r,o);if(c(s))return s.then(a=>{if(e.isDestroyed())return;e._positions=new Float64Array(a.positions);let l=e._billboardCollection,u=e._labelCollection,f=e._polylineCollection;n=e._positions;let h=e._batchIds,m=n.length/3;for(let p=0;p<m;++p){let _=h[p],b=d.unpack(n,p*3,G5e),x=l.add();x.position=b,x._batchIndex=_;let T=u.add();T.text=" ",T.position=b,T._batchIndex=_;let E=f.add();E.positions=[d.clone(b),d.clone(b)]}e._positions=void 0,e._packedBuffer=void 0,e._ready=!0}).catch(a=>{e.isDestroyed()||(e._error=a)})}yg.prototype.createFeatures=function(e,t){let n=this._billboardCollection,i=this._labelCollection,o=this._polylineCollection,r=this._batchIds,s=r.length;for(let a=0;a<s;++a){let l=r[a],u=n.get(a),f=i.get(a),h=o.get(a);t[l]=new _g(e,l,u,f,h)}};yg.prototype.applyDebugSettings=function(e,t){e?(z.clone(t,this._billboardCollection._highlightColor),z.clone(t,this._labelCollection._highlightColor),z.clone(t,this._polylineCollection._highlightColor)):(z.clone(z.WHITE,this._billboardCollection._highlightColor),z.clone(z.WHITE,this._labelCollection._highlightColor),z.clone(z.WHITE,this._polylineCollection._highlightColor))};function W5e(e,t){let n=e._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],s=t[r];s.show=!0,s.pointSize=_g.defaultPointSize,s.color=_g.defaultColor,s.pointOutlineColor=_g.defaultPointOutlineColor,s.pointOutlineWidth=_g.defaultPointOutlineWidth,s.labelColor=z.WHITE,s.labelOutlineColor=z.WHITE,s.labelOutlineWidth=1,s.font="30px sans-serif",s.labelStyle=Uo.FILL,s.labelText=void 0,s.backgroundColor=new z(.165,.165,.165,.8),s.backgroundPadding=new k(7,5),s.backgroundEnabled=!1,s.scaleByDistance=void 0,s.translucencyByDistance=void 0,s.distanceDisplayCondition=void 0,s.heightOffset=0,s.anchorLineEnabled=!1,s.anchorLineColor=z.WHITE,s.image=void 0,s.disableDepthTestDistance=0,s.horizontalOrigin=mi.CENTER,s.verticalOrigin=Dn.CENTER,s.labelHorizontalOrigin=mi.RIGHT,s.labelVerticalOrigin=Dn.BASELINE}}var q5e=new z,Y5e=new z,X5e=new z,K5e=new z,$5e=new z,Z5e=new z,iv=new Bt,ov=new Bt,e9=new Nt;yg.prototype.applyStyle=function(e,t){if(!c(e)){W5e(this,t);return}let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],s=t[r];if(c(e.show)&&(s.show=e.show.evaluate(s)),c(e.pointSize)&&(s.pointSize=e.pointSize.evaluate(s)),c(e.color)&&(s.color=e.color.evaluateColor(s,q5e)),c(e.pointOutlineColor)&&(s.pointOutlineColor=e.pointOutlineColor.evaluateColor(s,Y5e)),c(e.pointOutlineWidth)&&(s.pointOutlineWidth=e.pointOutlineWidth.evaluate(s)),c(e.labelColor)&&(s.labelColor=e.labelColor.evaluateColor(s,X5e)),c(e.labelOutlineColor)&&(s.labelOutlineColor=e.labelOutlineColor.evaluateColor(s,K5e)),c(e.labelOutlineWidth)&&(s.labelOutlineWidth=e.labelOutlineWidth.evaluate(s)),c(e.font)&&(s.font=e.font.evaluate(s)),c(e.labelStyle)&&(s.labelStyle=e.labelStyle.evaluate(s)),c(e.labelText)?s.labelText=e.labelText.evaluate(s):s.labelText=void 0,c(e.backgroundColor)&&(s.backgroundColor=e.backgroundColor.evaluateColor(s,$5e)),c(e.backgroundPadding)&&(s.backgroundPadding=e.backgroundPadding.evaluate(s)),c(e.backgroundEnabled)&&(s.backgroundEnabled=e.backgroundEnabled.evaluate(s)),c(e.scaleByDistance)){let a=e.scaleByDistance.evaluate(s);c(a)?(iv.near=a.x,iv.nearValue=a.y,iv.far=a.z,iv.farValue=a.w,s.scaleByDistance=iv):s.scaleByDistance=void 0}else s.scaleByDistance=void 0;if(c(e.translucencyByDistance)){let a=e.translucencyByDistance.evaluate(s);c(a)?(ov.near=a.x,ov.nearValue=a.y,ov.far=a.z,ov.farValue=a.w,s.translucencyByDistance=ov):s.translucencyByDistance=void 0}else s.translucencyByDistance=void 0;if(c(e.distanceDisplayCondition)){let a=e.distanceDisplayCondition.evaluate(s);c(a)?(e9.near=a.x,e9.far=a.y,s.distanceDisplayCondition=e9):s.distanceDisplayCondition=void 0}else s.distanceDisplayCondition=void 0;c(e.heightOffset)&&(s.heightOffset=e.heightOffset.evaluate(s)),c(e.anchorLineEnabled)&&(s.anchorLineEnabled=e.anchorLineEnabled.evaluate(s)),c(e.anchorLineColor)&&(s.anchorLineColor=e.anchorLineColor.evaluateColor(s,Z5e)),c(e.image)?s.image=e.image.evaluate(s):s.image=void 0,c(e.disableDepthTestDistance)&&(s.disableDepthTestDistance=e.disableDepthTestDistance.evaluate(s)),c(e.horizontalOrigin)&&(s.horizontalOrigin=e.horizontalOrigin.evaluate(s)),c(e.verticalOrigin)&&(s.verticalOrigin=e.verticalOrigin.evaluate(s)),c(e.labelHorizontalOrigin)&&(s.labelHorizontalOrigin=e.labelHorizontalOrigin.evaluate(s)),c(e.labelVerticalOrigin)&&(s.labelVerticalOrigin=e.labelVerticalOrigin.evaluate(s))}};yg.prototype.update=function(e){if(!this._ready){if(c(this._promise)||(this._promise=j5e(this,e.mapProjection.ellipsoid)),c(this._error)){let t=this._error;throw this._error=void 0,t}return}this._polylineCollection.update(e),this._billboardCollection.update(e),this._labelCollection.update(e)};yg.prototype.isDestroyed=function(){return!1};yg.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._polylineCollection=this._polylineCollection&&this._polylineCollection.destroy(),ue(this)};var F2=yg;function pp(e){this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._counts=e.counts,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._batchedPositions=void 0,this._transferrableBatchIds=void 0,this._vertexBatchIds=void 0,this._ellipsoid=g(e.ellipsoid,Z.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._polygonMinimumHeights=e.polygonMinimumHeights,this._polygonMaximumHeights=e.polygonMaximumHeights,this._center=g(e.center,d.ZERO),this._rectangle=e.rectangle,this._center=void 0,this._boundingVolume=e.boundingVolume,this._boundingVolumes=void 0,this._batchedIndices=void 0,this._ready=!1,this._promise=void 0,this._error=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=Ln.BOTH}Object.defineProperties(pp.prototype,{trianglesLength:{get:function(){return c(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return c(this._primitive)?this._primitive.geometryByteLength:0}},ready:{get:function(){return this._ready}}});function J5e(e){let t=new Float64Array(3+d.packedLength+Z.packedLength+te.packedLength),n=0;return t[n++]=e._indices.BYTES_PER_ELEMENT,t[n++]=e._minimumHeight,t[n++]=e._maximumHeight,d.pack(e._center,t,n),n+=d.packedLength,Z.pack(e._ellipsoid,t,n),n+=Z.packedLength,te.pack(e._rectangle,t,n),t}function Q5e(e,t){let n=1,i=t[n++],o=e._boundingVolumes=new Array(i);for(let a=0;a<i;++a)o[a]=wn.unpack(t,n),n+=wn.packedLength;let r=t[n++],s=e._batchedIndices=new Array(r);for(let a=0;a<r;++a){let l=z.unpack(t,n);n+=z.packedLength;let u=t[n++],f=t[n++],h=t[n++],m=new Array(h);for(let p=0;p<h;++p)m[p]=t[n++];s[a]=new qm({color:l,offset:u,count:f,batchIds:m})}}var e9e=new hi("createVectorTilePolygons",5),t9e=new z;function n9e(e){if(c(e._primitive))return;let t=e._positions,n=e._counts,i=e._indexCounts,o=e._indices,r=e._transferrableBatchIds,s=e._batchTableColors,a=e._packedBuffer;if(!c(s)){t=e._positions=e._positions.slice(),n=e._counts=e._counts.slice(),i=e._indexCounts=e._indexCounts.slice(),o=e._indices=e._indices.slice(),e._center=e._ellipsoid.cartographicToCartesian(te.center(e._rectangle)),r=e._transferrableBatchIds=new Uint32Array(e._batchIds),s=e._batchTableColors=new Uint32Array(r.length);let p=e._batchTable,_=s.length;for(let b=0;b<_;++b){let x=p.getColor(b,t9e);s[b]=x.toRgba()}a=e._packedBuffer=J5e(e)}let l=[t.buffer,n.buffer,i.buffer,o.buffer,r.buffer,s.buffer,a.buffer],u={packedBuffer:a.buffer,positions:t.buffer,counts:n.buffer,indexCounts:i.buffer,indices:o.buffer,batchIds:r.buffer,batchTableColors:s.buffer},f=e._polygonMinimumHeights,h=e._polygonMaximumHeights;c(f)&&c(h)&&(f=f.slice(),h=h.slice(),l.push(f.buffer,h.buffer),u.minimumHeights=f,u.maximumHeights=h);let m=e9e.scheduleTask(u,l);if(c(m))return m.then(p=>{if(e.isDestroyed())return;e._positions=void 0,e._counts=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0;let _=new Float64Array(p.packedBuffer),b=_[0];Q5e(e,_),e._indices=Oe.getSizeInBytes(b)===2?new Uint16Array(p.indices):new Uint32Array(p.indices),e._indexOffsets=new Uint32Array(p.indexOffsets),e._indexCounts=new Uint32Array(p.indexCounts),e._batchedPositions=new Float32Array(p.positions),e._vertexBatchIds=new Uint16Array(p.batchIds),i9e(e),e._ready=!0}).catch(p=>{e.isDestroyed()||(e._error=p)})}function i9e(e){c(e._primitive)||(e._primitive=new DT({batchTable:e._batchTable,positions:e._batchedPositions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center}),e._batchTable=void 0,e._batchIds=void 0,e._positions=void 0,e._counts=void 0,e._indices=void 0,e._indexCounts=void 0,e._indexOffsets=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0,e._center=void 0,e._rectangle=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0)}pp.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)};pp.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)};pp.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)};pp.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)};pp.prototype.update=function(e){if(!this._ready){if(c(this._promise)||(this._promise=n9e(this)),c(this._error)){let t=this._error;throw this._error=void 0,t}return}this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e)};pp.prototype.isDestroyed=function(){return!1};pp.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),ue(this)};var B2=pp;var k2=`in vec4 currentPosition;
| in vec4 previousPosition;
| in vec4 nextPosition;
| in vec2 expandAndWidth;
| in float a_batchId;
|
| uniform mat4 u_modifiedModelView;
|
| void main()
| {
| float expandDir = expandAndWidth.x;
| float width = abs(expandAndWidth.y) + 0.5;
| bool usePrev = expandAndWidth.y < 0.0;
|
| vec4 p = u_modifiedModelView * currentPosition;
| vec4 prev = u_modifiedModelView * previousPosition;
| vec4 next = u_modifiedModelView * nextPosition;
|
| float angle;
| vec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle);
| gl_Position = czm_viewportOrthographic * positionWC;
| }
| `;function ed(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=g(e.ellipsoid,Z.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._boundingVolume=e.boundingVolume,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._keepDecodedPositions=e.keepDecodedPositions,this._decodedPositions=void 0,this._decodedPositionOffsets=void 0,this._currentPositions=void 0,this._previousPositions=void 0,this._nextPositions=void 0,this._expandAndWidth=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=z.clone(z.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(ed.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});function o9e(e){let t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,o=e._ellipsoid,r=e._center,s=2+te.packedLength+Z.packedLength+d.packedLength,a=new Float64Array(s),l=0;return a[l++]=n,a[l++]=i,te.pack(t,a,l),l+=te.packedLength,Z.pack(o,a,l),l+=Z.packedLength,d.pack(r,a,l),a}var r9e=new hi("createVectorTilePolylines",5),gC={previousPosition:0,currentPosition:1,nextPosition:2,expandAndWidth:3,a_batchId:4};function s9e(e,t){if(c(e._va))return;let n=e._positions,i=e._widths,o=e._counts,r=e._transferrableBatchIds,s=e._packedBuffer;c(s)||(n=e._positions=n.slice(),i=e._widths=i.slice(),o=e._counts=o.slice(),r=e._transferrableBatchIds=e._batchIds.slice(),s=e._packedBuffer=o9e(e));let a=[n.buffer,i.buffer,o.buffer,r.buffer,s.buffer],l={positions:n.buffer,widths:i.buffer,counts:o.buffer,batchIds:r.buffer,packedBuffer:s.buffer,keepDecodedPositions:e._keepDecodedPositions},u=r9e.scheduleTask(l,a);if(c(u))return u.then(function(f){if(e.isDestroyed())return;e._keepDecodedPositions&&(e._decodedPositions=new Float64Array(f.decodedPositions),e._decodedPositionOffsets=new Uint32Array(f.decodedPositionOffsets)),e._currentPositions=new Float32Array(f.currentPositions),e._previousPositions=new Float32Array(f.previousPositions),e._nextPositions=new Float32Array(f.nextPositions),e._expandAndWidth=new Float32Array(f.expandAndWidth),e._vertexBatchIds=new Uint16Array(f.batchIds);let h=f.indexDatatype;e._indices=h===Oe.UNSIGNED_SHORT?new Uint16Array(f.indices):new Uint32Array(f.indices),a9e(e,t),e._ready=!0}).catch(f=>{e.isDestroyed()||(e._error=f)})}function a9e(e,t){if(!c(e._va)){let n=e._currentPositions,i=e._previousPositions,o=e._nextPositions,r=e._expandAndWidth,s=e._vertexBatchIds,a=e._indices,l=i.byteLength+n.byteLength+o.byteLength;l+=r.byteLength+s.byteLength+a.byteLength,e._trianglesLength=a.length/3,e._geometryByteLength=l;let u=yt.createVertexBuffer({context:t,typedArray:i,usage:Pe.STATIC_DRAW}),f=yt.createVertexBuffer({context:t,typedArray:n,usage:Pe.STATIC_DRAW}),h=yt.createVertexBuffer({context:t,typedArray:o,usage:Pe.STATIC_DRAW}),m=yt.createVertexBuffer({context:t,typedArray:r,usage:Pe.STATIC_DRAW}),p=yt.createVertexBuffer({context:t,typedArray:s,usage:Pe.STATIC_DRAW}),_=yt.createIndexBuffer({context:t,typedArray:a,usage:Pe.STATIC_DRAW,indexDatatype:a.BYTES_PER_ELEMENT===2?Oe.UNSIGNED_SHORT:Oe.UNSIGNED_INT}),b=[{index:gC.previousPosition,vertexBuffer:u,componentDatatype:j.FLOAT,componentsPerAttribute:3},{index:gC.currentPosition,vertexBuffer:f,componentDatatype:j.FLOAT,componentsPerAttribute:3},{index:gC.nextPosition,vertexBuffer:h,componentDatatype:j.FLOAT,componentsPerAttribute:3},{index:gC.expandAndWidth,vertexBuffer:m,componentDatatype:j.FLOAT,componentsPerAttribute:2},{index:gC.a_batchId,vertexBuffer:p,componentDatatype:j.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new Zn({context:t,attributes:b,indexBuffer:_}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._currentPositions=void 0,e._previousPositions=void 0,e._nextPositions=void 0,e._expandAndWidth=void 0,e._vertexBatchIds=void 0,e._indices=void 0}}var rv=new N,tse=new d;function c9e(e,t){c(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){let n=t.uniformState.view;return N.clone(n,rv),N.multiplyByPoint(rv,e._center,tse),N.setTranslation(rv,tse,rv),rv},u_highlightColor:function(){return e._highlightColor}})}function l9e(e){if(c(e._rs))return;let t={enabled:!0,factor:-5,units:-5};e._rs=Fe.fromCache({blending:cn.ALPHA_BLEND,depthMask:!1,depthTest:{enabled:!0},polygonOffset:t})}var u9e=`uniform vec4 u_highlightColor;
| void main()
| {
| out_FragColor = u_highlightColor;
| }
| `;function f9e(e,t){if(c(e._sp))return;let n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)(k2),o=n.getFragmentShaderCallback(!1,void 0,!1)(u9e),r=new Be({defines:["VECTOR_TILE",sn.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[Fu,i]}),s=new Be({defines:["VECTOR_TILE"],sources:[o]});e._sp=en.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:gC})}function d9e(e,t){if(!c(e._command)){let n=e._batchTable.getUniformMapCallback()(e._uniformMap);e._command=new Ke({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:n,boundingVolume:e._boundingVolume,pass:xe.TRANSLUCENT,pickId:e._batchTable.getPickId()})}t.commandList.push(e._command)}ed.getPolylinePositions=function(e,t){let n=e._batchIds,i=e._decodedPositions,o=e._decodedPositionOffsets;if(!c(n)||!c(i))return;let r,s,a=n.length,l=0,u=0;for(r=0;r<a;++r)n[r]===t&&(l+=o[r+1]-o[r]);if(l===0)return;let f=new Float64Array(l*3);for(r=0;r<a;++r)if(n[r]===t){let h=o[r],m=o[r+1]-h;for(s=0;s<m;++s){let p=(h+s)*3;f[u++]=i[p],f[u++]=i[p+1],f[u++]=i[p+2]}}return f};ed.prototype.getPositions=function(e){return ed.getPolylinePositions(this,e)};ed.prototype.createFeatures=function(e,t){let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o];t[r]=new Jc(e,r)}};ed.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function h9e(e,t){let n=e._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],s=t[r];s.show=!0,s.color=z.WHITE}}var m9e=new z,p9e=z.WHITE,_9e=!0;ed.prototype.applyStyle=function(e,t){if(!c(e)){h9e(this,t);return}let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],s=t[r];s.color=c(e.color)?e.color.evaluateColor(s,m9e):p9e,s.show=c(e.show)?e.show.evaluate(s):_9e}};ed.prototype.update=function(e){let t=e.context;if(!this._ready){if(c(this._promise)||(this._promise=s9e(this,t)),c(this._error)){let i=this._error;throw this._error=void 0,i}return}c9e(this,t),f9e(this,t),l9e(this);let n=e.passes;(n.render||n.pick)&&d9e(this,e)};ed.prototype.isDestroyed=function(){return!1};ed.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),ue(this)};var yC=ed;var U2=`in vec3 startEllipsoidNormal;
| in vec3 endEllipsoidNormal;
| in vec4 startPositionAndHeight;
| in vec4 endPositionAndHeight;
| in vec4 startFaceNormalAndVertexCorner;
| in vec4 endFaceNormalAndHalfWidth;
| in float a_batchId;
|
| uniform mat4 u_modifiedModelView;
| uniform vec2 u_minimumMaximumVectorHeights;
|
| out vec4 v_startPlaneEC;
| out vec4 v_endPlaneEC;
| out vec4 v_rightPlaneEC;
| out float v_halfWidth;
| out vec3 v_volumeUpEC;
|
| void main()
| {
| // vertex corner IDs
| // 3-----------7
| // /| left /|
| // / | 1 / |
| // 2-----------6 5 end
| // | / | /
| // start |/ right |/
| // 0-----------4
| //
| float isEnd = floor(startFaceNormalAndVertexCorner.w * 0.251); // 0 for front, 1 for end
| float isTop = floor(startFaceNormalAndVertexCorner.w * mix(0.51, 0.19, isEnd)); // 0 for bottom, 1 for top
|
| vec3 forward = endPositionAndHeight.xyz - startPositionAndHeight.xyz;
| vec3 right = normalize(cross(forward, startEllipsoidNormal));
|
| vec4 position = vec4(startPositionAndHeight.xyz, 1.0);
| position.xyz += forward * isEnd;
|
| v_volumeUpEC = czm_normal * normalize(cross(right, forward));
|
| // Push for volume height
| float offset;
| vec3 ellipsoidNormal = mix(startEllipsoidNormal, endEllipsoidNormal, isEnd);
|
| // offset height to create volume
| offset = mix(startPositionAndHeight.w, endPositionAndHeight.w, isEnd);
| offset = mix(u_minimumMaximumVectorHeights.y, u_minimumMaximumVectorHeights.x, isTop) - offset;
| position.xyz += offset * ellipsoidNormal;
|
| // move from RTC to EC
| position = u_modifiedModelView * position;
| right = czm_normal * right;
|
| // Push for width in a direction that is in the start or end plane and in a plane with right
| // N = normalEC ("right-facing" direction for push)
| // R = right
| // p = angle between N and R
| // w = distance to push along R if R == N
| // d = distance to push along N
| //
| // N R
| // { p| } * cos(p) = dot(N, R) = w / d
| // d | |w * d = w / dot(N, R)
| // { | }
| // o---------- polyline segment ---->
| //
| vec3 scratchNormal = mix(-startFaceNormalAndVertexCorner.xyz, endFaceNormalAndHalfWidth.xyz, isEnd);
| scratchNormal = cross(scratchNormal, mix(startEllipsoidNormal, endEllipsoidNormal, isEnd));
| vec3 miterPushNormal = czm_normal * normalize(scratchNormal);
|
| offset = 2.0 * endFaceNormalAndHalfWidth.w * max(0.0, czm_metersPerPixel(position)); // offset = widthEC
| offset = offset / dot(miterPushNormal, right);
| position.xyz += miterPushNormal * (offset * sign(0.5 - mod(startFaceNormalAndVertexCorner.w, 2.0)));
|
| gl_Position = czm_depthClamp(czm_projection * position);
|
| position = u_modifiedModelView * vec4(startPositionAndHeight.xyz, 1.0);
| vec3 startNormalEC = czm_normal * startFaceNormalAndVertexCorner.xyz;
| v_startPlaneEC = vec4(startNormalEC, -dot(startNormalEC, position.xyz));
| v_rightPlaneEC = vec4(right, -dot(right, position.xyz));
|
| position = u_modifiedModelView * vec4(endPositionAndHeight.xyz, 1.0);
| vec3 endNormalEC = czm_normal * endFaceNormalAndHalfWidth.xyz;
| v_endPlaneEC = vec4(endNormalEC, -dot(endNormalEC, position.xyz));
| v_halfWidth = endFaceNormalAndHalfWidth.w;
| }
| `;var z2=`in vec4 v_startPlaneEC;
| in vec4 v_endPlaneEC;
| in vec4 v_rightPlaneEC;
| in float v_halfWidth;
| in vec3 v_volumeUpEC;
|
| uniform vec4 u_highlightColor;
| void main()
| {
| float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));
|
| // Discard for sky
| if (logDepthOrDepth == 0.0) {
| #ifdef DEBUG_SHOW_VOLUME
| out_FragColor = vec4(0.0, 0.0, 1.0, 0.5);
| return;
| #else // DEBUG_SHOW_VOLUME
| discard;
| #endif // DEBUG_SHOW_VOLUME
| }
|
| vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
| eyeCoordinate /= eyeCoordinate.w;
|
| float halfMaxWidth = v_halfWidth * czm_metersPerPixel(eyeCoordinate);
|
| // Expand halfMaxWidth if direction to camera is almost perpendicular with the volume's up direction
| halfMaxWidth += halfMaxWidth * (1.0 - dot(-normalize(eyeCoordinate.xyz), v_volumeUpEC));
|
| // Check distance of the eye coordinate against the right-facing plane
| float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);
|
| // Check eye coordinate against the mitering planes
| float distanceFromStart = czm_planeDistance(v_startPlaneEC, eyeCoordinate.xyz);
| float distanceFromEnd = czm_planeDistance(v_endPlaneEC, eyeCoordinate.xyz);
|
| if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {
| #ifdef DEBUG_SHOW_VOLUME
| out_FragColor = vec4(logDepthOrDepth, 0.0, 0.0, 0.5);
| return;
| #else // DEBUG_SHOW_VOLUME
| discard;
| #endif // DEBUG_SHOW_VOLUME
| }
| out_FragColor = u_highlightColor;
|
| czm_writeDepthClamp();
| }
| `;function _p(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=g(e.ellipsoid,Z.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._minimumMaximumVectorHeights=new k(ai._defaultMinTerrainHeight,ai._defaultMaxTerrainHeight),this._boundingVolume=wn.fromRectangle(e.rectangle,ai._defaultMinTerrainHeight,ai._defaultMaxTerrainHeight,this._ellipsoid),this._classificationType=e.classificationType,this._keepDecodedPositions=e.keepDecodedPositions,this._decodedPositions=void 0,this._decodedPositionOffsets=void 0,this._startEllipsoidNormals=void 0,this._endEllipsoidNormals=void 0,this._startPositionAndHeights=void 0,this._startFaceNormalAndVertexCornerIds=void 0,this._endPositionAndHeights=void 0,this._endFaceNormalAndHalfWidths=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=z.clone(z.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(_p.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});function g9e(e,t,n){let i=ai.getMinimumMaximumHeights(t,n),o=i.minimumTerrainHeight,r=i.maximumTerrainHeight,s=e._minimumMaximumVectorHeights;s.x=o,s.y=r;let a=e._boundingVolume,l=e._rectangle;wn.fromRectangle(l,o,r,n,a)}function y9e(e){let t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,o=e._ellipsoid,r=e._center,s=2+te.packedLength+Z.packedLength+d.packedLength,a=new Float64Array(s),l=0;return a[l++]=n,a[l++]=i,te.pack(t,a,l),l+=te.packedLength,Z.pack(o,a,l),l+=Z.packedLength,d.pack(r,a,l),a}var b9e=new hi("createVectorTileClampedPolylines"),bg={startEllipsoidNormal:0,endEllipsoidNormal:1,startPositionAndHeight:2,endPositionAndHeight:3,startFaceNormalAndVertexCorner:4,endFaceNormalAndHalfWidth:5,a_batchId:6};function x9e(e,t){if(c(e._va))return;let n=e._positions,i=e._widths,o=e._counts,r=e._transferrableBatchIds,s=e._packedBuffer;c(s)||(n=e._positions=n.slice(),i=e._widths=i.slice(),o=e._counts=o.slice(),r=e._transferrableBatchIds=e._batchIds.slice(),s=e._packedBuffer=y9e(e));let a=[n.buffer,i.buffer,o.buffer,r.buffer,s.buffer],l={positions:n.buffer,widths:i.buffer,counts:o.buffer,batchIds:r.buffer,packedBuffer:s.buffer,keepDecodedPositions:e._keepDecodedPositions},u=b9e.scheduleTask(l,a);if(c(u))return u.then(function(f){if(e.isDestroyed())return;e._keepDecodedPositions&&(e._decodedPositions=new Float64Array(f.decodedPositions),e._decodedPositionOffsets=new Uint32Array(f.decodedPositionOffsets)),e._startEllipsoidNormals=new Float32Array(f.startEllipsoidNormals),e._endEllipsoidNormals=new Float32Array(f.endEllipsoidNormals),e._startPositionAndHeights=new Float32Array(f.startPositionAndHeights),e._startFaceNormalAndVertexCornerIds=new Float32Array(f.startFaceNormalAndVertexCornerIds),e._endPositionAndHeights=new Float32Array(f.endPositionAndHeights),e._endFaceNormalAndHalfWidths=new Float32Array(f.endFaceNormalAndHalfWidths),e._vertexBatchIds=new Uint16Array(f.vertexBatchIds);let h=f.indexDatatype;e._indices=h===Oe.UNSIGNED_SHORT?new Uint16Array(f.indices):new Uint32Array(f.indices),T9e(e,t),e._ready=!0}).catch(f=>{e.isDestroyed()||(e._error=f)})}function T9e(e,t){if(!c(e._va)){let n=e._startEllipsoidNormals,i=e._endEllipsoidNormals,o=e._startPositionAndHeights,r=e._endPositionAndHeights,s=e._startFaceNormalAndVertexCornerIds,a=e._endFaceNormalAndHalfWidths,l=e._vertexBatchIds,u=e._indices,f=n.byteLength+i.byteLength;f+=o.byteLength+r.byteLength,f+=s.byteLength+a.byteLength,f+=l.byteLength+u.byteLength,e._trianglesLength=u.length/3,e._geometryByteLength=f;let h=yt.createVertexBuffer({context:t,typedArray:n,usage:Pe.STATIC_DRAW}),m=yt.createVertexBuffer({context:t,typedArray:i,usage:Pe.STATIC_DRAW}),p=yt.createVertexBuffer({context:t,typedArray:o,usage:Pe.STATIC_DRAW}),_=yt.createVertexBuffer({context:t,typedArray:r,usage:Pe.STATIC_DRAW}),b=yt.createVertexBuffer({context:t,typedArray:s,usage:Pe.STATIC_DRAW}),x=yt.createVertexBuffer({context:t,typedArray:a,usage:Pe.STATIC_DRAW}),T=yt.createVertexBuffer({context:t,typedArray:l,usage:Pe.STATIC_DRAW}),E=yt.createIndexBuffer({context:t,typedArray:u,usage:Pe.STATIC_DRAW,indexDatatype:u.BYTES_PER_ELEMENT===2?Oe.UNSIGNED_SHORT:Oe.UNSIGNED_INT}),S=[{index:bg.startEllipsoidNormal,vertexBuffer:h,componentDatatype:j.FLOAT,componentsPerAttribute:3},{index:bg.endEllipsoidNormal,vertexBuffer:m,componentDatatype:j.FLOAT,componentsPerAttribute:3},{index:bg.startPositionAndHeight,vertexBuffer:p,componentDatatype:j.FLOAT,componentsPerAttribute:4},{index:bg.endPositionAndHeight,vertexBuffer:_,componentDatatype:j.FLOAT,componentsPerAttribute:4},{index:bg.startFaceNormalAndVertexCorner,vertexBuffer:b,componentDatatype:j.FLOAT,componentsPerAttribute:4},{index:bg.endFaceNormalAndHalfWidth,vertexBuffer:x,componentDatatype:j.FLOAT,componentsPerAttribute:4},{index:bg.a_batchId,vertexBuffer:T,componentDatatype:j.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new Zn({context:t,attributes:S,indexBuffer:E}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._startEllipsoidNormals=void 0,e._endEllipsoidNormals=void 0,e._startPositionAndHeights=void 0,e._startFaceNormalAndVertexCornerIds=void 0,e._endPositionAndHeights=void 0,e._endFaceNormalAndHalfWidths=void 0,e._vertexBatchIds=void 0,e._indices=void 0}}var sv=new N,nse=new d;function C9e(e,t){c(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){let n=t.uniformState.view;return N.clone(n,sv),N.multiplyByPoint(sv,e._center,nse),N.setTranslation(sv,nse,sv),sv},u_highlightColor:function(){return e._highlightColor},u_minimumMaximumVectorHeights:function(){return e._minimumMaximumVectorHeights}})}function ise(e){return Fe.fromCache({cull:{enabled:!0,face:pi.FRONT},blending:cn.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:Nn.EQUAL,frontOperation:{fail:ut.KEEP,zFail:ut.KEEP,zPass:ut.KEEP},backFunction:Nn.EQUAL,backOperation:{fail:ut.KEEP,zFail:ut.KEEP,zPass:ut.KEEP},reference:kt.CESIUM_3D_TILE_MASK,mask:kt.CESIUM_3D_TILE_MASK}})}function E9e(e){c(e._rs)||(e._rs=ise(!1),e._rs3DTiles=ise(!0))}function w9e(e,t){if(c(e._sp))return;let n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)(U2),o=n.getFragmentShaderCallback(!1,void 0,!0)(z2),r=new Be({defines:["VECTOR_TILE",sn.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[Fu,i]}),s=new Be({defines:["VECTOR_TILE"],sources:[o]});e._sp=en.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:bg})}function S9e(e,t){let n=e._command;if(!c(e._command)){let o=e._batchTable.getUniformMapCallback()(e._uniformMap);n=e._command=new Ke({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:o,boundingVolume:e._boundingVolume,pass:xe.TERRAIN_CLASSIFICATION,pickId:e._batchTable.getPickId()});let r=Ke.shallowClone(n,n.derivedCommands.tileset);r.renderState=e._rs3DTiles,r.pass=xe.CESIUM_3D_TILE_CLASSIFICATION,n.derivedCommands.tileset=r}let i=e._classificationType;(i===Ln.TERRAIN||i===Ln.BOTH)&&t.commandList.push(n),(i===Ln.CESIUM_3D_TILE||i===Ln.BOTH)&&t.commandList.push(n.derivedCommands.tileset)}_p.prototype.getPositions=function(e){return yC.getPolylinePositions(this,e)};_p.prototype.createFeatures=function(e,t){let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o];t[r]=new Jc(e,r)}};_p.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function A9e(e,t){let n=e._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],s=t[r];s.show=!0,s.color=z.WHITE}}var v9e=new z,D9e=z.WHITE,I9e=!0;_p.prototype.applyStyle=function(e,t){if(!c(e)){A9e(this,t);return}let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],s=t[r];s.color=c(e.color)?e.color.evaluateColor(s,v9e):D9e,s.show=c(e.show)?e.show.evaluate(s):I9e}};function O9e(e){return ai.initialize().then(function(){g9e(e,e._rectangle,e._ellipsoid)}).catch(t=>{e.isDestroyed()||(e._error=t)})}_p.prototype.update=function(e){let t=e.context;if(!this._ready){if(c(this._promise)||(this._promise=O9e(this).then(x9e(this,t))),c(this._error)){let i=this._error;throw this._error=void 0,i}return}C9e(this,t),w9e(this,t),E9e(this);let n=e.passes;(n.render||n.pick)&&S9e(this,e)};_p.prototype.isDestroyed=function(){return!1};_p.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),ue(this)};var V2=_p;var t9=32767,P9e=new re,R9e=new d;function M9e(e,t,n,i,o){let r=e.length/3,s=e.subarray(0,r),a=e.subarray(r,2*r),l=e.subarray(2*r,3*r);On.zigZagDeltaDecode(s,a,l);let u=new Float64Array(e.length);for(let f=0;f<r;++f){let h=s[f],m=a[f],p=l[f],_=O.lerp(t.west,t.east,h/t9),b=O.lerp(t.south,t.north,m/t9),x=O.lerp(n,i,p/t9),T=re.fromRadians(_,b,x,P9e),E=o.cartographicToCartesian(T,R9e);d.pack(E,u,f*3)}return u}var H2=M9e;function nd(e,t,n,i,o){this._tileset=e,this._tile=t,this._resource=n,this._polygons=void 0,this._polylines=void 0,this._points=void 0,this._metadata=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,this._group=void 0,this._ready=!1,k9e(this,i,o)}Object.defineProperties(nd.prototype,{featuresLength:{get:function(){return c(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return c(this._points)?this._points.pointsLength:0}},trianglesLength:{get:function(){let e=0;return c(this._polygons)&&(e+=this._polygons.trianglesLength),c(this._polylines)&&(e+=this._polylines.trianglesLength),e}},geometryByteLength:{get:function(){let e=0;return c(this._polygons)&&(e+=this._polygons.geometryByteLength),c(this._polylines)&&(e+=this._polylines.geometryByteLength),e}},texturesByteLength:{get:function(){return c(this._points)?this._points.texturesByteLength:0}},batchTableByteLength:{get:function(){return c(this._batchTable)?this._batchTable.batchTableByteLength:0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},batchTable:{get:function(){return this._batchTable}},group:{get:function(){return this._group},set:function(e){this._group=e}}});function L9e(e){return function(t,n){c(e._polygons)&&e._polygons.updateCommands(t,n)}}function N9e(e,t){let n,i,o,r,s=g(e.POLYGONS_LENGTH,0),a=g(e.POLYLINES_LENGTH,0),l=g(e.POINTS_LENGTH,0);if(s>0&&c(e.POLYGON_BATCH_IDS)){let m=t.byteOffset+e.POLYGON_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,m,s)}if(a>0&&c(e.POLYLINE_BATCH_IDS)){let m=t.byteOffset+e.POLYLINE_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,m,a)}if(l>0&&c(e.POINT_BATCH_IDS)){let m=t.byteOffset+e.POINT_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,m,l)}let u=c(n)||c(i)||c(o),f=s>0&&!c(n)||a>0&&!c(i)||l>0&&!c(o);if(u&&f)throw new ie("If one group of batch ids is defined, then all batch ids must be defined");if(!c(n)&&!c(i)&&!c(o)){let m=0;if(!c(n)&&s>0)for(n=new Uint16Array(s),r=0;r<s;++r)n[r]=m++;if(!c(i)&&a>0)for(i=new Uint16Array(a),r=0;r<a;++r)i[r]=m++;if(!c(o)&&l>0)for(o=new Uint16Array(l),r=0;r<l;++r)o[r]=m++}return{polygons:n,polylines:i,points:o}}var td=Uint32Array.BYTES_PER_ELEMENT;function F9e(e){return new yC(e)}function B9e(e){return new V2(e)}function k9e(e,t,n){n=g(n,0);let i=new Uint8Array(t),o=new DataView(t);n+=td;let r=o.getUint32(n,!0);if(r!==1)throw new ie(`Only Vector tile version 1 is supported. Version ${r} is not.`);n+=td;let s=o.getUint32(n,!0);if(n+=td,s===0){e._ready=!0;return}let a=o.getUint32(n,!0);if(n+=td,a===0)throw new ie("Feature table must have a byte length greater than zero");let l=o.getUint32(n,!0);n+=td;let u=o.getUint32(n,!0);n+=td;let f=o.getUint32(n,!0);n+=td;let h=o.getUint32(n,!0);n+=td;let m=o.getUint32(n,!0);n+=td;let p=o.getUint32(n,!0);n+=td;let _=o.getUint32(n,!0);n+=td;let b=Do(i,n,a);n+=a;let x=new Uint8Array(t,n,l);n+=l;let T,E;u>0&&(T=Do(i,n,u),n+=u,f>0&&(E=new Uint8Array(t,n,f),E=new Uint8Array(E),n+=f));let S=g(b.POLYGONS_LENGTH,0),A=g(b.POLYLINES_LENGTH,0),v=g(b.POINTS_LENGTH,0),D=S+A+v,R=new R_(e,D,T,E,L9e(e));if(e._batchTable=R,D===0)return;let P=new Sh(b,x),L=P.getGlobalProperty("REGION");if(!c(L))throw new ie("Feature table global property: REGION must be defined");let F=te.unpack(L),y=L[4],I=L[5],M=e._tile.computedTransform,B=P.getGlobalProperty("RTC_CENTER",j.FLOAT,3);c(B)?(B=d.unpack(B),N.multiplyByPoint(M,B,B)):(B=te.center(F),B.height=O.lerp(y,I,.5),B=Z.WGS84.cartographicToCartesian(B));let U=N9e(b,x);if(n+=(4-n%4)%4,S>0){P.featuresLength=S;let V=g(P.getPropertyArray("POLYGON_COUNTS",j.UNSIGNED_INT,1),P.getPropertyArray("POLYGON_COUNT",j.UNSIGNED_INT,1));if(!c(V))throw new ie("Feature table property: POLYGON_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");let W=g(P.getPropertyArray("POLYGON_INDEX_COUNTS",j.UNSIGNED_INT,1),P.getPropertyArray("POLYGON_INDEX_COUNT",j.UNSIGNED_INT,1));if(!c(W))throw new ie("Feature table property: POLYGON_INDEX_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");let H=V.reduce(function(ge,le){return ge+le*2},0),X=W.reduce(function(ge,le){return ge+le},0),$=new Uint32Array(t,n,X);n+=h;let ae=new Uint16Array(t,n,H);n+=m;let se,he;c(b.POLYGON_MINIMUM_HEIGHTS)&&c(b.POLYGON_MAXIMUM_HEIGHTS)&&(se=P.getPropertyArray("POLYGON_MINIMUM_HEIGHTS",j.FLOAT,1),he=P.getPropertyArray("POLYGON_MAXIMUM_HEIGHTS",j.FLOAT,1)),e._polygons=new B2({positions:ae,counts:V,indexCounts:W,indices:$,minimumHeight:y,maximumHeight:I,polygonMinimumHeights:se,polygonMaximumHeights:he,center:B,rectangle:F,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:R,batchIds:U.polygons,modelMatrix:M})}if(A>0){P.featuresLength=A;let V=g(P.getPropertyArray("POLYLINE_COUNTS",j.UNSIGNED_INT,1),P.getPropertyArray("POLYLINE_COUNT",j.UNSIGNED_INT,1));if(!c(V))throw new ie("Feature table property: POLYLINE_COUNTS must be defined when POLYLINES_LENGTH is greater than 0");let W=P.getPropertyArray("POLYLINE_WIDTHS",j.UNSIGNED_SHORT,1);if(!c(W)){W=new Uint16Array(A);for(let he=0;he<A;++he)W[he]=2}let H=V.reduce(function(he,ge){return he+ge*3},0),X=new Uint16Array(t,n,H);n+=p;let $=e._tileset,ae=$.examineVectorLinesFunction;if(c(ae)){let he=H2(new Uint16Array(X),F,y,I,Z.WGS84);U9e(he,V,U.polylines,R,e.url,ae)}let se=F9e;c($.classificationType)&&(se=B9e),e._polylines=se({positions:X,widths:W,counts:V,batchIds:U.polylines,minimumHeight:y,maximumHeight:I,center:B,rectangle:F,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:R,classificationType:$.classificationType,keepDecodedPositions:$.vectorKeepDecodedPositions})}if(v>0){let V=new Uint16Array(t,n,v*3);n+=_,e._points=new F2({positions:V,batchIds:U.points,minimumHeight:y,maximumHeight:I,rectangle:F,batchTable:R})}}function n9(e){let t=e.featuresLength;if(!c(e._features)&&t>0){let n=new Array(t);c(e._polygons)&&e._polygons.createFeatures(e,n),c(e._polylines)&&e._polylines.createFeatures(e,n),c(e._points)&&e._points.createFeatures(e,n),e._features=n}}nd.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)};nd.prototype.getFeature=function(e){let t=this.featuresLength;if(!c(e)||e<0||e>=t)throw new w(`batchId is required and between zero and featuresLength - 1 (${t-1}).`);return c(this._features)||n9(this),this._features[e]};nd.prototype.applyDebugSettings=function(e,t){c(this._polygons)&&this._polygons.applyDebugSettings(e,t),c(this._polylines)&&this._polylines.applyDebugSettings(e,t),c(this._points)&&this._points.applyDebugSettings(e,t)};nd.prototype.applyStyle=function(e){c(this._features)||n9(this),c(this._polygons)&&this._polygons.applyStyle(e,this._features),c(this._polylines)&&this._polylines.applyStyle(e,this._features),c(this._points)&&this._points.applyStyle(e,this._features)};nd.prototype.update=function(e,t){let n=!0;c(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(t),n=n&&this._polygons.ready),c(this._polylines)&&(this._polylines.update(t),n=n&&this._polylines.ready),c(this._points)&&(this._points.update(t),n=n&&this._points.ready),c(this._batchTable)&&n&&(c(this._features)||n9(this),this._batchTable.update(e,t),this._ready=!0)};nd.prototype.pick=function(e,t,n){};nd.prototype.getPolylinePositions=function(e){let t=this._polylines;if(c(t))return t.getPositions(e)};nd.prototype.isDestroyed=function(){return!1};nd.prototype.destroy=function(){return this._polygons=this._polygons&&this._polygons.destroy(),this._polylines=this._polylines&&this._polylines.destroy(),this._points=this._points&&this._points.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),ue(this)};function U9e(e,t,n,i,o,r){let s=t.length,a=0;for(let l=0;l<s;l++){let u=t[l]*3,f=e.slice(a,a+u);a+=u,r(f,n[l],o,i)}}var G2=nd;var ose={b3dm:function(e,t,n,i,o){return up.fromB3dm(e,t,n,i,o)},pnts:function(e,t,n,i,o){return up.fromPnts(e,t,n,i,o)},i3dm:function(e,t,n,i,o){return up.fromI3dm(e,t,n,i,o)},cmpt:function(e,t,n,i,o){return cL.fromTileType(e,t,n,i,o,ose)},externalTileset:function(e,t,n,i){return C2.fromJson(e,t,n,i)},geom:function(e,t,n,i,o){return new _L(e,t,n,i,o)},vctr:function(e,t,n,i,o){return new G2(e,t,n,i,o)},subt:function(e,t,n,i,o){return CA.fromSubtreeJson(e,t,n,void 0,i,o)},subtreeJson:function(e,t,n,i){return CA.fromSubtreeJson(e,t,n,i)},glb:function(e,t,n,i,o){if(i.byteLength<12)throw new ie("Invalid glb content");let a=new DataView(i,o).getUint32(8,!0),l=new Uint8Array(i,o,a);return up.fromGltf(e,t,n,l)},gltf:function(e,t,n,i){return up.fromGltf(e,t,n,i)},geoJson:function(e,t,n,i){return up.fromGeoJson(e,t,n,i)}},bC=ose;var z9e={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,EXPIRED:4,FAILED:5},zo=Object.freeze(z9e);var id={BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",COMPOSITE:"cmpt",POINT_CLOUD:"pnts",VECTOR:"vctr",GEOMETRY:"geom",GLTF:"gltf",GLTF_BINARY:"glb",IMPLICIT_SUBTREE:"subt",IMPLICIT_SUBTREE_JSON:"subtreeJson",EXTERNAL_TILESET:"externalTileset",MULTIPLE_CONTENT:"multipleContent",GEOJSON:"geoJson",VOXEL_BINARY:"voxl",VOXEL_JSON:"voxelJson"};id.isBinaryFormat=function(e){switch(e){case id.BATCHED_3D_MODEL:case id.INSTANCED_3D_MODEL:case id.COMPOSITE:case id.POINT_CLOUD:case id.VECTOR:case id.GEOMETRY:case id.IMPLICIT_SUBTREE:case id.VOXEL_BINARY:case id.GLTF_BINARY:return!0;default:return!1}};var Ss=Object.freeze(id);var V9e={NOT_COMPUTED:-1,USE_OPTIMIZATION:1,SKIP_OPTIMIZATION:0},od=Object.freeze(V9e);var As={RENDER:0,PICK:1,SHADOW:2,PRELOAD:3,PRELOAD_FLIGHT:4,REQUEST_RENDER_MODE_DEFER_CHECK:5,MOST_DETAILED_PRELOAD:6,MOST_DETAILED_PICK:7,NUMBER_OF_PASSES:8},gp=new Array(As.NUMBER_OF_PASSES);gp[As.RENDER]=Object.freeze({pass:As.RENDER,isRender:!0,requestTiles:!0,ignoreCommands:!1});gp[As.PICK]=Object.freeze({pass:As.PICK,isRender:!1,requestTiles:!1,ignoreCommands:!1});gp[As.SHADOW]=Object.freeze({pass:As.SHADOW,isRender:!1,requestTiles:!0,ignoreCommands:!1});gp[As.PRELOAD]=Object.freeze({pass:As.PRELOAD,isRender:!1,requestTiles:!0,ignoreCommands:!0});gp[As.PRELOAD_FLIGHT]=Object.freeze({pass:As.PRELOAD_FLIGHT,isRender:!1,requestTiles:!0,ignoreCommands:!0});gp[As.REQUEST_RENDER_MODE_DEFER_CHECK]=Object.freeze({pass:As.REQUEST_RENDER_MODE_DEFER_CHECK,isRender:!1,requestTiles:!0,ignoreCommands:!0});gp[As.MOST_DETAILED_PRELOAD]=Object.freeze({pass:As.MOST_DETAILED_PRELOAD,isRender:!1,requestTiles:!0,ignoreCommands:!0});gp[As.MOST_DETAILED_PICK]=Object.freeze({pass:As.MOST_DETAILED_PICK,isRender:!1,requestTiles:!1,ignoreCommands:!1});As.getPassOptions=function(e){return gp[e]};var dr=Object.freeze(As);function Mh(e,t){this._tileset=e,this._tile=t,this.featurePropertiesDirty=!1}Object.defineProperties(Mh.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},ready:{get:function(){return!0}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},metadata:{get:function(){},set:function(e){throw new w("Empty3DTileContent cannot have content metadata")}},batchTable:{get:function(){}},group:{get:function(){},set:function(e){throw new w("Empty3DTileContent cannot have group metadata")}}});Mh.prototype.hasProperty=function(e,t){return!1};Mh.prototype.getFeature=function(e){};Mh.prototype.applyDebugSettings=function(e,t){};Mh.prototype.applyStyle=function(e){};Mh.prototype.update=function(e,t){};Mh.prototype.pick=function(e,t,n){};Mh.prototype.isDestroyed=function(){return!1};Mh.prototype.destroy=function(){return ue(this)};var av=Mh;function yp(e){e=g(e,g.EMPTY_OBJECT);let t=e.content,n=e.class;C.typeOf.object("options.content",t),C.typeOf.object("options.class",n),this._class=n,this._properties=t.properties,this._extensions=t.extensions,this._extras=t.extras}Object.defineProperties(yp.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});yp.prototype.hasProperty=function(e){return Rn.hasProperty(e,this._properties,this._class)};yp.prototype.hasPropertyBySemantic=function(e){return Rn.hasPropertyBySemantic(e,this._properties,this._class)};yp.prototype.getPropertyIds=function(e){return Rn.getPropertyIds(this._properties,this._class,e)};yp.prototype.getProperty=function(e){return Rn.getProperty(e,this._properties,this._class)};yp.prototype.setProperty=function(e,t){return Rn.setProperty(e,t,this._properties,this._class)};yp.prototype.getPropertyBySemantic=function(e){return Rn.getPropertyBySemantic(e,this._properties,this._class)};yp.prototype.setPropertyBySemantic=function(e,t){return Rn.setPropertyBySemantic(e,t,this._properties,this._class)};var j2=yp;function i9(e,t){let n=ei(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!c(n))return;if(!c(e.schema)){i9._oneTimeWarning("findContentMetadata-missing-root-schema","Could not find a metadata schema for content metadata. For tilesets that contain external tilesets, make sure the schema is added to the root tileset.json.");return}let i=g(e.schema.classes,g.EMPTY_OBJECT);if(c(n.class)){let o=i[n.class];return new j2({content:n,class:o})}}i9._oneTimeWarning=mt;var xC=i9;function H9e(e,t){let n=e.metadataExtension;if(!c(n))return;let i=n.groups,o=ei(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"].group:t.group;if(typeof o=="number")return i[o];let r=n.groupIds.findIndex(function(s){return s===o});return r>=0?i[r]:void 0}var TC=H9e;function bp(e){e=g(e,g.EMPTY_OBJECT);let t=e.tile,n=e.class;C.typeOf.object("options.tile",t),C.typeOf.object("options.class",n),this._class=n,this._properties=t.properties,this._extensions=t.extensions,this._extras=t.extras}Object.defineProperties(bp.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});bp.prototype.hasProperty=function(e){return Rn.hasProperty(e,this._properties,this._class)};bp.prototype.hasPropertyBySemantic=function(e){return Rn.hasPropertyBySemantic(e,this._properties,this._class)};bp.prototype.getPropertyIds=function(e){return Rn.getPropertyIds(this._properties,this._class,e)};bp.prototype.getProperty=function(e){return Rn.getProperty(e,this._properties,this._class)};bp.prototype.setProperty=function(e,t){return Rn.setProperty(e,t,this._properties,this._class)};bp.prototype.getPropertyBySemantic=function(e){return Rn.getPropertyBySemantic(e,this._properties,this._class)};bp.prototype.setPropertyBySemantic=function(e,t){return Rn.setPropertyBySemantic(e,t,this._properties,this._class)};var W2=bp;function o9(e,t){let n=ei(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!c(n))return;if(!c(e.schema)){o9._oneTimeWarning("findTileMetadata-missing-root-schema","Could not find a metadata schema for tile metadata. For tilesets that contain external tilesets, make sure the schema is added to the root tileset.json.");return}let i=g(e.schema.classes,g.EMPTY_OBJECT);if(c(n.class)){let o=i[n.class];return new W2({tile:n,class:o})}}o9._oneTimeWarning=mt;var q2=o9;function G9e(e){let t=new Uint8Array(e),n=_h(t);if(n==="glTF"&&(n="glb"),Ss.isBinaryFormat(n))return{contentType:n,binaryPayload:t};let i=j9e(t);if(c(i.root))return{contentType:Ss.EXTERNAL_TILESET,jsonPayload:i};if(c(i.asset))return{contentType:Ss.GLTF,jsonPayload:i};if(c(i.tileAvailability))return{contentType:Ss.IMPLICIT_SUBTREE_JSON,jsonPayload:i};if(c(i.type))return{contentType:Ss.GEOJSON,jsonPayload:i};if(c(i.voxelTable))return{contentType:Ss.VOXEL_JSON,jsonPayload:i};throw new ie("Invalid tile content.")}function j9e(e){let t;try{t=Do(e)}catch{throw new ie("Invalid tile content.")}return t}var xp=G9e;function nf(e,t,n,i){this._tileset=e,this._tile=t,this._tilesetResource=n,this._contents=[],this._contentsCreated=!1;let o=c(i.contents)?i.contents:i.content;this._innerContentHeaders=o,this._requestsInFlight=0,this._cancelCount=0;let r=this._innerContentHeaders.length;this._arrayFetchPromises=new Array(r),this._requests=new Array(r),this._ready=!1,this._innerContentResources=new Array(r),this._serverKeys=new Array(r);for(let s=0;s<r;s++){let a=n.getDerivedResource({url:o[s].uri}),l=tc.getServerKey(a.getUrlComponent());this._innerContentResources[s]=a,this._serverKeys[s]=l}}Object.defineProperties(nf.prototype,{featurePropertiesDirty:{get:function(){let e=this._contents,t=e.length;for(let n=0;n<t;++n)if(e[n].featurePropertiesDirty)return!0;return!1},set:function(e){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].featurePropertiesDirty=e}},featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){return this._contents}},ready:{get:function(){return this._contentsCreated?this._ready:!1}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},metadata:{get:function(){},set:function(){throw new w("Multiple3DTileContent cannot have metadata")}},batchTable:{get:function(){}},group:{get:function(){},set:function(){throw new w("Multiple3DTileContent cannot have group metadata")}},innerContentUrls:{get:function(){return this._innerContentHeaders.map(function(e){return e.uri})}}});function r9(e,t){e._requestsInFlight+=t,e.tileset.statistics.numberOfPendingRequests+=t}function rse(e,t){e._cancelCount++,e._tile._contentState=t;let n=e.tileset.statistics;n.numberOfPendingRequests-=e._requestsInFlight,n.numberOfAttemptedRequests+=e._requestsInFlight,e._requestsInFlight=0;let i=e._innerContentHeaders.length;e._arrayFetchPromises=new Array(i)}nf.prototype.requestInnerContents=function(){if(!W9e(this._serverKeys)){this.tileset.statistics.numberOfAttemptedRequests+=this._serverKeys.length;return}let e=this._innerContentHeaders;r9(this,e.length);let t=this._cancelCount;for(let n=0;n<e.length;n++)this._arrayFetchPromises[n]=q9e(this,n,t,this._tile._contentState);return Y9e(this)};function W9e(e){let t={};for(let n=0;n<e.length;n++){let i=e[n];c(t[i])?t[i]++:t[i]=1}for(let n in t)if(t.hasOwnProperty(n)&&!tc.serverHasOpenSlots(n,t[n]))return!1;return tc.heapHasOpenSlots(e.length)}function q9e(e,t,n,i){let o=e._innerContentResources[t].clone(),r=e.tile,s=function(){return r._priority},a=e._serverKeys[t],l=new Ko({throttle:!0,throttleByServer:!0,type:is.TILES3D,priorityFunction:s,serverKey:a});o.request=l,e._requests[t]=l;let u=o.fetchArrayBuffer();if(c(u))return u.then(function(f){if(!(n<e._cancelCount)){if(o.request.cancelled||o.request.state===qn.CANCELLED){rse(e,i);return}return r9(e,-1),f}}).catch(function(f){if(!(n<e._cancelCount)){if(o.request.cancelled||o.request.state===qn.CANCELLED){rse(e,i);return}r9(e,-1),sse(e,t,f)}})}async function Y9e(e){let t=e._cancelCount,n=await Promise.all(e._arrayFetchPromises);if(t<e._cancelCount)return;let i=n.map((r,s)=>X9e(e,r,s)),o=await Promise.all(i);return e._contentsCreated=!0,e._contents=o.filter(c),o}async function X9e(e,t,n){if(c(t))try{let i=xp(t);if(i.contentType===Ss.EXTERNAL_TILESET)throw new ie("External tilesets are disallowed inside multiple contents");e._disableSkipLevelOfDetail=e._disableSkipLevelOfDetail||i.contentType===Ss.GEOMETRY||i.contentType===Ss.VECTOR;let o=e._tileset,r=e._innerContentResources[n],s=e._tile,a,l=bC[i.contentType];c(i.binaryPayload)?a=await Promise.resolve(l(o,s,r,i.binaryPayload.buffer,0)):a=await Promise.resolve(l(o,s,r,i.jsonPayload));let u=e._innerContentHeaders[n];if(s.hasImplicitContentMetadata){let h=s.implicitSubtree,m=s.implicitCoordinates;a.metadata=h.getContentMetadataView(m,n)}else s.hasImplicitContent||(a.metadata=xC(o,u));let f=TC(o,u);return c(f)&&(a.group=new ST({metadata:f})),a}catch(i){sse(e,n,i)}}function sse(e,t,n){let i=e._tileset,o=e._innerContentResources[t].url,r=c(n.message)?n.message:n.toString();i.tileFailed.numberOfListeners>0?i.tileFailed.raiseEvent({url:o,message:r}):(console.log(`A content failed to load: ${o}`),console.log(`Error: ${r}`))}nf.prototype.cancelRequests=function(){for(let e=0;e<this._requests.length;e++){let t=this._requests[e];c(t)&&t.cancel()}};nf.prototype.hasProperty=function(e,t){return!1};nf.prototype.getFeature=function(e){};nf.prototype.applyDebugSettings=function(e,t){let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].applyDebugSettings(e,t)};nf.prototype.applyStyle=function(e){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].applyStyle(e)};nf.prototype.update=function(e,t){let n=this._contents,i=n.length,o=!0;for(let r=0;r<i;++r)n[r].update(e,t),o=o&&n[r].ready;!this._ready&&o&&(this._ready=!0)};nf.prototype.pick=function(e,t,n){if(!this._ready)return;let i,o=Number.POSITIVE_INFINITY,r=this._contents,s=r.length;for(let a=0;a<s;++a){let l=r[a].pick(e,t,n);if(!c(l))continue;let u=d.distance(e.origin,l);u<o&&(i=l,o=u)}if(c(i))return n};nf.prototype.isDestroyed=function(){return!1};nf.prototype.destroy=function(){let e=this._contents,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return ue(this)};var Y2=nf;var ase=Math.cos,cse=Math.sin,K9e=Math.sqrt,s9={};s9.computePosition=function(e,t,n,i,o,r,s){let a=t.radiiSquared,l=e.nwCorner,u=e.boundingRectangle,f=l.latitude-e.granYCos*i+o*e.granXSin,h=ase(f),m=cse(f),p=a.z*m,_=l.longitude+i*e.granYSin+o*e.granXCos,b=h*ase(_),x=h*cse(_),T=a.x*b,E=a.y*x,S=K9e(T*b+E*x+p*m);if(r.x=T/S,r.y=E/S,r.z=p/S,n){let A=e.stNwCorner;c(A)?(f=A.latitude-e.stGranYCos*i+o*e.stGranXSin,_=A.longitude+i*e.stGranYSin+o*e.stGranXCos,s.x=(_-e.stWest)*e.lonScalar,s.y=(f-e.stSouth)*e.latScalar):(s.x=(_-u.west)*e.lonScalar,s.y=(f-u.south)*e.latScalar)}};var $9e=new Li,of=new d,Z9e=new re,X2=new d,cv=new Ei;function lse(e,t,n,i,o,r,s){let a=Math.cos(t),l=i*a,u=n*a,f=Math.sin(t),h=i*f,m=n*f;cv._ellipsoid=Z.default,of=cv.project(e,of),of=d.subtract(of,X2,of);let p=Li.fromRotation(t,$9e);of=Li.multiplyByVector(p,of,of),of=d.add(of,X2,of),e=cv.unproject(of,e),r-=1,s-=1;let _=e.latitude,b=_+r*m,x=_-l*s,T=_-l*s+r*m,E=Math.max(_,b,x,T),S=Math.min(_,b,x,T),A=e.longitude,v=A+r*u,D=A+s*h,R=A+s*h+r*u,P=Math.max(A,v,D,R),L=Math.min(A,v,D,R);return{north:E,south:S,east:P,west:L,granYCos:l,granYSin:h,granXCos:u,granXSin:m,nwCorner:e}}s9.computeOptions=function(e,t,n,i,o,r,s){let a=e.east,l=e.west,u=e.north,f=e.south,h=!1,m=!1;u===O.PI_OVER_TWO&&(h=!0),f===-O.PI_OVER_TWO&&(m=!0);let p,_=u-f;l>a?p=O.TWO_PI-l+a:p=a-l;let b=Math.ceil(p/t)+1,x=Math.ceil(_/t)+1,T=p/(b-1),E=_/(x-1),S=te.northwest(e,r),A=te.center(e,Z9e);(n!==0||i!==0)&&(A.longitude<S.longitude&&(A.longitude+=O.TWO_PI),cv._ellipsoid=Z.default,X2=cv.project(A,X2));let v=E,D=T,R=0,P=0,L=te.clone(e,o),F={granYCos:v,granYSin:R,granXCos:D,granXSin:P,nwCorner:S,boundingRectangle:L,width:b,height:x,northCap:h,southCap:m};if(n!==0){let y=lse(S,n,T,E,A,b,x);if(u=y.north,f=y.south,a=y.east,l=y.west,u<-O.PI_OVER_TWO||u>O.PI_OVER_TWO||f<-O.PI_OVER_TWO||f>O.PI_OVER_TWO)throw new w("Rotated rectangle is invalid. It crosses over either the north or south pole.");F.granYCos=y.granYCos,F.granYSin=y.granYSin,F.granXCos=y.granXCos,F.granXSin=y.granXSin,L.north=u,L.south=f,L.east=a,L.west=l}if(i!==0){n=n-i;let y=te.northwest(L,s),I=lse(y,n,T,E,A,b,x);F.stGranYCos=I.granYCos,F.stGranXCos=I.granXCos,F.stGranYSin=I.granYSin,F.stGranXSin=I.granXSin,F.stNwCorner=y,F.stWest=I.west,F.stSouth=I.south}return F};var vs=s9;var J9e=new ne,Q9e=new ne,eWe=new d,tWe=new te;function use(e,t){let n=e._ellipsoid,i=t.height,o=t.width,r=t.northCap,s=t.southCap,a=i,l=2,u=0,f=4;r&&(l-=1,a-=1,u+=1,f-=2),s&&(l-=1,a-=1,u+=1,f-=2),u+=l*o+2*a-f;let h=new Float64Array(u*3),m=0,p=0,_,b=eWe;if(r)vs.computePosition(t,n,!1,p,0,b),h[m++]=b.x,h[m++]=b.y,h[m++]=b.z;else for(_=0;_<o;_++)vs.computePosition(t,n,!1,p,_,b),h[m++]=b.x,h[m++]=b.y,h[m++]=b.z;for(_=o-1,p=1;p<i;p++)vs.computePosition(t,n,!1,p,_,b),h[m++]=b.x,h[m++]=b.y,h[m++]=b.z;if(p=i-1,!s)for(_=o-2;_>=0;_--)vs.computePosition(t,n,!1,p,_,b),h[m++]=b.x,h[m++]=b.y,h[m++]=b.z;for(_=0,p=i-2;p>0;p--)vs.computePosition(t,n,!1,p,_,b),h[m++]=b.x,h[m++]=b.y,h[m++]=b.z;let x=h.length/3*2,T=Oe.createTypedArray(h.length/3,x),E=0;for(let A=0;A<h.length/3-1;A++)T[E++]=A,T[E++]=A+1;T[E++]=h.length/3-1,T[E++]=0;let S=new st({attributes:new fn,primitiveType:Se.LINES});return S.attributes.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:h}),S.indices=T,S}function nWe(e,t){let n=e._surfaceHeight,i=e._extrudedHeight,o=e._ellipsoid,r=use(e,t),s=t.height,a=t.width,l=ti.scaleToGeodeticHeight(r.attributes.position.values,n,o,!1),u=l.length,f=new Float64Array(u*2);f.set(l);let h=ti.scaleToGeodeticHeight(r.attributes.position.values,i,o);f.set(h,u),r.attributes.position.values=f;let m=t.northCap,p=t.southCap,_=4;m&&(_-=1),p&&(_-=1);let b=(f.length/3+_)*2,x=Oe.createTypedArray(f.length/3,b);u=f.length/6;let T=0;for(let S=0;S<u-1;S++)x[T++]=S,x[T++]=S+1,x[T++]=S+u,x[T++]=S+u+1;x[T++]=u-1,x[T++]=0,x[T++]=u+u-1,x[T++]=u,x[T++]=0,x[T++]=u;let E;if(m)E=s-1;else{let S=a-1;x[T++]=S,x[T++]=S+u,E=a+s-2}if(x[T++]=E,x[T++]=E+u,!p){let S=a+E-1;x[T++]=S,x[T]=S+u}return r.indices=x,r}function EC(e){e=g(e,g.EMPTY_OBJECT);let t=e.rectangle,n=g(e.granularity,O.RADIANS_PER_DEGREE),i=g(e.ellipsoid,Z.default),o=g(e.rotation,0);if(!c(t))throw new w("rectangle is required.");if(te._validate(t),t.north<t.south)throw new w("options.rectangle.north must be greater than options.rectangle.south");let r=g(e.height,0),s=g(e.extrudedHeight,r);this._rectangle=te.clone(t),this._granularity=n,this._ellipsoid=i,this._surfaceHeight=Math.max(r,s),this._rotation=o,this._extrudedHeight=Math.min(r,s),this._offsetAttribute=e.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}EC.packedLength=te.packedLength+Z.packedLength+5;EC.pack=function(e,t,n){if(!c(e))throw new w("value is required");if(!c(t))throw new w("array is required");return n=g(n,0),te.pack(e._rectangle,t,n),n+=te.packedLength,Z.pack(e._ellipsoid,t,n),n+=Z.packedLength,t[n++]=e._granularity,t[n++]=e._surfaceHeight,t[n++]=e._rotation,t[n++]=e._extrudedHeight,t[n]=g(e._offsetAttribute,-1),t};var fse=new te,dse=Z.clone(Z.UNIT_SPHERE),CC={rectangle:fse,ellipsoid:dse,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};EC.unpack=function(e,t,n){if(!c(e))throw new w("array is required");t=g(t,0);let i=te.unpack(e,t,fse);t+=te.packedLength;let o=Z.unpack(e,t,dse);t+=Z.packedLength;let r=e[t++],s=e[t++],a=e[t++],l=e[t++],u=e[t];return c(n)?(n._rectangle=te.clone(i,n._rectangle),n._ellipsoid=Z.clone(o,n._ellipsoid),n._surfaceHeight=s,n._rotation=a,n._extrudedHeight=l,n._offsetAttribute=u===-1?void 0:u,n):(CC.granularity=r,CC.height=s,CC.rotation=a,CC.extrudedHeight=l,CC.offsetAttribute=u===-1?void 0:u,new EC(CC))};var iWe=new re;EC.createGeometry=function(e){let t=e._rectangle,n=e._ellipsoid,i=vs.computeOptions(t,e._granularity,e._rotation,0,tWe,iWe),o,r;if(O.equalsEpsilon(t.north,t.south,O.EPSILON10)||O.equalsEpsilon(t.east,t.west,O.EPSILON10))return;let s=e._surfaceHeight,a=e._extrudedHeight,l=!O.equalsEpsilon(s,a,0,O.EPSILON2),u;if(l){if(o=nWe(e,i),c(e._offsetAttribute)){let m=o.attributes.position.values.length/3,p=new Uint8Array(m);e._offsetAttribute===Zt.TOP?p=p.fill(1,0,m/2):(u=e._offsetAttribute===Zt.NONE?0:1,p=p.fill(u)),o.attributes.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:p})}let f=ne.fromRectangle3D(t,n,s,Q9e),h=ne.fromRectangle3D(t,n,a,J9e);r=ne.union(f,h)}else{if(o=use(e,i),o.attributes.position.values=ti.scaleToGeodeticHeight(o.attributes.position.values,s,n,!1),c(e._offsetAttribute)){let f=o.attributes.position.values.length;u=e._offsetAttribute===Zt.NONE?0:1;let h=new Uint8Array(f/3).fill(u);o.attributes.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}r=ne.fromRectangle3D(t,n,s)}return new st({attributes:o.attributes,indices:o.indices,primitiveType:Se.LINES,boundingSphere:r,offsetAttribute:e._offsetAttribute})};var wC=EC;function AC(e){C.typeOf.object("options",e),C.typeOf.object("options.rectangle",e.rectangle),this.rectangle=te.clone(e.rectangle),this.minimumHeight=g(e.minimumHeight,0),this.maximumHeight=g(e.maximumHeight,0),this.southwestCornerCartesian=new d,this.northeastCornerCartesian=new d,this.westNormal=new d,this.southNormal=new d,this.eastNormal=new d,this.northNormal=new d;let t=g(e.ellipsoid,Z.WGS84);cWe(this,e.rectangle,t),this._orientedBoundingBox=void 0,this._boundingSphere=void 0,g(e.computeBoundingVolumes,!0)&&this.computeBoundingVolumes(t)}Object.defineProperties(AC.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});AC.prototype.computeBoundingVolumes=function(e){this._orientedBoundingBox=wn.fromRectangle(this.rectangle,this.minimumHeight,this.maximumHeight,e),this._boundingSphere=ne.fromOrientedBoundingBox(this._orientedBoundingBox)};var hse=new d,K2=new d,mse=new d,oWe=new d,rWe=new d,sWe=new d,aWe=new d,rf=new re,pse=new on(d.UNIT_X,0),SC=new mn;function cWe(e,t,n){n.cartographicToCartesian(te.southwest(t),e.southwestCornerCartesian),n.cartographicToCartesian(te.northeast(t),e.northeastCornerCartesian),rf.longitude=t.west,rf.latitude=(t.south+t.north)*.5,rf.height=0;let i=n.cartographicToCartesian(rf,sWe),o=d.cross(i,d.UNIT_Z,oWe);d.normalize(o,e.westNormal),rf.longitude=t.east;let r=n.cartographicToCartesian(rf,aWe),s=d.cross(d.UNIT_Z,r,hse);d.normalize(s,e.eastNormal);let a=d.subtract(i,r,hse);d.magnitude(a)===0&&(a=d.clone(o,a));let l=d.normalize(a,rWe),u=t.south,f;if(u>0){rf.longitude=(t.west+t.east)*.5,rf.latitude=u;let b=n.cartographicToCartesian(rf,SC.origin);d.clone(l,SC.direction);let x=on.fromPointNormal(e.southwestCornerCartesian,e.westNormal,pse);Yn.rayPlane(SC,x,e.southwestCornerCartesian),f=n.geodeticSurfaceNormal(b,K2)}else f=n.geodeticSurfaceNormalCartographic(te.southeast(t),K2);let h=d.cross(f,a,mse);d.normalize(h,e.southNormal);let m=t.north,p;if(m<0){rf.longitude=(t.west+t.east)*.5,rf.latitude=m;let b=n.cartographicToCartesian(rf,SC.origin);d.negate(l,SC.direction);let x=on.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,pse);Yn.rayPlane(SC,x,e.northeastCornerCartesian),p=n.geodeticSurfaceNormal(b,K2)}else p=n.geodeticSurfaceNormalCartographic(te.northwest(t),K2);let _=d.cross(a,p,mse);d.normalize(_,e.northNormal)}var lWe=new d,uWe=new d,fWe=new d(0,-1,0),dWe=new d(0,0,-1),_se=new d;function hWe(e,t){let n=t.camera,i=n.positionWC,o=n.positionCartographic,r=0;if(!te.contains(e.rectangle,o)){let u=e.southwestCornerCartesian,f=e.northeastCornerCartesian,h=e.westNormal,m=e.southNormal,p=e.eastNormal,_=e.northNormal;t.mode!==J.SCENE3D&&(u=t.mapProjection.project(te.southwest(e.rectangle),lWe),u.z=u.y,u.y=u.x,u.x=0,f=t.mapProjection.project(te.northeast(e.rectangle),uWe),f.z=f.y,f.y=f.x,f.x=0,h=fWe,p=d.UNIT_Y,m=dWe,_=d.UNIT_Z);let b=d.subtract(i,u,_se),x=d.dot(b,h),T=d.dot(b,m),E=d.subtract(i,f,_se),S=d.dot(E,p),A=d.dot(E,_);x>0?r+=x*x:S>0&&(r+=S*S),T>0?r+=T*T:A>0&&(r+=A*A)}let s,a,l;if(t.mode===J.SCENE3D?(s=o.height,a=e.minimumHeight,l=e.maximumHeight):(s=i.x,a=0,l=0),s>l){let u=s-l;r+=u*u}else if(s<a){let u=a-s;r+=u*u}return Math.sqrt(r)}AC.prototype.distanceToCamera=function(e){C.defined("frameState",e);let t=hWe(this,e);if(e.mode===J.SCENE3D&&c(this._orientedBoundingBox)){let n=Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC));return Math.max(t,n)}return t};AC.prototype.intersectPlane=function(e){return C.defined("plane",e),this._orientedBoundingBox.intersectPlane(e)};AC.prototype.createDebugVolume=function(e){C.defined("color",e);let t=new N.clone(N.IDENTITY),n=new wC({rectangle:this.rectangle,height:this.minimumHeight,extrudedHeight:this.maximumHeight}),i=new wt({geometry:n,id:"outline",modelMatrix:t,attributes:{color:Ht.fromColor(e)}});return new An({geometryInstances:i,appearance:new nn({translucent:!1,flat:!0}),asynchronous:!1})};var rd=AC;var lv={},mWe=new d,gse=new d,yse=new d,bse=new d,xse=new wn;lv.validOutline=function(e){C.defined("positions",e);let n=wn.fromPoints(e,xse).halfAxes,i=q.getColumn(n,0,gse),o=q.getColumn(n,1,yse),r=q.getColumn(n,2,bse),s=d.magnitude(i),a=d.magnitude(o),l=d.magnitude(r);return!(s===0&&(a===0||l===0)||a===0&&l===0)};lv.computeProjectTo2DArguments=function(e,t,n,i){C.defined("positions",e),C.defined("centerResult",t),C.defined("planeAxis1Result",n),C.defined("planeAxis2Result",i);let o=wn.fromPoints(e,xse),r=o.halfAxes,s=q.getColumn(r,0,gse),a=q.getColumn(r,1,yse),l=q.getColumn(r,2,bse),u=d.magnitude(s),f=d.magnitude(a),h=d.magnitude(l),m=Math.min(u,f,h);if(u===0&&(f===0||h===0)||f===0&&h===0)return!1;let p,_;return(m===f||m===h)&&(p=s),m===u?p=a:m===h&&(_=a),(m===u||m===f)&&(_=l),d.normalize(p,n),d.normalize(_,i),d.clone(o.center,t),!0};function Tse(e,t,n,i,o){let r=d.subtract(e,t,mWe),s=d.dot(n,r),a=d.dot(i,r);return k.fromElements(s,a,o)}lv.createProjectPointsTo2DFunction=function(e,t,n){return function(i){let o=new Array(i.length);for(let r=0;r<i.length;r++)o[r]=Tse(i[r],e,t,n);return o}};lv.createProjectPointTo2DFunction=function(e,t,n){return function(i,o){return Tse(i,e,t,n,o)}};var xg=lv;function pWe(e){let t=e.length,n=new Float64Array(t*3),i=Oe.createTypedArray(t,t*2),o=0,r=0;for(let a=0;a<t;a++){let l=e[a];n[o++]=l.x,n[o++]=l.y,n[o++]=l.z,i[r++]=a,i[r++]=(a+1)%t}let s=new fn({position:new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:n})});return new st({attributes:s,indices:i,primitiveType:Se.LINES})}function Xb(e){e=g(e,g.EMPTY_OBJECT);let t=e.polygonHierarchy;C.defined("options.polygonHierarchy",t),this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=Fn.computeHierarchyPackedLength(t,d)+1}Xb.fromPositions=function(e){e=g(e,g.EMPTY_OBJECT),C.defined("options.positions",e.positions);let t={polygonHierarchy:{positions:e.positions}};return new Xb(t)};Xb.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),n=Fn.packPolygonHierarchy(e._polygonHierarchy,t,n,d),t[n]=e.packedLength,t};var _We={polygonHierarchy:{}};Xb.unpack=function(e,t,n){C.defined("array",e),t=g(t,0);let i=Fn.unpackPolygonHierarchy(e,t,d);t=i.startingIndex,delete i.startingIndex;let o=e[t];return c(n)||(n=new Xb(_We)),n._polygonHierarchy=i,n.packedLength=o,n};Xb.createGeometry=function(e){let t=e._polygonHierarchy,n=t.positions;if(n=po(n,d.equalsEpsilon,!0),n.length<3||!xg.validOutline(n))return;let o=Fn.polygonOutlinesFromHierarchy(t,!1);if(o.length===0)return;let r=[];for(let l=0;l<o.length;l++){let u=new wt({geometry:pWe(o[l])});r.push(u)}let s=Pn.combineInstances(r)[0],a=ne.fromPoints(t.positions);return new st({attributes:s.attributes,indices:s.indices,primitiveType:s.primitiveType,boundingSphere:a})};var sd=Xb;var $2=new re;function uv(e){C.typeOf.object("options",e),C.typeOf.string("options.token",e.token);let t=z_.fromToken(e.token),n=g(e.minimumHeight,0),i=g(e.maximumHeight,0),o=g(e.ellipsoid,Z.WGS84);this.s2Cell=t,this.minimumHeight=n,this.maximumHeight=i,this.ellipsoid=o;let r=SWe(t,n,i,o);this._boundingPlanes=r;let s=IWe(r);this._vertices=s,this._edgeNormals=new Array(6),this._edgeNormals[0]=m9(r[0],s.slice(0,4));let a;for(a=0;a<4;a++)this._edgeNormals[0][a]=d.negate(this._edgeNormals[0][a],this._edgeNormals[0][a]);for(this._edgeNormals[1]=m9(r[1],s.slice(4,8)),a=0;a<4;a++)this._edgeNormals[2+a]=m9(r[2+a],[s[a%4],s[(a+1)%4],s[4+(a+1)%4],s[4+a]]);for(this._planeVertices=[this._vertices.slice(0,4),this._vertices.slice(4,8)],a=0;a<4;a++)this._planeVertices.push([this._vertices[a%4],this._vertices[(a+1)%4],this._vertices[4+(a+1)%4],this._vertices[4+a]]);let l=t.getCenter();$2=o.cartesianToCartographic(l,$2),$2.height=(i+n)/2,this.center=o.cartographicToCartesian($2,l),this._boundingSphere=ne.fromPoints(s)}var gWe=new d,yWe=new re,bWe=new d,xWe=new re,TWe=new d,CWe=new d,EWe=new d,wWe=new d;function SWe(e,t,n,i){let o=new Array(6),r=e.getCenter(),s=i.geodeticSurfaceNormal(r,gWe),a=i.cartesianToCartographic(r,yWe);a.height=n;let l=i.cartographicToCartesian(a,bWe),u=on.fromPointNormal(l,s);o[0]=u;let f=0,h,m=[],p,_;for(h=0;h<4;h++){p=e.getVertex(h),m[h]=p,_=i.cartesianToCartographic(p,xWe),_.height=t;let x=on.getPointDistance(u,i.cartographicToCartesian(_,TWe));x<f&&(f=x)}let b=on.clone(u);for(b.normal=d.negate(b.normal,b.normal),b.distance=b.distance*-1+f,o[1]=b,h=0;h<4;h++){p=m[h];let x=m[(h+1)%4],T=i.geodeticSurfaceNormal(p,CWe),E=d.subtract(x,p,wWe),S=d.cross(E,T,EWe);S=d.normalize(S,S),o[2+h]=on.fromPointNormal(p,S)}return o}var Kb=new d,$b=new d,Zb=new d,a9=new d,c9=new d,l9=new d,AWe=new d,vWe=new d,DWe=new d,u9=new d,f9=new d,d9=new d,Tg=new d,Lh=new q;function Cse(e,t,n){Kb=e.normal,$b=t.normal,Zb=n.normal,a9=d.multiplyByScalar(e.normal,-e.distance,a9),c9=d.multiplyByScalar(t.normal,-t.distance,c9),l9=d.multiplyByScalar(n.normal,-n.distance,l9),u9=d.multiplyByScalar(d.cross($b,Zb,AWe),d.dot(a9,Kb),u9),f9=d.multiplyByScalar(d.cross(Zb,Kb,vWe),d.dot(c9,$b),f9),d9=d.multiplyByScalar(d.cross(Kb,$b,DWe),d.dot(l9,Zb),d9),Lh[0]=Kb.x,Lh[1]=$b.x,Lh[2]=Zb.x,Lh[3]=Kb.y,Lh[4]=$b.y,Lh[5]=Zb.y,Lh[6]=Kb.z,Lh[7]=$b.z,Lh[8]=Zb.z;let i=q.determinant(Lh);return Tg=d.add(u9,f9,Tg),Tg=d.add(Tg,d9,Tg),new d(Tg.x/i,Tg.y/i,Tg.z/i)}function IWe(e){let t=new Array(8);for(let n=0;n<4;n++)t[n]=Cse(e[0],e[2+(n+3)%4],e[2+n%4]),t[n+4]=Cse(e[1],e[2+(n+3)%4],e[2+n%4]);return t}var h9=new d,vC=new d;function m9(e,t){let n=[];for(let i=0;i<4;i++)h9=d.subtract(t[(i+1)%4],t[i],h9),vC=d.cross(e.normal,h9,vC),vC=d.normalize(vC,vC),n[i]=d.clone(vC);return n}Object.defineProperties(uv.prototype,{boundingVolume:{get:function(){return this}},boundingSphere:{get:function(){return this._boundingSphere}}});var p9=new d;uv.prototype.distanceToCamera=function(e){C.defined("frameState",e);let t=e.camera.positionWC,n=[],i=[],o;on.getPointDistance(this._boundingPlanes[0],t)>0?(n.push(0),i.push(this._planeVertices[0]),o=this._edgeNormals[0]):on.getPointDistance(this._boundingPlanes[1],t)>0&&(n.push(1),i.push(this._planeVertices[1]),o=this._edgeNormals[1]);let r,s;for(r=0;r<4;r++)s=2+r,on.getPointDistance(this._boundingPlanes[s],t)>0&&(n.push(s),i.push(this._planeVertices[s]),o=this._edgeNormals[s]);if(n.length===0)return 0;let a,l;if(n.length===1)return l=this._boundingPlanes[n[0]],a=_9(on.projectPointOntoPlane(l,t,p9),i[0],l,o),d.distance(a,t);if(n.length===2){if(n[0]===0){let m=[this._vertices[4*n[0]+(n[1]-2)],this._vertices[4*n[0]+(n[1]-2+1)%4]];return a=Ese(t,m[0],m[1]),d.distance(a,t)}let f=Number.MAX_VALUE,h;for(r=0;r<2;r++)l=this._boundingPlanes[n[r]],a=_9(on.projectPointOntoPlane(l,t,p9),i[r],l,this._edgeNormals[n[r]]),h=d.distanceSquared(a,t),h<f&&(f=h);return Math.sqrt(f)}else if(n.length>3)return a=_9(on.projectPointOntoPlane(this._boundingPlanes[1],t,p9),this._planeVertices[1],this._boundingPlanes[1],this._edgeNormals[1]),d.distance(a,t);let u=n[1]===2&&n[2]===5?0:1;return n[0]===0?d.distance(t,this._vertices[(n[1]-2+u)%4]):d.distance(t,this._vertices[4+(n[1]-2+u)%4])};var OWe=new d,PWe=new d;function Ese(e,t,n){let i=d.subtract(n,t,OWe),o=d.subtract(e,t,PWe),r=d.dot(i,o);if(r<=0)return t;let s=d.dot(i,i);return r>=s?n:(r=r/s,new d((1-r)*t.x+r*n.x,(1-r)*t.y+r*n.y,(1-r)*t.z+r*n.z))}var RWe=new on(d.UNIT_X,0);function _9(e,t,n,i){let o=Number.MAX_VALUE,r,s,a;for(let l=0;l<t.length;l++){let u=on.fromPointNormal(t[l],i[l],RWe);on.getPointDistance(u,e)<0||(a=Ese(e,t[l],t[(l+1)%4]),r=d.distance(e,a),r<o&&(o=r,s=a))}return c(s)?s:e}uv.prototype.intersectPlane=function(e){C.defined("plane",e);let t=0,n=0;for(let i=0;i<this._vertices.length;i++)d.dot(e.normal,this._vertices[i])+e.distance<0?n++:t++;return t===this._vertices.length?Gt.INSIDE:n===this._vertices.length?Gt.OUTSIDE:Gt.INTERSECTING};uv.prototype.createDebugVolume=function(e){C.defined("color",e);let t=new N.clone(N.IDENTITY),n=new sd({polygonHierarchy:{positions:this._planeVertices[0]}}),i=sd.createGeometry(n),o=new wt({geometry:i,id:"outline",modelMatrix:t,attributes:{color:Ht.fromColor(e)}}),r=new sd({polygonHierarchy:{positions:this._planeVertices[1]}}),s=sd.createGeometry(r),a=new wt({geometry:s,id:"outline",modelMatrix:t,attributes:{color:Ht.fromColor(e)}}),l=[];for(let u=0;u<4;u++){let f=new sd({polygonHierarchy:{positions:this._planeVertices[2+u]}}),h=sd.createGeometry(f);l[u]=new wt({geometry:h,id:"outline",modelMatrix:t,attributes:{color:Ht.fromColor(e)}})}return new An({geometryInstances:[l[0],l[1],l[2],l[3],a,o],appearance:new nn({translucent:!1,flat:!0}),asynchronous:!1})};var Z2=uv;var MWe=new d(1,1,1),J2=Math.cos,Q2=Math.sin;function DC(e){e=g(e,g.EMPTY_OBJECT);let t=g(e.radii,MWe),n=g(e.innerRadii,t),i=g(e.minimumClock,0),o=g(e.maximumClock,O.TWO_PI),r=g(e.minimumCone,0),s=g(e.maximumCone,O.PI),a=Math.round(g(e.stackPartitions,10)),l=Math.round(g(e.slicePartitions,8)),u=Math.round(g(e.subdivisions,128));if(a<1)throw new w("options.stackPartitions cannot be less than 1");if(l<0)throw new w("options.slicePartitions cannot be less than 0");if(u<0)throw new w("options.subdivisions must be greater than or equal to zero.");if(c(e.offsetAttribute)&&e.offsetAttribute===Zt.TOP)throw new w("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=d.clone(t),this._innerRadii=d.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=l,this._subdivisions=u,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}DC.packedLength=2*d.packedLength+8;DC.pack=function(e,t,n){if(!c(e))throw new w("value is required");if(!c(t))throw new w("array is required");return n=g(n,0),d.pack(e._radii,t,n),n+=d.packedLength,d.pack(e._innerRadii,t,n),n+=d.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n++]=e._subdivisions,t[n]=g(e._offsetAttribute,-1),t};var wse=new d,Sse=new d,Tp={radii:wse,innerRadii:Sse,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};DC.unpack=function(e,t,n){if(!c(e))throw new w("array is required");t=g(t,0);let i=d.unpack(e,t,wse);t+=d.packedLength;let o=d.unpack(e,t,Sse);t+=d.packedLength;let r=e[t++],s=e[t++],a=e[t++],l=e[t++],u=e[t++],f=e[t++],h=e[t++],m=e[t];return c(n)?(n._radii=d.clone(i,n._radii),n._innerRadii=d.clone(o,n._innerRadii),n._minimumClock=r,n._maximumClock=s,n._minimumCone=a,n._maximumCone=l,n._stackPartitions=u,n._slicePartitions=f,n._subdivisions=h,n._offsetAttribute=m===-1?void 0:m,n):(Tp.minimumClock=r,Tp.maximumClock=s,Tp.minimumCone=a,Tp.maximumCone=l,Tp.stackPartitions=u,Tp.slicePartitions=f,Tp.subdivisions=h,Tp.offsetAttribute=m===-1?void 0:m,new DC(Tp))};DC.createGeometry=function(e){let t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;let n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._subdivisions,l=Z.fromCartesian3(t),u=e._slicePartitions+1,f=e._stackPartitions+1;u=Math.round(u*Math.abs(o-i)/O.TWO_PI),f=Math.round(f*Math.abs(s-r)/O.PI),u<2&&(u=2),f<2&&(f=2);let h=0,m=1,p=n.x!==t.x||n.y!==t.y||n.z!==t.z,_=!1,b=!1;p&&(m=2,r>0&&(_=!0,h+=u),s<Math.PI&&(b=!0,h+=u));let x=a*m*(f+u),T=new Float64Array(x*3),E=2*(x+h-(u+f)*m),S=Oe.createTypedArray(x,E),A,v,D,R,P=0,L=new Array(f),F=new Array(f);for(A=0;A<f;A++)R=r+A*(s-r)/(f-1),L[A]=Q2(R),F[A]=J2(R);let y=new Array(a),I=new Array(a);for(A=0;A<a;A++)D=i+A*(o-i)/(a-1),y[A]=Q2(D),I[A]=J2(D);for(A=0;A<f;A++)for(v=0;v<a;v++)T[P++]=t.x*L[A]*I[v],T[P++]=t.y*L[A]*y[v],T[P++]=t.z*F[A];if(p)for(A=0;A<f;A++)for(v=0;v<a;v++)T[P++]=n.x*L[A]*I[v],T[P++]=n.y*L[A]*y[v],T[P++]=n.z*F[A];for(L.length=a,F.length=a,A=0;A<a;A++)R=r+A*(s-r)/(a-1),L[A]=Q2(R),F[A]=J2(R);for(y.length=u,I.length=u,A=0;A<u;A++)D=i+A*(o-i)/(u-1),y[A]=Q2(D),I[A]=J2(D);for(A=0;A<a;A++)for(v=0;v<u;v++)T[P++]=t.x*L[A]*I[v],T[P++]=t.y*L[A]*y[v],T[P++]=t.z*F[A];if(p)for(A=0;A<a;A++)for(v=0;v<u;v++)T[P++]=n.x*L[A]*I[v],T[P++]=n.y*L[A]*y[v],T[P++]=n.z*F[A];for(P=0,A=0;A<f*m;A++){let U=A*a;for(v=0;v<a-1;v++)S[P++]=U+v,S[P++]=U+v+1}let M=f*a*m;for(A=0;A<u;A++)for(v=0;v<a-1;v++)S[P++]=M+A+v*u,S[P++]=M+A+(v+1)*u;if(p)for(M=f*a*m+u*a,A=0;A<u;A++)for(v=0;v<a-1;v++)S[P++]=M+A+v*u,S[P++]=M+A+(v+1)*u;if(p){let U=f*a*m,V=U+a*u;if(_)for(A=0;A<u;A++)S[P++]=U+A,S[P++]=V+A;if(b)for(U+=a*u-u,V+=a*u-u,A=0;A<u;A++)S[P++]=U+A,S[P++]=V+A}let B=new fn({position:new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:T})});if(c(e._offsetAttribute)){let U=T.length,V=e._offsetAttribute===Zt.NONE?0:1,W=new Uint8Array(U/3).fill(V);B.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:W})}return new st({attributes:B,indices:S,primitiveType:Se.LINES,boundingSphere:ne.fromEllipsoid(l),offsetAttribute:e._offsetAttribute})};var sf=DC;function IC(e){let t=g(e.radius,1),i={radii:new d(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,subdivisions:e.subdivisions};this._ellipsoidGeometry=new sf(i),this._workerName="createSphereOutlineGeometry"}IC.packedLength=sf.packedLength;IC.pack=function(e,t,n){return C.typeOf.object("value",e),sf.pack(e._ellipsoidGeometry,t,n)};var LWe=new sf,Jb={radius:void 0,radii:new d,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};IC.unpack=function(e,t,n){let i=sf.unpack(e,t,LWe);return Jb.stackPartitions=i._stackPartitions,Jb.slicePartitions=i._slicePartitions,Jb.subdivisions=i._subdivisions,c(n)?(d.clone(i._radii,Jb.radii),n._ellipsoidGeometry=new sf(Jb),n):(Jb.radius=i._radii.x,new IC(Jb))};IC.createGeometry=function(e){return sf.createGeometry(e._ellipsoidGeometry)};var Cg=IC;function OC(e,t){t===0&&(t=O.EPSILON7),this._boundingSphere=new ne(e,t)}Object.defineProperties(OC.prototype,{center:{get:function(){return this._boundingSphere.center}},radius:{get:function(){return this._boundingSphere.radius}},boundingVolume:{get:function(){return this._boundingSphere}},boundingSphere:{get:function(){return this._boundingSphere}}});OC.prototype.distanceToCamera=function(e){C.defined("frameState",e);let t=this._boundingSphere;return Math.max(0,d.distance(t.center,e.camera.positionWC)-t.radius)};OC.prototype.intersectPlane=function(e){return C.defined("plane",e),ne.intersectPlane(this._boundingSphere,e)};OC.prototype.update=function(e,t){d.clone(e,this._boundingSphere.center),this._boundingSphere.radius=t};OC.prototype.createDebugVolume=function(e){C.defined("color",e);let t=new Cg({radius:this.radius}),n=N.fromTranslation(this.center,new N.clone(N.IDENTITY)),i=new wt({geometry:t,id:"outline",modelMatrix:n,attributes:{color:Ht.fromColor(e)}});return new An({geometryInstances:i,appearance:new nn({translucent:!1,flat:!0}),asynchronous:!1})};var Eg=OC;var NWe=new d,FWe=new d,BWe=new d,kWe=new d;function Qb(e,t,n){n=d.cross(e,t,n);let i=d.magnitude(n);return d.multiplyByScalar(n,O.EPSILON7/i,n)}function g9(e,t){let n=d.normalize(e,kWe),i=d.equalsEpsilon(n,d.UNIT_X,O.EPSILON6)?d.UNIT_Y:d.UNIT_X;return Qb(e,i,t)}function Ase(e){let t=q.getColumn(e,0,NWe),n=q.getColumn(e,1,FWe),i=q.getColumn(e,2,BWe),o=d.equals(t,d.ZERO),r=d.equals(n,d.ZERO),s=d.equals(i,d.ZERO);return!o&&!r&&!s?e:o&&r&&s?(e[0]=O.EPSILON7,e[4]=O.EPSILON7,e[8]=O.EPSILON7,e):(o&&!r&&!s?t=Qb(n,i,t):!o&&r&&!s?n=Qb(t,i,n):!o&&!r&&s?i=Qb(n,t,i):o?r?s||(t=g9(i,t),n=Qb(i,t,n)):(t=g9(n,t),i=Qb(n,t,i)):(n=g9(t,n),i=Qb(n,t,i)),q.setColumn(e,0,t,e),q.setColumn(e,1,n,e),q.setColumn(e,2,i,e),e)}function PC(e,t){t=Ase(t),this._orientedBoundingBox=new wn(e,t),this._boundingSphere=ne.fromOrientedBoundingBox(this._orientedBoundingBox)}Object.defineProperties(PC.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});PC.prototype.distanceToCamera=function(e){return C.defined("frameState",e),Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC))};PC.prototype.intersectPlane=function(e){return C.defined("plane",e),this._orientedBoundingBox.intersectPlane(e)};PC.prototype.update=function(e,t){d.clone(e,this._orientedBoundingBox.center),t=Ase(t),q.clone(t,this._orientedBoundingBox.halfAxes),ne.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere)};PC.prototype.createDebugVolume=function(e){C.defined("color",e);let t=new oh({minimum:new d(-1,-1,-1),maximum:new d(1,1,1)}),n=N.fromRotationTranslation(this.boundingVolume.halfAxes,this.boundingVolume.center),i=new wt({geometry:t,id:"outline",modelMatrix:n,attributes:{color:Ht.fromColor(e)}});return new An({geometryInstances:i,appearance:new nn({translucent:!1,flat:!0}),asynchronous:!1})};var af=PC;function Vo(e,t,n,i){this._tileset=e,this._header=n;let o=c(n.contents),r=o&&n.contents.length>1||ei(n,"3DTILES_multiple_contents"),s=o&&!r?n.contents[0]:n.content;this._contentHeader=s,this.transform=c(n.transform)?N.unpack(n.transform):N.clone(N.IDENTITY);let a=c(i)?i.computedTransform:e.modelMatrix,l=N.multiply(a,this.transform,new N),u=c(i)?i._initialTransform:N.IDENTITY;this._initialTransform=N.multiply(u,this.transform,new N),this.computedTransform=l,this.metadata=q2(e,n),this._verticalExaggeration=1,this._verticalExaggerationRelativeHeight=0,this._boundingVolume=this.createBoundingVolume(n.boundingVolume,l),this._boundingVolume2D=void 0;let f;c(s)&&c(s.boundingVolume)&&(f=this.createBoundingVolume(s.boundingVolume,l)),this._contentBoundingVolume=f,this._contentBoundingVolume2D=void 0;let h;c(n.viewerRequestVolume)&&(h=this.createBoundingVolume(n.viewerRequestVolume,l)),this._viewerRequestVolume=h,this.geometricError=n.geometricError,this._geometricError=n.geometricError,c(this._geometricError)||(this._geometricError=c(i)?i._geometricError:e._geometricError,Vo._deprecationWarning("geometricErrorUndefined","Required property geometricError is undefined for this tile. Using parent's geometric error instead.")),this.updateGeometricErrorScale();let m;c(n.refine)?((n.refine==="replace"||n.refine==="add")&&Vo._deprecationWarning("lowercase-refine",`This tile uses a lowercase refine "${n.refine}". Instead use "${n.refine.toUpperCase()}".`),m=n.refine.toUpperCase()==="REPLACE"?ko.REPLACE:ko.ADD):c(i)?m=i.refine:m=ko.REPLACE,this.refine=m,this.children=[],this.parent=i;let p,_=!1,b,x,T;if(t=Te.createIfNeeded(t),r)b=zo.UNLOADED,x=t.clone();else if(c(s)){let v=s.uri;c(s.url)&&(Vo._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),v=s.url),v===""?(Vo._deprecationWarning("contentUriEmpty","content.uri property is an empty string, which creates a circular dependency, making this tileset invalid. Omit the content property instead"),p=new av(e,this),_=!0,b=zo.READY):(b=zo.UNLOADED,x=t.getDerivedResource({url:v}),T=tc.getServerKey(x.getUrlComponent()))}else p=new av(e,this),_=!0,b=zo.READY;this._content=p,this._contentResource=x,this._contentState=b,this._expiredContent=void 0,this._serverKey=T,this.hasEmptyContent=_,this.hasTilesetContent=!1,this.hasImplicitContent=!1,this.hasImplicitContentMetadata=!1,this.hasMultipleContents=r,this.cacheNode=void 0;let E=n.expire,S,A;c(E)&&(S=E.duration,c(E.date)&&(A=K.fromIso8601(E.date))),this.expireDuration=S,this.expireDate=A,this.lastStyleTime=0,this._optimChildrenWithinParent=od.NOT_COMPUTED,this.clippingPlanesDirty=!1,this.clippingPolygonsDirty=!1,this.priorityDeferred=!1,this.implicitTileset=void 0,this.implicitCoordinates=void 0,this.implicitSubtree=void 0,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._screenSpaceErrorProgressiveResolution=0,this._visibilityPlaneMask=0,this._visible=!1,this._inRequestVolume=!1,this._finalResolution=!0,this._depth=0,this._stackLength=0,this._selectionDepth=0,this._updatedVisibilityFrame=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._wasSelectedLastFrame=!1,this._requestedFrame=0,this._ancestorWithContent=void 0,this._ancestorWithContentAvailable=void 0,this._refines=!1,this._shouldSelect=!1,this._isClipped=!0,this._isClippedByPolygon=!1,this._clippingPlanesState=0,this._clippingPolygonsState=0,this._debugBoundingVolume=void 0,this._debugContentBoundingVolume=void 0,this._debugViewerRequestVolume=void 0,this._debugColor=z.fromRandom({alpha:1}),this._debugColorizeTiles=!1,this._priority=0,this._priorityHolder=this,this._priorityProgressiveResolution=!1,this._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1,this._priorityReverseScreenSpaceError=0,this._foveatedFactor=0,this._wasMinPriorityChild=!1,this._loadTimestamp=new K,this._commandsLength=0,this._color=void 0,this._colorDirty=!1,this._request=void 0}Vo._deprecationWarning=os;Object.defineProperties(Vo.prototype,{tileset:{get:function(){return this._tileset}},content:{get:function(){return this._content}},boundingVolume:{get:function(){return this._boundingVolume}},contentBoundingVolume:{get:function(){return g(this._contentBoundingVolume,this._boundingVolume)}},boundingSphere:{get:function(){return this._boundingVolume.boundingSphere}},isVisible:{get:function(){return this._visible&&this._inRequestVolume}},extras:{get:function(){return this._header.extras}},color:{get:function(){return c(this._color)||(this._color=new z),z.clone(this._color)},set:function(e){this._color=z.clone(e,this._color),this._colorDirty=!0}},hasRenderableContent:{get:function(){return!this.hasEmptyContent&&!this.hasTilesetContent&&!this.hasImplicitContent}},contentAvailable:{get:function(){return this.contentReady&&this.hasRenderableContent||c(this._expiredContent)&&!this.contentFailed}},contentReady:{get:function(){return this._contentState===zo.READY}},contentUnloaded:{get:function(){return this._contentState===zo.UNLOADED}},hasUnloadedRenderableContent:{get:function(){return this.hasRenderableContent&&this.contentUnloaded}},contentExpired:{get:function(){return this._contentState===zo.EXPIRED}},contentFailed:{get:function(){return this._contentState===zo.FAILED}},commandsLength:{get:function(){return this._commandsLength}}});var wg=new d;function UWe(e,t){let{tileset:n,boundingSphere:i}=e,{radius:o,center:r}=i,{camera:s}=t,a=d.multiplyByScalar(s.directionWC,e._centerZDepth,wg),l=d.add(s.positionWC,a,wg),u=d.subtract(l,r,wg);if(d.magnitude(u)>o){let A=d.normalize(u,wg),v=d.multiplyByScalar(A,o,wg),D=d.add(r,v,wg),R=d.subtract(D,s.positionWC,wg),P=d.normalize(R,wg);e._foveatedFactor=1-Math.abs(d.dot(s.directionWC,P))}else e._foveatedFactor=0;let m=e.refine===ko.REPLACE,p=n.isSkippingLevelOfDetail;if(m&&!p||!n.foveatedScreenSpaceError||n.foveatedConeSize===1||e._priorityProgressiveResolution&&m&&p||n._pass===dr.PRELOAD_FLIGHT||n._pass===dr.PRELOAD)return!1;let _=1-Math.cos(s.frustum.fov*.5),b=n.foveatedConeSize*_;if(e._foveatedFactor<=b)return!1;let x=_-b,T=O.clamp((e._foveatedFactor-b)/x,0,1),E=n.foveatedInterpolationCallback(n.foveatedMinimumScreenSpaceErrorRelaxation,n.memoryAdjustedScreenSpaceError,T),S=e._screenSpaceError===0&&c(e.parent)?e.parent._screenSpaceError*.5:e._screenSpaceError;return n.memoryAdjustedScreenSpaceError-E<=S}var Ose=new K;Vo.prototype.getScreenSpaceError=function(e,t,n){let i=this._tileset,o=g(n,1),r=c(this.parent)?this.parent.geometricError:i._scaledGeometricError,s=t?r:this.geometricError;if(s===0)return 0;let{camera:a,context:l}=e,u=a.frustum,f=l.drawingBufferWidth,h=l.drawingBufferHeight*o,m;if(e.mode===J.SCENE2D||u instanceof an){let p=u.offCenterFrustum;c(p)&&(u=p);let _=Math.max(u.top-u.bottom,u.right-u.left)/Math.max(f,h);m=s/_}else{let p=Math.max(this._distanceToCamera,O.EPSILON7),_=u.sseDenominator;if(m=s*h/(p*_),i.dynamicScreenSpaceError){let b=i._dynamicScreenSpaceErrorComputedDensity,x=i.dynamicScreenSpaceErrorFactor,T=O.fog(p,b)*x;m-=T}}return m/=e.pixelRatio,m};function zWe(e,t){if(e.progressiveResolutionHeightFraction<=0||e.progressiveResolutionHeightFraction>.5)return!1;let n=e.memoryAdjustedScreenSpaceError,i=t._screenSpaceErrorProgressiveResolution>n;t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1;let o=t.parent,r=t._screenSpaceErrorProgressiveResolution<=n,s=c(o)&&o._screenSpaceErrorProgressiveResolution>n;return r&&s&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!0,i=!0),i}function VWe(e,t){let n=t.parent,o=c(n)&&(!e.isSkippingLevelOfDetail||t._screenSpaceError===0||n.hasTilesetContent||n.hasImplicitContent)?n._screenSpaceError:t._screenSpaceError;return e.root._screenSpaceError-o}Vo.prototype.updateVisibility=function(e){let{parent:t,tileset:n}=this;if(this._updatedVisibilityFrame===n._updatedVisibilityFrame)return;let i=c(t)?t.computedTransform:n.modelMatrix,o=c(t)?t._visibilityPlaneMask:rs.MASK_INDETERMINATE;this.updateTransform(i,e),this._distanceToCamera=this.distanceToTile(e),this._centerZDepth=this.distanceToTileCenter(e),this._screenSpaceError=this.getScreenSpaceError(e,!1),this._screenSpaceErrorProgressiveResolution=this.getScreenSpaceError(e,!1,n.progressiveResolutionHeightFraction),this._visibilityPlaneMask=this.visibility(e,o),this._visible=this._visibilityPlaneMask!==rs.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=VWe(n,this),this._priorityProgressiveResolution=zWe(n,this),this.priorityDeferred=UWe(this,e),this._updatedVisibilityFrame=n._updatedVisibilityFrame};Vo.prototype.updateExpiration=function(){if(c(this.expireDate)&&this.contentReady&&!this.hasEmptyContent&&!this.hasMultipleContents){let e=K.now(Ose);K.lessThan(this.expireDate,e)&&(this._contentState=zo.EXPIRED,this._expiredContent=this._content)}};function HWe(e){if(!c(e.expireDuration))return;let t=K.now(Ose);K.addSeconds(t,e.expireDuration,t),c(e.expireDate)?K.lessThan(e.expireDate,t)&&K.clone(t,e.expireDate):e.expireDate=K.clone(t)}function GWe(e){return function(){return e._priority}}Vo.prototype.requestContent=function(){if(!this.hasEmptyContent)return this.hasMultipleContents?jWe(this):qWe(this)};function jWe(e){let t=e._content,n=e._tileset;if(!c(t)){let o=ei(e._header,"3DTILES_multiple_contents")?e._header.extensions["3DTILES_multiple_contents"]:e._header;t=new Y2(n,e,e._contentResource.clone(),o),e._content=t}let i=t.requestInnerContents();if(c(i))return e._contentState=zo.LOADING,i.then(o=>{if(!e.isDestroyed()&&c(o))return e._contentState=zo.PROCESSING,t}).catch(o=>{if(!e.isDestroyed())throw e._contentState=zo.FAILED,o})}async function WWe(e,t,n,i,o){let r=e._contentState;e._contentState=zo.LOADING,++t.statistics.numberOfPendingRequests;let s;try{s=await o}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;if(n.cancelled||n.state===qn.CANCELLED){e._contentState=r,++t.statistics.numberOfAttemptedRequests;return}throw e._contentState=zo.FAILED,a}if(e.isDestroyed()){--t.statistics.numberOfPendingRequests;return}if(n.cancelled||n.state===qn.CANCELLED){e._contentState=r,--t.statistics.numberOfPendingRequests,++t.statistics.numberOfAttemptedRequests;return}try{let a=await YWe(e,s);return--t.statistics.numberOfPendingRequests,e.isDestroyed()?void 0:(i&&(e.expireDate=void 0),e._content=a,e._contentState=zo.PROCESSING,a)}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;throw e._contentState=zo.FAILED,a}}function qWe(e){let t=e._contentResource.clone(),n=e.contentExpired;n&&t.setQueryParameters({expired:e.expireDate.toString()});let i=new Ko({throttle:!0,throttleByServer:!0,type:is.TILES3D,priorityFunction:GWe(e),serverKey:e._serverKey});e._request=i,t.request=i;let o=e._tileset,r=t.fetchArrayBuffer();if(!c(r)){++o.statistics.numberOfAttemptedRequests;return}return WWe(e,o,i,n,r)}async function YWe(e,t){let n=xp(t),i=e._tileset;i._disableSkipLevelOfDetail=i._disableSkipLevelOfDetail||n.contentType===Ss.GEOMETRY||n.contentType===Ss.VECTOR,(n.contentType===Ss.IMPLICIT_SUBTREE||n.contentType===Ss.IMPLICIT_SUBTREE_JSON)&&(e.hasImplicitContent=!0),n.contentType===Ss.EXTERNAL_TILESET&&(e.hasTilesetContent=!0);let o,r=bC[n.contentType];if(e.isDestroyed())return;c(n.binaryPayload)?o=await Promise.resolve(r(i,e,e._contentResource,n.binaryPayload.buffer,0)):o=await Promise.resolve(r(i,e,e._contentResource,n.jsonPayload));let s=e._contentHeader;if(e.hasImplicitContentMetadata){let l=e.implicitSubtree,u=e.implicitCoordinates;o.metadata=l.getContentMetadataView(u,0)}else e.hasImplicitContent||(o.metadata=xC(i,s));let a=TC(i,s);return c(a)&&(o.group=new ST({metadata:a})),o}Vo.prototype.cancelRequests=function(){this.hasMultipleContents?this._content.cancelRequests():this._request.cancel()};Vo.prototype.unloadContent=function(){this.hasRenderableContent&&(this._content=this._content&&this._content.destroy(),this._contentState=zo.UNLOADED,this.lastStyleTime=0,this.clippingPlanesDirty=this._clippingPlanesState===0,this._clippingPlanesState=0,this.clippingPolygonsDirty=this._clippingPolygonsState===0,this._clippingPolygonsState=0,this._debugColorizeTiles=!1,this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy())};var Pse=new ne;function b9(e,t){if(t.mode!==J.SCENE3D&&!c(e._boundingVolume2D)){let n=e._boundingVolume.boundingSphere,i=ne.projectTo2D(n,t.mapProjection,Pse);e._boundingVolume2D=new Eg(i.center,i.radius)}return t.mode!==J.SCENE3D?e._boundingVolume2D:e._boundingVolume}function XWe(e,t){if(t.mode!==J.SCENE3D&&!c(e._contentBoundingVolume2D)){let n=e._contentBoundingVolume.boundingSphere,i=ne.projectTo2D(n,t.mapProjection,Pse);e._contentBoundingVolume2D=new Eg(i.center,i.radius)}return t.mode!==J.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}Vo.prototype.visibility=function(e,t){let n=e.cullingVolume,i=b9(this,e),o=this._tileset,r=o.clippingPlanes;if(c(r)&&r.enabled){let a=r.computeIntersectionWithBoundingVolume(i,o.clippingPlanesOriginMatrix);if(this._isClipped=a!==Gt.INSIDE,a===Gt.OUTSIDE)return rs.MASK_OUTSIDE}let s=o.clippingPolygons;if(c(s)&&s.enabled){let a=s.computeIntersectionWithBoundingVolume(i);this._isClippedByPolygon=a!==Gt.OUTSIDE}return n.computeVisibilityWithPlaneMask(i,t)};Vo.prototype.contentVisibility=function(e){if(!c(this._contentBoundingVolume))return Gt.INSIDE;if(this._visibilityPlaneMask===rs.MASK_INSIDE)return Gt.INSIDE;let t=e.cullingVolume,n=XWe(this,e),i=this._tileset,o=i.clippingPlanes;if(c(o)&&o.enabled){let s=o.computeIntersectionWithBoundingVolume(n,i.clippingPlanesOriginMatrix);if(this._isClipped=s!==Gt.INSIDE,s===Gt.OUTSIDE)return Gt.OUTSIDE}let r=i.clippingPolygons;if(c(r)&&r.enabled){let s=r.computeIntersectionWithBoundingVolume(n);if(this._isClippedByPolygon=s!==Gt.OUTSIDE,s===Gt.INSIDE)return Gt.OUTSIDE}return t.computeVisibility(n)};Vo.prototype.distanceToTile=function(e){return b9(this,e).distanceToCamera(e)};var KWe=new d;Vo.prototype.distanceToTileCenter=function(e){let n=b9(this,e).boundingVolume,i=d.subtract(n.center,e.camera.positionWC,KWe);return d.dot(e.camera.directionWC,i)};Vo.prototype.insideViewerRequestVolume=function(e){let t=this._viewerRequestVolume;return!c(t)||t.distanceToCamera(e)===0};var Rse=new q,Mse=new d,$We=new q,x9=new d,Lse=new te,Nse=new wn,y9=new N;function ZWe(e,t,n){let i=d.fromElements(e[0],e[1],e[2],x9),o=q.fromArray(e,3,$We);i=N.multiplyByPoint(t,i,i);let r=N.getMatrix3(t,Rse);return o=q.multiply(r,o,o),c(n)?(n.update(i,o),n):new af(i,o)}function JWe(e,t,n,i){let o=te.unpack(e,0,Lse),r=e[4],s=e[5],a=wn.fromRectangle(o,r,s,Z.WGS84,Nse),l=a.center,u=a.halfAxes;t=N.multiplyTransformation(t,N.inverseTransformation(n,y9),y9),l=N.multiplyByPoint(t,l,l);let f=N.getMatrix3(t,Rse);return u=q.multiply(f,u,u),c(i)&&i instanceof af?(i.update(l,u),i):new af(l,u)}function QWe(e,t,n,i){if(!N.equalsEpsilon(t,n,O.EPSILON8))return JWe(e,t,n,i);let o=te.unpack(e,0,Lse);return c(i)?(i.rectangle=te.clone(o,i.rectangle),i.minimumHeight=e[4],i.maximumHeight=e[5],i.computeBoundingVolumes(Z.WGS84),i):new rd({rectangle:o,minimumHeight:e[4],maximumHeight:e[5]})}function e6e(e,t,n){let i=d.fromElements(e[0],e[1],e[2],x9),o=e[3];i=N.multiplyByPoint(t,i,i);let r=N.getScale(t,Mse),s=d.maximumComponent(r);return o*=s,c(n)?(n.update(i,o),n):new Eg(i,o)}Vo.prototype.createBoundingVolume=function(e,t,n){let i=this.metadata,o;if(c(i)&&(o=kT.parseBoundingVolumeSemantic("TILE",i)),c(o)&&(e=o),!c(e))throw new ie("boundingVolume must be defined");if(ei(e,"3DTILES_bounding_volume_S2"))return new Z2(e.extensions["3DTILES_bounding_volume_S2"]);let{box:r,region:s,sphere:a}=e;if(c(r)){let l=ZWe(r,t,n);return this._verticalExaggeration!==1&&vse(l,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),l}if(c(s)){let l=QWe(s,t,this._initialTransform,n);return this._verticalExaggeration===1||(l instanceof af?vse(l,this._verticalExaggeration,this._verticalExaggerationRelativeHeight):(l.minimumHeight=Cr.getHeight(l.minimumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),l.maximumHeight=Cr.getHeight(l.maximumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),l.computeBoundingVolumes(Z.WGS84))),l}if(c(a)){let l=e6e(a,t,n);if(this._verticalExaggeration!==1){let u=Cr.getPosition(l.center,Z.WGS84,this._verticalExaggeration,this._verticalExaggerationRelativeHeight,x9),f=l.radius*this._verticalExaggeration;l.update(u,f)}return l}throw new ie("boundingVolume must contain a sphere, region, or box")};var t6e=d.unpackArray(new Array(8*3).fill(0));function vse(e,t,n){let i=e.boundingVolume.computeCorners(t6e).map(r=>Cr.getPosition(r,Z.WGS84,t,n,r)),o=wn.fromPoints(i,Nse);e.update(o.center,o.halfAxes)}Vo.prototype.updateTransform=function(e,t){e=g(e,N.IDENTITY);let n=N.multiplyTransformation(e,this.transform,y9),i=!N.equals(n,this.computedTransform),o=c(t)&&(this._verticalExaggeration!==t.verticalExaggeration||this._verticalExaggerationRelativeHeight!==t.verticalExaggerationRelativeHeight);if(!i&&!o)return;i&&N.clone(n,this.computedTransform),o&&(this._verticalExaggeration=t.verticalExaggeration,this._verticalExaggerationRelativeHeight=t.verticalExaggerationRelativeHeight);let r=this._header,s=this._contentHeader;this._boundingVolume=this.createBoundingVolume(r.boundingVolume,this.computedTransform,this._boundingVolume),c(this._contentBoundingVolume)&&(this._contentBoundingVolume=this.createBoundingVolume(s.boundingVolume,this.computedTransform,this._contentBoundingVolume)),c(this._viewerRequestVolume)&&(this._viewerRequestVolume=this.createBoundingVolume(r.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)),this.updateGeometricErrorScale(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy()};Vo.prototype.updateGeometricErrorScale=function(){let e=N.getScale(this.computedTransform,Mse),t=d.maximumComponent(e);if(this.geometricError=this._geometricError*t,!c(this.parent)){let n=this._tileset;n._scaledGeometricError=n._geometricError*t}};function n6e(e,t,n,i){if(!i.isRender)return;let o=c(e._contentHeader)&&c(e._contentHeader.boundingVolume),r=t.debugShowBoundingVolume||t.debugShowContentBoundingVolume&&!o;if(r){let l;e._finalResolution?e.hasRenderableContent?l=z.WHITE:l=z.DARKGRAY:l=z.YELLOW,c(e._debugBoundingVolume)||(e._debugBoundingVolume=e._boundingVolume.createDebugVolume(l)),e._debugBoundingVolume.update(n);let u=e._debugBoundingVolume.getGeometryInstanceAttributes("outline");u.color=Ht.toValue(l,u.color)}else!r&&c(e._debugBoundingVolume)&&(e._debugBoundingVolume=e._debugBoundingVolume.destroy());t.debugShowContentBoundingVolume&&o?(c(e._debugContentBoundingVolume)||(e._debugContentBoundingVolume=e._contentBoundingVolume.createDebugVolume(z.BLUE)),e._debugContentBoundingVolume.update(n)):!t.debugShowContentBoundingVolume&&c(e._debugContentBoundingVolume)&&(e._debugContentBoundingVolume=e._debugContentBoundingVolume.destroy()),t.debugShowViewerRequestVolume&&c(e._viewerRequestVolume)?(c(e._debugViewerRequestVolume)||(e._debugViewerRequestVolume=e._viewerRequestVolume.createDebugVolume(z.YELLOW)),e._debugViewerRequestVolume.update(n)):!t.debugShowViewerRequestVolume&&c(e._debugViewerRequestVolume)&&(e._debugViewerRequestVolume=e._debugViewerRequestVolume.destroy());let s=t.debugColorizeTiles&&!e._debugColorizeTiles||c(t._heatmap.tilePropertyName),a=!t.debugColorizeTiles&&e._debugColorizeTiles;s?(t._heatmap.colorize(e,n),e._debugColorizeTiles=!0,e.color=e._debugColor):a&&(e._debugColorizeTiles=!1,e.color=z.WHITE),e._colorDirty&&(e._colorDirty=!1,e._content.applyDebugSettings(!0,e._color)),a&&t.makeStyleDirty()}function i6e(e,t,n){let i=e._expiredContent;if(!e.hasMultipleContents&&c(i)){if(!e.contentReady){try{i.update(t,n)}catch{}return}e._expiredContent.destroy(),e._expiredContent=void 0}if(c(e.content))try{e.content.update(t,n)}catch(o){throw e._contentState=zo.FAILED,o}}function o6e(e,t){let n=t.clippingPlanes,i=0;c(n)&&e._isClipped&&n.enabled&&(i=n.clippingPlanesState),i!==e._clippingPlanesState&&(e._clippingPlanesState=i,e.clippingPlanesDirty=!0)}function r6e(e,t){let n=t.clippingPolygons,i=0;c(n)&&e._isClippedByPolygon&&n.enabled&&(i=n.clippingPolygonsState),i!==e._clippingPolygonsState&&(e._clippingPolygonsState=i,e.clippingPolygonsDirty=!0)}Vo.prototype.update=function(e,t,n){let{commandList:i}=t,o=i.length;o6e(this,e),r6e(this,e),n6e(this,e,t,n),i6e(this,e,t);let r=i.length;this._commandsLength=r-o;for(let s=o;s<r;++s){let a=i[s],l=a.pass===xe.TRANSLUCENT;a.depthForTranslucentClassification=l}this.clippingPlanesDirty=!1,this.clippingPolygonsDirty=!1};var Dse=[];Vo.prototype.process=function(e,t){!this.contentExpired&&!this.contentReady&&this._content.ready&&(HWe(this),this._selectedFrame=0,this.lastStyleTime=0,K.now(this._loadTimestamp),this._contentState=zo.READY,!this.hasTilesetContent&&!this.hasImplicitContent&&(e._statistics.incrementLoadCounts(this.content),++e._statistics.numberOfTilesWithContentReady,++e._statistics.numberOfLoadedTilesTotal,e._cache.add(this)));let n=t.commandList;t.commandList=Dse;try{this._content.update(e,t)}catch(i){throw this._contentState=zo.FAILED,i}Dse.length=0,t.commandList=n};function Ise(e,t,n){let i=e*Math.pow(10,t);return parseInt(i)*Math.pow(10,n)}function eB(e,t,n){return Math.max(O.normalize(e,t,n)-O.EPSILON7,0)}Vo.prototype.updatePriority=function(){let e=this.tileset,t=e.preferLeaves,n=e._minimumPriority,i=e._maximumPriority,o=4,r=1,s=0,a=o,l=s+a,u=o,f=l+u,h=r,m=Math.pow(10,f),p=f+h,_=r,b=Math.pow(10,p),x=p+_,T=Math.pow(10,x),E=eB(this._depth,n.depth,i.depth);E=t?1-E:E;let A=!e.isSkippingLevelOfDetail&&this.refine===ko.REPLACE?eB(this._priorityHolder._distanceToCamera,n.distance,i.distance):eB(this._priorityReverseScreenSpaceError,n.reverseScreenSpaceError,i.reverseScreenSpaceError),v=Ise(A,a,s),D=this._priorityProgressiveResolution?0:m,R=eB(this._priorityHolder._foveatedFactor,n.foveatedFactor,i.foveatedFactor),P=Ise(R,u,l),L=this.priorityDeferred?b:0,F=e._pass===dr.PRELOAD_FLIGHT?0:T;this._priority=E+v+D+P+L+F};Vo.prototype.isDestroyed=function(){return!1};Vo.prototype.destroy=function(){return this._content=this._content&&this._content.destroy(),this._expiredContent=this._expiredContent&&!this._expiredContent.isDestroyed()&&this._expiredContent.destroy(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy(),ue(this)};var ad=Vo;function Cp(e){e=g(e,g.EMPTY_OBJECT);let t=e.id,n=e.group,i=e.class;C.typeOf.object("options.group",n),C.typeOf.object("options.class",i);let o=c(n.properties)?n.properties:{};this._class=i,this._properties=o,this._id=t,this._extras=n.extras,this._extensions=n.extensions}Object.defineProperties(Cp.prototype,{class:{get:function(){return this._class}},id:{get:function(){return this._id}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});Cp.prototype.hasProperty=function(e){return Rn.hasProperty(e,this._properties,this._class)};Cp.prototype.hasPropertyBySemantic=function(e){return Rn.hasPropertyBySemantic(e,this._properties,this._class)};Cp.prototype.getPropertyIds=function(e){return Rn.getPropertyIds(this._properties,this._class,e)};Cp.prototype.getProperty=function(e){return Rn.getProperty(e,this._properties,this._class)};Cp.prototype.setProperty=function(e,t){return Rn.setProperty(e,t,this._properties,this._class)};Cp.prototype.getPropertyBySemantic=function(e){return Rn.getPropertyBySemantic(e,this._properties,this._class)};Cp.prototype.setPropertyBySemantic=function(e,t){return Rn.setPropertyBySemantic(e,t,this._properties,this._class)};var fv=Cp;function Ep(e){e=g(e,g.EMPTY_OBJECT);let t=e.tileset,n=e.class;C.typeOf.object("options.tileset",t),C.typeOf.object("options.class",n);let i=c(t.properties)?t.properties:{};this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(Ep.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});Ep.prototype.hasProperty=function(e){return Rn.hasProperty(e,this._properties,this._class)};Ep.prototype.hasPropertyBySemantic=function(e){return Rn.hasPropertyBySemantic(e,this._properties,this._class)};Ep.prototype.getPropertyIds=function(e){return Rn.getPropertyIds(this._properties,this._class,e)};Ep.prototype.getProperty=function(e){return Rn.getProperty(e,this._properties,this._class)};Ep.prototype.setProperty=function(e,t){return Rn.setProperty(e,t,this._properties,this._class)};Ep.prototype.getPropertyBySemantic=function(e){return Rn.getPropertyBySemantic(e,this._properties,this._class)};Ep.prototype.setPropertyBySemantic=function(e,t){return Rn.setPropertyBySemantic(e,t,this._properties,this._class)};var tB=Ep;function Fse(e){e=g(e,g.EMPTY_OBJECT);let t=e.metadataJson,n=e.schema;C.typeOf.object("options.metadataJson",t),C.typeOf.object("options.schema",n);let i=g(t.metadata,t.tileset),o;c(i)&&(o=new tB({tileset:i,class:n.classes[i.class]}));let r=[],s=[],a=t.groups;if(Array.isArray(a)){let l=a.length;for(let u=0;u<l;u++){let f=a[u];s.push(new fv({group:f,class:n.classes[f.class]}))}}else if(c(a)){r=Object.keys(a).sort();let l=r.length;for(let u=0;u<l;u++){let f=r[u];if(a.hasOwnProperty(f)){let h=a[f];s.push(new fv({id:f,group:a[f],class:n.classes[h.class]}))}}}this._schema=n,this._groups=s,this._groupIds=r,this._tileset=o,this._statistics=t.statistics,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(Fse.prototype,{schema:{get:function(){return this._schema}},groups:{get:function(){return this._groups}},groupIds:{get:function(){return this._groupIds}},tileset:{get:function(){return this._tileset}},statistics:{get:function(){return this._statistics}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var RC=Fse;var Bse={},s6e=new d;Bse.checkChildrenWithinParent=function(e){C.typeOf.object("tile",e);let t=e.children,n=t.length,i=e.boundingVolume;if(i instanceof af||i instanceof rd){let o=i._orientedBoundingBox;e._optimChildrenWithinParent=od.USE_OPTIMIZATION;for(let r=0;r<n;++r){let a=t[r].boundingVolume;if(!(a instanceof af||a instanceof rd)){e._optimChildrenWithinParent=od.SKIP_OPTIMIZATION;break}let l=a._orientedBoundingBox,u=d.subtract(l.center,o.center,s6e),f=d.magnitude(u);d.divideByScalar(u,f,u);let h=Math.abs(o.halfAxes[0]*u.x)+Math.abs(o.halfAxes[1]*u.y)+Math.abs(o.halfAxes[2]*u.z)+Math.abs(o.halfAxes[3]*u.x)+Math.abs(o.halfAxes[4]*u.y)+Math.abs(o.halfAxes[5]*u.z)+Math.abs(o.halfAxes[6]*u.x)+Math.abs(o.halfAxes[7]*u.y)+Math.abs(o.halfAxes[8]*u.z),m=Math.abs(l.halfAxes[0]*u.x)+Math.abs(l.halfAxes[1]*u.y)+Math.abs(l.halfAxes[2]*u.z)+Math.abs(l.halfAxes[3]*u.x)+Math.abs(l.halfAxes[4]*u.y)+Math.abs(l.halfAxes[5]*u.z)+Math.abs(l.halfAxes[6]*u.x)+Math.abs(l.halfAxes[7]*u.y)+Math.abs(l.halfAxes[8]*u.z);if(h<=m+f){e._optimChildrenWithinParent=od.SKIP_OPTIMIZATION;break}}}return e._optimChildrenWithinParent===od.USE_OPTIMIZATION};var nB=Bse;function dv(){this.head=void 0,this.tail=void 0,this._length=0}Object.defineProperties(dv.prototype,{length:{get:function(){return this._length}}});function a6e(e,t,n){this.item=e,this.previous=t,this.next=n}dv.prototype.add=function(e){let t=new a6e(e,this.tail,void 0);return c(this.tail)?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),++this._length,t};function kse(e,t){c(t.previous)&&c(t.next)?(t.previous.next=t.next,t.next.previous=t.previous):c(t.previous)?(t.previous.next=void 0,e.tail=t.previous):c(t.next)?(t.next.previous=void 0,e.head=t.next):(e.head=void 0,e.tail=void 0),t.next=void 0,t.previous=void 0}dv.prototype.remove=function(e){c(e)&&(kse(this,e),--this._length)};dv.prototype.splice=function(e,t){if(e===t)return;kse(this,t);let n=e.next;e.next=t,this.tail===e?this.tail=t:n.previous=t,t.next=n,t.previous=e};var iB=dv;function e0(){this._list=new iB,this._sentinel=this._list.add(),this._trimTiles=!1}e0.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)};e0.prototype.touch=function(e){let t=e.cacheNode;c(t)&&this._list.splice(this._sentinel,t)};e0.prototype.add=function(e){c(e.cacheNode)||(e.cacheNode=this._list.add(e))};e0.prototype.unloadTile=function(e,t,n){let i=t.cacheNode;c(i)&&(this._list.remove(i),t.cacheNode=void 0,n(e,t))};e0.prototype.unloadTiles=function(e,t){let n=this._trimTiles;this._trimTiles=!1;let i=this._list,o=this._sentinel,r=i.head;for(;r!==o&&(e.totalMemoryUsageInBytes>e.cacheBytes||n);){let s=r.item;r=r.next,this.unloadTile(e,s,t)}};e0.prototype.trim=function(){this._trimTiles=!0};var oB=e0;function rB(e){this.tilePropertyName=e,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE,this._previousMinimum=Number.MAX_VALUE,this._previousMaximum=-Number.MAX_VALUE,this._referenceMinimum={},this._referenceMaximum={}}function C9(e,t){let n;return t==="_loadTimestamp"?n=K.toDate(e).getTime():n=e,n}rB.prototype.setReferenceMinimumMaximum=function(e,t,n){this._referenceMinimum[n]=C9(e,n),this._referenceMaximum[n]=C9(t,n)};function c6e(e,t){let n=e.tilePropertyName;if(c(n)){let i=C9(t[n],n);return c(i)?(e._maximum=Math.max(i,e._maximum),e._minimum=Math.min(i,e._minimum),i):(e.tilePropertyName=void 0,i)}}var T9=[new z(.1,.1,.1,1),new z(.153,.278,.878,1),new z(.827,.231,.49,1),new z(.827,.188,.22,1),new z(1,.592,.259,1),new z(1,.843,0,1)];rB.prototype.colorize=function(e,t){let n=this.tilePropertyName;if(!c(n)||!e.contentAvailable||e._selectedFrame!==t.frameNumber)return;let i=c6e(this,e),o=this._previousMinimum,r=this._previousMaximum;if(o===Number.MAX_VALUE||r===-Number.MAX_VALUE)return;let s=r-o+O.EPSILON7,l=O.clamp(i-o,0,s)/s,u=T9.length-1,f=l*u,h=Math.floor(f),m=Math.ceil(f),p=f-h,_=T9[h],b=T9[m],x=z.clone(z.WHITE);x.red=O.lerp(_.red,b.red,p),x.green=O.lerp(_.green,b.green,p),x.blue=O.lerp(_.blue,b.blue,p),e._debugColor=x};rB.prototype.resetMinimumMaximum=function(){let e=this.tilePropertyName;if(c(e)){let t=this._referenceMinimum[e],n=this._referenceMaximum[e],i=c(t)&&c(n);this._previousMinimum=i?t:this._minimum,this._previousMaximum=i?n:this._maximum,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE}};var sB=rB;function MC(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfPendingRequests=0,this.numberOfTilesProcessing=0,this.numberOfTilesWithContentReady=0,this.numberOfTilesTotal=0,this.numberOfLoadedTilesTotal=0,this.numberOfFeaturesSelected=0,this.numberOfFeaturesLoaded=0,this.numberOfPointsSelected=0,this.numberOfPointsLoaded=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0,this.geometryByteLength=0,this.texturesByteLength=0,this.batchTableByteLength=0}MC.prototype.clear=function(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfFeaturesSelected=0,this.numberOfPointsSelected=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0};function aB(e,t,n,i){let o=t.innerContents,r=t.pointsLength,s=t.trianglesLength,a=t.featuresLength,l=t.geometryByteLength,u=t.texturesByteLength,f=t.batchTableByteLength;if(i?(e.numberOfFeaturesLoaded+=n?-a:a,e.numberOfPointsLoaded+=n?-r:r,e.geometryByteLength+=n?-l:l,e.texturesByteLength+=n?-u:u,e.batchTableByteLength+=n?-f:f):(e.numberOfFeaturesSelected+=n?-a:a,e.numberOfPointsSelected+=n?-r:r,e.numberOfTrianglesSelected+=n?-s:s),c(o)){let h=o.length;for(let m=0;m<h;++m)aB(e,o[m],n,i)}}MC.prototype.incrementSelectionCounts=function(e){aB(this,e,!1,!1)};MC.prototype.incrementLoadCounts=function(e){aB(this,e,!1,!0)};MC.prototype.decrementLoadCounts=function(e){aB(this,e,!0,!0)};MC.clone=function(e,t){t.selected=e.selected,t.visited=e.visited,t.numberOfCommands=e.numberOfCommands,t.selected=e.selected,t.numberOfAttemptedRequests=e.numberOfAttemptedRequests,t.numberOfPendingRequests=e.numberOfPendingRequests,t.numberOfTilesProcessing=e.numberOfTilesProcessing,t.numberOfTilesWithContentReady=e.numberOfTilesWithContentReady,t.numberOfTilesTotal=e.numberOfTilesTotal,t.numberOfFeaturesSelected=e.numberOfFeaturesSelected,t.numberOfFeaturesLoaded=e.numberOfFeaturesLoaded,t.numberOfPointsSelected=e.numberOfPointsSelected,t.numberOfPointsLoaded=e.numberOfPointsLoaded,t.numberOfTrianglesSelected=e.numberOfTrianglesSelected,t.numberOfTilesStyled=e.numberOfTilesStyled,t.numberOfFeaturesStyled=e.numberOfFeaturesStyled,t.numberOfTilesCulledWithChildrenUnion=e.numberOfTilesCulledWithChildrenUnion,t.geometryByteLength=e.geometryByteLength,t.texturesByteLength=e.texturesByteLength,t.batchTableByteLength=e.batchTableByteLength};var Sg=MC;function hv(){this._style=void 0,this._styleDirty=!1,this._lastStyleTime=0}Object.defineProperties(hv.prototype,{style:{get:function(){return this._style},set:function(e){e!==this._style&&(this._style=e,this._styleDirty=!0)}}});hv.prototype.makeDirty=function(){this._styleDirty=!0};hv.prototype.resetDirty=function(){this._styleDirty=!1};hv.prototype.applyStyle=function(e){if(!c(e.root)||c(this._style)&&!this._style._ready)return;let t=this._styleDirty;t&&++this._lastStyleTime;let n=this._lastStyleTime,i=e._statistics,o=t?e._selectedTiles:e._selectedTilesToStyle,r=o.length;for(let s=0;s<r;++s){let a=o[s];if(a.lastStyleTime!==n){let l=a.content;a.lastStyleTime=n,l.applyStyle(this._style),i.numberOfFeaturesStyled+=l.featuresLength,++i.numberOfTilesStyled}}};var cB=hv;function l6e(e,t,n){let i=ei(t,"3DTILES_implicit_tiling")?t.extensions["3DTILES_implicit_tiling"]:t.implicitTiling;C.typeOf.object("implicitTiling",i),this.baseResource=e,this.geometricError=t.geometricError,this.metadataSchema=n;let o=t.boundingVolume;if(!c(o.box)&&!c(o.region)&&!ei(o,"3DTILES_bounding_volume_S2")&&!ei(o,"3DTILES_bounding_volume_cylinder"))throw new ie("Only box, region, 3DTILES_bounding_volume_S2, and 3DTILES_bounding_volume_cylinder are supported for implicit tiling");this.boundingVolume=o,this.refine=t.refine,this.subtreeUriTemplate=new Te({url:i.subtrees.uri}),this.contentUriTemplates=[],this.contentHeaders=[];let r=u6e(t);for(let s=0;s<r.length;s++){let a=r[s];this.contentHeaders.push(ze(a,!0));let l=new Te({url:a.uri});this.contentUriTemplates.push(l)}this.contentCount=this.contentHeaders.length,this.tileHeader=f6e(t),this.subdivisionScheme=Jo[i.subdivisionScheme],this.branchingFactor=Jo.getBranchingFactor(this.subdivisionScheme),this.subtreeLevels=i.subtreeLevels,c(i.availableLevels)?this.availableLevels=i.availableLevels:this.availableLevels=i.maximumLevel+1}function u6e(e){if(ei(e,"3DTILES_multiple_contents")){let t=e.extensions["3DTILES_multiple_contents"];return c(t.contents)?t.contents:t.content}return c(e.contents)?e.contents:c(e.content)?[e.content]:[]}function f6e(e){let t=ze(e,!0);return c(t.extensions)&&(delete t.extensions["3DTILES_implicit_tiling"],delete t.extensions["3DTILES_multiple_contents"],Object.keys(t.extensions).length===0&&delete t.extensions),delete t.implicitTiling,delete t.contents,delete t.content,t}var LC=l6e;var mv={};function Use(e){return e=(e^e<<8)&16711935,e=(e^e<<4)&252645135,e=(e^e<<2)&858993459,e=(e^e<<1)&1431655765,e}function E9(e){return e=(e^e<<16)&50331903,e=(e^e<<8)&50393103,e=(e^e<<4)&51130563,e=(e^e<<2)&153391689,e}function zse(e){return e&=1431655765,e=(e^e>>1)&858993459,e=(e^e>>2)&252645135,e=(e^e>>4)&16711935,e=(e^e>>8)&65535,e}function w9(e){return e&=153391689,e=(e^e>>2)&51130563,e=(e^e>>4)&50393103,e=(e^e>>8)&4278190335,e=(e^e>>16)&1023,e}mv.encode2D=function(e,t){if(C.typeOf.number("x",e),C.typeOf.number("y",t),e<0||e>65535||t<0||t>65535)throw new w("inputs must be 16-bit unsigned integers");return(Use(e)|Use(t)<<1)>>>0};mv.decode2D=function(e,t){if(C.typeOf.number("mortonIndex",e),e<0||e>4294967295)throw new w("input must be a 32-bit unsigned integer");return c(t)||(t=new Array(2)),t[0]=zse(e),t[1]=zse(e>>1),t};mv.encode3D=function(e,t,n){if(C.typeOf.number("x",e),C.typeOf.number("y",t),C.typeOf.number("z",n),e<0||e>1023||t<0||t>1023||n<0||n>1023)throw new w("inputs must be 10-bit unsigned integers");return E9(e)|E9(t)<<1|E9(n)<<2};mv.decode3D=function(e,t){if(C.typeOf.number("mortonIndex",e),e<0||e>1073741823)throw new w("input must be a 30-bit unsigned integer");return c(t)||(t=new Array(3)),t[0]=w9(e),t[1]=w9(e>>1),t[2]=w9(e>>2),t};var t0=mv;function Oo(e){if(C.typeOf.string("options.subdivisionScheme",e.subdivisionScheme),C.typeOf.number("options.subtreeLevels",e.subtreeLevels),C.typeOf.number("options.level",e.level),C.typeOf.number("options.x",e.x),C.typeOf.number("options.y",e.y),e.subdivisionScheme===Jo.OCTREE&&C.typeOf.number("options.z",e.z),e.level<0)throw new w("level must be non-negative");if(e.x<0)throw new w("x must be non-negative");if(e.y<0)throw new w("y must be non-negative");if(e.subdivisionScheme===Jo.OCTREE&&e.z<0)throw new w("z must be non-negative");let t=1<<e.level;if(e.x>=t)throw new w("x is out of range");if(e.y>=t)throw new w("y is out of range");if(e.subdivisionScheme===Jo.OCTREE&&e.z>=t)throw new w("z is out of range");this.subdivisionScheme=e.subdivisionScheme,this.subtreeLevels=e.subtreeLevels,this.level=e.level,this.x=e.x,this.y=e.y,this.z=void 0,e.subdivisionScheme===Jo.OCTREE&&(this.z=e.z)}Object.defineProperties(Oo.prototype,{childIndex:{get:function(){let e=0;return e|=this.x&1,e|=(this.y&1)<<1,this.subdivisionScheme===Jo.OCTREE&&(e|=(this.z&1)<<2),e}},mortonIndex:{get:function(){return this.subdivisionScheme===Jo.OCTREE?t0.encode3D(this.x,this.y,this.z):t0.encode2D(this.x,this.y)}},tileIndex:{get:function(){let e=this.subdivisionScheme===Jo.OCTREE?((1<<3*this.level)-1)/7:((1<<2*this.level)-1)/3,t=this.mortonIndex;return e+t}}});function S9(e,t){if(e.subdivisionScheme!==t.subdivisionScheme)throw new w("coordinates must have same subdivisionScheme");if(e.subtreeLevels!==t.subtreeLevels)throw new w("coordinates must have same subtreeLevels")}Oo.prototype.getDescendantCoordinates=function(e){C.typeOf.object("offsetCoordinates",e),S9(this,e);let t=this.level+e.level,n=(this.x<<e.level)+e.x,i=(this.y<<e.level)+e.y;if(this.subdivisionScheme===Jo.OCTREE){let o=(this.z<<e.level)+e.z;return new Oo({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i,z:o})}return new Oo({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i})};Oo.prototype.getAncestorCoordinates=function(e){if(C.typeOf.number("offsetLevels",e),e<0)throw new w("offsetLevels must be non-negative");if(e>this.level)throw new w("ancestor cannot be above the tileset root");let t=1<<e,n=this.level-e,i=Math.floor(this.x/t),o=Math.floor(this.y/t);if(this.subdivisionScheme===Jo.OCTREE){let r=Math.floor(this.z/t);return new Oo({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:n,x:i,y:o,z:r})}return new Oo({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:n,x:i,y:o})};Oo.prototype.getOffsetCoordinates=function(e){if(C.typeOf.object("descendantCoordinates",e),!this.isEqual(e)&&!this.isAncestor(e))throw new w("this is not an ancestor of descendant");S9(this,e);let t=e.level-this.level,n=1<<t,i=e.x%n,o=e.y%n;if(this.subdivisionScheme===Jo.OCTREE){let r=e.z%n;return new Oo({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:i,y:o,z:r})}return new Oo({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:i,y:o})};Oo.prototype.getChildCoordinates=function(e){C.typeOf.number("childIndex",e);let t=Jo.getBranchingFactor(this.subdivisionScheme);if(e<0||t<=e)throw new w(`childIndex must be at least 0 and less than ${t}`);let n=this.level+1,i=2*this.x+e%2,o=2*this.y+Math.floor(e/2)%2;if(this.subdivisionScheme===Jo.OCTREE){let r=2*this.z+Math.floor(e/4)%2;return new Oo({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:n,x:i,y:o,z:r})}return new Oo({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:n,x:i,y:o})};Oo.prototype.getSubtreeCoordinates=function(){return this.getAncestorCoordinates(this.level%this.subtreeLevels)};Oo.prototype.getParentSubtreeCoordinates=function(){return this.getAncestorCoordinates(this.level%this.subtreeLevels+this.subtreeLevels)};Oo.prototype.isAncestor=function(e){C.typeOf.object("descendantCoordinates",e),S9(this,e);let t=e.level-this.level;if(t<=0)return!1;let n=e.x>>t,i=e.y>>t,o=this.x===n,r=this.y===i;if(this.subdivisionScheme===Jo.OCTREE){let s=e.z>>t,a=this.z===s;return o&&r&&a}return o&&r};Oo.prototype.isEqual=function(e){return C.typeOf.object("otherCoordinates",e),this.subdivisionScheme===e.subdivisionScheme&&this.subtreeLevels===e.subtreeLevels&&this.level===e.level&&this.x===e.x&&this.y===e.y&&(this.subdivisionScheme===Jo.OCTREE?this.z===e.z:!0)};Oo.prototype.isImplicitTilesetRoot=function(){return this.level===0};Oo.prototype.isSubtreeRoot=function(){return this.level%this.subtreeLevels===0};Oo.prototype.isBottomOfSubtree=function(){return this.level%this.subtreeLevels===this.subtreeLevels-1};Oo.prototype.getTemplateValues=function(){let e={level:this.level,x:this.x,y:this.y};return this.subdivisionScheme===Jo.OCTREE&&(e.z=this.z),e};var Vse=[0,0,0];Oo.fromMortonIndex=function(e,t,n,i){let o;return e===Jo.OCTREE?(o=t0.decode3D(i,Vse),new Oo({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1],z:o[2]})):(o=t0.decode2D(i,Vse),new Oo({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1]}))};Oo.fromTileIndex=function(e,t,n){let i,o,r;return e===Jo.OCTREE?(i=Math.floor(O.log2(7*n+1)/3),o=((1<<3*i)-1)/7,r=n-o):(i=Math.floor(O.log2(3*n+1)/2),o=((1<<2*i)-1)/3,r=n-o),Oo.fromMortonIndex(e,t,i,r)};var NC=Oo;function wp(){}wp.selectTiles=function(e,t){w.throwInstantiationError()};wp.sortChildrenByDistanceToCamera=function(e,t){return t._distanceToCamera===0&&e._distanceToCamera===0?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera};wp.canTraverse=function(e){return e.children.length===0?!1:e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:e._screenSpaceError>e.tileset.memoryAdjustedScreenSpaceError};wp.selectTile=function(e,t){if(e.contentVisibility(t)===Gt.OUTSIDE)return;e._wasSelectedLastFrame=!0;let{content:n,tileset:i}=e;n.featurePropertiesDirty?(n.featurePropertiesDirty=!1,e.lastStyleTime=0,i._selectedTilesToStyle.push(e)):e._selectedFrame<t.frameNumber-1&&(i._selectedTilesToStyle.push(e),e._wasSelectedLastFrame=!1),e._selectedFrame=t.frameNumber,i._selectedTiles.push(e)};wp.visitTile=function(e,t){++e.tileset._statistics.visited,e._visitedFrame=t.frameNumber};wp.touchTile=function(e,t){e._touchedFrame!==t.frameNumber&&(e.tileset._cache.touch(e),e._touchedFrame=t.frameNumber)};wp.loadTile=function(e,t){let{tileset:n}=e;if(e._requestedFrame===t.frameNumber||!e.hasUnloadedRenderableContent&&!e.contentExpired||!d6e(e,t))return;let i=t.camera.timeSinceMoved<n.foveatedTimeDelay;e.priorityDeferred&&i||(e._requestedFrame=t.frameNumber,n._requestedTiles.push(e))};function d6e(e,t){let{tileset:n}=e;if(!n._cullRequestsWhileMoving)return!0;let{positionWCDeltaMagnitude:i,positionWCDeltaMagnitudeLastFrame:o}=t.camera,r=i!==0?i:o,s=Math.max(e.boundingSphere.radius*2,1);return n.cullRequestsWhileMovingMultiplier*r/s<1}wp.updateTile=function(e,t){Hse(e,t),e.updateExpiration(),e._wasMinPriorityChild=!1,e._priorityHolder=e,p6e(e),e._shouldSelect=!1,e._finalResolution=!0};function Hse(e,t){if(e.updateVisibility(t),!e.isVisible)return;let n=e.children.length>0;if((e.hasTilesetContent||e.hasImplicitContent)&&n){let r=e.children[0];Hse(r,t),e._visible=r._visible;return}if(h6e(e,t)){e._visible=!1;return}let i=e.refine===ko.REPLACE,o=e._optimChildrenWithinParent===od.USE_OPTIMIZATION;if(i&&o&&n&&!m6e(e,t)){++e.tileset._statistics.numberOfTilesCulledWithChildrenUnion,e._visible=!1;return}}function h6e(e,t){let{parent:n,tileset:i}=e;return!c(n)||n.hasTilesetContent||n.hasImplicitContent||n.refine!==ko.ADD?!1:e.getScreenSpaceError(t,!0)<=i.memoryAdjustedScreenSpaceError}function m6e(e,t){let n=!1,i=e.children;for(let o=0;o<i.length;++o){let r=i[o];r.updateVisibility(t),n=n||r.isVisible}return n}function p6e(e){let t=e.tileset._minimumPriority,n=e.tileset._maximumPriority,i=e._priorityHolder;n.distance=Math.max(i._distanceToCamera,n.distance),t.distance=Math.min(i._distanceToCamera,t.distance),n.depth=Math.max(e._depth,n.depth),t.depth=Math.min(e._depth,t.depth),n.foveatedFactor=Math.max(i._foveatedFactor,n.foveatedFactor),t.foveatedFactor=Math.min(i._foveatedFactor,t.foveatedFactor),n.reverseScreenSpaceError=Math.max(e._priorityReverseScreenSpaceError,n.reverseScreenSpaceError),t.reverseScreenSpaceError=Math.min(e._priorityReverseScreenSpaceError,t.reverseScreenSpaceError)}var Ws=wp;function Gse(){}var pv={stack:new $c,stackMaximumLength:0};Gse.selectTiles=function(e,t){e._selectedTiles.length=0,e._requestedTiles.length=0,e.hasMixedContent=!1;let n=!0,i=e.root;if(i.updateVisibility(t),!i.isVisible)return n;let{touchTile:o,visitTile:r}=Ws,s=pv.stack;for(s.push(i);s.length>0;){pv.stackMaximumLength=Math.max(pv.stackMaximumLength,s.length);let a=s.pop(),l=a.refine===ko.ADD,u=a.refine===ko.REPLACE,f=_6e(a);f&&g6e(a,s,t),(l||u&&!f)&&(y6e(e,a),o(a,t),b6e(a,t),a.hasRenderableContent&&!a.contentAvailable&&(n=!1)),r(a,t)}return pv.stack.trim(pv.stackMaximumLength),n};function _6e(e){return e.children.length===0?!1:e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:(e.hasEmptyContent,!0)}function g6e(e,t,n){let{children:i}=e;for(let o=0;o<i.length;++o){let r=i[o];r.updateVisibility(n),r.isVisible&&t.push(r)}}function y6e(e,t){(t.hasUnloadedRenderableContent||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function b6e(e,t){e.contentAvailable&&e.contentVisibility(t)!==Gt.OUTSIDE&&e.tileset._selectedTiles.push(e)}var lB=Gse;function jse(){}var _v={stack:new $c,stackMaximumLength:0},gv={stack:new $c,stackMaximumLength:0};jse.selectTiles=function(e,t){if(e._requestedTiles.length=0,e.debugFreezeFrame)return;e._selectedTiles.length=0,e._selectedTilesToStyle.length=0,e._emptyTiles.length=0,e.hasMixedContent=!1;let n=e.root;if(Ws.updateTile(n,t),!n.isVisible||n.getScreenSpaceError(t,!0)<=e.memoryAdjustedScreenSpaceError)return;T6e(n,t),_v.stack.trim(_v.stackMaximumLength),gv.stack.trim(gv.stackMaximumLength);let i=e._requestedTiles;for(let o=0;o<i.length;++o)i[o].updatePriority()};function A9(e,t){e.contentAvailable&&Ws.selectTile(e,t)}function x6e(e,t,n){let i=e.refine===ko.REPLACE,{tileset:o,children:r}=e,{updateTile:s,loadTile:a,touchTile:l}=Ws;for(let _=0;_<r.length;++_)s(r[_],n);r.sort(Ws.sortChildrenByDistanceToCamera);let u=i&&e.hasRenderableContent,f=!0,h=!1,m=-1,p=Number.MAX_VALUE;for(let _=0;_<r.length;++_){let b=r[_];if(b.isVisible?(t.push(b),b._foveatedFactor<p&&(m=_,p=b._foveatedFactor),h=!0):(u||o.loadSiblings)&&(b._foveatedFactor<p&&(m=_,p=b._foveatedFactor),a(b,n),l(b,n)),u){let x;b._inRequestVolume?b.hasRenderableContent?x=b.contentAvailable:x=C6e(b,n):x=!1,f=f&&x}}if(h||(f=!1),m!==-1&&i){let _=r[m];_._wasMinPriorityChild=!0;let b=(e._wasMinPriorityChild||e===o.root)&&p<=e._priorityHolder._foveatedFactor?e._priorityHolder:e;b._foveatedFactor=Math.min(_._foveatedFactor,b._foveatedFactor),b._distanceToCamera=Math.min(_._distanceToCamera,b._distanceToCamera);for(let x=0;x<r.length;++x)r[x]._priorityHolder=b}return f}function T6e(e,t){let{tileset:n}=e,{canTraverse:i,loadTile:o,visitTile:r,touchTile:s}=Ws,a=_v.stack;for(a.push(e);a.length>0;){_v.stackMaximumLength=Math.max(_v.stackMaximumLength,a.length);let l=a.pop(),u=l.parent,f=!c(u)||u._refines;l._refines=i(l)?x6e(l,a,t)&&f:!1;let h=!l._refines&&f;l.hasRenderableContent?l.refine===ko.ADD?(A9(l,t),o(l,t)):l.refine===ko.REPLACE&&(o(l,t),h&&A9(l,t)):(n._emptyTiles.push(l),o(l,t),h&&A9(l,t)),r(l,t),s(l,t)}}function C6e(e,t){let{canTraverse:n,updateTile:i,loadTile:o,touchTile:r}=Ws,s=!0,a=gv.stack;for(a.push(e);a.length>0;){gv.stackMaximumLength=Math.max(gv.stackMaximumLength,a.length);let l=a.pop(),u=l.children,f=u.length,h=!l.hasRenderableContent&&n(l);if(!h&&!l.contentAvailable&&(s=!1),i(l,t),l.isVisible||(o(l,t),r(l,t)),h)for(let m=0;m<f;++m){let p=u[m];a.push(p)}}return e.hasEmptyContent||s}var uB=jse;function Wse(){}var yv={stack:new $c,stackMaximumLength:0},bv={stack:new $c,stackMaximumLength:0},Sp={stack:new $c,stackMaximumLength:0,ancestorStack:new $c,ancestorStackMaximumLength:0},E6e=2;Wse.selectTiles=function(e,t){if(e._requestedTiles.length=0,e.debugFreezeFrame)return;e._selectedTiles.length=0,e._selectedTilesToStyle.length=0,e._emptyTiles.length=0,e.hasMixedContent=!1;let n=e.root;if(Ws.updateTile(n,t),!n.isVisible||n.getScreenSpaceError(t,!0)<=e.memoryAdjustedScreenSpaceError)return;I6e(n,t),O6e(n,t),yv.stack.trim(yv.stackMaximumLength),bv.stack.trim(bv.stackMaximumLength),Sp.stack.trim(Sp.stackMaximumLength),Sp.ancestorStack.trim(Sp.ancestorStackMaximumLength);let i=e._requestedTiles;for(let o=0;o<i.length;++o)i[o].updatePriority()};function w6e(e,t){let{updateTile:n,touchTile:i,selectTile:o}=Ws,r=bv.stack;for(r.push(e);r.length>0;){bv.stackMaximumLength=Math.max(bv.stackMaximumLength,r.length);let a=r.pop().children;for(let l=0;l<a.length;++l){let u=a[l];u.isVisible&&(u.contentAvailable?(n(u,t),i(u,t),o(u,t)):u._depth-e._depth<E6e&&r.push(u))}}}function fB(e,t){let n=e.contentAvailable?e:e._ancestorWithContentAvailable;c(n)?n._shouldSelect=!0:w6e(e,t)}function S6e(e,t){e._ancestorWithContent=void 0,e._ancestorWithContentAvailable=void 0;let{parent:n}=e;if(!c(n))return;let i=!n.hasUnloadedRenderableContent||n._requestedFrame===t.frameNumber;e._ancestorWithContent=i?n:n._ancestorWithContent,e._ancestorWithContentAvailable=n.contentAvailable?n:n._ancestorWithContentAvailable}function A6e(e,t){let n=t._ancestorWithContent;return!e.immediatelyLoadDesiredLevelOfDetail&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf||c(n)&&t._screenSpaceError<n._screenSpaceError/e.skipScreenSpaceErrorFactor&&t._depth>n._depth+e.skipLevels)}function v6e(e,t,n){let{tileset:i,children:o}=e,{updateTile:r,loadTile:s,touchTile:a}=Ws;for(let u=0;u<o.length;++u)r(o[u],n);o.sort(Ws.sortChildrenByDistanceToCamera);let l=!1;for(let u=0;u<o.length;++u){let f=o[u];f.isVisible?(t.push(f),l=!0):i.loadSiblings&&(s(f,n),a(f,n))}return l}function D6e(e,t){let{tileset:n}=e;return n.immediatelyLoadDesiredLevelOfDetail?!1:c(e._ancestorWithContent)?e._screenSpaceError===0?e.parent._screenSpaceError>t:e._screenSpaceError>t:!0}function I6e(e,t){let{tileset:n}=e,i=n.immediatelyLoadDesiredLevelOfDetail?Number.MAX_VALUE:Math.max(n.baseScreenSpaceError,n.memoryAdjustedScreenSpaceError),{canTraverse:o,loadTile:r,visitTile:s,touchTile:a}=Ws,l=yv.stack;for(l.push(e);l.length>0;){yv.stackMaximumLength=Math.max(yv.stackMaximumLength,l.length);let u=l.pop();S6e(u,t);let f=u.parent,h=!c(f)||f._refines;u._refines=o(u)?v6e(u,l,t)&&h:!1;let m=!u._refines&&h;u.hasRenderableContent?u.refine===ko.ADD?(fB(u,t),r(u,t)):u.refine===ko.REPLACE&&(D6e(u,i)?(r(u,t),m&&fB(u,t)):m?(fB(u,t),r(u,t)):A6e(n,u)&&r(u,t)):(n._emptyTiles.push(u),r(u,t),m&&fB(u,t)),s(u,t),a(u,t)}}function O6e(e,t){let{selectTile:n,canTraverse:i}=Ws,{stack:o,ancestorStack:r}=Sp,s;for(o.push(e);o.length>0||r.length>0;){if(Sp.stackMaximumLength=Math.max(Sp.stackMaximumLength,o.length),Sp.ancestorStackMaximumLength=Math.max(Sp.ancestorStackMaximumLength,r.length),r.length>0){let u=r.peek();if(u._stackLength===o.length){r.pop(),u!==s&&(u._finalResolution=!1),n(u,t);continue}}let a=o.pop();if(!c(a))continue;let l=i(a);if(a._shouldSelect)if(a.refine===ko.ADD)n(a,t);else{if(a._selectionDepth=r.length,a._selectionDepth>0&&(a.tileset.hasMixedContent=!0),s=a,!l){n(a,t);continue}r.push(a),a._stackLength=o.length}if(l){let u=a.children;for(let f=0;f<u.length;++f){let h=u[f];h.isVisible&&o.push(h)}}}}var dB=Wse;function Ho(e){e=g(e,g.EMPTY_OBJECT),this._url=void 0,this._basePath=void 0,this._root=void 0,this._resource=void 0,this._asset=void 0,this._properties=void 0,this._geometricError=void 0,this._scaledGeometricError=void 0,this._extensionsUsed=void 0,this._extensions=void 0,this._modelUpAxis=void 0,this._modelForwardAxis=void 0,this._cache=new oB,this._processingQueue=[],this._selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this._selectedTilesToStyle=[],this._loadTimestamp=void 0,this._timeSinceLoad=0,this._updatedVisibilityFrame=0,this._updatedModelMatrixFrame=0,this._modelMatrixChanged=!1,this._previousModelMatrix=void 0,this._extras=void 0,this._credits=void 0,this._showCreditsOnScreen=g(e.showCreditsOnScreen,!1),this._cullWithChildrenBounds=g(e.cullWithChildrenBounds,!0),this._allTilesAdditive=!0,this._hasMixedContent=!1,this._stencilClearCommand=void 0,this._backfaceCommands=new $c,this._maximumScreenSpaceError=g(e.maximumScreenSpaceError,16),this._memoryAdjustedScreenSpaceError=this._maximumScreenSpaceError,this._cacheBytes=g(e.cacheBytes,512*1024*1024),C.typeOf.number.greaterThanOrEquals("cacheBytes",this._cacheBytes,0);let t=g(e.maximumCacheOverflowBytes,512*1024*1024);C.typeOf.number.greaterThanOrEquals("maximumCacheOverflowBytes",t,0),this._maximumCacheOverflowBytes=t,this._styleEngine=new cB,this._styleApplied=!1,this._modelMatrix=c(e.modelMatrix)?N.clone(e.modelMatrix):N.clone(N.IDENTITY),this._addHeightCallbacks=[],this._statistics=new Sg,this._statisticsLast=new Sg,this._statisticsPerPass=new Array(dr.NUMBER_OF_PASSES);for(let o=0;o<dr.NUMBER_OF_PASSES;++o)this._statisticsPerPass[o]=new Sg;this._requestedTilesInFlight=[],this._maximumPriority={foveatedFactor:-Number.MAX_VALUE,depth:-Number.MAX_VALUE,distance:-Number.MAX_VALUE,reverseScreenSpaceError:-Number.MAX_VALUE},this._minimumPriority={foveatedFactor:Number.MAX_VALUE,depth:Number.MAX_VALUE,distance:Number.MAX_VALUE,reverseScreenSpaceError:Number.MAX_VALUE},this._heatmap=new sB(e.debugHeatmapTilePropertyName),this.cullRequestsWhileMoving=g(e.cullRequestsWhileMoving,!0),this._cullRequestsWhileMoving=!1,this.cullRequestsWhileMovingMultiplier=g(e.cullRequestsWhileMovingMultiplier,60),this.progressiveResolutionHeightFraction=O.clamp(g(e.progressiveResolutionHeightFraction,.3),0,.5),this.preferLeaves=g(e.preferLeaves,!1),this._tilesLoaded=!1,this._initialTilesLoaded=!1,this._tileDebugLabels=void 0,this._classificationType=e.classificationType,this._ellipsoid=g(e.ellipsoid,Z.WGS84),this._initialClippingPlanesOriginMatrix=N.IDENTITY,this._clippingPlanesOriginMatrix=void 0,this._clippingPlanesOriginMatrixDirty=!0,this._vectorClassificationOnly=g(e.vectorClassificationOnly,!1),this._vectorKeepDecodedPositions=g(e.vectorKeepDecodedPositions,!1),this.preloadWhenHidden=g(e.preloadWhenHidden,!1),this.preloadFlightDestinations=g(e.preloadFlightDestinations,!0),this._pass=void 0,this.dynamicScreenSpaceError=g(e.dynamicScreenSpaceError,!0),this.foveatedScreenSpaceError=g(e.foveatedScreenSpaceError,!0),this._foveatedConeSize=g(e.foveatedConeSize,.1),this._foveatedMinimumScreenSpaceErrorRelaxation=g(e.foveatedMinimumScreenSpaceErrorRelaxation,0),this.foveatedInterpolationCallback=g(e.foveatedInterpolationCallback,O.lerp),this.foveatedTimeDelay=g(e.foveatedTimeDelay,.2),this.dynamicScreenSpaceErrorDensity=g(e.dynamicScreenSpaceErrorDensity,2e-4),this.dynamicScreenSpaceErrorFactor=g(e.dynamicScreenSpaceErrorFactor,24),this.dynamicScreenSpaceErrorHeightFalloff=g(e.dynamicScreenSpaceErrorHeightFalloff,.25),this._dynamicScreenSpaceErrorComputedDensity=0,this.shadows=g(e.shadows,yn.ENABLED),this.show=g(e.show,!0),this.colorBlendMode=O_.HIGHLIGHT,this.colorBlendAmount=.5,this._pointCloudShading=new np(e.pointCloudShading),this._pointCloudEyeDomeLighting=new sg,this.loadProgress=new fe,this.allTilesLoaded=new fe,this.initialTilesLoaded=new fe,this.tileLoad=new fe,this.tileUnload=new fe,this.tileFailed=new fe,this.tileVisible=new fe,this.skipLevelOfDetail=g(e.skipLevelOfDetail,!1),this._disableSkipLevelOfDetail=!1,this.baseScreenSpaceError=g(e.baseScreenSpaceError,1024),this.skipScreenSpaceErrorFactor=g(e.skipScreenSpaceErrorFactor,16),this.skipLevels=g(e.skipLevels,1),this.immediatelyLoadDesiredLevelOfDetail=g(e.immediatelyLoadDesiredLevelOfDetail,!1),this.loadSiblings=g(e.loadSiblings,!1),this._clippingPlanes=void 0,c(e.clippingPlanes)&&as.setOwner(e.clippingPlanes,this,"_clippingPlanes"),this._clippingPolygons=void 0,c(e.clippingPolygons)&&Ch.setOwner(e.clippingPolygons,this,"_clippingPolygons"),c(e.imageBasedLighting)?(this._imageBasedLighting=e.imageBasedLighting,this._shouldDestroyImageBasedLighting=!1):(this._imageBasedLighting=new wT,this._shouldDestroyImageBasedLighting=!0),this._environmentMapManager=new tg(e.environmentMapOptions),this.lightColor=e.lightColor,this.backFaceCulling=g(e.backFaceCulling,!0),this._enableShowOutline=g(e.enableShowOutline,!0),this.showOutline=g(e.showOutline,!0),this.outlineColor=g(e.outlineColor,z.BLACK),this.splitDirection=g(e.splitDirection,Nr.NONE),this.enableCollision=g(e.enableCollision,!1),this._projectTo2D=g(e.projectTo2D,!1),this._enablePick=g(e.enablePick,!1),this.debugFreezeFrame=g(e.debugFreezeFrame,!1),this.debugColorizeTiles=g(e.debugColorizeTiles,!1),this._enableDebugWireframe=g(e.enableDebugWireframe,!1),this.debugWireframe=g(e.debugWireframe,!1),this.debugWireframe===!0&&this._enableDebugWireframe===!1&&mt("tileset-debug-wireframe-ignored","enableDebugWireframe must be set to true in the Cesium3DTileset constructor, otherwise debugWireframe will be ignored."),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.debugShowContentBoundingVolume=g(e.debugShowContentBoundingVolume,!1),this.debugShowViewerRequestVolume=g(e.debugShowViewerRequestVolume,!1),this._tileDebugLabels=void 0,this.debugPickedTileLabelOnly=!1,this.debugPickedTile=void 0,this.debugPickPosition=void 0,this.debugShowGeometricError=g(e.debugShowGeometricError,!1),this.debugShowRenderingStatistics=g(e.debugShowRenderingStatistics,!1),this.debugShowMemoryUsage=g(e.debugShowMemoryUsage,!1),this.debugShowUrl=g(e.debugShowUrl,!1),this.examineVectorLinesFunction=void 0,this._metadataExtension=void 0,this._customShader=e.customShader;let n=g(e.featureIdLabel,"featureId_0");typeof n=="number"&&(n=`featureId_${n}`),this._featureIdLabel=n;let i=g(e.instanceFeatureIdLabel,"instanceFeatureId_0");typeof i=="number"&&(i=`instanceFeatureId_${i}`),this._instanceFeatureIdLabel=i}Object.defineProperties(Ho.prototype,{isCesium3DTileset:{get:function(){return!0}},asset:{get:function(){return this._asset}},extensions:{get:function(){return this._extensions}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){as.setOwner(e,this,"_clippingPlanes")}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){Ch.setOwner(e,this,"_clippingPolygons")}},properties:{get:function(){return this._properties}},tilesLoaded:{get:function(){return this._tilesLoaded}},resource:{get:function(){return this._resource}},basePath:{get:function(){return os("Cesium3DTileset.basePath","Cesium3DTileset.basePath has been deprecated. All tiles are relative to the url of the tileset JSON file that contains them. Use the url property instead."),this._basePath}},style:{get:function(){return this._styleEngine.style},set:function(e){this._styleEngine.style=e}},customShader:{get:function(){return this._customShader},set:function(e){this._customShader=e}},hasMixedContent:{get:function(){return this._hasMixedContent},set:function(e){C.typeOf.bool("value",e),this._hasMixedContent=e}},isSkippingLevelOfDetail:{get:function(){return this.skipLevelOfDetail&&!c(this._classificationType)&&!this._disableSkipLevelOfDetail&&!this._allTilesAdditive}},metadataExtension:{get:function(){return this._metadataExtension}},metadata:{get:function(){if(c(this._metadataExtension))return this._metadataExtension.tileset}},schema:{get:function(){if(c(this._metadataExtension))return this._metadataExtension.schema}},maximumScreenSpaceError:{get:function(){return this._maximumScreenSpaceError},set:function(e){C.typeOf.number.greaterThanOrEquals("maximumScreenSpaceError",e,0),this._maximumScreenSpaceError=e,this._memoryAdjustedScreenSpaceError=e}},cacheBytes:{get:function(){return this._cacheBytes},set:function(e){C.typeOf.number.greaterThanOrEquals("value",e,0),this._cacheBytes=e}},maximumCacheOverflowBytes:{get:function(){return this._maximumCacheOverflowBytes},set:function(e){C.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumCacheOverflowBytes=e}},memoryAdjustedScreenSpaceError:{get:function(){return this._memoryAdjustedScreenSpaceError}},pointCloudShading:{get:function(){return this._pointCloudShading},set:function(e){C.defined("pointCloudShading",e),this._pointCloudShading=e}},root:{get:function(){return this._root}},boundingSphere:{get:function(){return this._root.updateTransform(this._modelMatrix),this._root.boundingSphere}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=N.clone(e,this._modelMatrix)}},timeSinceLoad:{get:function(){return this._timeSinceLoad}},totalMemoryUsageInBytes:{get:function(){let e=this._statistics;return e.texturesByteLength+e.geometryByteLength+e.batchTableByteLength}},clippingPlanesOriginMatrix:{get:function(){return c(this._clippingPlanesOriginMatrix)?(this._clippingPlanesOriginMatrixDirty&&(N.multiply(this.root.computedTransform,this._initialClippingPlanesOriginMatrix,this._clippingPlanesOriginMatrix),this._clippingPlanesOriginMatrixDirty=!1),this._clippingPlanesOriginMatrix):N.IDENTITY}},styleEngine:{get:function(){return this._styleEngine}},statistics:{get:function(){return this._statistics}},classificationType:{get:function(){return this._classificationType}},ellipsoid:{get:function(){return this._ellipsoid}},foveatedConeSize:{get:function(){return this._foveatedConeSize},set:function(e){C.typeOf.number.greaterThanOrEquals("foveatedConeSize",e,0),C.typeOf.number.lessThanOrEquals("foveatedConeSize",e,1),this._foveatedConeSize=e}},foveatedMinimumScreenSpaceErrorRelaxation:{get:function(){return this._foveatedMinimumScreenSpaceErrorRelaxation},set:function(e){C.typeOf.number.greaterThanOrEquals("foveatedMinimumScreenSpaceErrorRelaxation",e,0),C.typeOf.number.lessThanOrEquals("foveatedMinimumScreenSpaceErrorRelaxation",e,this.maximumScreenSpaceError),this._foveatedMinimumScreenSpaceErrorRelaxation=e}},extras:{get:function(){return this._extras}},imageBasedLighting:{get:function(){return this._imageBasedLighting},set:function(e){C.typeOf.object("imageBasedLighting",this._imageBasedLighting),e!==this._imageBasedLighting&&(this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=e,this._shouldDestroyImageBasedLighting=!1)}},environmentMapManager:{get:function(){return this._environmentMapManager}},vectorClassificationOnly:{get:function(){return this._vectorClassificationOnly}},vectorKeepDecodedPositions:{get:function(){return this._vectorKeepDecodedPositions}},showCreditsOnScreen:{get:function(){return this._showCreditsOnScreen},set:function(e){this._showCreditsOnScreen=e,Qse(this)}},featureIdLabel:{get:function(){return this._featureIdLabel},set:function(e){typeof e=="number"&&(e=`featureId_${e}`),C.typeOf.string("value",e),this._featureIdLabel=e}},instanceFeatureIdLabel:{get:function(){return this._instanceFeatureIdLabel},set:function(e){typeof e=="number"&&(e=`instanceFeatureId_${e}`),C.typeOf.string("value",e),this._instanceFeatureIdLabel=e}}});Ho.fromIonAssetId=async function(e,t){C.defined("assetId",e);let n=await Uu.fromAssetId(e);return Ho.fromUrl(n,t)};Ho.fromUrl=async function(e,t){C.defined("url",e),t=g(t,g.EMPTY_OBJECT);let n=Te.createIfNeeded(e),i;n.extension==="json"?i=n.getBaseUri(!0):n.isDataUri&&(i="");let o=await Ho.loadJson(n),r=await P6e(n,o),s=new Ho(t);s._resource=n,s._url=n.url,s._basePath=i,s._metadataExtension=r,s._geometricError=o.geometricError,s._scaledGeometricError=o.geometricError;let a=o.asset;s._asset=a,s._extras=o.extras,Qse(s);let l=c(o.asset.gltfUpAxis)?vo.fromName(o.asset.gltfUpAxis):vo.Y,u=g(t.modelUpAxis,l),f=g(t.modelForwardAxis,vo.X);s._properties=o.properties,s._extensionsUsed=o.extensionsUsed,s._extensions=o.extensions,s._modelUpAxis=u,s._modelForwardAxis=f,s._root=s.loadTileset(n,o);let m=s._root.createBoundingVolume(o.root.boundingVolume,N.IDENTITY).boundingSphere.center,p=s._ellipsoid.cartesianToCartographic(m);return c(p)&&p.height>ai._defaultMinTerrainHeight&&(s._initialClippingPlanesOriginMatrix=Lt.eastNorthUpToFixedFrame(m)),s._clippingPlanesOriginMatrix=N.clone(s._initialClippingPlanesOriginMatrix),s};Ho.loadJson=function(e){return Te.createIfNeeded(e).fetchJson()};Ho.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()};Ho.prototype.loadTileset=function(e,t,n){let i=t.asset;if(!c(i))throw new ie("Tileset must have an asset property.");if(i.version!=="0.0"&&i.version!=="1.0"&&i.version!=="1.1")throw new ie("The tileset must be 3D Tiles version 0.0, 1.0, or 1.1");c(t.extensionsRequired)&&Ho.checkSupportedExtensions(t.extensionsRequired);let o=this._statistics,r=i.tilesetVersion;c(r)&&(this._basePath+=`?v=${r}`,e=e.clone(),e.setQueryParameters({v:r}));let s=qse(this,e,t.root,n);c(n)&&(n.children.push(s),s._depth=n._depth+1);let a=[];for(a.push(s);a.length>0;){let l=a.pop();++o.numberOfTilesTotal,this._allTilesAdditive=this._allTilesAdditive&&l.refine===ko.ADD;let u=l._header.children;if(c(u))for(let f=0;f<u.length;++f){let h=u[f],m=qse(this,e,h,l);l.children.push(m),m._depth=l._depth+1,a.push(m)}this._cullWithChildrenBounds&&nB.checkChildrenWithinParent(l)}return s};function qse(e,t,n,i){if(!(c(n.implicitTiling)||ei(n,"3DTILES_implicit_tiling")))return new ad(e,t,n,i);let r=e.schema,s=new LC(t,n,r),a=new NC({subdivisionScheme:s.subdivisionScheme,subtreeLevels:s.subtreeLevels,level:0,x:0,y:0,z:0}),l=s.subtreeUriTemplate.getDerivedResource({templateValues:a.getTemplateValues()}).url,f=ze(n,!0);f.contents=[{uri:l}],delete f.content,delete f.extensions;let h=new ad(e,t,f,i);return h.implicitTileset=s,h.implicitCoordinates=a,h}async function P6e(e,t){let n=ei(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t,i;if(c(n.schemaUri))e=e.getDerivedResource({url:n.schemaUri}),i=Fi.getSchemaLoader({resource:e});else if(c(n.schema))i=Fi.getSchemaLoader({schema:n.schema});else return;await i.load();let o=new RC({schema:i.schema,metadataJson:n});return Fi.unload(i),o}var Yse=new d,R6e=new re,M6e=new N,L6e=new d,N6e=new d,F6e=new d,B6e=new d;function k6e(e,t){let n,i,o,r,s,a=t.camera,l=e._root,u=l.contentBoundingVolume;if(u instanceof rd)n=d.normalize(a.positionWC,Yse),i=a.directionWC,o=a.positionCartographic.height,r=u.minimumHeight,s=u.maximumHeight;else{let b=N.inverseTransformation(l.computedTransform,M6e),x=t.mapProjection.ellipsoid,T=u.boundingVolume,E=N.multiplyByPoint(b,T.center,L6e);if(d.magnitude(E)>x.minimumRadius){let S=re.fromCartesian(E,x,R6e);n=d.normalize(a.positionWC,Yse),i=a.directionWC,o=a.positionCartographic.height,r=0,s=S.height*2}else{let S=N.multiplyByPoint(b,a.positionWC,N6e);if(n=d.UNIT_Z,i=N.multiplyByPointAsVector(b,a.directionWC,F6e),i=d.normalize(i,i),o=S.z,u instanceof af){let A=q.getColumn(T.halfAxes,2,B6e),v=d.magnitude(A);r=E.z-v,s=E.z+v}else if(u instanceof Eg){let A=T.radius;r=E.z-A,s=E.z+A}}}let f=e.dynamicScreenSpaceErrorHeightFalloff,h=r+(s-r)*f,m=s,p=O.clamp((o-h)/(m-h),0,1),_=1-Math.abs(d.dot(i,n));_=_*(1-p),e._dynamicScreenSpaceErrorComputedDensity=e.dynamicScreenSpaceErrorDensity*_}function U6e(e,t){if(t.hasEmptyContent)return;let{statistics:n}=e,i=t.contentExpired,o=t.requestContent();c(o)&&(o.then(r=>{!c(r)||t.isDestroyed()||e.isDestroyed()||(e._processingQueue.push(t),++n.numberOfTilesProcessing)}).catch(r=>{$se(r,e,t)}),i&&(t.hasTilesetContent||t.hasImplicitContent?Q6e(e,t):(n.decrementLoadCounts(t.content),--n.numberOfTilesWithContentReady)),e._requestedTilesInFlight.push(t))}function Kse(e,t){return e._priority-t._priority}Ho.prototype.postPassesUpdate=function(e){c(this._root)&&(z6e(this,e),tqe(this,e),this._cache.unloadTiles(this,Jse),this._styleApplied&&this._styleEngine.resetDirty(),this._styleApplied=!1)};Ho.prototype.prePassesUpdate=function(e){if(!c(this._root))return;Y6e(this,e);let t=this._clippingPlanes;this._clippingPlanesOriginMatrixDirty=!0,c(t)&&t.enabled&&t.update(e);let n=this._clippingPolygons;c(n)&&n.enabled&&n.update(e),c(this._loadTimestamp)||(this._loadTimestamp=K.clone(e.time)),this._timeSinceLoad=Math.max(K.secondsDifference(e.time,this._loadTimestamp)*1e3,0),this.dynamicScreenSpaceError&&k6e(this,e),e.newFrame&&this._cache.reset()};function z6e(e,t){let n=e._requestedTilesInFlight,i=0;for(let o=0;o<n.length;++o){let r=n[o],s=t.frameNumber-r._touchedFrame>=1;if(r._contentState!==zo.LOADING){++i;continue}else if(s){r.cancelRequests(),++i;continue}i>0&&(n[o-i]=r)}n.length-=i}function V6e(e){let t=e._requestedTiles;t.sort(Kse);for(let n=0;n<t.length;++n)U6e(e,t[n])}function $se(e,t,n){if(t.isDestroyed())return;let i;n.isDestroyed()||(i=n._contentResource.url);let o=c(e.message)?e.message:e.toString();t.tileFailed.numberOfListeners>0?t.tileFailed.raiseEvent({url:i,message:o}):(console.log(`A 3D tile failed to load: ${i}`),console.log(`Error: ${o}`),console.log(e.stack))}function H6e(e){let t=e._processingQueue,n=0;for(let i=0;i<t.length;++i){let o=t[i];if(o.isDestroyed()||o._contentState!==zo.PROCESSING){++n;continue}n>0&&(t[i-n]=o)}t.length-=n}var G6e=new re,j6e=new re,W6e=new d;function q6e(e,t,n){if(!e.enableCollision||!e.show)return;let i=e._addHeightCallbacks,o=t.boundingSphere;for(let r of i){if(r.invoked||t._wasSelectedLastFrame)continue;let s=r.ellipsoid,a=re.clone(r.positionCartographic,G6e),l=re.fromCartesian(o.center,s,j6e);c(l)&&(a.height=l.height);let u=re.toCartesian(a,s,W6e);d.distance(u,o.center)<=o.radius&&n.afterRender.push(()=>{c(r.callback)&&r.callback(a),r.invoked=!1})}}function Y6e(e,t){H6e(e);let n=e._processingQueue,{cacheBytes:i,maximumCacheOverflowBytes:o,statistics:r}=e,s=i+o,a=!1;for(let l=0;l<n.length;++l){if(e.totalMemoryUsageInBytes>s){a=!0;break}let u=n[l];try{u.process(e,t),u.contentReady&&(--r.numberOfTilesProcessing,e.tileLoad.raiseEvent(u))}catch(f){--r.numberOfTilesProcessing,$se(f,e,u)}}e.totalMemoryUsageInBytes<i?K6e(e):a&&n.length>0&&X6e(e)}function X6e(e){mt("increase-screenSpaceError",`The tiles needed to meet maximumScreenSpaceError would use more memory than allocated for this tileset.
| The tileset will be rendered with a larger screen space error (see memoryAdjustedScreenSpaceError).
| Consider using larger values for cacheBytes and maximumCacheOverflowBytes.`),e._memoryAdjustedScreenSpaceError*=1.02;let t=e._processingQueue;for(let n=0;n<t.length;++n)t[n].updatePriority();t.sort(Kse)}function K6e(e){e._memoryAdjustedScreenSpaceError=Math.max(e.memoryAdjustedScreenSpaceError/1.02,e.maximumScreenSpaceError)}var hB=new d,$6e={maximumFractionDigits:3};function Xse(e){let t=e/1048576;return t<1?t.toLocaleString(void 0,$6e):Math.round(t).toLocaleString()}function v9(e){let{halfAxes:t,radius:n,center:i}=e.boundingVolume.boundingVolume,o=d.clone(i,hB);if(c(t))o.x+=.75*(t[0]+t[3]+t[6]),o.y+=.75*(t[1]+t[4]+t[7]),o.z+=.75*(t[2]+t[5]+t[8]);else if(c(n)){let r=d.normalize(i,hB);r=d.multiplyByScalar(r,.75*n,hB),o=d.add(r,i,hB)}return o}function D9(e,t,n){let i="",o=0;if(t.debugShowGeometricError&&(i+=`
| Geometric error: ${e.geometricError}`,o++),t.debugShowRenderingStatistics&&(i+=`
| Commands: ${e.commandsLength}`,o++,e.content.pointsLength>0&&(i+=`
| Points: ${e.content.pointsLength}`,o++),e.content.trianglesLength>0&&(i+=`
| Triangles: ${e.content.trianglesLength}`,o++),i+=`
| Features: ${e.content.featuresLength}`,o++),t.debugShowMemoryUsage&&(i+=`
| Texture Memory: ${Xse(e.content.texturesByteLength)}`,i+=`
| Geometry Memory: ${Xse(e.content.geometryByteLength)}`,o+=2),t.debugShowUrl)if(e.hasMultipleContents){i+=`
| Urls:`;let s=e.content.innerContentUrls;for(let a=0;a<s.length;a++)i+=`
| - ${s[a]}`;o+=s.length}else i+=`
| Url: ${e._contentHeader.uri}`,o++;let r={text:i.substring(1),position:n,font:`${19-o}px sans-serif`,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY};return t._tileDebugLabels.add(r)}function Z6e(e,t){let n=e._selectedTiles,i=n.length,o=e._emptyTiles,r=o.length;if(e._tileDebugLabels.removeAll(),e.debugPickedTileLabelOnly){if(c(e.debugPickedTile)){let s=c(e.debugPickPosition)?e.debugPickPosition:v9(e.debugPickedTile),a=D9(e.debugPickedTile,e,s);a.pixelOffset=new k(15,-15)}}else{for(let s=0;s<i;++s){let a=n[s];D9(a,e,v9(a))}for(let s=0;s<r;++s){let a=o[s];(a.hasTilesetContent||a.hasImplicitContent)&&D9(a,e,v9(a))}}e._tileDebugLabels.update(t)}function J6e(e,t,n){e._styleEngine.applyStyle(e),e._styleApplied=!0;let{commandList:i,context:o}=t,r=i.length,s=e._selectedTiles,a=e.isSkippingLevelOfDetail&&e._hasMixedContent&&o.stencilBuffer&&s.length>0;e._backfaceCommands.length=0,a&&(c(e._stencilClearCommand)||(e._stencilClearCommand=new $n({stencil:0,pass:xe.CESIUM_3D_TILE,renderState:Fe.fromCache({stencilMask:kt.SKIP_LOD_MASK})})),i.push(e._stencilClearCommand));let{statistics:l,tileVisible:u}=e,f=n.isRender,h=i.length;for(let _=0;_<s.length;++_){let b=s[_];f&&u.raiseEvent(b),q6e(e,b,t),b.update(e,t,n),l.incrementSelectionCounts(b.content),++l.selected}let m=e._emptyTiles;for(let _=0;_<m.length;++_)m[_].update(e,t,n);let p=i.length-h;if(e._backfaceCommands.trim(),a){let _=e._backfaceCommands.values,b=_.length;i.length+=b;for(let x=p-1;x>=0;--x)i[h+b+x]=i[h+x];for(let x=0;x<b;++x)i[h+x]=_[x]}p=i.length-r,l.numberOfCommands=p,f&&(e.pointCloudShading.attenuation&&e.pointCloudShading.eyeDomeLighting&&p>0&&e._pointCloudEyeDomeLighting.update(t,r,e.pointCloudShading,e.boundingSphere),e.debugShowGeometricError||e.debugShowRenderingStatistics||e.debugShowMemoryUsage||e.debugShowUrl?(c(e._tileDebugLabels)||(e._tileDebugLabels=new hp),Z6e(e,t)):e._tileDebugLabels=e._tileDebugLabels&&e._tileDebugLabels.destroy())}var Zse=[];function Q6e(e,t){let n=t,i=Zse;for(i.push(t);i.length>0;){t=i.pop();let o=t.children;for(let r=0;r<o.length;++r)i.push(o[r]);t!==n&&(eqe(e,t),--e._statistics.numberOfTilesTotal)}n.children=[]}function Jse(e,t){e.tileUnload.raiseEvent(t),e._statistics.decrementLoadCounts(t.content),--e._statistics.numberOfTilesWithContentReady,t.unloadContent()}function eqe(e,t){e._cache.unloadTile(e,t,Jse),t.destroy()}Ho.prototype.trimLoadedTiles=function(){this._cache.trim()};function tqe(e,t){let n=e._statistics,i=e._statisticsLast,o=n.numberOfPendingRequests,r=n.numberOfTilesProcessing,s=i.numberOfPendingRequests,a=i.numberOfTilesProcessing;Sg.clone(n,i);let l=o!==s||r!==a;l&&t.afterRender.push(function(){return e.loadProgress.raiseEvent(o,r),!0}),e._tilesLoaded=n.numberOfPendingRequests===0&&n.numberOfTilesProcessing===0&&n.numberOfAttemptedRequests===0,l&&e._tilesLoaded&&(t.afterRender.push(function(){return e.allTilesLoaded.raiseEvent(),!0}),e._initialTilesLoaded||(e._initialTilesLoaded=!0,t.afterRender.push(function(){return e.initialTilesLoaded.raiseEvent(),!0})))}function nqe(e){e._heatmap.resetMinimumMaximum(),e._minimumPriority.depth=Number.MAX_VALUE,e._maximumPriority.depth=-Number.MAX_VALUE,e._minimumPriority.foveatedFactor=Number.MAX_VALUE,e._maximumPriority.foveatedFactor=-Number.MAX_VALUE,e._minimumPriority.distance=Number.MAX_VALUE,e._maximumPriority.distance=-Number.MAX_VALUE,e._minimumPriority.reverseScreenSpaceError=Number.MAX_VALUE,e._maximumPriority.reverseScreenSpaceError=-Number.MAX_VALUE}function iqe(e,t){t.frameNumber===e._updatedModelMatrixFrame&&c(e._previousModelMatrix)||(e._updatedModelMatrixFrame=t.frameNumber,e._modelMatrixChanged=!N.equals(e.modelMatrix,e._previousModelMatrix),e._modelMatrixChanged&&(e._previousModelMatrix=N.clone(e.modelMatrix,e._previousModelMatrix)))}function oqe(e,t,n,i){if(t.mode===J.MORPHING||!c(e._root))return!1;let o=e._statistics;o.clear(),++e._updatedVisibilityFrame,nqe(e),iqe(e,t),e._cullRequestsWhileMoving=e.cullRequestsWhileMoving&&!e._modelMatrixChanged;let r=e.getTraversal(i).selectTiles(e,t);if(i.requestTiles&&V6e(e),J6e(e,t,i),Sg.clone(o,n),i.isRender){let s=e._credits;if(c(s)&&o.selected!==0)for(let a=0;a<s.length;++a){let l=s[a];t.creditDisplay.addCreditToNextFrame(l)}}return r}function Qse(e){let t=e._credits;c(t)||(t=[]),t.length=0,c(e.resource.credits)&&e.resource.credits.forEach(i=>{t.push(St.clone(i))});let n=e.asset.extras;if(c(n)&&c(n.cesium)&&c(n.cesium.credits)){let i=n.cesium.credits;for(let o=0;o<i.length;++o){let r=i[o];t.push(new St(r.html))}}t.forEach(i=>i.showOnScreen=i.showOnScreen||e._showCreditsOnScreen),e._credits=t}Ho.prototype.getTraversal=function(e){let{pass:t}=e;return t===dr.MOST_DETAILED_PRELOAD||t===dr.MOST_DETAILED_PICK?lB:this.isSkippingLevelOfDetail?dB:uB};Ho.prototype.update=function(e){this.updateForPass(e,e.tilesetPassState)};Ho.prototype.updateForPass=function(e,t){C.typeOf.object("frameState",e),C.typeOf.object("tilesetPassState",t);let n=t.pass;if(n===dr.PRELOAD&&(!this.preloadWhenHidden||this.show)||n===dr.PRELOAD_FLIGHT&&(!this.preloadFlightDestinations||!this.show&&!this.preloadWhenHidden)||n===dr.REQUEST_RENDER_MODE_DEFER_CHECK&&(!this._cullRequestsWhileMoving&&this.foveatedTimeDelay<=0||!this.show))return;let i=e.commandList,o=e.camera,r=e.cullingVolume;t.ready=!1;let s=dr.getPassOptions(n),a=s.ignoreCommands,l=g(t.commandList,i),u=l.length;if(e.commandList=l,e.camera=g(t.camera,o),e.cullingVolume=g(t.cullingVolume,r),s.isRender){let m=this._environmentMapManager;c(this._root)&&(m.position=this.boundingSphere.center),m.update(e)}let f=this._clippingPolygons;c(f)&&f.enabled&&f.queueCommands(e);let h=this._statisticsPerPass[n];(this.show||a)&&(this._pass=n,t.ready=oqe(this,e,h,s)),a&&(l.length=u),e.commandList=i,e.camera=o,e.cullingVolume=r};Ho.prototype.hasExtension=function(e){return c(this._extensionsUsed)?this._extensionsUsed.indexOf(e)>-1:!1};Ho.prototype.isDestroyed=function(){return!1};Ho.prototype.destroy=function(){if(this._tileDebugLabels=this._tileDebugLabels&&this._tileDebugLabels.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._clippingPolygons=this._clippingPolygons&&this._clippingPolygons.destroy(),c(this._root)){let e=Zse;for(e.push(this._root);e.length>0;){let t=e.pop();t.destroy();let n=t.children;for(let i=0;i<n.length;++i)e.push(n[i])}}return this._root=void 0,this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=void 0,this._environmentMapManager.isDestroyed()||this._environmentMapManager.destroy(),this._environmentMapManager=void 0,ue(this)};Ho.supportedExtensions={"3DTILES_metadata":!0,"3DTILES_implicit_tiling":!0,"3DTILES_content_gltf":!0,"3DTILES_multiple_contents":!0,"3DTILES_bounding_volume_S2":!0,"3DTILES_batch_table_hierarchy":!0,"3DTILES_draco_point_compression":!0,MAXAR_content_geojson:!0};Ho.checkSupportedExtensions=function(e){for(let t=0;t<e.length;t++)if(!Ho.supportedExtensions[e[t]])throw new ie(`Unsupported 3D Tiles Extension: ${e[t]}`)};var rqe=new mn,sqe=new d,aqe=new re;Ho.prototype.getHeight=function(e,t){var s;C.typeOf.object("cartographic",e),C.typeOf.object("scene",t);let n=t.ellipsoid;c(n)||(n=Z.WGS84);let i=rqe,o=n.cartographicToCartesian(e,i.direction);d.normalize(i.direction,i.direction),i.direction=d.normalize(o,i.direction),i.direction=d.negate(o,i.direction),i.origin=d.multiplyByScalar(i.direction,-2*n.maximumRadius,i.origin);let r=this.pick(i,t.frameState,sqe);if(c(r))return(s=n.cartesianToCartographic(r,aqe))==null?void 0:s.height};Ho.prototype.updateHeight=function(e,t,n){n=g(n,Z.WGS84);let i={positionCartographic:e,ellipsoid:n,callback:t,invoked:!1},o=()=>{let r=this._addHeightCallbacks,s=r.length;for(let a=0;a<s;++a)if(r[a]===i){r.splice(a,1);break}i.callback&&(i.callback=void 0)};return this._addHeightCallbacks.push(i),o};var cqe=new Da,lqe=new d;Ho.prototype.pick=function(e,t,n){if(!t.context.webgl2&&!this._enablePick)return;let i=this._selectedTiles,o=i.length,r=[];for(let l=0;l<o;++l){let u=i[l],f=Yn.raySphere(e,u.contentBoundingVolume.boundingSphere,cqe);!c(f)||!c(u.content)||r.push(u)}let s=r.length;r.sort((l,u)=>{let f=ne.distanceSquaredTo(l.contentBoundingVolume.boundingSphere,e.origin),h=ne.distanceSquaredTo(u.contentBoundingVolume.boundingSphere,e.origin);return f-h});let a;for(let l=0;l<s;++l){let f=r[l].content.pick(e,t,lqe);if(c(f))return a=d.clone(f,n),a}};var ol=Ho;var uqe=new N;function Ag(e,t){if(!c(e))throw new w("scene is required.");if(!c(t))throw new w("entityCollection is required.");t.collectionChanged.addEventListener(Ag.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._tilesetHash={},this._entitiesToVisualize=new Et,this._onCollectionChanged(t,t.values,[],[])}Ag.prototype.update=function(e){if(!c(e))throw new w("time is required.");let t=this._entitiesToVisualize.values,n=this._tilesetHash,i=this._primitives;for(let o=0,r=t.length;o<r;o++){let s=t[o],a=s._tileset,l,u=n[s.id],f=s.isShowing&&s.isAvailable(e)&&G.getValueOrDefault(a._show,e,!0),h;f&&(h=s.computeModelMatrix(e,uqe),l=Te.createIfNeeded(G.getValueOrUndefined(a._uri,e)));let m=c(u)?u.tilesetPrimitive:void 0;if(!f){c(m)&&(m.show=!1);continue}(!c(u)||l.url!==u.url)&&(c(m)&&i.removeAndDestroy(m),delete n[s.id],fqe(l,n,s,i)),c(m)&&(m.show=!0,c(h)&&(m.modelMatrix=h),m.maximumScreenSpaceError=G.getValueOrDefault(a.maximumScreenSpaceError,e,m.maximumScreenSpaceError))}return!0};Ag.prototype.isDestroyed=function(){return!1};Ag.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Ag.prototype._onCollectionChanged,this);let e=this._entitiesToVisualize.values,t=this._tilesetHash,n=this._primitives;for(let i=e.length-1;i>-1;i--)I9(this,e[i],t,n);return ue(this)};Ag.prototype.getBoundingSphere=function(e,t){if(!c(e))throw new w("entity is required.");if(!c(t))throw new w("result is required.");let n=this._tilesetHash[e.id];if(!c(n)||n.loadFail)return lt.FAILED;let i=n.tilesetPrimitive;return c(i)?i.show?(ne.clone(i.boundingSphere,t),lt.DONE):lt.FAILED:lt.PENDING};Ag.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._entitiesToVisualize,a=this._tilesetHash,l=this._primitives;for(o=t.length-1;o>-1;o--)r=t[o],c(r._tileset)&&s.set(r.id,r);for(o=i.length-1;o>-1;o--)r=i[o],c(r._tileset)?s.set(r.id,r):(I9(this,r,a,l),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],I9(this,r,a,l),s.remove(r.id)};function I9(e,t,n,i){let o=n[t.id];c(o)&&(c(o.tilesetPrimitive)&&i.removeAndDestroy(o.tilesetPrimitive),delete n[t.id])}async function fqe(e,t,n,i){t[n.id]={url:e.url,loadFail:!1};try{let o=await ol.fromUrl(e);if(o.id=n,i.add(o),!c(t[n.id]))return;t[n.id].tilesetPrimitive=o}catch(o){console.error(o),t[n.id].loadFail=!0}}var mB=Ag;var dqe=z.WHITE,hqe=z.BLACK,mqe=new k(2,2);function FC(e){e=g(e,g.EMPTY_OBJECT),this._definitionChanged=new fe,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.repeat=e.repeat}Object.defineProperties(FC.prototype,{isConstant:{get:function(){return G.isConstant(this._evenColor)&&G.isConstant(this._oddColor)&&G.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:oe("evenColor"),oddColor:oe("oddColor"),repeat:oe("repeat")});FC.prototype.getType=function(e){return"Checkerboard"};var pqe=new K;FC.prototype.getValue=function(e,t){return c(e)||(e=K.now(pqe)),c(t)||(t={}),t.lightColor=G.getValueOrClonedDefault(this._evenColor,e,dqe,t.lightColor),t.darkColor=G.getValueOrClonedDefault(this._oddColor,e,hqe,t.darkColor),t.repeat=G.getValueOrDefault(this._repeat,e,mqe),t};FC.prototype.equals=function(e){return this===e||e instanceof FC&&G.equals(this._evenColor,e._evenColor)&&G.equals(this._oddColor,e._oddColor)&&G.equals(this._repeat,e._repeat)};var xv=FC;var eae={id:void 0};function Tv(e){if(e._firing){e._refire=!0;return}if(e._suspendCount===0){let t=e._addedEntities,n=e._removedEntities,i=e._changedEntities;if(i.length!==0||t.length!==0||n.length!==0){e._firing=!0;do{e._refire=!1;let o=t.values.slice(0),r=n.values.slice(0),s=i.values.slice(0);t.removeAll(),n.removeAll(),i.removeAll(),e._collectionChanged.raiseEvent(e,o,r,s)}while(e._refire);e._firing=!1}}}function ka(e){this._owner=e,this._entities=new Et,this._addedEntities=new Et,this._removedEntities=new Et,this._changedEntities=new Et,this._suspendCount=0,this._collectionChanged=new fe,this._id=Bn(),this._show=!0,this._firing=!1,this._refire=!1}ka.prototype.suspendEvents=function(){this._suspendCount++};ka.prototype.resumeEvents=function(){if(this._suspendCount===0)throw new w("resumeEvents can not be called before suspendEvents.");this._suspendCount--,Tv(this)};Object.defineProperties(ka.prototype,{collectionChanged:{get:function(){return this._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._entities.values}},show:{get:function(){return this._show},set:function(e){if(!c(e))throw new w("value is required.");if(e===this._show)return;this.suspendEvents();let t,n=[],i=this._entities.values,o=i.length;for(t=0;t<o;t++)n.push(i[t].isShowing);for(this._show=e,t=0;t<o;t++){let r=n[t],s=i[t];r!==s.isShowing&&s.definitionChanged.raiseEvent(s,"isShowing",s.isShowing,r)}this.resumeEvents()}},owner:{get:function(){return this._owner}}});ka.prototype.computeAvailability=function(){let e=Ue.MAXIMUM_VALUE,t=Ue.MINIMUM_VALUE,n=this._entities.values;for(let i=0,o=n.length;i<o;i++){let s=n[i].availability;if(c(s)){let a=s.start,l=s.stop;K.lessThan(a,e)&&!a.equals(Ue.MINIMUM_VALUE)&&(e=a),K.greaterThan(l,t)&&!l.equals(Ue.MAXIMUM_VALUE)&&(t=l)}}return Ue.MAXIMUM_VALUE.equals(e)&&(e=Ue.MINIMUM_VALUE),Ue.MINIMUM_VALUE.equals(t)&&(t=Ue.MAXIMUM_VALUE),new En({start:e,stop:t})};ka.prototype.add=function(e){if(!c(e))throw new w("entity is required.");e instanceof Ts||(e=new Ts(e));let t=e.id,n=this._entities;if(n.contains(t))throw new w(`An entity with id ${t} already exists in this collection.`);return e.entityCollection=this,n.set(t,e),this._removedEntities.remove(t)||this._addedEntities.set(t,e),e.definitionChanged.addEventListener(ka.prototype._onEntityDefinitionChanged,this),Tv(this),e};ka.prototype.remove=function(e){return c(e)?this.removeById(e.id):!1};ka.prototype.contains=function(e){if(!c(e))throw new w("entity is required");return this._entities.get(e.id)===e};ka.prototype.removeById=function(e){if(!c(e))return!1;let n=this._entities.get(e);return this._entities.remove(e)?(this._addedEntities.remove(e)||(this._removedEntities.set(e,n),this._changedEntities.remove(e)),this._entities.remove(e),n.definitionChanged.removeEventListener(ka.prototype._onEntityDefinitionChanged,this),Tv(this),!0):!1};ka.prototype.removeAll=function(){let e=this._entities,t=e.length,n=e.values,i=this._addedEntities,o=this._removedEntities;for(let r=0;r<t;r++){let s=n[r],a=s.id,l=i.get(a);c(l)||(s.definitionChanged.removeEventListener(ka.prototype._onEntityDefinitionChanged,this),o.set(a,s))}e.removeAll(),i.removeAll(),this._changedEntities.removeAll(),Tv(this)};ka.prototype.getById=function(e){if(!c(e))throw new w("id is required.");return this._entities.get(e)};ka.prototype.getOrCreateEntity=function(e){if(!c(e))throw new w("id is required.");let t=this._entities.get(e);return c(t)||(eae.id=e,t=new Ts(eae),this.add(t)),t};ka.prototype._onEntityDefinitionChanged=function(e){let t=e.id;this._addedEntities.contains(t)||this._changedEntities.set(t,e),Tv(this)};var qs=ka;var pB={id:void 0},BC=new Array(2);function O9(e){let t=e.propertyNames,n=t.length;for(let i=0;i<n;i++)e[t[i]]=void 0;e._name=void 0,e._availability=void 0}function tae(e,t,n,i){BC[0]=n,BC[1]=i.id,t[JSON.stringify(BC)]=i.definitionChanged.addEventListener(Dr.prototype._onDefinitionChanged,e)}function nae(e,t,n,i){BC[0]=n,BC[1]=i.id;let o=JSON.stringify(BC);t[o](),t[o]=void 0}function vg(e){if(e._shouldRecomposite=!0,e._suspendCount!==0)return;let t=e._collections,n=t.length,i=e._collectionsCopy,o=i.length,r,s,a,l,u,f=e._composite,h=new qs(e),m=e._eventHash,p;for(r=0;r<o;r++)for(u=i[r],u.collectionChanged.removeEventListener(Dr.prototype._onCollectionChanged,e),a=u.values,p=u.id,l=a.length-1;l>-1;l--)s=a[l],nae(e,m,p,s);for(r=n-1;r>=0;r--)for(u=t[r],u.collectionChanged.addEventListener(Dr.prototype._onCollectionChanged,e),a=u.values,p=u.id,l=a.length-1;l>-1;l--){s=a[l],tae(e,m,p,s);let b=h.getById(s.id);c(b)||(b=f.getById(s.id),c(b)?O9(b):(pB.id=s.id,b=new Ts(pB)),h.add(b)),b.merge(s)}e._collectionsCopy=t.slice(0),f.suspendEvents(),f.removeAll();let _=h.values;for(r=0;r<_.length;r++)f.add(_[r]);f.resumeEvents()}function Dr(e,t){this._owner=t,this._composite=new qs(this),this._suspendCount=0,this._collections=c(e)?e.slice():[],this._collectionsCopy=[],this._id=Bn(),this._eventHash={},vg(this),this._shouldRecomposite=!1}Object.defineProperties(Dr.prototype,{collectionChanged:{get:function(){return this._composite._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._composite.values}},owner:{get:function(){return this._owner}}});Dr.prototype.addCollection=function(e,t){let n=c(t);if(!c(e))throw new w("collection is required.");if(n){if(t<0)throw new w("index must be greater than or equal to zero.");if(t>this._collections.length)throw new w("index must be less than or equal to the number of collections.")}n?this._collections.splice(t,0,e):(t=this._collections.length,this._collections.push(e)),vg(this)};Dr.prototype.removeCollection=function(e){let t=this._collections.indexOf(e);return t!==-1?(this._collections.splice(t,1),vg(this),!0):!1};Dr.prototype.removeAllCollections=function(){this._collections.length=0,vg(this)};Dr.prototype.containsCollection=function(e){return this._collections.indexOf(e)!==-1};Dr.prototype.contains=function(e){return this._composite.contains(e)};Dr.prototype.indexOfCollection=function(e){return this._collections.indexOf(e)};Dr.prototype.getCollection=function(e){if(!c(e))throw new w("index is required.","index");return this._collections[e]};Dr.prototype.getCollectionsLength=function(){return this._collections.length};function _B(e,t){if(!c(t))throw new w("collection is required.");let n=e.indexOf(t);if(n===-1)throw new w("collection is not in this composite.");return n}function iae(e,t,n){let i=e._collections;if(t=O.clamp(t,0,i.length-1),n=O.clamp(n,0,i.length-1),t===n)return;let o=i[t];i[t]=i[n],i[n]=o,vg(e)}Dr.prototype.raiseCollection=function(e){let t=_B(this._collections,e);iae(this,t,t+1)};Dr.prototype.lowerCollection=function(e){let t=_B(this._collections,e);iae(this,t,t-1)};Dr.prototype.raiseCollectionToTop=function(e){let t=_B(this._collections,e);t!==this._collections.length-1&&(this._collections.splice(t,1),this._collections.push(e),vg(this))};Dr.prototype.lowerCollectionToBottom=function(e){let t=_B(this._collections,e);t!==0&&(this._collections.splice(t,1),this._collections.splice(0,0,e),vg(this))};Dr.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()};Dr.prototype.resumeEvents=function(){if(this._suspendCount===0)throw new w("resumeEvents can not be called before suspendEvents.");this._suspendCount--,this._shouldRecomposite&&this._suspendCount===0&&(vg(this),this._shouldRecomposite=!1),this._composite.resumeEvents()};Dr.prototype.computeAvailability=function(){return this._composite.computeAvailability()};Dr.prototype.getById=function(e){return this._composite.getById(e)};Dr.prototype._onCollectionChanged=function(e,t,n){let i=this._collectionsCopy,o=i.length,r=this._composite;r.suspendEvents();let s,a,l,u,f=n.length,h=this._eventHash,m=e.id;for(s=0;s<f;s++){let _=n[s];nae(this,h,m,_);let b=_.id;for(a=o-1;a>=0;a--)l=i[a].getById(b),c(l)&&(c(u)||(u=r.getById(b),O9(u)),u.merge(l));c(u)||r.removeById(b),u=void 0}let p=t.length;for(s=0;s<p;s++){let _=t[s];tae(this,h,m,_);let b=_.id;for(a=o-1;a>=0;a--)l=i[a].getById(b),c(l)&&(c(u)||(u=r.getById(b),c(u)?O9(u):(pB.id=b,u=new Ts(pB),r.add(u))),u.merge(l));u=void 0}r.resumeEvents()};Dr.prototype._onDefinitionChanged=function(e,t,n,i){let o=this._collections,r=this._composite,s=o.length,a=e.id,l=r.getById(a),u=l[t],f=!c(u),h=!0;for(let m=s-1;m>=0;m--){let p=o[m].getById(e.id);if(c(p)){let _=p[t];if(c(_)){if(h)if(h=!1,c(_.merge)&&c(_.clone))u=_.clone(u);else{u=_;break}u.merge(_)}}}f&&l.propertyNames.indexOf(t)===-1&&l.addProperty(t),l[t]=u};var oae=Dr;function P9(){this._removalFunctions=[]}P9.prototype.add=function(e,t,n){if(!c(e))throw new w("event is required");let i=e.addEventListener(t,n);this._removalFunctions.push(i);let o=this;return function(){i();let r=o._removalFunctions;r.splice(r.indexOf(i),1)}};P9.prototype.removeAll=function(){let e=this._removalFunctions;for(let t=0,n=e.length;t<n;++t)e[t]();e.length=0};var rl=P9;function L9(e,t){return K.compare(e.start,t.start)}function Ir(e){if(this._intervals=[],this._changedEvent=new fe,c(e)){let t=e.length;for(let n=0;n<t;n++)this.addInterval(e[n])}}Object.defineProperties(Ir.prototype,{changedEvent:{get:function(){return this._changedEvent}},start:{get:function(){let e=this._intervals;return e.length===0?void 0:e[0].start}},isStartIncluded:{get:function(){let e=this._intervals;return e.length===0?!1:e[0].isStartIncluded}},stop:{get:function(){let e=this._intervals,t=e.length;return t===0?void 0:e[t-1].stop}},isStopIncluded:{get:function(){let e=this._intervals,t=e.length;return t===0?!1:e[t-1].isStopIncluded}},length:{get:function(){return this._intervals.length}},isEmpty:{get:function(){return this._intervals.length===0}}});Ir.prototype.equals=function(e,t){if(this===e)return!0;if(!(e instanceof Ir))return!1;let n=this._intervals,i=e._intervals,o=n.length;if(o!==i.length)return!1;for(let r=0;r<o;r++)if(!En.equals(n[r],i[r],t))return!1;return!0};Ir.prototype.get=function(e){if(!c(e))throw new w("index is required.");return this._intervals[e]};Ir.prototype.removeAll=function(){this._intervals.length>0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))};Ir.prototype.findIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t]:void 0};Ir.prototype.findDataForIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0};Ir.prototype.contains=function(e){return this.indexOf(e)>=0};var R9=new En;Ir.prototype.indexOf=function(e){if(!c(e))throw new w("date is required");let t=this._intervals;R9.start=e,R9.stop=e;let n=Xo(t,R9,L9);return n>=0?t[n].isStartIncluded?n:n>0&&t[n-1].stop.equals(e)&&t[n-1].isStopIncluded?n-1:~n:(n=~n,n>0&&n-1<t.length&&En.contains(t[n-1],e)?n-1:~n)};Ir.prototype.findInterval=function(e){e=g(e,g.EMPTY_OBJECT);let t=e.start,n=e.stop,i=e.isStartIncluded,o=e.isStopIncluded,r=this._intervals;for(let s=0,a=r.length;s<a;s++){let l=r[s];if((!c(t)||l.start.equals(t))&&(!c(n)||l.stop.equals(n))&&(!c(i)||l.isStartIncluded===i)&&(!c(o)||l.isStopIncluded===o))return r[s]}};Ir.prototype.addInterval=function(e,t){if(!c(e))throw new w("interval is required");if(e.isEmpty)return;let n=this._intervals;if(n.length===0||K.greaterThan(e.start,n[n.length-1].stop)){n.push(e),this._changedEvent.raiseEvent(this);return}let i=Xo(n,e,L9);i<0?i=~i:i>0&&e.isStartIncluded&&n[i-1].isStartIncluded&&n[i-1].start.equals(e.start)?--i:i<n.length&&!e.isStartIncluded&&n[i].isStartIncluded&&n[i].start.equals(e.start)&&++i;let o;for(i>0&&(o=K.compare(n[i-1].stop,e.start),(o>0||o===0&&(n[i-1].isStopIncluded||e.isStartIncluded))&&((c(t)?t(n[i-1].data,e.data):n[i-1].data===e.data)?(K.greaterThan(e.stop,n[i-1].stop)?e=new En({start:n[i-1].start,stop:e.stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):e=new En({start:n[i-1].start,stop:n[i-1].stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:n[i-1].isStopIncluded||e.stop.equals(n[i-1].stop)&&e.isStopIncluded,data:e.data}),n.splice(i-1,1),--i):(o=K.compare(n[i-1].stop,e.stop),(o>0||o===0&&n[i-1].isStopIncluded&&!e.isStopIncluded)&&n.splice(i,0,new En({start:e.stop,stop:n[i-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:n[i-1].isStopIncluded,data:n[i-1].data})),n[i-1]=new En({start:n[i-1].start,stop:e.start,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:n[i-1].data}))));i<n.length&&(o=K.compare(e.stop,n[i].start),o>0||o===0&&(e.isStopIncluded||n[i].isStartIncluded));)if(c(t)?t(n[i].data,e.data):n[i].data===e.data)e=new En({start:e.start,stop:K.greaterThan(n[i].stop,e.stop)?n[i].stop:e.stop,isStartIncluded:e.isStartIncluded,isStopIncluded:K.greaterThan(n[i].stop,e.stop)?n[i].isStopIncluded:e.isStopIncluded,data:e.data}),n.splice(i,1);else if(n[i]=new En({start:e.stop,stop:n[i].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:n[i].isStopIncluded,data:n[i].data}),n[i].isEmpty)n.splice(i,1);else break;n.splice(i,0,e),this._changedEvent.raiseEvent(this)};Ir.prototype.removeInterval=function(e){if(!c(e))throw new w("interval is required");if(e.isEmpty)return!1;let t=this._intervals,n=Xo(t,e,L9);n<0&&(n=~n);let i=!1;for(n>0&&(K.greaterThan(t[n-1].stop,e.start)||t[n-1].stop.equals(e.start)&&t[n-1].isStopIncluded&&e.isStartIncluded)&&(i=!0,(K.greaterThan(t[n-1].stop,e.stop)||t[n-1].isStopIncluded&&!e.isStopIncluded&&t[n-1].stop.equals(e.stop))&&t.splice(n,0,new En({start:e.stop,stop:t[n-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[n-1].isStopIncluded,data:t[n-1].data})),t[n-1]=new En({start:t[n-1].start,stop:e.start,isStartIncluded:t[n-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:t[n-1].data})),n<t.length&&!e.isStartIncluded&&t[n].isStartIncluded&&e.start.equals(t[n].start)&&(i=!0,t.splice(n,0,new En({start:t[n].start,stop:t[n].start,isStartIncluded:!0,isStopIncluded:!0,data:t[n].data})),++n);n<t.length&&K.greaterThan(e.stop,t[n].stop);)i=!0,t.splice(n,1);return n<t.length&&e.stop.equals(t[n].stop)&&(i=!0,!e.isStopIncluded&&t[n].isStopIncluded?n+1<t.length&&t[n+1].start.equals(e.stop)&&t[n].data===t[n+1].data?(t.splice(n,1),t[n]=new En({start:t[n].start,stop:t[n].stop,isStartIncluded:!0,isStopIncluded:t[n].isStopIncluded,data:t[n].data})):t[n]=new En({start:e.stop,stop:e.stop,isStartIncluded:!0,isStopIncluded:!0,data:t[n].data}):t.splice(n,1)),n<t.length&&(K.greaterThan(e.stop,t[n].start)||e.stop.equals(t[n].start)&&e.isStopIncluded&&t[n].isStartIncluded)&&(i=!0,t[n]=new En({start:e.stop,stop:t[n].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[n].isStopIncluded,data:t[n].data})),i&&this._changedEvent.raiseEvent(this),i};Ir.prototype.intersect=function(e,t,n){if(!c(e))throw new w("other is required.");let i=new Ir,o=0,r=0,s=this._intervals,a=e._intervals;for(;o<s.length&&r<a.length;){let l=s[o],u=a[r];if(K.lessThan(l.stop,u.start))++o;else if(K.lessThan(u.stop,l.start))++r;else{if(c(n)||c(t)&&t(l.data,u.data)||!c(t)&&u.data===l.data){let f=En.intersect(l,u,new En,n);f.isEmpty||i.addInterval(f,t)}K.lessThan(l.stop,u.stop)||l.stop.equals(u.stop)&&!l.isStopIncluded&&u.isStopIncluded?++o:++r}}return i};Ir.fromJulianDateArray=function(e,t){if(!c(e))throw new w("options is required.");if(!c(e.julianDates))throw new w("options.iso8601Array is required.");c(t)||(t=new Ir);let n=e.julianDates,i=n.length,o=e.dataCallback,r=g(e.isStartIncluded,!0),s=g(e.isStopIncluded,!0),a=g(e.leadingInterval,!1),l=g(e.trailingInterval,!1),u,f=0;a&&(++f,u=new En({start:Ue.MINIMUM_VALUE,stop:n[0],isStartIncluded:!0,isStopIncluded:!r}),u.data=c(o)?o(u,t.length):t.length,t.addInterval(u));for(let h=0;h<i-1;++h){let m=n[h],p=n[h+1];u=new En({start:m,stop:p,isStartIncluded:t.length===f?r:!0,isStopIncluded:h===i-2?s:!1}),u.data=c(o)?o(u,t.length):t.length,t.addInterval(u),m=p}return l&&(u=new En({start:n[i-1],stop:Ue.MAXIMUM_VALUE,isStartIncluded:!s,isStopIncluded:!0}),u.data=c(o)?o(u,t.length):t.length,t.addInterval(u)),t};var Ua=new vm,Cv=[0,31,28,31,30,31,30,31,31,30,31,30,31];function M9(e,t,n){c(n)||(n=new K),K.toGregorianDate(e,Ua);let i=Ua.millisecond+t.millisecond,o=Ua.second+t.second,r=Ua.minute+t.minute,s=Ua.hour+t.hour,a=Ua.day+t.day,l=Ua.month+t.month,u=Ua.year+t.year;for(i>=1e3&&(o+=Math.floor(i/1e3),i=i%1e3),o>=60&&(r+=Math.floor(o/60),o=o%60),r>=60&&(s+=Math.floor(r/60),r=r%60),s>=24&&(a+=Math.floor(s/24),s=s%24),Cv[2]=qd(u)?29:28;a>Cv[l]||l>=13;)a>Cv[l]&&(a-=Cv[l],++l),l>=13&&(--l,u+=Math.floor(l/12),l=l%12,++l),Cv[2]=qd(u)?29:28;return Ua.millisecond=i,Ua.second=o,Ua.minute=r,Ua.hour=s,Ua.day=a,Ua.month=l,Ua.year=u,K.fromGregorianDate(Ua,n)}var _qe=new K,gqe=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function rae(e,t){if(!c(e)||e.length===0)return!1;if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,t.millisecond=0,e[0]==="P"){let n=e.match(gqe);if(!c(n))return!1;if(c(n[1])&&(t.year=Number(n[1].replace(",","."))),c(n[2])&&(t.month=Number(n[2].replace(",","."))),c(n[3])&&(t.day=Number(n[3].replace(",","."))*7),c(n[4])&&(t.day+=Number(n[4].replace(",","."))),c(n[5])&&(t.hour=Number(n[5].replace(",","."))),c(n[6])&&(t.minute=Number(n[6].replace(",","."))),c(n[7])){let i=Number(n[7].replace(",","."));t.second=Math.floor(i),t.millisecond=i%1*1e3}}else e[e.length-1]!=="Z"&&(e+="Z"),K.toGregorianDate(K.fromIso8601(e,_qe),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}var Ev=new vm;Ir.fromIso8601=function(e,t){if(!c(e))throw new w("options is required.");if(!c(e.iso8601))throw new w("options.iso8601 is required.");let n=e.iso8601.split("/"),i=K.fromIso8601(n[0]),o=K.fromIso8601(n[1]),r=[];if(!rae(n[2],Ev))r.push(i,o);else{let s=K.clone(i);for(r.push(s);K.compare(s,o)<0;)s=M9(s,Ev),K.compare(o,s)<=0&&K.clone(o,s),r.push(s)}return Ir.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};Ir.fromIso8601DateArray=function(e,t){if(!c(e))throw new w("options is required.");if(!c(e.iso8601Dates))throw new w("options.iso8601Dates is required.");return Ir.fromJulianDateArray({julianDates:e.iso8601Dates.map(function(n){return K.fromIso8601(n)}),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};Ir.fromIso8601DurationArray=function(e,t){if(!c(e))throw new w("options is required.");if(!c(e.epoch))throw new w("options.epoch is required.");if(!c(e.iso8601Durations))throw new w("options.iso8601Durations is required.");let n=e.epoch,i=e.iso8601Durations,o=g(e.relativeToPrevious,!1),r=[],s,a,l=i.length;for(let u=0;u<l;++u)(rae(i[u],Ev)||u===0)&&(o&&c(a)?s=M9(a,Ev):s=M9(n,Ev),r.push(s),a=s);return Ir.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};var Br=Ir;function yqe(e,t,n,i){function o(){n.raiseEvent(e)}let r=[];t.removeAll();let s=i.length;for(let a=0;a<s;a++){let l=i.get(a);c(l.data)&&r.indexOf(l.data)===-1&&t.add(l.data.definitionChanged,o)}}function n0(){this._eventHelper=new rl,this._definitionChanged=new fe,this._intervals=new Br,this._intervals.changedEvent.addEventListener(n0.prototype._intervalsChanged,this)}Object.defineProperties(n0.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}});var bqe=new K;n0.prototype.getValue=function(e,t){c(e)||(e=K.now(bqe));let n=this._intervals.findDataForIntervalContainingDate(e);if(c(n))return n.getValue(e,t)};n0.prototype.equals=function(e){return this===e||e instanceof n0&&this._intervals.equals(e._intervals,G.equals)};n0.prototype._intervalsChanged=function(){yqe(this,this._eventHelper,this._definitionChanged,this._intervals),this._definitionChanged.raiseEvent(this)};var Tc=n0;function Dg(){this._definitionChanged=new fe,this._composite=new Tc,this._composite.definitionChanged.addEventListener(Dg.prototype._raiseDefinitionChanged,this)}Object.defineProperties(Dg.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}});Dg.prototype.getType=function(e){if(!c(e))throw new w("time is required");let t=this._composite._intervals.findDataForIntervalContainingDate(e);if(c(t))return t.getType(e)};var xqe=new K;Dg.prototype.getValue=function(e,t){c(e)||(e=K.now(xqe));let n=this._composite._intervals.findDataForIntervalContainingDate(e);if(c(n))return n.getValue(e,t)};Dg.prototype.equals=function(e){return this===e||e instanceof Dg&&this._composite.equals(e._composite,G.equals)};Dg.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var wv=Dg;function Ig(e){this._referenceFrame=g(e,Ni.FIXED),this._definitionChanged=new fe,this._composite=new Tc,this._composite.definitionChanged.addEventListener(Ig.prototype._raiseDefinitionChanged,this)}Object.defineProperties(Ig.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite.intervals}},referenceFrame:{get:function(){return this._referenceFrame},set:function(e){this._referenceFrame=e}}});var Tqe=new K;Ig.prototype.getValue=function(e,t){return c(e)||(e=K.now(Tqe)),this.getValueInReferenceFrame(e,Ni.FIXED,t)};Ig.prototype.getValueInReferenceFrame=function(e,t,n){if(!c(e))throw new w("time is required.");if(!c(t))throw new w("referenceFrame is required.");let i=this._composite._intervals.findDataForIntervalContainingDate(e);if(c(i))return i.getValueInReferenceFrame(e,t,n)};Ig.prototype.equals=function(e){return this===e||e instanceof Ig&&this._referenceFrame===e._referenceFrame&&this._composite.equals(e._composite,G.equals)};Ig.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var fa=Ig;var Cqe={ROUNDED:0,MITERED:1,BEVELED:2},Ii=Object.freeze(Cqe);var Ys=[new d,new d],Eqe=new d,wqe=new d,Sqe=new d,Aqe=new d,vqe=new d,Dqe=new d,Iqe=new d,Oqe=new d,Pqe=new d,kC=new d,gB=new d,Sv={},N9=new re;function Rqe(e,t){let n=new Array(e.length);for(let i=0;i<e.length;i++){let o=e[i];N9=t.cartesianToCartographic(o,N9),n[i]=N9.height,e[i]=t.scaleToGeodeticSurface(o,o)}return n}function F9(e,t,n,i){let o=e[0],r=e[1],s=d.angleBetween(o,r),a=Math.ceil(s/i),l=new Array(a),u;if(t===n){for(u=0;u<a;u++)l[u]=t;return l.push(n),l}let h=(n-t)/a;for(u=1;u<a;u++){let m=t+u*h;l[u]=m}return l[0]=t,l.push(n),l}var yB=new d,bB=new d;function Mqe(e,t,n,i){let o=new Wr(n,i),r=o.projectPointOntoPlane(d.add(n,e,yB),yB),s=o.projectPointOntoPlane(d.add(n,t,bB),bB),a=k.angleBetween(r,s);return s.x*r.y-s.y*r.x>=0?-a:a}var Lqe=new d(-1,0,0),i0=new N,Nqe=new N,B9=new q,Fqe=q.IDENTITY.clone(),Bqe=new d,kqe=new ee,sae=new d;function Ap(e,t,n,i,o,r,s,a){let l=Bqe,u=kqe;i0=Lt.eastNorthUpToFixedFrame(e,o,i0),l=N.multiplyByPointAsVector(i0,Lqe,l),l=d.normalize(l,l);let f=Mqe(l,t,e,o);B9=q.fromRotationZ(f,B9),sae.z=r,i0=N.multiplyTransformation(i0,N.fromRotationTranslation(B9,sae,Nqe),i0);let h=Fqe;h[0]=s;for(let m=0;m<a;m++)for(let p=0;p<n.length;p+=3)u=d.fromArray(n,p,u),u=q.multiplyByVector(h,u,u),u=N.multiplyByPoint(i0,u,u),i.push(u.x,u.y,u.z);return i}var Uqe=new d;function k9(e,t,n,i,o,r,s){for(let a=0;a<e.length;a+=3){let l=d.fromArray(e,a,Uqe);i=Ap(l,t,n,i,o,r[a/3],s,1)}return i}function zqe(e,t){let n=e.length,i=new Array(n*6),o=0,r=t.x+t.width/2,s=t.y+t.height/2,a=e[0];i[o++]=a.x-r,i[o++]=0,i[o++]=a.y-s;for(let l=1;l<n;l++){a=e[l];let u=a.x-r,f=a.y-s;i[o++]=u,i[o++]=0,i[o++]=f,i[o++]=u,i[o++]=0,i[o++]=f}return a=e[0],i[o++]=a.x-r,i[o++]=0,i[o++]=a.y-s,i}function aae(e,t){let n=e.length,i=new Array(n*3),o=0,r=t.x+t.width/2,s=t.y+t.height/2;for(let a=0;a<n;a++)i[o++]=e[a].x-r,i[o++]=0,i[o++]=e[a].y-s;return i}var cae=new ve,lae=new d,uae=new q;function fae(e,t,n,i,o,r,s,a,l,u){let f=d.angleBetween(d.subtract(t,e,kC),d.subtract(n,e,gB)),h=i===Ii.BEVELED?0:Math.ceil(f/O.toRadians(5)),m;o?m=q.fromQuaternion(ve.fromAxisAngle(d.negate(e,kC),f/(h+1),cae),uae):m=q.fromQuaternion(ve.fromAxisAngle(e,f/(h+1),cae),uae);let p,_;if(t=d.clone(t,lae),h>0){let b=u?2:1;for(let x=0;x<h;x++)t=q.multiplyByVector(m,t,t),p=d.subtract(t,e,kC),p=d.normalize(p,p),o||(p=d.negate(p,p)),_=r.scaleToGeodeticSurface(t,gB),s=Ap(_,p,a,s,r,l,1,b)}else p=d.subtract(t,e,kC),p=d.normalize(p,p),o||(p=d.negate(p,p)),_=r.scaleToGeodeticSurface(t,gB),s=Ap(_,p,a,s,r,l,1,1),n=d.clone(n,lae),p=d.subtract(n,e,kC),p=d.normalize(p,p),o||(p=d.negate(p,p)),_=r.scaleToGeodeticSurface(n,gB),s=Ap(_,p,a,s,r,l,1,1);return s}Sv.removeDuplicatesFromShape=function(e){let t=e.length,n=[];for(let i=t-1,o=0;o<t;i=o++){let r=e[i],s=e[o];k.equals(r,s)||n.push(s)}return n};Sv.angleIsGreaterThanPi=function(e,t,n,i){let o=new Wr(n,i),r=o.projectPointOntoPlane(d.add(n,e,yB),yB),s=o.projectPointOntoPlane(d.add(n,t,bB),bB);return s.x*r.y-s.y*r.x>=0};var Vqe=new d,Hqe=new d;Sv.computePositions=function(e,t,n,i,o){let r=i._ellipsoid,s=Rqe(e,r),a=i._granularity,l=i._cornerType,u=o?zqe(t,n):aae(t,n),f=o?aae(t,n):void 0,h=n.height/2,m=n.width/2,p=e.length,_=[],b=o?[]:void 0,x=Eqe,T=wqe,E=Sqe,S=Aqe,A=vqe,v=Dqe,D=Iqe,R=Oqe,P=Pqe,L=e[0],F=e[1];S=r.geodeticSurfaceNormal(L,S),x=d.subtract(F,L,x),x=d.normalize(x,x),R=d.cross(S,x,R),R=d.normalize(R,R);let y=s[0],I=s[1];o&&(b=Ap(L,R,f,b,r,y+h,1,1)),P=d.clone(L,P),L=F,T=d.negate(x,T);let M,B;for(let W=1;W<p-1;W++){let H=o?2:1;if(F=e[W+1],L.equals(F)){mt("Positions are too close and are considered equivalent with rounding error.");continue}x=d.subtract(F,L,x),x=d.normalize(x,x),S=r.geodeticSurfaceNormal(L,S);let X=d.multiplyByScalar(S,d.dot(x,S),Vqe);d.subtract(x,X,X),d.normalize(X,X);let $=d.multiplyByScalar(S,d.dot(T,S),Hqe);if(d.subtract(T,$,$),d.normalize($,$),!O.equalsEpsilon(Math.abs(d.dot(X,$)),1,O.EPSILON7)){E=d.add(x,T,E),E=d.normalize(E,E),E=d.cross(E,S,E),E=d.cross(S,E,E),E=d.normalize(E,E);let se=1/Math.max(.25,d.magnitude(d.cross(E,T,kC))),he=Sv.angleIsGreaterThanPi(x,T,L,r);he?(A=d.add(L,d.multiplyByScalar(E,se*m,E),A),v=d.add(A,d.multiplyByScalar(R,m,v),v),Ys[0]=d.clone(P,Ys[0]),Ys[1]=d.clone(v,Ys[1]),M=F9(Ys,y+h,I+h,a),B=Di.generateArc({positions:Ys,granularity:a,ellipsoid:r}),_=k9(B,R,u,_,r,M,1),R=d.cross(S,x,R),R=d.normalize(R,R),D=d.add(A,d.multiplyByScalar(R,m,D),D),l===Ii.ROUNDED||l===Ii.BEVELED?fae(A,v,D,l,he,r,_,u,I+h,o):(E=d.negate(E,E),_=Ap(L,E,u,_,r,I+h,se,H)),P=d.clone(D,P)):(A=d.add(L,d.multiplyByScalar(E,se*m,E),A),v=d.add(A,d.multiplyByScalar(R,-m,v),v),Ys[0]=d.clone(P,Ys[0]),Ys[1]=d.clone(v,Ys[1]),M=F9(Ys,y+h,I+h,a),B=Di.generateArc({positions:Ys,granularity:a,ellipsoid:r}),_=k9(B,R,u,_,r,M,1),R=d.cross(S,x,R),R=d.normalize(R,R),D=d.add(A,d.multiplyByScalar(R,-m,D),D),l===Ii.ROUNDED||l===Ii.BEVELED?fae(A,v,D,l,he,r,_,u,I+h,o):_=Ap(L,E,u,_,r,I+h,se,H),P=d.clone(D,P)),T=d.negate(x,T)}else _=Ap(P,R,u,_,r,y+h,1,1),P=L;y=I,I=s[W+1],L=F}Ys[0]=d.clone(P,Ys[0]),Ys[1]=d.clone(L,Ys[1]),M=F9(Ys,y+h,I+h,a),B=Di.generateArc({positions:Ys,granularity:a,ellipsoid:r}),_=k9(B,R,u,_,r,M,1),o&&(b=Ap(L,R,f,b,r,I+h,1,1)),p=_.length;let U=o?p+b.length:p,V=new Float64Array(U);return V.set(_),o&&V.set(b,p),V};var Nh=Sv;var z9={},UC=new d,_ae=new d,Gqe=new d,dae=new d,Cc=[new d,new d],gae=new d,yae=new d,bae=new d,jqe=new d,Wqe=new d,qqe=new d,Yqe=new d,Xqe=new d,Kqe=new d,$qe=new d,hae=new ve,mae=new q;function xB(e,t,n,i,o){let r=d.angleBetween(d.subtract(t,e,UC),d.subtract(n,e,_ae)),s=i===Ii.BEVELED?1:Math.ceil(r/O.toRadians(5))+1,a=s*3,l=new Array(a);l[a-3]=n.x,l[a-2]=n.y,l[a-1]=n.z;let u;o?u=q.fromQuaternion(ve.fromAxisAngle(d.negate(e,UC),r/s,hae),mae):u=q.fromQuaternion(ve.fromAxisAngle(e,r/s,hae),mae);let f=0;t=d.clone(t,UC);for(let h=0;h<s;h++)t=q.multiplyByVector(u,t,t),l[f++]=t.x,l[f++]=t.y,l[f++]=t.z;return l}function Zqe(e){let t=gae,n=yae,i=bae,o=e[1];n=d.fromArray(e[1],o.length-3,n),i=d.fromArray(e[0],0,i),t=d.midpoint(n,i,t);let r=xB(t,n,i,Ii.ROUNDED,!1),s=e.length-1,a=e[s-1];o=e[s],n=d.fromArray(a,a.length-3,n),i=d.fromArray(o,0,i),t=d.midpoint(n,i,t);let l=xB(t,n,i,Ii.ROUNDED,!1);return[r,l]}function pae(e,t,n,i){let o=UC;return i?o=d.add(e,t,o):(t=d.negate(t,t),o=d.add(e,t,o)),[o.x,o.y,o.z,n.x,n.y,n.z]}function U9(e,t,n,i){let o=new Array(e.length),r=new Array(e.length),s=d.multiplyByScalar(t,n,UC),a=d.negate(s,_ae),l=0,u=e.length-1;for(let f=0;f<e.length;f+=3){let h=d.fromArray(e,f,Gqe),m=d.add(h,a,dae);o[l++]=m.x,o[l++]=m.y,o[l++]=m.z;let p=d.add(h,s,dae);r[u--]=p.z,r[u--]=p.y,r[u--]=p.x}return i.push(o,r),i}z9.addAttribute=function(e,t,n,i){let o=t.x,r=t.y,s=t.z;c(n)&&(e[n]=o,e[n+1]=r,e[n+2]=s),c(i)&&(e[i]=s,e[i-1]=r,e[i-2]=o)};var Jqe=new d,Qqe=new d;z9.computePositions=function(e){let t=e.granularity,n=e.positions,i=e.ellipsoid,o=e.width/2,r=e.cornerType,s=e.saveAttributes,a=gae,l=yae,u=bae,f=jqe,h=Wqe,m=qqe,p=Yqe,_=Xqe,b=Kqe,x=$qe,T=[],E=s?[]:void 0,S=s?[]:void 0,A=n[0],v=n[1];l=d.normalize(d.subtract(v,A,l),l),a=i.geodeticSurfaceNormal(A,a),f=d.normalize(d.cross(a,l,f),f),s&&(E.push(f.x,f.y,f.z),S.push(a.x,a.y,a.z)),p=d.clone(A,p),A=v,u=d.negate(l,u);let D,R=[],P,L=n.length;for(P=1;P<L-1;P++){a=i.geodeticSurfaceNormal(A,a),v=n[P+1],l=d.normalize(d.subtract(v,A,l),l);let y=d.multiplyByScalar(a,d.dot(l,a),Jqe);d.subtract(l,y,y),d.normalize(y,y);let I=d.multiplyByScalar(a,d.dot(u,a),Qqe);if(d.subtract(u,I,I),d.normalize(I,I),!O.equalsEpsilon(Math.abs(d.dot(y,I)),1,O.EPSILON7)){h=d.normalize(d.add(l,u,h),h),h=d.cross(h,a,h),h=d.cross(a,h,h),h=d.normalize(h,h);let B=o/Math.max(.25,d.magnitude(d.cross(h,u,UC))),U=Nh.angleIsGreaterThanPi(l,u,A,i);h=d.multiplyByScalar(h,B,h),U?(_=d.add(A,h,_),x=d.add(_,d.multiplyByScalar(f,o,x),x),b=d.add(_,d.multiplyByScalar(f,o*2,b),b),Cc[0]=d.clone(p,Cc[0]),Cc[1]=d.clone(x,Cc[1]),D=Di.generateArc({positions:Cc,granularity:t,ellipsoid:i}),T=U9(D,f,o,T),s&&(E.push(f.x,f.y,f.z),S.push(a.x,a.y,a.z)),m=d.clone(b,m),f=d.normalize(d.cross(a,l,f),f),b=d.add(_,d.multiplyByScalar(f,o*2,b),b),p=d.add(_,d.multiplyByScalar(f,o,p),p),r===Ii.ROUNDED||r===Ii.BEVELED?R.push({leftPositions:xB(_,m,b,r,U)}):R.push({leftPositions:pae(A,d.negate(h,h),b,U)})):(b=d.add(A,h,b),x=d.add(b,d.negate(d.multiplyByScalar(f,o,x),x),x),_=d.add(b,d.negate(d.multiplyByScalar(f,o*2,_),_),_),Cc[0]=d.clone(p,Cc[0]),Cc[1]=d.clone(x,Cc[1]),D=Di.generateArc({positions:Cc,granularity:t,ellipsoid:i}),T=U9(D,f,o,T),s&&(E.push(f.x,f.y,f.z),S.push(a.x,a.y,a.z)),m=d.clone(_,m),f=d.normalize(d.cross(a,l,f),f),_=d.add(b,d.negate(d.multiplyByScalar(f,o*2,_),_),_),p=d.add(b,d.negate(d.multiplyByScalar(f,o,p),p),p),r===Ii.ROUNDED||r===Ii.BEVELED?R.push({rightPositions:xB(b,m,_,r,U)}):R.push({rightPositions:pae(A,h,_,U)})),u=d.negate(l,u)}A=v}a=i.geodeticSurfaceNormal(A,a),Cc[0]=d.clone(p,Cc[0]),Cc[1]=d.clone(A,Cc[1]),D=Di.generateArc({positions:Cc,granularity:t,ellipsoid:i}),T=U9(D,f,o,T),s&&(E.push(f.x,f.y,f.z),S.push(a.x,a.y,a.z));let F;return r===Ii.ROUNDED&&(F=Zqe(T)),{positions:T,corners:R,lefts:E,normals:S,endPositions:F}};var Bi=z9;var Cae=new d,Eae=new d,TB=new d,CB=new d,eYe=new d,wae=new d,Og=new d,zC=new d;function Sae(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function cd(e,t,n,i,o,r){let s=e.normals,a=e.tangents,l=e.bitangents,u=d.normalize(d.cross(n,t,Og),Og);r.normal&&Bi.addAttribute(s,t,i,o),r.tangent&&Bi.addAttribute(a,u,i,o),r.bitangent&&Bi.addAttribute(l,n,i,o)}function Aae(e,t,n){let i=e.positions,o=e.corners,r=e.endPositions,s=e.lefts,a=e.normals,l=new fn,u,f=0,h=0,m,p=0,_;for(m=0;m<i.length;m+=2)_=i[m].length-3,f+=_,p+=_*2,h+=i[m+1].length-3;for(f+=3,h+=3,m=0;m<o.length;m++){u=o[m];let me=o[m].leftPositions;c(me)?(_=me.length,f+=_,p+=_):(_=o[m].rightPositions.length,h+=_,p+=_)}let b=c(r),x;b&&(x=r[0].length-3,f+=x,h+=x,x/=3,p+=x*6);let T=f+h,E=new Float64Array(T),S=t.normal?new Float32Array(T):void 0,A=t.tangent?new Float32Array(T):void 0,v=t.bitangent?new Float32Array(T):void 0,D={normals:S,tangents:A,bitangents:v},R=0,P=T-1,L,F,y,I,M=Cae,B=Eae,U,V,W=x/2,H=Oe.createTypedArray(T/3,p),X=0;if(b){V=TB,U=CB;let me=r[0];for(M=d.fromArray(a,0,M),B=d.fromArray(s,0,B),m=0;m<W;m++)V=d.fromArray(me,(W-1-m)*3,V),U=d.fromArray(me,(W+m)*3,U),Bi.addAttribute(E,U,R),Bi.addAttribute(E,V,void 0,P),cd(D,M,B,R,P,t),F=R/3,I=F+1,L=(P-2)/3,y=L-1,H[X++]=L,H[X++]=F,H[X++]=y,H[X++]=y,H[X++]=F,H[X++]=I,R+=3,P-=3}let $=0,ae=0,se=i[$++],he=i[$++];E.set(se,R),E.set(he,P-he.length+1),B=d.fromArray(s,ae,B);let ge,le;for(_=he.length-3,m=0;m<_;m+=3)ge=n.geodeticSurfaceNormal(d.fromArray(se,m,Og),Og),le=n.geodeticSurfaceNormal(d.fromArray(he,_-m,zC),zC),M=d.normalize(d.add(ge,le,M),M),cd(D,M,B,R,P,t),F=R/3,I=F+1,L=(P-2)/3,y=L-1,H[X++]=L,H[X++]=F,H[X++]=y,H[X++]=y,H[X++]=F,H[X++]=I,R+=3,P-=3;for(ge=n.geodeticSurfaceNormal(d.fromArray(se,_,Og),Og),le=n.geodeticSurfaceNormal(d.fromArray(he,_,zC),zC),M=d.normalize(d.add(ge,le,M),M),ae+=3,m=0;m<o.length;m++){let me;u=o[m];let Me=u.leftPositions,Ge=u.rightPositions,De,ke,He=wae,ft=TB,Ie=CB;if(M=d.fromArray(a,ae,M),c(Me)){for(cd(D,M,B,void 0,P,t),P-=3,De=I,ke=y,me=0;me<Me.length/3;me++)He=d.fromArray(Me,me*3,He),H[X++]=De,H[X++]=ke-me-1,H[X++]=ke-me,Bi.addAttribute(E,He,void 0,P),ft=d.fromArray(E,(ke-me-1)*3,ft),Ie=d.fromArray(E,De*3,Ie),B=d.normalize(d.subtract(ft,Ie,B),B),cd(D,M,B,void 0,P,t),P-=3;He=d.fromArray(E,De*3,He),ft=d.subtract(d.fromArray(E,ke*3,ft),He,ft),Ie=d.subtract(d.fromArray(E,(ke-me)*3,Ie),He,Ie),B=d.normalize(d.add(ft,Ie,B),B),cd(D,M,B,R,void 0,t),R+=3}else{for(cd(D,M,B,R,void 0,t),R+=3,De=y,ke=I,me=0;me<Ge.length/3;me++)He=d.fromArray(Ge,me*3,He),H[X++]=De,H[X++]=ke+me,H[X++]=ke+me+1,Bi.addAttribute(E,He,R),ft=d.fromArray(E,De*3,ft),Ie=d.fromArray(E,(ke+me)*3,Ie),B=d.normalize(d.subtract(ft,Ie,B),B),cd(D,M,B,R,void 0,t),R+=3;He=d.fromArray(E,De*3,He),ft=d.subtract(d.fromArray(E,(ke+me)*3,ft),He,ft),Ie=d.subtract(d.fromArray(E,ke*3,Ie),He,Ie),B=d.normalize(d.negate(d.add(Ie,ft,B),B),B),cd(D,M,B,void 0,P,t),P-=3}for(se=i[$++],he=i[$++],se.splice(0,3),he.splice(he.length-3,3),E.set(se,R),E.set(he,P-he.length+1),_=he.length-3,ae+=3,B=d.fromArray(s,ae,B),me=0;me<he.length;me+=3)ge=n.geodeticSurfaceNormal(d.fromArray(se,me,Og),Og),le=n.geodeticSurfaceNormal(d.fromArray(he,_-me,zC),zC),M=d.normalize(d.add(ge,le,M),M),cd(D,M,B,R,P,t),I=R/3,F=I-1,y=(P-2)/3,L=y+1,H[X++]=L,H[X++]=F,H[X++]=y,H[X++]=y,H[X++]=F,H[X++]=I,R+=3,P-=3;R-=3,P+=3}if(M=d.fromArray(a,a.length-3,M),cd(D,M,B,R,P,t),b){R+=3,P-=3,V=TB,U=CB;let me=r[1];for(m=0;m<W;m++)V=d.fromArray(me,(x-m-1)*3,V),U=d.fromArray(me,m*3,U),Bi.addAttribute(E,V,void 0,P),Bi.addAttribute(E,U,R),cd(D,M,B,R,P,t),I=R/3,F=I-1,y=(P-2)/3,L=y+1,H[X++]=L,H[X++]=F,H[X++]=y,H[X++]=y,H[X++]=F,H[X++]=I,R+=3,P-=3}if(l.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:E}),t.st){let me=new Float32Array(T/3*2),Me,Ge,De=0;if(b){f/=3,h/=3;let ke=Math.PI/(x+1);Ge=1/(f-x+1),Me=1/(h-x+1);let He,ft=x/2;for(m=ft+1;m<x+1;m++)He=O.PI_OVER_TWO+ke*m,me[De++]=Me*(1+Math.cos(He)),me[De++]=.5*(1+Math.sin(He));for(m=1;m<h-x+1;m++)me[De++]=m*Me,me[De++]=0;for(m=x;m>ft;m--)He=O.PI_OVER_TWO-m*ke,me[De++]=1-Me*(1+Math.cos(He)),me[De++]=.5*(1+Math.sin(He));for(m=ft;m>0;m--)He=O.PI_OVER_TWO-ke*m,me[De++]=1-Ge*(1+Math.cos(He)),me[De++]=.5*(1+Math.sin(He));for(m=f-x;m>0;m--)me[De++]=m*Ge,me[De++]=1;for(m=1;m<ft+1;m++)He=O.PI_OVER_TWO+ke*m,me[De++]=Ge*(1+Math.cos(He)),me[De++]=.5*(1+Math.sin(He))}else{for(f/=3,h/=3,Ge=1/(f-1),Me=1/(h-1),m=0;m<h;m++)me[De++]=m*Me,me[De++]=0;for(m=f;m>0;m--)me[De++]=(m-1)*Ge,me[De++]=1}l.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:me})}return t.normal&&(l.normal=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:D.normals})),t.tangent&&(l.tangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:D.tangents})),t.bitangent&&(l.bitangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:D.bitangents})),{attributes:l,indices:H}}function tYe(e,t){if(!t.normal&&!t.tangent&&!t.bitangent&&!t.st)return e;let n=e.position.values,i,o;(t.normal||t.bitangent)&&(i=e.normal.values,o=e.bitangent.values);let r=e.position.values.length/18,s=r*3,a=r*2,l=s*2,u;if(t.normal||t.bitangent||t.tangent){let f=t.normal?new Float32Array(s*6):void 0,h=t.tangent?new Float32Array(s*6):void 0,m=t.bitangent?new Float32Array(s*6):void 0,p=Cae,_=Eae,b=TB,x=CB,T=eYe,E=wae,S=l;for(u=0;u<s;u+=3){let A=S+l;p=d.fromArray(n,u,p),_=d.fromArray(n,u+s,_),b=d.fromArray(n,(u+3)%s,b),_=d.subtract(_,p,_),b=d.subtract(b,p,b),x=d.normalize(d.cross(_,b,x),x),t.normal&&(Bi.addAttribute(f,x,A),Bi.addAttribute(f,x,A+3),Bi.addAttribute(f,x,S),Bi.addAttribute(f,x,S+3)),(t.tangent||t.bitangent)&&(E=d.fromArray(i,u,E),t.bitangent&&(Bi.addAttribute(m,E,A),Bi.addAttribute(m,E,A+3),Bi.addAttribute(m,E,S),Bi.addAttribute(m,E,S+3)),t.tangent&&(T=d.normalize(d.cross(E,x,T),T),Bi.addAttribute(h,T,A),Bi.addAttribute(h,T,A+3),Bi.addAttribute(h,T,S),Bi.addAttribute(h,T,S+3))),S+=6}if(t.normal){for(f.set(i),u=0;u<s;u+=3)f[u+s]=-i[u],f[u+s+1]=-i[u+1],f[u+s+2]=-i[u+2];e.normal.values=f}else e.normal=void 0;if(t.bitangent?(m.set(o),m.set(o,s),e.bitangent.values=m):e.bitangent=void 0,t.tangent){let A=e.tangent.values;h.set(A),h.set(A,s),e.tangent.values=h}}if(t.st){let f=e.st.values,h=new Float32Array(a*6);h.set(f),h.set(f,a);let m=a*2;for(let p=0;p<2;p++){for(h[m++]=f[0],h[m++]=f[1],u=2;u<a;u+=2){let _=f[u],b=f[u+1];h[m++]=_,h[m++]=b,h[m++]=_,h[m++]=b}h[m++]=f[0],h[m++]=f[1]}e.st.values=h}return e}function V9(e,t,n){n[t++]=e[0],n[t++]=e[1],n[t++]=e[2];for(let i=3;i<e.length;i+=3){let o=e[i],r=e[i+1],s=e[i+2];n[t++]=o,n[t++]=r,n[t++]=s,n[t++]=o,n[t++]=r,n[t++]=s}return n[t++]=e[0],n[t++]=e[1],n[t++]=e[2],n}function nYe(e,t){let n=new Ce({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),i=e.ellipsoid,o=Bi.computePositions(e),r=Aae(o,n,i),s=e.height,a=e.extrudedHeight,l=r.attributes,u=r.indices,f=l.position.values,h=f.length,m=new Float64Array(h*6),p=new Float64Array(h);p.set(f);let _=new Float64Array(h*4);f=ti.scaleToGeodeticHeight(f,s,i),_=V9(f,0,_),p=ti.scaleToGeodeticHeight(p,a,i),_=V9(p,h*2,_),m.set(f),m.set(p,h),m.set(_,h*2),l.position.values=m,l=tYe(l,t);let b,x=h/3;if(e.shadowVolume){let L=l.normal.values;h=L.length;let F=new Float32Array(h*6);for(b=0;b<h;b++)L[b]=-L[b];F.set(L,h),F=V9(L,h*4,F),l.extrudeDirection=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:F}),t.normal||(l.normal=void 0)}if(c(e.offsetAttribute)){let L=new Uint8Array(x*6);if(e.offsetAttribute===Zt.TOP)L=L.fill(1,0,x).fill(1,x*2,x*4);else{let F=e.offsetAttribute===Zt.NONE?0:1;L=L.fill(F)}l.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:L})}let T=u.length,E=x+x,S=Oe.createTypedArray(m.length/3,T*2+E*3);S.set(u);let A=T;for(b=0;b<T;b+=3){let L=u[b],F=u[b+1],y=u[b+2];S[A++]=y+x,S[A++]=F+x,S[A++]=L+x}let v,D,R,P;for(b=0;b<E;b+=2)v=b+E,D=v+E,R=v+1,P=D+1,S[A++]=v,S[A++]=D,S[A++]=R,S[A++]=R,S[A++]=D,S[A++]=P;return{attributes:l,indices:S}}var xae=new d,Av=new d,lf=new re;function Tae(e,t,n,i,o,r){let s=d.subtract(t,e,xae);d.normalize(s,s);let a=n.geodeticSurfaceNormal(e,Av),l=d.cross(s,a,xae);d.multiplyByScalar(l,i,l);let u=o.latitude,f=o.longitude,h=r.latitude,m=r.longitude;d.add(e,l,Av),n.cartesianToCartographic(Av,lf);let p=lf.latitude,_=lf.longitude;u=Math.min(u,p),f=Math.min(f,_),h=Math.max(h,p),m=Math.max(m,_),d.subtract(e,l,Av),n.cartesianToCartographic(Av,lf),p=lf.latitude,_=lf.longitude,u=Math.min(u,p),f=Math.min(f,_),h=Math.max(h,p),m=Math.max(m,_),o.latitude=u,o.longitude=f,r.latitude=h,r.longitude=m}var cf=new d,vv=new d,sl=new re,al=new re;function vae(e,t,n,i,o){e=Sae(e,t);let r=po(e,d.equalsEpsilon),s=r.length;if(s<2||n<=0)return new te;let a=n*.5;sl.latitude=Number.POSITIVE_INFINITY,sl.longitude=Number.POSITIVE_INFINITY,al.latitude=Number.NEGATIVE_INFINITY,al.longitude=Number.NEGATIVE_INFINITY;let l,u;if(i===Ii.ROUNDED){let m=r[0];d.subtract(m,r[1],cf),d.normalize(cf,cf),d.multiplyByScalar(cf,a,cf),d.add(m,cf,vv),t.cartesianToCartographic(vv,lf),l=lf.latitude,u=lf.longitude,sl.latitude=Math.min(sl.latitude,l),sl.longitude=Math.min(sl.longitude,u),al.latitude=Math.max(al.latitude,l),al.longitude=Math.max(al.longitude,u)}for(let m=0;m<s-1;++m)Tae(r[m],r[m+1],t,a,sl,al);let f=r[s-1];d.subtract(f,r[s-2],cf),d.normalize(cf,cf),d.multiplyByScalar(cf,a,cf),d.add(f,cf,vv),Tae(f,vv,t,a,sl,al),i===Ii.ROUNDED&&(t.cartesianToCartographic(vv,lf),l=lf.latitude,u=lf.longitude,sl.latitude=Math.min(sl.latitude,l),sl.longitude=Math.min(sl.longitude,u),al.latitude=Math.max(al.latitude,l),al.longitude=Math.max(al.longitude,u));let h=c(o)?o:new te;return h.north=al.latitude,h.south=sl.latitude,h.east=al.longitude,h.west=sl.longitude,h}function Dp(e){e=g(e,g.EMPTY_OBJECT);let t=e.positions,n=e.width;C.defined("options.positions",t),C.defined("options.width",n);let i=g(e.height,0),o=g(e.extrudedHeight,i);this._positions=t,this._ellipsoid=Z.clone(g(e.ellipsoid,Z.default)),this._vertexFormat=Ce.clone(g(e.vertexFormat,Ce.DEFAULT)),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=g(e.cornerType,Ii.ROUNDED),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._shadowVolume=g(e.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this.packedLength=1+t.length*d.packedLength+Z.packedLength+Ce.packedLength+7}Dp.pack=function(e,t,n){C.defined("value",e),C.defined("array",t),n=g(n,0);let i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=d.packedLength)d.pack(i[r],t,n);return Z.pack(e._ellipsoid,t,n),n+=Z.packedLength,Ce.pack(e._vertexFormat,t,n),n+=Ce.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n++]=e._shadowVolume?1:0,t[n]=g(e._offsetAttribute,-1),t};var Dae=Z.clone(Z.UNIT_SPHERE),Iae=new Ce,vp={positions:void 0,ellipsoid:Dae,vertexFormat:Iae,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};Dp.unpack=function(e,t,n){C.defined("array",e),t=g(t,0);let i=e[t++],o=new Array(i);for(let _=0;_<i;++_,t+=d.packedLength)o[_]=d.unpack(e,t);let r=Z.unpack(e,t,Dae);t+=Z.packedLength;let s=Ce.unpack(e,t,Iae);t+=Ce.packedLength;let a=e[t++],l=e[t++],u=e[t++],f=e[t++],h=e[t++],m=e[t++]===1,p=e[t];return c(n)?(n._positions=o,n._ellipsoid=Z.clone(r,n._ellipsoid),n._vertexFormat=Ce.clone(s,n._vertexFormat),n._width=a,n._height=l,n._extrudedHeight=u,n._cornerType=f,n._granularity=h,n._shadowVolume=m,n._offsetAttribute=p===-1?void 0:p,n):(vp.positions=o,vp.width=a,vp.height=l,vp.extrudedHeight=u,vp.cornerType=f,vp.granularity=h,vp.shadowVolume=m,vp.offsetAttribute=p===-1?void 0:p,new Dp(vp))};Dp.computeRectangle=function(e,t){e=g(e,g.EMPTY_OBJECT);let n=e.positions,i=e.width;C.defined("options.positions",n),C.defined("options.width",i);let o=g(e.ellipsoid,Z.default),r=g(e.cornerType,Ii.ROUNDED);return vae(n,o,i,r,t)};Dp.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=Sae(t,i);let o=po(t,d.equalsEpsilon);if(o.length<2||n<=0)return;let r=e._height,s=e._extrudedHeight,a=!O.equalsEpsilon(r,s,0,O.EPSILON2),l=e._vertexFormat,u={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0},f;if(a)u.height=r,u.extrudedHeight=s,u.shadowVolume=e._shadowVolume,u.offsetAttribute=e._offsetAttribute,f=nYe(u,l);else{let p=Bi.computePositions(u);if(f=Aae(p,l,i),f.attributes.position.values=ti.scaleToGeodeticHeight(f.attributes.position.values,r,i),c(e._offsetAttribute)){let _=e._offsetAttribute===Zt.NONE?0:1,b=f.attributes.position.values.length,x=new Uint8Array(b/3).fill(_);f.attributes.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}}let h=f.attributes,m=ne.fromVertices(h.position.values,void 0,3);return l.position||(f.attributes.position.values=void 0),new st({attributes:h,indices:f.indices,primitiveType:Se.TRIANGLES,boundingSphere:m,offsetAttribute:e._offsetAttribute})};Dp.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Dp({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:o,granularity:i,extrudedHeight:r,height:s,vertexFormat:Ce.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(Dp.prototype,{rectangle:{get:function(){return c(this._rectangle)||(this._rectangle=vae(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var VC=Dp;var Oae=new d,Pae=new d,iYe=new d;function oYe(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function Rae(e,t){let n=[],i=e.positions,o=e.corners,r=e.endPositions,s=new fn,a,l=0,u=0,f,h=0,m;for(f=0;f<i.length;f+=2)m=i[f].length-3,l+=m,h+=m/3*4,u+=i[f+1].length-3;for(l+=3,u+=3,f=0;f<o.length;f++){a=o[f];let U=o[f].leftPositions;c(U)?(m=U.length,l+=m,h+=m/3*2):(m=o[f].rightPositions.length,u+=m,h+=m/3*2)}let p=c(r),_;p&&(_=r[0].length-3,l+=_,u+=_,_/=3,h+=_*4);let b=l+u,x=new Float64Array(b),T=0,E=b-1,S,A,v,D,R,P,L=_/2,F=Oe.createTypedArray(b/3,h+4),y=0;if(F[y++]=T/3,F[y++]=(E-2)/3,p){n.push(T/3),P=Oae,R=Pae;let U=r[0];for(f=0;f<L;f++)P=d.fromArray(U,(L-1-f)*3,P),R=d.fromArray(U,(L+f)*3,R),Bi.addAttribute(x,R,T),Bi.addAttribute(x,P,void 0,E),A=T/3,D=A+1,S=(E-2)/3,v=S-1,F[y++]=S,F[y++]=v,F[y++]=A,F[y++]=D,T+=3,E-=3}let I=0,M=i[I++],B=i[I++];for(x.set(M,T),x.set(B,E-B.length+1),m=B.length-3,n.push(T/3,(E-2)/3),f=0;f<m;f+=3)A=T/3,D=A+1,S=(E-2)/3,v=S-1,F[y++]=S,F[y++]=v,F[y++]=A,F[y++]=D,T+=3,E-=3;for(f=0;f<o.length;f++){let U;a=o[f];let V=a.leftPositions,W=a.rightPositions,H,X=iYe;if(c(V)){for(E-=3,H=v,n.push(D),U=0;U<V.length/3;U++)X=d.fromArray(V,U*3,X),F[y++]=H-U-1,F[y++]=H-U,Bi.addAttribute(x,X,void 0,E),E-=3;n.push(H-Math.floor(V.length/6)),t===Ii.BEVELED&&n.push((E-2)/3+1),T+=3}else{for(T+=3,H=D,n.push(v),U=0;U<W.length/3;U++)X=d.fromArray(W,U*3,X),F[y++]=H+U,F[y++]=H+U+1,Bi.addAttribute(x,X,T),T+=3;n.push(H+Math.floor(W.length/6)),t===Ii.BEVELED&&n.push(T/3-1),E-=3}for(M=i[I++],B=i[I++],M.splice(0,3),B.splice(B.length-3,3),x.set(M,T),x.set(B,E-B.length+1),m=B.length-3,U=0;U<B.length;U+=3)D=T/3,A=D-1,v=(E-2)/3,S=v+1,F[y++]=S,F[y++]=v,F[y++]=A,F[y++]=D,T+=3,E-=3;T-=3,E+=3,n.push(T/3,(E-2)/3)}if(p){T+=3,E-=3,P=Oae,R=Pae;let U=r[1];for(f=0;f<L;f++)P=d.fromArray(U,(_-f-1)*3,P),R=d.fromArray(U,f*3,R),Bi.addAttribute(x,P,void 0,E),Bi.addAttribute(x,R,T),D=T/3,A=D-1,v=(E-2)/3,S=v+1,F[y++]=S,F[y++]=v,F[y++]=A,F[y++]=D,T+=3,E-=3;n.push(T/3)}else n.push(T/3,(E-2)/3);return F[y++]=T/3,F[y++]=(E-2)/3,s.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:x}),{attributes:s,indices:F,wallIndices:n}}function rYe(e){let t=e.ellipsoid,n=Bi.computePositions(e),i=Rae(n,e.cornerType),o=i.wallIndices,r=e.height,s=e.extrudedHeight,a=i.attributes,l=i.indices,u=a.position.values,f=u.length,h=new Float64Array(f);h.set(u);let m=new Float64Array(f*2);if(u=ti.scaleToGeodeticHeight(u,r,t),h=ti.scaleToGeodeticHeight(h,s,t),m.set(u),m.set(h,f),a.position.values=m,f/=3,c(e.offsetAttribute)){let S=new Uint8Array(f*2);if(e.offsetAttribute===Zt.TOP)S=S.fill(1,0,f);else{let A=e.offsetAttribute===Zt.NONE?0:1;S=S.fill(A)}a.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:S})}let p,_=l.length,b=Oe.createTypedArray(m.length/3,(_+o.length)*2);b.set(l);let x=_;for(p=0;p<_;p+=2){let S=l[p],A=l[p+1];b[x++]=S+f,b[x++]=A+f}let T,E;for(p=0;p<o.length;p++)T=o[p],E=T+f,b[x++]=T,b[x++]=E;return{attributes:a,indices:b}}function Dv(e){e=g(e,g.EMPTY_OBJECT);let t=e.positions,n=e.width;C.typeOf.object("options.positions",t),C.typeOf.number("options.width",n);let i=g(e.height,0),o=g(e.extrudedHeight,i);this._positions=t,this._ellipsoid=Z.clone(g(e.ellipsoid,Z.default)),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=g(e.cornerType,Ii.ROUNDED),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*d.packedLength+Z.packedLength+6}Dv.pack=function(e,t,n){C.typeOf.object("value",e),C.typeOf.object("array",t),n=g(n,0);let i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=d.packedLength)d.pack(i[r],t,n);return Z.pack(e._ellipsoid,t,n),n+=Z.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n]=g(e._offsetAttribute,-1),t};var Mae=Z.clone(Z.UNIT_SPHERE),Pg={positions:void 0,ellipsoid:Mae,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};Dv.unpack=function(e,t,n){C.typeOf.object("array",e),t=g(t,0);let i=e[t++],o=new Array(i);for(let m=0;m<i;++m,t+=d.packedLength)o[m]=d.unpack(e,t);let r=Z.unpack(e,t,Mae);t+=Z.packedLength;let s=e[t++],a=e[t++],l=e[t++],u=e[t++],f=e[t++],h=e[t];return c(n)?(n._positions=o,n._ellipsoid=Z.clone(r,n._ellipsoid),n._width=s,n._height=a,n._extrudedHeight=l,n._cornerType=u,n._granularity=f,n._offsetAttribute=h===-1?void 0:h,n):(Pg.positions=o,Pg.width=s,Pg.height=a,Pg.extrudedHeight=l,Pg.cornerType=u,Pg.granularity=f,Pg.offsetAttribute=h===-1?void 0:h,new Dv(Pg))};Dv.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=oYe(t,i);let o=po(t,d.equalsEpsilon);if(o.length<2||n<=0)return;let r=e._height,s=e._extrudedHeight,a=!O.equalsEpsilon(r,s,0,O.EPSILON2),l={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1},u;if(a)l.height=r,l.extrudedHeight=s,l.offsetAttribute=e._offsetAttribute,u=rYe(l);else{let m=Bi.computePositions(l);if(u=Rae(m,l.cornerType),u.attributes.position.values=ti.scaleToGeodeticHeight(u.attributes.position.values,r,i),c(e._offsetAttribute)){let p=u.attributes.position.values.length,_=e._offsetAttribute===Zt.NONE?0:1,b=new Uint8Array(p/3).fill(_);u.attributes.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:b})}}let f=u.attributes,h=ne.fromVertices(f.position.values,void 0,3);return new st({attributes:f,indices:u.indices,primitiveType:Se.LINES,boundingSphere:h,offsetAttribute:e._offsetAttribute})};var EB=Dv;var sYe=new jn(0);function Ec(e){Qn.call(this,e),this._zIndex=0,this._terrainOffsetProperty=void 0}c(Object.create)&&(Ec.prototype=Object.create(Qn.prototype),Ec.prototype.constructor=Ec);Object.defineProperties(Ec.prototype,{zIndex:{get:function(){return this._zIndex}},terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});Ec.prototype._isOnTerrain=function(e,t){return this._fillEnabled&&!c(t.height)&&!c(t.extrudedHeight)&&Kc.isSupported(this._scene)};Ec.prototype._getIsClosed=function(e){let t=e.height,n=e.extrudedHeight;return t===0||c(n)&&n!==t};Ec.prototype._computeCenter=w.throwInstantiationError;Ec.prototype._onEntityPropertyChanged=function(e,t,n,i){if(Qn.prototype._onEntityPropertyChanged.call(this,e,t,n,i),this._observedPropertyNames.indexOf(t)===-1)return;let o=this._entity[this._geometryPropertyName];if(!c(o))return;c(o.zIndex)&&(c(o.height)||c(o.extrudedHeight))&&mt(mt.geometryZIndex),this._zIndex=g(o.zIndex,sYe),c(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);let r=o.heightReference,s=o.extrudedHeightReference;if(c(r)||c(s)){let a=new fh(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new CT(this._scene,a,r,s)}};Ec.prototype.destroy=function(){c(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),Qn.prototype.destroy.call(this)};Ec.getGeometryHeight=function(e,t){if(C.defined("heightReference",t),!c(e)){t!==qe.NONE&&mt(mt.geometryHeightReference);return}return Mu(t)?0:e};Ec.getGeometryExtrudedHeight=function(e,t){if(C.defined("extrudedHeightReference",t),!c(e)){t!==qe.NONE&&mt(mt.geometryExtrudedHeightReference);return}return Mu(t)?Ec.CLAMP_TO_GROUND:e};Ec.CLAMP_TO_GROUND="clamp";Ec.computeGeometryOffsetAttribute=function(e,t,n,i){(!c(e)||!c(t))&&(t=qe.NONE),(!c(n)||!c(i))&&(i=qe.NONE);let o=0;if(t!==qe.NONE&&o++,i===qe.RELATIVE_TO_GROUND&&o++,o===2)return Zt.ALL;if(o===1)return Zt.TOP};var Un=Ec;var Lae=new z,Nae=d.ZERO,Fae=new d,Bae=new te;function aYe(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.cornerType=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.offsetAttribute=void 0}function ld(e,t){Un.call(this,{entity:e,scene:t,geometryOptions:new aYe(e),geometryPropertyName:"corridor",observedPropertyNames:["availability","corridor"]}),this._onEntityPropertyChanged(e,"corridor",e.corridor,void 0)}c(Object.create)&&(ld.prototype=Object.create(Un.prototype),ld.prototype.constructor=ld);ld.prototype.createFillGeometryInstance=function(e){if(C.defined("time",e),!this._fillEnabled)throw new w("This instance does not represent a filled geometry.");let t=this._entity,n=t.isAvailable(e),i={show:new gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:Mn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Ut){let o;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,Lae)),c(o)||(o=z.WHITE),i.color=Ht.fromColor(o)}return c(this._options.offsetAttribute)&&(i.offset=qi.fromCartesian3(G.getValueOrDefault(this._terrainOffsetProperty,e,Nae,Fae))),new wt({id:t,geometry:new VC(this._options),attributes:i})};ld.prototype.createOutlineGeometryInstance=function(e){if(C.defined("time",e),!this._outlineEnabled)throw new w("This instance does not represent an outlined geometry.");let t=this._entity,n=t.isAvailable(e),i=G.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,Lae),o={show:new gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(i),distanceDisplayCondition:Mn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0};return c(this._options.offsetAttribute)&&(o.offset=qi.fromCartesian3(G.getValueOrDefault(this._terrainOffsetProperty,e,Nae,Fae))),new wt({id:t,geometry:new EB(this._options),attributes:o})};ld.prototype._computeCenter=function(e,t){let n=G.getValueOrUndefined(this._entity.corridor.positions,e);if(!(!c(n)||n.length===0))return d.clone(n[Math.floor(n.length/2)],t)};ld.prototype._isHidden=function(e,t){return!c(t.positions)||!c(t.width)||Qn.prototype._isHidden.call(this,e,t)};ld.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!G.isConstant(t.height)||!G.isConstant(t.extrudedHeight)||!G.isConstant(t.granularity)||!G.isConstant(t.width)||!G.isConstant(t.outlineWidth)||!G.isConstant(t.cornerType)||!G.isConstant(t.zIndex)||this._onTerrain&&!G.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Ut)};ld.prototype._setStaticOptions=function(e,t){let n=G.getValueOrUndefined(t.height,Ue.MINIMUM_VALUE),i=G.getValueOrDefault(t.heightReference,Ue.MINIMUM_VALUE,qe.NONE),o=G.getValueOrUndefined(t.extrudedHeight,Ue.MINIMUM_VALUE),r=G.getValueOrDefault(t.extrudedHeightReference,Ue.MINIMUM_VALUE,qe.NONE);c(o)&&!c(n)&&(n=0);let s=this._options;s.vertexFormat=this._materialProperty instanceof Ut?nn.VERTEX_FORMAT:eo.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(Ue.MINIMUM_VALUE,s.positions),s.width=t.width.getValue(Ue.MINIMUM_VALUE),s.granularity=G.getValueOrUndefined(t.granularity,Ue.MINIMUM_VALUE),s.cornerType=G.getValueOrUndefined(t.cornerType,Ue.MINIMUM_VALUE),s.offsetAttribute=Un.computeGeometryOffsetAttribute(n,i,o,r),s.height=Un.getGeometryHeight(n,i),o=Un.getGeometryExtrudedHeight(o,r),o===Un.CLAMP_TO_GROUND&&(o=ai.getMinimumMaximumHeights(VC.computeRectangle(s,Bae)).minimumTerrainHeight),s.extrudedHeight=o};ld.DynamicGeometryUpdater=HC;function HC(e,t,n){Jn.call(this,e,t,n)}c(Object.create)&&(HC.prototype=Object.create(Jn.prototype),HC.prototype.constructor=HC);HC.prototype._isHidden=function(e,t,n){let i=this._options;return!c(i.positions)||!c(i.width)||Jn.prototype._isHidden.call(this,e,t,n)};HC.prototype._setOptions=function(e,t,n){let i=this._options,o=G.getValueOrUndefined(t.height,n),r=G.getValueOrDefault(t.heightReference,n,qe.NONE),s=G.getValueOrUndefined(t.extrudedHeight,n),a=G.getValueOrDefault(t.extrudedHeightReference,n,qe.NONE);c(s)&&!c(o)&&(o=0),i.positions=G.getValueOrUndefined(t.positions,n),i.width=G.getValueOrUndefined(t.width,n),i.granularity=G.getValueOrUndefined(t.granularity,n),i.cornerType=G.getValueOrUndefined(t.cornerType,n),i.offsetAttribute=Un.computeGeometryOffsetAttribute(o,r,s,a),i.height=Un.getGeometryHeight(o,r),s=Un.getGeometryExtrudedHeight(s,a),s===Un.CLAMP_TO_GROUND&&(s=ai.getMinimumMaximumHeights(VC.computeRectangle(i,Bae)).minimumTerrainHeight),i.extrudedHeight=s};var wB=ld;function SB(){w.throwInstantiationError()}Object.defineProperties(SB.prototype,{name:{get:w.throwInstantiationError},clock:{get:w.throwInstantiationError},entities:{get:w.throwInstantiationError},isLoading:{get:w.throwInstantiationError},changedEvent:{get:w.throwInstantiationError},errorEvent:{get:w.throwInstantiationError},loadingEvent:{get:w.throwInstantiationError},show:{get:w.throwInstantiationError},clustering:{get:w.throwInstantiationError}});SB.prototype.update=function(e){w.throwInstantiationError()};SB.setLoading=function(e,t){e._isLoading!==t&&(t?e._entityCollection.suspendEvents():e._entityCollection.resumeEvents(),e._isLoading=t,e._loading.raiseEvent(e,t))};var kr=SB;function Fh(e,t){C.typeOf.object("ellipsoid",e),this._ellipsoid=e,this._cameraPosition=new d,this._cameraPositionInScaledSpace=new d,this._distanceToLimbInScaledSpaceSquared=0,c(t)&&(this.cameraPosition=t)}Object.defineProperties(Fh.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){let n=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=d.magnitudeSquared(n)-1;d.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=n,this._distanceToLimbInScaledSpaceSquared=i}}});var kae=new d;Fh.prototype.isPointVisible=function(e){let n=this._ellipsoid.transformPositionToScaledSpace(e,kae);return G9(n,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};Fh.prototype.isScaledSpacePointVisible=function(e){return G9(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var cYe=new d;Fh.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){let n=this._ellipsoid,i,o;return c(t)&&t<0&&n.minimumRadius>-t?(o=cYe,o.x=this._cameraPosition.x/(n.radii.x+t),o.y=this._cameraPosition.y/(n.radii.y+t),o.z=this._cameraPosition.z/(n.radii.z+t),i=o.x*o.x+o.y*o.y+o.z*o.z-1):(o=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared),G9(e,o,i)};Fh.prototype.computeHorizonCullingPoint=function(e,t,n){return Vae(this._ellipsoid,e,t,n)};var Uae=Z.clone(Z.UNIT_SPHERE);Fh.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,n,i){let o=zae(this._ellipsoid,n,Uae);return Vae(o,e,t,i)};Fh.prototype.computeHorizonCullingPointFromVertices=function(e,t,n,i,o){return Hae(this._ellipsoid,e,t,n,i,o)};Fh.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,n,i,o,r){let s=zae(this._ellipsoid,o,Uae);return Hae(s,e,t,n,i,r)};var lYe=[];Fh.prototype.computeHorizonCullingPointFromRectangle=function(e,t,n){C.typeOf.object("rectangle",e);let i=te.subsample(e,t,0,lYe),o=ne.fromPoints(i);if(!(d.magnitude(o.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(o.center,i,n)};var uYe=new d;function zae(e,t,n){if(c(t)&&t<0&&e.minimumRadius>-t){let i=d.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,uYe);e=Z.fromCartesian3(i,n)}return e}function Vae(e,t,n,i){C.typeOf.object("directionToPoint",t),C.defined("positions",n),c(i)||(i=new d);let o=Wae(e,t),r=0;for(let s=0,a=n.length;s<a;++s){let l=n[s],u=Gae(e,l,o);if(u<0)return;r=Math.max(r,u)}return jae(o,r,i)}var AB=new d;function Hae(e,t,n,i,o,r){C.typeOf.object("directionToPoint",t),C.defined("vertices",n),C.typeOf.number("stride",i),c(r)||(r=new d),i=g(i,3),o=g(o,d.ZERO);let s=Wae(e,t),a=0;for(let l=0,u=n.length;l<u;l+=i){AB.x=n[l]+o.x,AB.y=n[l+1]+o.y,AB.z=n[l+2]+o.z;let f=Gae(e,AB,s);if(f<0)return;a=Math.max(a,f)}return jae(s,a,r)}function G9(e,t,n){let i=t,o=n,r=d.subtract(e,i,kae),s=-d.dot(r,i);return!(o<0?s>0:s>o&&s*s/d.magnitudeSquared(r)>o)}var fYe=new d,dYe=new d;function Gae(e,t,n){let i=e.transformPositionToScaledSpace(t,fYe),o=d.magnitudeSquared(i),r=Math.sqrt(o),s=d.divideByScalar(i,r,dYe);o=Math.max(1,o),r=Math.max(1,r);let a=d.dot(s,n),l=d.magnitude(d.cross(s,n,s)),u=1/r,f=Math.sqrt(o-1)*u;return 1/(a*u-l*f)}function jae(e,t,n){if(!(t<=0||t===1/0||t!==t))return d.multiplyByScalar(e,t,n)}var H9=new d;function Wae(e,t){return d.equals(t,d.ZERO)?t:(e.transformPositionToScaledSpace(t,H9),d.normalize(H9,H9))}var Rg=Fh;function hr(e,t){if(e=g(e,g.EMPTY_OBJECT),c(e.disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new w("disableDepthTestDistance must be greater than or equal to 0.0.");let n=e.translucencyByDistance,i=e.scaleByDistance,o=e.distanceDisplayCondition;if(c(n)){if(n.far<=n.near)throw new w("translucencyByDistance.far must be greater than translucencyByDistance.near.");n=Bt.clone(n)}if(c(i)){if(i.far<=i.near)throw new w("scaleByDistance.far must be greater than scaleByDistance.near.");i=Bt.clone(i)}if(c(o)){if(o.far<=o.near)throw new w("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");o=Nt.clone(o)}this._show=g(e.show,!0),this._position=d.clone(g(e.position,d.ZERO)),this._actualPosition=d.clone(this._position),this._color=z.clone(g(e.color,z.WHITE)),this._outlineColor=z.clone(g(e.outlineColor,z.TRANSPARENT)),this._outlineWidth=g(e.outlineWidth,0),this._pixelSize=g(e.pixelSize,10),this._scaleByDistance=i,this._translucencyByDistance=n,this._distanceDisplayCondition=o,this._disableDepthTestDistance=g(e.disableDepthTestDistance,0),this._id=e.id,this._collection=g(e.collection,t),this._clusterShow=!0,this._pickId=void 0,this._pointPrimitiveCollection=t,this._dirty=!1,this._index=-1,this._splitDirection=g(e.splitDirection,Nr.NONE)}var qae=hr.SHOW_INDEX=0,Kae=hr.POSITION_INDEX=1,hYe=hr.COLOR_INDEX=2,mYe=hr.OUTLINE_COLOR_INDEX=3,pYe=hr.OUTLINE_WIDTH_INDEX=4,_Ye=hr.PIXEL_SIZE_INDEX=5,gYe=hr.SCALE_BY_DISTANCE_INDEX=6,yYe=hr.TRANSLUCENCY_BY_DISTANCE_INDEX=7,bYe=hr.DISTANCE_DISPLAY_CONDITION_INDEX=8,xYe=hr.DISABLE_DEPTH_DISTANCE_INDEX=9,TYe=hr.SPLIT_DIRECTION_INDEX=10;hr.NUMBER_OF_PROPERTIES=11;function ql(e,t){let n=e._pointPrimitiveCollection;c(n)&&(n._updatePointPrimitive(e,t),e._dirty=!0)}Object.defineProperties(hr.prototype,{show:{get:function(){return this._show},set:function(e){if(!c(e))throw new w("value is required.");this._show!==e&&(this._show=e,ql(this,qae))}},position:{get:function(){return this._position},set:function(e){if(!c(e))throw new w("value is required.");let t=this._position;d.equals(t,e)||(d.clone(e,t),d.clone(e,this._actualPosition),ql(this,Kae))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(c(e)&&e.far<=e.near)throw new w("far distance must be greater than near distance.");let t=this._scaleByDistance;Bt.equals(t,e)||(this._scaleByDistance=Bt.clone(e,t),ql(this,gYe))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(c(e)&&e.far<=e.near)throw new w("far distance must be greater than near distance.");let t=this._translucencyByDistance;Bt.equals(t,e)||(this._translucencyByDistance=Bt.clone(e,t),ql(this,yYe))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){if(!c(e))throw new w("value is required.");this._pixelSize!==e&&(this._pixelSize=e,ql(this,_Ye))}},color:{get:function(){return this._color},set:function(e){if(!c(e))throw new w("value is required.");let t=this._color;z.equals(t,e)||(z.clone(e,t),ql(this,hYe))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!c(e))throw new w("value is required.");let t=this._outlineColor;z.equals(t,e)||(z.clone(e,t),ql(this,mYe))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!c(e))throw new w("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e,ql(this,pYe))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(c(e)&&e.far<=e.near)throw new w("far must be greater than near");Nt.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=Nt.clone(e,this._distanceDisplayCondition),ql(this,bYe))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(!c(e)||e<0)throw new w("disableDepthTestDistance must be greater than or equal to 0.0.");this._disableDepthTestDistance=e,ql(this,xYe)}}},id:{get:function(){return this._id},set:function(e){this._id=e,c(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,ql(this,qae))}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,ql(this,TYe))}}});hr.prototype.getPickId=function(e){return c(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId};hr.prototype._getActualPosition=function(){return this._actualPosition};hr.prototype._setActualPosition=function(e){d.clone(e,this._actualPosition),ql(this,Kae)};var Yae=new ee;hr._computeActualPosition=function(e,t,n){return t.mode===J.SCENE3D?e:(N.multiplyByPoint(n,e,Yae),Yi.computeActualEllipsoidPosition(t,Yae))};var Xae=new ee;hr._computeScreenSpacePosition=function(e,t,n,i){let o=N.multiplyByVector(e,ee.fromElements(t.x,t.y,t.z,1,Xae),Xae);return Yi.worldToWindowCoordinates(n,o,i)};hr.prototype.computeScreenSpacePosition=function(e,t){let n=this._pointPrimitiveCollection;if(c(t)||(t=new k),!c(n))throw new w("PointPrimitive must be in a collection.");if(!c(e))throw new w("scene is required.");let i=n.modelMatrix,o=hr._computeScreenSpacePosition(i,this._actualPosition,e,t);if(c(o))return o.y=e.canvas.clientHeight-o.y,o};hr.getScreenSpaceBoundingBox=function(e,t,n){let i=e.pixelSize,o=i*.5,r=t.x-o,s=t.y-o,a=i,l=i;return c(n)||(n=new je),n.x=r,n.y=s,n.width=a,n.height=l,n};hr.prototype.equals=function(e){return this===e||c(e)&&this._id===e._id&&d.equals(this._position,e._position)&&z.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&z.equals(this._outlineColor,e._outlineColor)&&Bt.equals(this._scaleByDistance,e._scaleByDistance)&&Bt.equals(this._translucencyByDistance,e._translucencyByDistance)&&Nt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._splitDirection===e._splitDirection};hr.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0};var Ds=hr;var o0=`in vec4 v_color;
| in vec4 v_outlineColor;
| in float v_innerPercent;
| in float v_pixelDistance;
| in vec4 v_pickColor;
| in float v_splitDirection;
|
| void main()
| {
| if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
| if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
|
| // The distance in UV space from this fragment to the center of the point, at most 0.5.
| float distanceToCenter = length(gl_PointCoord - vec2(0.5));
| // The max distance stops one pixel shy of the edge to leave space for anti-aliasing.
| float maxDistance = max(0.0, 0.5 - v_pixelDistance);
| float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);
| float innerAlpha = 1.0 - smoothstep(maxDistance * v_innerPercent, 0.5 * v_innerPercent, distanceToCenter);
|
| vec4 color = mix(v_outlineColor, v_color, innerAlpha);
| color.a *= wholeAlpha;
|
| // Fully transparent parts of the billboard are not pickable.
| #if !defined(OPAQUE) && !defined(TRANSLUCENT)
| if (color.a < 0.005) // matches 0/255 and 1/255
| {
| discard;
| }
| #else
| // The billboard is rendered twice. The opaque pass discards translucent fragments
| // and the translucent pass discards opaque fragments.
| #ifdef OPAQUE
| if (color.a < 0.995) // matches < 254/255
| {
| discard;
| }
| #else
| if (color.a >= 0.995) // matches 254/255 and 255/255
| {
| discard;
| }
| #endif
| #endif
|
| out_FragColor = czm_gammaCorrect(color);
| czm_writeLogDepth();
| }
| `;var vB=`uniform float u_maxTotalPointSize;
|
| in vec4 positionHighAndSize;
| in vec4 positionLowAndOutline;
| in vec4 compressedAttribute0; // color, outlineColor, pick color
| in vec4 compressedAttribute1; // show, translucency by distance, some free space
| in vec4 scaleByDistance; // near, nearScale, far, farScale
| in vec4 distanceDisplayConditionAndDisableDepthAndSplitDirection; // near, far, disableDepthTestDistance, splitDirection
|
| out vec4 v_color;
| out vec4 v_outlineColor;
| out float v_innerPercent;
| out float v_pixelDistance;
| out vec4 v_pickColor;
| out float v_splitDirection;
|
| const float SHIFT_LEFT8 = 256.0;
| const float SHIFT_RIGHT8 = 1.0 / 256.0;
|
| void main()
| {
| // Modifying this shader may also require modifications to PointPrimitive._computeScreenSpacePosition
|
| // unpack attributes
| vec3 positionHigh = positionHighAndSize.xyz;
| vec3 positionLow = positionLowAndOutline.xyz;
| float outlineWidthBothSides = 2.0 * positionLowAndOutline.w;
| float totalSize = positionHighAndSize.w + outlineWidthBothSides;
| float outlinePercent = outlineWidthBothSides / totalSize;
| // Scale in response to browser-zoom.
| totalSize *= czm_pixelRatio;
|
| float temp = compressedAttribute1.x * SHIFT_RIGHT8;
| float show = floor(temp);
|
| #ifdef EYE_DISTANCE_TRANSLUCENCY
| vec4 translucencyByDistance;
| translucencyByDistance.x = compressedAttribute1.z;
| translucencyByDistance.z = compressedAttribute1.w;
|
| translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
|
| temp = compressedAttribute1.y * SHIFT_RIGHT8;
| translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
| #endif
|
| ///////////////////////////////////////////////////////////////////////////
|
| vec4 color;
| vec4 outlineColor;
| vec4 pickColor;
|
| // compressedAttribute0.z => pickColor.rgb
|
| temp = compressedAttribute0.z * SHIFT_RIGHT8;
| pickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;
| temp = floor(temp) * SHIFT_RIGHT8;
| pickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;
| pickColor.r = floor(temp);
|
| // compressedAttribute0.x => color.rgb
|
| temp = compressedAttribute0.x * SHIFT_RIGHT8;
| color.b = (temp - floor(temp)) * SHIFT_LEFT8;
| temp = floor(temp) * SHIFT_RIGHT8;
| color.g = (temp - floor(temp)) * SHIFT_LEFT8;
| color.r = floor(temp);
|
| // compressedAttribute0.y => outlineColor.rgb
|
| temp = compressedAttribute0.y * SHIFT_RIGHT8;
| outlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;
| temp = floor(temp) * SHIFT_RIGHT8;
| outlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;
| outlineColor.r = floor(temp);
|
| // compressedAttribute0.w => color.a, outlineColor.a, pickColor.a
|
| temp = compressedAttribute0.w * SHIFT_RIGHT8;
| pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;
| pickColor = pickColor / 255.0;
|
| temp = floor(temp) * SHIFT_RIGHT8;
| outlineColor.a = (temp - floor(temp)) * SHIFT_LEFT8;
| outlineColor /= 255.0;
| color.a = floor(temp);
| color /= 255.0;
|
| ///////////////////////////////////////////////////////////////////////////
|
| vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
| vec4 positionEC = czm_modelViewRelativeToEye * p;
|
| ///////////////////////////////////////////////////////////////////////////
|
| #if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)
| float lengthSq;
| if (czm_sceneMode == czm_sceneMode2D)
| {
| // 2D camera distance is a special case
| // treat all billboards as flattened to the z=0.0 plane
| lengthSq = czm_eyeHeight2D.y;
| }
| else
| {
| lengthSq = dot(positionEC.xyz, positionEC.xyz);
| }
| #endif
|
| #ifdef EYE_DISTANCE_SCALING
| totalSize *= czm_nearFarScalar(scaleByDistance, lengthSq);
| #endif
| if (totalSize > 0.0) {
| // Add padding for anti-aliasing on both sides.
| totalSize += 3.0;
| }
|
| // Clamp to max point size.
| totalSize = min(totalSize, u_maxTotalPointSize);
| // If size is too small, push vertex behind near plane for clipping.
| // Note that context.minimumAliasedPointSize "will be at most 1.0".
| if (totalSize < 1.0)
| {
| positionEC.xyz = vec3(0.0);
| totalSize = 1.0;
| }
|
| float translucency = 1.0;
| #ifdef EYE_DISTANCE_TRANSLUCENCY
| translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);
| // push vertex behind near plane for clipping
| if (translucency < 0.004)
| {
| positionEC.xyz = vec3(0.0);
| }
| #endif
|
| #ifdef DISTANCE_DISPLAY_CONDITION
| float nearSq = distanceDisplayConditionAndDisableDepthAndSplitDirection.x;
| float farSq = distanceDisplayConditionAndDisableDepthAndSplitDirection.y;
| if (lengthSq < nearSq || lengthSq > farSq) {
| // push vertex behind camera to force it to be clipped
| positionEC.xyz = vec3(0.0, 0.0, 1.0);
| }
| #endif
|
| gl_Position = czm_projection * positionEC;
| czm_vertexLogDepth();
|
| #ifdef DISABLE_DEPTH_DISTANCE
| float disableDepthTestDistance = distanceDisplayConditionAndDisableDepthAndSplitDirection.z;
| if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)
| {
| disableDepthTestDistance = czm_minimumDisableDepthTestDistance;
| }
|
| if (disableDepthTestDistance != 0.0)
| {
| // Don't try to "multiply both sides" by w. Greater/less-than comparisons won't work for negative values of w.
| float zclip = gl_Position.z / gl_Position.w;
| bool clipped = (zclip < -1.0 || zclip > 1.0);
| if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))
| {
| // Position z on the near plane.
| gl_Position.z = -gl_Position.w;
| #ifdef LOG_DEPTH
| czm_vertexLogDepth(vec4(czm_currentFrustum.x));
| #endif
| }
| }
| #endif
|
| v_color = color;
| v_color.a *= translucency * show;
| v_outlineColor = outlineColor;
| v_outlineColor.a *= translucency * show;
|
| v_innerPercent = 1.0 - outlinePercent;
| v_pixelDistance = 2.0 / totalSize;
| gl_PointSize = totalSize * show;
| gl_Position *= show;
|
| v_pickColor = pickColor;
| v_splitDirection = distanceDisplayConditionAndDisableDepthAndSplitDirection.w;
| }
| `;var CYe=Ds.SHOW_INDEX,q9=Ds.POSITION_INDEX,$ae=Ds.COLOR_INDEX,EYe=Ds.OUTLINE_COLOR_INDEX,wYe=Ds.OUTLINE_WIDTH_INDEX,SYe=Ds.PIXEL_SIZE_INDEX,Zae=Ds.SCALE_BY_DISTANCE_INDEX,Jae=Ds.TRANSLUCENCY_BY_DISTANCE_INDEX,Qae=Ds.DISTANCE_DISPLAY_CONDITION_INDEX,AYe=Ds.DISABLE_DEPTH_DISTANCE_INDEX,vYe=Ds.SPLIT_DIRECTION_INDEX,Y9=Ds.NUMBER_OF_PROPERTIES,za={positionHighAndSize:0,positionLowAndOutline:1,compressedAttribute0:2,compressedAttribute1:3,scaleByDistance:4,distanceDisplayConditionAndDisableDepthAndSplitDirection:5};function uf(e){e=g(e,g.EMPTY_OBJECT),this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._propertiesChanged=new Uint32Array(Y9),this._maxPixelSize=1,this._baseVolume=new ne,this._baseVolumeWC=new ne,this._baseVolume2D=new ne,this._boundingVolume=new ne,this._boundingVolumeDirty=!1,this._colorCommands=[],this.show=g(e.show,!0),this.modelMatrix=N.clone(g(e.modelMatrix,N.IDENTITY)),this._modelMatrix=N.clone(N.IDENTITY),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.blendOption=g(e.blendOption,Co.OPAQUE_AND_TRANSLUCENT),this._blendOption=void 0,this._mode=J.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW,Pe.STATIC_DRAW];let t=this;this._uniforms={u_maxTotalPointSize:function(){return t._maxTotalPointSize}}}Object.defineProperties(uf.prototype,{length:{get:function(){return X9(this),this._pointPrimitives.length}}});function ece(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}uf.prototype.add=function(e){let t=new Ds(e,this);return t._index=this._pointPrimitives.length,this._pointPrimitives.push(t),this._createVertexArray=!0,t};uf.prototype.remove=function(e){return this.contains(e)?(this._pointPrimitives[e._index]=null,this._pointPrimitivesRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};uf.prototype.removeAll=function(){ece(this._pointPrimitives),this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!0};function X9(e){if(e._pointPrimitivesRemoved){e._pointPrimitivesRemoved=!1;let t=[],n=e._pointPrimitives,i=n.length;for(let o=0,r=0;o<i;++o){let s=n[o];s&&(s._index=r++,t.push(s))}e._pointPrimitives=t}}uf.prototype._updatePointPrimitive=function(e,t){e._dirty||(this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++]=e),++this._propertiesChanged[t]};uf.prototype.contains=function(e){return c(e)&&e._pointPrimitiveCollection===this};uf.prototype.get=function(e){if(!c(e))throw new w("index is required.");return X9(this),this._pointPrimitives[e]};uf.prototype.computeNewBuffersUsage=function(){let e=this._buffersUsage,t=!1,n=this._propertiesChanged;for(let i=0;i<Y9;++i){let o=n[i]===0?Pe.STATIC_DRAW:Pe.STREAM_DRAW;t=t||e[i]!==o,e[i]=o}return t};function DYe(e,t,n){return new y_(e,[{index:za.positionHighAndSize,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:n[q9]},{index:za.positionLowAndShow,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:n[q9]},{index:za.compressedAttribute0,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:n[$ae]},{index:za.compressedAttribute1,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:n[Jae]},{index:za.scaleByDistance,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:n[Zae]},{index:za.distanceDisplayConditionAndDisableDepthAndSplitDirection,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:n[Qae]}],t)}var j9=new kn;function tce(e,t,n,i){let o=i._index,r=i._getActualPosition();e._mode===J.SCENE3D&&(ne.expand(e._baseVolume,r,e._baseVolume),e._boundingVolumeDirty=!0),kn.fromCartesian(r,j9);let s=i.pixelSize,a=i.outlineWidth;e._maxPixelSize=Math.max(e._maxPixelSize,s+a);let l=n[za.positionHighAndSize],u=j9.high;l(o,u.x,u.y,u.z,s);let f=n[za.positionLowAndOutline],h=j9.low;f(o,h.x,h.y,h.z,a)}var DB=65536,Iv=256;function nce(e,t,n,i){let o=i._index,r=i.color,s=i.getPickId(t).color,a=i.outlineColor,l=z.floatToByte(r.red),u=z.floatToByte(r.green),f=z.floatToByte(r.blue),h=l*DB+u*Iv+f;l=z.floatToByte(a.red),u=z.floatToByte(a.green),f=z.floatToByte(a.blue);let m=l*DB+u*Iv+f;l=z.floatToByte(s.red),u=z.floatToByte(s.green),f=z.floatToByte(s.blue);let p=l*DB+u*Iv+f,_=z.floatToByte(r.alpha)*DB+z.floatToByte(a.alpha)*Iv+z.floatToByte(s.alpha),b=n[za.compressedAttribute0];b(o,h,m,p,_)}function ice(e,t,n,i){let o=i._index,r=0,s=1,a=1,l=1,u=i.translucencyByDistance;c(u)&&(r=u.near,s=u.nearValue,a=u.far,l=u.farValue,(s!==1||l!==1)&&(e._shaderTranslucencyByDistance=!0));let f=i.show&&i.clusterShow;i.color.alpha===0&&i.outlineColor.alpha===0&&(f=!1),s=O.clamp(s,0,1),s=s===1?255:s*255|0;let h=(f?1:0)*Iv+s;l=O.clamp(l,0,1),l=l===1?255:l*255|0;let m=l,p=n[za.compressedAttribute1];p(o,h,m,r,a)}function oce(e,t,n,i){let o=i._index,r=n[za.scaleByDistance],s=0,a=1,l=1,u=1,f=i.scaleByDistance;c(f)&&(s=f.near,a=f.nearValue,l=f.far,u=f.farValue,(a!==1||u!==1)&&(e._shaderScaleByDistance=!0)),r(o,s,a,l,u)}function rce(e,t,n,i){let o=i._index,r=n[za.distanceDisplayConditionAndDisableDepthAndSplitDirection],s=0,a=Number.MAX_VALUE,l=i.distanceDisplayCondition;c(l)&&(s=l.near,a=l.far,s*=s,a*=a,e._shaderDistanceDisplayCondition=!0);let u=i.disableDepthTestDistance;u*=u,u>0&&(e._shaderDisableDepthDistance=!0,u===Number.POSITIVE_INFINITY&&(u=-1));let f=0,h=i.splitDirection;c(h)&&(f=h),r(o,s,a,u,f)}function IYe(e,t,n,i){tce(e,t,n,i),nce(e,t,n,i),ice(e,t,n,i),oce(e,t,n,i),rce(e,t,n,i)}function W9(e,t,n,i,o,r){let s;i.mode===J.SCENE3D?(s=e._baseVolume,e._boundingVolumeDirty=!0):s=e._baseVolume2D;let a=[];for(let l=0;l<n;++l){let u=t[l],f=u.position,h=Ds._computeActualPosition(f,i,o);c(h)&&(u._setActualPosition(h),r?a.push(h):ne.expand(s,h,s))}r&&ne.fromPoints(a,s)}function OYe(e,t){let n=t.mode,i=e._pointPrimitives,o=e._pointPrimitivesToUpdate,r=e._modelMatrix;e._createVertexArray||e._mode!==n||n!==J.SCENE3D&&!N.equals(r,e.modelMatrix)?(e._mode=n,N.clone(e.modelMatrix,r),e._createVertexArray=!0,(n===J.SCENE3D||n===J.SCENE2D||n===J.COLUMBUS_VIEW)&&W9(e,i,i.length,t,r,!0)):n===J.MORPHING?W9(e,i,i.length,t,r,!0):(n===J.SCENE2D||n===J.COLUMBUS_VIEW)&&W9(e,o,e._pointPrimitivesToUpdateIndex,t,r,!1)}function PYe(e,t,n){let o=t.camera.getPixelSize(n,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*e._maxPixelSize;n.radius+=o}var RYe=[];uf.prototype.update=function(e){if(X9(this),!this.show)return;this._maxTotalPointSize=ht.maximumAliasedPointSize,OYe(this,e);let n=this._pointPrimitives.length,i=this._pointPrimitivesToUpdate,o=this._pointPrimitivesToUpdateIndex,r=this._propertiesChanged,s=this._createVertexArray,a,l=e.context,u=e.passes,f=u.pick;if(s||!f&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(let v=0;v<Y9;++v)r[v]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=DYe(l,n,this._buffersUsage),a=this._vaf.writers;for(let v=0;v<n;++v){let D=this._pointPrimitives[v];D._dirty=!1,IYe(this,l,a,D)}this._vaf.commit()}this._pointPrimitivesToUpdateIndex=0}else if(o>0){let v=RYe;v.length=0,(r[q9]||r[wYe]||r[SYe])&&v.push(tce),(r[$ae]||r[EYe])&&v.push(nce),(r[CYe]||r[Jae])&&v.push(ice),r[Zae]&&v.push(oce),(r[Qae]||r[AYe]||r[vYe])&&v.push(rce);let D=v.length;if(a=this._vaf.writers,o/n>.1){for(let R=0;R<o;++R){let P=i[R];P._dirty=!1;for(let L=0;L<D;++L)v[L](this,l,a,P)}this._vaf.commit()}else{for(let R=0;R<o;++R){let P=i[R];P._dirty=!1;for(let L=0;L<D;++L)v[L](this,l,a,P);this._vaf.subCommit(P._index,1)}this._vaf.endSubCommits()}this._pointPrimitivesToUpdateIndex=0}if(o>n*1.5&&(i.length=n),!c(this._vaf)||!c(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,ne.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let h,m=N.IDENTITY;e.mode===J.SCENE3D?(m=this.modelMatrix,h=ne.clone(this._baseVolumeWC,this._boundingVolume)):h=ne.clone(this._baseVolume2D,this._boundingVolume),PYe(this,e,h);let p=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,p&&(this._blendOption===Co.OPAQUE||this._blendOption===Co.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=Fe.fromCache({depthTest:{enabled:!0,func:Y.LEQUAL},depthMask:!0}):this._rsOpaque=void 0,this._blendOption===Co.TRANSLUCENT||this._blendOption===Co.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=Fe.fromCache({depthTest:{enabled:!0,func:Y.LEQUAL},depthMask:!1,blending:cn.ALPHA_BLEND}):this._rsTranslucent=void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||e.minimumDisableDepthTestDistance!==0;let _,b;(p||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistance||this._shaderDistanceDisplayCondition&&!this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance)&&(_=new Be({sources:[vB]}),this._shaderScaleByDistance&&_.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&_.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderDistanceDisplayCondition&&_.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&_.defines.push("DISABLE_DEPTH_DISTANCE"),this._blendOption===Co.OPAQUE_AND_TRANSLUCENT&&(b=new Be({defines:["OPAQUE"],sources:[o0]}),this._sp=en.replaceCache({context:l,shaderProgram:this._sp,vertexShaderSource:_,fragmentShaderSource:b,attributeLocations:za}),b=new Be({defines:["TRANSLUCENT"],sources:[o0]}),this._spTranslucent=en.replaceCache({context:l,shaderProgram:this._spTranslucent,vertexShaderSource:_,fragmentShaderSource:b,attributeLocations:za})),this._blendOption===Co.OPAQUE&&(b=new Be({sources:[o0]}),this._sp=en.replaceCache({context:l,shaderProgram:this._sp,vertexShaderSource:_,fragmentShaderSource:b,attributeLocations:za})),this._blendOption===Co.TRANSLUCENT&&(b=new Be({sources:[o0]}),this._spTranslucent=en.replaceCache({context:l,shaderProgram:this._spTranslucent,vertexShaderSource:_,fragmentShaderSource:b,attributeLocations:za})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);let x,T,E,S,A=e.commandList;if(u.render||f){let v=this._colorCommands,D=this._blendOption===Co.OPAQUE,R=this._blendOption===Co.OPAQUE_AND_TRANSLUCENT;x=this._vaf.va,T=x.length,v.length=T;let P=R?T*2:T;for(S=0;S<P;++S){let L=D||R&&S%2===0;E=v[S],c(E)||(E=v[S]=new Ke),E.primitiveType=Se.POINTS,E.pass=L||!R?xe.OPAQUE:xe.TRANSLUCENT,E.owner=this;let F=R?Math.floor(S/2):S;E.boundingVolume=h,E.modelMatrix=m,E.shaderProgram=L?this._sp:this._spTranslucent,E.uniformMap=this._uniforms,E.vertexArray=x[F].va,E.renderState=L?this._rsOpaque:this._rsTranslucent,E.debugShowBoundingVolume=this.debugShowBoundingVolume,E.pickId="v_pickColor",A.push(E)}}};uf.prototype.isDestroyed=function(){return!1};uf.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),ece(this._pointPrimitives),ue(this)};var Ov=uf;var sce=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],K9=1,Pv=8,r0=class e{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");let[n,i]=new Uint8Array(t,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");let o=i>>4;if(o!==K9)throw new Error(`Got v${o} data when expected v${K9}.`);let r=sce[i&15];if(!r)throw new Error("Unrecognized array type.");let[s]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new e(a,s,r,t)}constructor(t,n=64,i=Float64Array,o){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=i,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let r=sce.indexOf(this.ArrayType),s=t*2*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-a%8)%8;if(r<0)throw new Error(`Unexpected typed array class: ${i}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,Pv,t),this.coords=new this.ArrayType(this.data,Pv+a+l,t*2),this._pos=t*2,this._finished=!0):(this.data=new ArrayBuffer(Pv+s+a+l),this.ids=new this.IndexArrayType(this.data,Pv,t),this.coords=new this.ArrayType(this.data,Pv+a+l,t*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(K9<<4)+r]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=t)}add(t,n){let i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=t,this.coords[this._pos++]=n,i}finish(){let t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return Z9(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,n,i,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:r,coords:s,nodeSize:a}=this,l=[0,r.length-1,0],u=[];for(;l.length;){let f=l.pop()||0,h=l.pop()||0,m=l.pop()||0;if(h-m<=a){for(let x=m;x<=h;x++){let T=s[2*x],E=s[2*x+1];T>=t&&T<=i&&E>=n&&E<=o&&u.push(r[x])}continue}let p=m+h>>1,_=s[2*p],b=s[2*p+1];_>=t&&_<=i&&b>=n&&b<=o&&u.push(r[p]),(f===0?t<=_:n<=b)&&(l.push(m),l.push(p-1),l.push(1-f)),(f===0?i>=_:o>=b)&&(l.push(p+1),l.push(h),l.push(1-f))}return u}within(t,n,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:r,nodeSize:s}=this,a=[0,o.length-1,0],l=[],u=i*i;for(;a.length;){let f=a.pop()||0,h=a.pop()||0,m=a.pop()||0;if(h-m<=s){for(let x=m;x<=h;x++)ace(r[2*x],r[2*x+1],t,n)<=u&&l.push(o[x]);continue}let p=m+h>>1,_=r[2*p],b=r[2*p+1];ace(_,b,t,n)<=u&&l.push(o[p]),(f===0?t-i<=_:n-i<=b)&&(a.push(m),a.push(p-1),a.push(1-f)),(f===0?t+i>=_:n+i>=b)&&(a.push(p+1),a.push(h),a.push(1-f))}return l}};function Z9(e,t,n,i,o,r){if(o-i<=n)return;let s=i+o>>1;cce(e,t,s,i,o,r),Z9(e,t,n,i,s-1,1-r),Z9(e,t,n,s+1,o,1-r)}function cce(e,t,n,i,o,r){for(;o>i;){if(o-i>600){let u=o-i+1,f=n-i+1,h=Math.log(u),m=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*m*(u-m)/u)*(f-u/2<0?-1:1),_=Math.max(i,Math.floor(n-f*m/u+p)),b=Math.min(o,Math.floor(n+(u-f)*m/u+p));cce(e,t,n,_,b,r)}let s=t[2*n+r],a=i,l=o;for(Rv(e,t,i,n),t[2*o+r]>s&&Rv(e,t,i,o);a<l;){for(Rv(e,t,a,l),a++,l--;t[2*a+r]<s;)a++;for(;t[2*l+r]>s;)l--}t[2*i+r]===s?Rv(e,t,i,l):(l++,Rv(e,t,l,o)),l<=n&&(i=l+1),n<=l&&(o=l-1)}}function Rv(e,t,n,i){$9(e,n,i),$9(t,2*n,2*i),$9(t,2*n+1,2*i+1)}function $9(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}function ace(e,t,n,i){let o=e-n,r=t-i;return o*o+r*r}function ud(e){e=g(e,g.EMPTY_OBJECT),this._enabled=g(e.enabled,!1),this._pixelRange=g(e.pixelRange,80),this._minimumClusterSize=g(e.minimumClusterSize,2),this._clusterBillboards=g(e.clusterBillboards,!0),this._clusterLabels=g(e.clusterLabels,!0),this._clusterPoints=g(e.clusterPoints,!0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity={},this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._clusterDirty=!1,this._cluster=void 0,this._removeEventListener=void 0,this._clusterEvent=new fe,this.show=g(e.show,!0)}function lce(e,t){e.x-=t,e.y-=t,e.width+=t*2,e.height+=t*2}var MYe=new je;function uce(e,t,n,i,o){if(c(e._labelCollection)&&i._clusterLabels?o=Yb.getScreenSpaceBoundingBox(e,t,o):c(e._billboardCollection)&&i._clusterBillboards?o=no.getScreenSpaceBoundingBox(e,t,o):c(e._pointPrimitiveCollection)&&i._clusterPoints&&(o=Ds.getScreenSpaceBoundingBox(e,t,o)),lce(o,n),i._clusterLabels&&!c(e._labelCollection)&&c(e.id)&&dce(i,e.id.id)&&c(e.id._label)){let r=i._collectionIndicesByEntity[e.id.id].labelIndex,s=i._labelCollection.get(r),a=Yb.getScreenSpaceBoundingBox(s,t,MYe);lce(a,n),o=je.union(o,a,o)}return o}function LYe(e,t){if(e.clusterShow=!0,!c(e._labelCollection)&&c(e.id)&&dce(t,e.id.id)&&c(e.id._label)){let n=t._collectionIndicesByEntity[e.id.id].labelIndex,i=t._labelCollection.get(n);i.clusterShow=!0}}function fce(e,t,n,i){let o={billboard:i._clusterBillboardCollection.add(),label:i._clusterLabelCollection.add(),point:i._clusterPointCollection.add()};o.billboard.show=!1,o.point.show=!1,o.label.show=!0,o.label.text=t.toLocaleString(),o.label.id=n,o.billboard.position=o.label.position=o.point.position=e,i._clusterEvent.raiseEvent(n,o)}function dce(e,t){return c(e)&&c(e._collectionIndicesByEntity[t])&&c(e._collectionIndicesByEntity[t].labelIndex)}function J9(e,t,n,i,o){if(!c(e))return;let r=e.length;for(let s=0;s<r;++s){let a=e.get(s);if(a.clusterShow=!1,!a.show||o._scene.mode===J.SCENE3D&&!i.isPointVisible(a.position))continue;let l=o._clusterLabels&&c(a._labelCollection),u=o._clusterBillboards&&c(a.id._billboard),f=o._clusterPoints&&c(a.id._point);if(l&&(f||u))continue;let h=a.computeScreenSpacePosition(n);c(h)&&t.push({index:s,collection:e,clustered:!1,coord:h})}}var NYe=new je,FYe=new je,BYe=new je;function kYe(e){return function(t){if(c(t)&&t<.05||!e.enabled)return;let n=e._scene,i=e._labelCollection,o=e._billboardCollection,r=e._pointCollection;if(!c(i)&&!c(o)&&!c(r)||!e._clusterBillboards&&!e._clusterLabels&&!e._clusterPoints)return;let s=e._clusterLabelCollection,a=e._clusterBillboardCollection,l=e._clusterPointCollection;c(s)?s.removeAll():s=e._clusterLabelCollection=new hp({scene:n}),c(a)?a.removeAll():a=e._clusterBillboardCollection=new Ju({scene:n}),c(l)?l.removeAll():l=e._clusterPointCollection=new Ov;let u=e._pixelRange,f=e._minimumClusterSize,h=e._previousClusters,m=[],p=e._previousHeight,_=n.camera.positionCartographic.height,b=n.ellipsoid,x=n.camera.positionWC,T=new Rg(b,x),E=[];e._clusterLabels&&J9(i,E,n,T,e),e._clusterBillboards&&J9(o,E,n,T,e),e._clusterPoints&&J9(r,E,n,T,e);let S,A,v,D,R,P,L,F,y,I,M,B;if(E.length>0){let U=new r0(E.length,64,Uint32Array);for(let V=0;V<E.length;++V)U.add(E[V].coord.x,E[V].coord.y);if(U.finish(),_<p)for(v=h.length,S=0;S<v;++S){let V=h[S];if(!T.isPointVisible(V.position))continue;let W=no._computeScreenSpacePosition(N.IDENTITY,V.position,d.ZERO,k.ZERO,n);if(!c(W))continue;let H=1-_/p,X=V.width=V.width*H,$=V.height=V.height*H;X=Math.max(X,V.minimumWidth),$=Math.max($,V.minimumHeight);let ae=W.x-X*.5,se=W.y-$*.5,he=W.x+X,ge=W.y+$;for(R=U.range(ae,se,he,ge),P=R.length,I=0,y=[],A=0;A<P;++A)L=R[A],F=E[L],F.clustered||(++I,M=F.collection,B=F.index,y.push(M.get(B).id));if(I>=f)for(fce(V.position,I,y,e),m.push(V),A=0;A<P;++A)E[R[A]].clustered=!0}for(v=E.length,S=0;S<v;++S){let V=E[S];if(V.clustered)continue;V.clustered=!0,M=V.collection,B=V.index;let W=M.get(B);D=uce(W,V.coord,u,e,NYe);let H=je.clone(D,FYe);R=U.range(D.x,D.y,D.x+D.width,D.y+D.height),P=R.length;let X=d.clone(W.position);for(I=1,y=[W.id],A=0;A<P;++A)if(L=R[A],F=E[L],!F.clustered){let $=F.collection.get(F.index),ae=uce($,F.coord,u,e,BYe);d.add($.position,X,X),je.union(H,ae,H),++I,y.push($.id)}if(I>=f){let $=d.multiplyByScalar(X,1/I,X);for(fce($,I,y,e),m.push({position:$,width:H.width,height:H.height,minimumWidth:D.width,minimumHeight:D.height}),A=0;A<P;++A)E[R[A]].clustered=!0}else LYe(W,e)}}s.length===0&&(s.destroy(),e._clusterLabelCollection=void 0),a.length===0&&(a.destroy(),e._clusterBillboardCollection=void 0),l.length===0&&(l.destroy(),e._clusterPointCollection=void 0),e._previousClusters=m,e._previousHeight=_}}ud.prototype._initialize=function(e){this._scene=e;let t=kYe(this);this._cluster=t,this._removeEventListener=e.camera.changed.addEventListener(t)};Object.defineProperties(ud.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabledDirty=e!==this._enabled,this._enabled=e}},pixelRange:{get:function(){return this._pixelRange},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._pixelRange,this._pixelRange=e}},minimumClusterSize:{get:function(){return this._minimumClusterSize},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._minimumClusterSize,this._minimumClusterSize=e}},clusterEvent:{get:function(){return this._clusterEvent}},clusterBillboards:{get:function(){return this._clusterBillboards},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterBillboards,this._clusterBillboards=e}},clusterLabels:{get:function(){return this._clusterLabels},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterLabels,this._clusterLabels=e}},clusterPoints:{get:function(){return this._clusterPoints},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterPoints,this._clusterPoints=e}}});function eW(e,t,n,i){return function(o){let r=this[e];c(this._collectionIndicesByEntity)||(this._collectionIndicesByEntity={});let s=this._collectionIndicesByEntity[o.id];if(c(s)||(s=this._collectionIndicesByEntity[o.id]={billboardIndex:void 0,labelIndex:void 0,pointIndex:void 0}),c(r)&&c(s[i]))return r.get(s[i]);c(r)||(r=this[e]=new t({scene:this._scene}));let a,l,u=this[n];u.length>0?(a=u.shift(),l=r.get(a)):(l=r.add(),a=r.length-1),s[i]=a;let f=this;return Promise.resolve().then(function(){f._clusterDirty=!0}),l}}function tW(e,t){let n=e._collectionIndicesByEntity[t];!c(n.billboardIndex)&&!c(n.labelIndex)&&!c(n.pointIndex)&&delete e._collectionIndicesByEntity[t]}ud.prototype.getLabel=eW("_labelCollection",hp,"_unusedLabelIndices","labelIndex");ud.prototype.removeLabel=function(e){let t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!c(this._labelCollection)||!c(t)||!c(t.labelIndex))return;let n=t.labelIndex;t.labelIndex=void 0,tW(this,e.id);let i=this._labelCollection.get(n);i.show=!1,i.text="",i.id=void 0,this._unusedLabelIndices.push(n),this._clusterDirty=!0};ud.prototype.getBillboard=eW("_billboardCollection",Ju,"_unusedBillboardIndices","billboardIndex");ud.prototype.removeBillboard=function(e){let t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!c(this._billboardCollection)||!c(t)||!c(t.billboardIndex))return;let n=t.billboardIndex;t.billboardIndex=void 0,tW(this,e.id);let i=this._billboardCollection.get(n);i.id=void 0,i.show=!1,i.image=void 0,this._unusedBillboardIndices.push(n),this._clusterDirty=!0};ud.prototype.getPoint=eW("_pointCollection",Ov,"_unusedPointIndices","pointIndex");ud.prototype.removePoint=function(e){let t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!c(this._pointCollection)||!c(t)||!c(t.pointIndex))return;let n=t.pointIndex;t.pointIndex=void 0,tW(this,e.id);let i=this._pointCollection.get(n);i.show=!1,i.id=void 0,this._unusedPointIndices.push(n),this._clusterDirty=!0};function Q9(e){if(!c(e))return;let t=e.length;for(let n=0;n<t;++n)e.get(n).clusterShow=!0}function UYe(e){e.enabled||(c(e._clusterLabelCollection)&&e._clusterLabelCollection.destroy(),c(e._clusterBillboardCollection)&&e._clusterBillboardCollection.destroy(),c(e._clusterPointCollection)&&e._clusterPointCollection.destroy(),e._clusterLabelCollection=void 0,e._clusterBillboardCollection=void 0,e._clusterPointCollection=void 0,Q9(e._labelCollection),Q9(e._billboardCollection),Q9(e._pointCollection))}ud.prototype.update=function(e){if(!this.show)return;let t;c(this._labelCollection)&&this._labelCollection.length>0&&this._labelCollection.get(0)._glyphs.length===0&&(t=e.commandList,e.commandList=[],this._labelCollection.update(e),e.commandList=t),c(this._billboardCollection)&&this._billboardCollection.length>0&&!c(this._billboardCollection.get(0).width)&&(t=e.commandList,e.commandList=[],this._billboardCollection.update(e),e.commandList=t),this._enabledDirty&&(this._enabledDirty=!1,UYe(this),this._clusterDirty=!0),this._clusterDirty&&(this._clusterDirty=!1,this._cluster()),c(this._clusterLabelCollection)&&this._clusterLabelCollection.update(e),c(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(e),c(this._clusterPointCollection)&&this._clusterPointCollection.update(e),c(this._labelCollection)&&this._labelCollection.update(e),c(this._billboardCollection)&&this._billboardCollection.update(e),c(this._pointCollection)&&this._pointCollection.update(e)};ud.prototype.destroy=function(){this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._pointCollection=this._pointCollection&&this._pointCollection.destroy(),this._clusterLabelCollection=this._clusterLabelCollection&&this._clusterLabelCollection.destroy(),this._clusterBillboardCollection=this._clusterBillboardCollection&&this._clusterBillboardCollection.destroy(),this._clusterPointCollection=this._clusterPointCollection&&this._clusterPointCollection.destroy(),c(this._removeEventListener)&&(this._removeEventListener(),this._removeEventListener=void 0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity=void 0,this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._pixelRangeDirty=!1,this._minimumClusterSizeDirty=!1};var ff=ud;function nW(e){this._name=e,this._clock=void 0,this._changed=new fe,this._error=new fe,this._isLoading=!1,this._loading=new fe,this._entityCollection=new qs(this),this._entityCluster=new ff}Object.defineProperties(nW.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._changed.raiseEvent(this))}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading},set:function(e){kr.setLoading(this,e)}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!c(e))throw new w("value must be defined.");this._entityCluster=e}}});nW.prototype.update=function(e){return!0};var IB=nW;var hce={};hce.computePositions=function(e,t,n,i,o){let r=e*.5,s=-r,a=i+i,l=o?2*a:a,u=new Float64Array(l*3),f,h=0,m=0,p=o?a*3:0,_=o?(a+i)*3:i*3;for(f=0;f<i;f++){let b=f/i*O.TWO_PI,x=Math.cos(b),T=Math.sin(b),E=x*n,S=T*n,A=x*t,v=T*t;u[m+p]=E,u[m+p+1]=S,u[m+p+2]=s,u[m+_]=A,u[m+_+1]=v,u[m+_+2]=r,m+=3,o&&(u[h++]=E,u[h++]=S,u[h++]=s,u[h++]=A,u[h++]=v,u[h++]=r)}return u};var GC=hce;var iW=new k,zYe=new d,VYe=new d,HYe=new d,GYe=new d;function Ip(e){e=g(e,g.EMPTY_OBJECT);let t=e.length,n=e.topRadius,i=e.bottomRadius,o=g(e.vertexFormat,Ce.DEFAULT),r=g(e.slices,128);if(!c(t))throw new w("options.length must be defined.");if(!c(n))throw new w("options.topRadius must be defined.");if(!c(i))throw new w("options.bottomRadius must be defined.");if(r<3)throw new w("options.slices must be greater than or equal to 3.");if(c(e.offsetAttribute)&&e.offsetAttribute===Zt.TOP)throw new w("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=t,this._topRadius=n,this._bottomRadius=i,this._vertexFormat=Ce.clone(o),this._slices=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}Ip.packedLength=Ce.packedLength+5;Ip.pack=function(e,t,n){if(!c(e))throw new w("value is required");if(!c(t))throw new w("array is required");return n=g(n,0),Ce.pack(e._vertexFormat,t,n),n+=Ce.packedLength,t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n]=g(e._offsetAttribute,-1),t};var mce=new Ce,jC={vertexFormat:mce,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};Ip.unpack=function(e,t,n){if(!c(e))throw new w("array is required");t=g(t,0);let i=Ce.unpack(e,t,mce);t+=Ce.packedLength;let o=e[t++],r=e[t++],s=e[t++],a=e[t++],l=e[t];return c(n)?(n._vertexFormat=Ce.clone(i,n._vertexFormat),n._length=o,n._topRadius=r,n._bottomRadius=s,n._slices=a,n._offsetAttribute=l===-1?void 0:l,n):(jC.length=o,jC.topRadius=r,jC.bottomRadius=s,jC.slices=a,jC.offsetAttribute=l===-1?void 0:l,new Ip(jC))};Ip.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,o=e._vertexFormat,r=e._slices;if(t<=0||n<0||i<0||n===0&&i===0)return;let s=r+r,a=r+s,l=s+s,u=GC.computePositions(t,n,i,r,!0),f=o.st?new Float32Array(l*2):void 0,h=o.normal?new Float32Array(l*3):void 0,m=o.tangent?new Float32Array(l*3):void 0,p=o.bitangent?new Float32Array(l*3):void 0,_,b=o.normal||o.tangent||o.bitangent;if(b){let R=o.tangent||o.bitangent,P=0,L=0,F=0,y=Math.atan2(i-n,t),I=zYe;I.z=Math.sin(y);let M=Math.cos(y),B=HYe,U=VYe;for(_=0;_<r;_++){let V=_/r*O.TWO_PI,W=M*Math.cos(V),H=M*Math.sin(V);b&&(I.x=W,I.y=H,R&&(B=d.normalize(d.cross(d.UNIT_Z,I,B),B)),o.normal&&(h[P++]=I.x,h[P++]=I.y,h[P++]=I.z,h[P++]=I.x,h[P++]=I.y,h[P++]=I.z),o.tangent&&(m[L++]=B.x,m[L++]=B.y,m[L++]=B.z,m[L++]=B.x,m[L++]=B.y,m[L++]=B.z),o.bitangent&&(U=d.normalize(d.cross(I,B,U),U),p[F++]=U.x,p[F++]=U.y,p[F++]=U.z,p[F++]=U.x,p[F++]=U.y,p[F++]=U.z))}for(_=0;_<r;_++)o.normal&&(h[P++]=0,h[P++]=0,h[P++]=-1),o.tangent&&(m[L++]=1,m[L++]=0,m[L++]=0),o.bitangent&&(p[F++]=0,p[F++]=-1,p[F++]=0);for(_=0;_<r;_++)o.normal&&(h[P++]=0,h[P++]=0,h[P++]=1),o.tangent&&(m[L++]=1,m[L++]=0,m[L++]=0),o.bitangent&&(p[F++]=0,p[F++]=1,p[F++]=0)}let x=12*r-12,T=Oe.createTypedArray(l,x),E=0,S=0;for(_=0;_<r-1;_++)T[E++]=S,T[E++]=S+2,T[E++]=S+3,T[E++]=S,T[E++]=S+3,T[E++]=S+1,S+=2;for(T[E++]=s-2,T[E++]=0,T[E++]=1,T[E++]=s-2,T[E++]=1,T[E++]=s-1,_=1;_<r-1;_++)T[E++]=s+_+1,T[E++]=s+_,T[E++]=s;for(_=1;_<r-1;_++)T[E++]=a,T[E++]=a+_,T[E++]=a+_+1;let A=0;if(o.st){let R=Math.max(n,i);for(_=0;_<l;_++){let P=d.fromArray(u,_*3,GYe);f[A++]=(P.x+R)/(2*R),f[A++]=(P.y+R)/(2*R)}}let v=new fn;o.position&&(v.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:u})),o.normal&&(v.normal=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:h})),o.tangent&&(v.tangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:m})),o.bitangent&&(v.bitangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:p})),o.st&&(v.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:f})),iW.x=t*.5,iW.y=Math.max(i,n);let D=new ne(d.ZERO,k.magnitude(iW));if(c(e._offsetAttribute)){t=u.length;let R=e._offsetAttribute===Zt.NONE?0:1,P=new Uint8Array(t/3).fill(R);v.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:P})}return new st({attributes:v,indices:T,primitiveType:Se.TRIANGLES,boundingSphere:D,offsetAttribute:e._offsetAttribute})};var oW;Ip.getUnitCylinder=function(){return c(oW)||(oW=Ip.createGeometry(new Ip({topRadius:1,bottomRadius:1,length:1,vertexFormat:Ce.POSITION_ONLY}))),oW};var OB=Ip;var rW=new k;function WC(e){e=g(e,g.EMPTY_OBJECT);let t=e.length,n=e.topRadius,i=e.bottomRadius,o=g(e.slices,128),r=Math.max(g(e.numberOfVerticalLines,16),0);if(C.typeOf.number("options.positions",t),C.typeOf.number("options.topRadius",n),C.typeOf.number("options.bottomRadius",i),C.typeOf.number.greaterThanOrEquals("options.slices",o,3),c(e.offsetAttribute)&&e.offsetAttribute===Zt.TOP)throw new w("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=t,this._topRadius=n,this._bottomRadius=i,this._slices=o,this._numberOfVerticalLines=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}WC.packedLength=6;WC.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n++]=e._numberOfVerticalLines,t[n]=g(e._offsetAttribute,-1),t};var s0={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};WC.unpack=function(e,t,n){C.defined("array",e),t=g(t,0);let i=e[t++],o=e[t++],r=e[t++],s=e[t++],a=e[t++],l=e[t];return c(n)?(n._length=i,n._topRadius=o,n._bottomRadius=r,n._slices=s,n._numberOfVerticalLines=a,n._offsetAttribute=l===-1?void 0:l,n):(s0.length=i,s0.topRadius=o,s0.bottomRadius=r,s0.slices=s,s0.numberOfVerticalLines=a,s0.offsetAttribute=l===-1?void 0:l,new WC(s0))};WC.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,o=e._slices,r=e._numberOfVerticalLines;if(t<=0||n<0||i<0||n===0&&i===0)return;let s=o*2,a=GC.computePositions(t,n,i,o,!1),l=o*2,u;if(r>0){let b=Math.min(r,o);u=Math.round(o/b),l+=b}let f=Oe.createTypedArray(s,l*2),h=0,m;for(m=0;m<o-1;m++)f[h++]=m,f[h++]=m+1,f[h++]=m+o,f[h++]=m+1+o;if(f[h++]=o-1,f[h++]=0,f[h++]=o+o-1,f[h++]=o,r>0)for(m=0;m<o;m+=u)f[h++]=m,f[h++]=m+o;let p=new fn;p.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:a}),rW.x=t*.5,rW.y=Math.max(i,n);let _=new ne(d.ZERO,k.magnitude(rW));if(c(e._offsetAttribute)){t=a.length;let b=e._offsetAttribute===Zt.NONE?0:1,x=new Uint8Array(t/3).fill(b);p.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}return new st({attributes:p,indices:f,primitiveType:Se.LINES,boundingSphere:_,offsetAttribute:e._offsetAttribute})};var PB=WC;var pce=d.ZERO,_ce=new d,jYe=new d,gce=new z;function WYe(e){this.id=e,this.vertexFormat=void 0,this.length=void 0,this.topRadius=void 0,this.bottomRadius=void 0,this.slices=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function Yl(e,t){Qn.call(this,{entity:e,scene:t,geometryOptions:new WYe(e),geometryPropertyName:"cylinder",observedPropertyNames:["availability","position","orientation","cylinder"]}),this._onEntityPropertyChanged(e,"cylinder",e.cylinder,void 0)}c(Object.create)&&(Yl.prototype=Object.create(Qn.prototype),Yl.prototype.constructor=Yl);Object.defineProperties(Yl.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});Yl.prototype.createFillGeometryInstance=function(e){if(C.defined("time",e),!this._fillEnabled)throw new w("This instance does not represent a filled geometry.");let t=this._entity,n=t.isAvailable(e),i=new gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=Mn.fromDistanceDisplayCondition(o),s={show:i,distanceDisplayCondition:r,color:void 0,offset:void 0};if(this._materialProperty instanceof Ut){let a;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,gce)),c(a)||(a=z.WHITE),s.color=Ht.fromColor(a)}return c(this._options.offsetAttribute)&&(s.offset=qi.fromCartesian3(G.getValueOrDefault(this._terrainOffsetProperty,e,pce,_ce))),new wt({id:t,geometry:new OB(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,this._options.length*.5,this._scene.ellipsoid),attributes:s})};Yl.prototype.createOutlineGeometryInstance=function(e){if(C.defined("time",e),!this._outlineEnabled)throw new w("This instance does not represent an outlined geometry.");let t=this._entity,n=t.isAvailable(e),i=G.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,gce),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(i),distanceDisplayCondition:Mn.fromDistanceDisplayCondition(o),offset:void 0};return c(this._options.offsetAttribute)&&(r.offset=qi.fromCartesian3(G.getValueOrDefault(this._terrainOffsetProperty,e,pce,_ce))),new wt({id:t,geometry:new PB(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,this._options.length*.5,this._scene.ellipsoid),attributes:r})};Yl.prototype._computeCenter=function(e,t){return G.getValueOrUndefined(this._entity.position,e,t)};Yl.prototype._isHidden=function(e,t){return!c(e.position)||!c(t.length)||!c(t.topRadius)||!c(t.bottomRadius)||Qn.prototype._isHidden.call(this,e,t)};Yl.prototype._isDynamic=function(e,t){return!e.position.isConstant||!G.isConstant(e.orientation)||!t.length.isConstant||!t.topRadius.isConstant||!t.bottomRadius.isConstant||!G.isConstant(t.slices)||!G.isConstant(t.outlineWidth)||!G.isConstant(t.numberOfVerticalLines)};Yl.prototype._setStaticOptions=function(e,t){let n=G.getValueOrDefault(t.heightReference,Ue.MINIMUM_VALUE,qe.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Ut?nn.VERTEX_FORMAT:eo.MaterialSupport.TEXTURED.vertexFormat,i.length=t.length.getValue(Ue.MINIMUM_VALUE),i.topRadius=t.topRadius.getValue(Ue.MINIMUM_VALUE),i.bottomRadius=t.bottomRadius.getValue(Ue.MINIMUM_VALUE),i.slices=G.getValueOrUndefined(t.slices,Ue.MINIMUM_VALUE),i.numberOfVerticalLines=G.getValueOrUndefined(t.numberOfVerticalLines,Ue.MINIMUM_VALUE),i.offsetAttribute=n!==qe.NONE?Zt.ALL:void 0};Yl.prototype._onEntityPropertyChanged=D_;Yl.DynamicGeometryUpdater=qC;function qC(e,t,n){Jn.call(this,e,t,n)}c(Object.create)&&(qC.prototype=Object.create(Jn.prototype),qC.prototype.constructor=qC);qC.prototype._isHidden=function(e,t,n){let i=this._options,o=G.getValueOrUndefined(e.position,n,jYe);return!c(o)||!c(i.length)||!c(i.topRadius)||!c(i.bottomRadius)||Jn.prototype._isHidden.call(this,e,t,n)};qC.prototype._setOptions=function(e,t,n){let i=G.getValueOrDefault(t.heightReference,n,qe.NONE),o=this._options;o.length=G.getValueOrUndefined(t.length,n),o.topRadius=G.getValueOrUndefined(t.topRadius,n),o.bottomRadius=G.getValueOrUndefined(t.bottomRadius,n),o.slices=G.getValueOrUndefined(t.slices,n),o.numberOfVerticalLines=G.getValueOrUndefined(t.numberOfVerticalLines,n),o.offsetAttribute=i!==qe.NONE?Zt.ALL:void 0};var RB=Yl;var qYe={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2},Va=Object.freeze(qYe);var YYe={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2},Or=Object.freeze(YYe);var XYe={NONE:0,HOLD:1,EXTRAPOLATE:2},df=Object.freeze(XYe);var yce=Mr(Sl(),1);function KYe(e){if(!c(e))throw new w("uri is required.");let t=new yce.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),n}var Mg=KYe;var $Ye=O.factorial;function sW(e,t,n,i,o,r){let s=0,a,l,u;if(i>0){for(l=0;l<o;l++){for(a=!1,u=0;u<r.length&&!a;u++)l===r[u]&&(a=!0);a||(r.push(l),s+=sW(e,t,n,i-1,o,r),r.splice(r.length-1,1))}return s}for(s=1,l=0;l<o;l++){for(a=!1,u=0;u<r.length&&!a;u++)l===r[u]&&(a=!0);a||(s*=e-n[t[l]])}return s}var MB={type:"Hermite"};MB.getRequiredDataPoints=function(e,t){if(t=g(t,0),!c(e))throw new w("degree is required.");if(e<0)throw new w("degree must be 0 or greater.");if(t<0)throw new w("inputOrder must be 0 or greater.");return Math.max(Math.floor((e+1)/(t+1)),2)};MB.interpolateOrderZero=function(e,t,n,i,o){c(o)||(o=new Array(i));let r,s,a,l,u,f,h=t.length,m=new Array(i);for(r=0;r<i;r++){o[r]=0;let x=new Array(h);for(m[r]=x,s=0;s<h;s++)x[s]=[]}let p=h,_=new Array(p);for(r=0;r<p;r++)_[r]=r;let b=h-1;for(l=0;l<i;l++){for(s=0;s<p;s++)f=_[s]*i+l,m[l][0].push(n[f]);for(r=1;r<p;r++){let x=!1;for(s=0;s<p-r;s++){let T=t[_[s]],E=t[_[s+r]],S;E-T<=0?(f=_[s]*i+i*r+l,S=n[f],m[l][r].push(S/$Ye(r))):(S=m[l][r-1][s+1]-m[l][r-1][s],m[l][r].push(S/(E-T))),x=x||S!==0}x||(b=r-1)}}for(a=0,u=0;a<=u;a++)for(r=a;r<=b;r++){let x=sW(e,_,t,a,r,[]);for(l=0;l<i;l++){let T=m[l][r][0];o[l+a*i]+=T*x}}return o};var ZYe=[];MB.interpolate=function(e,t,n,i,o,r,s){let a=i*(r+1);c(s)||(s=new Array(a));for(let T=0;T<a;T++)s[T]=0;let l=t.length,u=new Array(l*(o+1)),f;for(f=0;f<l;f++)for(let T=0;T<o+1;T++)u[f*(o+1)+T]=f;let h=u.length,m=ZYe,p=JYe(m,u,t,n,i,o),_=[],b=h*(h+1)/2,x=Math.min(p,r);for(let T=0;T<=x;T++)for(f=T;f<=p;f++){_.length=0;let E=sW(e,u,t,T,f,_),S=Math.floor(f*(1-f)/2)+h*f;for(let A=0;A<i;A++){let v=Math.floor(A*b),D=m[v+S];s[A+T*i]+=D*E}}return s};function JYe(e,t,n,i,o,r){let s,a,l=-1,u=t.length,f=u*(u+1)/2;for(let h=0;h<o;h++){let m=Math.floor(h*f);for(s=0;s<u;s++)a=t[s]*o*(r+1)+h,e[m+s]=i[a];for(let p=1;p<u;p++){let _=0,b=Math.floor(p*(1-p)/2)+u*p,x=!1;for(s=0;s<u-p;s++){let T=n[t[s]],E=n[t[s+p]],S,A;if(E-T<=0)a=t[s]*o*(r+1)+o*p+h,S=i[a],A=S/O.factorial(p),e[m+b+_]=A,_++;else{let v=Math.floor((p-1)*(2-p)/2)+u*(p-1);S=e[m+v+s+1]-e[m+v+s],A=S/(E-T),e[m+b+_]=A,_++}x=x||S!==0}x&&(l=Math.max(l,p))}}return l}var LB=MB;var aW={type:"Lagrange"};aW.getRequiredDataPoints=function(e){return Math.max(e+1,2)};aW.interpolateOrderZero=function(e,t,n,i,o){c(o)||(o=new Array(i));let r,s,a=t.length;for(r=0;r<i;r++)o[r]=0;for(r=0;r<a;r++){let l=1;for(s=0;s<a;s++)if(s!==r){let u=t[r]-t[s];l*=(e-t[s])/u}for(s=0;s<i;s++)o[s]+=l*n[r*i+s]}return o};var NB=aW;var cW={type:"Linear"};cW.getRequiredDataPoints=function(e){return 2};cW.interpolateOrderZero=function(e,t,n,i,o){if(t.length!==2)throw new w("The xTable provided to the linear interpolator must have exactly two elements.");if(i<=0)throw new w("There must be at least 1 dependent variable for each independent variable.");c(o)||(o=new Array(i));let r,s,a,l=t[0],u=t[1];if(l===u)throw new w("Divide by zero error: xTable[0] and xTable[1] are equal");for(r=0;r<i;r++)s=n[r],a=n[r+i],o[r]=((a-s)*e+u*s-l*a)/(u-l);return o};var YC=cW;function Ha(e,t,n){this.clock=g(e,0),this.cone=g(t,0),this.magnitude=g(n,1)}Ha.fromCartesian3=function(e,t){C.typeOf.object("cartesian3",e);let n=e.x,i=e.y,o=e.z,r=n*n+i*i;return c(t)||(t=new Ha),t.clock=Math.atan2(i,n),t.cone=Math.atan2(Math.sqrt(r),o),t.magnitude=Math.sqrt(r+o*o),t};Ha.clone=function(e,t){if(c(e))return c(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=e.magnitude,t):new Ha(e.clock,e.cone,e.magnitude)};Ha.normalize=function(e,t){return C.typeOf.object("spherical",e),c(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=1,t):new Ha(e.clock,e.cone,1)};Ha.equals=function(e,t){return e===t||c(e)&&c(t)&&e.clock===t.clock&&e.cone===t.cone&&e.magnitude===t.magnitude};Ha.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||c(e)&&c(t)&&Math.abs(e.clock-t.clock)<=n&&Math.abs(e.cone-t.cone)<=n&&Math.abs(e.magnitude-t.magnitude)<=n};Ha.prototype.equals=function(e){return Ha.equals(this,e)};Ha.prototype.clone=function(e){return Ha.clone(this,e)};Ha.prototype.equalsEpsilon=function(e,t){return Ha.equalsEpsilon(this,e,t)};Ha.prototype.toString=function(){return`(${this.clock}, ${this.cone}, ${this.magnitude})`};var FB=Ha;var Gv=Mr(Sl(),1);var lW;typeof performance!="undefined"&&typeof performance.now=="function"&&isFinite(performance.now())?lW=function(){return performance.now()}:lW=function(){return Date.now()};var yi=lW;function uW(e){e=g(e,g.EMPTY_OBJECT);let t=e.currentTime,n=e.startTime,i=e.stopTime;if(c(t)?t=K.clone(t):c(n)?t=K.clone(n):c(i)?t=K.addDays(i,-1,new K):t=K.now(),c(n)?n=K.clone(n):n=K.clone(t),c(i)?i=K.clone(i):i=K.addDays(n,1,new K),K.greaterThan(n,i))throw new w("startTime must come before stopTime.");this.startTime=n,this.stopTime=i,this.clockRange=g(e.clockRange,Va.UNBOUNDED),this.canAnimate=g(e.canAnimate,!0),this.onTick=new fe,this.onStop=new fe,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=yi(),this.currentTime=t,this.multiplier=g(e.multiplier,1),this.shouldAnimate=g(e.shouldAnimate,!1),this.clockStep=g(e.clockStep,Or.SYSTEM_CLOCK_MULTIPLIER)}Object.defineProperties(uW.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){K.equals(this._currentTime,e)||(this._clockStep===Or.SYSTEM_CLOCK&&(this._clockStep=Or.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===Or.SYSTEM_CLOCK&&(this._clockStep=Or.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===Or.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=K.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===Or.SYSTEM_CLOCK&&(this._clockStep=Or.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}});uW.prototype.tick=function(){let e=yi(),t=K.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){let n=this._clockStep;if(n===Or.SYSTEM_CLOCK)t=K.now(t);else{let i=this._multiplier;if(n===Or.TICK_DEPENDENT)t=K.addSeconds(t,i,t);else{let a=e-this._lastSystemTime;t=K.addSeconds(t,i*(a/1e3),t)}let o=this.clockRange,r=this.startTime,s=this.stopTime;if(o===Va.CLAMPED)K.lessThan(t,r)?t=K.clone(r,t):K.greaterThan(t,s)&&(t=K.clone(s,t),this.onStop.raiseEvent(this));else if(o===Va.LOOP_STOP)for(K.lessThan(t,r)&&(t=K.clone(r,t));K.greaterThan(t,s);)t=K.addSeconds(r,K.secondsDifference(t,s),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t};var XC=uW;function a0(){this._definitionChanged=new fe,this._startTime=void 0,this._stopTime=void 0,this._currentTime=void 0,this._clockRange=void 0,this._clockStep=void 0,this._multiplier=void 0}Object.defineProperties(a0.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},startTime:Ml("startTime"),stopTime:Ml("stopTime"),currentTime:Ml("currentTime"),clockRange:Ml("clockRange"),clockStep:Ml("clockStep"),multiplier:Ml("multiplier")});a0.prototype.clone=function(e){return c(e)||(e=new a0),e.startTime=this.startTime,e.stopTime=this.stopTime,e.currentTime=this.currentTime,e.clockRange=this.clockRange,e.clockStep=this.clockStep,e.multiplier=this.multiplier,e};a0.prototype.equals=function(e){return this===e||c(e)&&K.equals(this.startTime,e.startTime)&&K.equals(this.stopTime,e.stopTime)&&K.equals(this.currentTime,e.currentTime)&&this.clockRange===e.clockRange&&this.clockStep===e.clockStep&&this.multiplier===e.multiplier};a0.prototype.merge=function(e){if(!c(e))throw new w("source is required.");this.startTime=g(this.startTime,e.startTime),this.stopTime=g(this.stopTime,e.stopTime),this.currentTime=g(this.currentTime,e.currentTime),this.clockRange=g(this.clockRange,e.clockRange),this.clockStep=g(this.clockStep,e.clockStep),this.multiplier=g(this.multiplier,e.multiplier)};a0.prototype.getValue=function(e){return c(e)||(e=new XC),e.startTime=g(this.startTime,e.startTime),e.stopTime=g(this.stopTime,e.stopTime),e.currentTime=g(this.currentTime,e.currentTime),e.clockRange=g(this.clockRange,e.clockRange),e.multiplier=g(this.multiplier,e.multiplier),e.clockStep=g(this.clockStep,e.clockStep),e};var Bh=a0;var QYe=z.WHITE,e7e=.1,t7e=new k(8,8),n7e=new k(0,0),i7e=new k(1,1);function KC(e){e=g(e,g.EMPTY_OBJECT),this._definitionChanged=new fe,this._color=void 0,this._colorSubscription=void 0,this._cellAlpha=void 0,this._cellAlphaSubscription=void 0,this._lineCount=void 0,this._lineCountSubscription=void 0,this._lineThickness=void 0,this._lineThicknessSubscription=void 0,this._lineOffset=void 0,this._lineOffsetSubscription=void 0,this.color=e.color,this.cellAlpha=e.cellAlpha,this.lineCount=e.lineCount,this.lineThickness=e.lineThickness,this.lineOffset=e.lineOffset}Object.defineProperties(KC.prototype,{isConstant:{get:function(){return G.isConstant(this._color)&&G.isConstant(this._cellAlpha)&&G.isConstant(this._lineCount)&&G.isConstant(this._lineThickness)&&G.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:oe("color"),cellAlpha:oe("cellAlpha"),lineCount:oe("lineCount"),lineThickness:oe("lineThickness"),lineOffset:oe("lineOffset")});KC.prototype.getType=function(e){return"Grid"};var o7e=new K;KC.prototype.getValue=function(e,t){return c(e)||(e=K.now(o7e)),c(t)||(t={}),t.color=G.getValueOrClonedDefault(this._color,e,QYe,t.color),t.cellAlpha=G.getValueOrDefault(this._cellAlpha,e,e7e),t.lineCount=G.getValueOrClonedDefault(this._lineCount,e,t7e,t.lineCount),t.lineThickness=G.getValueOrClonedDefault(this._lineThickness,e,i7e,t.lineThickness),t.lineOffset=G.getValueOrClonedDefault(this._lineOffset,e,n7e,t.lineOffset),t};KC.prototype.equals=function(e){return this===e||e instanceof KC&&G.equals(this._color,e._color)&&G.equals(this._cellAlpha,e._cellAlpha)&&G.equals(this._lineCount,e._lineCount)&&G.equals(this._lineThickness,e._lineThickness)&&G.equals(this._lineOffset,e._lineOffset)};var Mv=KC;function $C(e){this._definitionChanged=new fe,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties($C.prototype,{isConstant:{get:function(){return G.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:oe("color")});$C.prototype.getType=function(e){return"PolylineArrow"};var r7e=new K;$C.prototype.getValue=function(e,t){return c(e)||(e=K.now(r7e)),c(t)||(t={}),t.color=G.getValueOrClonedDefault(this._color,e,z.WHITE,t.color),t};$C.prototype.equals=function(e){return this===e||e instanceof $C&&G.equals(this._color,e._color)};var Lv=$C;var s7e=z.WHITE,a7e=z.TRANSPARENT,c7e=16,l7e=255;function ZC(e){e=g(e,g.EMPTY_OBJECT),this._definitionChanged=new fe,this._color=void 0,this._colorSubscription=void 0,this._gapColor=void 0,this._gapColorSubscription=void 0,this._dashLength=void 0,this._dashLengthSubscription=void 0,this._dashPattern=void 0,this._dashPatternSubscription=void 0,this.color=e.color,this.gapColor=e.gapColor,this.dashLength=e.dashLength,this.dashPattern=e.dashPattern}Object.defineProperties(ZC.prototype,{isConstant:{get:function(){return G.isConstant(this._color)&&G.isConstant(this._gapColor)&&G.isConstant(this._dashLength)&&G.isConstant(this._dashPattern)}},definitionChanged:{get:function(){return this._definitionChanged}},color:oe("color"),gapColor:oe("gapColor"),dashLength:oe("dashLength"),dashPattern:oe("dashPattern")});ZC.prototype.getType=function(e){return"PolylineDash"};var u7e=new K;ZC.prototype.getValue=function(e,t){return c(e)||(e=K.now(u7e)),c(t)||(t={}),t.color=G.getValueOrClonedDefault(this._color,e,s7e,t.color),t.gapColor=G.getValueOrClonedDefault(this._gapColor,e,a7e,t.gapColor),t.dashLength=G.getValueOrDefault(this._dashLength,e,c7e,t.dashLength),t.dashPattern=G.getValueOrDefault(this._dashPattern,e,l7e,t.dashPattern),t};ZC.prototype.equals=function(e){return this===e||e instanceof ZC&&G.equals(this._color,e._color)&&G.equals(this._gapColor,e._gapColor)&&G.equals(this._dashLength,e._dashLength)&&G.equals(this._dashPattern,e._dashPattern)};var Nv=ZC;var f7e=z.WHITE,d7e=.25,h7e=1;function JC(e){e=g(e,g.EMPTY_OBJECT),this._definitionChanged=new fe,this._color=void 0,this._colorSubscription=void 0,this._glowPower=void 0,this._glowPowerSubscription=void 0,this._taperPower=void 0,this._taperPowerSubscription=void 0,this.color=e.color,this.glowPower=e.glowPower,this.taperPower=e.taperPower}Object.defineProperties(JC.prototype,{isConstant:{get:function(){return G.isConstant(this._color)&&G.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:oe("color"),glowPower:oe("glowPower"),taperPower:oe("taperPower")});JC.prototype.getType=function(e){return"PolylineGlow"};var m7e=new K;JC.prototype.getValue=function(e,t){return c(e)||(e=K.now(m7e)),c(t)||(t={}),t.color=G.getValueOrClonedDefault(this._color,e,f7e,t.color),t.glowPower=G.getValueOrDefault(this._glowPower,e,d7e,t.glowPower),t.taperPower=G.getValueOrDefault(this._taperPower,e,h7e,t.taperPower),t};JC.prototype.equals=function(e){return this===e||e instanceof JC&&G.equals(this._color,e._color)&&G.equals(this._glowPower,e._glowPower)&&G.equals(this._taperPower,e._taperPower)};var Fv=JC;var p7e=z.WHITE,_7e=z.BLACK,g7e=1;function QC(e){e=g(e,g.EMPTY_OBJECT),this._definitionChanged=new fe,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.color=e.color,this.outlineColor=e.outlineColor,this.outlineWidth=e.outlineWidth}Object.defineProperties(QC.prototype,{isConstant:{get:function(){return G.isConstant(this._color)&&G.isConstant(this._outlineColor)&&G.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:oe("color"),outlineColor:oe("outlineColor"),outlineWidth:oe("outlineWidth")});QC.prototype.getType=function(e){return"PolylineOutline"};var y7e=new K;QC.prototype.getValue=function(e,t){return c(e)||(e=K.now(y7e)),c(t)||(t={}),t.color=G.getValueOrClonedDefault(this._color,e,p7e,t.color),t.outlineColor=G.getValueOrClonedDefault(this._outlineColor,e,_7e,t.outlineColor),t.outlineWidth=G.getValueOrDefault(this._outlineWidth,e,g7e),t};QC.prototype.equals=function(e){return this===e||e instanceof QC&&G.equals(this._color,e._color)&&G.equals(this._outlineColor,e._outlineColor)&&G.equals(this._outlineWidth,e._outlineWidth)};var c0=QC;function Op(e,t){this._value=void 0,this._definitionChanged=new fe,this._eventHelper=new rl,this._referenceFrame=g(t,Ni.FIXED),this.setValue(e)}Object.defineProperties(Op.prototype,{isConstant:{get:function(){let e=this._value;if(!c(e))return!0;let t=e.length;for(let n=0;n<t;n++)if(!G.isConstant(e[n]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});var b7e=new K;Op.prototype.getValue=function(e,t){return c(e)||(e=K.now(b7e)),this.getValueInReferenceFrame(e,Ni.FIXED,t)};Op.prototype.getValueInReferenceFrame=function(e,t,n){if(!c(e))throw new w("time is required.");if(!c(t))throw new w("referenceFrame is required.");let i=this._value;if(!c(i))return;let o=i.length;c(n)||(n=new Array(o));let r=0,s=0;for(;r<o;){let l=i[r].getValueInReferenceFrame(e,t,n[r]);c(l)&&(n[s]=l,s++),r++}return n.length=s,n};Op.prototype.setValue=function(e){let t=this._eventHelper;if(t.removeAll(),c(e)){this._value=e.slice();let n=e.length;for(let i=0;i<n;i++){let o=e[i];c(o)&&t.add(o.definitionChanged,Op.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)};Op.prototype.equals=function(e){return this===e||e instanceof Op&&this._referenceFrame===e._referenceFrame&&G.arrayEquals(this._value,e._value)};Op.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var Lg=Op;function Ng(e){this._value=void 0,this._definitionChanged=new fe,this._eventHelper=new rl,this.setValue(e)}Object.defineProperties(Ng.prototype,{isConstant:{get:function(){let e=this._value;if(!c(e))return!0;let t=e.length;for(let n=0;n<t;n++)if(!G.isConstant(e[n]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}});var x7e=new K;Ng.prototype.getValue=function(e,t){c(e)||(e=K.now(x7e));let n=this._value;if(!c(n))return;let i=n.length;c(t)||(t=new Array(i));let o=0,r=0;for(;o<i;){let a=this._value[o].getValue(e,t[o]);c(a)&&(t[r]=a,r++),o++}return t.length=r,t};Ng.prototype.setValue=function(e){let t=this._eventHelper;if(t.removeAll(),c(e)){this._value=e.slice();let n=e.length;for(let i=0;i<n;i++){let o=e[i];c(o)&&t.add(o.definitionChanged,Ng.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)};Ng.prototype.equals=function(e){return this===e||e instanceof Ng&&G.arrayEquals(this._value,e._value)};Ng.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var Bv=Ng;function l0(e){let t=e._targetProperty;if(!c(t)){let n=e._targetEntity;if(!c(n)){if(n=e._targetCollection.getById(e._targetId),!c(n)){e._targetEntity=e._targetProperty=void 0;return}n.definitionChanged.addEventListener(Xl.prototype._onTargetEntityDefinitionChanged,e),e._targetEntity=n}let i=e._targetPropertyNames;t=e._targetEntity;for(let o=0,r=i.length;o<r&&c(t);++o)t=t[i[o]];e._targetProperty=t}return t}function Xl(e,t,n){if(!c(e))throw new w("targetCollection is required.");if(!c(t)||t==="")throw new w("targetId is required.");if(!c(n)||n.length===0)throw new w("targetPropertyNames is required.");for(let i=0;i<n.length;i++){let o=n[i];if(!c(o)||o==="")throw new w("reference contains invalid properties.")}this._targetCollection=e,this._targetId=t,this._targetPropertyNames=n,this._targetProperty=void 0,this._targetEntity=void 0,this._definitionChanged=new fe,e.collectionChanged.addEventListener(Xl.prototype._onCollectionChanged,this)}Object.defineProperties(Xl.prototype,{isConstant:{get:function(){return G.isConstant(l0(this))}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){let e=l0(this);return c(e)?e.referenceFrame:void 0}},targetId:{get:function(){return this._targetId}},targetCollection:{get:function(){return this._targetCollection}},targetPropertyNames:{get:function(){return this._targetPropertyNames}},resolvedProperty:{get:function(){return l0(this)}}});Xl.fromString=function(e,t){if(!c(e))throw new w("targetCollection is required.");if(!c(t))throw new w("referenceString is required.");let n,i=[],o=!0,r=!1,s="";for(let a=0;a<t.length;++a){let l=t.charAt(a);r?(s+=l,r=!1):l==="\\"?r=!0:o&&l==="#"?(n=s,o=!1,s=""):!o&&l==="."?(i.push(s),s=""):s+=l}return i.push(s),new Xl(e,n,i)};var T7e=new K;Xl.prototype.getValue=function(e,t){let n=l0(this);return c(e)||(e=K.now(T7e)),c(n)?n.getValue(e,t):void 0};Xl.prototype.getValueInReferenceFrame=function(e,t,n){let i=l0(this);return c(i)?i.getValueInReferenceFrame(e,t,n):void 0};Xl.prototype.getType=function(e){let t=l0(this);return c(t)?t.getType(e):void 0};Xl.prototype.equals=function(e){if(this===e)return!0;let t=this._targetPropertyNames,n=e._targetPropertyNames;if(this._targetCollection!==e._targetCollection||this._targetId!==e._targetId||t.length!==n.length)return!1;let i=this._targetPropertyNames.length;for(let o=0;o<i;o++)if(t[o]!==n[o])return!1;return!0};Xl.prototype._onTargetEntityDefinitionChanged=function(e,t,n,i){c(this._targetProperty)&&this._targetPropertyNames[0]===t&&(this._targetProperty=void 0,this._definitionChanged.raiseEvent(this))};Xl.prototype._onCollectionChanged=function(e,t,n){let i=this._targetEntity;c(i)&&n.indexOf(i)!==-1?(i.definitionChanged.removeEventListener(Xl.prototype._onTargetEntityDefinitionChanged,this),this._targetEntity=this._targetProperty=void 0):c(i)||(i=l0(this),c(i)&&this._definitionChanged.raiseEvent(this))};var Fg=Xl;var C7e={packedLength:1,pack:function(e,t,n){if(!c(e))throw new w("value is required");if(!c(t))throw new w("array is required");return n=g(n,0),t[n]=e,t},unpack:function(e,t,n){if(!c(e))throw new w("array is required");return t=g(t,0),e[t]},convertPackedArrayForInterpolation:function(e,t,n,i){if(!c(e))throw new w("packedArray is required");c(i)||(i=[]),t=g(t,0),n=g(n,e.length);let o;for(let r=0,s=n-t+1;r<s;r++){let a=e[t+r];r===0||Math.abs(o-a)<Math.PI?i[r]=a:i[r]=a-O.TWO_PI,o=a}},unpackInterpolationResult:function(e,t,n,i,o){if(!c(e))throw new w("array is required");if(!c(t))throw new w("sourceArray is required");return o=e[0],o<0?o+O.TWO_PI:o}},fd=C7e;var bce={packedLength:1,pack:function(e,t,n){n=g(n,0),t[n]=e},unpack:function(e,t,n){return t=g(t,0),e[t]}};function xce(e,t,n){let i,o=e.length,r=n.length,s=o+r;if(e.length=s,o!==t){let a=o-1;for(i=s-1;i>=t;i--)e[i]=e[a--]}for(i=0;i<r;i++)e[t++]=n[i]}function Tce(e,t){return e instanceof K?e:typeof e=="string"?K.fromIso8601(e):K.addSeconds(t,e,new K)}var fW=[],dW=[];function BB(e,t,n,i,o){let r=0,s,a,l,u,f,h;for(;r<i.length;){f=Tce(i[r],e),l=Xo(t,f,K.compare);let m=0,p=0;if(l<0){for(l=~l,u=l*o,a=void 0,h=t[l];r<i.length&&(f=Tce(i[r],e),!(c(a)&&K.compare(a,f)>=0||c(h)&&K.compare(f,h)>=0));){for(fW[m++]=f,r=r+1,s=0;s<o;s++)dW[p++]=i[r],r=r+1;a=f}m>0&&(dW.length=p,xce(n,u,dW),fW.length=m,xce(t,l,fW))}else{for(s=0;s<o;s++)r++,n[l*o+s]=i[r];r++}}}function dd(e,t){C.defined("type",e);let n=e;n===Number&&(n=bce);let i=n.packedLength,o=g(n.packedInterpolationLength,i),r=0,s;if(c(t)){let a=t.length;s=new Array(a);for(let l=0;l<a;l++){let u=t[l];u===Number&&(u=bce);let f=u.packedLength;i+=f,o+=g(u.packedInterpolationLength,f),s[l]=u}r=a}this._type=e,this._innerType=n,this._interpolationDegree=1,this._interpolationAlgorithm=YC,this._numberOfPoints=0,this._times=[],this._values=[],this._xTable=[],this._yTable=[],this._packedLength=i,this._packedInterpolationLength=o,this._updateTableLength=!0,this._interpolationResult=new Array(o),this._definitionChanged=new fe,this._derivativeTypes=t,this._innerDerivativeTypes=s,this._inputOrder=r,this._forwardExtrapolationType=df.NONE,this._forwardExtrapolationDuration=0,this._backwardExtrapolationType=df.NONE,this._backwardExtrapolationDuration=0}Object.defineProperties(dd.prototype,{isConstant:{get:function(){return this._values.length===0}},definitionChanged:{get:function(){return this._definitionChanged}},type:{get:function(){return this._type}},derivativeTypes:{get:function(){return this._derivativeTypes}},interpolationDegree:{get:function(){return this._interpolationDegree}},interpolationAlgorithm:{get:function(){return this._interpolationAlgorithm}},forwardExtrapolationType:{get:function(){return this._forwardExtrapolationType},set:function(e){this._forwardExtrapolationType!==e&&(this._forwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},forwardExtrapolationDuration:{get:function(){return this._forwardExtrapolationDuration},set:function(e){this._forwardExtrapolationDuration!==e&&(this._forwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationType:{get:function(){return this._backwardExtrapolationType},set:function(e){this._backwardExtrapolationType!==e&&(this._backwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationDuration:{get:function(){return this._backwardExtrapolationDuration},set:function(e){this._backwardExtrapolationDuration!==e&&(this._backwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}}});var E7e=new K;dd.prototype.getValue=function(e,t){c(e)||(e=K.now(E7e));let n=this._times,i=n.length;if(i===0)return;let o,r=this._innerType,s=this._values,a=Xo(n,e,K.compare);if(a<0){if(a=~a,a===0){let A=n[a];if(o=this._backwardExtrapolationDuration,this._backwardExtrapolationType===df.NONE||o!==0&&K.secondsDifference(A,e)>o)return;if(this._backwardExtrapolationType===df.HOLD)return r.unpack(s,0,t)}if(a>=i){a=i-1;let A=n[a];if(o=this._forwardExtrapolationDuration,this._forwardExtrapolationType===df.NONE||o!==0&&K.secondsDifference(e,A)>o)return;if(this._forwardExtrapolationType===df.HOLD)return a=i-1,r.unpack(s,a*r.packedLength,t)}let l=this._xTable,u=this._yTable,f=this._interpolationAlgorithm,h=this._packedInterpolationLength,m=this._inputOrder;if(this._updateTableLength){this._updateTableLength=!1;let A=Math.min(f.getRequiredDataPoints(this._interpolationDegree,m),i);A!==this._numberOfPoints&&(this._numberOfPoints=A,l.length=A,u.length=A*h)}let p=this._numberOfPoints-1;if(p<1)return;let _=0,b=i-1;if(b-_+1>=p+1){let A=a-(p/2|0)-1;A<_&&(A=_);let v=A+p;v>b&&(v=b,A=v-p,A<_&&(A=_)),_=A,b=v}let T=b-_+1;for(let A=0;A<T;++A)l[A]=K.secondsDifference(n[_+A],n[b]);if(c(r.convertPackedArrayForInterpolation))r.convertPackedArrayForInterpolation(s,_,b,u);else{let A=0,v=this._packedLength,D=_*v,R=(b+1)*v;for(;D<R;)u[A]=s[D],D++,A++}let E=K.secondsDifference(e,n[b]),S;if(m===0||!c(f.interpolate))S=f.interpolateOrderZero(E,l,u,h,this._interpolationResult);else{let A=Math.floor(h/(m+1));S=f.interpolate(E,l,u,A,m,m,this._interpolationResult)}return c(r.unpackInterpolationResult)?r.unpackInterpolationResult(S,s,_,b,t):r.unpack(S,0,t)}return r.unpack(s,a*this._packedLength,t)};dd.prototype.setInterpolationOptions=function(e){if(!c(e))return;let t=!1,n=e.interpolationAlgorithm,i=e.interpolationDegree;c(n)&&this._interpolationAlgorithm!==n&&(this._interpolationAlgorithm=n,t=!0),c(i)&&this._interpolationDegree!==i&&(this._interpolationDegree=i,t=!0),t&&(this._updateTableLength=!0,this._definitionChanged.raiseEvent(this))};dd.prototype.addSample=function(e,t,n){let i=this._innerDerivativeTypes,o=c(i);C.defined("time",e),C.defined("value",t),o&&C.defined("derivatives",n);let r=this._innerType,s=[];if(s.push(e),r.pack(t,s,s.length),o){let a=i.length;for(let l=0;l<a;l++)i[l].pack(n[l],s,s.length)}BB(void 0,this._times,this._values,s,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};dd.prototype.addSamples=function(e,t,n){let i=this._innerDerivativeTypes,o=c(i);if(C.defined("times",e),C.defined("values",t),e.length!==t.length)throw new w("times and values must be the same length.");if(o&&(!c(n)||n.length!==e.length))throw new w("times and derivativeValues must be the same length.");let r=this._innerType,s=e.length,a=[];for(let l=0;l<s;l++)if(a.push(e[l]),r.pack(t[l],a,a.length),o){let u=n[l],f=i.length;for(let h=0;h<f;h++)i[h].pack(u[h],a,a.length)}BB(void 0,this._times,this._values,a,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};dd.prototype.addSamplesPackedArray=function(e,t){C.defined("packedSamples",e),BB(t,this._times,this._values,e,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};dd.prototype.removeSample=function(e){C.defined("time",e);let t=Xo(this._times,e,K.compare);return t<0?!1:(Cce(this,t,1),!0)};function Cce(e,t,n){let i=e._packedLength;e._times.splice(t,n),e._values.splice(t*i,n*i),e._updateTableLength=!0,e._definitionChanged.raiseEvent(e)}dd.prototype.removeSamples=function(e){C.defined("timeInterval",e);let t=this._times,n=Xo(t,e.start,K.compare);n<0?n=~n:e.isStartIncluded||++n;let i=Xo(t,e.stop,K.compare);i<0?i=~i:e.isStopIncluded&&++i,Cce(this,n,i-n)};dd.prototype.equals=function(e){if(this===e)return!0;if(!c(e)||this._type!==e._type||this._interpolationDegree!==e._interpolationDegree||this._interpolationAlgorithm!==e._interpolationAlgorithm)return!1;let t=this._derivativeTypes,n=c(t),i=e._derivativeTypes,o=c(i);if(n!==o)return!1;let r,s;if(n){if(s=t.length,s!==i.length)return!1;for(r=0;r<s;r++)if(t[r]!==i[r])return!1}let a=this._times,l=e._times;if(s=a.length,s!==l.length)return!1;for(r=0;r<s;r++)if(!K.equals(a[r],l[r]))return!1;let u=this._values,f=e._values;for(s=u.length,r=0;r<s;r++)if(u[r]!==f[r])return!1;return!0};dd._mergeNewSamples=BB;var hf=dd;function mf(e,t){t=g(t,0);let n;if(t>0){n=new Array(t);for(let i=0;i<t;i++)n[i]=d}this._numberOfDerivatives=t,this._property=new hf(d,n),this._definitionChanged=new fe,this._referenceFrame=g(e,Ni.FIXED),this._property._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)}Object.defineProperties(mf.prototype,{isConstant:{get:function(){return this._property.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}},interpolationDegree:{get:function(){return this._property.interpolationDegree}},interpolationAlgorithm:{get:function(){return this._property.interpolationAlgorithm}},numberOfDerivatives:{get:function(){return this._numberOfDerivatives}},forwardExtrapolationType:{get:function(){return this._property.forwardExtrapolationType},set:function(e){this._property.forwardExtrapolationType=e}},forwardExtrapolationDuration:{get:function(){return this._property.forwardExtrapolationDuration},set:function(e){this._property.forwardExtrapolationDuration=e}},backwardExtrapolationType:{get:function(){return this._property.backwardExtrapolationType},set:function(e){this._property.backwardExtrapolationType=e}},backwardExtrapolationDuration:{get:function(){return this._property.backwardExtrapolationDuration},set:function(e){this._property.backwardExtrapolationDuration=e}}});var w7e=new K;mf.prototype.getValue=function(e,t){return c(e)||(e=K.now(w7e)),this.getValueInReferenceFrame(e,Ni.FIXED,t)};mf.prototype.getValueInReferenceFrame=function(e,t,n){if(C.defined("time",e),C.defined("referenceFrame",t),n=this._property.getValue(e,n),c(n))return ah.convertToReferenceFrame(e,n,this._referenceFrame,t,n)};mf.prototype.setInterpolationOptions=function(e){this._property.setInterpolationOptions(e)};mf.prototype.addSample=function(e,t,n){let i=this._numberOfDerivatives;if(i>0&&(!c(n)||n.length!==i))throw new w("derivatives length must be equal to the number of derivatives.");this._property.addSample(e,t,n)};mf.prototype.addSamples=function(e,t,n){this._property.addSamples(e,t,n)};mf.prototype.addSamplesPackedArray=function(e,t){this._property.addSamplesPackedArray(e,t)};mf.prototype.removeSample=function(e){return this._property.removeSample(e)};mf.prototype.removeSamples=function(e){this._property.removeSamples(e)};mf.prototype.equals=function(e){return this===e||e instanceof mf&&G.equals(this._property,e._property)&&this._referenceFrame===e._referenceFrame};var da=mf;var S7e={HORIZONTAL:0,VERTICAL:1},kh=Object.freeze(S7e);var A7e=kh.HORIZONTAL,v7e=z.WHITE,D7e=z.BLACK,I7e=0,O7e=1;function eE(e){e=g(e,g.EMPTY_OBJECT),this._definitionChanged=new fe,this._orientation=void 0,this._orientationSubscription=void 0,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._offset=void 0,this._offsetSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.orientation=e.orientation,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.offset=e.offset,this.repeat=e.repeat}Object.defineProperties(eE.prototype,{isConstant:{get:function(){return G.isConstant(this._orientation)&&G.isConstant(this._evenColor)&&G.isConstant(this._oddColor)&&G.isConstant(this._offset)&&G.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:oe("orientation"),evenColor:oe("evenColor"),oddColor:oe("oddColor"),offset:oe("offset"),repeat:oe("repeat")});eE.prototype.getType=function(e){return"Stripe"};var P7e=new K;eE.prototype.getValue=function(e,t){return c(e)||(e=K.now(P7e)),c(t)||(t={}),t.horizontal=G.getValueOrDefault(this._orientation,e,A7e)===kh.HORIZONTAL,t.evenColor=G.getValueOrClonedDefault(this._evenColor,e,v7e,t.evenColor),t.oddColor=G.getValueOrClonedDefault(this._oddColor,e,D7e,t.oddColor),t.offset=G.getValueOrDefault(this._offset,e,I7e),t.repeat=G.getValueOrDefault(this._repeat,e,O7e),t};eE.prototype.equals=function(e){return this===e||e instanceof eE&&G.equals(this._orientation,e._orientation)&&G.equals(this._evenColor,e._evenColor)&&G.equals(this._oddColor,e._oddColor)&&G.equals(this._offset,e._offset)&&G.equals(this._repeat,e._repeat)};var kv=eE;function Bg(e){this._definitionChanged=new fe,this._intervals=new Br,this._intervals.changedEvent.addEventListener(Bg.prototype._intervalsChanged,this),this._referenceFrame=g(e,Ni.FIXED)}Object.defineProperties(Bg.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}},referenceFrame:{get:function(){return this._referenceFrame}}});var R7e=new K;Bg.prototype.getValue=function(e,t){return c(e)||(e=K.now(R7e)),this.getValueInReferenceFrame(e,Ni.FIXED,t)};Bg.prototype.getValueInReferenceFrame=function(e,t,n){if(!c(e))throw new w("time is required.");if(!c(t))throw new w("referenceFrame is required.");let i=this._intervals.findDataForIntervalContainingDate(e);if(c(i))return ah.convertToReferenceFrame(e,i,this._referenceFrame,t,n)};Bg.prototype.equals=function(e){return this===e||e instanceof Bg&&this._intervals.equals(e._intervals,G.equals)&&this._referenceFrame===e._referenceFrame};Bg.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)};var kg=Bg;function u0(){this._definitionChanged=new fe,this._intervals=new Br,this._intervals.changedEvent.addEventListener(u0.prototype._intervalsChanged,this)}Object.defineProperties(u0.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}});var M7e=new K;u0.prototype.getValue=function(e,t){c(e)||(e=K.now(M7e));let n=this._intervals.findDataForIntervalContainingDate(e);return c(n)&&typeof n.clone=="function"?n.clone(t):n};u0.prototype.equals=function(e){return this===e||e instanceof u0&&this._intervals.equals(e._intervals,G.equals)};u0.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)};var Ug=u0;function tE(e,t){this._position=void 0,this._subscription=void 0,this._definitionChanged=new fe,this._normalize=g(t,!0),this.position=e}Object.defineProperties(tE.prototype,{isConstant:{get:function(){return G.isConstant(this._position)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._position},set:function(e){let t=this._position;t!==e&&(c(t)&&this._subscription(),this._position=e,c(e)&&(this._subscription=e._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)),this._definitionChanged.raiseEvent(this))}},normalize:{get:function(){return this._normalize},set:function(e){this._normalize!==e&&(this._normalize=e,this._definitionChanged.raiseEvent(this))}}});var L7e=new d,Ece=new d,wce=new K,N7e=new K,hW=1/60;tE.prototype.getValue=function(e,t){return this._getValue(e,t)};tE.prototype._getValue=function(e,t,n){c(e)||(e=K.now(N7e)),c(t)||(t=new d);let i=this._position;if(G.isConstant(i))return this._normalize?void 0:d.clone(d.ZERO,t);let o=i.getValue(e,L7e),r=i.getValue(K.addSeconds(e,hW,wce),Ece);if(!c(o)||!c(r)&&(r=o,o=i.getValue(K.addSeconds(e,-hW,wce),Ece),!c(o)))return;if(d.equals(o,r))return this._normalize?void 0:d.clone(d.ZERO,t);c(n)&&o.clone(n);let s=d.subtract(r,o,t);return this._normalize?d.normalize(s,t):d.divideByScalar(s,hW,t)};tE.prototype.equals=function(e){return this===e||e instanceof tE&&G.equals(this._position,e._position)};var nE=tE;function Uv(e,t){this._velocityVectorProperty=new nE(e,!0),this._subscription=void 0,this._ellipsoid=void 0,this._definitionChanged=new fe,this.ellipsoid=g(t,Z.default);let n=this;this._velocityVectorProperty.definitionChanged.addEventListener(function(){n._definitionChanged.raiseEvent(n)})}Object.defineProperties(Uv.prototype,{isConstant:{get:function(){return G.isConstant(this._velocityVectorProperty)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._velocityVectorProperty.position},set:function(e){this._velocityVectorProperty.position=e}},ellipsoid:{get:function(){return this._ellipsoid},set:function(e){this._ellipsoid!==e&&(this._ellipsoid=e,this._definitionChanged.raiseEvent(this))}}});var Sce=new d,F7e=new d,Ace=new q,B7e=new K;Uv.prototype.getValue=function(e,t){c(e)||(e=K.now(B7e));let n=this._velocityVectorProperty._getValue(e,F7e,Sce);if(c(n))return Lt.rotationMatrixFromPositionVelocity(Sce,n,this._ellipsoid,Ace),ve.fromRotationMatrix(Ace,t)};Uv.prototype.equals=function(e){return this===e||e instanceof Uv&&G.equals(this._velocityVectorProperty,e._velocityVectorProperty)&&(this._ellipsoid===e._ellipsoid||this._ellipsoid.equals(e._ellipsoid))};var kB=Uv;var Pp={COMPLETE:0,BELOW_ELLIPSOID_HORIZON:1,ABOVE_ELLIPSOID_HORIZON:2};Pp.validate=function(e){return e===Pp.COMPLETE||e===Pp.BELOW_ELLIPSOID_HORIZON||e===Pp.ABOVE_ELLIPSOID_HORIZON};Pp.toString=function(e){switch(e){case Pp.COMPLETE:return"COMPLETE";case Pp.BELOW_ELLIPSOID_HORIZON:return"BELOW_ELLIPSOID_HORIZON";case Pp.ABOVE_ELLIPSOID_HORIZON:return"ABOVE_ELLIPSOID_HORIZON";default:throw new w("SensorVolumePortionToDisplay value is not valid and cannot be converted to a String.")}};var zv=Pp;function zg(){}zg.packedLength=d.packedLength;zg.unpack=d.unpack;zg.pack=d.pack;var mW;function Vv(e,t){return t[0]==="#"&&(t=mW+t),Fg.fromString(e,t)}function vce(e,t,n){if(c(n.reference))return Vv(t,n.reference);if(c(n.velocityReference)){let i=Vv(t,n.velocityReference);switch(e){case d:case zg:return new nE(i,e===zg);case ve:return new kB(i)}}throw new ie(`${JSON.stringify(n)} is not valid CZML.`)}function k7e(e,t){return new fh(function(n,i){return t(e.getValue(n,i))},e.isConstant)}var Oi=new d,wc=new FB,Ga=new re,f0=new En,UB=new ve;function U7e(e){let t=e.rgbaf;if(c(t))return t;let n=e.rgba;if(!c(n))return;let i=n.length;if(i===z.packedLength)return[z.byteToFloat(n[0]),z.byteToFloat(n[1]),z.byteToFloat(n[2]),z.byteToFloat(n[3])];t=new Array(i);for(let o=0;o<i;o+=5)t[o]=n[o],t[o+1]=z.byteToFloat(n[o+1]),t[o+2]=z.byteToFloat(n[o+2]),t[o+3]=z.byteToFloat(n[o+3]),t[o+4]=z.byteToFloat(n[o+4]);return t}function Dce(e,t){let n=g(e.uri,e);return c(t)?t.getDerivedResource({url:n}):Te.createIfNeeded(n)}function z7e(e){let t=e.wsen;if(c(t))return t;let n=e.wsenDegrees;if(!c(n))return;let i=n.length;if(i===te.packedLength)return[O.toRadians(n[0]),O.toRadians(n[1]),O.toRadians(n[2]),O.toRadians(n[3])];t=new Array(i);for(let o=0;o<i;o+=5)t[o]=n[o],t[o+1]=O.toRadians(n[o+1]),t[o+2]=O.toRadians(n[o+2]),t[o+3]=O.toRadians(n[o+3]),t[o+4]=O.toRadians(n[o+4]);return t}function V7e(e){let t=e.length;if(wc.magnitude=1,t===2)return wc.clock=e[0],wc.cone=e[1],d.fromSpherical(wc,Oi),[Oi.x,Oi.y,Oi.z];let n=new Array(t/3*4);for(let i=0,o=0;i<t;i+=3,o+=4)n[o]=e[i],wc.clock=e[i+1],wc.cone=e[i+2],d.fromSpherical(wc,Oi),n[o+1]=Oi.x,n[o+2]=Oi.y,n[o+3]=Oi.z;return n}function H7e(e){let t=e.length;if(t===3)return wc.clock=e[0],wc.cone=e[1],wc.magnitude=e[2],d.fromSpherical(wc,Oi),[Oi.x,Oi.y,Oi.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],wc.clock=e[i+1],wc.cone=e[i+2],wc.magnitude=e[i+3],d.fromSpherical(wc,Oi),n[i+1]=Oi.x,n[i+2]=Oi.y,n[i+3]=Oi.z;return n}function G7e(e){let t=e.length;if(t===3)return Ga.longitude=e[0],Ga.latitude=e[1],Ga.height=e[2],Z.default.cartographicToCartesian(Ga,Oi),[Oi.x,Oi.y,Oi.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],Ga.longitude=e[i+1],Ga.latitude=e[i+2],Ga.height=e[i+3],Z.default.cartographicToCartesian(Ga,Oi),n[i+1]=Oi.x,n[i+2]=Oi.y,n[i+3]=Oi.z;return n}function j7e(e){let t=e.length;if(t===3)return Ga.longitude=O.toRadians(e[0]),Ga.latitude=O.toRadians(e[1]),Ga.height=e[2],Z.default.cartographicToCartesian(Ga,Oi),[Oi.x,Oi.y,Oi.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],Ga.longitude=O.toRadians(e[i+1]),Ga.latitude=O.toRadians(e[i+2]),Ga.height=e[i+3],Z.default.cartographicToCartesian(Ga,Oi),n[i+1]=Oi.x,n[i+2]=Oi.y,n[i+3]=Oi.z;return n}function pW(e){let t=e.cartesian;if(c(t))return t;let n=e.cartesianVelocity;if(c(n))return n;let i=e.unitCartesian;if(c(i))return i;let o=e.unitSpherical;if(c(o))return V7e(o);let r=e.spherical;if(c(r))return H7e(r);let s=e.cartographicRadians;if(c(s))return G7e(s);let a=e.cartographicDegrees;if(c(a))return j7e(a);throw new ie(`${JSON.stringify(e)} is not a valid CZML interval.`)}function Ice(e,t){d.unpack(e,t,Oi),d.normalize(Oi,Oi),d.pack(Oi,e,t)}function W7e(e){let t=pW(e);if(t.length===3)return Ice(t,0),t;for(let n=1;n<t.length;n+=4)Ice(t,n);return t}function Oce(e,t){ve.unpack(e,t,UB),ve.normalize(UB,UB),ve.pack(UB,e,t)}function q7e(e){let t=e.unitQuaternion;if(c(t)){if(t.length===4)return Oce(t,0),t;for(let n=1;n<t.length;n+=5)Oce(t,n)}return t}function Pce(e){return typeof e=="boolean"?Boolean:typeof e=="number"?Number:typeof e=="string"?String:e.hasOwnProperty("array")?Array:e.hasOwnProperty("boolean")?Boolean:e.hasOwnProperty("boundingRectangle")?je:e.hasOwnProperty("cartesian2")?k:e.hasOwnProperty("cartesian")||e.hasOwnProperty("spherical")||e.hasOwnProperty("cartographicRadians")||e.hasOwnProperty("cartographicDegrees")?d:e.hasOwnProperty("unitCartesian")||e.hasOwnProperty("unitSpherical")?zg:e.hasOwnProperty("rgba")||e.hasOwnProperty("rgbaf")?z:e.hasOwnProperty("arcType")?jt:e.hasOwnProperty("classificationType")?Ln:e.hasOwnProperty("colorBlendMode")?_c:e.hasOwnProperty("cornerType")?Ii:e.hasOwnProperty("heightReference")?qe:e.hasOwnProperty("horizontalOrigin")?mi:e.hasOwnProperty("date")?K:e.hasOwnProperty("labelStyle")?Uo:e.hasOwnProperty("number")?Number:e.hasOwnProperty("nearFarScalar")?Bt:e.hasOwnProperty("distanceDisplayCondition")?Nt:e.hasOwnProperty("object")||e.hasOwnProperty("value")?Object:e.hasOwnProperty("unitQuaternion")?ve:e.hasOwnProperty("shadowMode")?yn:e.hasOwnProperty("string")?String:e.hasOwnProperty("stripeOrientation")?kh:e.hasOwnProperty("wsen")||e.hasOwnProperty("wsenDegrees")?te:e.hasOwnProperty("uri")?Gv.default:e.hasOwnProperty("verticalOrigin")?Dn:Object}function Y7e(e,t,n){switch(e){case jt:return jt[g(t.arcType,t)];case Array:return t.array;case Boolean:return g(t.boolean,t);case je:return t.boundingRectangle;case k:return t.cartesian2;case d:return pW(t);case zg:return W7e(t);case z:return U7e(t);case Ln:return Ln[g(t.classificationType,t)];case _c:return _c[g(t.colorBlendMode,t)];case Ii:return Ii[g(t.cornerType,t)];case qe:return qe[g(t.heightReference,t)];case mi:return mi[g(t.horizontalOrigin,t)];case Image:return Dce(t,n);case K:return K.fromIso8601(g(t.date,t));case Uo:return Uo[g(t.labelStyle,t)];case Number:return g(t.number,t);case Bt:return t.nearFarScalar;case Nt:return t.distanceDisplayCondition;case Object:return g(g(t.object,t.value),t);case ve:return q7e(t);case fd:return g(t.number,t);case zv:return zv[g(t.portionToDisplay,t)];case yn:return yn[g(g(t.shadowMode,t.shadows),t)];case String:return g(t.string,t);case kh:return kh[g(t.stripeOrientation,t)];case te:return z7e(t);case Gv.default:return Dce(t,n);case Dn:return Dn[g(t.verticalOrigin,t)];default:throw new ie(`Unknown CzmlDataSource interval type: ${e}`)}}var X7e={HERMITE:LB,LAGRANGE:NB,LINEAR:YC};function zB(e,t){let n=e.interpolationAlgorithm,i=e.interpolationDegree;(c(n)||c(i))&&t.setInterpolationOptions({interpolationAlgorithm:X7e[n],interpolationDegree:i});let o=e.forwardExtrapolationType;c(o)&&(t.forwardExtrapolationType=df[o]);let r=e.forwardExtrapolationDuration;c(r)&&(t.forwardExtrapolationDuration=r);let s=e.backwardExtrapolationType;c(s)&&(t.backwardExtrapolationType=df[s]);let a=e.backwardExtrapolationDuration;c(a)&&(t.backwardExtrapolationDuration=a)}var Rce={iso8601:void 0};function er(e){if(c(e))return Rce.iso8601=e,En.fromIso8601(Rce)}function _W(e){let t=Ue.MAXIMUM_INTERVAL.clone();return t.data=e,t}function Mce(e){let t=new Tc;return t.intervals.addInterval(_W(e)),t}function Lce(e){let t=new fa(e.referenceFrame);return t.intervals.addInterval(_W(e)),t}function VB(e,t,n,i,o,r,s){let a=er(i.interval);c(o)&&(c(a)?a=En.intersect(a,o,f0):a=o);let l,u,f,h=!c(i.reference)&&!c(i.velocityReference),m=c(a)&&!a.equals(Ue.MAXIMUM_INTERVAL);if(i.delete===!0){if(!m){t[n]=void 0;return}return Wce(t[n],a)}let p=!1;if(h){if(u=Y7e(e,i,r),!c(u))return;l=g(e.packedLength,1),f=g(u.length,1),p=!c(i.array)&&typeof u!="string"&&f>l&&e!==Object}let _=typeof e.unpack=="function"&&e!==fd;if(!p&&!m){h?t[n]=new jn(_?e.unpack(u,0):u):t[n]=vce(e,s,i);return}let b=t[n],x,T=i.epoch;if(c(T)&&(x=K.fromIso8601(T)),p&&!m){b instanceof hf||(t[n]=b=new hf(e)),b.addSamplesPackedArray(u,x),zB(i,b);return}let E;if(!p&&m){a=a.clone(),h?a.data=_?e.unpack(u,0):u:a.data=vce(e,s,i),c(b)||(t[n]=b=h?new Ug:new Tc),h&&b instanceof Ug?b.intervals.addInterval(a):b instanceof Tc?(h&&(a.data=new jn(a.data)),b.intervals.addInterval(a)):(t[n]=b=Mce(b),h&&(a.data=new jn(a.data)),b.intervals.addInterval(a));return}c(b)||(t[n]=b=new Tc),b instanceof Tc||(t[n]=b=Mce(b));let S=b.intervals;E=S.findInterval(a),(!c(E)||!(E.data instanceof hf))&&(E=a.clone(),E.data=new hf(e),S.addInterval(E)),E.data.addSamplesPackedArray(u,x),zB(i,E.data)}function Wce(e,t){if(e instanceof hf){e.removeSamples(t);return}else if(e instanceof Ug){e.intervals.removeInterval(t);return}else if(e instanceof Tc){let n=e.intervals;for(let i=0;i<n.length;++i){let o=En.intersect(n.get(i),t,f0);o.isEmpty||Wce(o.data,t)}n.removeInterval(t);return}}function de(e,t,n,i,o,r,s){if(c(i))if(Array.isArray(i))for(let a=0,l=i.length;a<l;++a)VB(e,t,n,i[a],o,r,s);else VB(e,t,n,i,o,r,s)}function Nce(e,t,n,i,o,r){let s=er(n.interval);c(i)&&(c(s)?s=En.intersect(s,i,f0):s=i);let a=c(n.cartesianVelocity)?1:0,l=d.packedLength*(a+1),u,f,h=!c(n.reference),m=c(s)&&!s.equals(Ue.MAXIMUM_INTERVAL);if(n.delete===!0){if(!m){e[t]=void 0;return}return qce(e[t],s)}let p,_=!1;if(h&&(c(n.referenceFrame)&&(p=Ni[n.referenceFrame]),p=g(p,Ni.FIXED),u=pW(n),f=g(u.length,1),_=f>l),!_&&!m){h?e[t]=new Bu(d.unpack(u),p):e[t]=Vv(r,n.reference);return}let b=e[t],x,T=n.epoch;if(c(T)&&(x=K.fromIso8601(T)),_&&!m){(!(b instanceof da)||c(p)&&b.referenceFrame!==p)&&(e[t]=b=new da(p,a)),b.addSamplesPackedArray(u,x),zB(n,b);return}let E;if(!_&&m){s=s.clone(),h?s.data=d.unpack(u):s.data=Vv(r,n.reference),c(b)||(h?b=new kg(p):b=new fa(p),e[t]=b),h&&b instanceof kg&&c(p)&&b.referenceFrame===p?b.intervals.addInterval(s):b instanceof fa?(h&&(s.data=new Bu(s.data,p)),b.intervals.addInterval(s)):(e[t]=b=Lce(b),h&&(s.data=new Bu(s.data,p)),b.intervals.addInterval(s));return}c(b)?b instanceof fa||(e[t]=b=Lce(b)):e[t]=b=new fa(p);let S=b.intervals;E=S.findInterval(s),(!c(E)||!(E.data instanceof da)||c(p)&&E.data.referenceFrame!==p)&&(E=s.clone(),E.data=new da(p,a),S.addInterval(E)),E.data.addSamplesPackedArray(u,x),zB(n,E.data)}function qce(e,t){if(e instanceof da){e.removeSamples(t);return}else if(e instanceof kg){e.intervals.removeInterval(t);return}else if(e instanceof fa){let n=e.intervals;for(let i=0;i<n.length;++i){let o=En.intersect(n.get(i),t,f0);o.isEmpty||qce(o.data,t)}n.removeInterval(t);return}}function Yce(e,t,n,i,o,r){if(c(n))if(Array.isArray(n))for(let s=0,a=n.length;s<a;++s)Nce(e,t,n[s],i,o,r);else Nce(e,t,n,i,o,r)}function Fce(e,t,n,i){c(n.references)?HB(e,t,n.references,n.interval,i,Bv,Tc):(c(n.cartesian2)?n.array=k.unpackArray(n.cartesian2):c(n.cartesian)&&(n.array=k.unpackArray(n.cartesian)),c(n.array)&&de(Array,e,t,n,void 0,void 0,i))}function Bce(e,t,n,i,o,r){let s=er(n.interval);c(i)&&(c(s)?s=En.intersect(s,i,f0):s=i);let a=e[t],l,u;if(c(s)){a instanceof wv||(a=new wv,e[t]=a);let h=a.intervals;u=h.findInterval({start:s.start,stop:s.stop}),c(u)?l=u.data:(u=s.clone(),h.addInterval(u))}else l=a;let f;c(n.solidColor)?(l instanceof Ut||(l=new Ut),f=n.solidColor,de(z,l,"color",f.color,void 0,void 0,r)):c(n.grid)?(l instanceof Mv||(l=new Mv),f=n.grid,de(z,l,"color",f.color,void 0,o,r),de(Number,l,"cellAlpha",f.cellAlpha,void 0,o,r),de(k,l,"lineCount",f.lineCount,void 0,o,r),de(k,l,"lineThickness",f.lineThickness,void 0,o,r),de(k,l,"lineOffset",f.lineOffset,void 0,o,r)):c(n.image)?(l instanceof pb||(l=new pb),f=n.image,de(Image,l,"image",f.image,void 0,o,r),de(k,l,"repeat",f.repeat,void 0,o,r),de(z,l,"color",f.color,void 0,o,r),de(Boolean,l,"transparent",f.transparent,void 0,o,r)):c(n.stripe)?(l instanceof kv||(l=new kv),f=n.stripe,de(kh,l,"orientation",f.orientation,void 0,o,r),de(z,l,"evenColor",f.evenColor,void 0,o,r),de(z,l,"oddColor",f.oddColor,void 0,o,r),de(Number,l,"offset",f.offset,void 0,o,r),de(Number,l,"repeat",f.repeat,void 0,o,r)):c(n.polylineOutline)?(l instanceof c0||(l=new c0),f=n.polylineOutline,de(z,l,"color",f.color,void 0,o,r),de(z,l,"outlineColor",f.outlineColor,void 0,o,r),de(Number,l,"outlineWidth",f.outlineWidth,void 0,o,r)):c(n.polylineGlow)?(l instanceof Fv||(l=new Fv),f=n.polylineGlow,de(z,l,"color",f.color,void 0,o,r),de(Number,l,"glowPower",f.glowPower,void 0,o,r),de(Number,l,"taperPower",f.taperPower,void 0,o,r)):c(n.polylineArrow)?(l instanceof Lv||(l=new Lv),f=n.polylineArrow,de(z,l,"color",f.color,void 0,void 0,r)):c(n.polylineDash)?(l instanceof Nv||(l=new Nv),f=n.polylineDash,de(z,l,"color",f.color,void 0,void 0,r),de(z,l,"gapColor",f.gapColor,void 0,void 0,r),de(Number,l,"dashLength",f.dashLength,void 0,o,r),de(Number,l,"dashPattern",f.dashPattern,void 0,o,r)):c(n.checkerboard)&&(l instanceof xv||(l=new xv),f=n.checkerboard,de(z,l,"evenColor",f.evenColor,void 0,o,r),de(z,l,"oddColor",f.oddColor,void 0,o,r),de(k,l,"repeat",f.repeat,void 0,o,r)),c(u)?u.data=l:e[t]=l}function Kl(e,t,n,i,o,r){if(c(n))if(Array.isArray(n))for(let s=0,a=n.length;s<a;++s)Bce(e,t,n[s],i,o,r);else Bce(e,t,n,i,o,r)}function K7e(e,t,n,i){let o=t.name;c(o)&&(e.name=t.name)}function $7e(e,t,n,i){let o=t.description;c(o)&&de(String,e,"description",o,void 0,i,n)}function Z7e(e,t,n,i){let o=t.position;c(o)&&Yce(e,"position",o,void 0,i,n)}function J7e(e,t,n,i){let o=t.viewFrom;c(o)&&de(d,e,"viewFrom",o,void 0,i,n)}function Q7e(e,t,n,i){let o=t.orientation;c(o)&&de(ve,e,"orientation",o,void 0,i,n)}function eXe(e,t,n,i){let o=t.properties;if(c(o)){c(e.properties)||(e.properties=new Ll);for(let r in o)if(o.hasOwnProperty(r)){e.properties.hasProperty(r)||e.properties.addProperty(r);let s=o[r];if(Array.isArray(s))for(let a=0,l=s.length;a<l;++a)VB(Pce(s[a]),e.properties,r,s[a],void 0,i,n);else VB(Pce(s),e.properties,r,s,void 0,i,n)}}}function HB(e,t,n,i,o,r,s){let a=n.map(function(l){return Vv(o,l)});if(c(i)){i=er(i);let l=e[t];if(!(l instanceof s)){let u=new s;u.intervals.addInterval(_W(l)),e[t]=l=u}i.data=new r(a),l.intervals.addInterval(i)}else e[t]=new r(a)}function kce(e,t,n,i){let o=n.references;c(o)?HB(e,t,o,n.interval,i,Bv,Tc):de(Array,e,t,n,void 0,void 0,i)}function Uce(e,t,n,i){if(c(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;++o)kce(e,t,n[o],i);else kce(e,t,n,i)}function zce(e,t,n,i){let o=n.references;c(o)?HB(e,t,o,n.interval,i,Lg,fa):(c(n.cartesian)?n.array=d.unpackArray(n.cartesian):c(n.cartographicRadians)?n.array=d.fromRadiansArrayHeights(n.cartographicRadians,Z.default):c(n.cartographicDegrees)&&(n.array=d.fromDegreesArrayHeights(n.cartographicDegrees,Z.default)),c(n.array)&&de(Array,e,t,n,void 0,void 0,i))}function jv(e,t,n,i){if(c(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;++o)zce(e,t,n[o],i);else zce(e,t,n,i)}function tXe(e){return d.unpackArray(e)}function nXe(e){return d.fromRadiansArrayHeights(e,Z.default)}function iXe(e){return d.fromDegreesArrayHeights(e,Z.default)}function Vce(e,t,n,i){let o=n.references;if(c(o)){let r=o.map(function(s){let a={};return HB(a,"positions",s,n.interval,i,Lg,fa),a.positions});e[t]=new Lg(r)}else c(n.cartesian)?n.array=n.cartesian.map(tXe):c(n.cartographicRadians)?n.array=n.cartographicRadians.map(nXe):c(n.cartographicDegrees)&&(n.array=n.cartographicDegrees.map(iXe)),c(n.array)&&de(Array,e,t,n,void 0,void 0,i)}function oXe(e,t,n,i){if(c(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;++o)Vce(e,t,n[o],i);else Vce(e,t,n,i)}function rXe(e,t,n,i){if(c(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;o++)Fce(e,t,n[o],i);else Fce(e,t,n,i)}function sXe(e,t,n,i){let o=t.availability;if(!c(o))return;let r;if(Array.isArray(o))for(let s=0,a=o.length;s<a;++s)c(r)||(r=new Br),r.addInterval(er(o[s]));else r=new Br,r.addInterval(er(o));e.availability=r}function aXe(e,t,n,i,o){c(t)&&de(zg,e,"alignedAxis",t,n,i,o)}function cXe(e,t,n,i){let o=t.billboard;if(!c(o))return;let r=er(o.interval),s=e.billboard;c(s)||(e.billboard=s=new sc),de(Boolean,s,"show",o.show,r,i,n),de(Image,s,"image",o.image,r,i,n),de(Number,s,"scale",o.scale,r,i,n),de(k,s,"pixelOffset",o.pixelOffset,r,i,n),de(d,s,"eyeOffset",o.eyeOffset,r,i,n),de(mi,s,"horizontalOrigin",o.horizontalOrigin,r,i,n),de(Dn,s,"verticalOrigin",o.verticalOrigin,r,i,n),de(qe,s,"heightReference",o.heightReference,r,i,n),de(z,s,"color",o.color,r,i,n),de(fd,s,"rotation",o.rotation,r,i,n),aXe(s,o.alignedAxis,r,i,n),de(Boolean,s,"sizeInMeters",o.sizeInMeters,r,i,n),de(Number,s,"width",o.width,r,i,n),de(Number,s,"height",o.height,r,i,n),de(Bt,s,"scaleByDistance",o.scaleByDistance,r,i,n),de(Bt,s,"translucencyByDistance",o.translucencyByDistance,r,i,n),de(Bt,s,"pixelOffsetScaleByDistance",o.pixelOffsetScaleByDistance,r,i,n),de(je,s,"imageSubRegion",o.imageSubRegion,r,i,n),de(Nt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),de(Number,s,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function lXe(e,t,n,i){let o=t.box;if(!c(o))return;let r=er(o.interval),s=e.box;c(s)||(e.box=s=new uT),de(Boolean,s,"show",o.show,r,i,n),de(d,s,"dimensions",o.dimensions,r,i,n),de(qe,s,"heightReference",o.heightReference,r,i,n),de(Boolean,s,"fill",o.fill,r,i,n),Kl(s,"material",o.material,r,i,n),de(Boolean,s,"outline",o.outline,r,i,n),de(z,s,"outlineColor",o.outlineColor,r,i,n),de(Number,s,"outlineWidth",o.outlineWidth,r,i,n),de(yn,s,"shadows",o.shadows,r,i,n),de(Nt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function uXe(e,t,n,i){let o=t.corridor;if(!c(o))return;let r=er(o.interval),s=e.corridor;c(s)||(e.corridor=s=new dT),de(Boolean,s,"show",o.show,r,i,n),jv(s,"positions",o.positions,n),de(Number,s,"width",o.width,r,i,n),de(Number,s,"height",o.height,r,i,n),de(qe,s,"heightReference",o.heightReference,r,i,n),de(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),de(qe,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),de(Ii,s,"cornerType",o.cornerType,r,i,n),de(Number,s,"granularity",o.granularity,r,i,n),de(Boolean,s,"fill",o.fill,r,i,n),Kl(s,"material",o.material,r,i,n),de(Boolean,s,"outline",o.outline,r,i,n),de(z,s,"outlineColor",o.outlineColor,r,i,n),de(Number,s,"outlineWidth",o.outlineWidth,r,i,n),de(yn,s,"shadows",o.shadows,r,i,n),de(Nt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),de(Ln,s,"classificationType",o.classificationType,r,i,n),de(Number,s,"zIndex",o.zIndex,r,i,n)}function fXe(e,t,n,i){let o=t.cylinder;if(!c(o))return;let r=er(o.interval),s=e.cylinder;c(s)||(e.cylinder=s=new hT),de(Boolean,s,"show",o.show,r,i,n),de(Number,s,"length",o.length,r,i,n),de(Number,s,"topRadius",o.topRadius,r,i,n),de(Number,s,"bottomRadius",o.bottomRadius,r,i,n),de(qe,s,"heightReference",o.heightReference,r,i,n),de(Boolean,s,"fill",o.fill,r,i,n),Kl(s,"material",o.material,r,i,n),de(Boolean,s,"outline",o.outline,r,i,n),de(z,s,"outlineColor",o.outlineColor,r,i,n),de(Number,s,"outlineWidth",o.outlineWidth,r,i,n),de(Number,s,"numberOfVerticalLines",o.numberOfVerticalLines,r,i,n),de(Number,s,"slices",o.slices,r,i,n),de(yn,s,"shadows",o.shadows,r,i,n),de(Nt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function dXe(e,t){let n=e.version;if(c(n)&&typeof n=="string"){let r=n.split(".");if(r.length===2){if(r[0]!=="1")throw new ie("Cesium only supports CZML version 1.");t._version=n}}if(!c(t._version))throw new ie("CZML version information invalid. It is expected to be a property on the document object in the <Major>.<Minor> version format.");let i=t._documentPacket;c(e.name)&&(i.name=e.name);let o=e.clock;if(c(o)){let r=i.clock;c(r)?(r.interval=g(o.interval,r.interval),r.currentTime=g(o.currentTime,r.currentTime),r.range=g(o.range,r.range),r.step=g(o.step,r.step),r.multiplier=g(o.multiplier,r.multiplier)):i.clock={interval:o.interval,currentTime:o.currentTime,range:o.range,step:o.step,multiplier:o.multiplier}}}function hXe(e,t,n,i){let o=t.ellipse;if(!c(o))return;let r=er(o.interval),s=e.ellipse;c(s)||(e.ellipse=s=new mT),de(Boolean,s,"show",o.show,r,i,n),de(Number,s,"semiMajorAxis",o.semiMajorAxis,r,i,n),de(Number,s,"semiMinorAxis",o.semiMinorAxis,r,i,n),de(Number,s,"height",o.height,r,i,n),de(qe,s,"heightReference",o.heightReference,r,i,n),de(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),de(qe,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),de(fd,s,"rotation",o.rotation,r,i,n),de(fd,s,"stRotation",o.stRotation,r,i,n),de(Number,s,"granularity",o.granularity,r,i,n),de(Boolean,s,"fill",o.fill,r,i,n),Kl(s,"material",o.material,r,i,n),de(Boolean,s,"outline",o.outline,r,i,n),de(z,s,"outlineColor",o.outlineColor,r,i,n),de(Number,s,"outlineWidth",o.outlineWidth,r,i,n),de(Number,s,"numberOfVerticalLines",o.numberOfVerticalLines,r,i,n),de(yn,s,"shadows",o.shadows,r,i,n),de(Nt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),de(Ln,s,"classificationType",o.classificationType,r,i,n),de(Number,s,"zIndex",o.zIndex,r,i,n)}function mXe(e,t,n,i){let o=t.ellipsoid;if(!c(o))return;let r=er(o.interval),s=e.ellipsoid;c(s)||(e.ellipsoid=s=new pT),de(Boolean,s,"show",o.show,r,i,n),de(d,s,"radii",o.radii,r,i,n),de(d,s,"innerRadii",o.innerRadii,r,i,n),de(Number,s,"minimumClock",o.minimumClock,r,i,n),de(Number,s,"maximumClock",o.maximumClock,r,i,n),de(Number,s,"minimumCone",o.minimumCone,r,i,n),de(Number,s,"maximumCone",o.maximumCone,r,i,n),de(qe,s,"heightReference",o.heightReference,r,i,n),de(Boolean,s,"fill",o.fill,r,i,n),Kl(s,"material",o.material,r,i,n),de(Boolean,s,"outline",o.outline,r,i,n),de(z,s,"outlineColor",o.outlineColor,r,i,n),de(Number,s,"outlineWidth",o.outlineWidth,r,i,n),de(Number,s,"stackPartitions",o.stackPartitions,r,i,n),de(Number,s,"slicePartitions",o.slicePartitions,r,i,n),de(Number,s,"subdivisions",o.subdivisions,r,i,n),de(yn,s,"shadows",o.shadows,r,i,n),de(Nt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function pXe(e,t,n,i){let o=t.label;if(!c(o))return;let r=er(o.interval),s=e.label;c(s)||(e.label=s=new ch),de(Boolean,s,"show",o.show,r,i,n),de(String,s,"text",o.text,r,i,n),de(String,s,"font",o.font,r,i,n),de(Uo,s,"style",o.style,r,i,n),de(Number,s,"scale",o.scale,r,i,n),de(Boolean,s,"showBackground",o.showBackground,r,i,n),de(z,s,"backgroundColor",o.backgroundColor,r,i,n),de(k,s,"backgroundPadding",o.backgroundPadding,r,i,n),de(k,s,"pixelOffset",o.pixelOffset,r,i,n),de(d,s,"eyeOffset",o.eyeOffset,r,i,n),de(mi,s,"horizontalOrigin",o.horizontalOrigin,r,i,n),de(Dn,s,"verticalOrigin",o.verticalOrigin,r,i,n),de(qe,s,"heightReference",o.heightReference,r,i,n),de(z,s,"fillColor",o.fillColor,r,i,n),de(z,s,"outlineColor",o.outlineColor,r,i,n),de(Number,s,"outlineWidth",o.outlineWidth,r,i,n),de(Bt,s,"translucencyByDistance",o.translucencyByDistance,r,i,n),de(Bt,s,"pixelOffsetScaleByDistance",o.pixelOffsetScaleByDistance,r,i,n),de(Bt,s,"scaleByDistance",o.scaleByDistance,r,i,n),de(Nt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),de(Number,s,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function _Xe(e,t,n,i){let o=t.model;if(!c(o))return;let r=er(o.interval),s=e.model;c(s)||(e.model=s=new S_),de(Boolean,s,"show",o.show,r,i,n),de(Gv.default,s,"uri",o.gltf,r,i,n),de(Number,s,"scale",o.scale,r,i,n),de(Number,s,"minimumPixelSize",o.minimumPixelSize,r,i,n),de(Number,s,"maximumScale",o.maximumScale,r,i,n),de(Boolean,s,"incrementallyLoadTextures",o.incrementallyLoadTextures,r,i,n),de(Boolean,s,"runAnimations",o.runAnimations,r,i,n),de(Boolean,s,"clampAnimations",o.clampAnimations,r,i,n),de(yn,s,"shadows",o.shadows,r,i,n),de(qe,s,"heightReference",o.heightReference,r,i,n),de(z,s,"silhouetteColor",o.silhouetteColor,r,i,n),de(Number,s,"silhouetteSize",o.silhouetteSize,r,i,n),de(z,s,"color",o.color,r,i,n),de(_c,s,"colorBlendMode",o.colorBlendMode,r,i,n),de(Number,s,"colorBlendAmount",o.colorBlendAmount,r,i,n),de(Nt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n);let a,l,u=o.nodeTransformations;if(c(u))if(Array.isArray(u))for(a=0,l=u.length;a<l;++a)Hce(s,u[a],r,i,n);else Hce(s,u,r,i,n);let f=o.articulations;if(c(f))if(Array.isArray(f))for(a=0,l=f.length;a<l;++a)Gce(s,f[a],r,i,n);else Gce(s,f,r,i,n)}function Hce(e,t,n,i,o){let r=er(t.interval);c(n)&&(c(r)?r=En.intersect(r,n,f0):r=n);let s=e.nodeTransformations,a=Object.keys(t);for(let l=0,u=a.length;l<u;++l){let f=a[l];if(f==="interval")continue;let h=t[f];if(!c(h))continue;c(s)||(e.nodeTransformations=s=new Ll),s.hasProperty(f)||s.addProperty(f);let m=s[f];c(m)||(s[f]=m=new _T),de(d,m,"translation",h.translation,r,i,o),de(ve,m,"rotation",h.rotation,r,i,o),de(d,m,"scale",h.scale,r,i,o)}}function Gce(e,t,n,i,o){let r=er(t.interval);c(n)&&(c(r)?r=En.intersect(r,n,f0):r=n);let s=e.articulations,a=Object.keys(t);for(let l=0,u=a.length;l<u;++l){let f=a[l];if(f==="interval")continue;let h=t[f];c(h)&&(c(s)||(e.articulations=s=new Ll),s.hasProperty(f)||s.addProperty(f),de(Number,s,f,h,r,i,o))}}function gXe(e,t,n,i){let o=t.path;if(!c(o))return;let r=er(o.interval),s=e.path;c(s)||(e.path=s=new A_),de(Boolean,s,"show",o.show,r,i,n),de(Number,s,"leadTime",o.leadTime,r,i,n),de(Number,s,"trailTime",o.trailTime,r,i,n),de(Number,s,"width",o.width,r,i,n),de(Number,s,"resolution",o.resolution,r,i,n),Kl(s,"material",o.material,r,i,n),de(Nt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function yXe(e,t,n,i){let o=t.point;if(!c(o))return;let r=er(o.interval),s=e.point;c(s)||(e.point=s=new yT),de(Boolean,s,"show",o.show,r,i,n),de(Number,s,"pixelSize",o.pixelSize,r,i,n),de(qe,s,"heightReference",o.heightReference,r,i,n),de(z,s,"color",o.color,r,i,n),de(z,s,"outlineColor",o.outlineColor,r,i,n),de(Number,s,"outlineWidth",o.outlineWidth,r,i,n),de(Bt,s,"scaleByDistance",o.scaleByDistance,r,i,n),de(Bt,s,"translucencyByDistance",o.translucencyByDistance,r,i,n),de(Nt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),de(Number,s,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function Hv(e){this.polygon=e,this._definitionChanged=new fe}Object.defineProperties(Hv.prototype,{isConstant:{get:function(){let e=this.polygon._positions,t=this.polygon._holes;return(!c(e)||e.isConstant)&&(!c(t)||t.isConstant)}},definitionChanged:{get:function(){return this._definitionChanged}}});Hv.prototype.getValue=function(e,t){let n;c(this.polygon._positions)&&(n=this.polygon._positions.getValue(e));let i;return c(this.polygon._holes)&&(i=this.polygon._holes.getValue(e),c(i)&&(i=i.map(function(o){return new Ra(o)}))),c(t)?(t.positions=n,t.holes=i,t):new Ra(n,i)};Hv.prototype.equals=function(e){return this===e||e instanceof Hv&&G.equals(this.polygon._positions,e.polygon._positions)&&G.equals(this.polygon._holes,e.polygon._holes)};function bXe(e,t,n,i){let o=t.polygon;if(!c(o))return;let r=er(o.interval),s=e.polygon;c(s)||(e.polygon=s=new lh),de(Boolean,s,"show",o.show,r,i,n),jv(s,"_positions",o.positions,n),oXe(s,"_holes",o.holes,n),(c(s._positions)||c(s._holes))&&(s.hierarchy=new Hv(s)),de(Number,s,"height",o.height,r,i,n),de(qe,s,"heightReference",o.heightReference,r,i,n),de(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),de(qe,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),de(fd,s,"stRotation",o.stRotation,r,i,n),de(Number,s,"granularity",o.granularity,r,i,n),de(Boolean,s,"fill",o.fill,r,i,n),Kl(s,"material",o.material,r,i,n),de(Boolean,s,"outline",o.outline,r,i,n),de(z,s,"outlineColor",o.outlineColor,r,i,n),de(Number,s,"outlineWidth",o.outlineWidth,r,i,n),de(Boolean,s,"perPositionHeight",o.perPositionHeight,r,i,n),de(Boolean,s,"closeTop",o.closeTop,r,i,n),de(Boolean,s,"closeBottom",o.closeBottom,r,i,n),de(jt,s,"arcType",o.arcType,r,i,n),de(yn,s,"shadows",o.shadows,r,i,n),de(Nt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),de(Ln,s,"classificationType",o.classificationType,r,i,n),de(Number,s,"zIndex",o.zIndex,r,i,n)}function xXe(e){return e?jt.GEODESIC:jt.NONE}function TXe(e,t,n,i){let o=t.polyline;if(!c(o))return;let r=er(o.interval),s=e.polyline;if(c(s)||(e.polyline=s=new fc),de(Boolean,s,"show",o.show,r,i,n),jv(s,"positions",o.positions,n),de(Number,s,"width",o.width,r,i,n),de(Number,s,"granularity",o.granularity,r,i,n),Kl(s,"material",o.material,r,i,n),Kl(s,"depthFailMaterial",o.depthFailMaterial,r,i,n),de(jt,s,"arcType",o.arcType,r,i,n),de(Boolean,s,"clampToGround",o.clampToGround,r,i,n),de(yn,s,"shadows",o.shadows,r,i,n),de(Nt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),de(Ln,s,"classificationType",o.classificationType,r,i,n),de(Number,s,"zIndex",o.zIndex,r,i,n),c(o.followSurface)&&!c(o.arcType)){let a={};de(Boolean,a,"followSurface",o.followSurface,r,i,n),s.arcType=k7e(a.followSurface,xXe)}}function CXe(e,t,n,i){let o=t.polylineVolume;if(!c(o))return;let r=er(o.interval),s=e.polylineVolume;c(s)||(e.polylineVolume=s=new bT),jv(s,"positions",o.positions,n),rXe(s,"shape",o.shape,n),de(Boolean,s,"show",o.show,r,i,n),de(Ii,s,"cornerType",o.cornerType,r,i,n),de(Boolean,s,"fill",o.fill,r,i,n),Kl(s,"material",o.material,r,i,n),de(Boolean,s,"outline",o.outline,r,i,n),de(z,s,"outlineColor",o.outlineColor,r,i,n),de(Number,s,"outlineWidth",o.outlineWidth,r,i,n),de(Number,s,"granularity",o.granularity,r,i,n),de(yn,s,"shadows",o.shadows,r,i,n),de(Nt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function EXe(e,t,n,i){let o=t.rectangle;if(!c(o))return;let r=er(o.interval),s=e.rectangle;c(s)||(e.rectangle=s=new uh),de(Boolean,s,"show",o.show,r,i,n),de(te,s,"coordinates",o.coordinates,r,i,n),de(Number,s,"height",o.height,r,i,n),de(qe,s,"heightReference",o.heightReference,r,i,n),de(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),de(qe,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),de(fd,s,"rotation",o.rotation,r,i,n),de(fd,s,"stRotation",o.stRotation,r,i,n),de(Number,s,"granularity",o.granularity,r,i,n),de(Boolean,s,"fill",o.fill,r,i,n),Kl(s,"material",o.material,r,i,n),de(Boolean,s,"outline",o.outline,r,i,n),de(z,s,"outlineColor",o.outlineColor,r,i,n),de(Number,s,"outlineWidth",o.outlineWidth,r,i,n),de(yn,s,"shadows",o.shadows,r,i,n),de(Nt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),de(Ln,s,"classificationType",o.classificationType,r,i,n),de(Number,s,"zIndex",o.zIndex,r,i,n)}function wXe(e,t,n,i){let o=t.tileset;if(!c(o))return;let r=er(o.interval),s=e.tileset;c(s)||(e.tileset=s=new gT),de(Boolean,s,"show",o.show,r,i,n),de(Gv.default,s,"uri",o.uri,r,i,n),de(Number,s,"maximumScreenSpaceError",o.maximumScreenSpaceError,r,i,n)}function SXe(e,t,n,i){let o=t.wall;if(!c(o))return;let r=er(o.interval),s=e.wall;c(s)||(e.wall=s=new v_),de(Boolean,s,"show",o.show,r,i,n),jv(s,"positions",o.positions,n),Uce(s,"minimumHeights",o.minimumHeights,n),Uce(s,"maximumHeights",o.maximumHeights,n),de(Number,s,"granularity",o.granularity,r,i,n),de(Boolean,s,"fill",o.fill,r,i,n),Kl(s,"material",o.material,r,i,n),de(Boolean,s,"outline",o.outline,r,i,n),de(z,s,"outlineColor",o.outlineColor,r,i,n),de(Number,s,"outlineWidth",o.outlineWidth,r,i,n),de(yn,s,"shadows",o.shadows,r,i,n),de(Nt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function jce(e,t,n,i,o){let r=e.id;if(c(r)||(r=Bn()),mW=r,!c(o._version)&&r!=="document")throw new ie("The first CZML packet is required to be the document object.");if(e.delete===!0)t.removeById(r);else if(r==="document")dXe(e,o);else{let s=t.getOrCreateEntity(r),a=e.parent;c(a)&&(s.parent=t.getOrCreateEntity(a));for(let l=n.length-1;l>-1;l--)n[l](s,e,t,i)}mW=void 0}function AXe(e){let t,n=e._documentPacket.clock;if(!c(n)){if(!c(e._clock)){let o=e._entityCollection.computeAvailability();if(!o.start.equals(Ue.MINIMUM_VALUE)){let r=o.start,s=o.stop,a=K.secondsDifference(s,r),l=Math.round(a/120);return t=new Bh,t.startTime=K.clone(r),t.stopTime=K.clone(s),t.clockRange=Va.LOOP_STOP,t.multiplier=l,t.currentTime=K.clone(r),t.clockStep=Or.SYSTEM_CLOCK_MULTIPLIER,e._clock=t,!0}}return!1}c(e._clock)?t=e._clock.clone():(t=new Bh,t.startTime=Ue.MINIMUM_VALUE.clone(),t.stopTime=Ue.MAXIMUM_VALUE.clone(),t.currentTime=Ue.MINIMUM_VALUE.clone(),t.clockRange=Va.LOOP_STOP,t.clockStep=Or.SYSTEM_CLOCK_MULTIPLIER,t.multiplier=1);let i=er(n.interval);return c(i)&&(t.startTime=i.start,t.stopTime=i.stop),c(n.currentTime)&&(t.currentTime=K.fromIso8601(n.currentTime)),c(n.range)&&(t.clockRange=g(Va[n.range],Va.LOOP_STOP)),c(n.step)&&(t.clockStep=g(Or[n.step],Or.SYSTEM_CLOCK_MULTIPLIER)),c(n.multiplier)&&(t.multiplier=n.multiplier),t.equals(e._clock)?!1:(e._clock=t.clone(e._clock),!0)}function Xce(e,t,n,i){if(!c(t))throw new w("czml is required.");n=g(n,g.EMPTY_OBJECT);let o=t,r=n.sourceUri,s=n.credit;if(typeof s=="string"&&(s=new St(s)),e._credit=s,typeof t=="string"||t instanceof Te){t=Te.createIfNeeded(t),o=t.fetchJson(),r=g(r,t.clone());let a=e._resourceCredits,l=t.credits;if(c(l)){let u=l.length;for(let f=0;f<u;f++)a.push(l[f])}}return r=Te.createIfNeeded(r),kr.setLoading(e,!0),Promise.resolve(o).then(function(a){return vXe(e,a,r,i)}).catch(function(a){return kr.setLoading(e,!1),e._error.raiseEvent(e,a),console.log(a),Promise.reject(a)})}function vXe(e,t,n,i){kr.setLoading(e,!0);let o=e._entityCollection;i&&(e._version=void 0,e._documentPacket=new Kce,o.removeAll()),$r._processCzml(t,o,n,void 0,e);let r=AXe(e),s=e._documentPacket;return c(s.name)&&e._name!==s.name?(e._name=s.name,r=!0):!c(e._name)&&c(n)&&(e._name=Mg(n.getUrlComponent()),r=!0),kr.setLoading(e,!1),r&&e._changed.raiseEvent(e),e}function Kce(){this.name=void 0,this.clock=void 0}function $r(e){this._name=e,this._changed=new fe,this._error=new fe,this._isLoading=!1,this._loading=new fe,this._clock=void 0,this._documentPacket=new Kce,this._version=void 0,this._entityCollection=new qs(this),this._entityCluster=new ff,this._credit=void 0,this._resourceCredits=[]}$r.load=function(e,t){return new $r().load(e,t)};Object.defineProperties($r.prototype,{name:{get:function(){return this._name}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!c(e))throw new w("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}}});$r.updaters=[cXe,lXe,uXe,fXe,hXe,mXe,pXe,_Xe,K7e,$7e,gXe,yXe,bXe,TXe,CXe,eXe,EXe,Z7e,wXe,J7e,SXe,Q7e,sXe];$r.registerUpdater=function(e){$r.updaters.includes(e)||$r.updaters.push(e)};$r.unregisterUpdater=function(e){if($r.updaters.includes(e)){let t=$r.updaters.indexOf(e);$r.updaters.splice(t,1)}};$r.prototype.process=function(e,t){return Xce(this,e,t,!1)};$r.prototype.load=function(e,t){return Xce(this,e,t,!0)};$r.prototype.update=function(e){return!0};$r.processPacketData=de;$r.processPositionPacketData=Yce;$r.processMaterialPacketData=Kl;$r._processCzml=function(e,t,n,i,o){if(i=g(i,$r.updaters),Array.isArray(e))for(let r=0,s=e.length;r<s;++r)jce(e[r],t,i,n,o);else jce(e,t,i,n,o)};var $ce=$r;function Sc(){this._dataSources=[],this._dataSourceAdded=new fe,this._dataSourceRemoved=new fe,this._dataSourceMoved=new fe}Object.defineProperties(Sc.prototype,{length:{get:function(){return this._dataSources.length}},dataSourceAdded:{get:function(){return this._dataSourceAdded}},dataSourceRemoved:{get:function(){return this._dataSourceRemoved}},dataSourceMoved:{get:function(){return this._dataSourceMoved}}});Sc.prototype.add=function(e){if(!c(e))throw new w("dataSource is required.");let t=this,n=this._dataSources;return Promise.resolve(e).then(function(i){return n===t._dataSources&&(t._dataSources.push(i),t._dataSourceAdded.raiseEvent(t,i)),i})};Sc.prototype.remove=function(e,t){t=g(t,!1);let n=this._dataSources.indexOf(e);return n!==-1?(this._dataSources.splice(n,1),this._dataSourceRemoved.raiseEvent(this,e),t&&typeof e.destroy=="function"&&e.destroy(),!0):!1};Sc.prototype.removeAll=function(e){e=g(e,!1);let t=this._dataSources;for(let n=0,i=t.length;n<i;++n){let o=t[n];this._dataSourceRemoved.raiseEvent(this,o),e&&typeof o.destroy=="function"&&o.destroy()}this._dataSources=[]};Sc.prototype.contains=function(e){return this.indexOf(e)!==-1};Sc.prototype.indexOf=function(e){return this._dataSources.indexOf(e)};Sc.prototype.get=function(e){if(!c(e))throw new w("index is required.");return this._dataSources[e]};Sc.prototype.getByName=function(e){if(!c(e))throw new w("name is required.");return this._dataSources.filter(function(t){return t.name===e})};function GB(e,t){if(!c(t))throw new w("dataSource is required.");let n=e.indexOf(t);if(n===-1)throw new w("dataSource is not in this collection.");return n}function Zce(e,t,n){let i=e._dataSources,o=i.length-1;if(t=O.clamp(t,0,o),n=O.clamp(n,0,o),t===n)return;let r=i[t];i[t]=i[n],i[n]=r,e.dataSourceMoved.raiseEvent(r,n,t)}Sc.prototype.raise=function(e){let t=GB(this._dataSources,e);Zce(this,t,t+1)};Sc.prototype.lower=function(e){let t=GB(this._dataSources,e);Zce(this,t,t-1)};Sc.prototype.raiseToTop=function(e){let t=GB(this._dataSources,e);t!==this._dataSources.length-1&&(this._dataSources.splice(t,1),this._dataSources.push(e),this.dataSourceMoved.raiseEvent(e,this._dataSources.length-1,t))};Sc.prototype.lowerToBottom=function(e){let t=GB(this._dataSources,e);t!==0&&(this._dataSources.splice(t,1),this._dataSources.splice(0,0,e),this.dataSourceMoved.raiseEvent(e,0,t))};Sc.prototype.isDestroyed=function(){return!1};Sc.prototype.destroy=function(){return this.removeAll(!0),ue(this)};var jB=Sc;function Xs(e){e=g(e,g.EMPTY_OBJECT),this._primitives=[],this._guid=Bn(),this._primitiveAdded=new fe,this._primitiveRemoved=new fe,this._zIndex=void 0,this.show=g(e.show,!0),this.destroyPrimitives=g(e.destroyPrimitives,!0)}Object.defineProperties(Xs.prototype,{length:{get:function(){return this._primitives.length}},primitiveAdded:{get:function(){return this._primitiveAdded}},primitiveRemoved:{get:function(){return this._primitiveRemoved}}});Xs.prototype.add=function(e,t){let n=c(t);if(!c(e))throw new w("primitive is required.");if(n){if(t<0)throw new w("index must be greater than or equal to zero.");if(t>this._primitives.length)throw new w("index must be less than or equal to the number of primitives.")}let i=e._external=e._external||{},o=i._composites=i._composites||{};return o[this._guid]={collection:this},n?this._primitives.splice(t,0,e):this._primitives.push(e),this._primitiveAdded.raiseEvent(e),e};Xs.prototype.remove=function(e){if(this.contains(e)){let t=this._primitives.indexOf(e);if(t!==-1)return this._primitives.splice(t,1),delete e._external._composites[this._guid],this.destroyPrimitives&&e.destroy(),this._primitiveRemoved.raiseEvent(e),!0}return!1};Xs.prototype.removeAndDestroy=function(e){let t=this.remove(e);return t&&!this.destroyPrimitives&&e.destroy(),t};Xs.prototype.removeAll=function(){let e=this._primitives,t=e.length;for(let n=0;n<t;++n)delete e[n]._external._composites[this._guid],this.destroyPrimitives&&e[n].destroy(),this._primitiveRemoved.raiseEvent(e[n]);this._primitives=[]};Xs.prototype.contains=function(e){return!!(c(e)&&e._external&&e._external._composites&&e._external._composites[this._guid])};function WB(e,t){if(!e.contains(t))throw new w("primitive is not in this collection.");return e._primitives.indexOf(t)}Xs.prototype.raise=function(e){if(c(e)){let t=WB(this,e),n=this._primitives;if(t!==n.length-1){let i=n[t];n[t]=n[t+1],n[t+1]=i}}};Xs.prototype.raiseToTop=function(e){if(c(e)){let t=WB(this,e),n=this._primitives;t!==n.length-1&&(n.splice(t,1),n.push(e))}};Xs.prototype.lower=function(e){if(c(e)){let t=WB(this,e),n=this._primitives;if(t!==0){let i=n[t];n[t]=n[t-1],n[t-1]=i}}};Xs.prototype.lowerToBottom=function(e){if(c(e)){let t=WB(this,e),n=this._primitives;t!==0&&(n.splice(t,1),n.unshift(e))}};Xs.prototype.get=function(e){if(!c(e))throw new w("index is required.");return this._primitives[e]};Xs.prototype.update=function(e){if(!this.show)return;let t=this._primitives;for(let n=0;n<t.length;++n)t[n].update(e)};Xs.prototype.prePassesUpdate=function(e){let t=this._primitives;for(let n=0;n<t.length;++n){let i=t[n];c(i.prePassesUpdate)&&i.prePassesUpdate(e)}};Xs.prototype.updateForPass=function(e,t){let n=this._primitives;for(let i=0;i<n.length;++i){let o=n[i];c(o.updateForPass)&&o.updateForPass(e,t)}};Xs.prototype.postPassesUpdate=function(e){let t=this._primitives;for(let n=0;n<t.length;++n){let i=t[n];c(i.postPassesUpdate)&&i.postPassesUpdate(e)}};Xs.prototype.isDestroyed=function(){return!1};Xs.prototype.destroy=function(){return this.removeAll(),ue(this)};var $l=Xs;function Uh(){this._length=0,this._collections={},this._collectionsArray=[],this.show=!0}Object.defineProperties(Uh.prototype,{length:{get:function(){return this._length}}});Uh.prototype.add=function(e,t){C.defined("primitive",e),c(t)&&C.typeOf.number("zIndex",t),t=g(t,0);let n=this._collections[t];if(!c(n)){n=new $l({destroyPrimitives:!1}),n._zIndex=t,this._collections[t]=n;let i=this._collectionsArray,o=0;for(;o<i.length&&i[o]._zIndex<t;)o++;i.splice(o,0,n)}return n.add(e),this._length++,e._zIndex=t,e};Uh.prototype.set=function(e,t){return C.defined("primitive",e),C.typeOf.number("zIndex",t),t===e._zIndex||(this.remove(e,!0),this.add(e,t)),e};Uh.prototype.remove=function(e,t){if(this.contains(e)){let n=e._zIndex,i=this._collections[n],o;return t?o=i.remove(e):o=i.removeAndDestroy(e),o&&this._length--,i.length===0&&(this._collectionsArray.splice(this._collectionsArray.indexOf(i),1),this._collections[n]=void 0,i.destroy()),o}return!1};Uh.prototype.removeAll=function(){let e=this._collectionsArray;for(let t=0;t<e.length;t++){let n=e[t];n.destroyPrimitives=!0,n.destroy()}this._collections={},this._collectionsArray=[],this._length=0};Uh.prototype.contains=function(e){if(!c(e))return!1;let t=this._collections[e._zIndex];return c(t)&&t.contains(e)};Uh.prototype.update=function(e){if(!this.show)return;let t=this._collectionsArray;for(let n=0;n<t.length;n++)t[n].update(e)};Uh.prototype.isDestroyed=function(){return!1};Uh.prototype.destroy=function(){return this.removeAll(),ue(this)};var qB=Uh;function iE(e,t){this._primitives=e,this._orderedGroundPrimitives=t,this._dynamicUpdaters=new Et}iE.prototype.add=function(e,t){this._dynamicUpdaters.set(t.id,t.createDynamicUpdater(this._primitives,this._orderedGroundPrimitives))};iE.prototype.remove=function(e){let t=e.id,n=this._dynamicUpdaters.get(t);c(n)&&(this._dynamicUpdaters.remove(t),n.destroy())};iE.prototype.update=function(e){let t=this._dynamicUpdaters.values;for(let n=0,i=t.length;n<i;n++)t[n].update(e);return!0};iE.prototype.removeAllPrimitives=function(){let e=this._dynamicUpdaters.values;for(let t=0,n=e.length;t<n;t++)e[t].destroy();this._dynamicUpdaters.removeAll()};iE.prototype.getBoundingSphere=function(e,t){return e=this._dynamicUpdaters.get(e.id),c(e)&&c(e.getBoundingSphere)?e.getBoundingSphere(t):lt.FAILED};var oE=iE;var yW={},YB=new d,Jce=new d,Qce=new ve,ele=new q;function rE(e,t,n,i,o,r,s,a,l,u){let f=e+t;d.multiplyByScalar(i,Math.cos(f),YB),d.multiplyByScalar(n,Math.sin(f),Jce),d.add(YB,Jce,YB);let h=Math.cos(e);h=h*h;let m=Math.sin(e);m=m*m;let _=r/Math.sqrt(s*h+o*m)/a;return ve.fromAxisAngle(YB,_,Qce),q.fromQuaternion(Qce,ele),q.multiplyByVector(ele,l,u),d.normalize(u,u),d.multiplyByScalar(u,a,u),u}var tle=new d,nle=new d,gW=new d,DXe=new d;yW.raisePositionsToHeight=function(e,t,n){let i=t.ellipsoid,o=t.height,r=t.extrudedHeight,s=n?e.length/3*2:e.length/3,a=new Float64Array(s*3),l=e.length,u=n?l:0;for(let f=0;f<l;f+=3){let h=f+1,m=f+2,p=d.fromArray(e,f,tle);i.scaleToGeodeticSurface(p,p);let _=d.clone(p,nle),b=i.geodeticSurfaceNormal(p,DXe),x=d.multiplyByScalar(b,o,gW);d.add(p,x,p),n&&(d.multiplyByScalar(b,r,x),d.add(_,x,_),a[f+u]=_.x,a[h+u]=_.y,a[m+u]=_.z),a[f]=p.x,a[h]=p.y,a[m]=p.z}return a};var IXe=new d,OXe=new d,PXe=new d;yW.computeEllipsePositions=function(e,t,n){let i=e.semiMinorAxis,o=e.semiMajorAxis,r=e.rotation,s=e.center,a=e.granularity*8,l=i*i,u=o*o,f=o*i,h=d.magnitude(s),m=d.normalize(s,IXe),p=d.cross(d.UNIT_Z,s,OXe);p=d.normalize(p,p);let _=d.cross(m,p,PXe),b=1+Math.ceil(O.PI_OVER_TWO/a),x=O.PI_OVER_TWO/(b-1),T=O.PI_OVER_TWO-b*x;T<0&&(b-=Math.ceil(Math.abs(T)/x));let E=2*(b*(b+2)),S=t?new Array(E*3):void 0,A=0,v=tle,D=nle,R=b*4*3,P=R-1,L=0,F=n?new Array(R):void 0,y,I,M,B,U;for(T=O.PI_OVER_TWO,v=rE(T,r,_,p,l,f,u,h,m,v),t&&(S[A++]=v.x,S[A++]=v.y,S[A++]=v.z),n&&(F[P--]=v.z,F[P--]=v.y,F[P--]=v.x),T=O.PI_OVER_TWO-x,y=1;y<b+1;++y){if(v=rE(T,r,_,p,l,f,u,h,m,v),D=rE(Math.PI-T,r,_,p,l,f,u,h,m,D),t){for(S[A++]=v.x,S[A++]=v.y,S[A++]=v.z,M=2*y+2,I=1;I<M-1;++I)B=I/(M-1),U=d.lerp(v,D,B,gW),S[A++]=U.x,S[A++]=U.y,S[A++]=U.z;S[A++]=D.x,S[A++]=D.y,S[A++]=D.z}n&&(F[P--]=v.z,F[P--]=v.y,F[P--]=v.x,F[L++]=D.x,F[L++]=D.y,F[L++]=D.z),T=O.PI_OVER_TWO-(y+1)*x}for(y=b;y>1;--y){if(T=O.PI_OVER_TWO-(y-1)*x,v=rE(-T,r,_,p,l,f,u,h,m,v),D=rE(T+Math.PI,r,_,p,l,f,u,h,m,D),t){for(S[A++]=v.x,S[A++]=v.y,S[A++]=v.z,M=2*(y-1)+2,I=1;I<M-1;++I)B=I/(M-1),U=d.lerp(v,D,B,gW),S[A++]=U.x,S[A++]=U.y,S[A++]=U.z;S[A++]=D.x,S[A++]=D.y,S[A++]=D.z}n&&(F[P--]=v.z,F[P--]=v.y,F[P--]=v.x,F[L++]=D.x,F[L++]=D.y,F[L++]=D.z)}T=O.PI_OVER_TWO,v=rE(-T,r,_,p,l,f,u,h,m,v);let V={};return t&&(S[A++]=v.x,S[A++]=v.y,S[A++]=v.z,V.positions=S,V.numPts=b),n&&(F[P--]=v.z,F[P--]=v.y,F[P--]=v.x,V.outerPositions=F),V};var Zl=yW;var sE=new d,bW=new d,xW=new d,ile=new d,ls=new k,ole=new q,RXe=new q,TW=new ve,rle=new d,sle=new d,ale=new d,$B=new re,cle=new d,lle=new k,ule=new k;function fle(e,t,n){let i=t.vertexFormat,o=t.center,r=t.semiMajorAxis,s=t.semiMinorAxis,a=t.ellipsoid,l=t.stRotation,u=n?e.length/3*2:e.length/3,f=t.shadowVolume,h=i.st?new Float32Array(u*2):void 0,m=i.normal?new Float32Array(u*3):void 0,p=i.tangent?new Float32Array(u*3):void 0,_=i.bitangent?new Float32Array(u*3):void 0,b=f?new Float32Array(u*3):void 0,x=0,T=rle,E=sle,S=ale,A=new Ei(a),v=A.project(a.cartesianToCartographic(o,$B),cle),D=a.scaleToGeodeticSurface(o,sE);a.geodeticSurfaceNormal(D,D);let R=ole,P=RXe;if(l!==0){let U=ve.fromAxisAngle(D,l,TW);R=q.fromQuaternion(U,R),U=ve.fromAxisAngle(D,-l,TW),P=q.fromQuaternion(U,P)}else R=q.clone(q.IDENTITY,R),P=q.clone(q.IDENTITY,P);let L=k.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,lle),F=k.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ule),y=e.length,I=n?y:0,M=I/3*2;for(let U=0;U<y;U+=3){let V=U+1,W=U+2,H=d.fromArray(e,U,sE);if(i.st){let X=q.multiplyByVector(R,H,bW),$=A.project(a.cartesianToCartographic(X,$B),xW);d.subtract($,v,$),ls.x=($.x+r)/(2*r),ls.y=($.y+s)/(2*s),L.x=Math.min(ls.x,L.x),L.y=Math.min(ls.y,L.y),F.x=Math.max(ls.x,F.x),F.y=Math.max(ls.y,F.y),n&&(h[x+M]=ls.x,h[x+1+M]=ls.y),h[x++]=ls.x,h[x++]=ls.y}(i.normal||i.tangent||i.bitangent||f)&&(T=a.geodeticSurfaceNormal(H,T),f&&(b[U+I]=-T.x,b[V+I]=-T.y,b[W+I]=-T.z),(i.normal||i.tangent||i.bitangent)&&((i.tangent||i.bitangent)&&(E=d.normalize(d.cross(d.UNIT_Z,T,E),E),q.multiplyByVector(P,E,E)),i.normal&&(m[U]=T.x,m[V]=T.y,m[W]=T.z,n&&(m[U+I]=-T.x,m[V+I]=-T.y,m[W+I]=-T.z)),i.tangent&&(p[U]=E.x,p[V]=E.y,p[W]=E.z,n&&(p[U+I]=-E.x,p[V+I]=-E.y,p[W+I]=-E.z)),i.bitangent&&(S=d.normalize(d.cross(T,E,S),S),_[U]=S.x,_[V]=S.y,_[W]=S.z,n&&(_[U+I]=S.x,_[V+I]=S.y,_[W+I]=S.z))))}if(i.st){y=h.length;for(let U=0;U<y;U+=2)h[U]=(h[U]-L.x)/(F.x-L.x),h[U+1]=(h[U+1]-L.y)/(F.y-L.y)}let B=new fn;if(i.position){let U=Zl.raisePositionsToHeight(e,t,n);B.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:U})}if(i.st&&(B.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:h})),i.normal&&(B.normal=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:m})),i.tangent&&(B.tangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:p})),i.bitangent&&(B.bitangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:_})),f&&(B.extrudeDirection=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:b})),n&&c(t.offsetAttribute)){let U=new Uint8Array(u);if(t.offsetAttribute===Zt.TOP)U=U.fill(1,0,u/2);else{let V=t.offsetAttribute===Zt.NONE?0:1;U=U.fill(V)}B.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:U})}return B}function dle(e){let t=new Array(12*(e*(e+1))-6),n=0,i,o,r,s,a;for(i=0,r=1,s=0;s<3;s++)t[n++]=r++,t[n++]=i,t[n++]=r;for(s=2;s<e+1;++s){for(r=s*(s+1)-1,i=(s-1)*s-1,t[n++]=r++,t[n++]=i,t[n++]=r,o=2*s,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=r++,t[n++]=i,t[n++]=r}for(o=e*2,++r,++i,s=0;s<o-1;++s)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;for(t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i++,t[n++]=i,++i,s=e-1;s>1;--s){for(t[n++]=i++,t[n++]=i,t[n++]=r,o=2*s,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=i++,t[n++]=i++,t[n++]=r++}for(s=0;s<3;s++)t[n++]=i++,t[n++]=i,t[n++]=r;return t}var d0=new d;function MXe(e){let t=e.center;d0=d.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,d0),e.height,d0),d0=d.add(t,d0,d0);let n=new ne(d0,e.semiMajorAxis),i=Zl.computeEllipsePositions(e,!0,!1),o=i.positions,r=i.numPts,s=fle(o,e,!1),a=dle(r);return a=Oe.createTypedArray(o.length/3,a),{boundingSphere:n,attributes:s,indices:a}}function LXe(e,t){let n=t.vertexFormat,i=t.center,o=t.semiMajorAxis,r=t.semiMinorAxis,s=t.ellipsoid,a=t.height,l=t.extrudedHeight,u=t.stRotation,f=e.length/3*2,h=new Float64Array(f*3),m=n.st?new Float32Array(f*2):void 0,p=n.normal?new Float32Array(f*3):void 0,_=n.tangent?new Float32Array(f*3):void 0,b=n.bitangent?new Float32Array(f*3):void 0,x=t.shadowVolume,T=x?new Float32Array(f*3):void 0,E=0,S=rle,A=sle,v=ale,D=new Ei(s),R=D.project(s.cartesianToCartographic(i,$B),cle),P=s.scaleToGeodeticSurface(i,sE);s.geodeticSurfaceNormal(P,P);let L=ve.fromAxisAngle(P,u,TW),F=q.fromQuaternion(L,ole),y=k.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,lle),I=k.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ule),M=e.length,B=M/3*2;for(let V=0;V<M;V+=3){let W=V+1,H=V+2,X=d.fromArray(e,V,sE),$;if(n.st){let se=q.multiplyByVector(F,X,bW),he=D.project(s.cartesianToCartographic(se,$B),xW);d.subtract(he,R,he),ls.x=(he.x+o)/(2*o),ls.y=(he.y+r)/(2*r),y.x=Math.min(ls.x,y.x),y.y=Math.min(ls.y,y.y),I.x=Math.max(ls.x,I.x),I.y=Math.max(ls.y,I.y),m[E+B]=ls.x,m[E+1+B]=ls.y,m[E++]=ls.x,m[E++]=ls.y}X=s.scaleToGeodeticSurface(X,X),$=d.clone(X,bW),S=s.geodeticSurfaceNormal(X,S),x&&(T[V+M]=-S.x,T[W+M]=-S.y,T[H+M]=-S.z);let ae=d.multiplyByScalar(S,a,ile);if(X=d.add(X,ae,X),ae=d.multiplyByScalar(S,l,ae),$=d.add($,ae,$),n.position&&(h[V+M]=$.x,h[W+M]=$.y,h[H+M]=$.z,h[V]=X.x,h[W]=X.y,h[H]=X.z),n.normal||n.tangent||n.bitangent){v=d.clone(S,v);let se=d.fromArray(e,(V+3)%M,ile);d.subtract(se,X,se);let he=d.subtract($,X,xW);S=d.normalize(d.cross(he,se,S),S),n.normal&&(p[V]=S.x,p[W]=S.y,p[H]=S.z,p[V+M]=S.x,p[W+M]=S.y,p[H+M]=S.z),n.tangent&&(A=d.normalize(d.cross(v,S,A),A),_[V]=A.x,_[W]=A.y,_[H]=A.z,_[V+M]=A.x,_[V+1+M]=A.y,_[V+2+M]=A.z),n.bitangent&&(b[V]=v.x,b[W]=v.y,b[H]=v.z,b[V+M]=v.x,b[W+M]=v.y,b[H+M]=v.z)}}if(n.st){M=m.length;for(let V=0;V<M;V+=2)m[V]=(m[V]-y.x)/(I.x-y.x),m[V+1]=(m[V+1]-y.y)/(I.y-y.y)}let U=new fn;if(n.position&&(U.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:h})),n.st&&(U.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:m})),n.normal&&(U.normal=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:p})),n.tangent&&(U.tangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:_})),n.bitangent&&(U.bitangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:b})),x&&(U.extrudeDirection=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:T})),c(t.offsetAttribute)){let V=new Uint8Array(f);if(t.offsetAttribute===Zt.TOP)V=V.fill(1,0,f/2);else{let W=t.offsetAttribute===Zt.NONE?0:1;V=V.fill(W)}U.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:V})}return U}function NXe(e){let t=e.length/3,n=Oe.createTypedArray(t,t*6),i=0;for(let o=0;o<t;o++){let r=o,s=o+t,a=(r+1)%t,l=a+t;n[i++]=r,n[i++]=s,n[i++]=a,n[i++]=a,n[i++]=s,n[i++]=l}return n}var XB=new ne,KB=new ne;function FXe(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=d.multiplyByScalar(n.geodeticSurfaceNormal(t,sE),e.height,sE);XB.center=d.add(t,o,XB.center),XB.radius=i,o=d.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),KB.center=d.add(t,o,KB.center),KB.radius=i;let r=Zl.computeEllipsePositions(e,!0,!0),s=r.positions,a=r.numPts,l=r.outerPositions,u=ne.union(XB,KB),f=fle(s,e,!0),h=dle(a),m=h.length;h.length=m*2;let p=s.length/3;for(let A=0;A<m;A+=3)h[A+m]=h[A+2]+p,h[A+1+m]=h[A+1]+p,h[A+2+m]=h[A]+p;let _=Oe.createTypedArray(p*2/3,h),b=new st({attributes:f,indices:_,primitiveType:Se.TRIANGLES}),x=LXe(l,e);h=NXe(l);let T=Oe.createTypedArray(l.length*2/3,h),E=new st({attributes:x,indices:T,primitiveType:Se.TRIANGLES}),S=Pn.combineInstances([new wt({geometry:b}),new wt({geometry:E})]);return{boundingSphere:u,attributes:S[0].attributes,indices:S[0].indices}}function hle(e,t,n,i,o,r,s){let l=Zl.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:n,rotation:i,granularity:o},!1,!0).outerPositions,u=l.length/3,f=new Array(u);for(let m=0;m<u;++m)f[m]=d.fromArray(l,m*3);let h=te.fromCartesianArray(f,r,s);return h.width>O.PI&&(h.north=h.north>0?O.PI_OVER_TWO-O.EPSILON7:h.north,h.south=h.south<0?O.EPSILON7-O.PI_OVER_TWO:h.south,h.east=O.PI,h.west=-O.PI),h}function Vh(e){e=g(e,g.EMPTY_OBJECT);let t=e.center,n=g(e.ellipsoid,Z.default),i=e.semiMajorAxis,o=e.semiMinorAxis,r=g(e.granularity,O.RADIANS_PER_DEGREE),s=g(e.vertexFormat,Ce.DEFAULT);if(C.defined("options.center",t),C.typeOf.number("options.semiMajorAxis",i),C.typeOf.number("options.semiMinorAxis",o),i<o)throw new w("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(r<=0)throw new w("granularity must be greater than zero.");let a=g(e.height,0),l=g(e.extrudedHeight,a);this._center=d.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=Z.clone(n),this._rotation=g(e.rotation,0),this._stRotation=g(e.stRotation,0),this._height=Math.max(l,a),this._granularity=r,this._vertexFormat=Ce.clone(s),this._extrudedHeight=Math.min(l,a),this._shadowVolume=g(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}Vh.packedLength=d.packedLength+Z.packedLength+Ce.packedLength+9;Vh.pack=function(e,t,n){return C.defined("value",e),C.defined("array",t),n=g(n,0),d.pack(e._center,t,n),n+=d.packedLength,Z.pack(e._ellipsoid,t,n),n+=Z.packedLength,Ce.pack(e._vertexFormat,t,n),n+=Ce.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=g(e._offsetAttribute,-1),t};var mle=new d,ple=new Z,_le=new Ce,zh={center:mle,ellipsoid:ple,vertexFormat:_le,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Vh.unpack=function(e,t,n){C.defined("array",e),t=g(t,0);let i=d.unpack(e,t,mle);t+=d.packedLength;let o=Z.unpack(e,t,ple);t+=Z.packedLength;let r=Ce.unpack(e,t,_le);t+=Ce.packedLength;let s=e[t++],a=e[t++],l=e[t++],u=e[t++],f=e[t++],h=e[t++],m=e[t++],p=e[t++]===1,_=e[t];return c(n)?(n._center=d.clone(i,n._center),n._ellipsoid=Z.clone(o,n._ellipsoid),n._vertexFormat=Ce.clone(r,n._vertexFormat),n._semiMajorAxis=s,n._semiMinorAxis=a,n._rotation=l,n._stRotation=u,n._height=f,n._granularity=h,n._extrudedHeight=m,n._shadowVolume=p,n._offsetAttribute=_===-1?void 0:_,n):(zh.height=f,zh.extrudedHeight=m,zh.granularity=h,zh.stRotation=u,zh.rotation=l,zh.semiMajorAxis=s,zh.semiMinorAxis=a,zh.shadowVolume=p,zh.offsetAttribute=_===-1?void 0:_,new Vh(zh))};Vh.computeRectangle=function(e,t){e=g(e,g.EMPTY_OBJECT);let n=e.center,i=g(e.ellipsoid,Z.default),o=e.semiMajorAxis,r=e.semiMinorAxis,s=g(e.granularity,O.RADIANS_PER_DEGREE),a=g(e.rotation,0);if(C.defined("options.center",n),C.typeOf.number("options.semiMajorAxis",o),C.typeOf.number("options.semiMinorAxis",r),o<r)throw new w("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(s<=0)throw new w("granularity must be greater than zero.");return hle(n,o,r,a,s,i,t)};Vh.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!O.equalsEpsilon(t,n,0,O.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation},r;if(i)o.extrudedHeight=n,o.shadowVolume=e._shadowVolume,o.offsetAttribute=e._offsetAttribute,r=FXe(o);else if(r=MXe(o),c(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===Zt.NONE?0:1,l=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:l})}return new st({attributes:r.attributes,indices:r.indices,primitiveType:Se.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};Vh.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Vh({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:o,rotation:e._rotation,stRotation:e._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Ce.POSITION_ONLY,shadowVolume:!0})};function BXe(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let i=Zl.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,o=i.length/3,r=new Array(o);for(let l=0;l<o;++l)r[l]=d.fromArray(i,l*3);let s=e._ellipsoid,a=e.rectangle;return st._textureCoordinateRotationPoints(r,t,s,a)}Object.defineProperties(Vh.prototype,{rectangle:{get:function(){return c(this._rectangle)||(this._rectangle=hle(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return c(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=BXe(this)),this._textureCoordinateRotationPoints}}});var cl=Vh;var gle=new d,h0=new d;function kXe(e){let t=e.center;h0=d.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,h0),e.height,h0),h0=d.add(t,h0,h0);let n=new ne(h0,e.semiMajorAxis),i=Zl.computeEllipsePositions(e,!1,!0).outerPositions,o=new fn({position:new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:Zl.raisePositionsToHeight(i,e,!1)})}),r=i.length/3,s=Oe.createTypedArray(r,r*2),a=0;for(let l=0;l<r;++l)s[a++]=l,s[a++]=(l+1)%r;return{boundingSphere:n,attributes:o,indices:s}}var ZB=new ne,JB=new ne;function UXe(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=d.multiplyByScalar(n.geodeticSurfaceNormal(t,gle),e.height,gle);ZB.center=d.add(t,o,ZB.center),ZB.radius=i,o=d.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),JB.center=d.add(t,o,JB.center),JB.radius=i;let r=Zl.computeEllipsePositions(e,!1,!0).outerPositions,s=new fn({position:new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:Zl.raisePositionsToHeight(r,e,!0)})});r=s.position.values;let a=ne.union(ZB,JB),l=r.length/3;if(c(e.offsetAttribute)){let _=new Uint8Array(l);if(e.offsetAttribute===Zt.TOP)_=_.fill(1,0,l/2);else{let b=e.offsetAttribute===Zt.NONE?0:1;_=_.fill(b)}s.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}let u=g(e.numberOfVerticalLines,16);u=O.clamp(u,0,l/2);let f=Oe.createTypedArray(l,l*2+u*2);l/=2;let h=0,m;for(m=0;m<l;++m)f[h++]=m,f[h++]=(m+1)%l,f[h++]=m+l,f[h++]=(m+1)%l+l;let p;if(u>0){let _=Math.min(u,l);p=Math.round(l/_);let b=Math.min(p*u,l);for(m=0;m<b;m+=p)f[h++]=m,f[h++]=m+l}return{boundingSphere:a,attributes:s,indices:f}}function aE(e){e=g(e,g.EMPTY_OBJECT);let t=e.center,n=g(e.ellipsoid,Z.default),i=e.semiMajorAxis,o=e.semiMinorAxis,r=g(e.granularity,O.RADIANS_PER_DEGREE);if(!c(t))throw new w("center is required.");if(!c(i))throw new w("semiMajorAxis is required.");if(!c(o))throw new w("semiMinorAxis is required.");if(i<o)throw new w("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(r<=0)throw new w("granularity must be greater than zero.");let s=g(e.height,0),a=g(e.extrudedHeight,s);this._center=d.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=Z.clone(n),this._rotation=g(e.rotation,0),this._height=Math.max(a,s),this._granularity=r,this._extrudedHeight=Math.min(a,s),this._numberOfVerticalLines=Math.max(g(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}aE.packedLength=d.packedLength+Z.packedLength+8;aE.pack=function(e,t,n){if(!c(e))throw new w("value is required");if(!c(t))throw new w("array is required");return n=g(n,0),d.pack(e._center,t,n),n+=d.packedLength,Z.pack(e._ellipsoid,t,n),n+=Z.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._numberOfVerticalLines,t[n]=g(e._offsetAttribute,-1),t};var yle=new d,ble=new Z,Rp={center:yle,ellipsoid:ble,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};aE.unpack=function(e,t,n){if(!c(e))throw new w("array is required");t=g(t,0);let i=d.unpack(e,t,yle);t+=d.packedLength;let o=Z.unpack(e,t,ble);t+=Z.packedLength;let r=e[t++],s=e[t++],a=e[t++],l=e[t++],u=e[t++],f=e[t++],h=e[t++],m=e[t];return c(n)?(n._center=d.clone(i,n._center),n._ellipsoid=Z.clone(o,n._ellipsoid),n._semiMajorAxis=r,n._semiMinorAxis=s,n._rotation=a,n._height=l,n._granularity=u,n._extrudedHeight=f,n._numberOfVerticalLines=h,n._offsetAttribute=m===-1?void 0:m,n):(Rp.height=l,Rp.extrudedHeight=f,Rp.granularity=u,Rp.rotation=a,Rp.semiMajorAxis=r,Rp.semiMinorAxis=s,Rp.numberOfVerticalLines=h,Rp.offsetAttribute=m===-1?void 0:m,new aE(Rp))};aE.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!O.equalsEpsilon(t,n,0,O.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines},r;if(i)o.extrudedHeight=n,o.offsetAttribute=e._offsetAttribute,r=UXe(o);else if(r=kXe(o),c(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===Zt.NONE?0:1,l=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:l})}return new st({attributes:r.attributes,indices:r.indices,primitiveType:Se.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};var pf=aE;var xle=new z,Tle=d.ZERO,Cle=new d,Ele=new te;function zXe(e){this.id=e,this.vertexFormat=void 0,this.center=void 0,this.semiMajorAxis=void 0,this.semiMinorAxis=void 0,this.rotation=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function hd(e,t){Un.call(this,{entity:e,scene:t,geometryOptions:new zXe(e),geometryPropertyName:"ellipse",observedPropertyNames:["availability","position","ellipse"]}),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}c(Object.create)&&(hd.prototype=Object.create(Un.prototype),hd.prototype.constructor=hd);hd.prototype.createFillGeometryInstance=function(e){if(C.defined("time",e),!this._fillEnabled)throw new w("This instance does not represent a filled geometry.");let t=this._entity,n=t.isAvailable(e),i={show:new gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:Mn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Ut){let o;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,xle)),c(o)||(o=z.WHITE),i.color=Ht.fromColor(o)}return c(this._options.offsetAttribute)&&(i.offset=qi.fromCartesian3(G.getValueOrDefault(this._terrainOffsetProperty,e,Tle,Cle))),new wt({id:t,geometry:new cl(this._options),attributes:i})};hd.prototype.createOutlineGeometryInstance=function(e){if(C.defined("time",e),!this._outlineEnabled)throw new w("This instance does not represent an outlined geometry.");let t=this._entity,n=t.isAvailable(e),i=G.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,xle),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(i),distanceDisplayCondition:Mn.fromDistanceDisplayCondition(o),offset:void 0};return c(this._options.offsetAttribute)&&(r.offset=qi.fromCartesian3(G.getValueOrDefault(this._terrainOffsetProperty,e,Tle,Cle))),new wt({id:t,geometry:new pf(this._options),attributes:r})};hd.prototype._computeCenter=function(e,t){return G.getValueOrUndefined(this._entity.position,e,t)};hd.prototype._isHidden=function(e,t){let n=e.position;return!c(n)||!c(t.semiMajorAxis)||!c(t.semiMinorAxis)||Qn.prototype._isHidden.call(this,e,t)};hd.prototype._isDynamic=function(e,t){return!e.position.isConstant||!t.semiMajorAxis.isConstant||!t.semiMinorAxis.isConstant||!G.isConstant(t.rotation)||!G.isConstant(t.height)||!G.isConstant(t.extrudedHeight)||!G.isConstant(t.granularity)||!G.isConstant(t.stRotation)||!G.isConstant(t.outlineWidth)||!G.isConstant(t.numberOfVerticalLines)||!G.isConstant(t.zIndex)||this._onTerrain&&!G.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Ut)};hd.prototype._setStaticOptions=function(e,t){let n=G.getValueOrUndefined(t.height,Ue.MINIMUM_VALUE),i=G.getValueOrDefault(t.heightReference,Ue.MINIMUM_VALUE,qe.NONE),o=G.getValueOrUndefined(t.extrudedHeight,Ue.MINIMUM_VALUE),r=G.getValueOrDefault(t.extrudedHeightReference,Ue.MINIMUM_VALUE,qe.NONE);c(o)&&!c(n)&&(n=0);let s=this._options;s.vertexFormat=this._materialProperty instanceof Ut?nn.VERTEX_FORMAT:eo.MaterialSupport.TEXTURED.vertexFormat,s.center=e.position.getValue(Ue.MINIMUM_VALUE,s.center),s.semiMajorAxis=t.semiMajorAxis.getValue(Ue.MINIMUM_VALUE,s.semiMajorAxis),s.semiMinorAxis=t.semiMinorAxis.getValue(Ue.MINIMUM_VALUE,s.semiMinorAxis),s.rotation=G.getValueOrUndefined(t.rotation,Ue.MINIMUM_VALUE),s.granularity=G.getValueOrUndefined(t.granularity,Ue.MINIMUM_VALUE),s.stRotation=G.getValueOrUndefined(t.stRotation,Ue.MINIMUM_VALUE),s.numberOfVerticalLines=G.getValueOrUndefined(t.numberOfVerticalLines,Ue.MINIMUM_VALUE),s.offsetAttribute=Un.computeGeometryOffsetAttribute(n,i,o,r),s.height=Un.getGeometryHeight(n,i),o=Un.getGeometryExtrudedHeight(o,r),o===Un.CLAMP_TO_GROUND&&(o=ai.getMinimumMaximumHeights(cl.computeRectangle(s,Ele)).minimumTerrainHeight),s.extrudedHeight=o};hd.DynamicGeometryUpdater=cE;function cE(e,t,n){Jn.call(this,e,t,n)}c(Object.create)&&(cE.prototype=Object.create(Jn.prototype),cE.prototype.constructor=cE);cE.prototype._isHidden=function(e,t,n){let i=this._options;return!c(i.center)||!c(i.semiMajorAxis)||!c(i.semiMinorAxis)||Jn.prototype._isHidden.call(this,e,t,n)};cE.prototype._setOptions=function(e,t,n){let i=this._options,o=G.getValueOrUndefined(t.height,n),r=G.getValueOrDefault(t.heightReference,n,qe.NONE),s=G.getValueOrUndefined(t.extrudedHeight,n),a=G.getValueOrDefault(t.extrudedHeightReference,n,qe.NONE);c(s)&&!c(o)&&(o=0),i.center=G.getValueOrUndefined(e.position,n,i.center),i.semiMajorAxis=G.getValueOrUndefined(t.semiMajorAxis,n),i.semiMinorAxis=G.getValueOrUndefined(t.semiMinorAxis,n),i.rotation=G.getValueOrUndefined(t.rotation,n),i.granularity=G.getValueOrUndefined(t.granularity,n),i.stRotation=G.getValueOrUndefined(t.stRotation,n),i.numberOfVerticalLines=G.getValueOrUndefined(t.numberOfVerticalLines,n),i.offsetAttribute=Un.computeGeometryOffsetAttribute(o,r,s,a),i.height=Un.getGeometryHeight(o,r),s=Un.getGeometryExtrudedHeight(s,a),s===Un.CLAMP_TO_GROUND&&(s=ai.getMinimumMaximumHeights(cl.computeRectangle(i,Ele)).minimumTerrainHeight),i.extrudedHeight=s};var QB=hd;var VXe=new d,HXe=new d,GXe=new d,jXe=new d,WXe=new d,qXe=new d(1,1,1),wle=Math.cos,Sle=Math.sin;function Mp(e){e=g(e,g.EMPTY_OBJECT);let t=g(e.radii,qXe),n=g(e.innerRadii,t),i=g(e.minimumClock,0),o=g(e.maximumClock,O.TWO_PI),r=g(e.minimumCone,0),s=g(e.maximumCone,O.PI),a=Math.round(g(e.stackPartitions,64)),l=Math.round(g(e.slicePartitions,64)),u=g(e.vertexFormat,Ce.DEFAULT);if(l<3)throw new w("options.slicePartitions cannot be less than three.");if(a<3)throw new w("options.stackPartitions cannot be less than three.");this._radii=d.clone(t),this._innerRadii=d.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=l,this._vertexFormat=Ce.clone(u),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}Mp.packedLength=2*d.packedLength+Ce.packedLength+7;Mp.pack=function(e,t,n){if(!c(e))throw new w("value is required");if(!c(t))throw new w("array is required");return n=g(n,0),d.pack(e._radii,t,n),n+=d.packedLength,d.pack(e._innerRadii,t,n),n+=d.packedLength,Ce.pack(e._vertexFormat,t,n),n+=Ce.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n]=g(e._offsetAttribute,-1),t};var Ale=new d,vle=new d,Dle=new Ce,Vg={radii:Ale,innerRadii:vle,vertexFormat:Dle,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};Mp.unpack=function(e,t,n){if(!c(e))throw new w("array is required");t=g(t,0);let i=d.unpack(e,t,Ale);t+=d.packedLength;let o=d.unpack(e,t,vle);t+=d.packedLength;let r=Ce.unpack(e,t,Dle);t+=Ce.packedLength;let s=e[t++],a=e[t++],l=e[t++],u=e[t++],f=e[t++],h=e[t++],m=e[t];return c(n)?(n._radii=d.clone(i,n._radii),n._innerRadii=d.clone(o,n._innerRadii),n._vertexFormat=Ce.clone(r,n._vertexFormat),n._minimumClock=s,n._maximumClock=a,n._minimumCone=l,n._maximumCone=u,n._stackPartitions=f,n._slicePartitions=h,n._offsetAttribute=m===-1?void 0:m,n):(Vg.minimumClock=s,Vg.maximumClock=a,Vg.minimumCone=l,Vg.maximumCone=u,Vg.stackPartitions=f,Vg.slicePartitions=h,Vg.offsetAttribute=m===-1?void 0:m,new Mp(Vg))};Mp.createGeometry=function(e){let t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;let n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._vertexFormat,l=e._slicePartitions+1,u=e._stackPartitions+1;l=Math.round(l*Math.abs(o-i)/O.TWO_PI),u=Math.round(u*Math.abs(s-r)/O.PI),l<2&&(l=2),u<2&&(u=2);let f,h,m=0,p=[r],_=[i];for(f=0;f<u;f++)p.push(r+f*(s-r)/(u-1));for(p.push(s),h=0;h<l;h++)_.push(i+h*(o-i)/(l-1));_.push(o);let b=p.length,x=_.length,T=0,E=1,S=n.x!==t.x||n.y!==t.y||n.z!==t.z,A=!1,v=!1,D=!1;S&&(E=2,r>0&&(A=!0,T+=l-1),s<Math.PI&&(v=!0,T+=l-1),(o-i)%O.TWO_PI?(D=!0,T+=(u-1)*2+1):T+=1);let R=x*b*E,P=new Float64Array(R*3),L=new Array(R).fill(!1),F=new Array(R).fill(!1),y=l*u*E,I=6*(y+T+1-(l+u)*E),M=Oe.createTypedArray(y,I),B=a.normal?new Float32Array(R*3):void 0,U=a.tangent?new Float32Array(R*3):void 0,V=a.bitangent?new Float32Array(R*3):void 0,W=a.st?new Float32Array(R*2):void 0,H=new Array(b),X=new Array(b);for(f=0;f<b;f++)H[f]=Sle(p[f]),X[f]=wle(p[f]);let $=new Array(x),ae=new Array(x);for(h=0;h<x;h++)ae[h]=wle(_[h]),$[h]=Sle(_[h]);for(f=0;f<b;f++)for(h=0;h<x;h++)P[m++]=t.x*H[f]*ae[h],P[m++]=t.y*H[f]*$[h],P[m++]=t.z*X[f];let se=R/2;if(S)for(f=0;f<b;f++)for(h=0;h<x;h++)P[m++]=n.x*H[f]*ae[h],P[m++]=n.y*H[f]*$[h],P[m++]=n.z*X[f],L[se]=!0,f>0&&f!==b-1&&h!==0&&h!==x-1&&(F[se]=!0),se++;m=0;let he,ge;for(f=1;f<b-2;f++)for(he=f*x,ge=(f+1)*x,h=1;h<x-2;h++)M[m++]=ge+h,M[m++]=ge+h+1,M[m++]=he+h+1,M[m++]=ge+h,M[m++]=he+h+1,M[m++]=he+h;if(S){let dt=b*x;for(f=1;f<b-2;f++)for(he=dt+f*x,ge=dt+(f+1)*x,h=1;h<x-2;h++)M[m++]=ge+h,M[m++]=he+h,M[m++]=he+h+1,M[m++]=ge+h,M[m++]=he+h+1,M[m++]=ge+h+1}let le,me;if(S){if(A)for(me=b*x,f=1;f<x-2;f++)M[m++]=f,M[m++]=f+1,M[m++]=me+f+1,M[m++]=f,M[m++]=me+f+1,M[m++]=me+f;if(v)for(le=b*x-x,me=b*x*E-x,f=1;f<x-2;f++)M[m++]=le+f+1,M[m++]=le+f,M[m++]=me+f,M[m++]=le+f+1,M[m++]=me+f,M[m++]=me+f+1}if(D){for(f=1;f<b-2;f++)me=x*b+x*f,le=x*f,M[m++]=me,M[m++]=le+x,M[m++]=le,M[m++]=me,M[m++]=me+x,M[m++]=le+x;for(f=1;f<b-2;f++)me=x*b+x*(f+1)-1,le=x*(f+1)-1,M[m++]=le+x,M[m++]=me,M[m++]=le,M[m++]=le+x,M[m++]=me+x,M[m++]=me}let Me=new fn;a.position&&(Me.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:P}));let Ge=0,De=0,ke=0,He=0,ft=R/2,Ie,Kt=Z.fromCartesian3(t),Pt=Z.fromCartesian3(n);if(a.st||a.normal||a.tangent||a.bitangent){for(f=0;f<R;f++){Ie=L[f]?Pt:Kt;let dt=d.fromArray(P,f*3,VXe),rn=Ie.geodeticSurfaceNormal(dt,HXe);if(F[f]&&d.negate(rn,rn),a.st){let Vt=k.negate(rn,WXe);W[Ge++]=Math.atan2(Vt.y,Vt.x)/O.TWO_PI+.5,W[Ge++]=Math.asin(rn.z)/Math.PI+.5}if(a.normal&&(B[De++]=rn.x,B[De++]=rn.y,B[De++]=rn.z),a.tangent||a.bitangent){let Vt=GXe,Ae=0,Qe;if(L[f]&&(Ae=ft),!A&&f>=Ae&&f<Ae+x*2?Qe=d.UNIT_X:Qe=d.UNIT_Z,d.cross(Qe,rn,Vt),d.normalize(Vt,Vt),a.tangent&&(U[ke++]=Vt.x,U[ke++]=Vt.y,U[ke++]=Vt.z),a.bitangent){let et=d.cross(rn,Vt,jXe);d.normalize(et,et),V[He++]=et.x,V[He++]=et.y,V[He++]=et.z}}}a.st&&(Me.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:W})),a.normal&&(Me.normal=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:B})),a.tangent&&(Me.tangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:U})),a.bitangent&&(Me.bitangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:V}))}if(c(e._offsetAttribute)){let dt=P.length,rn=e._offsetAttribute===Zt.NONE?0:1,Vt=new Uint8Array(dt/3).fill(rn);Me.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:Vt})}return new st({attributes:Me,indices:M,primitiveType:Se.TRIANGLES,boundingSphere:ne.fromEllipsoid(Kt),offsetAttribute:e._offsetAttribute})};var CW;Mp.getUnitEllipsoid=function(){return c(CW)||(CW=Mp.createGeometry(new Mp({radii:new d(1,1,1),vertexFormat:Ce.POSITION_ONLY}))),CW};var Ks=Mp;var YXe=new Ut(z.WHITE),EW=d.ZERO,wW=new d,XXe=new d,KXe=new d,SW=new z,$Xe=new d(1,1,1);function ZXe(e){this.id=e,this.vertexFormat=void 0,this.radii=void 0,this.innerRadii=void 0,this.minimumClock=void 0,this.maximumClock=void 0,this.minimumCone=void 0,this.maximumCone=void 0,this.stackPartitions=void 0,this.slicePartitions=void 0,this.subdivisions=void 0,this.offsetAttribute=void 0}function Jl(e,t){Qn.call(this,{entity:e,scene:t,geometryOptions:new ZXe(e),geometryPropertyName:"ellipsoid",observedPropertyNames:["availability","position","orientation","ellipsoid"]}),this._onEntityPropertyChanged(e,"ellipsoid",e.ellipsoid,void 0)}c(Object.create)&&(Jl.prototype=Object.create(Qn.prototype),Jl.prototype.constructor=Jl);Object.defineProperties(Jl.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});Jl.prototype.createFillGeometryInstance=function(e,t,n){C.defined("time",e);let i=this._entity,o=i.isAvailable(e),r,s=new gn(o&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),l=Mn.fromDistanceDisplayCondition(a),u={show:s,distanceDisplayCondition:l,color:void 0,offset:void 0};if(this._materialProperty instanceof Ut){let f;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||o)&&(f=this._materialProperty.color.getValue(e,SW)),c(f)||(f=z.WHITE),r=Ht.fromColor(f),u.color=r}return c(this._options.offsetAttribute)&&(u.offset=qi.fromCartesian3(G.getValueOrDefault(this._terrainOffsetProperty,e,EW,wW))),new wt({id:i,geometry:new Ks(this._options),modelMatrix:t?void 0:i.computeModelMatrixForHeightReference(e,i.ellipsoid.heightReference,this._options.radii.z*.5,this._scene.ellipsoid,n),attributes:u})};Jl.prototype.createOutlineGeometryInstance=function(e,t,n){C.defined("time",e);let i=this._entity,o=i.isAvailable(e),r=G.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,SW),s=this._distanceDisplayConditionProperty.getValue(e),a={show:new gn(o&&i.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(r),distanceDisplayCondition:Mn.fromDistanceDisplayCondition(s),offset:void 0};return c(this._options.offsetAttribute)&&(a.offset=qi.fromCartesian3(G.getValueOrDefault(this._terrainOffsetProperty,e,EW,wW))),new wt({id:i,geometry:new sf(this._options),modelMatrix:t?void 0:i.computeModelMatrixForHeightReference(e,i.ellipsoid.heightReference,this._options.radii.z*.5,this._scene.ellipsoid,n),attributes:a})};Jl.prototype._computeCenter=function(e,t){return G.getValueOrUndefined(this._entity.position,e,t)};Jl.prototype._isHidden=function(e,t){return!c(e.position)||!c(t.radii)||Qn.prototype._isHidden.call(this,e,t)};Jl.prototype._isDynamic=function(e,t){return!e.position.isConstant||!G.isConstant(e.orientation)||!t.radii.isConstant||!G.isConstant(t.innerRadii)||!G.isConstant(t.stackPartitions)||!G.isConstant(t.slicePartitions)||!G.isConstant(t.outlineWidth)||!G.isConstant(t.minimumClock)||!G.isConstant(t.maximumClock)||!G.isConstant(t.minimumCone)||!G.isConstant(t.maximumCone)||!G.isConstant(t.subdivisions)};Jl.prototype._setStaticOptions=function(e,t){let n=G.getValueOrDefault(t.heightReference,Ue.MINIMUM_VALUE,qe.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Ut?nn.VERTEX_FORMAT:eo.MaterialSupport.TEXTURED.vertexFormat,i.radii=t.radii.getValue(Ue.MINIMUM_VALUE,i.radii),i.innerRadii=G.getValueOrUndefined(t.innerRadii,i.radii),i.minimumClock=G.getValueOrUndefined(t.minimumClock,Ue.MINIMUM_VALUE),i.maximumClock=G.getValueOrUndefined(t.maximumClock,Ue.MINIMUM_VALUE),i.minimumCone=G.getValueOrUndefined(t.minimumCone,Ue.MINIMUM_VALUE),i.maximumCone=G.getValueOrUndefined(t.maximumCone,Ue.MINIMUM_VALUE),i.stackPartitions=G.getValueOrUndefined(t.stackPartitions,Ue.MINIMUM_VALUE),i.slicePartitions=G.getValueOrUndefined(t.slicePartitions,Ue.MINIMUM_VALUE),i.subdivisions=G.getValueOrUndefined(t.subdivisions,Ue.MINIMUM_VALUE),i.offsetAttribute=n!==qe.NONE?Zt.ALL:void 0};Jl.prototype._onEntityPropertyChanged=D_;Jl.DynamicGeometryUpdater=Wv;function Wv(e,t,n){Jn.call(this,e,t,n),this._scene=e._scene,this._modelMatrix=new N,this._attributes=void 0,this._outlineAttributes=void 0,this._lastSceneMode=void 0,this._lastShow=void 0,this._lastOutlineShow=void 0,this._lastOutlineWidth=void 0,this._lastOutlineColor=void 0,this._lastOffset=new d,this._material={}}c(Object.create)&&(Wv.prototype=Object.create(Jn.prototype),Wv.prototype.constructor=Wv);Wv.prototype.update=function(e){C.defined("time",e);let t=this._entity,n=t.ellipsoid;if(!t.isShowing||!t.isAvailable(e)||!G.getValueOrDefault(n.show,e,!0)){c(this._primitive)&&(this._primitive.show=!1),c(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1);return}let i=G.getValueOrUndefined(n.radii,e,XXe),o=c(i)?t.computeModelMatrixForHeightReference(e,n.heightReference,i.z*.5,this._scene.ellipsoid,this._modelMatrix):void 0;if(!c(o)||!c(i)){c(this._primitive)&&(this._primitive.show=!1),c(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1);return}let r=G.getValueOrDefault(n.fill,e,!0),s=G.getValueOrDefault(n.outline,e,!1),a=G.getValueOrClonedDefault(n.outlineColor,e,z.BLACK,SW),l=$o.getValue(e,g(n.material,YXe),this._material),u=G.getValueOrUndefined(n.innerRadii,e,KXe),f=G.getValueOrUndefined(n.minimumClock,e),h=G.getValueOrUndefined(n.maximumClock,e),m=G.getValueOrUndefined(n.minimumCone,e),p=G.getValueOrUndefined(n.maximumCone,e),_=G.getValueOrUndefined(n.stackPartitions,e),b=G.getValueOrUndefined(n.slicePartitions,e),x=G.getValueOrUndefined(n.subdivisions,e),T=G.getValueOrDefault(n.outlineWidth,e,1),E=G.getValueOrDefault(n.heightReference,e,qe.NONE),S=E!==qe.NONE?Zt.ALL:void 0,A=this._scene.mode,v=A===J.SCENE3D&&E===qe.NONE,D=this._options,R=this._geometryUpdater.shadowsProperty.getValue(e),L=this._geometryUpdater.distanceDisplayConditionProperty.getValue(e),F=G.getValueOrDefault(this._geometryUpdater.terrainOffsetProperty,e,EW,wW);if(!v||this._lastSceneMode!==A||!c(this._primitive)||D.stackPartitions!==_||D.slicePartitions!==b||c(u)&&!d.equals(D.innerRadii!==u)||D.minimumClock!==f||D.maximumClock!==h||D.minimumCone!==m||D.maximumCone!==p||D.subdivisions!==x||this._lastOutlineWidth!==T||D.offsetAttribute!==S){let I=this._primitives;I.removeAndDestroy(this._primitive),I.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0,this._lastSceneMode=A,this._lastOutlineWidth=T,D.stackPartitions=_,D.slicePartitions=b,D.subdivisions=x,D.offsetAttribute=S,D.radii=d.clone(v?$Xe:i,D.radii),c(u)?v?D.innerRadii=d.fromElements(u.x/i.x,u.y/i.y,u.z/i.z,D.innerRadii):D.innerRadii=d.clone(u,D.innerRadii):D.innerRadii=void 0,D.minimumClock=f,D.maximumClock=h,D.minimumCone=m,D.maximumCone=p;let M=new eo({material:l,translucent:l.isTranslucent(),closed:!0});D.vertexFormat=M.vertexFormat;let B=this._geometryUpdater.createFillGeometryInstance(e,v,this._modelMatrix);this._primitive=I.add(new An({geometryInstances:B,appearance:M,asynchronous:!1,shadows:R}));let U=this._geometryUpdater.createOutlineGeometryInstance(e,v,this._modelMatrix);this._outlinePrimitive=I.add(new An({geometryInstances:U,appearance:new nn({flat:!0,translucent:U.attributes.color.value[3]!==255,renderState:{lineWidth:this._geometryUpdater._scene.clampLineWidth(T)}}),asynchronous:!1,shadows:R})),this._lastShow=r,this._lastOutlineShow=s,this._lastOutlineColor=z.clone(a,this._lastOutlineColor),this._lastDistanceDisplayCondition=L,this._lastOffset=d.clone(F,this._lastOffset)}else if(this._primitive.ready){let I=this._primitive,M=this._outlinePrimitive;I.show=!0,M.show=!0,I.appearance.material=l;let B=this._attributes;c(B)||(B=I.getGeometryInstanceAttributes(t),this._attributes=B),r!==this._lastShow&&(B.show=gn.toValue(r,B.show),this._lastShow=r);let U=this._outlineAttributes;c(U)||(U=M.getGeometryInstanceAttributes(t),this._outlineAttributes=U),s!==this._lastOutlineShow&&(U.show=gn.toValue(s,U.show),this._lastOutlineShow=s),z.equals(a,this._lastOutlineColor)||(U.color=Ht.toValue(a,U.color),z.clone(a,this._lastOutlineColor)),Nt.equals(L,this._lastDistanceDisplayCondition)||(B.distanceDisplayCondition=Mn.toValue(L,B.distanceDisplayCondition),U.distanceDisplayCondition=Mn.toValue(L,U.distanceDisplayCondition),Nt.clone(L,this._lastDistanceDisplayCondition)),d.equals(F,this._lastOffset)||(B.offset=qi.toValue(F,B.offset),U.offset=qi.toValue(F,B.offset),d.clone(F,this._lastOffset))}v&&(i.x=Math.max(i.x,.001),i.y=Math.max(i.y,.001),i.z=Math.max(i.z,.001),o=N.multiplyByScale(o,i,o),this._primitive.modelMatrix=o,this._outlinePrimitive.modelMatrix=o)};var e3=Jl;function lE(e){e=g(e,g.EMPTY_OBJECT);let t=g(e.vertexFormat,Ce.DEFAULT);this._vertexFormat=t,this._workerName="createPlaneGeometry"}lE.packedLength=Ce.packedLength;lE.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),Ce.pack(e._vertexFormat,t,n),t};var Ile=new Ce,JXe={vertexFormat:Ile};lE.unpack=function(e,t,n){C.defined("array",e),t=g(t,0);let i=Ce.unpack(e,t,Ile);return c(n)?(n._vertexFormat=Ce.clone(i,n._vertexFormat),n):new lE(JXe)};var t3=new d(-.5,-.5,0),n3=new d(.5,.5,0);lE.createGeometry=function(e){let t=e._vertexFormat,n=new fn,i,o;if(t.position){if(o=new Float64Array(4*3),o[0]=t3.x,o[1]=t3.y,o[2]=0,o[3]=n3.x,o[4]=t3.y,o[5]=0,o[6]=n3.x,o[7]=n3.y,o[8]=0,o[9]=t3.x,o[10]=n3.y,o[11]=0,n.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:o}),t.normal){let r=new Float32Array(12);r[0]=0,r[1]=0,r[2]=1,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=1,r[9]=0,r[10]=0,r[11]=1,n.normal=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:r})}if(t.st){let r=new Float32Array(8);r[0]=0,r[1]=0,r[2]=1,r[3]=0,r[4]=1,r[5]=1,r[6]=0,r[7]=1,n.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:r})}if(t.tangent){let r=new Float32Array(12);r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r[6]=1,r[7]=0,r[8]=0,r[9]=1,r[10]=0,r[11]=0,n.tangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:r})}if(t.bitangent){let r=new Float32Array(12);r[0]=0,r[1]=1,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=0,r[7]=1,r[8]=0,r[9]=0,r[10]=1,r[11]=0,n.bitangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:r})}i=new Uint16Array(2*3),i[0]=0,i[1]=1,i[2]=2,i[3]=0,i[4]=2,i[5]=3}return new st({attributes:n,indices:i,primitiveType:Se.TRIANGLES,boundingSphere:new ne(d.ZERO,Math.sqrt(2))})};var i3=lE;function uE(){this._workerName="createPlaneOutlineGeometry"}uE.packedLength=0;uE.pack=function(e,t){return C.defined("value",e),C.defined("array",t),t};uE.unpack=function(e,t,n){return C.defined("array",e),c(n)?n:new uE};var Hg=new d(-.5,-.5,0),o3=new d(.5,.5,0);uE.createGeometry=function(){let e=new fn,t=new Uint16Array(4*2),n=new Float64Array(4*3);return n[0]=Hg.x,n[1]=Hg.y,n[2]=Hg.z,n[3]=o3.x,n[4]=Hg.y,n[5]=Hg.z,n[6]=o3.x,n[7]=o3.y,n[8]=Hg.z,n[9]=Hg.x,n[10]=o3.y,n[11]=Hg.z,e.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:n}),t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,new st({attributes:e,indices:t,primitiveType:Se.LINES,boundingSphere:new ne(d.ZERO,Math.sqrt(2))})};var r3=uE;var QXe=new d,Ole=new z;function eKe(e){this.id=e,this.vertexFormat=void 0,this.plane=void 0,this.dimensions=void 0}function _f(e,t){Qn.call(this,{entity:e,scene:t,geometryOptions:new eKe(e),geometryPropertyName:"plane",observedPropertyNames:["availability","position","orientation","plane"]}),this._onEntityPropertyChanged(e,"plane",e.plane,void 0)}c(Object.create)&&(_f.prototype=Object.create(Qn.prototype),_f.prototype.constructor=_f);_f.prototype.createFillGeometryInstance=function(e){if(C.defined("time",e),!this._fillEnabled)throw new w("This instance does not represent a filled geometry.");let t=this._entity,n=t.isAvailable(e),i,o,r=new gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=Mn.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Ut){let p;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(p=this._materialProperty.color.getValue(e,Ole)),c(p)||(p=z.WHITE),o=Ht.fromColor(p),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};let l=t.plane,u=this._options,f=t.computeModelMatrix(e),h=G.getValueOrDefault(l.plane,e,u.plane),m=G.getValueOrUndefined(l.dimensions,e,u.dimensions);return u.plane=h,u.dimensions=m,f=AW(h,m,f,f),new wt({id:t,geometry:new i3(this._options),modelMatrix:f,attributes:i})};_f.prototype.createOutlineGeometryInstance=function(e){if(C.defined("time",e),!this._outlineEnabled)throw new w("This instance does not represent an outlined geometry.");let t=this._entity,n=t.isAvailable(e),i=G.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,Ole),o=this._distanceDisplayConditionProperty.getValue(e),r=t.plane,s=this._options,a=t.computeModelMatrix(e),l=G.getValueOrDefault(r.plane,e,s.plane),u=G.getValueOrUndefined(r.dimensions,e,s.dimensions);return s.plane=l,s.dimensions=u,a=AW(l,u,a,a),new wt({id:t,geometry:new r3,modelMatrix:a,attributes:{show:new gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(i),distanceDisplayCondition:Mn.fromDistanceDisplayCondition(o)}})};_f.prototype._isHidden=function(e,t){return!c(t.plane)||!c(t.dimensions)||!c(e.position)||Qn.prototype._isHidden.call(this,e,t)};_f.prototype._getIsClosed=function(e){return!1};_f.prototype._isDynamic=function(e,t){return!e.position.isConstant||!G.isConstant(e.orientation)||!t.plane.isConstant||!t.dimensions.isConstant||!G.isConstant(t.outlineWidth)};_f.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Ut,i=this._options;i.vertexFormat=n?nn.VERTEX_FORMAT:eo.MaterialSupport.TEXTURED.vertexFormat,i.plane=t.plane.getValue(Ue.MINIMUM_VALUE,i.plane),i.dimensions=t.dimensions.getValue(Ue.MINIMUM_VALUE,i.dimensions)};_f.DynamicGeometryUpdater=fE;function fE(e,t,n){Jn.call(this,e,t,n)}c(Object.create)&&(fE.prototype=Object.create(Jn.prototype),fE.prototype.constructor=fE);fE.prototype._isHidden=function(e,t,n){let i=this._options,o=G.getValueOrUndefined(e.position,n,QXe);return!c(o)||!c(i.plane)||!c(i.dimensions)||Jn.prototype._isHidden.call(this,e,t,n)};fE.prototype._setOptions=function(e,t,n){let i=this._options;i.plane=G.getValueOrDefault(t.plane,n,i.plane),i.dimensions=G.getValueOrUndefined(t.dimensions,n,i.dimensions)};var tKe=new d,nKe=new d,iKe=new d,oKe=new d,rKe=new q,sKe=new q,aKe=new N;function AW(e,t,n,i){let o=e.normal,r=e.distance,s=d.multiplyByScalar(o,-r,iKe),a=d.clone(d.UNIT_Z,nKe);O.equalsEpsilon(Math.abs(d.dot(a,o)),1,O.EPSILON8)&&(a=d.clone(d.UNIT_Y,a));let l=d.cross(a,o,tKe);a=d.cross(o,l,a),d.normalize(l,l),d.normalize(a,a);let u=rKe;q.setColumn(u,0,l,u),q.setColumn(u,1,a,u),q.setColumn(u,2,o,u);let f=d.fromElements(t.x,t.y,1,oKe),h=q.multiplyByScale(u,f,sKe),m=N.fromRotationTranslation(h,s,aKe);return N.multiplyTransformation(n,m,i)}_f.createPrimitiveMatrix=AW;var s3=_f;var cKe=new d,lKe=new je,uKe=new k,fKe=new k,dKe=new d,hKe=new d,mKe=new d,qv=new d,pKe=new d,_Ke=new d,Ple=new ve,gKe=new q,yKe=new q,bKe=new d;function xKe(e,t,n,i,o,r,s,a,l){let u=e.positions,f=ti.triangulate(e.positions2D,e.holes);f.length<3&&(f=[0,1,2]);let h=Oe.createTypedArray(u.length,f.length);h.set(f);let m=gKe;if(i!==0){let y=ve.fromAxisAngle(s,i,Ple);if(m=q.fromQuaternion(y,m),t.tangent||t.bitangent){y=ve.fromAxisAngle(s,-i,Ple);let I=q.fromQuaternion(y,yKe);a=d.normalize(q.multiplyByVector(I,a,a),a),t.bitangent&&(l=d.normalize(d.cross(s,a,l),l))}}else m=q.clone(q.IDENTITY,m);let p=fKe;t.st&&(p.x=n.x,p.y=n.y);let _=u.length,b=_*3,x=new Float64Array(b),T=t.normal?new Float32Array(b):void 0,E=t.tangent?new Float32Array(b):void 0,S=t.bitangent?new Float32Array(b):void 0,A=t.st?new Float32Array(_*2):void 0,v=0,D=0,R=0,P=0,L=0;for(let y=0;y<_;y++){let I=u[y];if(x[v++]=I.x,x[v++]=I.y,x[v++]=I.z,t.st)if(c(o)&&o.positions.length===_)A[L++]=o.positions[y].x,A[L++]=o.positions[y].y;else{let M=q.multiplyByVector(m,I,cKe),B=r(M,uKe);k.subtract(B,p,B);let U=O.clamp(B.x/n.width,0,1),V=O.clamp(B.y/n.height,0,1);A[L++]=U,A[L++]=V}t.normal&&(T[D++]=s.x,T[D++]=s.y,T[D++]=s.z),t.tangent&&(E[P++]=a.x,E[P++]=a.y,E[P++]=a.z),t.bitangent&&(S[R++]=l.x,S[R++]=l.y,S[R++]=l.z)}let F=new fn;return t.position&&(F.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:x})),t.normal&&(F.normal=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:T})),t.tangent&&(F.tangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:E})),t.bitangent&&(F.bitangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:S})),t.st&&(F.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:A})),new st({attributes:F,indices:h,primitiveType:Se.TRIANGLES})}function m0(e){e=g(e,g.EMPTY_OBJECT);let t=e.polygonHierarchy,n=e.textureCoordinates;C.defined("options.polygonHierarchy",t);let i=g(e.vertexFormat,Ce.DEFAULT);this._vertexFormat=Ce.clone(i),this._polygonHierarchy=t,this._stRotation=g(e.stRotation,0),this._ellipsoid=Z.clone(g(e.ellipsoid,Z.default)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=n,this.packedLength=Fn.computeHierarchyPackedLength(t,d)+Ce.packedLength+Z.packedLength+(c(n)?Fn.computeHierarchyPackedLength(n,k):1)+2}m0.fromPositions=function(e){e=g(e,g.EMPTY_OBJECT),C.defined("options.positions",e.positions);let t={polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates};return new m0(t)};m0.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),n=Fn.packPolygonHierarchy(e._polygonHierarchy,t,n,d),Z.pack(e._ellipsoid,t,n),n+=Z.packedLength,Ce.pack(e._vertexFormat,t,n),n+=Ce.packedLength,t[n++]=e._stRotation,c(e._textureCoordinates)?n=Fn.packPolygonHierarchy(e._textureCoordinates,t,n,k):t[n++]=-1,t[n++]=e.packedLength,t};var TKe=Z.clone(Z.UNIT_SPHERE),CKe=new Ce,EKe={polygonHierarchy:{}};m0.unpack=function(e,t,n){C.defined("array",e),t=g(t,0);let i=Fn.unpackPolygonHierarchy(e,t,d);t=i.startingIndex,delete i.startingIndex;let o=Z.unpack(e,t,TKe);t+=Z.packedLength;let r=Ce.unpack(e,t,CKe);t+=Ce.packedLength;let s=e[t++],a=e[t]===-1?void 0:Fn.unpackPolygonHierarchy(e,t,k);c(a)?(t=a.startingIndex,delete a.startingIndex):t++;let l=e[t++];return c(n)||(n=new m0(EKe)),n._polygonHierarchy=i,n._ellipsoid=Z.clone(o,n._ellipsoid),n._vertexFormat=Ce.clone(r,n._vertexFormat),n._stRotation=s,n._textureCoordinates=a,n.packedLength=l,n};m0.createGeometry=function(e){let t=e._vertexFormat,n=e._polygonHierarchy,i=e._stRotation,o=e._textureCoordinates,r=c(o),s=n.positions;if(s=po(s,d.equalsEpsilon,!0),s.length<3)return;let a=dKe,l=hKe,u=mKe,f=pKe,h=_Ke;if(!xg.computeProjectTo2DArguments(s,qv,f,h))return;if(a=d.cross(f,h,a),a=d.normalize(a,a),!d.equalsEpsilon(qv,d.ZERO,O.EPSILON6)){let L=e._ellipsoid.geodeticSurfaceNormal(qv,bKe);d.dot(a,L)<0&&(a=d.negate(a,a),f=d.negate(f,f))}let p=xg.createProjectPointsTo2DFunction(qv,f,h),_=xg.createProjectPointTo2DFunction(qv,f,h);t.tangent&&(l=d.clone(f,l)),t.bitangent&&(u=d.clone(h,u));let b=Fn.polygonsFromHierarchy(n,r,p,!1),x=b.hierarchy,T=b.polygons,E=function(L){return L},S=r?Fn.polygonsFromHierarchy(o,!0,E,!1).polygons:void 0;if(x.length===0)return;s=x[0].outerRing;let A=ne.fromPoints(s),v=Fn.computeBoundingRectangle(a,_,s,i,lKe),D=[];for(let L=0;L<T.length;L++){let F=new wt({geometry:xKe(T[L],t,v,i,r?S[L]:void 0,_,a,l,u)});D.push(F)}let R=Pn.combineInstances(D)[0];R.attributes.position.values=new Float64Array(R.attributes.position.values),R.indices=Oe.createTypedArray(R.attributes.position.values.length/3,R.indices);let P=R.attributes;return t.position||delete P.position,new st({attributes:P,indices:R.indices,primitiveType:R.primitiveType,boundingSphere:A})};var a3=m0;var Rle=[],c3=[];function wKe(e,t,n,i,o){let s=Wr.fromPoints(t,e).projectPointsOntoPlane(t,Rle);ti.computeWindingOrder2D(s)===Gr.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let l,u,f=t.length,h=0;if(i)for(l=new Float64Array(f*2*3),u=0;u<f;u++){let _=t[u],b=t[(u+1)%f];l[h++]=_.x,l[h++]=_.y,l[h++]=_.z,l[h++]=b.x,l[h++]=b.y,l[h++]=b.z}else{let _=0;if(o===jt.GEODESIC)for(u=0;u<f;u++)_+=Fn.subdivideLineCount(t[u],t[(u+1)%f],n);else if(o===jt.RHUMB)for(u=0;u<f;u++)_+=Fn.subdivideRhumbLineCount(e,t[u],t[(u+1)%f],n);for(l=new Float64Array(_*3),u=0;u<f;u++){let b;o===jt.GEODESIC?b=Fn.subdivideLine(t[u],t[(u+1)%f],n,c3):o===jt.RHUMB&&(b=Fn.subdivideRhumbLine(e,t[u],t[(u+1)%f],n,c3));let x=b.length;for(let T=0;T<x;++T)l[h++]=b[T]}}f=l.length/3;let m=f*2,p=Oe.createTypedArray(f,m);for(h=0,u=0;u<f-1;u++)p[h++]=u,p[h++]=u+1;return p[h++]=f-1,p[h++]=0,new wt({geometry:new st({attributes:new fn({position:new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:l})}),indices:p,primitiveType:Se.LINES})})}function SKe(e,t,n,i,o){let s=Wr.fromPoints(t,e).projectPointsOntoPlane(t,Rle);ti.computeWindingOrder2D(s)===Gr.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let l,u,f=t.length,h=new Array(f),m=0;if(i)for(l=new Float64Array(f*2*3*2),u=0;u<f;++u){h[u]=m/3;let x=t[u],T=t[(u+1)%f];l[m++]=x.x,l[m++]=x.y,l[m++]=x.z,l[m++]=T.x,l[m++]=T.y,l[m++]=T.z}else{let x=0;if(o===jt.GEODESIC)for(u=0;u<f;u++)x+=Fn.subdivideLineCount(t[u],t[(u+1)%f],n);else if(o===jt.RHUMB)for(u=0;u<f;u++)x+=Fn.subdivideRhumbLineCount(e,t[u],t[(u+1)%f],n);for(l=new Float64Array(x*3*2),u=0;u<f;++u){h[u]=m/3;let T;o===jt.GEODESIC?T=Fn.subdivideLine(t[u],t[(u+1)%f],n,c3):o===jt.RHUMB&&(T=Fn.subdivideRhumbLine(e,t[u],t[(u+1)%f],n,c3));let E=T.length;for(let S=0;S<E;++S)l[m++]=T[S]}}f=l.length/(3*2);let p=h.length,_=(f*2+p)*2,b=Oe.createTypedArray(f+p,_);for(m=0,u=0;u<f;++u)b[m++]=u,b[m++]=(u+1)%f,b[m++]=u+f,b[m++]=(u+1)%f+f;for(u=0;u<p;u++){let x=h[u];b[m++]=x,b[m++]=x+f}return new wt({geometry:new st({attributes:new fn({position:new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:l})}),indices:b,primitiveType:Se.LINES})})}function p0(e){if(C.typeOf.object("options",e),C.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&c(e.height))throw new w("Cannot use both options.perPositionHeight and options.height");if(c(e.arcType)&&e.arcType!==jt.GEODESIC&&e.arcType!==jt.RHUMB)throw new w("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let t=e.polygonHierarchy,n=g(e.ellipsoid,Z.default),i=g(e.granularity,O.RADIANS_PER_DEGREE),o=g(e.perPositionHeight,!1),r=o&&c(e.extrudedHeight),s=g(e.arcType,jt.GEODESIC),a=g(e.height,0),l=g(e.extrudedHeight,a);if(!r){let u=Math.max(a,l);l=Math.min(a,l),a=u}this._ellipsoid=Z.clone(n),this._granularity=i,this._height=a,this._extrudedHeight=l,this._arcType=s,this._polygonHierarchy=t,this._perPositionHeight=o,this._perPositionHeightExtrude=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=Fn.computeHierarchyPackedLength(t,d)+Z.packedLength+8}p0.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),n=Fn.packPolygonHierarchy(e._polygonHierarchy,t,n,d),Z.pack(e._ellipsoid,t,n),n+=Z.packedLength,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._granularity,t[n++]=e._perPositionHeightExtrude?1:0,t[n++]=e._perPositionHeight?1:0,t[n++]=e._arcType,t[n++]=g(e._offsetAttribute,-1),t[n]=e.packedLength,t};var AKe=Z.clone(Z.UNIT_SPHERE),vKe={polygonHierarchy:{}};p0.unpack=function(e,t,n){C.defined("array",e),t=g(t,0);let i=Fn.unpackPolygonHierarchy(e,t,d);t=i.startingIndex,delete i.startingIndex;let o=Z.unpack(e,t,AKe);t+=Z.packedLength;let r=e[t++],s=e[t++],a=e[t++],l=e[t++]===1,u=e[t++]===1,f=e[t++],h=e[t++],m=e[t];return c(n)||(n=new p0(vKe)),n._polygonHierarchy=i,n._ellipsoid=Z.clone(o,n._ellipsoid),n._height=r,n._extrudedHeight=s,n._granularity=a,n._perPositionHeight=u,n._perPositionHeightExtrude=l,n._arcType=f,n._offsetAttribute=h===-1?void 0:h,n.packedLength=m,n};p0.fromPositions=function(e){e=g(e,g.EMPTY_OBJECT),C.defined("options.positions",e.positions);let t={polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute};return new p0(t)};p0.createGeometry=function(e){let t=e._ellipsoid,n=e._granularity,i=e._polygonHierarchy,o=e._perPositionHeight,r=e._arcType,s=Fn.polygonOutlinesFromHierarchy(i,!o,t);if(s.length===0)return;let a,l=[],u=O.chordLength(n,t.maximumRadius),f=e._height,h=e._extrudedHeight,m=e._perPositionHeightExtrude||!O.equalsEpsilon(f,h,0,O.EPSILON2),p,_;if(m)for(_=0;_<s.length;_++){if(a=SKe(t,s[_],u,o,r),a.geometry=Fn.scaleToGeodeticHeightExtruded(a.geometry,f,h,t,o),c(e._offsetAttribute)){let T=a.geometry.attributes.position.values.length/3,E=new Uint8Array(T);e._offsetAttribute===Zt.TOP?E=E.fill(1,0,T/2):(p=e._offsetAttribute===Zt.NONE?0:1,E=E.fill(p)),a.geometry.attributes.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}l.push(a)}else for(_=0;_<s.length;_++){if(a=wKe(t,s[_],u,o,r),a.geometry.attributes.position.values=ti.scaleToGeodeticHeight(a.geometry.attributes.position.values,f,t,!o),c(e._offsetAttribute)){let T=a.geometry.attributes.position.values.length;p=e._offsetAttribute===Zt.NONE?0:1;let E=new Uint8Array(T/3).fill(p);a.geometry.attributes.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}l.push(a)}let b=Pn.combineInstances(l)[0],x=ne.fromVertices(b.attributes.position.values);return new st({attributes:b.attributes,indices:b.indices,primitiveType:b.primitiveType,boundingSphere:x,offsetAttribute:e._offsetAttribute})};var l3=p0;var Mle="Entity polygons cannot have both height and perPositionHeight. height will be ignored",Lle="heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored",Nle=new z,Fle=d.ZERO,Ble=new d,kle=new te,DKe=[],IKe=new k;function OKe(e){this.id=e,this.vertexFormat=void 0,this.polygonHierarchy=void 0,this.perPositionHeight=void 0,this.closeTop=void 0,this.closeBottom=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.offsetAttribute=void 0,this.arcType=void 0,this.textureCoordinates=void 0}function Ql(e,t){Un.call(this,{entity:e,scene:t,geometryOptions:new OKe(e),geometryPropertyName:"polygon",observedPropertyNames:["availability","polygon"]}),this._onEntityPropertyChanged(e,"polygon",e.polygon,void 0)}c(Object.create)&&(Ql.prototype=Object.create(Un.prototype),Ql.prototype.constructor=Ql);Ql.prototype.createFillGeometryInstance=function(e){if(C.defined("time",e),!this._fillEnabled)throw new w("This instance does not represent a filled geometry.");let t=this._entity,n=t.isAvailable(e),i=this._options,o={show:new gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:Mn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Ut){let s;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(s=this._materialProperty.color.getValue(e,Nle)),c(s)||(s=z.WHITE),o.color=Ht.fromColor(s)}c(i.offsetAttribute)&&(o.offset=qi.fromCartesian3(G.getValueOrDefault(this._terrainOffsetProperty,e,Fle,Ble)));let r;return i.perPositionHeight&&!c(i.extrudedHeight)?r=new a3(i):r=new Q_(i),new wt({id:t,geometry:r,attributes:o})};Ql.prototype.createOutlineGeometryInstance=function(e){if(C.defined("time",e),!this._outlineEnabled)throw new w("This instance does not represent an outlined geometry.");let t=this._entity,n=t.isAvailable(e),i=this._options,o=G.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,Nle),r=this._distanceDisplayConditionProperty.getValue(e),s={show:new gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(o),distanceDisplayCondition:Mn.fromDistanceDisplayCondition(r),offset:void 0};c(i.offsetAttribute)&&(s.offset=qi.fromCartesian3(G.getValueOrDefault(this._terrainOffsetProperty,e,Fle,Ble)));let a;return i.perPositionHeight&&!c(i.extrudedHeight)?a=new sd(i):a=new l3(i),new wt({id:t,geometry:a,attributes:s})};Ql.prototype._computeCenter=function(e,t){let n=G.getValueOrUndefined(this._entity.polygon.hierarchy,e);if(!c(n))return;let i=n.positions;if(i.length===0)return;let o=this._scene.ellipsoid,r=Wr.fromPoints(i,o),s=r.projectPointsOntoPlane(i,DKe),a=s.length,l=0,u=a-1,f=new k;for(let m=0;m<a;u=m++){let p=s[m],_=s[u],b=p.x*_.y-_.x*p.y,x=k.add(p,_,IKe);x=k.multiplyByScalar(x,b,x),f=k.add(f,x,f),l+=b}let h=1/(l*3);return f=k.multiplyByScalar(f,h,f),r.projectPointOntoEllipsoid(f,t)};Ql.prototype._isHidden=function(e,t){return!c(t.hierarchy)||Qn.prototype._isHidden.call(this,e,t)};Ql.prototype._isOnTerrain=function(e,t){let n=Un.prototype._isOnTerrain.call(this,e,t),i=t.perPositionHeight,o=c(i)&&(i.isConstant?i.getValue(Ue.MINIMUM_VALUE):!0);return n&&!o};Ql.prototype._isDynamic=function(e,t){return!t.hierarchy.isConstant||!G.isConstant(t.height)||!G.isConstant(t.extrudedHeight)||!G.isConstant(t.granularity)||!G.isConstant(t.stRotation)||!G.isConstant(t.textureCoordinates)||!G.isConstant(t.outlineWidth)||!G.isConstant(t.perPositionHeight)||!G.isConstant(t.closeTop)||!G.isConstant(t.closeBottom)||!G.isConstant(t.zIndex)||!G.isConstant(t.arcType)||this._onTerrain&&!G.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Ut)};Ql.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Ut,i=this._options;i.vertexFormat=n?nn.VERTEX_FORMAT:eo.MaterialSupport.TEXTURED.vertexFormat;let o=t.hierarchy.getValue(Ue.MINIMUM_VALUE),r=G.getValueOrUndefined(t.height,Ue.MINIMUM_VALUE),s=G.getValueOrDefault(t.heightReference,Ue.MINIMUM_VALUE,qe.NONE),a=G.getValueOrUndefined(t.extrudedHeight,Ue.MINIMUM_VALUE),l=G.getValueOrDefault(t.extrudedHeightReference,Ue.MINIMUM_VALUE,qe.NONE),u=G.getValueOrDefault(t.perPositionHeight,Ue.MINIMUM_VALUE,!1);r=Un.getGeometryHeight(r,s);let f;if(u?(c(r)&&(r=void 0,mt(Mle)),s!==qe.NONE&&u&&(r=void 0,mt(Lle))):(c(a)&&!c(r)&&(r=0),f=Un.computeGeometryOffsetAttribute(r,s,a,l)),i.polygonHierarchy=o,i.granularity=G.getValueOrUndefined(t.granularity,Ue.MINIMUM_VALUE),i.stRotation=G.getValueOrUndefined(t.stRotation,Ue.MINIMUM_VALUE),i.perPositionHeight=u,i.closeTop=G.getValueOrDefault(t.closeTop,Ue.MINIMUM_VALUE,!0),i.closeBottom=G.getValueOrDefault(t.closeBottom,Ue.MINIMUM_VALUE,!0),i.offsetAttribute=f,i.height=r,i.arcType=G.getValueOrDefault(t.arcType,Ue.MINIMUM_VALUE,jt.GEODESIC),i.textureCoordinates=G.getValueOrUndefined(t.textureCoordinates,Ue.MINIMUM_VALUE),a=Un.getGeometryExtrudedHeight(a,l),a===Un.CLAMP_TO_GROUND){let h=Q_.computeRectangleFromPositions(i.polygonHierarchy.positions,i.ellipsoid,i.arcType,kle);a=ai.getMinimumMaximumHeights(h).minimumTerrainHeight}i.extrudedHeight=a};Ql.prototype._getIsClosed=function(e){let t=e.height,n=e.extrudedHeight,i=c(n)&&n!==t;return!e.perPositionHeight&&(!i&&t===0||i&&e.closeTop&&e.closeBottom)};Ql.DynamicGeometryUpdater=dE;function dE(e,t,n){Jn.call(this,e,t,n)}c(Object.create)&&(dE.prototype=Object.create(Jn.prototype),dE.prototype.constructor=dE);dE.prototype._isHidden=function(e,t,n){return!c(this._options.polygonHierarchy)||Jn.prototype._isHidden.call(this,e,t,n)};dE.prototype._setOptions=function(e,t,n){let i=this._options;i.polygonHierarchy=G.getValueOrUndefined(t.hierarchy,n);let o=G.getValueOrUndefined(t.height,n),r=G.getValueOrDefault(t.heightReference,n,qe.NONE),s=G.getValueOrDefault(t.extrudedHeightReference,n,qe.NONE),a=G.getValueOrUndefined(t.extrudedHeight,n),l=G.getValueOrUndefined(t.perPositionHeight,n);o=Un.getGeometryHeight(o,s);let u;if(l?(c(o)&&(o=void 0,mt(Mle)),r!==qe.NONE&&l&&(o=void 0,mt(Lle))):(c(a)&&!c(o)&&(o=0),u=Un.computeGeometryOffsetAttribute(o,r,a,s)),i.granularity=G.getValueOrUndefined(t.granularity,n),i.stRotation=G.getValueOrUndefined(t.stRotation,n),i.textureCoordinates=G.getValueOrUndefined(t.textureCoordinates,n),i.perPositionHeight=G.getValueOrUndefined(t.perPositionHeight,n),i.closeTop=G.getValueOrDefault(t.closeTop,n,!0),i.closeBottom=G.getValueOrDefault(t.closeBottom,n,!0),i.offsetAttribute=u,i.height=o,i.arcType=G.getValueOrDefault(t.arcType,n,jt.GEODESIC),a=Un.getGeometryExtrudedHeight(a,s),a===Un.CLAMP_TO_GROUND){let f=Q_.computeRectangleFromPositions(i.polygonHierarchy.positions,i.ellipsoid,i.arcType,kle);a=ai.getMinimumMaximumHeights(f).minimumTerrainHeight}i.extrudedHeight=a};var u3=Ql;function PKe(e,t,n,i){let o=new fn;i.position&&(o.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:e}));let r=t.length,s=e.length/3,a=(s-r*2)/(r*2),l=ti.triangulate(t),u=(a-1)*r*6+l.length*2,f=Oe.createTypedArray(s,u),h,m,p,_,b,x,T=r*2,E=0;for(h=0;h<a-1;h++){for(m=0;m<r-1;m++)p=m*2+h*r*2,x=p+T,_=p+1,b=_+T,f[E++]=_,f[E++]=p,f[E++]=b,f[E++]=b,f[E++]=p,f[E++]=x;p=r*2-2+h*r*2,_=p+1,b=_+T,x=p+T,f[E++]=_,f[E++]=p,f[E++]=b,f[E++]=b,f[E++]=p,f[E++]=x}if(i.st||i.tangent||i.bitangent){let v=new Float32Array(s*2),D=1/(a-1),R=1/n.height,P=n.height/2,L,F,y=0;for(h=0;h<a;h++){for(L=h*D,F=R*(t[0].y+P),v[y++]=L,v[y++]=F,m=1;m<r;m++)F=R*(t[m].y+P),v[y++]=L,v[y++]=F,v[y++]=L,v[y++]=F;F=R*(t[0].y+P),v[y++]=L,v[y++]=F}for(m=0;m<r;m++)L=0,F=R*(t[m].y+P),v[y++]=L,v[y++]=F;for(m=0;m<r;m++)L=(a-1)*D,F=R*(t[m].y+P),v[y++]=L,v[y++]=F;o.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:new Float32Array(v)})}let S=s-r*2;for(h=0;h<l.length;h+=3){let v=l[h]+S,D=l[h+1]+S,R=l[h+2]+S;f[E++]=v,f[E++]=D,f[E++]=R,f[E++]=R+r,f[E++]=D+r,f[E++]=v+r}let A=new st({attributes:o,indices:f,boundingSphere:ne.fromVertices(e),primitiveType:Se.TRIANGLES});if(i.normal&&(A=Pn.computeNormal(A)),i.tangent||i.bitangent){try{A=Pn.computeTangentAndBitangent(A)}catch{mt("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}i.tangent||(A.attributes.tangent=void 0),i.bitangent||(A.attributes.bitangent=void 0),i.st||(A.attributes.st=void 0)}return A}function Xv(e){e=g(e,g.EMPTY_OBJECT);let t=e.polylinePositions,n=e.shapePositions;if(!c(t))throw new w("options.polylinePositions is required.");if(!c(n))throw new w("options.shapePositions is required.");this._positions=t,this._shape=n,this._ellipsoid=Z.clone(g(e.ellipsoid,Z.default)),this._cornerType=g(e.cornerType,Ii.ROUNDED),this._vertexFormat=Ce.clone(g(e.vertexFormat,Ce.DEFAULT)),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";let i=1+t.length*d.packedLength;i+=1+n.length*k.packedLength,this.packedLength=i+Z.packedLength+Ce.packedLength+2}Xv.pack=function(e,t,n){if(!c(e))throw new w("value is required");if(!c(t))throw new w("array is required");n=g(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=d.packedLength)d.pack(o[i],t,n);let s=e._shape;for(r=s.length,t[n++]=r,i=0;i<r;++i,n+=k.packedLength)k.pack(s[i],t,n);return Z.pack(e._ellipsoid,t,n),n+=Z.packedLength,Ce.pack(e._vertexFormat,t,n),n+=Ce.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var Ule=Z.clone(Z.UNIT_SPHERE),zle=new Ce,Yv={polylinePositions:void 0,shapePositions:void 0,ellipsoid:Ule,vertexFormat:zle,cornerType:void 0,granularity:void 0};Xv.unpack=function(e,t,n){if(!c(e))throw new w("array is required");t=g(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=d.packedLength)r[i]=d.unpack(e,t);o=e[t++];let s=new Array(o);for(i=0;i<o;++i,t+=k.packedLength)s[i]=k.unpack(e,t);let a=Z.unpack(e,t,Ule);t+=Z.packedLength;let l=Ce.unpack(e,t,zle);t+=Ce.packedLength;let u=e[t++],f=e[t];return c(n)?(n._positions=r,n._shape=s,n._ellipsoid=Z.clone(a,n._ellipsoid),n._vertexFormat=Ce.clone(l,n._vertexFormat),n._cornerType=u,n._granularity=f,n):(Yv.polylinePositions=r,Yv.shapePositions=s,Yv.cornerType=u,Yv.granularity=f,new Xv(Yv))};var RKe=new je;Xv.createGeometry=function(e){let t=e._positions,n=po(t,d.equalsEpsilon),i=e._shape;if(i=Nh.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;ti.computeWindingOrder2D(i)===Gr.CLOCKWISE&&i.reverse();let o=je.fromPoints(i,RKe),r=Nh.computePositions(n,i,o,e,!0);return PKe(r,i,o,e._vertexFormat)};var f3=Xv;function MKe(e,t){let n=new fn;n.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:e});let i=t.length,o=n.position.values.length/3,s=e.length/3/i,a=Oe.createTypedArray(o,2*i*(s+1)),l,u,f=0;l=0;let h=l*i;for(u=0;u<i-1;u++)a[f++]=u+h,a[f++]=u+h+1;for(a[f++]=i-1+h,a[f++]=h,l=s-1,h=l*i,u=0;u<i-1;u++)a[f++]=u+h,a[f++]=u+h+1;for(a[f++]=i-1+h,a[f++]=h,l=0;l<s-1;l++){let p=i*l,_=p+i;for(u=0;u<i;u++)a[f++]=u+p,a[f++]=u+_}return new st({attributes:n,indices:Oe.createTypedArray(o,a),boundingSphere:ne.fromVertices(e),primitiveType:Se.LINES})}function $v(e){e=g(e,g.EMPTY_OBJECT);let t=e.polylinePositions,n=e.shapePositions;if(!c(t))throw new w("options.polylinePositions is required.");if(!c(n))throw new w("options.shapePositions is required.");this._positions=t,this._shape=n,this._ellipsoid=Z.clone(g(e.ellipsoid,Z.default)),this._cornerType=g(e.cornerType,Ii.ROUNDED),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";let i=1+t.length*d.packedLength;i+=1+n.length*k.packedLength,this.packedLength=i+Z.packedLength+2}$v.pack=function(e,t,n){if(!c(e))throw new w("value is required");if(!c(t))throw new w("array is required");n=g(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=d.packedLength)d.pack(o[i],t,n);let s=e._shape;for(r=s.length,t[n++]=r,i=0;i<r;++i,n+=k.packedLength)k.pack(s[i],t,n);return Z.pack(e._ellipsoid,t,n),n+=Z.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var Vle=Z.clone(Z.UNIT_SPHERE),Kv={polylinePositions:void 0,shapePositions:void 0,ellipsoid:Vle,height:void 0,cornerType:void 0,granularity:void 0};$v.unpack=function(e,t,n){if(!c(e))throw new w("array is required");t=g(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=d.packedLength)r[i]=d.unpack(e,t);o=e[t++];let s=new Array(o);for(i=0;i<o;++i,t+=k.packedLength)s[i]=k.unpack(e,t);let a=Z.unpack(e,t,Vle);t+=Z.packedLength;let l=e[t++],u=e[t];return c(n)?(n._positions=r,n._shape=s,n._ellipsoid=Z.clone(a,n._ellipsoid),n._cornerType=l,n._granularity=u,n):(Kv.polylinePositions=r,Kv.shapePositions=s,Kv.cornerType=l,Kv.granularity=u,new $v(Kv))};var LKe=new je;$v.createGeometry=function(e){let t=e._positions,n=po(t,d.equalsEpsilon),i=e._shape;if(i=Nh.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;ti.computeWindingOrder2D(i)===Gr.CLOCKWISE&&i.reverse();let o=je.fromPoints(i,LKe),r=Nh.computePositions(n,i,o,e,!1);return MKe(r,i)};var d3=$v;var Hle=new z;function NKe(e){this.id=e,this.vertexFormat=void 0,this.polylinePositions=void 0,this.shapePositions=void 0,this.cornerType=void 0,this.granularity=void 0}function Hh(e,t){Qn.call(this,{entity:e,scene:t,geometryOptions:new NKe(e),geometryPropertyName:"polylineVolume",observedPropertyNames:["availability","polylineVolume"]}),this._onEntityPropertyChanged(e,"polylineVolume",e.polylineVolume,void 0)}c(Object.create)&&(Hh.prototype=Object.create(Qn.prototype),Hh.prototype.constructor=Hh);Hh.prototype.createFillGeometryInstance=function(e){if(C.defined("time",e),!this._fillEnabled)throw new w("This instance does not represent a filled geometry.");let t=this._entity,n=t.isAvailable(e),i,o,r=new gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=Mn.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Ut){let l;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(l=this._materialProperty.color.getValue(e,Hle)),c(l)||(l=z.WHITE),o=Ht.fromColor(l),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};return new wt({id:t,geometry:new f3(this._options),attributes:i})};Hh.prototype.createOutlineGeometryInstance=function(e){if(C.defined("time",e),!this._outlineEnabled)throw new w("This instance does not represent an outlined geometry.");let t=this._entity,n=t.isAvailable(e),i=G.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,Hle),o=this._distanceDisplayConditionProperty.getValue(e);return new wt({id:t,geometry:new d3(this._options),attributes:{show:new gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(i),distanceDisplayCondition:Mn.fromDistanceDisplayCondition(o)}})};Hh.prototype._isHidden=function(e,t){return!c(t.positions)||!c(t.shape)||Qn.prototype._isHidden.call(this,e,t)};Hh.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!t.shape.isConstant||!G.isConstant(t.granularity)||!G.isConstant(t.outlineWidth)||!G.isConstant(t.cornerType)};Hh.prototype._setStaticOptions=function(e,t){let n=t.granularity,i=t.cornerType,o=this._options,r=this._materialProperty instanceof Ut;o.vertexFormat=r?nn.VERTEX_FORMAT:eo.MaterialSupport.TEXTURED.vertexFormat,o.polylinePositions=t.positions.getValue(Ue.MINIMUM_VALUE,o.polylinePositions),o.shapePositions=t.shape.getValue(Ue.MINIMUM_VALUE,o.shape),o.granularity=c(n)?n.getValue(Ue.MINIMUM_VALUE):void 0,o.cornerType=c(i)?i.getValue(Ue.MINIMUM_VALUE):void 0};Hh.DynamicGeometryUpdater=hE;function hE(e,t,n){Jn.call(this,e,t,n)}c(Object.create)&&(hE.prototype=Object.create(Jn.prototype),hE.prototype.constructor=hE);hE.prototype._isHidden=function(e,t,n){let i=this._options;return!c(i.polylinePositions)||!c(i.shapePositions)||Jn.prototype._isHidden.call(this,e,t,n)};hE.prototype._setOptions=function(e,t,n){let i=this._options;i.polylinePositions=G.getValueOrUndefined(t.positions,n,i.polylinePositions),i.shapePositions=G.getValueOrUndefined(t.shape,n),i.granularity=G.getValueOrUndefined(t.granularity,n),i.cornerType=G.getValueOrUndefined(t.cornerType,n)};var h3=Hh;var vW=new d,Wle=new d,qle=new d,Yle=new d,Xle=new te,FKe=new k,BKe=new ne,kKe=new ne;function Kle(e,t){let n=new st({attributes:new fn,primitiveType:Se.TRIANGLES});return n.attributes.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(n.attributes.normal=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(n.attributes.tangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(n.attributes.bitangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:t.bitangents})),n}function UKe(e,t,n,i){let o=e.length,r=t.normal?new Float32Array(o):void 0,s=t.tangent?new Float32Array(o):void 0,a=t.bitangent?new Float32Array(o):void 0,l=0,u=Yle,f=qle,h=Wle;if(t.normal||t.tangent||t.bitangent)for(let m=0;m<o;m+=3){let p=d.fromArray(e,m,vW),_=l+1,b=l+2;h=n.geodeticSurfaceNormal(p,h),(t.tangent||t.bitangent)&&(d.cross(d.UNIT_Z,h,f),q.multiplyByVector(i,f,f),d.normalize(f,f),t.bitangent&&d.normalize(d.cross(h,f,u),u)),t.normal&&(r[l]=h.x,r[_]=h.y,r[b]=h.z),t.tangent&&(s[l]=f.x,s[_]=f.y,s[b]=f.z),t.bitangent&&(a[l]=u.x,a[_]=u.y,a[b]=u.z),l+=3}return Kle(t,{positions:e,normals:r,tangents:s,bitangents:a})}var DW=new d,$le=new d;function zKe(e,t,n){let i=e.length,o=t.normal?new Float32Array(i):void 0,r=t.tangent?new Float32Array(i):void 0,s=t.bitangent?new Float32Array(i):void 0,a=0,l=0,u=0,f=!0,h=Yle,m=qle,p=Wle;if(t.normal||t.tangent||t.bitangent)for(let _=0;_<i;_+=6){let b=d.fromArray(e,_,vW),x=d.fromArray(e,(_+6)%i,DW);if(f){let T=d.fromArray(e,(_+3)%i,$le);d.subtract(x,b,x),d.subtract(T,b,T),p=d.normalize(d.cross(T,x,p),p),f=!1}d.equalsEpsilon(x,b,O.EPSILON10)&&(f=!0),(t.tangent||t.bitangent)&&(h=n.geodeticSurfaceNormal(b,h),t.tangent&&(m=d.normalize(d.cross(h,p,m),m))),t.normal&&(o[a++]=p.x,o[a++]=p.y,o[a++]=p.z,o[a++]=p.x,o[a++]=p.y,o[a++]=p.z),t.tangent&&(r[l++]=m.x,r[l++]=m.y,r[l++]=m.z,r[l++]=m.x,r[l++]=m.y,r[l++]=m.z),t.bitangent&&(s[u++]=h.x,s[u++]=h.y,s[u++]=h.z,s[u++]=h.x,s[u++]=h.y,s[u++]=h.z)}return Kle(t,{positions:e,normals:o,tangents:r,bitangents:s})}function Zle(e,t){let n=e._vertexFormat,i=e._ellipsoid,o=t.height,r=t.width,s=t.northCap,a=t.southCap,l=0,u=o,f=o,h=0;s&&(l=1,f-=1,h+=1),a&&(u-=1,f-=1,h+=1),h+=r*f;let m=n.position?new Float64Array(h*3):void 0,p=n.st?new Float32Array(h*2):void 0,_=0,b=0,x=vW,T=FKe,E=Number.MAX_VALUE,S=Number.MAX_VALUE,A=-Number.MAX_VALUE,v=-Number.MAX_VALUE;for(let I=l;I<u;++I)for(let M=0;M<r;++M)vs.computePosition(t,i,n.st,I,M,x,T),m[_++]=x.x,m[_++]=x.y,m[_++]=x.z,n.st&&(p[b++]=T.x,p[b++]=T.y,E=Math.min(E,T.x),S=Math.min(S,T.y),A=Math.max(A,T.x),v=Math.max(v,T.y));if(s&&(vs.computePosition(t,i,n.st,0,0,x,T),m[_++]=x.x,m[_++]=x.y,m[_++]=x.z,n.st&&(p[b++]=T.x,p[b++]=T.y,E=T.x,S=T.y,A=T.x,v=T.y)),a&&(vs.computePosition(t,i,n.st,o-1,0,x,T),m[_++]=x.x,m[_++]=x.y,m[_]=x.z,n.st&&(p[b++]=T.x,p[b]=T.y,E=Math.min(E,T.x),S=Math.min(S,T.y),A=Math.max(A,T.x),v=Math.max(v,T.y))),n.st&&(E<0||S<0||A>1||v>1))for(let I=0;I<p.length;I+=2)p[I]=(p[I]-E)/(A-E),p[I+1]=(p[I+1]-S)/(v-S);let D=UKe(m,n,i,t.tangentRotationMatrix),R=6*(r-1)*(f-1);s&&(R+=3*(r-1)),a&&(R+=3*(r-1));let P=Oe.createTypedArray(h,R),L=0,F=0,y;for(y=0;y<f-1;++y){for(let I=0;I<r-1;++I){let M=L,B=M+r,U=B+1,V=M+1;P[F++]=M,P[F++]=B,P[F++]=V,P[F++]=V,P[F++]=B,P[F++]=U,++L}++L}if(s||a){let I=h-1,M=h-1;s&&a&&(I=h-2);let B,U;if(L=0,s)for(y=0;y<r-1;y++)B=L,U=B+1,P[F++]=I,P[F++]=B,P[F++]=U,++L;if(a)for(L=(f-1)*r,y=0;y<r-1;y++)B=L,U=B+1,P[F++]=B,P[F++]=M,P[F++]=U,++L}return D.indices=P,n.st&&(D.attributes.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:p})),D}function mE(e,t,n,i,o){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n+2],e[t++]=o[n],e[t++]=o[n+1],e[t]=o[n+2],e}function pE(e,t,n,i){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n],e[t]=i[n+1],e}var IW=new Ce;function VKe(e,t){let n=e._shadowVolume,i=e._offsetAttribute,o=e._vertexFormat,r=e._extrudedHeight,s=e._surfaceHeight,a=e._ellipsoid,l=t.height,u=t.width,f;if(n){let Ae=Ce.clone(o,IW);Ae.normal=!0,e._vertexFormat=Ae}let h=Zle(e,t);n&&(e._vertexFormat=o);let m=ti.scaleToGeodeticHeight(h.attributes.position.values,s,a,!1);m=new Float64Array(m);let p=m.length,_=p*2,b=new Float64Array(_);b.set(m);let x=ti.scaleToGeodeticHeight(h.attributes.position.values,r,a);b.set(x,p),h.attributes.position.values=b;let T=o.normal?new Float32Array(_):void 0,E=o.tangent?new Float32Array(_):void 0,S=o.bitangent?new Float32Array(_):void 0,A=o.st?new Float32Array(_/3*2):void 0,v,D;if(o.normal){for(D=h.attributes.normal.values,T.set(D),f=0;f<p;f++)D[f]=-D[f];T.set(D,p),h.attributes.normal.values=T}if(n){D=h.attributes.normal.values,o.normal||(h.attributes.normal=void 0);let Ae=new Float32Array(_);for(f=0;f<p;f++)D[f]=-D[f];Ae.set(D,p),h.attributes.extrudeDirection=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:Ae})}let R,P=c(i);if(P){let Ae=p/3*2,Qe=new Uint8Array(Ae);i===Zt.TOP?Qe=Qe.fill(1,0,Ae/2):(R=i===Zt.NONE?0:1,Qe=Qe.fill(R)),h.attributes.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:Qe})}if(o.tangent){let Ae=h.attributes.tangent.values;for(E.set(Ae),f=0;f<p;f++)Ae[f]=-Ae[f];E.set(Ae,p),h.attributes.tangent.values=E}if(o.bitangent){let Ae=h.attributes.bitangent.values;S.set(Ae),S.set(Ae,p),h.attributes.bitangent.values=S}o.st&&(v=h.attributes.st.values,A.set(v),A.set(v,p/3*2),h.attributes.st.values=A);let L=h.indices,F=L.length,y=p/3,I=Oe.createTypedArray(_/3,F*2);for(I.set(L),f=0;f<F;f+=3)I[f+F]=L[f+2]+y,I[f+1+F]=L[f+1]+y,I[f+2+F]=L[f]+y;h.indices=I;let M=t.northCap,B=t.southCap,U=l,V=2,W=0,H=4,X=4;M&&(V-=1,U-=1,W+=1,H-=2,X-=1),B&&(V-=1,U-=1,W+=1,H-=2,X-=1),W+=V*u+2*U-H;let $=(W+X)*2,ae=new Float64Array($*3),se=n?new Float32Array($*3):void 0,he=P?new Uint8Array($):void 0,ge=o.st?new Float32Array($*2):void 0,le=i===Zt.TOP;P&&!le&&(R=i===Zt.ALL?1:0,he=he.fill(R));let me=0,Me=0,Ge=0,De=0,ke=u*U,He;for(f=0;f<ke;f+=u)He=f*3,ae=mE(ae,me,He,m,x),me+=6,o.st&&(ge=pE(ge,Me,f*2,v),Me+=4),n&&(Ge+=3,se[Ge++]=D[He],se[Ge++]=D[He+1],se[Ge++]=D[He+2]),le&&(he[De++]=1,De+=1);if(B){let Ae=M?ke+1:ke;for(He=Ae*3,f=0;f<2;f++)ae=mE(ae,me,He,m,x),me+=6,o.st&&(ge=pE(ge,Me,Ae*2,v),Me+=4),n&&(Ge+=3,se[Ge++]=D[He],se[Ge++]=D[He+1],se[Ge++]=D[He+2]),le&&(he[De++]=1,De+=1)}else for(f=ke-u;f<ke;f++)He=f*3,ae=mE(ae,me,He,m,x),me+=6,o.st&&(ge=pE(ge,Me,f*2,v),Me+=4),n&&(Ge+=3,se[Ge++]=D[He],se[Ge++]=D[He+1],se[Ge++]=D[He+2]),le&&(he[De++]=1,De+=1);for(f=ke-1;f>0;f-=u)He=f*3,ae=mE(ae,me,He,m,x),me+=6,o.st&&(ge=pE(ge,Me,f*2,v),Me+=4),n&&(Ge+=3,se[Ge++]=D[He],se[Ge++]=D[He+1],se[Ge++]=D[He+2]),le&&(he[De++]=1,De+=1);if(M){let Ae=ke;for(He=Ae*3,f=0;f<2;f++)ae=mE(ae,me,He,m,x),me+=6,o.st&&(ge=pE(ge,Me,Ae*2,v),Me+=4),n&&(Ge+=3,se[Ge++]=D[He],se[Ge++]=D[He+1],se[Ge++]=D[He+2]),le&&(he[De++]=1,De+=1)}else for(f=u-1;f>=0;f--)He=f*3,ae=mE(ae,me,He,m,x),me+=6,o.st&&(ge=pE(ge,Me,f*2,v),Me+=4),n&&(Ge+=3,se[Ge++]=D[He],se[Ge++]=D[He+1],se[Ge++]=D[He+2]),le&&(he[De++]=1,De+=1);let ft=zKe(ae,o,a);o.st&&(ft.attributes.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:ge})),n&&(ft.attributes.extrudeDirection=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:se})),P&&(ft.attributes.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:he}));let Ie=Oe.createTypedArray($,W*6),Kt,Pt,dt,rn;p=ae.length/3;let Vt=0;for(f=0;f<p-1;f+=2){Kt=f,rn=(Kt+2)%p;let Ae=d.fromArray(ae,Kt*3,DW),Qe=d.fromArray(ae,rn*3,$le);d.equalsEpsilon(Ae,Qe,O.EPSILON10)||(Pt=(Kt+1)%p,dt=(Pt+2)%p,Ie[Vt++]=Kt,Ie[Vt++]=Pt,Ie[Vt++]=rn,Ie[Vt++]=rn,Ie[Vt++]=Pt,Ie[Vt++]=dt)}return ft.indices=Ie,ft=Pn.combineInstances([new wt({geometry:h}),new wt({geometry:ft})]),ft[0]}var HKe=[new d,new d,new d,new d],Jle=new re,GKe=new re;function OW(e,t,n,i,o){if(n===0)return te.clone(e,o);let r=vs.computeOptions(e,t,n,0,Xle,Jle),s=r.height,a=r.width,l=HKe;return vs.computePosition(r,i,!1,0,0,l[0]),vs.computePosition(r,i,!1,0,a-1,l[1]),vs.computePosition(r,i,!1,s-1,0,l[2]),vs.computePosition(r,i,!1,s-1,a-1,l[3]),te.fromCartesianArray(l,i,o)}function Gh(e){e=g(e,g.EMPTY_OBJECT);let t=e.rectangle;if(C.typeOf.object("rectangle",t),te._validate(t),t.north<t.south)throw new w("options.rectangle.north must be greater than or equal to options.rectangle.south");let n=g(e.height,0),i=g(e.extrudedHeight,n);this._rectangle=te.clone(t),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._ellipsoid=Z.clone(g(e.ellipsoid,Z.default)),this._surfaceHeight=Math.max(n,i),this._rotation=g(e.rotation,0),this._stRotation=g(e.stRotation,0),this._vertexFormat=Ce.clone(g(e.vertexFormat,Ce.DEFAULT)),this._extrudedHeight=Math.min(n,i),this._shadowVolume=g(e.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=e.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}Gh.packedLength=te.packedLength+Z.packedLength+Ce.packedLength+7;Gh.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),te.pack(e._rectangle,t,n),n+=te.packedLength,Z.pack(e._ellipsoid,t,n),n+=Z.packedLength,Ce.pack(e._vertexFormat,t,n),n+=Ce.packedLength,t[n++]=e._granularity,t[n++]=e._surfaceHeight,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=g(e._offsetAttribute,-1),t};var Qle=new te,eue=Z.clone(Z.UNIT_SPHERE),Gg={rectangle:Qle,ellipsoid:eue,vertexFormat:IW,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Gh.unpack=function(e,t,n){C.defined("array",e),t=g(t,0);let i=te.unpack(e,t,Qle);t+=te.packedLength;let o=Z.unpack(e,t,eue);t+=Z.packedLength;let r=Ce.unpack(e,t,IW);t+=Ce.packedLength;let s=e[t++],a=e[t++],l=e[t++],u=e[t++],f=e[t++],h=e[t++]===1,m=e[t];return c(n)?(n._rectangle=te.clone(i,n._rectangle),n._ellipsoid=Z.clone(o,n._ellipsoid),n._vertexFormat=Ce.clone(r,n._vertexFormat),n._granularity=s,n._surfaceHeight=a,n._rotation=l,n._stRotation=u,n._extrudedHeight=f,n._shadowVolume=h,n._offsetAttribute=m===-1?void 0:m,n):(Gg.granularity=s,Gg.height=a,Gg.rotation=l,Gg.stRotation=u,Gg.extrudedHeight=f,Gg.shadowVolume=h,Gg.offsetAttribute=m===-1?void 0:m,new Gh(Gg))};Gh.computeRectangle=function(e,t){e=g(e,g.EMPTY_OBJECT);let n=e.rectangle;if(C.typeOf.object("rectangle",n),te._validate(n),n.north<n.south)throw new w("options.rectangle.north must be greater than or equal to options.rectangle.south");let i=g(e.granularity,O.RADIANS_PER_DEGREE),o=g(e.ellipsoid,Z.default),r=g(e.rotation,0);return OW(n,i,r,o,t)};var jKe=new q,Gle=new ve,WKe=new re;Gh.createGeometry=function(e){if(O.equalsEpsilon(e._rectangle.north,e._rectangle.south,O.EPSILON10)||O.equalsEpsilon(e._rectangle.east,e._rectangle.west,O.EPSILON10))return;let t=e._rectangle,n=e._ellipsoid,i=e._rotation,o=e._stRotation,r=e._vertexFormat,s=vs.computeOptions(t,e._granularity,i,o,Xle,Jle,GKe),a=jKe;if(o!==0||i!==0){let p=te.center(t,WKe),_=n.geodeticSurfaceNormalCartographic(p,DW);ve.fromAxisAngle(_,-o,Gle),q.fromQuaternion(Gle,a)}else q.clone(q.IDENTITY,a);let l=e._surfaceHeight,u=e._extrudedHeight,f=!O.equalsEpsilon(l,u,0,O.EPSILON2);s.lonScalar=1/e._rectangle.width,s.latScalar=1/e._rectangle.height,s.tangentRotationMatrix=a;let h,m;if(t=e._rectangle,f){h=VKe(e,s);let p=ne.fromRectangle3D(t,n,l,kKe),_=ne.fromRectangle3D(t,n,u,BKe);m=ne.union(p,_)}else{if(h=Zle(e,s),h.attributes.position.values=ti.scaleToGeodeticHeight(h.attributes.position.values,l,n,!1),c(e._offsetAttribute)){let p=h.attributes.position.values.length,_=e._offsetAttribute===Zt.NONE?0:1,b=new Uint8Array(p/3).fill(_);h.attributes.applyOffset=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:1,values:b})}m=ne.fromRectangle3D(t,n,l)}return r.position||delete h.attributes.position,new st({attributes:h.attributes,indices:h.indices,primitiveType:h.primitiveType,boundingSphere:m,offsetAttribute:e._offsetAttribute})};Gh.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Gh({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:o,stRotation:e._stRotation,granularity:i,extrudedHeight:s,height:r,vertexFormat:Ce.POSITION_ONLY,shadowVolume:!0})};var jle=new te,qKe=[new k,new k,new k],YKe=new Li,XKe=new re;function KKe(e){if(e._stRotation===0)return[0,0,0,1,1,0];let t=te.clone(e._rectangle,jle),n=e._granularity,i=e._ellipsoid,o=e._rotation-e._stRotation,r=OW(t,n,o,i,jle),s=qKe;s[0].x=r.west,s[0].y=r.south,s[1].x=r.west,s[1].y=r.north,s[2].x=r.east,s[2].y=r.south;let a=e.rectangle,l=Li.fromRotation(e._stRotation,YKe),u=te.center(a,XKe);for(let _=0;_<3;++_){let b=s[_];b.x-=u.longitude,b.y-=u.latitude,Li.multiplyByVector(l,b,b),b.x+=u.longitude,b.y+=u.latitude,b.x=(b.x-a.west)/a.width,b.y=(b.y-a.south)/a.height}let f=s[0],h=s[1],m=s[2],p=new Array(6);return k.pack(f,p),k.pack(h,p,2),k.pack(m,p,4),p}Object.defineProperties(Gh.prototype,{rectangle:{get:function(){return c(this._rotatedRectangle)||(this._rotatedRectangle=OW(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return c(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=KKe(this)),this._textureCoordinateRotationPoints}}});var _E=Gh;var tue=new z,nue=d.ZERO,iue=new d,oue=new te,$Ke=new te,ZKe=new re;function JKe(e){this.id=e,this.vertexFormat=void 0,this.rectangle=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.rotation=void 0,this.offsetAttribute=void 0}function md(e,t){Un.call(this,{entity:e,scene:t,geometryOptions:new JKe(e),geometryPropertyName:"rectangle",observedPropertyNames:["availability","rectangle"]}),this._onEntityPropertyChanged(e,"rectangle",e.rectangle,void 0)}c(Object.create)&&(md.prototype=Object.create(Un.prototype),md.prototype.constructor=md);md.prototype.createFillGeometryInstance=function(e){if(C.defined("time",e),!this._fillEnabled)throw new w("This instance does not represent a filled geometry.");let t=this._entity,n=t.isAvailable(e),i={show:new gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:Mn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Ut){let o;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,tue)),c(o)||(o=z.WHITE),i.color=Ht.fromColor(o)}return c(this._options.offsetAttribute)&&(i.offset=qi.fromCartesian3(G.getValueOrDefault(this._terrainOffsetProperty,e,nue,iue))),new wt({id:t,geometry:new _E(this._options),attributes:i})};md.prototype.createOutlineGeometryInstance=function(e){if(C.defined("time",e),!this._outlineEnabled)throw new w("This instance does not represent an outlined geometry.");let t=this._entity,n=t.isAvailable(e),i=G.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,tue),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(i),distanceDisplayCondition:Mn.fromDistanceDisplayCondition(o),offset:void 0};return c(this._options.offsetAttribute)&&(r.offset=qi.fromCartesian3(G.getValueOrDefault(this._terrainOffsetProperty,e,nue,iue))),new wt({id:t,geometry:new wC(this._options),attributes:r})};md.prototype._computeCenter=function(e,t){let n=G.getValueOrUndefined(this._entity.rectangle.coordinates,e,$Ke);if(!c(n))return;let i=te.center(n,ZKe);return re.toCartesian(i,Z.default,t)};md.prototype._isHidden=function(e,t){return!c(t.coordinates)||Qn.prototype._isHidden.call(this,e,t)};md.prototype._isDynamic=function(e,t){return!t.coordinates.isConstant||!G.isConstant(t.height)||!G.isConstant(t.extrudedHeight)||!G.isConstant(t.granularity)||!G.isConstant(t.stRotation)||!G.isConstant(t.rotation)||!G.isConstant(t.outlineWidth)||!G.isConstant(t.zIndex)||this._onTerrain&&!G.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Ut)};md.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Ut,i=G.getValueOrUndefined(t.height,Ue.MINIMUM_VALUE),o=G.getValueOrDefault(t.heightReference,Ue.MINIMUM_VALUE,qe.NONE),r=G.getValueOrUndefined(t.extrudedHeight,Ue.MINIMUM_VALUE),s=G.getValueOrDefault(t.extrudedHeightReference,Ue.MINIMUM_VALUE,qe.NONE);c(r)&&!c(i)&&(i=0);let a=this._options;a.vertexFormat=n?nn.VERTEX_FORMAT:eo.MaterialSupport.TEXTURED.vertexFormat,a.rectangle=t.coordinates.getValue(Ue.MINIMUM_VALUE,a.rectangle),a.granularity=G.getValueOrUndefined(t.granularity,Ue.MINIMUM_VALUE),a.stRotation=G.getValueOrUndefined(t.stRotation,Ue.MINIMUM_VALUE),a.rotation=G.getValueOrUndefined(t.rotation,Ue.MINIMUM_VALUE),a.offsetAttribute=Un.computeGeometryOffsetAttribute(i,o,r,s),a.height=Un.getGeometryHeight(i,o),r=Un.getGeometryExtrudedHeight(r,s),r===Un.CLAMP_TO_GROUND&&(r=ai.getMinimumMaximumHeights(_E.computeRectangle(a,oue)).minimumTerrainHeight),a.extrudedHeight=r};md.DynamicGeometryUpdater=gE;function gE(e,t,n){Jn.call(this,e,t,n)}c(Object.create)&&(gE.prototype=Object.create(Jn.prototype),gE.prototype.constructor=gE);gE.prototype._isHidden=function(e,t,n){return!c(this._options.rectangle)||Jn.prototype._isHidden.call(this,e,t,n)};gE.prototype._setOptions=function(e,t,n){let i=this._options,o=G.getValueOrUndefined(t.height,n),r=G.getValueOrDefault(t.heightReference,n,qe.NONE),s=G.getValueOrUndefined(t.extrudedHeight,n),a=G.getValueOrDefault(t.extrudedHeightReference,n,qe.NONE);c(s)&&!c(o)&&(o=0),i.rectangle=G.getValueOrUndefined(t.coordinates,n,i.rectangle),i.granularity=G.getValueOrUndefined(t.granularity,n),i.stRotation=G.getValueOrUndefined(t.stRotation,n),i.rotation=G.getValueOrUndefined(t.rotation,n),i.offsetAttribute=Un.computeGeometryOffsetAttribute(o,r,s,a),i.height=Un.getGeometryHeight(o,r),s=Un.getGeometryExtrudedHeight(s,a),s===Un.CLAMP_TO_GROUND&&(s=ai.getMinimumMaximumHeights(_E.computeRectangle(i,oue)).minimumTerrainHeight),i.extrudedHeight=s};var m3=md;var rue={};function QKe(e,t){return O.equalsEpsilon(e.latitude,t.latitude,O.EPSILON10)&&O.equalsEpsilon(e.longitude,t.longitude,O.EPSILON10)}var e$e=new re,t$e=new re;function n$e(e,t,n,i){t=po(t,d.equalsEpsilon);let o=t.length;if(o<2)return;let r=c(i),s=c(n),a=new Array(o),l=new Array(o),u=new Array(o),f=t[0];a[0]=f;let h=e.cartesianToCartographic(f,e$e);s&&(h.height=n[0]),l[0]=h.height,r?u[0]=i[0]:u[0]=0;let m=l[0],p=u[0],_=m===p,b=1;for(let x=1;x<o;++x){let T=t[x],E=e.cartesianToCartographic(T,t$e);s&&(E.height=n[x]),_=_&&E.height===0,QKe(h,E)?h.height<E.height&&(l[b-1]=E.height):(a[b]=T,l[b]=E.height,r?u[b]=i[x]:u[b]=0,_=_&&l[b]===u[b],re.clone(E,h),++b)}if(!(_||b<2))return a.length=b,l.length=b,u.length=b,{positions:a,topHeights:l,bottomHeights:u}}var i$e=new Array(2),o$e=new Array(2),r$e={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};rue.computePositions=function(e,t,n,i,o,r){let s=n$e(e,t,n,i);if(!c(s))return;t=s.positions,n=s.topHeights,i=s.bottomHeights;let a=t.length,l=a-2,u,f,h=O.chordLength(o,e.maximumRadius),m=r$e;if(m.minDistance=h,m.ellipsoid=e,r){let p=0,_;for(_=0;_<a-1;_++)p+=Di.numberOfPoints(t[_],t[_+1],h)+1;u=new Float64Array(p*3),f=new Float64Array(p*3);let b=i$e,x=o$e;m.positions=b,m.height=x;let T=0;for(_=0;_<a-1;_++){b[0]=t[_],b[1]=t[_+1],x[0]=n[_],x[1]=n[_+1];let E=Di.generateArc(m);u.set(E,T),x[0]=i[_],x[1]=i[_+1],f.set(Di.generateArc(m),T),T+=E.length}}else m.positions=t,m.height=n,u=new Float64Array(Di.generateArc(m)),m.height=i,f=new Float64Array(Di.generateArc(m));return{bottomPositions:f,topPositions:u,numCorners:l}};var yE=rue;var PW=new d,p3=new d,s$e=new d,sue=new d,a$e=new d,c$e=new d,l$e=new d;function _0(e){e=g(e,g.EMPTY_OBJECT);let t=e.positions,n=e.maximumHeights,i=e.minimumHeights;if(!c(t))throw new w("options.positions is required.");if(c(n)&&n.length!==t.length)throw new w("options.positions and options.maximumHeights must have the same length.");if(c(i)&&i.length!==t.length)throw new w("options.positions and options.minimumHeights must have the same length.");let o=g(e.vertexFormat,Ce.DEFAULT),r=g(e.granularity,O.RADIANS_PER_DEGREE),s=g(e.ellipsoid,Z.default);this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._vertexFormat=Ce.clone(o),this._granularity=r,this._ellipsoid=Z.clone(s),this._workerName="createWallGeometry";let a=1+t.length*d.packedLength+2;c(i)&&(a+=i.length),c(n)&&(a+=n.length),this.packedLength=a+Z.packedLength+Ce.packedLength+1}_0.pack=function(e,t,n){if(!c(e))throw new w("value is required");if(!c(t))throw new w("array is required");n=g(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=d.packedLength)d.pack(o[i],t,n);let s=e._minimumHeights;if(r=c(s)?s.length:0,t[n++]=r,c(s))for(i=0;i<r;++i)t[n++]=s[i];let a=e._maximumHeights;if(r=c(a)?a.length:0,t[n++]=r,c(a))for(i=0;i<r;++i)t[n++]=a[i];return Z.pack(e._ellipsoid,t,n),n+=Z.packedLength,Ce.pack(e._vertexFormat,t,n),n+=Ce.packedLength,t[n]=e._granularity,t};var aue=Z.clone(Z.UNIT_SPHERE),cue=new Ce,Zv={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:aue,vertexFormat:cue,granularity:void 0};_0.unpack=function(e,t,n){if(!c(e))throw new w("array is required");t=g(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=d.packedLength)r[i]=d.unpack(e,t);o=e[t++];let s;if(o>0)for(s=new Array(o),i=0;i<o;++i)s[i]=e[t++];o=e[t++];let a;if(o>0)for(a=new Array(o),i=0;i<o;++i)a[i]=e[t++];let l=Z.unpack(e,t,aue);t+=Z.packedLength;let u=Ce.unpack(e,t,cue);t+=Ce.packedLength;let f=e[t];return c(n)?(n._positions=r,n._minimumHeights=s,n._maximumHeights=a,n._ellipsoid=Z.clone(l,n._ellipsoid),n._vertexFormat=Ce.clone(u,n._vertexFormat),n._granularity=f,n):(Zv.positions=r,Zv.minimumHeights=s,Zv.maximumHeights=a,Zv.granularity=f,new _0(Zv))};_0.fromConstantHeights=function(e){e=g(e,g.EMPTY_OBJECT);let t=e.positions;if(!c(t))throw new w("options.positions is required.");let n,i,o=e.minimumHeight,r=e.maximumHeight,s=c(o),a=c(r);if(s||a){let u=t.length;n=s?new Array(u):void 0,i=a?new Array(u):void 0;for(let f=0;f<u;++f)s&&(n[f]=o),a&&(i[f]=r)}let l={positions:t,maximumHeights:i,minimumHeights:n,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat};return new _0(l)};_0.createGeometry=function(e){let t=e._positions,n=e._minimumHeights,i=e._maximumHeights,o=e._vertexFormat,r=e._granularity,s=e._ellipsoid,a=yE.computePositions(s,t,i,n,r,!0);if(!c(a))return;let l=a.bottomPositions,u=a.topPositions,f=a.numCorners,h=u.length,m=h*2,p=o.position?new Float64Array(m):void 0,_=o.normal?new Float32Array(m):void 0,b=o.tangent?new Float32Array(m):void 0,x=o.bitangent?new Float32Array(m):void 0,T=o.st?new Float32Array(m/3*2):void 0,E=0,S=0,A=0,v=0,D=0,R=l$e,P=c$e,L=a$e,F=!0;h/=3;let y,I=0,M=1/(h-f-1);for(y=0;y<h;++y){let H=y*3,X=d.fromArray(u,H,PW),$=d.fromArray(l,H,p3);if(o.position&&(p[E++]=$.x,p[E++]=$.y,p[E++]=$.z,p[E++]=X.x,p[E++]=X.y,p[E++]=X.z),o.st&&(T[D++]=I,T[D++]=0,T[D++]=I,T[D++]=1),o.normal||o.tangent||o.bitangent){let ae=d.clone(d.ZERO,sue),se=d.subtract(X,s.geodeticSurfaceNormal(X,p3),p3);if(y+1<h&&(ae=d.fromArray(u,H+3,sue)),F){let he=d.subtract(ae,X,s$e),ge=d.subtract(se,X,PW);R=d.normalize(d.cross(ge,he,R),R),F=!1}d.equalsEpsilon(X,ae,O.EPSILON10)?F=!0:(I+=M,o.tangent&&(P=d.normalize(d.subtract(ae,X,P),P)),o.bitangent&&(L=d.normalize(d.cross(R,P,L),L))),o.normal&&(_[S++]=R.x,_[S++]=R.y,_[S++]=R.z,_[S++]=R.x,_[S++]=R.y,_[S++]=R.z),o.tangent&&(b[v++]=P.x,b[v++]=P.y,b[v++]=P.z,b[v++]=P.x,b[v++]=P.y,b[v++]=P.z),o.bitangent&&(x[A++]=L.x,x[A++]=L.y,x[A++]=L.z,x[A++]=L.x,x[A++]=L.y,x[A++]=L.z)}}let B=new fn;o.position&&(B.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:p})),o.normal&&(B.normal=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:_})),o.tangent&&(B.tangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:b})),o.bitangent&&(B.bitangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:x})),o.st&&(B.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:T}));let U=m/3;m-=6*(f+1);let V=Oe.createTypedArray(U,m),W=0;for(y=0;y<U-2;y+=2){let H=y,X=y+2,$=d.fromArray(p,H*3,PW),ae=d.fromArray(p,X*3,p3);if(d.equalsEpsilon($,ae,O.EPSILON10))continue;let se=y+1,he=y+3;V[W++]=se,V[W++]=H,V[W++]=he,V[W++]=he,V[W++]=H,V[W++]=X}return new st({attributes:B,indices:V,primitiveType:Se.TRIANGLES,boundingSphere:new ne.fromVertices(p)})};var _3=_0;var lue=new d,uue=new d;function g0(e){e=g(e,g.EMPTY_OBJECT);let t=e.positions,n=e.maximumHeights,i=e.minimumHeights;if(!c(t))throw new w("options.positions is required.");if(c(n)&&n.length!==t.length)throw new w("options.positions and options.maximumHeights must have the same length.");if(c(i)&&i.length!==t.length)throw new w("options.positions and options.minimumHeights must have the same length.");let o=g(e.granularity,O.RADIANS_PER_DEGREE),r=g(e.ellipsoid,Z.default);this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._granularity=o,this._ellipsoid=Z.clone(r),this._workerName="createWallOutlineGeometry";let s=1+t.length*d.packedLength+2;c(i)&&(s+=i.length),c(n)&&(s+=n.length),this.packedLength=s+Z.packedLength+1}g0.pack=function(e,t,n){if(!c(e))throw new w("value is required");if(!c(t))throw new w("array is required");n=g(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=d.packedLength)d.pack(o[i],t,n);let s=e._minimumHeights;if(r=c(s)?s.length:0,t[n++]=r,c(s))for(i=0;i<r;++i)t[n++]=s[i];let a=e._maximumHeights;if(r=c(a)?a.length:0,t[n++]=r,c(a))for(i=0;i<r;++i)t[n++]=a[i];return Z.pack(e._ellipsoid,t,n),n+=Z.packedLength,t[n]=e._granularity,t};var fue=Z.clone(Z.UNIT_SPHERE),Jv={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:fue,granularity:void 0};g0.unpack=function(e,t,n){if(!c(e))throw new w("array is required");t=g(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=d.packedLength)r[i]=d.unpack(e,t);o=e[t++];let s;if(o>0)for(s=new Array(o),i=0;i<o;++i)s[i]=e[t++];o=e[t++];let a;if(o>0)for(a=new Array(o),i=0;i<o;++i)a[i]=e[t++];let l=Z.unpack(e,t,fue);t+=Z.packedLength;let u=e[t];return c(n)?(n._positions=r,n._minimumHeights=s,n._maximumHeights=a,n._ellipsoid=Z.clone(l,n._ellipsoid),n._granularity=u,n):(Jv.positions=r,Jv.minimumHeights=s,Jv.maximumHeights=a,Jv.granularity=u,new g0(Jv))};g0.fromConstantHeights=function(e){e=g(e,g.EMPTY_OBJECT);let t=e.positions;if(!c(t))throw new w("options.positions is required.");let n,i,o=e.minimumHeight,r=e.maximumHeight,s=c(o),a=c(r);if(s||a){let u=t.length;n=s?new Array(u):void 0,i=a?new Array(u):void 0;for(let f=0;f<u;++f)s&&(n[f]=o),a&&(i[f]=r)}let l={positions:t,maximumHeights:i,minimumHeights:n,ellipsoid:e.ellipsoid};return new g0(l)};g0.createGeometry=function(e){let t=e._positions,n=e._minimumHeights,i=e._maximumHeights,o=e._granularity,r=e._ellipsoid,s=yE.computePositions(r,t,i,n,o,!1);if(!c(s))return;let a=s.bottomPositions,l=s.topPositions,u=l.length,f=u*2,h=new Float64Array(f),m=0;u/=3;let p;for(p=0;p<u;++p){let E=p*3,S=d.fromArray(l,E,lue),A=d.fromArray(a,E,uue);h[m++]=A.x,h[m++]=A.y,h[m++]=A.z,h[m++]=S.x,h[m++]=S.y,h[m++]=S.z}let _=new fn({position:new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:h})}),b=f/3;f=2*b-4+b;let x=Oe.createTypedArray(b,f),T=0;for(p=0;p<b-2;p+=2){let E=p,S=p+2,A=d.fromArray(h,E*3,lue),v=d.fromArray(h,S*3,uue);if(d.equalsEpsilon(A,v,O.EPSILON10))continue;let D=p+1,R=p+3;x[T++]=D,x[T++]=E,x[T++]=D,x[T++]=R,x[T++]=E,x[T++]=S}return x[T++]=b-2,x[T++]=b-1,new st({attributes:_,indices:x,primitiveType:Se.LINES,boundingSphere:new ne.fromVertices(h)})};var g3=g0;var due=new z;function u$e(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.minimumHeights=void 0,this.maximumHeights=void 0,this.granularity=void 0}function pd(e,t){Qn.call(this,{entity:e,scene:t,geometryOptions:new u$e(e),geometryPropertyName:"wall",observedPropertyNames:["availability","wall"]}),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}c(Object.create)&&(pd.prototype=Object.create(Qn.prototype),pd.prototype.constructor=pd);pd.prototype.createFillGeometryInstance=function(e){if(C.defined("time",e),!this._fillEnabled)throw new w("This instance does not represent a filled geometry.");let t=this._entity,n=t.isAvailable(e),i,o,r=new gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=Mn.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Ut){let l;c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(l=this._materialProperty.color.getValue(e,due)),c(l)||(l=z.WHITE),o=Ht.fromColor(l),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};return new wt({id:t,geometry:new _3(this._options),attributes:i})};pd.prototype.createOutlineGeometryInstance=function(e){if(C.defined("time",e),!this._outlineEnabled)throw new w("This instance does not represent an outlined geometry.");let t=this._entity,n=t.isAvailable(e),i=G.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,due),o=this._distanceDisplayConditionProperty.getValue(e);return new wt({id:t,geometry:new g3(this._options),attributes:{show:new gn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(i),distanceDisplayCondition:Mn.fromDistanceDisplayCondition(o)}})};pd.prototype._isHidden=function(e,t){return!c(t.positions)||Qn.prototype._isHidden.call(this,e,t)};pd.prototype._getIsClosed=function(e){return!1};pd.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!G.isConstant(t.minimumHeights)||!G.isConstant(t.maximumHeights)||!G.isConstant(t.outlineWidth)||!G.isConstant(t.granularity)};pd.prototype._setStaticOptions=function(e,t){let n=t.minimumHeights,i=t.maximumHeights,o=t.granularity,r=this._materialProperty instanceof Ut,s=this._options;s.vertexFormat=r?nn.VERTEX_FORMAT:eo.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(Ue.MINIMUM_VALUE,s.positions),s.minimumHeights=c(n)?n.getValue(Ue.MINIMUM_VALUE,s.minimumHeights):void 0,s.maximumHeights=c(i)?i.getValue(Ue.MINIMUM_VALUE,s.maximumHeights):void 0,s.granularity=c(o)?o.getValue(Ue.MINIMUM_VALUE):void 0};pd.DynamicGeometryUpdater=bE;function bE(e,t,n){Jn.call(this,e,t,n)}c(Object.create)&&(bE.prototype=Object.create(Jn.prototype),bE.prototype.constructor=bE);bE.prototype._isHidden=function(e,t,n){return!c(this._options.positions)||Jn.prototype._isHidden.call(this,e,t,n)};bE.prototype._setOptions=function(e,t,n){let i=this._options;i.positions=G.getValueOrUndefined(t.positions,n,i.positions),i.minimumHeights=G.getValueOrUndefined(t.minimumHeights,n,i.minimumHeights),i.maximumHeights=G.getValueOrUndefined(t.maximumHeights,n,i.maximumHeights),i.granularity=G.getValueOrUndefined(t.granularity,n)};var y3=pd;var y0=[rL,RB,wB,QB,e3,s3,u3,h3,m3,y3];function b0(e,t){this.entity=e,this.scene=t;let n=new Array(y0.length),i=new fe,o=new rl;for(let r=0;r<n.length;r++){let s=new y0[r](e,t);o.add(s.geometryChanged,a=>{i.raiseEvent(a)}),n[r]=s}this.updaters=n,this.geometryChanged=i,this.eventHelper=o,this._removeEntitySubscription=e.definitionChanged.addEventListener(b0.prototype._onEntityPropertyChanged,this)}b0.prototype._onEntityPropertyChanged=function(e,t,n,i){let o=this.updaters;for(let r=0;r<o.length;r++)o[r]._onEntityPropertyChanged(e,t,n,i)};b0.prototype.forEach=function(e){let t=this.updaters;for(let n=0;n<t.length;n++)e(t[n])};b0.prototype.destroy=function(){this.eventHelper.removeAll();let e=this.updaters;for(let t=0;t<e.length;t++)e[t].destroy();this._removeEntitySubscription(),ue(this)};b0.registerUpdater=function(e){y0.includes(e)||y0.push(e)};b0.unregisterUpdater=function(e){if(y0.includes(e)){let t=y0.indexOf(e);y0.splice(t,1)}};var xE=b0;var hue=new z,f$e=new Nt,d$e=new Nt,h$e=d.ZERO,m$e=new d;function _d(e,t,n,i,o,r,s){this.translucent=t,this.appearanceType=n,this.depthFailAppearanceType=i,this.depthFailMaterialProperty=o,this.depthFailMaterial=void 0,this.closed=r,this.shadows=s,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Et,this.updaters=new Et,this.updatersWithAttributes=new Et,this.attributes=new Et,this.subscriptions=new Et,this.showsUpdated=new Et,this.itemsToRemove=[],this.invalidated=!1;let a;c(o)&&(a=o.definitionChanged.addEventListener(_d.prototype.onMaterialChanged,this)),this.removeMaterialSubscription=a}_d.prototype.onMaterialChanged=function(){this.invalidated=!0};_d.prototype.isMaterial=function(e){let t=this.depthFailMaterialProperty,n=e.depthFailMaterialProperty;return n===t?!0:c(t)?t.equals(n):!1};_d.prototype.add=function(e,t){let n=e.id;if(this.createPrimitive=!0,this.geometry.set(n,t),this.updaters.set(n,e),!e.hasConstantFill||!e.fillMaterialProperty.isConstant||!G.isConstant(e.distanceDisplayConditionProperty)||!G.isConstant(e.terrainOffsetProperty))this.updatersWithAttributes.set(n,e);else{let i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(o,r,s,a){r==="isShowing"&&i.showsUpdated.set(e.id,e)}))}};_d.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return c(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};_d.prototype.update=function(e){let t=!0,n=0,i=this.primitive,o=this.primitives,r;if(this.createPrimitive){let s=this.geometry.values;if(s.length>0){c(i)&&(c(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i);let l;c(this.depthFailAppearanceType)&&(c(this.depthFailMaterialProperty)&&(this.depthFailMaterial=$o.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial)),l=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.translucent,closed:this.closed})),i=new An({show:!1,asynchronous:!0,geometryInstances:s.slice(),appearance:new this.appearanceType({translucent:this.translucent,closed:this.closed}),depthFailAppearance:l,shadows:this.shadows}),o.add(i),t=!1}else{c(i)&&(o.remove(i),i=void 0);let l=this.oldPrimitive;c(l)&&(o.remove(l),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(c(i)&&i.ready){i.show=!0,c(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0),c(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof Ut)&&(this.depthFailMaterial=$o.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);let s=this.updatersWithAttributes.values,a=s.length,l=this.waitingOnCreate;for(r=0;r<a;r++){let u=s[r],f=this.geometry.get(u.id),h=this.attributes.get(f.id.id);if(c(h)||(h=i.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,h)),!u.fillMaterialProperty.isConstant||l){let x=u.fillMaterialProperty.color,T=G.getValueOrDefault(x,e,z.WHITE,hue);z.equals(h._lastColor,T)||(h._lastColor=z.clone(T,h._lastColor),h.color=Ht.toValue(T,h.color),(this.translucent&&h.color[3]===255||!this.translucent&&h.color[3]!==255)&&(this.itemsToRemove[n++]=u))}if(c(this.depthFailAppearanceType)&&u.depthFailMaterialProperty instanceof Ut&&(!u.depthFailMaterialProperty.isConstant||l)){let x=u.depthFailMaterialProperty.color,T=G.getValueOrDefault(x,e,z.WHITE,hue);z.equals(h._lastDepthFailColor,T)||(h._lastDepthFailColor=z.clone(T,h._lastDepthFailColor),h.depthFailColor=Ht.toValue(T,h.depthFailColor))}let m=u.entity.isShowing&&(u.hasConstantFill||u.isFilled(e)),p=h.show[0]===1;m!==p&&(h.show=gn.toValue(m,h.show));let _=u.distanceDisplayConditionProperty;if(!G.isConstant(_)){let x=G.getValueOrDefault(_,e,d$e,f$e);Nt.equals(x,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Nt.clone(x,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=Mn.toValue(x,h.distanceDisplayCondition))}let b=u.terrainOffsetProperty;if(!G.isConstant(b)){let x=G.getValueOrDefault(b,e,h$e,m$e);d.equals(x,h._lastOffset)||(h._lastOffset=d.clone(x,h._lastOffset),h.offset=qi.toValue(x,h.offset))}}this.updateShows(i),this.waitingOnCreate=!1}else c(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};_d.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=this.geometry.get(o.id),s=this.attributes.get(r.id.id);c(s)||(s=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,s));let a=o.entity.isShowing,l=s.show[0]===1;a!==l&&(s.show=gn.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};_d.prototype.contains=function(e){return this.updaters.contains(e.id)};_d.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return lt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!c(i)||!c(i.boundingSphere)||c(i.show)&&i.show[0]===0?lt.FAILED:(i.boundingSphere.clone(t),lt.DONE)};_d.prototype.destroy=function(){let e=this.primitive,t=this.primitives;c(e)&&t.remove(e);let n=this.oldPrimitive;c(n)&&t.remove(n),c(this.removeMaterialSubscription)&&this.removeMaterialSubscription()};function TE(e,t,n,i,o){this._solidItems=[],this._translucentItems=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=n,this._closed=i,this._shadows=o}TE.prototype.add=function(e,t){let n,i,o=t.createFillGeometryInstance(e);o.attributes.color.value[3]===255?(n=this._solidItems,i=!1):(n=this._translucentItems,i=!0);let r=n.length;for(let a=0;a<r;a++){let l=n[a];if(l.isMaterial(t)){l.add(t,o);return}}let s=new _d(this._primitives,i,this._appearanceType,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);s.add(t,o),n.push(s)};function mue(e,t){let n=e.length;for(let i=n-1;i>=0;i--){let o=e[i];if(o.remove(t))return o.updaters.length===0&&(e.splice(i,1),o.destroy()),!0}return!1}TE.prototype.remove=function(e){mue(this._solidItems,e)||mue(this._translucentItems,e)};function pue(e,t,n){let i=!1,o=t.length;for(let r=0;r<o;++r){let s=t[r],a=s.itemsToRemove,l=a.length;if(l>0)for(r=0;r<l;r++){let u=a[r];s.remove(u),e.add(n,u),i=!0}}return i}function b3(e,t,n,i){let o=t.length,r;for(r=o-1;r>=0;r--){let s=t[r];if(s.invalidated){t.splice(r,1);let a=s.updaters.values,l=a.length;for(let u=0;u<l;u++)e.add(n,a[u]);s.destroy()}}for(o=t.length,r=0;r<o;++r)i=t[r].update(n)&&i;return i}TE.prototype.update=function(e){let t=b3(this,this._solidItems,e,!0);t=b3(this,this._translucentItems,e,t)&&t;let n=pue(this,this._solidItems,e),i=pue(this,this._translucentItems,e);return(n||i)&&(t=b3(this,this._solidItems,e,t)&&t,t=b3(this,this._translucentItems,e,t)&&t),t};function _ue(e,t,n){let i=e.length;for(let o=0;o<i;o++){let r=e[o];if(r.contains(t))return r.getBoundingSphere(t,n)}return lt.FAILED}TE.prototype.getBoundingSphere=function(e,t){let n=_ue(this._solidItems,e,t);return n===lt.FAILED?_ue(this._translucentItems,e,t):n};function gue(e){let t=e.length;for(let n=0;n<t;n++)e[n].destroy();e.length=0}TE.prototype.removeAllPrimitives=function(){gue(this._solidItems),gue(this._translucentItems)};var gd=TE;var p$e=new Nt,_$e=new Nt,g$e=d.ZERO,y$e=new d;function yd(e,t,n,i,o,r,s){this.primitives=e,this.appearanceType=t,this.materialProperty=n,this.depthFailAppearanceType=i,this.depthFailMaterialProperty=o,this.closed=r,this.shadows=s,this.updaters=new Et,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Et,this.material=void 0,this.depthFailMaterial=void 0,this.updatersWithAttributes=new Et,this.attributes=new Et,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(yd.prototype.onMaterialChanged,this),this.subscriptions=new Et,this.showsUpdated=new Et}yd.prototype.onMaterialChanged=function(){this.invalidated=!0};yd.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty,i=this.depthFailMaterialProperty,o=e.depthFailMaterialProperty;if(n===t&&o===i)return!0;let r=c(t)&&t.equals(n);return r=(!c(i)&&!c(o)||c(i)&&i.equals(o))&&r,r};yd.prototype.add=function(e,t){let n=t.id;if(this.updaters.set(n,t),this.geometry.set(n,t.createFillGeometryInstance(e)),!t.hasConstantFill||!t.fillMaterialProperty.isConstant||!G.isConstant(t.distanceDisplayConditionProperty)||!G.isConstant(t.terrainOffsetProperty))this.updatersWithAttributes.set(n,t);else{let i=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener(function(o,r,s,a){r==="isShowing"&&i.showsUpdated.set(t.id,t)}))}this.createPrimitive=!0};yd.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return c(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};var b$e=new z;yd.prototype.update=function(e){let t=!0,n=this.primitive,i=this.primitives,o=this.geometry.values,r;if(this.createPrimitive){if(o.length>0){c(n)&&(c(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),this.material=$o.getValue(e,this.materialProperty,this.material);let a;c(this.depthFailMaterialProperty)&&(this.depthFailMaterial=$o.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),a=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.depthFailMaterial.isTranslucent(),closed:this.closed})),n=new An({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new this.appearanceType({material:this.material,translucent:this.material.isTranslucent(),closed:this.closed}),depthFailAppearance:a,shadows:this.shadows}),i.add(n),t=!1}else{c(n)&&(i.remove(n),n=void 0);let a=this.oldPrimitive;c(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(c(n)&&n.ready){n.show=!0,c(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=$o.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,c(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof Ut)&&(this.depthFailMaterial=$o.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);let s=this.updatersWithAttributes.values,a=s.length;for(r=0;r<a;r++){let l=s[r],u=l.entity,f=this.geometry.get(l.id),h=this.attributes.get(f.id.id);if(c(h)||(h=n.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,h)),c(this.depthFailAppearanceType)&&this.depthFailMaterialProperty instanceof Ut&&!l.depthFailMaterialProperty.isConstant){let x=l.depthFailMaterialProperty.color,T=G.getValueOrDefault(x,e,z.WHITE,b$e);z.equals(h._lastDepthFailColor,T)||(h._lastDepthFailColor=z.clone(T,h._lastDepthFailColor),h.depthFailColor=Ht.toValue(T,h.depthFailColor))}let m=u.isShowing&&(l.hasConstantFill||l.isFilled(e)),p=h.show[0]===1;m!==p&&(h.show=gn.toValue(m,h.show));let _=l.distanceDisplayConditionProperty;if(!G.isConstant(_)){let x=G.getValueOrDefault(_,e,_$e,p$e);Nt.equals(x,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Nt.clone(x,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=Mn.toValue(x,h.distanceDisplayCondition))}let b=l.terrainOffsetProperty;if(!G.isConstant(b)){let x=G.getValueOrDefault(b,e,g$e,y$e);d.equals(x,h._lastOffset)||(h._lastOffset=d.clone(x,h._lastOffset),h.offset=qi.toValue(x,h.offset))}}this.updateShows(n)}else c(n)&&!n.ready&&(t=!1);return t};yd.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=o.entity,s=this.geometry.get(o.id),a=this.attributes.get(s.id.id);c(a)||(a=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,a));let l=r.isShowing,u=a.show[0]===1;l!==u&&(a.show=gn.toValue(l,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};yd.prototype.contains=function(e){return this.updaters.contains(e.id)};yd.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return lt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!c(i)||!c(i.boundingSphere)||c(i.show)&&i.show[0]===0?lt.FAILED:(i.boundingSphere.clone(t),lt.DONE)};yd.prototype.destroy=function(){let e=this.primitive,t=this.primitives;c(e)&&t.remove(e);let n=this.oldPrimitive;c(n)&&t.remove(n),this.removeMaterialSubscription()};function CE(e,t,n,i,o){this._items=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=n,this._closed=i,this._shadows=o}CE.prototype.add=function(e,t){let n=this._items,i=n.length;for(let r=0;r<i;r++){let s=n[r];if(s.isMaterial(t)){s.add(e,t);return}}let o=new yd(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);o.add(e,t),n.push(o)};CE.prototype.remove=function(e){let t=this._items,n=t.length;for(let i=n-1;i>=0;i--){let o=t[i];if(o.remove(e)){o.updaters.length===0&&(t.splice(i,1),o.destroy());break}}};CE.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];if(r.invalidated){n.splice(t,1);let s=r.updaters.values,a=s.length;for(let l=0;l<a;l++)this.add(e,s[l]);r.destroy()}}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o};CE.prototype.getBoundingSphere=function(e,t){let n=this._items,i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return lt.FAILED};CE.prototype.removeAllPrimitives=function(){let e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};var bd=CE;var bue=Mr(yue(),1);function x3(){this._tree=new bue.default}function x0(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.id=""}x0.fromRectangleAndId=function(e,t,n){return n.minX=t.west,n.minY=t.south,n.maxX=t.east,n.maxY=t.north,n.id=e,n};x3.prototype.insert=function(e,t){C.typeOf.string("id",e),C.typeOf.object("rectangle",t);let n=x0.fromRectangleAndId(e,t,new x0);this._tree.insert(n)};function x$e(e,t){return e.id===t.id}var T$e=new x0;x3.prototype.remove=function(e,t){C.typeOf.string("id",e),C.typeOf.object("rectangle",t);let n=x0.fromRectangleAndId(e,t,T$e);this._tree.remove(n,x$e)};var C$e=new x0;x3.prototype.collides=function(e){C.typeOf.object("rectangle",e);let t=x0.fromRectangleAndId("",e,C$e);return this._tree.collides(t)};var EE=x3;var E$e=new z,w$e=new Nt,S$e=new Nt;function Lp(e,t,n,i){this.primitives=e,this.zIndex=i,this.classificationType=t,this.color=n,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Et,this.updaters=new Et,this.updatersWithAttributes=new Et,this.attributes=new Et,this.subscriptions=new Et,this.showsUpdated=new Et,this.itemsToRemove=[],this.isDirty=!1,this.rectangleCollisionCheck=new EE}Lp.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)};Lp.prototype.add=function(e,t){let n=e.id;if(this.createPrimitive=!0,this.geometry.set(n,t),this.updaters.set(n,e),this.rectangleCollisionCheck.insert(n,t.geometry.rectangle),!e.hasConstantFill||!e.fillMaterialProperty.isConstant||!G.isConstant(e.distanceDisplayConditionProperty))this.updatersWithAttributes.set(n,e);else{let i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(o,r,s,a){r==="isShowing"&&i.showsUpdated.set(e.id,e)}))}};Lp.prototype.remove=function(e){let t=e.id,n=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,n.geometry.rectangle),this.updatersWithAttributes.remove(t);let i=this.subscriptions.get(t);return c(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};Lp.prototype.update=function(e){let t=!0,n=0,i=this.primitive,o=this.primitives,r;if(this.createPrimitive){let s=this.geometry.values;if(s.length>0)c(i)&&(c(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i),i=new Kc({show:!1,asynchronous:!0,geometryInstances:s.slice(),classificationType:this.classificationType}),o.add(i,this.zIndex),t=!1;else{c(i)&&(o.remove(i),i=void 0);let l=this.oldPrimitive;c(l)&&(o.remove(l),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(c(i)&&i.ready){i.show=!0,c(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);let s=this.updatersWithAttributes.values,a=s.length,l=this.waitingOnCreate;for(r=0;r<a;r++){let u=s[r],f=this.geometry.get(u.id),h=this.attributes.get(f.id.id);if(c(h)||(h=i.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,h)),!u.fillMaterialProperty.isConstant||l){let b=u.fillMaterialProperty.color,x=G.getValueOrDefault(b,e,z.WHITE,E$e);z.equals(h._lastColor,x)||(h._lastColor=z.clone(x,h._lastColor),h.color=Ht.toValue(x,h.color))}let m=u.entity.isShowing&&(u.hasConstantFill||u.isFilled(e)),p=h.show[0]===1;m!==p&&(h.show=gn.toValue(m,h.show));let _=u.distanceDisplayConditionProperty;if(!G.isConstant(_)){let b=G.getValueOrDefault(_,e,S$e,w$e);Nt.equals(b,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Nt.clone(b,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=Mn.toValue(b,h.distanceDisplayCondition))}}this.updateShows(i),this.waitingOnCreate=!1}else c(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};Lp.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=this.geometry.get(o.id),s=this.attributes.get(r.id.id);c(s)||(s=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,s));let a=o.entity.isShowing,l=s.show[0]===1;a!==l&&(s.show=gn.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};Lp.prototype.contains=function(e){return this.updaters.contains(e.id)};Lp.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return lt.PENDING;let i=n.getBoundingSphere(e.entity);return c(i)?(i.clone(t),lt.DONE):lt.FAILED};Lp.prototype.removeAllPrimitives=function(){let e=this.primitives,t=this.primitive;c(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());let n=this.oldPrimitive;c(n)&&(e.remove(n),this.oldPrimitive=void 0)};function wE(e,t){this._batches=[],this._primitives=e,this._classificationType=t}wE.prototype.add=function(e,t){let n=t.createFillGeometryInstance(e),i=this._batches,o=G.getValueOrDefault(t.zIndex,0),r,s=i.length;for(let a=0;a<s;++a){let l=i[a];if(l.zIndex===o&&!l.overlapping(n.geometry.rectangle)){r=l;break}}return c(r)||(r=new Lp(this._primitives,this._classificationType,n.attributes.color.value,o),i.push(r)),r.add(t,n),r};wE.prototype.remove=function(e){let t=this._batches,n=t.length;for(let i=0;i<n;++i)if(t[i].remove(e))return};wE.prototype.update=function(e){let t,n,i=!0,o=this._batches,r=o.length;for(t=0;t<r;++t)i=o[t].update(e)&&i;for(t=0;t<r;++t){let s=o[t],a=s.itemsToRemove,l=a.length;for(let u=0;u<l;u++){n=a[u],s.remove(n);let f=this.add(e,n);s.isDirty=!0,f.isDirty=!0}}for(t=r-1;t>=0;--t){let s=o[t];s.isDirty&&(i=o[t].update(e)&&i,s.isDirty=!1),s.geometry.length===0&&o.splice(t,1)}return i};wE.prototype.getBoundingSphere=function(e,t){let n=this._batches,i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return lt.FAILED};wE.prototype.removeAllPrimitives=function(){let e=this._batches,t=e.length;for(let n=0;n<t;++n)e[n].removeAllPrimitives()};var Qv=wE;var A$e=new Nt,v$e=new Nt;function gf(e,t,n,i,o,r){this.primitives=e,this.classificationType=t,this.appearanceType=n,this.materialProperty=i,this.updaters=new Et,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Et,this.material=void 0,this.updatersWithAttributes=new Et,this.attributes=new Et,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(gf.prototype.onMaterialChanged,this),this.subscriptions=new Et,this.showsUpdated=new Et,this.usingSphericalTextureCoordinates=o,this.zIndex=r,this.rectangleCollisionCheck=new EE}gf.prototype.onMaterialChanged=function(){this.invalidated=!0};gf.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)};gf.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof Ut&&t instanceof Ut?!0:c(t)&&t.equals(n)};gf.prototype.add=function(e,t,n){let i=t.id;if(this.updaters.set(i,t),this.geometry.set(i,n),this.rectangleCollisionCheck.insert(i,n.geometry.rectangle),!t.hasConstantFill||!t.fillMaterialProperty.isConstant||!G.isConstant(t.distanceDisplayConditionProperty))this.updatersWithAttributes.set(i,t);else{let o=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener(function(r,s,a,l){s==="isShowing"&&o.showsUpdated.set(t.id,t)}))}this.createPrimitive=!0};gf.prototype.remove=function(e){let t=e.id,n=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,n.geometry.rectangle),this.updatersWithAttributes.remove(t);let i=this.subscriptions.get(t);return c(i)&&(i(),this.subscriptions.remove(t)),!0}return!1};gf.prototype.update=function(e){let t=!0,n=this.primitive,i=this.primitives,o=this.geometry.values,r;if(this.createPrimitive){if(o.length>0)c(n)&&(c(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),this.material=$o.getValue(e,this.materialProperty,this.material),n=new Kc({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new this.appearanceType({material:this.material}),classificationType:this.classificationType}),i.add(n,this.zIndex),t=!1;else{c(n)&&(i.remove(n),n=void 0);let a=this.oldPrimitive;c(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(c(n)&&n.ready){n.show=!0,c(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=$o.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;let s=this.updatersWithAttributes.values,a=s.length;for(r=0;r<a;r++){let l=s[r],u=l.entity,f=this.geometry.get(l.id),h=this.attributes.get(f.id.id);c(h)||(h=n.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,h));let m=u.isShowing&&(l.hasConstantFill||l.isFilled(e)),p=h.show[0]===1;m!==p&&(h.show=gn.toValue(m,h.show));let _=l.distanceDisplayConditionProperty;if(!G.isConstant(_)){let b=G.getValueOrDefault(_,e,v$e,A$e);Nt.equals(b,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Nt.clone(b,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=Mn.toValue(b,h.distanceDisplayCondition))}}this.updateShows(n)}else c(n)&&!n.ready&&(t=!1);return t};gf.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=o.entity,s=this.geometry.get(o.id),a=this.attributes.get(s.id.id);c(a)||(a=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,a));let l=r.isShowing,u=a.show[0]===1;l!==u&&(a.show=gn.toValue(l,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};gf.prototype.contains=function(e){return this.updaters.contains(e.id)};gf.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return lt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!c(i)||!c(i.boundingSphere)||c(i.show)&&i.show[0]===0?lt.FAILED:(i.boundingSphere.clone(t),lt.DONE)};gf.prototype.destroy=function(){let e=this.primitive,t=this.primitives;c(e)&&t.remove(e);let n=this.oldPrimitive;c(n)&&t.remove(n),this.removeMaterialSubscription()};function SE(e,t,n){this._items=[],this._primitives=e,this._classificationType=t,this._appearanceType=n}SE.prototype.add=function(e,t){let n=this._items,i=n.length,o=t.createFillGeometryInstance(e),r=Nu.shouldUseSphericalCoordinates(o.geometry.rectangle),s=G.getValueOrDefault(t.zIndex,0);for(let l=0;l<i;++l){let u=n[l];if(u.isMaterial(t)&&u.usingSphericalTextureCoordinates===r&&u.zIndex===s&&!u.overlapping(o.geometry.rectangle)){u.add(e,t,o);return}}let a=new gf(this._primitives,this._classificationType,this._appearanceType,t.fillMaterialProperty,r,s);a.add(e,t,o),n.push(a)};SE.prototype.remove=function(e){let t=this._items,n=t.length;for(let i=n-1;i>=0;i--){let o=t[i];if(o.remove(e)){o.updaters.length===0&&(t.splice(i,1),o.destroy());break}}};SE.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];if(r.invalidated){n.splice(t,1);let s=r.updaters.values,a=s.length;for(let l=0;l<a;l++)this.add(e,s[l]);r.destroy()}}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o};SE.prototype.getBoundingSphere=function(e,t){let n=this._items,i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return lt.FAILED};SE.prototype.removeAllPrimitives=function(){let e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};var T3=SE;var D$e=new z,I$e=new Nt,O$e=new Nt,P$e=d.ZERO,R$e=new d;function Np(e,t,n,i){this.translucent=t,this.width=n,this.shadows=i,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Et,this.updaters=new Et,this.updatersWithAttributes=new Et,this.attributes=new Et,this.itemsToRemove=[],this.subscriptions=new Et,this.showsUpdated=new Et}Np.prototype.add=function(e,t){let n=e.id;if(this.createPrimitive=!0,this.geometry.set(n,t),this.updaters.set(n,e),!e.hasConstantOutline||!e.outlineColorProperty.isConstant||!G.isConstant(e.distanceDisplayConditionProperty)||!G.isConstant(e.terrainOffsetProperty))this.updatersWithAttributes.set(n,e);else{let i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(o,r,s,a){r==="isShowing"&&i.showsUpdated.set(e.id,e)}))}};Np.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return c(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};Np.prototype.update=function(e){let t=!0,n=0,i=this.primitive,o=this.primitives,r;if(this.createPrimitive){let s=this.geometry.values;if(s.length>0)c(i)&&(c(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i),i=new An({show:!1,asynchronous:!0,geometryInstances:s.slice(),appearance:new nn({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width}}),shadows:this.shadows}),o.add(i),t=!1;else{c(i)&&(o.remove(i),i=void 0);let l=this.oldPrimitive;c(l)&&(o.remove(l),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(c(i)&&i.ready){i.show=!0,c(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);let s=this.updatersWithAttributes.values,a=s.length,l=this.waitingOnCreate;for(r=0;r<a;r++){let u=s[r],f=this.geometry.get(u.id),h=this.attributes.get(f.id.id);if(c(h)||(h=i.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,h)),!u.outlineColorProperty.isConstant||l){let x=u.outlineColorProperty,T=G.getValueOrDefault(x,e,z.WHITE,D$e);z.equals(h._lastColor,T)||(h._lastColor=z.clone(T,h._lastColor),h.color=Ht.toValue(T,h.color),(this.translucent&&h.color[3]===255||!this.translucent&&h.color[3]!==255)&&(this.itemsToRemove[n++]=u))}let m=u.entity.isShowing&&(u.hasConstantOutline||u.isOutlineVisible(e)),p=h.show[0]===1;m!==p&&(h.show=gn.toValue(m,h.show));let _=u.distanceDisplayConditionProperty;if(!G.isConstant(_)){let x=G.getValueOrDefault(_,e,O$e,I$e);Nt.equals(x,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Nt.clone(x,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=Mn.toValue(x,h.distanceDisplayCondition))}let b=u.terrainOffsetProperty;if(!G.isConstant(b)){let x=G.getValueOrDefault(b,e,P$e,R$e);d.equals(x,h._lastOffset)||(h._lastOffset=d.clone(x,h._lastOffset),h.offset=qi.toValue(x,h.offset))}}this.updateShows(i),this.waitingOnCreate=!1}else c(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};Np.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=this.geometry.get(o.id),s=this.attributes.get(r.id.id);c(s)||(s=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,s));let a=o.entity.isShowing,l=s.show[0]===1;a!==l&&(s.show=gn.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};Np.prototype.contains=function(e){return this.updaters.contains(e.id)};Np.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return lt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!c(i)||!c(i.boundingSphere)||c(i.show)&&i.show[0]===0?lt.FAILED:(i.boundingSphere.clone(t),lt.DONE)};Np.prototype.removeAllPrimitives=function(){let e=this.primitives,t=this.primitive;c(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());let n=this.oldPrimitive;c(n)&&(e.remove(n),this.oldPrimitive=void 0)};function AE(e,t,n){this._primitives=e,this._scene=t,this._shadows=n,this._solidBatches=new Et,this._translucentBatches=new Et}AE.prototype.add=function(e,t){let n=t.createOutlineGeometryInstance(e),i=this._scene.clampLineWidth(t.outlineWidth),o,r;n.attributes.color.value[3]===255?(o=this._solidBatches,r=o.get(i),c(r)||(r=new Np(this._primitives,!1,i,this._shadows),o.set(i,r)),r.add(t,n)):(o=this._translucentBatches,r=o.get(i),c(r)||(r=new Np(this._primitives,!0,i,this._shadows),o.set(i,r)),r.add(t,n))};AE.prototype.remove=function(e){let t,n=this._solidBatches.values,i=n.length;for(t=0;t<i;t++)if(n[t].remove(e))return;let o=this._translucentBatches.values,r=o.length;for(t=0;t<r;t++)if(o[t].remove(e))return};AE.prototype.update=function(e){let t,n,i,o,r=this._solidBatches.values,s=r.length,a=this._translucentBatches.values,l=a.length,u,f=!0,h=!1;do{for(h=!1,n=0;n<s;n++){o=r[n],f=o.update(e),u=o.itemsToRemove;let m=u.length;if(m>0)for(h=!0,t=0;t<m;t++)i=u[t],o.remove(i),this.add(e,i)}for(n=0;n<l;n++){o=a[n],f=o.update(e),u=o.itemsToRemove;let m=u.length;if(m>0)for(h=!0,t=0;t<m;t++)i=u[t],o.remove(i),this.add(e,i)}}while(h);return f};AE.prototype.getBoundingSphere=function(e,t){let n,i=this._solidBatches.values,o=i.length;for(n=0;n<o;n++){let a=i[n];if(a.contains(e))return a.getBoundingSphere(e,t)}let r=this._translucentBatches.values,s=r.length;for(n=0;n<s;n++){let a=r[n];if(a.contains(e))return a.getBoundingSphere(e,t)}return lt.FAILED};AE.prototype.removeAllPrimitives=function(){let e,t=this._solidBatches.values,n=t.length;for(e=0;e<n;e++)t[e].removeAllPrimitives();let i=this._translucentBatches.values,o=i.length;for(e=0;e<o;e++)i[e].removeAllPrimitives()};var eD=AE;var M$e=[];function ll(e,t,n,i){C.defined("scene",e),C.defined("entityCollection",t),n=g(n,e.primitives),i=g(i,e.groundPrimitives),this._scene=e,this._primitives=n,this._groundPrimitives=i,this._entityCollection=void 0,this._addedObjects=new Et,this._removedObjects=new Et,this._changedObjects=new Et;let o=yn.NUMBER_OF_SHADOW_MODES;this._outlineBatches=new Array(o*2),this._closedColorBatches=new Array(o*2),this._closedMaterialBatches=new Array(o*2),this._openColorBatches=new Array(o*2),this._openMaterialBatches=new Array(o*2);let r=Ts.supportsMaterialsforEntitiesOnTerrain(e);this._supportsMaterialsforEntitiesOnTerrain=r;let s;for(s=0;s<o;++s)this._outlineBatches[s]=new eD(n,e,s,!1),this._outlineBatches[o+s]=new eD(n,e,s,!0),this._closedColorBatches[s]=new gd(n,nn,void 0,!0,s,!0),this._closedColorBatches[o+s]=new gd(n,nn,void 0,!0,s,!1),this._closedMaterialBatches[s]=new bd(n,eo,void 0,!0,s,!0),this._closedMaterialBatches[o+s]=new bd(n,eo,void 0,!0,s,!1),this._openColorBatches[s]=new gd(n,nn,void 0,!1,s,!0),this._openColorBatches[o+s]=new gd(n,nn,void 0,!1,s,!1),this._openMaterialBatches[s]=new bd(n,eo,void 0,!1,s,!0),this._openMaterialBatches[o+s]=new bd(n,eo,void 0,!1,s,!1);let a=Ln.NUMBER_OF_CLASSIFICATION_TYPES,l=new Array(a),u=[];if(r)for(s=0;s<a;++s)u.push(new T3(i,s,eo)),l[s]=new Qv(i,s);else for(s=0;s<a;++s)l[s]=new Qv(i,s);this._groundColorBatches=l,this._groundMaterialBatches=u,this._dynamicBatch=new oE(n,i),this._batches=this._outlineBatches.concat(this._closedColorBatches,this._closedMaterialBatches,this._openColorBatches,this._openMaterialBatches,this._groundColorBatches,this._groundMaterialBatches,this._dynamicBatch),this._subscriptions=new Et,this._updaterSets=new Et,this._entityCollection=t,t.collectionChanged.addEventListener(ll.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,M$e)}ll.registerUpdater=function(e){xE.registerUpdater(e)};ll.unregisterUpdater=function(e){xE.unregisterUpdater(e)};ll.prototype.update=function(e){C.defined("time",e);let t=this._addedObjects,n=t.values,i=this._removedObjects,o=i.values,r=this._changedObjects,s=r.values,a,l,u,f,h=this;for(a=s.length-1;a>-1;a--)l=s[a],u=l.id,f=this._updaterSets.get(u),f.entity===l?f.forEach(function(b){h._removeUpdater(b),h._insertUpdaterIntoBatch(e,b)}):(o.push(l),n.push(l));for(a=o.length-1;a>-1;a--)l=o[a],u=l.id,f=this._updaterSets.get(u),f.forEach(this._removeUpdater.bind(this)),f.destroy(),this._updaterSets.remove(u),this._subscriptions.get(u)(),this._subscriptions.remove(u);for(a=n.length-1;a>-1;a--)l=n[a],u=l.id,f=new xE(l,this._scene),this._updaterSets.set(u,f),f.forEach(function(b){h._insertUpdaterIntoBatch(e,b)}),this._subscriptions.set(u,f.geometryChanged.addEventListener(ll._onGeometryChanged,this));t.removeAll(),i.removeAll(),r.removeAll();let m=!0,p=this._batches,_=p.length;for(a=0;a<_;a++)m=p[a].update(e)&&m;return m};var L$e=[],N$e=new ne;ll.prototype.getBoundingSphere=function(e,t){C.defined("entity",e),C.defined("result",t);let n=L$e,i=N$e,o=0,r=lt.DONE,s=this._batches,a=s.length,l=e.id,u=this._updaterSets.get(l).updaters;for(let f=0;f<u.length;f++){let h=u[f];for(let m=0;m<a;m++){if(r=s[m].getBoundingSphere(h,i),r===lt.PENDING)return lt.PENDING;r===lt.DONE&&(n[o]=ne.clone(i,n[o]),o++)}}return o===0?lt.FAILED:(n.length=o,ne.fromBoundingSpheres(n,t),lt.DONE)};ll.prototype.isDestroyed=function(){return!1};ll.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(ll.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();let e,t=this._batches,n=t.length;for(e=0;e<n;e++)t[e].removeAllPrimitives();let i=this._subscriptions.values;for(n=i.length,e=0;e<n;e++)i[e]();this._subscriptions.removeAll();let o=this._updaterSets.values;for(n=o.length,e=0;e<n;e++)o[e].destroy();return this._updaterSets.removeAll(),ue(this)};ll.prototype._removeUpdater=function(e){let t=this._batches,n=t.length;for(let i=0;i<n;i++)t[i].remove(e)};ll.prototype._insertUpdaterIntoBatch=function(e,t){if(t.isDynamic){this._dynamicBatch.add(e,t);return}let n;(t.outlineEnabled||t.fillEnabled)&&(n=t.shadowsProperty.getValue(e));let i=yn.NUMBER_OF_SHADOW_MODES;if(t.outlineEnabled&&(c(t.terrainOffsetProperty)?this._outlineBatches[i+n].add(e,t):this._outlineBatches[n].add(e,t)),t.fillEnabled)if(t.onTerrain){let o=t.classificationTypeProperty.getValue(e);t.fillMaterialProperty instanceof Ut?this._groundColorBatches[o].add(e,t):this._groundMaterialBatches[o].add(e,t)}else t.isClosed?t.fillMaterialProperty instanceof Ut?c(t.terrainOffsetProperty)?this._closedColorBatches[i+n].add(e,t):this._closedColorBatches[n].add(e,t):c(t.terrainOffsetProperty)?this._closedMaterialBatches[i+n].add(e,t):this._closedMaterialBatches[n].add(e,t):t.fillMaterialProperty instanceof Ut?c(t.terrainOffsetProperty)?this._openColorBatches[i+n].add(e,t):this._openColorBatches[n].add(e,t):c(t.terrainOffsetProperty)?this._openMaterialBatches[i+n].add(e,t):this._openMaterialBatches[n].add(e,t)};ll._onGeometryChanged=function(e){let t=this._removedObjects,n=this._changedObjects,i=e.entity,o=i.id;!c(t.get(o))&&!c(n.get(o))&&n.set(o,i)};ll.prototype._onCollectionChanged=function(e,t,n){let i=this._addedObjects,o=this._removedObjects,r=this._changedObjects,s,a,l;for(s=n.length-1;s>-1;s--)l=n[s],a=l.id,i.remove(a)||(o.set(a,l),r.remove(a));for(s=t.length-1;s>-1;s--)l=t[s],a=l.id,o.remove(a)?r.set(a,l):i.set(a,l)};var C3=ll;var F$e=1,B$e="30px sans-serif",k$e=Uo.FILL,U$e=z.WHITE,z$e=z.BLACK,V$e=1,H$e=!1,G$e=new z(.165,.165,.165,.8),j$e=new k(7,5),W$e=k.ZERO,q$e=d.ZERO,Y$e=qe.NONE,X$e=mi.CENTER,K$e=Dn.CENTER,$$e=new d,Z$e=new z,J$e=new z,Q$e=new z,eZe=new k,tZe=new d,nZe=new k,iZe=new Bt,oZe=new Bt,rZe=new Bt,sZe=new Nt;function xue(e){this.entity=e,this.label=void 0,this.index=void 0}function jg(e,t){if(!c(e))throw new w("entityCluster is required.");if(!c(t))throw new w("entityCollection is required.");t.collectionChanged.addEventListener(jg.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new Et,this._onCollectionChanged(t,t.values,[],[])}jg.prototype.update=function(e){if(!c(e))throw new w("time is required.");let t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){let r=t[i],s=r.entity,a=s._label,l,u=r.label,f=s.isShowing&&s.isAvailable(e)&&G.getValueOrDefault(a._show,e,!0),h;if(f&&(h=G.getValueOrUndefined(s._position,e,$$e),l=G.getValueOrUndefined(a._text,e),f=c(h)&&c(l)),!f){LW(r,s,n);continue}G.isConstant(s._position)||(n._clusterDirty=!0);let m=!1,p=G.getValueOrDefault(a._heightReference,e,Y$e);c(u)||(u=n.getLabel(s),u.id=s,r.label=u,m=d.equals(u.position,h)&&u.heightReference===p),u.show=!0,u.position=h,u.text=l,u.scale=G.getValueOrDefault(a._scale,e,F$e),u.font=G.getValueOrDefault(a._font,e,B$e),u.style=G.getValueOrDefault(a._style,e,k$e),u.fillColor=G.getValueOrDefault(a._fillColor,e,U$e,Z$e),u.outlineColor=G.getValueOrDefault(a._outlineColor,e,z$e,J$e),u.outlineWidth=G.getValueOrDefault(a._outlineWidth,e,V$e),u.showBackground=G.getValueOrDefault(a._showBackground,e,H$e),u.backgroundColor=G.getValueOrDefault(a._backgroundColor,e,G$e,Q$e),u.backgroundPadding=G.getValueOrDefault(a._backgroundPadding,e,j$e,eZe),u.pixelOffset=G.getValueOrDefault(a._pixelOffset,e,W$e,nZe),u.eyeOffset=G.getValueOrDefault(a._eyeOffset,e,q$e,tZe),u.heightReference=p,u.horizontalOrigin=G.getValueOrDefault(a._horizontalOrigin,e,X$e),u.verticalOrigin=G.getValueOrDefault(a._verticalOrigin,e,K$e),u.translucencyByDistance=G.getValueOrUndefined(a._translucencyByDistance,e,iZe),u.pixelOffsetScaleByDistance=G.getValueOrUndefined(a._pixelOffsetScaleByDistance,e,oZe),u.scaleByDistance=G.getValueOrUndefined(a._scaleByDistance,e,rZe),u.distanceDisplayCondition=G.getValueOrUndefined(a._distanceDisplayCondition,e,sZe),u.disableDepthTestDistance=G.getValueOrUndefined(a._disableDepthTestDistance,e),m&&u._updateClamping()}return!0};jg.prototype.getBoundingSphere=function(e,t){if(!c(e))throw new w("entity is required.");if(!c(t))throw new w("result is required.");let n=this._items.get(e.id);if(!c(n)||!c(n.label))return lt.FAILED;let i=n.label;return t.center=d.clone(g(i._clampedPosition,i.position),t.center),t.radius=0,lt.DONE};jg.prototype.isDestroyed=function(){return!1};jg.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(jg.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removeLabel(e[t]);return ue(this)};jg.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._items,a=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],c(r._label)&&c(r._position)&&s.set(r.id,new xue(r));for(o=i.length-1;o>-1;o--)r=i[o],c(r._label)&&c(r._position)?s.contains(r.id)||s.set(r.id,new xue(r)):(LW(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],LW(s.get(r.id),r,a),s.remove(r.id)};function LW(e,t,n){c(e)&&(e.label=void 0,n.removeLabel(t))}var E3=jg;var aZe=1,cZe=!0,lZe=0,uZe=!0,fZe=!0,dZe=yn.ENABLED,hZe=qe.NONE,mZe=z.RED,pZe=0,_Ze=z.WHITE,gZe=_c.HIGHLIGHT,yZe=.5,bZe=new k(1,1),xZe=new N,TZe=new N,Tue=new z,Cue=new Array(4),CZe=new d;function Wg(e,t){C.typeOf.object("scene",e),C.typeOf.object("entityCollection",t),t.collectionChanged.addEventListener(Wg.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._modelHash={},this._entitiesToVisualize=new Et,this._onCollectionChanged(t,t.values,[],[])}async function EZe(e,t,n,i){let o=e._primitives,r=e._modelHash;try{let s=await Dh.fromGltfAsync({url:n,incrementallyLoadTextures:i,scene:e._scene});if(e.isDestroyed()||!c(r[t.id]))return;s.id=t,o.add(s),r[t.id].modelPrimitive=s,s.errorEvent.addEventListener(a=>{c(r[t.id])&&(console.log(a),a.name!=="TextureError"&&s.incrementallyLoadTextures&&(r[t.id].loadFailed=!0))})}catch(s){if(e.isDestroyed()||!c(r[t.id]))return;console.log(s),r[t.id].loadFailed=!0}}Wg.prototype.update=function(e){if(!c(e))throw new w("time is required.");let t=this._entitiesToVisualize.values,n=this._modelHash,i=this._primitives;for(let o=0,r=t.length;o<r;o++){let s=t[o],a=s._model,l,u=n[s.id],f=s.isShowing&&s.isAvailable(e)&&G.getValueOrDefault(a._show,e,!0),h;if(f&&(h=s.computeModelMatrix(e,xZe),l=Te.createIfNeeded(G.getValueOrUndefined(a._uri,e)),f=c(h)&&c(l)),!f){c(u)&&u.modelPrimitive&&(u.modelPrimitive.show=!1);continue}if(!c(u)||l.url!==u.url){c(u==null?void 0:u.modelPrimitive)&&(i.removeAndDestroy(u.modelPrimitive),delete n[s.id]),u={modelPrimitive:void 0,url:l.url,animationsRunning:!1,nodeTransformationsScratch:{},articulationsScratch:{},loadFailed:!1,modelUpdated:!1},n[s.id]=u;let _=G.getValueOrDefault(a._incrementallyLoadTextures,e,uZe);EZe(this,s,l,_)}let m=u.modelPrimitive;if(!c(m))continue;m.show=!0,m.scale=G.getValueOrDefault(a._scale,e,aZe),m.enableVerticalExaggeration=G.getValueOrDefault(a._enableVerticalExaggeration,e,cZe),m.minimumPixelSize=G.getValueOrDefault(a._minimumPixelSize,e,lZe),m.maximumScale=G.getValueOrUndefined(a._maximumScale,e),m.modelMatrix=N.clone(h,m.modelMatrix),m.shadows=G.getValueOrDefault(a._shadows,e,dZe),m.heightReference=G.getValueOrDefault(a._heightReference,e,hZe),m.distanceDisplayCondition=G.getValueOrUndefined(a._distanceDisplayCondition,e),m.silhouetteColor=G.getValueOrDefault(a._silhouetteColor,e,mZe,Tue),m.silhouetteSize=G.getValueOrDefault(a._silhouetteSize,e,pZe),m.color=G.getValueOrDefault(a._color,e,_Ze,Tue),m.colorBlendMode=G.getValueOrDefault(a._colorBlendMode,e,gZe),m.colorBlendAmount=G.getValueOrDefault(a._colorBlendAmount,e,yZe),m.clippingPlanes=G.getValueOrUndefined(a._clippingPlanes,e),m.clampAnimations=G.getValueOrDefault(a._clampAnimations,e,fZe),m.imageBasedLighting.imageBasedLightingFactor=G.getValueOrDefault(a._imageBasedLightingFactor,e,bZe);let p=G.getValueOrUndefined(a._lightColor,e);if(c(p)&&(z.pack(p,Cue,0),p=d.unpack(Cue,0,CZe)),m.lightColor=p,m.customShader=G.getValueOrUndefined(a._customShader,e),n[s.id].modelUpdated=!0,m.ready){let _=G.getValueOrDefault(a._runAnimations,e,!0);u.animationsRunning!==_&&(_?m.activeAnimations.addAll({loop:Hl.REPEAT}):m.activeAnimations.removeAll(),u.animationsRunning=_);let b=G.getValueOrUndefined(a._nodeTransformations,e,u.nodeTransformationsScratch);if(c(b)){let E=Object.keys(b);for(let S=0,A=E.length;S<A;++S){let v=E[S],D=b[v];if(!c(D))continue;let R=m.getNode(v);if(!c(R))continue;let P=N.fromTranslationRotationScale(D,TZe);R.matrix=N.multiply(R.originalMatrix,P,P)}}let x=!1,T=G.getValueOrUndefined(a._articulations,e,u.articulationsScratch);if(c(T)){let E=Object.keys(T);for(let S=0,A=E.length;S<A;++S){let v=E[S],D=T[v];c(D)&&(x=!0,m.setArticulationStage(v,D))}}x&&m.applyArticulations()}}return!0};Wg.prototype.isDestroyed=function(){return!1};Wg.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Wg.prototype._onCollectionChanged,this);let e=this._entitiesToVisualize.values,t=this._modelHash,n=this._primitives;for(let i=e.length-1;i>-1;i--)NW(this,e[i],t,n);return ue(this)};var w3=new d,wZe=new re;Wg.prototype.getBoundingSphere=function(e,t){if(!c(e))throw new w("entity is required.");if(!c(t))throw new w("result is required.");let n=this._modelHash[e.id];if(!c(n))return lt.FAILED;if(n.loadFailed)return lt.FAILED;let i=n.modelPrimitive;if(!c(i)||!i.show)return lt.PENDING;if(!i.ready||!n.modelUpdated)return lt.PENDING;let o=this._scene,r=g(o.ellipsoid,Z.default);if(i.heightReference!==qe.NONE){let a=i.modelMatrix;w3.x=a[12],w3.y=a[13],w3.z=a[14];let l=r.cartesianToCartographic(w3,wZe),u=o.getHeight(l,i.heightReference);return c(u)&&(Mu(i.heightReference)?l.height=u:l.height+=u),ne.clone(i.boundingSphere,t),t.center=r.cartographicToCartesian(l),lt.DONE}return ne.clone(i.boundingSphere,t),lt.DONE};Wg.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._entitiesToVisualize,a=this._modelHash,l=this._primitives;for(o=t.length-1;o>-1;o--)r=t[o],c(r._model)&&c(r._position)&&s.set(r.id,r);for(o=i.length-1;o>-1;o--)r=i[o],c(r._model)&&c(r._position)?(SZe(r,a),s.set(r.id,r)):(NW(this,r,a,l),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],NW(this,r,a,l),s.remove(r.id)};function NW(e,t,n,i){let o=n[t.id];c(o)&&(i.removeAndDestroy(o.modelPrimitive),delete n[t.id])}function SZe(e,t){let n=t[e.id];c(n)&&(n.nodeTransformationsScratch={},n.articulationsScratch={})}var S3=Wg;function qg(e){this._definitionChanged=new fe,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}Object.defineProperties(qg.prototype,{isConstant:{get:function(){return G.isConstant(this._value)}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return c(this._value)?this._value.referenceFrame:Ni.FIXED}}});var AZe=new K;qg.prototype.getValue=function(e,t){return c(e)||(e=K.now(AZe)),this.getValueInReferenceFrame(e,Ni.FIXED,t)};qg.prototype.setValue=function(e){this._value!==e&&(this._value=e,c(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0),c(e)&&(this._removeSubscription=e.definitionChanged.addEventListener(this._raiseDefinitionChanged,this)),this._definitionChanged.raiseEvent(this))};qg.prototype.getValueInReferenceFrame=function(e,t,n){if(!c(e))throw new w("time is required.");if(!c(t))throw new w("referenceFrame is required.");if(c(this._value))return n=this._value.getValueInReferenceFrame(e,t,n),c(n)?Z.default.scaleToGeodeticSurface(n,n):void 0};qg.prototype.equals=function(e){return this===e||e instanceof qg&&this._value===e._value};qg.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var Fp=qg;var vZe=60,DZe=1,wue=new En,FW=new En,BW=new En;function Eue(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}function IZe(e,t,n,i,o,r,s,a,l){let u=a,f;f=e.getValueInReferenceFrame(t,r,l[u]),c(f)&&(l[u++]=f);let h=!c(o)||K.lessThanOrEquals(o,t)||K.greaterThanOrEquals(o,n),m=0,p=i.length,_=i[m],b=n,x=!1,T,E,S;for(;m<p;){if(!h&&K.greaterThanOrEquals(_,o)&&(f=e.getValueInReferenceFrame(o,r,l[u]),c(f)&&(l[u++]=f),h=!0),K.greaterThan(_,t)&&K.lessThan(_,b)&&!_.equals(o)&&(f=e.getValueInReferenceFrame(_,r,l[u]),c(f)&&(l[u++]=f)),m<p-1){if(s>0&&!x){let A=i[m+1],v=K.secondsDifference(A,_);x=v>s,x&&(T=Math.ceil(v/s),E=0,S=v/Math.max(T,2),T=Math.max(T-1,1))}if(x&&E<T){_=K.addSeconds(_,S,new K),E++;continue}}x=!1,m++,_=i[m]}return f=e.getValueInReferenceFrame(n,r,l[u]),c(f)&&(l[u++]=f),u}function OZe(e,t,n,i,o,r,s,a){let l,u=0,f=s,h=t,m=!c(i)||K.lessThanOrEquals(i,t)||K.greaterThanOrEquals(i,n);for(;K.lessThan(h,n);)!m&&K.greaterThanOrEquals(h,i)&&(m=!0,l=e.getValueInReferenceFrame(i,o,a[f]),c(l)&&(a[f]=l,f++)),l=e.getValueInReferenceFrame(h,o,a[f]),c(l)&&(a[f]=l,f++),u++,h=K.addSeconds(t,r*u,new K);return l=e.getValueInReferenceFrame(n,o,a[f]),c(l)&&(a[f]=l,f++),f}function PZe(e,t,n,i,o,r,s,a){let l,u=0,f=s,h=t,m=Math.max(r,60),p=!c(i)||K.lessThanOrEquals(i,t)||K.greaterThanOrEquals(i,n);for(;K.lessThan(h,n);)!p&&K.greaterThanOrEquals(h,i)&&(p=!0,l=e.getValueInReferenceFrame(i,o,a[f]),c(l)&&(a[f]=l,f++)),l=e.getValueInReferenceFrame(h,o,a[f]),c(l)&&(a[f]=l,f++),u++,h=K.addSeconds(t,m*u,new K);return l=e.getValueInReferenceFrame(n,o,a[f]),c(l)&&(a[f]=l,f++),f}function RZe(e,t,n,i,o,r,s,a){BW.start=t,BW.stop=n;let l=s,u=e.intervals;for(let f=0;f<u.length;f++){let h=u.get(f);if(!En.intersect(h,BW,wue).isEmpty){let m=h.start;h.isStartIncluded||(h.isStopIncluded?m=h.stop:m=K.addSeconds(h.start,K.secondsDifference(h.stop,h.start)/2,new K));let p=e.getValueInReferenceFrame(m,o,a[l]);c(p)&&(a[l]=p,l++)}}return l}function MZe(e,t,n,i,o,r,s,a){let l=e.getValueInReferenceFrame(t,o,a[s]);return c(l)&&(a[s++]=l),s}function LZe(e,t,n,i,o,r,s,a){FW.start=t,FW.stop=n;let l=s,u=e.intervals;for(let f=0;f<u.length;f++){let h=u.get(f);if(!En.intersect(h,FW,wue).isEmpty){let m=h.start,p=h.stop,_=t;K.greaterThan(m,_)&&(_=m);let b=n;K.lessThan(p,b)&&(b=p),l=Sue(h.data,_,b,i,o,r,l,a)}}return l}function Sue(e,t,n,i,o,r,s,a){for(;e instanceof Fg;)e=e.resolvedProperty;if(e instanceof da){let l=e._property._times;s=IZe(e,t,n,l,i,o,r,s,a)}else e instanceof sL?s=OZe(e,t,n,i,o,r,s,a):e instanceof fa?s=LZe(e,t,n,i,o,r,s,a):e instanceof kg?s=RZe(e,t,n,i,o,r,s,a):e instanceof Bu||e instanceof Fp&&G.isConstant(e)?s=MZe(e,t,n,i,o,r,s,a):s=PZe(e,t,n,i,o,r,s,a);return s}function Aue(e,t,n,i,o,r,s){c(s)||(s=[]);let a=Sue(e,t,n,i,o,r,0,s);return s.length=a,s}var NZe=new q;function tD(e,t){this._unusedIndexes=[],this._polylineCollection=new Rh,this._scene=e,this._referenceFrame=t,e.primitives.add(this._polylineCollection)}tD.prototype.update=function(e){if(this._referenceFrame===Ni.INERTIAL){let t=Lt.computeIcrfToCentralBodyFixedMatrix(e,NZe);N.fromRotationTranslation(t,d.ZERO,this._polylineCollection.modelMatrix)}};tD.prototype.updateObject=function(e,t){let n=t.entity,i=n._path,o=n._position,r,s,a=i._show,l=t.polyline,u=n.isShowing&&n.isAvailable(e)&&(!c(a)||a.getValue(e));if(u){let h=G.getValueOrUndefined(i._leadTime,e),m=G.getValueOrUndefined(i._trailTime,e),p=n._availability,_=c(p),b=c(h),x=c(m);if(u=_||b&&x,u){if(x&&(r=K.addSeconds(e,-m,new K)),b&&(s=K.addSeconds(e,h,new K)),_){let T=p.start,E=p.stop;(!x||K.greaterThan(T,r))&&(r=T),(!b||K.lessThan(E,s))&&(s=E)}u=K.lessThan(r,s)}}if(!u){c(l)&&(this._unusedIndexes.push(t.index),t.polyline=void 0,l.show=!1,t.index=void 0);return}if(!c(l)){let h=this._unusedIndexes;if(h.length>0){let p=h.pop();l=this._polylineCollection.get(p),t.index=p}else t.index=this._polylineCollection.length,l=this._polylineCollection.add();l.id=n,t.polyline=l}let f=G.getValueOrDefault(i._resolution,e,vZe);l.show=!0,l.positions=Aue(o,r,s,e,this._referenceFrame,f,l.positions.slice()),l.material=$o.getValue(e,i._material,l.material),l.width=G.getValueOrDefault(i._width,e,DZe),l.distanceDisplayCondition=G.getValueOrUndefined(i._distanceDisplayCondition,e,l.distanceDisplayCondition)};tD.prototype.removeObject=function(e){let t=e.polyline;c(t)&&(this._unusedIndexes.push(e.index),e.polyline=void 0,t.show=!1,t.id=void 0,e.index=void 0)};tD.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),ue(this)};function Yg(e,t){if(!c(e))throw new w("scene is required.");if(!c(t))throw new w("entityCollection is required.");t.collectionChanged.addEventListener(Yg.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new Et,this._onCollectionChanged(t,t.values,[],[])}Yg.prototype.update=function(e){if(!c(e))throw new w("time is required.");let t=this._updaters;for(let i in t)t.hasOwnProperty(i)&&t[i].update(e);let n=this._items.values;if(n.length===0&&c(this._updaters)&&Object.keys(this._updaters).length>0){for(let i in t)t.hasOwnProperty(i)&&t[i].destroy();this._updaters={}}for(let i=0,o=n.length;i<o;i++){let r=n[i],a=r.entity._position,l=r.updater,u=Ni.FIXED;this._scene.mode===J.SCENE3D&&(u=a.referenceFrame);let f=this._updaters[u];if(l===f&&c(f)){f.updateObject(e,r);continue}c(l)&&l.removeObject(r),c(f)||(f=new tD(this._scene,u),f.update(e),this._updaters[u]=f),r.updater=f,c(f)&&f.updateObject(e,r)}return!0};Yg.prototype.isDestroyed=function(){return!1};Yg.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Yg.prototype._onCollectionChanged,this);let e=this._updaters;for(let t in e)e.hasOwnProperty(t)&&e[t].destroy();return ue(this)};Yg.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s,a=this._items;for(o=t.length-1;o>-1;o--)r=t[o],c(r._path)&&c(r._position)&&a.set(r.id,new Eue(r));for(o=i.length-1;o>-1;o--)r=i[o],c(r._path)&&c(r._position)?a.contains(r.id)||a.set(r.id,new Eue(r)):(s=a.get(r.id),c(s)&&(c(s.updater)&&s.updater.removeObject(s),a.remove(r.id)));for(o=n.length-1;o>-1;o--)r=n[o],s=a.get(r.id),c(s)&&(c(s.updater)&&s.updater.removeObject(s),a.remove(r.id))};Yg._subSample=Aue;var A3=Yg;var vue=z.WHITE,Due=z.BLACK,Iue=0,Oue=1,Pue=0,Rue=Nr.NONE,Mue=new z,FZe=new d,Lue=new z,Nue=new Bt,Fue=new Bt,Bue=new Nt;function kue(e){this.entity=e,this.pointPrimitive=void 0,this.billboard=void 0,this.color=void 0,this.outlineColor=void 0,this.pixelSize=void 0,this.outlineWidth=void 0}function Xg(e,t){if(!c(e))throw new w("entityCluster is required.");if(!c(t))throw new w("entityCollection is required.");t.collectionChanged.addEventListener(Xg.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new Et,this._onCollectionChanged(t,t.values,[],[])}Xg.prototype.update=function(e){if(!c(e))throw new w("time is required.");let t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){let r=t[i],s=r.entity,a=s._point,l=r.pointPrimitive,u=r.billboard,f=G.getValueOrDefault(a._heightReference,e,qe.NONE),h=s.isShowing&&s.isAvailable(e)&&G.getValueOrDefault(a._show,e,!0),m;if(h&&(m=G.getValueOrUndefined(s._position,e,FZe),h=c(m)),!h){nD(r,s,n);continue}G.isConstant(s._position)||(n._clusterDirty=!0);let p=!1,_=!1;if(f!==qe.NONE&&!c(u)?(c(l)&&(nD(r,s,n),l=void 0),u=n.getBillboard(s),u.id=s,u.image=void 0,r.billboard=u,p=!0,_=d.equals(u.position,m)&&u.heightReference===f):f===qe.NONE&&!c(l)&&(c(u)&&(nD(r,s,n),u=void 0),l=n.getPoint(s),l.id=s,r.pointPrimitive=l),c(l))l.show=!0,l.position=m,l.scaleByDistance=G.getValueOrUndefined(a._scaleByDistance,e,Nue),l.translucencyByDistance=G.getValueOrUndefined(a._translucencyByDistance,e,Fue),l.color=G.getValueOrDefault(a._color,e,vue,Mue),l.outlineColor=G.getValueOrDefault(a._outlineColor,e,Due,Lue),l.outlineWidth=G.getValueOrDefault(a._outlineWidth,e,Iue),l.pixelSize=G.getValueOrDefault(a._pixelSize,e,Oue),l.distanceDisplayCondition=G.getValueOrUndefined(a._distanceDisplayCondition,e,Bue),l.disableDepthTestDistance=G.getValueOrDefault(a._disableDepthTestDistance,e,Pue),l.splitDirection=G.getValueOrDefault(a._splitDirection,e,Rue);else if(c(u)){u.show=!0,u.position=m,u.scaleByDistance=G.getValueOrUndefined(a._scaleByDistance,e,Nue),u.translucencyByDistance=G.getValueOrUndefined(a._translucencyByDistance,e,Fue),u.distanceDisplayCondition=G.getValueOrUndefined(a._distanceDisplayCondition,e,Bue),u.disableDepthTestDistance=G.getValueOrDefault(a._disableDepthTestDistance,e,Pue),u.splitDirection=G.getValueOrDefault(a._splitDirection,e,Rue),u.heightReference=f;let b=G.getValueOrDefault(a._color,e,vue,Mue),x=G.getValueOrDefault(a._outlineColor,e,Due,Lue),T=Math.round(G.getValueOrDefault(a._outlineWidth,e,Iue)),E=Math.max(1,Math.round(G.getValueOrDefault(a._pixelSize,e,Oue)));if(T>0?(u.scale=1,p=p||T!==r.outlineWidth||E!==r.pixelSize||!z.equals(b,r.color)||!z.equals(x,r.outlineColor)):(u.scale=E/50,E=50,p=p||T!==r.outlineWidth||!z.equals(b,r.color)||!z.equals(x,r.outlineColor)),p){r.color=z.clone(b,r.color),r.outlineColor=z.clone(x,r.outlineColor),r.pixelSize=E,r.outlineWidth=T;let S=b.alpha,A=b.toCssColorString(),v=x.toCssColorString(),D=JSON.stringify([A,E,v,T]);u.setImage(D,hC(S,A,v,T,E))}_&&u._updateClamping()}}return!0};Xg.prototype.getBoundingSphere=function(e,t){if(!c(e))throw new w("entity is required.");if(!c(t))throw new w("result is required.");let n=this._items.get(e.id);if(!c(n)||!(c(n.pointPrimitive)||c(n.billboard)))return lt.FAILED;if(c(n.pointPrimitive))t.center=d.clone(n.pointPrimitive.position,t.center);else{let i=n.billboard;if(!c(i._clampedPosition))return lt.PENDING;t.center=d.clone(i._clampedPosition,t.center)}return t.radius=0,lt.DONE};Xg.prototype.isDestroyed=function(){return!1};Xg.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Xg.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removePoint(e[t]);return ue(this)};Xg.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._items,a=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],c(r._point)&&c(r._position)&&s.set(r.id,new kue(r));for(o=i.length-1;o>-1;o--)r=i[o],c(r._point)&&c(r._position)?s.contains(r.id)||s.set(r.id,new kue(r)):(nD(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],nD(s.get(r.id),r,a),s.remove(r.id)};function nD(e,t,n){if(c(e)){let i=e.pointPrimitive;if(c(i)){e.pointPrimitive=void 0,n.removePoint(t);return}let o=e.billboard;c(o)&&(e.billboard=void 0,n.removeBillboard(t))}}var v3=Xg;var Gue=[];function BZe(e,t,n,i,o){let r=Gue;r.length=o;let s,a=n.red,l=n.green,u=n.blue,f=n.alpha,h=i.red,m=i.green,p=i.blue,_=i.alpha;if(z.equals(n,i)){for(s=0;s<o;s++)r[s]=z.clone(n);return r}let b=(h-a)/o,x=(m-l)/o,T=(p-u)/o,E=(_-f)/o;for(s=0;s<o;s++)r[s]=new z(a+s*b,l+s*x,u+s*T,f+s*E);return r}function iD(e){e=g(e,g.EMPTY_OBJECT);let t=e.positions,n=e.colors,i=g(e.width,1),o=g(e.colorsPerVertex,!1);if(!c(t)||t.length<2)throw new w("At least two positions are required.");if(typeof i!="number")throw new w("width must be a number");if(c(n)&&(o&&n.length<t.length||!o&&n.length<t.length-1))throw new w("colors has an invalid length.");this._positions=t,this._colors=n,this._width=i,this._colorsPerVertex=o,this._vertexFormat=Ce.clone(g(e.vertexFormat,Ce.DEFAULT)),this._arcType=g(e.arcType,jt.GEODESIC),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._ellipsoid=Z.clone(g(e.ellipsoid,Z.default)),this._workerName="createPolylineGeometry";let r=1+t.length*d.packedLength;r+=c(n)?1+n.length*z.packedLength:1,this.packedLength=r+Z.packedLength+Ce.packedLength+4}iD.pack=function(e,t,n){if(!c(e))throw new w("value is required");if(!c(t))throw new w("array is required");n=g(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=d.packedLength)d.pack(o[i],t,n);let s=e._colors;for(r=c(s)?s.length:0,t[n++]=r,i=0;i<r;++i,n+=z.packedLength)z.pack(s[i],t,n);return Z.pack(e._ellipsoid,t,n),n+=Z.packedLength,Ce.pack(e._vertexFormat,t,n),n+=Ce.packedLength,t[n++]=e._width,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};var jue=Z.clone(Z.UNIT_SPHERE),Wue=new Ce,T0={positions:void 0,colors:void 0,ellipsoid:jue,vertexFormat:Wue,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};iD.unpack=function(e,t,n){if(!c(e))throw new w("array is required");t=g(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=d.packedLength)r[i]=d.unpack(e,t);o=e[t++];let s=o>0?new Array(o):void 0;for(i=0;i<o;++i,t+=z.packedLength)s[i]=z.unpack(e,t);let a=Z.unpack(e,t,jue);t+=Z.packedLength;let l=Ce.unpack(e,t,Wue);t+=Ce.packedLength;let u=e[t++],f=e[t++]===1,h=e[t++],m=e[t];return c(n)?(n._positions=r,n._colors=s,n._ellipsoid=Z.clone(a,n._ellipsoid),n._vertexFormat=Ce.clone(l,n._vertexFormat),n._width=u,n._colorsPerVertex=f,n._arcType=h,n._granularity=m,n):(T0.positions=r,T0.colors=s,T0.width=u,T0.colorsPerVertex=f,T0.arcType=h,T0.granularity=m,new iD(T0))};var Uue=new d,zue=new d,Vue=new d,Hue=new d;iD.createGeometry=function(e){let t=e._width,n=e._vertexFormat,i=e._colors,o=e._colorsPerVertex,r=e._arcType,s=e._granularity,a=e._ellipsoid,l,u,f,h=[],m=po(e._positions,d.equalsEpsilon,!1,h);if(c(i)&&h.length>0){let U=0,V=h[0];i=i.filter(function(W,H){let X=!1;return o?X=H===V||H===0&&V===1:X=H+1===V,X?(U++,V=h[U],!1):!0})}let p=m.length;if(p<2||t<=0)return;if(r===jt.GEODESIC||r===jt.RHUMB){let U,V;r===jt.GEODESIC?(U=O.chordLength(s,a.maximumRadius),V=Di.numberOfPoints):(U=s,V=Di.numberOfPointsRhumbLine);let W=Di.extractHeights(m,a);if(c(i)){let H=1;for(l=0;l<p-1;++l)H+=V(m[l],m[l+1],U);let X=new Array(H),$=0;for(l=0;l<p-1;++l){let ae=m[l],se=m[l+1],he=i[l],ge=V(ae,se,U);if(o&&l<H){let le=i[l+1],me=BZe(ae,se,he,le,ge),Me=me.length;for(u=0;u<Me;++u)X[$++]=me[u]}else for(u=0;u<ge;++u)X[$++]=z.clone(he)}X[$]=z.clone(i[i.length-1]),i=X,Gue.length=0}r===jt.GEODESIC?m=Di.generateCartesianArc({positions:m,minDistance:U,ellipsoid:a,height:W}):m=Di.generateCartesianRhumbArc({positions:m,granularity:U,ellipsoid:a,height:W})}p=m.length;let _=p*4-4,b=new Float64Array(_*3),x=new Float64Array(_*3),T=new Float64Array(_*3),E=new Float32Array(_*2),S=n.st?new Float32Array(_*2):void 0,A=c(i)?new Uint8Array(_*4):void 0,v=0,D=0,R=0,P=0,L;for(u=0;u<p;++u){u===0?(L=Uue,d.subtract(m[0],m[1],L),d.add(m[0],L,L)):L=m[u-1],d.clone(L,Vue),d.clone(m[u],zue),u===p-1?(L=Uue,d.subtract(m[p-1],m[p-2],L),d.add(m[p-1],L,L)):L=m[u+1],d.clone(L,Hue);let U,V;c(A)&&(u!==0&&!o?U=i[u-1]:U=i[u],u!==p-1&&(V=i[u]));let W=u===0?2:0,H=u===p-1?2:4;for(f=W;f<H;++f){d.pack(zue,b,v),d.pack(Vue,x,v),d.pack(Hue,T,v),v+=3;let X=f-2<0?-1:1;if(E[D++]=2*(f%2)-1,E[D++]=X*t,n.st&&(S[R++]=u/(p-1),S[R++]=Math.max(E[D-2],0)),c(A)){let $=f<2?U:V;A[P++]=z.floatToByte($.red),A[P++]=z.floatToByte($.green),A[P++]=z.floatToByte($.blue),A[P++]=z.floatToByte($.alpha)}}}let F=new fn;F.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:b}),F.prevPosition=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:x}),F.nextPosition=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:T}),F.expandAndWidth=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:E}),n.st&&(F.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:S})),c(A)&&(F.color=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:4,values:A,normalize:!0}));let y=Oe.createTypedArray(_,p*6-6),I=0,M=0,B=p-1;for(u=0;u<B;++u)y[M++]=I,y[M++]=I+2,y[M++]=I+1,y[M++]=I+1,y[M++]=I+2,y[M++]=I+3,I+=4;return new st({attributes:F,indices:y,primitiveType:Se.TRIANGLES,boundingSphere:ne.fromPoints(m),geometryType:Ff.POLYLINES})};var Kg=iD;var kZe=new jn(0),D3={},que=new z,UZe=new Ut(z.WHITE),zZe=new jn(!0),VZe=new jn(yn.DISABLED),HZe=new jn(new Nt),GZe=new jn(Ln.BOTH);function jZe(){this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function WZe(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function xd(e,t){if(!c(e))throw new w("entity is required");if(!c(t))throw new w("scene is required");this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(xd.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._geometryChanged=new fe,this._showProperty=void 0,this._materialProperty=void 0,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._depthFailMaterialProperty=void 0,this._geometryOptions=new jZe,this._groundGeometryOptions=new WZe,this._id=`polyline-${e.id}`,this._clampToGround=!1,this._supportsPolylinesOnTerrain=Ts.supportsPolylinesOnTerrain(t),this._zIndex=0,this._onEntityPropertyChanged(e,"polyline",e.polyline,void 0)}Object.defineProperties(xd.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!c(this._entity.availability)&&G.isConstant(this._showProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},depthFailMaterialProperty:{get:function(){return this._depthFailMaterialProperty}},outlineEnabled:{value:!1},hasConstantOutline:{value:!0},outlineColorProperty:{value:void 0},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!1},geometryChanged:{get:function(){return this._geometryChanged}},arcType:{get:function(){return this._arcType}},clampToGround:{get:function(){return this._clampToGround&&this._supportsPolylinesOnTerrain}},zIndex:{get:function(){return this._zIndex}}});xd.prototype.isOutlineVisible=function(e){return!1};xd.prototype.isFilled=function(e){let t=this._entity,n=this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e);return g(n,!1)};xd.prototype.createFillGeometryInstance=function(e){if(!c(e))throw new w("time is required.");if(!this._fillEnabled)throw new w("This instance does not represent a filled geometry.");let t=this._entity,n=t.isAvailable(e),i=new gn(n&&t.isShowing&&this._showProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=Mn.fromDistanceDisplayCondition(o),s={show:i,distanceDisplayCondition:r},a;return this._materialProperty instanceof Ut&&(c(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,que)),c(a)||(a=z.WHITE),s.color=Ht.fromColor(a)),this.clampToGround?new wt({id:t,geometry:new aT(this._groundGeometryOptions),attributes:s}):(c(this._depthFailMaterialProperty)&&this._depthFailMaterialProperty instanceof Ut&&(c(this._depthFailMaterialProperty.color)&&(this._depthFailMaterialProperty.color.isConstant||n)&&(a=this._depthFailMaterialProperty.color.getValue(e,que)),c(a)||(a=z.WHITE),s.depthFailColor=Ht.fromColor(a)),new wt({id:t,geometry:new Kg(this._geometryOptions),attributes:s}))};xd.prototype.createOutlineGeometryInstance=function(e){throw new w("This instance does not represent an outlined geometry.")};xd.prototype.isDestroyed=function(){return!1};xd.prototype.destroy=function(){this._entitySubscription(),ue(this)};xd.prototype._onEntityPropertyChanged=function(e,t,n,i){if(!(t==="availability"||t==="polyline"))return;let o=this._entity.polyline;if(!c(o)){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let r=o.positions,s=o.show;if(c(s)&&s.isConstant&&!s.getValue(Ue.MINIMUM_VALUE)||!c(r)){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let a=o.zIndex,l=g(o.material,UZe),u=l instanceof Ut;this._materialProperty=l,this._depthFailMaterialProperty=o.depthFailMaterial,this._showProperty=g(s,zZe),this._shadowsProperty=g(o.shadows,VZe),this._distanceDisplayConditionProperty=g(o.distanceDisplayCondition,HZe),this._classificationTypeProperty=g(o.classificationType,GZe),this._fillEnabled=!0,this._zIndex=g(a,kZe);let f=o.width,h=o.arcType,m=o.clampToGround,p=o.granularity;if(!r.isConstant||!G.isConstant(f)||!G.isConstant(h)||!G.isConstant(p)||!G.isConstant(m)||!G.isConstant(a))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{let _=this._geometryOptions,b=r.getValue(Ue.MINIMUM_VALUE,_.positions);if(!c(b)||b.length<2){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let x;u&&(!c(this._depthFailMaterialProperty)||this._depthFailMaterialProperty instanceof Ut)?x=qr.VERTEX_FORMAT:x=sa.VERTEX_FORMAT,_.vertexFormat=x,_.positions=b,_.width=c(f)?f.getValue(Ue.MINIMUM_VALUE):void 0,_.arcType=c(h)?h.getValue(Ue.MINIMUM_VALUE):void 0,_.granularity=c(p)?p.getValue(Ue.MINIMUM_VALUE):void 0;let T=this._groundGeometryOptions;T.positions=b,T.width=_.width,T.arcType=_.arcType,T.granularity=_.granularity,this._clampToGround=c(m)?m.getValue(Ue.MINIMUM_VALUE):!1,!this._clampToGround&&c(a)&&mt("Entity polylines must have clampToGround: true when using zIndex. zIndex will be ignored."),this._dynamic=!1,this._geometryChanged.raiseEvent(this)}};xd.prototype.createDynamicUpdater=function(e,t){if(C.defined("primitives",e),C.defined("groundPrimitives",t),!this._dynamic)throw new w("This instance does not represent dynamic geometry.");return new oD(e,t,this)};var vE={positions:void 0,granularity:void 0,height:void 0,ellipsoid:void 0};function oD(e,t,n){this._line=void 0,this._primitives=e,this._groundPrimitives=t,this._groundPolylinePrimitive=void 0,this._material=void 0,this._geometryUpdater=n,this._positions=[]}function Yue(e){if(c(e._line))return e._line;let t=e._primitives,n=e._geometryUpdater._scene.id+t._guid,i=D3[n];!c(i)||i.isDestroyed()?(i=new Rh,D3[n]=i,t.add(i)):t.contains(i)||t.add(i);let o=i.add();return o.id=e._geometryUpdater._entity,e._line=o,o}oD.prototype.update=function(e){let t=this._geometryUpdater,n=t._entity,i=n.polyline,o=i.positions,r=G.getValueOrUndefined(o,e,this._positions);t._clampToGround=G.getValueOrDefault(i._clampToGround,e,!1),t._groundGeometryOptions.positions=r,t._groundGeometryOptions.width=G.getValueOrDefault(i._width,e,1),t._groundGeometryOptions.arcType=G.getValueOrDefault(i._arcType,e,jt.GEODESIC),t._groundGeometryOptions.granularity=G.getValueOrDefault(i._granularity,e,9999);let s=this._groundPrimitives;if(c(this._groundPolylinePrimitive)&&(s.remove(this._groundPolylinePrimitive),this._groundPolylinePrimitive=void 0),t.clampToGround){if(!n.isShowing||!n.isAvailable(e)||!G.getValueOrDefault(i._show,e,!0)||!c(r)||r.length<2)return;let h=t.fillMaterialProperty,m;if(h instanceof Ut)m=new qr;else{let p=$o.getValue(e,h,this._material);m=new sa({material:p,translucent:p.isTranslucent()}),this._material=p}this._groundPolylinePrimitive=s.add(new sh({geometryInstances:t.createFillGeometryInstance(e),appearance:m,classificationType:t.classificationTypeProperty.getValue(e),asynchronous:!1}),G.getValueOrUndefined(t.zIndex,e)),c(this._line)&&(this._line.show=!1);return}let a=Yue(this);if(!n.isShowing||!n.isAvailable(e)||!G.getValueOrDefault(i._show,e,!0)){a.show=!1;return}if(!c(r)||r.length<2){a.show=!1;return}let l=jt.GEODESIC;l=G.getValueOrDefault(i._arcType,e,l);let u=t._scene.globe,f=t._scene.ellipsoid;l!==jt.NONE&&c(u)&&(vE.ellipsoid=f,vE.positions=r,vE.granularity=G.getValueOrUndefined(i._granularity,e),vE.height=Di.extractHeights(r,f),l===jt.GEODESIC?r=Di.generateCartesianArc(vE):r=Di.generateCartesianRhumbArc(vE)),a.show=!0,a.positions=r.slice(),a.material=$o.getValue(e,t.fillMaterialProperty,a.material),a.width=G.getValueOrDefault(i._width,e,1),a.distanceDisplayCondition=G.getValueOrUndefined(i._distanceDisplayCondition,e,a.distanceDisplayCondition)};oD.prototype.getBoundingSphere=function(e){if(C.defined("result",e),this._geometryUpdater.clampToGround){let t=this._groundPolylinePrimitive;if(c(t)&&t.show&&t.ready){let n=t.getGeometryInstanceAttributes(this._geometryUpdater._entity);if(c(n)&&c(n.boundingSphere))return ne.clone(n.boundingSphere,e),lt.DONE}return c(t)&&!t.ready?lt.PENDING:lt.DONE}else{let t=Yue(this);if(t.show&&t.positions.length>0)return ne.fromPoints(t.positions,e),lt.DONE}return lt.FAILED};oD.prototype.isDestroyed=function(){return!1};oD.prototype.destroy=function(){let t=this._geometryUpdater._scene.id+this._primitives._guid,n=D3[t];c(n)&&(n.remove(this._line),n.length===0&&(this._primitives.removeAndDestroy(n),delete D3[t])),c(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),ue(this)};var I3=xd;var qZe=new z,YZe=new Nt,XZe=new Nt;function Td(e,t,n,i,o){let r;n instanceof Ut?r=qr:r=sa,this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=r,this.materialProperty=n,this.updaters=new Et,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Et,this.material=void 0,this.updatersWithAttributes=new Et,this.attributes=new Et,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(Td.prototype.onMaterialChanged,this),this.subscriptions=new Et,this.showsUpdated=new Et,this.zIndex=i,this._asynchronous=o}Td.prototype.onMaterialChanged=function(){this.invalidated=!0};Td.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof Ut&&t instanceof Ut?!0:c(t)&&t.equals(n)};Td.prototype.add=function(e,t,n){let i=t.id;if(this.updaters.set(i,t),this.geometry.set(i,n),!t.hasConstantFill||!t.fillMaterialProperty.isConstant||!G.isConstant(t.distanceDisplayConditionProperty))this.updatersWithAttributes.set(i,t);else{let o=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener(function(r,s,a,l){s==="isShowing"&&o.showsUpdated.set(t.id,t)}))}this.createPrimitive=!0};Td.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return c(n)&&(n(),this.subscriptions.remove(t)),!0}return!1};Td.prototype.update=function(e){let t=!0,n=this.primitive,i=this.orderedGroundPrimitives,o=this.geometry.values,r;if(this.createPrimitive){if(o.length>0)c(n)&&(c(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),n=new sh({show:!1,asynchronous:this._asynchronous,geometryInstances:o.slice(),appearance:new this.appearanceType,classificationType:this.classificationType}),this.appearanceType===sa&&(this.material=$o.getValue(e,this.materialProperty,this.material),n.appearance.material=this.material),i.add(n,this.zIndex),t=!1;else{c(n)&&(i.remove(n),n=void 0);let a=this.oldPrimitive;c(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(c(n)&&n.ready){n.show=!0,c(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.appearanceType===sa&&(this.material=$o.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material);let s=this.updatersWithAttributes.values,a=s.length;for(r=0;r<a;r++){let l=s[r],u=l.entity,f=this.geometry.get(l.id),h=this.attributes.get(f.id.id);if(c(h)||(h=n.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,h)),!l.fillMaterialProperty.isConstant){let b=l.fillMaterialProperty.color,x=G.getValueOrDefault(b,e,z.WHITE,qZe);z.equals(h._lastColor,x)||(h._lastColor=z.clone(x,h._lastColor),h.color=Ht.toValue(x,h.color))}let m=u.isShowing&&(l.hasConstantFill||l.isFilled(e)),p=h.show[0]===1;m!==p&&(h.show=gn.toValue(m,h.show));let _=l.distanceDisplayConditionProperty;if(!G.isConstant(_)){let b=G.getValueOrDefault(_,e,XZe,YZe);Nt.equals(b,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Nt.clone(b,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=Mn.toValue(b,h.distanceDisplayCondition))}}this.updateShows(n)}else c(n)&&!n.ready&&(t=!1);return t};Td.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=o.entity,s=this.geometry.get(o.id),a=this.attributes.get(s.id.id);c(a)||(a=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,a));let l=r.isShowing,u=a.show[0]===1;l!==u&&(a.show=gn.toValue(l,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};Td.prototype.contains=function(e){return this.updaters.contains(e.id)};Td.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return lt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!c(i)||!c(i.boundingSphere)||c(i.show)&&i.show[0]===0?lt.FAILED:(i.boundingSphere.clone(t),lt.DONE)};Td.prototype.destroy=function(){let e=this.primitive,t=this.orderedGroundPrimitives;c(e)&&t.remove(e);let n=this.oldPrimitive;c(n)&&t.remove(n),this.removeMaterialSubscription()};function DE(e,t,n){this._items=[],this._orderedGroundPrimitives=e,this._classificationType=t,this._asynchronous=g(n,!0)}DE.prototype.add=function(e,t){let n=this._items,i=n.length,o=t.createFillGeometryInstance(e),r=G.getValueOrDefault(t.zIndex,0);for(let a=0;a<i;++a){let l=n[a];if(l.isMaterial(t)&&l.zIndex===r){l.add(e,t,o);return}}let s=new Td(this._orderedGroundPrimitives,this._classificationType,t.fillMaterialProperty,r,this._asynchronous);s.add(e,t,o),n.push(s)};DE.prototype.remove=function(e){let t=this._items,n=t.length;for(let i=n-1;i>=0;i--){let o=t[i];if(o.remove(e)){o.updaters.length===0&&(t.splice(i,1),o.destroy());break}}};DE.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];if(r.invalidated){n.splice(t,1);let s=r.updaters.values,a=s.length;for(let l=0;l<a;l++)this.add(e,s[l]);r.destroy()}}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o};DE.prototype.getBoundingSphere=function(e,t){let n=this._items,i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return lt.FAILED};DE.prototype.removeAllPrimitives=function(){let e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};var O3=DE;var KZe=[];function Xue(e,t){let n=e._batches,i=n.length;for(let o=0;o<i;o++)n[o].remove(t)}function Kue(e,t,n){if(n.isDynamic){e._dynamicBatch.add(t,n);return}if(n.clampToGround&&n.fillEnabled){let s=n.classificationTypeProperty.getValue(t);e._groundBatches[s].add(t,n);return}let i;n.fillEnabled&&(i=n.shadowsProperty.getValue(t));let o=0;c(n.depthFailMaterialProperty)&&(o=n.depthFailMaterialProperty instanceof Ut?1:2);let r;c(i)&&(r=i+o*yn.NUMBER_OF_SHADOW_MODES),n.fillEnabled&&(n.fillMaterialProperty instanceof Ut?e._colorBatches[r].add(t,n):e._materialBatches[r].add(t,n))}function jh(e,t,n,i){C.defined("scene",e),C.defined("entityCollection",t),i=g(i,e.groundPrimitives),n=g(n,e.primitives),this._scene=e,this._primitives=n,this._entityCollection=void 0,this._addedObjects=new Et,this._removedObjects=new Et,this._changedObjects=new Et;let o,r=yn.NUMBER_OF_SHADOW_MODES;for(this._colorBatches=new Array(r*3),this._materialBatches=new Array(r*3),o=0;o<r;++o)this._colorBatches[o]=new gd(n,qr,void 0,!1,o),this._materialBatches[o]=new bd(n,sa,void 0,!1,o),this._colorBatches[o+r]=new gd(n,qr,qr,!1,o),this._materialBatches[o+r]=new bd(n,sa,qr,!1,o),this._colorBatches[o+r*2]=new gd(n,qr,sa,!1,o),this._materialBatches[o+r*2]=new bd(n,sa,sa,!1,o);this._dynamicBatch=new oE(n,i);let s=Ln.NUMBER_OF_CLASSIFICATION_TYPES;for(this._groundBatches=new Array(s),o=0;o<s;++o)this._groundBatches[o]=new O3(i,o);this._batches=this._colorBatches.concat(this._materialBatches,this._dynamicBatch,this._groundBatches),this._subscriptions=new Et,this._updaters=new Et,this._entityCollection=t,t.collectionChanged.addEventListener(jh.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,KZe)}jh.prototype.update=function(e){C.defined("time",e);let t=this._addedObjects,n=t.values,i=this._removedObjects,o=i.values,r=this._changedObjects,s=r.values,a,l,u,f;for(a=s.length-1;a>-1;a--)l=s[a],u=l.id,f=this._updaters.get(u),f.entity===l?(Xue(this,f),Kue(this,e,f)):(o.push(l),n.push(l));for(a=o.length-1;a>-1;a--)l=o[a],u=l.id,f=this._updaters.get(u),Xue(this,f),f.destroy(),this._updaters.remove(u),this._subscriptions.get(u)(),this._subscriptions.remove(u);for(a=n.length-1;a>-1;a--)l=n[a],u=l.id,f=new I3(l,this._scene),this._updaters.set(u,f),Kue(this,e,f),this._subscriptions.set(u,f.geometryChanged.addEventListener(jh._onGeometryChanged,this));t.removeAll(),i.removeAll(),r.removeAll();let h=!0,m=this._batches,p=m.length;for(a=0;a<p;a++)h=m[a].update(e)&&h;return h};var $Ze=[],ZZe=new ne;jh.prototype.getBoundingSphere=function(e,t){C.defined("entity",e),C.defined("result",t);let n=$Ze,i=ZZe,o=0,r=lt.DONE,s=this._batches,a=s.length,l=this._updaters.get(e.id);for(let u=0;u<a;u++){if(r=s[u].getBoundingSphere(l,i),r===lt.PENDING)return lt.PENDING;r===lt.DONE&&(n[o]=ne.clone(i,n[o]),o++)}return o===0?lt.FAILED:(n.length=o,ne.fromBoundingSpheres(n,t),lt.DONE)};jh.prototype.isDestroyed=function(){return!1};jh.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(jh.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();let e,t=this._batches,n=t.length;for(e=0;e<n;e++)t[e].removeAllPrimitives();let i=this._subscriptions.values;for(n=i.length,e=0;e<n;e++)i[e]();return this._subscriptions.removeAll(),ue(this)};jh._onGeometryChanged=function(e){let t=this._removedObjects,n=this._changedObjects,i=e.entity,o=i.id;!c(t.get(o))&&!c(n.get(o))&&n.set(o,i)};jh.prototype._onCollectionChanged=function(e,t,n){let i=this._addedObjects,o=this._removedObjects,r=this._changedObjects,s,a,l;for(s=n.length-1;s>-1;s--)l=n[s],a=l.id,i.remove(a)||(o.set(a,l),r.remove(a));for(s=t.length-1;s>-1;s--)l=t[s],a=l.id,o.remove(a)?r.set(a,l):i.set(a,l)};var P3=jh;function ul(e){C.typeOf.object("options",e),C.typeOf.object("options.scene",e.scene),C.typeOf.object("options.dataSourceCollection",e.dataSourceCollection),Kc.initializeTerrainHeights(),sh.initializeTerrainHeights();let t=e.scene,n=e.dataSourceCollection;this._eventHelper=new rl,this._eventHelper.add(n.dataSourceAdded,this._onDataSourceAdded,this),this._eventHelper.add(n.dataSourceRemoved,this._onDataSourceRemoved,this),this._eventHelper.add(n.dataSourceMoved,this._onDataSourceMoved,this),this._eventHelper.add(t.postRender,this._postRender,this),this._dataSourceCollection=n,this._scene=t,this._visualizersCallback=g(e.visualizersCallback,ul.defaultVisualizersCallback);let i=!1,o=new $l,r=new $l;n.length>0&&(t.primitives.add(o),t.groundPrimitives.add(r),i=!0),this._primitives=o,this._groundPrimitives=r;for(let u=0,f=n.length;u<f;u++)this._onDataSourceAdded(n,n.get(u));let s=new IB;this._onDataSourceAdded(void 0,s),this._defaultDataSource=s;let a,l;if(!i){let u=this,f=function(){t.primitives.add(o),t.groundPrimitives.add(r),a(),l(),u._removeDefaultDataSourceListener=void 0,u._removeDataSourceCollectionListener=void 0};a=s.entities.collectionChanged.addEventListener(f),l=n.dataSourceAdded.addEventListener(f)}this._removeDefaultDataSourceListener=a,this._removeDataSourceCollectionListener=l,this._ready=!1}var IE=[];ul.registerVisualizer=function(e){IE.includes(e)||IE.push(e)};ul.unregisterVisualizer=function(e){if(IE.includes(e)){let t=IE.indexOf(e);IE.splice(t,1)}};ul.defaultVisualizersCallback=function(e,t,n){let i=n.entities;return[new lM(t,i),new C3(e,i,n._primitives,n._groundPrimitives),new E3(t,i),new S3(e,i),new mB(e,i),new v3(t,i),new A3(e,i),new P3(e,i,n._primitives,n._groundPrimitives),...IE.map(o=>new o(e,i))]};Object.defineProperties(ul.prototype,{scene:{get:function(){return this._scene}},dataSources:{get:function(){return this._dataSourceCollection}},defaultDataSource:{get:function(){return this._defaultDataSource}},ready:{get:function(){return this._ready}}});ul.prototype.isDestroyed=function(){return!1};ul.prototype.destroy=function(){this._eventHelper.removeAll();let e=this._dataSourceCollection;for(let t=0,n=e.length;t<n;++t)this._onDataSourceRemoved(this._dataSourceCollection,e.get(t));return this._onDataSourceRemoved(void 0,this._defaultDataSource),c(this._removeDefaultDataSourceListener)?(this._removeDefaultDataSourceListener(),this._removeDataSourceCollectionListener()):(this._scene.primitives.remove(this._primitives),this._scene.groundPrimitives.remove(this._groundPrimitives)),ue(this)};ul.prototype.update=function(e){if(C.defined("time",e),!ai.initialized)return this._ready=!1,!1;let t=!0,n,i,o,r,s=this._dataSourceCollection,a=s.length;for(n=0;n<a;n++){let l=s.get(n);for(c(l.update)&&(t=l.update(e)&&t),o=l._visualizers,r=o.length,i=0;i<r;i++)t=o[i].update(e)&&t}for(o=this._defaultDataSource._visualizers,r=o.length,i=0;i<r;i++)t=o[i].update(e)&&t;return!this._ready&&t&&this._scene.requestRender(),this._ready=t,t};ul.prototype._postRender=function(){let e=this._scene.frameState,t=this._dataSourceCollection,n=t.length;for(let i=0;i<n;i++){let o=t.get(i),r=o.credit;c(r)&&e.creditDisplay.addCreditToNextFrame(r);let s=o._resourceCredits;if(c(s)){let a=s.length;for(let l=0;l<a;l++)e.creditDisplay.addCreditToNextFrame(s[l])}}};var JZe=[],QZe=new ne;ul.prototype.getBoundingSphere=function(e,t,n){if(C.defined("entity",e),C.typeOf.bool("allowPartial",t),C.defined("result",n),!this._ready&&!t)return lt.PENDING;let i,o,r=this._defaultDataSource;if(!r.entities.contains(e)){r=void 0;let m=this._dataSourceCollection;for(o=m.length,i=0;i<o;i++){let p=m.get(i);if(p.entities.contains(e)){r=p;break}}}if(!c(r))return lt.FAILED;let s=JZe,a=QZe,l=0,u=lt.DONE,f=r._visualizers,h=f.length;for(i=0;i<h;i++){let m=f[i];if(c(m.getBoundingSphere)){if(u=f[i].getBoundingSphere(e,a),!t&&u===lt.PENDING)return lt.PENDING;u===lt.DONE&&(s[l]=ne.clone(a,s[l]),l++)}}return l===0?lt.FAILED:(s.length=l,ne.fromBoundingSpheres(s,n),lt.DONE)};ul.prototype._onDataSourceAdded=function(e,t){let n=this._scene,i=this._primitives,o=this._groundPrimitives,r=i.add(new $l),s=o.add(new qB);t._primitives=r,t._groundPrimitives=s;let a=t.clustering;a._initialize(n),r.add(a),t._visualizers=this._visualizersCallback(n,a,t)};ul.prototype._onDataSourceRemoved=function(e,t){let n=this._primitives,i=this._groundPrimitives,o=t._primitives,r=t._groundPrimitives,s=t.clustering;o.remove(s);let a=t._visualizers,l=a.length;for(let u=0;u<l;u++)a[u].destroy();n.remove(o),i.remove(r),t._visualizers=void 0};ul.prototype._onDataSourceMoved=function(e,t,n){let i=this._primitives,o=this._groundPrimitives,r=e._primitives,s=e._groundPrimitives;t===n+1?(i.raise(r),o.raise(s)):t===n-1?(i.lower(r),o.lower(s)):t===0?(i.lowerToBottom(r),o.lowerToBottom(s),i.raise(r),o.raise(s)):(i.raiseToTop(r),o.raiseToTop(s))};var R3=ul;function kW(e,t,n){this.heading=g(e,0),this.pitch=g(t,0),this.range=g(n,0)}kW.clone=function(e,t){if(c(e))return c(t)||(t=new kW),t.heading=e.heading,t.pitch=e.pitch,t.range=e.range,t};var Cd=kW;var $ue=new q,Zue=new q,Jue=new q,eJe=new N,M3=new d,Que=new d,UW=new d,zW=new d,efe=new d,tfe=new d,OE=new K,tJe=1.25;function nJe(e,t,n,i,o,r,s){let a=e.scene.mode,l=o.getValue(r,e._lastCartesian);if(c(l)){let u=!1,f=!1,h,m,p;if(a===J.SCENE3D){K.addSeconds(r,.001,OE);let E=o.getValue(OE,M3);if(c(E)||(K.addSeconds(r,-.001,OE),E=o.getValue(OE,M3),f=!0),c(E)){let S=Lt.computeFixedToIcrfMatrix(r,$ue),A=Lt.computeFixedToIcrfMatrix(OE,Zue),v;!c(S)||!c(A)?(v=Lt.computeTemeToPseudoFixedMatrix(r,Jue),S=q.transpose(v,$ue),A=Lt.computeTemeToPseudoFixedMatrix(OE,Zue),q.transpose(A,A)):v=q.transpose(S,Jue);let D=q.multiplyByVector(S,l,efe),R=q.multiplyByVector(A,E,tfe);d.subtract(D,R,zW);let P=d.magnitude(zW)*1e3,L=O.GRAVITATIONALPARAMETER,F=-L/(P*P-2*L/d.magnitude(D));F<0||F>tJe*s.maximumRadius?(h=Que,d.normalize(l,h),d.negate(h,h),p=d.clone(d.UNIT_Z,UW),m=d.cross(p,h,M3),d.magnitude(m)>O.EPSILON7&&(d.normalize(h,h),d.normalize(m,m),p=d.cross(h,m,UW),d.normalize(p,p),u=!0)):d.equalsEpsilon(l,E,O.EPSILON7)||(p=Que,d.normalize(D,p),d.normalize(R,R),m=d.cross(p,R,UW),f&&(m=d.multiplyByScalar(m,-1,m)),d.equalsEpsilon(m,d.ZERO,O.EPSILON7)||(h=d.cross(m,p,M3),q.multiplyByVector(v,h,h),q.multiplyByVector(v,m,m),q.multiplyByVector(v,p,p),d.normalize(h,h),d.normalize(m,m),d.normalize(p,p),u=!0))}}c(e.boundingSphere)&&(l=e.boundingSphere.center);let _,b,x;i&&(_=d.clone(t.position,zW),b=d.clone(t.direction,efe),x=d.clone(t.up,tfe));let T=eJe;u?(T[0]=h.x,T[1]=h.y,T[2]=h.z,T[3]=0,T[4]=m.x,T[5]=m.y,T[6]=m.z,T[7]=0,T[8]=p.x,T[9]=p.y,T[10]=p.z,T[11]=0,T[12]=l.x,T[13]=l.y,T[14]=l.z,T[15]=0):Lt.eastNorthUpToFixedFrame(l,s,T),t._setTransform(T),i&&(d.clone(_,t.position),d.clone(b,t.direction),d.clone(x,t.up),d.cross(b,x,t.right))}if(n){let u=a===J.SCENE2D||d.equals(e._offset3D,d.ZERO)?void 0:e._offset3D;t.lookAtTransform(t.transform,u)}}function rD(e,t,n){C.defined("entity",e),C.defined("scene",t),this.entity=e,this.scene=t,this.ellipsoid=g(n,Z.default),this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new d,this._defaultOffset3D=void 0,this._offset3D=new d}Object.defineProperties(rD,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=d.clone(e,new d)}}});rD.defaultOffset3D=new d(-14e3,3500,3500);var L3=new Cd,iJe=new d;rD.prototype.update=function(e,t){C.defined("time",e);let n=this.scene,i=this.ellipsoid,o=n.mode;if(o===J.MORPHING)return;let r=this.entity,s=r.position;if(!c(s))return;let a=r!==this._lastEntity,l=o!==this._mode,u=n.camera,f=a||l,h=!0;if(a){let m=r.viewFrom,p=c(m);if(!p&&c(t)){L3.pitch=-O.PI_OVER_FOUR,L3.range=0;let _=s.getValue(e,iJe);if(c(_)){let b=2-1/Math.max(1,d.magnitude(_)/i.maximumRadius);L3.pitch*=b}u.viewBoundingSphere(t,L3),this.boundingSphere=t,f=!1,h=!1}else(!p||!c(m.getValue(e,this._offset3D)))&&d.clone(rD._defaultOffset3D,this._offset3D)}else!l&&this._mode!==J.SCENE2D&&d.clone(u.position,this._offset3D);this._lastEntity=r,this._mode=o,nJe(this,u,f,h,s,e,i)};var N3=rD;function aD(){this._cache={}}aD.prototype.fromColor=function(e,t){if(!c(e))throw new w("color is required");if(!c(t))throw new w("size is required");return F3(void 0,void 0,e,t,this._cache)};aD.prototype.fromUrl=function(e,t,n){if(!c(e))throw new w("url is required");if(!c(t))throw new w("color is required");if(!c(n))throw new w("size is required");return F3(e,void 0,t,n,this._cache)};aD.prototype.fromMakiIconId=function(e,t,n){if(!c(e))throw new w("id is required");if(!c(t))throw new w("color is required");if(!c(n))throw new w("size is required");return F3(Mi(`Assets/Textures/maki/${encodeURIComponent(e)}.png`),void 0,t,n,this._cache)};aD.prototype.fromText=function(e,t,n){if(!c(e))throw new w("text is required");if(!c(t))throw new w("color is required");if(!c(n))throw new w("size is required");return F3(void 0,e,t,n,this._cache)};var oJe=new z;function rJe(e,t,n){e.save(),e.scale(n/24,n/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,oJe).toCssColorString(),e.lineWidth=.846,e.beginPath(),e.moveTo(6.72,.422),e.lineTo(17.28,.422),e.bezierCurveTo(18.553,.422,19.577,1.758,19.577,3.415),e.lineTo(19.577,10.973),e.bezierCurveTo(19.577,12.63,18.553,13.966,17.282,13.966),e.lineTo(14.386,14.008),e.lineTo(11.826,23.578),e.lineTo(9.614,14.008),e.lineTo(6.719,13.965),e.bezierCurveTo(5.446,13.983,4.422,12.629,4.422,10.972),e.lineTo(4.422,3.416),e.bezierCurveTo(4.423,1.76,5.447,.423,6.718,.423),e.closePath(),e.fill(),e.stroke(),e.restore()}function nfe(e,t,n){let i=n/2.5,o=i,r=i;t.width>t.height?r=i*(t.height/t.width):t.width<t.height&&(o=i*(t.width/t.height));let s=Math.round((n-o)/2),a=Math.round(7/24*n-r/2);e.globalCompositeOperation="destination-out",e.drawImage(t,s-1,a,o,r),e.drawImage(t,s,a-1,o,r),e.drawImage(t,s+1,a,o,r),e.drawImage(t,s,a+1,o,r),e.globalCompositeOperation="destination-over",e.fillStyle=z.BLACK.toCssColorString(),e.fillRect(s-1,a-1,o+2,r+2),e.globalCompositeOperation="destination-out",e.drawImage(t,s,a,o,r),e.globalCompositeOperation="destination-over",e.fillStyle=z.WHITE.toCssColorString(),e.fillRect(s-1,a-2,o+2,r+2)}var sD=new Array(4);function F3(e,t,n,i,o){sD[0]=e,sD[1]=t,sD[2]=n,sD[3]=i;let r=JSON.stringify(sD),s=o[r];if(c(s))return s;let a=document.createElement("canvas");a.width=i,a.height=i;let l=a.getContext("2d");if(rJe(l,n,i),c(e)){let f=Te.createIfNeeded(e).fetchImage().then(function(h){return nfe(l,h,i),o[r]=a,a});return o[r]=f,f}else if(c(t)){let u=pC(t,{font:`bold ${i}px sans-serif`});nfe(l,u,i)}return o[r]=a,a}var $g=aD;function VW(e){return e}function B3(e){if(e==null)return VW;var t,n,i=e.scale[0],o=e.scale[1],r=e.translate[0],s=e.translate[1];return function(a,l){l||(t=n=0);var u=2,f=a.length,h=new Array(f);for(h[0]=(t+=a[0])*i+r,h[1]=(n+=a[1])*o+s;u<f;)h[u]=a[u],++u;return h}}function ife(e,t){for(var n,i=e.length,o=i-t;o<--i;)n=e[o],e[o++]=e[i],e[i]=n}function HW(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(n){return ofe(e,n)})}:ofe(e,t)}function ofe(e,t){var n=t.id,i=t.bbox,o=t.properties==null?{}:t.properties,r=GW(e,t);return n==null&&i==null?{type:"Feature",properties:o,geometry:r}:i==null?{type:"Feature",id:n,properties:o,geometry:r}:{type:"Feature",id:n,bbox:i,properties:o,geometry:r}}function GW(e,t){var n=B3(e.transform),i=e.arcs;function o(f,h){h.length&&h.pop();for(var m=i[f<0?~f:f],p=0,_=m.length;p<_;++p)h.push(n(m[p],p));f<0&&ife(h,_)}function r(f){return n(f)}function s(f){for(var h=[],m=0,p=f.length;m<p;++m)o(f[m],h);return h.length<2&&h.push(h[0]),h}function a(f){for(var h=s(f);h.length<4;)h.push(h[0]);return h}function l(f){return f.map(a)}function u(f){var h=f.type,m;switch(h){case"GeometryCollection":return{type:h,geometries:f.geometries.map(u)};case"Point":m=r(f.coordinates);break;case"MultiPoint":m=f.coordinates.map(r);break;case"LineString":m=s(f.arcs);break;case"MultiLineString":m=f.arcs.map(s);break;case"Polygon":m=l(f.arcs);break;case"MultiPolygon":m=f.arcs.map(l);break;default:return null}return{type:h,coordinates:m}}return u(t)}function k3(e){return d.fromDegrees(e[0],e[1],e[2])}var jW={"urn:ogc:def:crs:OGC:1.3:CRS84":k3,"EPSG:4326":k3,"urn:ogc:def:crs:EPSG::4326":k3},rfe={},sfe={},WW=48,qW,YW=z.ROYALBLUE,XW=z.YELLOW,KW=2,$W=z.fromBytes(255,255,0,100),ZW=!1,uJe={small:24,medium:48,large:64},fJe=["title","description","marker-size","marker-symbol","marker-color","stroke","stroke-opacity","stroke-width","fill","fill-opacity"];function afe(e,t){let n="";for(let i in e)if(e.hasOwnProperty(i)){if(i===t||fJe.indexOf(i)!==-1)continue;let o=e[i];c(o)&&(typeof o=="object"?n+=`<tr><th>${i}</th><td>${afe(o)}</td></tr>`:n+=`<tr><th>${i}</th><td>${o}</td></tr>`)}return n.length>0&&(n=`<table class="cesium-infoBox-defaultTable"><tbody>${n}</tbody></table>`),n}function dJe(e,t,n){let i;return function(o,r){return c(i)||(i=e(t,n)),i}}function hJe(e,t){return new fh(dJe(afe,e,t),!0)}function U3(e,t,n){let i=e.id;if(!c(i)||e.type!=="Feature")i=Bn();else{let s=2,a=i;for(;c(t.getById(a));)a=`${i}_${s}`,s++;i=a}let o=t.getOrCreateEntity(i),r=e.properties;if(c(r)){o.properties=r;let s,a=r.title;if(c(a))o.name=a,s="title";else{let u=Number.MAX_VALUE;for(let f in r)if(r.hasOwnProperty(f)&&r[f]){let h=f.toLowerCase();if(u>1&&h==="title"){u=1,s=f;break}else u>2&&h==="name"?(u=2,s=f):u>3&&/title/i.test(f)?(u=3,s=f):u>4&&/name/i.test(f)&&(u=4,s=f)}c(s)&&(o.name=r[s])}let l=r.description;l!==null&&(o.description=c(l)?new jn(l):n(r,s))}return o}function JW(e,t){let n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=t(e[i]);return n}var cfe={Feature:ufe,FeatureCollection:mJe,GeometryCollection:ffe,LineString:_fe,MultiLineString:gfe,MultiPoint:mfe,MultiPolygon:xfe,Point:hfe,Polygon:bfe,Topology:Tfe},lfe={GeometryCollection:ffe,LineString:_fe,MultiLineString:gfe,MultiPoint:mfe,MultiPolygon:xfe,Point:hfe,Polygon:bfe,Topology:Tfe};function ufe(e,t,n,i,o){if(t.geometry===null){U3(t,e._entityCollection,o.describe);return}if(!c(t.geometry))throw new ie("feature.geometry is required.");let r=t.geometry.type,s=lfe[r];if(!c(s))throw new ie(`Unknown geometry type: ${r}`);s(e,t,t.geometry,i,o)}function mJe(e,t,n,i,o){let r=t.features;for(let s=0,a=r.length;s<a;s++)ufe(e,r[s],void 0,i,o)}function ffe(e,t,n,i,o){let r=n.geometries;for(let s=0,a=r.length;s<a;s++){let l=r[s],u=l.type,f=lfe[u];if(!c(f))throw new ie(`Unknown geometry type: ${u}`);f(e,t,l,i,o)}}function dfe(e,t,n,i,o){let r=o.markerSymbol,s=o.markerColor,a=o.markerSize,l=t.properties;if(c(l)){let p=l["marker-color"];c(p)&&(s=z.fromCssColorString(p)),a=g(uJe[l["marker-size"]],a);let _=l["marker-symbol"];c(_)&&(r=_)}let u;c(r)?r.length===1?u=e._pinBuilder.fromText(r.toUpperCase(),s,a):u=e._pinBuilder.fromMakiIconId(r,s,a):u=e._pinBuilder.fromColor(s,a);let f=new sc;f.verticalOrigin=new jn(Dn.BOTTOM),i.length===2&&o.clampToGround&&(f.heightReference=qe.CLAMP_TO_GROUND);let h=U3(t,e._entityCollection,o.describe);h.billboard=f,h.position=new Bu(n(i));let m=Promise.resolve(u).then(function(p){f.image=new jn(p)}).catch(function(){f.image=new jn(e._pinBuilder.fromColor(s,a))});e._promises.push(m)}function hfe(e,t,n,i,o){dfe(e,t,i,n.coordinates,o)}function mfe(e,t,n,i,o){let r=n.coordinates;for(let s=0;s<r.length;s++)dfe(e,t,i,r[s],o)}function pfe(e,t,n,i,o){let r=o.strokeMaterialProperty,s=o.strokeWidthProperty,a=t.properties;if(c(a)){let f=a["stroke-width"];c(f)&&(s=new jn(f));let h,m=a.stroke;c(m)&&(h=z.fromCssColorString(m));let p=a["stroke-opacity"];c(p)&&p!==1&&(c(h)||(h=r.color.getValue().clone()),h.alpha=p),c(h)&&(r=new Ut(h))}let l=U3(t,e._entityCollection,o.describe),u=new fc;l.polyline=u,u.clampToGround=o.clampToGround,u.material=r,u.width=s,u.positions=new jn(JW(i,n)),u.arcType=jt.RHUMB}function _fe(e,t,n,i,o){pfe(e,t,i,n.coordinates,o)}function gfe(e,t,n,i,o){let r=n.coordinates;for(let s=0;s<r.length;s++)pfe(e,t,i,r[s],o)}function yfe(e,t,n,i,o){if(i.length===0||i[0].length===0)return;let r=o.strokeMaterialProperty.color,s=o.fillMaterialProperty,a=o.strokeWidthProperty,l=t.properties;if(c(l)){let p=l["stroke-width"];c(p)&&(a=new jn(p));let _,b=l.stroke;c(b)&&(_=z.fromCssColorString(b));let x=l["stroke-opacity"];c(x)&&x!==1&&(c(_)||(_=r.getValue().clone()),_.alpha=x),c(_)&&(r=new jn(_));let T,E=l.fill,S=s.color.getValue();c(E)&&(T=z.fromCssColorString(E),T.alpha=S.alpha),x=l["fill-opacity"],c(x)&&x!==S.alpha&&(c(T)||(T=S.clone()),T.alpha=x),c(T)&&(s=new Ut(T))}let u=new lh;u.outline=new jn(!0),u.outlineColor=r,u.outlineWidth=a,u.material=s,u.arcType=jt.RHUMB;let f=[];for(let p=1,_=i.length;p<_;p++)f.push(new Ra(JW(i[p],n)));let h=i[0];u.hierarchy=new jn(new Ra(JW(h,n),f)),h[0].length>2?u.perPositionHeight=new jn(!0):o.clampToGround||(u.height=0);let m=U3(t,e._entityCollection,o.describe);m.polygon=u}function bfe(e,t,n,i,o){yfe(e,t,i,n.coordinates,o)}function xfe(e,t,n,i,o){let r=n.coordinates;for(let s=0;s<r.length;s++)yfe(e,t,i,r[s],o)}function Tfe(e,t,n,i,o){for(let r in n.objects)if(n.objects.hasOwnProperty(r)){let s=HW(n,n.objects[r]),a=cfe[s.type];a(e,s,s,i,o)}}function Zg(e){this._name=e,this._changed=new fe,this._error=new fe,this._isLoading=!1,this._loading=new fe,this._entityCollection=new qs(this),this._promises=[],this._pinBuilder=new $g,this._entityCluster=new ff,this._credit=void 0,this._resourceCredits=[]}Zg.load=function(e,t){return new Zg().load(e,t)};Object.defineProperties(Zg,{markerSize:{get:function(){return WW},set:function(e){WW=e}},markerSymbol:{get:function(){return qW},set:function(e){qW=e}},markerColor:{get:function(){return YW},set:function(e){YW=e}},stroke:{get:function(){return XW},set:function(e){XW=e}},strokeWidth:{get:function(){return KW},set:function(e){KW=e}},fill:{get:function(){return $W},set:function(e){$W=e}},clampToGround:{get:function(){return ZW},set:function(e){ZW=e}},crsNames:{get:function(){return jW}},crsLinkHrefs:{get:function(){return rfe}},crsLinkTypes:{get:function(){return sfe}}});Object.defineProperties(Zg.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{value:void 0,writable:!1},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!c(e))throw new w("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}}});Zg.prototype.load=function(e,t){return Cfe(this,e,t,!0)};Zg.prototype.process=function(e,t){return Cfe(this,e,t,!1)};function Cfe(e,t,n,i){if(!c(t))throw new w("data is required.");kr.setLoading(e,!0),n=g(n,g.EMPTY_OBJECT);let o=n.credit;typeof o=="string"&&(o=new St(o)),e._credit=o;let r=t,s=n.sourceUri;if(typeof t=="string"||t instanceof Te){t=Te.createIfNeeded(t),r=t.fetchJson(),s=g(s,t.getUrlComponent());let a=e._resourceCredits,l=t.credits;if(c(l)){let u=l.length;for(let f=0;f<u;f++)a.push(l[f])}}return n={describe:g(n.describe,hJe),markerSize:g(n.markerSize,WW),markerSymbol:g(n.markerSymbol,qW),markerColor:g(n.markerColor,YW),strokeWidthProperty:new jn(g(n.strokeWidth,KW)),strokeMaterialProperty:new Ut(g(n.stroke,XW)),fillMaterialProperty:new Ut(g(n.fill,$W)),clampToGround:g(n.clampToGround,ZW)},Promise.resolve(r).then(function(a){return pJe(e,a,n,s,i)}).catch(function(a){throw kr.setLoading(e,!1),e._error.raiseEvent(e,a),a})}Zg.prototype.update=function(e){return!0};function pJe(e,t,n,i,o){let r;c(i)&&(r=Mg(i)),c(r)&&e._name!==r&&(e._name=r,e._changed.raiseEvent(e));let s=cfe[t.type];if(!c(s))throw new ie(`Unsupported GeoJSON object type: ${t.type}`);let a=t.crs,l=a!==null?k3:null;if(c(a)){if(!c(a.properties))throw new ie("crs.properties is undefined.");let u=a.properties;if(a.type==="name"){if(l=jW[u.name],!c(l))throw new ie(`Unknown crs name: ${u.name}`)}else if(a.type==="link"){let f=rfe[u.href];if(c(f)||(f=sfe[u.type]),!c(f))throw new ie(`Unable to resolve crs link: ${JSON.stringify(u)}`);l=f(u)}else if(a.type==="EPSG"){if(l=jW[`EPSG:${u.code}`],!c(l))throw new ie(`Unknown crs EPSG code: ${u.code}`)}else throw new ie(`Unknown crs type: ${a.type}`)}return Promise.resolve(l).then(function(u){return o&&e._entityCollection.removeAll(),u!==null&&s(e,t,t,u,n),Promise.all(e._promises).then(function(){return e._promises.length=0,kr.setLoading(e,!1),e})})}var Efe=Zg;var wfe="4.0.0";function _Je(e){return e===void 0}function eu(e){return typeof e=="boolean"}function Sfe(e,t){for(var n in t)t.hasOwnProperty(n)&&_Je(e[n])&&(e[n]=t[n]);return e}function Afe(e,t,n){var i;return e.length>t&&(n==null?(n="…",i=3):i=n.length,e=e.substring(0,t-i)+n),e}function Po(e,t){for(var n=e.length-1;n>=0;n--)e[n]===t&&e.splice(n,1)}function Jg(e,t){for(var n=e.length-1;n>=0;n--)t(e[n])===!0&&e.splice(n,1)}function Qg(e){throw new Error("Unhandled case for value: '".concat(e,"'"))}var ey=/[A-Za-z]/,Is=/[\d]/;var tu=/\s/,z3=/['"]/,vfe=/[\x00-\x1F\x7F]/,Dfe=/A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source,gJe=/\u2700-\u27bf\udde6-\uddff\ud800-\udbff\udc00-\udfff\ufe0e\ufe0f\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0\ud83c\udffb-\udfff\u200d\u3299\u3297\u303d\u3030\u24c2\ud83c\udd70-\udd71\udd7e-\udd7f\udd8e\udd91-\udd9a\udde6-\uddff\ude01-\ude02\ude1a\ude2f\ude32-\ude3a\ude50-\ude51\u203c\u2049\u25aa-\u25ab\u25b6\u25c0\u25fb-\u25fe\u00a9\u00ae\u2122\u2139\udc04\u2600-\u26FF\u2b05\u2b06\u2b07\u2b1b\u2b1c\u2b50\u2b55\u231a\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\udccf\u2935\u2934\u2190-\u21ff/.source,yJe=/\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source,bJe=Dfe+gJe+yJe,Ife=/0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source,eni=new RegExp("[".concat(Dfe+Ife,"]")),QW=bJe+Ife,Ed=new RegExp("[".concat(QW,"]"));var V3=function(){function e(t){t===void 0&&(t={}),this.tagName="",this.attrs={},this.innerHTML="",this.tagName=t.tagName||"",this.attrs=t.attrs||{},this.innerHTML=t.innerHtml||t.innerHTML||""}return e.prototype.setTagName=function(t){return this.tagName=t,this},e.prototype.getTagName=function(){return this.tagName||""},e.prototype.setAttr=function(t,n){var i=this.getAttrs();return i[t]=n,this},e.prototype.getAttr=function(t){return this.getAttrs()[t]},e.prototype.setAttrs=function(t){return Object.assign(this.getAttrs(),t),this},e.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},e.prototype.setClass=function(t){return this.setAttr("class",t)},e.prototype.addClass=function(t){for(var n=this.getClass(),i=n?n.split(tu):[],o=t.split(tu),r;r=o.shift();)i.indexOf(r)===-1&&i.push(r);return this.getAttrs().class=i.join(" "),this},e.prototype.removeClass=function(t){for(var n=this.getClass(),i=n?n.split(tu):[],o=t.split(tu),r;i.length&&(r=o.shift());){var s=i.indexOf(r);s!==-1&&i.splice(s,1)}return this.getAttrs().class=i.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(t){return(" "+this.getClass()+" ").indexOf(" "+t+" ")!==-1},e.prototype.setInnerHTML=function(t){return this.innerHTML=t,this},e.prototype.setInnerHtml=function(t){return this.setInnerHTML(t)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var t=this.getTagName(),n=this.buildAttrsStr();return n=n?" "+n:"",["<",t,n,">",this.getInnerHtml(),"</",t,">"].join("")},e.prototype.buildAttrsStr=function(){if(!this.attrs)return"";var t=this.getAttrs(),n=[];for(var i in t)t.hasOwnProperty(i)&&n.push(i+'="'+t[i]+'"');return n.join(" ")},e}();function Ofe(e,t,n){var i,o;n==null?(n="…",o=3,i=8):(o=n.length,i=n.length);var r=function(E){var S={},A=E,v=A.match(/^([a-z]+):\/\//i);return v&&(S.scheme=v[1],A=A.substr(v[0].length)),v=A.match(/^(.*?)(?=(\?|#|\/|$))/i),v&&(S.host=v[1],A=A.substr(v[0].length)),v=A.match(/^\/(.*?)(?=(\?|#|$))/i),v&&(S.path=v[1],A=A.substr(v[0].length)),v=A.match(/^\?(.*?)(?=(#|$))/i),v&&(S.query=v[1],A=A.substr(v[0].length)),v=A.match(/^#(.*?)$/i),v&&(S.fragment=v[1]),S},s=function(E){var S="";return E.scheme&&E.host&&(S+=E.scheme+"://"),E.host&&(S+=E.host),E.path&&(S+="/"+E.path),E.query&&(S+="?"+E.query),E.fragment&&(S+="#"+E.fragment),S},a=function(E,S){var A=S/2,v=Math.ceil(A),D=-1*Math.floor(A),R="";return D<0&&(R=E.substr(D)),E.substr(0,v)+n+R};if(e.length<=t)return e;var l=t-o,u=r(e);if(u.query){var f=u.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);f&&(u.query=u.query.substr(0,f[1].length),e=s(u))}if(e.length<=t||(u.host&&(u.host=u.host.replace(/^www\./,""),e=s(u)),e.length<=t))return e;var h="";if(u.host&&(h+=u.host),h.length>=l)return u.host.length==t?(u.host.substr(0,t-o)+n).substr(0,l+i):a(h,l).substr(0,l+i);var m="";if(u.path&&(m+="/"+u.path),u.query&&(m+="?"+u.query),m)if((h+m).length>=l){if((h+m).length==t)return(h+m).substr(0,t);var p=l-h.length;return(h+a(m,p)).substr(0,l+i)}else h+=m;if(u.fragment){var _="#"+u.fragment;if((h+_).length>=l){if((h+_).length==t)return(h+_).substr(0,t);var b=l-h.length;return(h+a(_,b)).substr(0,l+i)}else h+=_}if(u.scheme&&u.host){var x=u.scheme+"://";if((h+x).length<l)return(x+h).substr(0,t)}if(h.length<=t)return h;var T="";return l>0&&(T=h.substr(-1*Math.floor(l/2))),(h.substr(0,Math.ceil(l/2))+n+T).substr(0,l+i)}function Pfe(e,t,n){if(e.length<=t)return e;var i,o;n==null?(n="…",i=8,o=3):(i=n.length,o=n.length);var r=t-o,s="";return r>0&&(s=e.substr(-1*Math.floor(r/2))),(e.substr(0,Math.ceil(r/2))+n+s).substr(0,r+i)}function Rfe(e,t,n){return Afe(e,t,n)}var Mfe=function(){function e(t){t===void 0&&(t={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=t.newWindow||!1,this.truncate=t.truncate||{},this.className=t.className||""}return e.prototype.build=function(t){return new V3({tagName:"a",attrs:this.createAttrs(t),innerHtml:this.processAnchorText(t.getAnchorText())})},e.prototype.createAttrs=function(t){var n={href:t.getAnchorHref()},i=this.createCssClass(t);return i&&(n.class=i),this.newWindow&&(n.target="_blank",n.rel="noopener noreferrer"),this.truncate&&this.truncate.length&&this.truncate.length<t.getAnchorText().length&&(n.title=t.getAnchorHref()),n},e.prototype.createCssClass=function(t){var n=this.className;if(n){for(var i=[n],o=t.getCssClassSuffixes(),r=0,s=o.length;r<s;r++)i.push(n+"-"+o[r]);return i.join(" ")}else return""},e.prototype.processAnchorText=function(t){return t=this.doTruncate(t),t},e.prototype.doTruncate=function(t){var n=this.truncate;if(!n||!n.length)return t;var i=n.length,o=n.location;return o==="smart"?Ofe(t,i):o==="middle"?Pfe(t,i):Rfe(t,i)},e}();var e6=function(e,t){return e6=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e6(e,t)};function Wh(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");e6(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Os=function(){return Os=Object.assign||function(t){for(var n,i=1,o=arguments.length;i<o;i++){n=arguments[i];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Os.apply(this,arguments)};var qh=function(){function e(t){this._=null,this.matchedText="",this.offset=0,this.tagBuilder=t.tagBuilder,this.matchedText=t.matchedText,this.offset=t.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(t){this.offset=t},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.type]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e}();var xJe="(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|verm\xF6gensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|verm\xF6gensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|travelchannel|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|etisalat|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|\u043A\u0430\u0442\u043E\u043B\u0438\u043A|\u0627\u062A\u0635\u0627\u0644\u0627\u062A|\u0627\u0644\u0628\u062D\u0631\u064A\u0646|\u0627\u0644\u062C\u0632\u0627\u0626\u0631|\u0627\u0644\u0639\u0644\u064A\u0627\u0646|\u067E\u0627\u06A9\u0633\u062A\u0627\u0646|\u0643\u0627\u062B\u0648\u0644\u064A\u0643|\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE|abarth|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|webcam|xihuan|yachts|yandex|zappos|\u043C\u043E\u0441\u043A\u0432\u0430|\u043E\u043D\u043B\u0430\u0439\u043D|\u0627\u0628\u0648\u0638\u0628\u064A|\u0627\u0631\u0627\u0645\u0643\u0648|\u0627\u0644\u0627\u0631\u062F\u0646|\u0627\u0644\u0645\u063A\u0631\u0628|\u0627\u0645\u0627\u0631\u0627\u062A|\u0641\u0644\u0633\u0637\u064A\u0646|\u0645\u0644\u064A\u0633\u064A\u0627|\u092D\u093E\u0930\u0924\u092E\u094D|\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8|\u30D5\u30A1\u30C3\u30B7\u30E7\u30F3|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|loans|locus|lotte|lotto|macys|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|\u05D9\u05E9\u05E8\u05D0\u05DC|\u0627\u06CC\u0631\u0627\u0646|\u0628\u0627\u0632\u0627\u0631|\u0628\u06BE\u0627\u0631\u062A|\u0633\u0648\u062F\u0627\u0646|\u0633\u0648\u0631\u064A\u0629|\u0647\u0645\u0631\u0627\u0647|\u092D\u093E\u0930\u094B\u0924|\u0938\u0902\u0917\u0920\u0928|\u09AC\u09BE\u0982\u09B2\u09BE|\u0C2D\u0C3E\u0C30\u0C24\u0C4D|\u0D2D\u0D3E\u0D30\u0D24\u0D02|\u5609\u91CC\u5927\u9152\u5E97|aarp|able|adac|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|\u0434\u0435\u0442\u0438|\u0441\u0430\u0439\u0442|\u0628\u0627\u0631\u062A|\u0628\u064A\u062A\u0643|\u0680\u0627\u0631\u062A|\u062A\u0648\u0646\u0633|\u0634\u0628\u0643\u0629|\u0639\u0631\u0627\u0642|\u0639\u0645\u0627\u0646|\u0645\u0648\u0642\u0639|\u092D\u093E\u0930\u0924|\u09AD\u09BE\u09B0\u09A4|\u09AD\u09BE\u09F0\u09A4|\u0A2D\u0A3E\u0A30\u0A24|\u0AAD\u0ABE\u0AB0\u0AA4|\u0B2D\u0B3E\u0B30\u0B24|\u0CAD\u0CBE\u0CB0\u0CA4|\u0DBD\u0D82\u0D9A\u0DCF|\u30A2\u30DE\u30BE\u30F3|\u30B0\u30FC\u30B0\u30EB|\u30AF\u30E9\u30A6\u30C9|\u30DD\u30A4\u30F3\u30C8|\u7EC4\u7EC7\u673A\u6784|\u96FB\u8A0A\u76C8\u79D1|\u9999\u683C\u91CC\u62C9|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|\u0431\u0435\u043B|\u043A\u043E\u043C|\u049B\u0430\u0437|\u043C\u043A\u0434|\u043C\u043E\u043D|\u043E\u0440\u0433|\u0440\u0443\u0441|\u0441\u0440\u0431|\u0443\u043A\u0440|\u0570\u0561\u0575|\u05E7\u05D5\u05DD|\u0639\u0631\u0628|\u0642\u0637\u0631|\u0643\u0648\u0645|\u0645\u0635\u0631|\u0915\u0949\u092E|\u0928\u0947\u091F|\u0E04\u0E2D\u0E21|\u0E44\u0E17\u0E22|\u0EA5\u0EB2\u0EA7|\u30B9\u30C8\u30A2|\u30BB\u30FC\u30EB|\u307F\u3093\u306A|\u4E2D\u6587\u7F51|\u4E9A\u9A6C\u900A|\u5929\u4E3B\u6559|\u6211\u7231\u4F60|\u65B0\u52A0\u5761|\u6DE1\u9A6C\u9521|\u8BFA\u57FA\u4E9A|\u98DE\u5229\u6D66|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|\u03B5\u03BB|\u03B5\u03C5|\u0431\u0433|\u0435\u044E|\u0440\u0444|\u10D2\u10D4|\uB2F7\uB137|\uB2F7\uCEF4|\uC0BC\uC131|\uD55C\uAD6D|\u30B3\u30E0|\u4E16\u754C|\u4E2D\u4FE1|\u4E2D\u56FD|\u4E2D\u570B|\u4F01\u4E1A|\u4F5B\u5C71|\u4FE1\u606F|\u5065\u5EB7|\u516B\u5366|\u516C\u53F8|\u516C\u76CA|\u53F0\u6E7E|\u53F0\u7063|\u5546\u57CE|\u5546\u5E97|\u5546\u6807|\u5609\u91CC|\u5728\u7EBF|\u5927\u62FF|\u5A31\u4E50|\u5BB6\u96FB|\u5E7F\u4E1C|\u5FAE\u535A|\u6148\u5584|\u624B\u673A|\u62DB\u8058|\u653F\u52A1|\u653F\u5E9C|\u65B0\u95FB|\u65F6\u5C1A|\u66F8\u7C4D|\u673A\u6784|\u6E38\u620F|\u6FB3\u9580|\u70B9\u770B|\u79FB\u52A8|\u7F51\u5740|\u7F51\u5E97|\u7F51\u7AD9|\u7F51\u7EDC|\u8054\u901A|\u8C37\u6B4C|\u8D2D\u7269|\u901A\u8CA9|\u96C6\u56E2|\u98DF\u54C1|\u9910\u5385|\u9999\u6E2F)",Lfe=new RegExp("^"+xJe+"$");var TJe=/[\/?#]/,CJe=/[-+&@#/%=~_()|'$*\[\]{}\u2713]/,Nfe=/[?!:,.;^]/,t6=/https?:\/\//i,Ffe=new RegExp("^"+t6.source,"i"),Bfe=new RegExp(Nfe.source+"$"),EJe=/^(javascript|vbscript):/i,wJe=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,SJe=/^(?:\/\/)?([^/#?:]+)/;function H3(e){return ey.test(e)}function n6(e){return ey.test(e)||Is.test(e)||e==="+"||e==="-"||e==="."}function Bp(e){return Ed.test(e)}function G3(e){return e==="_"||Bp(e)}function i6(e){return Ed.test(e)||CJe.test(e)||Nfe.test(e)}function j3(e){return TJe.test(e)}function o6(e){return Lfe.test(e.toLowerCase())}function kfe(e){if(EJe.test(e))return!1;var t=e.match(wJe);if(!t)return!1;var n=!!t[1],i=t[2];return n?!0:!(i.indexOf(".")===-1||!ey.test(i))}function Ufe(e){var t=e.match(SJe);if(!t)return!1;var n=t[0],i=n.split(".");if(i.length<2)return!1;var o=i[i.length-1];return!!o6(o)}var AJe=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,vJe=/[:/?#]/;function zfe(e){var t=e.split(vJe,1)[0];return AJe.test(t)}var DJe=/^(https?:\/\/)?(www\.)?/i,IJe=/^\/\//,Vfe=function(e){Wh(t,e);function t(n){var i=e.call(this,n)||this;return i.type="url",i.url="",i.urlMatchType="scheme",i.protocolRelativeMatch=!1,i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.protocolPrepended=!1,i.urlMatchType=n.urlMatchType,i.url=n.url,i.protocolRelativeMatch=n.protocolRelativeMatch,i.stripPrefix=n.stripPrefix,i.stripTrailingSlash=n.stripTrailingSlash,i.decodePercentEncoding=n.decodePercentEncoding,i}return t.prototype.getType=function(){return"url"},t.prototype.getUrlMatchType=function(){return this.urlMatchType},t.prototype.getUrl=function(){var n=this.url;return!this.protocolRelativeMatch&&this.urlMatchType!=="scheme"&&!this.protocolPrepended&&(n=this.url="http://"+n,this.protocolPrepended=!0),n},t.prototype.getAnchorHref=function(){var n=this.getUrl();return n.replace(/&/g,"&")},t.prototype.getAnchorText=function(){var n=this.getMatchedText();return this.protocolRelativeMatch&&(n=RJe(n)),this.stripPrefix.scheme&&(n=OJe(n)),this.stripPrefix.www&&(n=PJe(n)),this.stripTrailingSlash&&(n=MJe(n)),this.decodePercentEncoding&&(n=LJe(n)),n},t}(qh);function OJe(e){return e.replace(Ffe,"")}function PJe(e){return e.replace(DJe,"$1")}function RJe(e){return e.replace(IJe,"")}function MJe(e){return e.charAt(e.length-1)==="/"&&(e=e.slice(0,-1)),e}function LJe(e){var t=e.replace(/%22/gi,""").replace(/%26/gi,"&").replace(/%27/gi,"'").replace(/%3C/gi,"<").replace(/%3E/gi,">");try{return decodeURIComponent(t)}catch{return t}}var Hfe=/^mailto:/i,NJe=new RegExp("[".concat(QW,"!#$%&'*+/=?^_`{|}~-]"));function Gfe(e){return Ed.test(e)}function W3(e){return NJe.test(e)}function jfe(e){var t=e.split(".").pop()||"";return o6(t)}var Wfe=function(e){Wh(t,e);function t(n){var i=e.call(this,n)||this;return i.type="email",i.email="",i.email=n.email,i}return t.prototype.getType=function(){return"email"},t.prototype.getEmail=function(){return this.email},t.prototype.getAnchorHref=function(){return"mailto:"+this.email},t.prototype.getAnchorText=function(){return this.email},t}(qh);function r6(e){return e==="_"||Ed.test(e)}function qfe(e){return e.length<=140}var Yfe=["twitter","facebook","instagram","tiktok"];var Xfe=function(e){Wh(t,e);function t(n){var i=e.call(this,n)||this;return i.type="hashtag",i.serviceName="twitter",i.hashtag="",i.serviceName=n.serviceName,i.hashtag=n.hashtag,i}return t.prototype.getType=function(){return"hashtag"},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getHashtag=function(){return this.hashtag},t.prototype.getAnchorHref=function(){var n=this.serviceName,i=this.hashtag;switch(n){case"twitter":return"https://twitter.com/hashtag/"+i;case"facebook":return"https://www.facebook.com/hashtag/"+i;case"instagram":return"https://instagram.com/explore/tags/"+i;case"tiktok":return"https://www.tiktok.com/tag/"+i;default:throw Qg(n),new Error("Invalid hashtag service: ".concat(n))}},t.prototype.getAnchorText=function(){return"#"+this.hashtag},t.prototype.getCssClassSuffixes=function(){var n=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&n.push(i),n},t}(qh);var FJe={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/},BJe=/[-\w.]/;function s6(e){return BJe.test(e)}function Kfe(e,t){var n=FJe[t];return n.test(e)}var $fe=["twitter","instagram","soundcloud","tiktok"];var Zfe=function(e){Wh(t,e);function t(n){var i=e.call(this,n)||this;return i.type="mention",i.serviceName="twitter",i.mention="",i.mention=n.mention,i.serviceName=n.serviceName,i}return t.prototype.getType=function(){return"mention"},t.prototype.getMention=function(){return this.mention},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;case"soundcloud":return"https://soundcloud.com/"+this.mention;case"tiktok":return"https://www.tiktok.com/@"+this.mention;default:throw new Error("Unknown service name to point mention to: "+this.serviceName)}},t.prototype.getAnchorText=function(){return"@"+this.mention},t.prototype.getCssClassSuffixes=function(){var n=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&n.push(i),n},t}(qh);var kJe=/[-. ]/,UJe=/[-. ()]/,zJe=/[,;]/,VJe=/(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/,HJe=/(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/,GJe=new RegExp("^".concat(VJe.source,"|").concat(HJe.source,"$"));function a6(e){return kJe.test(e)}function q3(e){return zJe.test(e)}function Jfe(e){var t=e.charAt(0)==="+"||UJe.test(e);return t&&GJe.test(e)}var Qfe=function(e){Wh(t,e);function t(n){var i=e.call(this,n)||this;return i.type="phone",i.number="",i.plusSign=!1,i.number=n.number,i.plusSign=n.plusSign,i}return t.prototype.getType=function(){return"phone"},t.prototype.getPhoneNumber=function(){return this.number},t.prototype.getNumber=function(){return this.getPhoneNumber()},t.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},t.prototype.getAnchorText=function(){return this.matchedText},t}(qh);function nde(e,t){for(var n=t.tagBuilder,i=t.stripPrefix,o=t.stripTrailingSlash,r=t.decodePercentEncoding,s=t.hashtagServiceName,a=t.mentionServiceName,l=[],u=e.length,f=[],h=0;h<u;h++){var m=e.charAt(h);if(f.length===0)x(m);else for(var p=f.length-1;p>=0;p--){var _=f[p];switch(_.state){case 11:D(_,m);break;case 12:R(_,m);break;case 0:T(_,m);break;case 1:E(_,m);break;case 2:S(_,m);break;case 3:A(_,m);break;case 4:v(_,m);break;case 5:P(_,m);break;case 6:L(_,m);break;case 7:F(_,m);break;case 13:y(_,m);break;case 14:I(_,m);break;case 8:M(_,m);break;case 9:B(_,m);break;case 10:U(_,m);break;case 15:V(_,m);break;case 16:W(_,m);break;case 17:H(_,m);break;case 18:X(_,m);break;case 19:$(_,m);break;case 20:ae(_,m);break;case 21:se(_,m);break;case 22:he(_,m);break;case 23:ge(_,m);break;case 24:le(_,m);break;case 25:me(_,m);break;case 26:Me(_,m);break;case 27:Ge(_,m);break;case 28:De(_,m);break;case 29:ke(_,m);break;case 30:He(_,m);break;case 31:ft(_,m);break;case 32:Kt(_,m);break;case 33:Pt(_,m);break;case 34:dt(_,m);break;case 35:rn(_,m);break;case 36:Vt(_,m);break;case 37:Ie(_,m);break;case 38:Ae(_,m);break;case 39:Qe(_,m);break;case 40:et(_,m);break;case 41:at(_,m);break;default:Qg(_.state)}}}for(var b=f.length-1;b>=0;b--)f.forEach(function(pe){return $t(pe)});return l;function x(pe){if(pe==="#")f.push(XJe(h,28));else if(pe==="@")f.push(KJe(h,30));else if(pe==="/")f.push(l6(h,11));else if(pe==="+")f.push(u6(h,37));else if(pe==="(")f.push(u6(h,32));else{if(Is.test(pe)&&(f.push(u6(h,38)),f.push(qJe(h,13))),Gfe(pe)){var _e=pe.toLowerCase()==="m"?15:22;f.push(YJe(h,_e))}H3(pe)&&f.push(c6(h,0)),Ed.test(pe)&&f.push(l6(h,5))}}function T(pe,_e){_e===":"?pe.state=2:_e==="-"?pe.state=1:n6(_e)||Po(f,pe)}function E(pe,_e){_e==="-"||(_e==="/"?(Po(f,pe),f.push(l6(h,11))):n6(_e)?pe.state=0:Po(f,pe))}function S(pe,_e){_e==="/"?pe.state=3:_e==="."?Po(f,pe):Bp(_e)?(pe.state=5,H3(_e)&&f.push(c6(h,0))):Po(f,pe)}function A(pe,_e){_e==="/"?pe.state=4:i6(_e)?(pe.state=10,pe.acceptStateReached=!0):$t(pe)}function v(pe,_e){_e==="/"?pe.state=10:Bp(_e)?(pe.state=5,pe.acceptStateReached=!0):Po(f,pe)}function D(pe,_e){_e==="/"?pe.state=12:Po(f,pe)}function R(pe,_e){Bp(_e)?pe.state=5:Po(f,pe)}function P(pe,_e){_e==="."?pe.state=7:_e==="-"?pe.state=6:_e===":"?pe.state=8:j3(_e)?pe.state=10:G3(_e)||$t(pe)}function L(pe,_e){_e==="-"||(_e==="."?$t(pe):Bp(_e)?pe.state=5:$t(pe))}function F(pe,_e){_e==="."?$t(pe):Bp(_e)?(pe.state=5,pe.acceptStateReached=!0):$t(pe)}function y(pe,_e){_e==="."?pe.state=14:_e===":"?pe.state=8:Is.test(_e)||(j3(_e)?pe.state=10:Ed.test(_e)?Po(f,pe):$t(pe))}function I(pe,_e){Is.test(_e)?(pe.octetsEncountered++,pe.octetsEncountered===4&&(pe.acceptStateReached=!0),pe.state=13):$t(pe)}function M(pe,_e){Is.test(_e)?pe.state=9:$t(pe)}function B(pe,_e){Is.test(_e)||(j3(_e)?pe.state=10:$t(pe))}function U(pe,_e){i6(_e)||$t(pe)}function V(pe,_e){_e.toLowerCase()==="a"?pe.state=16:he(pe,_e)}function W(pe,_e){_e.toLowerCase()==="i"?pe.state=17:he(pe,_e)}function H(pe,_e){_e.toLowerCase()==="l"?pe.state=18:he(pe,_e)}function X(pe,_e){_e.toLowerCase()==="t"?pe.state=19:he(pe,_e)}function $(pe,_e){_e.toLowerCase()==="o"?pe.state=20:he(pe,_e)}function ae(pe,_e){_e.toLowerCase()===":"?pe.state=21:he(pe,_e)}function se(pe,_e){W3(_e)?pe.state=22:Po(f,pe)}function he(pe,_e){_e==="."?pe.state=23:_e==="@"?pe.state=24:W3(_e)?pe.state=22:Po(f,pe)}function ge(pe,_e){_e==="."?Po(f,pe):_e==="@"?Po(f,pe):W3(_e)?pe.state=22:Po(f,pe)}function le(pe,_e){Bp(_e)?pe.state=25:Po(f,pe)}function me(pe,_e){_e==="."?pe.state=27:_e==="-"?pe.state=26:G3(_e)||$t(pe)}function Me(pe,_e){_e==="-"||_e==="."?$t(pe):G3(_e)?pe.state=25:$t(pe)}function Ge(pe,_e){_e==="."||_e==="-"?$t(pe):Bp(_e)?(pe.state=25,pe.acceptStateReached=!0):$t(pe)}function De(pe,_e){r6(_e)?(pe.state=29,pe.acceptStateReached=!0):Po(f,pe)}function ke(pe,_e){r6(_e)||$t(pe)}function He(pe,_e){s6(_e)?(pe.state=31,pe.acceptStateReached=!0):Po(f,pe)}function ft(pe,_e){s6(_e)||(Ed.test(_e)?Po(f,pe):$t(pe))}function Ie(pe,_e){Is.test(_e)?pe.state=38:(Po(f,pe),x(_e))}function Kt(pe,_e){Is.test(_e)?pe.state=33:Po(f,pe),x(_e)}function Pt(pe,_e){Is.test(_e)?pe.state=34:Po(f,pe)}function dt(pe,_e){Is.test(_e)?pe.state=35:Po(f,pe)}function rn(pe,_e){_e===")"?pe.state=36:Po(f,pe)}function Vt(pe,_e){Is.test(_e)?pe.state=38:a6(_e)?pe.state=39:Po(f,pe)}function Ae(pe,_e){pe.acceptStateReached=!0,q3(_e)?pe.state=40:_e==="#"?pe.state=41:Is.test(_e)||(_e==="("?pe.state=32:a6(_e)?pe.state=39:($t(pe),H3(_e)&&f.push(c6(h,0))))}function Qe(pe,_e){Is.test(_e)?pe.state=38:_e==="("?pe.state=32:($t(pe),x(_e))}function et(pe,_e){q3(_e)||(_e==="#"?pe.state=41:Is.test(_e)?pe.state=38:$t(pe))}function at(pe,_e){q3(_e)?pe.state=40:Is.test(_e)?Po(f,pe):$t(pe)}function $t(pe){if(Po(f,pe),!!pe.acceptStateReached){var _e=pe.startIdx,rt=e.slice(pe.startIdx,h);if(rt=WJe(rt),pe.type==="url"){var Ri=e.charAt(pe.startIdx-1);if(Ri==="@")return;var ot=pe.matchType;if(ot==="scheme"){var uo=t6.exec(rt);if(uo&&(_e=_e+uo.index,rt=rt.slice(uo.index)),!kfe(rt))return}else if(ot==="tld"){if(!Ufe(rt))return}else if(ot==="ipV4"){if(!zfe(rt))return}else Qg(ot);l.push(new Vfe({tagBuilder:n,matchedText:rt,offset:_e,urlMatchType:ot,url:rt,protocolRelativeMatch:rt.slice(0,2)==="//",stripPrefix:i,stripTrailingSlash:o,decodePercentEncoding:r}))}else if(pe.type==="email")jfe(rt)&&l.push(new Wfe({tagBuilder:n,matchedText:rt,offset:_e,email:rt.replace(Hfe,"")}));else if(pe.type==="hashtag")qfe(rt)&&l.push(new Xfe({tagBuilder:n,matchedText:rt,offset:_e,serviceName:s,hashtag:rt.slice(1)}));else if(pe.type==="mention")Kfe(rt,a)&&l.push(new Zfe({tagBuilder:n,matchedText:rt,offset:_e,serviceName:a,mention:rt.slice(1)}));else if(pe.type==="phone"){if(rt=rt.replace(/ +$/g,""),Jfe(rt)){var ir=rt.replace(/[^0-9,;#]/g,"");l.push(new Qfe({tagBuilder:n,matchedText:rt,offset:_e,number:ir,plusSign:rt.charAt(0)==="+"}))}}else Qg(pe)}}}var jJe=/[\(\{\[]/,ede=/[\)\}\]]/,tde={")":"(","}":"{","]":"["};function WJe(e){for(var t={"(":0,"{":0,"[":0},n=0;n<e.length;n++){var i=e.charAt(n);jJe.test(i)?t[i]++:ede.test(i)&&t[tde[i]]--}for(var o=e.length-1,r;o>=0;)if(r=e.charAt(o),ede.test(r)){var s=tde[r];if(t[s]<0)t[s]++,o--;else break}else if(Bfe.test(r))o--;else break;return e.slice(0,o+1)}function c6(e,t){return{type:"url",startIdx:e,state:t,acceptStateReached:!1,matchType:"scheme"}}function l6(e,t){return{type:"url",startIdx:e,state:t,acceptStateReached:!1,matchType:"tld"}}function qJe(e,t){return{type:"url",startIdx:e,state:t,acceptStateReached:!1,matchType:"ipV4",octetsEncountered:1}}function YJe(e,t){return{type:"email",startIdx:e,state:t,acceptStateReached:!1}}function XJe(e,t){return{type:"hashtag",startIdx:e,state:t,acceptStateReached:!1}}function KJe(e,t){return{type:"mention",startIdx:e,state:t,acceptStateReached:!1}}function u6(e,t){return{type:"phone",startIdx:e,state:t,acceptStateReached:!1}}function ide(e,t){for(var n=t.onOpenTag,i=t.onCloseTag,o=t.onText,r=t.onComment,s=t.onDoctype,a=new Yh,l=0,u=e.length,f=0,h=0,m=a;l<u;){var p=e.charAt(l);switch(f){case 0:_(p);break;case 1:b(p);break;case 2:T(p);break;case 3:x(p);break;case 4:E(p);break;case 5:S(p);break;case 6:A(p);break;case 7:v(p);break;case 8:D(p);break;case 9:R(p);break;case 10:P(p);break;case 11:L(p);break;case 12:F(p);break;case 13:y(p);break;case 14:I(p);break;case 15:M(p);break;case 16:B(p);break;case 17:U(p);break;case 18:V(p);break;case 19:W(p);break;case 20:H(p);break;default:Qg(f)}l++}h<l&&se();function _(le){le==="<"&&$()}function b(le){le==="!"?f=13:le==="/"?(f=2,m=new Yh(Os(Os({},m),{isClosing:!0}))):le==="<"?$():ey.test(le)?(f=3,m=new Yh(Os(Os({},m),{isOpening:!0}))):(f=0,m=a)}function x(le){tu.test(le)?(m=new Yh(Os(Os({},m),{name:he()})),f=4):le==="<"?$():le==="/"?(m=new Yh(Os(Os({},m),{name:he()})),f=12):le===">"?(m=new Yh(Os(Os({},m),{name:he()})),ae()):!ey.test(le)&&!Is.test(le)&&le!==":"&&X()}function T(le){le===">"?X():ey.test(le)?f=3:X()}function E(le){tu.test(le)||(le==="/"?f=12:le===">"?ae():le==="<"?$():le==="="||z3.test(le)||vfe.test(le)?X():f=5)}function S(le){tu.test(le)?f=6:le==="/"?f=12:le==="="?f=7:le===">"?ae():le==="<"?$():z3.test(le)&&X()}function A(le){tu.test(le)||(le==="/"?f=12:le==="="?f=7:le===">"?ae():le==="<"?$():z3.test(le)?X():f=5)}function v(le){tu.test(le)||(le==='"'?f=8:le==="'"?f=9:/[>=`]/.test(le)?X():le==="<"?$():f=10)}function D(le){le==='"'&&(f=11)}function R(le){le==="'"&&(f=11)}function P(le){tu.test(le)?f=4:le===">"?ae():le==="<"&&$()}function L(le){tu.test(le)?f=4:le==="/"?f=12:le===">"?ae():le==="<"?$():(f=4,ge())}function F(le){le===">"?(m=new Yh(Os(Os({},m),{isClosing:!0})),ae()):f=4}function y(le){e.substr(l,2)==="--"?(l+=2,m=new Yh(Os(Os({},m),{type:"comment"})),f=14):e.substr(l,7).toUpperCase()==="DOCTYPE"?(l+=7,m=new Yh(Os(Os({},m),{type:"doctype"})),f=20):X()}function I(le){le==="-"?f=15:le===">"?X():f=16}function M(le){le==="-"?f=18:le===">"?X():f=16}function B(le){le==="-"&&(f=17)}function U(le){le==="-"?f=18:f=16}function V(le){le===">"?ae():le==="!"?f=19:le==="-"||(f=16)}function W(le){le==="-"?f=17:le===">"?ae():f=16}function H(le){le===">"?ae():le==="<"&&$()}function X(){f=0,m=a}function $(){f=1,m=new Yh({idx:l})}function ae(){var le=e.slice(h,m.idx);le&&o(le,h),m.type==="comment"?r(m.idx):m.type==="doctype"?s(m.idx):(m.isOpening&&n(m.name,m.idx),m.isClosing&&i(m.name,m.idx)),X(),h=l+1}function se(){var le=e.slice(h,l);o(le,h),h=l+1}function he(){var le=m.idx+(m.isClosing?2:1);return e.slice(le,l).toLowerCase()}function ge(){l--}}var Yh=function(){function e(t){t===void 0&&(t={}),this.idx=t.idx!==void 0?t.idx:-1,this.type=t.type||"tag",this.name=t.name||"",this.isOpening=!!t.isOpening,this.isClosing=!!t.isClosing}return e}();var $Je=function(){function e(t){t===void 0&&(t={}),this.version=e.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.tagBuilder=null,this.urls=ZJe(t.urls),this.email=eu(t.email)?t.email:this.email,this.phone=eu(t.phone)?t.phone:this.phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=eu(t.newWindow)?t.newWindow:this.newWindow,this.stripPrefix=JJe(t.stripPrefix),this.stripTrailingSlash=eu(t.stripTrailingSlash)?t.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=eu(t.decodePercentEncoding)?t.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=t.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&$fe.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var i=this.hashtag;if(i!==!1&&Yfe.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=QJe(t.truncate),this.className=t.className||this.className,this.replaceFn=t.replaceFn||this.replaceFn,this.context=t.context||this}return e.link=function(t,n){var i=new e(n);return i.link(t)},e.parse=function(t,n){var i=new e(n);return i.parse(t)},e.prototype.parse=function(t){var n=this,i=["a","style","script"],o=0,r=[];return ide(t,{onOpenTag:function(s){i.indexOf(s)>=0&&o++},onText:function(s,a){if(o===0){var l=/( | |<|<|>|>|"|"|')/gi,u=s.split(l),f=a;u.forEach(function(h,m){if(m%2===0){var p=n.parseText(h,f);r.push.apply(r,p)}f+=h.length})}},onCloseTag:function(s){i.indexOf(s)>=0&&(o=Math.max(o-1,0))},onComment:function(s){},onDoctype:function(s){}}),r=this.compactMatches(r),r=this.removeUnwantedMatches(r),r},e.prototype.compactMatches=function(t){t.sort(function(l,u){return l.getOffset()-u.getOffset()});for(var n=0;n<t.length-1;){var i=t[n],o=i.getOffset(),r=i.getMatchedText().length,s=o+r;if(n+1<t.length){if(t[n+1].getOffset()===o){var a=t[n+1].getMatchedText().length>r?n:n+1;t.splice(a,1);continue}if(t[n+1].getOffset()<s){t.splice(n+1,1);continue}}n++}return t},e.prototype.removeUnwantedMatches=function(t){return this.hashtag||Jg(t,function(n){return n.getType()==="hashtag"}),this.email||Jg(t,function(n){return n.getType()==="email"}),this.phone||Jg(t,function(n){return n.getType()==="phone"}),this.mention||Jg(t,function(n){return n.getType()==="mention"}),this.urls.schemeMatches||Jg(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="scheme"}),this.urls.tldMatches||Jg(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="tld"}),this.urls.ipV4Matches||Jg(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="ipV4"}),t},e.prototype.parseText=function(t,n){n===void 0&&(n=0),n=n||0;for(var i=nde(t,{tagBuilder:this.getTagBuilder(),stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding,hashtagServiceName:this.hashtag,mentionServiceName:this.mention||"twitter"}),o=0,r=i.length;o<r;o++)i[o].setOffset(n+i[o].getOffset());return i},e.prototype.link=function(t){if(!t)return"";this.sanitizeHtml&&(t=t.replace(/</g,"<").replace(/>/g,">"));for(var n=this.parse(t),i=[],o=0,r=0,s=n.length;r<s;r++){var a=n[r];i.push(t.substring(o,a.getOffset())),i.push(this.createMatchReturnVal(a)),o=a.getOffset()+a.getMatchedText().length}return i.push(t.substring(o)),i.join("")},e.prototype.createMatchReturnVal=function(t){var n;if(this.replaceFn&&(n=this.replaceFn.call(this.context,t)),typeof n=="string")return n;if(n===!1)return t.getMatchedText();if(n instanceof V3)return n.toAnchorString();var i=t.buildTag();return i.toAnchorString()},e.prototype.getTagBuilder=function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new Mfe({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t},e.version=wfe,e}(),ode=$Je;function ZJe(e){return e==null&&(e=!0),eu(e)?{schemeMatches:e,tldMatches:e,ipV4Matches:e}:{schemeMatches:eu(e.schemeMatches)?e.schemeMatches:!0,tldMatches:eu(e.tldMatches)?e.tldMatches:!0,ipV4Matches:eu(e.ipV4Matches)?e.ipV4Matches:!0}}function JJe(e){return e==null&&(e=!0),eu(e)?{scheme:e,www:e}:{scheme:eu(e.scheme)?e.scheme:!0,www:eu(e.www)?e.www:!0}}function QJe(e){return typeof e=="number"?{length:e,location:"end"}:Sfe(e||{},{length:Number.POSITIVE_INFINITY,location:"end"})}var Y3=ode;var hde;typeof DOMParser!="undefined"&&(hde=new DOMParser);var eQe=new Y3({stripPrefix:!1,email:!1,replaceFn:function(e,t){return t.urlMatchType==="scheme"||t.urlMatchType==="www"}}),X3=32,rde=2414016,sde=1,ade=16093e3,cde=.1,tQe=[null,void 0,"http://www.topografix.com/GPX/1/1"],go={gpx:tQe};function nQe(e){return new Promise((t,n)=>{let i=new FileReader;i.addEventListener("load",function(){t(i.result)}),i.addEventListener("error",function(){n(i.error)}),i.readAsText(e)})}function f6(e,t){let n=uD(e,"id");return n=c(n)?n:Bn(),t.getOrCreateEntity(n)}function d6(e){let t=lde(e,"lon"),n=lde(e,"lat"),i=cD(e,"ele",go.gpx);return d.fromDegrees(t,n,i)}function lde(e,t){if(!c(e))return;let n=e.getAttribute(t);if(n!==null){let i=parseFloat(n);return isNaN(i)?void 0:i}}function uD(e,t){if(!c(e))return;let n=e.getAttribute(t);return n!==null?n:void 0}function ty(e,t,n){if(!c(e))return;let i=e.childNodes,o=i.length;for(let r=0;r<o;r++){let s=i[r];if(s.localName===t&&n.indexOf(s.namespaceURI)!==-1)return s}}function h6(e,t,n){if(!c(e))return;let i=[],o=e.getElementsByTagName(t),r=o.length;for(let s=0;s<r;s++){let a=o[s];a.localName===t&&n.indexOf(a.namespaceURI)!==-1&&i.push(a)}return i}function cD(e,t,n){let i=ty(e,t,n);if(c(i)){let o=parseFloat(i.textContent);return isNaN(o)?void 0:o}}function fl(e,t,n){let i=ty(e,t,n);if(c(i))return i.textContent.trim()}function mde(e){let t=new sc;return t.width=X3,t.height=X3,t.scaleByDistance=new Bt(rde,sde,ade,cde),t.pixelOffsetScaleByDistance=new Bt(rde,sde,ade,cde),t.verticalOrigin=new jn(Dn.BOTTOM),t.image=e,t}function iQe(){let e=new ch;return e.translucencyByDistance=new Bt(3e6,1,5e6,0),e.pixelOffset=new k(17,0),e.horizontalOrigin=mi.LEFT,e.font="16px sans-serif",e.style=Uo.FILL_AND_OUTLINE,e}function pde(e){let t=new fc;return t.width=4,t.material=new c0,t.material.color=c(e)?e:z.RED,t.material.outlineWidth=2,t.material.outlineColor=z.BLACK,t}var ude={time:{text:"Time",tag:"time"},comment:{text:"Comment",tag:"cmt"},description:{text:"Description",tag:"desc"},source:{text:"Source",tag:"src"},number:{text:"GPS track/route number",tag:"number"},type:{text:"Type",tag:"type"}},lD;typeof document!="undefined"&&(lD=document.createElement("div"));function m6(e,t){let n,i="",o=Object.keys(ude),r=o.length;for(n=0;n<r;n++){let f=o[n],h=ude[f];h.value=g(fl(e,h.tag,go.gpx),""),c(h.value)&&h.value!==""&&(i=`${i}<p>${h.text}: ${h.value}</p>`)}if(!c(i)||i==="")return;i=eQe.link(i),lD.innerHTML=i;let s=lD.querySelectorAll("a");for(n=0;n<s.length;n++)s[n].setAttribute("target","_blank");let a=z.WHITE,l=z.BLACK,u='<div class="cesium-infoBox-description-lighter" style="';return u+="overflow:auto;",u+="word-wrap:break-word;",u+=`background-color:${a.toCssColorString()};`,u+=`color:${l.toCssColorString()};`,u+='">',u+=`${lD.innerHTML}</div>`,lD.innerHTML="",u}function _de(e,t,n,i){let o=d6(t),r=f6(t,n);r.position=o;let s=c(i.waypointImage)?i.waypointImage:e._pinBuilder.fromMakiIconId("marker",z.RED,X3);r.billboard=mde(s);let a=fl(t,"name",go.gpx);r.name=a,r.label=iQe(),r.label.text=a,r.description=m6(t,r),i.clampToGround&&(r.billboard.heightReference=qe.CLAMP_TO_GROUND,r.label.heightReference=qe.CLAMP_TO_GROUND)}function oQe(e,t,n,i){let o=f6(t,n);o.description=m6(t,o);let r=h6(t,"rtept",go.gpx),s=new Array(r.length);for(let a=0;a<r.length;a++)_de(e,r[a],n,i),s[a]=d6(r[a]);o.polyline=pde(i.routeColor),i.clampToGround&&(o.polyline.clampToGround=!0),o.polyline.positions=s}function rQe(e,t,n,i){let o=f6(t,n);o.description=m6(t,o);let r=h6(t,"trkseg",go.gpx),s=[],a=[],l,u=!0,f=new da;for(let h=0;h<r.length;h++)l=sQe(r[h]),s=s.concat(l.positions),l.times.length>0?(a=a.concat(l.times),f.addSamples(a,s),u=u&&!0):u=!1;if(u){let h=c(i.waypointImage)?i.waypointImage:e._pinBuilder.fromMakiIconId("marker",z.RED,X3);o.billboard=mde(h),o.position=f,i.clampToGround&&(o.billboard.heightReference=qe.CLAMP_TO_GROUND),o.availability=new Br,o.availability.addInterval(new En({start:a[0],stop:a[a.length-1]}))}o.polyline=pde(i.trackColor),o.polyline.positions=s,i.clampToGround&&(o.polyline.clampToGround=!0)}function sQe(e){let t={positions:[],times:[]},n=h6(e,"trkpt",go.gpx),i;for(let o=0;o<n.length;o++){let r=d6(n[o]);t.positions.push(r),i=fl(n[o],"time",go.gpx),c(i)&&t.times.push(K.fromIso8601(i))}return t}function aQe(e){let t=ty(e,"metadata",go.gpx);if(c(t)){let n={name:fl(t,"name",go.gpx),desc:fl(t,"desc",go.gpx),author:cQe(t),copyright:uQe(t),link:gde(t),time:fl(t,"time",go.gpx),keywords:fl(t,"keywords",go.gpx),bounds:fQe(t)};if(c(n.name)||c(n.desc)||c(n.author)||c(n.copyright)||c(n.link)||c(n.time)||c(n.keywords)||c(n.bounds))return n}}function cQe(e){let t=ty(e,"author",go.gpx);if(c(t)){let n={name:fl(t,"name",go.gpx),email:lQe(t),link:gde(t)};if(c(n.name)||c(n.email)||c(n.link))return n}}function lQe(e){let t=ty(e,"email",go.gpx);if(c(t)){let n=fl(t,"id",go.gpx),i=fl(t,"domain",go.gpx);return`${n}@${i}`}}function gde(e){let t=ty(e,"link",go.gpx);if(c(t)){let n={href:uD(t,"href"),text:fl(t,"text",go.gpx),mimeType:fl(t,"type",go.gpx)};if(c(n.href)||c(n.text)||c(n.mimeType))return n}}function uQe(e){let t=ty(e,"copyright",go.gpx);if(c(t)){let n={author:uD(t,"author"),year:fl(t,"year",go.gpx),license:fl(t,"license",go.gpx)};if(c(n.author)||c(n.year)||c(n.license))return n}}function fQe(e){let t=ty(e,"bounds",go.gpx);if(c(t)){let n={minLat:cD(t,"minlat",go.gpx),maxLat:cD(t,"maxlat",go.gpx),minLon:cD(t,"minlon",go.gpx),maxLon:cD(t,"maxlon",go.gpx)};if(c(n.minLat)||c(n.maxLat)||c(n.minLon)||c(n.maxLon))return n}}var fde={wpt:_de,rte:oQe,trk:rQe};function dQe(e,t,n,i){let o=Object.keys(fde),r=o.length;for(let s=0;s<r;s++){let a=o[s],l=fde[a],u=t.childNodes,f=u.length;for(let h=0;h<f;h++){let m=u[h];m.localName===a&&go.gpx.indexOf(m.namespaceURI)!==-1&&l(e,m,n,i)}}}function dde(e,t,n){let i=e._entityCollection;i.removeAll();let o=t.documentElement,r=uD(o,"version"),s=uD(o,"creator"),a,l=aQe(o);c(l)&&(a=l.name),o.localName==="gpx"?dQe(e,o,i,n):console.log(`GPX - Unsupported node: ${o.localName}`);let u,f=i.computeAvailability(),h=f.start,m=f.stop,p=K.equals(h,Ue.MINIMUM_VALUE),_=K.equals(m,Ue.MAXIMUM_VALUE);if(!p||!_){let x;p&&(x=new Date,x.setHours(0,0,0,0),h=K.fromDate(x)),_&&(x=new Date,x.setHours(24,0,0,0),m=K.fromDate(x)),u=new Bh,u.startTime=h,u.stopTime=m,u.currentTime=K.clone(h),u.clockRange=Va.LOOP_STOP,u.clockStep=Or.SYSTEM_CLOCK_MULTIPLIER,u.multiplier=Math.round(Math.min(Math.max(K.secondsDifference(m,h)/60,1),31556900))}let b=!1;return e._name!==a&&(e._name=a,b=!0),e._creator!==s&&(e._creator=s,b=!0),hQe(e._metadata,l)&&(e._metadata=l,b=!0),e._version!==r&&(e._version=r,b=!0),u!==e._clock&&(b=!0,e._clock=u),b&&e._changed.raiseEvent(e),kr.setLoading(e,!1),e}function hQe(e,t){return!c(e)&&!c(t)?!1:c(e)&&c(t)?e.name!==t.name||e.dec!==t.desc||e.src!==t.src||e.author!==t.author||e.copyright!==t.copyright||e.link!==t.link||e.time!==t.time||e.bounds!==t.bounds:!0}function mQe(e,t,n,i){i=g(i,g.EMPTY_OBJECT);let o=n;if(typeof n=="string"||n instanceof Te){n=Te.createIfNeeded(n),o=n.fetchBlob();let r=e._resourceCredits,s=n.credits;if(c(s)){let a=s.length;for(let l=0;l<a;l++)r.push(s[l])}}return Promise.resolve(o).then(function(r){return r instanceof Blob?nQe(r).then(function(s){let a,l;try{a=hde.parseFromString(s,"application/xml")}catch(u){l=u.toString()}if(c(l)||a.body||a.documentElement.tagName==="parsererror"){let u=c(l)?l:a.documentElement.firstChild.nodeValue;throw u||(u=a.body.innerText),new ie(u)}return dde(e,a,i)}):dde(e,r,i)}).catch(function(r){return e._error.raiseEvent(e,r),console.log(r),Promise.reject(r)})}function PE(){this._changed=new fe,this._error=new fe,this._loading=new fe,this._clock=void 0,this._entityCollection=new qs(this),this._entityCluster=new ff,this._name=void 0,this._version=void 0,this._creator=void 0,this._metadata=void 0,this._isLoading=!1,this._pinBuilder=new $g}PE.load=function(e,t){return new PE().load(e,t)};Object.defineProperties(PE.prototype,{name:{get:function(){return this._name}},version:{get:function(){return this._version}},creator:{get:function(){return this._creator}},metadata:{get:function(){return this._metadata}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!c(e))throw new w("value must be defined.");this._entityCluster=e}}});PE.prototype.update=function(e){return!0};PE.prototype.load=function(e,t){if(!c(e))throw new w("data is required.");t=g(t,g.EMPTY_OBJECT),kr.setLoading(this,!0);let n=this._name,i=this;return mQe(this,this._entityCollection,e,t).then(function(){let o,r=i._entityCollection.computeAvailability(),s=r.start,a=r.stop,l=K.equals(s,Ue.MINIMUM_VALUE),u=K.equals(a,Ue.MAXIMUM_VALUE);if(!l||!u){let h;l&&(h=new Date,h.setHours(0,0,0,0),s=K.fromDate(h)),u&&(h=new Date,h.setHours(24,0,0,0),a=K.fromDate(h)),o=new Bh,o.startTime=s,o.stopTime=a,o.currentTime=K.clone(s),o.clockRange=Va.LOOP_STOP,o.clockStep=Or.SYSTEM_CLOCK_MULTIPLIER,o.multiplier=Math.round(Math.min(Math.max(K.secondsDifference(a,s)/60,1),31556900))}let f=!1;return o!==i._clock&&(i._clock=o,f=!0),n!==i._name&&(f=!0),f&&i._changed.raiseEvent(i),kr.setLoading(i,!1),i}).catch(function(o){return kr.setLoading(i,!1),i._error.raiseEvent(i,o),console.log(o),Promise.reject(o)})};var yde=PE;function pQe(e,t){this.position=e,this.headingPitchRoll=t}var K3=pQe;var OD=Mr(Sl(),1);function nk(e){return ik(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function ik(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?ik(n):n),[])}var bde=[0,1,2,3].concat(...nk([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function tr(){let e=this;function t(o){let r=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,u=e.stat_desc.max_length,f,h,m,p,_,b,x=0;for(p=0;p<=15;p++)o.bl_count[p]=0;for(r[o.heap[o.heap_max]*2+1]=0,f=o.heap_max+1;f<573;f++)h=o.heap[f],p=r[r[h*2+1]*2+1]+1,p>u&&(p=u,x++),r[h*2+1]=p,!(h>e.max_code)&&(o.bl_count[p]++,_=0,h>=l&&(_=a[h-l]),b=r[h*2],o.opt_len+=b*(p+_),s&&(o.static_len+=b*(s[h*2+1]+_)));if(x!==0){do{for(p=u-1;o.bl_count[p]===0;)p--;o.bl_count[p]--,o.bl_count[p+1]+=2,o.bl_count[u]--,x-=2}while(x>0);for(p=u;p!==0;p--)for(h=o.bl_count[p];h!==0;)m=o.heap[--f],!(m>e.max_code)&&(r[m*2+1]!=p&&(o.opt_len+=(p-r[m*2+1])*r[m*2],r[m*2+1]=p),h--)}}function n(o,r){let s=0;do s|=o&1,o>>>=1,s<<=1;while(--r>0);return s>>>1}function i(o,r,s){let a=[],l=0,u,f,h;for(u=1;u<=15;u++)a[u]=l=l+s[u-1]<<1;for(f=0;f<=r;f++)h=o[f*2+1],h!==0&&(o[f*2]=n(a[h]++,h))}e.build_tree=function(o){let r=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.elems,l,u,f=-1,h;for(o.heap_len=0,o.heap_max=573,l=0;l<a;l++)r[l*2]!==0?(o.heap[++o.heap_len]=f=l,o.depth[l]=0):r[l*2+1]=0;for(;o.heap_len<2;)h=o.heap[++o.heap_len]=f<2?++f:0,r[h*2]=1,o.depth[h]=0,o.opt_len--,s&&(o.static_len-=s[h*2+1]);for(e.max_code=f,l=Math.floor(o.heap_len/2);l>=1;l--)o.pqdownheap(r,l);h=a;do l=o.heap[1],o.heap[1]=o.heap[o.heap_len--],o.pqdownheap(r,1),u=o.heap[1],o.heap[--o.heap_max]=l,o.heap[--o.heap_max]=u,r[h*2]=r[l*2]+r[u*2],o.depth[h]=Math.max(o.depth[l],o.depth[u])+1,r[l*2+1]=r[u*2+1]=h,o.heap[1]=h++,o.pqdownheap(r,1);while(o.heap_len>=2);o.heap[--o.heap_max]=o.heap[1],t(o),i(r,e.max_code,o.bl_count)}}tr._length_code=[0,1,2,3,4,5,6,7].concat(...nk([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));tr.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];tr.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];tr.d_code=function(e){return e<256?bde[e]:bde[256+(e>>>7)]};tr.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];tr.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];tr.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];tr.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function ha(e,t,n,i,o){let r=this;r.static_tree=e,r.extra_bits=t,r.extra_base=n,r.elems=i,r.max_length=o}var _Qe=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],gQe=nk([[144,8],[112,9],[24,7],[8,8]]);ha.static_ltree=ik(_Qe.map((e,t)=>[e,gQe[t]]));var yQe=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],bQe=nk([[30,5]]);ha.static_dtree=ik(yQe.map((e,t)=>[e,bQe[t]]));ha.static_l_desc=new ha(ha.static_ltree,tr.extra_lbits,257,286,15);ha.static_d_desc=new ha(ha.static_dtree,tr.extra_dbits,0,30,15);ha.static_bl_desc=new ha(null,tr.extra_blbits,0,19,7);var xQe=9,TQe=8;function Xh(e,t,n,i,o){let r=this;r.good_length=e,r.max_lazy=t,r.nice_length=n,r.max_chain=i,r.func=o}var Tde=0,ek=1,C0=2,wd=[new Xh(0,0,0,0,Tde),new Xh(4,4,8,4,ek),new Xh(4,5,16,8,ek),new Xh(4,6,32,32,ek),new Xh(4,4,16,16,C0),new Xh(8,16,32,32,C0),new Xh(8,16,128,128,C0),new Xh(8,32,128,256,C0),new Xh(32,128,258,1024,C0),new Xh(32,258,258,4096,C0)],$3=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],yf=0,Z3=1,fD=2,J3=3,CQe=32,p6=42,Q3=113,dD=666,_6=8,EQe=0,g6=1,wQe=2,mr=3,tk=258,nu=tk+mr+1;function xde(e,t,n,i){let o=e[t*2],r=e[n*2];return o<r||o==r&&i[t]<=i[n]}function SQe(){let e=this,t,n,i,o,r,s,a,l,u,f,h,m,p,_,b,x,T,E,S,A,v,D,R,P,L,F,y,I,M,B,U,V,W,H=new tr,X=new tr,$=new tr;e.depth=[];let ae,se,he,ge,le,me;e.bl_count=[],e.heap=[],U=[],V=[],W=[];function Me(){u=2*r,h[p-1]=0;for(let Le=0;Le<p-1;Le++)h[Le]=0;F=wd[y].max_lazy,M=wd[y].good_length,B=wd[y].nice_length,L=wd[y].max_chain,v=0,T=0,R=0,E=P=mr-1,A=0,m=0}function Ge(){let Le;for(Le=0;Le<286;Le++)U[Le*2]=0;for(Le=0;Le<30;Le++)V[Le*2]=0;for(Le=0;Le<19;Le++)W[Le*2]=0;U[256*2]=1,e.opt_len=e.static_len=0,se=he=0}function De(){H.dyn_tree=U,H.stat_desc=ha.static_l_desc,X.dyn_tree=V,X.stat_desc=ha.static_d_desc,$.dyn_tree=W,$.stat_desc=ha.static_bl_desc,le=0,me=0,ge=8,Ge()}e.pqdownheap=function(Le,it){let We=e.heap,Ye=We[it],ct=it<<1;for(;ct<=e.heap_len&&(ct<e.heap_len&&xde(Le,We[ct+1],We[ct],e.depth)&&ct++,!xde(Le,Ye,We[ct],e.depth));)We[it]=We[ct],it=ct,ct<<=1;We[it]=Ye};function ke(Le,it){let We=-1,Ye,ct=Le[0*2+1],At=0,hn=7,ao=4;ct===0&&(hn=138,ao=3),Le[(it+1)*2+1]=65535;for(let Yo=0;Yo<=it;Yo++)Ye=ct,ct=Le[(Yo+1)*2+1],!(++At<hn&&Ye==ct)&&(At<ao?W[Ye*2]+=At:Ye!==0?(Ye!=We&&W[Ye*2]++,W[16*2]++):At<=10?W[17*2]++:W[18*2]++,At=0,We=Ye,ct===0?(hn=138,ao=3):Ye==ct?(hn=6,ao=3):(hn=7,ao=4))}function He(){let Le;for(ke(U,H.max_code),ke(V,X.max_code),$.build_tree(e),Le=18;Le>=3&&W[tr.bl_order[Le]*2+1]===0;Le--);return e.opt_len+=3*(Le+1)+5+5+4,Le}function ft(Le){e.pending_buf[e.pending++]=Le}function Ie(Le){ft(Le&255),ft(Le>>>8&255)}function Kt(Le){ft(Le>>8&255),ft(Le&255&255)}function Pt(Le,it){let We,Ye=it;me>16-Ye?(We=Le,le|=We<<me&65535,Ie(le),le=We>>>16-me,me+=Ye-16):(le|=Le<<me&65535,me+=Ye)}function dt(Le,it){let We=Le*2;Pt(it[We]&65535,it[We+1]&65535)}function rn(Le,it){let We,Ye=-1,ct,At=Le[0*2+1],hn=0,ao=7,Yo=4;for(At===0&&(ao=138,Yo=3),We=0;We<=it;We++)if(ct=At,At=Le[(We+1)*2+1],!(++hn<ao&&ct==At)){if(hn<Yo)do dt(ct,W);while(--hn!==0);else ct!==0?(ct!=Ye&&(dt(ct,W),hn--),dt(16,W),Pt(hn-3,2)):hn<=10?(dt(17,W),Pt(hn-3,3)):(dt(18,W),Pt(hn-11,7));hn=0,Ye=ct,At===0?(ao=138,Yo=3):ct==At?(ao=6,Yo=3):(ao=7,Yo=4)}}function Vt(Le,it,We){let Ye;for(Pt(Le-257,5),Pt(it-1,5),Pt(We-4,4),Ye=0;Ye<We;Ye++)Pt(W[tr.bl_order[Ye]*2+1],3);rn(U,Le-1),rn(V,it-1)}function Ae(){me==16?(Ie(le),le=0,me=0):me>=8&&(ft(le&255),le>>>=8,me-=8)}function Qe(){Pt(g6<<1,3),dt(256,ha.static_ltree),Ae(),1+ge+10-me<9&&(Pt(g6<<1,3),dt(256,ha.static_ltree),Ae()),ge=7}function et(Le,it){let We,Ye,ct;if(e.dist_buf[se]=Le,e.lc_buf[se]=it&255,se++,Le===0?U[it*2]++:(he++,Le--,U[(tr._length_code[it]+256+1)*2]++,V[tr.d_code(Le)*2]++),!(se&8191)&&y>2){for(We=se*8,Ye=v-T,ct=0;ct<30;ct++)We+=V[ct*2]*(5+tr.extra_dbits[ct]);if(We>>>=3,he<Math.floor(se/2)&&We<Math.floor(Ye/2))return!0}return se==ae-1}function at(Le,it){let We,Ye,ct=0,At,hn;if(se!==0)do We=e.dist_buf[ct],Ye=e.lc_buf[ct],ct++,We===0?dt(Ye,Le):(At=tr._length_code[Ye],dt(At+256+1,Le),hn=tr.extra_lbits[At],hn!==0&&(Ye-=tr.base_length[At],Pt(Ye,hn)),We--,At=tr.d_code(We),dt(At,it),hn=tr.extra_dbits[At],hn!==0&&(We-=tr.base_dist[At],Pt(We,hn)));while(ct<se);dt(256,Le),ge=Le[256*2+1]}function $t(){me>8?Ie(le):me>0&&ft(le&255),le=0,me=0}function pe(Le,it,We){$t(),ge=8,We&&(Ie(it),Ie(~it)),e.pending_buf.set(l.subarray(Le,Le+it),e.pending),e.pending+=it}function _e(Le,it,We){Pt((EQe<<1)+(We?1:0),3),pe(Le,it,!0)}function rt(Le,it,We){let Ye,ct,At=0;y>0?(H.build_tree(e),X.build_tree(e),At=He(),Ye=e.opt_len+3+7>>>3,ct=e.static_len+3+7>>>3,ct<=Ye&&(Ye=ct)):Ye=ct=it+5,it+4<=Ye&&Le!=-1?_e(Le,it,We):ct==Ye?(Pt((g6<<1)+(We?1:0),3),at(ha.static_ltree,ha.static_dtree)):(Pt((wQe<<1)+(We?1:0),3),Vt(H.max_code+1,X.max_code+1,At+1),at(U,V)),Ge(),We&&$t()}function Ri(Le){rt(T>=0?T:-1,v-T,Le),T=v,t.flush_pending()}function ot(){let Le,it,We,Ye;do{if(Ye=u-R-v,Ye===0&&v===0&&R===0)Ye=r;else if(Ye==-1)Ye--;else if(v>=r+r-nu){l.set(l.subarray(r,r+r),0),D-=r,v-=r,T-=r,Le=p,We=Le;do it=h[--We]&65535,h[We]=it>=r?it-r:0;while(--Le!==0);Le=r,We=Le;do it=f[--We]&65535,f[We]=it>=r?it-r:0;while(--Le!==0);Ye+=r}if(t.avail_in===0)return;Le=t.read_buf(l,v+R,Ye),R+=Le,R>=mr&&(m=l[v]&255,m=(m<<x^l[v+1]&255)&b)}while(R<nu&&t.avail_in!==0)}function uo(Le){let it=65535,We;for(it>i-5&&(it=i-5);;){if(R<=1){if(ot(),R===0&&Le==0)return yf;if(R===0)break}if(v+=R,R=0,We=T+it,(v===0||v>=We)&&(R=v-We,v=We,Ri(!1),t.avail_out===0)||v-T>=r-nu&&(Ri(!1),t.avail_out===0))return yf}return Ri(Le==4),t.avail_out===0?Le==4?fD:yf:Le==4?J3:Z3}function ir(Le){let it=L,We=v,Ye,ct,At=P,hn=v>r-nu?v-(r-nu):0,ao=B,Yo=a,ya=v+tk,ba=l[We+At-1],Hr=l[We+At];P>=M&&(it>>=2),ao>R&&(ao=R);do if(Ye=Le,!(l[Ye+At]!=Hr||l[Ye+At-1]!=ba||l[Ye]!=l[We]||l[++Ye]!=l[We+1])){We+=2,Ye++;do;while(l[++We]==l[++Ye]&&l[++We]==l[++Ye]&&l[++We]==l[++Ye]&&l[++We]==l[++Ye]&&l[++We]==l[++Ye]&&l[++We]==l[++Ye]&&l[++We]==l[++Ye]&&l[++We]==l[++Ye]&&We<ya);if(ct=tk-(ya-We),We=ya-tk,ct>At){if(D=Le,At=ct,ct>=ao)break;ba=l[We+At-1],Hr=l[We+At]}}while((Le=f[Le&Yo]&65535)>hn&&--it!==0);return At<=R?At:R}function Ja(Le){let it=0,We;for(;;){if(R<nu){if(ot(),R<nu&&Le==0)return yf;if(R===0)break}if(R>=mr&&(m=(m<<x^l[v+(mr-1)]&255)&b,it=h[m]&65535,f[v&a]=h[m],h[m]=v),it!==0&&(v-it&65535)<=r-nu&&I!=2&&(E=ir(it)),E>=mr)if(We=et(v-D,E-mr),R-=E,E<=F&&R>=mr){E--;do v++,m=(m<<x^l[v+(mr-1)]&255)&b,it=h[m]&65535,f[v&a]=h[m],h[m]=v;while(--E!==0);v++}else v+=E,E=0,m=l[v]&255,m=(m<<x^l[v+1]&255)&b;else We=et(0,l[v]&255),R--,v++;if(We&&(Ri(!1),t.avail_out===0))return yf}return Ri(Le==4),t.avail_out===0?Le==4?fD:yf:Le==4?J3:Z3}function gr(Le){let it=0,We,Ye;for(;;){if(R<nu){if(ot(),R<nu&&Le==0)return yf;if(R===0)break}if(R>=mr&&(m=(m<<x^l[v+(mr-1)]&255)&b,it=h[m]&65535,f[v&a]=h[m],h[m]=v),P=E,S=D,E=mr-1,it!==0&&P<F&&(v-it&65535)<=r-nu&&(I!=2&&(E=ir(it)),E<=5&&(I==1||E==mr&&v-D>4096)&&(E=mr-1)),P>=mr&&E<=P){Ye=v+R-mr,We=et(v-1-S,P-mr),R-=P-1,P-=2;do++v<=Ye&&(m=(m<<x^l[v+(mr-1)]&255)&b,it=h[m]&65535,f[v&a]=h[m],h[m]=v);while(--P!==0);if(A=0,E=mr-1,v++,We&&(Ri(!1),t.avail_out===0))return yf}else if(A!==0){if(We=et(0,l[v-1]&255),We&&Ri(!1),v++,R--,t.avail_out===0)return yf}else A=1,v++,R--}return A!==0&&(We=et(0,l[v-1]&255),A=0),Ri(Le==4),t.avail_out===0?Le==4?fD:yf:Le==4?J3:Z3}function Vr(Le){return Le.total_in=Le.total_out=0,Le.msg=null,e.pending=0,e.pending_out=0,n=Q3,o=0,De(),Me(),0}e.deflateInit=function(Le,it,We,Ye,ct,At){return Ye||(Ye=_6),ct||(ct=TQe),At||(At=0),Le.msg=null,it==-1&&(it=6),ct<1||ct>xQe||Ye!=_6||We<9||We>15||it<0||it>9||At<0||At>2?-2:(Le.dstate=e,s=We,r=1<<s,a=r-1,_=ct+7,p=1<<_,b=p-1,x=Math.floor((_+mr-1)/mr),l=new Uint8Array(r*2),f=[],h=[],ae=1<<ct+6,e.pending_buf=new Uint8Array(ae*4),i=ae*4,e.dist_buf=new Uint16Array(ae),e.lc_buf=new Uint8Array(ae),y=it,I=At,Vr(Le))},e.deflateEnd=function(){return n!=p6&&n!=Q3&&n!=dD?-2:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,h=null,f=null,l=null,e.dstate=null,n==Q3?-3:0)},e.deflateParams=function(Le,it,We){let Ye=0;return it==-1&&(it=6),it<0||it>9||We<0||We>2?-2:(wd[y].func!=wd[it].func&&Le.total_in!==0&&(Ye=Le.deflate(1)),y!=it&&(y=it,F=wd[y].max_lazy,M=wd[y].good_length,B=wd[y].nice_length,L=wd[y].max_chain),I=We,Ye)},e.deflateSetDictionary=function(Le,it,We){let Ye=We,ct,At=0;if(!it||n!=p6)return-2;if(Ye<mr)return 0;for(Ye>r-nu&&(Ye=r-nu,At=We-Ye),l.set(it.subarray(At,At+Ye),0),v=Ye,T=Ye,m=l[0]&255,m=(m<<x^l[1]&255)&b,ct=0;ct<=Ye-mr;ct++)m=(m<<x^l[ct+(mr-1)]&255)&b,f[ct&a]=h[m],h[m]=ct;return 0},e.deflate=function(Le,it){let We,Ye,ct,At,hn;if(it>4||it<0)return-2;if(!Le.next_out||!Le.next_in&&Le.avail_in!==0||n==dD&&it!=4)return Le.msg=$3[4],-2;if(Le.avail_out===0)return Le.msg=$3[7],-5;if(t=Le,At=o,o=it,n==p6&&(Ye=_6+(s-8<<4)<<8,ct=(y-1&255)>>1,ct>3&&(ct=3),Ye|=ct<<6,v!==0&&(Ye|=CQe),Ye+=31-Ye%31,n=Q3,Kt(Ye)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return o=-1,0}else if(t.avail_in===0&&it<=At&&it!=4)return t.msg=$3[7],-5;if(n==dD&&t.avail_in!==0)return Le.msg=$3[7],-5;if(t.avail_in!==0||R!==0||it!=0&&n!=dD){switch(hn=-1,wd[y].func){case Tde:hn=uo(it);break;case ek:hn=Ja(it);break;case C0:hn=gr(it);break;default:}if((hn==fD||hn==J3)&&(n=dD),hn==yf||hn==fD)return t.avail_out===0&&(o=-1),0;if(hn==Z3){if(it==1)Qe();else if(_e(0,0,!1),it==3)for(We=0;We<p;We++)h[We]=0;if(t.flush_pending(),t.avail_out===0)return o=-1,0}}return it!=4?0:1}}function Cde(){let e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}Cde.prototype={deflateInit(e,t){let n=this;return n.dstate=new SQe,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(e){let t=this;return t.dstate?t.dstate.deflate(t,e):-2},deflateEnd(){let e=this;if(!e.dstate)return-2;let t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){let n=this;return n.dstate?n.dstate.deflateParams(n,e,t):-2},deflateSetDictionary(e,t){let n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):-2},read_buf(e,t,n){let i=this,o=i.avail_in;return o>n&&(o=n),o===0?0:(i.avail_in-=o,e.set(i.next_in.subarray(i.next_in_index,i.next_in_index+o),t),i.next_in_index+=o,i.total_in+=o,o)},flush_pending(){let e=this,t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Ede(e){let t=this,n=new Cde,i=AQe(e&&e.chunkSize?e.chunkSize:64*1024),o=0,r=new Uint8Array(i),s=e?e.level:-1;typeof s=="undefined"&&(s=-1),n.deflateInit(s),n.next_out=r,t.append=function(a,l){let u,f,h=0,m=0,p=0,_=[];if(a.length){n.next_in_index=0,n.next_in=a,n.avail_in=a.length;do{if(n.next_out_index=0,n.avail_out=i,u=n.deflate(o),u!=0)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==i?_.push(new Uint8Array(r)):_.push(r.subarray(0,n.next_out_index))),p+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=h&&(l(n.next_in_index),h=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return _.length>1?(f=new Uint8Array(p),_.forEach(function(b){f.set(b,m),m+=b.length})):f=_[0]?new Uint8Array(_[0]):new Uint8Array,f}},t.flush=function(){let a,l,u=0,f=0,h=[];do{if(n.next_out_index=0,n.avail_out=i,a=n.deflate(4),a!=1&&a!=0)throw new Error("deflating: "+n.msg);i-n.avail_out>0&&h.push(r.slice(0,n.next_out_index)),f+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),l=new Uint8Array(f),h.forEach(function(m){l.set(m,u),u+=m.length}),l}}function AQe(e){return e+5*(Math.floor(e/16383)+1)}var iu=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Gde=1440,vQe=0,DQe=4,IQe=9,OQe=5,PQe=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],RQe=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],MQe=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],LQe=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],NQe=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],FQe=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ny=15;function T6(){let e=this,t,n,i,o,r,s;function a(u,f,h,m,p,_,b,x,T,E,S){let A,v,D,R,P,L,F,y,I,M,B,U,V,W,H;M=0,P=h;do i[u[f+M]]++,M++,P--;while(P!==0);if(i[0]==h)return b[0]=-1,x[0]=0,0;for(y=x[0],L=1;L<=ny&&i[L]===0;L++);for(F=L,y<L&&(y=L),P=ny;P!==0&&i[P]===0;P--);for(D=P,y>P&&(y=P),x[0]=y,W=1<<L;L<P;L++,W<<=1)if((W-=i[L])<0)return-3;if((W-=i[P])<0)return-3;for(i[P]+=W,s[1]=L=0,M=1,V=2;--P!==0;)s[V]=L+=i[M],V++,M++;P=0,M=0;do(L=u[f+M])!==0&&(S[s[L]++]=P),M++;while(++P<h);for(h=s[D],s[0]=P=0,M=0,R=-1,U=-y,r[0]=0,B=0,H=0;F<=D;F++)for(A=i[F];A--!==0;){for(;F>U+y;){if(R++,U+=y,H=D-U,H=H>y?y:H,(v=1<<(L=F-U))>A+1&&(v-=A+1,V=F,L<H))for(;++L<H&&!((v<<=1)<=i[++V]);)v-=i[V];if(H=1<<L,E[0]+H>Gde)return-3;r[R]=B=E[0],E[0]+=H,R!==0?(s[R]=P,o[0]=L,o[1]=y,L=P>>>U-y,o[2]=B-r[R-1]-L,T.set(o,(r[R-1]+L)*3)):b[0]=B}for(o[1]=F-U,M>=h?o[0]=192:S[M]<m?(o[0]=S[M]<256?0:96,o[2]=S[M++]):(o[0]=_[S[M]-m]+16+64,o[2]=p[S[M++]-m]),v=1<<F-U,L=P>>>U;L<H;L+=v)T.set(o,(B+L)*3);for(L=1<<F-1;P&L;L>>>=1)P^=L;for(P^=L,I=(1<<U)-1;(P&I)!=s[R];)R--,U-=y,I=(1<<U)-1}return W!==0&&D!=1?-5:0}function l(u){let f;for(t||(t=[],n=[],i=new Int32Array(ny+1),o=[],r=new Int32Array(ny),s=new Int32Array(ny+1)),n.length<u&&(n=[]),f=0;f<u;f++)n[f]=0;for(f=0;f<ny+1;f++)i[f]=0;for(f=0;f<3;f++)o[f]=0;r.set(i.subarray(0,ny),0),s.set(i.subarray(0,ny+1),0)}e.inflate_trees_bits=function(u,f,h,m,p){let _;return l(19),t[0]=0,_=a(u,0,19,19,null,null,h,f,m,t,n),_==-3?p.msg="oversubscribed dynamic bit lengths tree":(_==-5||f[0]===0)&&(p.msg="incomplete dynamic bit lengths tree",_=-3),_},e.inflate_trees_dynamic=function(u,f,h,m,p,_,b,x,T){let E;return l(288),t[0]=0,E=a(h,0,u,257,MQe,LQe,_,m,x,t,n),E!=0||m[0]===0?(E==-3?T.msg="oversubscribed literal/length tree":E!=-4&&(T.msg="incomplete literal/length tree",E=-3),E):(l(288),E=a(h,u,f,0,NQe,FQe,b,p,x,t,n),E!=0||p[0]===0&&u>257?(E==-3?T.msg="oversubscribed distance tree":E==-5?(T.msg="incomplete distance tree",E=-3):E!=-4&&(T.msg="empty distance tree with lengths",E=-3),E):0)}}T6.inflate_trees_fixed=function(e,t,n,i){return e[0]=IQe,t[0]=OQe,n[0]=PQe,i[0]=RQe,0};var ok=0,wde=1,Sde=2,Ade=3,vde=4,Dde=5,Ide=6,y6=7,Ode=8,rk=9;function BQe(){let e=this,t,n=0,i,o=0,r=0,s=0,a=0,l=0,u=0,f=0,h,m=0,p,_=0;function b(x,T,E,S,A,v,D,R){let P,L,F,y,I,M,B,U,V,W,H,X,$,ae,se,he;B=R.next_in_index,U=R.avail_in,I=D.bitb,M=D.bitk,V=D.write,W=V<D.read?D.read-V-1:D.end-V,H=iu[x],X=iu[T];do{for(;M<20;)U--,I|=(R.read_byte(B++)&255)<<M,M+=8;if(P=I&H,L=E,F=S,he=(F+P)*3,(y=L[he])===0){I>>=L[he+1],M-=L[he+1],D.win[V++]=L[he+2],W--;continue}do{if(I>>=L[he+1],M-=L[he+1],y&16){for(y&=15,$=L[he+2]+(I&iu[y]),I>>=y,M-=y;M<15;)U--,I|=(R.read_byte(B++)&255)<<M,M+=8;P=I&X,L=A,F=v,he=(F+P)*3,y=L[he];do if(I>>=L[he+1],M-=L[he+1],y&16){for(y&=15;M<y;)U--,I|=(R.read_byte(B++)&255)<<M,M+=8;if(ae=L[he+2]+(I&iu[y]),I>>=y,M-=y,W-=$,V>=ae)se=V-ae,V-se>0&&2>V-se?(D.win[V++]=D.win[se++],D.win[V++]=D.win[se++],$-=2):(D.win.set(D.win.subarray(se,se+2),V),V+=2,se+=2,$-=2);else{se=V-ae;do se+=D.end;while(se<0);if(y=D.end-se,$>y){if($-=y,V-se>0&&y>V-se)do D.win[V++]=D.win[se++];while(--y!==0);else D.win.set(D.win.subarray(se,se+y),V),V+=y,se+=y,y=0;se=0}}if(V-se>0&&$>V-se)do D.win[V++]=D.win[se++];while(--$!==0);else D.win.set(D.win.subarray(se,se+$),V),V+=$,se+=$,$=0;break}else if(!(y&64))P+=L[he+2],P+=I&iu[y],he=(F+P)*3,y=L[he];else return R.msg="invalid distance code",$=R.avail_in-U,$=M>>3<$?M>>3:$,U+=$,B-=$,M-=$<<3,D.bitb=I,D.bitk=M,R.avail_in=U,R.total_in+=B-R.next_in_index,R.next_in_index=B,D.write=V,-3;while(!0);break}if(y&64)return y&32?($=R.avail_in-U,$=M>>3<$?M>>3:$,U+=$,B-=$,M-=$<<3,D.bitb=I,D.bitk=M,R.avail_in=U,R.total_in+=B-R.next_in_index,R.next_in_index=B,D.write=V,1):(R.msg="invalid literal/length code",$=R.avail_in-U,$=M>>3<$?M>>3:$,U+=$,B-=$,M-=$<<3,D.bitb=I,D.bitk=M,R.avail_in=U,R.total_in+=B-R.next_in_index,R.next_in_index=B,D.write=V,-3);if(P+=L[he+2],P+=I&iu[y],he=(F+P)*3,(y=L[he])===0){I>>=L[he+1],M-=L[he+1],D.win[V++]=L[he+2],W--;break}}while(!0)}while(W>=258&&U>=10);return $=R.avail_in-U,$=M>>3<$?M>>3:$,U+=$,B-=$,M-=$<<3,D.bitb=I,D.bitk=M,R.avail_in=U,R.total_in+=B-R.next_in_index,R.next_in_index=B,D.write=V,0}e.init=function(x,T,E,S,A,v){t=ok,u=x,f=T,h=E,m=S,p=A,_=v,i=null},e.proc=function(x,T,E){let S,A,v,D=0,R=0,P=0,L,F,y,I;for(P=T.next_in_index,L=T.avail_in,D=x.bitb,R=x.bitk,F=x.write,y=F<x.read?x.read-F-1:x.end-F;;)switch(t){case ok:if(y>=258&&L>=10&&(x.bitb=D,x.bitk=R,T.avail_in=L,T.total_in+=P-T.next_in_index,T.next_in_index=P,x.write=F,E=b(u,f,h,m,p,_,x,T),P=T.next_in_index,L=T.avail_in,D=x.bitb,R=x.bitk,F=x.write,y=F<x.read?x.read-F-1:x.end-F,E!=0)){t=E==1?y6:rk;break}r=u,i=h,o=m,t=wde;case wde:for(S=r;R<S;){if(L!==0)E=0;else return x.bitb=D,x.bitk=R,T.avail_in=L,T.total_in+=P-T.next_in_index,T.next_in_index=P,x.write=F,x.inflate_flush(T,E);L--,D|=(T.read_byte(P++)&255)<<R,R+=8}if(A=(o+(D&iu[S]))*3,D>>>=i[A+1],R-=i[A+1],v=i[A],v===0){s=i[A+2],t=Ide;break}if(v&16){a=v&15,n=i[A+2],t=Sde;break}if(!(v&64)){r=v,o=A/3+i[A+2];break}if(v&32){t=y6;break}return t=rk,T.msg="invalid literal/length code",E=-3,x.bitb=D,x.bitk=R,T.avail_in=L,T.total_in+=P-T.next_in_index,T.next_in_index=P,x.write=F,x.inflate_flush(T,E);case Sde:for(S=a;R<S;){if(L!==0)E=0;else return x.bitb=D,x.bitk=R,T.avail_in=L,T.total_in+=P-T.next_in_index,T.next_in_index=P,x.write=F,x.inflate_flush(T,E);L--,D|=(T.read_byte(P++)&255)<<R,R+=8}n+=D&iu[S],D>>=S,R-=S,r=f,i=p,o=_,t=Ade;case Ade:for(S=r;R<S;){if(L!==0)E=0;else return x.bitb=D,x.bitk=R,T.avail_in=L,T.total_in+=P-T.next_in_index,T.next_in_index=P,x.write=F,x.inflate_flush(T,E);L--,D|=(T.read_byte(P++)&255)<<R,R+=8}if(A=(o+(D&iu[S]))*3,D>>=i[A+1],R-=i[A+1],v=i[A],v&16){a=v&15,l=i[A+2],t=vde;break}if(!(v&64)){r=v,o=A/3+i[A+2];break}return t=rk,T.msg="invalid distance code",E=-3,x.bitb=D,x.bitk=R,T.avail_in=L,T.total_in+=P-T.next_in_index,T.next_in_index=P,x.write=F,x.inflate_flush(T,E);case vde:for(S=a;R<S;){if(L!==0)E=0;else return x.bitb=D,x.bitk=R,T.avail_in=L,T.total_in+=P-T.next_in_index,T.next_in_index=P,x.write=F,x.inflate_flush(T,E);L--,D|=(T.read_byte(P++)&255)<<R,R+=8}l+=D&iu[S],D>>=S,R-=S,t=Dde;case Dde:for(I=F-l;I<0;)I+=x.end;for(;n!==0;){if(y===0&&(F==x.end&&x.read!==0&&(F=0,y=F<x.read?x.read-F-1:x.end-F),y===0&&(x.write=F,E=x.inflate_flush(T,E),F=x.write,y=F<x.read?x.read-F-1:x.end-F,F==x.end&&x.read!==0&&(F=0,y=F<x.read?x.read-F-1:x.end-F),y===0)))return x.bitb=D,x.bitk=R,T.avail_in=L,T.total_in+=P-T.next_in_index,T.next_in_index=P,x.write=F,x.inflate_flush(T,E);x.win[F++]=x.win[I++],y--,I==x.end&&(I=0),n--}t=ok;break;case Ide:if(y===0&&(F==x.end&&x.read!==0&&(F=0,y=F<x.read?x.read-F-1:x.end-F),y===0&&(x.write=F,E=x.inflate_flush(T,E),F=x.write,y=F<x.read?x.read-F-1:x.end-F,F==x.end&&x.read!==0&&(F=0,y=F<x.read?x.read-F-1:x.end-F),y===0)))return x.bitb=D,x.bitk=R,T.avail_in=L,T.total_in+=P-T.next_in_index,T.next_in_index=P,x.write=F,x.inflate_flush(T,E);E=0,x.win[F++]=s,y--,t=ok;break;case y6:if(R>7&&(R-=8,L++,P--),x.write=F,E=x.inflate_flush(T,E),F=x.write,y=F<x.read?x.read-F-1:x.end-F,x.read!=x.write)return x.bitb=D,x.bitk=R,T.avail_in=L,T.total_in+=P-T.next_in_index,T.next_in_index=P,x.write=F,x.inflate_flush(T,E);t=Ode;case Ode:return E=1,x.bitb=D,x.bitk=R,T.avail_in=L,T.total_in+=P-T.next_in_index,T.next_in_index=P,x.write=F,x.inflate_flush(T,E);case rk:return E=-3,x.bitb=D,x.bitk=R,T.avail_in=L,T.total_in+=P-T.next_in_index,T.next_in_index=P,x.write=F,x.inflate_flush(T,E);default:return E=-2,x.bitb=D,x.bitk=R,T.avail_in=L,T.total_in+=P-T.next_in_index,T.next_in_index=P,x.write=F,x.inflate_flush(T,E)}},e.free=function(){}}var Pde=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],RE=0,b6=1,Rde=2,Mde=3,Lde=4,Nde=5,sk=6,ak=7,Fde=8,E0=9;function kQe(e,t){let n=this,i=RE,o=0,r=0,s=0,a,l=[0],u=[0],f=new BQe,h=0,m=new Int32Array(Gde*3),p=0,_=new T6;n.bitk=0,n.bitb=0,n.win=new Uint8Array(t),n.end=t,n.read=0,n.write=0,n.reset=function(b,x){x&&(x[0]=p),i==sk&&f.free(b),i=RE,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=function(b,x){let T,E,S;return E=b.next_out_index,S=n.read,T=(S<=n.write?n.write:n.end)-S,T>b.avail_out&&(T=b.avail_out),T!==0&&x==-5&&(x=0),b.avail_out-=T,b.total_out+=T,b.next_out.set(n.win.subarray(S,S+T),E),E+=T,S+=T,S==n.end&&(S=0,n.write==n.end&&(n.write=0),T=n.write-S,T>b.avail_out&&(T=b.avail_out),T!==0&&x==-5&&(x=0),b.avail_out-=T,b.total_out+=T,b.next_out.set(n.win.subarray(S,S+T),E),E+=T,S+=T),b.next_out_index=E,n.read=S,x},n.proc=function(b,x){let T,E,S,A,v,D,R,P;for(A=b.next_in_index,v=b.avail_in,E=n.bitb,S=n.bitk,D=n.write,R=D<n.read?n.read-D-1:n.end-D;;){let L,F,y,I,M,B,U,V;switch(i){case RE:for(;S<3;){if(v!==0)x=0;else return n.bitb=E,n.bitk=S,b.avail_in=v,b.total_in+=A-b.next_in_index,b.next_in_index=A,n.write=D,n.inflate_flush(b,x);v--,E|=(b.read_byte(A++)&255)<<S,S+=8}switch(T=E&7,h=T&1,T>>>1){case 0:E>>>=3,S-=3,T=S&7,E>>>=T,S-=T,i=b6;break;case 1:L=[],F=[],y=[[]],I=[[]],T6.inflate_trees_fixed(L,F,y,I),f.init(L[0],F[0],y[0],0,I[0],0),E>>>=3,S-=3,i=sk;break;case 2:E>>>=3,S-=3,i=Mde;break;case 3:return E>>>=3,S-=3,i=E0,b.msg="invalid block type",x=-3,n.bitb=E,n.bitk=S,b.avail_in=v,b.total_in+=A-b.next_in_index,b.next_in_index=A,n.write=D,n.inflate_flush(b,x)}break;case b6:for(;S<32;){if(v!==0)x=0;else return n.bitb=E,n.bitk=S,b.avail_in=v,b.total_in+=A-b.next_in_index,b.next_in_index=A,n.write=D,n.inflate_flush(b,x);v--,E|=(b.read_byte(A++)&255)<<S,S+=8}if((~E>>>16&65535)!=(E&65535))return i=E0,b.msg="invalid stored block lengths",x=-3,n.bitb=E,n.bitk=S,b.avail_in=v,b.total_in+=A-b.next_in_index,b.next_in_index=A,n.write=D,n.inflate_flush(b,x);o=E&65535,E=S=0,i=o!==0?Rde:h!==0?ak:RE;break;case Rde:if(v===0||R===0&&(D==n.end&&n.read!==0&&(D=0,R=D<n.read?n.read-D-1:n.end-D),R===0&&(n.write=D,x=n.inflate_flush(b,x),D=n.write,R=D<n.read?n.read-D-1:n.end-D,D==n.end&&n.read!==0&&(D=0,R=D<n.read?n.read-D-1:n.end-D),R===0)))return n.bitb=E,n.bitk=S,b.avail_in=v,b.total_in+=A-b.next_in_index,b.next_in_index=A,n.write=D,n.inflate_flush(b,x);if(x=0,T=o,T>v&&(T=v),T>R&&(T=R),n.win.set(b.read_buf(A,T),D),A+=T,v-=T,D+=T,R-=T,(o-=T)!==0)break;i=h!==0?ak:RE;break;case Mde:for(;S<14;){if(v!==0)x=0;else return n.bitb=E,n.bitk=S,b.avail_in=v,b.total_in+=A-b.next_in_index,b.next_in_index=A,n.write=D,n.inflate_flush(b,x);v--,E|=(b.read_byte(A++)&255)<<S,S+=8}if(r=T=E&16383,(T&31)>29||(T>>5&31)>29)return i=E0,b.msg="too many length or distance symbols",x=-3,n.bitb=E,n.bitk=S,b.avail_in=v,b.total_in+=A-b.next_in_index,b.next_in_index=A,n.write=D,n.inflate_flush(b,x);if(T=258+(T&31)+(T>>5&31),!a||a.length<T)a=[];else for(P=0;P<T;P++)a[P]=0;E>>>=14,S-=14,s=0,i=Lde;case Lde:for(;s<4+(r>>>10);){for(;S<3;){if(v!==0)x=0;else return n.bitb=E,n.bitk=S,b.avail_in=v,b.total_in+=A-b.next_in_index,b.next_in_index=A,n.write=D,n.inflate_flush(b,x);v--,E|=(b.read_byte(A++)&255)<<S,S+=8}a[Pde[s++]]=E&7,E>>>=3,S-=3}for(;s<19;)a[Pde[s++]]=0;if(l[0]=7,T=_.inflate_trees_bits(a,l,u,m,b),T!=0)return x=T,x==-3&&(a=null,i=E0),n.bitb=E,n.bitk=S,b.avail_in=v,b.total_in+=A-b.next_in_index,b.next_in_index=A,n.write=D,n.inflate_flush(b,x);s=0,i=Nde;case Nde:for(;T=r,!(s>=258+(T&31)+(T>>5&31));){let W,H;for(T=l[0];S<T;){if(v!==0)x=0;else return n.bitb=E,n.bitk=S,b.avail_in=v,b.total_in+=A-b.next_in_index,b.next_in_index=A,n.write=D,n.inflate_flush(b,x);v--,E|=(b.read_byte(A++)&255)<<S,S+=8}if(T=m[(u[0]+(E&iu[T]))*3+1],H=m[(u[0]+(E&iu[T]))*3+2],H<16)E>>>=T,S-=T,a[s++]=H;else{for(P=H==18?7:H-14,W=H==18?11:3;S<T+P;){if(v!==0)x=0;else return n.bitb=E,n.bitk=S,b.avail_in=v,b.total_in+=A-b.next_in_index,b.next_in_index=A,n.write=D,n.inflate_flush(b,x);v--,E|=(b.read_byte(A++)&255)<<S,S+=8}if(E>>>=T,S-=T,W+=E&iu[P],E>>>=P,S-=P,P=s,T=r,P+W>258+(T&31)+(T>>5&31)||H==16&&P<1)return a=null,i=E0,b.msg="invalid bit length repeat",x=-3,n.bitb=E,n.bitk=S,b.avail_in=v,b.total_in+=A-b.next_in_index,b.next_in_index=A,n.write=D,n.inflate_flush(b,x);H=H==16?a[P-1]:0;do a[P++]=H;while(--W!==0);s=P}}if(u[0]=-1,M=[],B=[],U=[],V=[],M[0]=9,B[0]=6,T=r,T=_.inflate_trees_dynamic(257+(T&31),1+(T>>5&31),a,M,B,U,V,m,b),T!=0)return T==-3&&(a=null,i=E0),x=T,n.bitb=E,n.bitk=S,b.avail_in=v,b.total_in+=A-b.next_in_index,b.next_in_index=A,n.write=D,n.inflate_flush(b,x);f.init(M[0],B[0],m,U[0],m,V[0]),i=sk;case sk:if(n.bitb=E,n.bitk=S,b.avail_in=v,b.total_in+=A-b.next_in_index,b.next_in_index=A,n.write=D,(x=f.proc(n,b,x))!=1)return n.inflate_flush(b,x);if(x=0,f.free(b),A=b.next_in_index,v=b.avail_in,E=n.bitb,S=n.bitk,D=n.write,R=D<n.read?n.read-D-1:n.end-D,h===0){i=RE;break}i=ak;case ak:if(n.write=D,x=n.inflate_flush(b,x),D=n.write,R=D<n.read?n.read-D-1:n.end-D,n.read!=n.write)return n.bitb=E,n.bitk=S,b.avail_in=v,b.total_in+=A-b.next_in_index,b.next_in_index=A,n.write=D,n.inflate_flush(b,x);i=Fde;case Fde:return x=1,n.bitb=E,n.bitk=S,b.avail_in=v,b.total_in+=A-b.next_in_index,b.next_in_index=A,n.write=D,n.inflate_flush(b,x);case E0:return x=-3,n.bitb=E,n.bitk=S,b.avail_in=v,b.total_in+=A-b.next_in_index,b.next_in_index=A,n.write=D,n.inflate_flush(b,x);default:return x=-2,n.bitb=E,n.bitk=S,b.avail_in=v,b.total_in+=A-b.next_in_index,b.next_in_index=A,n.write=D,n.inflate_flush(b,x)}}},n.free=function(b){n.reset(b,null),n.win=null,m=null},n.set_dictionary=function(b,x,T){n.win.set(b.subarray(x,x+T),0),n.read=n.write=T},n.sync_point=function(){return i==b6?1:0}}var UQe=32,zQe=8,VQe=0,Bde=1,kde=2,Ude=3,zde=4,Vde=5,x6=6,hD=7,Hde=12,iy=13,HQe=[0,0,255,255];function GQe(){let e=this;e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0;function t(n){return!n||!n.istate?-2:(n.total_in=n.total_out=0,n.msg=null,n.istate.mode=hD,n.istate.blocks.reset(n,null),0)}e.inflateEnd=function(n){return e.blocks&&e.blocks.free(n),e.blocks=null,0},e.inflateInit=function(n,i){return n.msg=null,e.blocks=null,i<8||i>15?(e.inflateEnd(n),-2):(e.wbits=i,n.istate.blocks=new kQe(n,1<<i),t(n),0)},e.inflate=function(n,i){let o,r;if(!n||!n.istate||!n.next_in)return-2;let s=n.istate;for(i=i==DQe?-5:0,o=-5;;)switch(s.mode){case VQe:if(n.avail_in===0)return o;if(o=i,n.avail_in--,n.total_in++,((s.method=n.read_byte(n.next_in_index++))&15)!=zQe){s.mode=iy,n.msg="unknown compression method",s.marker=5;break}if((s.method>>4)+8>s.wbits){s.mode=iy,n.msg="invalid win size",s.marker=5;break}s.mode=Bde;case Bde:if(n.avail_in===0)return o;if(o=i,n.avail_in--,n.total_in++,r=n.read_byte(n.next_in_index++)&255,((s.method<<8)+r)%31!==0){s.mode=iy,n.msg="incorrect header check",s.marker=5;break}if(!(r&UQe)){s.mode=hD;break}s.mode=kde;case kde:if(n.avail_in===0)return o;o=i,n.avail_in--,n.total_in++,s.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,s.mode=Ude;case Ude:if(n.avail_in===0)return o;o=i,n.avail_in--,n.total_in++,s.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,s.mode=zde;case zde:if(n.avail_in===0)return o;o=i,n.avail_in--,n.total_in++,s.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,s.mode=Vde;case Vde:return n.avail_in===0?o:(o=i,n.avail_in--,n.total_in++,s.need+=n.read_byte(n.next_in_index++)&255,s.mode=x6,2);case x6:return s.mode=iy,n.msg="need dictionary",s.marker=0,-2;case hD:if(o=s.blocks.proc(n,o),o==-3){s.mode=iy,s.marker=0;break}if(o==0&&(o=i),o!=1)return o;o=i,s.blocks.reset(n,s.was),s.mode=Hde;case Hde:return n.avail_in=0,1;case iy:return-3;default:return-2}},e.inflateSetDictionary=function(n,i,o){let r=0,s=o;if(!n||!n.istate||n.istate.mode!=x6)return-2;let a=n.istate;return s>=1<<a.wbits&&(s=(1<<a.wbits)-1,r=o-s),a.blocks.set_dictionary(i,r,s),a.mode=hD,0},e.inflateSync=function(n){let i,o,r,s,a;if(!n||!n.istate)return-2;let l=n.istate;if(l.mode!=iy&&(l.mode=iy,l.marker=0),(i=n.avail_in)===0)return-5;for(o=n.next_in_index,r=l.marker;i!==0&&r<4;)n.read_byte(o)==HQe[r]?r++:n.read_byte(o)!==0?r=0:r=4-r,o++,i--;return n.total_in+=o-n.next_in_index,n.next_in_index=o,n.avail_in=i,l.marker=r,r!=4?-3:(s=n.total_in,a=n.total_out,t(n),n.total_in=s,n.total_out=a,l.mode=hD,0)},e.inflateSyncPoint=function(n){return!n||!n.istate||!n.istate.blocks?-2:n.istate.blocks.sync_point()}}function jde(){}jde.prototype={inflateInit(e){let t=this;return t.istate=new GQe,e||(e=15),t.istate.inflateInit(t,e)},inflate(e){let t=this;return t.istate?t.istate.inflate(t,e):-2},inflateEnd(){let e=this;if(!e.istate)return-2;let t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){let e=this;return e.istate?e.istate.inflateSync(e):-2},inflateSetDictionary(e,t){let n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):-2},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}};function Wde(e){let t=this,n=new jde,i=e&&e.chunkSize?Math.floor(e.chunkSize*2):128*1024,o=vQe,r=new Uint8Array(i),s=!1;n.inflateInit(),n.next_out=r,t.append=function(a,l){let u=[],f,h,m=0,p=0,_=0;if(a.length!==0){n.next_in_index=0,n.next_in=a,n.avail_in=a.length;do{if(n.next_out_index=0,n.avail_out=i,n.avail_in===0&&!s&&(n.next_in_index=0,s=!0),f=n.inflate(o),s&&f===-5){if(n.avail_in!==0)throw new Error("inflating: bad input")}else if(f!==0&&f!==1)throw new Error("inflating: "+n.msg);if((s||f===1)&&n.avail_in===a.length)throw new Error("inflating: bad input");n.next_out_index&&(n.next_out_index===i?u.push(new Uint8Array(r)):u.push(r.subarray(0,n.next_out_index))),_+=n.next_out_index,l&&n.next_in_index>0&&n.next_in_index!=m&&(l(n.next_in_index),m=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return u.length>1?(h=new Uint8Array(_),u.forEach(function(b){h.set(b,p),p+=b.length})):h=u[0]?new Uint8Array(u[0]):new Uint8Array,h}},t.flush=function(){n.inflateEnd()}}var ME="/",C6=new Date(2107,11,31),E6=new Date(1980,0,1),xi=void 0,ou="undefined",kp="function";var mD=class{constructor(t){return class extends TransformStream{constructor(n,i){let o=new t(i);super({transform(r,s){s.enqueue(o.append(r))},flush(r){let s=o.flush();s&&r.enqueue(s)}})}}}};var jQe=64,qde=2;try{typeof navigator!=ou&&navigator.hardwareConcurrency&&(qde=navigator.hardwareConcurrency)}catch{}var WQe={chunkSize:512*1024,maxWorkers:qde,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:xi,CompressionStreamNative:typeof CompressionStream!=ou&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=ou&&DecompressionStream},ry=Object.assign({},WQe);function pD(){return ry}function ck(e){return Math.max(e.chunkSize,jQe)}function LE(e){let{baseURL:t,chunkSize:n,maxWorkers:i,terminateWorkerTimeout:o,useCompressionStream:r,useWebWorkers:s,Deflate:a,Inflate:l,CompressionStream:u,DecompressionStream:f,workerScripts:h}=e;if(oy("baseURL",t),oy("chunkSize",n),oy("maxWorkers",i),oy("terminateWorkerTimeout",o),oy("useCompressionStream",r),oy("useWebWorkers",s),a&&(ry.CompressionStream=new mD(a)),l&&(ry.DecompressionStream=new mD(l)),oy("CompressionStream",u),oy("DecompressionStream",f),h!==xi){let{deflate:m,inflate:p}=h;if((m||p)&&(ry.workerScripts||(ry.workerScripts={})),m){if(!Array.isArray(m))throw new Error("workerScripts.deflate must be an array");ry.workerScripts.deflate=m}if(p){if(!Array.isArray(p))throw new Error("workerScripts.inflate must be an array");ry.workerScripts.inflate=p}}}function oy(e,t){t!==xi&&(ry[e]=t)}var Yde=[];for(let e=0;e<256;e++){let t=e;for(let n=0;n<8;n++)t&1?t=t>>>1^3988292384:t=t>>>1;Yde[e]=t}var Up=class{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let i=0,o=t.length|0;i<o;i++)n=n>>>8^Yde[(n^t[i])&255];this.crc=n}get(){return~this.crc}};var _D=class extends TransformStream{constructor(){let t,n=new Up;super({transform(i,o){n.append(i),o.enqueue(i)},flush(){let i=new Uint8Array(4);new DataView(i.buffer).setUint32(0,n.get()),t.value=i}}),t=this}};function NE(e){if(typeof TextEncoder==ou){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}else return new TextEncoder().encode(e)}var Ac={concat(e,t){if(e.length===0||t.length===0)return e.concat(t);let n=e[e.length-1],i=Ac.getPartial(n);return i===32?e.concat(t):Ac._shiftRight(t,i,n|0,e.slice(0,e.length-1))},bitLength(e){let t=e.length;if(t===0)return 0;let n=e[t-1];return(t-1)*32+Ac.getPartial(n)},clamp(e,t){if(e.length*32<t)return e;e=e.slice(0,Math.ceil(t/32));let n=e.length;return t=t&31,n>0&&t&&(e[n-1]=Ac.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,i){for(i===void 0&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(t===0)return i.concat(e);for(let s=0;s<e.length;s++)i.push(n|e[s]>>>t),n=e[s]<<32-t;let o=e.length?e[e.length-1]:0,r=Ac.getPartial(o);return i.push(Ac.partial(t+r&31,t+r>32?n:i.pop(),1)),i}},gD={bytes:{fromBits(e){let n=Ac.bitLength(e)/8,i=new Uint8Array(n),o;for(let r=0;r<n;r++)r&3||(o=e[r/4]),i[r]=o>>>24,o<<=8;return i},toBits(e){let t=[],n,i=0;for(n=0;n<e.length;n++)i=i<<8|e[n],(n&3)===3&&(t.push(i),i=0);return n&3&&t.push(Ac.partial(8*(n&3),i)),t}}},Xde={};Xde.sha1=class{constructor(e){let t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){let e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){let t=this;typeof e=="string"&&(e=gD.utf8String.toBits(e));let n=t._buffer=Ac.concat(t._buffer,e),i=t._length,o=t._length=i+Ac.bitLength(e);if(o>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");let r=new Uint32Array(n),s=0;for(let a=t.blockSize+i-(t.blockSize+i&t.blockSize-1);a<=o;a+=t.blockSize)t._block(r.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),t}finalize(){let e=this,t=e._buffer,n=e._h;t=Ac.concat(t,[Ac.partial(1,1)]);for(let i=t.length+2;i&15;i++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,i){if(e<=19)return t&n|~t&i;if(e<=39)return t^n^i;if(e<=59)return t&n|t&i|n&i;if(e<=79)return t^n^i}_S(e,t){return t<<e|t>>>32-e}_block(e){let t=this,n=t._h,i=Array(80);for(let u=0;u<16;u++)i[u]=e[u];let o=n[0],r=n[1],s=n[2],a=n[3],l=n[4];for(let u=0;u<=79;u++){u>=16&&(i[u]=t._S(1,i[u-3]^i[u-8]^i[u-14]^i[u-16]));let f=t._S(5,o)+t._f(u,r,s,a)+l+i[u]+t._key[Math.floor(u/20)]|0;l=a,a=s,s=t._S(30,r),r=o,o=f}n[0]=n[0]+o|0,n[1]=n[1]+r|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+l|0}};var w6={};w6.aes=class{constructor(e){let t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();let n=t._tables[0][4],i=t._tables[1],o=e.length,r,s,a,l=1;if(o!==4&&o!==6&&o!==8)throw new Error("invalid aes key size");for(t._key=[s=e.slice(0),a=[]],r=o;r<4*o+28;r++){let u=s[r-1];(r%o===0||o===8&&r%o===4)&&(u=n[u>>>24]<<24^n[u>>16&255]<<16^n[u>>8&255]<<8^n[u&255],r%o===0&&(u=u<<8^u>>>24^l<<24,l=l<<1^(l>>7)*283)),s[r]=s[r-o]^u}for(let u=0;r;u++,r--){let f=s[u&3?r:r-4];r<=4||u<4?a[u]=f:a[u]=i[0][n[f>>>24]]^i[1][n[f>>16&255]]^i[2][n[f>>8&255]]^i[3][n[f&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){let e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],o=[],r=[],s,a,l,u;for(let f=0;f<256;f++)r[(o[f]=f<<1^(f>>7)*283)^f]=f;for(let f=s=0;!n[f];f^=a||1,s=r[s]||1){let h=s^s<<1^s<<2^s<<3^s<<4;h=h>>8^h&255^99,n[f]=h,i[h]=f,u=o[l=o[a=o[f]]];let m=u*16843009^l*65537^a*257^f*16843008,p=o[h]*257^h*16843008;for(let _=0;_<4;_++)e[_][f]=p=p<<24^p>>>8,t[_][h]=m=m<<24^m>>>8}for(let f=0;f<5;f++)e[f]=e[f].slice(0),t[f]=t[f].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");let n=this._key[t],i=n.length/4-2,o=[0,0,0,0],r=this._tables[t],s=r[0],a=r[1],l=r[2],u=r[3],f=r[4],h=e[0]^n[0],m=e[t?3:1]^n[1],p=e[2]^n[2],_=e[t?1:3]^n[3],b=4,x,T,E;for(let S=0;S<i;S++)x=s[h>>>24]^a[m>>16&255]^l[p>>8&255]^u[_&255]^n[b],T=s[m>>>24]^a[p>>16&255]^l[_>>8&255]^u[h&255]^n[b+1],E=s[p>>>24]^a[_>>16&255]^l[h>>8&255]^u[m&255]^n[b+2],_=s[_>>>24]^a[h>>16&255]^l[m>>8&255]^u[p&255]^n[b+3],b+=4,h=x,m=T,p=E;for(let S=0;S<4;S++)o[t?3&-S:S]=f[h>>>24]<<24^f[m>>16&255]<<16^f[p>>8&255]<<8^f[_&255]^n[b++],x=h,h=m,m=p,p=_,_=x;return o}};var Kde={getRandomValues(e){let t=new Uint32Array(e.buffer),n=i=>{let o=987654321,r=4294967295;return function(){return o=36969*(o&65535)+(o>>16)&r,i=18e3*(i&65535)+(i>>16)&r,(((o<<16)+i&r)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let i=0,o;i<e.length;i+=4){let r=n((o||Math.random())*4294967296);o=r()*987654071,t[i/4]=r()*4294967296|0}return e}},S6={};S6.ctrGladman=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if((e>>24&255)===255){let t=e>>16&255,n=e>>8&255,i=e&255;t===255?(t=0,n===255?(n=0,i===255?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];let o=Ac.bitLength(t);for(let r=0;r<i;r+=4){this.incCounter(n);let s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return Ac.clamp(t,o)}};var sy={importKey(e){return new sy.hmacSha1(gD.bytes.toBits(e))},pbkdf2(e,t,n,i){if(n=n||1e4,i<0||n<0)throw new Error("invalid params to pbkdf2");let o=(i>>5)+1<<2,r,s,a,l,u,f=new ArrayBuffer(o),h=new DataView(f),m=0,p=Ac;for(t=gD.bytes.toBits(t),u=1;m<(o||1);u++){for(r=s=e.encrypt(p.concat(t,[u])),a=1;a<n;a++)for(s=e.encrypt(s),l=0;l<s.length;l++)r[l]^=s[l];for(a=0;m<(o||1)&&a<r.length;a++)h.setInt32(m,r[a]),m+=4}return f.slice(0,i/8)}};sy.hmacSha1=class{constructor(e){let t=this,n=t._hash=Xde.sha1,i=[[],[]];t._baseHash=[new n,new n];let o=t._baseHash[0].blockSize/32;e.length>o&&(e=new n().update(e).finalize());for(let r=0;r<o;r++)i[0][r]=e[r]^909522486,i[1][r]=e[r]^1549556828;t._baseHash[0].update(i[0]),t._baseHash[1].update(i[1]),t._resultHash=new n(t._baseHash[0])}reset(){let e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){let t=this;t._updated=!0,t._resultHash.update(e)}digest(){let e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}};var qQe=typeof crypto!=ou&&typeof crypto.getRandomValues==kp,ay="Invalid password",w0="Invalid signature",zp="zipjs-abort-check-password";function lk(e){return qQe?crypto.getRandomValues(e):Kde.getRandomValues(e)}var FE=16,YQe="raw",Jde={name:"PBKDF2"},XQe={name:"HMAC"},KQe="SHA-1",$Qe=Object.assign({hash:XQe},Jde),A6=Object.assign({iterations:1e3,hash:{name:KQe}},Jde),ZQe=["deriveBits"],bD=[8,12,16],yD=[16,24,32],cy=10,JQe=[0,0,0,0],dk=typeof crypto!=ou,CD=dk&&crypto.subtle,Qde=dk&&typeof CD!=ou,Kh=gD.bytes,QQe=w6.aes,eet=S6.ctrGladman,tet=sy.hmacSha1,$de=dk&&Qde&&typeof CD.importKey==kp,Zde=dk&&Qde&&typeof CD.deriveBits==kp,uk=class extends TransformStream{constructor({password:t,rawPassword:n,signed:i,encryptionStrength:o,checkPasswordOnly:r}){super({start(){Object.assign(this,{ready:new Promise(s=>this.resolveReady=s),password:nhe(t,n),signed:i,strength:o-1,pending:new Uint8Array})},async transform(s,a){let l=this,{password:u,strength:f,resolveReady:h,ready:m}=l;u?(await net(l,f,u,bf(s,0,bD[f]+2)),s=bf(s,bD[f]+2),r?a.error(new Error(zp)):h()):await m;let p=new Uint8Array(s.length-cy-(s.length-cy)%FE);a.enqueue(ehe(l,s,p,0,cy,!0))},async flush(s){let{signed:a,ctr:l,hmac:u,pending:f,ready:h}=this;if(u&&l){await h;let m=bf(f,0,f.length-cy),p=bf(f,f.length-cy),_=new Uint8Array;if(m.length){let b=TD(Kh,m);u.update(b);let x=l.update(b);_=xD(Kh,x)}if(a){let b=bf(xD(Kh,u.digest()),0,cy);for(let x=0;x<cy;x++)if(b[x]!=p[x])throw new Error(w0)}s.enqueue(_)}}})}},fk=class extends TransformStream{constructor({password:t,rawPassword:n,encryptionStrength:i}){let o;super({start(){Object.assign(this,{ready:new Promise(r=>this.resolveReady=r),password:nhe(t,n),strength:i-1,pending:new Uint8Array})},async transform(r,s){let a=this,{password:l,strength:u,resolveReady:f,ready:h}=a,m=new Uint8Array;l?(m=await iet(a,u,l),f()):await h;let p=new Uint8Array(m.length+r.length-r.length%FE);p.set(m,0),s.enqueue(ehe(a,r,p,m.length,0))},async flush(r){let{ctr:s,hmac:a,pending:l,ready:u}=this;if(a&&s){await u;let f=new Uint8Array;if(l.length){let h=s.update(TD(Kh,l));a.update(h),f=xD(Kh,h)}o.signature=xD(Kh,a.digest()).slice(0,cy),r.enqueue(v6(f,o.signature))}}}),o=this}};function ehe(e,t,n,i,o,r){let{ctr:s,hmac:a,pending:l}=e,u=t.length-o;l.length&&(t=v6(l,t),n=set(n,u-u%FE));let f;for(f=0;f<=u-FE;f+=FE){let h=TD(Kh,bf(t,f,f+FE));r&&a.update(h);let m=s.update(h);r||a.update(m),n.set(xD(Kh,m),f+i)}return e.pending=bf(t,f),n}async function net(e,t,n,i){let o=await the(e,t,n,bf(i,0,bD[t])),r=bf(i,bD[t]);if(o[0]!=r[0]||o[1]!=r[1])throw new Error(ay)}async function iet(e,t,n){let i=lk(new Uint8Array(bD[t])),o=await the(e,t,n,i);return v6(i,o)}async function the(e,t,n,i){e.password=null;let o=await oet(YQe,n,$Qe,!1,ZQe),r=await ret(Object.assign({salt:i},A6),o,8*(yD[t]*2+2)),s=new Uint8Array(r),a=TD(Kh,bf(s,0,yD[t])),l=TD(Kh,bf(s,yD[t],yD[t]*2)),u=bf(s,yD[t]*2);return Object.assign(e,{keys:{key:a,authentication:l,passwordVerification:u},ctr:new eet(new QQe(a),Array.from(JQe)),hmac:new tet(l)}),u}async function oet(e,t,n,i,o){if($de)try{return await CD.importKey(e,t,n,i,o)}catch{return $de=!1,sy.importKey(t)}else return sy.importKey(t)}async function ret(e,t,n){if(Zde)try{return await CD.deriveBits(e,t,n)}catch{return Zde=!1,sy.pbkdf2(t,e.salt,A6.iterations,n)}else return sy.pbkdf2(t,e.salt,A6.iterations,n)}function nhe(e,t){return t===xi?NE(e):t}function v6(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function set(e,t){if(t&&t>e.length){let n=e;e=new Uint8Array(t),e.set(n,0)}return e}function bf(e,t,n){return e.subarray(t,n)}function xD(e,t){return e.fromBits(t)}function TD(e,t){return e.toBits(t)}var BE=12,hk=class extends TransformStream{constructor({password:t,passwordVerification:n,checkPasswordOnly:i}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),she(this,t)},transform(o,r){let s=this;if(s.password){let a=ihe(s,o.subarray(0,BE));if(s.password=null,a[BE-1]!=s.passwordVerification)throw new Error(ay);o=o.subarray(BE)}i?r.error(new Error(zp)):r.enqueue(ihe(s,o))}})}},mk=class extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),she(this,t)},transform(i,o){let r=this,s,a;if(r.password){r.password=null;let l=lk(new Uint8Array(BE));l[BE-1]=r.passwordVerification,s=new Uint8Array(i.length+l.length),s.set(ohe(r,l),0),a=BE}else s=new Uint8Array(i.length),a=0;s.set(ohe(r,i),a),o.enqueue(s)}})}};function ihe(e,t){let n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=ahe(e)^t[i],D6(e,n[i]);return n}function ohe(e,t){let n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=ahe(e)^t[i],D6(e,t[i]);return n}function she(e,t){let n=[305419896,591751049,878082192];Object.assign(e,{keys:n,crcKey0:new Up(n[0]),crcKey2:new Up(n[2])});for(let i=0;i<t.length;i++)D6(e,t.charCodeAt(i))}function D6(e,t){let[n,i,o]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),i=rhe(Math.imul(rhe(i+che(n)),134775813)+1),e.crcKey2.append([i>>>24]),o=~e.crcKey2.get(),e.keys=[n,i,o]}function ahe(e){let t=e.keys[2]|2;return che(Math.imul(t,t^1)>>>8)}function che(e){return e&255}function rhe(e){return e&4294967295}var lhe="deflate-raw",pk=class extends TransformStream{constructor(t,{chunkSize:n,CompressionStream:i,CompressionStreamNative:o}){super({});let{compressed:r,encrypted:s,useCompressionStream:a,zipCrypto:l,signed:u,level:f}=t,h=this,m,p,_=uhe(super.readable);(!s||l)&&u&&(m=new _D,_=$h(_,m)),r&&(_=dhe(_,a,{level:f,chunkSize:n},o,i)),s&&(l?_=$h(_,new mk(t)):(p=new fk(t),_=$h(_,p))),fhe(h,_,()=>{let b;s&&!l&&(b=p.signature),(!s||l)&&u&&(b=new DataView(m.value.buffer).getUint32(0)),h.signature=b})}},_k=class extends TransformStream{constructor(t,{chunkSize:n,DecompressionStream:i,DecompressionStreamNative:o}){super({});let{zipCrypto:r,encrypted:s,signed:a,signature:l,compressed:u,useCompressionStream:f}=t,h,m,p=uhe(super.readable);s&&(r?p=$h(p,new hk(t)):(m=new uk(t),p=$h(p,m))),u&&(p=dhe(p,f,{chunkSize:n},o,i)),(!s||r)&&a&&(h=new _D,p=$h(p,h)),fhe(this,p,()=>{if((!s||r)&&a){let _=new DataView(h.value.buffer);if(l!=_.getUint32(0,!1))throw new Error(w0)}})}};function uhe(e){return $h(e,new TransformStream({transform(t,n){t&&t.length&&n.enqueue(t)}}))}function fhe(e,t,n){t=$h(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function dhe(e,t,n,i,o){try{let r=t&&i?i:o;e=$h(e,new r(lhe,n))}catch{if(t)try{e=$h(e,new o(lhe,n))}catch{return e}else return e}return e}function $h(e,t){return e.pipeThrough(t)}var hhe="message",mhe="start",phe="pull",I6="data",_he="ack",O6="close",bk="deflate",xk="inflate";var gk=class extends TransformStream{constructor(t,n){super({});let i=this,{codecType:o}=t,r;o.startsWith(bk)?r=pk:o.startsWith(xk)&&(r=_k);let s=0,a=0,l=new r(t,n),u=super.readable,f=new TransformStream({transform(m,p){m&&m.length&&(a+=m.length,p.enqueue(m))},flush(){Object.assign(i,{inputSize:a})}}),h=new TransformStream({transform(m,p){m&&m.length&&(s+=m.length,p.enqueue(m))},flush(){let{signature:m}=l;Object.assign(i,{signature:m,outputSize:s,inputSize:a})}});Object.defineProperty(i,"readable",{get(){return u.pipeThrough(f).pipeThrough(l).pipeThrough(h)}})}},yk=class extends TransformStream{constructor(t){let n;super({transform:i,flush(o){n&&n.length&&o.enqueue(n)}});function i(o,r){if(n){let s=new Uint8Array(n.length+o.length);s.set(n),s.set(o,n.length),o=s,n=null}o.length>t?(r.enqueue(o.slice(0,t)),i(o.slice(t),r)):n=o}}};var bhe=typeof Worker!=ou;var kE=class{constructor(t,{readable:n,writable:i},{options:o,config:r,streamOptions:s,useWebWorkers:a,transferStreams:l,scripts:u},f){let{signal:h}=s;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new yk(r.chunkSize)).pipeThrough(new R6(n,s),{signal:h}),writable:i,options:Object.assign({},o),scripts:u,transferStreams:l,terminate(){return new Promise(m=>{let{worker:p,busy:_}=t;p?(_?t.resolveTerminated=m:(p.terminate(),m()),t.interface=null):m()})},onTaskFinished(){let{resolveTerminated:m}=t;m&&(t.resolveTerminated=null,t.terminated=!0,t.worker.terminate(),m()),t.busy=!1,f(t)}}),(a&&bhe?aet:xhe)(t,r)}},R6=class extends TransformStream{constructor(t,{onstart:n,onprogress:i,size:o,onend:r}){let s=0;super({async start(){n&&await P6(n,o)},async transform(a,l){s+=a.length,i&&await P6(i,s,o),l.enqueue(a)},async flush(){t.size=s,r&&await P6(r,s)}})}};async function P6(e,...t){try{await e(...t)}catch{}}function xhe(e,t){return{run:()=>cet(e,t)}}function aet(e,t){let{baseURL:n,chunkSize:i}=t;if(!e.interface){let o;try{o=det(e.scripts[0],n,e)}catch{return bhe=!1,xhe(e,t)}Object.assign(e,{worker:o,interface:{run:()=>uet(e,{chunkSize:i})}})}return e.interface}async function cet({options:e,readable:t,writable:n,onTaskFinished:i},o){try{let r=new gk(e,o);await t.pipeThrough(r).pipeTo(n,{preventClose:!0,preventAbort:!0});let{signature:s,inputSize:a,outputSize:l}=r;return{signature:s,inputSize:a,outputSize:l}}finally{i()}}async function uet(e,t){let n,i,o=new Promise((m,p)=>{n=m,i=p});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:i,result:o});let{readable:r,options:s,scripts:a}=e,{writable:l,closed:u}=fet(e.writable),f=Tk({type:mhe,scripts:a.slice(1),options:s,config:t,readable:r,writable:l},e);f||Object.assign(e,{reader:r.getReader(),writer:l.getWriter()});let h=await o;return f||await l.getWriter().close(),await u,h}function fet(e){let t,n=new Promise(o=>t=o);return{writable:new WritableStream({async write(o){let r=e.getWriter();await r.ready,await r.write(o),r.releaseLock()},close(){t()},abort(o){return e.getWriter().abort(o)}}),closed:n}}var ghe=!0,yhe=!0;function det(e,t,n){let i={type:"module"},o,r;typeof e==kp&&(e=e());try{o=new URL(e,t)}catch{o=e}if(ghe)try{r=new Worker(o)}catch{ghe=!1,r=new Worker(o,i)}else r=new Worker(o,i);return r.addEventListener(hhe,s=>het(s,n)),r}function Tk(e,{worker:t,writer:n,onTaskFinished:i,transferStreams:o}){try{let{value:r,readable:s,writable:a}=e,l=[];if(r&&(r.byteLength<r.buffer.byteLength?e.value=r.buffer.slice(0,r.byteLength):e.value=r.buffer,l.push(e.value)),o&&yhe?(s&&l.push(s),a&&l.push(a)):e.readable=e.writable=null,l.length)try{return t.postMessage(e,l),!0}catch{yhe=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(r){throw n&&n.releaseLock(),i(),r}}async function het({data:e},t){let{type:n,value:i,messageId:o,result:r,error:s}=e,{reader:a,writer:l,resolveResult:u,rejectResult:f,onTaskFinished:h}=t;try{if(s){let{message:p,stack:_,code:b,name:x}=s,T=new Error(p);Object.assign(T,{stack:_,code:b,name:x}),m(T)}else{if(n==phe){let{value:p,done:_}=await a.read();Tk({type:I6,value:p,done:_,messageId:o},t)}n==I6&&(await l.ready,await l.write(new Uint8Array(i)),Tk({type:_he,messageId:o},t)),n==O6&&m(null,r)}}catch(p){Tk({type:O6,messageId:o},t),m(p)}function m(p,_){p?f(p):u(_),l&&l.releaseLock(),h()}}var S0=[],M6=[];var The=0;async function Ck(e,t){let{options:n,config:i}=t,{transferStreams:o,useWebWorkers:r,useCompressionStream:s,codecType:a,compressed:l,signed:u,encrypted:f}=n,{workerScripts:h,maxWorkers:m}=i;t.transferStreams=o||o===xi;let p=!l&&!u&&!f&&!t.transferStreams;return t.useWebWorkers=!p&&(r||r===xi&&i.useWebWorkers),t.scripts=t.useWebWorkers&&h?h[a]:[],n.useCompressionStream=s||s===xi&&i.useCompressionStream,(await _()).run();async function _(){let x=S0.find(T=>!T.busy);if(x)return Che(x),new kE(x,e,t,b);if(S0.length<m){let T={indexWorker:The};return The++,S0.push(T),new kE(T,e,t,b)}else return new Promise(T=>M6.push({resolve:T,stream:e,workerOptions:t}))}function b(x){if(M6.length){let[{resolve:T,stream:E,workerOptions:S}]=M6.splice(0,1);T(new kE(x,E,S,b))}else x.worker?(Che(x),met(x,t)):S0=S0.filter(T=>T!=x)}}function met(e,t){let{config:n}=t,{terminateWorkerTimeout:i}=n;Number.isFinite(i)&&i>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout(async()=>{S0=S0.filter(o=>o!=e);try{await e.terminate()}catch{}},i))}function Che(e){let{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}var pet="Writer iterator completed too soon",_et="text/plain";var get="Content-Type";var yet=64*1024,F6="writable",UE=class{constructor(){this.size=0}init(){this.initialized=!0}},Ek=class extends UE{get readable(){let t=this,{chunkSize:n=yet}=t,i=new ReadableStream({start(){this.chunkOffset=0},async pull(o){let{offset:r=0,size:s,diskNumberStart:a}=i,{chunkOffset:l}=this;o.enqueue(await ma(t,r+l,Math.min(n,s-l),a)),l+n>s?o.close():this.chunkOffset+=n}});return i}},L6=class extends UE{constructor(){super();let t=this,n=new WritableStream({write(i){return t.writeUint8Array(i)}});Object.defineProperty(t,F6,{get(){return n}})}writeUint8Array(){}};var wk=class extends L6{constructor(t){super(),Object.assign(this,{data:"data:"+(t||"")+";base64,",pending:[]})}writeUint8Array(t){let n=this,i=0,o=n.pending,r=n.pending.length;for(n.pending="",i=0;i<Math.floor((r+t.length)/3)*3-r;i++)o+=String.fromCharCode(t[i]);for(;i<t.length;i++)n.pending+=String.fromCharCode(t[i]);o.length>2?n.data+=btoa(o):n.pending=o}getData(){return this.data+btoa(this.pending)}},Vp=class extends Ek{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){let i=this,o=t+n,s=await(t||o<i.size?i.blob.slice(t,o):i.blob).arrayBuffer();return s.byteLength>n&&(s=s.slice(t,o)),new Uint8Array(s)}},ED=class extends UE{constructor(t){super();let n=this,i=new TransformStream,o=[];t&&o.push([get,t]),Object.defineProperty(n,F6,{get(){return i.writable}}),n.blob=new Response(i.readable,{headers:o}).blob()}getData(){return this.blob}},Sk=class extends Vp{constructor(t){super(new Blob([t],{type:_et}))}},Ak=class extends ED{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){let{encoding:t,utf8:n}=this,i=await super.getData();if(i.text&&n)return i.text();{let o=new FileReader;return new Promise((r,s)=>{Object.assign(o,{onload:({target:a})=>r(a.result),onerror:()=>s(o.error)}),o.readAsText(i,t)})}}};var N6=class extends Ek{constructor(t){super(),this.readers=t}async init(){let t=this,{readers:n}=t;t.lastDiskNumber=0,t.lastDiskOffset=0,await Promise.all(n.map(async(i,o)=>{await i.init(),o!=n.length-1&&(t.lastDiskOffset+=i.size),t.size+=i.size})),super.init()}async readUint8Array(t,n,i=0){let o=this,{readers:r}=this,s,a=i;a==-1&&(a=r.length-1);let l=t;for(;l>=r[a].size;)l-=r[a].size,a++;let u=r[a],f=u.size;if(l+n<=f)s=await ma(u,l,n);else{let h=f-l;s=new Uint8Array(n),s.set(await ma(u,l,h)),s.set(await o.readUint8Array(t+h,n-h,i),h)}return o.lastDiskNumber=Math.max(a,o.lastDiskNumber),s}},vk=class extends UE{constructor(t,n=4294967295){super();let i=this;Object.assign(i,{diskNumber:0,diskOffset:0,size:0,maxSize:n,availableSize:n});let o,r,s,a=new WritableStream({async write(f){let{availableSize:h}=i;if(s)f.length>=h?(await l(f.slice(0,h)),await u(),i.diskOffset+=o.size,i.diskNumber++,s=null,await this.write(f.slice(h))):await l(f);else{let{value:m,done:p}=await t.next();if(p&&!m)throw new Error(pet);o=m,o.size=0,o.maxSize&&(i.maxSize=o.maxSize),i.availableSize=i.maxSize,await Jh(o),r=m.writable,s=r.getWriter(),await this.write(f)}},async close(){await s.ready,await u()}});Object.defineProperty(i,F6,{get(){return a}});async function l(f){let h=f.length;h&&(await s.ready,await s.write(f),o.size+=h,i.size+=h,i.availableSize-=h)}async function u(){r.size=o.size,await s.close()}}};async function Jh(e,t){if(e.init&&!e.initialized)await e.init(t);else return Promise.resolve()}function Dk(e){return Array.isArray(e)&&(e=new N6(e)),e instanceof ReadableStream&&(e={readable:e}),e}function Ik(e){e.writable===xi&&typeof e.next==kp&&(e=new vk(e)),e instanceof WritableStream&&(e={writable:e});let{writable:t}=e;return t.size===xi&&(t.size=0),e instanceof vk||Object.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function ma(e,t,n,i){return e.readUint8Array(t,n,i)}var Ehe="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),bet=Ehe.length==256;function whe(e){if(bet){let t="";for(let n=0;n<e.length;n++)t+=Ehe[e[n]];return t}else return new TextDecoder().decode(e)}function wD(e,t){return t&&t.trim().toLowerCase()=="cp437"?whe(e):new TextDecoder(t).decode(e)}var B6="filename",k6="rawFilename",U6="comment",z6="rawComment",V6="uncompressedSize",H6="compressedSize",G6="offset",Ok="diskNumberStart",zE="lastModDate",Pk="rawLastModDate",SD="lastAccessDate",She="rawLastAccessDate",AD="creationDate",Ahe="rawCreationDate",j6="internalFileAttribute",W6="externalFileAttribute",q6="msDosCompatible",Rk="zip64",Y6="encrypted",X6="version",K6="versionMadeBy",$6="zipCrypto",xet=[B6,k6,H6,V6,zE,Pk,U6,z6,SD,AD,G6,Ok,Ok,j6,W6,q6,Rk,Y6,X6,K6,$6,"directory","bitFlag","signature","filenameUTF8","commentUTF8","compressionMethod","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"],ly=class{constructor(t){xet.forEach(n=>this[n]=t[n])}};var Z6="File format is not recognized",wet="End of central directory not found",Aet="End of Zip64 central directory locator not found",vet="Central directory header not found",Det="Local file header not found",Iet="Zip64 extra field not found",Oet="File contains encrypted entry",Pet="Encryption method not supported",vhe="Compression method not supported",Dhe="Split zip file",Ihe="utf-8",Ohe="cp437",Ret=[[V6,4294967295],[H6,4294967295],[G6,4294967295],[Ok,65535]],Met={[65535]:{getValue:Zr,bytes:4},[4294967295]:{getValue:Mk,bytes:8}},zk=class{constructor(t,n={}){Object.assign(this,{reader:Dk(t),options:n,config:pD()})}async*getEntriesGenerator(t={}){let n=this,{reader:i}=n,{config:o}=n;if(await Jh(i),(i.size===xi||!i.readUint8Array)&&(i=new Vp(await new Response(i.readable).blob()),await Jh(i)),i.size<22)throw new Error(Z6);i.chunkSize=ck(o);let r=await ket(i,101010256,i.size,22,65535*16);if(!r){let F=await ma(i,0,4),y=Zs(F);throw Zr(y)==134695760?new Error(Dhe):new Error(wet)}let s=Zs(r),a=Zr(s,12),l=Zr(s,16),u=r.offset,f=$s(s,20),h=u+22+f,m=$s(s,4),p=i.lastDiskNumber||0,_=$s(s,6),b=$s(s,8),x=0,T=0;if(l==4294967295||a==4294967295||b==65535||_==65535){let F=await ma(i,r.offset-20,20),y=Zs(F);if(Zr(y,0)==117853008){l=Mk(y,8);let I=await ma(i,l,56,-1),M=Zs(I),B=r.offset-20-56;if(Zr(M,0)!=101075792&&l!=B){let U=l;l=B,x=l-U,I=await ma(i,l,56,-1),M=Zs(I)}if(Zr(M,0)!=101075792)throw new Error(Aet);m==65535&&(m=Zr(M,16)),_==65535&&(_=Zr(M,20)),b==65535&&(b=Mk(M,32)),a==4294967295&&(a=Mk(M,40)),l-=a}}if(l>=i.size&&(x=i.size-l-a-22,l=i.size-a-22),p!=m)throw new Error(Dhe);if(l<0)throw new Error(Z6);let E=0,S=await ma(i,l,a,_),A=Zs(S);if(a){let F=r.offset-a;if(Zr(A,E)!=33639248&&l!=F){let y=l;l=F,x+=l-y,S=await ma(i,l,a,_),A=Zs(S)}}let v=r.offset-l-(i.lastDiskOffset||0);if(a!=v&&v>=0&&(a=v,S=await ma(i,l,a,_),A=Zs(S)),l<0||l>=i.size)throw new Error(Z6);let D=vc(n,t,"filenameEncoding"),R=vc(n,t,"commentEncoding");for(let F=0;F<b;F++){let y=new Q6(i,o,n.options);if(Zr(A,E)!=33639248)throw new Error(vet);Rhe(y,A,E+6);let I=!!y.bitFlag.languageEncodingFlag,M=E+46,B=M+y.filenameLength,U=B+y.extraFieldLength,V=$s(A,E+4),W=(V&0)==0,H=S.subarray(M,B),X=$s(A,E+32),$=U+X,ae=S.subarray(U,$),se=I,he=I,ge=W&&(VE(A,E+38)&16)==16,le=Zr(A,E+42)+x;Object.assign(y,{versionMadeBy:V,msDosCompatible:W,compressedSize:0,uncompressedSize:0,commentLength:X,directory:ge,offset:le,diskNumberStart:$s(A,E+34),internalFileAttribute:$s(A,E+36),externalFileAttribute:Zr(A,E+38),rawFilename:H,filenameUTF8:se,commentUTF8:he,rawExtraField:S.subarray(B,U)});let me=vc(n,t,"decodeText")||wD,Me=se?Ihe:D||Ohe,Ge=he?Ihe:R||Ohe,De=me(H,Me);De===xi&&(De=wD(H,Me));let ke=me(ae,Ge);ke===xi&&(ke=wD(ae,Ge)),Object.assign(y,{rawComment:ae,filename:De,comment:ke,directory:ge||De.endsWith(ME)}),T=Math.max(le,T),await Mhe(y,y,A,E+6),y.zipCrypto=y.encrypted&&!y.extraFieldAES;let He=new ly(y);He.getData=(Ie,Kt)=>y.getData(Ie,He,Kt),E=$;let{onprogress:ft}=t;if(ft)try{await ft(F+1,b,new ly(y))}catch{}yield He}let P=vc(n,t,"extractPrependedData"),L=vc(n,t,"extractAppendedData");return P&&(n.prependedData=T>0?await ma(i,0,T):new Uint8Array),n.comment=f?await ma(i,u+22,f):new Uint8Array,L&&(n.appendedData=h<i.size?await ma(i,h,i.size-h):new Uint8Array),!0}async getEntries(t={}){let n=[];for await(let i of this.getEntriesGenerator(t))n.push(i);return n}async close(){}};var Q6=class{constructor(t,n,i){Object.assign(this,{reader:t,config:n,options:i})}async getData(t,n,i={}){let o=this,{reader:r,offset:s,diskNumberStart:a,extraFieldAES:l,compressionMethod:u,config:f,bitFlag:h,signature:m,rawLastModDate:p,uncompressedSize:_,compressedSize:b}=o,x=n.localDirectory={},T=await ma(r,s,30,a),E=Zs(T),S=vc(o,i,"password"),A=vc(o,i,"rawPassword"),v=vc(o,i,"passThrough");if(S=S&&S.length&&S,A=A&&A.length&&A,l&&l.originalCompressionMethod!=99)throw new Error(vhe);if(u!=0&&u!=8&&!v)throw new Error(vhe);if(Zr(E,0)!=67324752)throw new Error(Det);Rhe(x,E,4),x.rawExtraField=x.extraFieldLength?await ma(r,s+30+x.filenameLength,x.extraFieldLength,a):new Uint8Array,await Mhe(o,x,E,4,!0),Object.assign(n,{lastAccessDate:x.lastAccessDate,creationDate:x.creationDate});let D=o.encrypted&&x.encrypted&&!v,R=D&&!l;if(v||(n.zipCrypto=R),D){if(!R&&l.strength===xi)throw new Error(Pet);if(!S&&!A)throw new Error(Oet)}let P=s+30+x.filenameLength+x.extraFieldLength,L=b,F=r.readable;Object.assign(F,{diskNumberStart:a,offset:P,size:L});let y=vc(o,i,"signal"),I=vc(o,i,"checkPasswordOnly");I&&(t=new WritableStream),t=Ik(t),await Jh(t,v?b:_);let{writable:M}=t,{onstart:B,onprogress:U,onend:V}=i,W={options:{codecType:xk,password:S,rawPassword:A,zipCrypto:R,encryptionStrength:l&&l.strength,signed:vc(o,i,"checkSignature")&&!v,passwordVerification:R&&(h.dataDescriptor?p>>>8&255:m>>>24&255),signature:m,compressed:u!=0&&!v,encrypted:o.encrypted&&!v,useWebWorkers:vc(o,i,"useWebWorkers"),useCompressionStream:vc(o,i,"useCompressionStream"),transferStreams:vc(o,i,"transferStreams"),checkPasswordOnly:I},config:f,streamOptions:{signal:y,size:L,onstart:B,onprogress:U,onend:V}},H=0;try{({outputSize:H}=await Ck({readable:F,writable:M},W))}catch(X){if(!I||X.message!=zp)throw X}finally{let X=vc(o,i,"preventClose");M.size+=H,!X&&!M.locked&&await M.getWriter().close()}return I?xi:t.getData?t.getData():M}};function Rhe(e,t,n){let i=e.rawBitFlag=$s(t,n+2),o=(i&1)==1,r=Zr(t,n+6);Object.assign(e,{encrypted:o,version:$s(t,n),bitFlag:{level:(i&6)>>1,dataDescriptor:(i&8)==8,languageEncodingFlag:(i&2048)==2048},rawLastModDate:r,lastModDate:Uet(r),filenameLength:$s(t,n+22),extraFieldLength:$s(t,n+24)})}async function Mhe(e,t,n,i,o){let{rawExtraField:r}=t,s=t.extraField=new Map,a=Zs(new Uint8Array(r)),l=0;try{for(;l<r.length;){let T=$s(a,l),E=$s(a,l+2);s.set(T,{type:T,data:r.slice(l+4,l+4+E)}),l+=4+E}}catch{}let u=$s(n,i+4);Object.assign(t,{signature:Zr(n,i+10),uncompressedSize:Zr(n,i+18),compressedSize:Zr(n,i+14)});let f=s.get(1);f&&(Let(f,t),t.extraFieldZip64=f);let h=s.get(28789);h&&(await Phe(h,B6,k6,t,e),t.extraFieldUnicodePath=h);let m=s.get(25461);m&&(await Phe(m,U6,z6,t,e),t.extraFieldUnicodeComment=m);let p=s.get(39169);p?(Net(p,t,u),t.extraFieldAES=p):t.compressionMethod=u;let _=s.get(10);_&&(Fet(_,t),t.extraFieldNTFS=_);let b=s.get(21589);b&&(Bet(b,t,o),t.extraFieldExtendedTimestamp=b);let x=s.get(6534);x&&(t.extraFieldUSDZ=x)}function Let(e,t){t.zip64=!0;let n=Zs(e.data),i=Ret.filter(([o,r])=>t[o]==r);for(let o=0,r=0;o<i.length;o++){let[s,a]=i[o];if(t[s]==a){let l=Met[a];t[s]=e[s]=l.getValue(n,r),r+=l.bytes}else if(e[s])throw new Error(Iet)}}async function Phe(e,t,n,i,o){let r=Zs(e.data),s=new Up;s.append(o[n]);let a=Zs(new Uint8Array(4));a.setUint32(0,s.get(),!0);let l=Zr(r,1);Object.assign(e,{version:VE(r,0),[t]:wD(e.data.subarray(5)),valid:!o.bitFlag.languageEncodingFlag&&l==Zr(a,0)}),e.valid&&(i[t]=e[t],i[t+"UTF8"]=!0)}function Net(e,t,n){let i=Zs(e.data),o=VE(i,4);Object.assign(e,{vendorVersion:VE(i,0),vendorId:VE(i,2),strength:o,originalCompressionMethod:n,compressionMethod:$s(i,5)}),t.compressionMethod=e.compressionMethod}function Fet(e,t){let n=Zs(e.data),i=4,o;try{for(;i<e.data.length&&!o;){let r=$s(n,i),s=$s(n,i+2);r==1&&(o=e.data.slice(i+4,i+4+s)),i+=4+s}}catch{}try{if(o&&o.length==24){let r=Zs(o),s=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),l=r.getBigUint64(16,!0);Object.assign(e,{rawLastModDate:s,rawLastAccessDate:a,rawCreationDate:l});let u=J6(s),f=J6(a),h=J6(l),m={lastModDate:u,lastAccessDate:f,creationDate:h};Object.assign(e,m),Object.assign(t,m)}}catch{}}function Bet(e,t,n){let i=Zs(e.data),o=VE(i,0),r=[],s=[];n?((o&1)==1&&(r.push(zE),s.push(Pk)),(o&2)==2&&(r.push(SD),s.push(She)),(o&4)==4&&(r.push(AD),s.push(Ahe))):e.data.length>=5&&(r.push(zE),s.push(Pk));let a=1;r.forEach((l,u)=>{if(e.data.length>=a+4){let f=Zr(i,a);t[l]=e[l]=new Date(f*1e3);let h=s[u];e[h]=f}a+=4})}async function ket(e,t,n,i,o){let r=new Uint8Array(4),s=Zs(r);zet(s,0,t);let a=i+o;return await l(i)||await l(Math.min(a,n));async function l(u){let f=n-u,h=await ma(e,f,u);for(let m=h.length-i;m>=0;m--)if(h[m]==r[0]&&h[m+1]==r[1]&&h[m+2]==r[2]&&h[m+3]==r[3])return{offset:f+m,buffer:h.slice(m,m+i).buffer}}}function vc(e,t,n){return t[n]===xi?e.options[n]:t[n]}function Uet(e){let t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function J6(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function VE(e,t){return e.getUint8(t)}function $s(e,t){return e.getUint16(t,!0)}function Zr(e,t){return e.getUint32(t,!0)}function Mk(e,t){return Number(e.getBigUint64(t,!0))}function zet(e,t,n){e.setUint32(t,n,!0)}function Zs(e){return new DataView(e.buffer)}var jet="File already exists",Wet="Zip file comment exceeds 64KB",qet="File entry comment exceeds 64KB",Yet="File entry name exceeds 64KB",Fhe="Version exceeds 65535",Xet="The strength must equal 1, 2, or 3",Ket="Extra field type exceeds 65535",$et="Extra field data exceeds 64KB",mq="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Zet="Undefined uncompressed size",Bhe=new Uint8Array([7,0,2,0,65,69,3,0,0]),dq=0,khe=[],Hk=class{constructor(t,n={}){t=Ik(t);let i=t.availableSize!==xi&&t.availableSize>0&&t.availableSize!==1/0&&t.maxSize!==xi&&t.maxSize>0&&t.maxSize!==1/0;Object.assign(this,{writer:t,addSplitZipSignature:i,options:n,config:pD(),files:new Map,filenames:new Set,offset:n.offset===xi?t.writable.size:n.offset,pendingEntriesSize:0,pendingAddFileCalls:new Set,bufferedWrites:0})}async add(t="",n,i={}){let o=this,{pendingAddFileCalls:r,config:s}=o;dq<s.maxWorkers?dq++:await new Promise(l=>khe.push(l));let a;try{if(t=t.trim(),o.filenames.has(t))throw new Error(jet);return o.filenames.add(t),a=Jet(o,t,n,i),r.add(a),await a}catch(l){throw o.filenames.delete(t),l}finally{r.delete(a);let l=khe.shift();l?l():dq--}}async close(t=new Uint8Array,n={}){let i=this,{pendingAddFileCalls:o,writer:r}=this,{writable:s}=r;for(;o.size;)await Promise.allSettled(Array.from(o));return await att(this,t,n),io(i,n,"preventClose")||await s.getWriter().close(),r.getData?r.getData():s}};async function Jet(e,t,n,i){t=t.trim(),i.directory&&!t.endsWith(ME)?t+=ME:i.directory=t.endsWith(ME);let o=io(e,i,"encodeText",NE),r=o(t);if(r===xi&&(r=NE(t)),Ui(r)>65535)throw new Error(Yet);let s=i.comment||"",a=o(s);if(a===xi&&(a=NE(s)),Ui(a)>65535)throw new Error(qet);let l=io(e,i,X6,20);if(l>65535)throw new Error(Fhe);let u=io(e,i,K6,20);if(u>65535)throw new Error(Fhe);let f=io(e,i,zE,new Date),h=io(e,i,SD),m=io(e,i,AD),p=io(e,i,q6,!0),_=io(e,i,j6,0),b=io(e,i,W6,0),x=io(e,i,"passThrough"),T,E;x||(T=io(e,i,"password"),E=io(e,i,"rawPassword"));let S=io(e,i,"encryptionStrength",3),A=io(e,i,$6),v=io(e,i,"extendedTimestamp",!0),D=io(e,i,"keepOrder",!0),R=io(e,i,"level"),P=io(e,i,"useWebWorkers"),L=io(e,i,"bufferedWrite"),F=io(e,i,"dataDescriptorSignature",!1),y=io(e,i,"signal"),I=io(e,i,"useUnicodeFileNames",!0),M=io(e,i,"useCompressionStream"),B=io(e,i,"compressionMethod"),U=io(e,i,"dataDescriptor",!0),V=io(e,i,Rk);if(!A&&(T!==xi||E!==xi)&&!(S>=1&&S<=3))throw new Error(Xet);let W=new Uint8Array,{extraField:H}=i;if(H){let rn=0,Vt=0;H.forEach(Ae=>rn+=4+Ui(Ae)),W=new Uint8Array(rn),H.forEach((Ae,Qe)=>{if(Qe>65535)throw new Error(Ket);if(Ui(Ae)>65535)throw new Error($et);us(W,new Uint16Array([Qe]),Vt),us(W,new Uint16Array([Ui(Ae)]),Vt+2),us(W,Ae,Vt+4),Vt+=4+Ui(Ae)})}let X=0,$=0,ae=0;if(x&&({uncompressedSize:ae}=i,ae===xi))throw new Error(Zet);let se=V===!0;n&&(n=Dk(n),await Jh(n),x?X=Uhe(ae):n.size===xi?(U=!0,(V||V===xi)&&(V=!0,ae=X=4294967296)):(ae=n.size,X=Uhe(ae)));let{diskOffset:he,diskNumber:ge,maxSize:le}=e.writer,me=se||ae>4294967295,Me=se||X>4294967295,Ge=se||e.offset+e.pendingEntriesSize-he>4294967295,ke=io(e,i,"supportZip64SplitFile",!0)&&se||ge+Math.ceil(e.pendingEntriesSize/le)>65535;if(Ge||me||Me||ke){if(V===!1||!D)throw new Error(mq);V=!0}V=V||!1;let He=io(e,i,Y6),{signature:ft}=i;i=Object.assign({},i,{rawFilename:r,rawComment:a,version:l,versionMadeBy:u,lastModDate:f,lastAccessDate:h,creationDate:m,rawExtraField:W,zip64:V,zip64UncompressedSize:me,zip64CompressedSize:Me,zip64Offset:Ge,zip64DiskNumberStart:ke,password:T,rawPassword:E,level:!M&&e.config.CompressionStream===xi&&e.config.CompressionStreamNative===xi?0:R,useWebWorkers:P,encryptionStrength:S,extendedTimestamp:v,zipCrypto:A,bufferedWrite:L,keepOrder:D,useUnicodeFileNames:I,dataDescriptor:U,dataDescriptorSignature:F,signal:y,msDosCompatible:p,internalFileAttribute:_,externalFileAttribute:b,useCompressionStream:M,passThrough:x,encrypted:!!(T&&Ui(T)||E&&Ui(E))||x&&He,signature:ft,compressionMethod:B});let Ie=ttt(i),Kt=itt(i),Pt=Ui(Ie.localHeaderArray,Kt.dataDescriptorArray);$=Pt+X,e.options.usdz&&($+=$+64),e.pendingEntriesSize+=$;let dt;try{dt=await Qet(e,t,n,{headerInfo:Ie,dataDescriptorInfo:Kt,metadataSize:Pt},i)}finally{e.pendingEntriesSize-=$}return Object.assign(dt,{name:t,comment:s,extraField:H}),new ly(dt)}async function Qet(e,t,n,i,o){let{files:r,writer:s}=e,{keepOrder:a,dataDescriptor:l,signal:u}=o,{headerInfo:f}=i,{usdz:h}=e.options,m=Array.from(r.values()).pop(),p={},_,b,x,T,E,S,A;r.set(t,p);try{let P;a&&(P=m&&m.lock,v()),(o.bufferedWrite||e.writerLocked||e.bufferedWrites&&a||!l)&&!h?(S=new TransformStream,A=new Response(S.readable).blob(),S.writable.size=0,_=!0,e.bufferedWrites++,await Jh(s)):(S=s,await D()),await Jh(S);let{writable:L}=s,{diskOffset:F}=s;if(e.addSplitZipSignature){delete e.addSplitZipSignature;let I=new Uint8Array(4),M=pa(I);ki(M,0,134695760),await Qh(L,I),e.offset+=4}h&&ntt(i,e.offset-F),_||(await P,await R(L));let{diskNumber:y}=s;if(E=!0,p.diskNumberStart=y,p=await ett(n,S,p,i,e.config,o),E=!1,r.set(t,p),p.filename=t,_){await S.writable.getWriter().close();let I=await A;await P,await D(),T=!0,l||(I=await rtt(p,I,L,o)),await R(L),p.diskNumberStart=s.diskNumber,F=s.diskOffset,await I.stream().pipeTo(L,{preventClose:!0,preventAbort:!0,signal:u}),L.size+=I.size,T=!1}if(p.offset=e.offset-F,p.zip64)stt(p,o);else if(p.offset>4294967295)throw new Error(mq);return e.offset+=p.size,p}catch(P){if(_&&T||!_&&E){if(e.hasCorruptedEntries=!0,P)try{P.corruptedEntry=!0}catch{}_?e.offset+=S.writable.size:e.offset=S.writable.size}throw r.delete(t),P}finally{_&&e.bufferedWrites--,x&&x(),b&&b()}function v(){p.lock=new Promise(P=>x=P)}async function D(){e.writerLocked=!0;let{lockWriter:P}=e;e.lockWriter=new Promise(L=>b=()=>{e.writerLocked=!1,L()}),await P}async function R(P){Ui(f.localHeaderArray)>s.availableSize&&(s.availableSize=0,await Qh(P,new Uint8Array))}}async function ett(e,t,{diskNumberStart:n,lock:i},o,r,s){let{headerInfo:a,dataDescriptorInfo:l,metadataSize:u}=o,{localHeaderArray:f,headerArray:h,lastModDate:m,rawLastModDate:p,encrypted:_,compressed:b,version:x,compressionMethod:T,rawExtraFieldExtendedTimestamp:E,extraFieldExtendedTimestampFlag:S,rawExtraFieldNTFS:A,rawExtraFieldAES:v}=a,{dataDescriptorArray:D}=l,{rawFilename:R,lastAccessDate:P,creationDate:L,password:F,rawPassword:y,level:I,zip64:M,zip64UncompressedSize:B,zip64CompressedSize:U,zip64Offset:V,zip64DiskNumberStart:W,zipCrypto:H,dataDescriptor:X,directory:$,versionMadeBy:ae,rawComment:se,rawExtraField:he,useWebWorkers:ge,onstart:le,onprogress:me,onend:Me,signal:Ge,encryptionStrength:De,extendedTimestamp:ke,msDosCompatible:He,internalFileAttribute:ft,externalFileAttribute:Ie,useCompressionStream:Kt,passThrough:Pt}=s,dt={lock:i,versionMadeBy:ae,zip64:M,directory:!!$,filenameUTF8:!0,rawFilename:R,commentUTF8:!0,rawComment:se,rawExtraFieldExtendedTimestamp:E,rawExtraFieldNTFS:A,rawExtraFieldAES:v,rawExtraField:he,extendedTimestamp:ke,msDosCompatible:He,internalFileAttribute:ft,externalFileAttribute:Ie,diskNumberStart:n},{signature:rn,uncompressedSize:Vt}=s,Ae=0;Pt||(Vt=0);let{writable:Qe}=t;if(e){e.chunkSize=ck(r),await Qh(Qe,f);let at=e.readable,$t=at.size=e.size,pe={options:{codecType:bk,level:I,rawPassword:y,password:F,encryptionStrength:De,zipCrypto:_&&H,passwordVerification:_&&H&&p>>8&255,signed:!Pt,compressed:b&&!Pt,encrypted:_&&!Pt,useWebWorkers:ge,useCompressionStream:Kt,transferStreams:!1},config:r,streamOptions:{signal:Ge,size:$t,onstart:le,onprogress:me,onend:Me}},_e=await Ck({readable:at,writable:Qe},pe);Ae=_e.outputSize,Pt||(Vt=_e.inputSize,rn=_e.signature),Qe.size+=Vt}else await Qh(Qe,f);let et;if(M){let at=4;B&&(at+=8),U&&(at+=8),V&&(at+=8),W&&(at+=4),et=new Uint8Array(at)}else et=new Uint8Array;return ott({signature:rn,rawExtraFieldZip64:et,compressedSize:Ae,uncompressedSize:Vt,headerInfo:a,dataDescriptorInfo:l},s),X&&await Qh(Qe,D),Object.assign(dt,{uncompressedSize:Vt,compressedSize:Ae,lastModDate:m,rawLastModDate:p,creationDate:L,lastAccessDate:P,encrypted:_,zipCrypto:H,size:u+Ae,compressionMethod:T,version:x,headerArray:h,signature:rn,rawExtraFieldZip64:et,extraFieldExtendedTimestampFlag:S,zip64UncompressedSize:B,zip64CompressedSize:U,zip64Offset:V,zip64DiskNumberStart:W}),dt}function ttt(e){let{rawFilename:t,lastModDate:n,lastAccessDate:i,creationDate:o,level:r,zip64:s,zipCrypto:a,useUnicodeFileNames:l,dataDescriptor:u,directory:f,rawExtraField:h,encryptionStrength:m,extendedTimestamp:p,encrypted:_}=e,b=r!==0&&!f,{version:x,compressionMethod:T}=e,E;if(_&&!a){E=new Uint8Array(Ui(Bhe)+2);let V=pa(E);Xi(V,0,39169),us(E,Bhe,2),Gk(V,8,m)}else E=new Uint8Array;let S,A,v;if(p){A=new Uint8Array(9+(i?4:0)+(o?4:0));let V=pa(A);Xi(V,0,21589),Xi(V,2,Ui(A)-4),v=1+(i?2:0)+(o?4:0),Gk(V,4,v);let W=5;ki(V,W,Math.floor(n.getTime()/1e3)),W+=4,i&&(ki(V,W,Math.floor(i.getTime()/1e3)),W+=4),o&&ki(V,W,Math.floor(o.getTime()/1e3));try{S=new Uint8Array(36);let H=pa(S),X=hq(n);Xi(H,0,10),Xi(H,2,32),Xi(H,8,1),Xi(H,10,24),dl(H,12,X),dl(H,20,hq(i)||X),dl(H,28,hq(o)||X)}catch{S=new Uint8Array}}else S=A=new Uint8Array;let D=0;l&&(D=D|2048),u&&(D=D|8),T===xi&&(T=b?8:0),b&&(r>=1&&r<3&&(D=D|6),r>=3&&r<5&&(D=D|1),r===9&&(D=D|2)),s&&(x=x>45?x:45),_&&(D=D|1,a||(x=x>51?x:51,E[9]=T,T=99));let R=new Uint8Array(26),P=pa(R);Xi(P,0,x),Xi(P,2,D),Xi(P,4,T);let L=new Uint32Array(1),F=pa(L),y;n<E6?y=E6:n>C6?y=C6:y=n,Xi(F,0,(y.getHours()<<6|y.getMinutes())<<5|y.getSeconds()/2),Xi(F,2,(y.getFullYear()-1980<<4|y.getMonth()+1)<<5|y.getDate());let I=L[0];ki(P,6,I),Xi(P,22,Ui(t));let M=Ui(E,A,S,h);Xi(P,24,M);let B=new Uint8Array(30+Ui(t)+M),U=pa(B);return ki(U,0,67324752),us(B,R,4),us(B,t,30),us(B,E,30+Ui(t)),us(B,A,30+Ui(t,E)),us(B,S,30+Ui(t,E,A)),us(B,h,30+Ui(t,E,A,S)),{localHeaderArray:B,headerArray:R,headerView:P,lastModDate:n,rawLastModDate:I,encrypted:_,compressed:b,version:x,compressionMethod:T,extraFieldExtendedTimestampFlag:v,rawExtraFieldExtendedTimestamp:A,rawExtraFieldNTFS:S,rawExtraFieldAES:E,extraFieldLength:M}}function ntt(e,t){let{headerInfo:n}=e,{localHeaderArray:i,extraFieldLength:o}=n,r=pa(i),s=64-(t+Ui(i))%64;s<4&&(s+=64);let a=new Uint8Array(s),l=pa(a);Xi(l,0,6534),Xi(l,2,s-2);let u=i;n.localHeaderArray=i=new Uint8Array(Ui(u)+s),us(i,u),us(i,a,Ui(u)),r=pa(i),Xi(r,28,o+s),e.metadataSize+=s}function itt(e){let{zip64:t,dataDescriptor:n,dataDescriptorSignature:i}=e,o=new Uint8Array,r,s=0;return n&&(o=new Uint8Array(t?i?24:20:i?16:12),r=pa(o),i&&(s=4,ki(r,0,134695760))),{dataDescriptorArray:o,dataDescriptorView:r,dataDescriptorOffset:s}}function ott(e,t){let{signature:n,rawExtraFieldZip64:i,compressedSize:o,uncompressedSize:r,headerInfo:s,dataDescriptorInfo:a}=e,{headerView:l,encrypted:u}=s,{dataDescriptorView:f,dataDescriptorOffset:h}=a,{zip64:m,zip64UncompressedSize:p,zip64CompressedSize:_,zipCrypto:b,dataDescriptor:x}=t;if((!u||b)&&n!==xi&&(ki(l,10,n),x&&ki(f,h,n)),m){let T=pa(i);Xi(T,0,1),Xi(T,2,Ui(i)-4);let E=4;p&&(ki(l,18,4294967295),dl(T,E,BigInt(r)),E+=8),_&&(ki(l,14,4294967295),dl(T,E,BigInt(o))),x&&(dl(f,h+4,BigInt(o)),dl(f,h+12,BigInt(r)))}else ki(l,14,o),ki(l,18,r),x&&(ki(f,h+4,o),ki(f,h+8,r))}async function rtt(e,t,n,{zipCrypto:i}){let o;o=await t.slice(0,26).arrayBuffer(),o.byteLength!=26&&(o=o.slice(0,26));let r=new DataView(o);return(!e.encrypted||i)&&ki(r,14,e.signature),e.zip64?(ki(r,18,4294967295),ki(r,22,4294967295)):(ki(r,18,e.compressedSize),ki(r,22,e.uncompressedSize)),await Qh(n,new Uint8Array(o)),t.slice(o.byteLength)}function stt(e,t){let{rawExtraFieldZip64:n,offset:i,diskNumberStart:o}=e,{zip64UncompressedSize:r,zip64CompressedSize:s,zip64Offset:a,zip64DiskNumberStart:l}=t,u=pa(n),f=4;r&&(f+=8),s&&(f+=8),a&&(dl(u,f,BigInt(i)),f+=8),l&&ki(u,f,o)}async function att(e,t,n){let{files:i,writer:o}=e,{diskOffset:r,writable:s}=o,{diskNumber:a}=o,l=0,u=0,f=e.offset-r,h=i.size;for(let[,v]of i){let{rawFilename:D,rawExtraFieldZip64:R,rawExtraFieldAES:P,rawComment:L,rawExtraFieldNTFS:F,rawExtraField:y,extendedTimestamp:I,extraFieldExtendedTimestampFlag:M,lastModDate:B}=v,U;if(I){U=new Uint8Array(9);let V=pa(U);Xi(V,0,21589),Xi(V,2,5),Gk(V,4,M),ki(V,5,Math.floor(B.getTime()/1e3))}else U=new Uint8Array;v.rawExtraFieldCDExtendedTimestamp=U,u+=46+Ui(D,L,R,P,F,U,y)}let m=new Uint8Array(u),p=pa(m);await Jh(o);let _=0;for(let[v,D]of Array.from(i.values()).entries()){let{offset:R,rawFilename:P,rawExtraFieldZip64:L,rawExtraFieldAES:F,rawExtraFieldCDExtendedTimestamp:y,rawExtraFieldNTFS:I,rawExtraField:M,rawComment:B,versionMadeBy:U,headerArray:V,directory:W,zip64:H,zip64UncompressedSize:X,zip64CompressedSize:$,zip64DiskNumberStart:ae,zip64Offset:se,msDosCompatible:he,internalFileAttribute:ge,externalFileAttribute:le,diskNumberStart:me,uncompressedSize:Me,compressedSize:Ge}=D,De=Ui(L,F,y,I,M);ki(p,l,33639248),Xi(p,l+4,U);let ke=pa(V);X||ki(ke,18,Me),$||ki(ke,14,Ge),us(m,V,l+6),Xi(p,l+30,De),Xi(p,l+32,Ui(B)),Xi(p,l+34,H&&ae?65535:me),Xi(p,l+36,ge),le?ki(p,l+38,le):W&&he&&Gk(p,l+38,16),ki(p,l+42,H&&se?4294967295:R),us(m,P,l+46),us(m,L,l+46+Ui(P)),us(m,F,l+46+Ui(P,L)),us(m,y,l+46+Ui(P,L,F)),us(m,I,l+46+Ui(P,L,F,y)),us(m,M,l+46+Ui(P,L,F,y,I)),us(m,B,l+46+Ui(P)+De);let He=46+Ui(P,B)+De;if(l-_>o.availableSize&&(o.availableSize=0,await Qh(s,m.slice(_,l)),_=l),l+=He,n.onprogress)try{await n.onprogress(v+1,i.size,new ly(D))}catch{}}await Qh(s,_?m.slice(_):m);let b=o.diskNumber,{availableSize:x}=o;x<22&&b++;let T=io(e,n,Rk);if(f>4294967295||u>4294967295||h>65535||b>65535){if(T===!1)throw new Error(mq);T=!0}let E=new Uint8Array(T?98:22),S=pa(E);l=0,T&&(ki(S,0,101075792),dl(S,4,BigInt(44)),Xi(S,12,45),Xi(S,14,45),ki(S,16,b),ki(S,20,a),dl(S,24,BigInt(h)),dl(S,32,BigInt(h)),dl(S,40,BigInt(u)),dl(S,48,BigInt(f)),ki(S,56,117853008),dl(S,64,BigInt(f)+BigInt(u)),ki(S,72,b+1),io(e,n,"supportZip64SplitFile",!0)&&(b=65535,a=65535),h=65535,f=4294967295,u=4294967295,l+=76),ki(S,l,101010256),Xi(S,l+4,b),Xi(S,l+6,a),Xi(S,l+8,h),Xi(S,l+10,h),ki(S,l+12,u),ki(S,l+16,f);let A=Ui(t);if(A)if(A<=65535)Xi(S,l+20,A);else throw new Error(Wet);await Qh(s,E),A&&await Qh(s,t)}async function Qh(e,t){let n=e.getWriter();try{await n.ready,e.size+=Ui(t),await n.write(t)}finally{n.releaseLock()}}function hq(e){if(e)return(BigInt(e.getTime())+BigInt(116444736e5))*BigInt(1e4)}function io(e,t,n,i){let o=t[n]===xi?e.options[n]:t[n];return o===xi?i:o}function Uhe(e){return e+5*(Math.floor(e/16383)+1)}function Gk(e,t,n){e.setUint8(t,n)}function Xi(e,t,n){e.setUint16(t,n,!0)}function ki(e,t,n){e.setUint32(t,n,!0)}function dl(e,t,n){e.setBigUint64(t,n,!0)}function us(e,t,n){e.set(t,n)}function pa(e){return new DataView(e.buffer)}function Ui(...e){let t=0;return e.forEach(n=>n&&(t+=n.length)),t}LE({Deflate:Ede,Inflate:Wde});function ctt(e){if(typeof e=="string"){let t=document.getElementById(e);if(t===null)throw new w(`Element with id "${e}" does not exist in the document.`);e=t}return e}var em=ctt;function ltt(e,t){this.position=e,this.headingPitchRange=t}var jk=ltt;function Wk(e,t){this.id=t,this.name=e,this.playlistIndex=0,this.playlist=[],this.tourStart=new fe,this.tourEnd=new fe,this.entryStart=new fe,this.entryEnd=new fe,this._activeEntries=[]}Wk.prototype.addPlaylistEntry=function(e){this.playlist.push(e)};Wk.prototype.play=function(e,t){this.tourStart.raiseEvent();let n=this;Hhe.call(this,e,t,function(i){n.playlistIndex=0,i||Vhe(n._activeEntries),n.tourEnd.raiseEvent(i)})};Wk.prototype.stop=function(){Vhe(this._activeEntries)};function Vhe(e){for(let t=e.pop();t!==void 0;t=e.pop())t.stop()}function Hhe(e,t,n){let i=this.playlist[this.playlistIndex];if(i){let o=utt.bind(this,e,t,n);if(this._activeEntries.push(i),this.entryStart.raiseEvent(i),i.blocking)i.play(o,e.scene.camera,t);else{let r=this;i.play(function(){r.entryEnd.raiseEvent(i);let s=r._activeEntries.indexOf(i);s>=0&&r._activeEntries.splice(s,1)}),o(e,t,n)}}else c(n)&&n(!1)}function utt(e,t,n,i){let o=this.playlist[this.playlistIndex];if(this.entryEnd.raiseEvent(o,i),i)n(i);else{let r=this._activeEntries.indexOf(o);r>=0&&this._activeEntries.splice(r,1),this.playlistIndex++,Hhe.call(this,e,t,n)}}var qk=Wk;var Ti=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var t=1.70158;return e===1?1:e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return e===0?0:--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Ti.Bounce.Out(1-e)},Out:function(e){return e<.36363636363636365?7.5625*e*e:e<.7272727272727273?7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?7.5625*(e-=.8181818181818182)*e+.9375:7.5625*(e-=.9545454545454546)*e+.984375},InOut:function(e){return e<.5?Ti.Bounce.In(e*2)*.5:Ti.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(t){return Math.pow(t,e)},Out:function(t){return 1-Math.pow(1-t,e)},InOut:function(t){return t<.5?Math.pow(t*2,e)/2:(1-Math.pow(2-t*2,e))/2+.5}}}}),ID=function(){return performance.now()},ftt=function(){function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,t)}return e.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(n){return t._tweens[n]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];for(var o=0,r=n;o<r.length;o++){var s=r[o];(t=s._group)===null||t===void 0||t.remove(s),s._group=this,this._tweens[s.getId()]=s,this._tweensAddedDuringUpdate[s.getId()]=s}},e.prototype.remove=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i=0,o=t;i<o.length;i++){var r=o[i];r._group=void 0,delete this._tweens[r.getId()],delete this._tweensAddedDuringUpdate[r.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(t){return!t.isPlaying()})},e.prototype.update=function(t,n){t===void 0&&(t=ID()),n===void 0&&(n=!0);var i=Object.keys(this._tweens);if(i.length!==0)for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<i.length;o++){var r=this._tweens[i[o]],s=!n;r&&r.update(t,s)===!1&&!n&&this.remove(r)}i=Object.keys(this._tweensAddedDuringUpdate)}},e}(),HE={Linear:function(e,t){var n=e.length-1,i=n*t,o=Math.floor(i),r=HE.Utils.Linear;return t<0?r(e[0],e[1],i):t>1?r(e[n],e[n-1],n-i):r(e[o],e[o+1>n?n:o+1],i-o)},Bezier:function(e,t){for(var n=0,i=e.length-1,o=Math.pow,r=HE.Utils.Bernstein,s=0;s<=i;s++)n+=o(1-t,i-s)*o(t,s)*e[s]*r(i,s);return n},CatmullRom:function(e,t){var n=e.length-1,i=n*t,o=Math.floor(i),r=HE.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(o=Math.floor(i=n*(1+t))),r(e[(o-1+n)%n],e[o],e[(o+1)%n],e[(o+2)%n],i-o)):t<0?e[0]-(r(e[0],e[0],e[1],e[1],-i)-e[0]):t>1?e[n]-(r(e[n],e[n],e[n-1],e[n-1],i-n)-e[n]):r(e[o?o-1:0],e[o],e[n<o+1?n:o+1],e[n<o+2?n:o+2],i-o)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=HE.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:function(){var e=[1];return function(t){var n=1;if(e[t])return e[t];for(var i=t;i>1;i--)n*=i;return e[t]=n,n}}(),CatmullRom:function(e,t,n,i,o){var r=(n-e)*.5,s=(i-t)*.5,a=o*o,l=o*a;return(2*t-2*n+r+s)*l+(-3*t+3*n-2*r-s)*a+r*o+t}}},Ghe=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),pq=new ftt,jhe=function(){function e(t,n){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Ti.Linear.None,this._interpolationFunction=HE.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Ghe.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=t,typeof n=="object"?(this._group=n,n.add(this)):n===!0&&(this._group=pq,pq.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(t,n){if(n===void 0&&(n=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},e.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},e.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},e.prototype.start=function(t,n){if(t===void 0&&(t=ID()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var r in this._valuesEnd)o[r]=this._valuesEnd[r];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},e.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},e.prototype._setupProperties=function(t,n,i,o,r){for(var s in i){var a=t[s],l=Array.isArray(a),u=l?"array":typeof a,f=!l&&Array.isArray(i[s]);if(!(u==="undefined"||u==="function")){if(f){var h=i[s];if(h.length===0)continue;for(var m=[a],p=0,_=h.length;p<_;p+=1){var b=this._handleRelativeValue(a,h[p]);if(isNaN(b)){f=!1,console.warn("Found invalid interpolation list. Skipping.");break}m.push(b)}f&&(i[s]=m)}if((u==="object"||l)&&a&&!f){n[s]=l?[]:{};var x=a;for(var T in x)n[s][T]=x[T];o[s]=l?[]:{};var h=i[s];if(!this._isDynamic){var E={};for(var T in h)E[T]=h[T];i[s]=h=E}this._setupProperties(x,n[s],h,o[s],r)}else(typeof n[s]=="undefined"||r)&&(n[s]=a),l||(n[s]*=1),f?o[s]=i[s].slice().reverse():o[s]=n[s]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(t){return t===void 0&&(t=ID()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},e.prototype.resume=function(t){return t===void 0&&(t=ID()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var t=0,n=this._chainedTweens.length;t<n;t++)this._chainedTweens[t].stop();return this},e.prototype.group=function(t){return t?(t.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var t;return(t=this._group)===null||t===void 0||t.remove(this),this},e.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},e.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},e.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},e.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},e.prototype.easing=function(t){return t===void 0&&(t=Ti.Linear.None),this._easingFunction=t,this},e.prototype.interpolation=function(t){return t===void 0&&(t=HE.Linear),this._interpolationFunction=t,this},e.prototype.chain=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this._chainedTweens=t,this},e.prototype.onStart=function(t){return this._onStartCallback=t,this},e.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},e.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},e.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},e.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},e.prototype.onStop=function(t){return this._onStopCallback=t,this},e.prototype.update=function(t,n){var i=this,o;if(t===void 0&&(t=ID()),n===void 0&&(n=e.autoStartOnUpdate),this._isPaused)return!0;var r;if(!this._goToEnd&&!this._isPlaying)if(n)this.start(t,!0);else return!1;if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var s=t-this._startTime,a=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),l=this._duration+this._repeat*a,u=function(){if(i._duration===0||s>l)return 1;var b=Math.trunc(s/a),x=s-b*a,T=Math.min(x/i._duration,1);return T===0&&s===i._duration?1:T},f=u(),h=this._easingFunction(f);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,h),this._onUpdateCallback&&this._onUpdateCallback(this._object,f),this._duration===0||s>=this._duration)if(this._repeat>0){var m=Math.min(Math.trunc((s-this._duration)/a)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=m);for(r in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[r]=="string"&&(this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(this._valuesEnd[r])),this._yoyo&&this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=a*m,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var p=0,_=this._chainedTweens.length;p<_;p++)this._chainedTweens[p].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(t,n,i,o){for(var r in i)if(n[r]!==void 0){var s=n[r]||0,a=i[r],l=Array.isArray(t[r]),u=Array.isArray(a),f=!l&&u;f?t[r]=this._interpolationFunction(a,o):typeof a=="object"&&a?this._updateProperties(t[r],s,a,o):(a=this._handleRelativeValue(s,a),typeof a=="number"&&(t[r]=s+(a-s)*o))}},e.prototype._handleRelativeValue=function(t,n){return typeof n!="string"?n:n.charAt(0)==="+"||n.charAt(0)==="-"?t+parseFloat(n):parseFloat(n)},e.prototype._swapEndStartRepeatValues=function(t){var n=this._valuesStartRepeat[t],i=this._valuesEnd[t];typeof i=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(i):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=n},e.autoStartOnUpdate=!1,e}();var Vri=Ghe.nextId,tm=pq,Hri=tm.getAll.bind(tm),Gri=tm.removeAll.bind(tm),jri=tm.add.bind(tm),Wri=tm.remove.bind(tm),qri=tm.update.bind(tm);var dtt={LINEAR_NONE:Ti.Linear.None,QUADRATIC_IN:Ti.Quadratic.In,QUADRATIC_OUT:Ti.Quadratic.Out,QUADRATIC_IN_OUT:Ti.Quadratic.InOut,CUBIC_IN:Ti.Cubic.In,CUBIC_OUT:Ti.Cubic.Out,CUBIC_IN_OUT:Ti.Cubic.InOut,QUARTIC_IN:Ti.Quartic.In,QUARTIC_OUT:Ti.Quartic.Out,QUARTIC_IN_OUT:Ti.Quartic.InOut,QUINTIC_IN:Ti.Quintic.In,QUINTIC_OUT:Ti.Quintic.Out,QUINTIC_IN_OUT:Ti.Quintic.InOut,SINUSOIDAL_IN:Ti.Sinusoidal.In,SINUSOIDAL_OUT:Ti.Sinusoidal.Out,SINUSOIDAL_IN_OUT:Ti.Sinusoidal.InOut,EXPONENTIAL_IN:Ti.Exponential.In,EXPONENTIAL_OUT:Ti.Exponential.Out,EXPONENTIAL_IN_OUT:Ti.Exponential.InOut,CIRCULAR_IN:Ti.Circular.In,CIRCULAR_OUT:Ti.Circular.Out,CIRCULAR_IN_OUT:Ti.Circular.InOut,ELASTIC_IN:Ti.Elastic.In,ELASTIC_OUT:Ti.Elastic.Out,ELASTIC_IN_OUT:Ti.Elastic.InOut,BACK_IN:Ti.Back.In,BACK_OUT:Ti.Back.Out,BACK_IN_OUT:Ti.Back.InOut,BOUNCE_IN:Ti.Bounce.In,BOUNCE_OUT:Ti.Bounce.Out,BOUNCE_IN_OUT:Ti.Bounce.InOut},Ps=Object.freeze(dtt);function Yk(e,t,n){this.type="KmlTourFlyTo",this.blocking=!0,this.activeCamera=null,this.activeCallback=null,this.duration=e,this.view=n,this.flyToMode=t}Yk.prototype.play=function(e,t,n){if(this.activeCamera=t,c(e)&&e!==null){let o=this;this.activeCallback=function(r){delete o.activeCallback,delete o.activeCamera,e(c(r)?!1:r)}}let i=this.getCameraOptions(n);if(this.view.headingPitchRoll)t.flyTo(i);else if(this.view.headingPitchRange){let o=new ne(this.view.position);t.flyToBoundingSphere(o,i)}};Yk.prototype.stop=function(){c(this.activeCamera)&&this.activeCamera.cancelFlight(),c(this.activeCallback)&&this.activeCallback(!0)};Yk.prototype.getCameraOptions=function(e){let t={duration:this.duration};return c(this.activeCallback)&&(t.complete=this.activeCallback),this.flyToMode==="smooth"&&(t.easingFunction=Ps.LINEAR_NONE),this.view.headingPitchRoll?(t.destination=this.view.position,t.orientation=this.view.headingPitchRoll):this.view.headingPitchRange&&(t.offset=this.view.headingPitchRange),c(e)&&(t=bt(t,e)),t};var Xk=Yk;function _q(e){this.type="KmlTourWait",this.blocking=!0,this.duration=e,this.timeout=null}_q.prototype.play=function(e){let t=this;this.activeCallback=e,this.timeout=setTimeout(function(){delete t.activeCallback,e(!1)},this.duration*1e3)};_q.prototype.stop=function(){clearTimeout(this.timeout),c(this.activeCallback)&&this.activeCallback(!0)};var Kk=_q;var eme={avi:"video/x-msvideo",bmp:"image/bmp",bz2:"application/x-bzip2",chm:"application/vnd.ms-htmlhelp",css:"text/css",csv:"text/csv",doc:"application/msword",dvi:"application/x-dvi",eps:"application/postscript",flv:"video/x-flv",gif:"image/gif",gz:"application/x-gzip",htm:"text/html",html:"text/html",ico:"image/vnd.microsoft.icon",jnlp:"application/x-java-jnlp-file",jpeg:"image/jpeg",jpg:"image/jpeg",m3u:"audio/x-mpegurl",m4v:"video/mp4",mathml:"application/mathml+xml",mid:"audio/midi",midi:"audio/midi",mov:"video/quicktime",mp3:"audio/mpeg",mp4:"video/mp4",mp4v:"video/mp4",mpeg:"video/mpeg",mpg:"video/mpeg",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",ogg:"application/ogg",pdf:"application/pdf",png:"image/png",pps:"application/vnd.ms-powerpoint",ppt:"application/vnd.ms-powerpoint",ps:"application/postscript",qt:"video/quicktime",rdf:"application/rdf+xml",rss:"application/rss+xml",rtf:"application/rtf",svg:"image/svg+xml",swf:"application/x-shockwave-flash",text:"text/plain",tif:"image/tiff",tiff:"image/tiff",txt:"text/plain",wav:"audio/x-wav",wma:"audio/x-ms-wma",wmv:"video/x-ms-wmv",xml:"application/xml",zip:"application/zip",detectFromFilename:function(e){let t=e.toLowerCase();return t=Ax(t),eme[t]}},Eq;typeof DOMParser!="undefined"&&(Eq=new DOMParser);var htt=new Y3({stripPrefix:!1,email:!1,replaceFn:function(e){return e.urlMatchType==="scheme"||e.urlMatchType==="www"}}),uy=32,Whe=2414016,qhe=1,Yhe=16093e3,Xhe=.1,Khe=[null,void 0,"http://www.opengis.net/kml/2.2","http://earth.google.com/kml/2.2","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.0"],$he=["http://www.google.com/kml/ext/2.2"],mtt=["http://www.w3.org/2005/Atom"],we={kml:Khe,gx:$he,atom:mtt,kmlgx:Khe.concat($he)},wq={Document:ume,Folder:Mtt,Placemark:Ltt,NetworkLink:Gtt,GroundOverlay:ztt,PhotoOverlay:hme,ScreenOverlay:Utt,Tour:Ftt};function nm(e){this._dataSource=e,this._deferred=Al(),this._stack=[],this._promises=[],this._timeoutSet=!1,this._used=!1,this._started=0,this._timeThreshold=1e3}Object.defineProperties(nm.prototype,{dataSource:{get:function(){return this._dataSource}}});nm.prototype.addNodes=function(e,t){this._stack.push({nodes:e,index:0,processingData:t}),this._used=!0};nm.prototype.addPromise=function(e){this._promises.push(e)};nm.prototype.wait=function(){let e=this._deferred;return this._used||e.resolve(),Promise.all([e.promise,Promise.all(this._promises)])};nm.prototype.process=function(){let e=this._stack.length===1;return e&&(this._started=au._getTimestamp()),this._process(e)};nm.prototype._giveUpTime=function(){if(this._timeoutSet)return;this._timeoutSet=!0,this._timeThreshold=50;let e=this;setTimeout(function(){e._timeoutSet=!1,e._started=au._getTimestamp(),e._process(!0)},0)};nm.prototype._nextNode=function(){let e=this._stack,t=e[e.length-1],n=t.index,i=t.nodes;if(n!==i.length)return++t.index,i[n]};nm.prototype._pop=function(){let e=this._stack;return e.pop(),e.length===0?(this._deferred.resolve(),!1):!0};nm.prototype._process=function(e){let t=this.dataSource,n=this._stack[this._stack.length-1].processingData,i=this._nextNode();for(;c(i);){let o=wq[i.localName];if(c(o)&&(we.kml.indexOf(i.namespaceURI)!==-1||we.gx.indexOf(i.namespaceURI)!==-1)&&(o(t,i,n,this),this._timeoutSet||au._getTimestamp()>this._started+this._timeThreshold)){this._giveUpTime();return}i=this._nextNode()}this._pop()&&e&&this._process(!0)};function ptt(e){let t=e.slice(0,Math.min(4,e.size)),n=Al(),i=new FileReader;return i.addEventListener("load",function(){n.resolve(new DataView(i.result).getUint32(0,!1)===1347093252)}),i.addEventListener("error",function(){n.reject(i.error)}),i.readAsArrayBuffer(t),n.promise}function _tt(e){let t=Al(),n=new FileReader;return n.addEventListener("load",function(){t.resolve(n.result)}),n.addEventListener("error",function(){t.reject(n.error)}),n.readAsText(e),t.promise}function tme(e){let t={xsi:"http://www.w3.org/2001/XMLSchema-instance"},n,i,o,r;for(let s in t)t.hasOwnProperty(s)&&(o=RegExp(`[< ]${s}:`),r=`xmlns:${s}=`,o.test(e)&&e.indexOf(r)===-1&&(c(n)||(n=e.substr(0,e.indexOf("<kml")+4),i=e.substr(n.length)),n+=` ${r}"${t[s]}"`));return c(n)&&(e=n+i),e}function nme(e){let t=e.indexOf("xmlns:"),n=e.indexOf(">",t),i,o,r;for(;t!==-1&&t<n;)i=e.slice(t,e.indexOf('"',t)),o=t,t=e.indexOf(i,t+1),t!==-1?(r=e.indexOf('"',e.indexOf('"',t)+1),e=e.slice(0,t-1)+e.slice(r+1,e.length),t=e.indexOf("xmlns:",o-1)):t=e.indexOf("xmlns:",o+1);return e}function gtt(e,t){return Promise.resolve(e.getData(new Ak)).then(function(n){n=tme(n),n=nme(n),t.kml=Eq.parseFromString(n,"application/xml")})}function gq(e,t){let n=g(eme.detectFromFilename(e.filename),"application/octet-stream");return Promise.resolve(e.getData(new wk(n))).then(function(i){t[e.filename]=i})}function ru(e,t,n,i){let o=i.keys,r=new OD.default("."),s=e.querySelectorAll(t);for(let a=0;a<s.length;a++){let l=s[a],u=l.getAttribute(n);if(c(u)){let h=new OD.default(u).absoluteTo(r).toString(),m=o.indexOf(h);if(m!==-1){let p=o[m];l.setAttribute(n,i[p]),t==="a"&&l.getAttribute("download")===null&&l.setAttribute("download",p)}}}}function su(e,t,n,i){let o=e.querySelectorAll(t);for(let r=0;r<o.length;r++){let s=o[r],a=s.getAttribute(n),l=Sq(a,i);c(l)&&s.setAttribute(n,l.url)}}function ime(e,t,n){let i=fs(e,"id");i=c(i)&&i.length!==0?i:Bn(),c(n)&&(i=n+i);let o=t.getById(i);return c(o)&&(i=Bn(),c(n)&&(i=n+i)),o=t.add(new Ts({id:i})),c(o.kml)||(o.addProperty("kml"),o.kml=new Ytt),o}function PD(e,t){return e==="absolute"||e==="relativeToGround"||t==="relativeToSeaFloor"}function Qk(e,t){if(!c(e))return d.fromDegrees(0,0,0,t);let n=e.match(/[^\s,\n]+/g);if(!c(n))return d.fromDegrees(0,0,0,t);let i=parseFloat(n[0]),o=parseFloat(n[1]),r=parseFloat(n[2]);return i=isNaN(i)?0:i,o=isNaN(o)?0:o,r=isNaN(r)?0:r,d.fromDegrees(i,o,r,t)}function $k(e,t){if(!c(e))return;let n=e.textContent.match(/[^\s\n]+/g);if(!c(n))return;let i=n.length,o=new Array(i),r=0;for(let s=0;s<i;s++)o[r++]=Qk(n[s],t);return o}function fy(e,t){if(!c(e))return;let n=e.getAttribute(t);if(n!==null){let i=parseFloat(n);return isNaN(i)?void 0:i}}function fs(e,t){if(!c(e))return;let n=e.getAttribute(t);return n!==null?n:void 0}function Ci(e,t,n){if(!c(e))return;let i=e.childNodes,o=i.length;for(let r=0;r<o;r++){let s=i[r];if(s.localName===t&&n.indexOf(s.namespaceURI)!==-1)return s}}function Zhe(e,t,n){if(!c(e))return;let i=[],o=e.getElementsByTagNameNS("*",t),r=o.length;for(let s=0;s<r;s++){let a=o[s];a.localName===t&&n.indexOf(a.namespaceURI)!==-1&&i.push(a)}return i}function Sd(e,t,n){if(!c(e))return[];let i=[],o=e.childNodes,r=o.length;for(let s=0;s<r;s++){let a=o[s];a.localName===t&&n.indexOf(a.namespaceURI)!==-1&&i.push(a)}return i}function Wn(e,t,n){let i=Ci(e,t,n);if(c(i)){let o=parseFloat(i.textContent);return isNaN(o)?void 0:o}}function Sn(e,t,n){let i=Ci(e,t,n);if(c(i))return i.textContent.trim()}function Ad(e,t,n){let i=Ci(e,t,n);if(c(i)){let o=i.textContent.trim();return o==="1"||/^true$/i.test(o)}}function Sq(e,t,n){if(!c(e))return;let i;if(c(n)){e=e.replace(/\\/g,"/");let o=n[e];if(c(o))i=new Te({url:o});else{let r=new OD.default(t.getUrlComponent()),s=new OD.default(e);o=n[s.absoluteTo(r)],c(o)&&(i=new Te({url:o}))}}return c(i)||(i=t.getDerivedResource({url:e})),i}var hl={maximumRed:void 0,red:void 0,maximumGreen:void 0,green:void 0,maximumBlue:void 0,blue:void 0};function Tq(e,t){if(!c(e)||/^\s*$/gm.test(e))return;e[0]==="#"&&(e=e.substring(1));let n=parseInt(e.substring(0,2),16)/255,i=parseInt(e.substring(2,4),16)/255,o=parseInt(e.substring(4,6),16)/255,r=parseInt(e.substring(6,8),16)/255;return t?(r>0?(hl.maximumRed=r,hl.red=void 0):(hl.maximumRed=void 0,hl.red=0),o>0?(hl.maximumGreen=o,hl.green=void 0):(hl.maximumGreen=void 0,hl.green=0),i>0?(hl.maximumBlue=i,hl.blue=void 0):(hl.maximumBlue=void 0,hl.blue=0),hl.alpha=n,z.fromRandom(hl)):new z(r,o,i,n)}function A0(e,t,n){let i=Sn(e,t,n);if(c(i))return Tq(i,Sn(e,"colorMode",n)==="random")}function ytt(e){let t=Ci(e,"TimeStamp",we.kmlgx),n=Sn(t,"when",we.kmlgx);if(!c(t)||!c(n)||n.length===0)return;let i=K.fromIso8601(n),o=new Br;return o.addInterval(new En({start:i,stop:Ue.MAXIMUM_VALUE})),o}function btt(e){let t=Ci(e,"TimeSpan",we.kmlgx);if(!c(t))return;let n,i=Ci(t,"begin",we.kmlgx),o=c(i)?K.fromIso8601(i.textContent):void 0,r=Ci(t,"end",we.kmlgx),s=c(r)?K.fromIso8601(r.textContent):void 0;if(c(o)&&c(s)){if(K.lessThan(s,o)){let a=o;o=s,s=a}n=new Br,n.addInterval(new En({start:o,stop:s}))}else c(o)?(n=new Br,n.addInterval(new En({start:o,stop:Ue.MAXIMUM_VALUE}))):c(s)&&(n=new Br,n.addInterval(new En({start:Ue.MINIMUM_VALUE,stop:s})));return n}function ome(){let e=new sc;return e.width=uy,e.height=uy,e.scaleByDistance=new Bt(Whe,qhe,Yhe,Xhe),e.pixelOffsetScaleByDistance=new Bt(Whe,qhe,Yhe,Xhe),e}function Aq(){let e=new lh;return e.outline=!0,e.outlineColor=z.WHITE,e}function rme(){let e=new ch;return e.translucencyByDistance=new Bt(3e6,1,5e6,0),e.pixelOffset=new k(17,0),e.horizontalOrigin=mi.LEFT,e.font="16px sans-serif",e.style=Uo.FILL_AND_OUTLINE,e}function vq(e,t,n,i,o){let r=Sn(e,"href",we.kml);if(!c(r)||r.length===0)return;if(r.indexOf("root://icons/palette-")===0){let a=r.charAt(21),l=g(Wn(e,"x",we.gx),0),u=g(Wn(e,"y",we.gx),0);l=Math.min(l/32,7),u=7-Math.min(u/32,7);let f=8*u+l;r=`https://maps.google.com/mapfiles/kml/pal${a}/icon${f}.png`}let s=Sq(r,n,i);if(o){let a=Sn(e,"refreshMode",we.kml),l=Sn(e,"viewRefreshMode",we.kml);a==="onInterval"||a==="onExpire"?mt(`kml-refreshMode-${a}`,`KML - Unsupported Icon refreshMode: ${a}`):(l==="onStop"||l==="onRegion")&&mt(`kml-refreshMode-${l}`,`KML - Unsupported Icon viewRefreshMode: ${l}`);let u=g(Sn(e,"viewBoundScale",we.kml),1),f=l==="onStop"?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",h=g(Sn(e,"viewFormat",we.kml),f),m=Sn(e,"httpQuery",we.kml);c(h)&&s.setQueryParameters(Au(Jk(h))),c(m)&&s.setQueryParameters(Au(Jk(m)));let p=t._ellipsoid;return Iq(s,t.camera,t.canvas,u,t._lastCameraView.bbox,p),s}return s}function xtt(e,t,n,i,o){let r=Wn(t,"scale",we.kml),s=Wn(t,"heading",we.kml),a=A0(t,"color",we.kml),l=Ci(t,"Icon",we.kml),u=vq(l,e,i,o,!1);c(l)&&!c(u)&&(u=!1);let f=Wn(l,"x",we.gx),h=Wn(l,"y",we.gx),m=Wn(l,"w",we.gx),p=Wn(l,"h",we.gx),_=Ci(t,"hotSpot",we.kml),b=fy(_,"x"),x=fy(_,"y"),T=fs(_,"xunits"),E=fs(_,"yunits"),S=n.billboard;c(S)||(S=ome(),n.billboard=S),S.image=u,S.scale=r,S.color=a,(c(f)||c(h)||c(m)||c(p))&&(S.imageSubRegion=new je(f,h,m,p)),c(s)&&s!==0&&(S.rotation=O.toRadians(-s),S.alignedAxis=d.UNIT_Z),r=g(r,1);let A,v;c(b)&&(T==="pixels"?A=-b*r:T==="insetPixels"?A=(b-uy)*r:T==="fraction"&&(A=-b*uy*r),A+=uy*.5*r),c(x)&&(E==="pixels"?v=x*r:E==="insetPixels"?v=(-x+uy)*r:E==="fraction"&&(v=x*uy*r),v-=uy*.5*r),(c(A)||c(v))&&(S.pixelOffset=new k(A,v))}function Zk(e,t,n,i,o){for(let r=0,s=t.childNodes.length;r<s;r++){let a=t.childNodes.item(r);if(a.localName==="IconStyle")xtt(e,a,n,i,o);else if(a.localName==="LabelStyle"){let l=n.label;c(l)||(l=rme(),n.label=l),l.scale=g(Wn(a,"scale",we.kml),l.scale),l.fillColor=g(A0(a,"color",we.kml),l.fillColor),l.text=n.name}else if(a.localName==="LineStyle"){let l=n.polyline;c(l)||(l=new fc,n.polyline=l),l.width=Wn(a,"width",we.kml),l.material=A0(a,"color",we.kml),c(A0(a,"outerColor",we.gx))&&mt("kml-gx:outerColor","KML - gx:outerColor is not supported in a LineStyle"),c(Wn(a,"outerWidth",we.gx))&&mt("kml-gx:outerWidth","KML - gx:outerWidth is not supported in a LineStyle"),c(Wn(a,"physicalWidth",we.gx))&&mt("kml-gx:physicalWidth","KML - gx:physicalWidth is not supported in a LineStyle"),c(Ad(a,"labelVisibility",we.gx))&&mt("kml-gx:labelVisibility","KML - gx:labelVisibility is not supported in a LineStyle")}else if(a.localName==="PolyStyle"){let l=n.polygon;c(l)||(l=Aq(),n.polygon=l),l.material=g(A0(a,"color",we.kml),l.material),l.fill=g(Ad(a,"fill",we.kml),l.fill),l.outline=g(Ad(a,"outline",we.kml),l.outline)}else if(a.localName==="BalloonStyle"){let l=g(Tq(Sn(a,"bgColor",we.kml)),z.WHITE),u=g(Tq(Sn(a,"textColor",we.kml)),z.BLACK),f=Sn(a,"text",we.kml);n.addProperty("balloonStyle"),n.balloonStyle={bgColor:l,textColor:u,text:f}}else if(a.localName==="ListStyle"){let l=Sn(a,"listItemType",we.kml);(l==="radioFolder"||l==="checkOffOnly")&&mt(`kml-listStyle-${l}`,`KML - Unsupported ListStyle with listItemType: ${l}`)}}}function Ttt(e,t,n,i,o){let r=new Ts,s,a=-1,l=t.childNodes,u=l.length;for(let h=0;h<u;h++){let m=l[h];(m.localName==="Style"||m.localName==="StyleMap")&&(a=h)}if(a!==-1){let h=l[a];if(h.localName==="Style")Zk(e,h,r,i,o);else{let m=Sd(h,"Pair",we.kml);for(let p=0;p<m.length;p++){let _=m[p],b=Sn(_,"key",we.kml);if(b==="normal"){let x=Sn(_,"styleUrl",we.kml);if(c(x))s=n.getById(x),c(s)||(s=n.getById(`#${x}`)),c(s)&&r.merge(s);else{let T=Ci(_,"Style",we.kml);Zk(e,T,r,i,o)}}else mt(`kml-styleMap-${b}`,`KML - Unsupported StyleMap key: ${b}`)}}}let f=Sn(t,"styleUrl",we.kml);if(c(f)){let h=f;if(f[0]!=="#"&&f.indexOf("#")!==-1){let m=f.split("#"),p=m[0];h=`${i.getDerivedResource({url:p}).getUrlComponent()}#${m[1]}`}s=n.getById(h),c(s)||(s=n.getById(`#${h}`)),c(s)&&r.merge(s)}return r}function Ctt(e,t,n){return t.fetchXML().then(function(i){return sme(e,i,n,t,!0)})}function sme(e,t,n,i,o,r){let s,a,l,u,f=Zhe(t,"Style",we.kml);if(c(f)){let b=f.length;for(s=0;s<b;s++)u=f[s],a=fs(u,"id"),c(a)&&(a=`#${a}`,o&&c(i)&&(a=i.getUrlComponent()+a),c(n.getById(a))||(l=new Ts({id:a}),n.add(l),Zk(e,u,l,i,r)))}let h=Zhe(t,"StyleMap",we.kml);if(c(h)){let b=h.length;for(s=0;s<b;s++){let x=h[s];if(a=fs(x,"id"),c(a)){let T=Sd(x,"Pair",we.kml);for(let E=0;E<T.length;E++){let S=T[E],A=Sn(S,"key",we.kml);if(A==="normal"){if(a=`#${a}`,o&&c(i)&&(a=i.getUrlComponent()+a),!c(n.getById(a))){l=n.getOrCreateEntity(a);let v=Sn(S,"styleUrl",we.kml);if(c(v)){v[0]!=="#"&&(v=`#${v}`),o&&c(i)&&(v=i.getUrlComponent()+v);let D=n.getById(v);c(D)&&l.merge(D)}else u=Ci(S,"Style",we.kml),Zk(e,u,l,i,r)}}else mt(`kml-styleMap-${A}`,`KML - Unsupported StyleMap key: ${A}`)}}}}let m=[],p=t.getElementsByTagName("styleUrl"),_=p.length;for(s=0;s<_;s++){let b=p[s].textContent;if(b[0]!=="#"){let x=b.split("#");if(x.length===2){let T=x[0],E=i.getDerivedResource({url:T});m.push(Ctt(e,E,n))}}}return m}function Dq(e,t,n){let i=new Fg(e,t.id,["position"]),o=new Fp(t.position);t.polyline=c(n.polyline)?n.polyline.clone():new fc,t.polyline.positions=new Lg([i,o])}function ame(e,t){return!c(e)&&!c(t)||e==="clampToGround"?qe.CLAMP_TO_GROUND:e==="relativeToGround"?qe.RELATIVE_TO_GROUND:e==="absolute"?qe.NONE:t==="clampToSeaFloor"?(mt("kml-gx:altitudeMode-clampToSeaFloor","KML - <gx:altitudeMode>:clampToSeaFloor is currently not supported, using <kml:altitudeMode>:clampToGround."),qe.CLAMP_TO_GROUND):t==="relativeToSeaFloor"?(mt("kml-gx:altitudeMode-relativeToSeaFloor","KML - <gx:altitudeMode>:relativeToSeaFloor is currently not supported, using <kml:altitudeMode>:relativeToGround."),qe.RELATIVE_TO_GROUND):(c(e)?mt("kml-altitudeMode-unknown",`KML - Unknown <kml:altitudeMode>:${e}, using <kml:altitudeMode>:CLAMP_TO_GROUND.`):mt("kml-gx:altitudeMode-unknown",`KML - Unknown <gx:altitudeMode>:${t}, using <kml:altitudeMode>:CLAMP_TO_GROUND.`),qe.CLAMP_TO_GROUND)}function Ett(e,t,n){return n==="relativeToSeaFloor"||t==="absolute"||t==="relativeToGround"?e:((c(t)&&t!=="clampToGround"||c(n)&&n!=="clampToSeaFloor")&&mt("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${g(t,n)}`),new Fp(e))}function wtt(e,t,n,i){if(!c(e))return;if(n==="relativeToSeaFloor"||t==="absolute"||t==="relativeToGround")return e;(c(t)&&t!=="clampToGround"||c(n)&&n!=="clampToSeaFloor")&&mt("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${g(t,n)}`);let o=e.length;for(let r=0;r<o;r++){let s=e[r];i.scaleToGeodeticSurface(s,s)}return e}function eU(e,t,n,i){let o=t.label;c(o)||(o=c(n.label)?n.label.clone():rme(),t.label=o),o.text=t.name;let r=t.billboard;c(r)||(r=c(n.billboard)?n.billboard.clone():ome(),t.billboard=r),c(r.image)?r.image.getValue()||(r.image=void 0):r.image=e._pinBuilder.fromColor(z.YELLOW,64);let s=1;c(r.scale)&&(s=r.scale.getValue(),s!==0?o.pixelOffset=new k(s*16+1,0):(o.pixelOffset=void 0,o.horizontalOrigin=void 0)),c(i)&&e._clampToGround&&(r.heightReference=i,o.heightReference=i)}function cme(e,t){let n=e.path;c(n)||(n=new A_,n.leadTime=0,e.path=n);let i=t.polyline;c(i)&&(n.material=i.material,n.width=i.width)}function Stt(e,t,n,i,o){let r=Sn(n,"coordinates",we.kml),s=Sn(n,"altitudeMode",we.kml),a=Sn(n,"altitudeMode",we.gx),l=Ad(n,"extrude",we.kml),u=e._ellipsoid,f=Qk(r,u);return i.position=f,eU(e,i,o,ame(s,a)),l&&PD(s,a)&&Dq(t,i,o),!0}function Jhe(e,t,n,i,o){let r=Ci(n,"coordinates",we.kml),s=Sn(n,"altitudeMode",we.kml),a=Sn(n,"altitudeMode",we.gx),l=Ad(n,"extrude",we.kml),u=Ad(n,"tessellate",we.kml),f=PD(s,a),h=Wn(n,"drawOrder",we.gx),m=e._ellipsoid,p=$k(r,m),_=o.polyline;if(f&&l){let b=new v_;i.wall=b,b.positions=p;let x=o.polygon;c(x)&&(b.fill=x.fill,b.material=x.material),b.outline=!0,c(_)?(b.outlineColor=c(_.material)?_.material.color:z.WHITE,b.outlineWidth=_.width):c(x)&&(b.outlineColor=c(x.material)?x.material.color:z.WHITE)}else if(e._clampToGround&&!f&&u){let b=new fc;b.clampToGround=!0,i.polyline=b,b.positions=p,c(_)?(b.material=c(_.material)?_.material.color.getValue(Ue.MINIMUM_VALUE):z.WHITE,b.width=g(_.width,1)):(b.material=z.WHITE,b.width=1),b.zIndex=h}else c(h)&&mt("kml-gx:drawOrder","KML - gx:drawOrder is not supported in LineStrings when clampToGround is false"),e._clampToGround&&!u&&mt("kml-line-tesselate","Ignoring clampToGround for KML lines without the tessellate flag."),_=c(_)?_.clone():new fc,i.polyline=_,_.positions=wtt(p,s,a,m),(!u||f)&&(_.arcType=jt.NONE);return!0}function Att(e,t,n,i,o){let r=Ci(n,"outerBoundaryIs",we.kml),s=Ci(r,"LinearRing",we.kml),a=Ci(s,"coordinates",we.kml),l=e._ellipsoid,u=$k(a,l),f=Ad(n,"extrude",we.kml),h=Sn(n,"altitudeMode",we.kml),m=Sn(n,"altitudeMode",we.gx),p=PD(h,m),_=c(o.polygon)?o.polygon.clone():Aq(),b=o.polyline;if(c(b)&&(_.outlineColor=c(b.material)?b.material.color:z.WHITE,_.outlineWidth=b.width),i.polygon=_,p?(_.perPositionHeight=!0,_.extrudedHeight=f?0:void 0):e._clampToGround||(_.height=0),c(u)){let x=new Ra(u),T=Sd(n,"innerBoundaryIs",we.kml);for(let E=0;E<T.length;E++){s=Sd(T[E],"LinearRing",we.kml);for(let S=0;S<s.length;S++)a=Ci(s[S],"coordinates",we.kml),u=$k(a,l),c(u)&&x.holes.push(new Ra(u))}_.hierarchy=x}return!0}function vtt(e,t,n,i,o){let r=Sn(n,"altitudeMode",we.kml),s=Sn(n,"altitudeMode",we.gx),a=Sd(n,"coord",we.gx),l=Sd(n,"angles",we.gx),u=Sd(n,"when",we.kml),f=Ad(n,"extrude",we.kml),h=PD(r,s),m=e._ellipsoid;l.length>0&&mt("kml-gx:angles","KML - gx:angles are not supported in gx:Tracks");let p=Math.min(a.length,u.length),_=[],b=[];for(let T=0;T<p;T++){let E=Qk(a[T].textContent,m);_.push(E),b.push(K.fromIso8601(u[T].textContent))}let x=new da;return x.addSamples(b,_),i.position=x,eU(e,i,o,ame(r,s)),cme(i,o),i.availability=new Br,u.length>0&&i.availability.addInterval(new En({start:b[0],stop:b[b.length-1]})),h&&f&&Dq(t,i,o),!0}function Qhe(e,t,n,i,o,r,s,a,l){let u=e[0],f=e[e.length-1],h=new da;h.addSamples(e,t),n.intervals.addInterval(new En({start:u,stop:f,isStartIncluded:l,isStopIncluded:l,data:Ett(h,s,a)})),i.addInterval(new En({start:u,stop:f,isStartIncluded:l,isStopIncluded:l})),o.intervals.addInterval(new En({start:u,stop:f,isStartIncluded:l,isStopIncluded:l,data:r}))}function Dtt(e,t,n,i,o){let r=Ad(n,"interpolate",we.gx),s=Sd(n,"Track",we.gx),a,l,u,f=!1,h=new Ug,m=new Br,p=new fa,_=e._ellipsoid;for(let b=0,x=s.length;b<x;b++){let T=s[b],E=Sd(T,"when",we.kml),S=Sd(T,"coord",we.gx),A=Sn(T,"altitudeMode",we.kml),v=Sn(T,"altitudeMode",we.gx),D=PD(A,v),R=Ad(T,"extrude",we.kml),P=Math.min(S.length,E.length),L=[];a=[];for(let F=0;F<P;F++){let y=Qk(S[F].textContent,_);L.push(y),a.push(K.fromIso8601(E[F].textContent))}r&&(c(l)&&Qhe([l,a[0]],[u,L[0]],p,m,h,!1,"absolute",void 0,!1),l=a[P-1],u=L[L.length-1]),Qhe(a,L,p,m,h,D&&R,A,v,!0),f=f||D&&R}return i.availability=m,i.position=p,eU(e,i,o),cme(i,o),f&&(Dq(t,i,o),i.polyline.show=h),!0}var lme={Point:Stt,LineString:Jhe,LinearRing:Jhe,Polygon:Att,Track:vtt,MultiTrack:Dtt,MultiGeometry:Itt,Model:Ott};function Itt(e,t,n,i,o,r){let s=n.childNodes,a=!1;for(let l=0,u=s.length;l<u;l++){let f=s.item(l),h=lme[f.localName];if(c(h)){let m=ime(f,t,r);m.parent=i,m.name=i.name,m.availability=i.availability,m.description=i.description,m.kml=i.kml,h(e,t,f,m,o)&&(a=!0)}}return a}function Ott(e,t,n,i,o){return mt("kml-unsupportedGeometry",`KML - Unsupported geometry: ${n.localName}`),!1}function Ptt(e,t){let n=Ci(e,"ExtendedData",we.kml);if(!c(n))return;c(Ci(n,"SchemaData",we.kml))&&mt("kml-schemaData","KML - SchemaData is unsupported"),c(fs(n,"xmlns:prefix"))&&mt("kml-extendedData","KML - ExtendedData with xmlns:prefix is unsupported");let i={},o=Sd(n,"Data",we.kml);if(c(o)){let r=o.length;for(let s=0;s<r;s++){let a=o[s],l=fs(a,"name");c(l)&&(i[l]={displayName:Sn(a,"displayName",we.kml),value:Sn(a,"value",we.kml)})}}t.kml.extendedData=i}var oo;typeof document!="undefined"&&(oo=document.createElement("div"));function Rtt(e,t,n,i,o){let r,s,a,l=t.kml,u=l.extendedData,f=Sn(e,"description",we.kml),h=g(t.balloonStyle,n.balloonStyle),m=z.WHITE,p=z.BLACK,_=f;c(h)&&(m=g(h.bgColor,z.WHITE),p=g(h.textColor,z.BLACK),_=g(h.text,f));let b;if(c(_)){if(_=_.replace("$[name]",g(t.name,"")),_=_.replace("$[description]",g(f,"")),_=_.replace("$[address]",g(l.address,"")),_=_.replace("$[Snippet]",g(l.snippet,"")),_=_.replace("$[id]",t.id),_=_.replace("$[geDirections]",""),c(u)){let E=_.match(/\$\[.+?\]/g);if(E!==null)for(r=0;r<E.length;r++){let S=E[r],A=S.substr(2,S.length-3),v=/\/displayName$/.test(A);A=A.replace(/\/displayName$/,""),b=u[A],c(b)&&(b=v?b.displayName:b.value),c(b)&&(_=_.replace(S,g(b,"")))}}}else if(c(u)&&(a=Object.keys(u),a.length>0)){for(_='<table class="cesium-infoBox-defaultTable cesium-infoBox-defaultTable-lighter"><tbody>',r=0;r<a.length;r++)s=a[r],b=u[s],_+=`<tr><th>${g(b.displayName,s)}</th><td>${g(b.value,"")}</td></tr>`;_+="</tbody></table>"}if(!c(_))return;_=htt.link(_),oo.innerHTML=_;let x=oo.querySelectorAll("a");for(r=0;r<x.length;r++)x[r].setAttribute("target","_blank");c(i)&&i.keys.length>1&&(ru(oo,"a","href",i),ru(oo,"link","href",i),ru(oo,"area","href",i),ru(oo,"img","src",i),ru(oo,"iframe","src",i),ru(oo,"video","src",i),ru(oo,"audio","src",i),ru(oo,"source","src",i),ru(oo,"track","src",i),ru(oo,"input","src",i),ru(oo,"embed","src",i),ru(oo,"script","src",i),ru(oo,"video","poster",i)),su(oo,"a","href",o),su(oo,"link","href",o),su(oo,"area","href",o),su(oo,"img","src",o),su(oo,"iframe","src",o),su(oo,"video","src",o),su(oo,"audio","src",o),su(oo,"source","src",o),su(oo,"track","src",o),su(oo,"input","src",o),su(oo,"embed","src",o),su(oo,"script","src",o),su(oo,"video","poster",o);let T='<div class="cesium-infoBox-description-lighter" style="';T+="overflow:auto;",T+="word-wrap:break-word;",T+=`background-color:${m.toCssColorString()};`,T+=`color:${p.toCssColorString()};`,T+='">',T+=`${oo.innerHTML}</div>`,oo.innerHTML="",t.description=T}function tU(e,t,n){let i=n.entityCollection,o=n.parentEntity,r=n.sourceResource,s=n.uriResolver,a=ime(t,i,n.context),l=a.kml,u=Ttt(e,t,n.styleCollection,r,s),f=Sn(t,"name",we.kml);a.name=f,a.parent=o;let h=btt(t);c(h)||(h=ytt(t)),a.availability=h,Pq(a);function m(S){return S?S.show&&m(S.parent):!0}let p=Ad(t,"visibility",we.kml);a.show=m(o)&&g(p,!0);let _=Ci(t,"author",we.atom),b=l.author;b.name=Sn(_,"name",we.atom),b.uri=Sn(_,"uri",we.atom),b.email=Sn(_,"email",we.atom);let x=Ci(t,"link",we.atom),T=l.link;T.href=fs(x,"href"),T.hreflang=fs(x,"hreflang"),T.rel=fs(x,"rel"),T.type=fs(x,"type"),T.title=fs(x,"title"),T.length=fs(x,"length"),l.address=Sn(t,"address",we.kml),l.phoneNumber=Sn(t,"phoneNumber",we.kml),l.snippet=Sn(t,"Snippet",we.kml),Ptt(t,a),Rtt(t,a,u,s,r);let E=e._ellipsoid;return dme(t,a,E),fme(t,a,E),c(Ci(t,"Region",we.kml))&&mt("kml-region","KML - Placemark Regions are unsupported"),{entity:a,styleEntity:u}}function ume(e,t,n,i){i.addNodes(t.childNodes,n),i.process()}function Mtt(e,t,n,i){let o=tU(e,t,n),r=ze(n);r.parentEntity=o.entity,ume(e,t,r,i)}function Ltt(e,t,n,i){let o=tU(e,t,n),r=o.entity,s=o.styleEntity,a=!1,l=t.childNodes;for(let u=0,f=l.length;u<f&&!a;u++){let h=l.item(u),m=lme[h.localName];c(m)&&(m(e,n.entityCollection,h,r,s,r.id),a=!0)}a||(r.merge(s),eU(e,r,s))}var Ntt={FlyTo:ktt,Wait:Btt,SoundCue:yq,AnimatedUpdate:yq,TourControl:yq};function Ftt(e,t,n,i){let o=Sn(t,"name",we.kml),r=fs(t,"id"),s=new qk(o,r),a=Ci(t,"Playlist",we.gx);if(a){let l=e._ellipsoid,u=a.childNodes;for(let f=0;f<u.length;f++){let h=u[f];if(h.localName){let m=Ntt[h.localName];m?m(s,h,l):console.log(`Unknown KML Tour playlist entry type ${h.localName}`)}}}e._kmlTours.push(s)}function yq(e,t){mt(`KML Tour unsupported node ${t.localName}`)}function Btt(e,t){let n=Wn(t,"duration",we.gx);e.addPlaylistEntry(new Kk(n))}function ktt(e,t,n){let i=Wn(t,"duration",we.gx),o=Sn(t,"flyToMode",we.gx),r={kml:{}};dme(t,r,n),fme(t,r,n);let s=r.kml.lookAt||r.kml.camera,a=new Xk(i,o,s);e.addPlaylistEntry(a)}function fme(e,t,n){let i=Ci(e,"Camera",we.kml);if(c(i)){let o=g(Wn(i,"longitude",we.kml),0),r=g(Wn(i,"latitude",we.kml),0),s=g(Wn(i,"altitude",we.kml),0),a=g(Wn(i,"heading",we.kml),0),l=g(Wn(i,"tilt",we.kml),0),u=g(Wn(i,"roll",we.kml),0),f=d.fromDegrees(o,r,s,n),h=Hc.fromDegrees(a,l-90,u);t.kml.camera=new K3(f,h)}}function dme(e,t,n){let i=Ci(e,"LookAt",we.kml);if(c(i)){let o=g(Wn(i,"longitude",we.kml),0),r=g(Wn(i,"latitude",we.kml),0),s=g(Wn(i,"altitude",we.kml),0),a=Wn(i,"heading",we.kml),l=Wn(i,"tilt",we.kml),u=g(Wn(i,"range",we.kml),0);l=O.toRadians(g(l,0)),a=O.toRadians(g(a,0));let f=new Cd(a,l-O.PI_OVER_TWO,u),h=d.fromDegrees(o,r,s,n);t.kml.lookAt=new jk(h,f)}}function Utt(e,t,n,i){let o=n.screenOverlayContainer;if(!c(o))return;let r=n.sourceResource,s=n.uriResolver,a=Ci(t,"Icon",we.kml),l=vq(a,e,r,s,!1);if(!c(l))return;let u=document.createElement("img");e._screenOverlays.push(u),u.src=l.url,u.onload=function(){let f=["position: absolute"],h=Ci(t,"screenXY",we.kml),m=Ci(t,"overlayXY",we.kml),p=Ci(t,"size",we.kml),_,b,x,T,E,S;c(p)&&(_=fy(p,"x"),b=fy(p,"y"),x=fs(p,"xunits"),T=fs(p,"yunits"),c(_)&&_!==-1&&_!==0&&(x==="fraction"?E=`width: ${Math.floor(_*100)}%`:x==="pixels"&&(E=`width: ${_}px`),f.push(E)),c(b)&&b!==-1&&b!==0&&(T==="fraction"?S=`height: ${Math.floor(b*100)}%`:T==="pixels"&&(S=`height: ${b}px`),f.push(S))),u.style=f.join(";");let A=0,v=u.height;c(m)&&(_=fy(m,"x"),b=fy(m,"y"),x=fs(m,"xunits"),T=fs(m,"yunits"),c(_)&&(x==="fraction"?A=_*u.width:(x==="pixels"||x==="insetPixels")&&(A=_)),c(b)&&(T==="fraction"?v=b*u.height:(T==="pixels"||T==="insetPixels")&&(v=b))),c(h)&&(_=fy(h,"x"),b=fy(h,"y"),x=fs(h,"xunits"),T=fs(h,"yunits"),c(_)&&(x==="fraction"?E=`left: calc(${Math.floor(_*100)}% - ${A}px)`:x==="pixels"?E=`left: ${_-A}px`:x==="insetPixels"&&(E=`right: ${_-A}px`),f.push(E)),c(b)&&(T==="fraction"?S=`bottom: calc(${Math.floor(b*100)}% - ${v}px)`:T==="pixels"?S=`bottom: ${b-v}px`:T==="insetPixels"&&(S=`top: ${b-v}px`),f.push(S))),u.style=f.join(";")},o.appendChild(u)}function ztt(e,t,n,i){let r=tU(e,t,n).entity,s,a=!1,l=e._ellipsoid,u=$k(Ci(t,"LatLonQuad",we.gx),l),f=Wn(t,"drawOrder",we.kml);if(c(u))s=Aq(),s.hierarchy=new Ra(u),s.zIndex=f,r.polygon=s,a=!0;else{s=new uh,s.zIndex=f,r.rectangle=s;let _=Ci(t,"LatLonBox",we.kml);if(c(_)){let b=Wn(_,"west",we.kml),x=Wn(_,"south",we.kml),T=Wn(_,"east",we.kml),E=Wn(_,"north",we.kml);c(b)&&(b=O.negativePiToPi(O.toRadians(b))),c(x)&&(x=O.clampToLatitudeRange(O.toRadians(x))),c(T)&&(T=O.negativePiToPi(O.toRadians(T))),c(E)&&(E=O.clampToLatitudeRange(O.toRadians(E))),s.coordinates=new te(b,x,T,E);let S=Wn(_,"rotation",we.kml);if(c(S)){let A=O.toRadians(S);s.rotation=A,s.stRotation=A}}}let h=Ci(t,"Icon",we.kml),m=vq(h,e,n.sourceResource,n.uriResolver,!0);if(c(m)){a&&mt("kml-gx:LatLonQuad","KML - gx:LatLonQuad Icon does not support texture projection.");let _=Wn(h,"x",we.gx),b=Wn(h,"y",we.gx),x=Wn(h,"w",we.gx),T=Wn(h,"h",we.gx);(c(_)||c(b)||c(x)||c(T))&&mt("kml-groundOverlay-xywh","KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"),s.material=m,s.material.color=A0(t,"color",we.kml),s.material.transparent=!0}else s.material=A0(t,"color",we.kml);let p=Sn(t,"altitudeMode",we.kml);c(p)?p==="absolute"?(s.height=Wn(t,"altitude",we.kml),s.zIndex=void 0):p!=="clampToGround"&&mt("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${p}`):(p=Sn(t,"altitudeMode",we.gx),p==="relativeToSeaFloor"?(mt("kml-altitudeMode-relativeToSeaFloor","KML - altitudeMode relativeToSeaFloor is currently not supported, treating as absolute."),s.height=Wn(t,"altitude",we.kml),s.zIndex=void 0):p==="clampToSeaFloor"?mt("kml-altitudeMode-clampToSeaFloor","KML - altitudeMode clampToSeaFloor is currently not supported, treating as clampToGround."):c(p)&&mt("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${p}`))}function hme(e,t,n,i){e._unsupportedNode.raiseEvent(e,n.parentEntity,t,n.entityCollection,n.styleCollection,n.sourceResource,n.uriResolver),mt(`kml-unsupportedFeature-${t.nodeName}`,`KML - Unsupported feature: ${t.nodeName}`)}var dy={INTERVAL:0,EXPIRE:1,STOP:2};function Jk(e){if(!c(e)||e.length===0)return"";let t=e[0];return(t==="&"||t==="?")&&(e=e.substring(1)),e}var Vtt=new te,GE=new re,bq=new k,Htt=new d;function Iq(e,t,n,i,o,r){function s(u){return u<-O.PI_OVER_TWO?-O.PI_OVER_TWO:u>O.PI_OVER_TWO?O.PI_OVER_TWO:u}function a(u){return u>O.PI?u-O.TWO_PI:u<-O.PI?u+O.TWO_PI:u}let l=Ix(e.queryParameters);if(l=l.replace(/%5B/g,"[").replace(/%5D/g,"]"),c(t)&&t._mode!==J.MORPHING){let u,f;if(o=g(o,Vtt),c(n)&&(bq.x=n.clientWidth*.5,bq.y=n.clientHeight*.5,u=t.pickEllipsoid(bq,r,Htt)),c(u)?f=r.cartesianToCartographic(u,GE):(f=te.center(o,GE),u=r.cartographicToCartesian(f)),c(i)&&!O.equalsEpsilon(i,1,O.EPSILON9)){let T=o.width*i*.5,E=o.height*i*.5;o=new te(a(f.longitude-T),s(f.latitude-E),a(f.longitude+T),s(f.latitude+E))}l=l.replace("[bboxWest]",O.toDegrees(o.west).toString()),l=l.replace("[bboxSouth]",O.toDegrees(o.south).toString()),l=l.replace("[bboxEast]",O.toDegrees(o.east).toString()),l=l.replace("[bboxNorth]",O.toDegrees(o.north).toString());let h=O.toDegrees(f.longitude).toString(),m=O.toDegrees(f.latitude).toString();l=l.replace("[lookatLon]",h),l=l.replace("[lookatLat]",m),l=l.replace("[lookatTilt]",O.toDegrees(t.pitch).toString()),l=l.replace("[lookatHeading]",O.toDegrees(t.heading).toString()),l=l.replace("[lookatRange]",d.distance(t.positionWC,u)),l=l.replace("[lookatTerrainLon]",h),l=l.replace("[lookatTerrainLat]",m),l=l.replace("[lookatTerrainAlt]",f.height.toString()),r.cartesianToCartographic(t.positionWC,GE),l=l.replace("[cameraLon]",O.toDegrees(GE.longitude).toString()),l=l.replace("[cameraLat]",O.toDegrees(GE.latitude).toString()),l=l.replace("[cameraAlt]",O.toDegrees(GE.height).toString());let p=t.frustum,_=p.aspectRatio,b="",x="";if(c(_)){let T=O.toDegrees(p.fov);_>1?(b=T,x=T/_):(x=T,b=T*_)}l=l.replace("[horizFov]",b.toString()),l=l.replace("[vertFov]",x.toString())}else l=l.replace("[bboxWest]","-180"),l=l.replace("[bboxSouth]","-90"),l=l.replace("[bboxEast]","180"),l=l.replace("[bboxNorth]","90"),l=l.replace("[lookatLon]",""),l=l.replace("[lookatLat]",""),l=l.replace("[lookatRange]",""),l=l.replace("[lookatTilt]",""),l=l.replace("[lookatHeading]",""),l=l.replace("[lookatTerrainLon]",""),l=l.replace("[lookatTerrainLat]",""),l=l.replace("[lookatTerrainAlt]",""),l=l.replace("[cameraLon]",""),l=l.replace("[cameraLat]",""),l=l.replace("[cameraAlt]",""),l=l.replace("[horizFov]",""),l=l.replace("[vertFov]","");c(n)?(l=l.replace("[horizPixels]",n.clientWidth),l=l.replace("[vertPixels]",n.clientHeight)):(l=l.replace("[horizPixels]",""),l=l.replace("[vertPixels]","")),l=l.replace("[terrainEnabled]","1"),l=l.replace("[clientVersion]","1"),l=l.replace("[kmlVersion]","2.2"),l=l.replace("[clientName]","Cesium"),l=l.replace("[language]","English"),e.setQueryParameters(Au(l))}function Gtt(e,t,n,i){let r=tU(e,t,n).entity,s=n.sourceResource,a=n.uriResolver,l=Ci(t,"Link",we.kml);if(c(l)||(l=Ci(t,"Url",we.kml)),c(l)){let u=Sn(l,"href",we.kml),f,h;if(c(u)){let m=u;if(u=Sq(u,s,n.uriResolver),/^data:/.test(u.getUrlComponent()))/\.kmz/i.test(s.getUrlComponent())||(m=s.getDerivedResource({url:m}));else{if(m=u.clone(),f=Sn(l,"viewRefreshMode",we.kml),f==="onRegion"){mt("kml-refrehMode-onRegion","KML - Unsupported viewRefreshMode: onRegion");return}h=g(Sn(l,"viewBoundScale",we.kml),1);let x=f==="onStop"?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",T=g(Sn(l,"viewFormat",we.kml),x),E=Sn(l,"httpQuery",we.kml);c(T)&&u.setQueryParameters(Au(Jk(T))),c(E)&&u.setQueryParameters(Au(Jk(E)));let S=e._ellipsoid;Iq(u,e.camera,e.canvas,h,e._lastCameraView.bbox,S)}let p={sourceUri:m,uriResolver:a,context:r.id,screenOverlayContainer:n.screenOverlayContainer},_=new qs,b=Oq(e,_,u,p).then(function(x){let T=e._entityCollection,E=_.values;T.suspendEvents();for(let v=0;v<E.length;v++){let D=E[v];c(D.parent)||(D.parent=r,Pq(D)),T.add(D)}T.resumeEvents();let S=Sn(l,"refreshMode",we.kml),A=g(Wn(l,"refreshInterval",we.kml),0);if(S==="onInterval"&&A>0||S==="onExpire"||f==="onStop"){let v=Ci(x,"NetworkLinkControl",we.kml),D=c(v),R=K.now(),P={id:Bn(),href:u,cookie:{},lastUpdated:R,updating:!1,entity:r,viewBoundScale:h,needsUpdate:!1,cameraUpdateTime:R},L=0;if(D&&(P.cookie=Au(g(Sn(v,"cookie",we.kml),"")),L=g(Wn(v,"minRefreshPeriod",we.kml),0)),S==="onInterval")D&&(A=Math.max(L,A)),P.refreshMode=dy.INTERVAL,P.time=A;else if(S==="onExpire"){let F;if(D&&(F=Sn(v,"expires",we.kml)),c(F))try{let y=K.fromIso8601(F),I=K.secondsDifference(y,R);I>0&&I<L&&K.addSeconds(R,L,y),P.refreshMode=dy.EXPIRE,P.time=y}catch{mt("kml-refreshMode-onInterval-onExpire","KML - NetworkLinkControl expires is not a valid date")}else mt("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element")}else c(e.camera)?(P.refreshMode=dy.STOP,P.time=g(Wn(l,"viewRefreshTime",we.kml),0)):mt("kml-refrehMode-onStop-noCamera","A NetworkLink with viewRefreshMode=onStop requires the `camera` property to be defined.");c(P.refreshMode)&&e._networkLinks.set(P.id,P)}}).catch(function(x){mt(`An error occured during loading ${u.url}`),e._error.raiseEvent(e,x)});i.addPromise(b)}}}function jtt(e,t,n,i){let o=wq[t.localName];return c(o)?o(e,t,n,i):hme(e,t,n,i)}function Cq(e,t,n,i,o,r,s){t.removeAll();let a=n.documentElement,l=a.localName==="Document"?a:Ci(a,"Document",we.kml),u=Sn(l,"name",we.kml);c(u)||(u=Mg(i.getUrlComponent())),c(e._name)||(e._name=u);let f=new au._DeferredLoading(e),h=new qs(e);return Promise.all(sme(e,n,h,i,!1,o)).then(function(){let m=n.documentElement;if(m.localName==="kml"){let _=m.childNodes;for(let b=0;b<_.length;b++){let x=_[b];if(c(wq[x.localName])){m=x;break}}}let p={parentEntity:void 0,entityCollection:t,styleCollection:h,sourceResource:i,uriResolver:o,context:s,screenOverlayContainer:r};return t.suspendEvents(),jtt(e,m,p,f),t.resumeEvents(),f.wait().then(function(){return n.documentElement})})}function Wtt(e,t,n,i,o){let r=Mi("ThirdParty/Workers/z-worker-pako.js");LE({workerScripts:{deflate:[r,"./pako_deflate.min.js"],inflate:[r,"./pako_inflate.min.js"]}});let s=new zk(new Vp(n));return Promise.resolve(s.getEntries()).then(function(a){let l=[],u={},f;for(let h=0;h<a.length;h++){let m=a[h];m.directory||(/\.kml$/i.test(m.filename)&&(!c(f)||!/\//i.test(m.filename))?(c(f)&&l.push(gq(f,u)),f=m):l.push(gq(m,u)))}return c(f)&&l.push(gtt(f,u)),Promise.all(l).then(function(){if(s.close(),!c(u.kml))throw new ie("KMZ file does not contain a KML document.");return u.keys=Object.keys(u),Cq(e,t,u.kml,i,u,o)})})}function Oq(e,t,n,i){i=g(i,g.EMPTY_OBJECT);let o=i.sourceUri,r=i.uriResolver,s=i.context,a=i.screenOverlayContainer,l=n;if(typeof n=="string"||n instanceof Te){n=Te.createIfNeeded(n),l=n.fetchBlob(),o=g(o,n.clone());let u=e._resourceCredits,f=n.credits;if(c(f)){let h=f.length;for(let m=0;m<h;m++)u.push(f[m])}}else o=g(o,Te.DEFAULT.clone());return o=Te.createIfNeeded(o),c(a)&&(a=em(a)),Promise.resolve(l).then(function(u){return u instanceof Blob?ptt(u).then(function(f){return f?Wtt(e,t,u,o,a):_tt(u).then(function(h){h=tme(h),h=nme(h);let m,p;try{m=Eq.parseFromString(h,"application/xml")}catch(_){p=_.toString()}if(c(p)||m.body||m.documentElement.tagName==="parsererror"){let _=c(p)?p:m.documentElement.firstChild.nodeValue;throw _||(_=m.body.innerText),new ie(_)}return Cq(e,t,m,o,r,a,s)})}):Cq(e,t,u,o,r,a,s)}).catch(function(u){return e._error.raiseEvent(e,u),console.log(u),Promise.reject(u)})}function au(e){e=g(e,g.EMPTY_OBJECT);let t=e.camera,n=e.canvas;this._changed=new fe,this._error=new fe,this._loading=new fe,this._refresh=new fe,this._unsupportedNode=new fe,this._clock=void 0,this._entityCollection=new qs(this),this._name=void 0,this._isLoading=!1,this._pinBuilder=new $g,this._networkLinks=new Et,this._entityCluster=new ff,this.canvas=n,this.camera=t,this._lastCameraView={position:c(t)?d.clone(t.positionWC):void 0,direction:c(t)?d.clone(t.directionWC):void 0,up:c(t)?d.clone(t.upWC):void 0,bbox:c(t)?t.computeViewRectangle():te.clone(te.MAX_VALUE)},this._ellipsoid=g(e.ellipsoid,Z.default);let i=e.credit;typeof i=="string"&&(i=new St(i)),this._credit=i,this._resourceCredits=[],this._kmlTours=[],this._screenOverlays=[]}au.load=function(e,t){return t=g(t,g.EMPTY_OBJECT),new au(t).load(e,t)};Object.defineProperties(au.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},refreshEvent:{get:function(){return this._refresh}},unsupportedNodeEvent:{get:function(){return this._unsupportedNode}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!c(e))throw new w("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}},kmlTours:{get:function(){return this._kmlTours}}});au.prototype.load=function(e,t){if(!c(e))throw new w("data is required.");t=g(t,g.EMPTY_OBJECT),kr.setLoading(this,!0);let n=this._name;this._name=void 0,this._clampToGround=g(t.clampToGround,!1);let i=this;return Oq(this,this._entityCollection,e,t).then(function(){let o,r=i._entityCollection.computeAvailability(),s=r.start,a=r.stop,l=K.equals(s,Ue.MINIMUM_VALUE),u=K.equals(a,Ue.MAXIMUM_VALUE);if(!l||!u){let h;l&&(h=new Date,h.setHours(0,0,0,0),s=K.fromDate(h)),u&&(h=new Date,h.setHours(24,0,0,0),a=K.fromDate(h)),o=new Bh,o.startTime=s,o.stopTime=a,o.currentTime=K.clone(s),o.clockRange=Va.LOOP_STOP,o.clockStep=Or.SYSTEM_CLOCK_MULTIPLIER,o.multiplier=Math.round(Math.min(Math.max(K.secondsDifference(a,s)/60,1),31556900))}let f=!1;return o!==i._clock&&(i._clock=o,f=!0),n!==i._name&&(f=!0),f&&i._changed.raiseEvent(i),kr.setLoading(i,!1),i}).catch(function(o){return kr.setLoading(i,!1),i._error.raiseEvent(i,o),console.log(o),Promise.reject(o)})};au.prototype.destroy=function(){for(;this._screenOverlays.length>0;)this._screenOverlays.pop().remove()};function Pq(e){let t=e.parent;if(c(t)){let n=t.availability;if(c(n)){let i=e.availability;c(i)?i.intersect(n):e.availability=n}}}function qtt(e,t,n,i,o){return function(r){if(!i.contains(t.id))return;let s=!1,a=Ci(r,"NetworkLinkControl",we.kml),l=c(a),u=0;if(l){if(c(Ci(a,"Update",we.kml))){mt("kml-networkLinkControl-update","KML - NetworkLinkControl updates aren't supported."),t.updating=!1,i.remove(t.id);return}t.cookie=Au(g(Sn(a,"cookie",we.kml),"")),u=g(Wn(a,"minRefreshPeriod",we.kml),0)}let f=K.now(),h=t.refreshMode;if(h===dy.INTERVAL)c(a)&&(t.time=Math.max(u,t.time));else if(h===dy.EXPIRE){let R;if(c(a)&&(R=Sn(a,"expires",we.kml)),c(R))try{let P=K.fromIso8601(R),L=K.secondsDifference(P,f);L>0&&L<u&&K.addSeconds(f,u,P),t.time=P}catch{mt("kml-networkLinkControl-expires","KML - NetworkLinkControl expires is not a valid date"),s=!0}else mt("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element"),s=!0}let m=t.entity,p=e._entityCollection,_=n.values;function b(R){p.remove(R);let P=R._children,L=P.length;for(let F=0;F<L;++F)b(P[F])}p.suspendEvents();let x=p.values.slice(),T;for(T=0;T<x.length;++T){let R=x[T];R.parent===m&&(R.parent=void 0,b(R))}for(p.resumeEvents(),p.suspendEvents(),T=0;T<_.length;T++){let R=_[T];c(R.parent)||(R.parent=m,Pq(R)),p.add(R)}p.resumeEvents(),s?i.remove(t.id):t.lastUpdated=f;let E=p.computeAvailability(),S=E.start,A=E.stop,v=K.equals(S,Ue.MINIMUM_VALUE),D=K.equals(A,Ue.MAXIMUM_VALUE);if(!v||!D){let R=e._clock;(R.startTime!==S||R.stopTime!==A)&&(R.startTime=S,R.stopTime=A,e._changed.raiseEvent(e))}t.updating=!1,t.needsUpdate=!1,e._refresh.raiseEvent(e,o.getUrlComponent(!0))}}var xq=new Et;au.prototype.update=function(e){let t=this._networkLinks;if(t.length===0)return!0;let n=K.now(),i=this;xq.removeAll();function o(f){let h=f._children,m=h.length;for(let p=0;p<m;++p){let _=h[p];xq.set(_.id,_),o(_)}}let r=!1,s=this._lastCameraView,a=this.camera;c(a)&&!(a.positionWC.equalsEpsilon(s.position,O.EPSILON7)&&a.directionWC.equalsEpsilon(s.direction,O.EPSILON7)&&a.upWC.equalsEpsilon(s.up,O.EPSILON7))&&(s.position=d.clone(a.positionWC),s.direction=d.clone(a.directionWC),s.up=d.clone(a.upWC),s.bbox=a.computeViewRectangle(),r=!0);let l=new Et,u=!1;return t.values.forEach(function(f){let h=f.entity;if(!xq.contains(h.id)){if(!f.updating){let m=!1;if(f.refreshMode===dy.INTERVAL?K.secondsDifference(n,f.lastUpdated)>f.time&&(m=!0):f.refreshMode===dy.EXPIRE?K.greaterThan(n,f.time)&&(m=!0):f.refreshMode===dy.STOP&&(r&&(f.needsUpdate=!0,f.cameraUpdateTime=n),f.needsUpdate&&K.secondsDifference(n,f.cameraUpdateTime)>=f.time&&(m=!0)),m){o(h),f.updating=!0;let p=new qs,_=f.href.clone();_.setQueryParameters(f.cookie);let b=g(i._ellipsoid,Z.default);Iq(_,i.camera,i.canvas,f.viewBoundScale,s.bbox,b),Oq(i,p,_,{context:h.id}).then(qtt(i,f,p,l,_)).catch(function(x){let T=`NetworkLink ${f.href} refresh failed: ${x}`;console.log(T),i._error.raiseEvent(i,T)}),u=!0}}l.set(f.id,f)}}),u&&(this._networkLinks=l,this._changed.raiseEvent(this)),!0};function Ytt(){this.author={name:void 0,uri:void 0,email:void 0},this.link={href:void 0,hreflang:void 0,rel:void 0,type:void 0,title:void 0,length:void 0},this.address=void 0,this.phoneNumber=void 0,this.snippet=void 0,this.extendedData=void 0}au._DeferredLoading=nm;au._getTimestamp=yi;var mme=au;function RD(){w.throwInstantiationError()}RD.prototype.update=w.throwInstantiationError;RD.prototype.getBoundingSphere=w.throwInstantiationError;RD.prototype.isDestroyed=w.throwInstantiationError;RD.prototype.destroy=w.throwInstantiationError;var pme=RD;var Rq=32,Xtt="http://www.opengis.net/kml/2.2",Dd="http://www.google.com/kml/ext/2.2",Ktt="http://www.w3.org/2000/xmlns/";function nU(e){this._files={},this._promises=[],this._count=0,this._modelCallback=e}var $tt=/^data:image\/([^,;]+)/;nU.prototype.texture=function(e){let t=this,n;if(typeof e=="string"||e instanceof Te){if(e=Te.createIfNeeded(e),!e.isDataUri)return e.url;let i=e.url.match($tt);n=`texture_${++this._count}`,c(i)&&(n+=`.${i[1]}`);let o=e.fetchBlob().then(function(r){t._files[n]=r});return this._promises.push(o),n}if(e instanceof HTMLCanvasElement){n=`texture_${++this._count}.png`;let i=new Promise(o=>{e.toBlob(function(r){t._files[n]=r,o()})});return this._promises.push(i),n}return""};function Ztt(e,t){return function(n){e._files[t]=n}}nU.prototype.model=function(e,t){let n=this._modelCallback;if(!c(n))throw new ie("Encountered a model entity while exporting to KML, but no model callback was supplied.");let i={},o=n(e,t,i);for(let r in i)if(i.hasOwnProperty(r)){let s=Promise.resolve(i[r]);this._promises.push(s),s.then(Ztt(this,r))}return o};Object.defineProperties(nU.prototype,{promise:{get:function(){return Promise.all(this._promises)}},files:{get:function(){return this._files}}});function iU(e){this._time=e}iU.prototype.get=function(e,t,n){let i;return c(e)&&(i=c(e.getValue)?e.getValue(this._time,n):e),g(i,t)};iU.prototype.getColor=function(e,t){let n=this.get(e,t);if(c(n))return D0(n)};iU.prototype.getMaterialType=function(e){if(c(e))return e.getType(this._time)};function Mq(){this._ids={},this._styles={},this._count=0}Mq.prototype.get=function(e){let t=this._ids,n=e.innerHTML;if(c(t[n]))return t[n];let i=`style-${++this._count}`;return e.setAttribute("id",i),i=`#${i}`,t[n]=i,this._styles[n]=e,i};Mq.prototype.save=function(e){let t=this._styles,n=e.childNodes[0];for(let i in t)t.hasOwnProperty(i)&&e.insertBefore(t[i],n)};function yme(){this._ids={}}yme.prototype.get=function(e){if(!c(e))return this.get(Bn());let t=this._ids;return c(t[e])?`${e.toString()}-${++t[e]}`:(t[e]=0,e)};function Lq(e){e=g(e,g.EMPTY_OBJECT);let t=e.entities,n=g(e.kmz,!1);if(!c(t))throw new w("entities is required.");let i=Lq._createState(e),o=t.values.filter(function(u){return!c(u.parent)}),r=i.kmlDoc,s=r.documentElement;s.setAttributeNS(Ktt,"xmlns:gx",Dd);let a=r.createElement("Document");s.appendChild(a),xme(i,a,o),i.styleCache.save(a);let l=i.externalFileHandler;return l.promise.then(function(){let f=new XMLSerializer().serializeToString(i.kmlDoc);return n?Jtt(f,l.files):{kml:f,externalFiles:l.files}})}function Jtt(e,t){let n=Mi("ThirdParty/Workers/z-worker-pako.js");LE({workerScripts:{deflate:[n,"./pako_deflate.min.js"],inflate:[n,"./pako_inflate.min.js"]}});let i=new ED,o=new Hk(i);return o.add("doc.kml",new Sk(e)).then(function(){let r=Object.keys(t);return bme(o,r,t,0)}).then(function(){return o.close()}).then(function(r){return{kmz:r}})}function bme(e,t,n,i){if(t.length===i)return;let o=t[i];return e.add(o,new Vp(n[o])).then(function(){return bme(e,t,n,i+1)})}Lq._createState=function(e){let t=e.entities,n=new Mq,i=t.computeAvailability(),o=c(e.time)?e.time:i.start,r=g(e.defaultAvailability,i),s=g(e.sampleDuration,60);r.start===Ue.MINIMUM_VALUE?r.stop===Ue.MAXIMUM_VALUE?r=new En:K.addSeconds(r.stop,-10*s,r.start):r.stop===Ue.MAXIMUM_VALUE&&K.addSeconds(r.start,10*s,r.stop);let a=new nU(e.modelCallback);return{kmlDoc:document.implementation.createDocument(Xtt,"kml"),ellipsoid:g(e.ellipsoid,Z.default),idManager:new yme,styleCache:n,externalFileHandler:a,time:o,valueGetter:new iU(o),sampleDuration:s,defaultAvailability:new Br([r])}};function xme(e,t,n){let i=e.kmlDoc,o=e.styleCache,r=e.valueGetter,s=e.idManager,a=n.length,l,u,f;for(let h=0;h<a;++h){let m=n[h];l=[],u=[],f=[],Qtt(e,m,u,f),ent(e,m.polyline,u,f),gme(e,m.rectangle,u,f,l),gme(e,m.polygon,u,f,l),ont(e,m,m.model,u,f);let p,_=m.availability;c(_)&&(p=i.createElement("TimeSpan"),K.equals(_.start,Ue.MINIMUM_VALUE)||p.appendChild(ln(i,"begin",K.toIso8601(_.start))),K.equals(_.stop,Ue.MAXIMUM_VALUE)||p.appendChild(ln(i,"end",K.toIso8601(_.stop))));for(let T=0;T<l.length;++T){let E=l[T];E.setAttribute("id",s.get(m.id)),E.appendChild(ln(i,"name",m.name)),E.appendChild(ln(i,"visibility",m.show)),E.appendChild(ln(i,"description",m.description)),c(p)&&E.appendChild(p),t.appendChild(E)}let b=u.length;if(b>0){let T=i.createElement("Placemark");T.setAttribute("id",s.get(m.id));let E=m.name,S=m.label;if(c(S)){let v=i.createElement("LabelStyle"),D=r.get(S.text);E=c(D)&&D.length>0?D:E;let R=r.getColor(S.fillColor);c(R)&&(v.appendChild(ln(i,"color",R)),v.appendChild(ln(i,"colorMode","normal")));let P=r.get(S.scale);c(P)&&v.appendChild(ln(i,"scale",P)),f.push(v)}T.appendChild(ln(i,"name",E)),T.appendChild(ln(i,"visibility",m.show)),T.appendChild(ln(i,"description",m.description)),c(p)&&T.appendChild(p),t.appendChild(T);let A=f.length;if(A>0){let v=i.createElement("Style");for(let D=0;D<A;++D)v.appendChild(f[D]);T.appendChild(ln(i,"styleUrl",o.get(v)))}if(u.length===1)T.appendChild(u[0]);else if(u.length>1){let v=i.createElement("MultiGeometry");for(let D=0;D<b;++D)v.appendChild(u[D]);T.appendChild(v)}}let x=m._children;if(x.length>0){let T=i.createElement("Folder");T.setAttribute("id",s.get(m.id)),T.appendChild(ln(i,"name",m.name)),T.appendChild(ln(i,"visibility",m.show)),T.appendChild(ln(i,"description",m.description)),t.appendChild(T),xme(e,T,x)}}}var ml=new d,Dc=new re,vd=new K;function Qtt(e,t,n,i){let o=e.kmlDoc,r=e.ellipsoid,s=e.valueGetter,a=g(t.billboard,t.point);if(!c(a)&&!c(t.path))return;let l=t.position;if(!l.isConstant){Tme(e,t,a,n,i);return}s.get(l,void 0,ml);let u=ln(o,"coordinates",v0(ml,r)),f=o.createElement("Point"),h=o.createElement("altitudeMode");h.appendChild(I0(e,a.heightReference)),f.appendChild(h),f.appendChild(u),n.push(f);let m=a instanceof sc?Eme(e,a):Cme(e,a);i.push(m)}function Tme(e,t,n,i,o){let r=e.kmlDoc,s=e.ellipsoid,a=e.valueGetter,l,u=t.position,f=!0;u instanceof fa?(l=u.intervals,f=!1):l=g(t.availability,e.defaultAvailability);let h=n instanceof S_,m,p,_,b=[];for(m=0;m<l.length;++m){let T=l.get(m),E=f?u:T.data,S=r.createElement("altitudeMode");E instanceof Fp?(E=E._value,S.appendChild(I0(e,qe.CLAMP_TO_GROUND))):c(n)?S.appendChild(I0(e,n.heightReference)):S.appendChild(I0(e,qe.NONE));let A=[],v=[];if(E.isConstant){a.get(E,void 0,ml);let R=ln(r,"coordinates",v0(ml,s));A.push(K.toIso8601(T.start)),v.push(R),A.push(K.toIso8601(T.stop)),v.push(R)}else if(E instanceof da)for(_=E._property._times,p=0;p<_.length;++p)A.push(K.toIso8601(_[p])),E.getValueInReferenceFrame(_[p],Ni.FIXED,ml),v.push(v0(ml,s));else if(E instanceof hf){_=E._times;let R=E._values;for(p=0;p<_.length;++p)A.push(K.toIso8601(_[p])),d.fromArray(R,p*3,ml),v.push(v0(ml,s))}else{let R=e.sampleDuration;T.start.clone(vd),T.isStartIncluded||K.addSeconds(vd,R,vd);let P=T.stop;for(;K.lessThan(vd,P);)E.getValue(vd,ml),A.push(K.toIso8601(vd)),v.push(v0(ml,s)),K.addSeconds(vd,R,vd);T.isStopIncluded&&K.equals(vd,P)&&(E.getValue(vd,ml),A.push(K.toIso8601(vd)),v.push(v0(ml,s)))}let D=r.createElementNS(Dd,"Track");D.appendChild(S);for(let R=0;R<A.length;++R){let P=ln(r,"when",A[R]),L=ln(r,"coord",v[R],Dd);D.appendChild(P),D.appendChild(L)}h&&D.appendChild(wme(e,n)),b.push(D)}if(b.length===1)i.push(b[0]);else if(b.length>1){let T=r.createElementNS(Dd,"MultiTrack");for(m=0;m<b.length;++m)T.appendChild(b[m]);i.push(T)}if(c(n)&&!h){let T=n instanceof sc?Eme(e,n):Cme(e,n);o.push(T)}let x=t.path;if(c(x)){let T=a.get(x.width),E=x.material;if(c(E)||c(T)){let S=r.createElement("LineStyle");c(T)&&S.appendChild(ln(r,"width",T)),Nq(e,E,S),o.push(S)}}}function Cme(e,t){let n=e.kmlDoc,i=e.valueGetter,o=n.createElement("IconStyle"),r=i.getColor(t.color);c(r)&&(o.appendChild(ln(n,"color",r)),o.appendChild(ln(n,"colorMode","normal")));let s=i.get(t.pixelSize);return c(s)&&o.appendChild(ln(n,"scale",s/Rq)),o}function Eme(e,t){let n=e.kmlDoc,i=e.valueGetter,o=e.externalFileHandler,r=n.createElement("IconStyle"),s=i.get(t.image);if(c(s)){s=o.texture(s);let m=n.createElement("Icon");m.appendChild(ln(n,"href",s));let p=i.get(t.imageSubRegion);c(p)&&(m.appendChild(ln(n,"x",p.x,Dd)),m.appendChild(ln(n,"y",p.y,Dd)),m.appendChild(ln(n,"w",p.width,Dd)),m.appendChild(ln(n,"h",p.height,Dd))),r.appendChild(m)}let a=i.getColor(t.color);c(a)&&(r.appendChild(ln(n,"color",a)),r.appendChild(ln(n,"colorMode","normal")));let l=i.get(t.scale);c(l)&&r.appendChild(ln(n,"scale",l));let u=i.get(t.pixelOffset);if(c(u)){l=g(l,1),k.divideByScalar(u,l,u);let m=i.get(t.width,Rq),p=i.get(t.height,Rq),_=i.get(t.horizontalOrigin,mi.CENTER);_===mi.CENTER?u.x-=m*.5:_===mi.RIGHT&&(u.x-=m);let b=i.get(t.verticalOrigin,Dn.CENTER);b===Dn.TOP?u.y+=p:b===Dn.CENTER&&(u.y+=p*.5);let x=n.createElement("hotSpot");x.setAttribute("x",-u.x),x.setAttribute("y",u.y),x.setAttribute("xunits","pixels"),x.setAttribute("yunits","pixels"),r.appendChild(x)}let f=i.get(t.rotation),h=i.get(t.alignedAxis);return c(f)&&d.equals(d.UNIT_Z,h)&&(f=O.toDegrees(-f),f===0&&(f=360),r.appendChild(ln(n,"heading",f))),r}function ent(e,t,n,i){let o=e.kmlDoc,r=e.ellipsoid,s=e.valueGetter;if(!c(t))return;let a=o.createElement("LineString"),l=o.createElement("altitudeMode"),u=s.get(t.clampToGround,!1),f;u?(a.appendChild(ln(o,"tessellate",!0)),f=o.createTextNode("clampToGround")):f=o.createTextNode("absolute"),l.appendChild(f),a.appendChild(l);let h=t.positions,m=s.get(h),p=ln(o,"coordinates",v0(m,r));a.appendChild(p);let _=s.get(t.zIndex);u&&c(_)&&a.appendChild(ln(o,"drawOrder",_,Dd)),n.push(a);let b=o.createElement("LineStyle"),x=s.get(t.width);c(x)&&b.appendChild(ln(o,"width",x)),Nq(e,t.material,b),i.push(b)}function tnt(e,t,n){let i=e.kmlDoc,o=e.valueGetter,r=o.get(t.height,0);n>0&&(r=n);let s=t.coordinates,a=o.get(s),l=[],u=[te.northeast,te.southeast,te.southwest,te.northwest];for(let p=0;p<4;++p)u[p](a,Dc),l.push(`${O.toDegrees(Dc.longitude)},${O.toDegrees(Dc.latitude)},${r}`);let f=ln(i,"coordinates",l.join(" ")),h=i.createElement("outerBoundaryIs"),m=i.createElement("LinearRing");return m.appendChild(f),h.appendChild(m),[h]}function _me(e,t,n,i){let o=e.kmlDoc,r=e.ellipsoid,s=[],a=t.length;for(let f=0;f<a;++f)re.fromCartesian(t[f],r,Dc),s.push(`${O.toDegrees(Dc.longitude)},${O.toDegrees(Dc.latitude)},${i?Dc.height:n}`);let l=ln(o,"coordinates",s.join(" ")),u=o.createElement("LinearRing");return u.appendChild(l),u}function nnt(e,t,n){let i=e.kmlDoc,o=e.valueGetter,r=o.get(t.height,0),s=o.get(t.perPositionHeight,!1);!s&&n>0&&(r=n);let a=[],l=t.hierarchy,u=o.get(l),f=Array.isArray(u)?u:u.positions,h=i.createElement("outerBoundaryIs");h.appendChild(_me(e,f,r,s)),a.push(h);let m=u.holes;if(c(m)){let p=m.length;for(let _=0;_<p;++_){let b=i.createElement("innerBoundaryIs");b.appendChild(_me(e,m[_].positions,r,s)),a.push(b)}}return a}function gme(e,t,n,i,o){let r=e.kmlDoc,s=e.valueGetter;if(!c(t))return;let a=t instanceof uh;if(a&&s.getMaterialType(t.material)==="Image"){int(e,t,o);return}let l=r.createElement("Polygon"),u=s.get(t.extrudedHeight,0);u>0&&l.appendChild(ln(r,"extrude",!0));let f=a?tnt(e,t,u):nnt(e,t,u),h=f.length;for(let x=0;x<h;++x)l.appendChild(f[x]);let m=r.createElement("altitudeMode");m.appendChild(I0(e,t.heightReference)),l.appendChild(m),n.push(l);let p=r.createElement("PolyStyle"),_=s.get(t.fill,!1);_&&p.appendChild(ln(r,"fill",_)),Nq(e,t.material,p);let b=s.get(t.outline,!1);if(b){p.appendChild(ln(r,"outline",b));let x=r.createElement("LineStyle"),T=s.get(t.outlineWidth,1);x.appendChild(ln(r,"width",T));let E=s.getColor(t.outlineColor,z.BLACK);x.appendChild(ln(r,"color",E)),x.appendChild(ln(r,"colorMode","normal")),i.push(x)}i.push(p)}function int(e,t,n){let i=e.kmlDoc,o=e.valueGetter,r=e.externalFileHandler,s=i.createElement("GroundOverlay"),a=i.createElement("altitudeMode");a.appendChild(I0(e,t.heightReference)),s.appendChild(a);let l=o.get(t.height);c(l)&&s.appendChild(ln(i,"altitude",l));let u=o.get(t.coordinates),f=i.createElement("LatLonBox");f.appendChild(ln(i,"north",O.toDegrees(u.north))),f.appendChild(ln(i,"south",O.toDegrees(u.south))),f.appendChild(ln(i,"east",O.toDegrees(u.east))),f.appendChild(ln(i,"west",O.toDegrees(u.west))),s.appendChild(f);let h=o.get(t.material),m=r.texture(h.image),p=i.createElement("Icon");p.appendChild(ln(i,"href",m)),s.appendChild(p);let _=h.color;c(_)&&s.appendChild(ln(i,"color",D0(h.color))),n.push(s)}function wme(e,t){let n=e.kmlDoc,i=e.valueGetter,o=e.externalFileHandler,r=n.createElement("Model"),s=i.get(t.scale);if(c(s)){let u=n.createElement("scale");u.appendChild(ln(n,"x",s)),u.appendChild(ln(n,"y",s)),u.appendChild(ln(n,"z",s)),r.appendChild(u)}let a=n.createElement("Link"),l=o.model(t,e.time);return a.appendChild(ln(n,"href",l)),r.appendChild(a),r}function ont(e,t,n,i,o){let r=e.kmlDoc,s=e.ellipsoid,a=e.valueGetter;if(!c(n))return;let l=t.position;if(!l.isConstant){Tme(e,t,n,i,o);return}let u=wme(e,n),f=r.createElement("altitudeMode");f.appendChild(I0(e,n.heightReference)),u.appendChild(f),a.get(l,void 0,ml),re.fromCartesian(ml,s,Dc);let h=r.createElement("Location");h.appendChild(ln(r,"longitude",O.toDegrees(Dc.longitude))),h.appendChild(ln(r,"latitude",O.toDegrees(Dc.latitude))),h.appendChild(ln(r,"altitude",Dc.height)),u.appendChild(h),i.push(u)}function Nq(e,t,n){let i=e.kmlDoc,o=e.valueGetter;if(!c(t))return;let r=o.get(t);if(!c(r))return;let s,a=o.getMaterialType(t),l,u;switch(a){case"Image":s=D0(z.WHITE);break;case"Color":case"Grid":case"PolylineGlow":case"PolylineArrow":case"PolylineDash":s=D0(r.color);break;case"PolylineOutline":s=D0(r.color),l=D0(r.outlineColor),u=r.outlineWidth,n.appendChild(ln(i,"outerColor",l,Dd)),n.appendChild(ln(i,"outerWidth",u,Dd));break;case"Stripe":s=D0(r.oddColor);break}c(s)&&(n.appendChild(ln(i,"color",s)),n.appendChild(ln(i,"colorMode","normal")))}function I0(e,t){let n=e.kmlDoc,o=e.valueGetter.get(t,qe.NONE),r;switch(o){case qe.NONE:r=n.createTextNode("absolute");break;case qe.CLAMP_TO_GROUND:r=n.createTextNode("clampToGround");break;case qe.RELATIVE_TO_GROUND:r=n.createTextNode("relativeToGround");break}return r}function v0(e,t){Array.isArray(e)||(e=[e]);let n=e.length,i=[];for(let o=0;o<n;++o)re.fromCartesian(e[o],t,Dc),i.push(`${O.toDegrees(Dc.longitude)},${O.toDegrees(Dc.latitude)},${Dc.height}`);return i.join(" ")}function ln(e,t,n,i){n=g(n,""),typeof n=="boolean"&&(n=n?"1":"0");let o=c(i)?e.createElementNS(i,t):e.createElement(t),r=n==="string"&&n.indexOf("<")!==-1?e.createCDATASection(n):e.createTextNode(n);return o.appendChild(r),o}function D0(e){let t="",n=e.toBytes();for(let i=3;i>=0;--i)t+=n[i]<16?`0${n[i].toString(16)}`:n[i].toString(16);return t}var Sme=Lq;function rnt(e){let t,n=e.name,i=e.message;c(n)&&c(i)?t=`${n}: ${i}`:t=e.toString();let o=e.stack;return c(o)&&(t+=`
| ${o}`),t}var Hp=rnt;async function snt(e,t,n,i){return c(i)||(i=!1),C.typeOf.object("terrainProvider",e),C.typeOf.number("level",t),C.typeOf.bool("rejectOnTileFail",i),C.defined("positions",n),lnt(e,t,n,i)}function ant(e,t,n){let i=e[0],o=i.terrainProvider.requestTileGeometry(i.x,i.y,i.level);if(!o)return!1;let r;return n?r=o.then(vme(i)):r=o.then(vme(i)).catch(unt(i)),e.shift(),t.push(r),!0}function cnt(e){return new Promise(function(t){setTimeout(t,e)})}function Fq(e,t,n){return e.length?ant(e,t,n)?Fq(e,t,n):cnt(100).then(()=>Fq(e,t,n)):Promise.resolve()}function lnt(e,t,n,i){let o=e.tilingScheme,r,s=[],a={};for(r=0;r<n.length;++r){let u=o.positionToTileXY(n[r],t);if(!c(u))continue;let f=u.toString();if(!a.hasOwnProperty(f)){let h={x:u.x,y:u.y,level:t,tilingScheme:o,terrainProvider:e,positions:[]};a[f]=h,s.push(h)}a[f].positions.push(n[r])}let l=[];return Fq(s,l,i).then(function(){return Promise.all(l).then(function(){return n})})}function Ame(e,t,n){let i=t.interpolateHeight(n,e.longitude,e.latitude);return i===void 0?!1:(e.height=i,!0)}function vme(e){let t=e.positions,n=e.tilingScheme.tileXYToRectangle(e.x,e.y,e.level);return function(i){let o=!1;for(let r=0;r<t.length;++r){let s=t[r];if(!Ame(s,i,n)){o=!0;break}}return o?i.createMesh({tilingScheme:e.tilingScheme,x:e.x,y:e.y,level:e.level,throttle:!1}).then(function(){for(let r=0;r<t.length;++r){let s=t[r];Ame(s,i,n)}}):Promise.resolve()}}function unt(e){let t=e.positions;return function(){for(let n=0;n<t.length;++n){let i=t[n];i.height=void 0}}}var oU=snt;var Bq=new k;async function Dme(e,t,n){if(c(n)||(n=!1),!c(e))throw new w("terrainProvider is required.");if(!c(t))throw new w("positions is required.");let i=[],o=[],r=e.availability;if(!c(r))throw new w("sampleTerrainMostDetailed requires a terrain provider that has tile availability.");let s=[];for(let l=0;l<t.length;++l){let u=t[l],f=r.computeMaximumLevelAtPosition(u);if(o[l]=f,f===0){e.tilingScheme.positionToTileXY(u,1,Bq);let m=e.loadTileDataAvailability(Bq.x,Bq.y,1);c(m)&&s.push(m)}let h=i[f];c(h)||(i[f]=h=[]),h.push(u)}await Promise.all(s),await Promise.all(i.map(function(l,u){if(c(l))return oU(e,u,l,n)}));let a=[];for(let l=0;l<t.length;++l){let u=t[l];r.computeMaximumLevelAtPosition(u)!==o[l]&&a.push(u)}return a.length>0&&await Dme(e,a,n),t}var rU=Dme;async function kq(e,t){let n=t.terrainProvider,i=t.mapProjection,o=i.ellipsoid,r,s=t.camera.getRectangleCameraCoordinates(e);if(t.mode===J.SCENE3D?r=o.cartesianToCartographic(s):r=i.unproject(s),!c(n))return r;let a=n.availability;if(!c(a)||t.mode===J.SCENE2D)return r;let l=[te.center(e),te.southeast(e),te.southwest(e),te.northeast(e),te.northwest(e)],u=await kq._sampleTerrainMostDetailed(n,l),f=!1,h=u.reduce(function(p,_){return c(_.height)?(f=!0,Math.max(_.height,p)):p},-Number.MAX_VALUE),m=r;return f&&(m.height+=h),m}kq._sampleTerrainMostDetailed=rU;var sU=kq;var fnt={NONE:0,LERC:1},Id=Object.freeze(fnt);var dnt={NONE:0,BITS12:1},Js=Object.freeze(dnt);var O0=new d,hnt=new d,xf=new k,aU=new N,mnt=new N,pnt=Math.pow(2,12);function ja(e,t,n,i,o,r,s,a,l,u){let f=Js.NONE,h,m;if(c(t)&&c(n)&&c(i)&&c(o)){let p=t.minimum,_=t.maximum,b=d.subtract(_,p,hnt),x=i-n;Math.max(d.maximumComponent(b),x)<pnt-1?f=Js.BITS12:f=Js.NONE,h=N.inverseTransformation(o,new N);let E=d.negate(p,O0);N.multiply(N.fromTranslation(E,aU),h,h);let S=O0;S.x=1/b.x,S.y=1/b.y,S.z=1/b.z,N.multiply(N.fromScale(S,aU),h,h),m=N.clone(o),N.setTranslation(m,d.ZERO,m),o=N.clone(o,new N);let A=N.fromTranslation(p,aU),v=N.fromScale(b,mnt),D=N.multiply(A,v,aU);N.multiply(o,D,o),N.multiply(m,D,m)}this.quantization=f,this.minimumHeight=n,this.maximumHeight=i,this.center=d.clone(e),this.toScaledENU=h,this.fromScaledENU=o,this.matrix=m,this.hasVertexNormals=r,this.hasWebMercatorT=g(s,!1),this.hasGeodeticSurfaceNormals=g(a,!1),this.exaggeration=g(l,1),this.exaggerationRelativeHeight=g(u,0),this.stride=0,this._offsetGeodeticSurfaceNormal=0,this._offsetVertexNormal=0,this._calculateStrideAndOffsets()}ja.prototype.encode=function(e,t,n,i,o,r,s,a){let l=i.x,u=i.y;if(this.quantization===Js.BITS12){n=N.multiplyByPoint(this.toScaledENU,n,O0),n.x=O.clamp(n.x,0,1),n.y=O.clamp(n.y,0,1),n.z=O.clamp(n.z,0,1);let f=this.maximumHeight-this.minimumHeight,h=O.clamp((o-this.minimumHeight)/f,0,1);k.fromElements(n.x,n.y,xf);let m=On.compressTextureCoordinates(xf);k.fromElements(n.z,h,xf);let p=On.compressTextureCoordinates(xf);k.fromElements(l,u,xf);let _=On.compressTextureCoordinates(xf);if(e[t++]=m,e[t++]=p,e[t++]=_,this.hasWebMercatorT){k.fromElements(s,0,xf);let b=On.compressTextureCoordinates(xf);e[t++]=b}}else d.subtract(n,this.center,O0),e[t++]=O0.x,e[t++]=O0.y,e[t++]=O0.z,e[t++]=o,e[t++]=l,e[t++]=u,this.hasWebMercatorT&&(e[t++]=s);return this.hasVertexNormals&&(e[t++]=On.octPackFloat(r)),this.hasGeodeticSurfaceNormals&&(e[t++]=a.x,e[t++]=a.y,e[t++]=a.z),t};var _nt=new d,Ime=new d;ja.prototype.addGeodeticSurfaceNormals=function(e,t,n){if(this.hasGeodeticSurfaceNormals)return;let i=this.stride,o=e.length/i;this.hasGeodeticSurfaceNormals=!0,this._calculateStrideAndOffsets();let r=this.stride;for(let s=0;s<o;s++){for(let f=0;f<i;f++){let h=s*i+f,m=s*r+f;t[m]=e[h]}let a=this.decodePosition(t,s,_nt),l=n.geodeticSurfaceNormal(a,Ime),u=s*r+this._offsetGeodeticSurfaceNormal;t[u]=l.x,t[u+1]=l.y,t[u+2]=l.z}};ja.prototype.removeGeodeticSurfaceNormals=function(e,t){if(!this.hasGeodeticSurfaceNormals)return;let n=this.stride,i=e.length/n;this.hasGeodeticSurfaceNormals=!1,this._calculateStrideAndOffsets();let o=this.stride;for(let r=0;r<i;r++)for(let s=0;s<o;s++){let a=r*n+s,l=r*o+s;t[l]=e[a]}};ja.prototype.decodePosition=function(e,t,n){if(c(n)||(n=new d),t*=this.stride,this.quantization===Js.BITS12){let i=On.decompressTextureCoordinates(e[t],xf);n.x=i.x,n.y=i.y;let o=On.decompressTextureCoordinates(e[t+1],xf);return n.z=o.x,N.multiplyByPoint(this.fromScaledENU,n,n)}return n.x=e[t],n.y=e[t+1],n.z=e[t+2],d.add(n,this.center,n)};ja.prototype.getExaggeratedPosition=function(e,t,n){n=this.decodePosition(e,t,n);let i=this.exaggeration,o=this.exaggerationRelativeHeight;if(i!==1&&this.hasGeodeticSurfaceNormals){let s=this.decodeGeodeticSurfaceNormal(e,t,Ime),a=this.decodeHeight(e,t),l=Cr.getHeight(a,i,o)-a;n.x+=s.x*l,n.y+=s.y*l,n.z+=s.z*l}return n};ja.prototype.decodeTextureCoordinates=function(e,t,n){return c(n)||(n=new k),t*=this.stride,this.quantization===Js.BITS12?On.decompressTextureCoordinates(e[t+2],n):k.fromElements(e[t+4],e[t+5],n)};ja.prototype.decodeHeight=function(e,t){return t*=this.stride,this.quantization===Js.BITS12?On.decompressTextureCoordinates(e[t+1],xf).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:e[t+3]};ja.prototype.decodeWebMercatorT=function(e,t){return t*=this.stride,this.quantization===Js.BITS12?On.decompressTextureCoordinates(e[t+3],xf).x:e[t+6]};ja.prototype.getOctEncodedNormal=function(e,t,n){t=t*this.stride+this._offsetVertexNormal;let i=e[t]/256,o=Math.floor(i),r=(i-o)*256;return k.fromElements(o,r,n)};ja.prototype.decodeGeodeticSurfaceNormal=function(e,t,n){return t=t*this.stride+this._offsetGeodeticSurfaceNormal,n.x=e[t],n.y=e[t+1],n.z=e[t+2],n};ja.prototype._calculateStrideAndOffsets=function(){let e=0;switch(this.quantization){case Js.BITS12:e+=3;break;default:e+=6}this.hasWebMercatorT&&(e+=1),this.hasVertexNormals&&(this._offsetVertexNormal=e,e+=1),this.hasGeodeticSurfaceNormals&&(this._offsetGeodeticSurfaceNormal=e,e+=3),this.stride=e};var cU={position3DAndHeight:0,textureCoordAndEncodedNormals:1,geodeticSurfaceNormal:2},lU={compressed0:0,compressed1:1,geodeticSurfaceNormal:2};ja.prototype.getAttributes=function(e){let t=j.FLOAT,n=j.getSizeInBytes(t),i=this.stride*n,o=0,r=[];function s(a,l){r.push({index:a,vertexBuffer:e,componentDatatype:t,componentsPerAttribute:l,offsetInBytes:o,strideInBytes:i}),o+=l*n}if(this.quantization===Js.NONE){s(cU.position3DAndHeight,4);let a=2;a+=this.hasWebMercatorT?1:0,a+=this.hasVertexNormals?1:0,s(cU.textureCoordAndEncodedNormals,a),this.hasGeodeticSurfaceNormals&&s(cU.geodeticSurfaceNormal,3)}else{let a=this.hasWebMercatorT||this.hasVertexNormals,l=this.hasWebMercatorT&&this.hasVertexNormals;s(lU.compressed0,a?4:3),l&&s(lU.compressed1,1),this.hasGeodeticSurfaceNormals&&s(lU.geodeticSurfaceNormal,3)}return r};ja.prototype.getAttributeLocations=function(){return this.quantization===Js.NONE?cU:lU};ja.clone=function(e,t){if(c(e))return c(t)||(t=new ja),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=d.clone(e.center),t.toScaledENU=N.clone(e.toScaledENU),t.fromScaledENU=N.clone(e.fromScaledENU),t.matrix=N.clone(e.matrix),t.hasVertexNormals=e.hasVertexNormals,t.hasWebMercatorT=e.hasWebMercatorT,t.hasGeodeticSurfaceNormals=e.hasGeodeticSurfaceNormals,t.exaggeration=e.exaggeration,t.exaggerationRelativeHeight=e.exaggerationRelativeHeight,t._calculateStrideAndOffsets(),t};var Ic=ja;var im={};im.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var Uq=new d,gnt=new N,ynt=new d,bnt=new d;im.computeVertices=function(e){if(!c(e)||!c(e.heightmap))throw new w("options.heightmap is required.");if(!c(e.width)||!c(e.height))throw new w("options.width and options.height are required.");if(!c(e.nativeRectangle))throw new w("options.nativeRectangle is required.");if(!c(e.skirtHeight))throw new w("options.skirtHeight is required.");let t=Math.cos,n=Math.sin,i=Math.sqrt,o=Math.atan,r=Math.exp,s=O.PI_OVER_TWO,a=O.toRadians,l=e.heightmap,u=e.width,f=e.height,h=e.skirtHeight,m=h>0,p=g(e.isGeographic,!0),_=g(e.ellipsoid,Z.default),b=1/_.maximumRadius,x=te.clone(e.nativeRectangle),T=te.clone(e.rectangle),E,S,A,v;c(T)?(E=T.west,S=T.south,A=T.east,v=T.north):p?(E=a(x.west),S=a(x.south),A=a(x.east),v=a(x.north)):(E=x.west*b,S=s-2*o(r(-x.south*b)),A=x.east*b,v=s-2*o(r(-x.north*b)));let D=e.relativeToCenter,R=c(D);D=R?D:d.ZERO;let P=g(e.includeWebMercatorT,!1),L=g(e.exaggeration,1),F=g(e.exaggerationRelativeHeight,0),I=L!==1,M=g(e.structure,im.DEFAULT_STRUCTURE),B=g(M.heightScale,im.DEFAULT_STRUCTURE.heightScale),U=g(M.heightOffset,im.DEFAULT_STRUCTURE.heightOffset),V=g(M.elementsPerHeight,im.DEFAULT_STRUCTURE.elementsPerHeight),W=g(M.stride,im.DEFAULT_STRUCTURE.stride),H=g(M.elementMultiplier,im.DEFAULT_STRUCTURE.elementMultiplier),X=g(M.isBigEndian,im.DEFAULT_STRUCTURE.isBigEndian),$=te.computeWidth(x),ae=te.computeHeight(x),se=$/(u-1),he=ae/(f-1);p||($*=b,ae*=b);let ge=_.radiiSquared,le=ge.x,me=ge.y,Me=ge.z,Ge=65536,De=-65536,ke=Lt.eastNorthUpToFixedFrame(D,_),He=N.inverseTransformation(ke,gnt),ft,Ie;P&&(ft=Si.geodeticLatitudeToMercatorAngle(S),Ie=1/(Si.geodeticLatitudeToMercatorAngle(v)-ft));let Kt=ynt;Kt.x=Number.POSITIVE_INFINITY,Kt.y=Number.POSITIVE_INFINITY,Kt.z=Number.POSITIVE_INFINITY;let Pt=bnt;Pt.x=Number.NEGATIVE_INFINITY,Pt.y=Number.NEGATIVE_INFINITY,Pt.z=Number.NEGATIVE_INFINITY;let dt=Number.POSITIVE_INFINITY,rn=u*f,Vt=h>0?u*2+f*2:0,Ae=rn+Vt,Qe=new Array(Ae),et=new Array(Ae),at=new Array(Ae),$t=P?new Array(Ae):[],pe=I?new Array(Ae):[],_e=0,rt=f,Ri=0,ot=u;m&&(--_e,++rt,--Ri,++ot);let uo=1e-5;for(let Ye=_e;Ye<rt;++Ye){let ct=Ye;ct<0&&(ct=0),ct>=f&&(ct=f-1);let At=x.north-he*ct;p?At=a(At):At=s-2*o(r(-At*b));let hn=(At-S)/(v-S);hn=O.clamp(hn,0,1);let ao=Ye===_e,Yo=Ye===rt-1;h>0&&(ao?At+=uo*ae:Yo&&(At-=uo*ae));let ya=t(At),ba=n(At),Hr=Me*ba,Gn;P&&(Gn=(Si.geodeticLatitudeToMercatorAngle(At)-ft)*Ie);for(let ts=Ri;ts<ot;++ts){let yr=ts;yr<0&&(yr=0),yr>=u&&(yr=u-1);let Bc=ct*(u*W)+yr*W,fo;if(V===1)fo=l[Bc];else{fo=0;let ho;if(X)for(ho=0;ho<V;++ho)fo=fo*H+l[Bc+ho];else for(ho=V-1;ho>=0;--ho)fo=fo*H+l[Bc+ho]}fo=fo*B+U,De=Math.max(De,fo),Ge=Math.min(Ge,fo);let Rr=x.west+se*yr;p?Rr=a(Rr):Rr=Rr*b;let xm=(Rr-E)/(A-E);xm=O.clamp(xm,0,1);let kc=ct*u+yr;if(h>0){let ho=ts===Ri,Cu=ts===ot-1,fx=ao||Yo||ho||Cu;if((ao||Yo)&&(ho||Cu))continue;fx&&(fo-=h,ho?(kc=rn+(f-ct-1),Rr-=uo*$):Yo?kc=rn+f+(u-yr-1):Cu?(kc=rn+f+u+ct,Rr+=uo*$):ao&&(kc=rn+f+u+f+yr))}let Tm=ya*t(Rr),xa=ya*n(Rr),br=le*Tm,na=me*xa,Cm=1/i(br*Tm+na*xa+Hr*ba),ii=br*Cm,Qa=na*Cm,wl=Hr*Cm,Tu=new d;Tu.x=ii+Tm*fo,Tu.y=Qa+xa*fo,Tu.z=wl+ba*fo,N.multiplyByPoint(He,Tu,Uq),d.minimumByComponent(Uq,Kt,Kt),d.maximumByComponent(Uq,Pt,Pt),dt=Math.min(dt,fo),Qe[kc]=Tu,at[kc]=new k(xm,hn),et[kc]=fo,P&&($t[kc]=Gn),I&&(pe[kc]=_.geodeticSurfaceNormal(Tu))}}let ir=ne.fromPoints(Qe),Ja;c(T)&&(Ja=wn.fromRectangle(T,Ge,De,_));let gr;R&&(gr=new Rg(_).computeHorizonCullingPointPossiblyUnderEllipsoid(D,Qe,Ge));let Vr=new lb(Kt,Pt,D),Le=new Ic(D,Vr,dt,De,ke,!1,P,I,L,F),it=new Float32Array(Ae*Le.stride),We=0;for(let Ye=0;Ye<Ae;++Ye)We=Le.encode(it,We,Qe[Ye],at[Ye],et[Ye],void 0,$t[Ye],pe[Ye]);return{vertices:it,maximumHeight:De,minimumHeight:Ge,encoding:Le,boundingSphere3D:ir,orientedBoundingBox:Ja,occludeePointInScaledSpace:gr}};var MD=im;function hy(){w.throwInstantiationError()}Object.defineProperties(hy.prototype,{credits:{get:w.throwInstantiationError},waterMask:{get:w.throwInstantiationError}});hy.prototype.interpolateHeight=w.throwInstantiationError;hy.prototype.isChildAvailable=w.throwInstantiationError;hy.prototype.createMesh=w.throwInstantiationError;hy.prototype.upsample=w.throwInstantiationError;hy.prototype.wasCreatedByUpsampling=w.throwInstantiationError;hy.maximumAsynchronousTasks=5;var om=hy;function xnt(e,t,n,i,o,r,s,a,l,u,f,h,m,p,_,b){this.center=e,this.vertices=t,this.stride=g(u,6),this.indices=n,this.indexCountWithoutSkirts=i,this.vertexCountWithoutSkirts=o,this.minimumHeight=r,this.maximumHeight=s,this.boundingSphere3D=a,this.occludeePointInScaledSpace=l,this.orientedBoundingBox=f,this.encoding=h,this.westIndicesSouthToNorth=m,this.southIndicesEastToWest=p,this.eastIndicesNorthToSouth=_,this.northIndicesWestToEast=b}var Od=xnt;function Oc(){w.throwInstantiationError()}Object.defineProperties(Oc.prototype,{errorEvent:{get:w.throwInstantiationError},credit:{get:w.throwInstantiationError},tilingScheme:{get:w.throwInstantiationError},hasWaterMask:{get:w.throwInstantiationError},hasVertexNormals:{get:w.throwInstantiationError},availability:{get:w.throwInstantiationError}});var Ome=[];Oc.getRegularGridIndices=function(e,t){if(e*t>=O.FOUR_GIGABYTES)throw new w("The total number of vertices (width * height) must be less than 4,294,967,296.");let n=Ome[e];c(n)||(Ome[e]=n=[]);let i=n[t];return c(i)||(e*t<O.SIXTY_FOUR_KILOBYTES?i=n[t]=new Uint16Array((e-1)*(t-1)*6):i=n[t]=new Uint32Array((e-1)*(t-1)*6),Lme(e,t,i,0)),i};var Pme=[];Oc.getRegularGridIndicesAndEdgeIndices=function(e,t){if(e*t>=O.FOUR_GIGABYTES)throw new w("The total number of vertices (width * height) must be less than 4,294,967,296.");let n=Pme[e];c(n)||(Pme[e]=n=[]);let i=n[t];if(!c(i)){let o=Oc.getRegularGridIndices(e,t),r=Mme(e,t),s=r.westIndicesSouthToNorth,a=r.southIndicesEastToWest,l=r.eastIndicesNorthToSouth,u=r.northIndicesWestToEast;i=n[t]={indices:o,westIndicesSouthToNorth:s,southIndicesEastToWest:a,eastIndicesNorthToSouth:l,northIndicesWestToEast:u}}return i};var Rme=[];Oc.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){if(e*t>=O.FOUR_GIGABYTES)throw new w("The total number of vertices (width * height) must be less than 4,294,967,296.");let n=Rme[e];c(n)||(Rme[e]=n=[]);let i=n[t];if(!c(i)){let o=e*t,r=(e-1)*(t-1)*6,s=e*2+t*2,a=Math.max(0,s-4)*6,l=o+s,u=r+a,f=Mme(e,t),h=f.westIndicesSouthToNorth,m=f.southIndicesEastToWest,p=f.eastIndicesNorthToSouth,_=f.northIndicesWestToEast,b=Oe.createTypedArray(l,u);Lme(e,t,b,0),Oc.addSkirtIndices(h,m,p,_,o,b,r),i=n[t]={indices:b,westIndicesSouthToNorth:h,southIndicesEastToWest:m,eastIndicesNorthToSouth:p,northIndicesWestToEast:_,indexCountWithoutSkirts:r}}return i};Oc.addSkirtIndices=function(e,t,n,i,o,r,s){let a=o;s=uU(e,a,r,s),a+=e.length,s=uU(t,a,r,s),a+=t.length,s=uU(n,a,r,s),a+=n.length,uU(i,a,r,s)};function Mme(e,t){let n=new Array(t),i=new Array(e),o=new Array(t),r=new Array(e),s;for(s=0;s<e;++s)r[s]=s,i[s]=e*t-1-s;for(s=0;s<t;++s)o[s]=(s+1)*e-1,n[s]=(t-s-1)*e;return{westIndicesSouthToNorth:n,southIndicesEastToWest:i,eastIndicesNorthToSouth:o,northIndicesWestToEast:r}}function Lme(e,t,n,i){let o=0;for(let r=0;r<t-1;++r){for(let s=0;s<e-1;++s){let a=o,l=a+e,u=l+1,f=a+1;n[i++]=a,n[i++]=l,n[i++]=f,n[i++]=f,n[i++]=l,n[i++]=u,++o}++o}}function uU(e,t,n,i){let o=e[0],r=e.length;for(let s=1;s<r;++s){let a=e[s];n[i++]=o,n[i++]=a,n[i++]=t,n[i++]=t,n[i++]=a,n[i++]=t+1,o=a,++t}return i}Oc.heightmapTerrainQuality=.25;Oc.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,n){return e.maximumRadius*2*Math.PI*Oc.heightmapTerrainQuality/(t*n)};Oc.prototype.requestTileGeometry=w.throwInstantiationError;Oc.prototype.getLevelMaximumGeometricError=w.throwInstantiationError;Oc.prototype.getTileDataAvailable=w.throwInstantiationError;Oc.prototype.loadTileDataAvailability=w.throwInstantiationError;var Jr=Oc;function Gp(e){if(!c(e)||!c(e.buffer))throw new w("options.buffer is required.");if(!c(e.width))throw new w("options.width is required.");if(!c(e.height))throw new w("options.height is required.");this._buffer=e.buffer,this._width=e.width,this._height=e.height,this._childTileMask=g(e.childTileMask,15),this._encoding=g(e.encoding,Id.NONE);let t=MD.DEFAULT_STRUCTURE,n=e.structure;c(n)?n!==t&&(n.heightScale=g(n.heightScale,t.heightScale),n.heightOffset=g(n.heightOffset,t.heightOffset),n.elementsPerHeight=g(n.elementsPerHeight,t.elementsPerHeight),n.stride=g(n.stride,t.stride),n.elementMultiplier=g(n.elementMultiplier,t.elementMultiplier),n.isBigEndian=g(n.isBigEndian,t.isBigEndian)):n=t,this._structure=n,this._createdByUpsampling=g(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._skirtHeight=void 0,this._bufferType=this._encoding===Id.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0}Object.defineProperties(Gp.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}}});var Nme="createVerticesFromHeightmap",Tnt=new hi(Nme),Cnt=new hi(Nme,om.maximumAsynchronousTasks);Gp.prototype.createMesh=function(e){e=g(e,g.EMPTY_OBJECT),C.typeOf.object("options.tilingScheme",e.tilingScheme),C.typeOf.number("options.x",e.x),C.typeOf.number("options.y",e.y),C.typeOf.number("options.level",e.level);let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=g(e.exaggeration,1),s=g(e.exaggerationRelativeHeight,0),a=g(e.throttle,!0),l=t.ellipsoid,u=t.tileXYToNativeRectangle(n,i,o),f=t.tileXYToRectangle(n,i,o),h=l.cartographicToCartesian(te.center(f)),m=this._structure,_=Jr.getEstimatedLevelZeroGeometricErrorForAHeightmap(l,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<o);this._skirtHeight=Math.min(_*4,1e3);let x=(a?Cnt:Tnt).scheduleTask({heightmap:this._buffer,structure:m,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:u,rectangle:f,relativeToCenter:h,ellipsoid:l,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof Ei,exaggeration:r,exaggerationRelativeHeight:s,encoding:this._encoding});if(!c(x))return;let T=this;return Promise.resolve(x).then(function(E){let S;T._skirtHeight>0?S=Jr.getRegularGridAndSkirtIndicesAndEdgeIndices(E.gridWidth,E.gridHeight):S=Jr.getRegularGridIndicesAndEdgeIndices(E.gridWidth,E.gridHeight);let A=E.gridWidth*E.gridHeight;return T._mesh=new Od(h,new Float32Array(E.vertices),S.indices,S.indexCountWithoutSkirts,A,E.minimumHeight,E.maximumHeight,ne.clone(E.boundingSphere3D),d.clone(E.occludeePointInScaledSpace),E.numberOfAttributes,wn.clone(E.orientedBoundingBox),Ic.clone(E.encoding),S.westIndicesSouthToNorth,S.southIndicesEastToWest,S.eastIndicesNorthToSouth,S.northIndicesWestToEast),T._buffer=void 0,T._mesh})};Gp.prototype._createMeshSync=function(e){C.typeOf.object("options.tilingScheme",e.tilingScheme),C.typeOf.number("options.x",e.x),C.typeOf.number("options.y",e.y),C.typeOf.number("options.level",e.level);let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=g(e.exaggeration,1),s=g(e.exaggerationRelativeHeight,0),a=t.ellipsoid,l=t.tileXYToNativeRectangle(n,i,o),u=t.tileXYToRectangle(n,i,o),f=a.cartographicToCartesian(te.center(u)),h=this._structure,p=Jr.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<o);this._skirtHeight=Math.min(p*4,1e3);let _=MD.computeVertices({heightmap:this._buffer,structure:h,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:l,rectangle:u,relativeToCenter:f,ellipsoid:a,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof Ei,exaggeration:r,exaggerationRelativeHeight:s});this._buffer=void 0;let b;this._skirtHeight>0?b=Jr.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):b=Jr.getRegularGridIndicesAndEdgeIndices(this._width,this._height);let x=_.gridWidth*_.gridHeight;return this._mesh=new Od(f,_.vertices,b.indices,b.indexCountWithoutSkirts,x,_.minimumHeight,_.maximumHeight,_.boundingSphere3D,_.occludeePointInScaledSpace,_.encoding.stride,_.orientedBoundingBox,_.encoding,b.westIndicesSouthToNorth,b.southIndicesEastToWest,b.eastIndicesNorthToSouth,b.northIndicesWestToEast),this._mesh};Gp.prototype.interpolateHeight=function(e,t,n){let i=this._width,o=this._height,r=this._structure,s=r.stride,a=r.elementsPerHeight,l=r.elementMultiplier,u=r.isBigEndian,f=r.heightOffset,h=r.heightScale,m=c(this._mesh),p=this._encoding===Id.LERC;if(!m&&p)return;let b;if(m){let x=this._mesh.vertices,T=this._mesh.encoding;b=Fme(x,T,f,h,e,i,o,t,n)}else b=Ent(this._buffer,a,l,s,u,e,i,o,t,n),b=b*h+f;return b};Gp.prototype.upsample=function(e,t,n,i,o,r,s){if(!c(e))throw new w("tilingScheme is required.");if(!c(t))throw new w("thisX is required.");if(!c(n))throw new w("thisY is required.");if(!c(i))throw new w("thisLevel is required.");if(!c(o))throw new w("descendantX is required.");if(!c(r))throw new w("descendantY is required.");if(!c(s))throw new w("descendantLevel is required.");if(s-i>1)throw new w("Upsampling through more than one level at a time is not currently supported.");let l=this._mesh;if(!c(l))return;let u=this._width,f=this._height,h=this._structure,m=h.stride,p=new this._bufferType(u*f*m),_=l.vertices,b=l.encoding,x=e.tileXYToRectangle(t,n,i),T=e.tileXYToRectangle(o,r,s),E=h.heightOffset,S=h.heightScale,A=h.elementsPerHeight,v=h.elementMultiplier,D=h.isBigEndian,R=Math.pow(v,A-1);for(let P=0;P<f;++P){let L=O.lerp(T.north,T.south,P/(f-1));for(let F=0;F<u;++F){let y=O.lerp(T.west,T.east,F/(u-1)),I=Fme(_,b,E,S,x,u,f,y,L);I=I<h.lowestEncodedHeight?h.lowestEncodedHeight:I,I=I>h.highestEncodedHeight?h.highestEncodedHeight:I,wnt(p,A,v,R,m,D,P*u+F,I)}}return Promise.resolve(new Gp({buffer:p,width:u,height:f,childTileMask:0,structure:this._structure,createdByUpsampling:!0}))};Gp.prototype.isChildAvailable=function(e,t,n,i){if(!c(e))throw new w("thisX is required.");if(!c(t))throw new w("thisY is required.");if(!c(n))throw new w("childX is required.");if(!c(i))throw new w("childY is required.");let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};Gp.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};function Ent(e,t,n,i,o,r,s,a,l,u){let f=(l-r.west)*(s-1)/(r.east-r.west),h=(u-r.south)*(a-1)/(r.north-r.south),m=f|0,p=m+1;p>=s&&(p=s-1,m=s-2);let _=h|0,b=_+1;b>=a&&(b=a-1,_=a-2);let x=f-m,T=h-_;_=a-1-_,b=a-1-b;let E=fU(e,t,n,i,o,_*s+m),S=fU(e,t,n,i,o,_*s+p),A=fU(e,t,n,i,o,b*s+m),v=fU(e,t,n,i,o,b*s+p);return Bme(x,T,E,S,A,v)}function Fme(e,t,n,i,o,r,s,a,l){let u=(a-o.west)*(r-1)/(o.east-o.west),f=(l-o.south)*(s-1)/(o.north-o.south),h=u|0,m=h+1;m>=r&&(m=r-1,h=r-2);let p=f|0,_=p+1;_>=s&&(_=s-1,p=s-2);let b=u-h,x=f-p;p=s-1-p,_=s-1-_;let T=(t.decodeHeight(e,p*r+h)-n)/i,E=(t.decodeHeight(e,p*r+m)-n)/i,S=(t.decodeHeight(e,_*r+h)-n)/i,A=(t.decodeHeight(e,_*r+m)-n)/i;return Bme(b,x,T,E,S,A)}function Bme(e,t,n,i,o,r){return t<e?n+e*(i-n)+t*(r-i):n+e*(r-o)+t*(o-n)}function fU(e,t,n,i,o,r){r*=i;let s=0,a;if(o)for(a=0;a<t;++a)s=s*n+e[r+a];else for(a=t-1;a>=0;--a)s=s*n+e[r+a];return s}function wnt(e,t,n,i,o,r,s,a){s*=o;let l;if(r)for(l=0;l<t-1;++l)e[s+l]=a/i|0,a-=e[s+l]*i,i/=n;else for(l=t-1;l>0;--l)e[s+l]=a/i|0,a-=e[s+l]*i,i/=n;e[s+l]=a}var Wa=Gp;function jE(e){e=g(e,g.EMPTY_OBJECT),this._tilingScheme=e.tilingScheme,c(this._tilingScheme)||(this._tilingScheme=new Hi({ellipsoid:g(e.ellipsoid,Z.default)})),this._levelZeroMaximumGeometricError=Jr.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new fe}Object.defineProperties(jE.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});jE.prototype.requestTileGeometry=function(e,t,n,i){return Promise.resolve(new Wa({buffer:new Uint8Array(16*16),width:16,height:16}))};jE.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};jE.prototype.getTileDataAvailable=function(e,t,n){};jE.prototype.loadTileDataAvailability=function(e,t,n){};var dU=jE;var hU=`uniform vec4 u_initialColor;
|
| #if TEXTURE_UNITS > 0
| uniform sampler2D u_dayTextures[TEXTURE_UNITS];
| uniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];
| uniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];
|
| #ifdef APPLY_ALPHA
| uniform float u_dayTextureAlpha[TEXTURE_UNITS];
| #endif
|
| #ifdef APPLY_DAY_NIGHT_ALPHA
| uniform float u_dayTextureNightAlpha[TEXTURE_UNITS];
| uniform float u_dayTextureDayAlpha[TEXTURE_UNITS];
| #endif
|
| #ifdef APPLY_SPLIT
| uniform float u_dayTextureSplit[TEXTURE_UNITS];
| #endif
|
| #ifdef APPLY_BRIGHTNESS
| uniform float u_dayTextureBrightness[TEXTURE_UNITS];
| #endif
|
| #ifdef APPLY_CONTRAST
| uniform float u_dayTextureContrast[TEXTURE_UNITS];
| #endif
|
| #ifdef APPLY_HUE
| uniform float u_dayTextureHue[TEXTURE_UNITS];
| #endif
|
| #ifdef APPLY_SATURATION
| uniform float u_dayTextureSaturation[TEXTURE_UNITS];
| #endif
|
| #ifdef APPLY_GAMMA
| uniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];
| #endif
|
| #ifdef APPLY_IMAGERY_CUTOUT
| uniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];
| #endif
|
| #ifdef APPLY_COLOR_TO_ALPHA
| uniform vec4 u_colorsToAlpha[TEXTURE_UNITS];
| #endif
|
| uniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];
| #endif
|
| #if defined(HAS_WATER_MASK) && (defined(SHOW_REFLECTIVE_OCEAN) || defined(APPLY_MATERIAL))
| uniform sampler2D u_waterMask;
| uniform vec4 u_waterMaskTranslationAndScale;
| uniform float u_zoomedOutOceanSpecularIntensity;
| #endif
|
| #ifdef SHOW_OCEAN_WAVES
| uniform sampler2D u_oceanNormalMap;
| #endif
|
| #if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)
| uniform vec2 u_lightingFadeDistance;
| #endif
|
| #ifdef TILE_LIMIT_RECTANGLE
| uniform vec4 u_cartographicLimitRectangle;
| #endif
|
| #ifdef GROUND_ATMOSPHERE
| uniform vec2 u_nightFadeDistance;
| #endif
|
| #ifdef ENABLE_CLIPPING_PLANES
| uniform highp sampler2D u_clippingPlanes;
| uniform mat4 u_clippingPlanesMatrix;
| uniform vec4 u_clippingPlanesEdgeStyle;
| #endif
|
| #ifdef ENABLE_CLIPPING_POLYGONS
| uniform highp sampler2D u_clippingDistance;
| in vec2 v_clippingPosition;
| flat in int v_regionIndex;
| #endif
|
| #if defined(GROUND_ATMOSPHERE) || defined(FOG) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
| uniform float u_minimumBrightness;
| #endif
|
| #ifdef COLOR_CORRECT
| uniform vec3 u_hsbShift; // Hue, saturation, brightness
| #endif
|
| #ifdef HIGHLIGHT_FILL_TILE
| uniform vec4 u_fillHighlightColor;
| #endif
|
| #ifdef TRANSLUCENT
| uniform vec4 u_frontFaceAlphaByDistance;
| uniform vec4 u_backFaceAlphaByDistance;
| uniform vec4 u_translucencyRectangle;
| #endif
|
| #ifdef UNDERGROUND_COLOR
| uniform vec4 u_undergroundColor;
| uniform vec4 u_undergroundColorAlphaByDistance;
| #endif
|
| #ifdef ENABLE_VERTEX_LIGHTING
| uniform float u_lambertDiffuseMultiplier;
| uniform float u_vertexShadowDarkness;
| #endif
|
| in vec3 v_positionMC;
| in vec3 v_positionEC;
| in vec3 v_textureCoordinates;
| in vec3 v_normalMC;
| in vec3 v_normalEC;
|
| #ifdef APPLY_MATERIAL
| in float v_height;
| in float v_slope;
| in float v_aspect;
| #endif
|
| #if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
| in float v_distance;
| #endif
|
| #if defined(GROUND_ATMOSPHERE) || defined(FOG)
| in vec3 v_atmosphereRayleighColor;
| in vec3 v_atmosphereMieColor;
| in float v_atmosphereOpacity;
| #endif
|
| #if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
| float interpolateByDistance(vec4 nearFarScalar, float distance)
| {
| float startDistance = nearFarScalar.x;
| float startValue = nearFarScalar.y;
| float endDistance = nearFarScalar.z;
| float endValue = nearFarScalar.w;
| float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);
| return mix(startValue, endValue, t);
| }
| #endif
|
| #if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT) || defined(APPLY_MATERIAL)
| vec4 alphaBlend(vec4 sourceColor, vec4 destinationColor)
| {
| return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);
| }
| #endif
|
| #ifdef TRANSLUCENT
| bool inTranslucencyRectangle()
| {
| return
| v_textureCoordinates.x > u_translucencyRectangle.x &&
| v_textureCoordinates.x < u_translucencyRectangle.z &&
| v_textureCoordinates.y > u_translucencyRectangle.y &&
| v_textureCoordinates.y < u_translucencyRectangle.w;
| }
| #endif
|
| vec4 sampleAndBlend(
| vec4 previousColor,
| sampler2D textureToSample,
| vec2 tileTextureCoordinates,
| vec4 textureCoordinateRectangle,
| vec4 textureCoordinateTranslationAndScale,
| float textureAlpha,
| float textureNightAlpha,
| float textureDayAlpha,
| float textureBrightness,
| float textureContrast,
| float textureHue,
| float textureSaturation,
| float textureOneOverGamma,
| float split,
| vec4 colorToAlpha,
| float nightBlend)
| {
| // This crazy step stuff sets the alpha to 0.0 if this following condition is true:
| // tileTextureCoordinates.s < textureCoordinateRectangle.s ||
| // tileTextureCoordinates.s > textureCoordinateRectangle.p ||
| // tileTextureCoordinates.t < textureCoordinateRectangle.t ||
| // tileTextureCoordinates.t > textureCoordinateRectangle.q
| // In other words, the alpha is zero if the fragment is outside the rectangle
| // covered by this texture. Would an actual 'if' yield better performance?
| vec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);
| textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;
|
| alphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);
| textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;
|
| #if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)
| textureAlpha *= mix(textureDayAlpha, textureNightAlpha, nightBlend);
| #endif
|
| vec2 translation = textureCoordinateTranslationAndScale.xy;
| vec2 scale = textureCoordinateTranslationAndScale.zw;
| vec2 textureCoordinates = tileTextureCoordinates * scale + translation;
| vec4 value = texture(textureToSample, textureCoordinates);
| vec3 color = value.rgb;
| float alpha = value.a;
|
| #ifdef APPLY_COLOR_TO_ALPHA
| vec3 colorDiff = abs(color.rgb - colorToAlpha.rgb);
| colorDiff.r = czm_maximumComponent(colorDiff);
| alpha = czm_branchFreeTernary(colorDiff.r < colorToAlpha.a, 0.0, alpha);
| #endif
|
| #if !defined(APPLY_GAMMA)
| vec4 tempColor = czm_gammaCorrect(vec4(color, alpha));
| color = tempColor.rgb;
| alpha = tempColor.a;
| #else
| color = pow(color, vec3(textureOneOverGamma));
| #endif
|
| #ifdef APPLY_SPLIT
| float splitPosition = czm_splitPosition;
| // Split to the left
| if (split < 0.0 && gl_FragCoord.x > splitPosition) {
| alpha = 0.0;
| }
| // Split to the right
| else if (split > 0.0 && gl_FragCoord.x < splitPosition) {
| alpha = 0.0;
| }
| #endif
|
| #ifdef APPLY_BRIGHTNESS
| color = mix(vec3(0.0), color, textureBrightness);
| #endif
|
| #ifdef APPLY_CONTRAST
| color = mix(vec3(0.5), color, textureContrast);
| #endif
|
| #ifdef APPLY_HUE
| color = czm_hue(color, textureHue);
| #endif
|
| #ifdef APPLY_SATURATION
| color = czm_saturation(color, textureSaturation);
| #endif
|
| float sourceAlpha = alpha * textureAlpha;
| float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);
| outAlpha += sign(outAlpha) - 1.0;
|
| vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;
|
| // When rendering imagery for a tile in multiple passes,
| // some GPU/WebGL implementation combinations will not blend fragments in
| // additional passes correctly if their computation includes an unmasked
| // divide-by-zero operation,
| // even if it's not in the output or if the output has alpha zero.
| //
| // For example, without sanitization for outAlpha,
| // this renders without artifacts:
| // if (outAlpha == 0.0) { outColor = vec3(0.0); }
| //
| // but using czm_branchFreeTernary will cause portions of the tile that are
| // alpha-zero in the additional pass to render as black instead of blending
| // with the previous pass:
| // outColor = czm_branchFreeTernary(outAlpha == 0.0, vec3(0.0), outColor);
| //
| // So instead, sanitize against divide-by-zero,
| // store this state on the sign of outAlpha, and correct on return.
|
| return vec4(outColor, max(outAlpha, 0.0));
| }
|
| vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend);
| vec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float specularMapValue, float fade);
|
| const float fExposure = 2.0;
|
| vec3 computeEllipsoidPosition()
| {
| float mpp = czm_metersPerPixel(vec4(0.0, 0.0, -czm_currentFrustum.x, 1.0), 1.0);
| vec2 xy = gl_FragCoord.xy / czm_viewport.zw * 2.0 - vec2(1.0);
| xy *= czm_viewport.zw * mpp * 0.5;
|
| vec3 direction = normalize(vec3(xy, -czm_currentFrustum.x));
| czm_ray ray = czm_ray(vec3(0.0), direction);
|
| vec3 ellipsoid_center = czm_view[3].xyz;
|
| czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);
|
| vec3 ellipsoidPosition = czm_pointAlongRay(ray, intersection.start);
| return (czm_inverseView * vec4(ellipsoidPosition, 1.0)).xyz;
| }
|
| void main()
| {
| #ifdef TILE_LIMIT_RECTANGLE
| if (v_textureCoordinates.x < u_cartographicLimitRectangle.x || u_cartographicLimitRectangle.z < v_textureCoordinates.x ||
| v_textureCoordinates.y < u_cartographicLimitRectangle.y || u_cartographicLimitRectangle.w < v_textureCoordinates.y)
| {
| discard;
| }
| #endif
|
| #ifdef ENABLE_CLIPPING_PLANES
| float clipDistance = clip(gl_FragCoord, u_clippingPlanes, u_clippingPlanesMatrix);
| #endif
|
| #if defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(HDR)
| vec3 normalMC = czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)); // normalized surface normal in model coordinates
| vec3 normalEC = czm_normal3D * normalMC; // normalized surface normal in eye coordinates
| #endif
|
| #if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)
| float nightBlend = 1.0 - clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0, 0.0, 1.0);
| #else
| float nightBlend = 0.0;
| #endif
|
| // The clamp below works around an apparent bug in Chrome Canary v23.0.1241.0
| // where the fragment shader sees textures coordinates < 0.0 and > 1.0 for the
| // fragments on the edges of tiles even though the vertex shader is outputting
| // coordinates strictly in the 0-1 range.
| vec4 color = computeDayColor(u_initialColor, clamp(v_textureCoordinates, 0.0, 1.0), nightBlend);
|
| #ifdef SHOW_TILE_BOUNDARIES
| if (v_textureCoordinates.x < (1.0/256.0) || v_textureCoordinates.x > (255.0/256.0) ||
| v_textureCoordinates.y < (1.0/256.0) || v_textureCoordinates.y > (255.0/256.0))
| {
| color = vec4(1.0, 0.0, 0.0, 1.0);
| }
| #endif
|
| #if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)
| float cameraDist;
| if (czm_sceneMode == czm_sceneMode2D)
| {
| cameraDist = max(czm_frustumPlanes.x - czm_frustumPlanes.y, czm_frustumPlanes.w - czm_frustumPlanes.z) * 0.5;
| }
| else if (czm_sceneMode == czm_sceneModeColumbusView)
| {
| cameraDist = -czm_view[3].z;
| }
| else
| {
| cameraDist = length(czm_view[3]);
| }
| float fadeOutDist = u_lightingFadeDistance.x;
| float fadeInDist = u_lightingFadeDistance.y;
| if (czm_sceneMode != czm_sceneMode3D) {
| vec3 radii = czm_ellipsoidRadii;
| float maxRadii = max(radii.x, max(radii.y, radii.z));
| fadeOutDist -= maxRadii;
| fadeInDist -= maxRadii;
| }
| float fade = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);
| #else
| float fade = 0.0;
| #endif
|
| #if defined(HAS_WATER_MASK) && (defined(SHOW_REFLECTIVE_OCEAN) || defined(APPLY_MATERIAL))
| vec2 waterMaskTranslation = u_waterMaskTranslationAndScale.xy;
| vec2 waterMaskScale = u_waterMaskTranslationAndScale.zw;
| vec2 waterMaskTextureCoordinates = v_textureCoordinates.xy * waterMaskScale + waterMaskTranslation;
| waterMaskTextureCoordinates.y = 1.0 - waterMaskTextureCoordinates.y;
|
| float mask = texture(u_waterMask, waterMaskTextureCoordinates).r;
|
| #ifdef SHOW_REFLECTIVE_OCEAN
| if (mask > 0.0)
| {
| mat3 enuToEye = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalEC);
|
| vec2 ellipsoidTextureCoordinates = czm_ellipsoidTextureCoordinates(normalMC);
| vec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidTextureCoordinates(normalMC.zyx);
|
| vec2 textureCoordinates = mix(ellipsoidTextureCoordinates, ellipsoidFlippedTextureCoordinates, czm_morphTime * smoothstep(0.9, 0.95, normalMC.z));
|
| color = computeWaterColor(v_positionEC, textureCoordinates, enuToEye, color, mask, fade);
| }
| #endif
| #endif
|
| #ifdef APPLY_MATERIAL
| czm_materialInput materialInput;
| materialInput.st = v_textureCoordinates.st;
| materialInput.normalEC = normalize(v_normalEC);
| materialInput.positionToEyeEC = -v_positionEC;
| materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalize(v_normalEC));
| materialInput.slope = v_slope;
| materialInput.height = v_height;
| materialInput.aspect = v_aspect;
| #ifdef HAS_WATER_MASK
| materialInput.waterMask = mask;
| #endif
|
| czm_material material = czm_getMaterial(materialInput);
| vec4 materialColor = vec4(material.diffuse, material.alpha);
| color = alphaBlend(materialColor, color);
| #endif
|
| #ifdef ENABLE_VERTEX_LIGHTING
| float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalize(v_normalEC)) * u_lambertDiffuseMultiplier + u_vertexShadowDarkness, 0.0, 1.0);
| vec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);
| #elif defined(ENABLE_DAYNIGHT_SHADING)
| float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0 + 0.3, 0.0, 1.0);
| diffuseIntensity = mix(1.0, diffuseIntensity, fade);
| vec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);
| #else
| vec4 finalColor = color;
| #endif
|
| #ifdef ENABLE_CLIPPING_PLANES
| vec4 clippingPlanesEdgeColor = vec4(1.0);
| clippingPlanesEdgeColor.rgb = u_clippingPlanesEdgeStyle.rgb;
| float clippingPlanesEdgeWidth = u_clippingPlanesEdgeStyle.a;
|
| if (clipDistance < clippingPlanesEdgeWidth)
| {
| finalColor = clippingPlanesEdgeColor;
| }
| #endif
|
| #ifdef ENABLE_CLIPPING_POLYGONS
| vec2 clippingPosition = v_clippingPosition;
| int regionIndex = v_regionIndex;
| clipPolygons(u_clippingDistance, CLIPPING_POLYGON_REGIONS_LENGTH, clippingPosition, regionIndex);
| #endif
|
| #ifdef HIGHLIGHT_FILL_TILE
| finalColor = vec4(mix(finalColor.rgb, u_fillHighlightColor.rgb, u_fillHighlightColor.a), finalColor.a);
| #endif
|
| #if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)
| vec3 atmosphereLightDirection = czm_sunDirectionWC;
| #else
| vec3 atmosphereLightDirection = czm_lightDirectionWC;
| #endif
|
| #if defined(GROUND_ATMOSPHERE) || defined(FOG)
| if (!czm_backFacing())
| {
| bool dynamicLighting = false;
| #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))
| dynamicLighting = true;
| #endif
|
| vec3 rayleighColor;
| vec3 mieColor;
| float opacity;
|
| vec3 positionWC;
| vec3 lightDirection;
|
| // When the camera is far away (camera distance > nightFadeOutDistance), the scattering is computed in the fragment shader.
| // Otherwise, the scattering is computed in the vertex shader.
| #ifdef PER_FRAGMENT_GROUND_ATMOSPHERE
| positionWC = computeEllipsoidPosition();
| lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(positionWC));
| computeAtmosphereScattering(
| positionWC,
| lightDirection,
| rayleighColor,
| mieColor,
| opacity
| );
| #else
| positionWC = v_positionMC;
| lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(positionWC));
| rayleighColor = v_atmosphereRayleighColor;
| mieColor = v_atmosphereMieColor;
| opacity = v_atmosphereOpacity;
| #endif
|
| #ifdef COLOR_CORRECT
| const bool ignoreBlackPixels = true;
| rayleighColor = czm_applyHSBShift(rayleighColor, u_hsbShift, ignoreBlackPixels);
| mieColor = czm_applyHSBShift(mieColor, u_hsbShift, ignoreBlackPixels);
| #endif
|
| vec4 groundAtmosphereColor = computeAtmosphereColor(positionWC, lightDirection, rayleighColor, mieColor, opacity);
|
| // Fog is applied to tiles selected for fog, close to the Earth.
| #ifdef FOG
| vec3 fogColor = groundAtmosphereColor.rgb;
|
| // If there is lighting, apply that to the fog.
| #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
| float darken = clamp(dot(normalize(czm_viewerPositionWC), atmosphereLightDirection), u_minimumBrightness, 1.0);
| fogColor *= darken;
| #endif
|
| #ifndef HDR
| fogColor.rgb = czm_pbrNeutralTonemapping(fogColor.rgb);
| fogColor.rgb = czm_inverseGamma(fogColor.rgb);
| #endif
|
| finalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor.rgb, czm_fogVisualDensityScalar), finalColor.a);
|
| #else
| // Apply ground atmosphere. This happens when the camera is far away from the earth.
|
| // The transmittance is based on optical depth i.e. the length of segment of the ray inside the atmosphere.
| // This value is larger near the "circumference", as it is further away from the camera. We use it to
| // brighten up that area of the ground atmosphere.
| const float transmittanceModifier = 0.5;
| float transmittance = transmittanceModifier + clamp(1.0 - groundAtmosphereColor.a, 0.0, 1.0);
|
| vec3 finalAtmosphereColor = finalColor.rgb + groundAtmosphereColor.rgb * transmittance;
|
| #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
| float fadeInDist = u_nightFadeDistance.x;
| float fadeOutDist = u_nightFadeDistance.y;
|
| float sunlitAtmosphereIntensity = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.05, 1.0);
| float darken = clamp(dot(normalize(positionWC), atmosphereLightDirection), 0.0, 1.0);
| vec3 darkenendGroundAtmosphereColor = mix(groundAtmosphereColor.rgb, finalAtmosphereColor.rgb, darken);
|
| finalAtmosphereColor = mix(darkenendGroundAtmosphereColor, finalAtmosphereColor, sunlitAtmosphereIntensity);
| #endif
|
| #ifndef HDR
| finalAtmosphereColor.rgb = vec3(1.0) - exp(-fExposure * finalAtmosphereColor.rgb);
| #else
| finalAtmosphereColor.rgb = czm_saturation(finalAtmosphereColor.rgb, 1.6);
| #endif
|
| finalColor.rgb = mix(finalColor.rgb, finalAtmosphereColor.rgb, fade);
| #endif
| }
| #endif
|
| #ifdef UNDERGROUND_COLOR
| if (czm_backFacing())
| {
| float distanceFromEllipsoid = max(czm_eyeHeight, 0.0);
| float distance = max(v_distance - distanceFromEllipsoid, 0.0);
| float blendAmount = interpolateByDistance(u_undergroundColorAlphaByDistance, distance);
| vec4 undergroundColor = vec4(u_undergroundColor.rgb, u_undergroundColor.a * blendAmount);
| finalColor = alphaBlend(undergroundColor, finalColor);
| }
| #endif
|
| #ifdef TRANSLUCENT
| if (inTranslucencyRectangle())
| {
| vec4 alphaByDistance = gl_FrontFacing ? u_frontFaceAlphaByDistance : u_backFaceAlphaByDistance;
| finalColor.a *= interpolateByDistance(alphaByDistance, v_distance);
| }
| #endif
|
| out_FragColor = finalColor;
| }
|
|
| #ifdef SHOW_REFLECTIVE_OCEAN
|
| float waveFade(float edge0, float edge1, float x)
| {
| float y = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
| return pow(1.0 - y, 5.0);
| }
|
| float linearFade(float edge0, float edge1, float x)
| {
| return clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
| }
|
| // Based on water rendering by Jonas Wagner:
| // http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog
|
| // low altitude wave settings
| const float oceanFrequencyLowAltitude = 825000.0;
| const float oceanAnimationSpeedLowAltitude = 0.004;
| const float oceanOneOverAmplitudeLowAltitude = 1.0 / 2.0;
| const float oceanSpecularIntensity = 0.5;
|
| // high altitude wave settings
| const float oceanFrequencyHighAltitude = 125000.0;
| const float oceanAnimationSpeedHighAltitude = 0.008;
| const float oceanOneOverAmplitudeHighAltitude = 1.0 / 2.0;
|
| vec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float maskValue, float fade)
| {
| vec3 positionToEyeEC = -positionEyeCoordinates;
| float positionToEyeECLength = length(positionToEyeEC);
|
| // The double normalize below works around a bug in Firefox on Android devices.
| vec3 normalizedPositionToEyeEC = normalize(normalize(positionToEyeEC));
|
| // Fade out the waves as the camera moves far from the surface.
| float waveIntensity = waveFade(70000.0, 1000000.0, positionToEyeECLength);
|
| #ifdef SHOW_OCEAN_WAVES
| // high altitude waves
| float time = czm_frameNumber * oceanAnimationSpeedHighAltitude;
| vec4 noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyHighAltitude, time, 0.0);
| vec3 normalTangentSpaceHighAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeHighAltitude);
|
| // low altitude waves
| time = czm_frameNumber * oceanAnimationSpeedLowAltitude;
| noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyLowAltitude, time, 0.0);
| vec3 normalTangentSpaceLowAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeLowAltitude);
|
| // blend the 2 wave layers based on distance to surface
| float highAltitudeFade = linearFade(0.0, 60000.0, positionToEyeECLength);
| float lowAltitudeFade = 1.0 - linearFade(20000.0, 60000.0, positionToEyeECLength);
| vec3 normalTangentSpace =
| (highAltitudeFade * normalTangentSpaceHighAltitude) +
| (lowAltitudeFade * normalTangentSpaceLowAltitude);
| normalTangentSpace = normalize(normalTangentSpace);
|
| // fade out the normal perturbation as we move farther from the water surface
| normalTangentSpace.xy *= waveIntensity;
| normalTangentSpace = normalize(normalTangentSpace);
| #else
| vec3 normalTangentSpace = vec3(0.0, 0.0, 1.0);
| #endif
|
| vec3 normalEC = enuToEye * normalTangentSpace;
|
| const vec3 waveHighlightColor = vec3(0.3, 0.45, 0.6);
|
| // Use diffuse light to highlight the waves
| float diffuseIntensity = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * maskValue;
| vec3 diffuseHighlight = waveHighlightColor * diffuseIntensity * (1.0 - fade);
|
| #ifdef SHOW_OCEAN_WAVES
| // Where diffuse light is low or non-existent, use wave highlights based solely on
| // the wave bumpiness and no particular light direction.
| float tsPerturbationRatio = normalTangentSpace.z;
| vec3 nonDiffuseHighlight = mix(waveHighlightColor * 5.0 * (1.0 - tsPerturbationRatio), vec3(0.0), diffuseIntensity);
| #else
| vec3 nonDiffuseHighlight = vec3(0.0);
| #endif
|
| // Add specular highlights in 3D, and in all modes when zoomed in.
| float specularIntensity = czm_getSpecular(czm_lightDirectionEC, normalizedPositionToEyeEC, normalEC, 10.0);
| float surfaceReflectance = mix(0.0, mix(u_zoomedOutOceanSpecularIntensity, oceanSpecularIntensity, waveIntensity), maskValue);
| float specular = specularIntensity * surfaceReflectance;
|
| #ifdef HDR
| specular *= 1.4;
|
| float e = 0.2;
| float d = 3.3;
| float c = 1.7;
|
| vec3 color = imageryColor.rgb + (c * (vec3(e) + imageryColor.rgb * d) * (diffuseHighlight + nonDiffuseHighlight + specular));
| #else
| vec3 color = imageryColor.rgb + diffuseHighlight + nonDiffuseHighlight + specular;
| #endif
|
| return vec4(color, imageryColor.a);
| }
|
| #endif // #ifdef SHOW_REFLECTIVE_OCEAN
| `;var mU=`#ifdef QUANTIZATION_BITS12
| in vec4 compressed0;
| in float compressed1;
| #else
| in vec4 position3DAndHeight;
| in vec4 textureCoordAndEncodedNormals;
| #endif
|
| #ifdef GEODETIC_SURFACE_NORMALS
| in vec3 geodeticSurfaceNormal;
| #endif
|
| #ifdef EXAGGERATION
| uniform vec2 u_verticalExaggerationAndRelativeHeight;
| #endif
|
| uniform vec3 u_center3D;
| uniform mat4 u_modifiedModelView;
| uniform mat4 u_modifiedModelViewProjection;
| uniform vec4 u_tileRectangle;
|
| // Uniforms for 2D Mercator projection
| uniform vec2 u_southAndNorthLatitude;
| uniform vec2 u_southMercatorYAndOneOverHeight;
|
| out vec3 v_positionMC;
| out vec3 v_positionEC;
|
| out vec3 v_textureCoordinates;
| out vec3 v_normalMC;
| out vec3 v_normalEC;
|
| #ifdef APPLY_MATERIAL
| out float v_slope;
| out float v_aspect;
| out float v_height;
| #endif
|
| #if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
| out float v_distance;
| #endif
|
| #if defined(FOG) || defined(GROUND_ATMOSPHERE)
| out vec3 v_atmosphereRayleighColor;
| out vec3 v_atmosphereMieColor;
| out float v_atmosphereOpacity;
| #endif
|
| #ifdef ENABLE_CLIPPING_POLYGONS
| uniform highp sampler2D u_clippingExtents;
| out vec2 v_clippingPosition;
| flat out int v_regionIndex;
| #endif
|
| // These functions are generated at runtime.
| vec4 getPosition(vec3 position, float height, vec2 textureCoordinates);
| float get2DYPositionFraction(vec2 textureCoordinates);
|
| vec4 getPosition3DMode(vec3 position, float height, vec2 textureCoordinates)
| {
| return u_modifiedModelViewProjection * vec4(position, 1.0);
| }
|
| float get2DMercatorYPositionFraction(vec2 textureCoordinates)
| {
| // The width of a tile at level 11, in radians and assuming a single root tile, is
| // 2.0 * czm_pi / pow(2.0, 11.0)
| // We want to just linearly interpolate the 2D position from the texture coordinates
| // when we're at this level or higher. The constant below is the expression
| // above evaluated and then rounded up at the 4th significant digit.
| const float maxTileWidth = 0.003068;
| float positionFraction = textureCoordinates.y;
| float southLatitude = u_southAndNorthLatitude.x;
| float northLatitude = u_southAndNorthLatitude.y;
| if (northLatitude - southLatitude > maxTileWidth)
| {
| float southMercatorY = u_southMercatorYAndOneOverHeight.x;
| float oneOverMercatorHeight = u_southMercatorYAndOneOverHeight.y;
|
| float currentLatitude = mix(southLatitude, northLatitude, textureCoordinates.y);
| currentLatitude = clamp(currentLatitude, -czm_webMercatorMaxLatitude, czm_webMercatorMaxLatitude);
| positionFraction = czm_latitudeToWebMercatorFraction(currentLatitude, southMercatorY, oneOverMercatorHeight);
| }
| return positionFraction;
| }
|
| float get2DGeographicYPositionFraction(vec2 textureCoordinates)
| {
| return textureCoordinates.y;
| }
|
| vec4 getPositionPlanarEarth(vec3 position, float height, vec2 textureCoordinates)
| {
| float yPositionFraction = get2DYPositionFraction(textureCoordinates);
| vec4 rtcPosition2D = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);
| return u_modifiedModelViewProjection * rtcPosition2D;
| }
|
| vec4 getPosition2DMode(vec3 position, float height, vec2 textureCoordinates)
| {
| return getPositionPlanarEarth(position, 0.0, textureCoordinates);
| }
|
| vec4 getPositionColumbusViewMode(vec3 position, float height, vec2 textureCoordinates)
| {
| return getPositionPlanarEarth(position, height, textureCoordinates);
| }
|
| vec4 getPositionMorphingMode(vec3 position, float height, vec2 textureCoordinates)
| {
| // We do not do RTC while morphing, so there is potential for jitter.
| // This is unlikely to be noticeable, though.
| vec3 position3DWC = position + u_center3D;
| float yPositionFraction = get2DYPositionFraction(textureCoordinates);
| vec4 position2DWC = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);
| vec4 morphPosition = czm_columbusViewMorph(position2DWC, vec4(position3DWC, 1.0), czm_morphTime);
| return czm_modelViewProjection * morphPosition;
| }
|
| #ifdef QUANTIZATION_BITS12
| uniform vec2 u_minMaxHeight;
| uniform mat4 u_scaleAndBias;
| #endif
|
| void main()
| {
| #ifdef QUANTIZATION_BITS12
| vec2 xy = czm_decompressTextureCoordinates(compressed0.x);
| vec2 zh = czm_decompressTextureCoordinates(compressed0.y);
| vec3 position = vec3(xy, zh.x);
| float height = zh.y;
| vec2 textureCoordinates = czm_decompressTextureCoordinates(compressed0.z);
|
| height = height * (u_minMaxHeight.y - u_minMaxHeight.x) + u_minMaxHeight.x;
| position = (u_scaleAndBias * vec4(position, 1.0)).xyz;
|
| #if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)) && defined(INCLUDE_WEB_MERCATOR_Y) || defined(APPLY_MATERIAL)
| float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;
| float encodedNormal = compressed1;
| #elif defined(INCLUDE_WEB_MERCATOR_Y)
| float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;
| float encodedNormal = 0.0;
| #elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)
| float webMercatorT = textureCoordinates.y;
| float encodedNormal = compressed0.w;
| #else
| float webMercatorT = textureCoordinates.y;
| float encodedNormal = 0.0;
| #endif
|
| #else
| // A single float per element
| vec3 position = position3DAndHeight.xyz;
| float height = position3DAndHeight.w;
| vec2 textureCoordinates = textureCoordAndEncodedNormals.xy;
|
| #if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)) && defined(INCLUDE_WEB_MERCATOR_Y)
| float webMercatorT = textureCoordAndEncodedNormals.z;
| float encodedNormal = textureCoordAndEncodedNormals.w;
| #elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)
| float webMercatorT = textureCoordinates.y;
| float encodedNormal = textureCoordAndEncodedNormals.z;
| #elif defined(INCLUDE_WEB_MERCATOR_Y)
| float webMercatorT = textureCoordAndEncodedNormals.z;
| float encodedNormal = 0.0;
| #else
| float webMercatorT = textureCoordinates.y;
| float encodedNormal = 0.0;
| #endif
|
| #endif
|
| vec3 position3DWC = position + u_center3D;
|
| #ifdef GEODETIC_SURFACE_NORMALS
| vec3 ellipsoidNormal = geodeticSurfaceNormal;
| #else
| vec3 ellipsoidNormal = normalize(position3DWC);
| #endif
|
| #if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)
| float exaggeration = u_verticalExaggerationAndRelativeHeight.x;
| float relativeHeight = u_verticalExaggerationAndRelativeHeight.y;
| float newHeight = (height - relativeHeight) * exaggeration + relativeHeight;
|
| // stop from going through center of earth
| float minRadius = min(min(czm_ellipsoidRadii.x, czm_ellipsoidRadii.y), czm_ellipsoidRadii.z);
| newHeight = max(newHeight, -minRadius);
|
| vec3 offset = ellipsoidNormal * (newHeight - height);
| position += offset;
| position3DWC += offset;
| height = newHeight;
| #endif
|
| gl_Position = getPosition(position, height, textureCoordinates);
|
| v_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;
| v_positionMC = position3DWC; // position in model coordinates
|
| v_textureCoordinates = vec3(textureCoordinates, webMercatorT);
|
| #if defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)
| vec3 normalMC = czm_octDecode(encodedNormal);
|
| #if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)
| vec3 projection = dot(normalMC, ellipsoidNormal) * ellipsoidNormal;
| vec3 rejection = normalMC - projection;
| normalMC = normalize(projection + rejection * exaggeration);
| #endif
|
| v_normalMC = normalMC;
| v_normalEC = czm_normal3D * v_normalMC;
| #endif
|
| #ifdef ENABLE_CLIPPING_POLYGONS
| vec2 sphericalLatLong = czm_approximateSphericalCoordinates(position3DWC);
| sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);
|
| vec2 minDistance = vec2(czm_infinity);
| v_clippingPosition = vec2(czm_infinity);
| v_regionIndex = -1;
|
| for (int regionIndex = 0; regionIndex < CLIPPING_POLYGON_REGIONS_LENGTH; regionIndex++) {
| vec4 extents = unpackClippingExtents(u_clippingExtents, regionIndex);
| vec2 rectUv = (sphericalLatLong.yx - extents.yx) * extents.wz;
|
| vec2 clamped = clamp(rectUv, vec2(0.0), vec2(1.0));
| vec2 distance = abs(rectUv - clamped) * extents.wz;
|
| float threshold = 0.01;
| if (minDistance.x > distance.x || minDistance.y > distance.y) {
| minDistance = distance;
| v_clippingPosition = rectUv;
| if (rectUv.x > threshold && rectUv.y > threshold && rectUv.x < 1.0 - threshold && rectUv.y < 1.0 - threshold) {
| v_regionIndex = regionIndex;
| }
| }
| }
| #endif
|
| #if defined(FOG) || (defined(GROUND_ATMOSPHERE) && !defined(PER_FRAGMENT_GROUND_ATMOSPHERE))
|
| bool dynamicLighting = false;
|
| #if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))
| dynamicLighting = true;
| #endif
|
| #if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)
| vec3 atmosphereLightDirection = czm_sunDirectionWC;
| #else
| vec3 atmosphereLightDirection = czm_lightDirectionWC;
| #endif
|
| vec3 lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(position3DWC));
|
| computeAtmosphereScattering(
| position3DWC,
| lightDirection,
| v_atmosphereRayleighColor,
| v_atmosphereMieColor,
| v_atmosphereOpacity
| );
| #endif
|
| #if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
| v_distance = length((czm_modelView3D * vec4(position3DWC, 1.0)).xyz);
| #endif
|
| #ifdef APPLY_MATERIAL
| float northPoleZ = czm_ellipsoidRadii.z;
| vec3 northPolePositionMC = vec3(0.0, 0.0, northPoleZ);
| vec3 vectorEastMC = normalize(cross(northPolePositionMC - v_positionMC, ellipsoidNormal));
| float dotProd = abs(dot(ellipsoidNormal, v_normalMC));
| v_slope = acos(dotProd);
| vec3 normalRejected = ellipsoidNormal * dotProd;
| vec3 normalProjected = v_normalMC - normalRejected;
| vec3 aspectVector = normalize(normalProjected);
| v_aspect = acos(dot(aspectVector, vectorEastMC));
| float determ = dot(cross(vectorEastMC, aspectVector), ellipsoidNormal);
| v_aspect = czm_branchFreeTernary(determ < 0.0, 2.0 * czm_pi - v_aspect, v_aspect);
| v_height = height;
| #endif
| }
| `;var LD=`void computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity) {
|
| vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
| vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
| czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);
|
| float atmosphereInnerRadius = length(positionWC);
|
| computeScattering(
| primaryRay,
| length(cameraToPositionWC),
| lightDirection,
| atmosphereInnerRadius,
| rayleighColor,
| mieColor,
| opacity
| );
| }
| `;var Snt=new k;function Ant(e,t){C.typeOf.object("clippingPlaneCollection",e),C.typeOf.object("context",t);let n=e.unionClippingRegions,i=e.length,o=as.useFloatTexture(t),r=as.getTextureResolution(e,t,Snt),s=r.x,a=r.y,l=o?Int(s,a):Ont(s,a);return l+=`
| `,l+=n?vnt(i):Dnt(i),l}function vnt(e){return`float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)
| {
| vec4 position = czm_windowToEyeCoordinates(fragCoord);
| vec3 clipNormal = vec3(0.0);
| vec3 clipPosition = vec3(0.0);
| float clipAmount;
| float pixelWidth = czm_metersPerPixel(position);
| bool breakAndDiscard = false;
| for (int i = 0; i < ${e}; ++i)
| {
| vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
| clipNormal = clippingPlane.xyz;
| clipPosition = -clippingPlane.w * clipNormal;
| float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
| clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));
| if (amount <= 0.0)
| {
| breakAndDiscard = true;
| break;
| }
| }
| if (breakAndDiscard) {
| discard;
| }
| return clipAmount;
| }
| `}function Dnt(e){return`float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)
| {
| bool clipped = true;
| vec4 position = czm_windowToEyeCoordinates(fragCoord);
| vec3 clipNormal = vec3(0.0);
| vec3 clipPosition = vec3(0.0);
| float clipAmount = 0.0;
| float pixelWidth = czm_metersPerPixel(position);
| for (int i = 0; i < ${e}; ++i)
| {
| vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
| clipNormal = clippingPlane.xyz;
| clipPosition = -clippingPlane.w * clipNormal;
| float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
| clipAmount = max(amount, clipAmount);
| clipped = clipped && (amount <= 0.0);
| }
| if (clipped)
| {
| discard;
| }
| return clipAmount;
| }
| `}function Int(e,t){let n=1/e,i=1/t,o=`${n}`;o.indexOf(".")===-1&&(o+=".0");let r=`${i}`;return r.indexOf(".")===-1&&(r+=".0"),`vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)
| {
| int pixY = clippingPlaneNumber / ${e};
| int pixX = clippingPlaneNumber - (pixY * ${e});
| float u = (float(pixX) + 0.5) * ${o};
| float v = (float(pixY) + 0.5) * ${r};
| vec4 plane = texture(packedClippingPlanes, vec2(u, v));
| return czm_transformPlane(plane, transform);
| }
| `}function Ont(e,t){let n=1/e,i=1/t,o=`${n}`;o.indexOf(".")===-1&&(o+=".0");let r=`${i}`;return r.indexOf(".")===-1&&(r+=".0"),`vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)
| {
| int clippingPlaneStartIndex = clippingPlaneNumber * 2;
| int pixY = clippingPlaneStartIndex / ${e};
| int pixX = clippingPlaneStartIndex - (pixY * ${e});
| float u = (float(pixX) + 0.5) * ${o};
| float v = (float(pixY) + 0.5) * ${r};
| vec4 oct32 = texture(packedClippingPlanes, vec2(u, v)) * 255.0;
| vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);
| vec4 plane;
| plane.xyz = czm_octDecode(oct, 65535.0);
| plane.w = czm_unpackFloat(texture(packedClippingPlanes, vec2(u + ${o}, v)));
| return czm_transformPlane(plane, transform);
| }
| `}var my=Ant;function Pnt(e,t,n,i,o,r){this.numberOfDayTextures=e,this.flags=t,this.material=n,this.shaderProgram=i,this.clippingShaderState=o,this.clippingPolygonShaderState=r}function zq(){this.baseVertexShaderSource=void 0,this.baseFragmentShaderSource=void 0,this._shadersByTexturesFlags=[],this.material=void 0}function Rnt(e){let t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPosition3DMode(position, height, textureCoordinates); }",n="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionColumbusViewMode(position, height, textureCoordinates); }",i="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionMorphingMode(position, height, textureCoordinates); }",o;switch(e){case J.SCENE3D:o=t;break;case J.SCENE2D:case J.COLUMBUS_VIEW:o=n;break;case J.MORPHING:o=i;break}return o}function Mnt(e){return e.webgl2?`void clipPolygons(highp sampler2D clippingDistance, int regionsLength, vec2 clippingPosition, int regionIndex) {
| czm_clipPolygons(clippingDistance, regionsLength, clippingPosition, regionIndex);
| }`:`void clipPolygons(highp sampler2D clippingDistance, int regionsLength, vec2 clippingPosition, int regionIndex) {
| }`}function Lnt(e){return e.webgl2?`vec4 unpackClippingExtents(highp sampler2D extentsTexture, int index) {
| return czm_unpackClippingExtents(extentsTexture, index);
| }`:`vec4 unpackClippingExtents(highp sampler2D extentsTexture, int index) {
| return vec4();
| }`}function Nnt(e){return e?"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }":"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }"}zq.prototype.getShaderProgram=function(e){let t=e.frameState,n=e.surfaceTile,i=e.numberOfDayTextures,o=e.applyBrightness,r=e.applyContrast,s=e.applyHue,a=e.applySaturation,l=e.applyGamma,u=e.applyAlpha,f=e.applyDayNightAlpha,h=e.applySplit,m=e.hasWaterMask,p=e.showReflectiveOcean,_=e.showOceanWaves,b=e.enableLighting,x=e.dynamicAtmosphereLighting,T=e.dynamicAtmosphereLightingFromSun,E=e.showGroundAtmosphere,S=e.perFragmentGroundAtmosphere,A=e.hasVertexNormals,v=e.useWebMercatorProjection,D=e.enableFog,R=e.enableClippingPlanes,P=e.clippingPlanes,L=e.enableClippingPolygons,F=e.clippingPolygons,y=e.clippedByBoundaries,I=e.hasImageryLayerCutout,M=e.colorCorrect,B=e.highlightFillTile,U=e.colorToAlpha,V=e.hasGeodeticSurfaceNormals,W=e.hasExaggeration,H=e.showUndergroundColor,X=e.translucent,$=0,ae="",he=n.renderedMesh.encoding;he.quantization===Js.BITS12&&($=1,ae="QUANTIZATION_BITS12");let le=0,me="";y&&(le=1,me="TILE_LIMIT_RECTANGLE");let Me=0,Ge="";I&&(Me=1,Ge="APPLY_IMAGERY_CUTOUT");let De=t.mode,ke=De|o<<2|r<<3|s<<4|a<<5|l<<6|u<<7|m<<8|p<<9|_<<10|b<<11|x<<12|T<<13|E<<14|S<<15|A<<16|v<<17|D<<18|$<<19|h<<20|R<<21|L<<22|le<<23|Me<<24|M<<25|B<<26|U<<27|V<<28|W<<29|H<<30|X<<31|f<<32,He=0;c(P)&&P.length>0&&(He=R?P.clippingPlanesState:0);let ft=0;c(F)&&F.length>0&&(ft=L?F.clippingPolygonsState:0);let Ie=n.surfaceShader;if(c(Ie)&&Ie.numberOfDayTextures===i&&Ie.flags===ke&&Ie.material===this.material&&Ie.clippingShaderState===He&&Ie.clippingPolygonShaderState===ft)return Ie.shaderProgram;let Kt=this._shadersByTexturesFlags[i];if(c(Kt)||(Kt=this._shadersByTexturesFlags[i]=[]),Ie=Kt[ke],!c(Ie)||Ie.material!==this.material||Ie.clippingShaderState!==He||Ie.clippingPolygonShaderState!==ft){let Pt=this.baseVertexShaderSource.clone(),dt=this.baseFragmentShaderSource.clone();He!==0&&dt.sources.unshift(my(P,t.context)),ft!==0&&(dt.sources.unshift(Mnt(t.context)),Pt.sources.unshift(Lnt(t.context))),Pt.defines.push(ae),dt.defines.push(`TEXTURE_UNITS ${i}`,me,Ge),o&&dt.defines.push("APPLY_BRIGHTNESS"),r&&dt.defines.push("APPLY_CONTRAST"),s&&dt.defines.push("APPLY_HUE"),a&&dt.defines.push("APPLY_SATURATION"),l&&dt.defines.push("APPLY_GAMMA"),u&&dt.defines.push("APPLY_ALPHA"),f&&dt.defines.push("APPLY_DAY_NIGHT_ALPHA"),m&&dt.defines.push("HAS_WATER_MASK"),p&&(dt.defines.push("SHOW_REFLECTIVE_OCEAN"),Pt.defines.push("SHOW_REFLECTIVE_OCEAN")),_&&dt.defines.push("SHOW_OCEAN_WAVES"),U&&dt.defines.push("APPLY_COLOR_TO_ALPHA"),H&&(Pt.defines.push("UNDERGROUND_COLOR"),dt.defines.push("UNDERGROUND_COLOR")),X&&(Pt.defines.push("TRANSLUCENT"),dt.defines.push("TRANSLUCENT")),b&&(A?(Pt.defines.push("ENABLE_VERTEX_LIGHTING"),dt.defines.push("ENABLE_VERTEX_LIGHTING")):(Pt.defines.push("ENABLE_DAYNIGHT_SHADING"),dt.defines.push("ENABLE_DAYNIGHT_SHADING"))),x&&(Pt.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),dt.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),T&&(Pt.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"),dt.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"))),E&&(Pt.defines.push("GROUND_ATMOSPHERE"),dt.defines.push("GROUND_ATMOSPHERE"),S&&(Pt.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"),dt.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"))),Pt.defines.push("INCLUDE_WEB_MERCATOR_Y"),dt.defines.push("INCLUDE_WEB_MERCATOR_Y"),D&&(Pt.defines.push("FOG"),dt.defines.push("FOG")),h&&dt.defines.push("APPLY_SPLIT"),R&&dt.defines.push("ENABLE_CLIPPING_PLANES"),L&&(dt.defines.push("ENABLE_CLIPPING_POLYGONS"),Pt.defines.push("ENABLE_CLIPPING_POLYGONS"),F.inverse&&dt.defines.push("CLIPPING_INVERSE"),dt.defines.push(`CLIPPING_POLYGON_REGIONS_LENGTH ${F.extentsCount}`),Pt.defines.push(`CLIPPING_POLYGON_REGIONS_LENGTH ${F.extentsCount}`)),M&&dt.defines.push("COLOR_CORRECT"),B&&dt.defines.push("HIGHLIGHT_FILL_TILE"),V&&Pt.defines.push("GEODETIC_SURFACE_NORMALS"),W&&Pt.defines.push("EXAGGERATION");let rn=` vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend)
| {
| vec4 color = initialColor;
| `;I&&(rn+=` vec4 cutoutAndColorResult;
| bool texelUnclipped;
| `);for(let Ae=0;Ae<i;++Ae)I?rn+=` cutoutAndColorResult = u_dayTextureCutoutRectangles[${Ae}];
| texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;
| cutoutAndColorResult = sampleAndBlend(
| `:rn+=` color = sampleAndBlend(
| `,rn+=` color,
| u_dayTextures[${Ae}],
| u_dayTextureUseWebMercatorT[${Ae}] ? textureCoordinates.xz : textureCoordinates.xy,
| u_dayTextureTexCoordsRectangle[${Ae}],
| u_dayTextureTranslationAndScale[${Ae}],
| ${u?`u_dayTextureAlpha[${Ae}]`:"1.0"},
| ${f?`u_dayTextureNightAlpha[${Ae}]`:"1.0"},
| ${f?`u_dayTextureDayAlpha[${Ae}]`:"1.0"},
| ${o?`u_dayTextureBrightness[${Ae}]`:"0.0"},
| ${r?`u_dayTextureContrast[${Ae}]`:"0.0"},
| ${s?`u_dayTextureHue[${Ae}]`:"0.0"},
| ${a?`u_dayTextureSaturation[${Ae}]`:"0.0"},
| ${l?`u_dayTextureOneOverGamma[${Ae}]`:"0.0"},
| ${h?`u_dayTextureSplit[${Ae}]`:"0.0"},
| ${U?`u_colorsToAlpha[${Ae}]`:"vec4(0.0)"},
| nightBlend );
| `,I&&(rn+=` color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);
| `);rn+=` return color;
| }`,dt.sources.push(rn),Pt.sources.push(Rnt(De)),Pt.sources.push(Nnt(v));let Vt=en.fromCache({context:t.context,vertexShaderSource:Pt,fragmentShaderSource:dt,attributeLocations:he.getAttributeLocations()});Ie=Kt[ke]=new Pnt(i,ke,this.material,Vt,He,ft)}return n.surfaceShader=Ie,Ie.shaderProgram};zq.prototype.destroy=function(){let e,t,n=this._shadersByTexturesFlags;for(let i in n)if(n.hasOwnProperty(i)){let o=n[i];if(!c(o))continue;for(e in o)o.hasOwnProperty(e)&&(t=o[e],c(t)&&t.shaderProgram.destroy())}return ue(this)};var pU=zq;var Fnt={NONE:-1,PARTIAL:0,FULL:1},pr=Object.freeze(Fnt);function _U(e,t,n,i,o,r,s){this.provider=e,this.message=t,this.x=n,this.y=i,this.level=o,this.timesRetried=g(r,0),this.retry=!1,this.error=s}_U.reportError=function(e,t,n,i,o,r,s,a){let l=e;return c(e)?(l.provider=t,l.message=i,l.x=o,l.y=r,l.level=s,l.retry=!1,l.error=a,++l.timesRetried):l=new _U(t,i,o,r,s,0,a),c(n)&&n.numberOfListeners>0?n.raiseEvent(l):c(t)&&console.log(`An error occurred in "${t.constructor.name}": ${Hp(i)}`),l};_U.reportSuccess=function(e){c(e)&&(e.timesRetried=-1)};var Eo=_U;var Bnt={UNLOADED:0,TRANSITIONING:1,RECEIVED:2,TEXTURE_LOADED:3,READY:4,FAILED:5,INVALID:6,PLACEHOLDER:7},ni=Object.freeze(Bnt);var knt={START:0,LOADING:1,DONE:2,FAILED:3},Qs=Object.freeze(knt);var Unt={FAILED:0,UNLOADED:1,RECEIVING:2,RECEIVED:3,TRANSFORMING:4,TRANSFORMED:5,READY:6},ro=Object.freeze(Unt);function Go(){this.imagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new ee(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new d,this.boundingVolumeSourceTile=void 0,this.boundingVolumeIsFromMesh=!1,this.terrainState=ro.UNLOADED,this.mesh=void 0,this.fill=void 0,this.pickBoundingSphere=new ne,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1}Object.defineProperties(Go.prototype,{eligibleForUnloading:{get:function(){let e=this.terrainState,n=!(e===ro.RECEIVING||e===ro.TRANSFORMING),i=this.imagery;for(let o=0,r=i.length;n&&o<r;++o){let s=i[o];n=!c(s.loadingImagery)||s.loadingImagery.state!==ni.TRANSITIONING}return n}},renderedMesh:{get:function(){if(c(this.vertexArray))return this.mesh;if(c(this.fill))return this.fill.mesh}}});var znt=new re;function Vq(e,t,n,i,o,r){let s=e.getExaggeratedPosition(i,o,r);if(c(t)&&t!==J.SCENE3D){let l=n.ellipsoid.cartesianToCartographic(s,znt);s=n.project(l,r),s=d.fromElements(s.z,s.x,s.y,r)}return s}var Vnt=new d,Hnt=new d,Gnt=new d;Go.prototype.pick=function(e,t,n,i,o){let r=this.renderedMesh;if(!c(r))return;let s=r.vertices,a=r.indices,l=r.encoding,u=a.length,f=Number.MAX_VALUE;for(let h=0;h<u;h+=3){let m=a[h],p=a[h+1],_=a[h+2],b=Vq(l,t,n,s,m,Vnt),x=Vq(l,t,n,s,p,Hnt),T=Vq(l,t,n,s,_,Gnt),E=Yn.rayTriangleParametric(e,b,x,T,i);c(E)&&E<f&&E>=0&&(f=E)}return f!==Number.MAX_VALUE?mn.getPoint(e,f,o):void 0};Go.prototype.freeResources=function(){c(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),this.terrainData=void 0,this.terrainState=ro.UNLOADED,this.mesh=void 0,this.fill=this.fill&&this.fill.destroy();let e=this.imagery;for(let t=0,n=e.length;t<n;++t)e[t].freeResources();this.imagery.length=0,this.freeVertexArray()};Go.prototype.freeVertexArray=function(){Go._freeVertexArray(this.vertexArray),this.vertexArray=void 0,Go._freeVertexArray(this.wireframeVertexArray),this.wireframeVertexArray=void 0};Go.initialize=function(e,t,n){let i=e.data;c(i)||(i=e.data=new Go),e.state===Qs.START&&(jnt(e,t,n),e.state=Qs.LOADING)};Go.processStateMachine=function(e,t,n,i,o,r,s){Go.initialize(e,n,i);let a=e.data;if(e.state===Qs.LOADING&&Wnt(e,t,n,i,o,r),s)return;let l=e.renderable;e.renderable=c(a.vertexArray);let u=a.terrainState===ro.READY;e.upsampledFromParent=c(a.terrainData)&&a.terrainData.wasCreatedByUpsampling();let f=a.processImagery(e,n,t);if(u&&f){let h=e._loadedCallbacks,m={};for(let p in h)h.hasOwnProperty(p)&&(h[p](e)||(m[p]=h[p]));e._loadedCallbacks=m,e.state=Qs.DONE}l&&(e.renderable=!0)};Go.prototype.processImagery=function(e,t,n,i){let o=e.data,r=e.upsampledFromParent,s=!1,a=!0,l=o.imagery,u,f;for(u=0,f=l.length;u<f;++u){let h=l[u];if(!c(h.loadingImagery)){r=!1;continue}if(h.loadingImagery.state===ni.PLACEHOLDER){let p=h.loadingImagery.imageryLayer;if(p.ready){h.freeResources(),l.splice(u,1),p._createTileImagerySkeletons(e,t,u),--u,f=l.length;continue}else r=!1}let m=h.processStateMachine(e,n,i);a=a&&m,s=s||m||c(h.readyImagery),r=r&&c(h.loadingImagery)&&(h.loadingImagery.state===ni.FAILED||h.loadingImagery.state===ni.INVALID)}return e.upsampledFromParent=r,e.renderable=e.renderable&&(s||a),a};function kme(e,t,n,i){let o=e.renderedMesh,r=o.vertices,s=o.encoding,a=r.length/s.stride,l=Ic.clone(s);l.hasGeodeticSurfaceNormals=t,l=Ic.clone(l);let u=l.stride,f=new Float32Array(a*u);t?s.addGeodeticSurfaceNormals(r,f,n):s.removeGeodeticSurfaceNormals(r,f),o.vertices=f,o.stride=u,o!==e.mesh?(Go._freeVertexArray(e.fill.vertexArray),e.fill.vertexArray=Go._createVertexArrayForMesh(i.context,o)):(Go._freeVertexArray(e.vertexArray),e.vertexArray=Go._createVertexArrayForMesh(i.context,o)),Go._freeVertexArray(e.wireframeVertexArray),e.wireframeVertexArray=void 0}Go.prototype.addGeodeticSurfaceNormals=function(e,t){kme(this,!0,e,t)};Go.prototype.removeGeodeticSurfaceNormals=function(e){kme(this,!1,void 0,e)};Go.prototype.updateExaggeration=function(e,t,n){let i=this,o=i.renderedMesh;if(o===void 0)return;let r=t.verticalExaggeration,s=t.verticalExaggerationRelativeHeight,a=r!==1,l=o.encoding,u=l.exaggeration!==r,f=l.exaggerationRelativeHeight!==s;if(u||f){if(u)if(a&&!l.hasGeodeticSurfaceNormals){let h=e.tilingScheme.ellipsoid;i.addGeodeticSurfaceNormals(h,t)}else!a&&l.hasGeodeticSurfaceNormals&&i.removeGeodeticSurfaceNormals(t);if(l.exaggeration=r,l.exaggerationRelativeHeight=s,n!==void 0){n._tileToUpdateHeights.push(e);let h=e.customData,m=h.length;for(let p=0;p<m;p++){let _=h[p];_.level=-1}}}};function jnt(e,t,n){let i=t.getTileDataAvailable(e.x,e.y,e.level);if(!c(i)&&c(e.parent)){let o=e.parent,r=o.data;c(r)&&c(r.terrainData)&&(i=r.terrainData.isChildAvailable(o.x,o.y,e.x,e.y))}i===!1&&(e.data.terrainState=ro.FAILED);for(let o=0,r=n.length;o<r;++o){let s=n.get(o);s.show&&s._createTileImagerySkeletons(e,t)}}function Wnt(e,t,n,i,o,r){let s=e.data,a=e.parent;if(s.terrainState===ro.FAILED&&a!==void 0&&(a.data!==void 0&&a.data.terrainData!==void 0&&a.data.terrainData.canUpsample!==!1||Go.processStateMachine(a,t,n,i,o,r,!0)),s.terrainState===ro.FAILED&&qnt(s,e,t,n,e.x,e.y,e.level),s.terrainState===ro.UNLOADED&&Ynt(s,n,e.x,e.y,e.level),s.terrainState===ro.RECEIVED&&Knt(s,t,n,e.x,e.y,e.level),s.terrainState===ro.TRANSFORMED&&($nt(s,t.context,n,e.x,e.y,e.level,r),s.updateExaggeration(e,t,o)),s.terrainState>=ro.RECEIVED&&s.waterMaskTexture===void 0&&n.hasWaterMask)if(s.terrainData.waterMask!==void 0)Jnt(t.context,s);else{let u=s._findAncestorTileWithTerrainData(e);c(u)&&c(u.data.waterMaskTexture)&&(s.waterMaskTexture=u.data.waterMaskTexture,++s.waterMaskTexture.referenceCount,s._computeWaterMaskTranslationAndScale(e,u,s.waterMaskTranslationAndScale))}}function qnt(e,t,n,i,o,r,s){let a=t.parent;if(!a){t.state=Qs.FAILED;return}let l=a.data.terrainData,u=a.x,f=a.y,h=a.level;if(!c(l))return;let m=l.upsample(i.tilingScheme,u,f,h,o,r,s);c(m)&&(e.terrainState=ro.RECEIVING,Promise.resolve(m).then(function(p){c(p)&&(e.terrainData=p,e.terrainState=ro.RECEIVED)}).catch(function(){e.terrainState=ro.FAILED}))}function Ynt(e,t,n,i,o){function r(l){if(!c(l)){e.terrainState=ro.UNLOADED,e.request=void 0;return}e.terrainData=l,e.terrainState=ro.RECEIVED,e.request=void 0}function s(l){if(e.request.state===qn.CANCELLED){e.terrainData=void 0,e.terrainState=ro.UNLOADED,e.request=void 0;return}e.terrainState=ro.FAILED,e.request=void 0;let u=`Failed to obtain terrain tile X: ${n} Y: ${i} Level: ${o}. Error message: "${l}"`;t._requestError=Eo.reportError(t._requestError,t,t.errorEvent,u,n,i,o),t._requestError.retry&&a()}function a(){let l=new Ko({throttle:!1,throttleByServer:!0,type:is.TERRAIN});e.request=l;let u=t.requestTileGeometry(n,i,o,l);c(u)?(e.terrainState=ro.RECEIVING,Promise.resolve(u).then(function(f){r(f)}).catch(function(f){s(f)})):(e.terrainState=ro.UNLOADED,e.request=void 0)}a()}var Xnt={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0,throttle:!0};function Knt(e,t,n,i,o,r){let s=n.tilingScheme,a=Xnt;a.tilingScheme=s,a.x=i,a.y=o,a.level=r,a.exaggeration=t.verticalExaggeration,a.exaggerationRelativeHeight=t.verticalExaggerationRelativeHeight,a.throttle=!0;let u=e.terrainData.createMesh(a);c(u)&&(e.terrainState=ro.TRANSFORMING,Promise.resolve(u).then(function(f){e.mesh=f,e.terrainState=ro.TRANSFORMED}).catch(function(){e.terrainState=ro.FAILED}))}Go._createVertexArrayForMesh=function(e,t){let n=t.vertices,i=yt.createVertexBuffer({context:e,typedArray:n,usage:Pe.STATIC_DRAW}),o=t.encoding.getAttributes(i),r=t.indices.indexBuffers||{},s=r[e.id];if(!c(s)||s.isDestroyed()){let a=t.indices;s=yt.createIndexBuffer({context:e,typedArray:a,usage:Pe.STATIC_DRAW,indexDatatype:Oe.fromSizeInBytes(a.BYTES_PER_ELEMENT)}),s.vertexArrayDestroyable=!1,s.referenceCount=1,r[e.id]=s,t.indices.indexBuffers=r}else++s.referenceCount;return new Zn({context:e,attributes:o,indexBuffer:s})};Go._freeVertexArray=function(e){if(c(e)){let t=e.indexBuffer;e.isDestroyed()||e.destroy(),c(t)&&!t.isDestroyed()&&c(t.referenceCount)&&(--t.referenceCount,t.referenceCount===0&&t.destroy())}};function $nt(e,t,n,i,o,r,s){e.vertexArray=Go._createVertexArrayForMesh(t,e.mesh),e.terrainState=ro.READY,e.fill=e.fill&&e.fill.destroy(s)}function Znt(e){let t=e.cache.tile_waterMaskData;if(!c(t)){let n=Ot.create({context:e,pixelFormat:Re.LUMINANCE,pixelDatatype:Ne.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});n.referenceCount=1;let i=new Jt({wrapS:pn.CLAMP_TO_EDGE,wrapT:pn.CLAMP_TO_EDGE,minificationFilter:Wt.LINEAR,magnificationFilter:si.LINEAR});t={allWaterTexture:n,sampler:i,destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=t}return t}function Jnt(e,t){let n=t.terrainData.waterMask,i=Znt(e),o,r=n.length;if(r===1)if(n[0]!==0)o=i.allWaterTexture;else return;else{let s=Math.sqrt(r);o=Ot.create({context:e,pixelFormat:Re.LUMINANCE,pixelDatatype:Ne.UNSIGNED_BYTE,source:{width:s,height:s,arrayBufferView:n},sampler:i.sampler,flipY:!1}),o.referenceCount=0}++o.referenceCount,t.waterMaskTexture=o,ee.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}Go.prototype._findAncestorTileWithTerrainData=function(e){let t=e.parent;for(;c(t)&&(!c(t.data)||!c(t.data.terrainData)||t.data.terrainData.wasCreatedByUpsampling());)t=t.parent;return t};Go.prototype._computeWaterMaskTranslationAndScale=function(e,t,n){let i=t.rectangle,o=e.rectangle,r=o.width,s=o.height,a=r/i.width,l=s/i.height;return n.x=a*(o.west-i.west)/r,n.y=l*(o.south-i.south)/s,n.z=a,n.w=l,n};var Pd=Go;function py(e){if(e=g(e,g.EMPTY_OBJECT),this._ellipsoid=g(e.ellipsoid,Z.default),this._numberOfLevelZeroTilesX=g(e.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=g(e.numberOfLevelZeroTilesY,1),this._projection=new Si(this._ellipsoid),c(e.rectangleSouthwestInMeters)&&c(e.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=e.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=e.rectangleNortheastInMeters;else{let i=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new k(-i,-i),this._rectangleNortheastInMeters=new k(i,i)}let t=this._projection.unproject(this._rectangleSouthwestInMeters),n=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new te(t.longitude,t.latitude,n.longitude,n.latitude)}Object.defineProperties(py.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});py.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e};py.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e};py.prototype.rectangleToNativeRectangle=function(e,t){let n=this._projection,i=n.project(te.southwest(e)),o=n.project(te.northeast(e));return c(t)?(t.west=i.x,t.south=i.y,t.east=o.x,t.north=o.y,t):new te(i.x,i.y,o.x,o.y)};py.prototype.tileXYToNativeRectangle=function(e,t,n,i){let o=this.getNumberOfXTilesAtLevel(n),r=this.getNumberOfYTilesAtLevel(n),s=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/o,a=this._rectangleSouthwestInMeters.x+e*s,l=this._rectangleSouthwestInMeters.x+(e+1)*s,u=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/r,f=this._rectangleNortheastInMeters.y-t*u,h=this._rectangleNortheastInMeters.y-(t+1)*u;return c(i)?(i.west=a,i.south=h,i.east=l,i.north=f,i):new te(a,h,l,f)};py.prototype.tileXYToRectangle=function(e,t,n,i){let o=this.tileXYToNativeRectangle(e,t,n,i),r=this._projection,s=r.unproject(new k(o.west,o.south)),a=r.unproject(new k(o.east,o.north));return o.west=s.longitude,o.south=s.latitude,o.east=a.longitude,o.north=a.latitude,o};py.prototype.positionToTileXY=function(e,t,n){let i=this._rectangle;if(!te.contains(i,e))return;let o=this.getNumberOfXTilesAtLevel(t),r=this.getNumberOfYTilesAtLevel(t),a=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/o,u=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/r,h=this._projection.project(e),m=h.x-this._rectangleSouthwestInMeters.x,p=this._rectangleNortheastInMeters.y-h.y,_=m/a|0;_>=o&&(_=o-1);let b=p/u|0;return b>=r&&(b=r-1),c(n)?(n.x=_,n.y=b,n):new k(_,b)};var Qr=py;var Hq,Ume="AAPTxy8BH1VEsoebNVZXo8HurEOF051kAEKlhkOhBEc9BmQpcUfxe1Yndhf82d5oKkQJ4_7VPaBQGYSISOMaRew7Sy-eTX1JQ4XwaC8v5aCvV72O6LCPs5Ss1pXXH-0uEw6bSRhTeQYHOmikutC2OMyZt6lu0VfT7FA-jVMO_UsunWNTf2cycP2O4IeDN_UV9G-VNmUu2jRvCHioi8o72ua4238s2219cYLEmcoGRJGVJTA.AT1_PjLvyih0",WE={};WE.defaultAccessToken=Ume;WE.defaultWorldImageryServer=new Te({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer"});WE.defaultWorldHillshadeServer=new Te({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"});WE.defaultWorldOceanServer=new Te({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer"});WE.getDefaultTokenCredit=function(e){if(e===Ume){if(!c(Hq)){let t='<b> This application is using a default ArcGIS access token. Please assign <i>Cesium.ArcGisMapService.defaultAccessToken</i> with an API key from your ArcGIS Developer account before using the ArcGIS tile services. You can sign up for a free ArcGIS Developer account at <a href="https://developers.arcgis.com/">https://developers.arcgis.com/</a>.</b>';Hq=new St(t,!0)}return Hq}};var Tf=WE;function Gq(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.missingImageUrl))throw new w("options.missingImageUrl is required.");if(!c(e.pixelsToCheck))throw new w("options.pixelsToCheck is required.");this._pixelsToCheck=e.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;let t=Te.createIfNeeded(e.missingImageUrl),n=this;function i(r){c(r.blob)&&(n._missingImageByteLength=r.blob.size);let s=Yd(r);if(e.disableCheckIfAllPixelsAreTransparent){let a=!0,l=r.width,u=e.pixelsToCheck;for(let f=0,h=u.length;a&&f<h;++f){let m=u[f],p=m.x*4+m.y*l;s[p+3]>0&&(a=!1)}a&&(s=void 0)}n._missingImagePixels=s,n._isReady=!0}function o(){n._missingImagePixels=void 0,n._isReady=!0}t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}).then(i).catch(o)}Gq.prototype.isReady=function(){return this._isReady};Gq.prototype.shouldDiscardImage=function(e){if(!this._isReady)throw new w("shouldDiscardImage must not be called before the discard policy is ready.");let t=this._pixelsToCheck,n=this._missingImagePixels;if(!c(n)||c(e.blob)&&e.blob.size!==this._missingImageByteLength)return!1;let i=Yd(e),o=e.width;for(let r=0,s=t.length;r<s;++r){let a=t[r],l=a.x*4+a.y*o;for(let u=0;u<4;++u){let f=l+u;if(i[f]!==n[f])return!1}}return!0};var gU=Gq;function jq(){this.name=void 0,this.description=void 0,this.position=void 0,this.data=void 0,this.imageryLayer=void 0}jq.prototype.configureNameFromProperties=function(e){let t=10,n;for(let i in e)if(e.hasOwnProperty(i)&&e[i]){let o=i.toLowerCase();t>1&&o==="name"?(t=1,n=i):t>2&&o==="title"?(t=2,n=i):t>3&&/name/i.test(i)?(t=3,n=i):t>4&&/title/i.test(i)&&(t=4,n=i)}c(n)&&(this.name=e[n])};jq.prototype.configureDescriptionFromProperties=function(e){function t(n){let i='<table class="cesium-infoBox-defaultTable">';for(let o in n)if(n.hasOwnProperty(o)){let r=n[o];c(r)&&(typeof r=="object"?i+=`<tr><td>${o}</td><td>${t(r)}</td></tr>`:i+=`<tr><td>${o}</td><td>${r}</td></tr>`)}return i+="</table>",i}this.description=t(e)};var rm=jq;function qE(){w.throwInstantiationError()}Object.defineProperties(qE.prototype,{rectangle:{get:w.throwInstantiationError},tileWidth:{get:w.throwInstantiationError},tileHeight:{get:w.throwInstantiationError},maximumLevel:{get:w.throwInstantiationError},minimumLevel:{get:w.throwInstantiationError},tilingScheme:{get:w.throwInstantiationError},tileDiscardPolicy:{get:w.throwInstantiationError},errorEvent:{get:w.throwInstantiationError},credit:{get:w.throwInstantiationError},proxy:{get:w.throwInstantiationError},hasAlphaChannel:{get:w.throwInstantiationError}});qE.prototype.getTileCredits=function(e,t,n){w.throwInstantiationError()};qE.prototype.requestImage=function(e,t,n,i){w.throwInstantiationError()};qE.prototype.pickFeatures=function(e,t,n,i,o){w.throwInstantiationError()};var Qnt=/\.ktx2$/i;qE.loadImage=function(e,t){C.defined("url",t);let n=Te.createIfNeeded(t);return Qnt.test(n.url)?vl(n):c(e)&&c(e.tileDiscardPolicy)?n.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):n.fetchImage({preferImageBitmap:!0,flipY:!0})};var pl=qE;var eit={SATELLITE:1,OCEANS:2,HILLSHADE:3},YE=Object.freeze(eit);function zme(e){this.useTiles=g(e.usePreCachedTilesIfAvailable,!0);let t=e.ellipsoid;this.tilingScheme=g(e.tilingScheme,new Hi({ellipsoid:t})),this.rectangle=g(e.rectangle,this.tilingScheme.rectangle),this.ellipsoid=t;let n=e.credit;typeof n=="string"&&(n=new St(n)),this.credit=n,this.tileCredits=void 0,this.tileDiscardPolicy=e.tileDiscardPolicy,this.tileWidth=g(e.tileWidth,256),this.tileHeight=g(e.tileHeight,256),this.maximumLevel=e.maximumLevel}zme.prototype.build=function(e){e._useTiles=this.useTiles,e._tilingScheme=this.tilingScheme,e._rectangle=this.rectangle,e._credit=this.credit,e._tileCredits=this.tileCredits,e._tileDiscardPolicy=this.tileDiscardPolicy,e._tileWidth=this.tileWidth,e._tileHeight=this.tileHeight,e._maximumLevel=this.maximumLevel,this.useTiles&&!c(this.tileDiscardPolicy)&&(e._tileDiscardPolicy=new gU({missingImageUrl:Vme(e,0,0,this.maximumLevel).url,pixelsToCheck:[new k(0,0),new k(200,20),new k(20,200),new k(80,110),new k(160,130)],disableCheckIfAllPixelsAreTransparent:!0}))};function tit(e,t){let n=e.tileInfo;if(!c(n))t.useTiles=!1;else{if(t.tileWidth=n.rows,t.tileHeight=n.cols,n.spatialReference.wkid===102100||n.spatialReference.wkid===102113)t.tilingScheme=new Qr({ellipsoid:t.ellipsoid});else if(e.tileInfo.spatialReference.wkid===4326)t.tilingScheme=new Hi({ellipsoid:t.ellipsoid});else{let i=`Tile spatial reference WKID ${e.tileInfo.spatialReference.wkid} is not supported.`;throw new ie(i)}if(t.maximumLevel=e.tileInfo.lods.length-1,c(e.fullExtent)){if(c(e.fullExtent.spatialReference)&&c(e.fullExtent.spatialReference.wkid))if(e.fullExtent.spatialReference.wkid===102100||e.fullExtent.spatialReference.wkid===102113){let i=new Si,o=e.fullExtent,r=i.unproject(new d(Math.max(o.xmin,-t.tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(o.ymin,-t.tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),s=i.unproject(new d(Math.min(o.xmax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(o.ymax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),0));t.rectangle=new te(r.longitude,r.latitude,s.longitude,s.latitude)}else if(e.fullExtent.spatialReference.wkid===4326)t.rectangle=te.fromDegrees(e.fullExtent.xmin,e.fullExtent.ymin,e.fullExtent.xmax,e.fullExtent.ymax);else{let i=`fullExtent.spatialReference WKID ${e.fullExtent.spatialReference.wkid} is not supported.`;throw new ie(i)}}else t.rectangle=t.tilingScheme.rectangle;t.useTiles=!0}c(e.copyrightText)&&e.copyrightText.length>0&&(c(t.credit)?t.tileCredits=[new St(e.copyrightText)]:t.credit=new St(e.copyrightText))}function nit(e,t){let n=`An error occurred while accessing ${e.url}`;throw c(t)&&c(t.message)&&(n+=`: ${t.message}`),new ie(n)}async function iit(e,t){let n=e.getDerivedResource({queryParameters:{f:"json"}});try{let i=await n.fetchJson();tit(i,t)}catch(i){nit(e,i)}}function sm(e){e=g(e,g.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tileWidth=g(e.tileWidth,256),this._tileHeight=g(e.tileHeight,256),this._maximumLevel=e.maximumLevel,this._tilingScheme=g(e.tilingScheme,new Hi({ellipsoid:e.ellipsoid})),this._useTiles=g(e.usePreCachedTilesIfAvailable,!0),this._rectangle=g(e.rectangle,this._tilingScheme.rectangle),this._layers=e.layers,this._credit=e.credit,this._tileCredits=void 0;let t=e.credit;typeof t=="string"&&(t=new St(t)),this.enablePickFeatures=g(e.enablePickFeatures,!0),this._errorEvent=new fe}sm.fromBasemapType=async function(e,t){C.defined("style",e),t=g(t,g.EMPTY_OBJECT);let n,i,o;switch(e){case YE.SATELLITE:{n=g(t.token,Tf.defaultAccessToken),i=Te.createIfNeeded(Tf.defaultWorldImageryServer),i.appendForwardSlash();let r=Tf.getDefaultTokenCredit(n);c(r)&&(o=St.clone(r))}break;case YE.OCEANS:{n=g(t.token,Tf.defaultAccessToken),i=Te.createIfNeeded(Tf.defaultWorldOceanServer),i.appendForwardSlash();let r=Tf.getDefaultTokenCredit(n);c(r)&&(o=St.clone(r))}break;case YE.HILLSHADE:{n=g(t.token,Tf.defaultAccessToken),i=Te.createIfNeeded(Tf.defaultWorldHillshadeServer),i.appendForwardSlash();let r=Tf.getDefaultTokenCredit(n);c(r)&&(o=St.clone(r))}break;default:throw new w(`Unsupported basemap type: ${e}`)}return sm.fromUrl(i,{...t,token:n,credit:o,usePreCachedTilesIfAvailable:!0})};function Vme(e,t,n,i,o){let r;if(e._useTiles)r=e._resource.getDerivedResource({url:`tile/${i}/${n}/${t}`,request:o});else{let s=e._tilingScheme.tileXYToNativeRectangle(t,n,i),l={bbox:`${s.west},${s.south},${s.east},${s.north}`,size:`${e._tileWidth},${e._tileHeight}`,format:"png32",transparent:!0,f:"image"};e._tilingScheme.projection instanceof Ei?(l.bboxSR=4326,l.imageSR=4326):(l.bboxSR=3857,l.imageSR=3857),e.layers&&(l.layers=`show:${e.layers}`),r=e._resource.getDerivedResource({url:"export",request:o,queryParameters:l})}return r}Object.defineProperties(sm.prototype,{url:{get:function(){return this._resource._url}},token:{get:function(){return this._resource.queryParameters.token}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}});sm.fromUrl=async function(e,t){C.defined("url",e),t=g(t,g.EMPTY_OBJECT);let n=Te.createIfNeeded(e);n.appendForwardSlash(),c(t.token)&&n.setQueryParameters({token:t.token});let i=new sm(t);i._resource=n;let o=new zme(t);return g(t.usePreCachedTilesIfAvailable,!0)&&await iit(n,o),o.build(i),i};sm.prototype.getTileCredits=function(e,t,n){return this._tileCredits};sm.prototype.requestImage=function(e,t,n,i){return pl.loadImage(this,Vme(this,e,t,n,i))};sm.prototype.pickFeatures=function(e,t,n,i,o){if(!this.enablePickFeatures)return;let r=this._tilingScheme.tileXYToNativeRectangle(e,t,n),s,a,l;if(this._tilingScheme.projection instanceof Ei)s=O.toDegrees(i),a=O.toDegrees(o),l="4326";else{let m=this._tilingScheme.projection.project(new re(i,o,0));s=m.x,a=m.y,l="3857"}let u="visible";c(this._layers)&&(u+=`:${this._layers}`);let f={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:`${s},${a}`,mapExtent:`${r.west},${r.south},${r.east},${r.north}`,imageDisplay:`${this._tileWidth},${this._tileHeight},96`,sr:l,layers:u};return this._resource.getDerivedResource({url:"identify",queryParameters:f}).fetchJson().then(function(m){let p=[],_=m.results;if(!c(_))return p;for(let b=0;b<_.length;++b){let x=_[b],T=new rm;if(T.data=x,T.name=x.value,T.properties=x.attributes,T.configureDescriptionFromProperties(x.attributes),x.geometryType==="esriGeometryPoint"&&x.geometry){let E=x.geometry.spatialReference&&x.geometry.spatialReference.wkid?x.geometry.spatialReference.wkid:4326;if(E===4326||E===4283)T.position=re.fromDegrees(x.geometry.x,x.geometry.y,x.geometry.z);else if(E===102100||E===900913||E===3857){let S=new Si;T.position=S.unproject(new d(x.geometry.x,x.geometry.y,x.geometry.z))}}p.push(T)}return p})};sm._metadataCache={};var yU=sm;var oit={AERIAL:"Aerial",AERIAL_WITH_LABELS:"AerialWithLabels",AERIAL_WITH_LABELS_ON_DEMAND:"AerialWithLabelsOnDemand",ROAD:"Road",ROAD_ON_DEMAND:"RoadOnDemand",CANVAS_DARK:"CanvasDark",CANVAS_LIGHT:"CanvasLight",CANVAS_GRAY:"CanvasGray",ORDNANCE_SURVEY:"OrdnanceSurvey",COLLINS_BART:"CollinsBart"},ND=Object.freeze(oit);function FD(e){}FD.prototype.isReady=function(){return!0};FD.prototype.shouldDiscardImage=function(e){return FD.EMPTY_IMAGE===e};var bU;Object.defineProperties(FD,{EMPTY_IMAGE:{get:function(){return c(bU)||(bU=new Image,bU.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),bU}}});var BD=FD;function Hme(e){this.tileWidth=void 0,this.tileHeight=void 0,this.maximumLevel=void 0,this.imageUrlSubdomains=void 0,this.imageUrlTemplate=void 0,this.attributionList=void 0}Hme.prototype.build=function(e){e._tileWidth=this.tileWidth,e._tileHeight=this.tileHeight,e._maximumLevel=this.maximumLevel,e._imageUrlSubdomains=this.imageUrlSubdomains,e._imageUrlTemplate=this.imageUrlTemplate;let t=e._attributionList=this.attributionList;t||(t=[]),e._attributionList=t;for(let n=0,i=t.length;n<i;++n){let o=t[n];if(o.credit instanceof St)break;o.credit=new St(o.attribution);let r=o.coverageAreas;for(let s=0,a=o.coverageAreas.length;s<a;++s){let l=r[s],u=l.bbox;l.bbox=new te(O.toRadians(u[1]),O.toRadians(u[0]),O.toRadians(u[3]),O.toRadians(u[2]))}}};function rit(e,t){if(e.resourceSets.length!==1)throw new ie("metadata does not specify one resource in resourceSets");let n=e.resourceSets[0].resources[0];t.tileWidth=n.imageWidth,t.tileHeight=n.imageHeight,t.maximumLevel=n.zoomMax-1,t.imageUrlSubdomains=n.imageUrlSubdomains,t.imageUrlTemplate=n.imageUrl;let i=n.imageryProviders;c(n.imageryProviders)&&(i=n.imageryProviders.filter(o=>{var r;return(r=o.coverageAreas)==null?void 0:r.some(s=>c(s.bbox))})),t.attributionList=i}function sit(e,t,n){let i=`An error occurred while accessing ${e.url}`;throw c(t)&&c(t.message)&&(i+=`: ${t.message}`),Eo.reportError(void 0,n,c(n)?n._errorEvent:void 0,i,void 0,void 0,void 0,t),new ie(i)}async function ait(e,t,n){let i=e.url,o=ds._metadataCache[i];c(o)||(o=e.fetchJsonp("jsonp"),ds._metadataCache[i]=o);try{let r=await o;return rit(r,t)}catch(r){sit(e,r,n)}}function ds(e){e=g(e,g.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=1,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._mapStyle=g(e.mapStyle,ND.AERIAL),this._mapLayer=e.mapLayer,this._culture=g(e.culture,""),this._key=e.key,this._tileDiscardPolicy=e.tileDiscardPolicy,c(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new BD),this._proxy=e.proxy,this._credit=new St(`<a href="https://www.microsoft.com/en-us/maps/bing-maps/product"><img src="${ds.logoUrl}" title="Bing Imagery"/></a>`),this._tilingScheme=new Qr({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid}),this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._imageUrlTemplate=void 0,this._imageUrlSubdomains=void 0,this._attributionList=void 0,this._errorEvent=new fe}Object.defineProperties(ds.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},key:{get:function(){return this._key}},mapStyle:{get:function(){return this._mapStyle}},mapLayer:{get:function(){return this._mapLayer}},culture:{get:function(){return this._culture}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return c(this.mapLayer)}}});ds.fromUrl=async function(e,t){t=g(t,g.EMPTY_OBJECT),C.defined("url",e),C.defined("options.key",t.key);let n=t.tileProtocol;c(n)?n.length>0&&n[n.length-1]===":"&&(n=n.substr(0,n.length-1)):n=document.location.protocol==="http:"?"http":"https";let i=g(t.mapStyle,ND.AERIAL),o=Te.createIfNeeded(e);o.appendForwardSlash();let r={incl:"ImageryProviders",key:t.key,uriScheme:n};c(t.mapLayer)&&(r.mapLayer=t.mapLayer),c(t.culture)&&(r.culture=t.culture);let s=o.getDerivedResource({url:`REST/v1/Imagery/Metadata/${i}`,queryParameters:r}),a=new ds(t);a._resource=o;let l=new Hme(t);return await ait(s,l),l.build(a),a};var cit=new te;ds.prototype.getTileCredits=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(e,t,n,cit);return fit(this._attributionList,n,i)};ds.prototype.requestImage=function(e,t,n,i){let o=pl.loadImage(this,lit(this,e,t,n,i));if(c(o))return o.catch(function(r){return c(r.blob)&&r.blob.size===0?BD.EMPTY_IMAGE:Promise.reject(r)})};ds.prototype.pickFeatures=function(e,t,n,i,o){};ds.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){let r=1<<o,s=0;e&r&&(s|=1),t&r&&(s|=2),i+=s}return i};ds.quadKeyToTileXY=function(e){let t=0,n=0,i=e.length-1;for(let o=i;o>=0;--o){let r=1<<o,s=+e[i-o];s&1&&(t|=r),s&2&&(n|=r)}return{x:t,y:n,level:i}};ds._logoUrl=void 0;Object.defineProperties(ds,{logoUrl:{get:function(){return c(ds._logoUrl)||(ds._logoUrl=Mi("Assets/Images/bing_maps_credit.png")),ds._logoUrl},set:function(e){C.defined("value",e),ds._logoUrl=e}}});function lit(e,t,n,i,o){let r=e._imageUrlTemplate,s=e._imageUrlSubdomains,a=(t+n+i)%s.length;return e._resource.getDerivedResource({url:r,request:o,templateValues:{quadkey:ds.tileXYToQuadKey(t,n,i),subdomain:s[a],culture:e._culture},queryParameters:{n:"z"}})}var uit=new te;function fit(e,t,n){++t;let i=[];for(let o=0,r=e.length;o<r;++o){let s=e[o],a=s.coverageAreas,l=!1;for(let u=0,f=s.coverageAreas.length;!l&&u<f;++u){let h=a[u];if(t>=h.zoomMin&&t<=h.zoomMax){let m=te.intersection(n,h.bbox,uit);c(m)&&(l=!0)}}l&&i.push(s.credit)}return i}ds._metadataCache={};var xU=ds;var Gme=/{[^}]+}/g,jme={x:pit,y:git,z:xit,s:Tit,reverseX:_it,reverseY:yit,reverseZ:bit,westDegrees:Cit,southDegrees:Eit,eastDegrees:wit,northDegrees:Sit,westProjected:Ait,southProjected:vit,eastProjected:Dit,northProjected:Iit,width:Oit,height:Pit},dit=bt(jme,{i:Rit,j:Mit,reverseI:Lit,reverseJ:Nit,longitudeDegrees:Bit,latitudeDegrees:kit,longitudeProjected:Uit,latitudeProjected:zit,format:Hit});function kD(e){e=g(e,g.EMPTY_OBJECT),this._errorEvent=new fe,C.defined("options.url",e.url);let t=Te.createIfNeeded(e.url),n=Te.createIfNeeded(e.pickFeaturesUrl);this._resource=t,this._urlSchemeZeroPadding=e.urlSchemeZeroPadding,this._getFeatureInfoFormats=e.getFeatureInfoFormats,this._pickFeaturesResource=n;let i=e.subdomains;Array.isArray(i)?i=i.slice():c(i)&&i.length>0?i=i.split(""):i=["a","b","c"],this._subdomains=i,this._tileWidth=g(e.tileWidth,256),this._tileHeight=g(e.tileHeight,256),this._minimumLevel=g(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._tilingScheme=g(e.tilingScheme,new Qr({ellipsoid:e.ellipsoid})),this._rectangle=g(e.rectangle,this._tilingScheme.rectangle),this._rectangle=te.intersection(this._rectangle,this._tilingScheme.rectangle),this._tileDiscardPolicy=e.tileDiscardPolicy;let o=e.credit;typeof o=="string"&&(o=new St(o)),this._credit=o,this._hasAlphaChannel=g(e.hasAlphaChannel,!0);let r=e.customTags,s=bt(jme,r),a=bt(dit,r);this._tags=s,this._pickFeaturesTags=a,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this.enablePickFeatures=g(e.enablePickFeatures,!0)}Object.defineProperties(kD.prototype,{url:{get:function(){return this._resource.url}},urlSchemeZeroPadding:{get:function(){return this._urlSchemeZeroPadding}},pickFeaturesUrl:{get:function(){return this._pickFeaturesResource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return this._hasAlphaChannel}}});kD.prototype.getTileCredits=function(e,t,n){};kD.prototype.requestImage=function(e,t,n,i){return pl.loadImage(this,hit(this,e,t,n,i))};kD.prototype.pickFeatures=function(e,t,n,i,o){if(!this.enablePickFeatures||!c(this._pickFeaturesResource)||this._getFeatureInfoFormats.length===0)return;let r=0,s=this;function a(u,f){return u.callback(f)}function l(){if(r>=s._getFeatureInfoFormats.length)return Promise.resolve([]);let u=s._getFeatureInfoFormats[r],f=mit(s,e,t,n,i,o,u.format);return++r,u.type==="json"?f.fetchJson().then(u.callback).catch(l):u.type==="xml"?f.fetchXML().then(u.callback).catch(l):u.type==="text"||u.type==="html"?f.fetchText().then(u.callback).catch(l):f.fetch({responseType:u.format}).then(a.bind(void 0,u)).catch(l)}return l()};var TU=!1,cu=new te,CU=!1,UD=new te;function hit(e,t,n,i,o){TU=!1,CU=!1;let r=e._resource,s=r.getUrlComponent(!0),a=e._tags,l={},u=s.match(Gme);return c(u)&&u.forEach(function(f){let h=f.substring(1,f.length-1);c(a[h])&&(l[h]=a[h](e,t,n,i))}),r.getDerivedResource({request:o,templateValues:l})}var Wq=!1,KE=new k,qq=!1;function mit(e,t,n,i,o,r,s){TU=!1,CU=!1,Wq=!1,qq=!1;let a=e._pickFeaturesResource,l=a.getUrlComponent(!0),u=e._pickFeaturesTags,f={},h=l.match(Gme);return c(h)&&h.forEach(function(m){let p=m.substring(1,m.length-1);c(u[p])&&(f[p]=u[p](e,t,n,i,o,r,s))}),a.getDerivedResource({templateValues:f})}function $E(e,t,n){if(e&&e.urlSchemeZeroPadding&&e.urlSchemeZeroPadding.hasOwnProperty(t)){let i=e.urlSchemeZeroPadding[t];if(typeof i=="string"){let o=i.length;o>1&&(n=n.length>=o?n:new Array(o-n.toString().length+1).join("0")+n)}}return n}function pit(e,t,n,i){return $E(e,"{x}",t)}function _it(e,t,n,i){let o=e.tilingScheme.getNumberOfXTilesAtLevel(i)-t-1;return $E(e,"{reverseX}",o)}function git(e,t,n,i){return $E(e,"{y}",n)}function yit(e,t,n,i){let o=e.tilingScheme.getNumberOfYTilesAtLevel(i)-n-1;return $E(e,"{reverseY}",o)}function bit(e,t,n,i){let o=e.maximumLevel,r=c(o)&&i<o?o-i-1:i;return $E(e,"{reverseZ}",r)}function xit(e,t,n,i){return $E(e,"{z}",i)}function Tit(e,t,n,i){let o=(t+n+i)%e._subdomains.length;return e._subdomains[o]}function EU(e,t,n,i){TU||(e.tilingScheme.tileXYToRectangle(t,n,i,cu),cu.west=O.toDegrees(cu.west),cu.south=O.toDegrees(cu.south),cu.east=O.toDegrees(cu.east),cu.north=O.toDegrees(cu.north),TU=!0)}function Cit(e,t,n,i){return EU(e,t,n,i),cu.west}function Eit(e,t,n,i){return EU(e,t,n,i),cu.south}function wit(e,t,n,i){return EU(e,t,n,i),cu.east}function Sit(e,t,n,i){return EU(e,t,n,i),cu.north}function wU(e,t,n,i){CU||(e.tilingScheme.tileXYToNativeRectangle(t,n,i,UD),CU=!0)}function Ait(e,t,n,i){return wU(e,t,n,i),UD.west}function vit(e,t,n,i){return wU(e,t,n,i),UD.south}function Dit(e,t,n,i){return wU(e,t,n,i),UD.east}function Iit(e,t,n,i){return wU(e,t,n,i),UD.north}function Oit(e,t,n,i){return e.tileWidth}function Pit(e,t,n,i){return e.tileHeight}function Rit(e,t,n,i,o,r,s){return SU(e,t,n,i,o,r),KE.x}function Mit(e,t,n,i,o,r,s){return SU(e,t,n,i,o,r),KE.y}function Lit(e,t,n,i,o,r,s){return SU(e,t,n,i,o,r),e.tileWidth-KE.x-1}function Nit(e,t,n,i,o,r,s){return SU(e,t,n,i,o,r),e.tileHeight-KE.y-1}var Fit=new te,XE=new d;function SU(e,t,n,i,o,r,s){if(Wq)return;Yq(e,t,n,i,o,r);let a=XE,l=e.tilingScheme.tileXYToNativeRectangle(t,n,i,Fit);KE.x=e.tileWidth*(a.x-l.west)/l.width|0,KE.y=e.tileHeight*(l.north-a.y)/l.height|0,Wq=!0}function Bit(e,t,n,i,o,r,s){return O.toDegrees(o)}function kit(e,t,n,i,o,r,s){return O.toDegrees(r)}function Uit(e,t,n,i,o,r,s){return Yq(e,t,n,i,o,r),XE.x}function zit(e,t,n,i,o,r,s){return Yq(e,t,n,i,o,r),XE.y}var Vit=new re;function Yq(e,t,n,i,o,r,s){if(!qq){if(e.tilingScheme.projection instanceof Ei)XE.x=O.toDegrees(o),XE.y=O.toDegrees(r);else{let a=Vit;a.longitude=o,a.latitude=r,e.tilingScheme.projection.project(a,XE)}qq=!0}}function Hit(e,t,n,i,o,r,s){return s}var qa=kD;function Cf(e){qa.call(this,e)}Cf._requestMetadata=async function(e,t,n,i){try{let o=await n.fetchXML();return Cf._metadataSuccess(o,e,t,n,i)}catch(o){if(o instanceof Im)return Cf._metadataFailure(e,t);throw o}};Cf.fromUrl=async function(e,t){C.defined("url",e);let n=Te.createIfNeeded(e);n.appendForwardSlash();let i=n,o=n.getDerivedResource({url:"tilemapresource.xml"});t=g(t,g.EMPTY_OBJECT);let r=await Cf._requestMetadata(t,i,o);return new Cf(r)};c(Object.create)&&(Cf.prototype=Object.create(qa.prototype),Cf.prototype.constructor=Cf);function Wme(e,t){return e.west<t.rectangle.west&&(e.west=t.rectangle.west),e.east>t.rectangle.east&&(e.east=t.rectangle.east),e.south<t.rectangle.south&&(e.south=t.rectangle.south),e.north>t.rectangle.north&&(e.north=t.rectangle.north),e}function qme(e,t,n){let i=e.positionToTileXY(te.southwest(t),n),o=e.positionToTileXY(te.northeast(t),n);return(Math.abs(o.x-i.x)+1)*(Math.abs(o.y-i.y)+1)>4?0:n}Cf._metadataSuccess=function(e,t,n,i,o){let r=/tileformat/i,s=/tileset/i,a=/tilesets/i,l=/boundingbox/i,u,f,h,m=[],p=e.childNodes[0].childNodes;for(let P=0;P<p.length;P++)if(r.test(p.item(P).nodeName))u=p.item(P);else if(a.test(p.item(P).nodeName)){h=p.item(P);let L=p.item(P).childNodes;for(let F=0;F<L.length;F++)s.test(L.item(F).nodeName)&&m.push(L.item(F))}else l.test(p.item(P).nodeName)&&(f=p.item(P));let _;if(!c(h)||!c(f))throw _=`Unable to find expected tilesets or bbox attributes in ${i.url}.`,c(o)&&Eo.reportError(void 0,o,o.errorEvent,_),new ie(_);let b=g(t.fileExtension,u.getAttribute("extension")),x=g(t.tileWidth,parseInt(u.getAttribute("width"),10)),T=g(t.tileHeight,parseInt(u.getAttribute("height"),10)),E=g(t.minimumLevel,parseInt(m[0].getAttribute("order"),10)),S=g(t.maximumLevel,parseInt(m[m.length-1].getAttribute("order"),10)),A=h.getAttribute("profile"),v=t.tilingScheme;if(!c(v))if(A==="geodetic"||A==="global-geodetic")v=new Hi({ellipsoid:t.ellipsoid});else if(A==="mercator"||A==="global-mercator")v=new Qr({ellipsoid:t.ellipsoid});else throw _=`${i.url} specifies an unsupported profile attribute, ${A}.`,c(o)&&Eo.reportError(void 0,o,o.errorEvent,_),new ie(_);let D=te.clone(t.rectangle);if(!c(D)){let P,L,F,y;g(t.flipXY,!1)?(F=new k(parseFloat(f.getAttribute("miny")),parseFloat(f.getAttribute("minx"))),y=new k(parseFloat(f.getAttribute("maxy")),parseFloat(f.getAttribute("maxx")))):(F=new k(parseFloat(f.getAttribute("minx")),parseFloat(f.getAttribute("miny"))),y=new k(parseFloat(f.getAttribute("maxx")),parseFloat(f.getAttribute("maxy"))));let M=A==="geodetic"||A==="mercator";if(v.projection instanceof Ei||M)P=re.fromDegrees(F.x,F.y),L=re.fromDegrees(y.x,y.y);else{let B=v.projection;P=B.unproject(F),L=B.unproject(y)}D=new te(P.longitude,P.latitude,L.longitude,L.latitude)}return D=Wme(D,v),E=qme(v,D,E),{url:n.getDerivedResource({url:`{z}/{x}/{reverseY}.${b}`}),tilingScheme:v,rectangle:D,tileWidth:x,tileHeight:T,minimumLevel:E,maximumLevel:S,tileDiscardPolicy:t.tileDiscardPolicy,credit:t.credit}};Cf._metadataFailure=function(e,t){let n=g(e.fileExtension,"png"),i=g(e.tileWidth,256),o=g(e.tileHeight,256),r=e.maximumLevel,s=c(e.tilingScheme)?e.tilingScheme:new Qr({ellipsoid:e.ellipsoid}),a=g(e.rectangle,s.rectangle);a=Wme(a,s);let l=qme(s,a,e.minimumLevel);return{url:t.getDerivedResource({url:`{z}/{x}/{reverseY}.${n}`}),tilingScheme:s,rectangle:a,tileWidth:i,tileHeight:o,minimumLevel:l,maximumLevel:r,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit}};var zD=Cf;function Yme(e){this.channel=e.channel,this.ellipsoid=e.ellipsoid,this.tilingScheme=void 0,this.version=void 0}Yme.prototype.build=function(e){e._channel=this.channel,e._version=this.version,e._tilingScheme=this.tilingScheme};function Git(e,t){let n;try{n=JSON.parse(e)}catch{n=JSON.parse(e.replace(/([\[\{,])[\n\r ]*([A-Za-z0-9]+)[\n\r ]*:/g,'$1"$2":'))}let i;for(let o=0;o<n.layers.length;o++)if(n.layers[o].id===t.channel){i=n.layers[o];break}if(!c(i)){let o=`Could not find layer with channel (id) of ${t.channel}.`;throw new ie(o)}if(!c(i.version)){let o=`Could not find a version in channel (id) ${t.channel}.`;throw new ie(o)}if(t.version=i.version,c(n.projection)&&n.projection==="flat")t.tilingScheme=new Hi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new te(-Math.PI,-Math.PI,Math.PI,Math.PI),ellipsoid:t.ellipsoid});else if(!c(n.projection)||n.projection==="mercator")t.tilingScheme=new Qr({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:t.ellipsoid});else{let o=`Unsupported projection ${n.projection}.`;throw new ie(o)}return!0}function jit(e,t,n){let i=`An error occurred while accessing ${t.url}.`;throw c(e)&&c(e.message)&&(i+=`: ${e.message}`),Eo.reportError(void 0,n,c(n)?n._errorEvent:void 0,i),new ie(i)}async function Wit(e,t,n){try{let i=await e.fetchText();Git(i,t)}catch(i){jit(i,e,n)}}function _l(e){e=g(e,{}),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=1.9,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileDiscardPolicy=e.tileDiscardPolicy,this._channel=e.channel,this._requestType="ImageryMaps",this._credit=new St(`<a href="http://www.google.com/enterprise/mapsearth/products/earthenterprise.html"><img src="${_l.logoUrl}" title="Google Imagery"/></a>`),this._tilingScheme=void 0,this._version=void 0,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=e.maximumLevel,this._errorEvent=new fe}Object.defineProperties(_l.prototype,{url:{get:function(){return this._url}},path:{get:function(){return this._path}},proxy:{get:function(){return this._resource.proxy}},channel:{get:function(){return this._channel}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},version:{get:function(){return this._version}},requestType:{get:function(){return this._requestType}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}});_l.fromUrl=async function(e,t,n){C.defined("url",e),C.defined("channel",t),n=g(n,{});let i=g(n.path,"/default_map"),o=Te.createIfNeeded(e).getDerivedResource({url:i[0]==="/"?i.substring(1):i});o.appendForwardSlash();let r=o.getDerivedResource({url:"query",queryParameters:{request:"Json",vars:"geeServerDefs",is2d:"t"}}),s=new Yme(n);s.channel=t,await Wit(r,s);let a=new _l(n);return s.build(a),a._resource=o,a._url=e,a._path=i,a};_l.prototype.getTileCredits=function(e,t,n){};_l.prototype.requestImage=function(e,t,n,i){let o=this._resource.getDerivedResource({url:"query",request:i,queryParameters:{request:this._requestType,channel:this._channel,version:this._version,x:e,y:t,z:n+1}});return pl.loadImage(this,o)};_l.prototype.pickFeatures=function(e,t,n,i,o){};_l._logoUrl=void 0;Object.defineProperties(_l,{logoUrl:{get:function(){return c(_l._logoUrl)||(_l._logoUrl=Mi("Assets/Images/google_earth_credit.png")),_l._logoUrl},set:function(e){C.defined("value",e),_l._logoUrl=e}}});var AU=_l;var qit=/\/$/,Xme=new St('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function ZE(e){e=g(e,g.EMPTY_OBJECT);let t=e.mapId;if(!c(t))throw new w("options.mapId is required.");let n=e.accessToken;if(!c(n))throw new w("options.accessToken is required.");this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let i=Te.createIfNeeded(g(e.url,"https://{s}.tiles.mapbox.com/v4/"));this._mapId=t,this._accessToken=n;let o=g(e.format,"png");/\./.test(o)||(o=`.${o}`),this._format=o;let r=i.getUrlComponent();qit.test(r)||(r+="/"),r+=`${t}/{z}/{x}/{y}${this._format}`,i.url=r,i.setQueryParameters({access_token:n});let s;c(e.credit)?(s=e.credit,typeof s=="string"&&(s=new St(s))):s=Xme,this._resource=i,this._imageryProvider=new qa({url:i,credit:s,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(ZE.prototype,{url:{get:function(){return this._imageryProvider.url}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});ZE.prototype.getTileCredits=function(e,t,n){};ZE.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};ZE.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};ZE._defaultCredit=Xme;var vU=ZE;function P0(e){e=g(e,g.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let t=g(e.rectangle,te.MAX_VALUE),n=new Hi({rectangle:t,numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});this._tilingScheme=n,this._image=void 0,this._texture=void 0,this._hasError=!1,this._errorEvent=new fe;let i=e.credit;typeof i=="string"&&(i=new St(i)),this._credit=i,C.defined("options.url",e.url);let o=Te.createIfNeeded(e.url);this._resource=o,C.typeOf.number("options.tileWidth",e.tileWidth),C.typeOf.number("options.tileHeight",e.tileHeight),this._tileWidth=e.tileWidth,this._tileHeight=e.tileHeight}Object.defineProperties(P0.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return 0}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}});function Yit(e,t,n,i){let o=`Failed to load image ${e.url}`;c(t)&&c(t.message)&&(o+=`: ${t.message}`);let r=Eo.reportError(i,n,c(n)?n._errorEvent:void 0,o,0,0,0,t);if(r.retry)return Xq(e,n,r);throw c(n)&&(n._hasError=!0),new ie(o)}async function Xq(e,t,n){try{return await pl.loadImage(null,e)}catch(i){return Yit(e,i,t,n)}}P0.fromUrl=async function(e,t){C.defined("url",e);let n=Te.createIfNeeded(e),i=await Xq(n);t=g(t,g.EMPTY_OBJECT);let o=new P0({...t,url:e,tileWidth:i.width,tileHeight:i.height});return o._image=i,o};P0.prototype.getTileCredits=function(e,t,n){};P0.prototype.requestImage=async function(e,t,n,i){if(!this._hasError&&!c(this._image)){let o=await Xq(this._resource,this);return this._image=o,Eo.reportSuccess(this._errorEvent),o}return this._image};P0.prototype.pickFeatures=function(e,t,n,i,o){};var DU=P0;function Xit(e,t,n){if(!c(e))throw new w("type is required.");if(this.type=e,!c(t))if(e==="json")t="application/json";else if(e==="xml")t="text/xml";else if(e==="html")t="text/html";else if(e==="text")t="text/plain";else throw new w('format is required when type is not "json", "xml", "html", or "text".');if(this.format=t,!c(n))if(e==="json")n=Kit;else if(e==="xml")n=Qit;else if(e==="html")n=Kme;else if(e==="text")n=Kme;else throw new w('callback is required when type is not "json", "xml", "html", or "text".');this.callback=n}function Kit(e){let t=[],n=e.features;for(let i=0;i<n.length;++i){let o=n[i],r=new rm;if(r.data=o,r.properties=o.properties,r.configureNameFromProperties(o.properties),r.configureDescriptionFromProperties(o.properties),c(o.geometry)&&o.geometry.type==="Point"){let s=o.geometry.coordinates[0],a=o.geometry.coordinates[1];r.position=re.fromDegrees(s,a)}t.push(r)}return t}var Kq="http://www.mapinfo.com/mxp",$it="http://www.esri.com/wms",Zit="http://www.opengis.net/wfs",Jit="http://www.opengis.net/gml";function Qit(e){let t=e.documentElement;if(t.localName==="MultiFeatureCollection"&&t.namespaceURI===Kq)return eot(e);if(t.localName==="FeatureInfoResponse"&&t.namespaceURI===$it)return tot(e);if(t.localName==="FeatureCollection"&&t.namespaceURI===Zit)return not(e);if(t.localName==="ServiceExceptionReport")throw new ie(new XMLSerializer().serializeToString(t));return t.localName==="msGMLOutput"?iot(e):oot(e)}function eot(e){let t=[],i=e.documentElement.getElementsByTagNameNS(Kq,"Feature");for(let o=0;o<i.length;++o){let r=i[o],s={},a=r.getElementsByTagNameNS(Kq,"Val");for(let u=0;u<a.length;++u){let f=a[u];if(f.hasAttribute("ref")){let h=f.getAttribute("ref"),m=f.textContent.trim();s[h]=m}}let l=new rm;l.data=r,l.properties=s,l.configureNameFromProperties(s),l.configureDescriptionFromProperties(s),t.push(l)}return t}function tot(e){let t=e.documentElement,n=[],i,o=t.getElementsByTagNameNS("*","FIELDS");if(o.length>0)for(let r=0;r<o.length;++r){let s=o[r];i={};let a=s.attributes;for(let l=0;l<a.length;++l){let u=a[l];i[u.name]=u.value}n.push(IU(s,i))}else{let r=t.getElementsByTagNameNS("*","FeatureInfo");for(let s=0;s<r.length;++s){let a=r[s];i={};let l=a.childNodes;for(let u=0;u<l.length;++u){let f=l[u];f.nodeType===Node.ELEMENT_NODE&&(i[f.localName]=f.textContent)}n.push(IU(a,i))}}return n}function not(e){let t=[],i=e.documentElement.getElementsByTagNameNS(Jit,"featureMember");for(let o=0;o<i.length;++o){let r=i[o],s={};$q(r,s),t.push(IU(r,s))}return t}function iot(e){let t=[],n,i=e.documentElement.childNodes;for(let r=0;r<i.length;r++)if(i[r].nodeType===Node.ELEMENT_NODE){n=i[r];break}if(!c(n))throw new ie("Unable to find first child of the feature info xml document");let o=n.childNodes;for(let r=0;r<o.length;++r){let s=o[r];if(s.nodeType===Node.ELEMENT_NODE){let a={};$q(s,a),t.push(IU(s,a))}}return t}function $q(e,t){let n=!0;for(let i=0;i<e.childNodes.length;++i){let o=e.childNodes[i];o.nodeType===Node.ELEMENT_NODE&&(n=!1),!(o.localName==="Point"||o.localName==="LineString"||o.localName==="Polygon"||o.localName==="boundedBy")&&o.hasChildNodes()&&$q(o,t)&&(t[o.localName]=o.textContent)}return n}function IU(e,t){let n=new rm;return n.data=e,n.properties=t,n.configureNameFromProperties(t),n.configureDescriptionFromProperties(t),n}function oot(e){let t=new XMLSerializer().serializeToString(e),n=document.createElement("div"),i=document.createElement("pre");i.textContent=t,n.appendChild(i);let o=new rm;return o.data=e,o.description=n.innerHTML,[o]}var rot=/<body>\s*<\/body>/im,sot=/<ServiceExceptionReport([\s\S]*)<\/ServiceExceptionReport>/im,aot=/<title>([\s\S]*)<\/title>/im;function Kme(e){if(rot.test(e)||sot.test(e))return;let t,n=aot.exec(e);n&&n.length>1&&(t=n[1]);let i=new rm;return i.name=t,i.description=e,i.data=e,[i]}var JE=Xit;function VD(e){e=g(e,g.EMPTY_OBJECT),C.typeOf.object("options.clock",e.clock),C.typeOf.object("options.times",e.times),C.typeOf.func("options.requestImageFunction",e.requestImageFunction),C.typeOf.func("options.reloadFunction",e.reloadFunction),this._tileCache={},this._tilesRequestedForInterval=[];let t=this._clock=e.clock;this._times=e.times,this._requestImageFunction=e.requestImageFunction,this._reloadFunction=e.reloadFunction,this._currentIntervalIndex=-1,t.onTick.addEventListener(this._clockOnTick,this),this._clockOnTick(t)}Object.defineProperties(VD.prototype,{clock:{get:function(){return this._clock},set:function(e){if(!c(e))throw new w("value is required.");this._clock!==e&&(this._clock=e,this._clockOnTick(e),this._reloadFunction())}},times:{get:function(){return this._times},set:function(e){if(!c(e))throw new w("value is required.");this._times!==e&&(this._times=e,this._clockOnTick(this._clock),this._reloadFunction())}},currentInterval:{get:function(){return this._times.get(this._currentIntervalIndex)}}});VD.prototype.getFromCache=function(e,t,n,i){let o=$me(e,t,n),r,s=this._tileCache[this._currentIntervalIndex];if(c(s)&&c(s[o])){let a=s[o];r=a.promise.catch(function(l){throw i.state=a.request.state,l}),delete s[o]}return r};VD.prototype.checkApproachingInterval=function(e,t,n,i){let o=$me(e,t,n),r=this._tilesRequestedForInterval,s=Zme(this),a={key:o,priorityFunction:i.priorityFunction};(!c(s)||!Jme(this,a,s))&&r.push(a),r.length>=512&&r.splice(0,256)};VD.prototype._clockOnTick=function(e){let t=e.currentTime,i=this._times.indexOf(t),o=this._currentIntervalIndex;if(i!==o){let s=this._tileCache[o];for(let a in s)s.hasOwnProperty(a)&&s[a].request.cancel();delete this._tileCache[o],this._tilesRequestedForInterval=[],this._currentIntervalIndex=i,this._reloadFunction();return}let r=Zme(this);if(c(r)){let s=this._tilesRequestedForInterval,a=!0;for(;a&&s.length!==0;){let l=s.pop();a=Jme(this,l,r),a||s.push(l)}}};function $me(e,t,n){return`${e}-${t}-${n}`}function cot(e){let t=e.split("-");if(t.length===3)return{x:Number(t[0]),y:Number(t[1]),level:Number(t[2])}}function Zme(e){let t=e._times;if(!c(t))return;let n=e._clock,i=n.currentTime,o=n.canAnimate&&n.shouldAnimate,r=n.multiplier;if(!o&&r!==0)return;let s,a=t.indexOf(i);if(a<0)return;let l=t.get(a);return r>0?(s=K.secondsDifference(l.stop,i),++a):(s=K.secondsDifference(l.start,i),--a),s/=r,a>=0&&s<=5?t.get(a):void 0}function Jme(e,t,n){let i=e._times.indexOf(n.start),o=e._tileCache,r=o[i];c(r)||(r=o[i]={});let s=t.key;if(c(r[s]))return!0;let a=cot(s),l=new Ko({throttle:!1,throttleByServer:!0,type:is.IMAGERY,priorityFunction:t.priorityFunction}),u=e._requestImageFunction(a.x,a.y,a.level,l,n);return c(u)?(r[s]={promise:u,request:l},!0):!1}var QE=VD;var lot=[3034,3035,3042,3043,3044],uot=[4471,4559];function Rd(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.url))throw new w("options.url is required.");if(!c(e.layers))throw new w("options.layers is required.");if(c(e.times)&&!c(e.clock))throw new w("options.times was specified, so options.clock is required.");this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._getFeatureInfoUrl=g(e.getFeatureInfoUrl,e.url);let t=Te.createIfNeeded(e.url),n=Te.createIfNeeded(this._getFeatureInfoUrl);t.setQueryParameters(Rd.DefaultParameters,!0),n.setQueryParameters(Rd.GetFeatureInfoDefaultParameters,!0),c(e.parameters)&&t.setQueryParameters(Qme(e.parameters)),c(e.getFeatureInfoParameters)&&n.setQueryParameters(Qme(e.getFeatureInfoParameters));let i=this;this._reload=void 0,c(e.times)&&(this._timeDynamicImagery=new QE({clock:e.clock,times:e.times,requestImageFunction:function(s,a,l,u,f){return epe(i,s,a,l,u,f)},reloadFunction:function(){c(i._reload)&&i._reload()}}));let o={};if(o.layers=e.layers,o.bbox="{westProjected},{southProjected},{eastProjected},{northProjected}",o.width="{width}",o.height="{height}",parseFloat(t.queryParameters.version)>=1.3){o.crs=g(e.crs,e.tilingScheme&&e.tilingScheme.projection instanceof Si?"EPSG:3857":"CRS:84");let s=o.crs.split(":");if(s[0]==="EPSG"&&s.length===2){let a=Number(s[1]);(a>=4e3&&a<5e3&&!uot.includes(a)||lot.includes(a))&&(o.bbox="{southProjected},{westProjected},{northProjected},{eastProjected}")}}else o.srs=g(e.srs,e.tilingScheme&&e.tilingScheme.projection instanceof Si?"EPSG:3857":"EPSG:4326");t.setQueryParameters(o,!0),n.setQueryParameters(o,!0);let r={query_layers:e.layers,info_format:"{format}"};parseFloat(n.queryParameters.version)>=1.3?(r.i="{i}",r.j="{j}"):(r.x="{i}",r.y="{j}"),n.setQueryParameters(r,!0),this._resource=t,this._pickFeaturesResource=n,this._layers=e.layers,this._tileProvider=new qa({url:t,pickFeaturesUrl:n,tilingScheme:g(e.tilingScheme,new Hi({ellipsoid:e.ellipsoid})),rectangle:e.rectangle,tileWidth:e.tileWidth,tileHeight:e.tileHeight,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,subdomains:e.subdomains,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit,getFeatureInfoFormats:g(e.getFeatureInfoFormats,Rd.DefaultGetFeatureInfoFormats),enablePickFeatures:e.enablePickFeatures})}function epe(e,t,n,i,o,r){let s=c(r)?r.data:void 0,a=e._tileProvider;return c(s)&&a._resource.setQueryParameters(s),a.requestImage(t,n,i,o)}function fot(e,t,n,i,o,r,s){let a=c(s)?s.data:void 0,l=e._tileProvider;return c(a)&&l._pickFeaturesResource.setQueryParameters(a),l.pickFeatures(t,n,i,o,r)}Object.defineProperties(Rd.prototype,{url:{get:function(){return this._resource._url}},proxy:{get:function(){return this._resource.proxy}},layers:{get:function(){return this._layers}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return this._tileProvider.hasAlphaChannel}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},getFeatureInfoUrl:{get:function(){return this._getFeatureInfoUrl}}});Rd.prototype.getTileCredits=function(e,t,n){return this._tileProvider.getTileCredits(e,t,n)};Rd.prototype.requestImage=function(e,t,n,i){let o,r=this._timeDynamicImagery,s;return c(r)&&(s=r.currentInterval,o=r.getFromCache(e,t,n,i)),c(o)||(o=epe(this,e,t,n,i,s)),c(o)&&c(r)&&r.checkApproachingInterval(e,t,n,i),o};Rd.prototype.pickFeatures=function(e,t,n,i,o){let r=this._timeDynamicImagery,s=c(r)?r.currentInterval:void 0;return fot(this,e,t,n,i,o,s)};Rd.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"});Rd.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"});Rd.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new JE("json","application/json")),Object.freeze(new JE("xml","text/xml")),Object.freeze(new JE("text","text/html"))]);function Qme(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toLowerCase()]=e[n]);return t}var OU=Rd;var dot=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function HD(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.url))throw new w("options.url is required.");if(!c(e.layer))throw new w("options.layer is required.");if(!c(e.style))throw new w("options.style is required.");if(!c(e.tileMatrixSetID))throw new w("options.tileMatrixSetID is required.");if(c(e.times)&&!c(e.clock))throw new w("options.times was specified, so options.clock is required.");this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let t=Te.createIfNeeded(e.url),n=e.style,i=e.tileMatrixSetID,o=t.url,r=o.match(/{/g);if(!c(r)||r.length===1&&/{s}/.test(o))t.setQueryParameters(dot),this._useKvp=!0;else{let h={style:n,Style:n,TileMatrixSet:i};t.setTemplateValues(h),this._useKvp=!1}this._resource=t,this._layer=e.layer,this._style=n,this._tileMatrixSetID=i,this._tileMatrixLabels=e.tileMatrixLabels,this._format=g(e.format,"image/jpeg"),this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=c(e.tilingScheme)?e.tilingScheme:new Qr({ellipsoid:e.ellipsoid}),this._tileWidth=g(e.tileWidth,256),this._tileHeight=g(e.tileHeight,256),this._minimumLevel=g(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=g(e.rectangle,this._tilingScheme.rectangle),this._dimensions=e.dimensions;let s=this;this._reload=void 0,c(e.times)&&(this._timeDynamicImagery=new QE({clock:e.clock,times:e.times,requestImageFunction:function(h,m,p,_,b){return tpe(s,h,m,p,_,b)},reloadFunction:function(){c(s._reload)&&s._reload()}}));let a=this._tilingScheme.positionToTileXY(te.southwest(this._rectangle),this._minimumLevel),l=this._tilingScheme.positionToTileXY(te.northeast(this._rectangle),this._minimumLevel),u=(Math.abs(l.x-a.x)+1)*(Math.abs(l.y-a.y)+1);if(u>4)throw new w(`The imagery provider's rectangle and minimumLevel indicate that there are ${u} tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.`);this._errorEvent=new fe;let f=e.credit;this._credit=typeof f=="string"?new St(f):f,this._subdomains=e.subdomains,Array.isArray(this._subdomains)?this._subdomains=this._subdomains.slice():c(this._subdomains)&&this._subdomains.length>0?this._subdomains=this._subdomains.split(""):this._subdomains=["a","b","c"]}function tpe(e,t,n,i,o,r){let s=e._tileMatrixLabels,a=c(s)?s[i]:i.toString(),l=e._subdomains,u=e._dimensions,f=c(r)?r.data:void 0,h,m;if(!e._useKvp)m={TileMatrix:a,TileRow:n.toString(),TileCol:t.toString(),s:l[(t+n+i)%l.length]},h=e._resource.getDerivedResource({request:o}),h.setTemplateValues(m),c(u)&&h.setTemplateValues(u),c(f)&&h.setTemplateValues(f);else{let p={};p.tilematrix=a,p.layer=e._layer,p.style=e._style,p.tilerow=n,p.tilecol=t,p.tilematrixset=e._tileMatrixSetID,p.format=e._format,c(u)&&(p=bt(p,u)),c(f)&&(p=bt(p,f)),m={s:l[(t+n+i)%l.length]},h=e._resource.getDerivedResource({queryParameters:p,request:o}),h.setTemplateValues(m)}return pl.loadImage(e,h)}Object.defineProperties(HD.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},format:{get:function(){return this._format}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},dimensions:{get:function(){return this._dimensions},set:function(e){this._dimensions!==e&&(this._dimensions=e,c(this._reload)&&this._reload())}}});HD.prototype.getTileCredits=function(e,t,n){};HD.prototype.requestImage=function(e,t,n,i){let o,r=this._timeDynamicImagery,s;return c(r)&&(s=r.currentInterval,o=r.getFromCache(e,t,n,i)),c(o)||(o=tpe(this,e,t,n,i,s)),c(o)&&c(r)&&r.checkApproachingInterval(e,t,n,i),o};HD.prototype.pickFeatures=function(e,t,n,i,o){};var PU=HD;var hot={ARCGIS_MAPSERVER:yU.fromUrl,BING:async(e,t)=>xU.fromUrl(e,t),GOOGLE_EARTH:async(e,t)=>{let n=t.channel;return delete t.channel,AU.fromUrl(e,n,t)},MAPBOX:(e,t)=>new vU({url:e,...t}),SINGLE_TILE:DU.fromUrl,TMS:zD.fromUrl,URL_TEMPLATE:(e,t)=>new qa({url:e,...t}),WMS:(e,t)=>new OU({url:e,...t}),WMTS:(e,t)=>new PU({url:e,...t})};function am(e){e=g(e,g.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileCredits=void 0,this._errorEvent=new fe}Object.defineProperties(am.prototype,{rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}},proxy:{get:function(){}}});am.fromAssetId=async function(e,t){C.typeOf.number("assetId",e),t=g(t,g.EMPTY_OBJECT);let n=Uu._createEndpointResource(e,t),i=e.toString()+t.accessToken+t.server,o=am._endpointCache[i];c(o)||(o=n.fetchJson(),am._endpointCache[i]=o);let r=await o;if(r.type!=="IMAGERY")throw new ie(`Cesium ion asset ${e} is not an imagery asset.`);let s,a=r.externalType;if(!c(a))s=await zD.fromUrl(new Uu(r,n));else{let u=hot[a];if(!c(u))throw new ie(`Unrecognized Cesium ion imagery type: ${a}`);let f={...r.options},h=f.url;delete f.url,s=await u(h,f)}let l=new am(t);return s.errorEvent.addEventListener(function(u){u.provider=l,l._errorEvent.raiseEvent(u)}),l._tileCredits=Uu.getCreditsFromEndpoint(r,n),l._imageryProvider=s,l};am.prototype.getTileCredits=function(e,t,n){let i=this._imageryProvider.getTileCredits(e,t,n);return c(i)?this._tileCredits.concat(i):this._tileCredits};am.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};am.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};am._endpointCache={};var RU=am;var mot={AERIAL:2,AERIAL_WITH_LABELS:3,ROAD:4},MU=Object.freeze(mot);function pot(e){e=g(e,g.EMPTY_OBJECT);let t=g(e.style,MU.AERIAL);return RU.fromAssetId(t)}var LU=pot;var NU=`uniform sampler2D u_texture;
|
| in vec2 v_textureCoordinates;
|
| void main()
| {
| out_FragColor = texture(u_texture, v_textureCoordinates);
| }
| `;var FU=`in vec4 position;
| in float webMercatorT;
|
| uniform vec2 u_textureDimensions;
|
| out vec2 v_textureCoordinates;
|
| void main()
| {
| v_textureCoordinates = vec2(position.x, webMercatorT);
| gl_Position = czm_viewportOrthographic * (position * vec4(u_textureDimensions, 1.0, 1.0));
| }
| `;function ew(e,t,n,i,o){if(this.imageryLayer=e,this.x=t,this.y=n,this.level=i,this.request=void 0,i!==0){let r=t/2|0,s=n/2|0,a=i-1;this.parent=e.getImageryFromCache(r,s,a)}this.state=ni.UNLOADED,this.imageUrl=void 0,this.image=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,!c(o)&&e.ready&&(o=e.imageryProvider.tilingScheme.tileXYToRectangle(t,n,i)),this.rectangle=o}ew.createPlaceholder=function(e){let t=new ew(e,0,0,0);return t.addReference(),t.state=ni.PLACEHOLDER,t};ew.prototype.addReference=function(){++this.referenceCount};ew.prototype.releaseReference=function(){return--this.referenceCount,this.referenceCount===0?(this.imageryLayer.removeImageryFromCache(this),c(this.parent)&&this.parent.releaseReference(),c(this.image)&&c(this.image.destroy)&&this.image.destroy(),c(this.texture)&&this.texture.destroy(),c(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),ue(this),0):this.referenceCount};ew.prototype.processStateMachine=function(e,t,n){this.state===ni.UNLOADED&&!n&&(this.state=ni.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===ni.RECEIVED&&(this.state=ni.TRANSITIONING,this.imageryLayer._createTexture(e.context,this));let i=this.state===ni.READY&&t&&!this.texture;(this.state===ni.TEXTURE_LOADED||i)&&(this.state=ni.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))};var GD=ew;function Zq(e,t,n){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=n}Zq.prototype.freeResources=function(){c(this.readyImagery)&&this.readyImagery.releaseReference(),c(this.loadingImagery)&&this.loadingImagery.releaseReference()};Zq.prototype.processStateMachine=function(e,t,n){let i=this.loadingImagery,o=i.imageryLayer;if(i.processStateMachine(t,!this.useWebMercatorT,n),i.state===ni.READY)return c(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=this.loadingImagery,this.loadingImagery=void 0,this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(e,this),!0;let r=i.parent,s;for(;c(r)&&(r.state!==ni.READY||!this.useWebMercatorT&&!c(r.texture));)r.state!==ni.FAILED&&r.state!==ni.INVALID&&(s=s||r),r=r.parent;return this.readyImagery!==r&&(c(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=r,c(r)&&(r.addReference(),this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(e,this))),i.state===ni.FAILED||i.state===ni.INVALID?c(s)?(s.processStateMachine(t,!this.useWebMercatorT,n),!1):!0:!1};var jD=Zq;function di(e,t){this._imageryProvider=e,this._readyEvent=new fe,this._errorEvent=new fe,t=g(t,g.EMPTY_OBJECT),e=g(e,g.EMPTY_OBJECT),this.alpha=g(t.alpha,g(e._defaultAlpha,1)),this.nightAlpha=g(t.nightAlpha,g(e._defaultNightAlpha,1)),this.dayAlpha=g(t.dayAlpha,g(e._defaultDayAlpha,1)),this.brightness=g(t.brightness,g(e._defaultBrightness,di.DEFAULT_BRIGHTNESS)),this.contrast=g(t.contrast,g(e._defaultContrast,di.DEFAULT_CONTRAST)),this.hue=g(t.hue,g(e._defaultHue,di.DEFAULT_HUE)),this.saturation=g(t.saturation,g(e._defaultSaturation,di.DEFAULT_SATURATION)),this.gamma=g(t.gamma,g(e._defaultGamma,di.DEFAULT_GAMMA)),this.splitDirection=g(t.splitDirection,di.DEFAULT_SPLIT),this.minificationFilter=g(t.minificationFilter,g(e._defaultMinificationFilter,di.DEFAULT_MINIFICATION_FILTER)),this.magnificationFilter=g(t.magnificationFilter,g(e._defaultMagnificationFilter,di.DEFAULT_MAGNIFICATION_FILTER)),this.show=g(t.show,!0),this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=g(t.rectangle,te.MAX_VALUE),this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new jD(GD.createPlaceholder(this)),this._show=!0,this._layerIndex=-1,this._isBaseLayer=!1,this._requestImageError=void 0,this._reprojectComputeCommands=[],this.cutoutRectangle=t.cutoutRectangle,this.colorToAlpha=t.colorToAlpha,this.colorToAlphaThreshold=g(t.colorToAlphaThreshold,di.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD)}Object.defineProperties(di.prototype,{imageryProvider:{get:function(){return this._imageryProvider}},ready:{get:function(){return c(this._imageryProvider)}},errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},rectangle:{get:function(){return this._rectangle}}});di.DEFAULT_BRIGHTNESS=1;di.DEFAULT_CONTRAST=1;di.DEFAULT_HUE=0;di.DEFAULT_SATURATION=1;di.DEFAULT_GAMMA=1;di.DEFAULT_SPLIT=Nr.NONE;di.DEFAULT_MINIFICATION_FILTER=Wt.LINEAR;di.DEFAULT_MAGNIFICATION_FILTER=si.LINEAR;di.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004;di.fromProviderAsync=function(e,t){C.typeOf.object("imageryProviderPromise",e);let n=new di(void 0,t);return xot(n,Promise.resolve(e)),n};di.fromWorldImagery=function(e){return e=g(e,g.EMPTY_OBJECT),di.fromProviderAsync(LU({style:e.style}),e)};di.prototype.isBaseLayer=function(){return this._isBaseLayer};di.prototype.isDestroyed=function(){return!1};di.prototype.destroy=function(){return ue(this)};var ope=new te,npe=new te,Jq=new te,rpe=new te;di.prototype.getImageryRectangle=function(){let e=this._imageryProvider,t=this._rectangle;return te.intersection(e.rectangle,t)};di.prototype._createTileImagerySkeletons=function(e,t,n){let i=e.data;if(!c(t)||c(this._minimumTerrainLevel)&&e.level<this._minimumTerrainLevel||c(this._maximumTerrainLevel)&&e.level>this._maximumTerrainLevel)return!1;c(n)||(n=i.imagery.length);let o=this._imageryProvider;if(!this.ready)return this._skeletonPlaceholder.loadingImagery.addReference(),i.imagery.splice(n,0,this._skeletonPlaceholder),!0;let r=o.tilingScheme.projection instanceof Si&&e.rectangle.north<Si.MaximumLatitude&&e.rectangle.south>-Si.MaximumLatitude,s=te.intersection(o.rectangle,this._rectangle,ope),a=te.intersection(e.rectangle,s,npe);if(!c(a)){if(!this.isBaseLayer())return!1;let M=s,B=e.rectangle;a=npe,B.south>=M.north?a.north=a.south=M.north:B.north<=M.south?a.north=a.south=M.south:(a.south=Math.max(B.south,M.south),a.north=Math.min(B.north,M.north)),B.west>=M.east?a.west=a.east=M.east:B.east<=M.west?a.west=a.east=M.west:(a.west=Math.max(B.west,M.west),a.east=Math.min(B.east,M.east))}let l=0;a.south>0?l=a.south:a.north<0&&(l=a.north);let f=1*t.getLevelMaximumGeometricError(e.level),h=yot(this,f,l);h=Math.max(0,h);let m=o.maximumLevel;if(h>m&&(h=m),c(o.minimumLevel)){let M=o.minimumLevel;h<M&&(h=M)}let p=o.tilingScheme,_=p.positionToTileXY(te.northwest(a),h),b=p.positionToTileXY(te.southeast(a),h),x=e.rectangle.width/512,T=e.rectangle.height/512,E=p.tileXYToRectangle(_.x,_.y,h);Math.abs(E.south-e.rectangle.north)<T&&_.y<b.y&&++_.y,Math.abs(E.east-e.rectangle.west)<x&&_.x<b.x&&++_.x;let S=p.tileXYToRectangle(b.x,b.y,h);Math.abs(S.north-e.rectangle.south)<T&&b.y>_.y&&--b.y,Math.abs(S.west-e.rectangle.east)<x&&b.x>_.x&&--b.x;let A=te.clone(e.rectangle,rpe),v=p.tileXYToRectangle(_.x,_.y,h),D=te.intersection(v,s,Jq),R;r?(p.rectangleToNativeRectangle(A,A),p.rectangleToNativeRectangle(v,v),p.rectangleToNativeRectangle(D,D),p.rectangleToNativeRectangle(s,s),R=p.tileXYToNativeRectangle.bind(p),x=A.width/512,T=A.height/512):R=p.tileXYToRectangle.bind(p);let P,L=0,F=1,y;!this.isBaseLayer()&&Math.abs(D.west-A.west)>=x&&(L=Math.min(1,(D.west-A.west)/A.width)),!this.isBaseLayer()&&Math.abs(D.north-A.north)>=T&&(F=Math.max(0,(D.north-A.south)/A.height));let I=F;for(let M=_.x;M<=b.x;M++)if(P=L,v=R(M,_.y,h),D=te.simpleIntersection(v,s,Jq),!!c(D)){L=Math.min(1,(D.east-A.west)/A.width),M===b.x&&(this.isBaseLayer()||Math.abs(D.east-A.east)<x)&&(L=1),F=I;for(let B=_.y;B<=b.y;B++){if(y=F,v=R(M,B,h),D=te.simpleIntersection(v,s,Jq),!c(D))continue;F=Math.max(0,(D.south-A.south)/A.height),B===b.y&&(this.isBaseLayer()||Math.abs(D.south-A.south)<T)&&(F=0);let U=new ee(P,F,L,y),V=this.getImageryFromCache(M,B,h);i.imagery.splice(n,0,new jD(V,U,r)),++n}}return!0};di.prototype._calculateTextureTranslationAndScale=function(e,t){let n=t.readyImagery.rectangle,i=e.rectangle;if(t.useWebMercatorT){let l=t.readyImagery.imageryLayer.imageryProvider.tilingScheme;n=l.rectangleToNativeRectangle(n,ope),i=l.rectangleToNativeRectangle(i,rpe)}let o=i.width,r=i.height,s=o/n.width,a=r/n.height;return new ee(s*(i.west-n.west)/o,a*(i.south-n.south)/r,s,a)};di.prototype._requestImagery=function(e){let t=this._imageryProvider,n=this;function i(s){if(!c(s))return o();e.image=s,e.state=ni.RECEIVED,e.request=void 0,Eo.reportSuccess(n._requestImageError)}function o(s){if(e.request.state===qn.CANCELLED){e.state=ni.UNLOADED,e.request=void 0;return}e.state=ni.FAILED,e.request=void 0;let a=`Failed to obtain image tile X: ${e.x} Y: ${e.y} Level: ${e.level}.`;n._requestImageError=Eo.reportError(n._requestImageError,t,t.errorEvent,a,e.x,e.y,e.level,s),n._requestImageError.retry&&r()}function r(){let s=new Ko({throttle:!1,throttleByServer:!0,type:is.IMAGERY});e.request=s,e.state=ni.TRANSITIONING;let a=t.requestImage(e.x,e.y,e.level,s);if(!c(a)){e.state=ni.UNLOADED,e.request=void 0;return}c(t.getTileCredits)&&(e.credits=t.getTileCredits(e.x,e.y,e.level)),a.then(function(l){i(l)}).catch(function(l){o(l)})}r()};di.prototype._createTextureWebGL=function(e,t){let n=new Jt({minificationFilter:this.minificationFilter,magnificationFilter:this.magnificationFilter}),i=t.image;return c(i.internalFormat)?new Ot({context:e,pixelFormat:i.internalFormat,width:i.width,height:i.height,source:{arrayBufferView:i.bufferView},sampler:n}):new Ot({context:e,source:i,pixelFormat:this._imageryProvider.hasAlphaChannel?Re.RGBA:Re.RGB,sampler:n})};di.prototype._createTexture=function(e,t){let n=this._imageryProvider,i=t.image;if(c(n.tileDiscardPolicy)){let r=n.tileDiscardPolicy;if(c(r)){if(!r.isReady()){t.state=ni.RECEIVED;return}if(r.shouldDiscardImage(i)){t.state=ni.INVALID;return}}}if(this.minificationFilter!==Wt.NEAREST&&this.minificationFilter!==Wt.LINEAR)throw new w("ImageryLayer minification filter must be NEAREST or LINEAR");let o=this._createTextureWebGL(e,t);n.tilingScheme.projection instanceof Si?t.textureWebMercator=o:t.texture=o,t.image=void 0,t.state=ni.TEXTURE_LOADED};function ipe(e,t,n){return`${e}:${t}:${n}`}di.prototype._finalizeReprojectTexture=function(e,t){let n=this.minificationFilter,i=this.magnificationFilter;if(n===Wt.LINEAR&&i===si.LINEAR&&!Re.isCompressedFormat(t.pixelFormat)&&O.isPowerOfTwo(t.width)&&O.isPowerOfTwo(t.height)){n=Wt.LINEAR_MIPMAP_LINEAR;let r=ht.maximumTextureFilterAnisotropy,s=Math.min(r,g(this._maximumAnisotropy,r)),a=ipe(n,i,s),l=e.cache.imageryLayerMipmapSamplers;c(l)||(l={},e.cache.imageryLayerMipmapSamplers=l);let u=l[a];c(u)||(u=l[a]=new Jt({wrapS:pn.CLAMP_TO_EDGE,wrapT:pn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i,maximumAnisotropy:s})),t.generateMipmap(zf.NICEST),t.sampler=u}else{let r=ipe(n,i,0),s=e.cache.imageryLayerNonMipmapSamplers;c(s)||(s={},e.cache.imageryLayerNonMipmapSamplers=s);let a=s[r];c(a)||(a=s[r]=new Jt({wrapS:pn.CLAMP_TO_EDGE,wrapT:pn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i})),t.sampler=a}};di.prototype._reprojectTexture=function(e,t,n){let i=t.textureWebMercator||t.texture,o=t.rectangle,r=e.context;if(n=g(n,!0),n&&!(this._imageryProvider.tilingScheme.projection instanceof Ei)&&o.width/i.width>1e-5){let s=this;t.addReference();let a=new Vc({persists:!0,owner:this,preExecute:function(l){got(l,r,i,t.rectangle)},postExecute:function(l){t.texture=l,s._finalizeReprojectTexture(r,l),t.state=ni.READY,t.releaseReference()},canceled:function(){t.state=ni.TEXTURE_LOADED,t.releaseReference()}});this._reprojectComputeCommands.push(a)}else n&&(t.texture=i),this._finalizeReprojectTexture(r,i),t.state=ni.READY};di.prototype.queueReprojectionCommands=function(e){let t=this._reprojectComputeCommands,n=t.length;for(let i=0;i<n;++i)e.commandList.push(t[i]);t.length=0};di.prototype.cancelReprojections=function(){this._reprojectComputeCommands.forEach(function(e){c(e.canceled)&&e.canceled()}),this._reprojectComputeCommands.length=0};di.prototype.getImageryFromCache=function(e,t,n,i){let o=spe(e,t,n),r=this._imageryCache[o];return c(r)||(r=new GD(this,e,t,n,i),this._imageryCache[o]=r),r.addReference(),r};di.prototype.removeImageryFromCache=function(e){let t=spe(e.x,e.y,e.level);delete this._imageryCache[t]};function spe(e,t,n){return JSON.stringify([e,t,n])}var BU={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new k,texture:void 0},_ot=sn.supportsTypedArrays()?new Float32Array(2*64):void 0;function got(e,t,n,i){let o=t.cache.imageryLayer_reproject;if(!c(o)){o=t.cache.imageryLayer_reproject={vertexArray:void 0,shaderProgram:void 0,sampler:void 0,destroy:function(){c(this.framebuffer)&&this.framebuffer.destroy(),c(this.vertexArray)&&this.vertexArray.destroy(),c(this.shaderProgram)&&this.shaderProgram.destroy()}};let x=new Float32Array(2*64*2),T=0;for(let D=0;D<64;++D){let R=D/63;x[T++]=0,x[T++]=R,x[T++]=1,x[T++]=R}let E={position:0,webMercatorT:1},S=Jr.getRegularGridIndices(2,64),A=yt.createIndexBuffer({context:t,typedArray:S,usage:Pe.STATIC_DRAW,indexDatatype:Oe.UNSIGNED_SHORT});o.vertexArray=new Zn({context:t,attributes:[{index:E.position,vertexBuffer:yt.createVertexBuffer({context:t,typedArray:x,usage:Pe.STATIC_DRAW}),componentsPerAttribute:2},{index:E.webMercatorT,vertexBuffer:yt.createVertexBuffer({context:t,sizeInBytes:64*2*4,usage:Pe.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:A});let v=new Be({sources:[FU]});o.shaderProgram=en.fromCache({context:t,vertexShaderSource:v,fragmentShaderSource:NU,attributeLocations:E}),o.sampler=new Jt({wrapS:pn.CLAMP_TO_EDGE,wrapT:pn.CLAMP_TO_EDGE,minificationFilter:Wt.LINEAR,magnificationFilter:si.LINEAR})}n.sampler=o.sampler;let r=n.width,s=n.height;BU.textureDimensions.x=r,BU.textureDimensions.y=s,BU.texture=n;let a=Math.sin(i.south),l=.5*Math.log((1+a)/(1-a));a=Math.sin(i.north);let f=1/(.5*Math.log((1+a)/(1-a))-l),h=new Ot({context:t,width:r,height:s,pixelFormat:n.pixelFormat,pixelDatatype:n.pixelDatatype,preMultiplyAlpha:n.preMultiplyAlpha});O.isPowerOfTwo(r)&&O.isPowerOfTwo(s)&&h.generateMipmap(zf.NICEST);let m=i.south,p=i.north,_=_ot,b=0;for(let x=0;x<64;++x){let T=x/63,E=O.lerp(m,p,T);a=Math.sin(E);let A=(.5*Math.log((1+a)/(1-a))-l)*f;_[b++]=A,_[b++]=A}o.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(_),e.shaderProgram=o.shaderProgram,e.outputTexture=h,e.uniformMap=BU,e.vertexArray=o.vertexArray}function yot(e,t,n){let i=e._imageryProvider,o=i.tilingScheme,r=o.ellipsoid,s=e._imageryProvider.tilingScheme.projection instanceof Ei?1:Math.cos(n),a=o.rectangle,u=r.maximumRadius*a.width*s/(i.tileWidth*o.getNumberOfXTilesAtLevel(0))/t,f=Math.log(u)/Math.log(2);return Math.round(f)|0}function bot(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}async function xot(e,t){let n;try{if(n=await Promise.resolve(t),e.isDestroyed())return;e._imageryProvider=n,e._readyEvent.raiseEvent(n)}catch(i){bot(e._errorEvent,i)}}var lu=di;var Tot={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7},_n=Tot;var ape={NONE:0,CULLED:1,RENDERED:2,REFINED:3,RENDERED_AND_KICKED:6,REFINED_AND_KICKED:7,CULLED_BUT_NEEDED:9,wasKicked:function(e){return e>=ape.RENDERED_AND_KICKED},originalResult:function(e){return e&3},kick:function(e){return e|4}},Hn=ape;function nw(e){this.tile=e,this.frameLastUpdated=void 0,this.westMeshes=[],this.westTiles=[],this.southMeshes=[],this.southTiles=[],this.eastMeshes=[],this.eastTiles=[],this.northMeshes=[],this.northTiles=[],this.southwestMesh=void 0,this.southwestTile=void 0,this.southeastMesh=void 0,this.southeastTile=void 0,this.northwestMesh=void 0,this.northwestTile=void 0,this.northeastMesh=void 0,this.northeastTile=void 0,this.changedThisFrame=!0,this.visitedFrame=void 0,this.enqueuedFrame=void 0,this.mesh=void 0,this.vertexArray=void 0,this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new ee}nw.prototype.update=function(e,t,n){this.changedThisFrame&&(mpe(e,t,this.tile,n),this.changedThisFrame=!1)};nw.prototype.destroy=function(e){this._destroyVertexArray(e),c(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};nw.prototype._destroyVertexArray=function(e){c(this.vertexArray)&&(c(e)?e.push(this.vertexArray):Pd._freeVertexArray(this.vertexArray),this.vertexArray=void 0)};var Cot=new Pb;nw.updateFillTiles=function(e,t,n,i){let o=e._quadtree,r=o._levelZeroTiles,s=o._lastSelectionFrameNumber,a=Cot;a.clear();for(let u=0;u<t.length;++u){let f=t[u];c(f.data.vertexArray)&&a.enqueue(t[u])}let l=a.dequeue();for(;l!==void 0;){let u=l.findTileToWest(r),f=l.findTileToSouth(r),h=l.findTileToEast(r),m=l.findTileToNorth(r);hs(e,n,l,u,s,_n.EAST,!1,a,i),hs(e,n,l,f,s,_n.NORTH,!1,a,i),hs(e,n,l,h,s,_n.WEST,!1,a,i),hs(e,n,l,m,s,_n.SOUTH,!1,a,i);let p=u.findTileToNorth(r),_=u.findTileToSouth(r),b=h.findTileToNorth(r),x=h.findTileToSouth(r);hs(e,n,l,p,s,_n.SOUTHEAST,!1,a,i),hs(e,n,l,b,s,_n.SOUTHWEST,!1,a,i),hs(e,n,l,_,s,_n.NORTHEAST,!1,a,i),hs(e,n,l,x,s,_n.NORTHWEST,!1,a,i),l=a.dequeue()}};function hs(e,t,n,i,o,r,s,a,l){if(i===void 0)return;let u=i;for(;u&&(u._lastSelectionResultFrame!==o||Hn.wasKicked(u._lastSelectionResult)||Hn.originalResult(u._lastSelectionResult)===Hn.CULLED);){if(s)return;let f=u.parent;if(r>=_n.NORTHWEST&&f!==void 0)switch(r){case _n.NORTHWEST:u=u===f.northwestChild?f:void 0;break;case _n.NORTHEAST:u=u===f.northeastChild?f:void 0;break;case _n.SOUTHWEST:u=u===f.southwestChild?f:void 0;break;case _n.SOUTHEAST:u=u===f.southeastChild?f:void 0;break}else u=f}if(u!==void 0){if(u._lastSelectionResult===Hn.RENDERED){if(c(u.data.vertexArray))return;Eot(e,t,n,u,r,o,a,l);return}if(Hn.originalResult(i._lastSelectionResult)!==Hn.CULLED)switch(r){case _n.WEST:hs(e,t,n,i.northwestChild,o,r,!0,a,l),hs(e,t,n,i.southwestChild,o,r,!0,a,l);break;case _n.EAST:hs(e,t,n,i.southeastChild,o,r,!0,a,l),hs(e,t,n,i.northeastChild,o,r,!0,a,l);break;case _n.SOUTH:hs(e,t,n,i.southwestChild,o,r,!0,a,l),hs(e,t,n,i.southeastChild,o,r,!0,a,l);break;case _n.NORTH:hs(e,t,n,i.northeastChild,o,r,!0,a,l),hs(e,t,n,i.northwestChild,o,r,!0,a,l);break;case _n.NORTHWEST:hs(e,t,n,i.northwestChild,o,r,!0,a,l);break;case _n.NORTHEAST:hs(e,t,n,i.northeastChild,o,r,!0,a,l);break;case _n.SOUTHWEST:hs(e,t,n,i.southwestChild,o,r,!0,a,l);break;case _n.SOUTHEAST:hs(e,t,n,i.southeastChild,o,r,!0,a,l);break;default:throw new w("Invalid edge")}}}function Eot(e,t,n,i,o,r,s,a){let l=i.data;if(l.fill===void 0)l.fill=new nw(i);else if(l.fill.visitedFrame===r)return;l.fill.enqueuedFrame!==r&&(l.fill.enqueuedFrame=r,l.fill.changedThisFrame=!1,s.enqueue(i)),wot(e,t,n,i,o,a)}function wot(e,t,n,i,o,r){let s=i.data.fill,a,l=n.data.fill;c(l)?(l.visitedFrame=t.frameNumber,l.changedThisFrame&&(mpe(e,t,n,r),l.changedThisFrame=!1),a=n.data.fill.mesh):a=n.data.mesh;let u,f;switch(o){case _n.WEST:u=s.westMeshes,f=s.westTiles;break;case _n.SOUTH:u=s.southMeshes,f=s.southTiles;break;case _n.EAST:u=s.eastMeshes,f=s.eastTiles;break;case _n.NORTH:u=s.northMeshes,f=s.northTiles;break;case _n.NORTHWEST:s.changedThisFrame=s.changedThisFrame||s.northwestMesh!==a,s.northwestMesh=a,s.northwestTile=n;return;case _n.NORTHEAST:s.changedThisFrame=s.changedThisFrame||s.northeastMesh!==a,s.northeastMesh=a,s.northeastTile=n;return;case _n.SOUTHWEST:s.changedThisFrame=s.changedThisFrame||s.southwestMesh!==a,s.southwestMesh=a,s.southwestTile=n;return;case _n.SOUTHEAST:s.changedThisFrame=s.changedThisFrame||s.southeastMesh!==a,s.southeastMesh=a,s.southeastTile=n;return}if(n.level<=i.level){s.changedThisFrame=s.changedThisFrame||u[0]!==a||u.length!==1,u[0]=a,f[0]=n,u.length=1,f.length=1;return}let h,m,p,_,b=n.rectangle,x,T=i.rectangle;switch(o){case _n.WEST:for(x=(T.north-T.south)*O.EPSILON5,h=0;h<f.length&&(p=f[h],_=p.rectangle,!O.greaterThan(b.north,_.south,x));++h);for(m=h;m<f.length&&(p=f[m],_=p.rectangle,!O.greaterThanOrEquals(b.south,_.north,x));++m);break;case _n.SOUTH:for(x=(T.east-T.west)*O.EPSILON5,h=0;h<f.length&&(p=f[h],_=p.rectangle,!O.lessThan(b.west,_.east,x));++h);for(m=h;m<f.length&&(p=f[m],_=p.rectangle,!O.lessThanOrEquals(b.east,_.west,x));++m);break;case _n.EAST:for(x=(T.north-T.south)*O.EPSILON5,h=0;h<f.length&&(p=f[h],_=p.rectangle,!O.lessThan(b.south,_.north,x));++h);for(m=h;m<f.length&&(p=f[m],_=p.rectangle,!O.lessThanOrEquals(b.north,_.south,x));++m);break;case _n.NORTH:for(x=(T.east-T.west)*O.EPSILON5,h=0;h<f.length&&(p=f[h],_=p.rectangle,!O.greaterThan(b.east,_.west,x));++h);for(m=h;m<f.length&&(p=f[m],_=p.rectangle,!O.greaterThanOrEquals(b.west,_.east,x));++m);break}m-h===1?(s.changedThisFrame=s.changedThisFrame||u[h]!==a,u[h]=a,f[h]=n):(s.changedThisFrame=!0,u.splice(h,m-h,a),f.splice(h,m-h,n))}var R0=new re,Sot=new re,tw=new d,nY=new d,Qq=new k,eY=new k,uu=new k;function jU(){this.height=0,this.encodedNormal=new k}function kU(e,t,n,i,o,r,s,a,l){if(c(o))return o;let u;if(c(r)&&c(s))u=(r.height+s.height)*.5;else if(c(r))u=r.height;else if(c(s))u=s.height;else if(c(a))u=a.height;else{let h=e.tile.data.tileBoundingRegion,m=0,p=0;c(h)&&(m=h.minimumHeight,p=h.maximumHeight),u=(m+p)*.5}return ppe(e,t,n,i,u,l),l}var Aot={minimumHeight:0,maximumHeight:0},vot=new d,cpe=new jU,lpe=new jU,upe=new jU,fpe=new jU,Dot=typeof Uint8Array!="undefined"?new Uint8Array(9*9):void 0,Iot={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0};function mpe(e,t,n,i){Pd.initialize(n,e.terrainProvider,e._imageryLayers);let o=n.data,r=o.fill,s=n.rectangle,a=t.verticalExaggeration,l=t.verticalExaggerationRelativeHeight,u=a!==1,f=n.tilingScheme.ellipsoid,h=zU(r,f,0,1,r.northwestTile,r.northwestMesh,r.northTiles,r.northMeshes,r.westTiles,r.westMeshes,upe),m=zU(r,f,0,0,r.southwestTile,r.southwestMesh,r.westTiles,r.westMeshes,r.southTiles,r.southMeshes,cpe),p=zU(r,f,1,0,r.southeastTile,r.southeastMesh,r.southTiles,r.southMeshes,r.eastTiles,r.eastMeshes,lpe),_=zU(r,f,1,1,r.northeastTile,r.northeastMesh,r.eastTiles,r.eastMeshes,r.northTiles,r.northMeshes,fpe);h=kU(r,f,0,1,h,m,_,p,upe),m=kU(r,f,0,0,m,h,p,_,cpe),p=kU(r,f,1,1,p,m,_,h,lpe),_=kU(r,f,1,1,_,p,h,m,fpe);let b=m.height,x=p.height,T=h.height,E=_.height,S=Math.min(b,x,T,E),A=Math.max(b,x,T,E),v=(S+A)*.5,D,R,P=e.getLevelMaximumGeometricError(n.level),L=f.maximumRadius-P,F=Math.acos(L/f.maximumRadius)*4;if(F*=1.5,s.width>F&&A-S<=P){let M=new Wa({width:9,height:9,buffer:Dot,structure:{heightOffset:A}}),B=Iot;B.tilingScheme=n.tilingScheme,B.x=n.x,B.y=n.y,B.level=n.level,B.exaggeration=a,B.exaggerationRelativeHeight=l,r.mesh=M._createMeshSync(B)}else{let M=u,B=te.center(s,Sot);B.height=v;let U=f.cartographicToCartesian(B,vot),V=new Ic(U,void 0,void 0,void 0,void 0,!0,!0,M,a,l),W=5,H;for(H=r.westMeshes,D=0,R=H.length;D<R;++D)W+=H[D].eastIndicesNorthToSouth.length;for(H=r.southMeshes,D=0,R=H.length;D<R;++D)W+=H[D].northIndicesWestToEast.length;for(H=r.eastMeshes,D=0,R=H.length;D<R;++D)W+=H[D].westIndicesSouthToNorth.length;for(H=r.northMeshes,D=0,R=H.length;D<R;++D)W+=H[D].southIndicesEastToWest.length;let X=Aot;X.minimumHeight=S,X.maximumHeight=A;let $=V.stride,ae=new Float32Array(W*$),se=0,he=se;se=UU(f,s,V,ae,se,0,1,h.height,h.encodedNormal,1,X),se=HU(r,f,V,ae,se,r.westTiles,r.westMeshes,_n.EAST,X);let ge=se;se=UU(f,s,V,ae,se,0,0,m.height,m.encodedNormal,0,X),se=HU(r,f,V,ae,se,r.southTiles,r.southMeshes,_n.NORTH,X);let le=se;se=UU(f,s,V,ae,se,1,0,p.height,p.encodedNormal,0,X),se=HU(r,f,V,ae,se,r.eastTiles,r.eastMeshes,_n.WEST,X);let me=se;se=UU(f,s,V,ae,se,1,1,_.height,_.encodedNormal,1,X),se=HU(r,f,V,ae,se,r.northTiles,r.northMeshes,_n.SOUTH,X),S=X.minimumHeight,A=X.maximumHeight;let Me=wn.fromRectangle(s,S,A,n.tilingScheme.ellipsoid),Ge=Si.geodeticLatitudeToMercatorAngle(s.south),De=1/(Si.geodeticLatitudeToMercatorAngle(s.north)-Ge),ke=(Si.geodeticLatitudeToMercatorAngle(B.latitude)-Ge)*De,He=f.geodeticSurfaceNormalCartographic(R0,nY),ft=On.octEncode(He,Qq),Ie=se;V.encode(ae,se*$,Me.center,k.fromElements(.5,.5,uu),v,ft,ke,He),++se;let Kt=se,Pt=Kt<256?1:2,dt=(Kt-1)*3,rn=dt*Pt,Vt=(ae.length-Kt*$)*Float32Array.BYTES_PER_ELEMENT,Ae;if(Vt>=rn){let _e=Kt*$*Float32Array.BYTES_PER_ELEMENT;Ae=Kt<256?new Uint8Array(ae.buffer,_e,dt):new Uint16Array(ae.buffer,_e,dt)}else Ae=Kt<256?new Uint8Array(dt):new Uint16Array(dt);ae=new Float32Array(ae.buffer,0,Kt*$);let Qe=0;for(D=0;D<Kt-2;++D)Ae[Qe++]=Ie,Ae[Qe++]=D,Ae[Qe++]=D+1;Ae[Qe++]=Ie,Ae[Qe++]=D,Ae[Qe++]=0;let et=[];for(D=ge;D>=he;--D)et.push(D);let at=[];for(D=le;D>=ge;--D)at.push(D);let $t=[];for(D=me;D>=le;--D)$t.push(D);let pe=[];for(pe.push(0),D=Ie-1;D>=me;--D)pe.push(D);r.mesh=new Od(V.center,ae,Ae,dt,Kt,S,A,ne.fromOrientedBoundingBox(Me),Fot(e,Me.center,s,S,A),V.stride,Me,V,et,at,$t,pe)}let y=t.context;r._destroyVertexArray(i),r.vertexArray=Pd._createVertexArrayForMesh(y,r.mesh),o.processImagery(n,e.terrainProvider,t,!0);let I=r.waterMaskTexture;if(r.waterMaskTexture=void 0,e.terrainProvider.hasWaterMask){let M=o._findAncestorTileWithTerrainData(n);c(M)&&c(M.data.waterMaskTexture)&&(r.waterMaskTexture=M.data.waterMaskTexture,++r.waterMaskTexture.referenceCount,o._computeWaterMaskTranslationAndScale(n,M,r.waterMaskTranslationAndScale))}c(I)&&(--I.referenceCount,I.referenceCount===0&&I.destroy())}function UU(e,t,n,i,o,r,s,a,l,u,f){let h=R0;h.longitude=O.lerp(t.west,t.east,r),h.latitude=O.lerp(t.south,t.north,s),h.height=a;let m=e.cartographicToCartesian(h,tw),p;n.hasGeodeticSurfaceNormals&&(p=e.geodeticSurfaceNormal(m,nY));let _=eY;return _.x=r,_.y=s,n.encode(i,o*n.stride,m,_,a,l,u,p),f.minimumHeight=Math.min(f.minimumHeight,a),f.maximumHeight=Math.max(f.maximumHeight,a),o+1}var GU=new te;function WD(e,t,n,i){let o=e.rectangle,r=t.rectangle;t.x===0&&n.x===1&&e.x===e.tilingScheme.getNumberOfXTilesAtLevel(e.level)-1?(o=te.clone(e.rectangle,GU),o.west-=O.TWO_PI,o.east-=O.TWO_PI):e.x===0&&n.x===0&&t.x===t.tilingScheme.getNumberOfXTilesAtLevel(t.level)-1&&(o=te.clone(e.rectangle,GU),o.west+=O.TWO_PI,o.east+=O.TWO_PI);let s=o.east-o.west,a=(r.west-o.west)/s,l=(r.east-o.west)/s,u=o.north-o.south,f=(r.south-o.south)/u,h=(r.north-o.south)/u,m=(n.x-a)/(l-a),p=(n.y-f)/(h-f);return Math.abs(m)<Math.EPSILON5?m=0:Math.abs(m-1)<Math.EPSILON5&&(m=1),Math.abs(p)<Math.EPSILON5?p=0:Math.abs(p-1)<Math.EPSILON5&&(p=1),i.x=m,i.y=p,i}var Oot=new k;function tY(e,t,n,i,o){let r=e.encoding,s=e.vertices;if(o.height=r.decodeHeight(s,t),r.hasVertexNormals)r.getOctEncodedNormal(s,t,o.encodedNormal);else{let a=o.encodedNormal;a.x=0,a.y=0}}var Pot=new k,Rot=new d;function Mot(e,t,n,i,o,r,s,a,l,u){let f=i.encoding,h=i.vertices,m=WD(t,n,f.decodeTextureCoordinates(h,o,uu),uu),p=WD(t,n,f.decodeTextureCoordinates(h,r,eY),eY),_;l?_=(s-m.x)/(p.x-m.x):_=(a-m.y)/(p.y-m.y);let b=f.decodeHeight(h,o),x=f.decodeHeight(h,r),T=n.rectangle;R0.longitude=O.lerp(T.west,T.east,s),R0.latitude=O.lerp(T.south,T.north,a),u.height=R0.height=O.lerp(b,x,_);let E;if(f.hasVertexNormals){let S=f.getOctEncodedNormal(h,o,Oot),A=f.getOctEncodedNormal(h,r,Pot),v=On.octDecode(S.x,S.y,tw),D=On.octDecode(A.x,A.y,Rot);E=d.lerp(v,D,_,tw),d.normalize(E,E),On.octEncode(E,u.encodedNormal)}else E=e.geodeticSurfaceNormalCartographic(R0,tw),On.octEncode(E,u.encodedNormal)}function ppe(e,t,n,i,o,r){r.height=o;let s=t.geodeticSurfaceNormalCartographic(R0,tw);On.octEncode(s,r.encodedNormal)}function zU(e,t,n,i,o,r,s,a,l,u,f){if(hpe(e,t,a,s,!1,n,i,f)||hpe(e,t,u,l,!0,n,i,f))return f;let m;if(iY(o,r))return n===0?i===0?m=r.eastIndicesNorthToSouth[0]:m=r.southIndicesEastToWest[0]:i===0?m=r.northIndicesWestToEast[0]:m=r.westIndicesSouthToNorth[0],tY(r,m,n,i,f),f;let p;if(n===0?i===0?p=VU(e.westMeshes,e.westTiles,_n.EAST,e.southMeshes,e.southTiles,_n.NORTH,n,i):p=VU(e.northMeshes,e.northTiles,_n.SOUTH,e.westMeshes,e.westTiles,_n.EAST,n,i):i===0?p=VU(e.southMeshes,e.southTiles,_n.NORTH,e.eastMeshes,e.eastTiles,_n.WEST,n,i):p=VU(e.eastMeshes,e.eastTiles,_n.WEST,e.northMeshes,e.northTiles,_n.SOUTH,n,i),c(p))return ppe(e,t,n,i,p,f),f}function VU(e,t,n,i,o,r,s,a){let l=dpe(e,t,!1,n,s,a),u=dpe(i,o,!0,r,s,a);return c(l)&&c(u)?(l+u)*.5:c(l)?l:u}function HU(e,t,n,i,o,r,s,a,l){for(let u=0;u<r.length;++u)o=Lot(e,t,n,i,o,r[u],s[u],a,l);return o}function Lot(e,t,n,i,o,r,s,a,l){let u=r.rectangle;a===_n.EAST&&e.tile.x===0?(u=te.clone(r.rectangle,GU),u.west-=O.TWO_PI,u.east-=O.TWO_PI):a===_n.WEST&&r.x===0&&(u=te.clone(r.rectangle,GU),u.west+=O.TWO_PI,u.east+=O.TWO_PI);let f=e.tile.rectangle,h,m;o>0&&(n.decodeTextureCoordinates(i,o-1,uu),h=uu.x,m=uu.y);let p,_;switch(a){case _n.WEST:p=s.westIndicesSouthToNorth,_=!1;break;case _n.NORTH:p=s.northIndicesWestToEast,_=!0;break;case _n.EAST:p=s.eastIndicesNorthToSouth,_=!1;break;case _n.SOUTH:p=s.southIndicesEastToWest,_=!0;break}let b=r,x=e.tile,T=s.encoding,E=s.vertices,S=n.stride,A,v;T.hasWebMercatorT&&(A=Si.geodeticLatitudeToMercatorAngle(f.south),v=1/(Si.geodeticLatitudeToMercatorAngle(f.north)-A));for(let D=0;D<p.length;++D){let R=p[D],P=T.decodeTextureCoordinates(E,R,uu);WD(b,x,P,P);let L=P.x,F=P.y,y=_?L:F;if(y<0||y>1||Math.abs(L-h)<O.EPSILON5&&Math.abs(F-m)<O.EPSILON5)continue;let I=Math.abs(L)<O.EPSILON5||Math.abs(L-1)<O.EPSILON5,M=Math.abs(F)<O.EPSILON5||Math.abs(F-1)<O.EPSILON5;if(I&&M)continue;let B=T.decodePosition(E,R,tw),U=T.decodeHeight(E,R),V;T.hasVertexNormals?V=T.getOctEncodedNormal(E,R,Qq):(V=Qq,V.x=0,V.y=0);let W=F;if(T.hasWebMercatorT){let X=O.lerp(f.south,f.north,F);W=(Si.geodeticLatitudeToMercatorAngle(X)-A)*v}let H;n.hasGeodeticSurfaceNormals&&(H=t.geodeticSurfaceNormal(B,nY)),n.encode(i,o*S,B,P,U,V,W,H),l.minimumHeight=Math.min(l.minimumHeight,U),l.maximumHeight=Math.max(l.maximumHeight,U),++o}return o}function dpe(e,t,n,i,o,r){let s,a,l;n?(s=0,a=e.length,l=1):(s=e.length-1,a=-1,l=-1);for(let u=s;u!==a;u+=l){let f=e[u],h=t[u];if(!iY(h,f))continue;let m;switch(i){case _n.WEST:m=f.westIndicesSouthToNorth;break;case _n.SOUTH:m=f.southIndicesEastToWest;break;case _n.EAST:m=f.eastIndicesNorthToSouth;break;case _n.NORTH:m=f.northIndicesWestToEast;break}let p=m[n?0:m.length-1];if(c(p))return f.encoding.decodeHeight(f.vertices,p)}}function iY(e,t){return c(t)&&(!c(e.data.fill)||!e.data.fill.changedThisFrame)}function hpe(e,t,n,i,o,r,s,a){let l,u,f,h,m,p=i[o?0:n.length-1],_=n[o?0:n.length-1];if(iY(p,_)&&(r===0?s===0?(l=o?_.northIndicesWestToEast:_.eastIndicesNorthToSouth,u=o,f=o):(l=o?_.eastIndicesNorthToSouth:_.southIndicesEastToWest,u=!o,f=!1):s===0?(l=o?_.westIndicesSouthToNorth:_.northIndicesWestToEast,u=!o,f=!0):(l=o?_.southIndicesEastToWest:_.westIndicesSouthToNorth,u=o,f=!o),l.length>0)){h=o?0:l.length-1,m=l[h],_.encoding.decodeTextureCoordinates(_.vertices,m,uu);let b=WD(p,e.tile,uu,uu);if(b.x===r&&b.y===s)return tY(_,m,r,s,a),!0;if(h=Xo(l,u?r:s,function(x,T){_.encoding.decodeTextureCoordinates(_.vertices,x,uu);let E=WD(p,e.tile,uu,uu);return f?u?E.x-r:E.y-s:u?r-E.x:s-E.y}),h<0){if(h=~h,h>0&&h<l.length)return Mot(t,p,e.tile,_,l[h-1],l[h],r,s,u,a),!0}else return tY(_,l[h],r,s,a),!0}return!1}var Not=[new d,new d,new d,new d];function Fot(e,t,n,i,o,r){let s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,l=Not;return d.fromRadians(n.west,n.south,o,a,l[0]),d.fromRadians(n.east,n.south,o,a,l[1]),d.fromRadians(n.west,n.north,o,a,l[2]),d.fromRadians(n.east,n.north,o,a,l[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,l,i,r)}var qD=nw;function jo(e){if(!c(e))throw new w("options is required.");if(c(e.terrainProvider))if(c(e.imageryLayers)){if(!c(e.surfaceShaderSet))throw new w("options.surfaceShaderSet is required.")}else throw new w("options.imageryLayers is required.");else throw new w("options.terrainProvider is required.");this.lightingFadeOutDistance=65e5,this.lightingFadeInDistance=9e6,this.hasWaterMask=!1,this.showWaterEffect=!1,this.oceanNormalMap=void 0,this.zoomedOutOceanSpecularIntensity=.5,this.enableLighting=!1,this.dynamicAtmosphereLighting=!1,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!1,this.shadows=yn.RECEIVE_ONLY,this.vertexShadowDarkness=.3,this.fillHighlightColor=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this.undergroundColor=void 0,this.undergroundColorAlphaByDistance=void 0,this.lambertDiffuseMultiplier=0,this.materialUniformMap=void 0,this._materialUniformMap=void 0,this._quadtree=void 0,this._terrainProvider=e.terrainProvider,this._imageryLayers=e.imageryLayers,this._surfaceShaderSet=e.surfaceShaderSet,this._renderState=void 0,this._blendRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._errorEvent=new fe,this._removeLayerAddedListener=this._imageryLayers.layerAdded.addEventListener(jo.prototype._onLayerAdded,this),this._removeLayerRemovedListener=this._imageryLayers.layerRemoved.addEventListener(jo.prototype._onLayerRemoved,this),this._removeLayerMovedListener=this._imageryLayers.layerMoved.addEventListener(jo.prototype._onLayerMoved,this),this._removeLayerShownListener=this._imageryLayers.layerShownOrHidden.addEventListener(jo.prototype._onLayerShownOrHidden,this),this._imageryLayersUpdatedEvent=new fe,this._layerOrderChanged=!1,this._tilesToRenderByTextureCount=[],this._drawCommands=[],this._uniformMaps=[],this._usedDrawCommands=0,this._vertexArraysToDestroy=[],this._debug={wireframe:!1,boundingSphereTile:void 0},this._baseColor=void 0,this._firstPassInitialColor=void 0,this.baseColor=new z(0,0,.5,1),this._clippingPlanes=void 0,this._clippingPolygons=void 0,this.cartographicLimitRectangle=te.clone(te.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._oldVerticalExaggeration=void 0,this._oldVerticalExaggerationRelativeHeight=void 0}Object.defineProperties(jo.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){if(!c(e))throw new w("value is required.");this._baseColor=e,this._firstPassInitialColor=ee.fromColor(e,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(e){if(!c(e))throw new w("value is required.");this._quadtree=e}},tilingScheme:{get:function(){if(c(this._terrainProvider))return this._terrainProvider.tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},imageryLayersUpdatedEvent:{get:function(){return this._imageryLayersUpdatedEvent}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){this._terrainProvider!==e&&(this._terrainProvider=e,c(this._quadtree)&&this._quadtree.invalidateAllTiles())}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){as.setOwner(e,this,"_clippingPlanes")}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){Ch.setOwner(e,this,"_clippingPolygons")}}});function Bot(e,t){let n=e.loadingImagery;c(n)||(n=e.readyImagery);let i=t.loadingImagery;return c(i)||(i=t.readyImagery),n.imageryLayer._layerIndex-i.imageryLayer._layerIndex}jo.prototype.update=function(e){this._imageryLayers._update()};function kot(e,t){let n=t.creditDisplay,i=e._terrainProvider;c(i)&&c(i.credit)&&n.addCreditToNextFrame(i.credit);let o=e._imageryLayers;for(let r=0,s=o.length;r<s;++r){let a=o.get(r);a.ready&&a.show&&c(a.imageryProvider.credit)&&n.addCreditToNextFrame(a.imageryProvider.credit)}}jo.prototype.initialize=function(e){this._imageryLayers.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile(function(i){i.data.imagery.sort(Bot)})),kot(this,e);let t=this._vertexArraysToDestroy,n=t.length;for(let i=0;i<n;++i)Pd._freeVertexArray(t[i]);t.length=0};jo.prototype.beginUpdate=function(e){let t=this._tilesToRenderByTextureCount;for(let o=0,r=t.length;o<r;++o){let s=t[o];c(s)&&(s.length=0)}let n=this._clippingPlanes;c(n)&&n.enabled&&n.update(e);let i=this._clippingPolygons;c(i)&&i.enabled&&(i.update(e),i.queueCommands(e)),this._usedDrawCommands=0,this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1};jo.prototype.endUpdate=function(e){if(!c(this._renderState)){this._renderState=Fe.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:cc.LESS}}),this._blendRenderState=Fe.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:cc.LESS_OR_EQUAL},blending:cn.ALPHA_BLEND});let s=ze(this._renderState,!0);s.cull.enabled=!1,this._disableCullingRenderState=Fe.fromCache(s),s=ze(this._blendRenderState,!0),s.cull.enabled=!1,this._disableCullingBlendRenderState=Fe.fromCache(s)}this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&qD.updateFillTiles(this,this._quadtree._tilesToRender,e,this._vertexArraysToDestroy);let t=this.quadtree,n=e.verticalExaggeration,i=e.verticalExaggerationRelativeHeight,o=this._oldVerticalExaggeration!==n||this._oldVerticalExaggerationRelativeHeight!==i;this._oldVerticalExaggeration=n,this._oldVerticalExaggerationRelativeHeight=i,o&&t.forEachLoadedTile(function(s){s.data.updateExaggeration(s,e,t)});let r=this._tilesToRenderByTextureCount;for(let s=0,a=r.length;s<a;++s){let l=r[s];if(c(l))for(let u=0,f=l.length;u<f;++u){let h=l[u],m=h.data.tileBoundingRegion;crt(this,h,e),e.minimumTerrainHeight=Math.min(e.minimumTerrainHeight,m.minimumHeight)}}};function xpe(e,t){let n=t.globeTranslucencyState;if(n.translucent){let i=e.renderState.blending.enabled;n.pushDerivedCommands(e,i,t)}else t.commandList.push(e)}jo.prototype.updateForPick=function(e){let t=this._drawCommands;for(let n=0,i=this._usedDrawCommands;n<i;++n)xpe(t[n],e)};jo.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()};jo.prototype.getLevelMaximumGeometricError=function(e){return c(this._terrainProvider)?this._terrainProvider.getLevelMaximumGeometricError(e):0};jo.prototype.loadTile=function(e,t){let n=t.data,i=!0,o;c(n)&&(i=n.boundingVolumeSourceTile!==t||t._lastSelectionResult===Hn.CULLED_BUT_NEEDED,o=n.terrainState),Pd.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,i),n=t.data,i&&o!==t.data.terrainState&&this.computeTileVisibility(t,e,this.quadtree.occluders)!==pr.NONE&&n.boundingVolumeSourceTile===t&&(i=!1,Pd.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,i))};var Uot=new ne,Tpe=new te,zot=new te,Vot=new re;function qU(e,t){if(t.west<t.east)return t;let n=te.clone(t,zot);return te.center(e,Vot).longitude>0?n.east=O.PI:n.west=-O.PI,n}function Cpe(e,t){if(t.cameraUnderground||t.globeTranslucencyState.translucent)return!0;if(e.backFaceCulling)return!1;let n=e._clippingPlanes;if(c(n)&&n.enabled)return!0;let i=e._clippingPolygons;return!!(c(i)&&i.enabled||!te.equals(e.cartographicLimitRectangle,te.MAX_VALUE))}jo.prototype.computeTileVisibility=function(e,t,n){let i=this.computeDistanceToTile(e,t);e._distance=i;let o=Cpe(this,t);if(t.fog.enabled&&!o&&O.fog(i,t.fog.density)>=1)return pr.NONE;let r=e.data,s=r.tileBoundingRegion;if(r.boundingVolumeSourceTile===void 0)return pr.PARTIAL;let a=t.cullingVolume,l=s.boundingVolume;c(l)||(l=s.boundingSphere),r.clippedByBoundaries=!1;let u=qU(e.rectangle,this.cartographicLimitRectangle),f=te.simpleIntersection(u,e.rectangle,Tpe);if(!c(f))return pr.NONE;if(te.equals(f,e.rectangle)||(r.clippedByBoundaries=!0),t.mode!==J.SCENE3D&&(l=Uot,ne.fromRectangleWithHeights2D(e.rectangle,t.mapProjection,s.minimumHeight,s.maximumHeight,l),d.fromElements(l.center.z,l.center.x,l.center.y,l.center),t.mode===J.MORPHING&&c(r.renderedMesh)&&(l=ne.union(s.boundingSphere,l,l))),!c(l))return pr.PARTIAL;let h=this._clippingPlanes;if(c(h)&&h.enabled){let x=h.computeIntersectionWithBoundingVolume(l);if(e.isClipped=x!==Gt.INSIDE,x===Gt.OUTSIDE)return pr.NONE}let m=this._clippingPolygons;if(c(m)&&m.enabled){let x=m.computeIntersectionWithBoundingVolume(s);e.isClipped=x!==Gt.OUTSIDE}let p,_=a.computeVisibility(l);if(_===Gt.OUTSIDE?p=pr.NONE:_===Gt.INTERSECTING?p=pr.PARTIAL:_===Gt.INSIDE&&(p=pr.FULL),p===pr.NONE)return p;let b=t.mode===J.SCENE3D&&t.camera.frustum instanceof an;if(t.mode===J.SCENE3D&&!b&&c(n)&&!o){let x=r.occludeePointInScaledSpace;return!c(x)||n.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(x,s.minimumHeight)?p:pr.NONE}return p};jo.prototype.canRefine=function(e){return c(e.data.terrainData)?!0:this.terrainProvider.getTileDataAvailable(e.x*2,e.y*2,e.level+1)!==void 0};var Hot=[],Got=[];jo.prototype.canRenderWithoutLosingDetail=function(e,t){let n=e.data,i=Hot;i.length=this._imageryLayers.length;let o=!1,r=!1,s;c(n)&&(o=n.terrainState===ro.READY,r=!0,s=n.imagery);let a,l;for(a=0,l=i.length;a<l;++a)i[a]=r;if(c(s))for(a=0,l=s.length;a<l;++a){let h=s[a],m=h.loadingImagery,p=!c(m)||m.state===ni.FAILED||m.state===ni.INVALID,_=(h.loadingImagery||h.readyImagery).imageryLayer._layerIndex;i[_]=p&&i[_]}let u=this.quadtree._lastSelectionFrameNumber,f=Got;for(f.length=0,f.push(e.southwestChild,e.southeastChild,e.northwestChild,e.northeastChild);f.length>0;){let h=f.pop(),m=h._lastSelectionResultFrame===u?h._lastSelectionResult:Hn.NONE;if(m===Hn.RENDERED){let p=h.data;if(!c(p))continue;if(!o&&h.data.terrainState===ro.READY)return!1;let _=h.data.imagery;for(a=0,l=_.length;a<l;++a){let b=_[a],x=b.loadingImagery,T=!c(x)||x.state===ni.FAILED||x.state===ni.INVALID,E=(b.loadingImagery||b.readyImagery).imageryLayer._layerIndex;if(T&&!i[E])return!1}}else m===Hn.REFINED&&f.push(h.southwestChild,h.southeastChild,h.northwestChild,h.northeastChild)}return!0};var jot=new d;jo.prototype.computeTileLoadPriority=function(e,t){let n=e.data;if(n===void 0)return 0;let i=n.tileBoundingRegion.boundingVolume;if(i===void 0)return 0;let o=t.camera.positionWC,r=t.camera.directionWC,s=d.subtract(i.center,o,jot),a=d.magnitude(s);return a<O.EPSILON5?0:(d.divideByScalar(s,a,s),(1-d.dot(s,r))*e._distance)};var _pe=new N,WU=new N,Wot=new ee,qot=new ee,Yot=new ee,Xot=new d,gpe=new d,Kot=new d,$ot=new d;jo.prototype.showTileThisFrame=function(e,t){let n=0,i=e.data.imagery;for(let a=0,l=i.length;a<l;++a){let u=i[a];c(u.readyImagery)&&u.readyImagery.imageryLayer.alpha!==0&&++n}let o=this._tilesToRenderByTextureCount[n];c(o)||(o=[],this._tilesToRenderByTextureCount[n]=o),o.push(e);let r=e.data;c(r.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0;let s=this._debug;++s.tilesRendered,s.texturesRendered+=n};var Zot=[new d,new d,new d,new d];function ype(e,t,n,i,o,r){let s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,l=Zot;return d.fromRadians(n.west,n.south,o,a,l[0]),d.fromRadians(n.east,n.south,o,a,l[1]),d.fromRadians(n.west,n.north,o,a,l[2]),d.fromRadians(n.east,n.north,o,a,l[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,l,i,r)}jo.prototype.computeDistanceToTile=function(e,t){Jot(e,this,t);let n=e.data;if(n.boundingVolumeSourceTile===void 0)return 9999999999;let o=n.tileBoundingRegion,r=o.minimumHeight,s=o.maximumHeight;if(n.boundingVolumeSourceTile!==e){let l=t.camera.positionCartographic.height,u=Math.abs(l-r),f=Math.abs(l-s);u>f?(o.minimumHeight=r,o.maximumHeight=r):(o.minimumHeight=s,o.maximumHeight=s)}let a=o.distanceToCamera(t);return o.minimumHeight=r,o.maximumHeight=s,a};function Jot(e,t,n){let i=e.data;i===void 0&&(i=e.data=new Pd);let o=e.tilingScheme.ellipsoid;i.tileBoundingRegion===void 0&&(i.tileBoundingRegion=new rd({computeBoundingVolumes:!1,rectangle:e.rectangle,ellipsoid:o,minimumHeight:0,maximumHeight:0}));let r=i.tileBoundingRegion,s=r.minimumHeight,a=r.maximumHeight,l=!1,u=e,f=i.mesh,h=i.terrainData;if(f!==void 0&&f.minimumHeight!==void 0&&f.maximumHeight!==void 0)r.minimumHeight=f.minimumHeight,r.maximumHeight=f.maximumHeight,l=!0;else if(h!==void 0&&h._minimumHeight!==void 0&&h._maximumHeight!==void 0)r.minimumHeight=h._minimumHeight,r.maximumHeight=h._maximumHeight;else{r.minimumHeight=Number.NaN,r.maximumHeight=Number.NaN;let m=e.parent;for(;m!==void 0;){let p=m.data;if(p!==void 0){let _=p.mesh,b=p.terrainData;if(_!==void 0&&_.minimumHeight!==void 0&&_.maximumHeight!==void 0){r.minimumHeight=_.minimumHeight,r.maximumHeight=_.maximumHeight;break}else if(b!==void 0&&b._minimumHeight!==void 0&&b._maximumHeight!==void 0){r.minimumHeight=b._minimumHeight,r.maximumHeight=b._maximumHeight;break}}m=m.parent}u=m}if(u!==void 0){let m=n.verticalExaggeration,p=n.verticalExaggerationRelativeHeight;if(m!==1&&(l=!1,r.minimumHeight=Cr.getHeight(r.minimumHeight,m,p),r.maximumHeight=Cr.getHeight(r.maximumHeight,m,p)),l)i.boundingVolumeIsFromMesh||(r._orientedBoundingBox=wn.clone(f.orientedBoundingBox,r._orientedBoundingBox),r._boundingSphere=ne.clone(f.boundingSphere3D,r._boundingSphere),i.occludeePointInScaledSpace=d.clone(f.occludeePointInScaledSpace,i.occludeePointInScaledSpace),c(i.occludeePointInScaledSpace)||(i.occludeePointInScaledSpace=ype(t,r._orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,i.occludeePointInScaledSpace)));else{let b=r._orientedBoundingBox===void 0||r._boundingSphere===void 0;(r.minimumHeight!==s||r.maximumHeight!==a||b)&&(r.computeBoundingVolumes(o),i.occludeePointInScaledSpace=ype(t,r._orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,i.occludeePointInScaledSpace))}i.boundingVolumeSourceTile=u,i.boundingVolumeIsFromMesh=l}else i.boundingVolumeSourceTile=void 0,i.boundingVolumeIsFromMesh=!1}jo.prototype.isDestroyed=function(){return!1};jo.prototype.destroy=function(){return this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._clippingPolygons=this._clippingPolygons&&this._clippingPolygons.destroy(),this._removeLayerAddedListener=this._removeLayerAddedListener&&this._removeLayerAddedListener(),this._removeLayerRemovedListener=this._removeLayerRemovedListener&&this._removeLayerRemovedListener(),this._removeLayerMovedListener=this._removeLayerMovedListener&&this._removeLayerMovedListener(),this._removeLayerShownListener=this._removeLayerShownListener&&this._removeLayerShownListener(),ue(this)};function Qot(e,t,n){return function(i){let o,r,s=-1,a=i.data.imagery,l=a.length,u;for(u=0;u<l;++u)if(o=a[u],r=g(o.readyImagery,o.loadingImagery),r.imageryLayer===t){s=u;break}if(s!==-1){let f=s+e;if(o=a[f],r=c(o)?g(o.readyImagery,o.loadingImagery):void 0,!c(r)||r.imageryLayer!==t)return!t._createTileImagerySkeletons(i,n,f);for(u=s;u<f;++u)a[u].freeResources();a.splice(s,e)}return!0}}jo.prototype._onLayerAdded=function(e,t){if(!this.isDestroyed()&&e.show){let n=this._terrainProvider,i=this,o=this._imageryLayersUpdatedEvent,r=function(){e._imageryCache={},i._quadtree.forEachLoadedTile(function(s){if(c(s._loadedCallbacks[e._layerIndex]))return;let a,l=s.data.imagery,u=l.length,f=-1,h=0;for(a=0;a<u;++a){let p=l[a];if(g(p.readyImagery,p.loadingImagery).imageryLayer===e)f===-1&&(f=a),++h;else if(f!==-1)break}if(f===-1)return;let m=f+h;e._createTileImagerySkeletons(s,n,m)&&(s._loadedCallbacks[e._layerIndex]=Qot(h,e,n),s.state=Qs.LOADING)})};if(e.ready){let s=e.imageryProvider;s._reload=r}this._quadtree.forEachLoadedTile(function(s){e._createTileImagerySkeletons(s,n)&&(s.state=Qs.LOADING,s.level!==0&&(s._lastSelectionResultFrame!==i.quadtree._lastSelectionFrameNumber||s._lastSelectionResult!==Hn.RENDERED)&&(s.renderable=!1))}),this._layerOrderChanged=!0,o.raiseEvent()}};jo.prototype._onLayerRemoved=function(e,t){this._quadtree.forEachLoadedTile(function(n){let i=n.data.imagery,o=-1,r=0;for(let s=0,a=i.length;s<a;++s){let l=i[s],u=l.loadingImagery;if(c(u)||(u=l.readyImagery),u.imageryLayer===e)o===-1&&(o=s),l.freeResources(),++r;else if(o!==-1)break}o!==-1&&i.splice(o,r)}),c(e.imageryProvider)&&(e.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()};jo.prototype._onLayerMoved=function(e,t,n){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()};jo.prototype._onLayerShownOrHidden=function(e,t,n){n?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)};var ert=new N,trt=new N;function bpe(e,t){let n={u_initialColor:function(){return this.properties.initialColor},u_fillHighlightColor:function(){return this.properties.fillHighlightColor},u_zoomedOutOceanSpecularIntensity:function(){return this.properties.zoomedOutOceanSpecularIntensity},u_oceanNormalMap:function(){return this.properties.oceanNormalMap},u_atmosphereLightIntensity:function(){return this.properties.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return this.properties.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return this.properties.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return this.properties.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return this.properties.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return this.properties.atmosphereMieAnisotropy},u_lightingFadeDistance:function(){return this.properties.lightingFadeDistance},u_nightFadeDistance:function(){return this.properties.nightFadeDistance},u_center3D:function(){return this.properties.center3D},u_verticalExaggerationAndRelativeHeight:function(){return this.properties.verticalExaggerationAndRelativeHeight},u_tileRectangle:function(){return this.properties.tileRectangle},u_modifiedModelView:function(){let i=e.context.uniformState.view,o=N.multiplyByPoint(i,this.properties.rtc,gpe);return N.setTranslation(i,o,_pe),_pe},u_modifiedModelViewProjection:function(){let i=e.context.uniformState.view,o=e.context.uniformState.projection,r=N.multiplyByPoint(i,this.properties.rtc,gpe);return N.setTranslation(i,r,WU),N.multiply(o,WU,WU),WU},u_dayTextures:function(){return this.properties.dayTextures},u_dayTextureTranslationAndScale:function(){return this.properties.dayTextureTranslationAndScale},u_dayTextureTexCoordsRectangle:function(){return this.properties.dayTextureTexCoordsRectangle},u_dayTextureUseWebMercatorT:function(){return this.properties.dayTextureUseWebMercatorT},u_dayTextureAlpha:function(){return this.properties.dayTextureAlpha},u_dayTextureNightAlpha:function(){return this.properties.dayTextureNightAlpha},u_dayTextureDayAlpha:function(){return this.properties.dayTextureDayAlpha},u_dayTextureBrightness:function(){return this.properties.dayTextureBrightness},u_dayTextureContrast:function(){return this.properties.dayTextureContrast},u_dayTextureHue:function(){return this.properties.dayTextureHue},u_dayTextureSaturation:function(){return this.properties.dayTextureSaturation},u_dayTextureOneOverGamma:function(){return this.properties.dayTextureOneOverGamma},u_dayIntensity:function(){return this.properties.dayIntensity},u_southAndNorthLatitude:function(){return this.properties.southAndNorthLatitude},u_southMercatorYAndOneOverHeight:function(){return this.properties.southMercatorYAndOneOverHeight},u_waterMask:function(){return this.properties.waterMask},u_waterMaskTranslationAndScale:function(){return this.properties.waterMaskTranslationAndScale},u_minMaxHeight:function(){return this.properties.minMaxHeight},u_scaleAndBias:function(){return this.properties.scaleAndBias},u_dayTextureSplit:function(){return this.properties.dayTextureSplit},u_dayTextureCutoutRectangles:function(){return this.properties.dayTextureCutoutRectangles},u_clippingPlanes:function(){let i=t._clippingPlanes;return c(i)&&c(i.texture)?i.texture:e.context.defaultTexture},u_cartographicLimitRectangle:function(){return this.properties.localizedCartographicLimitRectangle},u_clippingPlanesMatrix:function(){let i=t._clippingPlanes,o=c(i)?N.multiply(e.context.uniformState.view,i.modelMatrix,ert):N.IDENTITY;return N.inverseTranspose(o,trt)},u_clippingPlanesEdgeStyle:function(){let i=this.properties.clippingPlanesEdgeColor;return i.alpha=this.properties.clippingPlanesEdgeWidth,i},u_clippingDistance:function(){let i=t._clippingPolygons.clippingTexture;return c(i)?i:e.context.defaultTexture},u_clippingExtents:function(){let i=t._clippingPolygons.extentsTexture;return c(i)?i:e.context.defaultTexture},u_minimumBrightness:function(){return e.fog.minimumBrightness},u_hsbShift:function(){return this.properties.hsbShift},u_colorsToAlpha:function(){return this.properties.colorsToAlpha},u_frontFaceAlphaByDistance:function(){return this.properties.frontFaceAlphaByDistance},u_backFaceAlphaByDistance:function(){return this.properties.backFaceAlphaByDistance},u_translucencyRectangle:function(){return this.properties.localizedTranslucencyRectangle},u_undergroundColor:function(){return this.properties.undergroundColor},u_undergroundColorAlphaByDistance:function(){return this.properties.undergroundColorAlphaByDistance},u_lambertDiffuseMultiplier:function(){return this.properties.lambertDiffuseMultiplier},u_vertexShadowDarkness:function(){return this.properties.vertexShadowDarkness},properties:{initialColor:new ee(0,0,.5,1),fillHighlightColor:new z(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new k(65e5,9e6),nightFadeDistance:new k(1e7,4e7),atmosphereLightIntensity:10,atmosphereRayleighCoefficient:new d(55e-7,13e-6,284e-7),atmosphereMieCoefficient:new d(21e-6,21e-6,21e-6),atmosphereRayleighScaleHeight:1e4,atmosphereMieScaleHeight:3200,atmosphereMieAnisotropy:.9,hsbShift:new d,center3D:void 0,rtc:new d,modifiedModelView:new N,tileRectangle:new ee,verticalExaggerationAndRelativeHeight:new k(1,0),dayTextures:[],dayTextureTranslationAndScale:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureAlpha:[],dayTextureNightAlpha:[],dayTextureDayAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new k,southMercatorYAndOneOverHeight:new k,waterMask:void 0,waterMaskTranslationAndScale:new ee,minMaxHeight:new k,scaleAndBias:new N,clippingPlanesEdgeColor:z.clone(z.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new ee,frontFaceAlphaByDistance:new ee,backFaceAlphaByDistance:new ee,localizedTranslucencyRectangle:new ee,undergroundColor:z.clone(z.TRANSPARENT),undergroundColorAlphaByDistance:new ee,lambertDiffuseMultiplier:0,vertexShadowDarkness:0}};return c(t.materialUniformMap)?bt(n,t.materialUniformMap):n}function nrt(e,t,n){let i=n.data,o,r;if(c(i.vertexArray)?(o=i.mesh,r=i.vertexArray):c(i.fill)&&c(i.fill.vertexArray)&&(o=i.fill.mesh,r=i.fill.vertexArray),!(!c(o)||!c(r))){if(c(i.wireframeVertexArray)){if(i.wireframeVertexArray.mesh===o)return;i.wireframeVertexArray.destroy(),i.wireframeVertexArray=void 0}i.wireframeVertexArray=irt(e,r,o),i.wireframeVertexArray.mesh=o}}function irt(e,t,n){let o={indices:n.indices,primitiveType:Se.TRIANGLES};Pn.toWireframe(o);let r=o.indices,s=yt.createIndexBuffer({context:e,typedArray:r,usage:Pe.STATIC_DRAW,indexDatatype:Oe.fromSizeInBytes(r.BYTES_PER_ELEMENT)});return new Zn({context:e,attributes:t._attributes,indexBuffer:s})}var Epe,wpe,YU;(function(){let e=new wt({geometry:oh.fromDimensions({dimensions:new d(2,2,2)})}),t=new wt({geometry:new Cg({radius:1})}),n=new N,i,o;function r(s){return new An({geometryInstances:s,appearance:new nn({translucent:!1,flat:!0}),asynchronous:!1})}Epe=function(s,a){return s===i||(YU(),i=s,n=N.fromRotationTranslation(s.halfAxes,s.center,n),e.modelMatrix=n,e.attributes.color=Ht.fromColor(a),o=r(e)),o},wpe=function(s,a){return s===i||(YU(),i=s,n=N.fromTranslation(s.center,n),n=N.multiplyByUniformScale(n,s.radius,n),t.modelMatrix=n,t.attributes.color=Ht.fromColor(a),o=r(t)),o},YU=function(){c(o)&&(o.destroy(),o=void 0,i=void 0)}})();var ort=new ee(0,0,0,0),rrt={frameState:void 0,surfaceTile:void 0,numberOfDayTextures:void 0,applyBrightness:void 0,applyContrast:void 0,applyHue:void 0,applySaturation:void 0,applyGamma:void 0,applyAlpha:void 0,applyDayNightAlpha:void 0,applySplit:void 0,showReflectiveOcean:void 0,showOceanWaves:void 0,enableLighting:void 0,dynamicAtmosphereLighting:void 0,dynamicAtmosphereLightingFromSun:void 0,showGroundAtmosphere:void 0,perFragmentGroundAtmosphere:void 0,hasVertexNormals:void 0,useWebMercatorProjection:void 0,enableFog:void 0,enableClippingPlanes:void 0,clippingPlanes:void 0,enableClippingPolygons:void 0,clippingPolygons:void 0,clippedByBoundaries:void 0,hasImageryLayerCutout:void 0,colorCorrect:void 0,colorToAlpha:void 0,hasGeodeticSurfaceNormals:void 0,hasExaggeration:void 0},srt=z.TRANSPARENT,art=new Bt;function crt(e,t,n){let i=t.data;c(i.vertexArray)||(i.fill===void 0&&(i.fill=new qD(t)),i.fill.update(e,n));let o=n.creditDisplay,r=i.terrainData;if(c(r)&&c(r.credits)){let _e=r.credits;for(let rt=0,Ri=_e.length;rt<Ri;++rt)o.addCreditToNextFrame(_e[rt])}let s=ht.maximumTextureImageUnits,a=i.waterMaskTexture,l=i.waterMaskTranslationAndScale;!c(a)&&c(i.fill)&&(a=i.fill.waterMaskTexture,l=i.fill.waterMaskTranslationAndScale);let u=n.cameraUnderground,f=n.globeTranslucencyState,h=f.translucent,m=f.frontFaceAlphaByDistance,p=f.backFaceAlphaByDistance,_=f.rectangle,b=g(e.undergroundColor,srt),x=g(e.undergroundColorAlphaByDistance,art),T=Cpe(e,n)&&n.mode===J.SCENE3D&&b.alpha>0&&(x.nearValue>0||x.farValue>0),E=e.lambertDiffuseMultiplier,S=e.vertexShadowDarkness,A=e.hasWaterMask&&c(a),v=A&&e.showWaterEffect,D=e.oceanNormalMap,R=v&&c(D),P=e.terrainProvider,L=c(P)&&e.terrainProvider.hasVertexNormals,F=n.fog.enabled&&n.fog.renderable&&!u,y=e.showGroundAtmosphere&&n.mode===J.SCENE3D,I=yn.castShadows(e.shadows)&&!h,M=yn.receiveShadows(e.shadows)&&!h,B=e.hueShift,U=e.saturationShift,V=e.brightnessShift,W=!(O.equalsEpsilon(B,0,O.EPSILON7)&&O.equalsEpsilon(U,0,O.EPSILON7)&&O.equalsEpsilon(V,0,O.EPSILON7)),H=!1;if(y){let _e=d.magnitude(n.camera.positionWC),rt=e.nightFadeOutDistance;H=_e>rt}A&&--s,R&&--s,c(n.shadowState)&&n.shadowState.shadowsEnabled&&--s,c(e.clippingPlanes)&&e.clippingPlanes.enabled&&--s,c(e.clippingPolygons)&&e.clippingPolygons.enabled&&(--s,--s),s-=f.numberOfTextureUniforms;let X=i.renderedMesh,$=X.center,ae=X.encoding,se=i.tileBoundingRegion,he=n.verticalExaggeration,ge=n.verticalExaggerationRelativeHeight,le=he!==1,me=ae.hasGeodeticSurfaceNormals,Me=Wot,Ge=0,De=0,ke=0,He=0,ft=!1;if(n.mode!==J.SCENE3D){let _e=n.mapProjection,rt=_e.project(te.southwest(t.rectangle),Kot),Ri=_e.project(te.northeast(t.rectangle),$ot);if(Me.x=rt.x,Me.y=rt.y,Me.z=Ri.x,Me.w=Ri.y,n.mode!==J.MORPHING&&($=Xot,$.x=0,$.y=(Me.z+Me.x)*.5,$.z=(Me.w+Me.y)*.5,Me.x-=$.y,Me.y-=$.z,Me.z-=$.y,Me.w-=$.z),n.mode===J.SCENE2D&&ae.quantization===Js.BITS12){let ot=1/(Math.pow(2,12)-1)*.5,uo=(Me.z-Me.x)*ot,ir=(Me.w-Me.y)*ot;Me.x-=uo,Me.y-=ir,Me.z+=uo,Me.w+=ir}_e instanceof Si&&(Ge=t.rectangle.south,De=t.rectangle.north,ke=Si.geodeticLatitudeToMercatorAngle(Ge),He=1/(Si.geodeticLatitudeToMercatorAngle(De)-ke),ft=!0)}let Ie=rrt;Ie.frameState=n,Ie.surfaceTile=i,Ie.hasWaterMask=A,Ie.showReflectiveOcean=v,Ie.showOceanWaves=R,Ie.enableLighting=e.enableLighting,Ie.dynamicAtmosphereLighting=e.dynamicAtmosphereLighting,Ie.dynamicAtmosphereLightingFromSun=e.dynamicAtmosphereLightingFromSun,Ie.showGroundAtmosphere=y,Ie.atmosphereLightIntensity=e.atmosphereLightIntensity,Ie.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,Ie.atmosphereMieCoefficient=e.atmosphereMieCoefficient,Ie.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,Ie.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,Ie.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,Ie.perFragmentGroundAtmosphere=H,Ie.hasVertexNormals=L,Ie.useWebMercatorProjection=ft,Ie.clippedByBoundaries=i.clippedByBoundaries,Ie.hasGeodeticSurfaceNormals=me,Ie.hasExaggeration=le;let Kt=i.imagery,Pt=0,dt=Kt.length,rn=e.showSkirts&&!u&&!h,Vt=e.backFaceCulling&&!u&&!h,Ae=Vt?e._renderState:e._disableCullingRenderState,Qe=Vt?e._blendRenderState:e._disableCullingBlendRenderState,et=Ae,at=e._firstPassInitialColor,$t=n.context;if(c(e._debug.boundingSphereTile)||YU(),e._materialUniformMap!==e.materialUniformMap){e._materialUniformMap=e.materialUniformMap;let _e=e._drawCommands.length;for(let rt=0;rt<_e;++rt)e._uniformMaps[rt]=bpe(n,e)}do{let _e=0,rt,Ri;if(e._drawCommands.length<=e._usedDrawCommands?(rt=new Ke,rt.owner=t,rt.cull=!1,rt.boundingVolume=new ne,rt.orientedBoundingBox=void 0,Ri=bpe(n,e),e._drawCommands.push(rt),e._uniformMaps.push(Ri)):(rt=e._drawCommands[e._usedDrawCommands],Ri=e._uniformMaps[e._usedDrawCommands]),rt.owner=t,++e._usedDrawCommands,t===e._debug.boundingSphereTile){let na=se.boundingVolume,co=se.boundingSphere;c(na)?Epe(na,z.RED).update(n):c(co)&&wpe(co,z.RED).update(n)}let ot=Ri.properties;ee.clone(at,ot.initialColor),ot.oceanNormalMap=D,ot.lightingFadeDistance.x=e.lightingFadeOutDistance,ot.lightingFadeDistance.y=e.lightingFadeInDistance,ot.nightFadeDistance.x=e.nightFadeOutDistance,ot.nightFadeDistance.y=e.nightFadeInDistance,ot.atmosphereLightIntensity=e.atmosphereLightIntensity,ot.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,ot.atmosphereMieCoefficient=e.atmosphereMieCoefficient,ot.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,ot.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,ot.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,ot.zoomedOutOceanSpecularIntensity=e.zoomedOutOceanSpecularIntensity;let uo=u?p:m,ir=u?m:p;c(uo)&&(ee.fromElements(uo.near,uo.nearValue,uo.far,uo.farValue,ot.frontFaceAlphaByDistance),ee.fromElements(ir.near,ir.nearValue,ir.far,ir.farValue,ot.backFaceAlphaByDistance)),ee.fromElements(x.near,x.nearValue,x.far,x.farValue,ot.undergroundColorAlphaByDistance),z.clone(b,ot.undergroundColor),ot.lambertDiffuseMultiplier=E,ot.vertexShadowDarkness=S;let Ja=!c(i.vertexArray)&&c(e.fillHighlightColor)&&e.fillHighlightColor.alpha>0;Ja&&z.clone(e.fillHighlightColor,ot.fillHighlightColor),ot.verticalExaggerationAndRelativeHeight.x=he,ot.verticalExaggerationAndRelativeHeight.y=ge,ot.center3D=X.center,d.clone($,ot.rtc),ee.clone(Me,ot.tileRectangle),ot.southAndNorthLatitude.x=Ge,ot.southAndNorthLatitude.y=De,ot.southMercatorYAndOneOverHeight.x=ke,ot.southMercatorYAndOneOverHeight.y=He;let gr=qot,Vr=qU(t.rectangle,e.cartographicLimitRectangle),Le=Yot,it=qU(t.rectangle,_);d.fromElements(B,U,V,ot.hsbShift);let We=t.rectangle,Ye=1/We.width,ct=1/We.height;gr.x=(Vr.west-We.west)*Ye,gr.y=(Vr.south-We.south)*ct,gr.z=(Vr.east-We.west)*Ye,gr.w=(Vr.north-We.south)*ct,ee.clone(gr,ot.localizedCartographicLimitRectangle),Le.x=(it.west-We.west)*Ye,Le.y=(it.south-We.south)*ct,Le.z=(it.east-We.west)*Ye,Le.w=(it.north-We.south)*ct,ee.clone(Le,ot.localizedTranslucencyRectangle);let At=F&&O.fog(t._distance,n.fog.density)>O.EPSILON3;W=W&&(At||y);let hn=!1,ao=!1,Yo=!1,ya=!1,ba=!1,Hr=!1,Gn=!1,ts=!1,yr=!1,Bc=!1;for(;_e<s&&Pt<dt;){let na=Kt[Pt],co=na.readyImagery;if(++Pt,!c(co)||co.imageryLayer.alpha===0)continue;let Cm=na.useWebMercatorT?co.textureWebMercator:co.texture;if(!c(Cm))throw new w("readyImagery is not actually ready!");let ii=co.imageryLayer;c(na.textureTranslationAndScale)||(na.textureTranslationAndScale=ii._calculateTextureTranslationAndScale(t,na)),ot.dayTextures[_e]=Cm,ot.dayTextureTranslationAndScale[_e]=na.textureTranslationAndScale,ot.dayTextureTexCoordsRectangle[_e]=na.textureCoordinateRectangle,ot.dayTextureUseWebMercatorT[_e]=na.useWebMercatorT,ot.dayTextureAlpha[_e]=ii.alpha,Hr=Hr||ot.dayTextureAlpha[_e]!==1,ot.dayTextureNightAlpha[_e]=ii.nightAlpha,Gn=Gn||ot.dayTextureNightAlpha[_e]!==1,ot.dayTextureDayAlpha[_e]=ii.dayAlpha,Gn=Gn||ot.dayTextureDayAlpha[_e]!==1,ot.dayTextureBrightness[_e]=ii.brightness,hn=hn||ot.dayTextureBrightness[_e]!==lu.DEFAULT_BRIGHTNESS,ot.dayTextureContrast[_e]=ii.contrast,ao=ao||ot.dayTextureContrast[_e]!==lu.DEFAULT_CONTRAST,ot.dayTextureHue[_e]=ii.hue,Yo=Yo||ot.dayTextureHue[_e]!==lu.DEFAULT_HUE,ot.dayTextureSaturation[_e]=ii.saturation,ya=ya||ot.dayTextureSaturation[_e]!==lu.DEFAULT_SATURATION,ot.dayTextureOneOverGamma[_e]=1/ii.gamma,ba=ba||ot.dayTextureOneOverGamma[_e]!==1/lu.DEFAULT_GAMMA,ot.dayTextureSplit[_e]=ii.splitDirection,ts=ts||ot.dayTextureSplit[_e]!==0;let Qa=ot.dayTextureCutoutRectangles[_e];if(c(Qa)||(Qa=ot.dayTextureCutoutRectangles[_e]=new ee),ee.clone(ee.ZERO,Qa),c(ii.cutoutRectangle)){let ho=qU(We,ii.cutoutRectangle),Cu=te.simpleIntersection(ho,We,Tpe);yr=c(Cu)||yr,Qa.x=(ho.west-We.west)*Ye,Qa.y=(ho.south-We.south)*ct,Qa.z=(ho.east-We.west)*Ye,Qa.w=(ho.north-We.south)*ct}let wl=ot.colorsToAlpha[_e];c(wl)||(wl=ot.colorsToAlpha[_e]=new ee);let Tu=c(ii.colorToAlpha)&&ii.colorToAlphaThreshold>0;if(Bc=Bc||Tu,Tu){let ho=ii.colorToAlpha;wl.x=ho.red,wl.y=ho.green,wl.z=ho.blue,wl.w=ii.colorToAlphaThreshold}else wl.w=-1;if(c(co.credits)){let ho=co.credits;for(let Cu=0,fx=ho.length;Cu<fx;++Cu)o.addCreditToNextFrame(ho[Cu])}++_e}ot.dayTextures.length=_e,ot.waterMask=a,ee.clone(l,ot.waterMaskTranslationAndScale),ot.minMaxHeight.x=ae.minimumHeight,ot.minMaxHeight.y=ae.maximumHeight,N.clone(ae.matrix,ot.scaleAndBias);let fo=e._clippingPlanes,Rr=c(fo)&&fo.enabled&&t.isClipped;Rr&&(ot.clippingPlanesEdgeColor=z.clone(fo.edgeColor,ot.clippingPlanesEdgeColor),ot.clippingPlanesEdgeWidth=fo.edgeWidth);let xm=e._clippingPolygons,kc=c(xm)&&xm.enabled&&t.isClipped;Ie.numberOfDayTextures=_e,Ie.applyBrightness=hn,Ie.applyContrast=ao,Ie.applyHue=Yo,Ie.applySaturation=ya,Ie.applyGamma=ba,Ie.applyAlpha=Hr,Ie.applyDayNightAlpha=Gn,Ie.applySplit=ts,Ie.enableFog=At,Ie.enableClippingPlanes=Rr,Ie.clippingPlanes=fo,Ie.enableClippingPolygons=kc,Ie.clippingPolygons=xm,Ie.hasImageryLayerCutout=yr,Ie.colorCorrect=W,Ie.highlightFillTile=Ja,Ie.colorToAlpha=Bc,Ie.showUndergroundColor=T,Ie.translucent=h;let Tm=i.renderedMesh.indices.length;rn||(Tm=i.renderedMesh.indexCountWithoutSkirts),rt.shaderProgram=e._surfaceShaderSet.getShaderProgram(Ie),rt.castShadows=I,rt.receiveShadows=M,rt.renderState=et,rt.primitiveType=Se.TRIANGLES,rt.vertexArray=i.vertexArray||i.fill.vertexArray,rt.count=Tm,rt.uniformMap=Ri,rt.pass=xe.GLOBE,e._debug.wireframe&&(nrt($t,e,t),c(i.wireframeVertexArray)&&(rt.vertexArray=i.wireframeVertexArray,rt.primitiveType=Se.LINES,rt.count=Tm*2));let xa=rt.boundingVolume,br=rt.orientedBoundingBox;n.mode!==J.SCENE3D?(ne.fromRectangleWithHeights2D(t.rectangle,n.mapProjection,se.minimumHeight,se.maximumHeight,xa),d.fromElements(xa.center.z,xa.center.x,xa.center.y,xa.center),n.mode===J.MORPHING&&(xa=ne.union(se.boundingSphere,xa,xa))):(rt.boundingVolume=ne.clone(se.boundingSphere,xa),rt.orientedBoundingBox=wn.clone(se.boundingVolume,br)),rt.dirty=!0,h&&f.updateDerivedCommands(rt,n),xpe(rt,n),et=Qe,at=ort}while(Pt<dt)}var XU=jo;function Spe(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=te.clone(te.MAX_VALUE)}Object.defineProperties(Spe.prototype,{enabled:{get:function(){return this._enabled},set:function(e){C.typeOf.bool("enabled",e),this._enabled=e}},frontFaceAlpha:{get:function(){return this._frontFaceAlpha},set:function(e){C.typeOf.number.greaterThanOrEquals("frontFaceAlpha",e,0),C.typeOf.number.lessThanOrEquals("frontFaceAlpha",e,1),this._frontFaceAlpha=e}},frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance},set:function(e){if(c(e)&&e.far<e.near)throw new w("far distance must be greater than near distance.");this._frontFaceAlphaByDistance=Bt.clone(e,this._frontFaceAlphaByDistance)}},backFaceAlpha:{get:function(){return this._backFaceAlpha},set:function(e){C.typeOf.number.greaterThanOrEquals("backFaceAlpha",e,0),C.typeOf.number.lessThanOrEquals("backFaceAlpha",e,1),this._backFaceAlpha=e}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance},set:function(e){if(c(e)&&e.far<e.near)throw new w("far distance must be greater than near distance.");this._backFaceAlphaByDistance=Bt.clone(e,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(e){c(e)||(e=te.clone(te.MAX_VALUE)),te.clone(e,this._rectangle)}}});var KU=Spe;function ms(){this._layers=[],this.layerAdded=new fe,this.layerRemoved=new fe,this.layerMoved=new fe,this.layerShownOrHidden=new fe}Object.defineProperties(ms.prototype,{length:{get:function(){return this._layers.length}}});ms.prototype.add=function(e,t){let n=c(t);if(!c(e))throw new w("layer is required.");if(n){if(t<0)throw new w("index must be greater than or equal to zero.");if(t>this._layers.length)throw new w("index must be less than or equal to the number of layers.")}n?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),this.layerAdded.raiseEvent(e,t);let i=e.readyEvent.addEventListener(()=>{this.layerShownOrHidden.raiseEvent(e,e._layerIndex,e.show),i()})};ms.prototype.addImageryProvider=function(e,t){if(!c(e))throw new w("imageryProvider is required.");let n=new lu(e);return this.add(n,t),n};ms.prototype.remove=function(e,t){t=g(t,!0);let n=this._layers.indexOf(e);return n!==-1?(this._layers.splice(n,1),this._update(),this.layerRemoved.raiseEvent(e,n),t&&e.destroy(),!0):!1};ms.prototype.removeAll=function(e){e=g(e,!0);let t=this._layers;for(let n=0,i=t.length;n<i;n++){let o=t[n];this.layerRemoved.raiseEvent(o,n),e&&o.destroy()}this._layers=[]};ms.prototype.contains=function(e){return this.indexOf(e)!==-1};ms.prototype.indexOf=function(e){return this._layers.indexOf(e)};ms.prototype.get=function(e){if(!c(e))throw new w("index is required.","index");return this._layers[e]};function $U(e,t){if(!c(t))throw new w("layer is required.");let n=e.indexOf(t);if(n===-1)throw new w("layer is not in this collection.");return n}function Ape(e,t,n){let i=e._layers;if(t=O.clamp(t,0,i.length-1),n=O.clamp(n,0,i.length-1),t===n)return;let o=i[t];i[t]=i[n],i[n]=o,e._update(),e.layerMoved.raiseEvent(o,n,t)}ms.prototype.raise=function(e){let t=$U(this._layers,e);Ape(this,t,t+1)};ms.prototype.lower=function(e){let t=$U(this._layers,e);Ape(this,t,t-1)};ms.prototype.raiseToTop=function(e){let t=$U(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))};ms.prototype.lowerToBottom=function(e){let t=$U(this._layers,e);t!==0&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),this.layerMoved.raiseEvent(e,0,t))};var lrt=new te;function vpe(e,t,n,i){let o=e.globe._surface._tilesToRender,r;for(let a=0;!c(r)&&a<o.length;++a){let l=o[a];te.contains(l.rectangle,t)&&(r=l)}if(!c(r))return;let s=r.data.imagery;for(let a=s.length-1;a>=0;--a){let l=s[a],u=l.readyImagery;if(!c(u)||!u.imageryLayer.ready)continue;let f=u.imageryLayer.imageryProvider;if(n&&!c(f.pickFeatures)||!te.contains(u.rectangle,t))continue;let h=lrt,m=1/1024;h.west=O.lerp(r.rectangle.west,r.rectangle.east,l.textureCoordinateRectangle.x-m),h.east=O.lerp(r.rectangle.west,r.rectangle.east,l.textureCoordinateRectangle.z+m),h.south=O.lerp(r.rectangle.south,r.rectangle.north,l.textureCoordinateRectangle.y-m),h.north=O.lerp(r.rectangle.south,r.rectangle.north,l.textureCoordinateRectangle.w+m),te.contains(h,t)&&i(u)}}ms.prototype.pickImageryLayers=function(e,t){let n=t.globe.pick(e,t);if(!c(n))return;let i=t.ellipsoid.cartesianToCartographic(n),o=[];if(vpe(t,i,!1,function(r){o.push(r.imageryLayer)}),o.length!==0)return o};ms.prototype.pickImageryLayerFeatures=function(e,t){let n=t.globe.pick(e,t);if(!c(n))return;let i=t.ellipsoid.cartesianToCartographic(n),o=[],r=[];if(vpe(t,i,!0,function(s){if(!s.imageryLayer.ready)return;let l=s.imageryLayer.imageryProvider.pickFeatures(s.x,s.y,s.level,i.longitude,i.latitude);c(l)&&(o.push(l),r.push(s.imageryLayer))}),o.length!==0)return Promise.all(o).then(function(s){let a=[];for(let l=0;l<s.length;++l){let u=s[l],f=r[l];if(c(u)&&u.length>0)for(let h=0;h<u.length;++h){let m=u[h];m.imageryLayer=f,c(m.position)||(m.position=i),a.push(m)}}return a})};ms.prototype.queueReprojectionCommands=function(e){let t=this._layers;for(let n=0,i=t.length;n<i;++n)t[n].queueReprojectionCommands(e)};ms.prototype.cancelReprojections=function(){let e=this._layers;for(let t=0,n=e.length;t<n;++t)e[t].cancelReprojections()};ms.prototype.isDestroyed=function(){return!1};ms.prototype.destroy=function(){return this.removeAll(!0),ue(this)};ms.prototype._update=function(){let e=!0,t=this._layers,n,i,o,r;for(o=0,r=t.length;o<r;++o)i=t[o],i._layerIndex=o,i.show?(i._isBaseLayer=e,e=!1):i._isBaseLayer=!1,i.show!==i._show&&(c(i._show)&&(c(n)||(n=[]),n.push(i)),i._show=i.show);if(c(n))for(o=0,r=n.length;o<r;++o)i=n[o],this.layerShownOrHidden.raiseEvent(i,i._layerIndex,i.show)};var ZU=ms;function Dpe(e){this._ellipsoid=new Rg(e.ellipsoid,d.ZERO)}Object.defineProperties(Dpe.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var JU=Dpe;function Pc(e){if(!c(e))throw new w("options is required.");if(c(e.x))if(c(e.y)){if(e.x<0||e.y<0)throw new w("options.x and options.y must be greater than or equal to zero.")}else throw new w("options.y is required.");else throw new w("options.x is required.");if(!c(e.level))throw new w("options.level is required and must be greater than or equal to zero.");if(!c(e.tilingScheme))throw new w("options.tilingScheme is required.");this._tilingScheme=e.tilingScheme,this._x=e.x,this._y=e.y,this._level=e.level,this._parent=e.parent,this._rectangle=this._tilingScheme.tileXYToRectangle(this._x,this._y,this._level),this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this.replacementPrevious=void 0,this.replacementNext=void 0,this._distance=0,this._loadPriority=0,this._customData=[],this._frameUpdated=void 0,this._lastSelectionResult=Hn.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this.state=Qs.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0}Pc.createLevelZeroTiles=function(e){if(!c(e))throw new w("tilingScheme is required.");let t=e.getNumberOfXTilesAtLevel(0),n=e.getNumberOfYTilesAtLevel(0),i=new Array(t*n),o=0;for(let r=0;r<n;++r)for(let s=0;s<t;++s)i[o++]=new Pc({tilingScheme:e,x:s,y:r,level:0});return i};Pc.prototype._updateCustomData=function(e,t,n){let i=this.customData,o,r,s;if(c(t)&&c(n)){for(i=i.filter(function(a){return n.indexOf(a)===-1}),this._customData=i,s=this._rectangle,o=0;o<t.length;++o)r=t[o],te.contains(s,r.positionCartographic)&&i.push(r);this._frameUpdated=e}else{let a=this._parent;if(c(a)&&this._frameUpdated!==a._frameUpdated){i.length=0,s=this._rectangle;let l=a.customData;for(o=0;o<l.length;++o)r=l[o],te.contains(s,r.positionCartographic)&&i.push(r);this._frameUpdated=a._frameUpdated}}};Object.defineProperties(Pc.prototype,{tilingScheme:{get:function(){return this._tilingScheme}},x:{get:function(){return this._x}},y:{get:function(){return this._y}},level:{get:function(){return this._level}},parent:{get:function(){return this._parent}},rectangle:{get:function(){return this._rectangle}},children:{get:function(){return[this.northwestChild,this.northeastChild,this.southwestChild,this.southeastChild]}},southwestChild:{get:function(){return c(this._southwestChild)||(this._southwestChild=new Pc({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2+1,level:this.level+1,parent:this})),this._southwestChild}},southeastChild:{get:function(){return c(this._southeastChild)||(this._southeastChild=new Pc({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2+1,level:this.level+1,parent:this})),this._southeastChild}},northwestChild:{get:function(){return c(this._northwestChild)||(this._northwestChild=new Pc({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2,level:this.level+1,parent:this})),this._northwestChild}},northeastChild:{get:function(){return c(this._northeastChild)||(this._northeastChild=new Pc({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2,level:this.level+1,parent:this})),this._northeastChild}},customData:{get:function(){return this._customData}},needsLoading:{get:function(){return this.state<Qs.DONE}},eligibleForUnloading:{get:function(){let e=!0;return c(this.data)&&(e=this.data.eligibleForUnloading,c(e)||(e=!0)),e}}});Pc.prototype.findLevelZeroTile=function(e,t,n){let i=this.tilingScheme.getNumberOfXTilesAtLevel(0);if(t<0?t+=i:t>=i&&(t-=i),!(n<0||n>=this.tilingScheme.getNumberOfYTilesAtLevel(0)))return e.filter(function(o){return o.x===t&&o.y===n})[0]};Pc.prototype.findTileToWest=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x-1,this.y);if(t.southeastChild===this)return t.southwestChild;if(t.northeastChild===this)return t.northwestChild;let n=t.findTileToWest(e);if(n!==void 0)return t.southwestChild===this?n.southeastChild:n.northeastChild};Pc.prototype.findTileToEast=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x+1,this.y);if(t.southwestChild===this)return t.southeastChild;if(t.northwestChild===this)return t.northeastChild;let n=t.findTileToEast(e);if(n!==void 0)return t.southeastChild===this?n.southwestChild:n.northwestChild};Pc.prototype.findTileToSouth=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x,this.y+1);if(t.northwestChild===this)return t.southwestChild;if(t.northeastChild===this)return t.southeastChild;let n=t.findTileToSouth(e);if(n!==void 0)return t.southwestChild===this?n.northwestChild:n.northeastChild};Pc.prototype.findTileToNorth=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x,this.y-1);if(t.southwestChild===this)return t.northwestChild;if(t.southeastChild===this)return t.northeastChild;let n=t.findTileToNorth(e);if(n!==void 0)return t.northwestChild===this?n.southwestChild:n.southeastChild};Pc.prototype.freeResources=function(){this.state=Qs.START,this.renderable=!1,this.upsampledFromParent=!1,c(this.data)&&c(this.data.freeResources)&&this.data.freeResources(),QU(this._southwestChild),this._southwestChild=void 0,QU(this._southeastChild),this._southeastChild=void 0,QU(this._northwestChild),this._northwestChild=void 0,QU(this._northeastChild),this._northeastChild=void 0};function QU(e){c(e)&&e.freeResources()}var ez=Pc;function tz(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}tz.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head};tz.prototype.trimTiles=function(e){let t=this.tail,n=!0;for(;n&&c(this._lastBeforeStartOfFrame)&&this.count>e&&c(t);){n=t!==this._lastBeforeStartOfFrame;let i=t.replacementPrevious;t.eligibleForUnloading&&(t.freeResources(),Ipe(this,t)),t=i}};function Ipe(e,t){let n=t.replacementPrevious,i=t.replacementNext;t===e._lastBeforeStartOfFrame&&(e._lastBeforeStartOfFrame=i),t===e.head?e.head=i:n.replacementNext=i,t===e.tail?e.tail=n:i.replacementPrevious=n,t.replacementPrevious=void 0,t.replacementNext=void 0,--e.count}tz.prototype.markTileRendered=function(e){let t=this.head;if(t===e){e===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=e.replacementNext);return}if(++this.count,!c(t)){e.replacementPrevious=void 0,e.replacementNext=void 0,this.head=e,this.tail=e;return}(c(e.replacementPrevious)||c(e.replacementNext))&&Ipe(this,e),e.replacementPrevious=void 0,e.replacementNext=t,t.replacementPrevious=e,this.head=e};var nz=tz;function Ef(e){if(!c(e)||!c(e.tileProvider))throw new w("options.tileProvider is required.");if(c(e.tileProvider.quadtree))throw new w("A QuadtreeTileProvider can only be used with a single QuadtreePrimitive");this._tileProvider=e.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};let n=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new nz,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=g(e.maximumScreenSpaceError,2),this.tileCacheSize=g(e.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this._occluders=new JU({ellipsoid:n}),this._tileLoadProgressEvent=new fe,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}Object.defineProperties(Ef.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}});Ef.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0};function urt(e){let t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,Ppe(e);let n=e._levelZeroTiles;if(c(n))for(let i=0;i<n.length;++i){let r=n[i].customData,s=r.length;for(let a=0;a<s;++a){let l=r[a];l.level=0,e._addHeightCallbacks.push(l)}n[i].freeResources()}e._levelZeroTiles=void 0,e._tileProvider.cancelReprojections()}Ef.prototype.forEachLoadedTile=function(e){let t=this._tileReplacementQueue.head;for(;c(t);)t.state!==Qs.START&&e(t),t=t.replacementNext};Ef.prototype.forEachRenderedTile=function(e){let t=this._tilesToRender;for(let n=0,i=t.length;n<i;++n)e(t[n])};Ef.prototype.updateHeight=function(e,t){let n=this,i={positionOnEllipsoidSurface:void 0,positionCartographic:e,level:-1,callback:t};return i.removeFunc=function(){let o=n._addHeightCallbacks,r=o.length;for(let s=0;s<r;++s)if(o[s]===i){o.splice(s,1);break}n._removeHeightCallbacks.push(i),i.callback&&(i.callback=void 0)},n._addHeightCallbacks.push(i),i.removeFunc};Ef.prototype.update=function(e){c(this._tileProvider.update)&&this._tileProvider.update(e)};function Ppe(e){let t=e._debug;t.maxDepth=0,t.maxDepthVisited=0,t.tilesVisited=0,t.tilesCulled=0,t.tilesRendered=0,t.tilesWaitingForChildren=0,e._tileLoadQueueHigh.length=0,e._tileLoadQueueMedium.length=0,e._tileLoadQueueLow.length=0}Ef.prototype.beginFrame=function(e){e.passes.render&&(this._tilesInvalidated&&(urt(this),this._tilesInvalidated=!1),this._tileProvider.initialize(e),Ppe(this),!this._debug.suspendLodUpdate&&this._tileReplacementQueue.markStartOfRenderFrame())};Ef.prototype.render=function(e){let t=e.passes,n=this._tileProvider;t.render&&(n.beginUpdate(e),mrt(this,e),wrt(this,e),n.endUpdate(e)),t.pick&&this._tilesToRender.length>0&&n.updateForPick(e)};function frt(e,t){let n=e._tileLoadQueueHigh.length+e._tileLoadQueueMedium.length+e._tileLoadQueueLow.length;if(n!==e._lastTileLoadQueueLength||e._tilesInvalidated){let o=fe.prototype.raiseEvent.bind(e._tileLoadProgressEvent,n);t.afterRender.push(()=>(o(),!0)),e._lastTileLoadQueueLength=n}let i=e._debug;i.enableDebugOutput&&!i.suspendLodUpdate&&(i.maxDepth=e._tilesToRender.reduce(function(o,r){return Math.max(o,r.level)},-1),i.tilesRendered=e._tilesToRender.length,(i.tilesVisited!==i.lastTilesVisited||i.tilesRendered!==i.lastTilesRendered||i.tilesCulled!==i.lastTilesCulled||i.maxDepth!==i.lastMaxDepth||i.tilesWaitingForChildren!==i.lastTilesWaitingForChildren||i.maxDepthVisited!==i.lastMaxDepthVisited)&&(console.log(`Visited ${i.tilesVisited}, Rendered: ${i.tilesRendered}, Culled: ${i.tilesCulled}, Max Depth Rendered: ${i.maxDepth}, Max Depth Visited: ${i.maxDepthVisited}, Waiting for children: ${i.tilesWaitingForChildren}`),i.lastTilesVisited=i.tilesVisited,i.lastTilesRendered=i.tilesRendered,i.lastTilesCulled=i.tilesCulled,i.lastMaxDepth=i.maxDepth,i.lastTilesWaitingForChildren=i.tilesWaitingForChildren,i.lastMaxDepthVisited=i.maxDepthVisited))}Ef.prototype.endFrame=function(e){!e.passes.render||e.mode===J.MORPHING||(xrt(this,e),Ert(this,e),frt(this,e))};Ef.prototype.isDestroyed=function(){return!1};Ef.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var XD,Ope=new re;function drt(e,t){let n=te.center(e.rectangle,Ope),i=n.longitude-XD.longitude,o=n.latitude-XD.latitude;n=te.center(t.rectangle,Ope);let r=n.longitude-XD.longitude,s=n.latitude-XD.latitude;return i*i+o*o-(r*r+s*s)}var hrt=new d,YD=[];function mrt(e,t){let n=e._debug;if(n.suspendLodUpdate)return;let i=e._tilesToRender;i.length=0;let o,r=e._tileProvider;if(!c(e._levelZeroTiles)){let b=r.tilingScheme;if(c(b)){let x=r.tilingScheme;e._levelZeroTiles=ez.createLevelZeroTiles(x);let T=e._levelZeroTiles.length;if(YD.length<T)for(YD=new Array(T),o=0;o<T;++o)YD[o]===void 0&&(YD[o]=new KD)}else return}e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;let s,a=e._levelZeroTiles,l=a.length>1?e._occluders:void 0;XD=t.camera.positionCartographic,a.sort(drt);let u=e._addHeightCallbacks,f=e._removeHeightCallbacks,h=t.frameNumber,m;if(u.length>0||f.length>0){for(o=0,m=a.length;o<m;++o)s=a[o],s._updateCustomData(h,u,f);u.length=0,f.length=0}let p=t.camera;e._cameraPositionCartographic=p.positionCartographic;let _=N.getTranslation(p.transform,hrt);for(e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(_,e._cameraReferenceFrameOriginCartographic),o=0,m=a.length;o<m;++o)s=a[o],e._tileReplacementQueue.markTileRendered(s),s.renderable?_a(e,s,r,t,l,!1,YD[o]):(jp(e,e._tileLoadQueueHigh,s,t),++n.tilesWaitingForChildren);e._lastSelectionFrameNumber=h}function jp(e,t,n,i){n.needsLoading&&(e.tileProvider.computeTileLoadPriority!==void 0&&(n._loadPriority=e.tileProvider.computeTileLoadPriority(n,i)),t.push(n))}function KD(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function Rpe(){this.southwest=new KD,this.southeast=new KD,this.northwest=new KD,this.northeast=new KD}Rpe.prototype.combine=function(e){let t=this.southwest,n=this.southeast,i=this.northwest,o=this.northeast;e.allAreRenderable=t.allAreRenderable&&n.allAreRenderable&&i.allAreRenderable&&o.allAreRenderable,e.anyWereRenderedLastFrame=t.anyWereRenderedLastFrame||n.anyWereRenderedLastFrame||i.anyWereRenderedLastFrame||o.anyWereRenderedLastFrame,e.notYetRenderableCount=t.notYetRenderableCount+n.notYetRenderableCount+i.notYetRenderableCount+o.notYetRenderableCount};var sY=new Array(31);for(let e=0;e<sY.length;++e)sY[e]=new Rpe;function prt(e,t,n,i,o){let r=e._debug;++r.tilesVisited,e._tileReplacementQueue.markTileRendered(n),n._updateCustomData(t.frameNumber),n.level>r.maxDepthVisited&&(r.maxDepthVisited=n.level);let s=yrt(e,t,n)<e.maximumScreenSpaceError,a=n.southwestChild,l=n.southeastChild,u=n.northwestChild,f=n.northeastChild,h=e._lastSelectionFrameNumber,m=n._lastSelectionResultFrame===h?n._lastSelectionResult:Hn.NONE,p=e.tileProvider;if(s||i){let _=Hn.originalResult(m)===Hn.RENDERED,b=Hn.originalResult(m)===Hn.CULLED||m===Hn.NONE,x=n.state===Qs.DONE,T=_||b||x;if(T||c(p.canRenderWithoutLosingDetail)&&(T=p.canRenderWithoutLosingDetail(n)),T){s&&jp(e,e._tileLoadQueueMedium,n,t),iz(e,n),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=m===Hn.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=Hn.RENDERED,o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n);return}i=!0,s&&jp(e,e._tileLoadQueueHigh,n,t)}if(p.canRefine(n)){if(a.upsampledFromParent&&l.upsampledFromParent&&u.upsampledFromParent&&f.upsampledFromParent){iz(e,n),jp(e,e._tileLoadQueueMedium,n,t),e._tileReplacementQueue.markTileRendered(a),e._tileReplacementQueue.markTileRendered(l),e._tileReplacementQueue.markTileRendered(u),e._tileReplacementQueue.markTileRendered(f),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=m===Hn.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=Hn.RENDERED,o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n);return}n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=Hn.REFINED;let b=e._tilesToRender.length,x=e._tileLoadQueueLow.length,T=e._tileLoadQueueMedium.length,E=e._tileLoadQueueHigh.length,S=e._tileToUpdateHeights.length;if(_rt(e,a,l,u,f,t,i,o),b!==e._tilesToRender.length){let A=o.allAreRenderable,v=o.anyWereRenderedLastFrame,D=o.notYetRenderableCount,R=!1;if(!A&&!v){let P=e._tilesToRender;for(let F=b;F<P.length;++F){let y=P[F];for(;y!==void 0&&y._lastSelectionResult!==Hn.KICKED&&y!==n;)y._lastSelectionResult=Hn.kick(y._lastSelectionResult),y=y.parent}e._tilesToRender.length=b,e._tileToUpdateHeights.length=S,iz(e,n),n._lastSelectionResult=Hn.RENDERED;let L=m===Hn.RENDERED;!L&&D>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=x,e._tileLoadQueueMedium.length=T,e._tileLoadQueueHigh.length=E,jp(e,e._tileLoadQueueMedium,n,t),o.notYetRenderableCount=n.renderable?0:1,R=!0),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=L,L||e._tileToUpdateHeights.push(n),++r.tilesWaitingForChildren}e.preloadAncestors&&!R&&jp(e,e._tileLoadQueueLow,n,t)}return}n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=Hn.RENDERED,iz(e,n),jp(e,e._tileLoadQueueHigh,n,t),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=m===Hn.RENDERED,o.notYetRenderableCount=n.renderable?0:1}function _rt(e,t,n,i,o,r,s,a){let l=r.camera.positionCartographic,u=e._tileProvider,f=e._occluders,h=sY[t.level],m=h.southwest,p=h.southeast,_=h.northwest,b=h.northeast;l.longitude<t.rectangle.east?l.latitude<t.rectangle.north?(_a(e,t,u,r,f,s,m),_a(e,n,u,r,f,s,p),_a(e,i,u,r,f,s,_),_a(e,o,u,r,f,s,b)):(_a(e,i,u,r,f,s,_),_a(e,t,u,r,f,s,m),_a(e,o,u,r,f,s,b),_a(e,n,u,r,f,s,p)):l.latitude<t.rectangle.north?(_a(e,n,u,r,f,s,p),_a(e,t,u,r,f,s,m),_a(e,o,u,r,f,s,b),_a(e,i,u,r,f,s,_)):(_a(e,o,u,r,f,s,b),_a(e,i,u,r,f,s,_),_a(e,n,u,r,f,s,p),_a(e,t,u,r,f,s,m)),h.combine(a)}function grt(e,t){let n=t.rectangle;return c(e._cameraPositionCartographic)&&te.contains(n,e._cameraPositionCartographic)||c(e._cameraReferenceFrameOriginCartographic)&&te.contains(n,e._cameraReferenceFrameOriginCartographic)}function _a(e,t,n,i,o,r,s){if(n.computeTileVisibility(t,i,o)!==pr.NONE)return prt(e,i,t,r,s);if(++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),s.allAreRenderable=!0,s.anyWereRenderedLastFrame=!1,s.notYetRenderableCount=0,grt(e,t)){(!c(t.data)||!c(t.data.vertexArray))&&jp(e,e._tileLoadQueueMedium,t,i);let a=e._lastSelectionFrameNumber,l=t._lastSelectionResultFrame===a?t._lastSelectionResult:Hn.NONE;l!==Hn.CULLED_BUT_NEEDED&&l!==Hn.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=Hn.CULLED_BUT_NEEDED}else e.preloadSiblings||t.level===0?(jp(e,e._tileLoadQueueLow,t,i),t._lastSelectionResult=Hn.CULLED):t._lastSelectionResult=Hn.CULLED;t._lastSelectionResultFrame=i.frameNumber}function yrt(e,t,n){if(t.mode===J.SCENE2D||t.camera.frustum instanceof an||t.camera.frustum instanceof No)return brt(e,t,n);let i=e._tileProvider.getLevelMaximumGeometricError(n.level),o=n._distance,r=t.context.drawingBufferHeight,s=t.camera.frustum.sseDenominator,a=i*r/(o*s);return t.fog.enabled&&(a-=O.fog(o,t.fog.density)*t.fog.sse),a/=t.pixelRatio,a}function brt(e,t,n){let o=t.camera.frustum,r=o.offCenterFrustum;c(r)&&(o=r);let s=t.context,a=s.drawingBufferWidth,l=s.drawingBufferHeight,u=e._tileProvider.getLevelMaximumGeometricError(n.level),f=Math.max(o.top-o.bottom,o.right-o.left)/Math.max(a,l),h=u/f;return t.fog.enabled&&t.mode!==J.SCENE2D&&(h-=O.fog(n._distance,t.fog.density)*t.fog.sse),h/=t.pixelRatio,h}function iz(e,t){e._tilesToRender.push(t)}function xrt(e,t){let n=e._tileLoadQueueHigh,i=e._tileLoadQueueMedium,o=e._tileLoadQueueLow;if(n.length===0&&i.length===0&&o.length===0)return;e._tileReplacementQueue.trimTiles(e.tileCacheSize);let r=yi()+e._loadQueueTimeSlice,s=e._tileProvider,a=oY(e,t,s,r,n,!1);a=oY(e,t,s,r,i,a),oY(e,t,s,r,o,a)}function Trt(e,t){return e._loadPriority-t._loadPriority}function oY(e,t,n,i,o,r){n.computeTileLoadPriority!==void 0&&o.sort(Trt);for(let s=0,a=o.length;s<a&&(yi()<i||!r);++s){let l=o[s];e._tileReplacementQueue.markTileRendered(l),n.loadTile(t,l),r=!0}return r}var iw=new mn,rY=new re,_y=new d,Crt=[];function Ert(e,t){if(!c(e.tileProvider.tilingScheme))return;let n=Crt;n.length=0;let i=e._tileToUpdateHeights,o=yi(),r=e._updateHeightsTimeSlice,s=o+r,a=t.mode,l=t.mapProjection,u=e.tileProvider.tilingScheme.ellipsoid,f;for(;i.length>0;){let h=i[0];if(!c(h.data)||!c(h.data.mesh)){let b=h._lastSelectionResultFrame===e._lastSelectionFrameNumber?h._lastSelectionResult:Hn.NONE;(b===Hn.RENDERED||b===Hn.CULLED_BUT_NEEDED)&&n.push(h),i.shift(),e._lastTileIndex=0;continue}let m=h.customData,p=m.length,_=!1;for(f=e._lastTileIndex;f<p;++f){let b=m[f],x=h.data.terrainData,T=c(x)&&x.wasCreatedByUpsampling();if(h.level>b.level&&!T){if(c(b.positionOnEllipsoidSurface)||(b.positionOnEllipsoidSurface=d.fromRadians(b.positionCartographic.longitude,b.positionCartographic.latitude,0,u)),a===J.SCENE3D){let S=u.geodeticSurfaceNormal(b.positionOnEllipsoidSurface,iw.direction),A=u.getSurfaceNormalIntersectionWithZAxis(b.positionOnEllipsoidSurface,11500,iw.origin);if(!c(A)){let v=0;c(h.data.tileBoundingRegion)&&(v=h.data.tileBoundingRegion.minimumHeight);let D=Math.min(v,-11500),R=d.multiplyByScalar(S,Math.abs(D)+1,_y);d.subtract(b.positionOnEllipsoidSurface,R,iw.origin)}}else re.clone(b.positionCartographic,rY),rY.height=-11500,l.project(rY,_y),d.fromElements(_y.z,_y.x,_y.y,_y),d.clone(_y,iw.origin),d.clone(d.UNIT_X,iw.direction);let E=h.data.pick(iw,a,l,!1,_y);c(E)&&(c(b.callback)&&b.callback(E),b.level=h.level)}if(yi()>=s){_=!0;break}}if(_){e._lastTileIndex=f;break}else e._lastTileIndex=0,i.shift()}for(f=0;f<n.length;f++)i.push(n[f])}function wrt(e,t){let n=e._tileProvider,i=e._tilesToRender;for(let o=0,r=i.length;o<r;++o){let s=i[o];n.showTileThisFrame(s,t)}}var oz=Ef;function Md(e){e=g(e,Z.default);let t=new dU({ellipsoid:e}),n=new ZU;this._ellipsoid=e,this._imageryLayerCollection=n,this._surfaceShaderSet=new pU,this._material=void 0,this._surface=new oz({tileProvider:new XU({terrainProvider:t,imageryLayers:n,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainProvider=t,this._terrainProviderChanged=new fe,this._undergroundColor=z.clone(z.BLACK),this._undergroundColorAlphaByDistance=new Bt(e.maximumRadius/1e3,0,e.maximumRadius/5,1),this._translucency=new KU,cY(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new Te({url:Mi("Assets/Textures/waterNormalsSmall.jpg")}),this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this.fillHighlightColor=void 0,this.enableLighting=!1,this.lambertDiffuseMultiplier=.9,this.dynamicAtmosphereLighting=!0,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=Z.WGS84.equals(e),this.atmosphereLightIntensity=10,this.atmosphereRayleighCoefficient=new d(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new d(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.lightingFadeOutDistance=O.PI_OVER_TWO*e.minimumRadius,this.lightingFadeInDistance=O.PI*e.minimumRadius,this.nightFadeOutDistance=O.PI_OVER_TWO*e.minimumRadius,this.nightFadeInDistance=5*O.PI_OVER_TWO*e.minimumRadius,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!1,this.shadows=yn.RECEIVE_ONLY,this.atmosphereHueShift=0,this.atmosphereSaturationShift=0,this.atmosphereBrightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=void 0,this.vertexShadowDarkness=.3}Object.defineProperties(Md.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},imageryLayers:{get:function(){return this._imageryLayerCollection}},imageryLayersUpdatedEvent:{get:function(){return this._surface.tileProvider.imageryLayersUpdatedEvent}},tilesLoaded:{get:function(){return c(this._surface)?this._surface._tileLoadQueueHigh.length===0&&this._surface._tileLoadQueueMedium.length===0&&this._surface._tileLoadQueueLow.length===0:!0}},baseColor:{get:function(){return this._surface.tileProvider.baseColor},set:function(e){this._surface.tileProvider.baseColor=e}},clippingPlanes:{get:function(){return this._surface.tileProvider.clippingPlanes},set:function(e){this._surface.tileProvider.clippingPlanes=e}},clippingPolygons:{get:function(){return this._surface.tileProvider.clippingPolygons},set:function(e){this._surface.tileProvider.clippingPolygons=e}},cartographicLimitRectangle:{get:function(){return this._surface.tileProvider.cartographicLimitRectangle},set:function(e){c(e)||(e=te.clone(te.MAX_VALUE)),this._surface.tileProvider.cartographicLimitRectangle=e}},oceanNormalMapUrl:{get:function(){return this._oceanNormalMapResource.url},set:function(e){this._oceanNormalMapResource.url=e,this._oceanNormalMapResourceDirty=!0}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){e!==this._terrainProvider&&(this._terrainProvider=e,this._terrainProviderChanged.raiseEvent(e),c(this._material)&&cY(this))}},terrainProviderChanged:{get:function(){return this._terrainProviderChanged}},tileLoadProgressEvent:{get:function(){return this._surface.tileLoadProgressEvent}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,cY(this))}},undergroundColor:{get:function(){return this._undergroundColor},set:function(e){this._undergroundColor=z.clone(e,this._undergroundColor)}},undergroundColorAlphaByDistance:{get:function(){return this._undergroundColorAlphaByDistance},set:function(e){if(c(e)&&e.far<e.near)throw new w("far distance must be greater than near distance.");this._undergroundColorAlphaByDistance=Bt.clone(e,this._undergroundColorAlphaByDistance)}},translucency:{get:function(){return this._translucency}}});function cY(e){let t=[],n=c(e._material)&&(c(e._material.shaderSource.match(/slope/))||c(e._material.shaderSource.match("normalEC"))),i=[Eh,LD];c(e._material)&&(!n||e._terrainProvider.requestVertexNormals)?(i.push(e._material.shaderSource),t.push("APPLY_MATERIAL"),e._surface._tileProvider.materialUniformMap=e._material._uniforms):e._surface._tileProvider.materialUniformMap=void 0,i.push(hU),e._surfaceShaderSet.baseVertexShaderSource=new Be({sources:[Eh,LD,mU],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new Be({sources:i,defines:t}),e._surfaceShaderSet.material=e._material}function Srt(e){return function(t,n){let i=ne.distanceSquaredTo(t.pickBoundingSphere,e),o=ne.distanceSquaredTo(n.pickBoundingSphere,e);return i-o}}var Art=[],vrt={start:0,stop:0};Md.prototype.pickWorldCoordinates=function(e,t,n,i){if(!c(e))throw new w("ray is required");if(!c(t))throw new w("scene is required");n=g(n,!0);let o=t.mode,r=t.mapProjection,s=Art;s.length=0;let a=this._surface._tilesToRender,l=a.length,u,f;for(f=0;f<l;++f){u=a[f];let m=u.data;if(!c(m))continue;let p=m.pickBoundingSphere;if(o!==J.SCENE3D)m.pickBoundingSphere=p=ne.fromRectangleWithHeights2D(u.rectangle,r,m.tileBoundingRegion.minimumHeight,m.tileBoundingRegion.maximumHeight,p),d.fromElements(p.center.z,p.center.x,p.center.y,p.center);else if(c(m.renderedMesh))ne.clone(m.tileBoundingRegion.boundingSphere,p);else continue;let _=Yn.raySphere(e,p,vrt);c(_)&&s.push(m)}s.sort(Srt(e.origin));let h;for(l=s.length,f=0;f<l&&(h=s[f].pick(e,t.mode,t.mapProjection,n,i),!c(h));++f);return h};var Drt=new re;Md.prototype.pick=function(e,t,n){if(n=this.pickWorldCoordinates(e,t,!0,n),c(n)&&t.mode!==J.SCENE3D){n=d.fromElements(n.y,n.z,n.x,n);let i=t.mapProjection.unproject(n,Drt);n=this._ellipsoid.cartographicToCartesian(i,n)}return n};var Irt=new d,Mpe=new d,Ort=new re,Prt=new mn;function aY(e,t){return c(e)&&te.contains(e.rectangle,t)?e:void 0}Md.prototype.getHeight=function(e){if(!c(e))throw new w("cartographic is required");let t=this._surface._levelZeroTiles;if(!c(t))return;let n,i,o=t.length;for(i=0;i<o&&(n=t[i],!te.contains(n.rectangle,e));++i);if(i>=o)return;let r=n;for(;c(n);)n=aY(n._southwestChild,e)||aY(n._southeastChild,e)||aY(n._northwestChild,e)||n._northeastChild,c(n)&&c(n.data)&&c(n.data.renderedMesh)&&(r=n);if(n=r,!c(n)||!c(n.data)||!c(n.data.renderedMesh))return;let s=this._surface._tileProvider.tilingScheme.projection,a=this._surface._tileProvider.tilingScheme.ellipsoid,l=d.fromRadians(e.longitude,e.latitude,0,a,Irt),u=Prt,f=a.geodeticSurfaceNormal(l,u.direction),h=a.getSurfaceNormalIntersectionWithZAxis(l,11500,u.origin);if(!c(h)){let p;c(n.data.tileBoundingRegion)&&(p=n.data.tileBoundingRegion.minimumHeight);let _=Math.min(g(p,0),-11500),b=d.multiplyByScalar(f,Math.abs(_)+1,Mpe);d.subtract(l,b,u.origin)}let m=n.data.pick(u,void 0,s,!1,Mpe);if(c(m))return a.cartesianToCartographic(m,Ort).height};Md.prototype.update=function(e){this.show&&e.passes.render&&this._surface.update(e)};Md.prototype.beginFrame=function(e){let t=this._surface,n=t.tileProvider,i=this.terrainProvider,o=c(i)&&i.hasWaterMask&&i.hasWaterMask;if(o&&this._oceanNormalMapResourceDirty){this._oceanNormalMapResourceDirty=!1;let a=this._oceanNormalMapResource,l=a.url;if(c(l)){let u=this;a.fetchImage().then(function(f){l===u._oceanNormalMapResource.url&&(u._oceanNormalMap=u._oceanNormalMap&&u._oceanNormalMap.destroy(),u._oceanNormalMap=new Ot({context:e.context,source:f}))})}else this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy()}let r=e.passes,s=e.mode;r.render&&(this.showGroundAtmosphere?this._zoomedOutOceanSpecularIntensity=.4:this._zoomedOutOceanSpecularIntensity=.5,t.maximumScreenSpaceError=this.maximumScreenSpaceError,t.tileCacheSize=this.tileCacheSize,t.loadingDescendantLimit=this.loadingDescendantLimit,t.preloadAncestors=this.preloadAncestors,t.preloadSiblings=this.preloadSiblings,n.terrainProvider=this.terrainProvider,n.lightingFadeOutDistance=this.lightingFadeOutDistance,n.lightingFadeInDistance=this.lightingFadeInDistance,n.nightFadeOutDistance=this.nightFadeOutDistance,n.nightFadeInDistance=this.nightFadeInDistance,n.zoomedOutOceanSpecularIntensity=s===J.SCENE3D?this._zoomedOutOceanSpecularIntensity:0,n.hasWaterMask=o,n.showWaterEffect=this.showWaterEffect,n.oceanNormalMap=this._oceanNormalMap,n.enableLighting=this.enableLighting,n.dynamicAtmosphereLighting=this.dynamicAtmosphereLighting,n.dynamicAtmosphereLightingFromSun=this.dynamicAtmosphereLightingFromSun,n.showGroundAtmosphere=this.showGroundAtmosphere,n.atmosphereLightIntensity=this.atmosphereLightIntensity,n.atmosphereRayleighCoefficient=this.atmosphereRayleighCoefficient,n.atmosphereMieCoefficient=this.atmosphereMieCoefficient,n.atmosphereRayleighScaleHeight=this.atmosphereRayleighScaleHeight,n.atmosphereMieScaleHeight=this.atmosphereMieScaleHeight,n.atmosphereMieAnisotropy=this.atmosphereMieAnisotropy,n.shadows=this.shadows,n.hueShift=this.atmosphereHueShift,n.saturationShift=this.atmosphereSaturationShift,n.brightnessShift=this.atmosphereBrightnessShift,n.fillHighlightColor=this.fillHighlightColor,n.showSkirts=this.showSkirts,n.backFaceCulling=this.backFaceCulling,n.vertexShadowDarkness=this.vertexShadowDarkness,n.undergroundColor=this._undergroundColor,n.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance,n.lambertDiffuseMultiplier=this.lambertDiffuseMultiplier,t.beginFrame(e))};Md.prototype.render=function(e){this.show&&(c(this._material)&&this._material.update(e.context),this._surface.render(e))};Md.prototype.endFrame=function(e){this.show&&e.passes.render&&this._surface.endFrame(e)};Md.prototype.isDestroyed=function(){return!1};Md.prototype.destroy=function(){return this._surfaceShaderSet=this._surfaceShaderSet&&this._surfaceShaderSet.destroy(),this._surface=this._surface&&this._surface.destroy(),this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy(),ue(this)};var rz=Md;function Rrt(e,t,n,i){this.rightAscension=e,this.declination=t,this.rotation=n,this.rotationRate=i}var sz=Rrt;var Ype={},Mrt=32.184,Lrt=2451545,Lpe=-.0529921,Npe=-.1059842,Fpe=13.0120009,Bpe=13.3407154,kpe=.9856003,Upe=26.4057084,zpe=13.064993,Vpe=.3287146,Hpe=1.7484877,Gpe=-.1589763,jpe=.0036096,Wpe=.1643573,qpe=12.9590088,lY=new K;Ype.ComputeMoon=function(e,t){c(e)||(e=K.now()),lY=K.addSeconds(e,Mrt,lY);let n=K.totalDays(lY)-Lrt,i=n/Vn.DAYS_PER_JULIAN_CENTURY,o=(125.045+Lpe*n)*O.RADIANS_PER_DEGREE,r=(250.089+Npe*n)*O.RADIANS_PER_DEGREE,s=(260.008+Fpe*n)*O.RADIANS_PER_DEGREE,a=(176.625+Bpe*n)*O.RADIANS_PER_DEGREE,l=(357.529+kpe*n)*O.RADIANS_PER_DEGREE,u=(311.589+Upe*n)*O.RADIANS_PER_DEGREE,f=(134.963+zpe*n)*O.RADIANS_PER_DEGREE,h=(276.617+Vpe*n)*O.RADIANS_PER_DEGREE,m=(34.226+Hpe*n)*O.RADIANS_PER_DEGREE,p=(15.134+Gpe*n)*O.RADIANS_PER_DEGREE,_=(119.743+jpe*n)*O.RADIANS_PER_DEGREE,b=(239.961+Wpe*n)*O.RADIANS_PER_DEGREE,x=(25.053+qpe*n)*O.RADIANS_PER_DEGREE,T=Math.sin(o),E=Math.sin(r),S=Math.sin(s),A=Math.sin(a),v=Math.sin(l),D=Math.sin(u),R=Math.sin(f),P=Math.sin(h),L=Math.sin(m),F=Math.sin(p),y=Math.sin(_),I=Math.sin(b),M=Math.sin(x),B=Math.cos(o),U=Math.cos(r),V=Math.cos(s),W=Math.cos(a),H=Math.cos(l),X=Math.cos(u),$=Math.cos(f),ae=Math.cos(h),se=Math.cos(m),he=Math.cos(p),ge=Math.cos(_),le=Math.cos(b),me=Math.cos(x),Me=(269.9949+.0031*i-3.8787*T-.1204*E+.07*S-.0172*A+.0072*D-.0052*F+.0043*M)*O.RADIANS_PER_DEGREE,Ge=(66.5392+.013*i+1.5419*B+.0239*U-.0278*V+.0068*W-.0029*X+9e-4*$+8e-4*he-9e-4*me)*O.RADIANS_PER_DEGREE,De=(38.3213+13.17635815*n-14e-13*n*n+3.561*T+.1208*E-.0642*S+.0158*A+.0252*v-.0066*D-.0047*R-.0046*P+.0028*L+.0052*F+.004*y+.0019*I-.0044*M)*O.RADIANS_PER_DEGREE,ke=(13.17635815-14e-13*(2*n)+3.561*B*Lpe+.1208*U*Npe-.0642*V*Fpe+.0158*W*Bpe+.0252*H*kpe-.0066*X*Upe-.0047*$*zpe-.0046*ae*Vpe+.0028*se*Hpe+.0052*he*Gpe+.004*ge*jpe+.0019*le*Wpe-.0044*me*qpe)/86400*O.RADIANS_PER_DEGREE;return c(t)||(t=new sz),t.rightAscension=Me,t.declination=Ge,t.rotation=De,t.rotationRate=ke,t};var az=Ype;function Xpe(e){(!c(e)||typeof e!="function")&&(e=az.ComputeMoon),this._computeFunction=e}var Nrt=new d,Frt=new d,Brt=new d;function krt(e,t,n){let i=Nrt;i.x=Math.cos(e+O.PI_OVER_TWO),i.y=Math.sin(e+O.PI_OVER_TWO),i.z=0;let o=Math.cos(t),r=Brt;r.x=o*Math.cos(e),r.y=o*Math.sin(e),r.z=Math.sin(t);let s=d.cross(r,i,Frt);return c(n)||(n=new q),n[0]=i.x,n[1]=s.x,n[2]=r.x,n[3]=i.y,n[4]=s.y,n[5]=r.y,n[6]=i.z,n[7]=s.z,n[8]=r.z,n}var Urt=new q,zrt=new ve;Xpe.prototype.evaluate=function(e,t){c(e)||(e=K.now());let n=this._computeFunction(e),i=krt(n.rightAscension,n.declination,t),o=O.zeroToTwoPi(n.rotation),r=ve.fromAxisAngle(d.UNIT_Z,o,zrt),s=q.fromQuaternion(ve.conjugate(r,r),Urt);return q.multiply(s,i,i)};var cz=Xpe;var $D=`uniform vec3 u_radii;
| uniform vec3 u_oneOverEllipsoidRadiiSquared;
|
| in vec3 v_positionEC;
|
| vec4 computeEllipsoidColor(czm_ray ray, float intersection, float side)
| {
| vec3 positionEC = czm_pointAlongRay(ray, intersection);
| vec3 positionMC = (czm_inverseModelView * vec4(positionEC, 1.0)).xyz;
| vec3 geodeticNormal = normalize(czm_geodeticSurfaceNormal(positionMC, vec3(0.0), u_oneOverEllipsoidRadiiSquared));
| vec3 sphericalNormal = normalize(positionMC / u_radii);
| vec3 normalMC = geodeticNormal * side; // normalized surface normal (always facing the viewer) in model coordinates
| vec3 normalEC = normalize(czm_normal * normalMC); // normalized surface normal in eye coordinates
|
| vec2 st = czm_ellipsoidTextureCoordinates(sphericalNormal);
| vec3 positionToEyeEC = -positionEC;
|
| czm_materialInput materialInput;
| materialInput.s = st.s;
| materialInput.st = st;
| materialInput.str = (positionMC + u_radii) / u_radii;
| materialInput.normalEC = normalEC;
| materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);
| materialInput.positionToEyeEC = positionToEyeEC;
| czm_material material = czm_getMaterial(materialInput);
|
| #ifdef ONLY_SUN_LIGHTING
| return czm_private_phong(normalize(positionToEyeEC), material, czm_sunDirectionEC);
| #else
| return czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
| #endif
| }
|
| void main()
| {
| // PERFORMANCE_TODO: When dynamic branching is available, compute ratio of maximum and minimum radii
| // in the vertex shader. Only when it is larger than some constant, march along the ray.
| // Otherwise perform one intersection test which will be the common case.
|
| // Test if the ray intersects a sphere with the ellipsoid's maximum radius.
| // For very oblate ellipsoids, using the ellipsoid's radii for an intersection test
| // may cause false negatives. This will discard fragments before marching the ray forward.
| float maxRadius = max(u_radii.x, max(u_radii.y, u_radii.z)) * 1.5;
| vec3 direction = normalize(v_positionEC);
| vec3 ellipsoidCenter = czm_modelView[3].xyz;
|
| float t1 = -1.0;
| float t2 = -1.0;
|
| float b = -2.0 * dot(direction, ellipsoidCenter);
| float c = dot(ellipsoidCenter, ellipsoidCenter) - maxRadius * maxRadius;
|
| float discriminant = b * b - 4.0 * c;
| if (discriminant >= 0.0) {
| t1 = (-b - sqrt(discriminant)) * 0.5;
| t2 = (-b + sqrt(discriminant)) * 0.5;
| }
|
| if (t1 < 0.0 && t2 < 0.0) {
| discard;
| }
|
| float t = min(t1, t2);
| if (t < 0.0) {
| t = 0.0;
| }
|
| // March ray forward to intersection with larger sphere and find
| czm_ray ray = czm_ray(t * direction, direction);
|
| vec3 ellipsoid_inverseRadii = vec3(1.0 / u_radii.x, 1.0 / u_radii.y, 1.0 / u_radii.z);
|
| czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);
|
| if (czm_isEmpty(intersection))
| {
| discard;
| }
|
| // If the viewer is outside, compute outsideFaceColor, with normals facing outward.
| vec4 outsideFaceColor = (intersection.start != 0.0) ? computeEllipsoidColor(ray, intersection.start, 1.0) : vec4(0.0);
|
| // If the viewer either is inside or can see inside, compute insideFaceColor, with normals facing inward.
| vec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);
|
| out_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);
| out_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);
|
| #if (defined(WRITE_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
| t = (intersection.start != 0.0) ? intersection.start : intersection.stop;
| vec3 positionEC = czm_pointAlongRay(ray, t);
| vec4 positionCC = czm_projection * vec4(positionEC, 1.0);
| #ifdef LOG_DEPTH
| czm_writeLogDepth(1.0 + positionCC.w);
| #else
| float z = positionCC.z / positionCC.w;
|
| float n = czm_depthRange.near;
| float f = czm_depthRange.far;
|
| gl_FragDepth = (z * (f - n) + f + n) * 0.5;
| #endif
| #endif
| }
| `;var ZD=`in vec3 position;
|
| uniform vec3 u_radii;
|
| out vec3 v_positionEC;
|
| void main()
| {
| // In the vertex data, the cube goes from (-1.0, -1.0, -1.0) to (1.0, 1.0, 1.0) in model coordinates.
| // Scale to consider the radii. We could also do this once on the CPU when using the BoxGeometry,
| // but doing it here allows us to change the radii without rewriting the vertex data, and
| // allows all ellipsoids to reuse the same vertex data.
| vec4 p = vec4(u_radii * position, 1.0);
|
| v_positionEC = (czm_modelView * p).xyz; // position in eye coordinates
| gl_Position = czm_modelViewProjection * p; // position in clip coordinates
|
| // With multi-frustum, when the ellipsoid primitive is positioned on the intersection of two frustums
| // and close to terrain, the terrain (writes depth) in the closest frustum can overwrite part of the
| // ellipsoid (does not write depth) that was rendered in the farther frustum.
| //
| // Here, we clamp the depth in the vertex shader to avoid being overwritten; however, this creates
| // artifacts since some fragments can be alpha blended twice. This is solved by only rendering
| // the ellipsoid in the closest frustum to the viewer.
| gl_Position.z = clamp(gl_Position.z, czm_depthRange.near, czm_depthRange.far);
|
| czm_vertexLogDepth();
| }
| `;var uY={position:0};function lz(e){e=g(e,g.EMPTY_OBJECT),this.center=d.clone(g(e.center,d.ZERO)),this._center=new d,this.radii=d.clone(e.radii),this._radii=new d,this._oneOverEllipsoidRadiiSquared=new d,this._boundingSphere=new ne,this.modelMatrix=N.clone(g(e.modelMatrix,N.IDENTITY)),this._modelMatrix=new N,this._computedModelMatrix=new N,this.show=g(e.show,!0),this.material=g(e.material,Vi.fromType(Vi.ColorType)),this._material=void 0,this._translucent=void 0,this.id=e.id,this._id=void 0,this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.onlySunLighting=g(e.onlySunLighting,!1),this._onlySunLighting=!1,this._depthTestEnabled=g(e.depthTestEnabled,!0),this._useLogDepth=!1,this._sp=void 0,this._rs=void 0,this._va=void 0,this._pickSP=void 0,this._pickId=void 0,this._colorCommand=new Ke({owner:g(e._owner,this)}),this._pickCommand=new Ke({owner:g(e._owner,this),pickOnly:!0});let t=this;this._uniforms={u_radii:function(){return t.radii},u_oneOverEllipsoidRadiiSquared:function(){return t._oneOverEllipsoidRadiiSquared}},this._pickUniforms={czm_pickColor:function(){return t._pickId.color}}}function Vrt(e){let t=e.cache.ellipsoidPrimitive_vertexArray;if(c(t))return t;let n=Ia.createGeometry(Ia.fromDimensions({dimensions:new d(2,2,2),vertexFormat:Ce.POSITION_ONLY}));return t=Zn.fromGeometry({context:e,geometry:n,attributeLocations:uY,bufferUsage:Pe.STATIC_DRAW,interleave:!0}),e.cache.ellipsoidPrimitive_vertexArray=t,t}lz.prototype.update=function(e){if(!this.show||e.mode!==J.SCENE3D||!c(this.center)||!c(this.radii))return;if(!c(this.material))throw new w("this.material must be defined.");let t=e.context,n=this.material.isTranslucent(),i=this._translucent!==n;(!c(this._rs)||i)&&(this._translucent=n,this._rs=Fe.fromCache({cull:{enabled:!0,face:pi.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!n&&t.fragmentDepth,blending:n?cn.ALPHA_BLEND:void 0})),c(this._va)||(this._va=Vrt(t));let o=!1,r=this.radii;if(!d.equals(this._radii,r)){d.clone(r,this._radii);let b=this._oneOverEllipsoidRadiiSquared;b.x=1/(r.x*r.x),b.y=1/(r.y*r.y),b.z=1/(r.z*r.z),o=!0}(!N.equals(this.modelMatrix,this._modelMatrix)||!d.equals(this.center,this._center))&&(N.clone(this.modelMatrix,this._modelMatrix),d.clone(this.center,this._center),N.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),o=!0),o&&(d.clone(d.ZERO,this._boundingSphere.center),this._boundingSphere.radius=d.maximumComponent(r),ne.transform(this._boundingSphere,this._computedModelMatrix,this._boundingSphere));let s=this._material!==this.material;this._material=this.material,this._material.update(t);let a=this.onlySunLighting!==this._onlySunLighting;this._onlySunLighting=this.onlySunLighting;let l=e.useLogDepth,u=this._useLogDepth!==l;this._useLogDepth=l;let f=this._colorCommand,h,m;(s||a||i||u)&&(h=new Be({sources:[ZD]}),m=new Be({sources:[this.material.shaderSource,$D]}),this.onlySunLighting&&m.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&m.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),m.defines.push("LOG_DEPTH")),this._sp=en.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:h,fragmentShaderSource:m,attributeLocations:uY}),f.vertexArray=this._va,f.renderState=this._rs,f.shaderProgram=this._sp,f.uniformMap=bt(this._uniforms,this.material._uniforms),f.executeInClosestFrustum=n);let p=e.commandList,_=e.passes;if(_.render&&(f.boundingVolume=this._boundingSphere,f.debugShowBoundingVolume=this.debugShowBoundingVolume,f.modelMatrix=this._computedModelMatrix,f.pass=n?xe.TRANSLUCENT:xe.OPAQUE,p.push(f)),_.pick){let b=this._pickCommand;(!c(this._pickId)||this._id!==this.id)&&(this._id=this.id,this._pickId=this._pickId&&this._pickId.destroy(),this._pickId=t.createPickId({primitive:this,id:this.id})),(s||a||!c(this._pickSP)||u)&&(h=new Be({sources:[ZD]}),m=new Be({sources:[this.material.shaderSource,$D],pickColorQualifier:"uniform"}),this.onlySunLighting&&m.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&m.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),m.defines.push("LOG_DEPTH")),this._pickSP=en.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:h,fragmentShaderSource:m,attributeLocations:uY}),b.vertexArray=this._va,b.renderState=this._rs,b.shaderProgram=this._pickSP,b.uniformMap=bt(bt(this._uniforms,this._pickUniforms),this.material._uniforms),b.executeInClosestFrustum=n),b.boundingVolume=this._boundingSphere,b.modelMatrix=this._computedModelMatrix,b.pass=n?xe.TRANSLUCENT:xe.OPAQUE,p.push(b)}};lz.prototype.isDestroyed=function(){return!1};lz.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),ue(this)};var uz=lz;function JD(e){e=g(e,g.EMPTY_OBJECT);let t=e.textureUrl;c(t)||(t=Mi("Assets/Textures/moonSmall.jpg")),this.show=g(e.show,!0),this.textureUrl=t,this._ellipsoid=g(e.ellipsoid,Z.MOON),this.onlySunLighting=g(e.onlySunLighting,!0),this._ellipsoidPrimitive=new uz({radii:this.ellipsoid.radii,material:Vi.fromType(Vi.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new cz}Object.defineProperties(JD.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var fz=new q,Hrt=new q,Grt=new d,dz=[];JD.prototype.update=function(e){if(!this.show)return;let t=this._ellipsoidPrimitive;t.material.uniforms.image=this.textureUrl,t.onlySunLighting=this.onlySunLighting;let n=e.time;c(Lt.computeIcrfToFixedMatrix(n,fz))||Lt.computeTemeToPseudoFixedMatrix(n,fz);let i=this._axes.evaluate(n,Hrt);q.transpose(i,i),q.multiply(fz,i,i);let o=ob.computeMoonPositionInEarthInertialFrame(n,Grt);q.multiplyByVector(fz,o,o),N.fromRotationTranslation(i,o,t.modelMatrix);let r=e.commandList;return e.commandList=dz,dz.length=0,t.update(e),e.commandList=r,dz.length===1?dz[0]:void 0};JD.prototype.isDestroyed=function(){return!1};JD.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),ue(this)};var hz=JD;var fY=[],dY=[];function jrt(e,t,n,i,o,r){let s=o-i+1,a=r-o,l=fY,u=dY,f,h;for(f=0;f<s;++f)l[f]=e[i+f];for(h=0;h<a;++h)u[h]=e[o+h+1];f=0,h=0;for(let m=i;m<=r;++m){let p=l[f],_=u[h];f<s&&(h>=a||t(p,_,n)<=0)?(e[m]=p,++f):h<a&&(e[m]=_,++h)}}function hY(e,t,n,i,o){if(i>=o)return;let r=Math.floor((i+o)*.5);hY(e,t,n,i,r),hY(e,t,n,r+1,o),jrt(e,t,n,i,r,o)}function Wrt(e,t,n){if(!c(e))throw new w("array is required.");if(!c(t))throw new w("comparator is required.");let i=e.length,o=Math.ceil(i*.5);fY.length=o,dY.length=o,hY(e,t,n,0,i-1),fY.length=0,dY.length=0}var gy=Wrt;function Ya(e,t){if(!c(e))throw new w("occluderBoundingSphere is required.");if(!c(t))throw new w("camera position is required.");this._occluderPosition=d.clone(e.center),this._occluderRadius=e.radius,this._horizonDistance=0,this._horizonPlaneNormal=void 0,this._horizonPlanePosition=void 0,this._cameraPosition=void 0,this.cameraPosition=t}var mz=new d;Object.defineProperties(Ya.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){if(!c(e))throw new w("cameraPosition is required.");e=d.clone(e,this._cameraPosition);let t=d.subtract(this._occluderPosition,e,mz),n=d.magnitudeSquared(t),i=this._occluderRadius*this._occluderRadius,o,r,s;if(n>i){o=Math.sqrt(n-i),n=1/Math.sqrt(n),r=d.multiplyByScalar(t,n,mz);let a=o*o*n;s=d.add(e,d.multiplyByScalar(r,a,mz),mz)}else o=Number.MAX_VALUE;this._horizonDistance=o,this._horizonPlaneNormal=r,this._horizonPlanePosition=s,this._cameraPosition=e}}});Ya.fromBoundingSphere=function(e,t,n){if(!c(e))throw new w("occluderBoundingSphere is required.");if(!c(t))throw new w("camera position is required.");return c(n)?(d.clone(e.center,n._occluderPosition),n._occluderRadius=e.radius,n.cameraPosition=t,n):new Ya(e,t)};var $pe=new d;Ya.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){let t=d.subtract(e,this._occluderPosition,$pe),n=this._occluderRadius;if(n=d.magnitudeSquared(t)-n*n,n>0)return n=Math.sqrt(n)+this._horizonDistance,t=d.subtract(e,this._cameraPosition,t),n*n>d.magnitudeSquared(t)}return!1};var qrt=new d;Ya.prototype.isBoundingSphereVisible=function(e){let t=d.clone(e.center,qrt),n=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){let i=d.subtract(t,this._occluderPosition,$pe),o=this._occluderRadius-n;if(o=d.magnitudeSquared(i)-o*o,n<this._occluderRadius)return o>0?(o=Math.sqrt(o)+this._horizonDistance,i=d.subtract(t,this._cameraPosition,i),o*o+n*n>d.magnitudeSquared(i)):!1;if(o>0){i=d.subtract(t,this._cameraPosition,i);let r=d.magnitudeSquared(i),s=this._occluderRadius*this._occluderRadius,a=n*n;return(this._horizonDistance*this._horizonDistance+s)*a>r*s?!0:(o=Math.sqrt(o)+this._horizonDistance,o*o+a>r)}return!0}return!1};var Yrt=new d;Ya.prototype.computeVisibility=function(e){if(!c(e))throw new w("occludeeBS is required.");let t=d.clone(e.center),n=e.radius;if(n>this._occluderRadius)return pr.FULL;if(this._horizonDistance!==Number.MAX_VALUE){let i=d.subtract(t,this._occluderPosition,Yrt),o=this._occluderRadius-n,r=d.magnitudeSquared(i);if(o=r-o*o,o>0){o=Math.sqrt(o)+this._horizonDistance,i=d.subtract(t,this._cameraPosition,i);let s=d.magnitudeSquared(i);return o*o+n*n<s?pr.NONE:(o=this._occluderRadius+n,o=r-o*o,o>0?(o=Math.sqrt(o)+this._horizonDistance,s<o*o+n*n?pr.FULL:pr.PARTIAL):(i=d.subtract(t,this._horizonPlanePosition,i),d.dot(i,this._horizonPlaneNormal)>-n?pr.PARTIAL:pr.FULL))}}return pr.NONE};var pz=new d;Ya.computeOccludeePoint=function(e,t,n){if(!c(e))throw new w("occluderBoundingSphere is required.");if(!c(n))throw new w("positions is required.");if(n.length===0)throw new w("positions must contain at least one element");let i=d.clone(t),o=d.clone(e.center),r=e.radius,s=n.length;if(d.equals(o,t))throw new w("occludeePosition must be different than occluderBoundingSphere.center");let a=d.normalize(d.subtract(i,o,pz),pz),l=-d.dot(a,o),u=Ya._anyRotationVector(o,a,l),f=Ya._horizonToPlaneNormalDotProduct(e,a,l,u,n[0]);if(!f)return;let h;for(let p=1;p<s;++p){if(h=Ya._horizonToPlaneNormalDotProduct(e,a,l,u,n[p]),!h)return;h<f&&(f=h)}if(f<.0017453283658983088)return;let m=r/f;return d.add(o,d.multiplyByScalar(a,m,pz),pz)};var Xrt=[];Ya.computeOccludeePointFromRectangle=function(e,t){if(!c(e))throw new w("rectangle is required.");t=g(t,Z.default);let n=te.subsample(e,t,0,Xrt),i=ne.fromPoints(n),o=d.ZERO;if(!d.equals(o,i.center))return Ya.computeOccludeePoint(new ne(o,t.minimumRadius),i.center,n)};var Krt=new d;Ya._anyRotationVector=function(e,t,n){let i=d.abs(t,Krt),o=i.x>i.y?0:1;(o===0&&i.z>i.x||o===1&&i.z>i.y)&&(o=2);let r=new d,s;o===0?(i.x=e.x,i.y=e.y+1,i.z=e.z+1,s=d.UNIT_X):o===1?(i.x=e.x+1,i.y=e.y,i.z=e.z+1,s=d.UNIT_Y):(i.x=e.x+1,i.y=e.y+1,i.z=e.z,s=d.UNIT_Z);let a=(d.dot(t,i)+n)/-d.dot(t,s);return d.normalize(d.subtract(d.add(i,d.multiplyByScalar(s,a,r),i),e,i),i)};var $rt=new d;Ya._rotationVector=function(e,t,n,i,o){let r=d.subtract(i,e,$rt);if(r=d.normalize(r,r),d.dot(t,r)<.9999999847691291){let s=d.cross(t,r,r);if(d.magnitude(s)>O.EPSILON13)return d.normalize(s,new d)}return o};var mY=new d,Zrt=new d,_z=new d,Kpe=new d;Ya._horizonToPlaneNormalDotProduct=function(e,t,n,i,o){let r=d.clone(o,mY),s=d.clone(e.center,Zrt),a=e.radius,l=d.subtract(s,r,_z),u=d.magnitudeSquared(l),f=a*a;if(u<f)return!1;let h=u-f,m=Math.sqrt(h),_=1/Math.sqrt(u),x=m*_*m;l=d.normalize(l,l);let T=d.add(r,d.multiplyByScalar(l,x,Kpe),Kpe),E=Math.sqrt(h-x*x),S=this._rotationVector(s,t,n,r,i),A=d.fromElements(S.x*S.x*l.x+(S.x*S.y-S.z)*l.y+(S.x*S.z+S.y)*l.z,(S.x*S.y+S.z)*l.x+S.y*S.y*l.y+(S.y*S.z-S.x)*l.z,(S.x*S.z-S.y)*l.x+(S.y*S.z+S.x)*l.y+S.z*S.z*l.z,mY);A=d.normalize(A,A);let v=d.multiplyByScalar(A,E,mY);S=d.normalize(d.subtract(d.add(T,v,_z),s,_z),_z);let D=d.dot(t,S);S=d.normalize(d.subtract(d.subtract(T,v,S),s,S),S);let R=d.dot(t,S);return D<R?D:R};var gz=Ya;function cm(e){e=g(e,g.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=g(e.near,1),this._near=this.near,this.far=g(e.far,5e8),this._far=this.far,this._cullingVolume=new rs,this._perspectiveMatrix=new N,this._infinitePerspective=new N}function pY(e){if(!c(e.right)||!c(e.left)||!c(e.top)||!c(e.bottom)||!c(e.near)||!c(e.far))throw new w("right, left, top, bottom, near, or far parameters are not set.");let{top:t,bottom:n,right:i,left:o,near:r,far:s}=e;if(t!==e._top||n!==e._bottom||o!==e._left||i!==e._right||r!==e._near||s!==e._far){if(e.near<=0||e.near>e.far)throw new w("near must be greater than zero and less than far.");e._left=o,e._right=i,e._top=t,e._bottom=n,e._near=r,e._far=s,e._perspectiveMatrix=N.computePerspectiveOffCenter(o,i,n,t,r,s,e._perspectiveMatrix),e._infinitePerspective=N.computeInfinitePerspectiveOffCenter(o,i,n,t,r,e._infinitePerspective)}}Object.defineProperties(cm.prototype,{projectionMatrix:{get:function(){return pY(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return pY(this),this._infinitePerspective}}});var Jrt=new d,Qrt=new d,est=new d,tst=new d;cm.prototype.computeCullingVolume=function(e,t,n){if(!c(e))throw new w("position is required.");if(!c(t))throw new w("direction is required.");if(!c(n))throw new w("up is required.");let i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,l=this.near,u=this.far,f=d.cross(t,n,Jrt),h=Qrt;d.multiplyByScalar(t,l,h),d.add(e,h,h);let m=est;d.multiplyByScalar(t,u,m),d.add(e,m,m);let p=tst;d.multiplyByScalar(f,a,p),d.add(h,p,p),d.subtract(p,e,p),d.normalize(p,p),d.cross(p,n,p),d.normalize(p,p);let _=i[0];return c(_)||(_=i[0]=new ee),_.x=p.x,_.y=p.y,_.z=p.z,_.w=-d.dot(p,e),d.multiplyByScalar(f,s,p),d.add(h,p,p),d.subtract(p,e,p),d.cross(n,p,p),d.normalize(p,p),_=i[1],c(_)||(_=i[1]=new ee),_.x=p.x,_.y=p.y,_.z=p.z,_.w=-d.dot(p,e),d.multiplyByScalar(n,r,p),d.add(h,p,p),d.subtract(p,e,p),d.cross(f,p,p),d.normalize(p,p),_=i[2],c(_)||(_=i[2]=new ee),_.x=p.x,_.y=p.y,_.z=p.z,_.w=-d.dot(p,e),d.multiplyByScalar(n,o,p),d.add(h,p,p),d.subtract(p,e,p),d.cross(p,f,p),d.normalize(p,p),_=i[3],c(_)||(_=i[3]=new ee),_.x=p.x,_.y=p.y,_.z=p.z,_.w=-d.dot(p,e),_=i[4],c(_)||(_=i[4]=new ee),_.x=t.x,_.y=t.y,_.z=t.z,_.w=-d.dot(t,h),d.negate(t,p),_=i[5],c(_)||(_=i[5]=new ee),_.x=p.x,_.y=p.y,_.z=p.z,_.w=-d.dot(p,m),this._cullingVolume};cm.prototype.getPixelDimensions=function(e,t,n,i,o){if(pY(this),!c(e)||!c(t))throw new w("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new w("drawingBufferWidth must be greater than zero.");if(t<=0)throw new w("drawingBufferHeight must be greater than zero.");if(!c(n))throw new w("distance is required.");if(!c(i))throw new w("pixelRatio is required");if(i<=0)throw new w("pixelRatio must be greater than zero.");if(!c(o))throw new w("A result object is required.");let r=1/this.near,s=this.top*r,a=2*i*n*s/t;s=this.right*r;let l=2*i*n*s/e;return o.x=l,o.y=a,o};cm.prototype.clone=function(e){return c(e)||(e=new cm),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};cm.prototype.equals=function(e){return c(e)&&e instanceof cm&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};cm.prototype.equalsEpsilon=function(e,t,n){return e===this||c(e)&&e instanceof cm&&O.equalsEpsilon(this.right,e.right,t,n)&&O.equalsEpsilon(this.left,e.left,t,n)&&O.equalsEpsilon(this.top,e.top,t,n)&&O.equalsEpsilon(this.bottom,e.bottom,t,n)&&O.equalsEpsilon(this.near,e.near,t,n)&&O.equalsEpsilon(this.far,e.far,t,n)};var gl=cm;function yl(e){e=g(e,g.EMPTY_OBJECT),this._offCenterFrustum=new gl,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=g(e.near,1),this._near=this.near,this.far=g(e.far,5e8),this._far=this.far,this.xOffset=g(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=g(e.yOffset,0),this._yOffset=this.yOffset}yl.packedLength=6;yl.pack=function(e,t,n){return C.typeOf.object("value",e),C.defined("array",t),n=g(n,0),t[n++]=e.fov,t[n++]=e.aspectRatio,t[n++]=e.near,t[n++]=e.far,t[n++]=e.xOffset,t[n]=e.yOffset,t};yl.unpack=function(e,t,n){return C.defined("array",e),t=g(t,0),c(n)||(n=new yl),n.fov=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t++],n.xOffset=e[t++],n.yOffset=e[t],n};function Ld(e){if(!c(e.fov)||!c(e.aspectRatio)||!c(e.near)||!c(e.far))throw new w("fov, aspectRatio, near, or far parameters are not set.");if(!(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset))return;if(C.typeOf.number.greaterThanOrEquals("fov",e.fov,0),C.typeOf.number.lessThan("fov",e.fov,Math.PI),C.typeOf.number.greaterThanOrEquals("aspectRatio",e.aspectRatio,0),C.typeOf.number.greaterThanOrEquals("near",e.near,0),e.near>e.far)throw new w("near must be less than far.");e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:Math.atan(Math.tan(e.fov*.5)/e.aspectRatio)*2,e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset;let n=e._offCenterFrustum;n.top=e.near*Math.tan(.5*e._fovy),n.bottom=-n.top,n.right=e.aspectRatio*n.top,n.left=-n.right,n.near=e.near,n.far=e.far,n.right+=e.xOffset,n.left+=e.xOffset,n.top+=e.yOffset,n.bottom+=e.yOffset}Object.defineProperties(yl.prototype,{projectionMatrix:{get:function(){return Ld(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return Ld(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return Ld(this),this._fovy}},sseDenominator:{get:function(){return Ld(this),this._sseDenominator}},offCenterFrustum:{get:function(){return Ld(this),this._offCenterFrustum}}});yl.prototype.computeCullingVolume=function(e,t,n){return Ld(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};yl.prototype.getPixelDimensions=function(e,t,n,i,o){return Ld(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};yl.prototype.clone=function(e){return c(e)||(e=new yl),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};yl.prototype.equals=function(e){return!c(e)||!(e instanceof yl)?!1:(Ld(this),Ld(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};yl.prototype.equalsEpsilon=function(e,t,n){return!c(e)||!(e instanceof yl)?!1:(Ld(this),Ld(e),O.equalsEpsilon(this.fov,e.fov,t,n)&&O.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var bi=yl;var yz=`in vec2 v_textureCoordinates;
| const float M_PI = 3.141592653589793;
|
| float vdcRadicalInverse(int i)
| {
| float r;
| float base = 2.0;
| float value = 0.0;
| float invBase = 1.0 / base;
| float invBi = invBase;
| for (int x = 0; x < 100; x++)
| {
| if (i <= 0)
| {
| break;
| }
| r = mod(float(i), base);
| value += r * invBi;
| invBi *= invBase;
| i = int(float(i) * invBase);
| }
| return value;
| }
|
| vec2 hammersley2D(int i, int N)
| {
| return vec2(float(i) / float(N), vdcRadicalInverse(i));
| }
|
| vec3 importanceSampleGGX(vec2 xi, float alphaRoughness, vec3 N)
| {
| float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
| float phi = 2.0 * M_PI * xi.x;
| float cosTheta = sqrt((1.0 - xi.y) / (1.0 + (alphaRoughnessSquared - 1.0) * xi.y));
| float sinTheta = sqrt(1.0 - cosTheta * cosTheta);
| vec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);
| vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
| vec3 tangentX = normalize(cross(upVector, N));
| vec3 tangentY = cross(N, tangentX);
| return tangentX * H.x + tangentY * H.y + N * H.z;
| }
|
| /**
| * Estimate the geometric self-shadowing of the microfacets in a surface,
| * using the Smith Joint GGX visibility function.
| * Note: Vis = G / (4 * NdotL * NdotV)
| * see Eric Heitz. 2014. Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs. Journal of Computer Graphics Techniques, 3
| * see Real-Time Rendering. Page 331 to 336.
| * see https://google.github.io/filament/Filament.md.html#materialsystem/specularbrdf/geometricshadowing(specularg)
| *
| * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
| * @param {float} NdotL The cosine of the angle between the surface normal and the direction to the light source.
| * @param {float} NdotV The cosine of the angle between the surface normal and the direction to the camera.
| */
| float smithVisibilityGGX(float alphaRoughness, float NdotL, float NdotV)
| {
| float alphaRoughnessSq = alphaRoughness * alphaRoughness;
|
| float GGXV = NdotL * sqrt(NdotV * NdotV * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
| float GGXL = NdotV * sqrt(NdotL * NdotL * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
|
| float GGX = GGXV + GGXL; // 2.0 if NdotL = NdotV = 1.0
| if (GGX > 0.0)
| {
| return 0.5 / GGX; // 1/4 if NdotL = NdotV = 1.0
| }
| return 0.0;
| }
|
| vec2 integrateBrdf(float roughness, float NdotV)
| {
| vec3 V = vec3(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);
| float A = 0.0;
| float B = 0.0;
| const int NumSamples = 1024;
| float alphaRoughness = roughness * roughness;
| for (int i = 0; i < NumSamples; i++)
| {
| vec2 xi = hammersley2D(i, NumSamples);
| vec3 H = importanceSampleGGX(xi, alphaRoughness, vec3(0.0, 0.0, 1.0));
| vec3 L = 2.0 * dot(V, H) * H - V;
| float NdotL = clamp(L.z, 0.0, 1.0);
| float NdotH = clamp(H.z, 0.0, 1.0);
| float VdotH = clamp(dot(V, H), 0.0, 1.0);
| if (NdotL > 0.0)
| {
| float G = smithVisibilityGGX(alphaRoughness, NdotL, NdotV);
| float G_Vis = 4.0 * G * VdotH * NdotL / NdotH;
| float Fc = pow(1.0 - VdotH, 5.0);
| A += (1.0 - Fc) * G_Vis;
| B += Fc * G_Vis;
| }
| }
| return vec2(A, B) / float(NumSamples);
| }
|
| void main()
| {
| out_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);
| }
| `;function QD(){this._colorTexture=void 0,this._drawCommand=void 0}Object.defineProperties(QD.prototype,{colorTexture:{get:function(){return this._colorTexture}}});function nst(e,t,n){let i=t.createViewportQuadCommand(yz,{framebuffer:n,renderState:Fe.fromCache({viewport:new je(0,0,256,256)})});e._drawCommand=i}QD.prototype.update=function(e){if(!c(this._colorTexture)){let t=e.context,n=new Ot({context:t,width:256,height:256,pixelFormat:Re.RGBA,pixelDatatype:Ne.UNSIGNED_BYTE,sampler:Jt.NEAREST});this._colorTexture=n;let i=new Lr({context:t,colorTextures:[n],destroyAttachments:!1});nst(this,t,i),this._drawCommand.execute(t),i.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy()}};QD.prototype.isDestroyed=function(){return!1};QD.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),ue(this)};var bz=QD;var e_e={};function ist(e,t,n){let i,o,r;if(e instanceof bi){let s=Math.tan(.5*e.fovy);return i=e.near,o=e.near*s,r=e.aspectRatio*o,Math.max(t*i/r,n*i/o)}else if(e instanceof gl)return i=e.near,o=e.top,r=e.right,Math.max(t*i/r,n*i/o);return Math.max(t,n)}var ost=new d,Zpe=new d;function t_e(e,t,n,i){if(c(i)&&n(.5)>i){let o=n(0),r=n(1),s=n(.5),a=s-o,l=s-r;return function(u){let f=n(u);if(u<=.5){let m=(f-o)/a;return O.lerp(e,-O.PI_OVER_TWO,m)}let h=(f-r)/l;return O.lerp(-O.PI_OVER_TWO,t,1-h)}}return function(o){return O.lerp(e,t,o)}}function gY(e,t,n,i,o){let r=o,s=Math.max(n,i);if(!c(r)){let a=e.position,l=t,u=e.up,f=e.right,h=e.frustum,m=d.subtract(a,l,ost),p=d.magnitude(d.multiplyByScalar(u,d.dot(m,u),Zpe)),_=d.magnitude(d.multiplyByScalar(f,d.dot(m,f),Zpe));r=Math.min(ist(h,p,_)*.2,1e9)}if(s<r){let u=-Math.pow((r-n)*1e6,.125),f=Math.pow((r-i)*1e6,1/8);return function(h){let m=h*(f-u)+u;return-Math.pow(m,8)/1e6+r}}return function(a){return O.lerp(n,i,a)}}function eI(e,t){return O.equalsEpsilon(e,O.TWO_PI,O.EPSILON11)&&(e=0),t>e+Math.PI?e+=O.TWO_PI:t<e-Math.PI&&(e-=O.TWO_PI),e}var n_e=new d;function rst(e,t,n,i,o,r,s,a){let l=e.camera,u=d.clone(l.position,n_e),f=l.pitch,h=eI(l.heading,i),m=eI(l.roll,r),p=gY(l,n,u.z,n.z,s),_=t_e(f,o,p,a);function b(x){let T=x.time/t;l.setView({orientation:{heading:O.lerp(h,i,T),pitch:_(T),roll:O.lerp(m,r,T)}}),k.lerp(u,n,T,l.position),l.position.z=p(T)}return b}function sst(e,t){e.longitude<t.longitude?e.longitude+=O.TWO_PI:t.longitude+=O.TWO_PI}function ast(e,t){let n=e.longitude-t.longitude;n<-O.PI?e.longitude+=O.TWO_PI:n>O.PI&&(t.longitude+=O.TWO_PI)}var cst=new re,lst=new re;function ust(e,t,n,i,o,r,s,a,l,u){let f=e.camera,m=e.mapProjection.ellipsoid,p=re.clone(f.positionCartographic,cst),_=f.pitch,b=eI(f.heading,i),x=eI(f.roll,r),T=m.cartesianToCartographic(n,lst);p.longitude=O.zeroToTwoPi(p.longitude),T.longitude=O.zeroToTwoPi(T.longitude);let E=!1;if(c(a)){let D=O.zeroToTwoPi(a),R=Math.min(p.longitude,T.longitude),P=Math.max(p.longitude,T.longitude),L=D>=R&&D<=P;if(c(l)){let F=Math.abs(p.longitude-T.longitude),y=O.TWO_PI-F;(L?F:y)<(L?y:F)*l&&!L&&(E=!0)}else L||(E=!0)}E?sst(p,T):ast(p,T);let S=gY(f,n,p.height,T.height,s),A=t_e(_,o,S,u);function v(){let D=p.longitude,R=T.longitude,P=p.latitude,L=T.latitude;return function(y){let I=y.time/t,M=d.fromRadians(O.lerp(D,R,I),O.lerp(P,L,I),S(I),m);f.setView({destination:M,orientation:{heading:O.lerp(b,i,I),pitch:A(I),roll:O.lerp(x,r,I)}})}}return v()}function fst(e,t,n,i,o,r,s){let a=e.camera,l=d.clone(a.position,n_e),u=eI(a.heading,i),f=a.frustum.right-a.frustum.left,h=gY(a,n,f,n.z,s);function m(p){let _=p.time/t;a.setView({orientation:{heading:O.lerp(u,i,_)}}),k.lerp(l,n,_,a.position);let b=h(_),x=a.frustum,T=x.top/x.right,E=(b-(x.right-x.left))*.5;x.right+=E,x.left-=E,x.top=T*x.right,x.bottom=-x.top}return m}var Jpe=new re,dst=new d;function _Y(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function Qpe(e,t){function n(){typeof t=="function"&&t(),e.enableInputs=!0}return n}e_e.createTween=function(e,t){t=g(t,g.EMPTY_OBJECT);let n=t.destination;if(!c(e))throw new w("scene is required.");if(!c(n))throw new w("destination is required.");let i=e.mode;if(i===J.MORPHING)return _Y();let o=g(t.convert,!0),r=e.mapProjection,s=r.ellipsoid,a=t.maximumHeight,l=t.flyOverLongitude,u=t.flyOverLongitudeWeight,f=t.pitchAdjustHeight,h=t.easingFunction;o&&i!==J.SCENE3D&&(s.cartesianToCartographic(n,Jpe),n=r.project(Jpe,dst));let m=e.camera,p=t.endTransform;c(p)&&m._setTransform(p);let _=t.duration;c(_)||(_=Math.ceil(d.distance(m.position,n)/1e6)+2,_=Math.min(_,3));let b=g(t.heading,0),x=g(t.pitch,-O.PI_OVER_TWO),T=g(t.roll,0),E=e.screenSpaceCameraController;E.enableInputs=!1;let S=Qpe(E,t.complete),A=Qpe(E,t.cancel),v=m.frustum,D=e.mode===J.SCENE2D;if(D=D&&k.equalsEpsilon(m.position,n,O.EPSILON6),D=D&&O.equalsEpsilon(Math.max(v.right-v.left,v.top-v.bottom),n.z,O.EPSILON6),D=D||e.mode!==J.SCENE2D&&d.equalsEpsilon(n,m.position,O.EPSILON10),D=D&&O.equalsEpsilon(O.negativePiToPi(b),O.negativePiToPi(m.heading),O.EPSILON10)&&O.equalsEpsilon(O.negativePiToPi(x),O.negativePiToPi(m.pitch),O.EPSILON10)&&O.equalsEpsilon(O.negativePiToPi(T),O.negativePiToPi(m.roll),O.EPSILON10),D)return _Y(S,A);let R=new Array(4);if(R[J.SCENE2D]=fst,R[J.SCENE3D]=ust,R[J.COLUMBUS_VIEW]=rst,_<=0)return _Y(function(){R[i](e,1,n,b,x,T,a,l,u,f)({time:1}),typeof S=="function"&&S()},A);let P=R[i](e,_,n,b,x,T,a,l,u,f);if(!c(h)){let L=m.positionCartographic.height,F=i===J.SCENE3D?s.cartesianToCartographic(n).height:n.z;L>F&&L>11500?h=Ps.CUBIC_OUT:h=Ps.QUINTIC_IN_OUT}return{duration:_,easingFunction:h,startObject:{time:0},stopObject:{time:_},update:P,complete:S,cancel:A}};var xz=e_e;var hst={ROTATE:0,INFINITE_SCROLL:1},fu=Object.freeze(hst);function Qt(e){if(!c(e))throw new w("scene is required.");this._scene=e,this._transform=N.clone(N.IDENTITY),this._invTransform=N.clone(N.IDENTITY),this._actualTransform=N.clone(N.IDENTITY),this._actualInvTransform=N.clone(N.IDENTITY),this._transformChanged=!1,this.position=new d,this._position=new d,this._positionWC=new d,this._positionCartographic=new re,this._oldPositionWC=void 0,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.timeSinceMoved=0,this._lastMovedTimestamp=0,this.direction=new d,this._direction=new d,this._directionWC=new d,this.up=new d,this._up=new d,this._upWC=new d,this.right=new d,this._right=new d,this._rightWC=new d,this.frustum=new bi,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=O.toRadians(60),this.defaultMoveAmount=1e5,this.defaultLookAmount=Math.PI/60,this.defaultRotateAmount=Math.PI/3600,this.defaultZoomAmount=1e5,this.constrainedAxis=void 0,this.maximumZoomFactor=1.5,this._moveStart=new fe,this._moveEnd=new fe,this._changed=new fe,this._changedPosition=void 0,this._changedDirection=void 0,this._changedFrustum=void 0,this._changedHeading=void 0,this._changedRoll=void 0,this.percentageChanged=.5,this._viewMatrix=new N,this._invViewMatrix=new N,u_e(this),this._mode=J.SCENE3D,this._modeChanged=!0;let t=e.mapProjection;this._projection=t,this._maxCoord=t.project(new re(Math.PI,O.PI_OVER_TWO)),this._max2Dfrustum=void 0,C_e(this,Qt.DEFAULT_VIEW_RECTANGLE,this.position,!0);let n=d.magnitude(this.position);n+=n*Qt.DEFAULT_VIEW_FACTOR,d.normalize(this.position,this.position),d.multiplyByScalar(this.position,n,this.position)}Qt.TRANSFORM_2D=new N(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);Qt.TRANSFORM_2D_INVERSE=N.inverseTransformation(Qt.TRANSFORM_2D,new N);Qt.DEFAULT_VIEW_RECTANGLE=te.fromDegrees(-95,-20,-70,90);Qt.DEFAULT_VIEW_FACTOR=.5;Qt.DEFAULT_OFFSET=new Cd(0,-O.PI_OVER_FOUR,0);function u_e(e){N.computeView(e._position,e._direction,e._up,e._right,e._viewMatrix),N.multiply(e._viewMatrix,e._actualInvTransform,e._viewMatrix),N.inverseTransformation(e._viewMatrix,e._invViewMatrix)}function mst(e){if(!c(e._oldPositionWC))e._oldPositionWC=d.clone(e.positionWC,e._oldPositionWC);else{e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude;let t=d.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC);e.positionWCDeltaMagnitude=d.magnitude(t),e._oldPositionWC=d.clone(e.positionWC,e._oldPositionWC),e.positionWCDeltaMagnitude>0?(e.timeSinceMoved=0,e._lastMovedTimestamp=yi()):e.timeSinceMoved=Math.max(yi()-e._lastMovedTimestamp,0)/1e3}}Qt.prototype.canPreloadFlight=function(){return c(this._currentFlight)&&this._mode!==J.SCENE2D};Qt.prototype._updateCameraChanged=function(){let e=this;if(mst(e),e._changed.numberOfListeners===0)return;let t=e.percentageChanged,n=e.heading;c(e._changedHeading)||(e._changedHeading=n);let i=Math.abs(e._changedHeading-n)%O.TWO_PI;i=i>O.PI?O.TWO_PI-i:i;let o=i/Math.PI;o>t&&(e._changedHeading=n);let r=e.roll;c(e._changedRoll)||(e._changedRoll=r);let s=Math.abs(e._changedRoll-r)%O.TWO_PI;s=s>O.PI?O.TWO_PI-s:s;let a=s/Math.PI;if(a>t&&(e._changedRoll=r),(a>t||o>t)&&e._changed.raiseEvent(Math.max(a,o)),e._mode===J.SCENE2D){if(!c(e._changedFrustum)){e._changedPosition=d.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone();return}let m=e.position,p=e._changedPosition,_=e.frustum,b=e._changedFrustum,x=m.x+_.left,T=m.x+_.right,E=p.x+b.left,S=p.x+b.right,A=m.y+_.bottom,v=m.y+_.top,D=p.y+b.bottom,R=p.y+b.top,P=Math.max(x,E),L=Math.min(T,S),F=Math.max(A,D),y=Math.min(v,R),I;if(P>=L||F>=v)I=1;else{let M=b;x<E&&T>S&&A<D&&v>R&&(M=_),I=1-(L-P)*(y-F)/((M.right-M.left)*(M.top-M.bottom))}I>t&&(e._changed.raiseEvent(I),e._changedPosition=d.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum));return}if(!c(e._changedDirection)){e._changedPosition=d.clone(e.positionWC,e._changedPosition),e._changedDirection=d.clone(e.directionWC,e._changedDirection);return}let l=O.acosClamped(d.dot(e.directionWC,e._changedDirection)),u;c(e.frustum.fovy)?u=l/(e.frustum.fovy*.5):u=l;let h=d.distance(e.positionWC,e._changedPosition)/e.positionCartographic.height;(u>t||h>t)&&(e._changed.raiseEvent(Math.max(u,h)),e._changedPosition=d.clone(e.positionWC,e._changedPosition),e._changedDirection=d.clone(e.directionWC,e._changedDirection))};function pst(e){Lt.basisTo2D(e._projection,e._transform,e._actualTransform)}var _st=new re,gst=new d,Tz=new d,yst=new ee,bst=new ee,xst=new ee,Tst=new ee,Cst=new ee;function Est(e){let t=e._projection,n=t.ellipsoid,i=N.getColumn(e._transform,3,yst),o=n.cartesianToCartographic(i,_st),r=t.project(o,gst),s=bst;s.x=r.z,s.y=r.x,s.z=r.y,s.w=1;let a=ee.clone(ee.UNIT_X,Cst),l=ee.add(N.getColumn(e._transform,0,Tz),i,Tz);n.cartesianToCartographic(l,o),t.project(o,r);let u=xst;u.x=r.z,u.y=r.x,u.z=r.y,u.w=0,d.subtract(u,s,u),u.x=0;let f=Tst;if(d.magnitudeSquared(u)>O.EPSILON10)d.cross(a,u,f);else{let h=ee.add(N.getColumn(e._transform,1,Tz),i,Tz);n.cartesianToCartographic(h,o),t.project(o,r),f.x=r.z,f.y=r.x,f.z=r.y,f.w=0,d.subtract(f,s,f),f.x=0,d.magnitudeSquared(f)<O.EPSILON10&&(ee.clone(ee.UNIT_Y,u),ee.clone(ee.UNIT_Z,f))}d.cross(f,a,u),d.normalize(u,u),d.cross(a,u,f),d.normalize(f,f),N.setColumn(e._actualTransform,0,u,e._actualTransform),N.setColumn(e._actualTransform,1,f,e._actualTransform),N.setColumn(e._actualTransform,2,a,e._actualTransform),N.setColumn(e._actualTransform,3,s,e._actualTransform)}var yY=new d;function Ka(e){let t=e._mode,n=!1,i=0;t===J.SCENE2D&&(i=e.frustum.right-e.frustum.left,n=i!==e._positionCartographic.height);let o=e._position,r=!d.equals(o,e.position)||n;r&&(o=d.clone(e.position,e._position));let s=e._direction,a=!d.equals(s,e.direction);a&&(d.normalize(e.direction,e.direction),s=d.clone(e.direction,e._direction));let l=e._up,u=!d.equals(l,e.up);u&&(d.normalize(e.up,e.up),l=d.clone(e.up,e._up));let f=e._right,h=!d.equals(f,e.right);h&&(d.normalize(e.right,e.right),f=d.clone(e.right,e._right));let m=e._transformChanged||e._modeChanged;e._transformChanged=!1,m&&(N.inverseTransformation(e._transform,e._invTransform),e._mode===J.COLUMBUS_VIEW||e._mode===J.SCENE2D?N.equals(N.IDENTITY,e._transform)?N.clone(Qt.TRANSFORM_2D,e._actualTransform):e._mode===J.COLUMBUS_VIEW?pst(e):Est(e):N.clone(e._transform,e._actualTransform),N.inverseTransformation(e._actualTransform,e._actualInvTransform),e._modeChanged=!1);let p=e._actualTransform;if(r||m)if(e._positionWC=N.multiplyByPoint(p,o,e._positionWC),t===J.SCENE3D||t===J.MORPHING)e._positionCartographic=e._projection.ellipsoid.cartesianToCartographic(e._positionWC,e._positionCartographic);else{let _=yY;_.x=e._positionWC.y,_.y=e._positionWC.z,_.z=e._positionWC.x,t===J.SCENE2D&&(_.z=i),e._projection.unproject(_,e._positionCartographic)}if(a||u||h){let _=d.dot(s,d.cross(l,f,yY));if(Math.abs(1-_)>O.EPSILON2){let b=1/d.magnitudeSquared(l),x=d.dot(l,s)*b,T=d.multiplyByScalar(s,x,yY);l=d.normalize(d.subtract(l,T,e._up),e._up),d.clone(l,e.up),f=d.cross(s,l,e._right),d.clone(f,e.right)}}(a||m)&&(e._directionWC=N.multiplyByPointAsVector(p,s,e._directionWC),d.normalize(e._directionWC,e._directionWC)),(u||m)&&(e._upWC=N.multiplyByPointAsVector(p,l,e._upWC),d.normalize(e._upWC,e._upWC)),(h||m)&&(e._rightWC=N.multiplyByPointAsVector(p,f,e._rightWC),d.normalize(e._rightWC,e._rightWC)),(r||a||u||h||m)&&u_e(e)}function f_e(e,t){let n;return O.equalsEpsilon(Math.abs(e.z),1,O.EPSILON3)?n=Math.atan2(t.y,t.x)-O.PI_OVER_TWO:n=Math.atan2(e.y,e.x)-O.PI_OVER_TWO,O.TWO_PI-O.zeroToTwoPi(n)}function d_e(e){return O.PI_OVER_TWO-O.acosClamped(e.z)}function h_e(e,t,n){let i=0;return O.equalsEpsilon(Math.abs(e.z),1,O.EPSILON3)||(i=Math.atan2(-n.z,t.z),i=O.zeroToTwoPi(i+O.TWO_PI)),i}var wz=new N,Sz=new N;Object.defineProperties(Qt.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return Ka(this),this._invTransform}},viewMatrix:{get:function(){return Ka(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return Ka(this),this._invViewMatrix}},positionCartographic:{get:function(){return Ka(this),this._positionCartographic}},positionWC:{get:function(){return Ka(this),this._positionWC}},directionWC:{get:function(){return Ka(this),this._directionWC}},upWC:{get:function(){return Ka(this),this._upWC}},rightWC:{get:function(){return Ka(this),this._rightWC}},heading:{get:function(){if(this._mode!==J.MORPHING){let e=this._projection.ellipsoid,t=N.clone(this._transform,wz),n=Lt.eastNorthUpToFixedFrame(this.positionWC,e,Sz);this._setTransform(n);let i=f_e(this.direction,this.up);return this._setTransform(t),i}}},pitch:{get:function(){if(this._mode!==J.MORPHING){let e=this._projection.ellipsoid,t=N.clone(this._transform,wz),n=Lt.eastNorthUpToFixedFrame(this.positionWC,e,Sz);this._setTransform(n);let i=d_e(this.direction);return this._setTransform(t),i}}},roll:{get:function(){if(this._mode!==J.MORPHING){let e=this._projection.ellipsoid,t=N.clone(this._transform,wz),n=Lt.eastNorthUpToFixedFrame(this.positionWC,e,Sz);this._setTransform(n);let i=h_e(this.direction,this.up,this.right);return this._setTransform(t),i}}},moveStart:{get:function(){return this._moveStart}},moveEnd:{get:function(){return this._moveEnd}},changed:{get:function(){return this._changed}}});Qt.prototype.update=function(e){if(!c(e))throw new w("mode is required.");if(e===J.SCENE2D&&!(this.frustum instanceof No))throw new w("An OrthographicOffCenterFrustum is required in 2D.");if((e===J.SCENE3D||e===J.COLUMBUS_VIEW)&&!(this.frustum instanceof bi)&&!(this.frustum instanceof an))throw new w("A PerspectiveFrustum or OrthographicFrustum is required in 3D and Columbus view");let t=!1;if(e!==this._mode&&(this._mode=e,this._modeChanged=e!==J.MORPHING,t=this._mode===J.SCENE2D),t){let n=this._max2Dfrustum=this.frustum.clone();if(!(n instanceof No))throw new w("The camera frustum is expected to be orthographic for 2D camera control.");let i=2,o=n.top/n.right;n.right=this._maxCoord.x*i,n.left=-n.right,n.top=o*n.right,n.bottom=-n.top}this._mode===J.SCENE2D&&g_e(this,this.position)};var wst=new d,Sst=new d,Ast=new d;Qt.prototype._setTransform=function(e){let t=d.clone(this.positionWC,wst),n=d.clone(this.upWC,Sst),i=d.clone(this.directionWC,Ast);N.clone(e,this._transform),this._transformChanged=!0,Ka(this);let o=this._actualInvTransform;N.multiplyByPoint(o,t,this.position),N.multiplyByPointAsVector(o,i,this.direction),N.multiplyByPointAsVector(o,n,this.up),d.cross(this.direction,this.up,this.right),Ka(this)};var vst=new k,Dst=new mn,Ist=new d,Ost=new d;function m_e(e){if(!N.equals(N.IDENTITY,e.transform))return d.magnitude(e.position);let t=e._scene,n=t.globe,i=vst;i.x=t.drawingBufferWidth/2,i.y=t.drawingBufferHeight/2;let o;if(c(n)){let a=e.getPickRay(i,Dst);o=n.pickWorldCoordinates(a,t,!0,Ist)}let r;t.pickPositionSupported&&(r=t.pickPositionWorldCoordinates(i,Ost));let s;if(c(o)||c(r)){let a=c(r)?d.distance(r,e.positionWC):Number.POSITIVE_INFINITY,l=c(o)?d.distance(o,e.positionWC):Number.POSITIVE_INFINITY;s=Math.min(a,l)}else s=Math.max(e.positionCartographic.height,0);return s}Qt.prototype._adjustOrthographicFrustum=function(e){this.frustum instanceof an&&(!e&&this._positionCartographic.height<15e4||(this.frustum.width=m_e(this)))};var Az=new d,EY=new N,Pst=new N,wY=new ve,SY=new q,p_e=new re;function Rst(e,t,n){if(isNaN(t.x)||isNaN(t.y)||isNaN(t.z))throw new w("position has a NaN component");let i=N.clone(e.transform,EY),o=Lt.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,Pst);e._setTransform(o),d.clone(d.ZERO,e.position),n.heading=n.heading-O.PI_OVER_TWO;let r=ve.fromHeadingPitchRoll(n,wY),s=q.fromQuaternion(r,SY);q.getColumn(s,0,e.direction),q.getColumn(s,2,e.up),d.cross(e.direction,e.up,e.right),e._setTransform(i),e._adjustOrthographicFrustum(!0)}function Mst(e,t,n,i){let o=N.clone(e.transform,EY);if(e._setTransform(N.IDENTITY),!d.equals(t,e.positionWC)){if(i){let a=e._projection,l=a.ellipsoid.cartesianToCartographic(t,p_e);t=a.project(l,Az)}d.clone(t,e.position)}n.heading=n.heading-O.PI_OVER_TWO;let r=ve.fromHeadingPitchRoll(n,wY),s=q.fromQuaternion(r,SY);q.getColumn(s,0,e.direction),q.getColumn(s,2,e.up),d.cross(e.direction,e.up,e.right),e._setTransform(o),e._adjustOrthographicFrustum(!0)}function Lst(e,t,n,i){let o=N.clone(e.transform,EY);if(e._setTransform(N.IDENTITY),!d.equals(t,e.positionWC)){if(i){let l=e._projection,u=l.ellipsoid.cartesianToCartographic(t,p_e);t=l.project(u,Az)}k.clone(t,e.position);let r=-t.z*.5,s=-r,a=e.frustum;if(s>r){let l=a.top/a.right;a.right=s,a.left=r,a.top=a.right*l,a.bottom=-a.top}}if(e._scene.mapMode2D===fu.ROTATE){n.heading=n.heading-O.PI_OVER_TWO,n.pitch=-O.PI_OVER_TWO,n.roll=0;let r=ve.fromHeadingPitchRoll(n,wY),s=q.fromQuaternion(r,SY);q.getColumn(s,2,e.up),d.cross(e.direction,e.up,e.right)}e._setTransform(o)}var Nst=new d,Fst=new d,Bst=new d;function __e(e,t,n,i){let o=d.clone(n.direction,Nst),r=d.clone(n.up,Fst);if(e._scene.mode===J.SCENE3D){let a=e._projection.ellipsoid,l=Lt.eastNorthUpToFixedFrame(t,a,wz),u=N.inverseTransformation(l,Sz);N.multiplyByPointAsVector(u,o,o),N.multiplyByPointAsVector(u,r,r)}let s=d.cross(o,r,Bst);return i.heading=f_e(o,r),i.pitch=d_e(o),i.roll=h_e(o,r,s),i}var CY={destination:void 0,orientation:{direction:void 0,up:void 0,heading:void 0,pitch:void 0,roll:void 0},convert:void 0,endTransform:void 0},ow=new Hc;Qt.prototype.setView=function(e){e=g(e,g.EMPTY_OBJECT);let t=g(e.orientation,g.EMPTY_OBJECT),n=this._mode;if(n===J.MORPHING)return;c(e.endTransform)&&this._setTransform(e.endTransform);let i=g(e.convert,!0),o=g(e.destination,d.clone(this.positionWC,Az));if(c(o)&&c(o.west)){if(o=this.getRectangleCameraCoordinates(o,Az),isNaN(o.x)||isNaN(o.y))throw new w("destination has a NaN component");i=!1}c(t.direction)&&(t=__e(this,o,t,CY.orientation)),ow.heading=g(t.heading,0),ow.pitch=g(t.pitch,-O.PI_OVER_TWO),ow.roll=g(t.roll,0),n===J.SCENE3D?Rst(this,o,ow):n===J.SCENE2D?Lst(this,o,ow,i):Mst(this,o,ow,i)};var kst=new d;Qt.prototype.flyHome=function(e){let t=this._mode;if(t===J.MORPHING&&this._scene.completeMorph(),t===J.SCENE2D)this.flyTo({destination:Qt.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:N.IDENTITY});else if(t===J.SCENE3D){let n=this.getRectangleCameraCoordinates(Qt.DEFAULT_VIEW_RECTANGLE),i=d.magnitude(n);i+=i*Qt.DEFAULT_VIEW_FACTOR,d.normalize(n,n),d.multiplyByScalar(n,i,n),this.flyTo({destination:n,duration:e,endTransform:N.IDENTITY})}else if(t===J.COLUMBUS_VIEW){let n=this._projection.ellipsoid.maximumRadius,i=new d(0,-1,1);i=d.multiplyByScalar(d.normalize(i,i),5*n,i),this.flyTo({destination:i,duration:e,orientation:{heading:0,pitch:-Math.acos(d.normalize(i,kst).z),roll:0},endTransform:N.IDENTITY,convert:!1})}};Qt.prototype.worldToCameraCoordinates=function(e,t){if(!c(e))throw new w("cartesian is required.");return c(t)||(t=new ee),Ka(this),N.multiplyByVector(this._actualInvTransform,e,t)};Qt.prototype.worldToCameraCoordinatesPoint=function(e,t){if(!c(e))throw new w("cartesian is required.");return c(t)||(t=new d),Ka(this),N.multiplyByPoint(this._actualInvTransform,e,t)};Qt.prototype.worldToCameraCoordinatesVector=function(e,t){if(!c(e))throw new w("cartesian is required.");return c(t)||(t=new d),Ka(this),N.multiplyByPointAsVector(this._actualInvTransform,e,t)};Qt.prototype.cameraToWorldCoordinates=function(e,t){if(!c(e))throw new w("cartesian is required.");return c(t)||(t=new ee),Ka(this),N.multiplyByVector(this._actualTransform,e,t)};Qt.prototype.cameraToWorldCoordinatesPoint=function(e,t){if(!c(e))throw new w("cartesian is required.");return c(t)||(t=new d),Ka(this),N.multiplyByPoint(this._actualTransform,e,t)};Qt.prototype.cameraToWorldCoordinatesVector=function(e,t){if(!c(e))throw new w("cartesian is required.");return c(t)||(t=new d),Ka(this),N.multiplyByPointAsVector(this._actualTransform,e,t)};function g_e(e,t){let n=e._scene.mapMode2D===fu.ROTATE,i=e._maxCoord.x,o=e._maxCoord.y,r,s;n?(s=i,r=-s):(s=t.x-i*2,r=t.x+i*2),t.x>i&&(t.x=s),t.x<-i&&(t.x=r),t.y>o&&(t.y=o),t.y<-o&&(t.y=-o)}var i_e=new d;Qt.prototype.move=function(e,t){if(!c(e))throw new w("direction is required.");let n=this.position;d.multiplyByScalar(e,t,i_e),d.add(n,i_e,n),this._mode===J.SCENE2D&&g_e(this,n),this._adjustOrthographicFrustum(!0)};Qt.prototype.moveForward=function(e){e=g(e,this.defaultMoveAmount),this._mode===J.SCENE2D?vz(this,e):this.move(this.direction,e)};Qt.prototype.moveBackward=function(e){e=g(e,this.defaultMoveAmount),this._mode===J.SCENE2D?vz(this,-e):this.move(this.direction,-e)};Qt.prototype.moveUp=function(e){e=g(e,this.defaultMoveAmount),this.move(this.up,e)};Qt.prototype.moveDown=function(e){e=g(e,this.defaultMoveAmount),this.move(this.up,-e)};Qt.prototype.moveRight=function(e){e=g(e,this.defaultMoveAmount),this.move(this.right,e)};Qt.prototype.moveLeft=function(e){e=g(e,this.defaultMoveAmount),this.move(this.right,-e)};Qt.prototype.lookLeft=function(e){e=g(e,this.defaultLookAmount),this._mode!==J.SCENE2D&&this.look(this.up,-e)};Qt.prototype.lookRight=function(e){e=g(e,this.defaultLookAmount),this._mode!==J.SCENE2D&&this.look(this.up,e)};Qt.prototype.lookUp=function(e){e=g(e,this.defaultLookAmount),this._mode!==J.SCENE2D&&this.look(this.right,-e)};Qt.prototype.lookDown=function(e){e=g(e,this.defaultLookAmount),this._mode!==J.SCENE2D&&this.look(this.right,e)};var Ust=new ve,zst=new q;Qt.prototype.look=function(e,t){if(!c(e))throw new w("axis is required.");let n=g(t,this.defaultLookAmount),i=ve.fromAxisAngle(e,-n,Ust),o=q.fromQuaternion(i,zst),r=this.direction,s=this.up,a=this.right;q.multiplyByVector(o,r,r),q.multiplyByVector(o,s,s),q.multiplyByVector(o,a,a)};Qt.prototype.twistLeft=function(e){e=g(e,this.defaultLookAmount),this.look(this.direction,e)};Qt.prototype.twistRight=function(e){e=g(e,this.defaultLookAmount),this.look(this.direction,-e)};var Vst=new ve,Hst=new q;Qt.prototype.rotate=function(e,t){if(!c(e))throw new w("axis is required.");let n=g(t,this.defaultRotateAmount),i=ve.fromAxisAngle(e,-n,Vst),o=q.fromQuaternion(i,Hst);q.multiplyByVector(o,this.position,this.position),q.multiplyByVector(o,this.direction,this.direction),q.multiplyByVector(o,this.up,this.up),d.cross(this.direction,this.up,this.right),d.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)};Qt.prototype.rotateDown=function(e){e=g(e,this.defaultRotateAmount),y_e(this,e)};Qt.prototype.rotateUp=function(e){e=g(e,this.defaultRotateAmount),y_e(this,-e)};var Gst=new d,jst=new d,Wst=new d,o_e=new d;function y_e(e,t){let n=e.position;if(c(e.constrainedAxis)&&!d.equalsEpsilon(e.position,d.ZERO,O.EPSILON2)){let i=d.normalize(n,Gst),o=d.equalsEpsilon(i,e.constrainedAxis,O.EPSILON2),r=d.equalsEpsilon(i,d.negate(e.constrainedAxis,o_e),O.EPSILON2);if(!o&&!r){let s=d.normalize(e.constrainedAxis,jst),a=d.dot(i,s),l=O.acosClamped(a);t>0&&t>l&&(t=l-O.EPSILON4),a=d.dot(i,d.negate(s,o_e)),l=O.acosClamped(a),t<0&&-t>l&&(t=-l+O.EPSILON4);let u=d.cross(s,i,Wst);e.rotate(u,t)}else(o&&t<0||r&&t>0)&&e.rotate(e.right,t)}else e.rotate(e.right,t)}Qt.prototype.rotateRight=function(e){e=g(e,this.defaultRotateAmount),b_e(this,-e)};Qt.prototype.rotateLeft=function(e){e=g(e,this.defaultRotateAmount),b_e(this,e)};function b_e(e,t){c(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function vz(e,t){let n=e.frustum;if(!(n instanceof No)||!c(n.left)||!c(n.right)||!c(n.bottom)||!c(n.top))throw new w("The camera frustum is expected to be orthographic for 2D camera control.");let i;if(t=t*.5,Math.abs(n.top)+Math.abs(n.bottom)>Math.abs(n.left)+Math.abs(n.right)){let o=n.top-t,r=n.bottom+t,s=e._maxCoord.y;e._scene.mapMode2D===fu.ROTATE&&(s*=e.maximumZoomFactor),r>s&&(r=s,o=-s),o<=r&&(o=1,r=-1),i=n.right/n.top,n.top=o,n.bottom=r,n.right=n.top*i,n.left=-n.right}else{let o=n.right-t,r=n.left+t,s=e._maxCoord.x;e._scene.mapMode2D===fu.ROTATE&&(s*=e.maximumZoomFactor),o>s&&(o=s,r=-s),o<=r&&(o=1,r=-1),i=n.top/n.right,n.right=o,n.left=r,n.top=n.right*i,n.bottom=-n.top}}function x_e(e,t){e.move(e.direction,t)}Qt.prototype.zoomIn=function(e){e=g(e,this.defaultZoomAmount),this._mode===J.SCENE2D?vz(this,e):x_e(this,e)};Qt.prototype.zoomOut=function(e){e=g(e,this.defaultZoomAmount),this._mode===J.SCENE2D?vz(this,-e):x_e(this,-e)};Qt.prototype.getMagnitude=function(){if(this._mode===J.SCENE3D)return d.magnitude(this.position);if(this._mode===J.COLUMBUS_VIEW)return Math.abs(this.position.z);if(this._mode===J.SCENE2D)return Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom)};var qst=new N;Qt.prototype.lookAt=function(e,t){if(!c(e))throw new w("target is required");if(!c(t))throw new w("offset is required");if(this._mode===J.MORPHING)throw new w("lookAt is not supported while morphing.");let n=this._scene,i=g(n.ellipsoid,Z.default),o=Lt.eastNorthUpToFixedFrame(e,i,qst);this.lookAtTransform(o,t)};var Yst=new d,Xst=new ve,Kst=new ve,$st=new q;function T_e(e,t,n){t=O.clamp(t,-O.PI_OVER_TWO,O.PI_OVER_TWO),e=O.zeroToTwoPi(e)-O.PI_OVER_TWO;let i=ve.fromAxisAngle(d.UNIT_Y,-t,Xst),o=ve.fromAxisAngle(d.UNIT_Z,-e,Kst),r=ve.multiply(o,i,o),s=q.fromQuaternion(r,$st),a=d.clone(d.UNIT_X,Yst);return q.multiplyByVector(s,a,a),d.negate(a,a),d.multiplyByScalar(a,n,a),a}Qt.prototype.lookAtTransform=function(e,t){if(!c(e))throw new w("transform is required");if(this._mode===J.MORPHING)throw new w("lookAtTransform is not supported while morphing.");if(this._setTransform(e),!c(t))return;let n;if(c(t.heading)?n=T_e(t.heading,t.pitch,t.range):n=t,this._mode===J.SCENE2D){k.clone(k.ZERO,this.position),d.negate(n,this.up),this.up.z=0,d.magnitudeSquared(this.up)<O.EPSILON10&&d.clone(d.UNIT_Y,this.up),d.normalize(this.up,this.up),this._setTransform(N.IDENTITY),d.negate(d.UNIT_Z,this.direction),d.cross(this.direction,this.up,this.right),d.normalize(this.right,this.right);let i=this.frustum,o=i.top/i.right;i.right=d.magnitude(n)*.5,i.left=-i.right,i.top=o*i.right,i.bottom=-i.top,this._setTransform(e);return}d.clone(n,this.position),d.negate(this.position,this.direction),d.normalize(this.direction,this.direction),d.cross(this.direction,d.UNIT_Z,this.right),d.magnitudeSquared(this.right)<O.EPSILON10&&d.clone(d.UNIT_X,this.right),d.normalize(this.right,this.right),d.cross(this.right,this.direction,this.up),d.normalize(this.up,this.up),this._adjustOrthographicFrustum(!0)};var tI=new re,Zst=new re,Jst=new d,Qst=new d,eat=new d,tat=new d,nat=new d,iat=new d,oat=new d,bY=new d,rat={direction:new d,right:new d,up:new d},r_e;function Xa(e,t,n,i){return Math.abs(d.dot(t,n))/i-d.dot(e,n)}function C_e(e,t,n,i){let o=e._projection.ellipsoid,r=i?e:rat,{north:s,south:a,west:l}=t,{east:u}=t;l>u&&(u+=O.TWO_PI);let f=(l+u)*.5,h;if(a<-O.PI_OVER_TWO+O.RADIANS_PER_DEGREE&&s>O.PI_OVER_TWO-O.RADIANS_PER_DEGREE)h=0;else{let L=tI;L.longitude=f,L.latitude=s,L.height=0;let F=Zst;F.longitude=f,F.latitude=a,F.height=0;let y=r_e;(!c(y)||y.ellipsoid!==o)&&(r_e=y=new C_(void 0,void 0,o)),y.setEndPoints(L,F),h=y.interpolateUsingFraction(.5,tI).latitude}let m=tI;m.longitude=f,m.latitude=h,m.height=0;let p=o.cartographicToCartesian(m,oat),_=tI;_.longitude=u,_.latitude=s;let b=o.cartographicToCartesian(_,Jst);_.longitude=l;let x=o.cartographicToCartesian(_,eat);_.longitude=f;let T=o.cartographicToCartesian(_,nat);_.latitude=a;let E=o.cartographicToCartesian(_,iat);_.longitude=u;let S=o.cartographicToCartesian(_,tat);_.longitude=l;let A=o.cartographicToCartesian(_,Qst);d.subtract(x,p,x),d.subtract(S,p,S),d.subtract(b,p,b),d.subtract(A,p,A),d.subtract(T,p,T),d.subtract(E,p,E);let v=o.geodeticSurfaceNormal(p,r.direction);d.negate(v,v);let D=d.cross(v,d.UNIT_Z,r.right);d.normalize(D,D);let R=d.cross(D,v,r.up),P;if(e.frustum instanceof an){let L=Math.max(d.distance(b,x),d.distance(S,A)),F=Math.max(d.distance(b,S),d.distance(x,A)),y,I,M=e.frustum._offCenterFrustum,B=M.right/M.top,U=F*B;L>U?(y=L,I=y/B):(I=F,y=U),P=Math.max(y,I)}else{let L=Math.tan(e.frustum.fovy*.5),F=e.frustum.aspectRatio*L;if(P=Math.max(Xa(v,R,x,L),Xa(v,R,S,L),Xa(v,R,b,L),Xa(v,R,A,L),Xa(v,R,T,L),Xa(v,R,E,L),Xa(v,D,x,F),Xa(v,D,S,F),Xa(v,D,b,F),Xa(v,D,A,F),Xa(v,D,T,F),Xa(v,D,E,F)),a<0&&s>0){let y=tI;y.longitude=l,y.latitude=0,y.height=0;let I=o.cartographicToCartesian(y,bY);d.subtract(I,p,I),P=Math.max(P,Xa(v,R,I,L),Xa(v,D,I,F)),y.longitude=u,I=o.cartographicToCartesian(y,bY),d.subtract(I,p,I),P=Math.max(P,Xa(v,R,I,L),Xa(v,D,I,F))}}return d.add(p,d.multiplyByScalar(v,-P,bY),n)}var sat=new re,aat=new d,cat=new d;function lat(e,t,n){let i=e._projection;t.west>t.east&&(t=te.MAX_VALUE);let o=e._actualTransform,r=e._actualInvTransform,s=sat;s.longitude=t.east,s.latitude=t.north;let a=i.project(s,aat);N.multiplyByPoint(o,a,a),N.multiplyByPoint(r,a,a),s.longitude=t.west,s.latitude=t.south;let l=i.project(s,cat);if(N.multiplyByPoint(o,l,l),N.multiplyByPoint(r,l,l),n.x=(a.x-l.x)*.5+l.x,n.y=(a.y-l.y)*.5+l.y,c(e.frustum.fovy)){let u=Math.tan(e.frustum.fovy*.5),f=e.frustum.aspectRatio*u;n.z=Math.max((a.x-l.x)/f,(a.y-l.y)/u)*.5}else{let u=a.x-l.x,f=a.y-l.y;n.z=Math.max(u,f)}return n}var uat=new re,fat=new d,dat=new d;function hat(e,t,n){let i=e._projection,o=t.east;t.west>t.east&&(e._scene.mapMode2D===fu.INFINITE_SCROLL?o+=O.TWO_PI:(t=te.MAX_VALUE,o=t.east));let r=uat;r.longitude=o,r.latitude=t.north;let s=i.project(r,fat);r.longitude=t.west,r.latitude=t.south;let a=i.project(r,dat),l=Math.abs(s.x-a.x)*.5,u=Math.abs(s.y-a.y)*.5,f,h,m=e.frustum.right/e.frustum.top,p=u*m;return l>p?(f=l,h=f/m):(h=u,f=p),u=Math.max(2*f,2*h),n.x=(s.x-a.x)*.5+a.x,n.y=(s.y-a.y)*.5+a.y,r=i.unproject(n,r),r.height=u,n=i.project(r,n),n}Qt.prototype.getRectangleCameraCoordinates=function(e,t){if(!c(e))throw new w("rectangle is required");let n=this._mode;if(c(t)||(t=new d),n===J.SCENE3D)return C_e(this,e,t);if(n===J.COLUMBUS_VIEW)return lat(this,e,t);if(n===J.SCENE2D)return hat(this,e,t)};var mat=new mn;function pat(e,t,n,i){n=g(n,Z.default);let o=e.getPickRay(t,mat),r=Yn.rayEllipsoid(o,n);if(!r)return;let s=r.start>0?r.start:r.stop;return mn.getPoint(o,s,i)}var _at=new mn;function gat(e,t,n,i){let r=e.getPickRay(t,_at).origin;r=d.fromElements(r.y,r.z,0,r);let s=n.unproject(r);if(!(s.latitude<-O.PI_OVER_TWO||s.latitude>O.PI_OVER_TWO))return n.ellipsoid.cartographicToCartesian(s,i)}var yat=new mn;function bat(e,t,n,i){let o=e.getPickRay(t,yat),r=-o.origin.x/o.direction.x;mn.getPoint(o,r,i);let s=n.unproject(new d(i.y,i.z,0));if(!(s.latitude<-O.PI_OVER_TWO||s.latitude>O.PI_OVER_TWO||s.longitude<-Math.PI||s.longitude>Math.PI))return n.ellipsoid.cartographicToCartesian(s,i)}Qt.prototype.pickEllipsoid=function(e,t,n){if(!c(e))throw new w("windowPosition is required.");let i=this._scene.canvas;if(!(i.clientWidth===0||i.clientHeight===0)){if(c(n)||(n=new d),t=g(t,Z.default),this._mode===J.SCENE3D)n=pat(this,e,t,n);else if(this._mode===J.SCENE2D)n=gat(this,e,this._projection,n);else if(this._mode===J.COLUMBUS_VIEW)n=bat(this,e,this._projection,n);else return;return n}};var xat=new d,Tat=new d,Cat=new d;function Eat(e,t,n){let i=e._scene.canvas,o=i.clientWidth,r=i.clientHeight,s=Math.tan(e.frustum.fovy*.5),a=e.frustum.aspectRatio*s,l=e.frustum.near,u=2/o*t.x-1,f=2/r*(r-t.y)-1,h=e.positionWC;d.clone(h,n.origin);let m=d.multiplyByScalar(e.directionWC,l,xat);d.add(h,m,m);let p=d.multiplyByScalar(e.rightWC,u*l*a,Tat),_=d.multiplyByScalar(e.upWC,f*l*s,Cat),b=d.add(m,p,n.direction);return d.add(b,_,b),d.subtract(b,h,b),d.normalize(b,b),n}var Cz=new d;function wat(e,t,n){let i=e._scene.canvas,o=i.clientWidth,r=i.clientHeight,s=e.frustum,a=s.offCenterFrustum;c(a)&&(s=a);let l=2/o*t.x-1;l*=(s.right-s.left)*.5;let u=2/r*(r-t.y)-1;u*=(s.top-s.bottom)*.5;let f=n.origin;return d.clone(e.position,f),d.multiplyByScalar(e.right,l,Cz),d.add(Cz,f,f),d.multiplyByScalar(e.up,u,Cz),d.add(Cz,f,f),d.clone(e.directionWC,n.direction),(e._mode===J.COLUMBUS_VIEW||e._mode===J.SCENE2D)&&d.fromElements(n.origin.z,n.origin.x,n.origin.y,n.origin),n}Qt.prototype.getPickRay=function(e,t){if(!c(e))throw new w("windowPosition is required.");c(t)||(t=new mn);let n=this._scene.canvas;if(n.clientWidth<=0||n.clientHeight<=0)return;let i=this.frustum;return c(i.aspectRatio)&&c(i.fov)&&c(i.near)?Eat(this,e,t):wat(this,e,t)};var Sat=new d,Aat=new d;Qt.prototype.distanceToBoundingSphere=function(e){if(!c(e))throw new w("boundingSphere is required.");let t=d.subtract(this.positionWC,e.center,Sat),n=d.multiplyByScalar(this.directionWC,d.dot(t,this.directionWC),Aat);return Math.max(0,d.magnitude(n)-e.radius)};var vat=new k;Qt.prototype.getPixelSize=function(e,t,n){if(!c(e))throw new w("boundingSphere is required.");if(!c(t))throw new w("drawingBufferWidth is required.");if(!c(n))throw new w("drawingBufferHeight is required.");let i=this.distanceToBoundingSphere(e),o=this.frustum.getPixelDimensions(t,n,i,this._scene.pixelRatio,vat);return Math.max(o.x,o.y)};function Dat(e,t,n,i,o,r){let s=d.clone(t);n.y>i?s.y-=n.y-i:n.y<-i&&(s.y+=-i-n.y),n.z>o?s.z-=n.z-o:n.z<-o&&(s.z+=-o-n.z);function a(l){let u=d.lerp(t,s,l.time,new d);e.worldToCameraCoordinatesPoint(u,e.position)}return{easingFunction:Ps.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:r,update:a}}var Iat=new d,s_e=new d,Oat=new d,Pat=new d;function Rat(e,t){let n=e.position,i=e.direction,o=e.worldToCameraCoordinatesVector(d.UNIT_X,Iat),r=-d.dot(o,n)/d.dot(o,i),s=d.add(n,d.multiplyByScalar(i,r,s_e),s_e);e.cameraToWorldCoordinatesPoint(s,s),n=e.cameraToWorldCoordinatesPoint(e.position,Oat);let a=Math.tan(e.frustum.fovy*.5),l=e.frustum.aspectRatio*a,u=d.magnitude(d.subtract(n,s,Pat)),f=l*u,h=a*u,m=e._maxCoord.x,p=e._maxCoord.y,_=Math.max(f-m,m),b=Math.max(h-p,p);if(n.z<-_||n.z>_||n.y<-b||n.y>b){let x=s.y<-_||s.y>_,T=s.z<-b||s.z>b;if(x||T)return Dat(e,n,s,_,b,t)}}Qt.prototype.createCorrectPositionTween=function(e){if(!c(e))throw new w("duration is required.");if(this._mode===J.COLUMBUS_VIEW)return Rat(this,e)};var Mat=new d,Rs={destination:void 0,heading:void 0,pitch:void 0,roll:void 0,duration:void 0,complete:void 0,cancel:void 0,endTransform:void 0,maximumHeight:void 0,easingFunction:void 0};Qt.prototype.cancelFlight=function(){c(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)};Qt.prototype.completeFlight=function(){if(c(this._currentFlight)){this._currentFlight.cancelTween();let e={destination:void 0,orientation:{heading:void 0,pitch:void 0,roll:void 0}};e.destination=Rs.destination,e.orientation.heading=Rs.heading,e.orientation.pitch=Rs.pitch,e.orientation.roll=Rs.roll,this.setView(e),c(this._currentFlight.complete)&&this._currentFlight.complete(),this._currentFlight=void 0}};Qt.prototype.flyTo=function(e){e=g(e,g.EMPTY_OBJECT);let t=e.destination;if(!c(t))throw new w("destination is required.");if(this._mode===J.MORPHING)return;this.cancelFlight();let i=t instanceof te;i&&(t=this.getRectangleCameraCoordinates(t,Mat));let o=g(e.orientation,g.EMPTY_OBJECT);if(c(o.direction)&&(o=__e(this,t,o,CY.orientation)),c(e.duration)&&e.duration<=0){let f=CY;f.destination=e.destination,f.orientation.heading=o.heading,f.orientation.pitch=o.pitch,f.orientation.roll=o.roll,f.convert=e.convert,f.endTransform=e.endTransform,this.setView(f),typeof e.complete=="function"&&e.complete();return}let r=this,s;Rs.destination=t,Rs.heading=o.heading,Rs.pitch=o.pitch,Rs.roll=o.roll,Rs.duration=e.duration,Rs.complete=function(){s===r._currentFlight&&(r._currentFlight=void 0),c(e.complete)&&e.complete()},Rs.cancel=e.cancel,Rs.endTransform=e.endTransform,Rs.convert=i?!1:e.convert,Rs.maximumHeight=e.maximumHeight,Rs.pitchAdjustHeight=e.pitchAdjustHeight,Rs.flyOverLongitude=e.flyOverLongitude,Rs.flyOverLongitudeWeight=e.flyOverLongitudeWeight,Rs.easingFunction=e.easingFunction;let a=this._scene,l=xz.createTween(a,Rs);if(l.duration===0){typeof l.complete=="function"&&l.complete();return}s=a.tweens.add(l),this._currentFlight=s;let u=this._scene.preloadFlightCamera;this._mode!==J.SCENE2D&&(c(u)||(u=Qt.clone(this)),u.setView({destination:t,orientation:o}),this._scene.preloadFlightCullingVolume=u.frustum.computeCullingVolume(u.positionWC,u.directionWC,u.upWC))};function Lat(e,t){let n=e.frustum,i=Math.tan(n.fovy*.5),o=n.aspectRatio*i;return Math.max(t/o,t/i)}function Nat(e,t){let n=e.frustum,i=n.offCenterFrustum;c(i)&&(n=i);let o,r,s=n.right/n.top,a=t*s;return t>a?(o=t,r=o/s):(r=t,o=a),Math.max(o,r)*1.5}var Fat=100;function E_e(e,t,n){n=Cd.clone(c(n)?n:Qt.DEFAULT_OFFSET);let i=e._scene.screenSpaceCameraController.minimumZoomDistance,o=e._scene.screenSpaceCameraController.maximumZoomDistance,r=n.range;if(!c(r)||r===0){let s=t.radius;s===0?n.range=Fat:e.frustum instanceof an||e._mode===J.SCENE2D?n.range=Nat(e,s):n.range=Lat(e,s),n.range=O.clamp(n.range,i,o)}return n}Qt.prototype.viewBoundingSphere=function(e,t){if(!c(e))throw new w("boundingSphere is required.");if(this._mode===J.MORPHING)throw new w("viewBoundingSphere is not supported while morphing.");t=E_e(this,e,t),this.lookAt(e.center,t)};var Bat=new N,kat=new d,Uat=new d,zat=new d,Vat=new d,Hat=new ee,Gat=new ve,jat=new q;Qt.prototype.flyToBoundingSphere=function(e,t){if(!c(e))throw new w("boundingSphere is required.");t=g(t,g.EMPTY_OBJECT);let n=this._mode===J.SCENE2D||this._mode===J.COLUMBUS_VIEW;this._setTransform(N.IDENTITY);let i=E_e(this,e,t.offset),o;n?o=d.multiplyByScalar(d.UNIT_Z,i.range,kat):o=T_e(i.heading,i.pitch,i.range);let r=this._scene,s=g(r.ellipsoid,Z.default),a=Lt.eastNorthUpToFixedFrame(e.center,s,Bat);N.multiplyByPoint(a,o,o);let l,u;if(!n){if(l=d.subtract(e.center,o,Uat),d.normalize(l,l),u=N.multiplyByPointAsVector(a,d.UNIT_Z,zat),1-Math.abs(d.dot(l,u))<O.EPSILON6){let h=ve.fromAxisAngle(l,i.heading,Gat),m=q.fromQuaternion(h,jat);d.fromCartesian4(N.getColumn(a,1,Hat),u),q.multiplyByVector(m,u,u)}let f=d.cross(l,u,Vat);d.cross(f,l,u),d.normalize(u,u)}this.flyTo({destination:o,orientation:{direction:l,up:u},duration:t.duration,complete:t.complete,cancel:t.cancel,endTransform:t.endTransform,maximumHeight:t.maximumHeight,easingFunction:t.easingFunction,flyOverLongitude:t.flyOverLongitude,flyOverLongitudeWeight:t.flyOverLongitudeWeight,pitchAdjustHeight:t.pitchAdjustHeight})};var a_e=new d,c_e=new d,xY=new d,l_e=new d,nI=[new d,new d,new d,new d];function Wat(e,t){let n=t.radii,i=e.positionWC,o=d.multiplyComponents(t.oneOverRadii,i,a_e),r=d.magnitude(o),s=d.normalize(o,c_e),a,l;d.equalsEpsilon(s,d.UNIT_Z,O.EPSILON10)?(a=new d(0,1,0),l=new d(0,0,1)):(a=d.normalize(d.cross(d.UNIT_Z,s,xY),xY),l=d.normalize(d.cross(s,a,l_e),l_e));let u=Math.sqrt(d.magnitudeSquared(o)-1),f=d.multiplyByScalar(s,1/r,a_e),h=u/r,m=d.multiplyByScalar(a,h,c_e),p=d.multiplyByScalar(l,h,xY),_=d.add(f,p,nI[0]);d.subtract(_,m,_),d.multiplyComponents(n,_,_);let b=d.subtract(f,p,nI[1]);d.subtract(b,m,b),d.multiplyComponents(n,b,b);let x=d.subtract(f,p,nI[2]);d.add(x,m,x),d.multiplyComponents(n,x,x);let T=d.add(f,p,nI[3]);return d.add(T,m,T),d.multiplyComponents(n,T,T),nI}var TY=new k,qat=new d,yy=[new re,new re,new re,new re];function Ez(e,t,n,i,o,r){TY.x=e,TY.y=t;let s=i.pickEllipsoid(TY,o,qat);return c(s)?(yy[n]=o.cartesianToCartographic(s,yy[n]),1):(yy[n]=o.cartesianToCartographic(r[n],yy[n]),0)}Qt.prototype.computeViewRectangle=function(e,t){e=g(e,Z.default);let n=this.frustum.computeCullingVolume(this.positionWC,this.directionWC,this.upWC),i=new ne(d.ZERO,e.maximumRadius);if(n.computeVisibility(i)===Gt.OUTSIDE)return;let r=this._scene.canvas,s=r.clientWidth,a=r.clientHeight,l=0,u=Wat(this,e);if(l+=Ez(0,0,0,this,e,u),l+=Ez(0,a,1,this,e,u),l+=Ez(s,a,2,this,e,u),l+=Ez(s,0,3,this,e,u),l<2)return te.MAX_VALUE;t=te.fromCartographicArray(yy,t);let f=0,h=yy[3].longitude;for(let m=0;m<4;++m){let p=yy[m].longitude,_=Math.abs(p-h);_>O.PI?f+=O.TWO_PI-_:f+=_,h=p}return O.equalsEpsilon(Math.abs(f),O.TWO_PI,O.EPSILON9)&&(t.west=-O.PI,t.east=O.PI,yy[0].latitude>=0?t.north=O.PI_OVER_TWO:t.south=-O.PI_OVER_TWO),t};Qt.prototype.switchToPerspectiveFrustum=function(){if(this._mode===J.SCENE2D||this.frustum instanceof bi)return;let e=this._scene;this.frustum=new bi,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=O.toRadians(60)};Qt.prototype.switchToOrthographicFrustum=function(){if(this._mode===J.SCENE2D||this.frustum instanceof an)return;let e=m_e(this),t=this._scene;this.frustum=new an,this.frustum.aspectRatio=t.drawingBufferWidth/t.drawingBufferHeight,this.frustum.width=e};Qt.clone=function(e,t){return c(t)||(t=new Qt(e._scene)),d.clone(e.position,t.position),d.clone(e.direction,t.direction),d.clone(e.up,t.up),d.clone(e.right,t.right),N.clone(e._transform,t.transform),t._transformChanged=!0,t.frustum=e.frustum.clone(),t};var Qi=Qt;function Yat(e){C.typeOf.object("options",e),C.typeOf.number("options.pass",e.pass),this.pass=e.pass,this.commandList=e.commandList,this.camera=e.camera,this.cullingVolume=e.cullingVolume,this.ready=!1}var Nd=Yat;var D_e=Mr(Sl(),1),w_e=576,Xat=100,iI="#ffffff",Dz="#48b";function I_e(e,t){this.credit=e,this.count=g(t,1)}function Kat(e,t){let n=e.length;for(let i=0;i<n;i++){let o=e[i];if(St.equals(o,t))return!0}return!1}function $at(e){let t=e._previousCesiumCredit,n=e._currentCesiumCredit;St.equals(n,t)||(c(t)&&e._cesiumCreditContainer.removeChild(t.element),c(n)&&e._cesiumCreditContainer.appendChild(n.element),e._previousCesiumCredit=n)}var O_e="cesium-credit-delimiter";function S_e(e){let t=document.createElement("span");return t.textContent=e,t.className=O_e,t}function A_e(e,t){if(c(t)){let n=document.createElement(t);n._creditId=e._creditId,n.appendChild(e),e=n}return e}function v_e(e,t,n,i){let o=e.childNodes,r=-1;t.sort(function(s,a){return a.count-s.count});for(let s=0;s<t.length;++s){let a=t[s].credit;if(c(a)){if(r=s,c(n)&&(r*=2,s>0)){let u=r-1;if(o.length<=u)e.appendChild(S_e(n));else{let f=o[u];f.className!==O_e&&e.replaceChild(S_e(n),f)}}let l=a.element;if(o.length<=r)e.appendChild(A_e(l,i));else{let u=o[r];u._creditId!==a._id&&e.replaceChild(A_e(l,i),u)}}}for(++r;r<o.length;)e.removeChild(o[r])}function Zat(e){let t=e._lightboxCredits,n=e.viewport.clientWidth,i=e.viewport.clientHeight;n!==e._lastViewportWidth&&(n<w_e?(t.className="cesium-credit-lightbox cesium-credit-lightbox-mobile",t.style.marginTop="0"):(t.className="cesium-credit-lightbox cesium-credit-lightbox-expanded",t.style.marginTop=`${Math.floor((i-t.clientHeight)*.5)}px`),e._lastViewportWidth=n),n>=w_e&&i!==e._lastViewportHeight&&(t.style.marginTop=`${Math.floor((i-t.clientHeight)*.5)}px`,e._lastViewportHeight=i)}function Jat(e){let t=`
| .cesium-credit-lightbox-overlay {
| display: none;
| z-index: 1;
| position: absolute;
| top: 0;
| left: 0;
| width: 100%;
| height: 100%;
| background-color: rgba(80, 80, 80, 0.8);
| }
|
| .cesium-credit-lightbox {
| background-color: #303336;
| color: ${iI};
| position: relative;
| min-height: ${Xat}px;
| margin: auto;
| }
| .cesium-credit-lightbox > ul > li a,
| .cesium-credit-lightbox > ul > li a:visited,
| .cesium-credit-wrapper a,
| .cesium-credit-wrapper a:visited {
| color: ${iI};
| }
| .cesium-credit-lightbox > ul > li a:hover {
| color: ${Dz};
| }
| .cesium-credit-lightbox.cesium-credit-lightbox-expanded {
| border: 1px solid #444;
| border-radius: 5px;
| max-width: 370px;
| }
| .cesium-credit-lightbox.cesium-credit-lightbox-mobile {
| height: 100%;
| width: 100%;
| }
| .cesium-credit-lightbox-title {
| padding: 20px 20px 0 20px;
| }
| .cesium-credit-lightbox-close {
| font-size: 18pt;
| cursor: pointer;
| position: absolute;
| top: 0;
| right: 6px;
| color: ${iI};
| }
| .cesium-credit-lightbox-close:hover {
| color: ${Dz};
| }
| .cesium-credit-lightbox > ul {
| margin: 0;
| padding: 12px 20px 12px 40px;
| font-size: 13px;
| }
| .cesium-credit-lightbox > ul > li {
| padding-bottom: 6px;
| }
| .cesium-credit-lightbox > ul > li * {
| padding: 0;
| margin: 0;
| }
|
| .cesium-credit-expand-link {
| padding-left: 5px;
| cursor: pointer;
| text-decoration: underline;
| color: ${iI};
| }
| .cesium-credit-expand-link:hover {
| color: ${Dz};
| }
|
| .cesium-credit-text {
| color: ${iI};
| }
|
| .cesium-credit-delimiter {
| padding: 0 5px;
| }
|
| .cesium-credit-textContainer *,
| .cesium-credit-logoContainer * {
| display: inline;
| }
|
| .cesium-credit-textContainer a:hover {
| color: ${Dz}
| }
|
| .cesium-credit-textContainer .cesium-credit-wrapper:first-of-type {
| padding-left: 5px;
| }
| `;function n(r){if(r.shadowRoot)return r.shadowRoot;if(r.getRootNode){let s=r.getRootNode();if(s instanceof ShadowRoot)return s}}let i=g(n(e),document.head),o=document.createElement("style");o.innerHTML=t,i.appendChild(o)}function nr(e,t,n){C.defined("container",e);let i=this;n=g(n,document.body);let o=document.createElement("div");o.className="cesium-credit-lightbox-overlay",n.appendChild(o);let r=document.createElement("div");r.className="cesium-credit-lightbox",o.appendChild(r);function s(_){r.contains(_.target)||i.hideLightbox()}o.addEventListener("click",s,!1);let a=document.createElement("div");a.className="cesium-credit-lightbox-title",a.textContent="Data provided by:",r.appendChild(a);let l=document.createElement("a");l.onclick=this.hideLightbox.bind(this),l.innerHTML="×",l.className="cesium-credit-lightbox-close",r.appendChild(l);let u=document.createElement("ul");r.appendChild(u);let f=document.createElement("div");f.className="cesium-credit-logoContainer",f.style.display="inline",e.appendChild(f);let h=document.createElement("div");h.className="cesium-credit-textContainer",h.style.display="inline",e.appendChild(h);let m=document.createElement("a");m.className="cesium-credit-expand-link",m.onclick=this.showLightbox.bind(this),m.textContent="Data attribution",e.appendChild(m),Jat(e);let p=St.clone(nr.cesiumCredit);this._delimiter=g(t,"\u2022"),this._screenContainer=h,this._cesiumCreditContainer=f,this._lastViewportHeight=void 0,this._lastViewportWidth=void 0,this._lightboxCredits=r,this._creditList=u,this._lightbox=o,this._hideLightbox=s,this._expandLink=m,this._expanded=!1,this._staticCredits=[],this._cesiumCredit=p,this._previousCesiumCredit=void 0,this._currentCesiumCredit=p,this._creditDisplayElementPool=[],this._creditDisplayElementIndex=0,this._currentFrameCredits={screenCredits:new Et,lightboxCredits:new Et},this._defaultCredit=void 0,this.viewport=n,this.container=e}function P_e(e,t,n,i){i=g(i,1);let o=t.get(n.id);if(c(o))o.count<Number.MAX_VALUE&&(o.count+=i);else{let r=e._creditDisplayElementPool,s=e._creditDisplayElementPoolIndex;s<r.length?(o=r[s],o.credit=n,o.count=i):(o=new I_e(n,i),r.push(o)),++e._creditDisplayElementPoolIndex,t.set(n.id,o)}}nr.prototype.addCreditToNextFrame=function(e){if(C.defined("credit",e),e.isIon()){c(this._defaultCredit)||(this._defaultCredit=St.clone(R_e())),this._currentCesiumCredit=this._defaultCredit;return}let t;e.showOnScreen?t=this._currentFrameCredits.screenCredits:t=this._currentFrameCredits.lightboxCredits,P_e(this,t,e)};nr.prototype.addStaticCredit=function(e){C.defined("credit",e);let t=this._staticCredits;Kat(t,e)||t.push(e)};nr.prototype.removeStaticCredit=function(e){C.defined("credit",e);let t=this._staticCredits,n=t.indexOf(e);n!==-1&&t.splice(n,1)};nr.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0};nr.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1};nr.prototype.update=function(){this._expanded&&Zat(this)};nr.prototype.beginFrame=function(){let e=this._currentFrameCredits;this._creditDisplayElementPoolIndex=0;let t=e.screenCredits,n=e.lightboxCredits;t.removeAll(),n.removeAll();let i=this._staticCredits;for(let o=0;o<i.length;++o){let r=i[o],s=r.showOnScreen?t:n;r.isIon()&&St.equals(nr.cesiumCredit,this._cesiumCredit)||P_e(this,s,r,Number.MAX_VALUE)}St.equals(nr.cesiumCredit,this._cesiumCredit)||(this._cesiumCredit=St.clone(nr.cesiumCredit)),this._currentCesiumCredit=this._cesiumCredit};nr.prototype.endFrame=function(){let e=this._currentFrameCredits.screenCredits.values;v_e(this._screenContainer,e,this._delimiter,void 0);let t=this._currentFrameCredits.lightboxCredits.values;this._expandLink.style.display=t.length>0?"inline":"none",v_e(this._creditList,t,void 0,"li"),$at(this)};nr.prototype.destroy=function(){return this._lightbox.removeEventListener("click",this._hideLightbox,!1),this.container.removeChild(this._cesiumCreditContainer),this.container.removeChild(this._screenContainer),this.container.removeChild(this._expandLink),this.viewport.removeChild(this._lightbox),ue(this)};nr.prototype.isDestroyed=function(){return!1};nr._cesiumCredit=void 0;nr._cesiumCreditInitialized=!1;var Iz;function R_e(){if(!c(Iz)){let e=Mi("Assets/Images/ion-credit.png");e.indexOf("http://")!==0&&e.indexOf("https://")!==0&&e.indexOf("data:")!==0&&(e=new D_e.default(e).path()),Iz=new St(`<a href="https://cesium.com/" target="_blank"><img src="${e}" style="vertical-align: -7px" title="Cesium ion"/></a>`,!0)}return nr._cesiumCreditInitialized||(nr._cesiumCredit=Iz,nr._cesiumCreditInitialized=!0),Iz}Object.defineProperties(nr,{cesiumCredit:{get:function(){return R_e(),nr._cesiumCredit},set:function(e){nr._cesiumCredit=e,nr._cesiumCreditInitialized=!0}}});nr.CreditDisplayElement=I_e;var Oz=nr;var Pz=0,Qat=1;function M0(e){C.typeOf.object("options",e),C.typeOf.object("options.frustum",e.frustum),C.typeOf.object("options.origin",e.origin),C.typeOf.object("options.orientation",e.orientation);let t=e.frustum,n=e.orientation,i=e.origin,o=g(e.vertexFormat,Ce.DEFAULT),r=g(e._drawNearPlane,!0),s,a;t instanceof bi?(s=Pz,a=bi.packedLength):t instanceof an&&(s=Qat,a=an.packedLength),this._frustumType=s,this._frustum=t.clone(),this._origin=d.clone(i),this._orientation=ve.clone(n),this._drawNearPlane=r,this._vertexFormat=o,this._workerName="createFrustumGeometry",this.packedLength=2+a+d.packedLength+ve.packedLength+Ce.packedLength}M0.pack=function(e,t,n){C.typeOf.object("value",e),C.defined("array",t),n=g(n,0);let i=e._frustumType,o=e._frustum;return t[n++]=i,i===Pz?(bi.pack(o,t,n),n+=bi.packedLength):(an.pack(o,t,n),n+=an.packedLength),d.pack(e._origin,t,n),n+=d.packedLength,ve.pack(e._orientation,t,n),n+=ve.packedLength,Ce.pack(e._vertexFormat,t,n),n+=Ce.packedLength,t[n]=e._drawNearPlane?1:0,t};var ect=new bi,tct=new an,nct=new ve,ict=new d,oct=new Ce;M0.unpack=function(e,t,n){C.defined("array",e),t=g(t,0);let i=e[t++],o;i===Pz?(o=bi.unpack(e,t,ect),t+=bi.packedLength):(o=an.unpack(e,t,tct),t+=an.packedLength);let r=d.unpack(e,t,ict);t+=d.packedLength;let s=ve.unpack(e,t,nct);t+=ve.packedLength;let a=Ce.unpack(e,t,oct);t+=Ce.packedLength;let l=e[t]===1;if(!c(n))return new M0({frustum:o,origin:r,orientation:s,vertexFormat:a,_drawNearPlane:l});let u=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(u),n._frustumType=i,n._origin=d.clone(r,n._origin),n._orientation=ve.clone(s,n._orientation),n._vertexFormat=Ce.clone(a,n._vertexFormat),n._drawNearPlane=l,n};function rw(e,t,n,i,o,r,s,a){let l=e/3*2;for(let u=0;u<4;++u)c(t)&&(t[e]=r.x,t[e+1]=r.y,t[e+2]=r.z),c(n)&&(n[e]=s.x,n[e+1]=s.y,n[e+2]=s.z),c(i)&&(i[e]=a.x,i[e+1]=a.y,i[e+2]=a.z),e+=3;o[l]=0,o[l+1]=0,o[l+2]=1,o[l+3]=0,o[l+4]=1,o[l+5]=1,o[l+6]=0,o[l+7]=1}var rct=new q,sct=new N,AY=new N,M_e=new d,L_e=new d,N_e=new d,act=new d,cct=new d,lct=new d,by=new Array(3),oI=new Array(4);oI[0]=new ee(-1,-1,1,1);oI[1]=new ee(1,-1,1,1);oI[2]=new ee(1,1,1,1);oI[3]=new ee(-1,1,1,1);var F_e=new Array(4);for(let e=0;e<4;++e)F_e[e]=new ee;M0._computeNearFarPlanes=function(e,t,n,i,o,r,s,a){let l=q.fromQuaternion(t,rct),u=g(r,M_e),f=g(s,L_e),h=g(a,N_e);u=q.getColumn(l,0,u),f=q.getColumn(l,1,f),h=q.getColumn(l,2,h),d.normalize(u,u),d.normalize(f,f),d.normalize(h,h),d.negate(u,u);let m=N.computeView(e,h,f,u,sct),p,_,b=i.projectionMatrix;if(n===Pz){let x=N.multiply(b,m,AY);_=N.inverse(x,AY)}else p=N.inverseTransformation(m,AY);c(_)?(by[0]=i.near,by[1]=i.far):(by[0]=0,by[1]=i.near,by[2]=i.far);for(let x=0;x<2;++x)for(let T=0;T<4;++T){let E=ee.clone(oI[T],F_e[T]);if(c(_)){E=N.multiplyByVector(_,E,E);let S=1/E.w;d.multiplyByScalar(E,S,E),d.subtract(E,e,E),d.normalize(E,E);let A=d.dot(h,E);d.multiplyByScalar(E,by[x]/A,E),d.add(E,e,E)}else{let S=i.offCenterFrustum;c(S)&&(i=S);let A=by[x],v=by[x+1];E.x=(E.x*(i.right-i.left)+i.left+i.right)*.5,E.y=(E.y*(i.top-i.bottom)+i.bottom+i.top)*.5,E.z=(E.z*(A-v)-A-v)*.5,E.w=1,N.multiplyByVector(p,E,E)}o[12*x+T*3]=E.x,o[12*x+T*3+1]=E.y,o[12*x+T*3+2]=E.z}};M0.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=e._vertexFormat,a=r?6:5,l=new Float64Array(3*4*6);M0._computeNearFarPlanes(i,o,t,n,l);let u=3*4*2;l[u]=l[3*4],l[u+1]=l[3*4+1],l[u+2]=l[3*4+2],l[u+3]=l[0],l[u+4]=l[1],l[u+5]=l[2],l[u+6]=l[3*3],l[u+7]=l[3*3+1],l[u+8]=l[3*3+2],l[u+9]=l[3*7],l[u+10]=l[3*7+1],l[u+11]=l[3*7+2],u+=3*4,l[u]=l[3*5],l[u+1]=l[3*5+1],l[u+2]=l[3*5+2],l[u+3]=l[3],l[u+4]=l[4],l[u+5]=l[5],l[u+6]=l[0],l[u+7]=l[1],l[u+8]=l[2],l[u+9]=l[3*4],l[u+10]=l[3*4+1],l[u+11]=l[3*4+2],u+=3*4,l[u]=l[3],l[u+1]=l[4],l[u+2]=l[5],l[u+3]=l[3*5],l[u+4]=l[3*5+1],l[u+5]=l[3*5+2],l[u+6]=l[3*6],l[u+7]=l[3*6+1],l[u+8]=l[3*6+2],l[u+9]=l[3*2],l[u+10]=l[3*2+1],l[u+11]=l[3*2+2],u+=3*4,l[u]=l[3*2],l[u+1]=l[3*2+1],l[u+2]=l[3*2+2],l[u+3]=l[3*6],l[u+4]=l[3*6+1],l[u+5]=l[3*6+2],l[u+6]=l[3*7],l[u+7]=l[3*7+1],l[u+8]=l[3*7+2],l[u+9]=l[3*3],l[u+10]=l[3*3+1],l[u+11]=l[3*3+2],r||(l=l.subarray(3*4));let f=new fn({position:new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:l})});if(c(s.normal)||c(s.tangent)||c(s.bitangent)||c(s.st)){let m=c(s.normal)?new Float32Array(12*a):void 0,p=c(s.tangent)?new Float32Array(3*4*a):void 0,_=c(s.bitangent)?new Float32Array(3*4*a):void 0,b=c(s.st)?new Float32Array(2*4*a):void 0,x=M_e,T=L_e,E=N_e,S=d.negate(x,act),A=d.negate(T,cct),v=d.negate(E,lct);u=0,r&&(rw(u,m,p,_,b,v,x,T),u+=3*4),rw(u,m,p,_,b,E,S,T),u+=3*4,rw(u,m,p,_,b,S,v,T),u+=3*4,rw(u,m,p,_,b,A,v,S),u+=3*4,rw(u,m,p,_,b,x,E,T),u+=3*4,rw(u,m,p,_,b,T,E,S),c(m)&&(f.normal=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:m})),c(p)&&(f.tangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:p})),c(_)&&(f.bitangent=new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:_})),c(b)&&(f.st=new be({componentDatatype:j.FLOAT,componentsPerAttribute:2,values:b}))}let h=new Uint16Array(6*a);for(let m=0;m<a;++m){let p=m*6,_=m*4;h[p]=_,h[p+1]=_+1,h[p+2]=_+2,h[p+3]=_,h[p+4]=_+2,h[p+5]=_+3}return new st({attributes:f,indices:h,primitiveType:Se.TRIANGLES,boundingSphere:ne.fromVertices(l)})};var sw=M0;var vY=0,uct=1;function rI(e){C.typeOf.object("options",e),C.typeOf.object("options.frustum",e.frustum),C.typeOf.object("options.origin",e.origin),C.typeOf.object("options.orientation",e.orientation);let t=e.frustum,n=e.orientation,i=e.origin,o=g(e._drawNearPlane,!0),r,s;t instanceof bi?(r=vY,s=bi.packedLength):t instanceof an&&(r=uct,s=an.packedLength),this._frustumType=r,this._frustum=t.clone(),this._origin=d.clone(i),this._orientation=ve.clone(n),this._drawNearPlane=o,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+s+d.packedLength+ve.packedLength}rI.pack=function(e,t,n){C.typeOf.object("value",e),C.defined("array",t),n=g(n,0);let i=e._frustumType,o=e._frustum;return t[n++]=i,i===vY?(bi.pack(o,t,n),n+=bi.packedLength):(an.pack(o,t,n),n+=an.packedLength),d.pack(e._origin,t,n),n+=d.packedLength,ve.pack(e._orientation,t,n),n+=ve.packedLength,t[n]=e._drawNearPlane?1:0,t};var fct=new bi,dct=new an,hct=new ve,mct=new d;rI.unpack=function(e,t,n){C.defined("array",e),t=g(t,0);let i=e[t++],o;i===vY?(o=bi.unpack(e,t,fct),t+=bi.packedLength):(o=an.unpack(e,t,dct),t+=an.packedLength);let r=d.unpack(e,t,mct);t+=d.packedLength;let s=ve.unpack(e,t,hct);t+=ve.packedLength;let a=e[t]===1;if(!c(n))return new rI({frustum:o,origin:r,orientation:s,_drawNearPlane:a});let l=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(l),n._frustumType=i,n._origin=d.clone(r,n._origin),n._orientation=ve.clone(s,n._orientation),n._drawNearPlane=a,n};rI.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=new Float64Array(3*4*2);sw._computeNearFarPlanes(i,o,t,n,s);let a=new fn({position:new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:s})}),l,u,f=r?2:1,h=new Uint16Array(8*(f+1)),m=r?0:1;for(;m<2;++m)l=r?m*8:0,u=m*4,h[l]=u,h[l+1]=u+1,h[l+2]=u+1,h[l+3]=u+2,h[l+4]=u+2,h[l+5]=u+3,h[l+6]=u+3,h[l+7]=u;for(m=0;m<2;++m)l=(f+m)*8,u=m*4,h[l]=u,h[l+1]=u+4,h[l+2]=u+1,h[l+3]=u+5,h[l+4]=u+2,h[l+5]=u+6,h[l+6]=u+3,h[l+7]=u+7;return new st({attributes:a,indices:h,primitiveType:Se.LINES,boundingSphere:ne.fromVertices(s)})};var Rz=rI;function Mz(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.camera))throw new w("options.camera is required.");this._camera=e.camera,this._frustumSplits=e.frustumSplits,this._color=g(e.color,z.CYAN),this._updateOnChange=g(e.updateOnChange,!0),this.show=g(e.show,!0),this.id=e.id,this._id=void 0,this._outlinePrimitives=[],this._planesPrimitives=[]}var pct=new d,_ct=new q,gct=new ve,yct=new bi,bct=new gl,xct=new an,Tct=new No,Cct=new z,Ect=[1,1e5];Mz.prototype.update=function(e){if(!this.show)return;let t=this._planesPrimitives,n=this._outlinePrimitives,i,o;if(this._updateOnChange){for(o=t.length,i=0;i<o;++i)n[i]=n[i]&&n[i].destroy(),t[i]=t[i]&&t[i].destroy();t.length=0,n.length=0}if(t.length===0){let r=this._camera,s=r.frustum,a;s instanceof bi?a=yct:s instanceof gl?a=bct:s instanceof an?a=xct:a=Tct,a=s.clone(a);let l,u=this._frustumSplits;!c(u)||u.length<=1?(u=Ect,u[0]=this._camera.frustum.near,u[1]=this._camera.frustum.far,l=1):l=u.length-1;let f=r.positionWC,h=r.directionWC,m=r.upWC,p=r.rightWC;p=d.negate(p,pct);let _=_ct;q.setColumn(_,0,p,_),q.setColumn(_,1,m,_),q.setColumn(_,2,h,_);let b=ve.fromRotationMatrix(_,gct);for(t.length=n.length=l,i=0;i<l;++i)a.near=u[i],a.far=u[i+1],t[i]=new An({geometryInstances:new wt({geometry:new sw({origin:f,orientation:b,frustum:a,_drawNearPlane:i===0}),attributes:{color:Ht.fromColor(z.fromAlpha(this._color,.1,Cct))},id:this.id,pickPrimitive:this}),appearance:new nn({translucent:!0,flat:!0}),asynchronous:!1}),n[i]=new An({geometryInstances:new wt({geometry:new Rz({origin:f,orientation:b,frustum:a,_drawNearPlane:i===0}),attributes:{color:Ht.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new nn({translucent:!1,flat:!0}),asynchronous:!1})}for(o=t.length,i=0;i<o;++i)n[i].update(e),t[i].update(e)};Mz.prototype.isDestroyed=function(){return!1};Mz.prototype.destroy=function(){let e=this._planesPrimitives.length;for(let t=0;t<e;++t)this._outlinePrimitives[t]=this._outlinePrimitives[t]&&this._outlinePrimitives[t].destroy(),this._planesPrimitives[t]=this._planesPrimitives[t]&&this._planesPrimitives[t].destroy();return ue(this)};var Wp=Mz;var Lz=`in vec4 positionEC;
|
| void main()
| {
| vec3 position;
| vec3 direction;
| if (czm_orthographicIn3D == 1.0)
| {
| vec2 uv = (gl_FragCoord.xy - czm_viewport.xy) / czm_viewport.zw;
| vec2 minPlane = vec2(czm_frustumPlanes.z, czm_frustumPlanes.y); // left, bottom
| vec2 maxPlane = vec2(czm_frustumPlanes.w, czm_frustumPlanes.x); // right, top
| position = vec3(mix(minPlane, maxPlane, uv), 0.0);
| direction = vec3(0.0, 0.0, -1.0);
| }
| else
| {
| position = vec3(0.0);
| direction = normalize(positionEC.xyz);
| }
|
| czm_ray ray = czm_ray(position, direction);
|
| vec3 ellipsoid_center = czm_view[3].xyz;
|
| czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);
| if (!czm_isEmpty(intersection))
| {
| out_FragColor = vec4(1.0, 1.0, 0.0, 1.0);
| }
| else
| {
| discard;
| }
|
| czm_writeLogDepth();
| }
| `;var Nz=`in vec4 position;
|
| out vec4 positionEC;
|
| void main()
| {
| positionEC = czm_modelView * position;
| gl_Position = czm_modelViewProjection * position;
|
| czm_vertexLogDepth();
| }
| `;function aI(e){this._rs=void 0,this._sp=void 0,this._va=void 0,this._command=void 0,this._mode=void 0,this._useLogDepth=!1,this._ellipsoidOffset=g(e,0)}var sI=sn.supportsTypedArrays()?new Float32Array(12):[],B_e=new d,k_e=new d,DY=new d,U_e=new d,Fz=new d;function wct(e,t){let n=e.radii,i=t.camera,o,r,s;if(i.frustum instanceof an)o=d.ZERO,r=i.rightWC,s=i.upWC;else{let h=i.positionWC,m=d.multiplyComponents(e.oneOverRadii,h,B_e),p=d.normalize(m,k_e),_=d.normalize(d.cross(d.UNIT_Z,m,DY),DY),b=d.normalize(d.cross(p,_,U_e),U_e),x=d.magnitude(m),T=Math.sqrt(x*x-1);o=d.multiplyByScalar(p,1/x,B_e);let E=T/x;r=d.multiplyByScalar(_,E,k_e),s=d.multiplyByScalar(b,E,DY)}let a=d.add(o,s,Fz);d.subtract(a,r,a),d.multiplyComponents(n,a,a),d.pack(a,sI,0);let l=d.subtract(o,s,Fz);d.subtract(l,r,l),d.multiplyComponents(n,l,l),d.pack(l,sI,3);let u=d.add(o,s,Fz);d.add(u,r,u),d.multiplyComponents(n,u,u),d.pack(u,sI,6);let f=d.subtract(o,s,Fz);return d.add(f,r,f),d.multiplyComponents(n,f,f),d.pack(f,sI,9),sI}aI.prototype.update=function(e){if(this._mode=e.mode,e.mode!==J.SCENE3D)return;let t=e.context,n=e.mapProjection.ellipsoid.radii,i=new Z(n.x+this._ellipsoidOffset,n.y+this._ellipsoidOffset,n.z+this._ellipsoidOffset),o=e.useLogDepth;if(c(this._command)||(this._rs=Fe.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this._command=new Ke({renderState:this._rs,boundingVolume:new ne(d.ZERO,i.maximumRadius),pass:xe.OPAQUE,owner:this})),!c(this._sp)||this._useLogDepth!==o){this._useLogDepth=o;let s=new Be({sources:[Nz]}),a=new Be({sources:[Lz]});o&&(a.defines.push("LOG_DEPTH"),s.defines.push("LOG_DEPTH")),this._sp=en.replaceCache({shaderProgram:this._sp,context:t,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:{position:0}}),this._command.shaderProgram=this._sp}let r=wct(i,e);if(c(this._va))this._va.getAttribute(0).vertexBuffer.copyFromArrayView(r);else{let s=new st({attributes:{position:new be({componentDatatype:j.FLOAT,componentsPerAttribute:3,values:r})},indices:[0,1,2,2,1,3],primitiveType:Se.TRIANGLES});this._va=Zn.fromGeometry({context:t,geometry:s,attributeLocations:{position:0},bufferUsage:Pe.DYNAMIC_DRAW}),this._command.vertexArray=this._va}};aI.prototype.execute=function(e,t){this._mode===J.SCENE3D&&this._command.execute(e,t)};aI.prototype.isDestroyed=function(){return!1};aI.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()};var Bz=aI;function cw(){}var Sct=/\bgl_FragDepth\b/,Act=/\bdiscard\b/;function vct(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"depthOnly");if(c(n))return n;let i=t.fragmentShaderSource,o=!1,r=i.sources;for(let a=0;a<r.length;++a)if(Sct.test(r[a])||Act.test(r[a])){o=!0;break}let s=i.defines.indexOf("LOG_DEPTH")>=0;if(!o&&!s){let a=`void main()
| {
| out_FragColor = vec4(1.0);
| }
| `;i=new Be({sources:[a]})}else if(!o&&s){let a=`void main()
| {
| out_FragColor = vec4(1.0);
| czm_writeLogDepth();
| }
| `;i=new Be({defines:["LOG_DEPTH"],sources:[a]})}return e.shaderCache.createDerivedShaderProgram(t,"depthOnly",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:i,attributeLocations:t._attributeLocations})}function Dct(e,t){let n=e._depthOnlyRenderStateCache,i=n[t.id];if(c(i))return i;let o=Fe.getState(t);o.depthMask=!0,o.colorMask={red:!1,green:!1,blue:!1,alpha:!1};let r=Fe.fromCache(o);return n[t.id]=r,r}cw.createDepthOnlyDerivedCommand=function(e,t,n,i){var s,a;c(i)||(i={});let o=(s=i.depthOnlyCommand)==null?void 0:s.shaderProgram,r=(a=i.depthOnlyCommand)==null?void 0:a.renderState;return i.depthOnlyCommand=Ke.shallowClone(t,i.depthOnlyCommand),!c(o)||i.shaderProgramId!==t.shaderProgram.id?(i.depthOnlyCommand.shaderProgram=vct(n,t.shaderProgram),i.depthOnlyCommand.renderState=Dct(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.depthOnlyCommand.shaderProgram=o,i.depthOnlyCommand.renderState=r),i};var Ict=/\s+czm_writeLogDepth\(/,Oct=/\s+czm_vertexLogDepth\(/;function Pct(e,t){if(t.fragmentShaderSource.defines.indexOf("LOG_DEPTH_READ_ONLY")>=0)return t;let i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(c(i))return i;let o=t._attributeLocations,r=t.vertexShaderSource.clone(),s=t.fragmentShaderSource.clone();r.defines=c(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),s.defines=c(s.defines)?s.defines.slice(0):[],s.defines.push("LOG_DEPTH");let a=!1,l=r.sources;for(let f=0;f<l.length;++f)if(Oct.test(l[f])){a=!0;break}if(!a){for(let h=0;h<l.length;++h)l[h]=Be.replaceMain(l[h],"czm_log_depth_main");l.push(`
|
| void main()
| {
| czm_log_depth_main();
| czm_vertexLogDepth();
| }
| `)}l=s.sources,a=!1;for(let f=0;f<l.length;++f)Ict.test(l[f])&&(a=!0);s.defines.indexOf("LOG_DEPTH_WRITE")!==-1&&(a=!0);let u="";if(!a){for(let f=0;f<l.length;f++)l[f]=Be.replaceMain(l[f],"czm_log_depth_main");u=`
| void main()
| {
| czm_log_depth_main();
| czm_writeLogDepth();
| }
| `}return l.push(u),e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:o})}cw.createLogDepthCommand=function(e,t,n){var o;c(n)||(n={});let i=(o=n.command)==null?void 0:o.shaderProgram;return n.command=Ke.shallowClone(e,n.command),!c(i)||n.shaderProgramId!==e.shaderProgram.id?(n.command.shaderProgram=Pct(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id):n.command.shaderProgram=i,n};function Rct(e,t,n){let i=e.shaderCache.getDerivedShaderProgram(t,"pick");if(c(i))return i;let o=t._attributeLocations,{sources:r,defines:s}=t.fragmentShaderSource,l=r.some(p=>p.includes("out_FragData"))?"out_FragData_0":"out_FragColor",u=`void main ()
| {
| czm_non_pick_main();
| if (${l}.a == 0.0) {
| discard;
| }
| ${l} = ${n};
| } `,f=r.length,h=new Array(f+1);for(let p=0;p<f;++p)h[p]=Be.replaceMain(r[p],"czm_non_pick_main");h[f]=u;let m=new Be({sources:h,defines:s});return e.shaderCache.createDerivedShaderProgram(t,"pick",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:m,attributeLocations:o})}function z_e(e,t){let n=e.picking.pickRenderStateCache,i=n[t.id];if(c(i))return i;let o=Fe.getState(t);o.blending.enabled=!1,o.depthMask=!0;let r=Fe.fromCache(o);return n[t.id]=r,r}cw.createPickDerivedCommand=function(e,t,n,i){var s,a;c(i)||(i={});let o=(s=i.pickCommand)==null?void 0:s.shaderProgram,r=(a=i.pickCommand)==null?void 0:a.renderState;return i.pickCommand=Ke.shallowClone(t,i.pickCommand),!c(o)||i.shaderProgramId!==t.shaderProgram.id?(i.pickCommand.shaderProgram=Rct(n,t.shaderProgram,t.pickId),i.pickCommand.renderState=z_e(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.pickCommand.shaderProgram=o,i.pickCommand.renderState=r),i};function aw(e,t,n){let i=e.length;for(let o=0;o<i;o++)e[o].trimStart().split(/\s+/)[0]===t&&(e[o]=`${t} ${n}`)}function V_e(e){return e.isArray?e.arrayLength:Ct.getComponentCount(e.type)}function Mct(e){let t=V_e(e);return e.normalized?t===1?"float":`vec${t}`:t===1?"int":`ivec${t}`}function Lct(e,t,n){let i=n.schemaId,o=n.className,r=n.propertyName,s=`pickMetadata-${i}-${o}-${r}`,a=e.shaderCache.getDerivedShaderProgram(t,s);if(c(a))return a;let l=n.classProperty,u=Mct(l),f=["0.0","0.0","0.0","0.0"],h=V_e(l);if(h===1)f[0]="float(value)";else{let b=["x","y","z","w"];for(let x=0;x<h;x++){let E=`value.${b[x]}`;f[x]=`float(${E})`}}if(!l.normalized)for(let b=0;b<h;b++)f[b]+=" / 255.0";let m=t.fragmentShaderSource.defines.slice();m.push(Yu.METADATA_PICKING_ENABLED),aw(m,Yu.METADATA_PICKING_VALUE_TYPE,u),aw(m,Yu.METADATA_PICKING_VALUE_STRING,`metadata.${r}`),aw(m,Yu.METADATA_PICKING_VALUE_COMPONENT_X,f[0]),aw(m,Yu.METADATA_PICKING_VALUE_COMPONENT_Y,f[1]),aw(m,Yu.METADATA_PICKING_VALUE_COMPONENT_Z,f[2]),aw(m,Yu.METADATA_PICKING_VALUE_COMPONENT_W,f[3]);let p=new Be({sources:t.fragmentShaderSource.sources,defines:m});return e.shaderCache.createDerivedShaderProgram(t,s,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:p,attributeLocations:t._attributeLocations})}cw.createPickMetadataDerivedCommand=function(e,t,n,i){return c(i)||(i={}),i.pickMetadataCommand=Ke.shallowClone(t,i.pickMetadataCommand),i.pickMetadataCommand.shaderProgram=Lct(n,t.shaderProgram,t.pickedMetadataInfo),i.pickMetadataCommand.renderState=z_e(e,t.renderState),i.shaderProgramId=t.shaderProgram.id,i};function Nct(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"HDR");if(c(n))return n;let i=t._attributeLocations,o=t.vertexShaderSource.clone(),r=t.fragmentShaderSource.clone();return o.defines=c(o.defines)?o.defines.slice(0):[],o.defines.push("HDR"),r.defines=c(r.defines)?r.defines.slice(0):[],r.defines.push("HDR"),e.shaderCache.createDerivedShaderProgram(t,"HDR",{vertexShaderSource:o,fragmentShaderSource:r,attributeLocations:i})}cw.createHdrCommand=function(e,t,n){var o;c(n)||(n={});let i=(o=n.command)==null?void 0:o.shaderProgram;return n.command=Ke.shallowClone(e,n.command),!c(i)||n.shaderProgramId!==e.shaderProgram.id?(n.command.shaderProgram=Nct(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id):n.command.shaderProgram=i,n};var qp=cw;function kz(e){if(!c(e))throw new w("scene is required.");this._scene=e,this._lastAlpha=void 0,this._lastBeta=void 0,this._lastGamma=void 0,this._alpha=void 0,this._beta=void 0,this._gamma=void 0;let t=this;function n(i){let o=i.alpha;if(!c(o)){t._alpha=void 0,t._beta=void 0,t._gamma=void 0;return}t._alpha=O.toRadians(o),t._beta=O.toRadians(i.beta),t._gamma=O.toRadians(i.gamma)}window.addEventListener("deviceorientation",n,!1),this._removeListener=function(){window.removeEventListener("deviceorientation",n,!1)}}var Fct=new ve,H_e=new ve,Bct=new q;function kct(e,t,n,i){let o=e.direction,r=e.right,s=e.up,a=ve.fromAxisAngle(o,n,H_e),l=ve.fromAxisAngle(r,i,Fct),u=ve.multiply(l,a,l),f=ve.fromAxisAngle(s,t,H_e);ve.multiply(f,u,u);let h=q.fromQuaternion(u,Bct);q.multiplyByVector(h,r,r),q.multiplyByVector(h,s,s),q.multiplyByVector(h,o,o)}kz.prototype.update=function(){if(!c(this._alpha))return;c(this._lastAlpha)||(this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma);let e=this._lastAlpha-this._alpha,t=this._lastBeta-this._beta,n=this._lastGamma-this._gamma;kct(this._scene.camera,-e,t,n),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma};kz.prototype.isDestroyed=function(){return!1};kz.prototype.destroy=function(){return this._removeListener(),ue(this)};var Uz=kz;function IY(){this.enabled=!0,this.renderable=!0,this.density=6e-4,this.heightScalar=.001,this._heightFalloff=.59,this.maxHeight=8e5,this.visualDensityScalar=.15,this.screenSpaceErrorFactor=2,this.minimumBrightness=.03}Object.defineProperties(IY.prototype,{heightFalloff:{get:function(){return this._heightFalloff},set:function(e){if(c(e)&&e<0)throw new w("value must be positive.");this._heightFalloff=e}}});var Uct=new d;IY.prototype.update=function(e){if(!(e.fog.enabled=this.enabled))return;e.fog.renderable=this.renderable;let n=e.camera,i=n.positionCartographic;if(!c(i)||i.height>this.maxHeight||e.mode!==J.SCENE3D){e.fog.enabled=!1,e.fog.density=0;return}let o=i.height,r=this.density*this.heightScalar*Math.pow(Math.max(o/this.maxHeight,O.EPSILON4),-Math.max(this._heightFalloff,0)),s=d.normalize(n.positionWC,Uct),a=Math.abs(d.dot(n.directionWC,s));r*=1-a,e.fog.density=r,e.fog.visualDensityScalar=this.visualDensityScalar,e.fog.sse=this.screenSpaceErrorFactor,e.fog.minimumBrightness=this.minimumBrightness};var zz=IY;function zct(e,t,n){this.context=e,this.commandList=[],this.shadowMaps=[],this.brdfLutGenerator=void 0,this.environmentMap=void 0,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this.specularEnvironmentMapsMaximumLOD=void 0,this.mode=J.SCENE3D,this.morphTime=J.getMorphTime(J.SCENE3D),this.frameNumber=0,this.newFrame=!1,this.time=void 0,this.jobScheduler=n,this.mapProjection=void 0,this.camera=void 0,this.cameraUnderground=!1,this.globeTranslucencyState=void 0,this.cullingVolume=void 0,this.occluder=void 0,this.maximumScreenSpaceError=void 0,this.pixelRatio=1,this.passes={render:!1,pick:!1,pickVoxel:!1,depth:!1,postProcess:!1,offscreen:!1},this.creditDisplay=t,this.afterRender=[],this.scene3DOnly=!1,this.fog={enabled:!1,renderable:!1,density:void 0,visualDensityScalar:void 0,sse:void 0,minimumBrightness:void 0},this.atmosphere=void 0,this.verticalExaggeration=1,this.verticalExaggerationRelativeHeight=0,this.shadowState={shadowsEnabled:!0,shadowMaps:[],lightShadowMaps:[],nearPlane:1,farPlane:5e3,closestObjectSize:1e3,lastDirtyTime:0,outOfView:!0},this.splitPosition=0,this.frustumSplits=[],this.backgroundColor=void 0,this.light=void 0,this.minimumDisableDepthTestDistance=void 0,this.invertClassification=!1,this.invertClassificationColor=void 0,this.useLogDepth=!1,this.tilesetPassState=void 0,this.minimumTerrainHeight=0,this.pickingMetadata=!1,this.pickedMetadataInfo=void 0}var Vz=zct;var ea={OPAQUE_FRONT_FACE:0,OPAQUE_BACK_FACE:1,DEPTH_ONLY_FRONT_FACE:2,DEPTH_ONLY_BACK_FACE:3,DEPTH_ONLY_FRONT_AND_BACK_FACE:4,TRANSLUCENT_FRONT_FACE:5,TRANSLUCENT_BACK_FACE:6,TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:7,TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:8,PICK_FRONT_FACE:9,PICK_BACK_FACE:10,DERIVED_COMMANDS_MAXIMUM_LENGTH:11},L0=ea.DERIVED_COMMANDS_MAXIMUM_LENGTH,J_e=["opaqueFrontFaceCommand","opaqueBackFaceCommand","depthOnlyFrontFaceCommand","depthOnlyBackFaceCommand","depthOnlyFrontAndBackFaceCommand","translucentFrontFaceCommand","translucentBackFaceCommand","translucentFrontFaceManualDepthTestCommand","translucentBackFaceManualDepthTestCommand","pickFrontFaceCommand","pickBackFaceCommand"];function N0(){this._frontFaceAlphaByDistance=new Bt(0,1,0,1),this._backFaceAlphaByDistance=new Bt(0,1,0,1),this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._requiresManualDepthTest=!1,this._sunVisibleThroughGlobe=!1,this._environmentVisible=!1,this._useDepthPlane=!1,this._numberOfTextureUniforms=0,this._globeTranslucencyFramebuffer=void 0,this._rectangle=te.clone(te.MAX_VALUE),this._derivedCommandKey=0,this._derivedCommandsDirty=!1,this._derivedCommandPacks=void 0,this._derivedCommandTypes=new Array(L0),this._derivedBlendCommandTypes=new Array(L0),this._derivedPickCommandTypes=new Array(L0),this._derivedCommandTypesToUpdate=new Array(L0),this._derivedCommandsLength=0,this._derivedBlendCommandsLength=0,this._derivedPickCommandsLength=0,this._derivedCommandsToUpdateLength=0}Object.defineProperties(N0.prototype,{frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance}},translucent:{get:function(){return this._frontFaceTranslucent}},sunVisibleThroughGlobe:{get:function(){return this._sunVisibleThroughGlobe}},environmentVisible:{get:function(){return this._environmentVisible}},useDepthPlane:{get:function(){return this._useDepthPlane}},numberOfTextureUniforms:{get:function(){return this._numberOfTextureUniforms}},rectangle:{get:function(){return this._rectangle}}});N0.prototype.update=function(e){let t=e.globe;if(!c(t)||!t.show){this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._sunVisibleThroughGlobe=!0,this._environmentVisible=!0,this._useDepthPlane=!1;return}this._frontFaceAlphaByDistance=G_e(t.translucency.enabled,t.translucency.frontFaceAlpha,t.translucency.frontFaceAlphaByDistance,this._frontFaceAlphaByDistance),this._backFaceAlphaByDistance=G_e(t.translucency.enabled,t.translucency.backFaceAlpha,t.translucency.backFaceAlphaByDistance,this._backFaceAlphaByDistance),this._frontFaceTranslucent=j_e(t.translucency.enabled,this._frontFaceAlphaByDistance,t),this._backFaceTranslucent=j_e(t.translucency.enabled,this._backFaceAlphaByDistance,t),this._requiresManualDepthTest=jct(this,e,t),this._sunVisibleThroughGlobe=Vct(this,e),this._environmentVisible=Hct(this,e),this._useDepthPlane=Gct(this,e),this._numberOfTextureUniforms=Wct(this),this._rectangle=te.clone(t.translucency.rectangle,this._rectangle),qct(this,e)};function G_e(e,t,n,i){return e?c(n)?(Bt.clone(n,i),i.nearValue*=t,i.farValue*=t,i):(i.nearValue=t,i.farValue=t,i):(i.nearValue=1,i.farValue=1,i)}function j_e(e,t,n){return e&&(n.baseColor.alpha<1||t.nearValue<1||t.farValue<1)}function Vct(e,t){let n=e._frontFaceTranslucent,i=e._backFaceTranslucent;return n&&(t.cameraUnderground||i)}function Hct(e,t){return!t.cameraUnderground||e._frontFaceTranslucent}function Gct(e,t){return!t.cameraUnderground&&!e._frontFaceTranslucent}function jct(e,t,n){return e._frontFaceTranslucent&&!e._backFaceTranslucent&&!n.depthTestAgainstTerrain&&t.mode!==J.SCENE2D&&t.context.depthTexture}function Wct(e){let t=0;return e._frontFaceTranslucent&&++t,e._requiresManualDepthTest&&++t,t}function qct(e,t){e._derivedCommandsLength=OY(e,t,!1,!1,e._derivedCommandTypes),e._derivedBlendCommandsLength=OY(e,t,!0,!1,e._derivedBlendCommandTypes),e._derivedPickCommandsLength=OY(e,t,!1,!0,e._derivedPickCommandTypes);let n,i=0;for(n=0;n<e._derivedCommandsLength;++n)i|=1<<e._derivedCommandTypes[n];for(n=0;n<e._derivedBlendCommandsLength;++n)i|=1<<e._derivedBlendCommandTypes[n];for(n=0;n<e._derivedPickCommandsLength;++n)i|=1<<e._derivedPickCommandTypes[n];let o=0;for(n=0;n<L0;++n)(i&1<<n)>0&&(e._derivedCommandTypesToUpdate[o++]=n);e._derivedCommandsToUpdateLength=o;let r=i!==e._derivedCommandKey;e._derivedCommandKey=i,e._derivedCommandsDirty=r,!c(e._derivedCommandPacks)&&e._frontFaceTranslucent&&(e._derivedCommandPacks=alt())}function OY(e,t,n,i,o){let r=0,s=e._frontFaceTranslucent,a=e._backFaceTranslucent;if(!s)return r;let l=t.cameraUnderground,u=e._requiresManualDepthTest,f=i?ea.PICK_FRONT_FACE:u?ea.TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:ea.TRANSLUCENT_FRONT_FACE,h=i?ea.PICK_BACK_FACE:u?ea.TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:ea.TRANSLUCENT_BACK_FACE;return t.mode===J.SCENE2D?(o[r++]=ea.DEPTH_ONLY_FRONT_FACE,o[r++]=f,r):(a?(n||(o[r++]=ea.DEPTH_ONLY_FRONT_AND_BACK_FACE),l?(o[r++]=f,o[r++]=h):(o[r++]=h,o[r++]=f)):l?(n||(o[r++]=ea.DEPTH_ONLY_BACK_FACE),o[r++]=ea.OPAQUE_FRONT_FACE,o[r++]=h):(n||(o[r++]=ea.DEPTH_ONLY_FRONT_FACE),o[r++]=ea.OPAQUE_BACK_FACE,o[r++]=f),r)}function wf(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function W_e(e,t){return e.indexOf(t)>-1}function Yct(e,t){wf(e.defines,"TRANSLUCENT"),wf(t.defines,"TRANSLUCENT")}function Xct(e,t){wf(e.defines,"GROUND_ATMOSPHERE"),wf(t.defines,"GROUND_ATMOSPHERE"),wf(e.defines,"FOG"),wf(t.defines,"FOG"),wf(e.defines,"TRANSLUCENT"),wf(t.defines,"TRANSLUCENT")}function PY(e,t){if(W_e(t.defines,"TILE_LIMIT_RECTANGLE")||W_e(t.defines,"ENABLE_CLIPPING_PLANES"))return;let n=`void main()
| {
| out_FragColor = vec4(1.0);
| }
| `;t.sources=[n]}function RY(e,t){let n=t.sources,i=n.length;for(let r=0;r<i;++r)n[r]=Be.replaceMain(n[r],"czm_globe_translucency_main");n.push(`
|
| uniform sampler2D u_classificationTexture;
| void main()
| {
| vec2 st = gl_FragCoord.xy / czm_viewport.zw;
| #ifdef MANUAL_DEPTH_TEST
| float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st));
| if (logDepthOrDepth != 0.0)
| {
| vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
| float depthEC = eyeCoordinate.z / eyeCoordinate.w;
| if (v_positionEC.z < depthEC)
| {
| discard;
| }
| }
| #endif
| czm_globe_translucency_main();
| vec4 classificationColor = texture(u_classificationTexture, st);
| if (classificationColor.a > 0.0)
| {
| // Reverse premultiplication process to get the correct composited result of the classification primitives
| classificationColor.rgb /= classificationColor.a;
| }
| out_FragColor = classificationColor * vec4(classificationColor.aaa, 1.0) + out_FragColor * (1.0 - classificationColor.a);
| }
| `)}function Q_e(e,t){RY(e,t),wf(e.defines,"GROUND_ATMOSPHERE"),wf(t.defines,"GROUND_ATMOSPHERE"),wf(e.defines,"FOG"),wf(t.defines,"FOG")}function Kct(e,t){RY(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function $ct(e,t){Q_e(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function q_e(e,t){let n=`uniform sampler2D u_classificationTexture;
| void main()
| {
| vec2 st = gl_FragCoord.xy / czm_viewport.zw;
| vec4 pickColor = texture(u_classificationTexture, st);
| if (pickColor == vec4(0.0))
| {
| discard;
| }
| out_FragColor = pickColor;
| }
| `;t.sources=[n]}function Zct(e,t,n,i,o,r){if(!c(o))return t;if(!i&&c(n))return n;let s=e.shaderCache.getDerivedShaderProgram(t,r);if(!c(s)){let a=t._attributeLocations,l=t.vertexShaderSource.clone(),u=t.fragmentShaderSource.clone();l.defines=c(l.defines)?l.defines.slice(0):[],u.defines=c(u.defines)?u.defines.slice(0):[],o(l,u),s=e.shaderCache.createDerivedShaderProgram(t,r,{vertexShaderSource:l,fragmentShaderSource:u,attributeLocations:a})}return s}function Jct(e){e.cull.face=pi.BACK,e.cull.enabled=!0}function Qct(e){e.cull.face=pi.FRONT,e.cull.enabled=!0}function elt(e){e.cull.face=pi.BACK,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function tlt(e){e.cull.face=pi.FRONT,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function nlt(e){e.cull.enabled=!1,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function Y_e(e){e.cull.face=pi.BACK,e.cull.enabled=!0,e.depthMask=!1,e.blending=cn.ALPHA_BLEND}function X_e(e){e.cull.face=pi.FRONT,e.cull.enabled=!0,e.depthMask=!1,e.blending=cn.ALPHA_BLEND}function ilt(e){e.cull.face=pi.BACK,e.cull.enabled=!0,e.blending.enabled=!1}function olt(e){e.cull.face=pi.FRONT,e.cull.enabled=!0,e.blending.enabled=!1}function rlt(e,t,n,i,o){if(!c(i))return e;if(!n&&c(t))return t;let r=o[e.id];if(!c(r)){let s=Fe.getState(e);i(s),r=Fe.fromCache(s),o[e.id]=r}return r}function lw(e){return{u_classificationTexture:function(){return e._globeTranslucencyFramebuffer.classificationTexture}}}function slt(e,t,n,i,o){return c(o)?!i&&c(n)?n:bt(t,o(e),!1):t}function Fd(e){this.pass=e.pass,this.pickOnly=e.pickOnly,this.getShaderProgramFunction=e.getShaderProgramFunction,this.getRenderStateFunction=e.getRenderStateFunction,this.getUniformMapFunction=e.getUniformMapFunction,this.renderStateCache={}}function alt(){return[new Fd({pass:xe.GLOBE,pickOnly:!1,getShaderProgramFunction:Yct,getRenderStateFunction:Jct,getUniformMapFunction:void 0}),new Fd({pass:xe.GLOBE,pickOnly:!1,getShaderProgramFunction:Xct,getRenderStateFunction:Qct,getUniformMapFunction:void 0}),new Fd({pass:xe.GLOBE,pickOnly:!1,getShaderProgramFunction:PY,getRenderStateFunction:elt,getUniformMapFunction:void 0}),new Fd({pass:xe.GLOBE,pickOnly:!1,getShaderProgramFunction:PY,getRenderStateFunction:tlt,getUniformMapFunction:void 0}),new Fd({pass:xe.GLOBE,pickOnly:!1,getShaderProgramFunction:PY,getRenderStateFunction:nlt,getUniformMapFunction:void 0}),new Fd({pass:xe.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:RY,getRenderStateFunction:Y_e,getUniformMapFunction:lw}),new Fd({pass:xe.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:Q_e,getRenderStateFunction:X_e,getUniformMapFunction:lw}),new Fd({pass:xe.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:Kct,getRenderStateFunction:Y_e,getUniformMapFunction:lw}),new Fd({pass:xe.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:$ct,getRenderStateFunction:X_e,getUniformMapFunction:lw}),new Fd({pass:xe.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:q_e,getRenderStateFunction:ilt,getUniformMapFunction:lw}),new Fd({pass:xe.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:q_e,getRenderStateFunction:olt,getUniformMapFunction:lw})]}var K_e=new Array(L0),$_e=new Array(L0);N0.prototype.updateDerivedCommands=function(e,t){let n=this._derivedCommandTypesToUpdate,i=this._derivedCommandsToUpdateLength;if(i!==0){for(let o=0;o<i;++o)$_e[o]=this._derivedCommandPacks[n[o]],K_e[o]=J_e[n[o]];clt(this,e,i,n,K_e,$_e,t)}};function clt(e,t,n,i,o,r,s){let a=t.derivedCommands.globeTranslucency,l=e._derivedCommandsDirty;if(t.dirty||!c(a)||l){t.dirty=!1,c(a)||(a={},t.derivedCommands.globeTranslucency=a);let u=s.frameNumber,f=g(a.uniformMapDirtyFrame,0),h=g(a.shaderProgramDirtyFrame,0),m=g(a.renderStateDirtyFrame,0),p=a.uniformMap!==t.uniformMap,_=a.shaderProgramId!==t.shaderProgram.id,b=a.renderStateId!==t.renderState.id;p&&(a.uniformMapDirtyFrame=u),_&&(a.shaderProgramDirtyFrame=u),b&&(a.renderStateDirtyFrame=u),a.uniformMap=t.uniformMap,a.shaderProgramId=t.shaderProgram.id,a.renderStateId=t.renderState.id;for(let x=0;x<n;++x){let T=r[x],E=i[x],S=o[x],A=a[S],v,D,R;c(A)?(v=A.uniformMap,D=A.shaderProgram,R=A.renderState):(v=void 0,D=void 0,R=void 0),A=Ke.shallowClone(t,A),a[S]=A;let P=g(A.derivedCommands.uniformMapDirtyFrame,0),L=g(A.derivedCommands.shaderProgramDirtyFrame,0),F=g(A.derivedCommands.renderStateDirtyFrame,0),y=p||P<f,I=_||L<h,M=b||F<m;y&&(A.derivedCommands.uniformMapDirtyFrame=u),I&&(A.derivedCommands.shaderProgramDirtyFrame=u),M&&(A.derivedCommands.renderStateDirtyFrame=u),A.derivedCommands.type=E,A.pass=T.pass,A.pickOnly=T.pickOnly,A.uniformMap=slt(e,t.uniformMap,v,y,T.getUniformMapFunction),A.shaderProgram=Zct(s.context,t.shaderProgram,D,I,T.getShaderProgramFunction,S),A.renderState=rlt(t.renderState,R,M,T.getRenderStateFunction,T.renderStateCache)}}}N0.prototype.pushDerivedCommands=function(e,t,n){let i=n.passes.pick||n.passes.pickVoxel;if(i&&t)return;let o=this._derivedCommandTypes,r=this._derivedCommandsLength;if(i?(o=this._derivedPickCommandTypes,r=this._derivedPickCommandsLength):t&&(o=this._derivedBlendCommandTypes,r=this._derivedBlendCommandsLength),r===0){n.commandList.push(e);return}let s=e.derivedCommands.globeTranslucency;for(let a=0;a<r;++a){let l=J_e[o[a]];n.commandList.push(s[l])}};function ege(e,t,n,i,o,r){for(let s=0;s<t;++s){let a=e[s],l=a.derivedCommands.type;(!c(r)||r.indexOf(l)>-1)&&n(a,i,o)}}function Z_e(e,t,n,i,o){for(let r=0;r<t;++r)n(e[r],i,o)}var llt=[ea.OPAQUE_FRONT_FACE,ea.OPAQUE_BACK_FACE],ult=[ea.DEPTH_ONLY_FRONT_FACE,ea.DEPTH_ONLY_BACK_FACE,ea.DEPTH_ONLY_FRONT_AND_BACK_FACE];N0.prototype.executeGlobeCommands=function(e,t,n,i,o){let r=i.context,s=e.commands[xe.GLOBE],a=e.indices[xe.GLOBE];a!==0&&(this._globeTranslucencyFramebuffer=n,n.clearClassification(r,o),ege(s,a,t,i,o,llt))};N0.prototype.executeGlobeClassificationCommands=function(e,t,n,i,o){let{context:r}=i,{uniformState:s}=r,a=e.commands[xe.GLOBE],l=e.indices[xe.GLOBE],u=e.commands[xe.TERRAIN_CLASSIFICATION],f=e.indices[xe.TERRAIN_CLASSIFICATION];if(l===0||f===0)return;let h=this._frontFaceTranslucent,m=this._backFaceTranslucent;if((!h||!m)&&Z_e(u,f,t,i,o),!h&&!m)return;this._globeTranslucencyFramebuffer=n;let p=s.globeDepthTexture,_=o.framebuffer;if(o.framebuffer=n.classificationFramebuffer,ege(a,l,t,i,o,ult),r.depthTexture){let b=n.packDepth(r,o);s.globeDepthTexture=b}Z_e(u,f,t,i,o),s.globeDepthTexture=p,o.framebuffer=_};var Hz=N0;var du=`uniform sampler2D colorTexture;
|
| in vec2 v_textureCoordinates;
|
| void main()
| {
| out_FragColor = texture(colorTexture, v_textureCoordinates);
| }
| `;function lm(){this._numSamples=1,this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._fbo=new ui({depthStencil:!0,createDepthAttachments:!1}),this._fboClassified=new ui({depthStencil:!0,createDepthAttachments:!1}),this._rsUnclassified=void 0,this._rsClassified=void 0,this._unclassifiedCommand=void 0,this._classifiedCommand=void 0,this._translucentCommand=void 0,this._clearColorCommand=new $n({color:new z(0,0,0,0),owner:this}),this._clearCommand=new $n({color:new z(0,0,0,0),depth:1,stencil:0});let e=this;this._uniformMap={colorTexture:function(){return e._fbo.getColorTexture()},depthTexture:function(){return e._depthStencilTexture},classifiedTexture:function(){return e._fboClassified.getColorTexture()}}}Object.defineProperties(lm.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}});lm.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};var flt={depthMask:!1,stencilTest:{enabled:!0,frontFunction:Nn.EQUAL,frontOperation:{fail:ut.KEEP,zFail:ut.KEEP,zPass:ut.KEEP},backFunction:Nn.NEVER,reference:0,mask:kt.CLASSIFICATION_MASK},blending:cn.ALPHA_BLEND},dlt={depthMask:!1,stencilTest:{enabled:!0,frontFunction:Nn.NOT_EQUAL,frontOperation:{fail:ut.KEEP,zFail:ut.KEEP,zPass:ut.KEEP},backFunction:Nn.NEVER,reference:0,mask:kt.CLASSIFICATION_MASK},blending:cn.ALPHA_BLEND},hlt={depthMask:!0,depthTest:{enabled:!0},stencilTest:kt.setCesium3DTileBit(),stencilMask:kt.CESIUM_3D_TILE_MASK,blending:cn.ALPHA_BLEND},mlt=`uniform sampler2D colorTexture;
| uniform sampler2D depthTexture;
| uniform sampler2D classifiedTexture;
| in vec2 v_textureCoordinates;
| void main()
| {
| vec4 color = texture(colorTexture, v_textureCoordinates);
| if (color.a == 0.0)
| {
| discard;
| }
| bool isClassified = all(equal(texture(classifiedTexture, v_textureCoordinates), vec4(0.0)));
| #ifdef UNCLASSIFIED
| vec4 highlightColor = czm_invertClassificationColor;
| if (isClassified)
| {
| discard;
| }
| #else
| vec4 highlightColor = vec4(1.0);
| if (!isClassified)
| {
| discard;
| }
| #endif
| out_FragColor = color * highlightColor;
| gl_FragDepth = texture(depthTexture, v_textureCoordinates).r;
| }
| `,plt=`uniform sampler2D colorTexture;
| in vec2 v_textureCoordinates;
| void main()
| {
| vec4 color = texture(colorTexture, v_textureCoordinates);
| if (color.a == 0.0)
| {
| discard;
| }
| #ifdef UNCLASSIFIED
| out_FragColor = color * czm_invertClassificationColor;
| #else
| out_FragColor = color;
| #endif
| }
| `;lm.prototype.update=function(e,t,n){let i=this._fbo.getColorTexture(),o=this.previousFramebuffer!==this._previousFramebuffer;this._previousFramebuffer=this.previousFramebuffer;let r=this._numSamples!==t,s=e.drawingBufferWidth,a=e.drawingBufferHeight,l=!c(i)||i.width!==s||i.height!==a;if((l||o||r)&&(this._numSamples=t,this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy(),c(this._previousFramebuffer)||(this._depthStencilTexture=new Ot({context:e,width:s,height:a,pixelFormat:Re.DEPTH_STENCIL,pixelDatatype:Ne.UNSIGNED_INT_24_8}),t>1&&(this._depthStencilRenderbuffer=new Pu({context:e,width:s,height:a,format:oc.DEPTH24_STENCIL8,numSamples:t})))),!c(this._fbo.framebuffer)||l||o||r){this._fbo.destroy(),this._fboClassified.destroy();let u,f;c(this._previousFramebuffer)?(u=n.getDepthStencilTexture(),f=n.getDepthStencilRenderbuffer()):(u=this._depthStencilTexture,f=this._depthStencilRenderbuffer),this._fbo.setDepthStencilTexture(u),c(f)&&this._fbo.setDepthStencilRenderbuffer(f),this._fbo.update(e,s,a,t),c(this._previousFramebuffer)||(this._fboClassified.setDepthStencilTexture(u),this._fboClassified.update(e,s,a))}if(c(this._rsUnclassified)||(this._rsUnclassified=Fe.fromCache(flt),this._rsClassified=Fe.fromCache(dlt),this._rsDefault=Fe.fromCache(hlt)),!c(this._unclassifiedCommand)||o||r){c(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy());let u=c(this._previousFramebuffer)?plt:mlt,f=new Be({defines:["UNCLASSIFIED"],sources:[u]}),h=new Be({sources:[u]});this._unclassifiedCommand=e.createViewportQuadCommand(f,{renderState:c(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(h,{renderState:c(this._previousFramebuffer)?this._rsClassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),c(this._translucentCommand)&&(this._translucentCommand.shaderProgram=this._translucentCommand.shaderProgram&&this._translucentCommand.shaderProgram.destroy()),c(this._previousFramebuffer)||(this._translucentCommand=e.createViewportQuadCommand(du,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this}))}};lm.prototype.prepareTextures=function(e,t){this._fbo._numSamples>1&&this._fbo.prepareTextures(e,t)};lm.prototype.clear=function(e,t){c(this._previousFramebuffer)?this._fbo.clear(e,this._clearColorCommand,t):(this._fbo.clear(e,this._clearCommand,t),this._fboClassified.clear(e,this._clearCommand,t))};lm.prototype.executeClassified=function(e,t){if(!c(this._previousFramebuffer)){let n=t.framebuffer;this.prepareTextures(e,!0),t.framebuffer=this._fboClassified.framebuffer,this._translucentCommand.execute(e,t),t.framebuffer=n}this._classifiedCommand.execute(e,t)};lm.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)};lm.prototype.isDestroyed=function(){return!1};lm.prototype.destroy=function(){return this._fbo.destroy(),this._fboClassified.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy(),c(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy()),ue(this)};var cI=lm;function Gz(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}Object.defineProperties(Gz.prototype,{total:{get:function(){return this._total}}});function xy(e){if(c(e)&&e.length!==ca.NUMBER_OF_JOB_TYPES)throw new w("A budget must be specified for each job type; budgets.length should equal JobType.NUMBER_OF_JOB_TYPES.");let t=new Array(ca.NUMBER_OF_JOB_TYPES);t[ca.TEXTURE]=new Gz(c(e)?e[ca.TEXTURE]:10),t[ca.PROGRAM]=new Gz(c(e)?e[ca.PROGRAM]:10),t[ca.BUFFER]=new Gz(c(e)?e[ca.BUFFER]:30);let n=t.length,i,o=0;for(i=0;i<n;++i)o+=t[i].total;let r=new Array(n);for(i=0;i<n;++i)r[i]=!1;this._totalBudget=o,this._totalUsedThisFrame=0,this._budgets=t,this._executedThisFrame=r}xy.getTimestamp=yi;Object.defineProperties(xy.prototype,{totalBudget:{get:function(){return this._totalBudget}}});xy.prototype.disableThisFrame=function(){this._totalUsedThisFrame=this._totalBudget};xy.prototype.resetBudgets=function(){let e=this._budgets,t=e.length;for(let n=0;n<t;++n){let i=e[n];i.starvedLastFrame=i.starvedThisFrame,i.starvedThisFrame=!1,i.usedThisFrame=0,i.stolenFromMeThisFrame=0}this._totalUsedThisFrame=0};xy.prototype.execute=function(e,t){let n=this._budgets,i=n[t],o=this._executedThisFrame[t];if(this._totalUsedThisFrame>=this._totalBudget&&o)return i.starvedThisFrame=!0,!1;let r;if(i.usedThisFrame+i.stolenFromMeThisFrame>=i.total){let l=n.length,u;for(u=0;u<l&&(r=n[u],!(r.usedThisFrame+r.stolenFromMeThisFrame<r.total&&!r.starvedLastFrame));++u);if(u===l&&o)return!1;o&&(i.starvedThisFrame=!0)}let s=xy.getTimestamp();e.execute();let a=xy.getTimestamp()-s;return this._totalUsedThisFrame+=a,r?r.stolenFromMeThisFrame+=a:i.usedThisFrame+=a,this._executedThisFrame[t]=!0,!0};var jz=xy;function Wz(e){e=g(e,g.EMPTY_OBJECT);let t=em(e.container);if(!c(t))throw new w("container is required");this._container=t;let n=document.createElement("div");n.className="cesium-performanceDisplay";let i=document.createElement("div");i.className="cesium-performanceDisplay-fps",this._fpsText=document.createTextNode(""),i.appendChild(this._fpsText);let o=document.createElement("div");o.className="cesium-performanceDisplay-ms",this._msText=document.createTextNode(""),o.appendChild(this._msText),n.appendChild(o),n.appendChild(i),this._container.appendChild(n),this._lastFpsSampleTime=yi(),this._lastMsSampleTime=yi(),this._fpsFrameCount=0,this._msFrameCount=0,this._throttled=!1;let r=document.createElement("div");r.className="cesium-performanceDisplay-throttled",this._throttledText=document.createTextNode(""),r.appendChild(this._throttledText),n.appendChild(r)}Object.defineProperties(Wz.prototype,{throttled:{get:function(){return this._throttled},set:function(e){this._throttled!==e&&(e?this._throttledText.nodeValue="(throttled)":this._throttledText.nodeValue="",this._throttled=e)}}});Wz.prototype.update=function(e){let t=yi(),n=g(e,!0);this._fpsFrameCount++;let i=t-this._lastFpsSampleTime;if(i>1e3){let r="N/A";n&&(r=this._fpsFrameCount*1e3/i|0),this._fpsText.nodeValue=`${r} FPS`,this._lastFpsSampleTime=t,this._fpsFrameCount=0}this._msFrameCount++;let o=t-this._lastMsSampleTime;if(o>200){let r="N/A";n&&(r=(o/this._msFrameCount).toFixed(2)),this._msText.nodeValue=`${r} MS`,this._lastMsSampleTime=t,this._msFrameCount=0}};Wz.prototype.destroy=function(){return ue(this)};var qz=Wz;var Rc={};Rc.decodeRawMetadataValue=function(e,t,n){switch(e){case zt.INT8:return t.getInt8(n);case zt.UINT8:return t.getUint8(n);case zt.INT16:return t.getInt16(n);case zt.UINT16:return t.getUint16(n);case zt.INT32:return t.getInt32(n);case zt.UINT32:return t.getUint32(n);case zt.INT64:return t.getBigInt64(n);case zt.UINT64:return t.getBigUint64(n);case zt.FLOAT32:return t.getFloat32(n);case zt.FLOAT64:return t.getFloat64(n)}throw new ie(`Invalid component type: ${e}`)};Rc.decodeRawMetadataValueComponent=function(e,t,n){let i=e.componentType,o=Rc.decodeRawMetadataValue(i,t,n);return e.normalized?zt.normalize(o,i):o};Rc.decodeRawMetadataValueElement=function(e,t,n){let i=e.componentType,o=zt.getSizeInBytes(i),r=e.type,s=Ct.getComponentCount(r),a=o*s;if(s>1){let f=Array(s);for(let h=0;h<s;h++){let m=n*a+h*o,p=Rc.decodeRawMetadataValueComponent(e,t,m);f[h]=p}return f}let l=n*a;return Rc.decodeRawMetadataValueComponent(e,t,l)};Rc.decodeRawMetadataValues=function(e,t){let n=new DataView(t.buffer,t.byteOffset,t.byteLength);if(e.isArray){let o=e.arrayLength,r=Array(o);for(let s=0;s<o;s++){let a=Rc.decodeRawMetadataValueElement(e,n,s);r[s]=a}return r}return Rc.decodeRawMetadataValueElement(e,n,0)};Rc.convertToObjectType=function(e,t){if(!c(t)||e===Ct.SCALAR||e===Ct.STRING||e===Ct.BOOLEAN||e===Ct.ENUM)return t;let n=t.map(i=>Number(i));switch(e){case Ct.VEC2:return k.unpack(n,0,new k);case Ct.VEC3:return d.unpack(n,0,new d);case Ct.VEC4:return ee.unpack(n,0,new d);case Ct.MAT2:return Li.unpack(n,0,new Li);case Ct.MAT3:return q.unpack(n,0,new q);case Ct.MAT4:return N.unpack(n,0,new N)}return t};Rc.decodeMetadataValues=function(e,t){let n=Rc.decodeRawMetadataValues(e,t);if(e.isArray){let o=e.arrayLength,r=Array(o);for(let s=0;s<o;s++){let a=n[s],l=Rc.convertToObjectType(e.type,a);r[s]=l}return r}return Rc.convertToObjectType(e.type,n)};var Yz=Object.freeze(Rc);function F0(){this._framebuffer=new ui,this._textureToCopy=void 0,this._copyDepthCommand=void 0}Object.defineProperties(F0.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}});function _lt(e,t,n){let{width:i,height:o}=n;e._framebuffer.update(t,i,o)}function glt(e,t,n){c(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(`uniform highp sampler2D colorTexture;
|
| in vec2 v_textureCoordinates;
|
| void main()
| {
| vec4 globeDepthPacked = texture(czm_globeDepthTexture, v_textureCoordinates);
| float globeDepth = czm_unpackDepth(globeDepthPacked);
| float depth = texture(colorTexture, v_textureCoordinates).r;
| out_FragColor = czm_branchFreeTernary(globeDepth <= 0.0 || globeDepth >= 1.0 || depth < globeDepth && depth > 0.0 && depth < 1.0,
| czm_packDepth(depth), globeDepthPacked);
| }
| `,{renderState:Fe.fromCache(),uniformMap:{colorTexture:function(){return e._textureToCopy}},owner:e})),e._textureToCopy=n,e._copyDepthCommand.framebuffer=e.framebuffer}F0.prototype.update=function(e,t){_lt(this,e,t),glt(this,e,t)};var ylt=new ee,blt=new ee(1,1/255,1/65025,1/16581375);F0.prototype.getDepth=function(e,t,n){if(!c(this.framebuffer))return;let i=e.readPixels({x:t,y:n,width:1,height:1,framebuffer:this.framebuffer}),o=ee.unpack(i,0,ylt);return ee.divideByScalar(o,255,o),ee.dot(o,blt)};F0.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)};F0.prototype.isDestroyed=function(){return!1};F0.prototype.destroy=function(){return this._framebuffer.destroy(),c(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=c(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy()),ue(this)};var Xz=F0;function xlt(e,t){this.near=g(e,0),this.far=g(t,0);let n=xe.NUMBER_OF_PASSES,i=new Array(n),o=new Array(n);for(let r=0;r<n;++r)i[r]=[],o[r]=0;this.commands=i,this.indices=o}var Kz=xlt;var B0=`uniform highp sampler2D u_depthTexture;
|
| in vec2 v_textureCoordinates;
|
| void main()
| {
| out_FragColor = czm_packDepth(texture(u_depthTexture, v_textureCoordinates).r);
| }
| `;function um(){this._picking=!1,this._numSamples=1,this._tempCopyDepthTexture=void 0,this._pickColorFramebuffer=new ui({depthStencil:!0,supportsDepthTexture:!0}),this._outputFramebuffer=new ui({depthStencil:!0,supportsDepthTexture:!0}),this._copyDepthFramebuffer=new ui,this._tempCopyDepthFramebuffer=new ui,this._updateDepthFramebuffer=new ui({createColorAttachments:!1,createDepthAttachments:!1,depthStencil:!0}),this._clearGlobeColorCommand=void 0,this._copyColorCommand=void 0,this._copyDepthCommand=void 0,this._tempCopyDepthCommand=void 0,this._updateDepthCommand=void 0,this._viewport=new je,this._rs=void 0,this._rsBlend=void 0,this._rsUpdate=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0,this._clearGlobeDepth=void 0}Object.defineProperties(um.prototype,{colorFramebufferManager:{get:function(){return this._picking?this._pickColorFramebuffer:this._outputFramebuffer}},framebuffer:{get:function(){return this.colorFramebufferManager.framebuffer}},depthStencilTexture:{get:function(){return this.colorFramebufferManager.getDepthStencilTexture()}},picking:{get:function(){return this._picking},set:function(e){this._picking=e}}});function tge(e,t,n,i,o){let r=e._viewport;r.width=n,r.height=i;let s=!je.equals(r,o.viewport),a=s!==e._useScissorTest;e._useScissorTest=s,je.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=je.clone(o.viewport,e._scissorRectangle),a=!0),(!c(e._rs)||!je.equals(r,e._rs.viewport)||a)&&(e._rs=Fe.fromCache({viewport:r,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}}),e._rsBlend=Fe.fromCache({viewport:r,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:cn.ALPHA_BLEND}),e._rsUpdate=Fe.fromCache({viewport:r,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:Nn.EQUAL,frontOperation:{fail:ut.KEEP,zFail:ut.KEEP,zPass:ut.KEEP},backFunction:Nn.NEVER,reference:kt.CESIUM_3D_TILE_MASK,mask:kt.CESIUM_3D_TILE_MASK}})),c(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(B0,{uniformMap:{u_depthTexture:function(){return e.colorFramebufferManager.getDepthStencilTexture()}},owner:e})),e._copyDepthCommand.framebuffer=e._copyDepthFramebuffer.framebuffer,e._copyDepthCommand.renderState=e._rs,c(e._copyColorCommand)||(e._copyColorCommand=t.createViewportQuadCommand(du,{uniformMap:{colorTexture:function(){return e.colorFramebufferManager.getColorTexture()}},owner:e})),e._copyColorCommand.renderState=e._rs,c(e._tempCopyDepthCommand)||(e._tempCopyDepthCommand=t.createViewportQuadCommand(B0,{uniformMap:{u_depthTexture:function(){return e._tempCopyDepthTexture}},owner:e})),e._tempCopyDepthCommand.framebuffer=e._tempCopyDepthFramebuffer.framebuffer,e._tempCopyDepthCommand.renderState=e._rs,c(e._updateDepthCommand)||(e._updateDepthCommand=t.createViewportQuadCommand(du,{uniformMap:{colorTexture:function(){return e._tempCopyDepthFramebuffer.getColorTexture()}},owner:e})),e._updateDepthCommand.framebuffer=e._updateDepthFramebuffer.framebuffer,e._updateDepthCommand.renderState=e._rsUpdate,c(e._clearGlobeColorCommand)||(e._clearGlobeColorCommand=new $n({color:new z(0,0,0,0),stencil:0,owner:e})),e._clearGlobeColorCommand.framebuffer=e.framebuffer}um.prototype.update=function(e,t,n,i,o,r){let{width:s,height:a}=n,l=o?e.halfFloatingPointTexture?Ne.HALF_FLOAT:Ne.FLOAT:Ne.UNSIGNED_BYTE;this._numSamples=i,this.picking?this._pickColorFramebuffer.update(e,s,a):this._outputFramebuffer.update(e,s,a,i,l),this._copyDepthFramebuffer.update(e,s,a),tge(this,e,s,a,t),e.uniformState.globeDepthTexture=void 0,this._clearGlobeDepth=r};um.prototype.prepareColorTextures=function(e,t){!this.picking&&this._numSamples>1&&this._outputFramebuffer.prepareTextures(e,t)};um.prototype.executeCopyDepth=function(e,t){c(this._copyDepthCommand)&&(this.prepareColorTextures(e),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._copyDepthFramebuffer.getColorTexture())};um.prototype.executeUpdateDepth=function(e,t,n){let i=c(n)?n:t.framebuffer.depthStencilTexture;if(!this._clearGlobeDepth&&i===this.colorFramebufferManager.getDepthStencilTexture()){c(this._copyDepthCommand)&&this._copyDepthCommand.execute(e,t);return}if(!c(this._updateDepthCommand))return;let o=this._updateDepthFramebuffer;if(!c(o.framebuffer)||o.getDepthStencilTexture()!==i||o.getColorTexture()!==this._copyDepthFramebuffer.getColorTexture()){let r=this._copyDepthFramebuffer.getColorTexture(),{width:s,height:a}=r;this._tempCopyDepthFramebuffer.destroy(),this._tempCopyDepthFramebuffer.update(e,s,a),o.setColorTexture(r,0),o.setDepthStencilTexture(i),o.update(e,s,a),tge(this,e,s,a,t)}this._tempCopyDepthTexture=i,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t)};um.prototype.executeCopyColor=function(e,t){c(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)};um.prototype.clear=function(e,t,n){let i=this._clearGlobeColorCommand;c(i)&&(z.clone(n,i.color),this.colorFramebufferManager.clear(e,i,t))};um.prototype.isDestroyed=function(){return!1};um.prototype.destroy=function(){return this._pickColorFramebuffer.destroy(),this._outputFramebuffer.destroy(),this._copyDepthFramebuffer.destroy(),this._tempCopyDepthFramebuffer.destroy(),this._updateDepthFramebuffer.destroy(),c(this._copyColorCommand)&&(this._copyColorCommand.shaderProgram=this._copyColorCommand.shaderProgram.destroy()),c(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy()),c(this._tempCopyDepthCommand)&&(this._tempCopyDepthCommand.shaderProgram=this._tempCopyDepthCommand.shaderProgram.destroy()),c(this._updateDepthCommand)&&(this._updateDepthCommand.shaderProgram=this._updateDepthCommand.shaderProgram.destroy()),ue(this)};var $z=um;function k0(){this._framebuffer=new ui({depthStencil:!0,supportsDepthTexture:!0}),this._packedDepthFramebuffer=new ui,this._renderState=void 0,this._packedDepthCommand=void 0,this._clearCommand=void 0,this._viewport=new je,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0}Object.defineProperties(k0.prototype,{classificationTexture:{get:function(){return this._framebuffer.getColorTexture()}},classificationFramebuffer:{get:function(){return this._framebuffer.framebuffer}},packedDepthFramebuffer:{get:function(){return this._packedDepthFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._framebuffer.getDepthStencilTexture()}},depthStencilRenderbuffer:{get:function(){return this._framebuffer.getDepthStencilRenderbuffer()}},packedDepthTexture:{get:function(){return this._packedDepthFramebuffer.getColorTexture()}}});function Tlt(e){e._framebuffer.destroy(),e._packedDepthFramebuffer.destroy()}function Clt(e,t,n,i,o){let r=o?t.halfFloatingPointTexture?Ne.HALF_FLOAT:Ne.FLOAT:Ne.UNSIGNED_BYTE;e._framebuffer.update(t,n,i,1,r),e._packedDepthFramebuffer.update(t,n,i)}function Elt(e,t,n,i,o){e._viewport.width=n,e._viewport.height=i;let r=!je.equals(e._viewport,o.viewport),s=r!==e._useScissorTest;e._useScissorTest=r,je.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=je.clone(o.viewport,e._scissorRectangle),s=!0),(!c(e._renderState)||!je.equals(e._viewport,e._renderState.viewport)||s)&&(e._renderState=Fe.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),c(e._packedDepthCommand)||(e._packedDepthCommand=t.createViewportQuadCommand(B0,{uniformMap:{u_depthTexture:function(){return e.depthStencilTexture}},owner:e})),c(e._clearCommand)||(e._clearCommand=new $n({color:new z(0,0,0,0),depth:1,stencil:0,owner:e})),e._packedDepthCommand.framebuffer=e._packedDepthFramebuffer.framebuffer,e._packedDepthCommand.renderState=e._renderState,e._clearCommand.framebuffer=e.classificationFramebuffer,e._clearCommand.renderState=e._renderState}k0.prototype.updateAndClear=function(e,t,n,i){let o=t.width,r=t.height;Clt(this,n,o,r,e),Elt(this,n,o,r,i),this._useHdr=e};k0.prototype.clearClassification=function(e,t){this._clearCommand.execute(e,t)};k0.prototype.packDepth=function(e,t){return this._packedDepthCommand.execute(e,t),this.packedDepthTexture};k0.prototype.isDestroyed=function(){return!1};k0.prototype.destroy=function(){return Tlt(this),ue(this)};var Zz=k0;var lI=`#ifdef MRT
| layout (location = 0) out vec4 out_FragData_0;
| layout (location = 1) out vec4 out_FragData_1;
| #else
| layout (location = 0) out vec4 out_FragColor;
| #endif
|
| uniform vec4 u_bgColor;
| uniform sampler2D u_depthTexture;
|
| in vec2 v_textureCoordinates;
|
| void main()
| {
| if (texture(u_depthTexture, v_textureCoordinates).r < 1.0)
| {
| #ifdef MRT
| out_FragData_0 = u_bgColor;
| out_FragData_1 = vec4(u_bgColor.a);
| #else
| out_FragColor = u_bgColor;
| #endif
| return;
| }
|
| discard;
| }
| `;var Jz=`/**
| * Compositing for Weighted Blended Order-Independent Transparency. See:
| * - http://jcgt.org/published/0002/02/09/
| * - http://casual-effects.blogspot.com/2014/03/weighted-blended-order-independent.html
| */
|
| uniform sampler2D u_opaque;
| uniform sampler2D u_accumulation;
| uniform sampler2D u_revealage;
|
| in vec2 v_textureCoordinates;
|
| void main()
| {
| vec4 opaque = texture(u_opaque, v_textureCoordinates);
| vec4 accum = texture(u_accumulation, v_textureCoordinates);
| float r = texture(u_revealage, v_textureCoordinates).r;
|
| #ifdef MRT
| vec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);
| #else
| vec4 transparent = vec4(accum.rgb / clamp(accum.a, 1e-4, 5e4), r);
| #endif
|
| out_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;
|
| if (opaque != czm_backgroundColor)
| {
| out_FragColor.a = 1.0;
| }
| }
| `;function Yp(e){this._numSamples=1,this._translucentMultipassSupport=!1,this._translucentMRTSupport=!1;let t=e.colorBufferFloat&&e.depthTexture&&e.floatBlend;this._translucentMRTSupport=e.drawBuffers&&t,this._translucentMultipassSupport=!this._translucentMRTSupport&&t,this._opaqueFBO=void 0,this._opaqueTexture=void 0,this._depthStencilTexture=void 0,this._accumulationTexture=void 0,this._translucentFBO=new ui({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._alphaFBO=new ui({createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._adjustTranslucentFBO=new ui({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1}),this._adjustAlphaFBO=new ui({createColorAttachments:!1}),this._opaqueClearCommand=new $n({color:new z(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new $n({color:new z(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new $n({color:new z(0,0,0,0),owner:this}),this._alphaClearCommand=new $n({color:new z(1,1,1,1),owner:this}),this._translucentRenderStateCache={},this._alphaRenderStateCache={},this._compositeCommand=void 0,this._adjustTranslucentCommand=void 0,this._adjustAlphaCommand=void 0,this._viewport=new je,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function nge(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function MY(e){e._translucentFBO.destroy(),e._alphaFBO.destroy(),e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO.destroy()}function ige(e){nge(e),MY(e)}function wlt(e,t,n,i){nge(e),e._accumulationTexture=new Ot({context:t,width:n,height:i,pixelFormat:Re.RGBA,pixelDatatype:Ne.FLOAT}),e._revealageTexture=new Ot({context:t,pixelFormat:Re.RGBA,pixelDatatype:Ne.FLOAT,width:n,height:i,flipY:!1})}function Slt(e,t){MY(e);let n=Y.FRAMEBUFFER_COMPLETE,i=!0,{width:o,height:r}=e._accumulationTexture;if(e._translucentMRTSupport&&(e._translucentFBO.setColorTexture(e._accumulationTexture,0),e._translucentFBO.setColorTexture(e._revealageTexture,1),e._translucentFBO.setDepthStencilTexture(e._depthStencilTexture),e._translucentFBO.update(t,o,r),e._adjustTranslucentFBO.setColorTexture(e._accumulationTexture,0),e._adjustTranslucentFBO.setColorTexture(e._revealageTexture,1),e._adjustTranslucentFBO.update(t,o,r),(e._translucentFBO.status!==n||e._adjustTranslucentFBO.status!==n)&&(MY(e),e._translucentMRTSupport=!1)),!e._translucentMRTSupport){e._translucentFBO.setColorTexture(e._accumulationTexture),e._translucentFBO.setDepthStencilTexture(e._depthStencilTexture),e._translucentFBO.update(t,o,r),e._alphaFBO.setColorTexture(e._revealageTexture),e._alphaFBO.setDepthStencilTexture(e._depthStencilTexture),e._alphaFBO.update(t,o,r),e._adjustTranslucentFBO.setColorTexture(e._accumulationTexture),e._adjustTranslucentFBO.update(t,o,r),e._adjustAlphaFBO.setColorTexture(e._revealageTexture),e._adjustAlphaFBO.update(t,o,r);let s=e._translucentFBO.status===n,a=e._alphaFBO.status===n,l=e._adjustTranslucentFBO.status===n,u=e._adjustAlphaFBO.status===n;(!s||!a||!l||!u)&&(ige(e),e._translucentMultipassSupport=!1,i=!1)}return i}Yp.prototype.update=function(e,t,n,i,o){if(!this.isSupported())return;this._opaqueFBO=n,this._opaqueTexture=n.getColorTexture(0),this._depthStencilTexture=n.getDepthStencilTexture();let{width:r,height:s}=this._opaqueTexture,a=this._accumulationTexture,l=!c(a)||a.width!==r||a.height!==s||i!==this._useHDR,u=this._numSamples!==o;if((l||u)&&(this._numSamples=o,wlt(this,e,r,s)),(!c(this._translucentFBO.framebuffer)||l||u)&&!Slt(this,e))return;this._useHDR=i;let f=this,h,m;c(this._compositeCommand)||(h=new Be({sources:[Jz]}),this._translucentMRTSupport&&h.defines.push("MRT"),m={u_opaque:function(){return f._opaqueTexture},u_accumulation:function(){return f._accumulationTexture},u_revealage:function(){return f._revealageTexture}},this._compositeCommand=e.createViewportQuadCommand(h,{uniformMap:m,owner:this})),c(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(h=new Be({defines:["MRT"],sources:[lI]}),m={u_bgColor:function(){return f._translucentMRTClearCommand.color},u_depthTexture:function(){return f._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(h,{uniformMap:m,owner:this})):this._translucentMultipassSupport&&(h=new Be({sources:[lI]}),m={u_bgColor:function(){return f._translucentMultipassClearCommand.color},u_depthTexture:function(){return f._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(h,{uniformMap:m,owner:this}),m={u_bgColor:function(){return f._alphaClearCommand.color},u_depthTexture:function(){return f._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(h,{uniformMap:m,owner:this}))),this._viewport.width=r,this._viewport.height=s;let p=!je.equals(this._viewport,t.viewport),_=p!==this._useScissorTest;this._useScissorTest=p,je.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=je.clone(t.viewport,this._scissorRectangle),_=!0),(!c(this._rs)||!je.equals(this._viewport,this._rs.viewport)||_)&&(this._rs=Fe.fromCache({viewport:this._viewport,scissorTest:{enabled:this._useScissorTest,rectangle:this._scissorRectangle}})),c(this._compositeCommand)&&(this._compositeCommand.renderState=this._rs),this._adjustTranslucentCommand&&(this._adjustTranslucentCommand.renderState=this._rs),c(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.renderState=this._rs)};var Alt={enabled:!0,color:new z(0,0,0,0),equationRgb:Oa.ADD,equationAlpha:Oa.ADD,functionSourceRgb:bo.ONE,functionDestinationRgb:bo.ONE,functionSourceAlpha:bo.ZERO,functionDestinationAlpha:bo.ONE_MINUS_SOURCE_ALPHA},vlt={enabled:!0,color:new z(0,0,0,0),equationRgb:Oa.ADD,equationAlpha:Oa.ADD,functionSourceRgb:bo.ONE,functionDestinationRgb:bo.ONE,functionSourceAlpha:bo.ONE,functionDestinationAlpha:bo.ONE},Dlt={enabled:!0,color:new z(0,0,0,0),equationRgb:Oa.ADD,equationAlpha:Oa.ADD,functionSourceRgb:bo.ZERO,functionDestinationRgb:bo.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:bo.ZERO,functionDestinationAlpha:bo.ONE_MINUS_SOURCE_ALPHA};function LY(e,t,n,i){let o=n[i.id];if(!c(o)){let r=Fe.getState(i);r.depthMask=!1,r.blending=t,o=Fe.fromCache(r),n[i.id]=o}return o}function Ilt(e,t,n){return LY(t,Alt,e._translucentRenderStateCache,n)}function Olt(e,t,n){return LY(t,vlt,e._translucentRenderStateCache,n)}function Plt(e,t,n){return LY(t,Dlt,e._alphaRenderStateCache,n)}var Rlt=` vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a;
| float ai = czm_out_FragColor.a;
| float wzi = czm_alphaWeight(ai);
| out_FragData_0 = vec4(Ci * wzi, ai);
| out_FragData_1 = vec4(ai * wzi);
| `,Mlt=` vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a;
| float ai = czm_out_FragColor.a;
| float wzi = czm_alphaWeight(ai);
| out_FragColor = vec4(Ci, ai) * wzi;
| `,Llt=` float ai = czm_out_FragColor.a;
| out_FragColor = vec4(ai);
| `;function NY(e,t,n,i){let{shaderCache:o}=e,r=o.getDerivedShaderProgram(t,n);if(c(r))return r;let s=t._attributeLocations,a=t.fragmentShaderSource.clone();a.sources=a.sources.map(function(f){return Be.replaceMain(f,"czm_translucent_main").replace(/out_FragColor/g,"czm_out_FragColor").replace(/layout\s*\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g,"").replace(/\bdiscard\b/g,"czm_discard = true").replace(/czm_phong/g,"czm_translucentPhong")}),a.sources.splice(0,0,`vec4 czm_out_FragColor;
| bool czm_discard = false;
| `);let l=[...i.matchAll(/out_FragData_(\d+)/g)],u="";for(let f=0;f<l.length;f++){let h=l[f];u=`layout (location = ${h[1]}) out vec4 ${h[0]};
| ${u}`}return a.sources.push(u),a.sources.push(`void main()
| {
| czm_translucent_main();
| if (czm_discard)
| {
| discard;
| }
| ${i}}
| `),o.createDerivedShaderProgram(t,n,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:s})}function Nlt(e,t){return NY(e,t,"translucentMRT",Rlt)}function Flt(e,t){return NY(e,t,"translucentMultipass",Mlt)}function Blt(e,t){return NY(e,t,"alphaMultipass",Llt)}Yp.prototype.createDerivedCommands=function(e,t,n){if(c(n)||(n={}),this._translucentMRTSupport){let a,l;return c(n.translucentCommand)&&(a=n.translucentCommand.shaderProgram,l=n.translucentCommand.renderState),n.translucentCommand=Ke.shallowClone(e,n.translucentCommand),!c(a)||n.shaderProgramId!==e.shaderProgram.id?(n.translucentCommand.shaderProgram=Nlt(t,e.shaderProgram),n.translucentCommand.renderState=Ilt(this,t,e.renderState),n.shaderProgramId=e.shaderProgram.id):(n.translucentCommand.shaderProgram=a,n.translucentCommand.renderState=l),n}let i,o,r,s;return c(n.translucentCommand)&&(i=n.translucentCommand.shaderProgram,o=n.translucentCommand.renderState,r=n.alphaCommand.shaderProgram,s=n.alphaCommand.renderState),n.translucentCommand=Ke.shallowClone(e,n.translucentCommand),n.alphaCommand=Ke.shallowClone(e,n.alphaCommand),!c(i)||n.shaderProgramId!==e.shaderProgram.id?(n.translucentCommand.shaderProgram=Flt(t,e.shaderProgram),n.translucentCommand.renderState=Olt(this,t,e.renderState),n.alphaCommand.shaderProgram=Blt(t,e.shaderProgram),n.alphaCommand.renderState=Plt(this,t,e.renderState),n.shaderProgramId=e.shaderProgram.id):(n.translucentCommand.shaderProgram=i,n.translucentCommand.renderState=o,n.alphaCommand.shaderProgram=r,n.alphaCommand.renderState=s),n};function klt(e,t,n,i,o,r){let{context:s,frameState:a}=t,{useLogDepth:l,shadowState:u}=a,f=t._hdr,h=i.framebuffer,m=u.lightShadowsEnabled;i.framebuffer=e._adjustTranslucentFBO.framebuffer,e._adjustTranslucentCommand.execute(s,i),i.framebuffer=e._adjustAlphaFBO.framebuffer,e._adjustAlphaCommand.execute(s,i);let p=e._opaqueFBO.framebuffer;i.framebuffer=e._translucentFBO.framebuffer;for(let _=0;_<o.length;++_){let b=o[_];b=l?b.derivedCommands.logDepth.command:b,b=f?b.derivedCommands.hdr.command:b;let x=m&&b.receiveShadows?b.derivedCommands.oit.shadows.translucentCommand:b.derivedCommands.oit.translucentCommand;n(x,t,i,p)}if(c(r)){let _=r.unclassifiedCommand,b=m&&_.receiveShadows?_.derivedCommands.oit.shadows.translucentCommand:_.derivedCommands.oit.translucentCommand;n(b,t,i,p)}i.framebuffer=e._alphaFBO.framebuffer;for(let _=0;_<o.length;++_){let b=o[_];b=l?b.derivedCommands.logDepth.command:b,b=f?b.derivedCommands.hdr.command:b;let x=m&&b.receiveShadows?b.derivedCommands.oit.shadows.alphaCommand:b.derivedCommands.oit.alphaCommand;n(x,t,i,p)}if(c(r)){let _=r.unclassifiedCommand,b=m&&_.receiveShadows?_.derivedCommands.oit.shadows.alphaCommand:_.derivedCommands.oit.alphaCommand;n(b,t,i,p)}i.framebuffer=h}function Ult(e,t,n,i,o,r){let{context:s,frameState:a}=t,{useLogDepth:l,shadowState:u}=a,f=t._hdr,h=i.framebuffer,m=u.lightShadowsEnabled;i.framebuffer=e._adjustTranslucentFBO.framebuffer,e._adjustTranslucentCommand.execute(s,i);let p=e._opaqueFBO.framebuffer;i.framebuffer=e._translucentFBO.framebuffer;for(let _=0;_<o.length;++_){let b=o[_];b=l?b.derivedCommands.logDepth.command:b,b=f?b.derivedCommands.hdr.command:b;let x=m&&b.receiveShadows?b.derivedCommands.oit.shadows.translucentCommand:b.derivedCommands.oit.translucentCommand;n(x,t,i,p)}if(c(r)){let _=r.unclassifiedCommand,b=m&&_.receiveShadows?_.derivedCommands.oit.shadows.translucentCommand:_.derivedCommands.oit.translucentCommand;n(b,t,i,p)}i.framebuffer=h}Yp.prototype.executeCommands=function(e,t,n,i,o){if(this._translucentMRTSupport){Ult(this,e,t,n,i,o);return}klt(this,e,t,n,i,o)};Yp.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)};Yp.prototype.clear=function(e,t,n){let i=t.framebuffer;t.framebuffer=this._opaqueFBO.framebuffer,z.clone(n,this._opaqueClearCommand.color),this._opaqueClearCommand.execute(e,t),t.framebuffer=this._translucentFBO.framebuffer,(this._translucentMRTSupport?this._translucentMRTClearCommand:this._translucentMultipassClearCommand).execute(e,t),this._translucentMultipassSupport&&(t.framebuffer=this._alphaFBO.framebuffer,this._alphaClearCommand.execute(e,t)),t.framebuffer=i};Yp.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport};Yp.prototype.isDestroyed=function(){return!1};Yp.prototype.destroy=function(){return ige(this),c(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),c(this._adjustTranslucentCommand)&&(this._adjustTranslucentCommand.shaderProgram=this._adjustTranslucentCommand.shaderProgram&&this._adjustTranslucentCommand.shaderProgram.destroy()),c(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.shaderProgram=this._adjustAlphaCommand.shaderProgram&&this._adjustAlphaCommand.shaderProgram.destroy()),ue(this)};var Qz=Yp;function uI(){this._framebuffer=new ui({color:!1,depthStencil:!0,supportsDepthTexture:!0}),this._passState=void 0}Object.defineProperties(uI.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}});function zlt(e){e._framebuffer.destroy()}function Vlt(e,t){let n=t.drawingBufferWidth,i=t.drawingBufferHeight;e._framebuffer.update(t,n,i);let o=new ic(t);o.blendingEnabled=!1,o.scissorTest={enabled:!0,rectangle:new je},o.viewport=new je,e._passState=o}uI.prototype.update=function(e,t,n){let i=n.width,o=n.height;this._framebuffer.isDirty(i,o)&&Vlt(this,e);let r=this.framebuffer,s=this._passState;return s.framebuffer=r,s.viewport.width=i,s.viewport.height=o,s.scissorTest.rectangle.x=t.x,s.scissorTest.rectangle.y=o-t.y,s.scissorTest.rectangle.width=1,s.scissorTest.rectangle.height=1,s};uI.prototype.isDestroyed=function(){return!1};uI.prototype.destroy=function(){return zlt(this),ue(this)};var eV=uI;function uw(e){let t=new ic(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new je},t.viewport=new je,this._context=e,this._fb=new ui({depthStencil:!0}),this._passState=t,this._width=0,this._height=0}uw.prototype.begin=function(e,t){let n=this._context,{width:i,height:o}=t;return je.clone(e,this._passState.scissorTest.rectangle),this._width=i,this._height=o,this._fb.update(n,i,o),this._passState.framebuffer=this._fb.framebuffer,this._passState.viewport.width=i,this._passState.viewport.height=o,this._passState};var fI=new z;uw.prototype.end=function(e){let t=g(e.width,1),n=g(e.height,1),i=this._context,o=i.readPixels({x:e.x,y:e.y,width:t,height:n,framebuffer:this._fb.framebuffer}),r=Math.max(t,n),s=r*r,a=Math.floor(t*.5),l=Math.floor(n*.5),u=0,f=0,h=0,m=-1;for(let p=0;p<s;++p){if(-a<=u&&u<=a&&-l<=f&&f<=l){let _=4*((l-f)*t+u+a);fI.red=z.byteToFloat(o[_]),fI.green=z.byteToFloat(o[_+1]),fI.blue=z.byteToFloat(o[_+2]),fI.alpha=z.byteToFloat(o[_+3]);let b=i.getObjectByPickColor(fI);if(c(b))return b}if(u===f||u<0&&-u===f||u>0&&u===1-f){let _=h;h=-m,m=_}u+=h,f+=m}};uw.prototype.readCenterPixel=function(e){let t=g(e.width,1),n=g(e.height,1),o=this._context.readPixels({x:e.x,y:e.y,width:t,height:n,framebuffer:this._fb.framebuffer}),r=Math.floor(t*.5),a=4*(Math.floor(n*.5)*t+r);return o.slice(a,a+4)};uw.prototype.isDestroyed=function(){return!1};uw.prototype.destroy=function(){return this._fb.destroy(),ue(this)};var tV=uw;function Xp(){this._numSamples=1,this._colorFramebuffer=new ui({depthStencil:!0,supportsDepthTexture:!0}),this._idFramebuffer=new ui({depthStencil:!0,supportsDepthTexture:!0}),this._idClearColor=new z(0,0,0,0),this._clearCommand=new $n({color:new z(0,0,0,0),depth:1,owner:this})}function Hlt(e){e._colorFramebuffer.destroy(),e._idFramebuffer.destroy()}Object.defineProperties(Xp.prototype,{framebuffer:{get:function(){return this._colorFramebuffer.framebuffer}},idFramebuffer:{get:function(){return this._idFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._colorFramebuffer.getDepthStencilTexture()}}});Xp.prototype.update=function(e,t,n,i){let o=t.width,r=t.height,s=n?e.halfFloatingPointTexture?Ne.HALF_FLOAT:Ne.FLOAT:Ne.UNSIGNED_BYTE;this._numSamples=i,this._colorFramebuffer.update(e,o,r,i,s),this._idFramebuffer.update(e,o,r)};Xp.prototype.clear=function(e,t,n){z.clone(n,this._clearCommand.color),z.clone(this._idClearColor,this._clearCommand.color),this._colorFramebuffer.clear(e,this._clearCommand,t),this._idFramebuffer.clear(e,this._clearCommand,t)};Xp.prototype.getFramebuffer=function(){return this._colorFramebuffer.framebuffer};Xp.prototype.getIdFramebuffer=function(){return this._idFramebuffer.framebuffer};Xp.prototype.prepareColorTextures=function(e){this._numSamples>1&&this._colorFramebuffer.prepareTextures(e)};Xp.prototype.isDestroyed=function(){return!1};Xp.prototype.destroy=function(){return Hlt(this),ue(this)};var fw=Xp;function U0(){}U0.getShadowCastShaderKeyword=function(e,t,n,i){return`castShadow ${e} ${t} ${n} ${i}`};U0.createShadowCastVertexShader=function(e,t,n){let i=e.defines.slice(0),o=e.sources.slice(0);i.push("SHADOW_MAP"),n&&i.push("GENERATE_POSITION");let r=Be.findPositionVarying(e),s=c(r);if(t&&!s){let a=o.length;for(let u=0;u<a;++u)o[u]=Be.replaceMain(o[u],"czm_shadow_cast_main");o.push(`out vec3 v_positionEC;
| void main()
| {
| czm_shadow_cast_main();
| v_positionEC = (czm_inverseProjection * gl_Position).xyz;
| }`)}return new Be({defines:i,sources:o})};U0.createShadowCastFragmentShader=function(e,t,n,i){let o=e.defines.slice(0),r=e.sources.slice(0);o.push("SHADOW_MAP");let s=Be.findPositionVarying(e),a=c(s);a||(s="v_positionEC");let l=r.length;for(let f=0;f<l;++f)r[f]=Be.replaceMain(r[f],"czm_shadow_cast_main");let u="";return t&&(a||(u+=`in vec3 v_positionEC;
| `),u+=`uniform vec4 shadowMap_lightPositionEC;
| `),i?u+=`void main()
| {
| `:u+=`void main()
| {
| czm_shadow_cast_main();
| if (out_FragColor.a == 0.0)
| {
| discard;
| }
| `,t?u+=` float distance = length(${s});
| if (distance >= shadowMap_lightPositionEC.w)
| {
| discard;
| }
| distance /= shadowMap_lightPositionEC.w; // radius
| out_FragColor = czm_packDepth(distance);
| `:n?u+=` out_FragColor = vec4(1.0);
| `:u+=` out_FragColor = czm_packDepth(gl_FragCoord.z);
| `,u+=`}
| `,r.push(u),new Be({defines:o,sources:r})};U0.getShadowReceiveShaderKeyword=function(e,t,n,i){let o=e._usesDepthTexture,r=e._polygonOffsetSupported,s=e._isPointLight,a=e._isSpotLight,l=e._numberOfCascades>1,u=e.debugCascadeColors,f=e.softShadows;return`receiveShadow ${o}${r}${s}${a}${l}${u}${f}${t}${n}${i}`};U0.createShadowReceiveVertexShader=function(e,t,n){let i=e.defines.slice(0),o=e.sources.slice(0);return i.push("SHADOW_MAP"),t&&(n?i.push("GENERATE_POSITION_AND_NORMAL"):i.push("GENERATE_POSITION")),new Be({defines:i,sources:o})};U0.createShadowReceiveFragmentShader=function(e,t,n,i,o){let r=Be.findNormalVarying(e),s=!i&&c(r)||i&&o,a=Be.findPositionVarying(e),l=c(a),u=t._usesDepthTexture,f=t._polygonOffsetSupported,h=t._isPointLight,m=t._isSpotLight,p=t._numberOfCascades>1,_=t.debugCascadeColors,b=t.softShadows,x=h?t._pointBias:i?t._terrainBias:t._primitiveBias,T=e.defines.slice(0),E=e.sources.slice(0),S=E.length;for(let D=0;D<S;++D)E[D]=Be.replaceMain(E[D],"czm_shadow_receive_main");h?T.push("USE_CUBE_MAP_SHADOW"):u&&T.push("USE_SHADOW_DEPTH_TEXTURE"),b&&!h&&T.push("USE_SOFT_SHADOWS"),p&&n&&i&&(s?T.push("ENABLE_VERTEX_LIGHTING"):T.push("ENABLE_DAYNIGHT_SHADING")),n&&x.normalShading&&s&&(T.push("USE_NORMAL_SHADING"),x.normalShadingSmooth>0&&T.push("USE_NORMAL_SHADING_SMOOTH"));let A="";h?A+=`uniform samplerCube shadowMap_textureCube;
| `:A+=`uniform sampler2D shadowMap_texture;
| `;let v;return l?v=` return vec4(${a}, 1.0);
| `:v=`#ifndef LOG_DEPTH
| return czm_windowToEyeCoordinates(gl_FragCoord);
| #else
| return vec4(v_logPositionEC, 1.0);
| #endif
| `,A+=`uniform mat4 shadowMap_matrix;
| uniform vec3 shadowMap_lightDirectionEC;
| uniform vec4 shadowMap_lightPositionEC;
| uniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness;
| uniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth;
| #ifdef LOG_DEPTH
| in vec3 v_logPositionEC;
| #endif
| vec4 getPositionEC()
| {
| ${v}}
| vec3 getNormalEC()
| {
| ${s?` return normalize(${r});
| `:` return vec3(1.0);
| `}}
| void applyNormalOffset(inout vec4 positionEC, vec3 normalEC, float nDotL)
| {
| ${x.normalOffset&&s?` float normalOffset = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x;
| float normalOffsetScale = 1.0 - nDotL;
| vec3 offset = normalOffset * normalOffsetScale * normalEC;
| positionEC.xyz += offset;
| `:""}}
| `,A+=`void main()
| {
| czm_shadow_receive_main();
| vec4 positionEC = getPositionEC();
| vec3 normalEC = getNormalEC();
| float depth = -positionEC.z;
| `,A+=` czm_shadowParameters shadowParameters;
| shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;
| shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;
| shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;
| shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;
| `,i?A+=` shadowParameters.depthBias *= max(depth * 0.01, 1.0);
| `:f||(A+=` shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015);
| `),h?A+=` vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz;
| float distance = length(directionEC);
| directionEC = normalize(directionEC);
| float radius = shadowMap_lightPositionEC.w;
| // Stop early if the fragment is beyond the point light radius
| if (distance > radius)
| {
| return;
| }
| vec3 directionWC = czm_inverseViewRotation * directionEC;
| shadowParameters.depth = distance / radius;
| shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);
| shadowParameters.texCoords = directionWC;
| float visibility = czm_shadowVisibility(shadowMap_textureCube, shadowParameters);
| `:m?A+=` vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz);
| float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);
| applyNormalOffset(positionEC, normalEC, nDotL);
| vec4 shadowPosition = shadowMap_matrix * positionEC;
| // Spot light uses a perspective projection, so perform the perspective divide
| shadowPosition /= shadowPosition.w;
| // Stop early if the fragment is not in the shadow bounds
| if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))
| {
| return;
| }
| shadowParameters.texCoords = shadowPosition.xy;
| shadowParameters.depth = shadowPosition.z;
| shadowParameters.nDotL = nDotL;
| float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters);
| `:p?A+=` float maxDepth = shadowMap_cascadeSplits[1].w;
| // Stop early if the eye depth exceeds the last cascade
| if (depth > maxDepth)
| {
| return;
| }
| // Get the cascade based on the eye-space depth
| vec4 weights = czm_cascadeWeights(depth);
| // Apply normal offset
| float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0);
| applyNormalOffset(positionEC, normalEC, nDotL);
| // Transform position into the cascade
| vec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC;
| // Get visibility
| shadowParameters.texCoords = shadowPosition.xy;
| shadowParameters.depth = shadowPosition.z;
| shadowParameters.nDotL = nDotL;
| float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters);
| // Fade out shadows that are far away
| float shadowMapMaximumDistance = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z;
| float fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0);
| visibility = mix(visibility, 1.0, fade);
| ${_?` // Draw cascade colors for debugging
| out_FragColor *= czm_cascadeColor(weights);
| `:""}`:A+=` float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0);
| applyNormalOffset(positionEC, normalEC, nDotL);
| vec4 shadowPosition = shadowMap_matrix * positionEC;
| // Stop early if the fragment is not in the shadow bounds
| if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))
| {
| return;
| }
| shadowParameters.texCoords = shadowPosition.xy;
| shadowParameters.depth = shadowPosition.z;
| shadowParameters.nDotL = nDotL;
| float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters);
| `,A+=` out_FragColor.rgb *= visibility;
| }
| `,E.push(A),new Be({defines:T,sources:E})};var Kp=U0;function fm(e){e=g(e,g.EMPTY_OBJECT);let t=e.context;if(!c(t))throw new w("context is required.");if(!c(e.lightCamera))throw new w("lightCamera is required.");if(c(e.numberOfCascades)&&e.numberOfCascades!==1&&e.numberOfCascades!==4)throw new w("Only one or four cascades are supported.");this._enabled=g(e.enabled,!0),this._softShadows=g(e.softShadows,!1),this._normalOffset=g(e.normalOffset,!0),this.dirty=!0,this.fromLightSource=g(e.fromLightSource,!0),this.darkness=g(e.darkness,.3),this._darkness=this.darkness,this.fadingEnabled=g(e.fadingEnabled,!0),this.maximumDistance=g(e.maximumDistance,5e3),this._outOfView=!1,this._outOfViewPrevious=!1,this._needsUpdate=!0;let n=!0;(sn.isInternetExplorer()||sn.isEdge()||(sn.isChrome()||sn.isFirefox())&&sn.isWindows()&&!t.depthTexture)&&(n=!1),this._polygonOffsetSupported=n,this._terrainBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.5,normalShading:!0,normalShadingSmooth:.3,depthBias:1e-4},this._primitiveBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.1,normalShading:!0,normalShadingSmooth:.05,depthBias:2e-5},this._pointBias={polygonOffset:!1,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:0,normalShading:!0,normalShadingSmooth:.1,depthBias:5e-4},this._depthAttachment=void 0,this._colorAttachment=void 0,this._shadowMapMatrix=new N,this._shadowMapTexture=void 0,this._lightDirectionEC=new d,this._lightPositionEC=new ee,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new nV,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new ne,this._isPointLight=g(e.isPointLight,!1),this._pointLightRadius=g(e.pointLightRadius,100),this._cascadesEnabled=this._isPointLight?!1:g(e.cascadesEnabled,!0),this._numberOfCascades=this._cascadesEnabled?g(e.numberOfCascades,4):0,this._fitNearFar=!0,this._maximumCascadeDistances=[25,150,700,Number.MAX_VALUE],this._textureSize=new k,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new No:c(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new ee,new ee],this._cascadeMatrices=[new N,new N,new N,new N],this._cascadeDistances=new ee;let i;this._isPointLight?i=6:this._cascadesEnabled?i=this._numberOfCascades:i=1,this._passes=new Array(i);for(let o=0;o<i;++o)this._passes[o]=new Glt(t);this.debugShow=!1,this.debugFreezeFrame=!1,this._debugFreezeFrame=!1,this._debugCascadeColors=!1,this._debugLightFrustum=void 0,this._debugCameraFrustum=void 0,this._debugCascadeFrustums=new Array(this._numberOfCascades),this._debugShadowViewCommand=void 0,this._usesDepthTexture=t.depthTexture,this._isPointLight&&(this._usesDepthTexture=!1),this._primitiveRenderState=void 0,this._terrainRenderState=void 0,this._pointRenderState=void 0,BY(this),this._clearCommand=new $n({depth:1,color:new z}),this._clearPassState=new ic(t),this._size=g(e.size,2048),this.size=this._size}fm.MAXIMUM_DISTANCE=2e4;function Glt(e){this.camera=new nV,this.passState=new ic(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function FY(e,t){return Fe.fromCache({cull:{enabled:!0,face:pi.BACK},depthTest:{enabled:!0},colorMask:{red:e,green:e,blue:e,alpha:e},depthMask:!0,polygonOffset:{enabled:t.polygonOffset,factor:t.polygonOffsetFactor,units:t.polygonOffsetUnits}})}function BY(e){let t=!e._usesDepthTexture;e._primitiveRenderState=FY(t,e._primitiveBias),e._terrainRenderState=FY(t,e._terrainBias),e._pointRenderState=FY(t,e._pointBias)}fm.prototype.debugCreateRenderStates=function(){BY(this)};Object.defineProperties(fm.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this.dirty=this._enabled!==e,this._enabled=e}},normalOffset:{get:function(){return this._normalOffset},set:function(e){this.dirty=this._normalOffset!==e,this._normalOffset=e,this._terrainBias.normalOffset=e,this._primitiveBias.normalOffset=e,this._pointBias.normalOffset=e}},softShadows:{get:function(){return this._softShadows},set:function(e){this.dirty=this._softShadows!==e,this._softShadows=e}},size:{get:function(){return this._size},set:function(e){Klt(this,e)}},outOfView:{get:function(){return this._outOfView}},shadowMapCullingVolume:{get:function(){return this._shadowMapCullingVolume}},passes:{get:function(){return this._passes}},isPointLight:{get:function(){return this._isPointLight}},debugCascadeColors:{get:function(){return this._debugCascadeColors},set:function(e){this.dirty=this._debugCascadeColors!==e,this._debugCascadeColors=e}}});function kY(e){let t=e._passes.length;for(let n=0;n<t;++n){let i=e._passes[n],o=i.framebuffer;c(o)&&!o.isDestroyed()&&o.destroy(),i.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function jlt(e,t){let n=new Pu({context:t,width:e._textureSize.x,height:e._textureSize.y,format:oc.DEPTH_COMPONENT16}),i=new Ot({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Re.RGBA,pixelDatatype:Ne.UNSIGNED_BYTE,sampler:Jt.NEAREST}),o=new Lr({context:t,depthRenderbuffer:n,colorTextures:[i],destroyAttachments:!1}),r=e._passes.length;for(let s=0;s<r;++s){let a=e._passes[s];a.framebuffer=o,a.passState.framebuffer=o}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function Wlt(e,t){let n=new Ot({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Re.DEPTH_STENCIL,pixelDatatype:Ne.UNSIGNED_INT_24_8,sampler:Jt.NEAREST}),i=new Lr({context:t,depthStencilTexture:n,destroyAttachments:!1}),o=e._passes.length;for(let r=0;r<o;++r){let s=e._passes[r];s.framebuffer=i,s.passState.framebuffer=i}e._shadowMapTexture=n,e._depthAttachment=n}function qlt(e,t){let n=new Pu({context:t,width:e._textureSize.x,height:e._textureSize.y,format:oc.DEPTH_COMPONENT16}),i=new Lo({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Re.RGBA,pixelDatatype:Ne.UNSIGNED_BYTE,sampler:Jt.NEAREST}),o=[i.negativeX,i.negativeY,i.negativeZ,i.positiveX,i.positiveY,i.positiveZ];for(let r=0;r<6;++r){let s=new Lr({context:t,depthRenderbuffer:n,colorTextures:[o[r]],destroyAttachments:!1}),a=e._passes[r];a.framebuffer=s,a.passState.framebuffer=s}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function sge(e,t){e._isPointLight?qlt(e,t):e._usesDepthTexture?Wlt(e,t):jlt(e,t)}function Ylt(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==Y.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,BY(e),kY(e),sge(e,t))}function Xlt(e,t){(!c(e._passes[0].framebuffer)||e._shadowMapTexture.width!==e._textureSize.x)&&(kY(e),sge(e,t),Ylt(e,t),age(e,t))}function age(e,t,n){n=g(n,0),(e._isPointLight||n===0)&&(e._clearCommand.framebuffer=e._passes[n].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function Klt(e,t){e._size=t;let n=e._passes,i=n.length,o=e._textureSize;if(e._isPointLight){t=ht.maximumCubeMapSize>=t?t:ht.maximumCubeMapSize,o.x=t,o.y=t;let r=new je(0,0,t,t);n[0].passState.viewport=r,n[1].passState.viewport=r,n[2].passState.viewport=r,n[3].passState.viewport=r,n[4].passState.viewport=r,n[5].passState.viewport=r}else i===1?(t=ht.maximumTextureSize>=t?t:ht.maximumTextureSize,o.x=t,o.y=t,n[0].passState.viewport=new je(0,0,t,t)):i===4&&(t=ht.maximumTextureSize>=t*2?t:ht.maximumTextureSize/2,o.x=t*2,o.y=t*2,n[0].passState.viewport=new je(0,0,t,t),n[1].passState.viewport=new je(t,0,t,t),n[2].passState.viewport=new je(0,t,t,t),n[3].passState.viewport=new je(t,t,t,t));e._clearPassState.viewport=new je(0,0,o.x,o.y);for(let r=0;r<i;++r){let s=n[r],a=s.passState.viewport,l=a.x/o.x,u=a.y/o.y,f=a.width/o.x,h=a.height/o.y;s.textureOffsets=new N(f,0,0,l,0,h,0,u,0,0,1,0,0,0,0,1)}}var $lt=new je;function Zlt(e,t){let n;e._isPointLight?n=`uniform samplerCube shadowMap_textureCube;
| in vec2 v_textureCoordinates;
| void main()
| {
| vec2 uv = v_textureCoordinates;
| vec3 dir;
|
| if (uv.y < 0.5)
| {
| if (uv.x < 0.333)
| {
| dir.x = -1.0;
| dir.y = uv.x * 6.0 - 1.0;
| dir.z = uv.y * 4.0 - 1.0;
| }
| else if (uv.x < 0.666)
| {
| dir.y = -1.0;
| dir.x = uv.x * 6.0 - 3.0;
| dir.z = uv.y * 4.0 - 1.0;
| }
| else
| {
| dir.z = -1.0;
| dir.x = uv.x * 6.0 - 5.0;
| dir.y = uv.y * 4.0 - 1.0;
| }
| }
| else
| {
| if (uv.x < 0.333)
| {
| dir.x = 1.0;
| dir.y = uv.x * 6.0 - 1.0;
| dir.z = uv.y * 4.0 - 3.0;
| }
| else if (uv.x < 0.666)
| {
| dir.y = 1.0;
| dir.x = uv.x * 6.0 - 3.0;
| dir.z = uv.y * 4.0 - 3.0;
| }
| else
| {
| dir.z = 1.0;
| dir.x = uv.x * 6.0 - 5.0;
| dir.y = uv.y * 4.0 - 3.0;
| }
| }
|
| float shadow = czm_unpackDepth(czm_textureCube(shadowMap_textureCube, dir));
| out_FragColor = vec4(vec3(shadow), 1.0);
| }
| `:n=`uniform sampler2D shadowMap_texture;
| in vec2 v_textureCoordinates;
| void main()
| {
| ${e._usesDepthTexture?` float shadow = texture(shadowMap_texture, v_textureCoordinates).r;
| `:` float shadow = czm_unpackDepth(texture(shadowMap_texture, v_textureCoordinates));
| `} out_FragColor = vec4(vec3(shadow), 1.0);
| }
| `;let i=t.createViewportQuadCommand(n,{uniformMap:{shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture}}});return i.pass=xe.OVERLAY,i}function Jlt(e,t){let n=t.context,i=t.context.drawingBufferWidth,o=t.context.drawingBufferHeight,r=Math.min(i,o)*.3,s=$lt;s.x=i-r,s.y=0,s.width=r,s.height=r;let a=e._debugShadowViewCommand;c(a)||(a=Zlt(e,n),e._debugShadowViewCommand=a),(!c(a.renderState)||!je.equals(a.renderState.viewport,s))&&(a.renderState=Fe.fromCache({viewport:je.clone(s)})),t.commandList.push(e._debugShadowViewCommand)}var dm=new Array(8);dm[0]=new ee(-1,-1,-1,1);dm[1]=new ee(1,-1,-1,1);dm[2]=new ee(1,1,-1,1);dm[3]=new ee(-1,1,-1,1);dm[4]=new ee(-1,-1,1,1);dm[5]=new ee(1,-1,1,1);dm[6]=new ee(1,1,1,1);dm[7]=new ee(-1,1,1,1);var Ty=new N,UY=new Array(8);for(let e=0;e<8;++e)UY[e]=new ee;function Qlt(e,t){let n=new wt({geometry:new oh({minimum:new d(-.5,-.5,-.5),maximum:new d(.5,.5,.5)}),attributes:{color:Ht.fromColor(t)}}),i=new wt({geometry:new Cg({radius:.5}),attributes:{color:Ht.fromColor(t)}});return new An({geometryInstances:[n,i],appearance:new nn({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:e})}var eut=[z.RED,z.GREEN,z.BLUE,z.MAGENTA],tut=new d;function nut(e,t){Jlt(e,t);let n=e.debugFreezeFrame&&!e._debugFreezeFrame;if(e._debugFreezeFrame=e.debugFreezeFrame,e.debugFreezeFrame&&(n&&(e._debugCameraFrustum=e._debugCameraFrustum&&e._debugCameraFrustum.destroy(),e._debugCameraFrustum=new Wp({camera:e._sceneCamera,color:z.CYAN,updateOnChange:!1})),e._debugCameraFrustum.update(t)),e._cascadesEnabled){if(e.debugFreezeFrame){n&&(e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=new Wp({camera:e._shadowMapCamera,color:z.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t);for(let i=0;i<e._numberOfCascades;++i)n&&(e._debugCascadeFrustums[i]=e._debugCascadeFrustums[i]&&e._debugCascadeFrustums[i].destroy(),e._debugCascadeFrustums[i]=new Wp({camera:e._passes[i].camera,color:eut[i],updateOnChange:!1})),e._debugCascadeFrustums[i].update(t)}}else if(e._isPointLight){if(!c(e._debugLightFrustum)||e._needsUpdate){let i=e._shadowMapCamera.positionWC,o=ve.IDENTITY,r=e._pointLightRadius*2,s=d.fromElements(r,r,r,tut),a=N.fromTranslationQuaternionRotationScale(i,o,s,Ty);e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=Qlt(a,z.YELLOW)}e._debugLightFrustum.update(t)}else(!c(e._debugLightFrustum)||e._needsUpdate)&&(e._debugLightFrustum=new Wp({camera:e._shadowMapCamera,color:z.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t)}function nV(){this.viewMatrix=new N,this.inverseViewMatrix=new N,this.frustum=void 0,this.positionCartographic=new re,this.positionWC=new d,this.directionWC=d.clone(d.UNIT_Z),this.upWC=d.clone(d.UNIT_Y),this.rightWC=d.clone(d.UNIT_X),this.viewProjectionMatrix=new N}nV.prototype.clone=function(e){N.clone(e.viewMatrix,this.viewMatrix),N.clone(e.inverseViewMatrix,this.inverseViewMatrix),this.frustum=e.frustum.clone(this.frustum),re.clone(e.positionCartographic,this.positionCartographic),d.clone(e.positionWC,this.positionWC),d.clone(e.directionWC,this.directionWC),d.clone(e.upWC,this.upWC),d.clone(e.rightWC,this.rightWC)};var iut=new N(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);nV.prototype.getViewProjection=function(){let e=this.viewMatrix,t=this.frustum.projectionMatrix;return N.multiply(t,e,this.viewProjectionMatrix),N.multiply(iut,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};var out=new Array(5),rut=new bi,sut=new Array(4),cge=new d,lge=new d;function aut(e,t){let n=e._shadowMapCamera,i=e._sceneCamera,o=i.frustum.near,r=i.frustum.far,s=e._numberOfCascades,a,l=r-o,u=r/o,f=.9,h=!1;t.shadowState.closestObjectSize<200&&(h=!0,f=.9);let m=sut,p=out;for(p[0]=o,p[s]=r,a=0;a<s;++a){let F=(a+1)/s,y=o*Math.pow(u,F),I=o+l*F,M=O.lerp(I,y,f);p[a+1]=M,m[a]=M-p[a]}if(h){for(a=0;a<s;++a)m[a]=Math.min(m[a],e._maximumCascadeDistances[a]);let F=p[0];for(a=0;a<s-1;++a)F+=m[a],p[a+1]=F}ee.unpack(p,0,e._cascadeSplits[0]),ee.unpack(p,1,e._cascadeSplits[1]),ee.unpack(m,0,e._cascadeDistances);let _=n.frustum,b=_.left,x=_.right,T=_.bottom,E=_.top,S=_.near,A=_.far,v=n.positionWC,D=n.directionWC,R=n.upWC,P=i.frustum.clone(rut),L=n.getViewProjection();for(a=0;a<s;++a){P.near=p[a],P.far=p[a+1];let F=N.multiply(P.projectionMatrix,i.viewMatrix,Ty),y=N.inverse(F,Ty),I=N.multiply(L,y,Ty),M=d.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,cge),B=d.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,lge);for(let X=0;X<8;++X){let $=ee.clone(dm[X],UY[X]);N.multiplyByVector(I,$,$),d.divideByScalar($,$.w,$),d.minimumByComponent($,M,M),d.maximumByComponent($,B,B)}M.x=Math.max(M.x,0),M.y=Math.max(M.y,0),M.z=0,B.x=Math.min(B.x,1),B.y=Math.min(B.y,1),B.z=Math.min(B.z,1);let U=e._passes[a],V=U.camera;V.clone(n);let W=V.frustum;W.left=b+M.x*(x-b),W.right=b+B.x*(x-b),W.bottom=T+M.y*(E-T),W.top=T+B.y*(E-T),W.near=S+M.z*(A-S),W.far=S+B.z*(A-S),U.cullingVolume=V.frustum.computeCullingVolume(v,D,R);let H=e._cascadeMatrices[a];N.multiply(V.getViewProjection(),i.inverseViewMatrix,H),N.multiply(U.textureOffsets,H,H)}}var cut=new N,lut=new d,uut=new d,oge=new d;function fut(e,t){let n=e._shadowMapCamera,i=e._sceneCamera,o=N.multiply(i.frustum.projectionMatrix,i.viewMatrix,Ty),r=N.inverse(o,Ty),s=n.directionWC,a=i.directionWC;d.equalsEpsilon(s,a,O.EPSILON10)&&(a=i.upWC);let l=d.cross(s,a,lut);a=d.cross(l,s,uut),d.normalize(a,a),d.normalize(l,l);let u=d.fromElements(0,0,0,oge),f=N.computeView(u,s,a,l,cut),h=N.multiply(f,r,Ty),m=d.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,cge),p=d.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,lge);for(let A=0;A<8;++A){let v=ee.clone(dm[A],UY[A]);N.multiplyByVector(h,v,v),d.divideByScalar(v,v.w,v),d.minimumByComponent(v,m,m),d.maximumByComponent(v,p,p)}p.z+=1e3,m.z-=10;let _=oge;_.x=-(.5*(m.x+p.x)),_.y=-(.5*(m.y+p.y)),_.z=-p.z;let b=N.fromTranslation(_,Ty);f=N.multiply(b,f,f);let x=.5*(p.x-m.x),T=.5*(p.y-m.y),E=p.z-m.z,S=n.frustum;S.left=-x,S.right=x,S.bottom=-T,S.top=T,S.near=.01,S.far=E,N.clone(f,n.viewMatrix),N.inverse(f,n.inverseViewMatrix),N.getTranslation(n.inverseViewMatrix,n.positionWC),t.mapProjection.ellipsoid.cartesianToCartographic(n.positionWC,n.positionCartographic),d.clone(s,n.directionWC),d.clone(a,n.upWC),d.clone(l,n.rightWC)}var dut=[new d(-1,0,0),new d(0,-1,0),new d(0,0,-1),new d(1,0,0),new d(0,1,0),new d(0,0,1)],hut=[new d(0,-1,0),new d(0,0,-1),new d(0,-1,0),new d(0,-1,0),new d(0,0,1),new d(0,-1,0)],mut=[new d(0,0,1),new d(1,0,0),new d(-1,0,0),new d(0,0,-1),new d(1,0,0),new d(1,0,0)];function put(e,t){let n=new bi;n.fov=O.PI_OVER_TWO,n.near=1,n.far=e._pointLightRadius,n.aspectRatio=1;for(let i=0;i<6;++i){let o=e._passes[i].camera;o.positionWC=e._shadowMapCamera.positionWC,o.positionCartographic=t.mapProjection.ellipsoid.cartesianToCartographic(o.positionWC,o.positionCartographic),o.directionWC=dut[i],o.upWC=hut[i],o.rightWC=mut[i],N.computeView(o.positionWC,o.directionWC,o.upWC,o.rightWC,o.viewMatrix),N.inverse(o.viewMatrix,o.inverseViewMatrix),o.frustum=n}}var _ut=new d,gut=new d,uge=new ne,rge=uge.center;function yut(e,t){let n=e._sceneCamera,i=e._shadowMapCamera,o=uge;if(e._cascadesEnabled){if(n.frustum.near>=e.maximumDistance){e._outOfView=!0,e._needsUpdate=!1;return}let r=t.mapProjection.ellipsoid.geodeticSurfaceNormal(n.positionWC,_ut),s=d.negate(i.directionWC,gut),a=d.dot(r,s);if(e.fadingEnabled){let l=O.clamp(a/.1,0,1);e._darkness=O.lerp(1,e.darkness,l)}else e._darkness=e.darkness;if(a<0){e._outOfView=!0,e._needsUpdate=!1;return}e._needsUpdate=!0,e._outOfView=!1}else if(e._isPointLight)o.center=i.positionWC,o.radius=e._pointLightRadius,e._outOfView=t.cullingVolume.computeVisibility(o)===Gt.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),ne.clone(o,e._boundingSphere);else{let r=i.frustum.far/2,s=d.add(i.positionWC,d.multiplyByScalar(i.directionWC,r,rge),rge);o.center=s,o.radius=r,e._outOfView=t.cullingVolume.computeVisibility(o)===Gt.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),ne.clone(o,e._boundingSphere)}}function but(e,t){let n=t.camera,i=e._lightCamera,o=e._sceneCamera,r=e._shadowMapCamera;e._cascadesEnabled?d.clone(i.directionWC,r.directionWC):e._isPointLight?d.clone(i.positionWC,r.positionWC):r.clone(i);let s=e._lightDirectionEC;N.multiplyByPointAsVector(n.viewMatrix,r.directionWC,s),d.normalize(s,s),d.negate(s,s),N.multiplyByPoint(n.viewMatrix,r.positionWC,e._lightPositionEC),e._lightPositionEC.w=e._pointLightRadius;let a,l;e._fitNearFar?(a=Math.min(t.shadowState.nearPlane,e.maximumDistance),l=Math.min(t.shadowState.farPlane,e.maximumDistance),l=Math.max(l,a+1)):(a=n.frustum.near,l=e.maximumDistance),e._sceneCamera=Qi.clone(n,o),n.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=a,e._sceneCamera.frustum.far=l,e._distance=l-a,yut(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}fm.prototype.update=function(e){if(but(this,e),this._needsUpdate)if(Xlt(this,e.context),this._isPointLight&&put(this,e),this._cascadesEnabled&&(fut(this,e),this._numberOfCascades>1&&aut(this,e)),this._isPointLight)this._shadowMapCullingVolume=rs.fromBoundingSphere(this._boundingSphere);else{let t=this._shadowMapCamera,n=t.positionWC,i=t.directionWC,o=t.upWC;this._shadowMapCullingVolume=t.frustum.computeCullingVolume(n,i,o),this._passes.length===1&&this._passes[0].camera.clone(t)}if(this._passes.length===1){let t=this._sceneCamera.inverseViewMatrix;N.multiply(this._shadowMapCamera.getViewProjection(),t,this._shadowMapMatrix)}this.debugShow&&nut(this,e)};fm.prototype.updatePass=function(e,t){age(this,e,t)};var xut=new k;function fge(e,t,n){let i=e._isPointLight?e._pointBias:n?e._terrainBias:e._primitiveBias,o={shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture},shadowMap_matrix:function(){return e._shadowMapMatrix},shadowMap_cascadeSplits:function(){return e._cascadeSplits},shadowMap_cascadeMatrices:function(){return e._cascadeMatrices},shadowMap_lightDirectionEC:function(){return e._lightDirectionEC},shadowMap_lightPositionEC:function(){return e._lightPositionEC},shadowMap_cascadeDistances:function(){return e._cascadeDistances},shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:function(){let r=xut;return r.x=1/e._textureSize.x,r.y=1/e._textureSize.y,ee.fromElements(r.x,r.y,i.depthBias,i.normalShadingSmooth,this.combinedUniforms1)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){return ee.fromElements(i.normalOffsetScale,e._distance,e.maximumDistance,e._darkness,this.combinedUniforms2)},combinedUniforms1:new ee,combinedUniforms2:new ee};return bt(t,o,!1)}function Tut(e,t,n,i,o,r){let s,a,l;if(c(r)&&(s=r.shaderProgram,a=r.renderState,l=r.uniformMap),r=Ke.shallowClone(n,r),r.castShadows=!0,r.receiveShadows=!1,!c(s)||o!==n.shaderProgram.id||t){let u=n.shaderProgram,f=n.pass===xe.GLOBE,h=n.pass!==xe.TRANSLUCENT,m=e._isPointLight,p=e._usesDepthTexture,_=Kp.getShadowCastShaderKeyword(m,f,p,h);if(s=i.shaderCache.getDerivedShaderProgram(u,_),!c(s)){let x=u.vertexShaderSource,T=u.fragmentShaderSource,E=Kp.createShadowCastVertexShader(x,m,f),S=Kp.createShadowCastFragmentShader(T,m,p,h);s=i.shaderCache.createDerivedShaderProgram(u,_,{vertexShaderSource:E,fragmentShaderSource:S,attributeLocations:u._attributeLocations})}a=e._primitiveRenderState,m?a=e._pointRenderState:f&&(a=e._terrainRenderState),n.renderState.cull.enabled||(a=ze(a,!1),a.cull=ze(a.cull,!1),a.cull.enabled=!1,a=Fe.fromCache(a)),l=fge(e,n.uniformMap,f)}return r.shaderProgram=s,r.renderState=a,r.uniformMap=l,r}fm.createReceiveDerivedCommand=function(e,t,n,i,o){c(o)||(o={});let r=e.length>0,s=t.shaderProgram,a=s.vertexShaderSource,l=s.fragmentShaderSource,u=t.pass===xe.GLOBE,f=!1;if(u&&(f=t.owner.data.renderedMesh.encoding.hasVertexNormals),t.receiveShadows&&r){let h,m;c(o.receiveCommand)&&(h=o.receiveCommand.shaderProgram,m=o.receiveCommand.uniformMap),o.receiveCommand=Ke.shallowClone(t,o.receiveCommand),o.castShadows=!1,o.receiveShadows=!0;let p=o.receiveShaderCastShadows!==t.castShadows,_=o.receiveShaderProgramId!==t.shaderProgram.id;if(!c(h)||_||n||p){let b=Kp.getShadowReceiveShaderKeyword(e[0],t.castShadows,u,f);if(h=i.shaderCache.getDerivedShaderProgram(s,b),!c(h)){let x=Kp.createShadowReceiveVertexShader(a,u,f),T=Kp.createShadowReceiveFragmentShader(l,e[0],t.castShadows,u,f);h=i.shaderCache.createDerivedShaderProgram(s,b,{vertexShaderSource:x,fragmentShaderSource:T,attributeLocations:s._attributeLocations})}m=fge(e[0],t.uniformMap,u)}o.receiveCommand.shaderProgram=h,o.receiveCommand.uniformMap=m,o.receiveShaderProgramId=t.shaderProgram.id,o.receiveShaderCastShadows=t.castShadows}return o};fm.createCastDerivedCommand=function(e,t,n,i,o){if(c(o)||(o={}),t.castShadows){let r=o.castCommands;c(r)||(r=o.castCommands=[]);let s=o.castShaderProgramId,a=e.length;r.length=a;for(let l=0;l<a;++l)r[l]=Tut(e[l],n,t,i,s,r[l]);o.castShaderProgramId=t.shaderProgram.id}return o};fm.prototype.isDestroyed=function(){return!1};fm.prototype.destroy=function(){kY(this),this._debugLightFrustum=this._debugLightFrustum&&this._debugLightFrustum.destroy(),this._debugCameraFrustum=this._debugCameraFrustum&&this._debugCameraFrustum.destroy(),this._debugShadowViewCommand=this._debugShadowViewCommand&&this._debugShadowViewCommand.shaderProgram&&this._debugShadowViewCommand.shaderProgram.destroy();for(let e=0;e<this._numberOfCascades;++e)this._debugCascadeFrustums[e]=this._debugCascadeFrustums[e]&&this._debugCascadeFrustums[e].destroy();return ue(this)};var Cy=fm;var iV=`uniform sampler2D u_opaqueDepthTexture;
| uniform sampler2D u_translucentDepthTexture;
|
| in vec2 v_textureCoordinates;
|
| void main()
| {
| float opaqueDepth = texture(u_opaqueDepthTexture, v_textureCoordinates).r;
| float translucentDepth = texture(u_translucentDepthTexture, v_textureCoordinates).r;
| translucentDepth = czm_branchFreeTernary(translucentDepth > opaqueDepth, 1.0, translucentDepth);
| out_FragColor = czm_packDepth(translucentDepth);
| }
| `;var dw=`uniform sampler2D colorTexture;
|
| #ifdef DEBUG_SHOW_DEPTH
| uniform sampler2D u_packedTranslucentDepth;
| #endif
|
| in vec2 v_textureCoordinates;
|
| void main()
| {
| #ifdef DEBUG_SHOW_DEPTH
| if (v_textureCoordinates.x < 0.5)
| {
| out_FragColor.rgb = vec3(czm_unpackDepth(texture(u_packedTranslucentDepth, v_textureCoordinates)));
| out_FragColor.a = 1.0;
| }
| #else
| vec4 color = texture(colorTexture, v_textureCoordinates);
|
| #ifdef PICK
| if (color == vec4(0.0))
| {
| discard;
| }
| #else
| // Reverse premultiplication process to get the correct composited result of the classification primitives
| color.rgb /= color.a;
| #endif
| out_FragColor = color;
| #endif
| }
| `;var Cut=!1;function Ey(e){this._drawClassificationFBO=new ui({createDepthAttachments:!1}),this._accumulationFBO=new ui({createDepthAttachments:!1}),this._packFBO=new ui,this._opaqueDepthStencilTexture=void 0,this._textureToComposite=void 0,this._translucentDepthStencilTexture=void 0,this._packDepthCommand=void 0,this._accumulateCommand=void 0,this._compositeCommand=void 0,this._copyCommand=void 0,this._clearColorCommand=new $n({color:new z(0,0,0,0),owner:this}),this._clearDepthStencilCommand=new $n({depth:1,stencil:0,owner:this}),this._supported=e.depthTexture,this._viewport=new je,this._rsDepth=void 0,this._rsAccumulate=void 0,this._rsComp=void 0,this._useScissorTest=void 0,this._scissorRectangle=void 0,this._hasTranslucentDepth=!1,this._frustumsDrawn=0}Object.defineProperties(Ey.prototype,{hasTranslucentDepth:{get:function(){return this._hasTranslucentDepth}}});function dge(e){e._textureToComposite=void 0,e._translucentDepthStencilTexture=e._translucentDepthStencilTexture&&!e._translucentDepthStencilTexture.isDestroyed()&&e._translucentDepthStencilTexture.destroy()}function hge(e){e._drawClassificationFBO.destroy(),e._accumulationFBO.destroy(),e._packFBO.destroy()}function Eut(e,t,n,i){dge(e),e._translucentDepthStencilTexture=new Ot({context:t,width:n,height:i,pixelFormat:Re.DEPTH_STENCIL,pixelDatatype:Ne.UNSIGNED_INT_24_8,sampler:Jt.NEAREST})}function wut(e,t,n,i){hge(e),e._drawClassificationFBO.setDepthStencilTexture(e._translucentDepthStencilTexture),e._drawClassificationFBO.update(t,n,i),e._accumulationFBO.setDepthStencilTexture(e._translucentDepthStencilTexture),e._accumulationFBO.update(t,n,i),e._packFBO.update(t,n,i)}function Sut(e,t,n,i){if(!e.isSupported())return;e._opaqueDepthStencilTexture=i;let o=e._opaqueDepthStencilTexture.width,r=e._opaqueDepthStencilTexture.height;e._drawClassificationFBO.isDirty(o,r)&&(Eut(e,t,o,r),wut(e,t,o,r));let s,a;if(c(e._packDepthCommand)||(s=new Be({sources:[iV]}),a={u_opaqueDepthTexture:function(){return e._opaqueDepthStencilTexture},u_translucentDepthTexture:function(){return e._translucentDepthStencilTexture}},e._packDepthCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),!c(e._compositeCommand)){s=new Be({sources:[dw]}),a={colorTexture:function(){return e._textureToComposite}},Cut&&(s.defines=["DEBUG_SHOW_DEPTH"],a.u_packedTranslucentDepth=function(){return e._packFBO.getColorTexture()}),e._compositeCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e});let f=e._compositeCommand,h=f.shaderProgram,m=t.shaderCache.createDerivedShaderProgram(h,"pick",{vertexShaderSource:h.vertexShaderSource,fragmentShaderSource:new Be({sources:s.sources,defines:["PICK"]}),attributeLocations:h._attributeLocations}),p=Ke.shallowClone(f);p.shaderProgram=m,f.derivedCommands.pick=p}c(e._copyCommand)||(s=new Be({sources:[dw]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._copyCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),c(e._accumulateCommand)||(s=new Be({sources:[dw]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._accumulateCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),e._viewport.width=o,e._viewport.height=r;let l=!je.equals(e._viewport,n.viewport),u=l!==e._useScissorTest;e._useScissorTest=l,je.equals(e._scissorRectangle,n.viewport)||(e._scissorRectangle=je.clone(n.viewport,e._scissorRectangle),u=!0),(!c(e._rsDepth)||!je.equals(e._viewport,e._rsDepth.viewport)||u)&&(e._rsDepth=Fe.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),c(e._packDepthCommand)&&(e._packDepthCommand.renderState=e._rsDepth),(!c(e._rsAccumulate)||!je.equals(e._viewport,e._rsAccumulate.viewport)||u)&&(e._rsAccumulate=Fe.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:Nn.EQUAL,reference:kt.CESIUM_3D_TILE_MASK}})),c(e._accumulateCommand)&&(e._accumulateCommand.renderState=e._rsAccumulate),(!c(e._rsComp)||!je.equals(e._viewport,e._rsComp.viewport)||u)&&(e._rsComp=Fe.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:cn.ALPHA_BLEND})),c(e._compositeCommand)&&(e._compositeCommand.renderState=e._rsComp,e._compositeCommand.derivedCommands.pick.renderState=e._rsComp)}Ey.prototype.executeTranslucentCommands=function(e,t,n,i,o){let r=e.frameState.useLogDepth,s=e.context,a=n.framebuffer;for(let l=0;l<i.length;++l){let u=i[l];if(u=r?u.derivedCommands.logDepth.command:u,u.depthForTranslucentClassification){this._hasTranslucentDepth=!0;break}}if(this._hasTranslucentDepth){Sut(this,s,n,o),n.framebuffer=this._drawClassificationFBO.framebuffer,this._clearDepthStencilCommand.execute(s,n);for(let l=0;l<i.length;++l){let u=i[l];if(u=r?u.derivedCommands.logDepth.command:u,!u.depthForTranslucentClassification)continue;let f=u.derivedCommands.depth.depthOnlyCommand;t(f,e,n)}this._frustumsDrawn+=this._hasTranslucentDepth?1:0,this._hasTranslucentDepth&&(n.framebuffer=this._packFBO.framebuffer,this._packDepthCommand.execute(s,n)),n.framebuffer=a}};Ey.prototype.executeClassificationCommands=function(e,t,n,i){if(!this._hasTranslucentDepth)return;let o=e.context,r=o.uniformState,s=n.framebuffer;n.framebuffer=this._accumulationFBO.framebuffer,this._accumulateCommand.execute(o,n),n.framebuffer=this._drawClassificationFBO.framebuffer,this._frustumsDrawn>1&&this._clearColorCommand.execute(o,n),r.updatePass(xe.CESIUM_3D_TILE_CLASSIFICATION);let a=r.globeDepthTexture;r.globeDepthTexture=this._packFBO.getColorTexture();let l=i.commands[xe.CESIUM_3D_TILE_CLASSIFICATION],u=i.indices[xe.CESIUM_3D_TILE_CLASSIFICATION];for(let f=0;f<u;++f)t(l[f],e,n);r.globeDepthTexture=a,n.framebuffer=s,this._frustumsDrawn!==1&&(n.framebuffer=this._accumulationFBO.framebuffer,this._accumulateCommand.execute(o,n),n.framebuffer=s)};Ey.prototype.execute=function(e,t){if(!this._hasTranslucentDepth)return;this._frustumsDrawn===1?this._textureToComposite=this._drawClassificationFBO.getColorTexture():this._textureToComposite=this._accumulationFBO.getColorTexture(),(e.frameState.passes.pick?this._compositeCommand.derivedCommands.pick:this._compositeCommand).execute(e.context,t),Aut(this,e,t)};function Aut(e,t,n){if(!e._hasTranslucentDepth)return;let i=n.framebuffer;n.framebuffer=e._drawClassificationFBO.framebuffer,e._clearColorCommand.execute(t._context,n),n.framebuffer=i,e._frustumsDrawn>1&&(n.framebuffer=e._accumulationFBO.framebuffer,e._clearColorCommand.execute(t._context,n)),e._hasTranslucentDepth=!1,e._frustumsDrawn=0}Ey.prototype.isSupported=function(){return this._supported};Ey.prototype.isDestroyed=function(){return!1};Ey.prototype.destroy=function(){return dge(this),hge(this),c(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),c(this._packDepthCommand)&&(this._packDepthCommand.shaderProgram=this._packDepthCommand.shaderProgram&&this._packDepthCommand.shaderProgram.destroy()),ue(this)};var oV=Ey;function vut(){this.command=void 0,this.near=void 0,this.far=void 0}function rV(e,t,n){let i=e.context,o;i.depthTexture&&(o=new $z);let r;e._useOIT&&i.depthTexture&&(r=new Qz(i));let s=new ic(i);s.viewport=je.clone(n),this.camera=t,this._cameraClone=Qi.clone(t),this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.viewport=n,this.passState=s,this.pickFramebuffer=new tV(i),this.pickDepthFramebuffer=new eV,this.sceneFramebuffer=new fw,this.globeDepth=o,this.globeTranslucencyFramebuffer=new Zz,this.oit=r,this.translucentTileClassification=new oV(i),this.pickDepths=[],this.frustumCommandsList=[],this.debugFrustumStatistics=void 0,this._commandExtents=[]}var zY=new d,VY=new d;function Dut(e,t,n){let i=Math.max(d.maximumComponent(d.abs(e.position,zY)),d.maximumComponent(d.abs(t.position,VY))),o=1/Math.max(1,i);return d.multiplyByScalar(e.position,o,zY),d.multiplyByScalar(t.position,o,VY),d.equalsEpsilon(zY,VY,n)&&d.equalsEpsilon(e.direction,t.direction,n)&&d.equalsEpsilon(e.up,t.up,n)&&d.equalsEpsilon(e.right,t.right,n)&&N.equalsEpsilon(e.transform,t.transform,n)&&e.frustum.equalsEpsilon(t.frustum,n)}rV.prototype.checkForCameraUpdates=function(e){let t=this.camera,n=this._cameraClone;return Dut(t,n,O.EPSILON15)?(this._cameraStartFired&&yi()-this._cameraMovedTime>e.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=yi(),Qi.clone(t,n),!0)};function Iut(e,t,n,i){let{frameState:o}=t,{camera:r,useLogDepth:s}=o,a=s?t.logarithmicDepthFarToNearRatio:t.farToNearRatio,l=t.mode===J.SCENE2D,u=t.nearToFarDistance2D;i*=1+O.EPSILON2,n=Math.min(Math.max(n,r.frustum.near),r.frustum.far),i=Math.max(Math.min(i,r.frustum.far),n);let f;l?(i=Math.min(i,r.position.z+t.nearToFarDistance2D),n=Math.min(n,i),f=Math.ceil(Math.max(1,i-n)/t.nearToFarDistance2D)):f=Math.ceil(Math.log(i/n)/Math.log(a));let{frustumCommandsList:h}=e;h.length=f;for(let m=0;m<f;++m){let p,_;l?(p=Math.min(i-u,n+m*u),_=Math.min(i,p+u)):(p=Math.max(n,Math.pow(a,m)*n),_=Math.min(i,a*p));let b=h[m];c(b)?(b.near=p,b.far=_):b=h[m]=new Kz(p,_)}}function Out(e,t,n){let{command:i,near:o,far:r}=n;t.debugShowFrustums&&(i.debugOverlappingFrustums=0);let{frustumCommandsList:s}=e;for(let a=0;a<s.length;++a){let l=s[a];if(o>l.far)continue;if(r<l.near)break;let u=i.pass,f=l.indices[u]++;if(l.commands[u][f]=i,t.debugShowFrustums&&(i.debugOverlappingFrustums|=1<<a),i.executeInClosestFrustum)break}if(t.debugShowFrustums){let{debugFrustumStatistics:a}=e,{debugOverlappingFrustums:l}=i,u=a.commandsInFrustums;u[l]=c(u[l])?u[l]+1:1,++a.totalCommands}t.updateDerivedCommands(i)}var mge=new rs,Put=new Da;rV.prototype.createPotentiallyVisibleSet=function(e){let{frameState:t}=e,{camera:n,commandList:i,shadowState:o}=t,{positionWC:r,directionWC:s,frustum:a}=n,l=e._computeCommandList,u=e._overlayCommandList;e.debugShowFrustums&&(this.debugFrustumStatistics={totalCommands:0,commandsInFrustums:{}});let f=this.frustumCommandsList;for(let L=0;L<f.length;++L)for(let F=0;F<xe.NUMBER_OF_PASSES;++F)f[L].indices[F]=0;l.length=0,u.length=0;let h=this._commandExtents,m=h.length,p=0,_=+Number.MAX_VALUE,b=-Number.MAX_VALUE,{shadowsEnabled:x}=o,T=+Number.MAX_VALUE,E=-Number.MAX_VALUE,S=Number.MAX_VALUE,A=t.mode===J.SCENE3D?t.occluder:void 0,{cullingVolume:v}=t,D=mge.planes;for(let L=0;L<5;++L)D[L]=v.planes[L];v=mge;for(let L=0;L<i.length;++L){let F=i[L],{pass:y,boundingVolume:I}=F;if(y===xe.COMPUTE)l.push(F);else if(y===xe.OVERLAY)u.push(F);else{let M,B;if(c(I)){if(!e.isVisible(v,F,A))continue;let V=I.computePlaneDistances(r,s,Put);if(M=V.start,B=V.stop,_=Math.min(_,M),b=Math.max(b,B),x&&F.receiveShadows&&M<Cy.MAXIMUM_DISTANCE&&!(y===xe.GLOBE&&M<-100&&B>100)){let W=B-M;y!==xe.GLOBE&&M<100&&(S=Math.min(S,W)),T=Math.min(T,M),E=Math.max(E,B)}}else F instanceof $n?(M=a.near,B=a.far):(M=a.near,B=a.far,_=Math.min(_,M),b=Math.max(b,B));let U=h[p];c(U)||(U=h[p]=new vut),U.command=F,U.near=M,U.far=B,p++}}x&&(T=Math.min(Math.max(T,a.near),a.far),E=Math.max(Math.min(E,a.far),T),o.nearPlane=T,o.farPlane=E,o.closestObjectSize=S),Iut(this,e,_,b);for(let L=0;L<p;L++)Out(this,e,h[L]);if(p<m)for(let L=p;L<m;L++){let F=h[L];if(!c(F.command))break;F.command=void 0}let R=f.length,{frustumSplits:P}=t;P.length=R+1;for(let L=0;L<R;++L)P[L]=f[L].near,L===R-1&&(P[L+1]=f[L].far)};rV.prototype.destroy=function(){this.pickFramebuffer=this.pickFramebuffer&&this.pickFramebuffer.destroy(),this.pickDepthFramebuffer=this.pickDepthFramebuffer&&this.pickDepthFramebuffer.destroy(),this.sceneFramebuffer=this.sceneFramebuffer&&this.sceneFramebuffer.destroy(),this.globeDepth=this.globeDepth&&this.globeDepth.destroy(),this.oit=this.oit&&this.oit.destroy(),this.translucentTileClassification=this.translucentTileClassification&&this.translucentTileClassification.destroy(),this.globeTranslucencyFramebuffer=this.globeTranslucencyFramebuffer&&this.globeTranslucencyFramebuffer.destroy();let e=this.pickDepths;for(let t=0;t<e.length;++t)e[t].destroy()};var hw=rV;var _ge=.1,Rut=new Nd({pass:dr.MOST_DETAILED_PRELOAD}),Mut=new Nd({pass:dr.MOST_DETAILED_PICK}),dI=new Nd({pass:dr.PICK});function Ms(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;let t=new je(0,0,1,1),n=new Qi(e);n.frustum=new an({width:_ge,aspectRatio:1,near:.1}),this._pickOffscreenView=new hw(e,n,t)}Ms.prototype.update=function(){this._pickPositionCacheDirty=!0};Ms.prototype.getPickDepth=function(e,t){let n=e.view.pickDepths,i=n[t];return c(i)||(i=new Xz,n[t]=i),i};var Lut=new No,Nut=new d,sV=new d,Fut=new k,But=new N;function kut(e,t,n,i,o){let r=e.camera,s=r.frustum,a=s.offCenterFrustum;c(a)&&(s=a);let l=2*(t.x-o.x)/o.width-1;l*=(s.right-s.left)*.5;let u=2*(o.height-t.y-o.y)/o.height-1;u*=(s.top-s.bottom)*.5;let f=N.clone(r.transform,But);r._setTransform(N.IDENTITY);let h=d.clone(r.position,Nut);d.multiplyByScalar(r.right,l,sV),d.add(sV,h,h),d.multiplyByScalar(r.up,u,sV),d.add(sV,h,h),r._setTransform(f),e.mode===J.SCENE2D&&d.fromElements(h.z,h.x,h.y,h);let m=s.getPixelDimensions(o.width,o.height,1,1,Fut),p=Lut;return p.right=m.x*.5,p.left=-p.right,p.top=m.y*.5,p.bottom=-p.top,p.near=s.near,p.far=s.far,p.computeCullingVolume(h,r.directionWC,r.upWC)}var Uut=new gl,zut=new k;function Vut(e,t,n,i,o){let r=e.camera,s=r.frustum,a=s.near,l=Math.tan(s.fovy*.5),u=s.aspectRatio*l,f=2*(t.x-o.x)/o.width-1,h=2*(o.height-t.y-o.y)/o.height-1,m=f*a*u,p=h*a*l,_=s.getPixelDimensions(o.width,o.height,1,1,zut),b=_.x*n*.5,x=_.y*i*.5,T=Uut;return T.top=p+x,T.bottom=p-x,T.right=m+b,T.left=m-b,T.near=a,T.far=s.far,T.computeCullingVolume(r.positionWC,r.directionWC,r.upWC)}function aV(e,t,n,i,o){let r=e.camera.frustum;return r instanceof an||r instanceof No?kut(e,t,n,i,o):Vut(e,t,n,i,o)}var cV=new je(0,0,3,3),lV=new k,hI=new z(0,0,0,0);function HY(e,t,n,i,o){return o.width=g(n,3),o.height=g(i,o.width),o.x=t.x-(o.width-1)*.5,o.y=e-t.y-(o.height-1)*.5,o}Ms.prototype.pick=function(e,t,n,i){C.defined("windowPosition",t);let{context:o,frameState:r,defaultView:s}=e,{viewport:a,pickFramebuffer:l}=s;e.view=s,a.x=0,a.y=0,a.width=o.drawingBufferWidth,a.height=o.drawingBufferHeight;let u=s.passState;u.viewport=je.clone(a,u.viewport);let f=Yi.transformWindowToDrawingBuffer(e,t,lV),h=HY(o.drawingBufferHeight,f,n,i,cV);e.jobScheduler.disableThisFrame(),e.updateFrameState(),r.cullingVolume=aV(e,f,h.width,h.height,a),r.invertClassification=!1,r.passes.pick=!0,r.tilesetPassState=dI,o.uniformState.update(r),e.updateEnvironment(),u=l.begin(h,a),e.updateAndExecuteCommands(u,hI),e.resolveFramebuffers(u);let m=l.end(h);return o.endFrame(),m};Ms.prototype.pickVoxelCoordinate=function(e,t,n,i){C.defined("windowPosition",t);let{context:o,frameState:r,defaultView:s}=e,{viewport:a,pickFramebuffer:l}=s;e.view=s,a.x=0,a.y=0,a.width=o.drawingBufferWidth,a.height=o.drawingBufferHeight;let u=s.passState;u.viewport=je.clone(a,u.viewport);let f=Yi.transformWindowToDrawingBuffer(e,t,lV),h=HY(o.drawingBufferHeight,f,n,i,cV);e.jobScheduler.disableThisFrame(),e.updateFrameState(),r.cullingVolume=aV(e,f,h.width,h.height,a),r.invertClassification=!1,r.passes.pickVoxel=!0,r.tilesetPassState=dI,o.uniformState.update(r),e.updateEnvironment(),u=l.begin(h,a),e.updateAndExecuteCommands(u,hI),e.resolveFramebuffers(u);let m=l.readCenterPixel(h);return o.endFrame(),m};Ms.prototype.pickMetadata=function(e,t,n){C.typeOf.object("windowPosition",t),C.typeOf.object("pickedMetadataInfo",n);let{context:i,frameState:o,defaultView:r}=e,{viewport:s,pickFramebuffer:a}=r;e.view=r,s.x=0,s.y=0,s.width=i.drawingBufferWidth,s.height=i.drawingBufferHeight;let l=r.passState;l.viewport=je.clone(s,l.viewport);let u=Yi.transformWindowToDrawingBuffer(e,t,lV),f=HY(i.drawingBufferHeight,u,1,1,cV);e.jobScheduler.disableThisFrame(),e.updateFrameState(),o.cullingVolume=aV(e,u,f.width,f.height,s),o.invertClassification=!1,o.passes.pick=!0,o.tilesetPassState=dI,o.pickingMetadata=!0,o.pickedMetadataInfo=n,i.uniformState.update(o),e.updateEnvironment(),l=a.begin(f,s),e.updateAndExecuteCommands(l,hI);let h=e._environmentState.useOIT;e._environmentState.useOIT=!1,e.resolveFramebuffers(l),e._environmentState.useOIT=h;let m=a.readCenterPixel(f);return i.endFrame(),o.pickingMetadata=!1,Yz.decodeMetadataValues(n.classProperty,m)};function Hut(e,t){let{defaultView:n,context:i,frameState:o,environmentState:r}=e,{viewport:s,pickDepthFramebuffer:a}=n;e.view=n,s.x=0,s.y=0,s.width=i.drawingBufferWidth,s.height=i.drawingBufferHeight;let l=n.passState;l.viewport=je.clone(s,l.viewport),e.clearPasses(o.passes),o.passes.pick=!0,o.passes.depth=!0,o.cullingVolume=aV(e,t,1,1,s),o.tilesetPassState=dI,e.updateEnvironment(),r.renderTranslucentDepthForPick=!0,l=a.update(i,t,s),e.updateAndExecuteCommands(l,hI),e.resolveFramebuffers(l),i.endFrame()}var Gut=new bi,jut=new gl,Wut=new an,qut=new No;Ms.prototype.pickPositionWorldCoordinates=function(e,t,n){if(!e.useDepthPicking)return;if(C.defined("windowPosition",t),!e.context.depthTexture)throw new w("Picking from the depth buffer is not supported. Check pickPositionSupported.");let i=t.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(i))return d.clone(this._pickPositionCache[i],n);let{context:o,frameState:r,camera:s,defaultView:a}=e,{uniformState:l}=o;e.view=a;let u=Yi.transformWindowToDrawingBuffer(e,t,lV);e.pickTranslucentDepth?Hut(e,u):(e.updateFrameState(),l.update(r),e.updateEnvironment()),u.y=e.drawingBufferHeight-u.y;let f;c(s.frustum.fov)?f=s.frustum.clone(Gut):c(s.frustum.infiniteProjectionMatrix)?f=s.frustum.clone(jut):c(s.frustum.width)?f=s.frustum.clone(Wut):f=s.frustum.clone(qut);let{frustumCommandsList:h}=a,m=h.length;for(let p=0;p<m;++p){let b=this.getPickDepth(e,p).getDepth(o,u.x,u.y);if(c(b)&&b>0&&b<1){let x=h[p],T;return e.mode===J.SCENE2D?(T=s.position.z,s.position.z=T-x.near+1,f.far=Math.max(1,x.far-x.near),f.near=1,l.update(r),l.updateFrustum(f)):(f.near=x.near*(p!==0?e.opaqueFrustumNearOffset:1),f.far=x.far,l.updateFrustum(f)),n=Yi.drawingBufferToWorldCoordinates(e,u,b,n),e.mode===J.SCENE2D&&(s.position.z=T,l.update(r)),this._pickPositionCache[i]=d.clone(n),n}}this._pickPositionCache[i]=void 0};var Yut=new re;Ms.prototype.pickPosition=function(e,t,n){if(n=this.pickPositionWorldCoordinates(e,t,n),c(n)&&e.mode!==J.SCENE3D){d.fromElements(n.y,n.z,n.x,n);let i=e.mapProjection,o=i.ellipsoid,r=i.unproject(n,Yut);o.cartographicToCartesian(r,n)}return n};function gge(e,t){let n,i,o=[],r=[],s=[],a=[];c(e)||(e=Number.MAX_VALUE);let l=t();for(;c(l);){let u=l.object,f=l.position,h=l.exclude;if(c(f)&&!c(u)){o.push(l);break}if(!c(u)||!c(u.primitive)||!h&&(o.push(l),0>=--e))break;let m=u.primitive,p=!1;typeof m.getGeometryInstanceAttributes=="function"&&c(u.id)&&(i=m.getGeometryInstanceAttributes(u.id),c(i)&&c(i.show)&&(p=!0,i.show=gn.toValue(!1,i.show),s.push(i))),u instanceof Jc&&(p=!0,u.show=!1,a.push(u)),p||(m.show=!1,r.push(m)),l=t()}for(n=0;n<r.length;++n)r[n].show=!0;for(n=0;n<s.length;++n)i=s[n],i.show=gn.toValue(!0,i.show);for(n=0;n<a.length;++n)a[n].show=!0;return o}Ms.prototype.drillPick=function(e,t,n,i,o){let r=this;return gge(n,function(){let l=r.pick(e,t,i,o);if(c(l))return{object:l,position:void 0,exclude:!1}}).map(function(l){return l.object})};var pge=new d,Xut=new d;function Kut(e,t,n){this.ray=e,this.width=t,this.tilesets=n,this.ready=!1;let i=this;this.promise=new Promise(o=>{i._completePick=()=>{o()}})}function yge(e,t,n,i){let o=t.direction,r=d.mostOrthogonalAxis(o,pge),s=d.cross(o,r,pge),a=d.cross(o,s,Xut);return i.position=t.origin,i.direction=o,i.up=a,i.right=s,i.frustum.width=g(n,_ge),i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC)}function $ut(e,t,n){let i=t.frameState,{ray:o,width:r,tilesets:s}=n,a=e._pickOffscreenView.camera,l=yge(e,o,r,a),u=Rut;u.camera=a,u.cullingVolume=l;let f=!0,h=s.length;for(let m=0;m<h;++m){let p=s[m];p.show&&t.primitives.contains(p)&&(p.updateForPass(i,u),f=f&&u.ready)}return f&&n._completePick(),f}Ms.prototype.updateMostDetailedRayPicks=function(e){let t=this._mostDetailedRayPicks;for(let n=0;n<t.length;++n)$ut(this,e,t[n])&&t.splice(n--,1)};function bge(e,t,n){for(let i=0;i<e.length;++i){let o=e.get(i);o.show&&(c(o.isCesium3DTileset)?(!c(t)||t.indexOf(o)===-1)&&n.push(o):o instanceof $l&&bge(o,t,n))}}function uV(e,t,n,i,o,r){let s=[];if(bge(t.primitives,i,s),s.length===0)return Promise.resolve(r());let a=new Kut(n,o,s);return e._mostDetailedRayPicks.push(a),a.promise.then(function(){return r()})}function Zut(e,t){return!c(e)||!c(t)||t.length===0?!1:t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1}function Jut(e,t,n,i,o,r,s){let{context:a,frameState:l}=t,u=a.uniformState,f=e._pickOffscreenView;t.view=f,yge(e,n,o,f.camera);let h=je.clone(f.viewport,cV),m=f.pickFramebuffer.begin(h,f.viewport);t.jobScheduler.disableThisFrame(),t.updateFrameState(),l.invertClassification=!1,l.passes.pick=!0,l.passes.offscreen=!0,s?l.tilesetPassState=Mut:l.tilesetPassState=dI,u.update(l),t.updateEnvironment(),t.updateAndExecuteCommands(m,hI),t.resolveFramebuffers(m);let p,_=f.pickFramebuffer.end(h);if(t.context.depthTexture){let{frustumCommandsList:b}=f,x=b.length;for(let T=0;T<x;++T){let S=e.getPickDepth(t,T).getDepth(a,0,0);if(c(S)&&S>0&&S<1){let A=b[T],v=A.near*(T!==0?t.opaqueFrustumNearOffset:1),D=A.far,R=v+S*(D-v);p=mn.getPoint(n,R);break}}}if(t.view=t.defaultView,a.endFrame(),c(_)||c(p))return{object:_,position:p,exclude:!c(p)&&r||Zut(_,i)}}function xge(e,t,n,i,o,r,s,a){return gge(i,function(){return Jut(e,t,n,o,r,s,a)})}function mw(e,t,n,i,o,r,s){let a=xge(e,t,n,1,i,o,r,s);if(a.length>0)return a[0]}function Tge(e,t,n,i,o,r,s,a){return xge(e,t,n,i,o,r,s,a)}function fV(e,t){return new Promise((n,i)=>{t.then(function(o){let r=e.postRender.addEventListener(function(){r(),n(o)});e.requestRender()}).catch(function(o){i(o)})})}Ms.prototype.pickFromRay=function(e,t,n,i){if(C.defined("ray",t),e.mode!==J.SCENE3D)throw new w("Ray intersections are only supported in 3D mode.");return mw(this,e,t,n,i,!1,!1)};Ms.prototype.drillPickFromRay=function(e,t,n,i,o){if(C.defined("ray",t),e.mode!==J.SCENE3D)throw new w("Ray intersections are only supported in 3D mode.");return Tge(this,e,t,n,i,o,!1,!1)};Ms.prototype.pickFromRayMostDetailed=function(e,t,n,i){if(C.defined("ray",t),e.mode!==J.SCENE3D)throw new w("Ray intersections are only supported in 3D mode.");let o=this;return t=mn.clone(t),n=c(n)?n.slice():n,fV(e,uV(o,e,t,n,i,function(){return mw(o,e,t,n,i,!1,!0)}))};Ms.prototype.drillPickFromRayMostDetailed=function(e,t,n,i,o){if(C.defined("ray",t),e.mode!==J.SCENE3D)throw new w("Ray intersections are only supported in 3D mode.");let r=this;return t=mn.clone(t),i=c(i)?i.slice():i,fV(e,uV(r,e,t,i,o,function(){return Tge(r,e,t,n,i,o,!1,!0)}))};var Qut=new d,eft=new d,tft=new mn,Cge=new re;function GY(e,t){let n=e.ellipsoid,i=ai._defaultMaxTerrainHeight,o=n.geodeticSurfaceNormalCartographic(t,eft),r=re.toCartesian(t,n,Qut),s=tft;s.origin=r,s.direction=o;let a=new mn;return mn.getPoint(s,i,a.origin),d.negate(o,a.direction),a}function Ege(e,t){let n=e.ellipsoid,i=re.fromCartesian(t,n,Cge);return GY(e,i)}function wge(e,t){let n=e.ellipsoid;return re.fromCartesian(t,n,Cge).height}function nft(e,t,n,i,o){let r=GY(t,n);return uV(e,t,r,i,o,function(){let s=mw(e,t,r,i,o,!0,!0);if(c(s))return wge(t,s.position)})}function ift(e,t,n,i,o,r){let s=Ege(t,n);return uV(e,t,s,i,o,function(){let a=mw(e,t,s,i,o,!0,!0);if(c(a))return d.clone(a.position,r)})}Ms.prototype.sampleHeight=function(e,t,n,i){if(C.defined("position",t),e.mode!==J.SCENE3D)throw new w("sampleHeight is only supported in 3D mode.");if(!e.sampleHeightSupported)throw new w("sampleHeight requires depth texture support. Check sampleHeightSupported.");let o=GY(e,t),r=mw(this,e,o,n,i,!0,!1);if(c(r))return wge(e,r.position)};Ms.prototype.clampToHeight=function(e,t,n,i,o){if(C.defined("cartesian",t),e.mode!==J.SCENE3D)throw new w("clampToHeight is only supported in 3D mode.");if(!e.clampToHeightSupported)throw new w("clampToHeight requires depth texture support. Check clampToHeightSupported.");let r=Ege(e,t),s=mw(this,e,r,n,i,!0,!1);if(c(s))return d.clone(s.position,o)};Ms.prototype.sampleHeightMostDetailed=function(e,t,n,i){if(C.defined("positions",t),e.mode!==J.SCENE3D)throw new w("sampleHeightMostDetailed is only supported in 3D mode.");if(!e.sampleHeightSupported)throw new w("sampleHeightMostDetailed requires depth texture support. Check sampleHeightSupported.");n=c(n)?n.slice():n;let o=t.length,r=new Array(o);for(let s=0;s<o;++s)r[s]=nft(this,e,t[s],n,i);return fV(e,Promise.all(r).then(function(s){let a=s.length;for(let l=0;l<a;++l)t[l].height=s[l];return t}))};Ms.prototype.clampToHeightMostDetailed=function(e,t,n,i){if(C.defined("cartesians",t),e.mode!==J.SCENE3D)throw new w("clampToHeightMostDetailed is only supported in 3D mode.");if(!e.clampToHeightSupported)throw new w("clampToHeightMostDetailed requires depth texture support. Check clampToHeightSupported.");n=c(n)?n.slice():n;let o=t.length,r=new Array(o);for(let s=0;s<o;++s)r[s]=ift(this,e,t[s],n,i,t[s]);return fV(e,Promise.all(r).then(function(s){let a=s.length;for(let l=0;l<a;++l)t[l]=s[l];return t}))};Ms.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()};var dV=Ms;var hV=`uniform sampler2D colorTexture;
|
| in vec2 v_textureCoordinates;
|
| #ifdef AUTO_EXPOSURE
| uniform sampler2D autoExposure;
| #else
| uniform float exposure;
| #endif
|
| void main()
| {
| vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
| vec3 color = fragmentColor.rgb;
|
| #ifdef AUTO_EXPOSURE
| color /= texture(autoExposure, vec2(0.5)).r;
| #else
| color *= vec3(exposure);
| #endif
| color = czm_acesTonemapping(color);
| color = czm_inverseGamma(color);
|
| out_FragColor = vec4(color, fragmentColor.a);
| }
| `;var mV=`precision highp float;
|
| uniform sampler2D randomTexture;
| uniform sampler2D depthTexture;
| uniform float intensity;
| uniform float bias;
| uniform float lengthCap;
| uniform float stepSize;
| uniform float frustumLength;
|
| vec3 pixelToEye(vec2 screenCoordinate)
| {
| vec2 uv = screenCoordinate / czm_viewport.zw;
| float depth = czm_readDepth(depthTexture, uv);
| vec2 xy = 2.0 * uv - vec2(1.0);
| vec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);
| return posEC.xyz / posEC.w;
| }
|
| // Reconstruct surface normal in eye coordinates, avoiding edges
| vec3 getNormalXEdge(vec3 positionEC)
| {
| // Find the 3D surface positions at adjacent screen pixels
| vec2 centerCoord = gl_FragCoord.xy;
| vec3 positionLeft = pixelToEye(centerCoord + vec2(-1.0, 0.0));
| vec3 positionRight = pixelToEye(centerCoord + vec2(1.0, 0.0));
| vec3 positionUp = pixelToEye(centerCoord + vec2(0.0, 1.0));
| vec3 positionDown = pixelToEye(centerCoord + vec2(0.0, -1.0));
|
| // Compute potential tangent vectors
| vec3 dx0 = positionEC - positionLeft;
| vec3 dx1 = positionRight - positionEC;
| vec3 dy0 = positionEC - positionDown;
| vec3 dy1 = positionUp - positionEC;
|
| // The shorter tangent is more likely to be on the same surface
| vec3 dx = length(dx0) < length(dx1) ? dx0 : dx1;
| vec3 dy = length(dy0) < length(dy1) ? dy0 : dy1;
|
| return normalize(cross(dx, dy));
| }
|
| void main(void)
| {
| vec3 positionEC = pixelToEye(gl_FragCoord.xy);
|
| if (positionEC.z > frustumLength)
| {
| out_FragColor = vec4(1.0);
| return;
| }
|
| vec3 normalEC = getNormalXEdge(positionEC);
|
| float ao = 0.0;
|
| const int ANGLE_STEPS = 4;
| float angleStepScale = 1.0 / float(ANGLE_STEPS);
| float angleStep = angleStepScale * czm_twoPi;
| float cosStep = cos(angleStep);
| float sinStep = sin(angleStep);
| mat2 rotateStep = mat2(cosStep, sinStep, -sinStep, cosStep);
|
| // Initial sampling direction (different for each pixel)
| const float randomTextureSize = 255.0;
| vec2 randomTexCoord = fract(gl_FragCoord.xy / randomTextureSize);
| float randomVal = texture(randomTexture, randomTexCoord).x;
| vec2 sampleDirection = vec2(cos(angleStep * randomVal), sin(angleStep * randomVal));
|
| // Loop over sampling directions
| for (int i = 0; i < ANGLE_STEPS; i++)
| {
| sampleDirection = rotateStep * sampleDirection;
|
| float localAO = 0.0;
| vec2 radialStep = stepSize * sampleDirection;
|
| for (int j = 0; j < 6; j++)
| {
| // Step along sampling direction, away from output pixel
| vec2 newCoords = floor(gl_FragCoord.xy + float(j + 1) * radialStep) + vec2(0.5);
|
| // Exit if we stepped off the screen
| if (clamp(newCoords, vec2(0.0), czm_viewport.zw) != newCoords)
| {
| break;
| }
|
| vec3 stepPositionEC = pixelToEye(newCoords);
| vec3 stepVector = stepPositionEC - positionEC;
| float stepLength = length(stepVector);
|
| if (stepLength > lengthCap)
| {
| break;
| }
|
| float dotVal = clamp(dot(normalEC, normalize(stepVector)), 0.0, 1.0);
| if (dotVal < bias)
| {
| dotVal = 0.0;
| }
|
| float weight = stepLength / lengthCap;
| weight = 1.0 - weight * weight;
| localAO = max(localAO, dotVal * weight);
| }
| ao += localAO;
| }
|
| ao *= angleStepScale;
| ao = 1.0 - clamp(ao, 0.0, 1.0);
| ao = pow(ao, intensity);
| out_FragColor = vec4(vec3(ao), 1.0);
| }
| `;var pV=`uniform sampler2D colorTexture;
| uniform sampler2D ambientOcclusionTexture;
| uniform bool ambientOcclusionOnly;
| in vec2 v_textureCoordinates;
|
| void main(void)
| {
| vec4 color = texture(colorTexture, v_textureCoordinates);
| vec4 ao = texture(ambientOcclusionTexture, v_textureCoordinates);
| out_FragColor = ambientOcclusionOnly ? ao : ao * color;
| }
| `;var _V=`uniform sampler2D colorTexture;
| uniform float gradations;
|
| in vec2 v_textureCoordinates;
|
| void main(void)
| {
| vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;
| #ifdef CZM_SELECTED_FEATURE
| if (czm_selected()) {
| out_FragColor = vec4(rgb, 1.0);
| return;
| }
| #endif
| float luminance = czm_luminance(rgb);
| float darkness = luminance * gradations;
| darkness = (darkness - fract(darkness)) / gradations;
| out_FragColor = vec4(vec3(darkness), 1.0);
| }
| `;var gV=`uniform sampler2D colorTexture;
| uniform sampler2D bloomTexture;
| uniform bool glowOnly;
|
| in vec2 v_textureCoordinates;
|
| void main(void)
| {
| vec4 color = texture(colorTexture, v_textureCoordinates);
|
| #ifdef CZM_SELECTED_FEATURE
| if (czm_selected()) {
| out_FragColor = color;
| return;
| }
| #endif
|
| vec4 bloom = texture(bloomTexture, v_textureCoordinates);
| out_FragColor = glowOnly ? bloom : bloom + color;
| }
| `;var yV=`uniform sampler2D colorTexture;
| uniform float brightness;
|
| in vec2 v_textureCoordinates;
|
| void main(void)
| {
| vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;
| vec3 target = vec3(0.0);
| out_FragColor = vec4(mix(target, rgb, brightness), 1.0);
| }
| `;var bV=`uniform sampler2D colorTexture;
| uniform float contrast;
| uniform float brightness;
|
| in vec2 v_textureCoordinates;
|
| void main(void)
| {
| vec3 sceneColor = texture(colorTexture, v_textureCoordinates).xyz;
| sceneColor = czm_RGBToHSB(sceneColor);
| sceneColor.z += brightness;
| sceneColor = czm_HSBToRGB(sceneColor);
|
| float factor = (259.0 * (contrast + 255.0)) / (255.0 * (259.0 - contrast));
| sceneColor = factor * (sceneColor - vec3(0.5)) + vec3(0.5);
| out_FragColor = vec4(sceneColor, 1.0);
| }
| `;var xV=`uniform sampler2D colorTexture;
| uniform sampler2D blurTexture;
| uniform sampler2D depthTexture;
| uniform float focalDistance;
|
| in vec2 v_textureCoordinates;
|
| vec4 toEye(vec2 uv, float depth)
| {
| vec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));
| vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);
| posInCamera = posInCamera / posInCamera.w;
| return posInCamera;
| }
|
| float computeDepthBlur(float depth)
| {
| float f;
| if (depth < focalDistance)
| {
| f = (focalDistance - depth) / (focalDistance - czm_currentFrustum.x);
| }
| else
| {
| f = (depth - focalDistance) / (czm_currentFrustum.y - focalDistance);
| f = pow(f, 0.1);
| }
| f *= f;
| f = clamp(f, 0.0, 1.0);
| return pow(f, 0.5);
| }
|
| void main(void)
| {
| float depth = czm_readDepth(depthTexture, v_textureCoordinates);
| vec4 posInCamera = toEye(v_textureCoordinates, depth);
| float d = computeDepthBlur(-posInCamera.z);
| out_FragColor = mix(texture(colorTexture, v_textureCoordinates), texture(blurTexture, v_textureCoordinates), d);
| }
| `;var TV=`uniform sampler2D depthTexture;
|
| in vec2 v_textureCoordinates;
|
| void main(void)
| {
| float depth = czm_readDepth(depthTexture, v_textureCoordinates);
| out_FragColor = vec4(vec3(depth), 1.0);
| }
| `;var CV=`uniform sampler2D depthTexture;
| uniform float length;
| uniform vec4 color;
|
| in vec2 v_textureCoordinates;
|
| void main(void)
| {
| float directions[3];
| directions[0] = -1.0;
| directions[1] = 0.0;
| directions[2] = 1.0;
|
| float scalars[3];
| scalars[0] = 3.0;
| scalars[1] = 10.0;
| scalars[2] = 3.0;
|
| float padx = czm_pixelRatio / czm_viewport.z;
| float pady = czm_pixelRatio / czm_viewport.w;
|
| #ifdef CZM_SELECTED_FEATURE
| bool selected = false;
| for (int i = 0; i < 3; ++i)
| {
| float dir = directions[i];
| selected = selected || czm_selected(vec2(-padx, dir * pady));
| selected = selected || czm_selected(vec2(padx, dir * pady));
| selected = selected || czm_selected(vec2(dir * padx, -pady));
| selected = selected || czm_selected(vec2(dir * padx, pady));
| if (selected)
| {
| break;
| }
| }
| if (!selected)
| {
| out_FragColor = vec4(color.rgb, 0.0);
| return;
| }
| #endif
|
| float horizEdge = 0.0;
| float vertEdge = 0.0;
|
| for (int i = 0; i < 3; ++i)
| {
| float dir = directions[i];
| float scale = scalars[i];
|
| horizEdge -= texture(depthTexture, v_textureCoordinates + vec2(-padx, dir * pady)).x * scale;
| horizEdge += texture(depthTexture, v_textureCoordinates + vec2(padx, dir * pady)).x * scale;
|
| vertEdge -= texture(depthTexture, v_textureCoordinates + vec2(dir * padx, -pady)).x * scale;
| vertEdge += texture(depthTexture, v_textureCoordinates + vec2(dir * padx, pady)).x * scale;
| }
|
| float len = sqrt(horizEdge * horizEdge + vertEdge * vertEdge);
| out_FragColor = vec4(color.rgb, len > length ? color.a : 0.0);
| }
| `;var EV=`uniform sampler2D colorTexture;
|
| in vec2 v_textureCoordinates;
|
| #ifdef AUTO_EXPOSURE
| uniform sampler2D autoExposure;
| #else
| uniform float exposure;
| #endif
|
| // See slides 142 and 143:
| // http://www.gdcvault.com/play/1012459/Uncharted_2__HDR_Lighting
|
| void main()
| {
| vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
| vec3 color = fragmentColor.rgb;
|
| #ifdef AUTO_EXPOSURE
| float exposure = texture(autoExposure, vec2(0.5)).r;
| color /= exposure;
| #else
| color *= vec3(exposure);
| #endif
|
| const float A = 0.22; // shoulder strength
| const float B = 0.30; // linear strength
| const float C = 0.10; // linear angle
| const float D = 0.20; // toe strength
| const float E = 0.01; // toe numerator
| const float F = 0.30; // toe denominator
|
| const float white = 11.2; // linear white point value
|
| vec3 c = ((color * (A * color + C * B) + D * E) / (color * ( A * color + B) + D * F)) - E / F;
| float w = ((white * (A * white + C * B) + D * E) / (white * ( A * white + B) + D * F)) - E / F;
|
| c = czm_inverseGamma(c / w);
| out_FragColor = vec4(c, fragmentColor.a);
| }
| `;var wV=`uniform sampler2D colorTexture;
|
| in vec2 v_textureCoordinates;
|
| #ifdef AUTO_EXPOSURE
| uniform sampler2D autoExposure;
| #else
| uniform float exposure;
| #endif
|
| void main()
| {
| vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
| vec3 color = fragmentColor.rgb;
|
| #ifdef AUTO_EXPOSURE
| color /= texture(autoExposure, vec2(0.5)).r;
| #else
| color *= vec3(exposure);
| #endif
| color = czm_pbrNeutralTonemapping(color);
| color = czm_inverseGamma(color);
|
| out_FragColor = vec4(color, fragmentColor.a);
| }
| `;var SV=`in vec2 v_textureCoordinates;
|
| uniform sampler2D colorTexture;
|
| const float fxaaQualitySubpix = 0.5;
| const float fxaaQualityEdgeThreshold = 0.125;
| const float fxaaQualityEdgeThresholdMin = 0.0833;
|
| void main()
| {
| vec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;
| vec4 color = FxaaPixelShader(
| v_textureCoordinates,
| colorTexture,
| fxaaQualityRcpFrame,
| fxaaQualitySubpix,
| fxaaQualityEdgeThreshold,
| fxaaQualityEdgeThresholdMin);
| float alpha = texture(colorTexture, v_textureCoordinates).a;
| out_FragColor = vec4(color.rgb, alpha);
| }
| `;var z0=`#define SAMPLES 8
|
| uniform float delta;
| uniform float sigma;
| uniform float direction; // 0.0 for x direction, 1.0 for y direction
|
| uniform sampler2D colorTexture;
|
| #ifdef USE_STEP_SIZE
| uniform float stepSize;
| #else
| uniform vec2 step;
| #endif
|
| in vec2 v_textureCoordinates;
|
| // Incremental Computation of the Gaussian:
| // https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch40.html
|
| void main()
| {
| vec2 st = v_textureCoordinates;
| vec2 dir = vec2(1.0 - direction, direction);
|
| #ifdef USE_STEP_SIZE
| vec2 step = vec2(stepSize * (czm_pixelRatio / czm_viewport.zw));
| #else
| vec2 step = step;
| #endif
|
| vec3 g;
| g.x = 1.0 / (sqrt(czm_twoPi) * sigma);
| g.y = exp((-0.5 * delta * delta) / (sigma * sigma));
| g.z = g.y * g.y;
|
| vec4 result = texture(colorTexture, st) * g.x;
| for (int i = 1; i < SAMPLES; ++i)
| {
| g.xy *= g.yz;
|
| vec2 offset = float(i) * dir * step;
| result += texture(colorTexture, st - offset) * g.x;
| result += texture(colorTexture, st + offset) * g.x;
| }
|
| out_FragColor = result;
| }
| `;var AV=`uniform sampler2D colorTexture;
| uniform sampler2D dirtTexture;
| uniform sampler2D starTexture;
| uniform vec2 dirtTextureDimensions;
| uniform float distortion;
| uniform float ghostDispersal;
| uniform float haloWidth;
| uniform float dirtAmount;
| uniform float earthRadius;
| uniform float intensity;
|
| in vec2 v_textureCoordinates;
|
| // whether it is in space or not
| // 6500000.0 is empirical value
| #define DISTANCE_TO_SPACE 6500000.0
|
| // return ndc from world coordinate biased earthRadius
| vec4 getNDCFromWC(vec3 WC, float earthRadius)
| {
| vec4 positionEC = czm_view * vec4(WC, 1.0);
| positionEC = vec4(positionEC.x + earthRadius, positionEC.y, positionEC.z, 1.0);
| vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);
| return czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);
| }
|
| // Check if current pixel is included Earth
| // if then mask it gradually
| float isInEarth(vec2 texcoord, vec2 sceneSize)
| {
| vec2 NDC = texcoord * 2.0 - 1.0;
| vec4 earthPosSC = getNDCFromWC(vec3(0.0), 0.0);
| vec4 earthPosSCEdge = getNDCFromWC(vec3(0.0), earthRadius * 1.5);
| NDC.xy -= earthPosSC.xy;
|
| float X = abs(NDC.x) * sceneSize.x;
| float Y = abs(NDC.y) * sceneSize.y;
|
| return clamp(0.0, 1.0, max(sqrt(X * X + Y * Y) / max(abs(earthPosSCEdge.x * sceneSize.x), 1.0) - 0.8 , 0.0));
| }
|
| // For Chromatic effect
| vec4 textureDistorted(sampler2D tex, vec2 texcoord, vec2 direction, vec3 distortion, bool isSpace)
| {
| vec2 sceneSize = czm_viewport.zw;
| vec3 color;
| if(isSpace)
| {
| color.r = isInEarth(texcoord + direction * distortion.r, sceneSize) * texture(tex, texcoord + direction * distortion.r).r;
| color.g = isInEarth(texcoord + direction * distortion.g, sceneSize) * texture(tex, texcoord + direction * distortion.g).g;
| color.b = isInEarth(texcoord + direction * distortion.b, sceneSize) * texture(tex, texcoord + direction * distortion.b).b;
| }
| else
| {
| color.r = texture(tex, texcoord + direction * distortion.r).r;
| color.g = texture(tex, texcoord + direction * distortion.g).g;
| color.b = texture(tex, texcoord + direction * distortion.b).b;
| }
| return vec4(clamp(color, 0.0, 1.0), 0.0);
| }
|
| void main(void)
| {
| vec4 originalColor = texture(colorTexture, v_textureCoordinates);
| vec3 rgb = originalColor.rgb;
| bool isSpace = length(czm_viewerPositionWC.xyz) > DISTANCE_TO_SPACE;
|
| // Sun position
| vec4 sunPos = czm_morphTime == 1.0 ? vec4(czm_sunPositionWC, 1.0) : vec4(czm_sunPositionColumbusView.zxy, 1.0);
| vec4 sunPositionEC = czm_view * sunPos;
| vec4 sunPositionWC = czm_eyeToWindowCoordinates(sunPositionEC);
| sunPos = czm_viewportOrthographic * vec4(sunPositionWC.xy, -sunPositionWC.z, 1.0);
|
| // If sun is not in the screen space, use original color.
| if(!isSpace || !((sunPos.x >= -1.1 && sunPos.x <= 1.1) && (sunPos.y >= -1.1 && sunPos.y <= 1.1)))
| {
| // Lens flare is disabled when not in space until #5932 is fixed.
| // https://github.com/CesiumGS/cesium/issues/5932
| out_FragColor = originalColor;
| return;
| }
|
| vec2 texcoord = vec2(1.0) - v_textureCoordinates;
| vec2 pixelSize = czm_pixelRatio / czm_viewport.zw;
| vec2 invPixelSize = 1.0 / pixelSize;
| vec3 distortionVec = pixelSize.x * vec3(-distortion, 0.0, distortion);
|
| // ghost vector to image centre:
| vec2 ghostVec = (vec2(0.5) - texcoord) * ghostDispersal;
| vec3 direction = normalize(vec3(ghostVec, 0.0));
|
| // sample ghosts:
| vec4 result = vec4(0.0);
| vec4 ghost = vec4(0.0);
| for (int i = 0; i < 4; ++i)
| {
| vec2 offset = fract(texcoord + ghostVec * float(i));
| // Only bright spots from the centre of the source image
| ghost += textureDistorted(colorTexture, offset, direction.xy, distortionVec, isSpace);
| }
| result += ghost;
|
| // sample halo
| vec2 haloVec = normalize(ghostVec) * haloWidth;
| float weightForHalo = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));
| weightForHalo = pow(1.0 - weightForHalo, 5.0);
|
| result += textureDistorted(colorTexture, texcoord + haloVec, direction.xy, distortionVec, isSpace) * weightForHalo * 1.5;
|
| // dirt on lens
| vec2 dirtTexCoords = (v_textureCoordinates * invPixelSize) / dirtTextureDimensions;
| if (dirtTexCoords.x > 1.0)
| {
| dirtTexCoords.x = mod(floor(dirtTexCoords.x), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.x) : fract(dirtTexCoords.x);
| }
| if (dirtTexCoords.y > 1.0)
| {
| dirtTexCoords.y = mod(floor(dirtTexCoords.y), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.y) : fract(dirtTexCoords.y);
| }
| result += dirtAmount * texture(dirtTexture, dirtTexCoords);
|
| // Rotating starburst texture's coordinate
| // dot(czm_view[0].xyz, vec3(0.0, 0.0, 1.0)) + dot(czm_view[1].xyz, vec3(0.0, 1.0, 0.0))
| float camrot = czm_view[0].z + czm_view[1].y;
| float cosValue = cos(camrot);
| float sinValue = sin(camrot);
| mat3 rotation = mat3(
| cosValue, -sinValue, 0.0,
| sinValue, cosValue, 0.0,
| 0.0, 0.0, 1.0
| );
|
| vec3 st1 = vec3(v_textureCoordinates * 2.0 - vec2(1.0), 1.0);
| vec3 st2 = vec3((rotation * st1).xy, 1.0);
| vec3 st3 = st2 * 0.5 + vec3(0.5);
| vec2 lensStarTexcoord = st3.xy;
| float weightForLensFlare = length(vec3(sunPos.xy, 0.0));
| float oneMinusWeightForLensFlare = max(1.0 - weightForLensFlare, 0.0);
|
| if (!isSpace)
| {
| result *= oneMinusWeightForLensFlare * intensity * 0.2;
| }
| else
| {
| result *= oneMinusWeightForLensFlare * intensity;
| result *= texture(starTexture, lensStarTexcoord) * pow(weightForLensFlare, 1.0) * max((1.0 - length(vec3(st1.xy, 0.0))), 0.0) * 2.0;
| }
|
| result += texture(colorTexture, v_textureCoordinates);
|
| out_FragColor = result;
| }
| `;var vV=`uniform sampler2D colorTexture;
| uniform vec3 white;
|
| in vec2 v_textureCoordinates;
|
| #ifdef AUTO_EXPOSURE
| uniform sampler2D autoExposure;
| #else
| uniform float exposure;
| #endif
|
| // See equation 4:
| // http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf
|
| void main()
| {
| vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
| vec3 color = fragmentColor.rgb;
| #ifdef AUTO_EXPOSURE
| float exposure = texture(autoExposure, vec2(0.5)).r;
| color /= exposure;
| #else
| color *= vec3(exposure);
| #endif
| color = (color * (1.0 + color / white)) / (1.0 + color);
| color = czm_inverseGamma(color);
| out_FragColor = vec4(color, fragmentColor.a);
| }
| `;var DV=`uniform sampler2D colorTexture;
|
| in vec2 v_textureCoordinates;
|
| float rand(vec2 co)
| {
| return fract(sin(dot(co.xy ,vec2(12.9898, 78.233))) * 43758.5453);
| }
|
| void main(void)
| {
| float noiseValue = rand(v_textureCoordinates + sin(czm_frameNumber)) * 0.1;
| vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;
| vec3 green = vec3(0.0, 1.0, 0.0);
| out_FragColor = vec4((noiseValue + rgb) * green, 1.0);
| }
| `;var IV=`uniform sampler2D colorTexture;
|
| in vec2 v_textureCoordinates;
|
| #ifdef AUTO_EXPOSURE
| uniform sampler2D autoExposure;
| #else
| uniform float exposure;
| #endif
|
| // See equation 3:
| // http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf
|
| void main()
| {
| vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
| vec3 color = fragmentColor.rgb;
| #ifdef AUTO_EXPOSURE
| float exposure = texture(autoExposure, vec2(0.5)).r;
| color /= exposure;
| #else
| color *= vec3(exposure);
| #endif
| color = color / (1.0 + color);
| color = czm_inverseGamma(color);
| out_FragColor = vec4(color, fragmentColor.a);
| }
| `;var OV=`uniform sampler2D colorTexture;
| uniform sampler2D silhouetteTexture;
|
| in vec2 v_textureCoordinates;
|
| void main(void)
| {
| vec4 silhouetteColor = texture(silhouetteTexture, v_textureCoordinates);
| vec4 color = texture(colorTexture, v_textureCoordinates);
| out_FragColor = mix(color, silhouetteColor, silhouetteColor.a);
| }
| `;/**
| * @license
| * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
| *
| * Redistribution and use in source and binary forms, with or without
| * modification, are permitted provided that the following conditions
| * are met:
| * * Redistributions of source code must retain the above copyright
| * notice, this list of conditions and the following disclaimer.
| * * Redistributions in binary form must reproduce the above copyright
| * notice, this list of conditions and the following disclaimer in the
| * documentation and/or other materials provided with the distribution.
| * * Neither the name of NVIDIA CORPORATION nor the names of its
| * contributors may be used to endorse or promote products derived
| * from this software without specific prior written permission.
| *
| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
| * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
| * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
| * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
| * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
| * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
| * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
| * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
| * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
| * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| */var PV=`/**
| * @license
| * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
| *
| * Redistribution and use in source and binary forms, with or without
| * modification, are permitted provided that the following conditions
| * are met:
| * * Redistributions of source code must retain the above copyright
| * notice, this list of conditions and the following disclaimer.
| * * Redistributions in binary form must reproduce the above copyright
| * notice, this list of conditions and the following disclaimer in the
| * documentation and/or other materials provided with the distribution.
| * * Neither the name of NVIDIA CORPORATION nor the names of its
| * contributors may be used to endorse or promote products derived
| * from this software without specific prior written permission.
| *
| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS \`\`AS IS'' AND ANY
| * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
| * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
| * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
| * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
| * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
| * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
| * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
| * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
| * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| */
|
| // NVIDIA GameWorks Graphics Samples GitHub link: https://github.com/NVIDIAGameWorks/GraphicsSamples
| // Original FXAA 3.11 shader link: https://github.com/NVIDIAGameWorks/GraphicsSamples/blob/master/samples/es3-kepler/FXAA/FXAA3_11.h
|
| // Steps used to integrate into Cesium:
| // * The following defines are set:
| // #define FXAA_PC 1
| // #define FXAA_WEBGL_1 1
| // #define FXAA_GREEN_AS_LUMA 1
| // #define FXAA_EARLY_EXIT 1
| // #define FXAA_GLSL_120 1
| // * All other preprocessor directives besides the FXAA_QUALITY__P* directives were removed.
| // * Double underscores are invalid for preprocessor directives so replace them with a single underscore. Replace
| // /FXAA_QUALITY__P(.*)/g with /FXAA_QUALITY__P$1/.
| // * There are no implicit conversions from ivec* to vec* so replace:
| // #define FxaaInt2 ivec2
| // with
| // #define FxaaInt2 vec2
| // * The texture2DLod function is only available in vertex shaders so replace:
| // #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0)
| // #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0)
| // with
| // #define FxaaTexTop(t, p) texture(t, p)
| // #define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))
| // * FXAA_QUALITY_PRESET is prepended in the javascript code. We may want to expose that setting in the future.
| // * The following parameters to FxaaPixelShader are unused and can be removed:
| // fxaaConsolePosPos
| // fxaaConsoleRcpFrameOpt
| // fxaaConsoleRcpFrameOpt2
| // fxaaConsole360RcpFrameOpt2
| // fxaaConsoleEdgeSharpness
| // fxaaConsoleEdgeThreshold
| // fxaaConsoleEdgeThresholdMi
| // fxaaConsole360ConstDir
|
| //
| // Choose the quality preset.
| // This needs to be compiled into the shader as it effects code.
| // Best option to include multiple presets is to
| // in each shader define the preset, then include this file.
| //
| // OPTIONS
| // -----------------------------------------------------------------------
| // 10 to 15 - default medium dither (10=fastest, 15=highest quality)
| // 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)
| // 39 - no dither, very expensive
| //
| // NOTES
| // -----------------------------------------------------------------------
| // 12 = slightly faster then FXAA 3.9 and higher edge quality (default)
| // 13 = about same speed as FXAA 3.9 and better than 12
| // 23 = closest to FXAA 3.9 visually and performance wise
| // _ = the lowest digit is directly related to performance
| // _ = the highest digit is directly related to style
| //
| //#define FXAA_QUALITY_PRESET 12
|
|
| #if (FXAA_QUALITY_PRESET == 10)
| #define FXAA_QUALITY_PS 3
| #define FXAA_QUALITY_P0 1.5
| #define FXAA_QUALITY_P1 3.0
| #define FXAA_QUALITY_P2 12.0
| #endif
| #if (FXAA_QUALITY_PRESET == 11)
| #define FXAA_QUALITY_PS 4
| #define FXAA_QUALITY_P0 1.0
| #define FXAA_QUALITY_P1 1.5
| #define FXAA_QUALITY_P2 3.0
| #define FXAA_QUALITY_P3 12.0
| #endif
| #if (FXAA_QUALITY_PRESET == 12)
| #define FXAA_QUALITY_PS 5
| #define FXAA_QUALITY_P0 1.0
| #define FXAA_QUALITY_P1 1.5
| #define FXAA_QUALITY_P2 2.0
| #define FXAA_QUALITY_P3 4.0
| #define FXAA_QUALITY_P4 12.0
| #endif
| #if (FXAA_QUALITY_PRESET == 13)
| #define FXAA_QUALITY_PS 6
| #define FXAA_QUALITY_P0 1.0
| #define FXAA_QUALITY_P1 1.5
| #define FXAA_QUALITY_P2 2.0
| #define FXAA_QUALITY_P3 2.0
| #define FXAA_QUALITY_P4 4.0
| #define FXAA_QUALITY_P5 12.0
| #endif
| #if (FXAA_QUALITY_PRESET == 14)
| #define FXAA_QUALITY_PS 7
| #define FXAA_QUALITY_P0 1.0
| #define FXAA_QUALITY_P1 1.5
| #define FXAA_QUALITY_P2 2.0
| #define FXAA_QUALITY_P3 2.0
| #define FXAA_QUALITY_P4 2.0
| #define FXAA_QUALITY_P5 4.0
| #define FXAA_QUALITY_P6 12.0
| #endif
| #if (FXAA_QUALITY_PRESET == 15)
| #define FXAA_QUALITY_PS 8
| #define FXAA_QUALITY_P0 1.0
| #define FXAA_QUALITY_P1 1.5
| #define FXAA_QUALITY_P2 2.0
| #define FXAA_QUALITY_P3 2.0
| #define FXAA_QUALITY_P4 2.0
| #define FXAA_QUALITY_P5 2.0
| #define FXAA_QUALITY_P6 4.0
| #define FXAA_QUALITY_P7 12.0
| #endif
| #if (FXAA_QUALITY_PRESET == 20)
| #define FXAA_QUALITY_PS 3
| #define FXAA_QUALITY_P0 1.5
| #define FXAA_QUALITY_P1 2.0
| #define FXAA_QUALITY_P2 8.0
| #endif
| #if (FXAA_QUALITY_PRESET == 21)
| #define FXAA_QUALITY_PS 4
| #define FXAA_QUALITY_P0 1.0
| #define FXAA_QUALITY_P1 1.5
| #define FXAA_QUALITY_P2 2.0
| #define FXAA_QUALITY_P3 8.0
| #endif
| #if (FXAA_QUALITY_PRESET == 22)
| #define FXAA_QUALITY_PS 5
| #define FXAA_QUALITY_P0 1.0
| #define FXAA_QUALITY_P1 1.5
| #define FXAA_QUALITY_P2 2.0
| #define FXAA_QUALITY_P3 2.0
| #define FXAA_QUALITY_P4 8.0
| #endif
| #if (FXAA_QUALITY_PRESET == 23)
| #define FXAA_QUALITY_PS 6
| #define FXAA_QUALITY_P0 1.0
| #define FXAA_QUALITY_P1 1.5
| #define FXAA_QUALITY_P2 2.0
| #define FXAA_QUALITY_P3 2.0
| #define FXAA_QUALITY_P4 2.0
| #define FXAA_QUALITY_P5 8.0
| #endif
| #if (FXAA_QUALITY_PRESET == 24)
| #define FXAA_QUALITY_PS 7
| #define FXAA_QUALITY_P0 1.0
| #define FXAA_QUALITY_P1 1.5
| #define FXAA_QUALITY_P2 2.0
| #define FXAA_QUALITY_P3 2.0
| #define FXAA_QUALITY_P4 2.0
| #define FXAA_QUALITY_P5 3.0
| #define FXAA_QUALITY_P6 8.0
| #endif
| #if (FXAA_QUALITY_PRESET == 25)
| #define FXAA_QUALITY_PS 8
| #define FXAA_QUALITY_P0 1.0
| #define FXAA_QUALITY_P1 1.5
| #define FXAA_QUALITY_P2 2.0
| #define FXAA_QUALITY_P3 2.0
| #define FXAA_QUALITY_P4 2.0
| #define FXAA_QUALITY_P5 2.0
| #define FXAA_QUALITY_P6 4.0
| #define FXAA_QUALITY_P7 8.0
| #endif
| #if (FXAA_QUALITY_PRESET == 26)
| #define FXAA_QUALITY_PS 9
| #define FXAA_QUALITY_P0 1.0
| #define FXAA_QUALITY_P1 1.5
| #define FXAA_QUALITY_P2 2.0
| #define FXAA_QUALITY_P3 2.0
| #define FXAA_QUALITY_P4 2.0
| #define FXAA_QUALITY_P5 2.0
| #define FXAA_QUALITY_P6 2.0
| #define FXAA_QUALITY_P7 4.0
| #define FXAA_QUALITY_P8 8.0
| #endif
| #if (FXAA_QUALITY_PRESET == 27)
| #define FXAA_QUALITY_PS 10
| #define FXAA_QUALITY_P0 1.0
| #define FXAA_QUALITY_P1 1.5
| #define FXAA_QUALITY_P2 2.0
| #define FXAA_QUALITY_P3 2.0
| #define FXAA_QUALITY_P4 2.0
| #define FXAA_QUALITY_P5 2.0
| #define FXAA_QUALITY_P6 2.0
| #define FXAA_QUALITY_P7 2.0
| #define FXAA_QUALITY_P8 4.0
| #define FXAA_QUALITY_P9 8.0
| #endif
| #if (FXAA_QUALITY_PRESET == 28)
| #define FXAA_QUALITY_PS 11
| #define FXAA_QUALITY_P0 1.0
| #define FXAA_QUALITY_P1 1.5
| #define FXAA_QUALITY_P2 2.0
| #define FXAA_QUALITY_P3 2.0
| #define FXAA_QUALITY_P4 2.0
| #define FXAA_QUALITY_P5 2.0
| #define FXAA_QUALITY_P6 2.0
| #define FXAA_QUALITY_P7 2.0
| #define FXAA_QUALITY_P8 2.0
| #define FXAA_QUALITY_P9 4.0
| #define FXAA_QUALITY_P10 8.0
| #endif
| #if (FXAA_QUALITY_PRESET == 29)
| #define FXAA_QUALITY_PS 12
| #define FXAA_QUALITY_P0 1.0
| #define FXAA_QUALITY_P1 1.5
| #define FXAA_QUALITY_P2 2.0
| #define FXAA_QUALITY_P3 2.0
| #define FXAA_QUALITY_P4 2.0
| #define FXAA_QUALITY_P5 2.0
| #define FXAA_QUALITY_P6 2.0
| #define FXAA_QUALITY_P7 2.0
| #define FXAA_QUALITY_P8 2.0
| #define FXAA_QUALITY_P9 2.0
| #define FXAA_QUALITY_P10 4.0
| #define FXAA_QUALITY_P11 8.0
| #endif
| #if (FXAA_QUALITY_PRESET == 39)
| #define FXAA_QUALITY_PS 12
| #define FXAA_QUALITY_P0 1.0
| #define FXAA_QUALITY_P1 1.0
| #define FXAA_QUALITY_P2 1.0
| #define FXAA_QUALITY_P3 1.0
| #define FXAA_QUALITY_P4 1.0
| #define FXAA_QUALITY_P5 1.5
| #define FXAA_QUALITY_P6 2.0
| #define FXAA_QUALITY_P7 2.0
| #define FXAA_QUALITY_P8 2.0
| #define FXAA_QUALITY_P9 2.0
| #define FXAA_QUALITY_P10 4.0
| #define FXAA_QUALITY_P11 8.0
| #endif
|
| #define FxaaBool bool
| #define FxaaFloat float
| #define FxaaFloat2 vec2
| #define FxaaFloat3 vec3
| #define FxaaFloat4 vec4
| #define FxaaHalf float
| #define FxaaHalf2 vec2
| #define FxaaHalf3 vec3
| #define FxaaHalf4 vec4
| #define FxaaInt2 vec2
| #define FxaaTex sampler2D
|
| #define FxaaSat(x) clamp(x, 0.0, 1.0)
| #define FxaaTexTop(t, p) texture(t, p)
| #define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))
|
| FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }
|
| FxaaFloat4 FxaaPixelShader(
| //
| // Use noperspective interpolation here (turn off perspective interpolation).
| // {xy} = center of pixel
| FxaaFloat2 pos,
| //
| // Input color texture.
| // {rgb_} = color in linear or perceptual color space
| // if (FXAA_GREEN_AS_LUMA == 0)
| // {___a} = luma in perceptual color space (not linear)
| FxaaTex tex,
| //
| // Only used on FXAA Quality.
| // This must be from a constant/uniform.
| // {x_} = 1.0/screenWidthInPixels
| // {_y} = 1.0/screenHeightInPixels
| FxaaFloat2 fxaaQualityRcpFrame,
| //
| // Only used on FXAA Quality.
| // This used to be the FXAA_QUALITY_SUBPIX define.
| // It is here now to allow easier tuning.
| // Choose the amount of sub-pixel aliasing removal.
| // This can effect sharpness.
| // 1.00 - upper limit (softer)
| // 0.75 - default amount of filtering
| // 0.50 - lower limit (sharper, less sub-pixel aliasing removal)
| // 0.25 - almost off
| // 0.00 - completely off
| FxaaFloat fxaaQualitySubpix,
| //
| // Only used on FXAA Quality.
| // This used to be the FXAA_QUALITY_EDGE_THRESHOLD define.
| // It is here now to allow easier tuning.
| // The minimum amount of local contrast required to apply algorithm.
| // 0.333 - too little (faster)
| // 0.250 - low quality
| // 0.166 - default
| // 0.125 - high quality
| // 0.063 - overkill (slower)
| FxaaFloat fxaaQualityEdgeThreshold,
| //
| // Only used on FXAA Quality.
| // This used to be the FXAA_QUALITY_EDGE_THRESHOLD_MIN define.
| // It is here now to allow easier tuning.
| // Trims the algorithm from processing darks.
| // 0.0833 - upper limit (default, the start of visible unfiltered edges)
| // 0.0625 - high quality (faster)
| // 0.0312 - visible limit (slower)
| // Special notes when using FXAA_GREEN_AS_LUMA,
| // Likely want to set this to zero.
| // As colors that are mostly not-green
| // will appear very dark in the green channel!
| // Tune by looking at mostly non-green content,
| // then start at zero and increase until aliasing is a problem.
| FxaaFloat fxaaQualityEdgeThresholdMin
| ) {
| /*--------------------------------------------------------------------------*/
| FxaaFloat2 posM;
| posM.x = pos.x;
| posM.y = pos.y;
| FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);
| #define lumaM rgbyM.y
| FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));
| FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));
| FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));
| FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));
| /*--------------------------------------------------------------------------*/
| FxaaFloat maxSM = max(lumaS, lumaM);
| FxaaFloat minSM = min(lumaS, lumaM);
| FxaaFloat maxESM = max(lumaE, maxSM);
| FxaaFloat minESM = min(lumaE, minSM);
| FxaaFloat maxWN = max(lumaN, lumaW);
| FxaaFloat minWN = min(lumaN, lumaW);
| FxaaFloat rangeMax = max(maxWN, maxESM);
| FxaaFloat rangeMin = min(minWN, minESM);
| FxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;
| FxaaFloat range = rangeMax - rangeMin;
| FxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);
| FxaaBool earlyExit = range < rangeMaxClamped;
| /*--------------------------------------------------------------------------*/
| if(earlyExit)
| return rgbyM;
| /*--------------------------------------------------------------------------*/
| FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));
| FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));
| FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));
| FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));
| /*--------------------------------------------------------------------------*/
| FxaaFloat lumaNS = lumaN + lumaS;
| FxaaFloat lumaWE = lumaW + lumaE;
| FxaaFloat subpixRcpRange = 1.0/range;
| FxaaFloat subpixNSWE = lumaNS + lumaWE;
| FxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;
| FxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;
| /*--------------------------------------------------------------------------*/
| FxaaFloat lumaNESE = lumaNE + lumaSE;
| FxaaFloat lumaNWNE = lumaNW + lumaNE;
| FxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;
| FxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;
| /*--------------------------------------------------------------------------*/
| FxaaFloat lumaNWSW = lumaNW + lumaSW;
| FxaaFloat lumaSWSE = lumaSW + lumaSE;
| FxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);
| FxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);
| FxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;
| FxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;
| FxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;
| FxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;
| /*--------------------------------------------------------------------------*/
| FxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;
| FxaaFloat lengthSign = fxaaQualityRcpFrame.x;
| FxaaBool horzSpan = edgeHorz >= edgeVert;
| FxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;
| /*--------------------------------------------------------------------------*/
| if(!horzSpan) lumaN = lumaW;
| if(!horzSpan) lumaS = lumaE;
| if(horzSpan) lengthSign = fxaaQualityRcpFrame.y;
| FxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;
| /*--------------------------------------------------------------------------*/
| FxaaFloat gradientN = lumaN - lumaM;
| FxaaFloat gradientS = lumaS - lumaM;
| FxaaFloat lumaNN = lumaN + lumaM;
| FxaaFloat lumaSS = lumaS + lumaM;
| FxaaBool pairN = abs(gradientN) >= abs(gradientS);
| FxaaFloat gradient = max(abs(gradientN), abs(gradientS));
| if(pairN) lengthSign = -lengthSign;
| FxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);
| /*--------------------------------------------------------------------------*/
| FxaaFloat2 posB;
| posB.x = posM.x;
| posB.y = posM.y;
| FxaaFloat2 offNP;
| offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;
| offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;
| if(!horzSpan) posB.x += lengthSign * 0.5;
| if( horzSpan) posB.y += lengthSign * 0.5;
| /*--------------------------------------------------------------------------*/
| FxaaFloat2 posN;
| posN.x = posB.x - offNP.x * FXAA_QUALITY_P0;
| posN.y = posB.y - offNP.y * FXAA_QUALITY_P0;
| FxaaFloat2 posP;
| posP.x = posB.x + offNP.x * FXAA_QUALITY_P0;
| posP.y = posB.y + offNP.y * FXAA_QUALITY_P0;
| FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;
| FxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));
| FxaaFloat subpixE = subpixC * subpixC;
| FxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));
| /*--------------------------------------------------------------------------*/
| if(!pairN) lumaNN = lumaSS;
| FxaaFloat gradientScaled = gradient * 1.0/4.0;
| FxaaFloat lumaMM = lumaM - lumaNN * 0.5;
| FxaaFloat subpixF = subpixD * subpixE;
| FxaaBool lumaMLTZero = lumaMM < 0.0;
| /*--------------------------------------------------------------------------*/
| lumaEndN -= lumaNN * 0.5;
| lumaEndP -= lumaNN * 0.5;
| FxaaBool doneN = abs(lumaEndN) >= gradientScaled;
| FxaaBool doneP = abs(lumaEndP) >= gradientScaled;
| if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;
| if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;
| FxaaBool doneNP = (!doneN) || (!doneP);
| if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;
| if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;
| /*--------------------------------------------------------------------------*/
| if(doneNP) {
| if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
| if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
| if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
| if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
| doneN = abs(lumaEndN) >= gradientScaled;
| doneP = abs(lumaEndP) >= gradientScaled;
| if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;
| if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;
| doneNP = (!doneN) || (!doneP);
| if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;
| if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;
| /*--------------------------------------------------------------------------*/
| #if (FXAA_QUALITY_PS > 3)
| if(doneNP) {
| if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
| if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
| if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
| if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
| doneN = abs(lumaEndN) >= gradientScaled;
| doneP = abs(lumaEndP) >= gradientScaled;
| if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;
| if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;
| doneNP = (!doneN) || (!doneP);
| if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;
| if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;
| /*--------------------------------------------------------------------------*/
| #if (FXAA_QUALITY_PS > 4)
| if(doneNP) {
| if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
| if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
| if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
| if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
| doneN = abs(lumaEndN) >= gradientScaled;
| doneP = abs(lumaEndP) >= gradientScaled;
| if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;
| if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;
| doneNP = (!doneN) || (!doneP);
| if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;
| if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;
| /*--------------------------------------------------------------------------*/
| #if (FXAA_QUALITY_PS > 5)
| if(doneNP) {
| if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
| if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
| if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
| if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
| doneN = abs(lumaEndN) >= gradientScaled;
| doneP = abs(lumaEndP) >= gradientScaled;
| if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;
| if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;
| doneNP = (!doneN) || (!doneP);
| if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;
| if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;
| /*--------------------------------------------------------------------------*/
| #if (FXAA_QUALITY_PS > 6)
| if(doneNP) {
| if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
| if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
| if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
| if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
| doneN = abs(lumaEndN) >= gradientScaled;
| doneP = abs(lumaEndP) >= gradientScaled;
| if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;
| if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;
| doneNP = (!doneN) || (!doneP);
| if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;
| if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;
| /*--------------------------------------------------------------------------*/
| #if (FXAA_QUALITY_PS > 7)
| if(doneNP) {
| if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
| if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
| if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
| if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
| doneN = abs(lumaEndN) >= gradientScaled;
| doneP = abs(lumaEndP) >= gradientScaled;
| if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;
| if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;
| doneNP = (!doneN) || (!doneP);
| if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;
| if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;
| /*--------------------------------------------------------------------------*/
| #if (FXAA_QUALITY_PS > 8)
| if(doneNP) {
| if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
| if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
| if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
| if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
| doneN = abs(lumaEndN) >= gradientScaled;
| doneP = abs(lumaEndP) >= gradientScaled;
| if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;
| if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;
| doneNP = (!doneN) || (!doneP);
| if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;
| if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;
| /*--------------------------------------------------------------------------*/
| #if (FXAA_QUALITY_PS > 9)
| if(doneNP) {
| if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
| if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
| if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
| if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
| doneN = abs(lumaEndN) >= gradientScaled;
| doneP = abs(lumaEndP) >= gradientScaled;
| if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;
| if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;
| doneNP = (!doneN) || (!doneP);
| if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;
| if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;
| /*--------------------------------------------------------------------------*/
| #if (FXAA_QUALITY_PS > 10)
| if(doneNP) {
| if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
| if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
| if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
| if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
| doneN = abs(lumaEndN) >= gradientScaled;
| doneP = abs(lumaEndP) >= gradientScaled;
| if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;
| if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;
| doneNP = (!doneN) || (!doneP);
| if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;
| if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;
| /*--------------------------------------------------------------------------*/
| #if (FXAA_QUALITY_PS > 11)
| if(doneNP) {
| if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
| if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
| if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
| if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
| doneN = abs(lumaEndN) >= gradientScaled;
| doneP = abs(lumaEndP) >= gradientScaled;
| if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;
| if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;
| doneNP = (!doneN) || (!doneP);
| if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;
| if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;
| /*--------------------------------------------------------------------------*/
| #if (FXAA_QUALITY_PS > 12)
| if(doneNP) {
| if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
| if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
| if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
| if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
| doneN = abs(lumaEndN) >= gradientScaled;
| doneP = abs(lumaEndP) >= gradientScaled;
| if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;
| if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;
| doneNP = (!doneN) || (!doneP);
| if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;
| if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;
| /*--------------------------------------------------------------------------*/
| }
| #endif
| /*--------------------------------------------------------------------------*/
| }
| #endif
| /*--------------------------------------------------------------------------*/
| }
| #endif
| /*--------------------------------------------------------------------------*/
| }
| #endif
| /*--------------------------------------------------------------------------*/
| }
| #endif
| /*--------------------------------------------------------------------------*/
| }
| #endif
| /*--------------------------------------------------------------------------*/
| }
| #endif
| /*--------------------------------------------------------------------------*/
| }
| #endif
| /*--------------------------------------------------------------------------*/
| }
| #endif
| /*--------------------------------------------------------------------------*/
| }
| #endif
| /*--------------------------------------------------------------------------*/
| }
| /*--------------------------------------------------------------------------*/
| FxaaFloat dstN = posM.x - posN.x;
| FxaaFloat dstP = posP.x - posM.x;
| if(!horzSpan) dstN = posM.y - posN.y;
| if(!horzSpan) dstP = posP.y - posM.y;
| /*--------------------------------------------------------------------------*/
| FxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;
| FxaaFloat spanLength = (dstP + dstN);
| FxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;
| FxaaFloat spanLengthRcp = 1.0/spanLength;
| /*--------------------------------------------------------------------------*/
| FxaaBool directionN = dstN < dstP;
| FxaaFloat dst = min(dstN, dstP);
| FxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;
| FxaaFloat subpixG = subpixF * subpixF;
| FxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;
| FxaaFloat subpixH = subpixG * fxaaQualitySubpix;
| /*--------------------------------------------------------------------------*/
| FxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;
| FxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);
| if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;
| if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;
| return FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);
| }
| `;function V0(){this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._ready=!1,this._name="czm_autoexposure",this._logDepthChanged=void 0,this._useLogDepth=void 0,this._framebuffers=void 0,this._previousLuminance=new ui,this._commands=void 0,this._clearCommand=void 0,this._minMaxLuminance=new k,this.enabled=!0,this._enabled=!0,this.minimumLuminance=.1,this.maximumLuminance=10}Object.defineProperties(V0.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},outputTexture:{get:function(){let e=this._framebuffers;if(c(e))return e[e.length-1].getColorTexture(0)}}});function Sge(e){let t=e._framebuffers;if(!c(t))return;let n=t.length;for(let i=0;i<n;++i)t[i].destroy();e._framebuffers=void 0,e._previousLuminance.destroy(),e._previousLuminance=void 0}function oft(e,t){Sge(e);let n=e._width,i=e._height,o=t.halfFloatingPointTexture?Ne.HALF_FLOAT:Ne.FLOAT,r=Math.ceil(Math.log(Math.max(n,i))/Math.log(3)),s=new Array(r);for(let l=0;l<r;++l)n=Math.max(Math.ceil(n/3),1),i=Math.max(Math.ceil(i/3),1),s[l]=new ui,s[l].update(t,n,i,1,o);let a=s[r-1].getColorTexture(0);e._previousLuminance.update(t,a.width,a.height,1,o),e._framebuffers=s}function Age(e){let t=e._commands;if(!c(t))return;let n=t.length;for(let i=0;i<n;++i)t[i].shaderProgram.destroy();e._commands=void 0}function rft(e,t){let n;if(t===0)n={colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions}};else{let i=e._framebuffers[t-1].getColorTexture(0);n={colorTexture:function(){return i},colorTextureDimensions:function(){return i.dimensions}}}return n.minMaxLuminance=function(){return e._minMaxLuminance},n.previousLuminance=function(){return e._previousLuminance.getColorTexture(0)},n}function sft(e,t){let n=`uniform sampler2D colorTexture;
| in vec2 v_textureCoordinates;
| float sampleTexture(vec2 offset) {
| `;return e===0?n+=` vec4 color = texture(colorTexture, v_textureCoordinates + offset);
| return czm_luminance(color.rgb);
| `:n+=` return texture(colorTexture, v_textureCoordinates + offset).r;
| `,n+=`}
|
| `,n+=`uniform vec2 colorTextureDimensions;
| uniform vec2 minMaxLuminance;
| uniform sampler2D previousLuminance;
| void main() {
| float color = 0.0;
| float xStep = 1.0 / colorTextureDimensions.x;
| float yStep = 1.0 / colorTextureDimensions.y;
| int count = 0;
| for (int i = 0; i < 3; ++i) {
| for (int j = 0; j < 3; ++j) {
| vec2 offset;
| offset.x = -xStep + float(i) * xStep;
| offset.y = -yStep + float(j) * yStep;
| if (offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0) {
| continue;
| }
| color += sampleTexture(offset);
| ++count;
| }
| }
| if (count > 0) {
| color /= float(count);
| }
| `,e===t-1&&(n+=` float previous = texture(previousLuminance, vec2(0.5)).r;
| color = clamp(color, minMaxLuminance.x, minMaxLuminance.y);
| color = previous + (color - previous) / (60.0 * 1.5);
| color = clamp(color, minMaxLuminance.x, minMaxLuminance.y);
| `),n+=` out_FragColor = vec4(color);
| }
| `,n}function aft(e,t){Age(e);let n=e._framebuffers,i=n.length,o=new Array(i);for(let r=0;r<i;++r)o[r]=t.createViewportQuadCommand(sft(r,i),{framebuffer:n[r].framebuffer,uniformMap:rft(e,r)});e._commands=o}V0.prototype.clear=function(e){let t=this._framebuffers;if(!c(t))return;let n=this._clearCommand;c(n)||(n=this._clearCommand=new $n({color:new z(0,0,0,0),framebuffer:void 0}));let i=t.length;for(let o=0;o<i;++o)t[o].clear(e,n)};V0.prototype.update=function(e){let t=e.drawingBufferWidth,n=e.drawingBufferHeight;(t!==this._width||n!==this._height)&&(this._width=t,this._height=n,oft(this,e),aft(this,e),this._ready||(this._ready=!0)),this._minMaxLuminance.x=this.minimumLuminance,this._minMaxLuminance.y=this.maximumLuminance;let i=this._framebuffers,o=i[i.length-1];i[i.length-1]=this._previousLuminance,this._commands[this._commands.length-1].framebuffer=this._previousLuminance.framebuffer,this._previousLuminance=o};V0.prototype.execute=function(e,t){this._colorTexture=t;let n=this._commands;if(!c(n))return;let i=n.length;for(let o=0;o<i;++o)n[o].execute(e)};V0.prototype.isDestroyed=function(){return!1};V0.prototype.destroy=function(){return Sge(this),Age(this),ue(this)};var RV=V0;var cft={NEAREST:0,LINEAR:1},Sf=cft;function H0(e){e=g(e,g.EMPTY_OBJECT);let{fragmentShader:t,textureScale:n=1,pixelFormat:i=Re.RGBA}=e;if(C.typeOf.string("options.fragmentShader",t),C.typeOf.number.greaterThan("options.textureScale",n,0),C.typeOf.number.lessThanOrEquals("options.textureScale",n,1),!Re.isColorFormat(i))throw new w("options.pixelFormat must be a color format.");this._fragmentShader=t,this._uniforms=e.uniforms,this._textureScale=n,this._forcePowerOfTwo=g(e.forcePowerOfTwo,!1),this._sampleMode=g(e.sampleMode,Sf.NEAREST),this._pixelFormat=i,this._pixelDatatype=g(e.pixelDatatype,Ne.UNSIGNED_BYTE),this._clearColor=g(e.clearColor,z.BLACK),this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._idTexture=void 0,this._actualUniforms={},this._dirtyUniforms=[],this._texturesToRelease=[],this._texturesToCreate=[],this._texturePromise=void 0;let o=new ic;o.scissorTest={enabled:!0,rectangle:c(e.scissorRectangle)?je.clone(e.scissorRectangle):new je},this._passState=o,this._ready=!1;let r=e.name;c(r)||(r=Bn()),this._name=r,this._logDepthChanged=void 0,this._useLogDepth=void 0,this._selectedIdTexture=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0,this._textureCache=void 0,this._index=void 0,this.enabled=!0,this._enabled=!0}Object.defineProperties(H0.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},fragmentShader:{get:function(){return this._fragmentShader}},uniforms:{get:function(){return this._uniforms}},textureScale:{get:function(){return this._textureScale}},forcePowerOfTwo:{get:function(){return this._forcePowerOfTwo}},sampleMode:{get:function(){return this._sampleMode}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},clearColor:{get:function(){return this._clearColor}},scissorRectangle:{get:function(){return this._passState.scissorTest.rectangle}},outputTexture:{get:function(){if(c(this._textureCache)){let e=this._textureCache.getFramebuffer(this._name);if(c(e))return e.getColorTexture(0)}}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});var lft=/uniform\s+sampler2D\s+depthTexture/g;H0.prototype._isSupported=function(e){return!lft.test(this._fragmentShader)||e.depthTexture};function uft(e,t,n){let i=t[n];return(typeof i=="string"||i instanceof HTMLCanvasElement||i instanceof HTMLImageElement||i instanceof HTMLVideoElement||i instanceof ImageData)&&e._dirtyUniforms.push(n),{get:function(){return t[n]},set:function(o){let r=t[n];t[n]=o;let s=e._actualUniforms,a=s[n];c(a)&&a!==r&&a instanceof Ot&&!c(e._textureCache.getStageByName(n))&&(e._texturesToRelease.push(a),delete s[n],delete s[`${n}Dimensions`]),r instanceof Ot&&e._texturesToRelease.push(r),typeof o=="string"||o instanceof HTMLCanvasElement||o instanceof HTMLImageElement||o instanceof HTMLVideoElement||o instanceof ImageData?e._dirtyUniforms.push(n):s[n]=o}}}function fft(e,t){return function(){let n=e._actualUniforms[t];return typeof n=="function"?n():n}}function dft(e,t){return function(){let n=e[t]();if(c(n))return n.dimensions}}function hft(e){if(c(e._uniformMap))return;let t={},n={},i=e._uniforms,o=e._actualUniforms;for(let r in i){if(!i.hasOwnProperty(r))continue;typeof i[r]!="function"?(t[r]=fft(e,r),n[r]=uft(e,i,r)):(t[r]=i[r],n[r]=i[r]),o[r]=i[r];let s=t[r]();(typeof s=="string"||s instanceof Ot||s instanceof HTMLImageElement||s instanceof HTMLCanvasElement||s instanceof HTMLVideoElement)&&(t[`${r}Dimensions`]=dft(t,r))}e._uniforms={},Object.defineProperties(e._uniforms,n),e._uniformMap=bt(t,{colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions},depthTexture:function(){return e._depthTexture},depthTextureDimensions:function(){return e._depthTexture.dimensions},czm_idTexture:function(){return e._idTexture},czm_selectedIdTexture:function(){return e._selectedIdTexture},czm_selectedIdTextureStep:function(){return 1/e._selectedIdTexture.width}})}function mft(e,t){return e=e.replace(/in\s+vec2\s+v_textureCoordinates;/g,""),`#define CZM_SELECTED_FEATURE
| uniform sampler2D czm_idTexture;
| uniform sampler2D czm_selectedIdTexture;
| uniform float czm_selectedIdTextureStep;
| in vec2 v_textureCoordinates;
| bool czm_selected(vec2 offset)
| {
| bool selected = false;
| vec4 id = texture(czm_idTexture, v_textureCoordinates + offset);
| for (int i = 0; i < ${t}; ++i)
| {
| vec4 selectedId = texture(czm_selectedIdTexture, vec2((float(i) + 0.5) * czm_selectedIdTextureStep, 0.5));
| if (all(equal(id, selectedId)))
| {
| return true;
| }
| }
| return false;
| }
| bool czm_selected()
| {
| return czm_selected(vec2(0.0));
| }
|
| ${e}`}function pft(e,t){if(c(e._command)&&!e._logDepthChanged&&!e._selectedDirty)return;let n=e._fragmentShader;if(c(e._selectedIdTexture)){let o=e._selectedIdTexture.width;n=mft(n,o)}let i=new Be({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[n]});e._command=t.createViewportQuadCommand(i,{uniformMap:e._uniformMap,owner:e})}function _ft(e){let t=e._sampleMode,n,i;t===Sf.LINEAR?(n=Wt.LINEAR,i=si.LINEAR):(n=Wt.NEAREST,i=si.NEAREST);let o=e._sampler;(!c(o)||o.minificationFilter!==n||o.magnificationFilter!==i)&&(e._sampler=new Jt({wrapS:pn.CLAMP_TO_EDGE,wrapT:pn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i}))}function gft(e,t){return function(n){e._texturesToCreate.push({name:t,source:n})}}function yft(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function bft(e,t){let n=e._texturesToRelease;for(let a=0;a<n.length;++a){let l=n[a];l=l&&l.destroy()}n.length=0;let i=e._texturesToCreate;for(let a=0;a<i.length;++a){let{name:l,source:u}=i[a];e._actualUniforms[l]=new Ot({context:t,source:u})}i.length=0;let o=e._dirtyUniforms;if(o.length===0&&!c(e._texturePromise)){e._ready=!0;return}if(o.length===0||c(e._texturePromise))return;let r=e._uniforms,s=[];for(let a=0;a<o.length;++a){let l=o[a],u=r[l],f=e._textureCache.getStageByName(u);if(c(f))e._actualUniforms[l]=yft(e,u);else if(typeof u=="string"){let h=new Te({url:u});s.push(h.fetchImage().then(gft(e,l)))}else e._texturesToCreate.push({name:l,source:u})}o.length=0,s.length>0?(e._ready=!1,e._texturePromise=Promise.all(s).then(function(){e._ready=!0,e._texturePromise=void 0})):e._ready=!0}function vge(e){c(e._command)&&(e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy();let t=e._textureCache;if(!c(t))return;let n=e._uniforms,i=e._actualUniforms;for(let o in i){if(!i.hasOwnProperty(o))continue;let r=i[o];r instanceof Ot&&(c(t.getStageByName(n[o]))||r.destroy(),e._dirtyUniforms.push(o))}}function xft(e){let t=c(e._selected)?e._selected.length:0,n=c(e._parentSelected)?e._parentSelected:0,i=e._selected!==e._selectedShadow||t!==e._selectedLength||e._parentSelected!==e._parentSelectedShadow||n!==e._parentSelectedLength;if(c(e._selected)&&c(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):c(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!i&&c(e._combinedSelected)){if(!c(e._combinedSelectedShadow))return!0;for(let o=0;o<e._combinedSelected.length;++o)if(e._combinedSelected[o]!==e._combinedSelectedShadow[o])return!0}return i}function Tft(e,t){if(!e._selectedDirty)return;e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy(),e._selectedIdTexture=void 0;let n=e._combinedSelected;if(!c(n))return;let i=0;for(let s=0;s<n.length;++s){let a=n[s];c(a.pickIds)?i+=a.pickIds.length:c(a.pickId)&&++i}if(n.length===0||i===0){let s=new Uint8Array([255,255,255,255]);e._selectedIdTexture=new Ot({context:t,pixelFormat:Re.RGBA,pixelDatatype:Ne.UNSIGNED_BYTE,source:{arrayBufferView:s,width:1,height:1},sampler:Jt.NEAREST});return}let o=0,r=new Uint8Array(i*4);for(let s=0;s<n.length;++s){let a=n[s];if(c(a.pickIds)){let l=a.pickIds,u=l.length;for(let f=0;f<u;++f){let h=l[f].color;r[o]=z.floatToByte(h.red),r[o+1]=z.floatToByte(h.green),r[o+2]=z.floatToByte(h.blue),r[o+3]=z.floatToByte(h.alpha),o+=4}}else if(c(a.pickId)){let l=a.pickId.color;r[o]=z.floatToByte(l.red),r[o+1]=z.floatToByte(l.green),r[o+2]=z.floatToByte(l.blue),r[o+3]=z.floatToByte(l.alpha),o+=4}}e._selectedIdTexture=new Ot({context:t,pixelFormat:Re.RGBA,pixelDatatype:Ne.UNSIGNED_BYTE,source:{arrayBufferView:r,width:i,height:1},sampler:Jt.NEAREST})}H0.prototype.update=function(e,t){if(this.enabled!==this._enabled&&!this.enabled&&vge(this),this._enabled=this.enabled,!this._enabled||(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=xft(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=c(this._selected)?this._selected.length:0,this._parentSelectedLength=c(this._parentSelected)?this._parentSelected.length:0,Tft(this,e),hft(this),bft(this,e),pft(this,e),_ft(this),this._selectedDirty=!1,!this._ready))return;let n=this._textureCache.getFramebuffer(this._name);if(this._command.framebuffer=n,!c(n))return;let i=n.getColorTexture(0),o;(i.width!==e.drawingBufferWidth||i.height!==e.drawingBufferHeight)&&(o=this._renderState,(!c(o)||i.width!==o.viewport.width||i.height!==o.viewport.height)&&(this._renderState=Fe.fromCache({viewport:new je(0,0,i.width,i.height)}))),this._command.renderState=o};H0.prototype.execute=function(e,t,n,i){if(!c(this._command)||!c(this._command.framebuffer)||!this._ready||!this._enabled)return;this._colorTexture=t,this._depthTexture=n,this._idTexture=i,Jt.equals(this._colorTexture.sampler,this._sampler)||(this._colorTexture.sampler=this._sampler);let o=this.scissorRectangle.width>0&&this.scissorRectangle.height>0?this._passState:void 0;c(o)&&(o.context=e),this._command.execute(e,o)};H0.prototype.isDestroyed=function(){return!1};H0.prototype.destroy=function(){return vge(this),ue(this)};var so=H0;function G0(e){e=g(e,g.EMPTY_OBJECT),C.defined("options.stages",e.stages),C.typeOf.number.greaterThan("options.stages.length",e.stages.length,0),this._stages=e.stages,this._inputPreviousStageTexture=g(e.inputPreviousStageTexture,!0);let t=e.name;c(t)||(t=Bn()),this._name=t,this._uniforms=e.uniforms,this._textureCache=void 0,this._index=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0}Object.defineProperties(G0.prototype,{ready:{get:function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)if(!e[n].ready)return!1;return!0}},name:{get:function(){return this._name}},enabled:{get:function(){return this._stages[0].enabled},set:function(e){let t=this._stages,n=t.length;for(let i=0;i<n;++i)t[i].enabled=e}},uniforms:{get:function(){return this._uniforms}},inputPreviousStageTexture:{get:function(){return this._inputPreviousStageTexture}},length:{get:function(){return this._stages.length}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});G0.prototype._isSupported=function(e){let t=this._stages,n=t.length;for(let i=0;i<n;++i)if(!t[i]._isSupported(e))return!1;return!0};G0.prototype.get=function(e){return C.typeOf.number.greaterThanOrEquals("index",e,0),C.typeOf.number.lessThan("index",e,this.length),this._stages[e]};function Cft(e){let t=c(e._selected)?e._selected.length:0,n=c(e._parentSelected)?e._parentSelected:0,i=e._selected!==e._selectedShadow||t!==e._selectedLength;if(i=i||e._parentSelected!==e._parentSelectedShadow||n!==e._parentSelectedLength,c(e._selected)&&c(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):c(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!i&&c(e._combinedSelected)){if(!c(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(let o=0;o<t;++o)if(e._combinedSelected[o]!==e._combinedSelectedShadow[o])return!0}return i}G0.prototype.update=function(e,t){this._selectedDirty=Cft(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=c(this._selected)?this._selected.length:0,this._parentSelectedLength=c(this._parentSelected)?this._parentSelected.length:0;let n=this._stages,i=n.length;for(let o=0;o<i;++o){let r=n[o];this._selectedDirty&&(r.parentSelected=this._combinedSelected),r.update(e,t)}};G0.prototype.isDestroyed=function(){return!1};G0.prototype.destroy=function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return ue(this)};var bl=G0;var _r={};function MV(e){let o=`#define USE_STEP_SIZE
| ${z0}`,r=new so({name:`${e}_x_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:0},sampleMode:Sf.LINEAR}),s=new so({name:`${e}_y_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:1},sampleMode:Sf.LINEAR}),a={};return Object.defineProperties(a,{delta:{get:function(){return r.uniforms.delta},set:function(l){let u=r.uniforms,f=s.uniforms;u.delta=f.delta=l}},sigma:{get:function(){return r.uniforms.sigma},set:function(l){let u=r.uniforms,f=s.uniforms;u.sigma=f.sigma=l}},stepSize:{get:function(){return r.uniforms.stepSize},set:function(l){let u=r.uniforms,f=s.uniforms;u.stepSize=f.stepSize=l}}}),new bl({name:e,stages:[r,s],uniforms:a})}_r.createBlurStage=function(){return MV("czm_blur")};_r.createDepthOfFieldStage=function(){let e=MV("czm_depth_of_field_blur"),t=new so({name:"czm_depth_of_field_composite",fragmentShader:xV,uniforms:{focalDistance:5,blurTexture:e.name}}),n={};return Object.defineProperties(n,{focalDistance:{get:function(){return t.uniforms.focalDistance},set:function(i){t.uniforms.focalDistance=i}},delta:{get:function(){return e.uniforms.delta},set:function(i){e.uniforms.delta=i}},sigma:{get:function(){return e.uniforms.sigma},set:function(i){e.uniforms.sigma=i}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(i){e.uniforms.stepSize=i}}}),new bl({name:"czm_depth_of_field",stages:[e,t],inputPreviousStageTexture:!1,uniforms:n})};_r.isDepthOfFieldSupported=function(e){return e.context.depthTexture};_r.createEdgeDetectionStage=function(){let e=Bn();return new so({name:`czm_edge_detection_${e}`,fragmentShader:CV,uniforms:{length:.25,color:z.clone(z.BLACK)}})};_r.isEdgeDetectionSupported=function(e){return e.context.depthTexture};function Eft(e){if(!c(e))return _r.createEdgeDetectionStage();let t=new bl({name:"czm_edge_detection_multiple",stages:e,inputPreviousStageTexture:!1}),n={},i="",o="";for(let a=0;a<e.length;++a)i+=`uniform sampler2D edgeTexture${a};
| `,o+=` vec4 edge${a} = texture(edgeTexture${a}, v_textureCoordinates);
| if (edge${a}.a > 0.0)
| {
| color = edge${a};
| break;
| }
| `,n[`edgeTexture${a}`]=e[a].name;let r=`${i}in vec2 v_textureCoordinates;
| void main() {
| vec4 color = vec4(0.0);
| for (int i = 0; i < ${e.length}; i++)
| {
| ${o} }
| out_FragColor = color;
| }
| `,s=new so({name:"czm_edge_detection_combine",fragmentShader:r,uniforms:n});return new bl({name:"czm_edge_detection_composite",stages:[t,s]})}_r.createSilhouetteStage=function(e){let t=Eft(e),n=new so({name:"czm_silhouette_color_edges",fragmentShader:OV,uniforms:{silhouetteTexture:t.name}});return new bl({name:"czm_silhouette",stages:[t,n],inputPreviousStageTexture:!1,uniforms:t.uniforms})};_r.isSilhouetteSupported=function(e){return e.context.depthTexture};_r.createBloomStage=function(){let e=new so({name:"czm_bloom_contrast_bias",fragmentShader:bV,uniforms:{contrast:128,brightness:-.3}}),t=MV("czm_bloom_blur"),n=new bl({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),i=new so({name:"czm_bloom_generate_composite",fragmentShader:gV,uniforms:{glowOnly:!1,bloomTexture:n.name}}),o={};return Object.defineProperties(o,{glowOnly:{get:function(){return i.uniforms.glowOnly},set:function(r){i.uniforms.glowOnly=r}},contrast:{get:function(){return e.uniforms.contrast},set:function(r){e.uniforms.contrast=r}},brightness:{get:function(){return e.uniforms.brightness},set:function(r){e.uniforms.brightness=r}},delta:{get:function(){return t.uniforms.delta},set:function(r){t.uniforms.delta=r}},sigma:{get:function(){return t.uniforms.sigma},set:function(r){t.uniforms.sigma=r}},stepSize:{get:function(){return t.uniforms.stepSize},set:function(r){t.uniforms.stepSize=r}}}),new bl({name:"czm_bloom",stages:[n,i],inputPreviousStageTexture:!1,uniforms:o})};_r.createAmbientOcclusionStage=function(){let e=new so({name:"czm_ambient_occlusion_generate",fragmentShader:mV,uniforms:{intensity:3,bias:.1,lengthCap:.26,stepSize:1.95,frustumLength:1e3,randomTexture:void 0}}),t=MV("czm_ambient_occlusion_blur");t.uniforms.stepSize=.86;let n=new bl({name:"czm_ambient_occlusion_generate_blur",stages:[e,t]}),i=new so({name:"czm_ambient_occlusion_composite",fragmentShader:pV,uniforms:{ambientOcclusionOnly:!1,ambientOcclusionTexture:n.name}}),o={};return Object.defineProperties(o,{intensity:{get:function(){return e.uniforms.intensity},set:function(r){e.uniforms.intensity=r}},bias:{get:function(){return e.uniforms.bias},set:function(r){e.uniforms.bias=r}},lengthCap:{get:function(){return e.uniforms.lengthCap},set:function(r){e.uniforms.lengthCap=r}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(r){e.uniforms.stepSize=r}},frustumLength:{get:function(){return e.uniforms.frustumLength},set:function(r){e.uniforms.frustumLength=r}},randomTexture:{get:function(){return e.uniforms.randomTexture},set:function(r){e.uniforms.randomTexture=r}},delta:{get:function(){return t.uniforms.delta},set:function(r){t.uniforms.delta=r}},sigma:{get:function(){return t.uniforms.sigma},set:function(r){t.uniforms.sigma=r}},blurStepSize:{get:function(){return t.uniforms.stepSize},set:function(r){t.uniforms.stepSize=r}},ambientOcclusionOnly:{get:function(){return i.uniforms.ambientOcclusionOnly},set:function(r){i.uniforms.ambientOcclusionOnly=r}}}),new bl({name:"czm_ambient_occlusion",stages:[n,i],inputPreviousStageTexture:!1,uniforms:o})};_r.isAmbientOcclusionSupported=function(e){return e.context.depthTexture};var wft=`#define FXAA_QUALITY_PRESET 39
| ${PV}
| ${SV}`;_r.createFXAAStage=function(){return new so({name:"czm_FXAA",fragmentShader:wft,sampleMode:Sf.LINEAR})};_r.createAcesTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
| `:"";return t+=hV,new so({name:"czm_aces",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};_r.createFilmicTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
| `:"";return t+=EV,new so({name:"czm_filmic",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};_r.createPbrNeutralTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
| `:"";return t+=wV,new so({name:"czm_pbr_neutral",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};_r.createReinhardTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
| `:"";return t+=IV,new so({name:"czm_reinhard",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};_r.createModifiedReinhardTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
| `:"";return t+=vV,new so({name:"czm_modified_reinhard",fragmentShader:t,uniforms:{white:z.WHITE,autoExposure:void 0,exposure:1}})};_r.createAutoExposureStage=function(){return new RV};_r.createBlackAndWhiteStage=function(){return new so({name:"czm_black_and_white",fragmentShader:_V,uniforms:{gradations:5}})};_r.createBrightnessStage=function(){return new so({name:"czm_brightness",fragmentShader:yV,uniforms:{brightness:.5}})};_r.createNightVisionStage=function(){return new so({name:"czm_night_vision",fragmentShader:DV})};_r.createDepthViewStage=function(){return new so({name:"czm_depth_view",fragmentShader:TV})};_r.createLensFlareStage=function(){return new so({name:"czm_lens_flare",fragmentShader:AV,uniforms:{dirtTexture:Mi("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:Mi("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,dirtAmount:.4,earthRadius:Z.WGS84.maximumRadius}})};var Af=_r;function $p(e){this._collection=e,this._framebuffers=[],this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0,this._updateDependencies=!1}function pI(e){for(;c(e.length);)e=e.get(e.length-1);return e.name}function jY(e,t,n,i,o){if(!i.enabled||!i._isSupported(t))return o;let r=n[i.name]={};if(c(o)){let a=e.getStageByName(o);r[pI(a)]=!0}let s=i.uniforms;if(c(s)){let a=Object.getOwnPropertyNames(s),l=a.length;for(let u=0;u<l;++u){let f=s[a[u]];if(typeof f=="string"){let h=e.getStageByName(f);c(h)&&(r[pI(h)]=!0)}}}return i.name}function mI(e,t,n,i,o){if(c(i.enabled)&&!i.enabled||c(i._isSupported)&&!i._isSupported(t))return o;let r=o,s=!c(i.inputPreviousStageTexture)||i.inputPreviousStageTexture,a=o,l=i.length;for(let h=0;h<l;++h){let m=i.get(h);c(m.length)?a=mI(e,t,n,m,o):a=jY(e,t,n,m,o),s&&(o=a)}let u,f;if(s)for(u=1;u<l;++u)f=pI(i.get(u)),c(n[f])||(n[f]={}),n[f][r]=!0;else for(u=1;u<l;++u){f=pI(i.get(u));let h=n[f];for(let m=0;m<u;++m)h[pI(i.get(m))]=!0}return a}function Sft(e,t){let n={};if(c(e.ambientOcclusion)){let i=e.ambientOcclusion,o=e.bloom,r=e._tonemapping,s=e.fxaa,a=mI(e,t,n,i,void 0);a=mI(e,t,n,o,a),a=jY(e,t,n,r,a),a=mI(e,t,n,e,a),jY(e,t,n,s,a)}else mI(e,t,n,e,void 0);return n}function Aft(e,t,n){let o=e._collection.getStageByName(t),r=o._textureScale,s=o._forcePowerOfTwo,a=o._pixelFormat,l=o._pixelDatatype,u=o._clearColor,f,h,m=e._framebuffers,p=m.length;for(f=0;f<p;++f){if(h=m[f],r!==h.textureScale||s!==h.forcePowerOfTwo||a!==h.pixelFormat||l!==h.pixelDatatype||!z.equals(u,h.clearColor))continue;let _=h.stages,b=_.length,x=!1;for(let T=0;T<b;++T)if(n[_[T]]){x=!0;break}if(!x)break}return c(h)&&f<p?(h.stages.push(t),h):(h={textureScale:r,forcePowerOfTwo:s,pixelFormat:a,pixelDatatype:l,clearColor:u,stages:[t],buffer:new ui({pixelFormat:a,pixelDatatype:l}),clear:void 0},m.push(h),h)}function vft(e,t){let n=Sft(e._collection,t);for(let i in n)n.hasOwnProperty(i)&&(e._stageNameToFramebuffer[i]=Aft(e,i,n[i]))}function WY(e){let t=e._framebuffers,n=t.length;for(let i=0;i<n;++i)t[i].buffer.destroy()}function Dft(e,t){let n=e._width,i=e._height,o=e._framebuffers,r=o.length;for(let s=0;s<r;++s){let a=o[s],l=a.textureScale,u=Math.ceil(n*l),f=Math.ceil(i*l),h=Math.min(u,f);a.forcePowerOfTwo&&(O.isPowerOfTwo(h)||(h=O.nextPowerOfTwo(h)),u=h,f=h),a.buffer.update(t,u,f),a.clear=new $n({color:a.clearColor,framebuffer:a.buffer.framebuffer})}}$p.prototype.updateDependencies=function(){this._updateDependencies=!0};$p.prototype.update=function(e){let t=this._collection,n=this._updateDependencies,i=c(t.ambientOcclusion)&&t.ambientOcclusion.enabled&&t.ambientOcclusion._isSupported(e),o=c(t.bloom)&&t.bloom.enabled&&t.bloom._isSupported(e),r=c(t._tonemapping)&&t._tonemapping.enabled&&t._tonemapping._isSupported(e),s=c(t.fxaa)&&t.fxaa.enabled&&t.fxaa._isSupported(e),a=!c(t._activeStages)||t._activeStages.length>0||i||o||r||s;if((n||!a&&this._framebuffers.length>0)&&(WY(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),!n&&!a)return;this._framebuffers.length===0&&vft(this,e);let l=e.drawingBufferWidth,u=e.drawingBufferHeight,f=this._width!==l||this._height!==u;!n&&!f||(this._width=l,this._height=u,this._updateDependencies=!1,WY(this),Dft(this,e))};$p.prototype.clear=function(e){let t=this._framebuffers;for(let n=0;n<t.length;++n)t[n].clear.execute(e)};$p.prototype.getStageByName=function(e){return this._collection.getStageByName(e)};$p.prototype.getOutputTexture=function(e){return this._collection.getOutputTexture(e)};$p.prototype.getFramebuffer=function(e){let t=this._stageNameToFramebuffer[e];if(c(t))return t.buffer.framebuffer};$p.prototype.isDestroyed=function(){return!1};$p.prototype.destroy=function(){return WY(this),ue(this)};var pw=$p;var _w={REINHARD:"REINHARD",MODIFIED_REINHARD:"MODIFIED_REINHARD",FILMIC:"FILMIC",ACES:"ACES",PBR_NEUTRAL:"PBR_NEUTRAL"};function Dge(e){return e===_w.REINHARD||e===_w.MODIFIED_REINHARD||e===_w.FILMIC||e===_w.ACES||e===_w.PBR_NEUTRAL}var wy=Object.freeze(_w);var qY=[];function Mc(){let e=Af.createFXAAStage(),t=Af.createAmbientOcclusionStage(),n=Af.createBloomStage();this._autoExposureEnabled=!1,this._autoExposure=Af.createAutoExposureStage(),this._exposure=1,this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=wy.PBR_NEUTRAL;let i=this._tonemapping;e.enabled=!1,t.enabled=!1,n.enabled=!1,i.enabled=!1;let o=new pw(this),r={},s=qY;for(s.push(e,t,n,i);s.length>0;){let l=s.pop();r[l.name]=l,l._textureCache=o;let u=l.length;if(c(u))for(let f=0;f<u;++f)s.push(l.get(f))}this._stages=[],this._activeStages=[],this._previousActiveStages=[],this._randomTexture=void 0;let a=this;t.uniforms.randomTexture=function(){return a._randomTexture},this._ao=t,this._bloom=n,this._fxaa=e,this._aoEnabled=void 0,this._bloomEnabled=void 0,this._tonemappingEnabled=void 0,this._fxaaEnabled=void 0,this._activeStagesChanged=!1,this._stagesRemoved=!1,this._textureCacheDirty=!1,this._stageNames=r,this._textureCache=o}Object.defineProperties(Mc.prototype,{ready:{get:function(){let e=!1,t=this._stages,n=t.length;for(let a=n-1;a>=0;--a){let l=t[a];e=e||l.ready&&l.enabled}let i=this._fxaa,o=this._ao,r=this._bloom,s=this._tonemapping;return e=e||i.ready&&i.enabled,e=e||o.ready&&o.enabled,e=e||r.ready&&r.enabled,e=e||s.ready&&s.enabled,e}},fxaa:{get:function(){return this._fxaa}},ambientOcclusion:{get:function(){return this._ao}},bloom:{get:function(){return this._bloom}},length:{get:function(){return YY(this),this._stages.length}},outputTexture:{get:function(){let e=this._fxaa;if(e.enabled&&e.ready)return this.getOutputTexture(e.name);let t=this._stages,n=t.length;for(let s=n-1;s>=0;--s){let a=t[s];if(c(a)&&a.ready&&a.enabled)return this.getOutputTexture(a.name)}let i=this._tonemapping;if(i.enabled&&i.ready)return this.getOutputTexture(i.name);let o=this._bloom;if(o.enabled&&o.ready)return this.getOutputTexture(o.name);let r=this._ao;if(r.enabled&&r.ready)return this.getOutputTexture(r.name)}},hasSelected:{get:function(){let e=this._stages.slice();for(;e.length>0;){let t=e.pop();if(!c(t))continue;if(c(t.selected))return!0;let n=t.length;if(c(n))for(let i=0;i<n;++i)e.push(t.get(i))}return!1}},tonemapper:{get:function(){return this._tonemapper},set:function(e){if(this._tonemapper===e)return;if(!Dge(e))throw new w("tonemapper was set to an invalid value.");c(this._tonemapping)&&(delete this._stageNames[this._tonemapping.name],this._tonemapping.destroy());let t=this._autoExposureEnabled,n;switch(e){case wy.REINHARD:n=Af.createReinhardTonemappingStage(t);break;case wy.MODIFIED_REINHARD:n=Af.createModifiedReinhardTonemappingStage(t);break;case wy.FILMIC:n=Af.createFilmicTonemappingStage(t);break;case wy.PBR_NEUTRAL:n=Af.createPbrNeutralTonemappingStage(t);break;default:n=Af.createAcesTonemappingStage(t);break}if(t){let i=this._autoExposure;n.uniforms.autoExposure=function(){return i.outputTexture}}else n.uniforms.exposure=this._exposure;this._tonemapper=e,this._tonemapping=n,c(this._stageNames)&&(this._stageNames[n.name]=n,n._textureCache=this._textureCache),this._textureCacheDirty=!0}},exposure:{get:function(){return this._exposure},set:function(e){this._tonemapping.uniforms.exposure=e,this._exposure=e}}});function YY(e){if(!e._stagesRemoved)return;e._stagesRemoved=!1;let t=[],n=e._stages;for(let i=0,o=0;i<n.length;++i){let r=n[i];r&&(r._index=o++,t.push(r))}e._stages=t}Mc.prototype.add=function(e){C.typeOf.object("stage",e);let t=this._stageNames,n=qY;for(n.push(e);n.length>0;){let o=n.pop();if(c(t[o.name]))throw new w(`${o.name} has already been added to the collection or does not have a unique name.`);t[o.name]=o,o._textureCache=this._textureCache;let r=o.length;if(c(r))for(let s=0;s<r;++s)n.push(o.get(s))}let i=this._stages;return e._index=i.length,i.push(e),this._textureCacheDirty=!0,e};Mc.prototype.remove=function(e){if(!this.contains(e))return!1;let t=this._stageNames,n=qY;for(n.push(e);n.length>0;){let i=n.pop();delete t[i.name];let o=i.length;if(c(o))for(let r=0;r<o;++r)n.push(i.get(r))}return this._stages[e._index]=void 0,this._stagesRemoved=!0,this._textureCacheDirty=!0,e._index=void 0,e._textureCache=void 0,e.destroy(),!0};Mc.prototype.contains=function(e){return c(e)&&c(e._index)&&e._textureCache===this._textureCache};Mc.prototype.get=function(e){YY(this);let t=this._stages,n=t.length;return C.typeOf.number.greaterThanOrEquals("stages length",n,0),C.typeOf.number.greaterThanOrEquals("index",e,0),C.typeOf.number.lessThan("index",e,n),t[e]};Mc.prototype.removeAll=function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)this.remove(e[n]);e.length=0};Mc.prototype.getStageByName=function(e){return this._stageNames[e]};Mc.prototype.update=function(e,t,n){YY(this);let i=this._activeStages,o=this._activeStages=this._previousActiveStages;this._previousActiveStages=i;let r=this._stages;o.length=r.length;let s=0;for(let T=0;T<r.length;++T){let E=r[T];E.ready&&E.enabled&&E._isSupported(e)&&(o[s++]=E)}o.length=s;let a=s!==i.length;if(!a){for(let T=0;T<s;++T)if(o[T]!==i[T]){a=!0;break}}let l=this._ao,u=this._bloom,f=this._autoExposure,h=this._tonemapping,m=this._fxaa;h.enabled=n;let p=l.enabled&&l._isSupported(e),_=u.enabled&&u._isSupported(e),b=h.enabled&&h._isSupported(e),x=m.enabled&&m._isSupported(e);if((a||this._textureCacheDirty||p!==this._aoEnabled||_!==this._bloomEnabled||b!==this._tonemappingEnabled||x!==this._fxaaEnabled)&&(this._textureCache.updateDependencies(),this._aoEnabled=p,this._bloomEnabled=_,this._tonemappingEnabled=b,this._fxaaEnabled=x,this._textureCacheDirty=!1),c(this._randomTexture)&&!p&&(this._randomTexture.destroy(),this._randomTexture=void 0),!c(this._randomTexture)&&p){let E=new Uint8Array(196608);for(let S=0;S<196608;S+=3)E[S]=Math.floor(Math.random()*255);this._randomTexture=new Ot({context:e,pixelFormat:Re.RGB,pixelDatatype:Ne.UNSIGNED_BYTE,source:{arrayBufferView:E,width:256,height:256},sampler:new Jt({wrapS:pn.REPEAT,wrapT:pn.REPEAT,minificationFilter:Wt.NEAREST,magnificationFilter:si.NEAREST})})}this._textureCache.update(e),m.update(e,t),l.update(e,t),u.update(e,t),h.update(e,t),this._autoExposureEnabled&&f.update(e,t);for(let T=0;T<r.length;++T)r[T].update(e,t);s=0;for(let T=0;T<r.length;++T){let E=r[T];E.ready&&E.enabled&&E._isSupported(e)&&s++}a=s!==o.length,a&&this.update(e,t,n)};Mc.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)};function j0(e){for(;c(e.length);)e=e.get(e.length-1);return e.outputTexture}Mc.prototype.getOutputTexture=function(e){let t=this.getStageByName(e);if(c(t))return j0(t)};function hm(e,t,n,i,o){if(c(e.execute)){e.execute(t,n,i,o);return}if(e.inputPreviousStageTexture){hm(e.get(0),t,n,i,o);for(let r=1;r<e.length;++r)hm(e.get(r),t,j0(e.get(r-1)),i,o)}else for(let r=0;r<e.length;++r)hm(e.get(r),t,n,i,o)}Mc.prototype.execute=function(e,t,n,i){let o=this._activeStages,r=o.length,s=this._fxaa,a=this._ao,l=this._bloom,u=this._autoExposure,f=this._tonemapping,h=a.enabled&&a._isSupported(e),m=l.enabled&&l._isSupported(e),p=this._autoExposureEnabled,_=f.enabled&&f._isSupported(e),b=s.enabled&&s._isSupported(e);if(!b&&!h&&!m&&!_&&r===0)return;let x=t;h&&a.ready&&(hm(a,e,x,n,i),x=j0(a)),m&&l.ready&&(hm(l,e,x,n,i),x=j0(l)),p&&u.ready&&hm(u,e,x,n,i),_&&f.ready&&(hm(f,e,x,n,i),x=j0(f));let T=x;if(r>0){hm(o[0],e,x,n,i);for(let E=1;E<r;++E)hm(o[E],e,j0(o[E-1]),n,i);T=j0(o[r-1])}b&&s.ready&&hm(s,e,T,n,i)};Mc.prototype.copy=function(e,t){if(!c(this._copyColorCommand)){let n=this;this._copyColorCommand=e.createViewportQuadCommand(du,{uniformMap:{colorTexture:function(){return n.outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)};Mc.prototype.isDestroyed=function(){return!1};Mc.prototype.destroy=function(){return this._fxaa.destroy(),this._ao.destroy(),this._bloom.destroy(),this._autoExposure.destroy(),this._tonemapping.destroy(),this.removeAll(),this._textureCache=this._textureCache&&this._textureCache.destroy(),ue(this)};var LV=Mc;var Ift={SHIFT:0,CTRL:1,ALT:2},ta=Object.freeze(Ift);var Oft={LEFT_DOWN:0,LEFT_UP:1,LEFT_CLICK:2,LEFT_DOUBLE_CLICK:3,RIGHT_DOWN:5,RIGHT_UP:6,RIGHT_CLICK:7,MIDDLE_DOWN:10,MIDDLE_UP:11,MIDDLE_CLICK:12,MOUSE_MOVE:15,WHEEL:16,PINCH_START:17,PINCH_END:18,PINCH_MOVE:19},ci=Object.freeze(Oft);function Sy(e,t,n){let i=e._element;if(i===document)return n.x=t.clientX,n.y=t.clientY,n;let o=i.getBoundingClientRect();return n.x=t.clientX-o.left,n.y=t.clientY-o.top,n}function QY(e,t){let n=e;return c(t)&&(n+=`+${t}`),n}function W0(e){if(e.shiftKey)return ta.SHIFT;if(e.ctrlKey)return ta.CTRL;if(e.altKey)return ta.ALT}var ps={LEFT:0,MIDDLE:1,RIGHT:2};function hu(e,t,n,i){function o(r){i(e,r)}sn.isInternetExplorer()?n.addEventListener(t,o,!1):n.addEventListener(t,o,{capture:!1,passive:!1}),e._removalFunctions.push(function(){n.removeEventListener(t,o,!1)})}function Pft(e){let t=e._element,n=c(t.disableRootEvents)?t:document;sn.supportsPointerEvents()?(hu(e,"pointerdown",t,Bft),hu(e,"pointerup",t,kge),hu(e,"pointermove",t,kft),hu(e,"pointercancel",t,kge)):(hu(e,"mousedown",t,Uge),hu(e,"mouseup",n,zge),hu(e,"mousemove",n,Vge),hu(e,"touchstart",t,Nft),hu(e,"touchend",n,Mge),hu(e,"touchmove",n,Fft),hu(e,"touchcancel",n,Mge)),hu(e,"dblclick",t,Mft);let i;"onwheel"in t?i="wheel":document.onmousewheel!==void 0?i="mousewheel":i="DOMMouseScroll",hu(e,i,t,Lft)}function Rft(e){let t=e._removalFunctions;for(let n=0;n<t.length;++n)t[n]()}var Ige={position:new k};function e7(e){e._lastSeenTouchEvent=yi()}function t7(e){return yi()-e._lastSeenTouchEvent>Bd.mouseEmulationIgnoreMilliseconds}function JY(e,t,n){let i=e.x-t.x,o=e.y-t.y;return Math.sqrt(i*i+o*o)<n}function Uge(e,t){if(!t7(e))return;let n=t.button;e._buttonDown[n]=!0;let i;if(n===ps.LEFT)i=ci.LEFT_DOWN;else if(n===ps.MIDDLE)i=ci.MIDDLE_DOWN;else if(n===ps.RIGHT)i=ci.RIGHT_DOWN;else return;let o=Sy(e,t,e._primaryPosition);k.clone(o,e._primaryStartPosition),k.clone(o,e._primaryPreviousPosition);let r=W0(t),s=e.getInputAction(i,r);c(s)&&(k.clone(o,Ige.position),s(Ige),t.preventDefault())}var Oge={position:new k},Pge={position:new k};function XY(e,t,n,i){let o=W0(i),r=e.getInputAction(t,o),s=e.getInputAction(n,o);if(c(r)||c(s)){let a=Sy(e,i,e._primaryPosition);if(c(r)&&(k.clone(a,Oge.position),r(Oge)),c(s)){let l=e._primaryStartPosition;JY(l,a,e._clickPixelTolerance)&&(k.clone(a,Pge.position),s(Pge))}}}function zge(e,t){if(!t7(e))return;let n=t.button;n!==ps.LEFT&&n!==ps.MIDDLE&&n!==ps.RIGHT||(e._buttonDown[ps.LEFT]&&(XY(e,ci.LEFT_UP,ci.LEFT_CLICK,t),e._buttonDown[ps.LEFT]=!1),e._buttonDown[ps.MIDDLE]&&(XY(e,ci.MIDDLE_UP,ci.MIDDLE_CLICK,t),e._buttonDown[ps.MIDDLE]=!1),e._buttonDown[ps.RIGHT]&&(XY(e,ci.RIGHT_UP,ci.RIGHT_CLICK,t),e._buttonDown[ps.RIGHT]=!1))}var KY={startPosition:new k,endPosition:new k};function Vge(e,t){if(!t7(e))return;let n=W0(t),i=Sy(e,t,e._primaryPosition),o=e._primaryPreviousPosition,r=e.getInputAction(ci.MOUSE_MOVE,n);c(r)&&(k.clone(o,KY.startPosition),k.clone(i,KY.endPosition),r(KY)),k.clone(i,o),(e._buttonDown[ps.LEFT]||e._buttonDown[ps.MIDDLE]||e._buttonDown[ps.RIGHT])&&t.preventDefault()}var Rge={position:new k};function Mft(e,t){let n=t.button,i;if(n===ps.LEFT)i=ci.LEFT_DOUBLE_CLICK;else return;let o=W0(t),r=e.getInputAction(i,o);c(r)&&(Sy(e,t,Rge.position),r(Rge))}function Lft(e,t){let n;if(c(t.deltaY)){let r=t.deltaMode;r===t.DOM_DELTA_PIXEL?n=-t.deltaY:r===t.DOM_DELTA_LINE?n=-t.deltaY*40:n=-t.deltaY*120}else t.detail>0?n=t.detail*-120:n=t.wheelDelta;if(!c(n))return;let i=W0(t),o=e.getInputAction(ci.WHEEL,i);c(o)&&(o(n),t.preventDefault())}function Nft(e,t){e7(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i<o;++i)r=n[i],s=r.identifier,a.set(s,Sy(e,r,new k));NV(e,t);let l=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,l.set(s,k.clone(a.get(s)))}function Mge(e,t){e7(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i<o;++i)r=n[i],s=r.identifier,a.remove(s);NV(e,t);let l=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,l.remove(s)}var Lge={position:new k},$Y={position1:new k,position2:new k},Nge={position:new k},Fge={position:new k},Bge={position:new k};function NV(e,t){let n=W0(t),i=e._positions,o=i.length,r,s,a=e._isPinching;if(o!==1&&e._buttonDown[ps.LEFT]){if(e._buttonDown[ps.LEFT]=!1,c(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),r=e.getInputAction(ci.LEFT_UP,n),c(r)&&(k.clone(e._primaryPosition,Nge.position),r(Nge)),o===0&&!e._isTouchHolding&&(s=e.getInputAction(ci.LEFT_CLICK,n),c(s))){let l=e._primaryStartPosition,u=e._previousPositions.values[0];JY(l,u,e._clickPixelTolerance)&&(k.clone(e._primaryPosition,Fge.position),s(Fge))}e._isTouchHolding=!1}if(o===0&&a&&(e._isPinching=!1,r=e.getInputAction(ci.PINCH_END,n),c(r)&&r()),o===1&&!a){let l=i.values[0];k.clone(l,e._primaryPosition),k.clone(l,e._primaryStartPosition),k.clone(l,e._primaryPreviousPosition),e._buttonDown[ps.LEFT]=!0,r=e.getInputAction(ci.LEFT_DOWN,n),c(r)&&(k.clone(l,Lge.position),r(Lge)),e._touchHoldTimer=setTimeout(function(){if(!e.isDestroyed()&&(e._touchHoldTimer=void 0,e._isTouchHolding=!0,s=e.getInputAction(ci.RIGHT_CLICK,n),c(s))){let u=e._primaryStartPosition,f=e._previousPositions.values[0];JY(u,f,e._holdPixelTolerance)&&(k.clone(e._primaryPosition,Bge.position),s(Bge))}},Bd.touchHoldDelayMilliseconds),t.preventDefault()}o===2&&!a&&(e._isPinching=!0,r=e.getInputAction(ci.PINCH_START,n),c(r)&&(k.clone(i.values[0],$Y.position1),k.clone(i.values[1],$Y.position2),r($Y),t.preventDefault()))}function Fft(e,t){e7(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i<o;++i){r=n[i],s=r.identifier;let u=a.get(s);c(u)&&Sy(e,r,u)}Hge(e,t);let l=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,k.clone(a.get(s),l.get(s))}var ZY={startPosition:new k,endPosition:new k},_I={distance:{startPosition:new k,endPosition:new k},angleAndHeight:{startPosition:new k,endPosition:new k}};function Hge(e,t){let n=W0(t),i=e._positions,o=e._previousPositions,r=i.length,s;if(r===1&&e._buttonDown[ps.LEFT]){let a=i.values[0];k.clone(a,e._primaryPosition);let l=e._primaryPreviousPosition;s=e.getInputAction(ci.MOUSE_MOVE,n),c(s)&&(k.clone(l,ZY.startPosition),k.clone(a,ZY.endPosition),s(ZY)),k.clone(a,l),t.preventDefault()}else if(r===2&&e._isPinching&&(s=e.getInputAction(ci.PINCH_MOVE,n),c(s))){let a=i.values[0],l=i.values[1],u=o.values[0],f=o.values[1],h=l.x-a.x,m=l.y-a.y,p=Math.sqrt(h*h+m*m)*.25,_=f.x-u.x,b=f.y-u.y,x=Math.sqrt(_*_+b*b)*.25,T=(l.y+a.y)*.125,E=(f.y+u.y)*.125,S=Math.atan2(m,h),A=Math.atan2(b,_);k.fromElements(0,x,_I.distance.startPosition),k.fromElements(0,p,_I.distance.endPosition),k.fromElements(A,E,_I.angleAndHeight.startPosition),k.fromElements(S,T,_I.angleAndHeight.endPosition),s(_I)}}function Bft(e,t){if(t.target.setPointerCapture(t.pointerId),t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.set(i,Sy(e,t,new k)),NV(e,t),e._previousPositions.set(i,k.clone(n.get(i)))}else Uge(e,t)}function kge(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.remove(i),NV(e,t),e._previousPositions.remove(i)}else zge(e,t)}function kft(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId,o=n.get(i);if(!c(o))return;Sy(e,t,o),Hge(e,t);let r=e._previousPositions;k.clone(n.get(i),r.get(i))}else Vge(e,t)}function Bd(e){this._inputEvents={},this._buttonDown={LEFT:!1,MIDDLE:!1,RIGHT:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-Bd.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new k,this._primaryPosition=new k,this._primaryPreviousPosition=new k,this._positions=new Et,this._previousPositions=new Et,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=g(e,document),Pft(this)}Bd.prototype.setInputAction=function(e,t,n){if(!c(e))throw new w("action is required.");if(!c(t))throw new w("type is required.");let i=QY(t,n);this._inputEvents[i]=e};Bd.prototype.getInputAction=function(e,t){if(!c(e))throw new w("type is required.");let n=QY(e,t);return this._inputEvents[n]};Bd.prototype.removeInputAction=function(e,t){if(!c(e))throw new w("type is required.");let n=QY(e,t);delete this._inputEvents[n]};Bd.prototype.isDestroyed=function(){return!1};Bd.prototype.destroy=function(){return Rft(this),ue(this)};Bd.mouseEmulationIgnoreMilliseconds=800;Bd.touchHoldDelayMilliseconds=1500;var Ay=Bd;function q0(e){C.typeOf.object("scene",e),this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}q0.prototype.completeMorph=function(){c(this._completeMorph)&&this._completeMorph()};q0.prototype.morphTo2D=function(e,t){c(this._completeMorph)&&this._completeMorph();let n=this._scene;this._previousMode=n.mode,this._morphToOrthographic=n.camera.frustum instanceof an,!(this._previousMode===J.SCENE2D||this._previousMode===J.MORPHING)&&(this._scene.morphStart.raiseEvent(this,this._previousMode,J.SCENE2D,!0),n._mode=J.MORPHING,n.camera._setTransform(N.IDENTITY),this._previousMode===J.COLUMBUS_VIEW?gdt(this,e):wdt(this,e,t),e===0&&c(this._completeMorph)&&this._completeMorph())};var Uft=new d,zft=new d,Vft=new d,Hft=new d,Gft=new d,jft=new d,Wft=new d,qft=new re,Yft=new N,Xft=new bi,Kft=new an,$ft={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};q0.prototype.morphToColumbusView=function(e,t){c(this._completeMorph)&&this._completeMorph();let n=this._scene;if(this._previousMode=n.mode,this._previousMode===J.COLUMBUS_VIEW||this._previousMode===J.MORPHING)return;this._scene.morphStart.raiseEvent(this,this._previousMode,J.COLUMBUS_VIEW,!0),n.camera._setTransform(N.IDENTITY);let i=Uft,o=zft,r=Vft;if(e>0)i.x=0,i.y=-1,i.z=1,i=d.multiplyByScalar(d.normalize(i,i),5*t.maximumRadius,i),d.negate(d.normalize(i,o),o),d.cross(d.UNIT_X,o,r);else{let u=n.camera;if(this._previousMode===J.SCENE2D)d.clone(u.position,i),i.z=u.frustum.right-u.frustum.left,d.negate(d.UNIT_Z,o),d.clone(d.UNIT_Y,r);else{d.clone(u.positionWC,i),d.clone(u.directionWC,o),d.clone(u.upWC,r);let f=t.scaleToGeodeticSurface(i,Wft),h=Lt.eastNorthUpToFixedFrame(f,t,Yft);N.inverseTransformation(h,h),n.mapProjection.project(t.cartesianToCartographic(i,qft),i),N.multiplyByPointAsVector(h,o,o),N.multiplyByPointAsVector(h,r,r)}}let s;this._morphToOrthographic?(s=Kft,s.width=n.camera.frustum.right-n.camera.frustum.left,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight):(s=Xft,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,s.fov=O.toRadians(60));let a=$ft;a.position=i,a.direction=o,a.up=r,a.frustum=s;let l=Adt(a);gI(this,l),this._previousMode===J.SCENE2D?Sdt(this,e,a,l):(a.position2D=N.multiplyByPoint(Qi.TRANSFORM_2D,i,Hft),a.direction2D=N.multiplyByPointAsVector(Qi.TRANSFORM_2D,o,Gft),a.up2D=N.multiplyByPointAsVector(Qi.TRANSFORM_2D,r,jft),n._mode=J.MORPHING,Qge(this,e,a,l)),e===0&&c(this._completeMorph)&&this._completeMorph()};var o7={position:new d,direction:new d,up:new d,frustum:void 0},jge=new bi;q0.prototype.morphTo3D=function(e,t){c(this._completeMorph)&&this._completeMorph();let n=this._scene;if(this._previousMode=n.mode,!(this._previousMode===J.SCENE3D||this._previousMode===J.MORPHING)){if(this._scene.morphStart.raiseEvent(this,this._previousMode,J.SCENE3D,!0),n._mode=J.MORPHING,n.camera._setTransform(N.IDENTITY),this._previousMode===J.SCENE2D)adt(this,e,t);else{let i;e>0?(i=o7,d.fromDegrees(0,0,5*t.maximumRadius,t,i.position),d.negate(i.position,i.direction),d.normalize(i.direction,i.direction),d.clone(d.UNIT_Z,i.up)):i=Wge(this,t);let o,r=n.camera;r.frustum instanceof an?o=r.frustum.clone():(o=jge,o.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,o.fov=O.toRadians(60)),i.frustum=o;let s=tye(i);gI(this,s),i7(this,e,i,s)}e===0&&c(this._completeMorph)&&this._completeMorph()}};q0.prototype.isDestroyed=function(){return!1};q0.prototype.destroy=function(){return FV(this),ue(this)};function gI(e,t){if(e._scene.completeMorphOnUserInput){e._morphHandler=new Ay(e._scene.canvas);let n=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)};e._completeMorph=n,e._morphHandler.setInputAction(n,ci.LEFT_DOWN),e._morphHandler.setInputAction(n,ci.MIDDLE_DOWN),e._morphHandler.setInputAction(n,ci.RIGHT_DOWN),e._morphHandler.setInputAction(n,ci.WHEEL)}}function FV(e){let t=e._currentTweens;for(let n=0;n<t.length;++n)t[n].cancelTween();e._currentTweens.length=0,e._morphHandler=e._morphHandler&&e._morphHandler.destroy()}var Zft=new re,Jft=new d,Qft=new N;function Wge(e,t){let n=e._scene,i=n.camera,o=o7,r=o.position,s=o.direction,a=o.up,l=n.mapProjection.unproject(i.position,Zft);t.cartographicToCartesian(l,r);let u=t.scaleToGeodeticSurface(r,Jft),f=Lt.eastNorthUpToFixedFrame(u,t,Qft);return N.multiplyByPointAsVector(f,i.direction,s),N.multiplyByPointAsVector(f,i.up,a),o}var edt=new d,tdt=new d,ndt=new d,idt=new d,odt=new d,rdt=new d;function i7(e,t,n,i){t*=.5;let o=e._scene,r=o.camera,s=d.clone(r.position,edt),a=d.clone(r.direction,tdt),l=d.clone(r.up,ndt),u=N.multiplyByPoint(Qi.TRANSFORM_2D_INVERSE,n.position,idt),f=N.multiplyByPointAsVector(Qi.TRANSFORM_2D_INVERSE,n.direction,odt),h=N.multiplyByPointAsVector(Qi.TRANSFORM_2D_INVERSE,n.up,rdt);function m(_){vf(s,u,_.time,r.position),vf(a,f,_.time,r.direction),vf(l,h,_.time,r.up),d.cross(r.direction,r.up,r.right),d.normalize(r.right,r.right)}let p=o.tweens.add({duration:t,easingFunction:Ps.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:m,complete:function(){eye(e,o,0,1,t,i)}});e._currentTweens.push(p)}var sdt=new an,qge=new d,Yge=new d,Xge=new d,r7=new d,Kge=new d,$ge=new d;function adt(e,t,n){t/=3;let i=e._scene,o=i.camera,r;t>0?(r=o7,d.fromDegrees(0,0,5*n.maximumRadius,n,r.position),d.negate(r.position,r.direction),d.normalize(r.direction,r.direction),d.clone(d.UNIT_Z,r.up)):(o.position.z=o.frustum.right-o.frustum.left,r=Wge(e,n));let s;e._morphToOrthographic?(s=sdt,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.width=o.frustum.right-o.frustum.left):(s=jge,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.fov=O.toRadians(60)),r.frustum=s;let a=tye(r);gI(e,a);let l;e._morphToOrthographic?l=function(){i7(e,t,r,a)}:l=function(){Jge(e,t,r,function(){i7(e,t,r,a)})},t>0?(i._mode=J.SCENE2D,o.flyTo({duration:t,destination:d.fromDegrees(0,0,5*n.maximumRadius,n,r7),complete:function(){i._mode=J.MORPHING,l()}})):l()}function vf(e,t,n,i){return d.lerp(e,t,n,i)}function Zge(e,t,n,i,o){let r=e._scene,s=r.camera;if(s.frustum instanceof an)return;let a=s.frustum.fov,l=O.RADIANS_PER_DEGREE*.5,u=n.position.z*Math.tan(a*.5);s.frustum.far=u/Math.tan(l*.5)+1e7;function f(m){s.frustum.fov=O.lerp(a,l,m.time);let p=u/Math.tan(s.frustum.fov*.5);i(s,p)}let h=r.tweens.add({duration:t,easingFunction:Ps.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:f,complete:function(){s.frustum=n.frustum.clone(),o(e)}});e._currentTweens.push(h)}var cdt=new d,ldt=new d,udt=new d,n7=new d,fdt=new d,ddt=new d,hdt=new No,mdt=new mn,pdt=new d,_dt={position:void 0,direction:void 0,up:void 0,frustum:void 0};function gdt(e,t){t*=.5;let n=e._scene,i=n.camera,o=d.clone(i.position,cdt),r=d.clone(i.direction,ldt),s=d.clone(i.up,udt),a=d.negate(d.UNIT_Z,fdt),l=d.clone(d.UNIT_Y,ddt),u=n7;if(t>0)d.clone(d.ZERO,n7),u.z=5*n.ellipsoid.maximumRadius;else{d.clone(o,n7);let x=mdt;N.multiplyByPoint(Qi.TRANSFORM_2D,o,x.origin),N.multiplyByPointAsVector(Qi.TRANSFORM_2D,r,x.direction);let T=n.globe;if(c(T)){let E=T.pickWorldCoordinates(x,n,!0,pdt);c(E)&&(N.multiplyByPoint(Qi.TRANSFORM_2D_INVERSE,E,u),u.z+=d.distance(o,u))}}let f=hdt;f.right=u.z*.5,f.left=-f.right,f.top=f.right*(n.drawingBufferHeight/n.drawingBufferWidth),f.bottom=-f.top;let h=_dt;h.position=u,h.direction=a,h.up=l,h.frustum=f;let m=nye(h);gI(e,m);function p(x){vf(o,u,x.time,i.position),vf(r,a,x.time,i.direction),vf(s,l,x.time,i.up),d.cross(i.direction,i.up,i.right),d.normalize(i.right,i.right),i._adjustOrthographicFrustum(!0)}function _(x,T){x.position.z=T}let b=n.tweens.add({duration:t,easingFunction:Ps.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:p,complete:function(){Zge(e,t,h,_,m)}});e._currentTweens.push(b)}var Gge=new re,ydt={position:new d,direction:new d,up:new d,position2D:new d,direction2D:new d,up2D:new d,frustum:new No},bdt={position:new d,direction:new d,up:new d,frustum:void 0},xdt=new d,Tdt=new mn,Cdt=new N,Edt=new d;function wdt(e,t,n){t*=.5;let i=e._scene,o=i.camera,r=ydt;if(t>0)d.clone(d.ZERO,r.position),r.position.z=5*n.maximumRadius,d.negate(d.UNIT_Z,r.direction),d.clone(d.UNIT_Y,r.up);else{n.cartesianToCartographic(o.positionWC,Gge),i.mapProjection.project(Gge,r.position),d.negate(d.UNIT_Z,r.direction),d.clone(d.UNIT_Y,r.up);let h=Tdt;d.clone(r.position2D,h.origin);let m=d.clone(o.directionWC,h.direction),p=n.scaleToGeodeticSurface(o.positionWC,Edt),_=Lt.eastNorthUpToFixedFrame(p,n,Cdt);N.inverseTransformation(_,_),N.multiplyByPointAsVector(_,m,m),N.multiplyByPointAsVector(Qi.TRANSFORM_2D,m,m);let b=i.globe;if(c(b)){let x=b.pickWorldCoordinates(h,i,!0,xdt);if(c(x)){let T=d.distance(r.position2D,x);x.x+=T,d.clone(x,r.position2D)}}}function s(h,m){h.position.x=m}N.multiplyByPoint(Qi.TRANSFORM_2D,r.position,r.position2D),N.multiplyByPointAsVector(Qi.TRANSFORM_2D,r.direction,r.direction2D),N.multiplyByPointAsVector(Qi.TRANSFORM_2D,r.up,r.up2D);let a=r.frustum;a.right=r.position.z*.5,a.left=-a.right,a.top=a.right*(i.drawingBufferHeight/i.drawingBufferWidth),a.bottom=-a.top;let l=bdt;N.multiplyByPoint(Qi.TRANSFORM_2D_INVERSE,r.position2D,l.position),d.clone(r.direction,l.direction),d.clone(r.up,l.up),l.frustum=a;let u=nye(l);gI(e,u);function f(){Zge(e,t,r,s,u)}Qge(e,t,r,f)}function Jge(e,t,n,i){let o=e._scene,r=o.camera,s=r.frustum.right-r.frustum.left;r.frustum=n.frustum.clone();let a=r.frustum.fov,l=O.RADIANS_PER_DEGREE*.5,u=s*Math.tan(a*.5);r.frustum.far=u/Math.tan(l*.5)+1e7,r.frustum.fov=l;function f(m){r.frustum.fov=O.lerp(l,a,m.time),r.position.z=u/Math.tan(r.frustum.fov*.5)}let h=o.tweens.add({duration:t,easingFunction:Ps.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:f,complete:function(){i(e)}});e._currentTweens.push(h)}function Sdt(e,t,n,i){t*=.5;let o=e._scene,r=o.camera,s=d.clone(n.position,r7),a=d.clone(n.direction,Kge),l=d.clone(n.up,$ge);o._mode=J.MORPHING;function u(){r.frustum=n.frustum.clone();let f=d.clone(r.position,qge),h=d.clone(r.direction,Yge),m=d.clone(r.up,Xge);f.z=s.z;function p(b){vf(f,s,b.time,r.position),vf(h,a,b.time,r.direction),vf(m,l,b.time,r.up),d.cross(r.direction,r.up,r.right),d.normalize(r.right,r.right)}let _=o.tweens.add({duration:t,easingFunction:Ps.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:p,complete:function(){i(e)}});e._currentTweens.push(_)}e._morphToOrthographic?u():Jge(e,0,n,u)}function Qge(e,t,n,i){let o=e._scene,r=o.camera,s=d.clone(r.position,qge),a=d.clone(r.direction,Yge),l=d.clone(r.up,Xge),u=d.clone(n.position2D,r7),f=d.clone(n.direction2D,Kge),h=d.clone(n.up2D,$ge);function m(_){vf(s,u,_.time,r.position),vf(a,f,_.time,r.direction),vf(l,h,_.time,r.up),d.cross(r.direction,r.up,r.right),d.normalize(r.right,r.right),r._adjustOrthographicFrustum(!0)}let p=o.tweens.add({duration:t,easingFunction:Ps.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:m,complete:function(){eye(e,o,1,0,t,i)}});e._currentTweens.push(p)}function eye(e,t,n,i,o,r){let s={object:t,property:"morphTime",startValue:n,stopValue:i,duration:o,easingFunction:Ps.QUARTIC_OUT};c(r)&&(s.complete=function(){r(e)});let a=t.tweens.addProperty(s);e._currentTweens.push(a)}function tye(e){return function(t){let n=t._scene;n._mode=J.SCENE3D,n.morphTime=J.getMorphTime(J.SCENE3D),FV(t);let i=n.camera;(t._previousMode!==J.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,d.clone(e.position,i.position),d.clone(e.direction,i.direction),d.clone(e.up,i.up),d.cross(i.direction,i.up,i.right),d.normalize(i.right,i.right),i.frustum=e.frustum.clone());let o=i.frustum;n.frameState.useLogDepth&&(o.near=.1,o.far=1e10);let r=c(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,J.SCENE3D,r)}}function nye(e){return function(t){let n=t._scene;n._mode=J.SCENE2D,n.morphTime=J.getMorphTime(J.SCENE2D),FV(t);let i=n.camera;d.clone(e.position,i.position),i.position.z=n.ellipsoid.maximumRadius*2,d.clone(e.direction,i.direction),d.clone(e.up,i.up),d.cross(i.direction,i.up,i.right),d.normalize(i.right,i.right),i.frustum=e.frustum.clone();let o=c(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,J.SCENE2D,o)}}function Adt(e){return function(t){let n=t._scene;n._mode=J.COLUMBUS_VIEW,n.morphTime=J.getMorphTime(J.COLUMBUS_VIEW),FV(t);let i=n.camera;(t._previousModeMode!==J.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,d.clone(e.position,i.position),d.clone(e.direction,i.direction),d.clone(e.up,i.up),d.cross(i.direction,i.up,i.right),d.normalize(i.right,i.right));let o=i.frustum;n.frameState.useLogDepth&&(o.near=.1,o.far=1e10);let r=c(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,J.COLUMBUS_VIEW,r)}}var BV=q0;var vdt={LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4},Pi=Object.freeze(vdt);function Ls(e,t){let n=`${e}`;return c(t)&&(n+=`+${t}`),n}function Ddt(e,t){k.clone(e.distance.startPosition,t.distance.startPosition),k.clone(e.distance.endPosition,t.distance.endPosition),k.clone(e.angleAndHeight.startPosition,t.angleAndHeight.startPosition),k.clone(e.angleAndHeight.endPosition,t.angleAndHeight.endPosition)}function iye(e,t,n){let i=Ls(Pi.PINCH,t),o=e._update,r=e._isDown,s=e._eventStartPosition,a=e._pressTime,l=e._releaseTime;o[i]=!0,r[i]=!1,s[i]=new k;let u=e._movement[i];c(u)||(u=e._movement[i]={}),u.distance={startPosition:new k,endPosition:new k},u.angleAndHeight={startPosition:new k,endPosition:new k},u.prevAngle=0,e._eventHandler.setInputAction(function(f){e._buttonsDown++,r[i]=!0,a[i]=new Date,k.lerp(f.position1,f.position2,.5,s[i])},ci.PINCH_START,t),e._eventHandler.setInputAction(function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),r[i]=!1,l[i]=new Date},ci.PINCH_END,t),e._eventHandler.setInputAction(function(f){if(r[i]){o[i]?(Ddt(f,u),o[i]=!1,u.prevAngle=u.angleAndHeight.startPosition.x):(k.clone(f.distance.endPosition,u.distance.endPosition),k.clone(f.angleAndHeight.endPosition,u.angleAndHeight.endPosition));let h=u.angleAndHeight.endPosition.x,m=u.prevAngle,p=Math.PI*2;for(;h>=m+Math.PI;)h-=p;for(;h<m-Math.PI;)h+=p;u.angleAndHeight.endPosition.x=-h*n.clientWidth/12,u.angleAndHeight.startPosition.x=-m*n.clientWidth/12}},ci.PINCH_MOVE,t)}function oye(e,t){let n=Ls(Pi.WHEEL,t),i=e._pressTime,o=e._releaseTime,r=e._update;r[n]=!0;let s=e._movement[n];c(s)||(s=e._movement[n]={});let a=e._lastMovement[n];c(a)||(a=e._lastMovement[n]={startPosition:new k,endPosition:new k,valid:!1}),s.startPosition=new k,k.clone(k.ZERO,s.startPosition),s.endPosition=new k,e._eventHandler.setInputAction(function(l){let u=7.5*O.toRadians(l);i[n]=o[n]=new Date,s.endPosition.x=0,s.endPosition.y=u,k.clone(s.endPosition,a.endPosition),a.valid=!0,r[n]=!1},ci.WHEEL,t)}function gw(e,t,n){let i=Ls(n,t),o=e._isDown,r=e._eventStartPosition,s=e._pressTime;o[i]=!1,r[i]=new k;let a=e._lastMovement[i];c(a)||(a=e._lastMovement[i]={startPosition:new k,endPosition:new k,valid:!1});let l,u;n===Pi.LEFT_DRAG?(l=ci.LEFT_DOWN,u=ci.LEFT_UP):n===Pi.RIGHT_DRAG?(l=ci.RIGHT_DOWN,u=ci.RIGHT_UP):n===Pi.MIDDLE_DRAG&&(l=ci.MIDDLE_DOWN,u=ci.MIDDLE_UP),e._eventHandler.setInputAction(function(f){e._buttonsDown++,a.valid=!1,o[i]=!0,s[i]=new Date,k.clone(f.position,r[i])},l,t),e._eventHandler.setInputAction(function(){s7(Ls(n,void 0),e);for(let f of Object.values(ta)){let h=Ls(n,f);s7(h,e)}},u,t)}function s7(e,t){let n=t._releaseTime,i=t._isDown;i[e]&&(t._buttonsDown=Math.max(t._buttonsDown-1,0)),i[e]=!1,n[e]=new Date}function rye(e,t){k.clone(e.startPosition,t.startPosition),k.clone(e.endPosition,t.endPosition)}function Idt(e,t,n){let i=n._isDown,o=!1,r=Ls(e,t);for(let[l,u]of Object.entries(i))l.startsWith(e)&&u&&l!==r&&(o=!0,s7(l,n));if(!o)return;let s=n._pressTime,a=n._lastMovement[r];c(a)||(a=n._lastMovement[r]={startPosition:new k,endPosition:new k,valid:!1}),n._buttonsDown++,a.valid=!1,i[r]=!0,s[r]=new Date}function sye(e,t){let n=e._update,i=e._movement,o=e._lastMovement,r=e._isDown;for(let s in Pi)if(Pi.hasOwnProperty(s)){let a=Pi[s];if(c(a)){let l=Ls(a,t);n[l]=!0,c(e._lastMovement[l])||(e._lastMovement[l]={startPosition:new k,endPosition:new k,valid:!1}),c(e._movement[l])||(e._movement[l]={startPosition:new k,endPosition:new k})}}e._eventHandler.setInputAction(function(s){for(let a in Pi)if(Pi.hasOwnProperty(a)){let l=Pi[a];if(c(l)){let u=Ls(l,t);Idt(l,t,e),r[u]&&(n[u]?(rye(i[u],o[u]),o[u].valid=!0,rye(s,i[u]),n[u]=!1):k.clone(s.endPosition,i[u].endPosition))}}k.clone(s.endPosition,e._currentMousePosition)},ci.MOUSE_MOVE,t)}function Df(e){if(!c(e))throw new w("canvas is required.");this._eventHandler=new Ay(e),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new k,oye(this,void 0),iye(this,void 0,e),gw(this,void 0,Pi.LEFT_DRAG),gw(this,void 0,Pi.RIGHT_DRAG),gw(this,void 0,Pi.MIDDLE_DRAG),sye(this,void 0);for(let t in ta)if(ta.hasOwnProperty(t)){let n=ta[t];c(n)&&(oye(this,n),iye(this,n,e),gw(this,n,Pi.LEFT_DRAG),gw(this,n,Pi.RIGHT_DRAG),gw(this,n,Pi.MIDDLE_DRAG),sye(this,n))}}Object.defineProperties(Df.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){let e=!this._update[Ls(Pi.WHEEL)]||!this._update[Ls(Pi.WHEEL,ta.SHIFT)]||!this._update[Ls(Pi.WHEEL,ta.CTRL)]||!this._update[Ls(Pi.WHEEL,ta.ALT)];return this._buttonsDown>0||e}}});Df.prototype.isMoving=function(e,t){if(!c(e))throw new w("type is required.");let n=Ls(e,t);return!this._update[n]};Df.prototype.getMovement=function(e,t){if(!c(e))throw new w("type is required.");let n=Ls(e,t);return this._movement[n]};Df.prototype.getLastMovement=function(e,t){if(!c(e))throw new w("type is required.");let n=Ls(e,t),i=this._lastMovement[n];if(i.valid)return i};Df.prototype.isButtonDown=function(e,t){if(!c(e))throw new w("type is required.");let n=Ls(e,t);return this._isDown[n]};Df.prototype.getStartMousePosition=function(e,t){if(!c(e))throw new w("type is required.");if(e===Pi.WHEEL)return this._currentMousePosition;let n=Ls(e,t);return this._eventStartPosition[n]};Df.prototype.getButtonPressTime=function(e,t){if(!c(e))throw new w("type is required.");let n=Ls(e,t);return this._pressTime[n]};Df.prototype.getButtonReleaseTime=function(e,t){if(!c(e))throw new w("type is required.");let n=Ls(e,t);return this._releaseTime[n]};Df.prototype.reset=function(){for(let e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)};Df.prototype.isDestroyed=function(){return!1};Df.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),ue(this)};var kV=Df;function UV(e,t,n,i,o,r,s,a,l,u){this._tweens=e,this._tweenjs=t,this._startObject=ze(n),this._stopObject=ze(i),this._duration=o,this._delay=r,this._easingFunction=s,this._update=a,this._complete=l,this.cancel=u,this.needsStart=!0}Object.defineProperties(UV.prototype,{startObject:{get:function(){return this._startObject}},stopObject:{get:function(){return this._stopObject}},duration:{get:function(){return this._duration}},delay:{get:function(){return this._delay}},easingFunction:{get:function(){return this._easingFunction}},update:{get:function(){return this._update}},complete:{get:function(){return this._complete}},tweenjs:{get:function(){return this._tweenjs}}});UV.prototype.cancelTween=function(){this._tweens.remove(this)};function kd(){this._tweens=[]}Object.defineProperties(kd.prototype,{length:{get:function(){return this._tweens.length}}});kd.prototype.add=function(e){if(e=g(e,g.EMPTY_OBJECT),!c(e.startObject)||!c(e.stopObject))throw new w("options.startObject and options.stopObject are required.");if(!c(e.duration)||e.duration<0)throw new w("options.duration is required and must be positive.");if(e.duration===0)return c(e.complete)&&e.complete(),new UV(this);let t=e.duration/Vn.SECONDS_PER_MILLISECOND,n=g(e.delay,0),i=n/Vn.SECONDS_PER_MILLISECOND,o=g(e.easingFunction,Ps.LINEAR_NONE),r=e.startObject,s=new jhe(r);s.to(ze(e.stopObject),t),s.delay(i),s.easing(o),c(e.update)&&s.onUpdate(function(){e.update(r)}),s.onComplete(g(e.complete,null)),s.repeat(g(e._repeat,0));let a=new UV(this,s,e.startObject,e.stopObject,e.duration,n,o,e.update,e.complete,e.cancel);return this._tweens.push(a),a};kd.prototype.addProperty=function(e){e=g(e,g.EMPTY_OBJECT);let t=e.object,n=e.property,i=e.startValue,o=e.stopValue;if(!c(t)||!c(e.property))throw new w("options.object and options.property are required.");if(!c(t[n]))throw new w("options.object must have the specified property.");if(!c(i)||!c(o))throw new w("options.startValue and options.stopValue are required.");function r(s){t[n]=s.value}return this.add({startObject:{value:i},stopObject:{value:o},duration:g(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:r,complete:e.complete,cancel:e.cancel,_repeat:e._repeat})};kd.prototype.addAlpha=function(e){e=g(e,g.EMPTY_OBJECT);let t=e.material;if(!c(t))throw new w("options.material is required.");let n=[];for(let o in t.uniforms)t.uniforms.hasOwnProperty(o)&&c(t.uniforms[o])&&c(t.uniforms[o].alpha)&&n.push(o);if(n.length===0)throw new w("material has no properties with alpha components.");function i(o){let r=n.length;for(let s=0;s<r;++s)t.uniforms[n[s]].alpha=o.alpha}return this.add({startObject:{alpha:g(e.startValue,0)},stopObject:{alpha:g(e.stopValue,1)},duration:g(e.duration,3),delay:e.delay,easingFunction:e.easingFunction,update:i,complete:e.complete,cancel:e.cancel})};kd.prototype.addOffsetIncrement=function(e){e=g(e,g.EMPTY_OBJECT);let t=e.material;if(!c(t))throw new w("material is required.");if(!c(t.uniforms.offset))throw new w("material.uniforms must have an offset property.");let n=t.uniforms;return this.addProperty({object:n,property:"offset",startValue:n.offset,stopValue:n.offset+1,duration:e.duration,delay:e.delay,easingFunction:e.easingFunction,update:e.update,cancel:e.cancel,_repeat:1/0})};kd.prototype.remove=function(e){if(!c(e))return!1;let t=this._tweens.indexOf(e);return t!==-1?(e.tweenjs.stop(),c(e.cancel)&&e.cancel(),this._tweens.splice(t,1),!0):!1};kd.prototype.removeAll=function(){let e=this._tweens;for(let t=0;t<e.length;++t){let n=e[t];n.tweenjs.stop(),c(n.cancel)&&n.cancel()}e.length=0};kd.prototype.contains=function(e){return c(e)&&this._tweens.indexOf(e)!==-1};kd.prototype.get=function(e){if(!c(e))throw new w("index is required.");return this._tweens[e]};kd.prototype.update=function(e){let t=this._tweens,n=0;for(e=c(e)?e/Vn.SECONDS_PER_MILLISECOND:yi();n<t.length;){let i=t[n],o=i.tweenjs;i.needsStart?(i.needsStart=!1,o.start(e)):o.update(e)?n++:(o.stop(),t.splice(n,1))}};var yw=kd;function bI(e){if(!c(e))throw new w("scene is required.");this.enableInputs=!0,this.enableTranslate=!0,this.enableZoom=!0,this.enableRotate=!0,this.enableTilt=!0,this.enableLook=!0,this.inertiaSpin=.9,this.inertiaTranslate=.9,this.inertiaZoom=.8,this.maximumMovementRatio=.1,this.bounceAnimationTime=3,this.minimumZoomDistance=1,this.maximumZoomDistance=Number.POSITIVE_INFINITY,this.zoomFactor=5,this.translateEventTypes=Pi.LEFT_DRAG,this.zoomEventTypes=[Pi.RIGHT_DRAG,Pi.WHEEL,Pi.PINCH],this.rotateEventTypes=Pi.LEFT_DRAG,this.tiltEventTypes=[Pi.MIDDLE_DRAG,Pi.PINCH,{eventType:Pi.LEFT_DRAG,modifier:ta.CTRL},{eventType:Pi.RIGHT_DRAG,modifier:ta.CTRL}],this.lookEventTypes={eventType:Pi.LEFT_DRAG,modifier:ta.SHIFT};let t=g(e.ellipsoid,Z.default);this.minimumPickingTerrainHeight=Z.WGS84.equals(t)?15e4:t.minimumRadius*.025,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight,this.minimumPickingTerrainDistanceWithInertia=Z.WGS84.equals(t)?4e3:t.minimumRadius*63e-5,this.minimumCollisionTerrainHeight=Z.WGS84.equals(t)?15e3:t.minimumRadius*.0025,this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight,this.minimumTrackBallHeight=Z.WGS84.equals(t)?75e5:t.minimumRadius*1.175,this._minimumTrackBallHeight=this.minimumTrackBallHeight,this.enableCollisionDetection=!0,this.maximumTiltAngle=void 0,this._scene=e,this._globe=void 0,this._ellipsoid=t,this._lastGlobeHeight=0,this._aggregator=new kV(e.canvas),this._lastInertiaSpinMovement=void 0,this._lastInertiaZoomMovement=void 0,this._lastInertiaTranslateMovement=void 0,this._lastInertiaTiltMovement=void 0,this._inertiaDisablers={_lastInertiaZoomMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement","_lastInertiaTiltMovement"],_lastInertiaTiltMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement"]},this._tweens=new yw,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new k(-1,-1),this._tiltCenter=new d,this._rotateMousePosition=new k(-1,-1),this._rotateStartPosition=new d,this._strafeStartPosition=new d,this._strafeMousePosition=new k,this._strafeEndMousePosition=new k,this._zoomMouseStart=new k(-1,-1),this._zoomWorldPosition=new d,this._useZoomWorldPosition=!1,this._panLastMousePosition=new k,this._panLastWorldPosition=new d,this._tiltCVOffMap=!1,this._looking=!1,this._rotating=!1,this._strafing=!1,this._zoomingOnVector=!1,this._zoomingUnderground=!1,this._rotatingZoom=!1,this._adjustedHeightForTerrain=!1,this._cameraUnderground=!1;let n=e.mapProjection;this._maxCoord=n.project(new re(Math.PI,O.PI_OVER_TWO)),this._rotateFactor=void 0,this._rotateRateRangeAdjustment=void 0,this._maximumRotateRate=1.77,this._minimumRotateRate=1/5e3,this._minimumZoomRate=20,this._maximumZoomRate=5906376272e3,this._minimumUndergroundPickDistance=2e3,this._maximumUndergroundPickDistance=1e4}function Odt(e,t){if(e<0)return 0;let n=(1-t)*25;return Math.exp(-n*e)}function Pdt(e){return k.equalsEpsilon(e.startPosition,e.endPosition,O.EPSILON14)}var Rdt=.4;function Mdt(e,t,n,i,o,r,s){let a=r[s];c(a)||(a=r[s]={startPosition:new k,endPosition:new k,motion:new k,inertiaEnabled:!0});let l=e.getButtonPressTime(t,n),u=e.getButtonReleaseTime(t,n),f=l&&u&&(u.getTime()-l.getTime())/1e3,m=u&&(new Date().getTime()-u.getTime())/1e3;if(l&&u&&f<Rdt){let p=Odt(m,i),_=e.getLastMovement(t,n);if(!c(_)||Pdt(_)||!a.inertiaEnabled||(a.motion.x=(_.endPosition.x-_.startPosition.x)*.5,a.motion.y=(_.endPosition.y-_.startPosition.y)*.5,a.startPosition=k.clone(_.startPosition,a.startPosition),a.endPosition=k.multiplyByScalar(a.motion,p,a.endPosition),a.endPosition=k.add(a.startPosition,a.endPosition,a.endPosition),isNaN(a.endPosition.x)||isNaN(a.endPosition.y)||k.distance(a.startPosition,a.endPosition)<.5))return;if(!e.isButtonDown(t,n)){let b=e.getStartMousePosition(t,n);o(r,b,a)}}}function Ldt(e,t){if(c(t)){let n=e[t];c(n)&&(n.inertiaEnabled=!0);let i=e._inertiaDisablers[t];if(c(i)){let o=i.length;for(let r=0;r<o;++r)n=e[i[r]],c(n)&&(n.inertiaEnabled=!1)}}}var aye=[];function Lc(e,t,n,i,o,r){if(!c(n))return;let s=e._aggregator;Array.isArray(n)||(aye[0]=n,n=aye);let a=n.length;for(let l=0;l<a;++l){let u=n[l],f=c(u.eventType)?u.eventType:u,h=u.modifier,m=s.isMoving(f,h)&&s.getMovement(f,h),p=s.getStartMousePosition(f,h);e.enableInputs&&t&&(m?(i(e,p,m),Ldt(e,r)):o<1&&Mdt(s,f,h,o,i,e,r))}}var zV=new mn,Ndt=new d,Fdt=new k,Bdt=new d,kdt=new k,Udt=new d,zdt=new d,Vdt=new d,Hdt=new d,bye=new d,Gdt=new d,jdt=new d,Wdt=new d,qdt=new d,Ydt=new d,Xdt=new d,Kdt=new d,$dt=new d,Zdt=new d,Jdt=new d,Y0=new d,cye=new d,lye=new d,a7={orientation:new Hc};function p7(e,t,n,i,o,r){let s=1;c(r)&&(s=O.clamp(Math.abs(r),.25,1));let a=n.endPosition.y-n.startPosition.y,u=a>0?e.minimumZoomDistance*s:0,f=e.maximumZoomDistance,h=o-u,m=i*h;m=O.clamp(m,e._minimumZoomRate,e._maximumZoomRate);let p=a/e._scene.canvas.clientHeight;p=Math.min(p,e.maximumMovementRatio);let _=m*p;if(e.enableCollisionDetection||e.minimumZoomDistance===0||!c(e._globe)){if(_>0&&Math.abs(o-u)<1||_<0&&Math.abs(o-f)<1)return;o-_<u?_=o-u-1:o-_>f&&(_=o-f)}let b=e._scene,x=b.camera,T=b.mode,E=a7.orientation;if(E.heading=x.heading,E.pitch=x.pitch,E.roll=x.roll,x.frustum instanceof an){Math.abs(_)>0&&(x.zoomIn(_),x._adjustOrthographicFrustum(!0));return}let S=g(n.inertiaEnabled,k.equals(t,e._zoomMouseStart)),A=e._zoomingOnVector,v=e._rotatingZoom,D;if(S||(e._zoomMouseStart=k.clone(t,e._zoomMouseStart),c(e._globe)&&T===J.SCENE2D?(D=x.getPickRay(t,zV).origin,D=d.fromElements(D.y,D.z,D.x)):c(e._globe)&&(D=Zp(e,t,Ndt)),c(D)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=d.clone(D,e._zoomWorldPosition)):e._useZoomWorldPosition=!1,A=e._zoomingOnVector=!1,v=e._rotatingZoom=!1,e._zoomingUnderground=e._cameraUnderground),!e._useZoomWorldPosition){x.zoomIn(_);return}let R=T===J.COLUMBUS_VIEW;if(x.positionCartographic.height<2e6&&(v=!0),!S||v){if(T===J.SCENE2D){let P=e._zoomWorldPosition,L=x.position;if(!d.equals(P,L)&&x.positionCartographic.height<e._maxCoord.x*2){let F=x.position.x,y=d.subtract(P,L,Bdt);d.normalize(y,y);let I=d.distance(P,L)*_/(x.getMagnitude()*.5);x.move(y,I*.5),(x.position.x<0&&F>0||x.position.x>0&&F<0)&&(D=x.getPickRay(t,zV).origin,D=d.fromElements(D.y,D.z,D.x),e._zoomWorldPosition=d.clone(D,e._zoomWorldPosition))}}else if(T===J.SCENE3D){let P=d.normalize(x.position,bye);if(e._cameraUnderground||e._zoomingUnderground||x.positionCartographic.height<3e3&&Math.abs(d.dot(x.direction,P))<.6)R=!0;else{let L=b.canvas,F=kdt;F.x=L.clientWidth/2,F.y=L.clientHeight/2;let y=Zp(e,F,Udt);if(!c(y))R=!0;else if(x.positionCartographic.height<1e6)if(d.dot(x.direction,P)>=-.5)R=!0;else{let I=jdt;d.clone(x.position,I);let M=e._zoomWorldPosition,B=Gdt;if(B=d.normalize(M,B),d.dot(B,P)<0)return;let U=Jdt,V=Ydt;d.clone(x.direction,V),d.add(I,d.multiplyByScalar(V,1e3,Y0),U);let W=Xdt,H=Kdt;d.subtract(M,I,W),d.normalize(W,H);let X=d.dot(P,H);if(X>=0){e._zoomMouseStart.x=-1;return}let $=Math.acos(-X),ae=d.magnitude(I),se=d.magnitude(M),he=ae-_,ge=d.magnitude(W),le=Math.asin(O.clamp(ge/se*Math.sin($),-1,1)),me=Math.asin(O.clamp(he/se*Math.sin($),-1,1)),Me=le-me+$,Ge=Wdt;d.normalize(I,Ge);let De=qdt;De=d.cross(H,Ge,De),De=d.normalize(De,De),d.normalize(d.cross(Ge,De,Y0),V),d.multiplyByScalar(d.normalize(U,Y0),d.magnitude(U)-_,U),d.normalize(I,I),d.multiplyByScalar(I,he,I);let ke=$dt;d.multiplyByScalar(d.add(d.multiplyByScalar(Ge,Math.cos(Me)-1,cye),d.multiplyByScalar(V,Math.sin(Me),lye),Y0),he,ke),d.add(I,ke,I),d.normalize(U,Ge),d.normalize(d.cross(Ge,De,Y0),V);let He=Zdt;d.multiplyByScalar(d.add(d.multiplyByScalar(Ge,Math.cos(Me)-1,cye),d.multiplyByScalar(V,Math.sin(Me),lye),Y0),d.magnitude(U),He),d.add(U,He,U),d.clone(I,x.position),d.normalize(d.subtract(U,I,Y0),x.direction),d.clone(x.direction,x.direction),d.cross(x.direction,x.up,x.right),d.cross(x.right,x.direction,x.up),x.setView(a7);return}else{let I=d.normalize(y,zdt),M=d.normalize(e._zoomWorldPosition,Vdt),B=d.dot(M,I);if(B>0&&B<1){let U=O.acosClamped(B),V=d.cross(M,I,Hdt),W=Math.abs(U)>O.toRadians(20)?x.positionCartographic.height*.75:x.positionCartographic.height-_,H=_/W;x.rotate(V,U*H)}}}}e._rotatingZoom=!R}if(!S&&R||A){let P,L=Yi.worldToWindowCoordinates(b,e._zoomWorldPosition,Fdt);T!==J.COLUMBUS_VIEW&&k.equals(t,e._zoomMouseStart)&&c(L)?P=x.getPickRay(L,zV):P=x.getPickRay(t,zV);let F=P.direction;(T===J.COLUMBUS_VIEW||T===J.SCENE2D)&&d.fromElements(F.y,F.z,F.x,F),x.move(F,_),e._zoomingOnVector=!0}else x.zoomIn(_);e._cameraUnderground||x.setView(a7)}var Qdt=new mn,eht=new mn,tht=new d;function nht(e,t,n){let o=e._scene.camera,r=o.getPickRay(n.startPosition,Qdt).origin,s=o.getPickRay(n.endPosition,eht).origin;r=d.fromElements(r.y,r.z,r.x,r),s=d.fromElements(s.y,s.z,s.x,s);let a=d.subtract(r,s,tht),l=d.magnitude(a);l>0&&(d.normalize(a,a),o.move(a,l))}function uye(e,t,n){c(n.distance)&&(n=n.distance);let o=e._scene.camera;p7(e,t,n,e.zoomFactor,o.getMagnitude())}var iht=new k,oht=new k;function fye(e,t,n){if(c(n.angleAndHeight)){rht(e,t,n.angleAndHeight);return}let i=e._scene,o=i.camera,r=i.canvas,s=r.clientWidth,a=r.clientHeight,l=iht;l.x=2/s*n.startPosition.x-1,l.y=2/a*(a-n.startPosition.y)-1,l=k.normalize(l,l);let u=oht;u.x=2/s*n.endPosition.x-1,u.y=2/a*(a-n.endPosition.y)-1,u=k.normalize(u,u);let f=O.acosClamped(l.x);l.y<0&&(f=O.TWO_PI-f);let h=O.acosClamped(u.x);u.y<0&&(h=O.TWO_PI-h);let m=h-f;o.twistRight(m)}function rht(e,t,n){let i=e._rotateFactor*e._rotateRateRangeAdjustment;i>e._maximumRotateRate&&(i=e._maximumRotateRate),i<e._minimumRotateRate&&(i=e._minimumRotateRate);let o=e._scene,r=o.camera,s=o.canvas,a=(n.endPosition.x-n.startPosition.x)/s.clientWidth;a=Math.min(a,e.maximumMovementRatio);let l=i*a*Math.PI*4;r.twistRight(l)}function sht(e){let t=e._scene.mapMode2D===fu.ROTATE;N.equals(N.IDENTITY,e._scene.camera.transform)?(Lc(e,e.enableTranslate,e.translateEventTypes,nht,e.inertiaTranslate,"_lastInertiaTranslateMovement"),Lc(e,e.enableZoom,e.zoomEventTypes,uye,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&Lc(e,e.enableRotate,e.tiltEventTypes,fye,e.inertiaSpin,"_lastInertiaTiltMovement")):(Lc(e,e.enableZoom,e.zoomEventTypes,uye,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&Lc(e,e.enableRotate,e.translateEventTypes,fye,e.inertiaSpin,"_lastInertiaSpinMovement"))}var xye=new mn,aht=new d,cht=new d;function Zp(e,t,n){let i=e._scene,o=e._globe,r=i.camera,s;if(i.pickPositionSupported&&(s=i.pickPositionWorldCoordinates(t,aht)),!c(o))return d.clone(s,n);let a=!e._cameraUnderground,l=r.getPickRay(t,xye),u=o.pickWorldCoordinates(l,i,a,cht),f=c(s)?d.distance(s,r.positionWC):Number.POSITIVE_INFINITY,h=c(u)?d.distance(u,r.positionWC):Number.POSITIVE_INFINITY;return f<h?d.clone(s,n):d.clone(u,n)}var lht=new re;function YV(e){let t=e._ellipsoid,n=e._scene,i=n.camera,o=n.mode,r=0;if(o===J.SCENE3D){let l=t.cartesianToCartographic(i.position,lht);c(l)&&(r=l.height)}else r=i.position.z;let s=g(e._scene.globeHeight,0);return Math.abs(s-r)}var uht=new d;function Tye(e,t){let n=t.origin,i=t.direction,o=YV(e),r=d.normalize(n,uht),s=Math.abs(d.dot(r,i));return s=Math.max(s,.5)*2,o*s}function Cye(e,t,n,i){let o=d.distance(t.origin,n),r=YV(e),s=O.clamp(r*5,e._minimumUndergroundPickDistance,e._maximumUndergroundPickDistance);return o>s&&(o=Math.min(o,r/5),o=Math.max(o,100)),mn.getPoint(t,o,i)}function Eye(e,t,n,i){let o;return c(n)?(o=d.distance(t.origin,n),o>e._maximumUndergroundPickDistance&&(o=YV(e))):o=YV(e),mn.getPoint(t,o,i)}var fht=new k;function wye(e,t){let n=t.endPosition,i=k.subtract(t.endPosition,t.startPosition,fht),o=e._strafeEndMousePosition;k.add(o,i,o),t.endPosition=o,_7(e,t,e._strafeStartPosition),t.endPosition=n}var dye=new mn,dht=new mn,c7=new d,hht=new d,mht=new d,pht=new d,_ht=new on(d.UNIT_X,0),ght=new k,yht=new k;function bht(e,t,n){if(d.equals(t,e._translateMousePosition)||(e._looking=!1),d.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking){pu(e,t,n);return}if(e._strafing){wye(e,n);return}let o=e._scene.camera,r=e._cameraUnderground,s=k.clone(n.startPosition,ght),a=k.clone(n.endPosition,yht),l=o.getPickRay(s,dye),u=d.clone(d.ZERO,pht),f=d.UNIT_X,h;if(o.position.z<e._minimumPickingTerrainHeight&&(h=Zp(e,s,c7),c(h)&&(u.x=h.x)),r||u.x>o.position.z&&c(h)){let S=h;r&&(S=Eye(e,l,h,c7)),k.clone(t,e._strafeMousePosition),k.clone(t,e._strafeEndMousePosition),d.clone(S,e._strafeStartPosition),e._strafing=!0,_7(e,n,e._strafeStartPosition);return}let m=on.fromPointNormal(u,f,_ht);l=o.getPickRay(s,dye);let p=Yn.rayPlane(l,m,c7),_=o.getPickRay(a,dht),b=Yn.rayPlane(_,m,hht);if(!c(p)||!c(b)){e._looking=!0,pu(e,t,n),k.clone(t,e._translateMousePosition);return}let x=d.subtract(p,b,mht),T=x.x;x.x=x.y,x.y=x.z,x.z=T;let E=d.magnitude(x);E>O.EPSILON6&&(d.normalize(x,x),o.move(x,E))}var Sye=new k,GV=new mn,jV=new d,xht=new d,Aye=new N,Tht=new N,Cht=new d,Eht=new on(d.UNIT_X,0),l7=new d,d7=new re,vye=new N,wht=new ve,Sht=new q,WV=new d;function Aht(e,t,n){if(c(n.angleAndHeight)&&(n=n.angleAndHeight),k.equals(t,e._tiltCenterMousePosition)||(e._tiltCVOffMap=!1,e._looking=!1),e._looking){pu(e,t,n);return}let o=e._scene.camera;e._tiltCVOffMap||!e.onMap()||Math.abs(o.position.z)>e._minimumPickingTerrainHeight?(e._tiltCVOffMap=!0,vht(e,t,n)):Dht(e,t,n)}function vht(e,t,n){let i=e._scene,o=i.camera,r=i.canvas,s=Sye;s.x=r.clientWidth/2,s.y=r.clientHeight/2;let a=o.getPickRay(s,GV),l=d.UNIT_X,u=a.origin,f=a.direction,h,m=d.dot(l,f);if(Math.abs(m)>O.EPSILON6&&(h=-d.dot(l,u)/m),!c(h)||h<=0){e._looking=!0,pu(e,t,n),k.clone(t,e._tiltCenterMousePosition);return}let p=d.multiplyByScalar(f,h,jV);d.add(u,p,p);let _=i.mapProjection,b=_.ellipsoid;d.fromElements(p.y,p.z,p.x,p);let x=_.unproject(p,d7);b.cartographicToCartesian(x,p);let T=Lt.eastNorthUpToFixedFrame(p,b,Aye),E=e._globe,S=e._ellipsoid;e._globe=void 0,e._ellipsoid=Z.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let A=N.clone(o.transform,vye);o._setTransform(T),mu(e,t,n,d.UNIT_Z),o._setTransform(A),e._globe=E,e._ellipsoid=S;let v=S.maximumRadius;e._rotateFactor=1/v,e._rotateRateRangeAdjustment=v}function Dht(e,t,n){let i=e._scene,o=i.camera,r=e._cameraUnderground,s,a,l=d.UNIT_X;if(k.equals(t,e._tiltCenterMousePosition))s=d.clone(e._tiltCenter,jV);else{if(o.position.z<e._minimumPickingTerrainHeight&&(s=Zp(e,t,jV)),!c(s)){a=o.getPickRay(t,GV);let y=a.origin,I=a.direction,M,B=d.dot(l,I);if(Math.abs(B)>O.EPSILON6&&(M=-d.dot(l,y)/B),!c(M)||M<=0){e._looking=!0,pu(e,t,n),k.clone(t,e._tiltCenterMousePosition);return}s=d.multiplyByScalar(I,M,jV),d.add(y,s,s)}r&&(c(a)||(a=o.getPickRay(t,GV)),Cye(e,a,s,s)),k.clone(t,e._tiltCenterMousePosition),d.clone(s,e._tiltCenter)}let u=i.canvas,f=Sye;f.x=u.clientWidth/2,f.y=e._tiltCenterMousePosition.y,a=o.getPickRay(f,GV);let h=d.clone(d.ZERO,Cht);h.x=s.x;let m=on.fromPointNormal(h,l,Eht),p=Yn.rayPlane(a,m,xht),_=o._projection,b=_.ellipsoid;d.fromElements(s.y,s.z,s.x,s);let x=_.unproject(s,d7);b.cartographicToCartesian(x,s);let T=Lt.eastNorthUpToFixedFrame(s,b,Aye),E;c(p)?(d.fromElements(p.y,p.z,p.x,p),x=_.unproject(p,d7),b.cartographicToCartesian(x,p),E=Lt.eastNorthUpToFixedFrame(p,b,Tht)):E=T;let S=e._globe,A=e._ellipsoid;e._globe=void 0,e._ellipsoid=Z.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let v=d.UNIT_Z,D=N.clone(o.transform,vye);o._setTransform(T);let R=d.cross(d.UNIT_Z,d.normalize(o.position,l7),l7),P=d.dot(o.right,R);if(mu(e,t,n,v,!1,!0),o._setTransform(E),P<0){let y=n.startPosition.y-n.endPosition.y;(r&&y<0||!r&&y>0)&&(v=void 0);let I=o.constrainedAxis;o.constrainedAxis=void 0,mu(e,t,n,v,!0,!1),o.constrainedAxis=I}else mu(e,t,n,v,!0,!1);if(c(o.constrainedAxis)){let y=d.cross(o.direction,o.constrainedAxis,WV);d.equalsEpsilon(y,d.ZERO,O.EPSILON6)||(d.dot(y,o.right)<0&&d.negate(y,y),d.cross(y,o.direction,o.up),d.cross(o.direction,o.up,o.right),d.normalize(o.up,o.up),d.normalize(o.right,o.right))}o._setTransform(D),e._globe=S,e._ellipsoid=A;let L=A.maximumRadius;e._rotateFactor=1/L,e._rotateRateRangeAdjustment=L;let F=d.clone(o.positionWC,l7);if(e.enableCollisionDetection&&b7(e,!0),!d.equals(o.positionWC,F)){o._setTransform(E),o.worldToCameraCoordinatesPoint(F,F);let y=d.magnitudeSquared(F);d.magnitudeSquared(o.position)>y&&(d.normalize(o.position,o.position),d.multiplyByScalar(o.position,Math.sqrt(y),o.position));let I=d.angleBetween(F,o.position),M=d.cross(F,o.position,F);d.normalize(M,M);let B=ve.fromAxisAngle(M,I,wht),U=q.fromQuaternion(B,Sht);q.multiplyByVector(U,o.direction,o.direction),q.multiplyByVector(U,o.up,o.up),d.cross(o.direction,o.up,o.right),d.cross(o.right,o.direction,o.up),o._setTransform(D)}}var Dye=new k,Iye=new mn,Oye=new d;function Iht(e,t,n){c(n.distance)&&(n=n.distance);let i=e._scene,o=i.camera,r=i.canvas,s=e._cameraUnderground,a;s?a=t:(a=Dye,a.x=r.clientWidth/2,a.y=r.clientHeight/2);let l=o.getPickRay(a,Iye),u=l.origin,f=l.direction,h=o.position.z,m;h<e._minimumPickingTerrainHeight&&(m=Zp(e,a,Oye));let p;if(c(m)&&(p=d.distance(u,m)),s){let _=Tye(e,l,h);c(p)?p=Math.min(p,_):p=_}if(!c(p)){let _=d.UNIT_X;p=-d.dot(_,u)/d.dot(_,f)}p7(e,t,n,e.zoomFactor,p)}function Oht(e){let n=e._scene.camera;if(!N.equals(N.IDENTITY,n.transform))Lc(e,e.enableRotate,e.rotateEventTypes,mu,e.inertiaSpin,"_lastInertiaSpinMovement"),Lc(e,e.enableZoom,e.zoomEventTypes,Rye,e.inertiaZoom,"_lastInertiaZoomMovement");else{let i=e._tweens;if(e._aggregator.anyButtonDown&&i.removeAll(),Lc(e,e.enableTilt,e.tiltEventTypes,Aht,e.inertiaSpin,"_lastInertiaTiltMovement"),Lc(e,e.enableTranslate,e.translateEventTypes,bht,e.inertiaTranslate,"_lastInertiaTranslateMovement"),Lc(e,e.enableZoom,e.zoomEventTypes,Iht,e.inertiaZoom,"_lastInertiaZoomMovement"),Lc(e,e.enableLook,e.lookEventTypes,pu),!e._aggregator.anyButtonDown&&!i.contains(e._tween)){let o=n.createCorrectPositionTween(e.bounceAnimationTime);c(o)&&(e._tween=i.add(o))}i.update()}}var Pht=new mn,Rht=new on(d.UNIT_X,0),Mht=new d,Lht=new d;function _7(e,t,n){let i=e._scene,o=i.camera,r=o.getPickRay(t.endPosition,Pht),s=d.clone(o.direction,Lht);i.mode===J.COLUMBUS_VIEW&&d.fromElements(s.z,s.x,s.y,s);let a=on.fromPointNormal(n,s,Rht),l=Yn.rayPlane(r,a,Mht);c(l)&&(s=d.subtract(n,l,s),i.mode===J.COLUMBUS_VIEW&&d.fromElements(s.y,s.z,s.x,s),d.add(o.position,s,o.position))}var hye=new d,Pye=new re,h7=new d,m7=new Z,Nht=new d,Fht=new d,Bht=new d;function kht(e,t,n){let o=e._scene.camera,r=e._cameraUnderground,s=e._ellipsoid;if(!N.equals(o.transform,N.IDENTITY)){mu(e,t,n);return}let a,l,u=s.geodeticSurfaceNormal(o.position,Nht);if(k.equals(t,e._rotateMousePosition)){if(e._looking)pu(e,t,n,u);else if(e._rotating)mu(e,t,n);else if(e._strafing)wye(e,n);else{if(d.magnitude(o.position)<d.magnitude(e._rotateStartPosition))return;a=d.magnitude(e._rotateStartPosition),l=h7,l.x=l.y=l.z=a,s=Z.fromCartesian3(l,m7),f7(e,t,n,s)}return}e._looking=!1,e._rotating=!1,e._strafing=!1;let f=s.cartesianToCartographic(o.positionWC,Pye).height,h=e._globe;if(c(h)&&f<e._minimumPickingTerrainHeight){let m=Zp(e,n.startPosition,Bht);if(c(m)){let p=!1,_=o.getPickRay(n.startPosition,xye);if(r)p=!0,Eye(e,_,m,m);else{let b=s.geodeticSurfaceNormal(m,Fht);Math.abs(d.dot(_.direction,b))<.05?p=!0:p=d.magnitude(o.position)<d.magnitude(m)}p?(k.clone(t,e._strafeEndMousePosition),d.clone(m,e._strafeStartPosition),e._strafing=!0,_7(e,n,e._strafeStartPosition)):(a=d.magnitude(m),l=h7,l.x=l.y=l.z=a,s=Z.fromCartesian3(l,m7),f7(e,t,n,s),d.clone(m,e._rotateStartPosition))}else e._looking=!0,pu(e,t,n,u)}else c(o.pickEllipsoid(n.startPosition,e._ellipsoid,hye))?(f7(e,t,n,e._ellipsoid),d.clone(hye,e._rotateStartPosition)):f>e._minimumTrackBallHeight?(e._rotating=!0,mu(e,t,n)):(e._looking=!0,pu(e,t,n,u));k.clone(t,e._rotateMousePosition)}function mu(e,t,n,i,o,r){o=g(o,!1),r=g(r,!1);let s=e._scene,a=s.camera,l=s.canvas,u=a.constrainedAxis;c(i)&&(a.constrainedAxis=i);let f=d.magnitude(a.position),h=e._rotateFactor*(f-e._rotateRateRangeAdjustment);h>e._maximumRotateRate&&(h=e._maximumRotateRate),h<e._minimumRotateRate&&(h=e._minimumRotateRate);let m=(n.startPosition.x-n.endPosition.x)/l.clientWidth,p=(n.startPosition.y-n.endPosition.y)/l.clientHeight;m=Math.min(m,e.maximumMovementRatio),p=Math.min(p,e.maximumMovementRatio);let _=h*m*Math.PI*2,b=h*p*Math.PI;if(c(i)&&c(e.maximumTiltAngle)){let x=e.maximumTiltAngle,T=d.dot(a.direction,i),E=Math.PI-Math.acos(T)+b;E>x&&(b-=E-x)}o||a.rotateRight(_),r||a.rotateUp(b),a.constrainedAxis=u}var u7=ee.clone(ee.UNIT_W),mye=ee.clone(ee.UNIT_W),VV=new d,bw=new d,HV=new d,pye=new d,Uht=new k,zht=new k,Vht=new k,Hht=new k,Ght=new mn;function f7(e,t,n,i){let o=e._scene,r=o.camera,s=k.clone(n.startPosition,Uht),a=k.clone(n.endPosition,zht),l=i.cartesianToCartographic(r.positionWC,Pye).height,u,f;if(!n.inertiaEnabled&&l<e._minimumPickingTerrainHeight&&(u=d.clone(e._panLastWorldPosition,u7),!c(e._globe)&&!k.equalsEpsilon(s,e._panLastMousePosition)&&(u=Zp(e,s,u7)),!c(e._globe)&&c(u))){let h=d.subtract(u,r.positionWC,bw),m=d.multiplyByScalar(r.directionWC,d.dot(r.directionWC,h),bw),p=d.magnitude(m),_=r.frustum.getPixelDimensions(o.drawingBufferWidth,o.drawingBufferHeight,p,o.pixelRatio,Hht),b=k.subtract(a,s,Vht),x=d.multiplyByScalar(r.rightWC,b.x*_.x,bw),T=d.normalize(r.positionWC,bye),E=r.getPickRay(a,Ght).direction,S=d.subtract(E,d.projectVector(E,r.rightWC,HV),HV),A=d.angleBetween(S,r.directionWC),v=1;c(r.frustum.fov)&&(v=Math.max(Math.tan(A),.1));let D=Math.abs(d.dot(r.directionWC,T)),R=-b.y*_.y*2/Math.sqrt(v)*(1-D),P=d.multiplyByScalar(E,R,HV);D=Math.abs(d.dot(r.upWC,T));let L=d.multiplyByScalar(r.upWC,-b.y*(1-D)*_.y,pye);f=d.add(u,x,mye),f=d.add(f,P,f),f=d.add(f,L,f),d.clone(f,e._panLastWorldPosition),k.clone(a,e._panLastMousePosition)}if((!c(u)||!c(f))&&(u=r.pickEllipsoid(s,i,u7),f=r.pickEllipsoid(a,i,mye)),!c(u)||!c(f)){e._rotating=!0,mu(e,t,n);return}if(u=r.worldToCameraCoordinates(u,u),f=r.worldToCameraCoordinates(f,f),c(r.constrainedAxis)){let h=r.constrainedAxis,m=d.mostOrthogonalAxis(h,VV);d.cross(m,h,m),d.normalize(m,m);let p=d.cross(h,m,bw),_=d.magnitude(u),b=d.dot(h,u),x=Math.acos(b/_),T=d.multiplyByScalar(h,b,HV);d.subtract(u,T,T),d.normalize(T,T);let E=d.magnitude(f),S=d.dot(h,f),A=Math.acos(S/E),v=d.multiplyByScalar(h,S,pye);d.subtract(f,v,v),d.normalize(v,v);let D=Math.acos(d.dot(T,m));d.dot(T,p)<0&&(D=O.TWO_PI-D);let R=Math.acos(d.dot(v,m));d.dot(v,p)<0&&(R=O.TWO_PI-R);let P=D-R,L;d.equalsEpsilon(h,r.position,O.EPSILON2)?L=r.right:L=d.cross(h,r.position,VV);let F=d.cross(h,L,VV),y=d.dot(F,d.subtract(u,h,bw)),I=d.dot(F,d.subtract(f,h,bw)),M;y>0&&I>0?M=A-x:y>0&&I<=0?d.dot(r.position,h)>0?M=-x-A:M=x+A:M=x-A,r.rotateRight(P),r.rotateUp(M)}else{d.normalize(u,u),d.normalize(f,f);let h=d.dot(u,f),m=d.cross(u,f,VV);if(h<1&&!d.equalsEpsilon(m,d.ZERO,O.EPSILON14)){let p=Math.acos(h);r.rotate(m,p)}}}var jht=new d,Wht=new re,_ye=0;function Rye(e,t,n){c(n.distance)&&(n=n.distance);let i=n.inertiaEnabled,o=e._ellipsoid,r=e._scene,s=r.camera,a=r.canvas,l=e._cameraUnderground,u;l?u=t:(u=Dye,u.x=a.clientWidth/2,u.y=a.clientHeight/2);let f=s.getPickRay(u,Iye),h,m=o.cartesianToCartographic(s.position,Wht).height,p=Math.abs(_ye)<e.minimumPickingTerrainDistanceWithInertia;(i?p:m<e._minimumPickingTerrainHeight)&&(h=Zp(e,u,Oye));let b;if(c(h)&&(b=d.distance(f.origin,h),_ye=b),l){let T=Tye(e,f,m);c(b)?b=Math.min(b,T):b=T}c(b)||(b=m);let x=d.normalize(s.position,jht);p7(e,t,n,e.zoomFactor,b,d.dot(x,s.direction))}var Mye=new k,qV=new mn,yI=new d,qht=new d,Lye=new N,Yht=new N,Nye=new N,Xht=new ve,Kht=new q,g7=new re,y7=new d;function $ht(e,t,n){let o=e._scene.camera;if(!N.equals(o.transform,N.IDENTITY))return;if(c(n.angleAndHeight)&&(n=n.angleAndHeight),k.equals(t,e._tiltCenterMousePosition)||(e._tiltOnEllipsoid=!1,e._looking=!1),e._looking){let a=e._ellipsoid.geodeticSurfaceNormal(o.position,y7);pu(e,t,n,a);return}let s=e._ellipsoid.cartesianToCartographic(o.position,g7);e._tiltOnEllipsoid||s.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,Jht(e,t,n)):Qht(e,t,n)}var Zht=new re;function Jht(e,t,n){let i=e._ellipsoid,o=e._scene,r=o.camera,s=e.minimumZoomDistance*.25,a=i.cartesianToCartographic(r.positionWC,Zht).height;if(a-s-1<O.EPSILON3&&n.endPosition.y-n.startPosition.y<0)return;let l=o.canvas,u=Mye;u.x=l.clientWidth/2,u.y=l.clientHeight/2;let f=r.getPickRay(u,qV),h,m=Yn.rayEllipsoid(f,i);if(c(m))h=mn.getPoint(f,m.start,yI);else if(a>e._minimumTrackBallHeight){let E=Yn.grazingAltitudeLocation(f,i);if(!c(E))return;let S=i.cartesianToCartographic(E,g7);S.height=0,h=i.cartographicToCartesian(S,yI)}else{e._looking=!0;let E=e._ellipsoid.geodeticSurfaceNormal(r.position,y7);pu(e,t,n,E),k.clone(t,e._tiltCenterMousePosition);return}let p=Lt.eastNorthUpToFixedFrame(h,i,Lye),_=e._globe,b=e._ellipsoid;e._globe=void 0,e._ellipsoid=Z.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let x=N.clone(r.transform,Nye);r._setTransform(p),mu(e,t,n,d.UNIT_Z),r._setTransform(x),e._globe=_,e._ellipsoid=b;let T=b.maximumRadius;e._rotateFactor=1/T,e._rotateRateRangeAdjustment=T}function Qht(e,t,n){let i=e._ellipsoid,o=e._scene,r=o.camera,s=e._cameraUnderground,a,l,u;if(k.equals(t,e._tiltCenterMousePosition))a=d.clone(e._tiltCenter,yI);else{if(a=Zp(e,t,yI),!c(a)){if(l=r.getPickRay(t,qV),u=Yn.rayEllipsoid(l,i),!c(u)){if(i.cartesianToCartographic(r.position,g7).height<=e._minimumTrackBallHeight){e._looking=!0;let I=e._ellipsoid.geodeticSurfaceNormal(r.position,y7);pu(e,t,n,I),k.clone(t,e._tiltCenterMousePosition)}return}a=mn.getPoint(l,u.start,yI)}s&&(c(l)||(l=r.getPickRay(t,qV)),Cye(e,l,a,a)),k.clone(t,e._tiltCenterMousePosition),d.clone(a,e._tiltCenter)}let f=o.canvas,h=Mye;h.x=f.clientWidth/2,h.y=e._tiltCenterMousePosition.y,l=r.getPickRay(h,qV);let m=d.magnitude(a),p=d.fromElements(m,m,m,h7),_=Z.fromCartesian3(p,m7);if(u=Yn.rayEllipsoid(l,_),!c(u))return;let b=d.magnitude(l.origin)>m?u.start:u.stop,x=mn.getPoint(l,b,qht),T=Lt.eastNorthUpToFixedFrame(a,i,Lye),E=Lt.eastNorthUpToFixedFrame(x,_,Yht),S=e._globe,A=e._ellipsoid;e._globe=void 0,e._ellipsoid=Z.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let v=d.UNIT_Z,D=N.clone(r.transform,Nye);r._setTransform(E);let R=d.cross(x,r.positionWC,WV);if(d.dot(r.rightWC,R)<0){let y=n.startPosition.y-n.endPosition.y;(s&&y<0||!s&&y>0)&&(v=void 0);let I=r.constrainedAxis;r.constrainedAxis=void 0,mu(e,t,n,v,!0,!1),r.constrainedAxis=I}else mu(e,t,n,v,!0,!1);if(r._setTransform(T),mu(e,t,n,v,!1,!0),c(r.constrainedAxis)){let y=d.cross(r.direction,r.constrainedAxis,WV);d.equalsEpsilon(y,d.ZERO,O.EPSILON6)||(d.dot(y,r.right)<0&&d.negate(y,y),d.cross(y,r.direction,r.up),d.cross(r.direction,r.up,r.right),d.normalize(r.up,r.up),d.normalize(r.right,r.right))}r._setTransform(D),e._globe=S,e._ellipsoid=A;let L=A.maximumRadius;e._rotateFactor=1/L,e._rotateRateRangeAdjustment=L;let F=d.clone(r.positionWC,WV);if(e.enableCollisionDetection&&b7(e,!0),!d.equals(r.positionWC,F)){r._setTransform(E),r.worldToCameraCoordinatesPoint(F,F);let y=d.magnitudeSquared(F);d.magnitudeSquared(r.position)>y&&(d.normalize(r.position,r.position),d.multiplyByScalar(r.position,Math.sqrt(y),r.position));let I=d.angleBetween(F,r.position),M=d.cross(F,r.position,F);d.normalize(M,M);let B=ve.fromAxisAngle(M,I,Xht),U=q.fromQuaternion(B,Kht);q.multiplyByVector(U,r.direction,r.direction),q.multiplyByVector(U,r.up,r.up),d.cross(r.direction,r.up,r.right),d.cross(r.right,r.direction,r.up),r._setTransform(D)}}var emt=new k,tmt=new k,gye=new mn,yye=new mn,nmt=new d,imt=new d;function pu(e,t,n,i){let r=e._scene.camera,s=emt;s.x=n.startPosition.x,s.y=0;let a=tmt;a.x=n.endPosition.x,a.y=0;let l=r.getPickRay(s,gye),u=r.getPickRay(a,yye),f=0,h,m;r.frustum instanceof an?(h=l.origin,m=u.origin,d.add(r.direction,h,h),d.add(r.direction,m,m),d.subtract(h,r.position,h),d.subtract(m,r.position,m),d.normalize(h,h),d.normalize(m,m)):(h=l.direction,m=u.direction);let p=d.dot(h,m);p<1&&(f=Math.acos(p)),f=n.startPosition.x>n.endPosition.x?-f:f;let _=e._horizontalRotationAxis;if(c(i)?r.look(i,-f):c(_)?r.look(_,-f):r.lookLeft(f),s.x=0,s.y=n.startPosition.y,a.x=0,a.y=n.endPosition.y,l=r.getPickRay(s,gye),u=r.getPickRay(a,yye),f=0,r.frustum instanceof an?(h=l.origin,m=u.origin,d.add(r.direction,h,h),d.add(r.direction,m,m),d.subtract(h,r.position,h),d.subtract(m,r.position,m),d.normalize(h,h),d.normalize(m,m)):(h=l.direction,m=u.direction),p=d.dot(h,m),p<1&&(f=Math.acos(p)),f=n.startPosition.y>n.endPosition.y?-f:f,i=g(i,_),c(i)){let b=r.direction,x=d.negate(i,nmt),T=d.equalsEpsilon(b,i,O.EPSILON2),E=d.equalsEpsilon(b,x,O.EPSILON2);if(!T&&!E){p=d.dot(b,i);let S=O.acosClamped(p);f>0&&f>S&&(f=S-O.EPSILON4),p=d.dot(b,x),S=O.acosClamped(p),f<0&&-f>S&&(f=-S+O.EPSILON4);let A=d.cross(i,b,imt);r.look(A,f)}else(T&&f<0||E&&f>0)&&r.look(r.right,-f)}else r.lookUp(f)}function omt(e){Lc(e,e.enableRotate,e.rotateEventTypes,kht,e.inertiaSpin,"_lastInertiaSpinMovement"),Lc(e,e.enableZoom,e.zoomEventTypes,Rye,e.inertiaZoom,"_lastInertiaZoomMovement"),Lc(e,e.enableTilt,e.tiltEventTypes,$ht,e.inertiaSpin,"_lastInertiaTiltMovement"),Lc(e,e.enableLook,e.lookEventTypes,pu)}var rmt=new N,smt=new re;function b7(e,t){e._adjustedHeightForTerrain=!0;let n=e._scene,i=n.mode;if(i===J.SCENE2D||i===J.MORPHING)return;let o=n.camera,r=g(n.ellipsoid,Z.WGS84),s=n.mapProjection,a,l;N.equals(o.transform,N.IDENTITY)||(a=N.clone(o.transform,rmt),l=d.magnitude(o.position),o._setTransform(N.IDENTITY));let u=smt;i===J.SCENE3D?r.cartesianToCartographic(o.position,u):s.unproject(o.position,u);let f=!1;if(u.height<e._minimumCollisionTerrainHeight){let h=e._scene.globeHeight;if(c(h)){let m=h+e.minimumZoomDistance,p=h-e._lastGlobeHeight,_=p/e._lastGlobeHeight;u.height<m&&(t||Math.abs(_)<=.1)&&(u.height=m,i===J.SCENE3D?r.cartographicToCartesian(u,o.position):s.project(u,o.position),f=!0),t||Math.abs(_)<=.1?e._lastGlobeHeight=h:e._lastGlobeHeight+=p*.1}}c(a)&&(o._setTransform(a),f&&(d.normalize(o.position,o.position),d.negate(o.position,o.direction),d.multiplyByScalar(o.position,Math.max(l,e.minimumZoomDistance),o.position),d.normalize(o.direction,o.direction),d.cross(o.direction,o.up,o.right),d.cross(o.right,o.direction,o.up)))}bI.prototype.onMap=function(){let e=this._scene,t=e.mode,n=e.camera;return t===J.COLUMBUS_VIEW?Math.abs(n.position.x)-this._maxCoord.x<0&&Math.abs(n.position.y)-this._maxCoord.y<0:!0};var amt=new d,cmt=new d;bI.prototype.update=function(){let e=this._scene,{camera:t,globe:n,mode:i}=e;N.equals(t.transform,N.IDENTITY)?(this._globe=n,this._ellipsoid=g(e.ellipsoid,Z.default)):(this._globe=void 0,this._ellipsoid=Z.UNIT_SPHERE);let{verticalExaggeration:o,verticalExaggerationRelativeHeight:r}=e;this._minimumCollisionTerrainHeight=Cr.getHeight(this.minimumCollisionTerrainHeight,o,r),this._minimumPickingTerrainHeight=Cr.getHeight(this.minimumPickingTerrainHeight,o,r),this._minimumTrackBallHeight=Cr.getHeight(this.minimumTrackBallHeight,o,r),this._cameraUnderground=e.cameraUnderground&&c(this._globe);let s=this._ellipsoid.maximumRadius;this._rotateFactor=1/s,this._rotateRateRangeAdjustment=s,this._adjustedHeightForTerrain=!1;let a=d.clone(t.positionWC,amt),l=d.clone(t.directionWC,cmt);if(i===J.SCENE2D?sht(this):i===J.COLUMBUS_VIEW?(this._horizontalRotationAxis=d.UNIT_Z,Oht(this)):i===J.SCENE3D&&(this._horizontalRotationAxis=void 0,omt(this)),this.enableCollisionDetection&&!this._adjustedHeightForTerrain){let u=!d.equals(a,t.positionWC)||!d.equals(l,t.directionWC);b7(this,u)}this._aggregator.reset()};bI.prototype.isDestroyed=function(){return!1};bI.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),ue(this)};var XV=bI;var KV=`uniform sampler2D colorTexture;
| uniform sampler2D colorTexture2;
|
| uniform vec2 center;
| uniform float radius;
|
| in vec2 v_textureCoordinates;
|
| void main()
| {
| vec4 color0 = texture(colorTexture, v_textureCoordinates);
| vec4 color1 = texture(colorTexture2, v_textureCoordinates);
|
| float x = length(gl_FragCoord.xy - center) / radius;
| float t = smoothstep(0.5, 0.8, x);
| out_FragColor = mix(color0 + color1, color1, t);
| }
| `;var $V=`uniform sampler2D colorTexture;
|
| uniform float avgLuminance;
| uniform float threshold;
| uniform float offset;
|
| in vec2 v_textureCoordinates;
|
| float key(float avg)
| {
| float guess = 1.5 - (1.5 / (avg * 0.1 + 1.0));
| return max(0.0, guess) + 0.1;
| }
|
| // See section 9. "The bright-pass filter" of Realtime HDR Rendering
| // http://www.cg.tuwien.ac.at/research/publications/2007/Luksch_2007_RHR/Luksch_2007_RHR-RealtimeHDR%20.pdf
|
| void main()
| {
| vec4 color = texture(colorTexture, v_textureCoordinates);
| vec3 xyz = czm_RGBToXYZ(color.rgb);
| float luminance = xyz.r;
|
| float scaledLum = key(avgLuminance) * luminance / avgLuminance;
| float brightLum = max(scaledLum - threshold, 0.0);
| float brightness = brightLum / (offset + brightLum);
|
| xyz.r = brightness;
| out_FragColor = vec4(czm_XYZToRGB(xyz), 1.0);
| }
| `;function Jp(){this._sceneFramebuffer=new fw;let e=.125,t=new Array(6);t[0]=new so({fragmentShader:du,textureScale:e,forcePowerOfTwo:!0,sampleMode:Sf.LINEAR});let n=t[1]=new so({fragmentShader:$V,uniforms:{avgLuminance:.5,threshold:.25,offset:.1},textureScale:e,forcePowerOfTwo:!0}),i=this;this._delta=1,this._sigma=2,this._blurStep=new k,t[2]=new so({fragmentShader:z0,uniforms:{step:function(){return i._blurStep.x=i._blurStep.y=1/n.outputTexture.width,i._blurStep},delta:function(){return i._delta},sigma:function(){return i._sigma},direction:0},textureScale:e,forcePowerOfTwo:!0}),t[3]=new so({fragmentShader:z0,uniforms:{step:function(){return i._blurStep.x=i._blurStep.y=1/n.outputTexture.width,i._blurStep},delta:function(){return i._delta},sigma:function(){return i._sigma},direction:1},textureScale:e,forcePowerOfTwo:!0}),t[4]=new so({fragmentShader:du,sampleMode:Sf.LINEAR}),this._uCenter=new k,this._uRadius=void 0,t[5]=new so({fragmentShader:KV,uniforms:{center:function(){return i._uCenter},radius:function(){return i._uRadius},colorTexture2:function(){return i._sceneFramebuffer.framebuffer.getColorTexture(0)}}}),this._stages=new bl({stages:t});let o=new pw(this),r=t.length;for(let s=0;s<r;++s)t[s]._textureCache=o;this._textureCache=o,this.length=t.length}Jp.prototype.get=function(e){return this._stages.get(e)};Jp.prototype.getStageByName=function(e){let t=this._stages.length;for(let n=0;n<t;++n){let i=this._stages.get(n);if(i.name===e)return i}};var lmt=new ee,Fye=new k,umt=new k,Bye=new N;function fmt(e,t,n){let i=t.uniformState,o=i.sunPositionWC,r=i.view,s=i.viewProjection,a=i.projection,l=N.computeViewportTransformation(n,0,1,Bye),u=N.multiplyByPoint(r,o,lmt),f=Lt.pointToGLWindowCoordinates(s,l,o,Fye);u.x+=O.SOLAR_RADIUS;let h=Lt.pointToGLWindowCoordinates(a,l,u,u),m=k.magnitude(k.subtract(h,f,h))*30*2,p=umt;p.x=m,p.y=m,e._uCenter=k.clone(f,e._uCenter),e._uRadius=Math.max(p.x,p.y)*.15;let _=t.drawingBufferWidth,b=t.drawingBufferHeight,x=e._stages,T=x.get(0),E=T.outputTexture.width,S=T.outputTexture.height,A=new je;A.width=E,A.height=S,l=N.computeViewportTransformation(A,0,1,Bye),f=Lt.pointToGLWindowCoordinates(s,l,o,Fye),p.x*=E/_,p.y*=S/b;let v=T.scissorRectangle;v.x=Math.max(f.x-p.x*.5,0),v.y=Math.max(f.y-p.y*.5,0),v.width=Math.min(p.x,_),v.height=Math.min(p.y,b);for(let D=1;D<4;++D)je.clone(v,x.get(D).scissorRectangle)}Jp.prototype.clear=function(e,t,n){this._sceneFramebuffer.clear(e,t,n),this._textureCache.clear(e)};Jp.prototype.update=function(e){let t=e.context,n=e.viewport,i=this._sceneFramebuffer;i.update(t,n);let o=i.framebuffer;return this._textureCache.update(t),this._stages.update(t,!1),fmt(this,t,n),o};Jp.prototype.execute=function(e){let t=this._sceneFramebuffer.framebuffer.getColorTexture(0),n=this._stages,i=n.length;n.get(0).execute(e,t);for(let o=1;o<i;++o)n.get(o).execute(e,n.get(o-1).outputTexture)};Jp.prototype.copy=function(e,t){if(!c(this._copyColorCommand)){let n=this;this._copyColorCommand=e.createViewportQuadCommand(du,{uniformMap:{colorTexture:function(){return n._stages.get(n._stages.length-1).outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)};Jp.prototype.isDestroyed=function(){return!1};Jp.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),ue(this)};var ZV=Jp;function kye(){this._cachedShowFrustumsShaders={}}function dmt(e){let t={},n=e.vertexAttributes;for(let i in n)n.hasOwnProperty(i)&&(t[i]=n[i].index);return t}function hmt(e,t){let n=e.context,i=t,o=i.fragmentShaderSource.clone(),r=[];o.sources=o.sources.map(function(f){f=Be.replaceMain(f,"czm_Debug_main");let h=/out_FragData_(\d+)/g,m;for(;(m=h.exec(f))!==null;)r.indexOf(m[1])===-1&&r.push(m[1]);return f});let s=r.length,a="";a+=`uniform vec3 debugShowCommandsColor;
| `,a+=`uniform vec3 debugShowFrustumsColor;
| `,a+=`void main()
| {
| czm_Debug_main();
| `;let l;if(s>0)for(l=0;l<s;++l)a+=` out_FragData_${r[l]}.rgb *= debugShowCommandsColor;
| `,a+=` out_FragData_${r[l]}.rgb *= debugShowFrustumsColor;
| `;else a+=` out_FragColor.rgb *= debugShowCommandsColor;
| `,a+=` out_FragColor.rgb *= debugShowFrustumsColor;
| `;a+="}",o.sources.push(a);let u=dmt(i);return en.fromCache({context:n,vertexShaderSource:i.vertexShaderSource,fragmentShaderSource:o,attributeLocations:u})}var xI=new z;function mmt(e,t){let n;return c(t.uniformMap)?n=t.uniformMap:n={},c(n.debugShowCommandsColor)||c(n.debugShowFrustumsColor)||(n.debugShowCommandsColor=function(){return e.debugShowCommands?(c(t._debugColor)||(t._debugColor=z.fromRandom()),t._debugColor):z.WHITE},n.debugShowFrustumsColor=function(){return e.debugShowFrustums?(xI.red=t.debugOverlappingFrustums&1?1:0,xI.green=t.debugOverlappingFrustums&2?1:0,xI.blue=t.debugOverlappingFrustums&4?1:0,xI.alpha=1,xI):z.WHITE}),n}var pmt=new Ke;kye.prototype.executeDebugShowFrustumsCommand=function(e,t,n){let i=t.shaderProgram.id,o=this._cachedShowFrustumsShaders[i];c(o)||(o=hmt(e,t.shaderProgram),this._cachedShowFrustumsShaders[i]=o);let r=Ke.shallowClone(t,pmt);r.shaderProgram=o,r.uniformMap=mmt(e,t),r.execute(e.context,n)};var JV=kye;function X0(e,t,n){this._primitive=e,this._tileIndex=t,this._sampleIndex=n,this._metadata={},this._orientedBoundingBox=new wn}X0.fromKeyframeNode=function(e,t,n,i){C.typeOf.object("primitive",e),C.typeOf.number("tileIndex",t),C.typeOf.number("sampleIndex",n),C.typeOf.object("keyframeNode",i);let o=new X0(e,t,n),{spatialNode:r,metadata:s}=i;return o._metadata=_mt(e,s,n),o._orientedBoundingBox=ymt(e,r,n,o._orientedBoundingBox),o};function _mt(e,t,n){if(!c(t))return;let{names:i,types:o}=e.provider,r={};for(let s=0;s<i.length;s++){let a=i[s],l=Ct.getComponentCount(o[s]),u=t[s].slice(n*l,(n+1)*l);r[a]=u}return r}var Uye=new d,gmt=new d;function ymt(e,t,n,i){let o=t.dimensions,r=o.x*o.y,s=Math.floor(n/r),a=n-s*r,l=Math.floor(a/o.x),u=a-l*o.x,f=d.fromElements(u,l,s,Uye),h=d.divideComponents(d.subtract(f,e._paddingBefore,Uye),e.dimensions,gmt);return e._shape.computeOrientedBoundingBoxForSample(t,e.dimensions,h,i)}Object.defineProperties(X0.prototype,{metadata:{get:function(){return this._metadata}},primitive:{get:function(){return this._primitive}},sampleIndex:{get:function(){return this._sampleIndex}},tileIndex:{get:function(){return this._tileIndex}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox.clone()}}});X0.prototype.hasProperty=function(e){return c(this._metadata[e])};X0.prototype.getNames=function(){return Object.keys(this._metadata)};X0.prototype.getProperty=function(e){return this._metadata[e]};var QV=X0;var eH=`struct Ray {
| vec3 pos;
| vec3 dir;
| vec3 rawDir;
| };
|
| #if defined(JITTER)
| /**
| * Generate a pseudo-random value for a given 2D screen coordinate.
| * Similar to https://www.shadertoy.com/view/4djSRW with a modified hashscale.
| */
| float hash(vec2 p)
| {
| vec3 p3 = fract(vec3(p.xyx) * 50.0);
| p3 += dot(p3, p3.yzx + 19.19);
| return fract((p3.x + p3.y) * p3.z);
| }
| #endif
|
| float minComponent(in vec3 v) {
| return min(min(v.x, v.y), v.z);
| }
|
| float maxComponent(in vec3 v) {
| return max(max(v.x, v.y), v.z);
| }
|
| struct PointJacobianT {
| vec3 point;
| mat3 jacobianT;
| };
| `;var tH=`// See Intersection.glsl for the definition of intersectScene
| // See IntersectionUtils.glsl for the definition of nextIntersection
| // See convertUvToBox.glsl, convertUvToCylinder.glsl, or convertUvToEllipsoid.glsl
| // for the definition of convertUvToShapeUvSpace. The appropriate function is
| // selected based on the VoxelPrimitive shape type, and added to the shader in
| // Scene/VoxelRenderResources.js.
| // See Octree.glsl for the definitions of TraversalData, SampleData,
| // traverseOctreeFromBeginning, and traverseOctreeFromExisting
| // See Megatexture.glsl for the definition of accumulatePropertiesFromMegatexture
|
| #define STEP_COUNT_MAX 1000 // Harcoded value because GLSL doesn't like variable length loops
| #if defined(PICKING_VOXEL)
| #define ALPHA_ACCUM_MAX 0.1
| #else
| #define ALPHA_ACCUM_MAX 0.98 // Must be > 0.0 and <= 1.0
| #endif
|
| uniform mat3 u_transformDirectionViewToLocal;
| uniform vec3 u_cameraPositionUv;
| uniform float u_stepSize;
|
| #if defined(PICKING)
| uniform vec4 u_pickColor;
| #endif
|
| vec3 getSampleSize(in int level) {
| vec3 sampleCount = exp2(float(level)) * vec3(u_dimensions);
| vec3 sampleSizeUv = 1.0 / sampleCount;
| return scaleShapeUvToShapeSpace(sampleSizeUv);
| }
|
| #define MINIMUM_STEP_SCALAR (0.02)
| #define SHIFT_FRACTION (0.001)
|
| /**
| * Given a coordinate within a tile, and sample spacings along a ray through
| * the coordinate, find the distance to the points where the ray entered and
| * exited the voxel cell, along with the surface normals at those points.
| * The surface normals are returned in shape space coordinates.
| */
| RayShapeIntersection getVoxelIntersection(in vec3 tileUv, in vec3 sampleSizeAlongRay) {
| vec3 voxelCoord = tileUv * vec3(u_dimensions);
| vec3 directions = sign(sampleSizeAlongRay);
| vec3 positiveDirections = max(directions, 0.0);
| vec3 entryCoord = mix(ceil(voxelCoord), floor(voxelCoord), positiveDirections);
| vec3 exitCoord = entryCoord + directions;
|
| vec3 distanceFromEntry = -abs((entryCoord - voxelCoord) * sampleSizeAlongRay);
| float lastEntry = maxComponent(distanceFromEntry);
| bvec3 isLastEntry = equal(distanceFromEntry, vec3(lastEntry));
| vec3 entryNormal = -1.0 * vec3(isLastEntry) * directions;
| vec4 entry = vec4(entryNormal, lastEntry);
|
| vec3 distanceToExit = abs((exitCoord - voxelCoord) * sampleSizeAlongRay);
| float firstExit = minComponent(distanceToExit);
| bvec3 isFirstExit = equal(distanceToExit, vec3(firstExit));
| vec3 exitNormal = vec3(isFirstExit) * directions;
| vec4 exit = vec4(exitNormal, firstExit);
|
| return RayShapeIntersection(entry, exit);
| }
|
| vec4 getStepSize(in SampleData sampleData, in Ray viewRay, in RayShapeIntersection shapeIntersection, in mat3 jacobianT, in float currentT) {
| // The Jacobian is computed in a space where the shape spans [-1, 1].
| // But the ray is marched in a space where the shape fills [0, 1].
| // So we need to scale the Jacobian by 2.
| vec3 gradient = 2.0 * viewRay.rawDir * jacobianT;
| vec3 sampleSizeAlongRay = getSampleSize(sampleData.tileCoords.w) / gradient;
|
| RayShapeIntersection voxelIntersection = getVoxelIntersection(sampleData.tileUv, sampleSizeAlongRay);
|
| // Transform normal from shape space to Cartesian space
| vec3 voxelNormal = normalize(jacobianT * voxelIntersection.entry.xyz);
| // Compare with the shape intersection, to choose the appropriate normal
| vec4 voxelEntry = vec4(voxelNormal, currentT + voxelIntersection.entry.w);
| vec4 entry = intersectionMax(shapeIntersection.entry, voxelEntry);
|
| float fixedStep = minComponent(abs(sampleSizeAlongRay)) * u_stepSize;
| float shift = fixedStep * SHIFT_FRACTION;
| float dt = voxelIntersection.exit.w + shift;
| if ((currentT + dt) > shapeIntersection.exit.w) {
| // Stop at end of shape
| dt = shapeIntersection.exit.w - currentT + shift;
| }
| float stepSize = clamp(dt, fixedStep * MINIMUM_STEP_SCALAR, fixedStep + shift);
|
| return vec4(entry.xyz, stepSize);
| }
|
| vec2 packIntToVec2(int value) {
| float shifted = float(value) / 255.0;
| float lowBits = fract(shifted);
| float highBits = floor(shifted) / 255.0;
| return vec2(highBits, lowBits);
| }
|
| vec2 packFloatToVec2(float value) {
| float lowBits = fract(value);
| float highBits = floor(value) / 255.0;
| return vec2(highBits, lowBits);
| }
|
| int getSampleIndex(in vec3 tileUv) {
| ivec3 voxelDimensions = u_dimensions;
| vec3 sampleCoordinate = tileUv * vec3(voxelDimensions);
| // tileUv = 1.0 is a valid coordinate but sampleIndex = voxelDimensions is not.
| // (tileUv = 1.0 corresponds to the last sample, at index = voxelDimensions - 1).
| // Clamp to [0, voxelDimensions - 0.5) to avoid numerical error before flooring
| vec3 maxCoordinate = vec3(voxelDimensions) - vec3(0.5);
| sampleCoordinate = clamp(sampleCoordinate, vec3(0.0), maxCoordinate);
| ivec3 sampleIndex = ivec3(floor(sampleCoordinate));
| #if defined(PADDING)
| voxelDimensions += u_paddingBefore + u_paddingAfter;
| sampleIndex += u_paddingBefore;
| #endif
| // Convert to a 1D index for lookup in a 1D data array
| return sampleIndex.x + voxelDimensions.x * (sampleIndex.y + voxelDimensions.y * sampleIndex.z);
| }
|
| void main()
| {
| vec4 fragCoord = gl_FragCoord;
| vec2 screenCoord = (fragCoord.xy - czm_viewport.xy) / czm_viewport.zw; // [0,1]
| vec3 eyeDirection = normalize(czm_windowToEyeCoordinates(fragCoord).xyz);
| vec3 viewDirWorld = normalize(czm_inverseViewRotation * eyeDirection); // normalize again just in case
| vec3 viewDirUv = normalize(u_transformDirectionViewToLocal * eyeDirection); // normalize again just in case
| vec3 viewPosUv = u_cameraPositionUv;
| #if defined(SHAPE_ELLIPSOID)
| // viewDirUv has been scaled to a space where the ellipsoid is a sphere.
| // Undo this scaling to get the raw direction.
| vec3 rawDir = viewDirUv * u_ellipsoidRadiiUv;
| Ray viewRayUv = Ray(viewPosUv, viewDirUv, rawDir);
| #else
| Ray viewRayUv = Ray(viewPosUv, viewDirUv, viewDirUv);
| #endif
|
| Intersections ix;
| RayShapeIntersection shapeIntersection = intersectScene(screenCoord, viewRayUv, ix);
|
| // Exit early if the scene was completely missed.
| if (shapeIntersection.entry.w == NO_HIT) {
| discard;
| }
|
| float currentT = shapeIntersection.entry.w;
| float endT = shapeIntersection.exit.w;
| vec3 positionUv = viewPosUv + currentT * viewDirUv;
| PointJacobianT pointJacobian = convertUvToShapeUvSpaceDerivative(positionUv);
|
| // Traverse the tree from the start position
| TraversalData traversalData;
| SampleData sampleDatas[SAMPLE_COUNT];
| traverseOctreeFromBeginning(pointJacobian.point, traversalData, sampleDatas);
| vec4 step = getStepSize(sampleDatas[0], viewRayUv, shapeIntersection, pointJacobian.jacobianT, currentT);
|
| #if defined(JITTER)
| float noise = hash(screenCoord); // [0,1]
| currentT += noise * step.w;
| positionUv += noise * step.w * viewDirUv;
| #endif
|
| FragmentInput fragmentInput;
| #if defined(STATISTICS)
| setStatistics(fragmentInput.metadata.statistics);
| #endif
|
| vec4 colorAccum = vec4(0.0);
|
| for (int stepCount = 0; stepCount < STEP_COUNT_MAX; ++stepCount) {
| // Read properties from the megatexture based on the traversal state
| Properties properties = accumulatePropertiesFromMegatexture(sampleDatas);
|
| // Prepare the custom shader inputs
| copyPropertiesToMetadata(properties, fragmentInput.metadata);
| fragmentInput.voxel.positionUv = positionUv;
| fragmentInput.voxel.positionShapeUv = pointJacobian.point;
| fragmentInput.voxel.positionUvLocal = sampleDatas[0].tileUv;
| fragmentInput.voxel.viewDirUv = viewDirUv;
| fragmentInput.voxel.viewDirWorld = viewDirWorld;
| fragmentInput.voxel.surfaceNormal = step.xyz;
| fragmentInput.voxel.travelDistance = step.w;
| fragmentInput.voxel.stepCount = stepCount;
| fragmentInput.voxel.tileIndex = sampleDatas[0].megatextureIndex;
| fragmentInput.voxel.sampleIndex = getSampleIndex(sampleDatas[0].tileUv);
|
| // Run the custom shader
| czm_modelMaterial materialOutput;
| fragmentMain(fragmentInput, materialOutput);
|
| // Sanitize the custom shader output
| vec4 color = vec4(materialOutput.diffuse, materialOutput.alpha);
| color.rgb = max(color.rgb, vec3(0.0));
| color.a = clamp(color.a, 0.0, 1.0);
|
| // Pre-multiplied alpha blend
| colorAccum += (1.0 - colorAccum.a) * vec4(color.rgb * color.a, color.a);
|
| // Stop traversing if the alpha has been fully saturated
| if (colorAccum.a > ALPHA_ACCUM_MAX) {
| colorAccum.a = ALPHA_ACCUM_MAX;
| break;
| }
|
| if (step.w == 0.0) {
| // Shape is infinitely thin. The ray may have hit the edge of a
| // foreground voxel. Step ahead slightly to check for more voxels
| step.w == 0.00001;
| }
|
| // Keep raymarching
| currentT += step.w;
| positionUv = viewPosUv + currentT * viewDirUv;
|
| // Check if there's more intersections.
| if (currentT > endT) {
| #if (INTERSECTION_COUNT == 1)
| break;
| #else
| shapeIntersection = nextIntersection(ix);
| if (shapeIntersection.entry.w == NO_HIT) {
| break;
| } else {
| // Found another intersection. Resume raymarching there
| currentT = shapeIntersection.entry.w;
| endT = shapeIntersection.exit.w;
| positionUv = viewPosUv + currentT * viewDirUv;
| }
| #endif
| }
|
| // Traverse the tree from the current ray position.
| // This is similar to traverseOctreeFromBeginning but is faster when the ray is in the same tile as the previous step.
| pointJacobian = convertUvToShapeUvSpaceDerivative(positionUv);
| traverseOctreeFromExisting(pointJacobian.point, traversalData, sampleDatas);
| step = getStepSize(sampleDatas[0], viewRayUv, shapeIntersection, pointJacobian.jacobianT, currentT);
| }
|
| // Convert the alpha from [0,ALPHA_ACCUM_MAX] to [0,1]
| colorAccum.a /= ALPHA_ACCUM_MAX;
|
| #if defined(PICKING)
| // If alpha is 0.0 there is nothing to pick
| if (colorAccum.a == 0.0) {
| discard;
| }
| out_FragColor = u_pickColor;
| #elif defined(PICKING_VOXEL)
| // If alpha is 0.0 there is nothing to pick
| if (colorAccum.a == 0.0) {
| discard;
| }
| vec2 megatextureId = packIntToVec2(sampleDatas[0].megatextureIndex);
| vec2 sampleIndex = packIntToVec2(getSampleIndex(sampleDatas[0].tileUv));
| out_FragColor = vec4(megatextureId, sampleIndex);
| #else
| out_FragColor = colorAccum;
| #endif
| }
| `;var nH=`in vec2 position;
|
| uniform vec4 u_ndcSpaceAxisAlignedBoundingBox;
|
| void main() {
| vec2 aabbMin = u_ndcSpaceAxisAlignedBoundingBox.xy;
| vec2 aabbMax = u_ndcSpaceAxisAlignedBoundingBox.zw;
| vec2 translation = 0.5 * (aabbMax + aabbMin);
| vec2 scale = 0.5 * (aabbMax - aabbMin);
| gl_Position = vec4(position * scale + translation, 0.0, 1.0);
| }
| `;var iH=`/* Intersection defines
| #define INTERSECTION_COUNT ###
| */
|
| #define NO_HIT (-czm_infinity)
| #define INF_HIT (czm_infinity * 0.5)
|
| struct RayShapeIntersection {
| vec4 entry;
| vec4 exit;
| };
|
| vec4 intersectionMin(in vec4 intersect0, in vec4 intersect1)
| {
| if (intersect0.w == NO_HIT) {
| return intersect1;
| } else if (intersect1.w == NO_HIT) {
| return intersect0;
| }
| return (intersect0.w <= intersect1.w) ? intersect0 : intersect1;
| }
|
| vec4 intersectionMax(in vec4 intersect0, in vec4 intersect1)
| {
| return (intersect0.w >= intersect1.w) ? intersect0 : intersect1;
| }
|
| RayShapeIntersection intersectIntersections(in Ray ray, in RayShapeIntersection intersect0, in RayShapeIntersection intersect1)
| {
| bool missed = (intersect0.entry.w == NO_HIT) ||
| (intersect1.entry.w == NO_HIT) ||
| (intersect0.exit.w < intersect1.entry.w) ||
| (intersect0.entry.w > intersect1.exit.w);
| if (missed) {
| vec4 miss = vec4(normalize(ray.dir), NO_HIT);
| return RayShapeIntersection(miss, miss);
| }
|
| vec4 entry = intersectionMax(intersect0.entry, intersect1.entry);
| vec4 exit = intersectionMin(intersect0.exit, intersect1.exit);
|
| return RayShapeIntersection(entry, exit);
| }
|
| struct Intersections {
| // Don't access these member variables directly - call the functions instead.
|
| // Store an array of ray-surface intersections. Each intersection is composed of:
| // .xyz for the surface normal at the intersection point
| // .w for the T value
| // The scale of the normal encodes the shape intersection type:
| // length(intersection.xyz) = 1: positive shape entry
| // length(intersection.xyz) = 2: positive shape exit
| // length(intersection.xyz) = 3: negative shape entry
| // length(intersection.xyz) = 4: negative shape exit
| // INTERSECTION_COUNT is the number of ray-*shape* (volume) intersections,
| // so we need twice as many to track ray-*surface* intersections
| vec4 intersections[INTERSECTION_COUNT * 2];
|
| #if (INTERSECTION_COUNT > 1)
| // Maintain state for future nextIntersection calls
| int index;
| int surroundCount;
| bool surroundIsPositive;
| #endif
| };
|
| RayShapeIntersection getFirstIntersection(in Intersections ix)
| {
| return RayShapeIntersection(ix.intersections[0], ix.intersections[1]);
| }
|
| vec4 encodeIntersectionType(vec4 intersection, int index, bool entry)
| {
| float scale = float(index > 0) * 2.0 + float(!entry) + 1.0;
| return vec4(intersection.xyz * scale, intersection.w);
| }
|
| // Use defines instead of real functions because WebGL1 cannot access array with non-constant index.
| #define setIntersection(/*inout Intersections*/ ix, /*int*/ index, /*float*/ t, /*bool*/ positive, /*bool*/ enter) (ix).intersections[(index)] = vec4(0.0, float(!positive) * 2.0 + float(!enter) + 1.0, 0.0, (t))
| #define setIntersectionPair(/*inout Intersections*/ ix, /*int*/ index, /*vec2*/ entryExit) (ix).intersections[(index) * 2 + 0] = vec4(0.0, float((index) > 0) * 2.0 + 1.0, 0.0, (entryExit).x); (ix).intersections[(index) * 2 + 1] = vec4(0.0, float((index) > 0) * 2.0 + 2.0, 0.0, (entryExit).y)
| #define setSurfaceIntersection(/*inout Intersections*/ ix, /*int*/ index, /*vec4*/ intersection, /*bool*/ positive, /*bool*/ enter) (ix).intersections[(index)] = encodeIntersectionType((intersection), int(!positive), (enter))
| #define setShapeIntersection(/*inout Intersections*/ ix, /*int*/ index, /*RayShapeIntersection*/ intersection) (ix).intersections[(index) * 2 + 0] = encodeIntersectionType((intersection).entry, (index), true); (ix).intersections[(index) * 2 + 1] = encodeIntersectionType((intersection).exit, (index), false)
|
| #if (INTERSECTION_COUNT > 1)
| void initializeIntersections(inout Intersections ix) {
| // Sort the intersections from min T to max T with bubble sort.
| // Note: If this sorting function changes, some of the intersection test may
| // need to be updated. Search for "bubble sort" to find those areas.
| const int sortPasses = INTERSECTION_COUNT * 2 - 1;
| for (int n = sortPasses; n > 0; --n) {
| for (int i = 0; i < sortPasses; ++i) {
| // The loop should be: for (i = 0; i < n; ++i) {...} but WebGL1 cannot
| // loop with non-constant condition, so it has to break early instead
| if (i >= n) { break; }
|
| vec4 intersect0 = ix.intersections[i + 0];
| vec4 intersect1 = ix.intersections[i + 1];
|
| bool inOrder = intersect0.w <= intersect1.w;
|
| ix.intersections[i + 0] = inOrder ? intersect0 : intersect1;
| ix.intersections[i + 1] = inOrder ? intersect1 : intersect0;
| }
| }
|
| // Prepare initial state for nextIntersection
| ix.index = 0;
| ix.surroundCount = 0;
| ix.surroundIsPositive = false;
| }
| #endif
|
| #if (INTERSECTION_COUNT > 1)
| RayShapeIntersection nextIntersection(inout Intersections ix) {
| vec4 surfaceIntersection = vec4(0.0, 0.0, 0.0, NO_HIT);
| RayShapeIntersection shapeIntersection = RayShapeIntersection(surfaceIntersection, surfaceIntersection);
|
| const int passCount = INTERSECTION_COUNT * 2;
|
| if (ix.index == passCount) {
| return shapeIntersection;
| }
|
| for (int i = 0; i < passCount; ++i) {
| // The loop should be: for (i = ix.index; i < passCount; ++i) {...} but WebGL1 cannot
| // loop with non-constant condition, so it has to continue instead.
| if (i < ix.index) {
| continue;
| }
|
| ix.index = i + 1;
|
| surfaceIntersection = ix.intersections[i];
| int intersectionType = int(length(surfaceIntersection.xyz) - 0.5);
| bool currShapeIsPositive = intersectionType < 2;
| bool enter = intMod(intersectionType, 2) == 0;
|
| ix.surroundCount += enter ? +1 : -1;
| ix.surroundIsPositive = currShapeIsPositive ? enter : ix.surroundIsPositive;
|
| // entering positive or exiting negative
| if (ix.surroundCount == 1 && ix.surroundIsPositive && enter == currShapeIsPositive) {
| shapeIntersection.entry = surfaceIntersection;
| }
|
| // exiting positive or entering negative after being inside positive
| bool exitPositive = !enter && currShapeIsPositive && ix.surroundCount == 0;
| bool enterNegativeFromPositive = enter && !currShapeIsPositive && ix.surroundCount == 2 && ix.surroundIsPositive;
| if (exitPositive || enterNegativeFromPositive) {
| shapeIntersection.exit = surfaceIntersection;
|
| // entry and exit have been found, so the loop can stop
| if (exitPositive) {
| // After exiting positive shape there is nothing left to intersect, so jump to the end index.
| ix.index = passCount;
| }
| break;
| }
| }
|
| return shapeIntersection;
| }
| #endif
|
| // NOTE: initializeIntersections, nextIntersection aren't even declared unless INTERSECTION_COUNT > 1
| `;var oH=`// See IntersectionUtils.glsl for the definitions of Ray, Intersections,
| // setIntersectionPair, INF_HIT, NO_HIT
|
| /* intersectDepth defines (set in Scene/VoxelRenderResources.js)
| #define DEPTH_INTERSECTION_INDEX ###
| */
|
| uniform mat4 u_transformPositionViewToUv;
|
| void intersectDepth(in vec2 screenCoord, in Ray ray, inout Intersections ix) {
| float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, screenCoord));
| if (logDepthOrDepth != 0.0) {
| // Calculate how far the ray must travel before it hits the depth buffer.
| vec4 eyeCoordinateDepth = czm_screenToEyeCoordinates(screenCoord, logDepthOrDepth);
| eyeCoordinateDepth /= eyeCoordinateDepth.w;
| vec3 depthPositionUv = vec3(u_transformPositionViewToUv * eyeCoordinateDepth);
| float t = dot(depthPositionUv - ray.pos, ray.dir);
| setIntersectionPair(ix, DEPTH_INTERSECTION_INDEX, vec2(t, +INF_HIT));
| } else {
| // There's no depth at this location.
| setIntersectionPair(ix, DEPTH_INTERSECTION_INDEX, vec2(NO_HIT));
| }
| }
| `;var rH=`// See IntersectionUtils.glsl for the definitions of Ray, Intersections, INF_HIT,
| // NO_HIT, setShapeIntersection
|
| /* Clipping plane defines (set in Scene/VoxelRenderResources.js)
| #define CLIPPING_PLANES_UNION
| #define CLIPPING_PLANES_COUNT
| #define CLIPPING_PLANES_INTERSECTION_INDEX
| */
|
| uniform sampler2D u_clippingPlanesTexture;
| uniform mat4 u_clippingPlanesMatrix;
|
| // Plane is in Hessian Normal Form
| vec4 intersectPlane(in Ray ray, in vec4 plane) {
| vec3 n = plane.xyz; // normal
| float w = plane.w; // -dot(pointOnPlane, normal)
|
| float a = dot(ray.pos, n);
| float b = dot(ray.dir, n);
| float t = -(w + a) / b;
|
| return vec4(n, t);
| }
|
| void intersectClippingPlanes(in Ray ray, inout Intersections ix) {
| vec4 backSide = vec4(-ray.dir, -INF_HIT);
| vec4 farSide = vec4(ray.dir, +INF_HIT);
| RayShapeIntersection clippingVolume;
|
| #if (CLIPPING_PLANES_COUNT == 1)
| // Union and intersection are the same when there's one clipping plane, and the code
| // is more simplified.
| vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, 0, u_clippingPlanesMatrix);
| vec4 intersection = intersectPlane(ray, planeUv);
| bool reflects = dot(ray.dir, intersection.xyz) < 0.0;
| clippingVolume.entry = reflects ? backSide : intersection;
| clippingVolume.exit = reflects ? intersection : farSide;
| setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume);
| #elif defined(CLIPPING_PLANES_UNION)
| vec4 firstTransmission = vec4(ray.dir, +INF_HIT);
| vec4 lastReflection = vec4(-ray.dir, -INF_HIT);
| for (int i = 0; i < CLIPPING_PLANES_COUNT; i++) {
| vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, i, u_clippingPlanesMatrix);
| vec4 intersection = intersectPlane(ray, planeUv);
| if (dot(ray.dir, planeUv.xyz) > 0.0) {
| firstTransmission = intersection.w <= firstTransmission.w ? intersection : firstTransmission;
| } else {
| lastReflection = intersection.w >= lastReflection.w ? intersection : lastReflection;
| }
| }
| clippingVolume.entry = backSide;
| clippingVolume.exit = lastReflection;
| setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX + 0, clippingVolume);
| clippingVolume.entry = firstTransmission;
| clippingVolume.exit = farSide;
| setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX + 1, clippingVolume);
| #else // intersection
| vec4 lastTransmission = vec4(ray.dir, -INF_HIT);
| vec4 firstReflection = vec4(-ray.dir, +INF_HIT);
| for (int i = 0; i < CLIPPING_PLANES_COUNT; i++) {
| vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, i, u_clippingPlanesMatrix);
| vec4 intersection = intersectPlane(ray, planeUv);
| if (dot(ray.dir, planeUv.xyz) > 0.0) {
| lastTransmission = intersection.w > lastTransmission.w ? intersection : lastTransmission;
| } else {
| firstReflection = intersection.w < firstReflection.w ? intersection: firstReflection;
| }
| }
| if (lastTransmission.w < firstReflection.w) {
| clippingVolume.entry = lastTransmission;
| clippingVolume.exit = firstReflection;
| } else {
| clippingVolume.entry = vec4(-ray.dir, NO_HIT);
| clippingVolume.exit = vec4(ray.dir, NO_HIT);
| }
| setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume);
| #endif
| }
| `;var TI=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT,
| // RayShapeIntersection
|
| vec4 intersectLongitude(in Ray ray, in float angle, in bool positiveNormal) {
| float normalSign = positiveNormal ? 1.0 : -1.0;
| vec2 planeNormal = vec2(-sin(angle), cos(angle)) * normalSign;
|
| vec2 position = ray.pos.xy;
| vec2 direction = ray.dir.xy;
| float approachRate = dot(direction, planeNormal);
| float distance = -dot(position, planeNormal);
|
| float t = (approachRate == 0.0)
| ? NO_HIT
| : distance / approachRate;
|
| return vec4(planeNormal, 0.0, t);
| }
|
| RayShapeIntersection intersectHalfSpace(in Ray ray, in float angle, in bool positiveNormal)
| {
| vec4 intersection = intersectLongitude(ray, angle, positiveNormal);
| vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
|
| bool hitFront = (intersection.w > 0.0) == (dot(ray.pos.xy, intersection.xy) > 0.0);
| if (!hitFront) {
| return RayShapeIntersection(intersection, farSide);
| } else {
| return RayShapeIntersection(-1.0 * farSide, intersection);
| }
| }
|
| void intersectFlippedWedge(in Ray ray, in vec2 minMaxAngle, out RayShapeIntersection intersections[2])
| {
| intersections[0] = intersectHalfSpace(ray, minMaxAngle.x, false);
| intersections[1] = intersectHalfSpace(ray, minMaxAngle.y, true);
| }
|
| bool hitPositiveHalfPlane(in Ray ray, in vec4 intersection, in bool positiveNormal) {
| float normalSign = positiveNormal ? 1.0 : -1.0;
| vec2 planeDirection = vec2(intersection.y, -intersection.x) * normalSign;
| vec2 hit = ray.pos.xy + intersection.w * ray.dir.xy;
| return dot(hit, planeDirection) > 0.0;
| }
|
| void intersectHalfPlane(in Ray ray, in float angle, out RayShapeIntersection intersections[2]) {
| vec4 intersection = intersectLongitude(ray, angle, true);
| vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
|
| if (hitPositiveHalfPlane(ray, intersection, true)) {
| intersections[0].entry = -1.0 * farSide;
| intersections[0].exit = vec4(-1.0 * intersection.xy, 0.0, intersection.w);
| intersections[1].entry = intersection;
| intersections[1].exit = farSide;
| } else {
| vec4 miss = vec4(normalize(ray.dir), NO_HIT);
| intersections[0].entry = -1.0 * farSide;
| intersections[0].exit = farSide;
| intersections[1].entry = miss;
| intersections[1].exit = miss;
| }
| }
|
| RayShapeIntersection intersectRegularWedge(in Ray ray, in vec2 minMaxAngle)
| {
| // Note: works for maxAngle > minAngle + pi, where the "regular wedge"
| // is actually a negative volume.
| // Compute intersections with the two planes.
| // Normals will point toward the "outside" (negative space)
| vec4 intersect1 = intersectLongitude(ray, minMaxAngle.x, false);
| vec4 intersect2 = intersectLongitude(ray, minMaxAngle.y, true);
|
| // Choose intersection with smallest T as the "first", the other as "last"
| // Note: first or last could be in the "shadow" wedge, beyond the tip
| bool inOrder = intersect1.w <= intersect2.w;
| vec4 first = inOrder ? intersect1 : intersect2;
| vec4 last = inOrder ? intersect2 : intersect1;
|
| bool firstIsAhead = first.w >= 0.0;
| bool startedInsideFirst = dot(ray.pos.xy, first.xy) < 0.0;
| bool exitFromInside = firstIsAhead == startedInsideFirst;
| bool lastIsAhead = last.w > 0.0;
| bool startedOutsideLast = dot(ray.pos.xy, last.xy) >= 0.0;
| bool enterFromOutside = lastIsAhead == startedOutsideLast;
|
| vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
| vec4 miss = vec4(normalize(ray.dir), NO_HIT);
|
| if (exitFromInside && enterFromOutside) {
| // Ray crosses both faces of negative wedge, exiting then entering the positive shape
| return RayShapeIntersection(first, last);
| } else if (!exitFromInside && enterFromOutside) {
| // Ray starts inside wedge. last is in shadow wedge, and first is actually the entry
| return RayShapeIntersection(-1.0 * farSide, first);
| } else if (exitFromInside && !enterFromOutside) {
| // First intersection was in the shadow wedge, so last is actually the exit
| return RayShapeIntersection(last, farSide);
| } else { // !exitFromInside && !enterFromOutside
| // Both intersections were in the shadow wedge
| return RayShapeIntersection(miss, miss);
| }
| }
| `;var sH=`// See IntersectionUtils.glsl for the definitions of Ray, RayShapeIntersection,
| // NO_HIT, Intersections
|
| /* Box defines (set in Scene/VoxelBoxShape.js)
| #define BOX_INTERSECTION_INDEX ### // always 0
| */
|
| uniform vec3 u_renderMinBounds;
| uniform vec3 u_renderMaxBounds;
|
| RayShapeIntersection intersectBox(in Ray ray, in vec3 minBound, in vec3 maxBound)
| {
| // Consider the box as the intersection of the space between 3 pairs of parallel planes
| // Compute the distance along the ray to each plane
| vec3 t0 = (minBound - ray.pos) / ray.dir;
| vec3 t1 = (maxBound - ray.pos) / ray.dir;
|
| // Identify candidate entries/exits based on distance from ray.pos
| vec3 entries = min(t0, t1);
| vec3 exits = max(t0, t1);
|
| vec3 directions = sign(ray.dir);
|
| // The actual intersection points are the furthest entry and the closest exit
| float lastEntry = maxComponent(entries);
| bvec3 isLastEntry = equal(entries, vec3(lastEntry));
| vec3 entryNormal = -1.0 * vec3(isLastEntry) * directions;
| vec4 entry = vec4(entryNormal, lastEntry);
|
| float firstExit = minComponent(exits);
| bvec3 isFirstExit = equal(exits, vec3(firstExit));
| vec3 exitNormal = vec3(isLastEntry) * directions;
| vec4 exit = vec4(exitNormal, firstExit);
|
| if (entry.w > exit.w) {
| entry.w = NO_HIT;
| exit.w = NO_HIT;
| }
|
| return RayShapeIntersection(entry, exit);
| }
|
| void intersectShape(in Ray ray, inout Intersections ix)
| {
| RayShapeIntersection intersection = intersectBox(ray, u_renderMinBounds, u_renderMaxBounds);
| setShapeIntersection(ix, BOX_INTERSECTION_INDEX, intersection);
| }
| `;var aH=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, Intersections,
| // RayShapeIntersection, setSurfaceIntersection, setShapeIntersection,
| // intersectIntersections
| // See IntersectLongitude.glsl for the definitions of intersectHalfPlane,
| // intersectFlippedWedge, intersectRegularWedge
|
| /* Cylinder defines (set in Scene/VoxelCylinderShape.js)
| #define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN
| #define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT
| #define CYLINDER_HAS_RENDER_BOUNDS_ANGLE
| #define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF
| #define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF
| #define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO
|
| #define CYLINDER_INTERSECTION_INDEX_RADIUS_MAX
| #define CYLINDER_INTERSECTION_INDEX_RADIUS_MIN
| #define CYLINDER_INTERSECTION_INDEX_ANGLE
| */
|
| // Cylinder uniforms
| uniform vec2 u_cylinderRenderRadiusMinMax;
| uniform vec2 u_cylinderRenderHeightMinMax;
| #if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE)
| uniform vec2 u_cylinderRenderAngleMinMax;
| #endif
|
| /**
| * Find the intersection of a ray with the volume defined by two planes of constant z
| */
| RayShapeIntersection intersectHeightBounds(in Ray ray, in vec2 minMaxHeight, in bool convex)
| {
| float zPosition = ray.pos.z;
| float zDirection = ray.dir.z;
|
| float tmin = (minMaxHeight.x - zPosition) / zDirection;
| float tmax = (minMaxHeight.y - zPosition) / zDirection;
|
| // Normals point outside the volume
| float signFlip = convex ? 1.0 : -1.0;
| vec4 intersectMin = vec4(0.0, 0.0, -1.0 * signFlip, tmin);
| vec4 intersectMax = vec4(0.0, 0.0, 1.0 * signFlip, tmax);
|
| bool topEntry = zDirection < 0.0;
| vec4 entry = topEntry ? intersectMax : intersectMin;
| vec4 exit = topEntry ? intersectMin : intersectMax;
|
| return RayShapeIntersection(entry, exit);
| }
|
| /**
| * Find the intersection of a ray with a right cylindrical surface of a given radius
| * about the z-axis.
| */
| RayShapeIntersection intersectCylinder(in Ray ray, in float radius, in bool convex)
| {
| vec2 position = ray.pos.xy;
| vec2 direction = ray.dir.xy;
|
| float a = dot(direction, direction);
| float b = dot(position, direction);
| float c = dot(position, position) - radius * radius;
| float determinant = b * b - a * c;
|
| if (determinant < 0.0) {
| vec4 miss = vec4(normalize(ray.dir), NO_HIT);
| return RayShapeIntersection(miss, miss);
| }
|
| determinant = sqrt(determinant);
| float t1 = (-b - determinant) / a;
| float t2 = (-b + determinant) / a;
| float signFlip = convex ? 1.0 : -1.0;
| vec4 intersect1 = vec4(normalize(position + t1 * direction) * signFlip, 0.0, t1);
| vec4 intersect2 = vec4(normalize(position + t2 * direction) * signFlip, 0.0, t2);
|
| return RayShapeIntersection(intersect1, intersect2);
| }
|
| /**
| * Find the intersection of a ray with a right cylindrical solid of given
| * radius and height bounds. NOTE: The shape is assumed to be convex.
| */
| RayShapeIntersection intersectBoundedCylinder(in Ray ray, in float radius, in vec2 minMaxHeight)
| {
| RayShapeIntersection cylinderIntersection = intersectCylinder(ray, radius, true);
| RayShapeIntersection heightBoundsIntersection = intersectHeightBounds(ray, minMaxHeight, true);
| return intersectIntersections(ray, cylinderIntersection, heightBoundsIntersection);
| }
|
| void intersectShape(Ray ray, inout Intersections ix)
| {
| // Position is converted from [0,1] to [-1,+1] because shape intersections assume unit space is [-1,+1].
| // Direction is scaled as well to be in sync with position.
| ray.pos = ray.pos * 2.0 - 1.0;
| ray.dir *= 2.0;
|
| RayShapeIntersection outerIntersect = intersectBoundedCylinder(ray, u_cylinderRenderRadiusMinMax.y, u_cylinderRenderHeightMinMax);
|
| setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MAX, outerIntersect);
|
| if (outerIntersect.entry.w == NO_HIT) {
| return;
| }
|
| #if defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT)
| // When the cylinder is perfectly thin it's necessary to sandwich the
| // inner cylinder intersection inside the outer cylinder intersection.
|
| // Without this special case,
| // [outerMin, outerMax, innerMin, innerMax] will bubble sort to
| // [outerMin, innerMin, outerMax, innerMax] which will cause the back
| // side of the cylinder to be invisible because it will think the ray
| // is still inside the inner (negative) cylinder after exiting the
| // outer (positive) cylinder.
|
| // With this special case,
| // [outerMin, innerMin, innerMax, outerMax] will bubble sort to
| // [outerMin, innerMin, innerMax, outerMax] which will work correctly.
|
| // Note: If initializeIntersections() changes its sorting function
| // from bubble sort to something else, this code may need to change.
| RayShapeIntersection innerIntersect = intersectCylinder(ray, 1.0, false);
| setSurfaceIntersection(ix, 0, outerIntersect.entry, true, true); // positive, enter
| setSurfaceIntersection(ix, 1, innerIntersect.entry, false, true); // negative, enter
| setSurfaceIntersection(ix, 2, innerIntersect.exit, false, false); // negative, exit
| setSurfaceIntersection(ix, 3, outerIntersect.exit, true, false); // positive, exit
| #elif defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN)
| RayShapeIntersection innerIntersect = intersectCylinder(ray, u_cylinderRenderRadiusMinMax.x, false);
| setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MIN, innerIntersect);
| #endif
|
| #if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF)
| RayShapeIntersection wedgeIntersect = intersectRegularWedge(ray, u_cylinderRenderAngleMinMax);
| setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE, wedgeIntersect);
| #elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF)
| RayShapeIntersection wedgeIntersects[2];
| intersectFlippedWedge(ray, u_cylinderRenderAngleMinMax, wedgeIntersects);
| setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 0, wedgeIntersects[0]);
| setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersects[1]);
| #elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO)
| RayShapeIntersection wedgeIntersects[2];
| intersectHalfPlane(ray, u_cylinderRenderAngleMinMax.x, wedgeIntersects);
| setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 0, wedgeIntersects[0]);
| setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersects[1]);
| #endif
| }
| `;var cH=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT, Intersections,
| // RayShapeIntersection, setSurfaceIntersection, setShapeIntersection
| // See IntersectLongitude.glsl for the definitions of intersectHalfPlane,
| // intersectFlippedWedge, intersectRegularWedge
|
| /* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js)
| #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE
| #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO
| #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF
| #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF
| #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF
| #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF
| #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF
| #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF
| #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF
| #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF
| #define ELLIPSOID_INTERSECTION_INDEX_LONGITUDE
| #define ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX
| #define ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN
| #define ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX
| #define ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN
| */
|
| #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE)
| uniform vec2 u_ellipsoidRenderLongitudeMinMax;
| #endif
| uniform float u_eccentricitySquared;
| uniform vec2 u_ellipsoidRenderLatitudeSinMinMax;
| uniform vec2 u_clipMinMaxHeight;
|
| RayShapeIntersection intersectZPlane(in Ray ray, in float z) {
| float t = -ray.pos.z / ray.dir.z;
|
| bool startsOutside = sign(ray.pos.z) == sign(z);
| bool entry = (t >= 0.0) != startsOutside;
|
| vec4 intersect = vec4(0.0, 0.0, z, t);
| vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
|
| if (entry) {
| return RayShapeIntersection(intersect, farSide);
| } else {
| return RayShapeIntersection(-1.0 * farSide, intersect);
| }
| }
|
| RayShapeIntersection intersectHeight(in Ray ray, in float relativeHeight, in bool convex)
| {
| // Scale the ray by the ellipsoid axes to make it a unit sphere
| // Note: approximating ellipsoid + height as an ellipsoid
| vec3 radiiCorrection = u_ellipsoidRadiiUv / (u_ellipsoidRadiiUv + relativeHeight);
| vec3 position = ray.pos * radiiCorrection;
| vec3 direction = ray.dir * radiiCorrection;
|
| float a = dot(direction, direction); // ~ 1.0 (or maybe 4.0 if ray is scaled)
| float b = dot(direction, position); // roughly inside [-1.0, 1.0] when zoomed in
| float c = dot(position, position) - 1.0; // ~ 0.0 when zoomed in.
| float determinant = b * b - a * c; // ~ b * b when zoomed in
|
| if (determinant < 0.0) {
| vec4 miss = vec4(normalize(direction), NO_HIT);
| return RayShapeIntersection(miss, miss);
| }
|
| determinant = sqrt(determinant);
|
| // Compute larger root using standard formula
| float signB = b < 0.0 ? -1.0 : 1.0;
| // The other root may suffer from subtractive cancellation in the standard formula.
| // Compute it from the first root instead.
| float t1 = (-b - signB * determinant) / a;
| float t2 = c / (a * t1);
| float tmin = min(t1, t2);
| float tmax = max(t1, t2);
|
| float directionScale = convex ? 1.0 : -1.0;
| vec3 d1 = directionScale * normalize(position + tmin * direction);
| vec3 d2 = directionScale * normalize(position + tmax * direction);
|
| return RayShapeIntersection(vec4(d1, tmin), vec4(d2, tmax));
| }
|
| /**
| * Given a circular cone around the z-axis, with apex at the origin,
| * find the parametric distance(s) along a ray where that ray intersects
| * the cone.
| * The cone opening angle is described by the squared cosine of
| * its half-angle (the angle between the Z-axis and the surface)
| */
| vec2 intersectDoubleEndedCone(in Ray ray, in float cosSqrHalfAngle)
| {
| vec3 o = ray.pos;
| vec3 d = ray.dir;
| float sinSqrHalfAngle = 1.0 - cosSqrHalfAngle;
|
| float aSin = d.z * d.z * sinSqrHalfAngle;
| float aCos = -dot(d.xy, d.xy) * cosSqrHalfAngle;
| float a = aSin + aCos;
|
| float bSin = d.z * o.z * sinSqrHalfAngle;
| float bCos = -dot(o.xy, d.xy) * cosSqrHalfAngle;
| float b = bSin + bCos;
|
| float cSin = o.z * o.z * sinSqrHalfAngle;
| float cCos = -dot(o.xy, o.xy) * cosSqrHalfAngle;
| float c = cSin + cCos;
| // determinant = b * b - a * c. But bSin * bSin = aSin * cSin.
| // Avoid subtractive cancellation by expanding to eliminate these terms
| float determinant = 2.0 * bSin * bCos + bCos * bCos - aSin * cCos - aCos * cSin - aCos * cCos;
|
| if (determinant < 0.0) {
| return vec2(NO_HIT);
| } else if (a == 0.0) {
| // Ray is parallel to cone surface
| return (b == 0.0)
| ? vec2(NO_HIT) // Ray is on cone surface
| : vec2(-0.5 * c / b, NO_HIT);
| }
|
| determinant = sqrt(determinant);
|
| // Compute larger root using standard formula
| float signB = b < 0.0 ? -1.0 : 1.0;
| float t1 = (-b - signB * determinant) / a;
| // The other root may suffer from subtractive cancellation in the standard formula.
| // Compute it from the first root instead.
| float t2 = c / (a * t1);
| float tmin = min(t1, t2);
| float tmax = max(t1, t2);
| return vec2(tmin, tmax);
| }
|
| /**
| * Given a point on a conical surface, find the surface normal at that point.
| */
| vec3 getConeNormal(in vec3 p, in bool convex) {
| // Start with radial component pointing toward z-axis
| vec2 radial = -abs(p.z) * normalize(p.xy);
| // Z component points toward opening of cone
| float zSign = (p.z < 0.0) ? -1.0 : 1.0;
| float z = length(p.xy) * zSign;
| // Flip normal if shape is convex
| float flip = (convex) ? -1.0 : 1.0;
| return normalize(vec3(radial, z) * flip);
| }
|
| /**
| * Compute the shift between the ellipsoid origin and the apex of a cone of latitude
| */
| float getLatitudeConeShift(in float sinLatitude) {
| // Find prime vertical radius of curvature:
| // the distance along the ellipsoid normal to the intersection with the z-axis
| float x2 = u_eccentricitySquared * sinLatitude * sinLatitude;
| float primeVerticalRadius = inversesqrt(1.0 - x2);
|
| // Compute a shift from the origin to the intersection of the cone with the z-axis
| return primeVerticalRadius * u_eccentricitySquared * sinLatitude;
| }
|
| void intersectFlippedCone(in Ray ray, in float cosHalfAngle, out RayShapeIntersection intersections[2]) {
| // Undo the scaling from ellipsoid to sphere
| ray.pos = ray.pos * u_ellipsoidRadiiUv;
| ray.dir = ray.dir * u_ellipsoidRadiiUv;
| // Shift the ray to account for the latitude cone not being centered at the Earth center
| ray.pos.z += getLatitudeConeShift(cosHalfAngle);
|
| float cosSqrHalfAngle = cosHalfAngle * cosHalfAngle;
| vec2 intersect = intersectDoubleEndedCone(ray, cosSqrHalfAngle);
|
| vec4 miss = vec4(normalize(ray.dir), NO_HIT);
| vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
|
| // Initialize output with no intersections
| intersections[0].entry = -1.0 * farSide;
| intersections[0].exit = farSide;
| intersections[1].entry = miss;
| intersections[1].exit = miss;
|
| if (intersect.x == NO_HIT) {
| return;
| }
|
| // Find the points of intersection
| float tmin = intersect.x;
| float tmax = intersect.y;
| vec3 p0 = ray.pos + tmin * ray.dir;
| vec3 p1 = ray.pos + tmax * ray.dir;
|
| vec4 intersect0 = vec4(getConeNormal(p0, true), tmin);
| vec4 intersect1 = vec4(getConeNormal(p1, true), tmax);
|
| bool p0InShadowCone = sign(p0.z) != sign(cosHalfAngle);
| bool p1InShadowCone = sign(p1.z) != sign(cosHalfAngle);
|
| if (p0InShadowCone && p1InShadowCone) {
| // no valid intersections
| } else if (p0InShadowCone) {
| intersections[0].exit = intersect1;
| } else if (p1InShadowCone) {
| intersections[0].entry = intersect0;
| } else {
| intersections[0].exit = intersect0;
| intersections[1].entry = intersect1;
| intersections[1].exit = farSide;
| }
| }
|
| RayShapeIntersection intersectRegularCone(in Ray ray, in float cosHalfAngle, in bool convex) {
| // Undo the scaling from ellipsoid to sphere
| ray.pos = ray.pos * u_ellipsoidRadiiUv;
| ray.dir = ray.dir * u_ellipsoidRadiiUv;
| // Shift the ray to account for the latitude cone not being centered at the Earth center
| ray.pos.z += getLatitudeConeShift(cosHalfAngle);
|
| float cosSqrHalfAngle = cosHalfAngle * cosHalfAngle;
| vec2 intersect = intersectDoubleEndedCone(ray, cosSqrHalfAngle);
|
| vec4 miss = vec4(normalize(ray.dir), NO_HIT);
| vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
|
| if (intersect.x == NO_HIT) {
| return RayShapeIntersection(miss, miss);
| }
|
| // Find the points of intersection
| float tmin = intersect.x;
| float tmax = intersect.y;
| vec3 p0 = ray.pos + tmin * ray.dir;
| vec3 p1 = ray.pos + tmax * ray.dir;
|
| vec4 intersect0 = vec4(getConeNormal(p0, convex), tmin);
| vec4 intersect1 = vec4(getConeNormal(p1, convex), tmax);
|
| bool p0InShadowCone = sign(p0.z) != sign(cosHalfAngle);
| bool p1InShadowCone = sign(p1.z) != sign(cosHalfAngle);
|
| if (p0InShadowCone && p1InShadowCone) {
| return RayShapeIntersection(miss, miss);
| } else if (p0InShadowCone) {
| return RayShapeIntersection(intersect1, farSide);
| } else if (p1InShadowCone) {
| return RayShapeIntersection(-1.0 * farSide, intersect0);
| } else {
| return RayShapeIntersection(intersect0, intersect1);
| }
| }
|
| void intersectShape(in Ray ray, inout Intersections ix) {
| // Position is converted from [0,1] to [-1,+1] because shape intersections assume unit space is [-1,+1].
| // Direction is scaled as well to be in sync with position.
| ray.pos = ray.pos * 2.0 - 1.0;
| ray.dir *= 2.0;
|
| // Outer ellipsoid
| RayShapeIntersection outerIntersect = intersectHeight(ray, u_clipMinMaxHeight.y, true);
| setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX, outerIntersect);
|
| // Exit early if the outer ellipsoid was missed.
| if (outerIntersect.entry.w == NO_HIT) {
| return;
| }
|
| // Inner ellipsoid
| RayShapeIntersection innerIntersect = intersectHeight(ray, u_clipMinMaxHeight.x, false);
|
| if (innerIntersect.entry.w == NO_HIT) {
| setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN, innerIntersect);
| } else {
| // When the ellipsoid is large and thin it's possible for floating point math
| // to cause the ray to intersect the inner ellipsoid before the outer ellipsoid.
| // To prevent this from happening, clamp innerIntersect to outerIntersect and
| // sandwich the inner ellipsoid intersection inside the outer ellipsoid intersection.
|
| // Without this special case,
| // [outerMin, outerMax, innerMin, innerMax] will bubble sort to
| // [outerMin, innerMin, outerMax, innerMax] which will cause the back
| // side of the ellipsoid to be invisible because it will think the ray
| // is still inside the inner (negative) ellipsoid after exiting the
| // outer (positive) ellipsoid.
|
| // With this special case,
| // [outerMin, innerMin, innerMax, outerMax] will bubble sort to
| // [outerMin, innerMin, innerMax, outerMax] which will work correctly.
|
| // Note: If initializeIntersections() changes its sorting function
| // from bubble sort to something else, this code may need to change.
| innerIntersect.entry.w = max(innerIntersect.entry.w, outerIntersect.entry.w);
| innerIntersect.exit.w = min(innerIntersect.exit.w, outerIntersect.exit.w);
| setSurfaceIntersection(ix, 0, outerIntersect.entry, true, true); // positive, enter
| setSurfaceIntersection(ix, 1, innerIntersect.entry, false, true); // negative, enter
| setSurfaceIntersection(ix, 2, innerIntersect.exit, false, false); // negative, exit
| setSurfaceIntersection(ix, 3, outerIntersect.exit, true, false); // positive, exit
| }
|
| // Bottom cone
| #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF)
| RayShapeIntersection bottomConeIntersection = intersectRegularCone(ray, u_ellipsoidRenderLatitudeSinMinMax.x, false);
| setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN, bottomConeIntersection);
| #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF)
| RayShapeIntersection bottomConeIntersection = intersectZPlane(ray, -1.0);
| setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN, bottomConeIntersection);
| #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF)
| RayShapeIntersection bottomConeIntersections[2];
| intersectFlippedCone(ray, u_ellipsoidRenderLatitudeSinMinMax.x, bottomConeIntersections);
| setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN + 0, bottomConeIntersections[0]);
| setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN + 1, bottomConeIntersections[1]);
| #endif
|
| // Top cone
| #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF)
| RayShapeIntersection topConeIntersections[2];
| intersectFlippedCone(ray, u_ellipsoidRenderLatitudeSinMinMax.y, topConeIntersections);
| setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX + 0, topConeIntersections[0]);
| setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX + 1, topConeIntersections[1]);
| #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF)
| RayShapeIntersection topConeIntersection = intersectZPlane(ray, 1.0);
| setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX, topConeIntersection);
| #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF)
| RayShapeIntersection topConeIntersection = intersectRegularCone(ray, u_ellipsoidRenderLatitudeSinMinMax.y, false);
| setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX, topConeIntersection);
| #endif
|
| // Wedge
| #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO)
| RayShapeIntersection wedgeIntersects[2];
| intersectHalfPlane(ray, u_ellipsoidRenderLongitudeMinMax.x, wedgeIntersects);
| setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 0, wedgeIntersects[0]);
| setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersects[1]);
| #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF)
| RayShapeIntersection wedgeIntersect = intersectRegularWedge(ray, u_ellipsoidRenderLongitudeMinMax);
| setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE, wedgeIntersect);
| #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF)
| RayShapeIntersection wedgeIntersects[2];
| intersectFlippedWedge(ray, u_ellipsoidRenderLongitudeMinMax, wedgeIntersects);
| setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 0, wedgeIntersects[0]);
| setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersects[1]);
| #endif
| }
| `;var xw=`// Main intersection function for Voxel scenes.
| // See IntersectBox.glsl, IntersectCylinder.glsl, or IntersectEllipsoid.glsl
| // for the definition of intersectShape. The appropriate function is selected
| // based on the VoxelPrimitive shape type, and added to the shader in
| // Scene/VoxelRenderResources.js.
| // See also IntersectClippingPlane.glsl and IntersectDepth.glsl.
| // See IntersectionUtils.glsl for the definitions of Ray, NO_HIT,
| // getFirstIntersection, initializeIntersections, nextIntersection.
|
| /* Intersection defines (set in Scene/VoxelRenderResources.js)
| #define INTERSECTION_COUNT ###
| */
|
| RayShapeIntersection intersectScene(in vec2 screenCoord, in Ray ray, out Intersections ix) {
| // Do a ray-shape intersection to find the exact starting and ending points.
| intersectShape(ray, ix);
|
| // Exit early if the positive shape was completely missed or behind the ray.
| RayShapeIntersection intersection = getFirstIntersection(ix);
| if (intersection.entry.w == NO_HIT) {
| // Positive shape was completely missed - so exit early.
| return intersection;
| }
|
| // Clipping planes
| #if defined(CLIPPING_PLANES)
| intersectClippingPlanes(ray, ix);
| #endif
|
| // Depth
| #if defined(DEPTH_TEST)
| intersectDepth(screenCoord, ray, ix);
| #endif
|
| // Find the first intersection that's in front of the ray
| #if (INTERSECTION_COUNT > 1)
| initializeIntersections(ix);
| for (int i = 0; i < INTERSECTION_COUNT; ++i) {
| intersection = nextIntersection(ix);
| if (intersection.exit.w > 0.0) {
| // Set start to 0.0 when ray is inside the shape.
| intersection.entry.w = max(intersection.entry.w, 0.0);
| break;
| }
| }
| #else
| // Set start to 0.0 when ray is inside the shape.
| intersection.entry.w = max(intersection.entry.w, 0.0);
| #endif
|
| return intersection;
| }
| `;var lH=`/* Box defines (set in Scene/VoxelBoxShape.js)
| #define BOX_HAS_SHAPE_BOUNDS
| */
|
| #if defined(BOX_HAS_SHAPE_BOUNDS)
| uniform vec3 u_boxUvToShapeUvScale;
| uniform vec3 u_boxUvToShapeUvTranslate;
| #endif
|
| PointJacobianT convertUvToShapeSpaceDerivative(in vec3 positionUv) {
| // For BOX, UV space = shape space, so we can use positionUv as-is,
| // and the Jacobian is the identity matrix, except that a step of 1
| // only spans half the shape space [-1, 1], so the identity is scaled.
| return PointJacobianT(positionUv, mat3(0.5));
| }
|
| vec3 convertShapeToShapeUvSpace(in vec3 positionShape) {
| #if defined(BOX_HAS_SHAPE_BOUNDS)
| return positionShape * u_boxUvToShapeUvScale + u_boxUvToShapeUvTranslate;
| #else
| return positionShape;
| #endif
| }
|
| PointJacobianT convertUvToShapeUvSpaceDerivative(in vec3 positionUv) {
| PointJacobianT pointJacobian = convertUvToShapeSpaceDerivative(positionUv);
| pointJacobian.point = convertShapeToShapeUvSpace(pointJacobian.point);
| return pointJacobian;
| }
|
| vec3 convertShapeUvToUvSpace(in vec3 shapeUv) {
| #if defined(BOX_HAS_SHAPE_BOUNDS)
| return (shapeUv - u_boxUvToShapeUvTranslate) / u_boxUvToShapeUvScale;
| #else
| return shapeUv;
| #endif
| }
|
| vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
| #if defined(BOX_HAS_SHAPE_BOUNDS)
| return shapeUv / u_boxUvToShapeUvScale;
| #else
| return shapeUv;
| #endif
| }`;var uH=`/* Cylinder defines (set in Scene/VoxelCylinderShape.js)
| #define CYLINDER_HAS_SHAPE_BOUNDS_RADIUS
| #define CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT
| #define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE
| #define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY
| #define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY
| #define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED
| */
|
| #if defined(CYLINDER_HAS_SHAPE_BOUNDS_RADIUS)
| uniform vec2 u_cylinderUvToShapeUvRadius; // x = scale, y = offset
| #endif
| #if defined(CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT)
| uniform vec2 u_cylinderUvToShapeUvHeight; // x = scale, y = offset
| #endif
| #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE)
| uniform vec2 u_cylinderUvToShapeUvAngle; // x = scale, y = offset
| #endif
| #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY) || defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY)
| uniform vec2 u_cylinderShapeUvAngleMinMax;
| #endif
| #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY) || defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY) || defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED)
| uniform float u_cylinderShapeUvAngleRangeZeroMid;
| #endif
|
| PointJacobianT convertUvToShapeSpaceDerivative(in vec3 positionUv) {
| // Convert from Cartesian UV space [0, 1] to Cartesian local space [-1, 1]
| vec3 position = positionUv * 2.0 - 1.0;
|
| float radius = length(position.xy); // [0, 1]
| vec3 radial = normalize(vec3(position.xy, 0.0));
|
| // Shape space height is defined within [0, 1]
| float height = positionUv.z; // [0, 1]
| vec3 z = vec3(0.0, 0.0, 1.0);
|
| float angle = atan(position.y, position.x);
| vec3 east = normalize(vec3(-position.y, position.x, 0.0));
|
| vec3 point = vec3(radius, height, angle);
| mat3 jacobianT = mat3(radial, z, east / length(position.xy));
| return PointJacobianT(point, jacobianT);
| }
|
| vec3 convertShapeToShapeUvSpace(in vec3 positionShape) {
| float radius = positionShape.x;
| #if defined(CYLINDER_HAS_SHAPE_BOUNDS_RADIUS)
| radius = radius * u_cylinderUvToShapeUvRadius.x + u_cylinderUvToShapeUvRadius.y;
| #endif
|
| float height = positionShape.y;
| #if defined(CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT)
| height = height * u_cylinderUvToShapeUvHeight.x + u_cylinderUvToShapeUvHeight.y;
| #endif
|
| float angle = (positionShape.z + czm_pi) / czm_twoPi;
| #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE)
| #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED)
| // Comparing against u_cylinderShapeUvAngleMinMax has precision problems. u_cylinderShapeUvAngleRangeZeroMid is more conservative.
| angle += float(angle < u_cylinderShapeUvAngleRangeZeroMid);
| #endif
|
| // Avoid flickering from reading voxels from both sides of the -pi/+pi discontinuity.
| #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY)
| angle = angle > u_cylinderShapeUvAngleRangeZeroMid ? u_cylinderShapeUvAngleMinMax.x : angle;
| #elif defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY)
| angle = angle < u_cylinderShapeUvAngleRangeZeroMid ? u_cylinderShapeUvAngleMinMax.y : angle;
| #endif
|
| angle = angle * u_cylinderUvToShapeUvAngle.x + u_cylinderUvToShapeUvAngle.y;
| #endif
|
| return vec3(radius, height, angle);
| }
|
| PointJacobianT convertUvToShapeUvSpaceDerivative(in vec3 positionUv) {
| PointJacobianT pointJacobian = convertUvToShapeSpaceDerivative(positionUv);
| pointJacobian.point = convertShapeToShapeUvSpace(pointJacobian.point);
| return pointJacobian;
| }
|
| vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
| float radius = shapeUv.x;
| #if defined(CYLINDER_HAS_SHAPE_BOUNDS_RADIUS)
| radius /= u_cylinderUvToShapeUvRadius.x;
| #endif
|
| float height = shapeUv.y;
| #if defined(CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT)
| height /= u_cylinderUvToShapeUvHeight.x;
| #endif
|
| float angle = shapeUv.z * czm_twoPi;
| #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE)
| angle /= u_cylinderUvToShapeUvAngle.x;
| #endif
|
| return vec3(radius, height, angle);
| }
| `;var fH=`/* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js)
| #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY
| #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY
| #define ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE
| #define ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED
| #define ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE
| */
|
| uniform vec3 u_ellipsoidRadiiUv; // [0,1]
| uniform vec2 u_evoluteScale; // (radiiUv.x ^ 2 - radiiUv.z ^ 2) * vec2(1.0, -1.0) / radiiUv;
| uniform vec3 u_ellipsoidInverseRadiiSquaredUv;
| #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY) || defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY) || defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED)
| uniform vec3 u_ellipsoidShapeUvLongitudeMinMaxMid;
| #endif
| #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)
| uniform vec2 u_ellipsoidUvToShapeUvLongitude; // x = scale, y = offset
| #endif
| #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE)
| uniform vec2 u_ellipsoidUvToShapeUvLatitude; // x = scale, y = offset
| #endif
| uniform float u_ellipsoidInverseHeightDifferenceUv;
|
| // robust iterative solution without trig functions
| // https://github.com/0xfaded/ellipse_demo/issues/1
| // https://stackoverflow.com/questions/22959698/distance-from-given-point-to-given-ellipse
| // Extended to return radius of curvature along with the point
| vec3 nearestPointAndRadiusOnEllipse(vec2 pos, vec2 radii) {
| vec2 p = abs(pos);
| vec2 inverseRadii = 1.0 / radii;
|
| // We describe the ellipse parametrically: v = radii * vec2(cos(t), sin(t))
| // but store the cos and sin of t in a vec2 for efficiency.
| // Initial guess: t = pi/4
| vec2 tTrigs = vec2(0.7071067811865476);
| // Initial guess of point on ellipsoid
| vec2 v = radii * tTrigs;
| // Center of curvature of the ellipse at v
| vec2 evolute = u_evoluteScale * tTrigs * tTrigs * tTrigs;
|
| const int iterations = 3;
| for (int i = 0; i < iterations; ++i) {
| // Find the (approximate) intersection of p - evolute with the ellipsoid.
| vec2 q = normalize(p - evolute) * length(v - evolute);
| // Update the estimate of t.
| tTrigs = (q + evolute) * inverseRadii;
| tTrigs = normalize(clamp(tTrigs, 0.0, 1.0));
| v = radii * tTrigs;
| evolute = u_evoluteScale * tTrigs * tTrigs * tTrigs;
| }
|
| return vec3(v * sign(pos), length(v - evolute));
| }
|
| PointJacobianT convertUvToShapeSpaceDerivative(in vec3 positionUv) {
| // Convert from UV space [0, 1] to local space [-1, 1]
| vec3 position = positionUv * 2.0 - 1.0;
| // Undo the scaling from ellipsoid to sphere
| position = position * u_ellipsoidRadiiUv;
|
| float longitude = atan(position.y, position.x);
| vec3 east = normalize(vec3(-position.y, position.x, 0.0));
|
| // Convert the 3D position to a 2D position relative to the ellipse (radii.x, radii.z)
| // (assume radii.y == radii.x) and find the nearest point on the ellipse and its normal
| float distanceFromZAxis = length(position.xy);
| vec2 posEllipse = vec2(distanceFromZAxis, position.z);
| vec3 surfacePointAndRadius = nearestPointAndRadiusOnEllipse(posEllipse, u_ellipsoidRadiiUv.xz);
| vec2 surfacePoint = surfacePointAndRadius.xy;
|
| vec2 normal2d = normalize(surfacePoint * u_ellipsoidInverseRadiiSquaredUv.xz);
| float latitude = atan(normal2d.y, normal2d.x);
| vec3 north = vec3(-normal2d.y * normalize(position.xy), abs(normal2d.x));
|
| float heightSign = length(posEllipse) < length(surfacePoint) ? -1.0 : 1.0;
| float height = heightSign * length(posEllipse - surfacePoint);
| vec3 up = normalize(cross(east, north));
|
| vec3 point = vec3(longitude, latitude, height);
| mat3 jacobianT = mat3(east / distanceFromZAxis, north / (surfacePointAndRadius.z + height), up);
| return PointJacobianT(point, jacobianT);
| }
|
| vec3 convertShapeToShapeUvSpace(in vec3 positionShape) {
| // Longitude: shift & scale to [0, 1]
| float longitude = (positionShape.x + czm_pi) / czm_twoPi;
|
| // Correct the angle when max < min
| // Technically this should compare against min longitude - but it has precision problems so compare against the middle of empty space.
| #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED)
| longitude += float(longitude < u_ellipsoidShapeUvLongitudeMinMaxMid.z);
| #endif
|
| // Avoid flickering from reading voxels from both sides of the -pi/+pi discontinuity.
| #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY)
| longitude = longitude > u_ellipsoidShapeUvLongitudeMinMaxMid.z ? u_ellipsoidShapeUvLongitudeMinMaxMid.x : longitude;
| #endif
| #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY)
| longitude = longitude < u_ellipsoidShapeUvLongitudeMinMaxMid.z ? u_ellipsoidShapeUvLongitudeMinMaxMid.y : longitude;
| #endif
|
| #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)
| longitude = longitude * u_ellipsoidUvToShapeUvLongitude.x + u_ellipsoidUvToShapeUvLongitude.y;
| #endif
|
| // Latitude: shift and scale to [0, 1]
| float latitude = (positionShape.y + czm_piOverTwo) / czm_pi;
| #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE)
| latitude = latitude * u_ellipsoidUvToShapeUvLatitude.x + u_ellipsoidUvToShapeUvLatitude.y;
| #endif
|
| // Height: scale to the range [0, 1]
| float height = 1.0 + positionShape.z * u_ellipsoidInverseHeightDifferenceUv;
|
| return vec3(longitude, latitude, height);
| }
|
| PointJacobianT convertUvToShapeUvSpaceDerivative(in vec3 positionUv) {
| PointJacobianT pointJacobian = convertUvToShapeSpaceDerivative(positionUv);
| pointJacobian.point = convertShapeToShapeUvSpace(pointJacobian.point);
| return pointJacobian;
| }
|
| vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
| // Convert from [0, 1] to radians [-pi, pi]
| float longitude = shapeUv.x * czm_twoPi;
| #if defined (ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)
| longitude /= u_ellipsoidUvToShapeUvLongitude.x;
| #endif
|
| // Convert from [0, 1] to radians [-pi/2, pi/2]
| float latitude = shapeUv.y * czm_pi;
| #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE)
| latitude /= u_ellipsoidUvToShapeUvLatitude.x;
| #endif
|
| float height = shapeUv.z / u_ellipsoidInverseHeightDifferenceUv;
|
| return vec3(longitude, latitude, height);
| }
| `;var dH=`// These octree flags must be in sync with GpuOctreeFlag in VoxelTraversal.js
| #define OCTREE_FLAG_INTERNAL 0
| #define OCTREE_FLAG_LEAF 1
| #define OCTREE_FLAG_PACKED_LEAF_FROM_PARENT 2
|
| #define OCTREE_MAX_LEVELS 32 // Harcoded value because GLSL doesn't like variable length loops
|
| uniform sampler2D u_octreeInternalNodeTexture;
| uniform vec2 u_octreeInternalNodeTexelSizeUv;
| uniform int u_octreeInternalNodeTilesPerRow;
| #if (SAMPLE_COUNT > 1)
| uniform sampler2D u_octreeLeafNodeTexture;
| uniform vec2 u_octreeLeafNodeTexelSizeUv;
| uniform int u_octreeLeafNodeTilesPerRow;
| #endif
|
| struct OctreeNodeData {
| int data;
| int flag;
| };
|
| struct TraversalData {
| ivec4 octreeCoords;
| int parentOctreeIndex;
| };
|
| struct SampleData {
| int megatextureIndex;
| ivec4 tileCoords;
| vec3 tileUv;
| #if (SAMPLE_COUNT > 1)
| float weight;
| #endif
| };
|
| // Integer mod: For WebGL1 only
| int intMod(in int a, in int b) {
| return a - (b * (a / b));
| }
| int normU8_toInt(in float value) {
| return int(value * 255.0);
| }
| int normU8x2_toInt(in vec2 value) {
| return int(value.x * 255.0) + 256 * int(value.y * 255.0);
| }
| float normU8x2_toFloat(in vec2 value) {
| return float(normU8x2_toInt(value)) / 65535.0;
| }
|
| OctreeNodeData getOctreeNodeData(in vec2 octreeUv) {
| vec4 texData = texture(u_octreeInternalNodeTexture, octreeUv);
|
| OctreeNodeData data;
| data.data = normU8x2_toInt(texData.xy);
| data.flag = normU8x2_toInt(texData.zw);
| return data;
| }
|
| OctreeNodeData getOctreeChildData(in int parentOctreeIndex, in ivec3 childCoord) {
| int childIndex = childCoord.z * 4 + childCoord.y * 2 + childCoord.x;
| int octreeCoordX = intMod(parentOctreeIndex, u_octreeInternalNodeTilesPerRow) * 9 + 1 + childIndex;
| int octreeCoordY = parentOctreeIndex / u_octreeInternalNodeTilesPerRow;
| vec2 octreeUv = u_octreeInternalNodeTexelSizeUv * vec2(float(octreeCoordX) + 0.5, float(octreeCoordY) + 0.5);
| return getOctreeNodeData(octreeUv);
| }
|
| int getOctreeParentIndex(in int octreeIndex) {
| int octreeCoordX = intMod(octreeIndex, u_octreeInternalNodeTilesPerRow) * 9;
| int octreeCoordY = octreeIndex / u_octreeInternalNodeTilesPerRow;
| vec2 octreeUv = u_octreeInternalNodeTexelSizeUv * vec2(float(octreeCoordX) + 0.5, float(octreeCoordY) + 0.5);
| vec4 parentData = texture(u_octreeInternalNodeTexture, octreeUv);
| int parentOctreeIndex = normU8x2_toInt(parentData.xy);
| return parentOctreeIndex;
| }
|
| /**
| * Convert a position in the uv-space of the tileset bounding shape
| * into the uv-space of a tile within the tileset
| */
| vec3 getTileUv(in vec3 shapePosition, in ivec4 octreeCoords) {
| // PERFORMANCE_IDEA: use bit-shifting (only in WebGL2)
| float dimAtLevel = exp2(float(octreeCoords.w));
| return shapePosition * dimAtLevel - vec3(octreeCoords.xyz);
| }
|
| vec3 getClampedTileUv(in vec3 shapePosition, in ivec4 octreeCoords) {
| vec3 tileUv = getTileUv(shapePosition, octreeCoords);
| return clamp(tileUv, vec3(0.0), vec3(1.0));
| }
|
| void getOctreeLeafSampleData(in OctreeNodeData data, in ivec4 octreeCoords, out SampleData sampleData) {
| sampleData.megatextureIndex = data.data;
| sampleData.tileCoords = (data.flag == OCTREE_FLAG_PACKED_LEAF_FROM_PARENT)
| ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
| : octreeCoords;
| }
|
| #if (SAMPLE_COUNT > 1)
| void getOctreeLeafSampleDatas(in OctreeNodeData data, in ivec4 octreeCoords, out SampleData sampleDatas[SAMPLE_COUNT]) {
| int leafIndex = data.data;
| int leafNodeTexelCount = 2;
| // Adding 0.5 moves to the center of the texel
| float leafCoordXStart = float(intMod(leafIndex, u_octreeLeafNodeTilesPerRow) * leafNodeTexelCount) + 0.5;
| float leafCoordY = float(leafIndex / u_octreeLeafNodeTilesPerRow) + 0.5;
|
| // Get an interpolation weight and a flag to determine whether to read the parent texture
| vec2 leafUv0 = u_octreeLeafNodeTexelSizeUv * vec2(leafCoordXStart + 0.0, leafCoordY);
| vec4 leafData0 = texture(u_octreeLeafNodeTexture, leafUv0);
| float lerp = normU8x2_toFloat(leafData0.xy);
| sampleDatas[0].weight = 1.0 - lerp;
| sampleDatas[1].weight = lerp;
| // TODO: this looks wrong? Should be comparing to OCTREE_FLAG_PACKED_LEAF_FROM_PARENT
| sampleDatas[0].tileCoords = (normU8_toInt(leafData0.z) == 1)
| ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
| : octreeCoords;
| sampleDatas[1].tileCoords = (normU8_toInt(leafData0.w) == 1)
| ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
| : octreeCoords;
|
| // Get megatexture indices for both samples
| vec2 leafUv1 = u_octreeLeafNodeTexelSizeUv * vec2(leafCoordXStart + 1.0, leafCoordY);
| vec4 leafData1 = texture(u_octreeLeafNodeTexture, leafUv1);
| sampleDatas[0].megatextureIndex = normU8x2_toInt(leafData1.xy);
| sampleDatas[1].megatextureIndex = normU8x2_toInt(leafData1.zw);
| }
| #endif
|
| OctreeNodeData traverseOctreeDownwards(in vec3 shapePosition, inout TraversalData traversalData) {
| float sizeAtLevel = exp2(-1.0 * float(traversalData.octreeCoords.w));
| vec3 start = vec3(traversalData.octreeCoords.xyz) * sizeAtLevel;
| vec3 end = start + vec3(sizeAtLevel);
| OctreeNodeData childData;
|
| for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) {
| // Find out which octree child contains the position
| // 0 if before center, 1 if after
| vec3 center = 0.5 * (start + end);
| vec3 childCoord = step(center, shapePosition);
|
| // Get octree coords for the next level down
| ivec4 octreeCoords = traversalData.octreeCoords;
| traversalData.octreeCoords = ivec4(octreeCoords.xyz * 2 + ivec3(childCoord), octreeCoords.w + 1);
|
| childData = getOctreeChildData(traversalData.parentOctreeIndex, ivec3(childCoord));
|
| if (childData.flag != OCTREE_FLAG_INTERNAL) {
| // leaf tile - stop traversing
| break;
| }
|
| // interior tile - keep going deeper
| start = mix(start, center, childCoord);
| end = mix(center, end, childCoord);
| traversalData.parentOctreeIndex = childData.data;
| }
|
| return childData;
| }
|
| /**
| * Transform a given position to an octree tile coordinate and a position within that tile,
| * and find the corresponding megatexture index and texture coordinates
| */
| void traverseOctreeFromBeginning(in vec3 shapePosition, out TraversalData traversalData, out SampleData sampleDatas[SAMPLE_COUNT]) {
| traversalData.octreeCoords = ivec4(0);
| traversalData.parentOctreeIndex = 0;
|
| OctreeNodeData nodeData = getOctreeNodeData(vec2(0.0));
| if (nodeData.flag != OCTREE_FLAG_LEAF) {
| nodeData = traverseOctreeDownwards(shapePosition, traversalData);
| }
|
| #if (SAMPLE_COUNT == 1)
| getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]);
| sampleDatas[0].tileUv = getClampedTileUv(shapePosition, sampleDatas[0].tileCoords);
| #else
| getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas);
| sampleDatas[0].tileUv = getClampedTileUv(shapePosition, sampleDatas[0].tileCoords);
| sampleDatas[1].tileUv = getClampedTileUv(shapePosition, sampleDatas[1].tileCoords);
| #endif
| }
|
| bool inRange(in vec3 v, in vec3 minVal, in vec3 maxVal) {
| return clamp(v, minVal, maxVal) == v;
| }
|
| bool insideTile(in vec3 shapePosition, in ivec4 octreeCoords) {
| vec3 tileUv = getTileUv(shapePosition, octreeCoords);
| bool inside = inRange(tileUv, vec3(0.0), vec3(1.0));
| // Assume (!) the position is always inside the root tile.
| return inside || octreeCoords.w == 0;
| }
|
| void traverseOctreeFromExisting(in vec3 shapePosition, inout TraversalData traversalData, inout SampleData sampleDatas[SAMPLE_COUNT]) {
| if (insideTile(shapePosition, traversalData.octreeCoords)) {
| for (int i = 0; i < SAMPLE_COUNT; i++) {
| sampleDatas[0].tileUv = getClampedTileUv(shapePosition, sampleDatas[0].tileCoords);
| }
| return;
| }
|
| // Go up tree until we find a parent tile containing shapePosition
| for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) {
| traversalData.octreeCoords.xyz /= 2;
| traversalData.octreeCoords.w -= 1;
|
| if (insideTile(shapePosition, traversalData.octreeCoords)) {
| break;
| }
|
| traversalData.parentOctreeIndex = getOctreeParentIndex(traversalData.parentOctreeIndex);
| }
|
| // Go down tree
| OctreeNodeData nodeData = traverseOctreeDownwards(shapePosition, traversalData);
|
| #if (SAMPLE_COUNT == 1)
| getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]);
| sampleDatas[0].tileUv = getClampedTileUv(shapePosition, sampleDatas[0].tileCoords);
| #else
| getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas);
| sampleDatas[0].tileUv = getClampedTileUv(shapePosition, sampleDatas[0].tileCoords);
| sampleDatas[1].tileUv = getClampedTileUv(shapePosition, sampleDatas[1].tileCoords);
| #endif
| }
| `;var hH=`// See Octree.glsl for the definitions of SampleData and intMod
|
| /* Megatexture defines (set in Scene/VoxelRenderResources.js)
| #define SAMPLE_COUNT ###
| #define NEAREST_SAMPLING
| #define PADDING
| */
|
| uniform ivec2 u_megatextureSliceDimensions; // number of slices per tile, in two dimensions
| uniform ivec2 u_megatextureTileDimensions; // number of tiles per megatexture, in two dimensions
| uniform vec2 u_megatextureVoxelSizeUv;
| uniform vec2 u_megatextureSliceSizeUv;
| uniform vec2 u_megatextureTileSizeUv;
|
| uniform ivec3 u_dimensions; // does not include padding
| #if defined(PADDING)
| uniform ivec3 u_paddingBefore;
| uniform ivec3 u_paddingAfter;
| #endif
|
| // Integer min, max, clamp: For WebGL1 only
| int intMin(int a, int b) {
| return a <= b ? a : b;
| }
| int intMax(int a, int b) {
| return a >= b ? a : b;
| }
| int intClamp(int v, int minVal, int maxVal) {
| return intMin(intMax(v, minVal), maxVal);
| }
|
| vec2 index1DTo2DTexcoord(int index, ivec2 dimensions, vec2 uvScale)
| {
| int indexX = intMod(index, dimensions.x);
| int indexY = index / dimensions.x;
| return vec2(indexX, indexY) * uvScale;
| }
|
| /*
| How is 3D data stored in a 2D megatexture?
|
| In this example there is only one loaded tile and it has 2x2x2 voxels (8 voxels total).
| The data is sliced by Z. The data at Z = 0 is placed in texels (0,0), (0,1), (1,0), (1,1) and
| the data at Z = 1 is placed in texels (2,0), (2,1), (3,0), (3,1).
| Note that there could be empty space in the megatexture because it's a power of two.
|
| 0 1 2 3
| +---+---+---+---+
| | | | | | 3
| +---+---+---+---+
| | | | | | 2
| +-------+-------+
| |010|110|011|111| 1
| |--- ---|--- ---|
| |000|100|001|101| 0
| +-------+-------+
|
| When doing linear interpolation the megatexture needs to be sampled twice: once for
| the Z slice above the voxel coordinate and once for the slice below. The two slices
| are interpolated with fract(coord.z - 0.5). For example, a Z coordinate of 1.0 is
| halfway between two Z slices so the interpolation factor is 0.5. Below is a side view
| of the 3D voxel grid with voxel coordinates on the left side.
|
| 2 +---+
| |001|
| 1 +-z-+
| |000|
| 0 +---+
|
| When doing nearest neighbor the megatexture only needs to be sampled once at the closest Z slice.
| */
|
| Properties getPropertiesFromMegatexture(in SampleData sampleData) {
| int tileIndex = sampleData.megatextureIndex;
| vec3 voxelCoord = sampleData.tileUv * vec3(u_dimensions);
| ivec3 voxelDimensions = u_dimensions;
|
| #if defined(PADDING)
| voxelDimensions += u_paddingBefore + u_paddingAfter;
| voxelCoord += vec3(u_paddingBefore);
| #endif
|
| #if defined(NEAREST_SAMPLING)
| // Round to the center of the nearest voxel
| voxelCoord = floor(voxelCoord) + vec3(0.5);
| #endif
|
| // Tile location
| vec2 tileUvOffset = index1DTo2DTexcoord(tileIndex, u_megatextureTileDimensions, u_megatextureTileSizeUv);
|
| // Slice location
| float slice = voxelCoord.z - 0.5;
| int sliceIndex = int(floor(slice));
| int sliceIndex0 = intClamp(sliceIndex, 0, voxelDimensions.z - 1);
| vec2 sliceUvOffset0 = index1DTo2DTexcoord(sliceIndex0, u_megatextureSliceDimensions, u_megatextureSliceSizeUv);
|
| // Voxel location
| vec2 voxelUvOffset = clamp(voxelCoord.xy, vec2(0.5), vec2(voxelDimensions.xy) - vec2(0.5)) * u_megatextureVoxelSizeUv;
|
| // Final location in the megatexture
| vec2 uv0 = tileUvOffset + sliceUvOffset0 + voxelUvOffset;
|
| #if defined(NEAREST_SAMPLING)
| return getPropertiesFromMegatextureAtUv(uv0);
| #else
| float sliceLerp = fract(slice);
| int sliceIndex1 = intMin(sliceIndex + 1, voxelDimensions.z - 1);
| vec2 sliceUvOffset1 = index1DTo2DTexcoord(sliceIndex1, u_megatextureSliceDimensions, u_megatextureSliceSizeUv);
| vec2 uv1 = tileUvOffset + sliceUvOffset1 + voxelUvOffset;
| Properties properties0 = getPropertiesFromMegatextureAtUv(uv0);
| Properties properties1 = getPropertiesFromMegatextureAtUv(uv1);
| return mixProperties(properties0, properties1, sliceLerp);
| #endif
| }
|
| // Convert an array of sample datas to a final weighted properties.
| Properties accumulatePropertiesFromMegatexture(in SampleData sampleDatas[SAMPLE_COUNT]) {
| #if (SAMPLE_COUNT == 1)
| return getPropertiesFromMegatexture(sampleDatas[0]);
| #else
| // When more than one sample is taken the accumulator needs to start at 0
| Properties properties = clearProperties();
| for (int i = 0; i < SAMPLE_COUNT; ++i) {
| float weight = sampleDatas[i].weight;
|
| // Avoid reading the megatexture when the weight is 0 as it can be costly.
| if (weight > 0.0) {
| Properties tempProperties = getPropertiesFromMegatexture(sampleDatas[i]);
| tempProperties = scaleProperties(tempProperties, weight);
| properties = sumProperties(properties, tempProperties);
| }
| }
| return properties;
| #endif
| }
| `;function bmt(e){let t=new Kx;this.shaderBuilder=t;let n=e._customShader,i=bt(e._uniformMap,n.uniformMap);e._uniformMap=i;let o=n.uniforms;for(let m in o)if(o.hasOwnProperty(m)){let p=o[m];t.addUniform(p.type,m,ce.FRAGMENT)}t.addUniform("sampler2D","u_megatextureTextures[METADATA_COUNT]",ce.FRAGMENT),this.uniformMap=i;let r=e._clippingPlanes,s=c(r)&&r.enabled?r.length:0;this.clippingPlanes=r,this.clippingPlanesLength=s,t.addVertexLines([nH]),t.addFragmentLines([n.fragmentShaderText,"#line 0",dH,eH,iH,hH]),s>0&&(t.addDefine("CLIPPING_PLANES",void 0,ce.FRAGMENT),t.addDefine("CLIPPING_PLANES_COUNT",s,ce.FRAGMENT),r.unionClippingRegions&&t.addDefine("CLIPPING_PLANES_UNION",void 0,ce.FRAGMENT),t.addFragmentLines([rH])),e._depthTest&&(t.addDefine("DEPTH_TEST",void 0,ce.FRAGMENT),t.addFragmentLines([oH]));let a=e._provider.shape;a==="BOX"?t.addFragmentLines([lH,sH,xw]):a==="CYLINDER"?t.addFragmentLines([uH,TI,aH,xw]):a==="ELLIPSOID"&&(t.addDefine("SHAPE_ELLIPSOID",void 0,ce.FRAGMENT),t.addFragmentLines([fH,TI,cH,xw])),t.addFragmentLines([tH]);let l=e._shape,u=l.shaderDefines;for(let m in u)if(u.hasOwnProperty(m)){let p=u[m];c(p)&&(p=p===!0?void 0:p,t.addDefine(m,p,ce.FRAGMENT))}let f=l.shaderMaximumIntersectionsLength;s>0&&(t.addDefine("CLIPPING_PLANES_INTERSECTION_INDEX",f,ce.FRAGMENT),s===1?f+=1:r.unionClippingRegions?f+=2:f+=1),e._depthTest&&(t.addDefine("DEPTH_INTERSECTION_INDEX",f,ce.FRAGMENT),f+=1),t.addDefine("INTERSECTION_COUNT",f,ce.FRAGMENT),(!d.equals(e.paddingBefore,d.ZERO)||!d.equals(e.paddingAfter,d.ZERO))&&t.addDefine("PADDING",void 0,ce.FRAGMENT),e._useLogDepth&&t.addDefine("LOG_DEPTH_READ_ONLY",void 0,ce.FRAGMENT),e._nearestSampling&&t.addDefine("NEAREST_SAMPLING",void 0,ce.FRAGMENT);let h=e._traversal;t.addDefine("SAMPLE_COUNT",`${h._sampleCount}`,ce.FRAGMENT)}var mH=bmt;function xmt(e,t){let{shaderBuilder:n}=e,{names:i,types:o,componentTypes:r,minimumValues:s,maximumValues:a}=t._provider,l=o.length,u=c(s)&&c(a);n.addDefine("METADATA_COUNT",l,ce.FRAGMENT),u&&n.addDefine("STATISTICS",void 0,ce.FRAGMENT);for(let P=0;P<l;P++){let L=i[P],F=o[P],y=`PropertyStatistics_${L}`,I=`PropertyStatistics_${L}`;n.addStruct(y,I,ce.FRAGMENT);let M=pH(F);n.addStructField(y,M,"min"),n.addStructField(y,M,"max")}let f="Statistics",h="Statistics",m="statistics";n.addStruct(f,h,ce.FRAGMENT);for(let P=0;P<l;P++){let L=i[P],F=`PropertyStatistics_${L}`,y=L;n.addStructField(f,F,y)}let p="Metadata",_="Metadata",b="metadata";n.addStruct(p,_,ce.FRAGMENT),n.addStructField(p,h,m);for(let P=0;P<l;P++){let L=i[P],F=o[P],y=pH(F);n.addStructField(p,y,L)}for(let P=0;P<l;P++){let L=i[P],F=o[P],y=Cmt(F),I=`VoxelProperty_${L}`,M=`VoxelProperty_${L}`;n.addStruct(I,M,ce.FRAGMENT),n.addStructField(I,y,"partialDerivativeLocal"),n.addStructField(I,y,"partialDerivativeWorld"),n.addStructField(I,y,"partialDerivativeView"),n.addStructField(I,y,"partialDerivativeValid")}let x="Voxel",T="Voxel",E="voxel";n.addStruct(x,T,ce.FRAGMENT);for(let P=0;P<l;P++){let L=i[P],F=`VoxelProperty_${L}`;n.addStructField(x,F,L)}n.addStructField(x,"vec3","positionEC"),n.addStructField(x,"vec3","positionUv"),n.addStructField(x,"vec3","positionShapeUv"),n.addStructField(x,"vec3","positionUvLocal"),n.addStructField(x,"vec3","viewDirUv"),n.addStructField(x,"vec3","viewDirWorld"),n.addStructField(x,"vec3","surfaceNormal"),n.addStructField(x,"float","travelDistance"),n.addStructField(x,"int","stepCount"),n.addStructField(x,"int","tileIndex"),n.addStructField(x,"int","sampleIndex");let S="FragmentInput";n.addStruct(S,"FragmentInput",ce.FRAGMENT),n.addStructField(S,_,b),n.addStructField(S,T,E);let v="Properties",D="Properties",R="properties";n.addStruct(v,D,ce.FRAGMENT);for(let P=0;P<l;P++){let L=i[P],F=o[P],y=pH(F);n.addStructField(v,y,L)}{let P="clearProperties";n.addFunction(P,`${D} clearProperties()`,ce.FRAGMENT),n.addFunctionLines(P,[`${D} ${R};`]);for(let L=0;L<l;L++){let F=i[L],y=o[L],I=r[L],M=pH(y,I);n.addFunctionLines(P,[`${R}.${F} = ${M}(0.0);`])}n.addFunctionLines(P,[`return ${R};`])}{let P="sumProperties";n.addFunction(P,`${D} sumProperties(${D} propertiesA, ${D} propertiesB)`,ce.FRAGMENT),n.addFunctionLines(P,[`${D} ${R};`]);for(let L=0;L<l;L++){let F=i[L];n.addFunctionLines(P,[`${R}.${F} = propertiesA.${F} + propertiesB.${F};`])}n.addFunctionLines(P,[`return ${R};`])}{let P="scaleProperties";n.addFunction(P,`${D} scaleProperties(${D} ${R}, float scale)`,ce.FRAGMENT),n.addFunctionLines(P,[`${D} scaledProperties = ${R};`]);for(let L=0;L<l;L++){let F=i[L];n.addFunctionLines(P,[`scaledProperties.${F} *= scale;`])}n.addFunctionLines(P,["return scaledProperties;"])}{let P="mixProperties";n.addFunction(P,`${D} mixProperties(${D} propertiesA, ${D} propertiesB, float mixFactor)`,ce.FRAGMENT),n.addFunctionLines(P,[`${D} ${R};`]);for(let L=0;L<l;L++){let F=i[L];n.addFunctionLines(P,[`${R}.${F} = mix(propertiesA.${F}, propertiesB.${F}, mixFactor);`])}n.addFunctionLines(P,[`return ${R};`])}{let P="copyPropertiesToMetadata";n.addFunction(P,`void copyPropertiesToMetadata(in ${D} ${R}, inout ${_} ${b})`,ce.FRAGMENT);for(let L=0;L<l;L++){let F=i[L];n.addFunctionLines(P,[`${b}.${F} = ${R}.${F};`])}}if(u){let P="setStatistics";n.addFunction(P,`void setStatistics(inout ${h} ${m})`,ce.FRAGMENT);for(let L=0;L<l;L++){let F=i[L],y=o[L],I=Ct.getComponentCount(y);for(let M=0;M<I;M++){let B=Emt(y,M),U=s[L][M],V=a[L][M];n.addFunctionLines(P,[`${m}.${F}.min${B} = ${zye(U)};`,`${m}.${F}.max${B} = ${zye(V)};`])}}}{let P="getPropertiesFromMegatextureAtUv";n.addFunction(P,`${D} getPropertiesFromMegatextureAtUv(vec2 texcoord)`,ce.FRAGMENT),n.addFunctionLines(P,[`${D} ${R};`]);for(let L=0;L<l;L++){let F=i[L],y=o[L],I=r[L],M=Tmt(y,I);n.addFunctionLines(P,[`properties.${F} = texture(u_megatextureTextures[${L}], texcoord)${M};`])}n.addFunctionLines(P,[`return ${R};`])}}function pH(e){if(e===Ct.SCALAR)return"float";if(e===Ct.VEC2)return"vec2";if(e===Ct.VEC3)return"vec3";if(e===Ct.VEC4)return"vec4"}function Tmt(e){if(e===Ct.SCALAR)return".r";if(e===Ct.VEC2)return".ra";if(e===Ct.VEC3)return".rgb";if(e===Ct.VEC4)return""}function Cmt(e){if(e===Ct.SCALAR)return"vec3";if(e===Ct.VEC2)return"mat2";if(e===Ct.VEC3)return"mat3";if(e===Ct.VEC4)return"mat4"}function zye(e){let t=e.toString();return t.indexOf(".")===-1&&(t=`${e}.0`),t}function Emt(e,t){return e===Ct.SCALAR?"":`[${t}]`}var _H=xmt;function wmt(e,t){let n=new mH(e);_H(n,e);let{shaderBuilder:i,clippingPlanes:o,clippingPlanesLength:r}=n;if(r>0){let T="getClippingPlane",E=my(o,t),S=0,A=E.indexOf(")")+1,v=E.indexOf("{",A)+1,D=E.indexOf("}",v),R=E.slice(S,A),P=E.slice(v,D);i.addFunction(T,R,ce.FRAGMENT),i.addFunctionLines(T,[P])}let s=i.clone();s.addDefine("PICKING",void 0,ce.FRAGMENT);let a=i.clone();a.addDefine("PICKING_VOXEL",void 0,ce.FRAGMENT);let l=i.buildShaderProgram(t),u=s.buildShaderProgram(t),f=a.buildShaderProgram(t),h=Fe.fromCache({cull:{enabled:!0,face:pi.BACK},depthTest:{enabled:!1},depthMask:!1,blending:cn.PRE_MULTIPLIED_ALPHA_BLEND}),m=t.getViewportQuadVertexArray(),p=e._depthTest,_=new Ke({vertexArray:m,primitiveType:Se.TRIANGLES,renderState:h,shaderProgram:l,uniformMap:n.uniformMap,modelMatrix:e._compoundModelMatrix,pass:xe.VOXELS,executeInClosestFrustum:!0,owner:this,cull:p,occlude:p}),b=Ke.shallowClone(_,new Ke);b.shaderProgram=u,b.pickOnly=!0;let x=Ke.shallowClone(_,new Ke);if(x.shaderProgram=f,x.pickOnly=!0,c(e._drawCommand)){let T=e._drawCommand;T.shaderProgram=T.shaderProgram&&T.shaderProgram.destroy()}if(c(e._drawCommandPick)){let T=e._drawCommandPick;T.shaderProgram=T.shaderProgram&&T.shaderProgram.destroy()}if(c(e._drawCommandPickVoxel)){let T=e._drawCommandPickVoxel;T.shaderProgram=T.shaderProgram&&T.shaderProgram.destroy()}e._drawCommand=_,e._drawCommandPick=b,e._drawCommandPickVoxel=x}var gH=wmt;function xl(){this.orientedBoundingBox=new wn,this.boundingSphere=new ne,this.boundTransform=new N,this.shapeTransform=new N,this._minBounds=d.clone(xl.DefaultMinBounds,new d),this._maxBounds=d.clone(xl.DefaultMaxBounds,new d),this.shaderUniforms={renderMinBounds:new d,renderMaxBounds:new d,boxUvToShapeUvScale:new d,boxUvToShapeUvTranslate:new d},this.shaderDefines={BOX_INTERSECTION_INDEX:void 0,BOX_HAS_SHAPE_BOUNDS:void 0},this.shaderMaximumIntersectionsLength=0}var Smt=new d,x7=new d,Amt=new q,vmt=new d,Dmt=new d,Imt=new d,Omt=new d,Vye=N.fromRotationTranslation(q.fromUniformScale(.5,new q),new d(.5,.5,.5),new N);xl.prototype.update=function(e,t,n,i,o){i=g(i,xl.DefaultMinBounds),o=g(o,xl.DefaultMaxBounds),C.typeOf.object("modelMatrix",e),C.typeOf.object("minBounds",t),C.typeOf.object("maxBounds",n);let r=xl.DefaultMinBounds,s=xl.DefaultMaxBounds;t=this._minBounds=d.clamp(t,r,s,this._minBounds),n=this._maxBounds=d.clamp(n,r,s,this._maxBounds),i=d.clamp(i,r,s,vmt),o=d.clamp(o,r,s,Dmt);let a=d.clamp(t,i,o,Imt),l=d.clamp(n,i,o,Omt),u=N.getScale(e,x7);if(a.x>l.x||a.y>l.y||a.z>l.z||(a.x===l.x)+(a.y===l.y)+(a.z===l.z)>=2||i.x>o.x||i.y>o.y||i.z>o.z||u.x===0||u.y===0||u.z===0)return!1;this.shapeTransform=N.clone(e,this.shapeTransform),this.orientedBoundingBox=C7(a,l,this.shapeTransform,this.orientedBoundingBox),this.boundTransform=N.fromRotationTranslation(this.orientedBoundingBox.halfAxes,this.orientedBoundingBox.center,this.boundTransform),this.boundingSphere=ne.fromOrientedBoundingBox(this.orientedBoundingBox,this.boundingSphere);let{shaderUniforms:f,shaderDefines:h}=this;for(let _ in h)h.hasOwnProperty(_)&&(h[_]=void 0);let m=!d.equals(t,r)||!d.equals(n,s),p=0;if(h.BOX_INTERSECTION_INDEX=p,p+=1,f.renderMinBounds=N.multiplyByPoint(Vye,a,f.renderMinBounds),f.renderMaxBounds=N.multiplyByPoint(Vye,l,f.renderMaxBounds),m){h.BOX_HAS_SHAPE_BOUNDS=!0;let _=t,b=n;f.boxUvToShapeUvScale=d.fromElements(2/(_.x===b.x?1:b.x-_.x),2/(_.y===b.y?1:b.y-_.y),2/(_.z===b.z?1:b.z-_.z),f.boxUvToShapeUvScale),f.boxUvToShapeUvTranslate=d.fromElements(-f.boxUvToShapeUvScale.x*(_.x*.5+.5),-f.boxUvToShapeUvScale.y*(_.y*.5+.5),-f.boxUvToShapeUvScale.z*(_.z*.5+.5),f.boxUvToShapeUvTranslate)}return this.shaderMaximumIntersectionsLength=p,!0};var yH=new d,T7=new d;xl.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){C.typeOf.number("tileLevel",e),C.typeOf.number("tileX",t),C.typeOf.number("tileY",n),C.typeOf.number("tileZ",i),C.typeOf.object("result",o);let r=this._minBounds,s=this._maxBounds,a=1/Math.pow(2,e),l=d.fromElements(O.lerp(r.x,s.x,a*t),O.lerp(r.y,s.y,a*n),O.lerp(r.z,s.z,a*i),yH),u=d.fromElements(O.lerp(r.x,s.x,a*(t+1)),O.lerp(r.y,s.y,a*(n+1)),O.lerp(r.z,s.z,a*(i+1)),T7);return C7(l,u,this.shapeTransform,o)};var Hye=new d;xl.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){C.typeOf.object("spatialNode",e),C.typeOf.object("tileDimensions",t),C.typeOf.object("tileUv",n),C.typeOf.object("result",i);let o=1/Math.pow(2,e.level),r=d.divideComponents(d.ONE,t,Hye),s=d.multiplyByScalar(r,o,Hye),a=d.multiplyByScalar(d.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,yH),o,yH),l=d.add(a,s,T7),u=this._minBounds,f=this._maxBounds,h=d.fromElements(O.lerp(u.x,f.x,a.x),O.lerp(u.y,f.y,a.y),O.lerp(u.z,f.z,a.z),yH),m=d.fromElements(O.lerp(u.x,f.x,l.x),O.lerp(u.y,f.y,l.y),O.lerp(u.z,f.z,l.z),T7);return C7(h,m,this.shapeTransform,i)};xl.DefaultMinBounds=Object.freeze(new d(-1,-1,-1));xl.DefaultMaxBounds=Object.freeze(new d(1,1,1));function C7(e,t,n,i){let o=xl.DefaultMinBounds,r=xl.DefaultMaxBounds;if(d.equals(e,o)&&d.equals(t,r))i.center=N.getTranslation(n,i.center),i.halfAxes=N.getMatrix3(n,i.halfAxes);else{let a=N.getScale(n,x7),l=d.midpoint(e,t,Smt);i.center=N.multiplyByPoint(n,l,i.center),a=d.fromElements(a.x*.5*(t.x-e.x),a.y*.5*(t.y-e.y),a.z*.5*(t.z-e.z),x7);let u=N.getRotation(n,Amt);i.halfAxes=q.setScale(u,a,i.halfAxes)}return i}var Qp=xl;function zr(){this.orientedBoundingBox=new wn,this.boundingSphere=new ne,this.boundTransform=new N,this.shapeTransform=new N,this._minimumRadius=zr.DefaultMinBounds.x,this._maximumRadius=zr.DefaultMaxBounds.x,this._minimumHeight=zr.DefaultMinBounds.y,this._maximumHeight=zr.DefaultMaxBounds.y,this._minimumAngle=zr.DefaultMinBounds.z,this._maximumAngle=zr.DefaultMaxBounds.z,this.shaderUniforms={cylinderRenderHeightMinMax:new k,cylinderRenderRadiusMinMax:new k,cylinderRenderAngleMinMax:new k,cylinderUvToShapeUvRadius:new k,cylinderUvToShapeUvHeight:new k,cylinderUvToShapeUvAngle:new k,cylinderShapeUvAngleMinMax:new k,cylinderShapeUvAngleRangeZeroMid:0},this.shaderDefines={CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN:void 0,CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF:void 0,CYLINDER_HAS_SHAPE_BOUNDS_RADIUS:void 0,CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT:void 0,CYLINDER_HAS_SHAPE_BOUNDS_ANGLE:void 0,CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY:void 0,CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY:void 0,CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED:void 0,CYLINDER_INTERSECTION_INDEX_RADIUS_MAX:void 0,CYLINDER_INTERSECTION_INDEX_RADIUS_MIN:void 0,CYLINDER_INTERSECTION_INDEX_ANGLE:void 0},this.shaderMaximumIntersectionsLength=0}var qye=new d;zr.prototype.update=function(e,t,n,i,o){i=g(i,zr.DefaultMinBounds),o=g(o,zr.DefaultMaxBounds),C.typeOf.object("modelMatrix",e),C.typeOf.object("minBounds",t),C.typeOf.object("maxBounds",n);let r=zr.DefaultMinBounds.x,s=zr.DefaultMaxBounds.x,a=zr.DefaultMinBounds.y,l=zr.DefaultMaxBounds.y,u=zr.DefaultMinBounds.z,f=zr.DefaultMaxBounds.z,h=f-u,m=.5*h,p=O.EPSILON10,_=O.EPSILON3,b=O.EPSILON10,x=O.clamp(t.x,r,s),T=O.clamp(n.x,r,s),E=O.clamp(i.x,r,s),S=O.clamp(o.x,r,s),A=Math.max(x,E),v=Math.min(T,S),D=O.clamp(t.y,a,l),R=O.clamp(n.y,a,l),P=O.clamp(i.y,a,l),L=O.clamp(o.y,a,l),F=Math.max(D,P),y=Math.min(R,L),I=O.negativePiToPi(t.z),M=O.negativePiToPi(n.z),B=O.negativePiToPi(i.z),U=O.negativePiToPi(o.z),V=Math.max(I,B),W=Math.min(M,U),H=N.getScale(e,qye);if(v===0||A>v||F>y||O.equalsEpsilon(H.x,0,void 0,p)||O.equalsEpsilon(H.y,0,void 0,p)||O.equalsEpsilon(H.z,0,void 0,p))return!1;this._minimumRadius=x,this._maximumRadius=T,this._minimumHeight=D,this._maximumHeight=R,this._minimumAngle=I,this._maximumAngle=M,this.shapeTransform=N.clone(e,this.shapeTransform),this.orientedBoundingBox=w7(A,v,F,y,V,W,this.shapeTransform,this.orientedBoundingBox),this.boundTransform=N.fromRotationTranslation(this.orientedBoundingBox.halfAxes,this.orientedBoundingBox.center,this.boundTransform),this.boundingSphere=ne.fromOrientedBoundingBox(this.orientedBoundingBox,this.boundingSphere);let ae=x===r&&T===s,se=D===a&&R===l,he=M<I,ge=M-I+he*h,le=ge>m+b&&ge<h-b,me=ge<m-b,Me=ge>=m-b&&ge<=m+b,Ge=le||me||Me,De=O.equalsEpsilon(I,u,void 0,_),ke=O.equalsEpsilon(M,f,void 0,_),He=A===r,ft=W<V,Ie=W-V+ft*h,Kt=Ie>=m-b&&Ie<h-b,Pt=Ie>b&&Ie<m-b,dt=Ie<=b,rn=Kt||Pt||dt,{shaderUniforms:Vt,shaderDefines:Ae}=this;for(let et in Ae)Ae.hasOwnProperty(et)&&(Ae[et]=void 0);let Qe=0;if(Ae.CYLINDER_INTERSECTION_INDEX_RADIUS_MAX=Qe,Qe+=1,He||(Ae.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN=!0,Ae.CYLINDER_INTERSECTION_INDEX_RADIUS_MIN=Qe,Qe+=1),Vt.cylinderRenderRadiusMinMax=k.fromElements(A,v,Vt.cylinderRenderRadiusMinMax),A===v&&(Ae.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT=!0),!ae){Ae.CYLINDER_HAS_SHAPE_BOUNDS_RADIUS=!0;let et=T-x,at=0,$t=1;et!==0&&(at=1/et,$t=-x/et),Vt.cylinderUvToShapeUvRadius=k.fromElements(at,$t,Vt.cylinderUvToShapeUvRadius)}if(!se){Ae.CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT=!0;let et=R-D,at=0,$t=1;et!==0&&(at=2/et,$t=-(D+1)/et),Vt.cylinderUvToShapeUvHeight=k.fromElements(at,$t,Vt.cylinderUvToShapeUvHeight)}if(Vt.cylinderRenderHeightMinMax=k.fromElements(F,y,Vt.cylinderRenderHeightMinMax),he&&(Ae.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED=!0),rn&&(Ae.CYLINDER_HAS_RENDER_BOUNDS_ANGLE=!0,Ae.CYLINDER_INTERSECTION_INDEX_ANGLE=Qe,Kt?(Ae.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF=!0,Qe+=1):Pt?(Ae.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF=!0,Qe+=2):dt&&(Ae.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO=!0,Qe+=2),Vt.cylinderRenderAngleMinMax=k.fromElements(V,W,Vt.cylinderRenderAngleMinMax)),Ge){Ae.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE=!0,De&&(Ae.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY=!0),ke&&(Ae.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY=!0);let et=(I-u)/h,at=(M-u)/h,$t=1-ge/h;if(Vt.cylinderShapeUvAngleMinMax=k.fromElements(et,at,Vt.cylinderShapeUvAngleMinMax),Vt.cylinderShapeUvAngleRangeZeroMid=(at+.5*$t)%1,ge<=b)Vt.cylinderUvToShapeUvAngle=k.fromElements(0,1,Vt.cylinderUvToShapeUvAngle);else{let pe=h/ge,_e=-(I-u)/ge;Vt.cylinderUvToShapeUvAngle=k.fromElements(pe,_e,Vt.cylinderUvToShapeUvAngle)}}return this.shaderMaximumIntersectionsLength=Qe,!0};zr.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){C.typeOf.number("tileLevel",e),C.typeOf.number("tileX",t),C.typeOf.number("tileY",n),C.typeOf.number("tileZ",i),C.typeOf.object("result",o);let r=this._minimumRadius,s=this._maximumRadius,a=this._minimumHeight,l=this._maximumHeight,u=this._minimumAngle,f=this._maximumAngle,h=1/Math.pow(2,e),m=O.lerp(r,s,t*h),p=O.lerp(r,s,(t+1)*h),_=O.lerp(a,l,n*h),b=O.lerp(a,l,(n+1)*h),x=O.lerp(u,f,i*h),T=O.lerp(u,f,(i+1)*h);return w7(m,p,_,b,x,T,this.shapeTransform,o)};var Gye=new d,jye=new d,Pmt=new d;zr.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){C.typeOf.object("spatialNode",e),C.typeOf.object("tileDimensions",t),C.typeOf.object("tileUv",n),C.typeOf.object("result",i);let o=1/Math.pow(2,e.level),r=d.divideComponents(d.ONE,t,Gye),s=d.multiplyByScalar(r,o,Gye),a=d.multiplyByScalar(d.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,jye),o,jye),l=d.add(a,s,Pmt),u=this._minimumRadius,f=this._maximumRadius,h=this._minimumHeight,m=this._maximumHeight,p=this._minimumAngle,_=this._maximumAngle,b=O.lerp(u,f,a.x),x=O.lerp(u,f,l.x),T=O.lerp(h,m,a.y),E=O.lerp(h,m,l.y),S=O.lerp(p,_,a.z),A=O.lerp(p,_,l.z);return w7(b,x,T,E,S,A,this.shapeTransform,i)};zr.DefaultMinBounds=Object.freeze(new d(0,-1,-O.PI));zr.DefaultMaxBounds=Object.freeze(new d(1,1,+O.PI));var Rmt=5,Mmt=new Array(Rmt),Lmt=new d,Nmt=new q,Fmt=new N,Bmt=new N,kmt=new N,E7=new N,Umt=new d,zmt=new d,Vmt=new d,Yye=new Array(8);for(let e=0;e<8;e++)Yye[e]=new d;function Wye(e,t,n){return Math.abs(ee.dot(e,t))<n}function Hmt(e){let t=N.getColumn(e,0,Umt),n=N.getColumn(e,1,zmt),i=N.getColumn(e,2,Vmt),o=O.EPSILON4;return Wye(t,n,o)&&Wye(n,i,o)}function Gmt(e,t){let n=Yye;d.fromElements(-.5,-.5,-.5,n[0]),d.fromElements(-.5,-.5,.5,n[1]),d.fromElements(-.5,.5,-.5,n[2]),d.fromElements(-.5,.5,.5,n[3]),d.fromElements(.5,-.5,-.5,n[4]),d.fromElements(.5,-.5,.5,n[5]),d.fromElements(.5,.5,-.5,n[6]),d.fromElements(.5,.5,.5,n[7]);for(let i=0;i<8;++i)N.multiplyByPoint(e,n[i],n[i]);return wn.fromPoints(n,t)}function w7(e,t,n,i,o,r,s,a){let l=zr.DefaultMinBounds,u=zr.DefaultMaxBounds,f=l.x,h=u.x,m=l.y,p=u.y,_=l.z,b=u.z;if(e===f&&t===h&&n===m&&i===p&&o===_&&r===b)return a.center=N.getTranslation(s,a.center),a.halfAxes=N.getMatrix3(s,a.halfAxes),a;r<o&&(r+=O.TWO_PI);let T=r-o,E=o+T*.5,S=Mmt,A=0;S[A++]=o,S[A++]=r,S[A++]=E,T>O.PI&&(S[A++]=E-O.PI_OVER_TWO,S[A++]=E+O.PI_OVER_TWO);let v=1,D=1,R=-1,P=-1;for(let he=0;he<A;++he){let ge=S[he]-E,le=Math.cos(ge),me=Math.sin(ge),Me=le*e,Ge=me*e,De=le*t,ke=me*t;v=Math.min(v,Me),D=Math.min(D,Ge),v=Math.min(v,De),D=Math.min(D,ke),R=Math.max(R,Me),P=Math.max(P,Ge),R=Math.max(R,De),P=Math.max(P,ke)}let L=R-v,F=P-D,y=i-n,I=(v+R)*.5,M=(D+P)*.5,B=(n+i)*.5,U=d.fromElements(I,M,B,Lmt),V=q.fromRotationZ(E,Nmt),W=d.fromElements(L,F,y,qye),H=N.fromScale(W,kmt),X=N.fromRotation(V,Bmt),$=N.fromTranslation(U,Fmt),ae=N.multiplyTransformation(X,N.multiplyTransformation($,H,E7),E7),se=N.multiplyTransformation(s,ae,E7);return Hmt(se)?wn.fromTransformation(se,a):Gmt(se,a)}var e_=zr;function t_(){this.orientedBoundingBox=new wn,this.boundingSphere=new ne,this.boundTransform=new N,this.shapeTransform=new N,this._rectangle=new te,this._minimumHeight=t_.DefaultMinBounds.z,this._maximumHeight=t_.DefaultMaxBounds.z,this._ellipsoid=new Z,this._translation=new d,this._rotation=new q,this.shaderUniforms={ellipsoidRadiiUv:new d,eccentricitySquared:0,evoluteScale:new k,ellipsoidInverseRadiiSquaredUv:new d,ellipsoidRenderLongitudeMinMax:new k,ellipsoidShapeUvLongitudeMinMaxMid:new d,ellipsoidUvToShapeUvLongitude:new k,ellipsoidUvToShapeUvLatitude:new k,ellipsoidRenderLatitudeSinMinMax:new k,ellipsoidInverseHeightDifferenceUv:0,clipMinMaxHeight:new k},this.shaderDefines={ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE:void 0,ELLIPSOID_INTERSECTION_INDEX_LONGITUDE:void 0,ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX:void 0,ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN:void 0,ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX:void 0,ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN:void 0},this.shaderMaximumIntersectionsLength=0}var jmt=new d,Wmt=new d,qmt=new d,Ymt=new d,Xmt=new d,Kmt=new d,$mt=new d,Zmt=new d,Jmt=new q,Xye=new d,Kye=new d,Qmt=new te;t_.prototype.update=function(e,t,n,i,o){let{DefaultMinBounds:r,DefaultMaxBounds:s}=t_;i=g(i,r),o=g(o,s),C.typeOf.object("modelMatrix",e),C.typeOf.object("minBounds",t),C.typeOf.object("maxBounds",n);let a=O.EPSILON10,l=O.EPSILON3,u=O.EPSILON10,f=O.EPSILON10,h=O.EPSILON3,m=N.getScale(e,Zmt),p=d.clone(r,jmt);p.z=-d.minimumComponent(m);let _=d.clamp(t,p,s,Wmt),b=d.clamp(n,p,s,qmt),x=d.clamp(i,p,s,Ymt),T=d.clamp(o,p,s,Xmt),E=d.maximumByComponent(_,x,Kmt),S=d.minimumByComponent(b,T,$mt),A=d.add(m,d.fromElements(b.z,b.z,b.z,Xye),Xye),v=d.maximumComponent(A),D=d.add(m,d.fromElements(S.z,S.z,S.z,Kye),Kye);if(E.y>S.y||E.y===s.y||S.y===r.y||E.z>S.z||O.equalsEpsilon(D,d.ZERO,void 0,a))return!1;this._rectangle=te.fromRadians(_.x,_.y,b.x,b.y),this._translation=N.getTranslation(e,this._translation),this._rotation=N.getRotation(e,this._rotation),this._ellipsoid=Z.fromCartesian3(m,this._ellipsoid),this._minimumHeight=_.z,this._maximumHeight=b.z;let R=te.fromRadians(E.x,E.y,S.x,S.y,Qmt);this.orientedBoundingBox=S7(R,E.z,S.z,this._ellipsoid,this._translation,this._rotation,this.orientedBoundingBox),this.shapeTransform=N.fromRotationTranslation(q.setScale(this._rotation,A,Jmt),this._translation,this.shapeTransform),this.boundTransform=N.fromRotationTranslation(this.orientedBoundingBox.halfAxes,this.orientedBoundingBox.center,this.boundTransform),this.boundingSphere=ne.fromOrientedBoundingBox(this.orientedBoundingBox,this.boundingSphere);let P=s.x-r.x,L=.5*P,F=S.x<E.x,y=S.x-E.x+F*P,I=y<=u,M=y>=L-u&&y<P-u,B=y>u&&y<L-u,U=I||M||B,V=b.x<_.x,W=b.x-_.x+V*P,H=W>L+u&&W<P-u,X=W>=L-u&&W<=L+u,$=W<L-u,ae=H||X||$,se=S.y<-h,he=S.y>=-h&&S.y<=+h,ge=S.y>+h&&S.y<s.y-f,le=se||he||ge,me=E.y>r.y+f&&E.y<-h,Me=E.y>=-h&&E.y<=+h,Ge=E.y>+h,De=me||Me||Ge,ke=le||De,He=b.y-_.y,ft=b.y<-h,Ie=b.y>=-h&&b.y<=+h,Kt=b.y>+h&&b.y<s.y-f,Pt=ft||Ie||Kt,dt=_.y>r.y+f&&_.y<-h,rn=_.y>=-h&&_.y<=+h,Vt=_.y>+h,Qe=Pt||(dt||rn||Vt),{shaderUniforms:et,shaderDefines:at}=this;for(let ot in at)at.hasOwnProperty(ot)&&(at[ot]=void 0);et.ellipsoidRadiiUv=d.divideByScalar(A,v,et.ellipsoidRadiiUv);let{x:$t,z:pe}=et.ellipsoidRadiiUv,_e=pe/$t;et.eccentricitySquared=1-_e*_e,et.evoluteScale=k.fromElements(($t*$t-pe*pe)/$t,(pe*pe-$t*$t)/pe,et.evoluteScale),et.ellipsoidInverseRadiiSquaredUv=d.divideComponents(d.ONE,d.multiplyComponents(et.ellipsoidRadiiUv,et.ellipsoidRadiiUv,et.ellipsoidInverseRadiiSquaredUv),et.ellipsoidInverseRadiiSquaredUv);let rt=0;at.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX=rt,rt+=1,at.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN=rt,rt+=1,et.clipMinMaxHeight=k.fromElements((E.z-b.z)/v,(S.z-b.z)/v,et.clipMinMaxHeight);let Ri=(b.z-_.z)/v;if(et.ellipsoidInverseHeightDifferenceUv=1/Ri,_.z===b.z&&(et.ellipsoidInverseHeightDifferenceUv=0),U&&(at.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE=!0,at.ELLIPSOID_INTERSECTION_INDEX_LONGITUDE=rt,M?(at.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF=!0,rt+=1):B?(at.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF=!0,rt+=2):I&&(at.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO=!0,rt+=2),et.ellipsoidRenderLongitudeMinMax=k.fromElements(E.x,S.x,et.ellipsoidRenderLongitudeMinMax)),ae)if(at.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE=!0,b.x<_.x&&(at.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED=!0),W<=u)et.ellipsoidUvToShapeUvLongitude=k.fromElements(0,1,et.ellipsoidUvToShapeUvLongitude);else{let uo=P/W,ir=-(_.x-r.x)/W;et.ellipsoidUvToShapeUvLongitude=k.fromElements(uo,ir,et.ellipsoidUvToShapeUvLongitude)}if(U){let ot=O.equalsEpsilon(E.x,r.x,void 0,l),uo=O.equalsEpsilon(S.x,s.x,void 0,l);ot&&(at.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY=!0),uo&&(at.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY=!0);let ir=(_.x-r.x)/P,Ja=(b.x-r.x)/P,gr=(S.x-r.x)/P,Vr=1-y/P,Le=(gr+.5*Vr)%1;et.ellipsoidShapeUvLongitudeMinMaxMid=d.fromElements(ir,Ja,Le,et.ellipsoidShapeUvLongitudeMinMaxMid)}if(ke&&(De&&(at.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN=!0,at.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN=rt,me?(at.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF=!0,rt+=1):Me?(at.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF=!0,rt+=1):Ge&&(at.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF=!0,rt+=2)),le&&(at.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX=!0,at.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX=rt,se?(at.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF=!0,rt+=2):he?(at.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF=!0,rt+=1):ge&&(at.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF=!0,rt+=1)),et.ellipsoidRenderLatitudeSinMinMax=k.fromElements(Math.sin(E.y),Math.sin(S.y),et.ellipsoidRenderLatitudeSinMinMax)),Qe)if(at.ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE=!0,He<f)et.ellipsoidUvToShapeUvLatitude=k.fromElements(0,1,et.ellipsoidUvToShapeUvLatitude);else{let uo=(s.y-r.y)/He,ir=(r.y-_.y)/He;et.ellipsoidUvToShapeUvLatitude=k.fromElements(uo,ir,et.ellipsoidUvToShapeUvLatitude)}return this.shaderMaximumIntersectionsLength=rt,!0};var Jye=new te;t_.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){C.typeOf.number("tileLevel",e),C.typeOf.number("tileX",t),C.typeOf.number("tileY",n),C.typeOf.number("tileZ",i),C.typeOf.object("result",o);let r=1/Math.pow(2,e),s=t*r,a=(t+1)*r,l=n*r,u=(n+1)*r,f=i*r,h=(i+1)*r,m=te.subsection(this._rectangle,s,l,a,u,Jye),p=O.lerp(this._minimumHeight,this._maximumHeight,f),_=O.lerp(this._minimumHeight,this._maximumHeight,h);return S7(m,p,_,this._ellipsoid,this._translation,this._rotation,o)};var $ye=new d,Zye=new d,ept=new d;t_.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){C.typeOf.object("spatialNode",e),C.typeOf.object("tileDimensions",t),C.typeOf.object("tileUv",n),C.typeOf.object("result",i);let o=1/Math.pow(2,e.level),r=d.divideComponents(d.ONE,t,$ye),s=d.multiplyByScalar(r,o,$ye),a=d.multiplyByScalar(d.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,Zye),o,Zye),l=d.add(a,s,ept),u=te.subsection(this._rectangle,a.x,a.y,l.x,l.y,Jye),f=O.lerp(this._minimumHeight,this._maximumHeight,a.z),h=O.lerp(this._minimumHeight,this._maximumHeight,l.z);return S7(u,f,h,this._ellipsoid,this._translation,this._rotation,i)};function S7(e,t,n,i,o,r,s){return s=wn.fromRectangle(e,t,n,i,s),s.center=d.add(s.center,o,s.center),s.halfAxes=q.multiply(s.halfAxes,r,s.halfAxes),s}t_.DefaultMinBounds=Object.freeze(new d(-O.PI,-O.PI_OVER_TWO,-Z.WGS84.minimumRadius));t_.DefaultMaxBounds=Object.freeze(new d(O.PI,O.PI_OVER_TWO,10*Z.WGS84.maximumRadius));var Tw=t_;var _u={BOX:"BOX",ELLIPSOID:"ELLIPSOID",CYLINDER:"CYLINDER"};_u.getMinBounds=function(e){switch(e){case _u.BOX:return Qp.DefaultMinBounds;case _u.ELLIPSOID:return Tw.DefaultMinBounds;case _u.CYLINDER:return e_.DefaultMinBounds;default:throw new w(`Invalid shape type ${e}`)}};_u.getMaxBounds=function(e){switch(e){case _u.BOX:return Qp.DefaultMaxBounds;case _u.ELLIPSOID:return Tw.DefaultMaxBounds;case _u.CYLINDER:return e_.DefaultMaxBounds;default:throw new w(`Invalid shape type ${e}`)}};_u.getShapeConstructor=function(e){switch(e){case _u.BOX:return Qp;case _u.ELLIPSOID:return Tw;case _u.CYLINDER:return e_;default:throw new w(`Invalid shape type ${e}`)}};var Nc=Object.freeze(_u);function Ud(e){C.typeOf.object("options",e),C.defined("options.comparator",e.comparator),c(e.maximumLength)&&C.typeOf.number.greaterThanOrEquals("options.maximumLength",e.maximumLength,0),this._comparator=e.comparator,this._maximumLength=e.maximumLength,this._array=c(e.maximumLength)?new Array(e.maximumLength):[],this._length=0}Object.defineProperties(Ud.prototype,{length:{get:function(){return this._length}},maximumLength:{get:function(){return this._maximumLength},set:function(e){if(c(e)){for(C.typeOf.number.greaterThanOrEquals("maximumLength",e,0);this._length>e;)this.removeMinimum();this._array.length=e}this._maximumLength=e}},internalArray:{get:function(){return this._array}},comparator:{get:function(){return this._comparator}}});Ud.prototype.clone=function(){let e=this._maximumLength,t=this._comparator,n=this._array,i=this._length,o=new Ud({comparator:t,maximumLength:e});o._length=i;for(let r=0;r<i;r++)o._array[r]=n[r];return o};Ud.prototype.reset=function(){this._length=0;let e=this._maximumLength;if(c(e))for(let t=0;t<e;t++)this._array[t]=void 0;else this._array.length=0};Ud.prototype.resort=function(){let e=this._length;for(let t=0;t<e;t++)Qye(this,t)};Ud.prototype.insert=function(e){let t,n=this._maximumLength;if(c(n)){if(n===0)return;if(this._length===n){let o=this._array[0];if(this._comparator(e,o)<=0)return e;t=this.removeMinimum()}}let i=this._length;return this._array[i]=e,this._length++,Qye(this,i),t};Ud.prototype.removeMinimum=function(){let e=this._length;if(e===0)return;this._length--;let t=this._array[0];return e>=2&&(this._array[0]=this._array[e-1],ebe(this,0)),this._array[e-1]=void 0,t};Ud.prototype.removeMaximum=function(){let e=this._length;if(e===0)return;this._length--;let t;if(e<=2)t=this._array[e-1];else{let n=A7(this,1,2)?1:2;t=this._array[n],this._array[n]=this._array[e-1],e>=4&&ebe(this,n)}return this._array[e-1]=void 0,t};Ud.prototype.getMinimum=function(){if(this._length!==0)return this._array[0]};Ud.prototype.getMaximum=function(){let e=this._length;if(e!==0)return e<=2?this._array[e-1]:this._array[A7(this,1,2)?1:2]};function bH(e,t,n){let i=e._array,o=i[t];i[t]=i[n],i[n]=o}function CI(e,t,n){return e._comparator(e._array[t],e._array[n])<0}function A7(e,t,n){return e._comparator(e._array[t],e._array[n])>0}function Qye(e,t){if(t===0)return;let n=Math.floor(O.log2(t+1))%2===0,i=Math.floor((t-1)/2),o=CI(e,t,i);for(o!==n&&(bH(e,t,i),t=i);t>=3;){let r=Math.floor((t-3)/4);if(CI(e,t,r)!==o)break;bH(e,t,r),t=r}}function ebe(e,t){let n=e._length,i=Math.floor(O.log2(t+1))%2===0,o;for(;(o=2*t+1)<n;){let r=o,s=o+1;if(s<n){CI(e,s,r)===i&&(r=s);let a=2*o+1,l=Math.max(Math.min(n-a,4),0);for(let u=0;u<l;u++){let f=a+u;CI(e,f,r)===i&&(r=f)}}if(CI(e,r,t)===i&&(bH(e,r,t),r!==o&&r!==s)){let a=Math.floor((r-1)/2);A7(e,r,a)===i&&bH(e,r,a)}t=r}}var Cw=Ud;var tbe=Object.freeze({UNLOADED:0,RECEIVING:1,RECEIVED:2,LOADED:3,FAILED:4,UNAVAILABLE:5});function xH(e,t){this.spatialNode=e,this.keyframe=t,this.state=tbe.UNLOADED,this.metadata=[],this.megatextureIndex=-1,this.priority=-Number.MAX_VALUE,this.highPriorityFrameNumber=-1}xH.priorityComparator=function(e,t){return e.priority-t.priority};xH.searchComparator=function(e,t){return e.keyframe-t.keyframe};xH.LoadState=tbe;var Ki=xH;function vy(e,t,n,i,o){i===zt.UNSIGNED_SHORT&&(i=zt.FLOAT32);let r=e.floatingPointTexture;if(i===zt.FLOAT32&&!r)throw new ie("Floating point texture not supported");let s;i===zt.FLOAT32||i===zt.FLOAT64?s=Ne.FLOAT:i===zt.UINT8&&(s=Ne.UNSIGNED_BYTE);let a;n===1?a=e.webgl2?Re.RED:Re.LUMINANCE:n===2?a=e.webgl2?Re.RG:Re.LUMINANCE_ALPHA:n===3?a=Re.RGB:n===4&&(a=Re.RGBA);let l=512*1024*1024,u=128*1024*1024;o=Math.min(g(o,u),l);let f=ht.maximumTextureSize,h=zt.getSizeInBytes(i),m=Math.floor(o/(n*h)),p=Math.min(f,O.previousPowerOfTwo(Math.floor(Math.sqrt(m)))),_=Math.ceil(Math.sqrt(t.x)),b=Math.ceil(t.z/_),x=_*t.x,T=b*t.y,E=Math.floor(p/x),S=Math.floor(p/T);if(E===0||S===0)throw new ie("Tileset is too large to fit into megatexture");this.channelCount=n,this.componentType=i,this.voxelCountPerTile=d.clone(t,new d),this.maximumTileCount=E*S,this.regionCountPerMegatexture=new k(E,S),this.voxelCountPerRegion=new k(x,T),this.sliceCountPerRegion=new k(_,b),this.voxelSizeUv=new k(1/p,1/p),this.sliceSizeUv=new k(t.x/p,t.y/p),this.regionSizeUv=new k(x/p,T/p),this.texture=new Ot({context:e,pixelFormat:a,pixelDatatype:s,flipY:!1,width:p,height:p,sampler:new Jt({wrapS:pn.CLAMP_TO_EDGE,wrapT:pn.CLAMP_TO_EDGE,minificationFilter:Wt.LINEAR,magnificationFilter:si.LINEAR})});let A=zt.toComponentDatatype(i);this.tileVoxelDataTemp=j.createTypedArray(A,x*T*n),this.nodes=new Array(this.maximumTileCount);for(let v=0;v<this.maximumTileCount;v++)this.nodes[v]=new tpt(v);for(let v=0;v<this.maximumTileCount;v++){let D=this.nodes[v];D.previousNode=v>0?this.nodes[v-1]:void 0,D.nextNode=v<this.maximumTileCount-1?this.nodes[v+1]:void 0}this.occupiedList=void 0,this.emptyList=this.nodes[0],this.occupiedCount=0}function tpt(e){this.index=e,this.nextNode=void 0,this.previousNode=void 0}vy.prototype.add=function(e){if(this.isFull())throw new w("Trying to add when there are no empty spots");let t=this.emptyList;this.emptyList=this.emptyList.nextNode,c(this.emptyList)&&(this.emptyList.previousNode=void 0),t.nextNode=this.occupiedList,c(t.nextNode)&&(t.nextNode.previousNode=t),this.occupiedList=t;let n=t.index;return this.writeDataToTexture(n,e),this.occupiedCount++,n};vy.prototype.remove=function(e){if(e<0||e>=this.maximumTileCount)throw new w("Megatexture index out of bounds");let t=this.nodes[e];c(t.previousNode)&&(t.previousNode.nextNode=t.nextNode),c(t.nextNode)&&(t.nextNode.previousNode=t.previousNode),t.nextNode=this.emptyList,c(t.nextNode)&&(t.nextNode.previousNode=t),t.previousNode=void 0,this.emptyList=t,this.occupiedCount--};vy.prototype.isFull=function(){return this.emptyList===void 0};vy.getApproximateTextureMemoryByteLength=function(e,t,n,i){i===zt.UNSIGNED_SHORT&&(i=zt.FLOAT32);let o=zt.getSizeInBytes(i),r=e*t.x*t.y*t.z,s=Math.ceil(Math.sqrt(t.x)),a=Math.ceil(t.z/s),l=s*t.x,u=a*t.y,f=O.previousPowerOfTwo(Math.floor(Math.sqrt(r)));for(;;){let m=Math.floor(f/l),p=Math.floor(f/u);if(m*p>=e)break;f*=2}return f*f*n*o};vy.prototype.writeDataToTexture=function(e,t){let n=t.constructor===Uint16Array?new Float32Array(t):t,i=this.voxelCountPerTile,o=this.sliceCountPerRegion,r=this.voxelCountPerRegion,s=this.channelCount,a=this.tileVoxelDataTemp;for(let b=0;b<i.z;b++){let x=b%o.x*i.x,T=Math.floor(b/o.x)*i.y;for(let E=0;E<i.y;E++)for(let S=0;S<i.x;S++){let A=b*i.y*i.x+E*i.x+S,v=(T+E)*r.x+(x+S);for(let D=0;D<s;D++)a[v*s+D]=n[A*s+D]}}let l=this.regionCountPerMegatexture,u=r.x,f=r.y,h=e%l.x*r.x,m=Math.floor(e/l.x)*r.y,_={source:{arrayBufferView:a,width:u,height:f},xOffset:h,yOffset:m};this.texture.copyFrom(_)};vy.prototype.isDestroyed=function(){return!1};vy.prototype.destroy=function(){return this.texture=this.texture&&this.texture.destroy(),ue(this)};var EI=vy;function If(e,t,n,i,o,r,s){this.children=void 0,this.parent=o,this.level=e,this.x=t,this.y=n,this.z=i,this.dimensions=d.clone(s),this.keyframeNodes=[],this.renderableKeyframeNodes=[],this.renderableKeyframeNodeLerp=0,this.renderableKeyframeNodePrevious=void 0,this.renderableKeyframeNodeNext=void 0,this.orientedBoundingBox=new wn,this.approximateVoxelSize=0,this.screenSpaceError=0,this.visitedFrameNumber=-1,this.computeBoundingVolumes(r)}var npt=new d;If.prototype.computeBoundingVolumes=function(e){this.orientedBoundingBox=e.computeOrientedBoundingBoxForTile(this.level,this.x,this.y,this.z,this.orientedBoundingBox);let t=q.getScale(this.orientedBoundingBox.halfAxes,npt),n=2*d.maximumComponent(t);this.approximateVoxelSize=n/d.minimumComponent(this.dimensions)};If.prototype.constructChildNodes=function(e){let{level:t,x:n,y:i,z:o}=this,r=n*2,s=i*2,a=o*2,l=s+1,u=r+1,f=a+1,h=t+1,m=[[h,r,s,a],[h,u,s,a],[h,r,l,a],[h,u,l,a],[h,r,s,f],[h,u,s,f],[h,r,l,f],[h,u,l,f]];this.children=m.map(([p,_,b,x])=>new If(p,_,b,x,this,e,this.dimensions))};If.prototype.visibility=function(e,t){let n=this.orientedBoundingBox;return e.cullingVolume.computeVisibilityWithPlaneMask(n,t)};If.prototype.computeScreenSpaceError=function(e,t){let n=this.orientedBoundingBox,i=Math.sqrt(n.distanceSquaredTo(e));i=Math.max(i,O.EPSILON7);let o=this.approximateVoxelSize,r=t*(o/i);this.screenSpaceError=r};var nbe={keyframe:0};function wI(e,t){return nbe.keyframe=e,Xo(t,nbe,Ki.searchComparator)}If.prototype.computeSurroundingRenderableKeyframeNodes=function(e){let t=this,n=t.level,i=Math.floor(e),o=Math.ceil(e),r,s,a=+Number.MAX_VALUE,l=+Number.MAX_VALUE;for(;c(t);){let{renderableKeyframeNodes:h}=t;if(h.length>=1){let m=ipt(i,h),p=h[m],_=o===i||i<p.keyframe?m:Math.min(m+1,h.length-1),b=h[_],x=i-p.keyframe,T=ibe(n-t.level,x);T<a&&(a=T,r=p);let E=b.keyframe-o,S=ibe(n-t.level,E);if(S<l&&(l=S,s=b),x===0&&E===0)break}t=t.parent}if(this.renderableKeyframeNodePrevious=r,this.renderableKeyframeNodeNext=s,!c(r)||!c(s))return;let u=r.keyframe,f=s.keyframe;this.renderableKeyframeNodeLerp=u===f?0:O.clamp((e-u)/(f-u),0,1)};function ipt(e,t){let n=wI(e,t);return n<0?O.clamp(~n-1,0,t.length-1):n}function ibe(e,t){let n=Math.exp(e*4),i=t>=0?1:-200;return e*n+t*i}If.prototype.isVisited=function(e){return this.visitedFrameNumber===e};If.prototype.createKeyframeNode=function(e){let t=wI(e,this.keyframeNodes);if(t<0){t=~t;let n=new Ki(this,e);this.keyframeNodes.splice(t,0,n)}};If.prototype.destroyKeyframeNode=function(e,t){let n=e.keyframe,i=wI(n,this.keyframeNodes);if(i<0)throw new w("Keyframe node does not exist.");if(this.keyframeNodes.splice(i,1),e.megatextureIndex!==-1){for(let r=0;r<t.length;r++)t[r].remove(e.megatextureIndex);let o=wI(n,this.renderableKeyframeNodes);if(o<0)throw new w("Renderable keyframe node does not exist.");this.renderableKeyframeNodes.splice(o,1)}e.spatialNode=void 0,e.state=Ki.LoadState.UNLOADED,e.metadata={},e.megatextureIndex=-1,e.priority=-Number.MAX_VALUE,e.highPriorityFrameNumber=-1};If.prototype.addKeyframeNodeToMegatextures=function(e,t){if(e.state!==Ki.LoadState.RECEIVED||e.megatextureIndex!==-1||e.metadata.length!==t.length)throw new w("Keyframe node cannot be added to megatexture");for(let o=0;o<t.length;o++){let r=t[o];e.megatextureIndex=r.add(e.metadata[o])}e.state=Ki.LoadState.LOADED;let n=this.renderableKeyframeNodes,i=wI(e.keyframe,n);if(i>=0)throw new w("Keyframe already renderable");i=~i,n.splice(i,0,e)};If.prototype.isRenderable=function(e){let t=this.renderableKeyframeNodePrevious,n=this.renderableKeyframeNodeNext,i=this.level;return c(t)&&c(n)&&(t.spatialNode.level===i||n.spatialNode.level===i)&&this.visitedFrameNumber===e};var TH=If;function n_(e,t,n,i,o,r,s){this._primitive=e,this.megatextures=new Array(i.length);for(let _=0;_<i.length;_++){let b=i[_],x=Ct.getComponentCount(b),T=o[_];this.megatextures[_]=new EI(t,n,x,T,s)}let a=this.megatextures[0].maximumTileCount;this._simultaneousRequestCount=0,this._debugPrint=!1,this._frameNumber=0;let l=e._shape;this.rootNode=new TH(0,0,0,0,void 0,l,n),this._priorityQueue=new Cw({maximumLength:a,comparator:Ki.priorityComparator}),this._highPriorityKeyframeNodes=new Array(a),this._keyframeNodesInMegatexture=new Array(a),this._keyframeCount=r,this._sampleCount=void 0,this._keyframeLocation=0,this._binaryTreeKeyframeWeighting=new Array(r);let u=this._binaryTreeKeyframeWeighting;u[0]=0,u[r-1]=0,v7(u,1,r-2,0);let f=9,h=2048,m=Math.floor(h/f),p=Math.ceil(a/m);this.internalNodeTexture=new Ot({context:t,pixelFormat:Re.RGBA,pixelDatatype:Ne.UNSIGNED_BYTE,flipY:!1,width:h,height:p,sampler:new Jt({minificationFilter:Wt.NEAREST,magnificationFilter:si.NEAREST})}),this.internalNodeTilesPerRow=m,this.internalNodeTexelSizeUv=new k(1/h,1/p),this.leafNodeTexture=void 0,this.leafNodeTilesPerRow=void 0,this.leafNodeTexelSizeUv=new k}n_.prototype.findKeyframeNode=function(e){return this._keyframeNodesInMegatexture.find(function(t){return t.megatextureIndex===e})};function v7(e,t,n,i){if(t>n)return;let o=Math.floor((t+n)/2);e[o]=i,v7(e,t,o-1,i+1),v7(e,o+1,n,i+1)}n_.simultaneousRequestCountMaximum=50;n_.prototype.update=function(e,t,n,i){let o=this._primitive,r=e.context,s=this.megatextures[0].maximumTileCount,a=this._keyframeCount,l=o._levelBlendFactor,u=l>0,f=a>1,h=(u?2:1)*(f?2:1);this._sampleCount=h;let m=h>=2;if(m&&!c(this.leafNodeTexture)){let E=Math.floor(512),S=Math.ceil(s/E);this.leafNodeTexture=new Ot({context:r,pixelFormat:Re.RGBA,pixelDatatype:Ne.UNSIGNED_BYTE,flipY:!1,width:1024,height:S,sampler:new Jt({minificationFilter:Wt.NEAREST,magnificationFilter:si.NEAREST})}),this.leafNodeTexelSizeUv=k.fromElements(1/1024,1/S,this.leafNodeTexelSizeUv),this.leafNodeTilesPerRow=E}else!m&&c(this.leafNodeTexture)&&(this.leafNodeTexture=this.leafNodeTexture.destroy());if(this._keyframeLocation=O.clamp(t,0,a-1),n&&obe(this,this.rootNode),i)return;this._frameNumber=e.frameNumber;let p=yi();spt(this,e);let _=yi();lpt(this,h,l);let b=yi();if(this._debugPrint){let x=_-p,T=b-_,E=b-p;cpt(this,x,T,E)}};n_.prototype.isRenderable=function(e){return e.isRenderable(this._frameNumber)};n_.prototype.isDestroyed=function(){return!1};n_.prototype.destroy=function(){let e=this.megatextures,t=e.length;for(let n=0;n<t;n++)e[n]=e[n]&&e[n].destroy();return this.internalNodeTexture=this.internalNodeTexture&&this.internalNodeTexture.destroy(),this.leafNodeTexture=this.leafNodeTexture&&this.leafNodeTexture.destroy(),ue(this)};function obe(e,t){if(t.computeBoundingVolumes(e._primitive._shape),c(t.children))for(let n=0;n<8;n++){let i=t.children[n];obe(e,i)}}function opt(e,t){if(e._simultaneousRequestCount>=n_.simultaneousRequestCountMaximum)return;let n=e._primitive._provider;function i(l){e._simultaneousRequestCount--;let u=n.types.length;if(!c(l))t.state=Ki.LoadState.UNAVAILABLE;else if(l===Ki.LoadState.FAILED)t.state=Ki.LoadState.FAILED;else if(!Array.isArray(l)||l.length!==u)t.state=Ki.LoadState.FAILED;else{let f=e.megatextures;for(let h=0;h<u;h++){let{voxelCountPerTile:m,channelCount:p}=f[h],{x:_,y:b,z:x}=m,T=_*b*x,E=l[h],S=T*p;if(E.length===S)t.metadata[h]=E,t.state=Ki.LoadState.RECEIVED;else{t.state=Ki.LoadState.FAILED;break}}}}function o(){e._simultaneousRequestCount--,t.state=Ki.LoadState.FAILED}let{keyframe:r,spatialNode:s}=t,a=n.requestData({tileLevel:s.level,tileX:s.x,tileY:s.y,tileZ:s.z,keyframe:r});c(a)?(e._simultaneousRequestCount++,t.state=Ki.LoadState.RECEIVING,a.then(i).catch(o)):t.state=Ki.LoadState.FAILED}function rpt(e){return e/(1+e)}function spt(e,t){let n=e._frameNumber,i=e._primitive,o=i._shape,r=i.screenSpaceError,s=e._priorityQueue,a=e._keyframeCount,l=O.clamp(Math.floor(e._keyframeLocation),0,a-2),u=l+1,{camera:f,context:h,pixelRatio:m}=t,{positionWC:p,frustum:_}=f,x=h.drawingBufferHeight/m/_.sseDenominator;function T(F,y){if(F.computeScreenSpaceError(p,x),y=F.visibility(t,y),y===rs.MASK_OUTSIDE)return;if(F.visitedFrameNumber=n,a===1)F.createKeyframeNode(0);else if(F.keyframeNodes.length!==a)for(let V=0;V<a;V++)F.createKeyframeNode(V);let{screenSpaceError:I,keyframeNodes:M}=F,B=rpt(I),U=!1;for(let V=0;V<M.length;V++){let W=M[V];W.priority=10*B+apt(l,W.keyframe,u,e),W.state!==Ki.LoadState.UNAVAILABLE&&W.state!==Ki.LoadState.FAILED&&W.priority!==-Number.MAX_VALUE&&s.insert(W),W.state===Ki.LoadState.LOADED&&(U=!0)}if(I<r||!U){F.children=void 0;return}c(F.children)||F.constructChildNodes(o);for(let V=0;V<8;V++){let W=F.children[V];T(W,y)}}s.reset(),T(e.rootNode,rs.MASK_INDETERMINATE);let E=e._highPriorityKeyframeNodes,S=0,A;for(;s.length>0;)A=s.removeMaximum(),A.highPriorityFrameNumber=n,E[S]=A,S++;let v=e._keyframeNodesInMegatexture,D=e.megatextures[0],R=D.occupiedCount;v.length=R,v.sort(function(F,y){return F.highPriorityFrameNumber===y.highPriorityFrameNumber?y.priority-F.priority:y.highPriorityFrameNumber-F.highPriorityFrameNumber});let P=0,L=0;for(let F=0;F<S;F++)if(A=E[F],!(A.state===Ki.LoadState.LOADED||A.spatialNode===void 0)&&(A.state===Ki.LoadState.UNLOADED&&opt(e,A),A.state===Ki.LoadState.RECEIVED)){let y=0;if(D.isFull()){y=R-1-P,P++;let I=v[y];I.spatialNode.destroyKeyframeNode(I,e.megatextures)}else y=R+L,L++;A.spatialNode.addKeyframeNodeToMegatextures(A,e.megatextures),v[y]=A}}function apt(e,t,n,i){let o=Math.min(Math.abs(t-e),Math.abs(t-n)),r=Math.max(e,i._keyframeCount-n-1,1),s=Math.pow(1-o/r,4),a=Math.exp(-i._binaryTreeKeyframeWeighting[t]);return O.lerp(a,s,.15+.85*s)}function cpt(e,t,n,i){let o=e._keyframeCount,r=e.rootNode,s=Object.keys(Ki.LoadState).length,a=new Array(s),l=new Array(s),u=0;for(let T=0;T<s;T++){let E=new Array(o);a[T]=E;for(let S=0;S<o;S++)E[S]=0;l[T]=0}function f(T){let E=T.keyframeNodes;for(let S=0;S<E.length;S++){let A=E[S],v=A.keyframe,D=A.state;a[D][v]+=1,l[D]+=1,u++}if(c(T.children))for(let S=0;S<8;S++){let A=T.children[S];f(A)}}f(r);let h=`KEYFRAMES: ${a[Ki.LoadState.LOADED]}`,m=`UNLOADED: ${l[Ki.LoadState.UNLOADED]} | RECEIVING: ${l[Ki.LoadState.RECEIVING]} | RECEIVED: ${l[Ki.LoadState.RECEIVED]} | LOADED: ${l[Ki.LoadState.LOADED]} | FAILED: ${l[Ki.LoadState.FAILED]} | UNAVAILABLE: ${l[Ki.LoadState.UNAVAILABLE]} | TOTAL: ${u}`,p=Math.round(t*100)/100,_=Math.round(n*100)/100,b=Math.round(i*100)/100,x=`LOAD: ${p} | OCT: ${_} | ALL: ${b}`;console.log(`${h} || ${m} || ${x}`)}var CH={INTERNAL:0,LEAF:1,PACKED_LEAF_FROM_PARENT:2};function lpt(e,t,n){let i=e._primitive._screenSpaceError,o=e._keyframeLocation,r=e._frameNumber,s=t>=2,a=0,l=0,u=[],f=[];function h(p,_,b,x,T){let E=!1;if(c(p.children))for(let S=0;S<8;S++){let A=p.children[S];A.computeSurroundingRenderableKeyframeNodes(o),A.isRenderable(r)&&(E=!0)}if(E){u[T]=CH.INTERNAL<<16|_,u[b]=x,a++,x=_,T=x*9+1;for(let S=0;S<8;S++){let A=p.children[S];_=a,b=_*9+0,h(A,_,b,x,T+S)}}else{if(s){let S=l*5,A=p.renderableKeyframeNodePrevious,v=p.level-A.spatialNode.level,D=A.spatialNode.parent,R=c(D)?D.renderableKeyframeNodePrevious:A,P=upt(p,i,n),L=v,F=1,y=A.megatextureIndex,I=R.megatextureIndex;f[S+0]=P,f[S+1]=L,f[S+2]=F,f[S+3]=y,f[S+4]=I,u[T]=CH.LEAF<<16|l}else{let S=p.renderableKeyframeNodePrevious,v=p.level-S.spatialNode.level===0?CH.LEAF:CH.PACKED_LEAF_FROM_PARENT;u[T]=v<<16|S.megatextureIndex}l++}}let m=e.rootNode;m.computeSurroundingRenderableKeyframeNodes(o),m.isRenderable(r)&&h(m,0,0,0,0),fpt(u,9,e.internalNodeTilesPerRow,e.internalNodeTexture),s&&dpt(f,2,e.leafNodeTilesPerRow,e.leafNodeTexture)}function upt(e,t,n){if(e.parent===void 0)return 0;let i=e.screenSpaceError,o=e.parent.screenSpaceError,s=((t-i)/(o-i)+n-1)/n;return O.clamp(s,0,1)}function fpt(e,t,n,i){let o=Re.componentsLength(i.pixelFormat),r=Math.ceil(e.length/t),s=Math.max(1,t*Math.min(r,n)),a=Math.max(1,Math.ceil(r/n)),l=new Uint8Array(s*a*o);for(let h=0;h<e.length;h++){let m=e[h],p=h*o;for(let _=0;_<o;_++)l[p+_]=m>>>_*8&255}let f={source:{arrayBufferView:l,width:s,height:a},xOffset:0,yOffset:0};i.copyFrom(f)}function dpt(e,t,n,i){let o=Re.componentsLength(i.pixelFormat),r=5,s=Math.ceil(e.length/r),a=Math.max(1,t*Math.min(s,n)),l=Math.max(1,Math.ceil(s/n)),u=new Uint8Array(a*l*o);for(let m=0;m<s;m++){let p=e[m*r+0],_=e[m*r+1],b=e[m*r+2],x=e[m*r+3],T=e[m*r+4],E=O.clamp(Math.floor(65536*p),0,65535);u[m*8+0]=E>>>0&255,u[m*8+1]=E>>>8&255,u[m*8+2]=_&255,u[m*8+3]=b&255,u[m*8+4]=x>>>0&255,u[m*8+5]=x>>>8&255,u[m*8+6]=T>>>0&255,u[m*8+7]=T>>>8&255}let h={source:{arrayBufferView:u,width:a,height:l},xOffset:0,yOffset:0};i.copyFrom(h)}n_.getApproximateTextureMemoryByteLength=function(e,t,n,i){let o=0,r=n.length;for(let s=0;s<r;s++){let a=n[s],l=i[s],u=Ct.getComponentCount(a);o+=EI.getApproximateTextureMemoryByteLength(e,t,u,l)}return o};var SI=n_;var hpt={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",MAT2:"mat2",MAT3:"mat3",MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},Ew=Object.freeze(hpt);function mpt(e,t,n){let i=new Uint8ClampedArray(e.buffer),o=new ImageData(i,t,n),r=document.createElement("canvas");return r.width=t,r.height=n,r.getContext("2d").putImageData(o,0,0),r}var EH=mpt;function ww(){this._defaultTexture=void 0,this._textures={},this._loadedImages=[],this._lastUpdatedFrame=-1}ww.prototype.getTexture=function(e){return this._textures[e]};function ppt(e,t,n){n.resource.fetchImage().then(function(i){e._loadedImages.push({id:t,image:i,textureUniform:n})}).catch(function(){let i=e._textures[t];c(i)&&i!==e._defaultTexture&&i.destroy(),e._textures[t]=e._defaultTexture})}ww.prototype.loadTexture2D=function(e,t){c(t.typedArray)?this._loadedImages.push({id:e,textureUniform:t}):ppt(this,e,t)};function _pt(e,t,n){let{id:i,textureUniform:o,image:r}=t,s=n.webgl2?wH(o,r,n):gpt(o,r,n),a=e._textures[i];c(a)&&a!==n.defaultTexture&&a.destroy(),e._textures[i]=s}function wH(e,t,n){let{typedArray:i,sampler:o}=e,r=c(i)?sbe(e,n):new Ot({context:n,source:t,sampler:o});return rbe(o)&&r.generateMipmap(),r}function gpt(e,t,n){let{typedArray:i,sampler:o}=e,r=rbe(o),s=o.wrapS===pn.REPEAT||o.wrapS===pn.MIRRORED_REPEAT||o.wrapT===pn.REPEAT||o.wrapT===pn.MIRRORED_REPEAT,{width:a,height:l}=c(i)?e:t,u=[a,l].every(O.isPowerOfTwo);if((r||s)&&!u)if(c(i)){if(e.pixelDatatype===Ne.UNSIGNED_BYTE){let h=EH(i,a,l),m=Db(h);return wH({sampler:o},m,n)}}else{let h=Db(t);return wH(e,h,n)}else return wH(e,t,n);return r?console.warn("Texture requires resizing for mipmaps but pixelDataType cannot be resized. The texture may be rendered incorrectly."):s&&console.warn("Texture requires resizing for wrapping but pixelDataType cannot be resized. The texture may be rendered incorrectly."),sbe(e,n)}function rbe(e){return[Wt.NEAREST_MIPMAP_NEAREST,Wt.NEAREST_MIPMAP_LINEAR,Wt.LINEAR_MIPMAP_NEAREST,Wt.LINEAR_MIPMAP_LINEAR].includes(e.minificationFilter)}function sbe(e,t){let{pixelFormat:n,pixelDatatype:i,width:o,height:r,typedArray:s,sampler:a}=e;return new Ot({context:t,pixelFormat:n,pixelDatatype:i,source:{arrayBufferView:s,width:o,height:r},sampler:a,flipY:!1})}ww.prototype.update=function(e){if(e.frameNumber===this._lastUpdatedFrame)return;this._lastUpdatedFrame=e.frameNumber;let t=e.context;this._defaultTexture=t.defaultTexture;let n=this._loadedImages;for(let i=0;i<n.length;i++){let o=n[i];_pt(this,o,t)}n.length=0};ww.prototype.isDestroyed=function(){return!1};ww.prototype.destroy=function(){let e=this._textures;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];n!==this._defaultTexture&&n.destroy()}return ue(this)};var SH=ww;function AI(e){e=g(e,g.EMPTY_OBJECT),this.mode=g(e.mode,dg.MODIFY_MATERIAL),this.lightingModel=e.lightingModel,this.uniforms=g(e.uniforms,g.EMPTY_OBJECT),this.varyings=g(e.varyings,g.EMPTY_OBJECT),this.vertexShaderText=e.vertexShaderText,this.fragmentShaderText=e.fragmentShaderText,this.translucencyMode=g(e.translucencyMode,zb.INHERIT),this._textureManager=new SH,this._defaultTexture=void 0,this.uniformMap=ypt(this),this.usedVariablesVertex={attributeSet:{},featureIdSet:{},metadataSet:{}},this.usedVariablesFragment={attributeSet:{},featureIdSet:{},metadataSet:{},materialSet:{}},Tpt(this),Cpt(this)}function ypt(e){let t=e.uniforms,n={};for(let i in t)if(t.hasOwnProperty(i)){let o=t[i],r=o.type;if(r===Ew.SAMPLER_CUBE)throw new w("CustomShader does not support samplerCube uniforms");r===Ew.SAMPLER_2D?(e._textureManager.loadTexture2D(i,o.value),n[i]=bpt(e,i)):n[i]=xpt(e,i)}return n}function bpt(e,t){return function(){return g(e._textureManager.getTexture(t),e._defaultTexture)}}function xpt(e,t){return function(){return e.uniforms[t].value}}function K0(e,t,n){let i;for(;(i=t.exec(e))!==null;){let o=i[1];n[o]=!0}}function Tpt(e){let t=/[vf]sInput\.attributes\.(\w+)/g,n=/[vf]sInput\.featureIds\.(\w+)/g,i=/[vf]sInput\.metadata.(\w+)/g,o,r=e.vertexShaderText;c(r)&&(o=e.usedVariablesVertex.attributeSet,K0(r,t,o),o=e.usedVariablesVertex.featureIdSet,K0(r,n,o),o=e.usedVariablesVertex.metadataSet,K0(r,i,o));let s=e.fragmentShaderText;if(c(s)){o=e.usedVariablesFragment.attributeSet,K0(s,t,o),o=e.usedVariablesFragment.featureIdSet,K0(s,n,o),o=e.usedVariablesFragment.metadataSet,K0(s,i,o);let a=/material\.(\w+)/g,l=e.usedVariablesFragment.materialSet;K0(s,a,l)}}function abe(e){let t=/^.*MC$/,n=/^.*WC$/,i=/^.*EC$/;return t.test(e)?`${e} (model coordinates)`:n.test(e)?`${e} (Cartesian world coordinates)`:i.test(e)?`${e} (eye coordinates)`:e}function $a(e,t,n,i){if(e.hasOwnProperty(t)){let o=`${abe(t)} is not available in the ${i} shader. Did you mean ${abe(n)} instead?`;throw new w(o)}}function Cpt(e){let t=e.usedVariablesVertex.attributeSet;$a(t,"position","positionMC","vertex"),$a(t,"normal","normalMC","vertex"),$a(t,"tangent","tangentMC","vertex"),$a(t,"bitangent","bitangentMC","vertex"),$a(t,"positionWC","positionMC","vertex"),$a(t,"positionEC","positionMC","vertex"),$a(t,"normalEC","normalMC","vertex"),$a(t,"tangentEC","tangentMC","vertex"),$a(t,"bitangentEC","bitangentMC","vertex");let n=e.usedVariablesFragment.attributeSet;$a(n,"position","positionEC","fragment"),$a(n,"normal","normalEC","fragment"),$a(n,"tangent","tangentEC","fragment"),$a(n,"bitangent","bitangentEC","fragment"),$a(n,"normalMC","normalEC","fragment"),$a(n,"tangentMC","tangentEC","fragment"),$a(n,"bitangentMC","bitangentEC","fragment")}AI.prototype.setUniform=function(e,t){if(C.typeOf.string("uniformName",e),C.defined("value",t),!c(this.uniforms[e]))throw new w(`Uniform ${e} must be declared in the CustomShader constructor.`);let n=this.uniforms[e];n.type===Ew.SAMPLER_2D?this._textureManager.loadTexture2D(e,t):c(t.clone)?n.value=t.clone(n.value):n.value=t};AI.prototype.update=function(e){this._defaultTexture=e.context.defaultTexture,this._textureManager.update(e)};AI.prototype.isDestroyed=function(){return!1};AI.prototype.destroy=function(){this._textureManager=this._textureManager&&this._textureManager.destroy(),ue(this)};var AH=AI;function mm(e){e=g(e,g.EMPTY_OBJECT),this._ready=!1,this._provider=g(e.provider,mm.DefaultProvider),this._traversal=void 0,this._shape=void 0,this._shapeVisible=!1,this._paddingBefore=new d,this._paddingAfter=new d,this._minBounds=new d,this._minBoundsOld=new d,this._maxBounds=new d,this._maxBoundsOld=new d,this._exaggeratedMinBounds=new d,this._exaggeratedMinBoundsOld=new d,this._exaggeratedMaxBounds=new d,this._exaggeratedMaxBoundsOld=new d,this._minClippingBounds=new d,this._minClippingBoundsOld=new d,this._maxClippingBounds=new d,this._maxClippingBoundsOld=new d,this._clippingPlanes=void 0,this._clippingPlanesState=0,this._clippingPlanesEnabled=!1,this._modelMatrix=N.clone(g(e.modelMatrix,N.IDENTITY)),this._exaggeratedModelMatrix=N.clone(this._modelMatrix),this._compoundModelMatrix=new N,this._compoundModelMatrixOld=new N,this._customShader=g(e.customShader,mm.DefaultCustomShader),this._customShaderCompilationEvent=new fe,this._shaderDirty=!0,this._drawCommand=void 0,this._drawCommandPick=void 0,this._pickId=void 0,this._clock=e.clock,this._transformPositionWorldToUv=new N,this._transformPositionUvToWorld=new N,this._transformDirectionWorldToLocal=new q,this._transformNormalLocalToWorld=new q,this._nearestSampling=!1,this._levelBlendFactor=0,this._stepSizeMultiplier=1,this._depthTest=!0,this._useLogDepth=void 0,this._screenSpaceError=4,this._debugPolylines=new Rh,this._debugDraw=!1,this._disableRender=!1,this._disableUpdate=!1,this._uniforms={octreeInternalNodeTexture:void 0,octreeInternalNodeTilesPerRow:0,octreeInternalNodeTexelSizeUv:new k,octreeLeafNodeTexture:void 0,octreeLeafNodeTilesPerRow:0,octreeLeafNodeTexelSizeUv:new k,megatextureTextures:[],megatextureSliceDimensions:new k,megatextureTileDimensions:new k,megatextureVoxelSizeUv:new k,megatextureSliceSizeUv:new k,megatextureTileSizeUv:new k,dimensions:new d,paddingBefore:new d,paddingAfter:new d,transformPositionViewToUv:new N,transformPositionUvToView:new N,transformDirectionViewToLocal:new q,transformNormalLocalToWorld:new q,cameraPositionUv:new d,ndcSpaceAxisAlignedBoundingBox:new ee,clippingPlanesTexture:void 0,clippingPlanesMatrix:new N,stepSize:0,pickColor:new z},this._shapeDefinesOld={},this._uniformMap={};let t=this._uniforms,n=this._uniformMap;for(let o in t)if(t.hasOwnProperty(o)){let r=`u_${o}`;n[r]=function(){return t[o]}}let i=this._provider;Ept(this,i)}function Ept(e,t){let{shape:n,minBounds:i=Nc.getMinBounds(n),maxBounds:o=Nc.getMaxBounds(n)}=t;e.minBounds=i,e.maxBounds=o,e.minClippingBounds=Nc.getMinBounds(n),e.maxClippingBounds=Nc.getMaxBounds(n),e._exaggeratedMinBounds=d.clone(e._minBounds,e._exaggeratedMinBounds),e._exaggeratedMaxBounds=d.clone(e._maxBounds,e._exaggeratedMaxBounds),e._exaggeratedModelMatrix=N.clone(e._modelMatrix,e._exaggeratedModelMatrix),lbe(e,t);let r=Nc.getShapeConstructor(n);e._shape=new r,e._shapeVisible=ube(e,e._shape,t)}Object.defineProperties(mm.prototype,{ready:{get:function(){return this._ready}},provider:{get:function(){return this._provider}},boundingSphere:{get:function(){return this._shape.boundingSphere}},orientedBoundingBox:{get:function(){return this._shape.orientedBoundingBox}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){C.typeOf.object("modelMatrix",e),this._modelMatrix=N.clone(e,this._modelMatrix)}},shape:{get:function(){return this._provider.shape}},dimensions:{get:function(){return this._provider.dimensions}},minimumValues:{get:function(){return this._provider.minimumValues}},maximumValues:{get:function(){return this._provider.maximumValues}},show:{get:function(){return!this._disableRender},set:function(e){C.typeOf.bool("show",e),this._disableRender=!e}},disableUpdate:{get:function(){return this._disableUpdate},set:function(e){C.typeOf.bool("disableUpdate",e),this._disableUpdate=e}},debugDraw:{get:function(){return this._debugDraw},set:function(e){C.typeOf.bool("debugDraw",e),this._debugDraw=e}},depthTest:{get:function(){return this._depthTest},set:function(e){C.typeOf.bool("depthTest",e),this._depthTest!==e&&(this._depthTest=e,this._shaderDirty=!0)}},nearestSampling:{get:function(){return this._nearestSampling},set:function(e){C.typeOf.bool("nearestSampling",e),this._nearestSampling!==e&&(this._nearestSampling=e,this._shaderDirty=!0)}},levelBlendFactor:{get:function(){return this._levelBlendFactor},set:function(e){C.typeOf.number("levelBlendFactor",e),this._levelBlendFactor=O.clamp(e,0,1)}},screenSpaceError:{get:function(){return this._screenSpaceError},set:function(e){C.typeOf.number("screenSpaceError",e),this._screenSpaceError=e}},stepSize:{get:function(){return this._stepSizeMultiplier},set:function(e){C.typeOf.number("stepSize",e),this._stepSizeMultiplier=e}},minBounds:{get:function(){return this._minBounds},set:function(e){C.defined("minBounds",e),this._minBounds=d.clone(e,this._minBounds)}},maxBounds:{get:function(){return this._maxBounds},set:function(e){C.defined("maxBounds",e),this._maxBounds=d.clone(e,this._maxBounds)}},minClippingBounds:{get:function(){return this._minClippingBounds},set:function(e){C.defined("minClippingBounds",e),this._minClippingBounds=d.clone(e,this._minClippingBounds)}},maxClippingBounds:{get:function(){return this._maxClippingBounds},set:function(e){C.defined("maxClippingBounds",e),this._maxClippingBounds=d.clone(e,this._maxClippingBounds)}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){as.setOwner(e,this,"_clippingPlanes")}},customShader:{get:function(){return this._customShader},set:function(e){if(this._customShader!==e){let t=this._uniformMap,i=this._customShader.uniformMap;for(let o in i)i.hasOwnProperty(o)&&delete t[o];c(e)?this._customShader=e:this._customShader=mm.DefaultCustomShader,this._shaderDirty=!0}}},customShaderCompilationEvent:{get:function(){return this._customShaderCompilationEvent}}});var wpt=new d,Spt=new ee,Apt=new ee,vpt=new d,Dpt=new d,Ipt=new q,Opt=new q,Ppt=new N,Rpt=new N,Mpt=new N,Lpt=N.fromRotationTranslation(q.fromUniformScale(.5,new q),new d(.5,.5,.5),new N),Npt=N.fromRotationTranslation(q.fromUniformScale(2,new q),new d(-1,-1,-1),new N);mm.prototype.update=function(e){let t=this._provider;this._customShader.update(e);let n=e.context;if(!this._ready){Vpt(this,t,n),e.afterRender.push(()=>(this._ready=!0,!0));return}Upt(this,e);let i=lbe(this,t),o=this._shape;if(i&&(this._shapeVisible=ube(this,o,t),jpt(this,o)&&(this._shaderDirty=!0)),!this._shapeVisible)return;let r=Wpt(t.timeIntervalCollection,this._clock),s=this._traversal,a=s._sampleCount;if(s.update(e,r,i,this._disableUpdate),a!==s._sampleCount&&(this._shaderDirty=!0),!s.isRenderable(s.rootNode)||(this._debugDraw&&Qpt(this,e),this._disableRender))return;this._useLogDepth!==e.useLogDepth&&(this._useLogDepth=e.useLogDepth,this._shaderDirty=!0),qpt(this,e)&&(this._shaderDirty=!0);let u=s.leafNodeTexture,f=this._uniforms;c(u)&&(f.octreeLeafNodeTexture=s.leafNodeTexture,f.octreeLeafNodeTexelSizeUv=k.clone(s.leafNodeTexelSizeUv,f.octreeLeafNodeTexelSizeUv),f.octreeLeafNodeTilesPerRow=s.leafNodeTilesPerRow),this._shaderDirty&&(gH(this,n),this._shaderDirty=!1);let h=n.uniformState.viewProjection,m=o.orientedBoundingBox,p=Kpt(m,h,Apt);if(p.x===1||p.y===1||p.z===-1||p.w===-1)return;f.ndcSpaceAxisAlignedBoundingBox=ee.clone(p,f.ndcSpaceAxisAlignedBoundingBox);let b=n.uniformState.inverseView;f.transformPositionViewToUv=N.multiplyTransformation(this._transformPositionWorldToUv,b,f.transformPositionViewToUv);let x=n.uniformState.view;f.transformPositionUvToView=N.multiplyTransformation(x,this._transformPositionUvToWorld,f.transformPositionUvToView);let T=n.uniformState.inverseViewRotation;f.transformDirectionViewToLocal=q.multiply(this._transformDirectionWorldToLocal,T,f.transformDirectionViewToLocal),f.transformNormalLocalToWorld=q.clone(this._transformNormalLocalToWorld,f.transformNormalLocalToWorld);let E=e.camera.positionWC;f.cameraPositionUv=N.multiplyByPoint(this._transformPositionWorldToUv,E,f.cameraPositionUv),f.stepSize=this._stepSizeMultiplier;let S=e.passes.pick?this._drawCommandPick:e.passes.pickVoxel?this._drawCommandPickVoxel:this._drawCommand;S.boundingVolume=o.boundingSphere,e.commandList.push(S)};var Fpt=new d,D7=new d,Bpt=new re,kpt=new d;function Upt(e,t){if(e._exaggeratedMinBounds=d.clone(e._minBounds,e._exaggeratedMinBounds),e._exaggeratedMaxBounds=d.clone(e._maxBounds,e._exaggeratedMaxBounds),e.shape===Nc.ELLIPSOID){let n=t.verticalExaggerationRelativeHeight,i=t.verticalExaggeration;e._exaggeratedMinBounds.z=(e._minBounds.z-n)*i+n,e._exaggeratedMaxBounds.z=(e._maxBounds.z-n)*i+n}else if(e.shape===Nc.BOX){let n=d.fromElements(1,1,t.verticalExaggeration,Fpt);e._exaggeratedModelMatrix=N.multiplyByScale(e._modelMatrix,n,e._exaggeratedModelMatrix),e._exaggeratedModelMatrix=N.multiplyByTranslation(e._exaggeratedModelMatrix,zpt(e,t),e._exaggeratedModelMatrix)}}function zpt(e,t){let{shapeTransform:n=N.IDENTITY,globalTransform:i=N.IDENTITY}=e._provider,o=N.getTranslation(n,D7),r=N.multiplyByPoint(e._modelMatrix,o,D7),s=N.multiplyByPoint(i,r,D7),l=Z.WGS84.cartesianToCartographic(s,Bpt),u=0;c(l)&&(u=l.height);let f=Cr.getHeight(u,t.verticalExaggeration,t.verticalExaggerationRelativeHeight);return d.fromElements(0,0,(f-u)/t.verticalExaggeration,kpt)}function Vpt(e,t,n){let i=e._uniforms;e._pickId=n.createPickId({primitive:e}),i.pickColor=z.clone(e._pickId.color,i.pickColor);let{shaderDefines:o,shaderUniforms:r}=e._shape;e._shapeDefinesOld=ze(o,!0);let s=e._uniformMap;for(let a in r)if(r.hasOwnProperty(a)){let l=`u_${a}`;c(s[l])&&mt(`VoxelPrimitive: Uniform name "${l}" is already defined`),s[l]=function(){return r[a]}}i.dimensions=d.clone(t.dimensions,i.dimensions),e._paddingBefore=d.clone(g(t.paddingBefore,d.ZERO),e._paddingBefore),i.paddingBefore=d.clone(e._paddingBefore,i.paddingBefore),e._paddingAfter=d.clone(g(t.paddingAfter,d.ZERO),e._paddingBefore),i.paddingAfter=d.clone(e._paddingAfter,i.paddingAfter),e._traversal=Hpt(e,t,n),Gpt(e._traversal,i)}function lbe(e,t){let n=g(t.shapeTransform,N.IDENTITY),i=g(t.globalTransform,N.IDENTITY);return N.multiplyTransformation(i,e._exaggeratedModelMatrix,e._compoundModelMatrix),N.multiplyTransformation(e._compoundModelMatrix,n,e._compoundModelMatrix),$0(e,"_compoundModelMatrix","_compoundModelMatrixOld")+$0(e,"_minBounds","_minBoundsOld")+$0(e,"_maxBounds","_maxBoundsOld")+$0(e,"_exaggeratedMinBounds","_exaggeratedMinBoundsOld")+$0(e,"_exaggeratedMaxBounds","_exaggeratedMaxBoundsOld")+$0(e,"_minClippingBounds","_minClippingBoundsOld")+$0(e,"_maxClippingBounds","_maxClippingBoundsOld")>0}function $0(e,t,n){let i=e[t],o=e[n],r=!i.equals(o);return r&&i.clone(o),r?1:0}function ube(e,t,n){if(!t.update(e._compoundModelMatrix,e._exaggeratedMinBounds,e._exaggeratedMaxBounds,e.minClippingBounds,e.maxClippingBounds))return!1;let o=t.shapeTransform,r=N.inverse(o,Ppt),s=N.getRotation(o,Ipt),a=N.getScale(o,vpt),l=d.maximumComponent(a),u=d.divideByScalar(a,l,Dpt),f=q.multiplyByScale(s,u,Opt);return e._transformPositionWorldToUv=N.multiplyTransformation(Lpt,r,e._transformPositionWorldToUv),e._transformPositionUvToWorld=N.multiplyTransformation(o,Npt,e._transformPositionUvToWorld),e._transformDirectionWorldToLocal=N.getMatrix3(r,e._transformDirectionWorldToLocal),e._transformNormalLocalToWorld=q.inverseTranspose(f,e._transformNormalLocalToWorld),!0}function Hpt(e,t,n){let i=d.clone(t.dimensions,wpt);d.add(i,e._paddingBefore,i),d.add(i,e._paddingAfter,i);let o=t.maximumTileCount,r=c(o)?SI.getApproximateTextureMemoryByteLength(o,i,t.types,t.componentTypes):void 0,s=g(t.keyframeCount,1);return new SI(e,n,i,t.types,t.componentTypes,s,r)}function Gpt(e,t){t.octreeInternalNodeTexture=e.internalNodeTexture,t.octreeInternalNodeTexelSizeUv=k.clone(e.internalNodeTexelSizeUv,t.octreeInternalNodeTexelSizeUv),t.octreeInternalNodeTilesPerRow=e.internalNodeTilesPerRow;let n=e.megatextures,i=n[0],o=n.length;t.megatextureTextures=new Array(o);for(let r=0;r<o;r++)t.megatextureTextures[r]=n[r].texture;t.megatextureSliceDimensions=k.clone(i.sliceCountPerRegion,t.megatextureSliceDimensions),t.megatextureTileDimensions=k.clone(i.regionCountPerMegatexture,t.megatextureTileDimensions),t.megatextureVoxelSizeUv=k.clone(i.voxelSizeUv,t.megatextureVoxelSizeUv),t.megatextureSliceSizeUv=k.clone(i.sliceSizeUv,t.megatextureSliceSizeUv),t.megatextureTileSizeUv=k.clone(i.regionSizeUv,t.megatextureTileSizeUv)}function jpt(e,t){let n=t.shaderDefines,i=Object.keys(n).some(o=>n[o]!==e._shapeDefinesOld[o]);return i&&(e._shapeDefinesOld=ze(n,!0)),i}function Wpt(e,t){if(!c(e)||!c(t))return 0;let n=t.currentTime,i,o=e.indexOf(n);o>=0?i=e.get(o):(o=~o,o===e.length?(o=e.length-1,i=e.get(o),n=i.stop):(i=e.get(o),n=i.start));let r=K.secondsDifference(i.stop,i.start),a=K.secondsDifference(n,i.start)/r;return o+a}function qpt(e,t){let n=e.clippingPlanes;if(!c(n))return!1;n.update(t);let{clippingPlanesState:i,enabled:o}=n;if(o){let r=e._uniforms;r.clippingPlanesTexture=n.texture,r.clippingPlanesMatrix=N.transpose(N.multiplyTransformation(N.inverse(n.modelMatrix,r.clippingPlanesMatrix),e._transformPositionUvToWorld,r.clippingPlanesMatrix),r.clippingPlanesMatrix)}return e._clippingPlanesState===i&&e._clippingPlanesEnabled===o?!1:(e._clippingPlanesState=i,e._clippingPlanesEnabled=o,!0)}mm.prototype.isDestroyed=function(){return!1};mm.prototype.destroy=function(){let e=this._drawCommand;c(e)&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy());let t=this._drawCommandPick;return c(t)&&(t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()),this._pickId=this._pickId&&this._pickId.destroy(),this._traversal=this._traversal&&this._traversal.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),ue(this)};var cbe=new Array(new ee(-1,-1,-1,1),new ee(1,-1,-1,1),new ee(-1,1,-1,1),new ee(1,1,-1,1),new ee(-1,-1,1,1),new ee(1,-1,1,1),new ee(-1,1,1,1),new ee(1,1,1,1)),Ypt=new Array(1,2,4,0,3,5,0,3,6,1,2,7,0,5,6,1,4,7,2,4,7,3,5,6),Xpt=new Array(new ee,new ee,new ee,new ee,new ee,new ee,new ee,new ee);function Kpt(e,t,n){let i=N.fromRotationTranslation(e.halfAxes,e.center,Rpt),o=N.multiply(t,i,Mpt),r=+Number.MAX_VALUE,s=-Number.MAX_VALUE,a=+Number.MAX_VALUE,l=-Number.MAX_VALUE,u,f=Xpt,h=cbe.length;for(u=0;u<h;u++)N.multiplyByVector(o,cbe[u],f[u]);for(u=0;u<h;u++){let m=f[u];if(m.z>=-m.w){let p=m.x/m.w,_=m.y/m.w;r=Math.min(r,p),s=Math.max(s,p),a=Math.min(a,_),l=Math.max(l,_)}else for(let p=0;p<3;p++){let _=Ypt[u*3+p],b=f[_];if(b.z>=-b.w){let x=m.z+m.w,T=b.z+b.w,E=x/(x-T),S=ee.lerp(m,b,E,Spt),A=S.x/S.w,v=S.y/S.w;r=Math.min(r,A),s=Math.max(s,A),a=Math.min(a,v),l=Math.max(l,v)}}}return r=O.clamp(r,-1,1),a=O.clamp(a,-1,1),s=O.clamp(s,-1,1),l=O.clamp(l,-1,1),n=ee.fromElements(r,a,s,l,n),n}var I7=3e7,$pt=new d(I7,0,0),Zpt=new d(0,I7,0),Jpt=new d(0,0,I7);function Qpt(e,t){let n=e._traversal,i=e._debugPolylines;i.removeAll();function o(l,u,f,h){i.add({positions:[l,u],width:h,material:Vi.fromType("Color",{color:f})})}function r(l,u,f){let h=l.computeCorners();o(h[0],h[1],u,f),o(h[2],h[3],u,f),o(h[4],h[5],u,f),o(h[6],h[7],u,f),o(h[0],h[2],u,f),o(h[4],h[6],u,f),o(h[1],h[3],u,f),o(h[5],h[7],u,f),o(h[0],h[4],u,f),o(h[2],h[6],u,f),o(h[1],h[5],u,f),o(h[3],h[7],u,f)}function s(l){if(!n.isRenderable(l))return;let u=l.level,h=Math.max(1,5/Math.pow(2,u)),p=[z.RED,z.LIME,z.BLUE][u%3];if(r(l.orientedBoundingBox,p,h),c(l.children))for(let _=0;_<8;_++)s(l.children[_])}r(e._shape.orientedBoundingBox,z.WHITE,5),s(n.rootNode);let a=10;o(d.ZERO,$pt,z.RED,a),o(d.ZERO,Zpt,z.LIME,a),o(d.ZERO,Jpt,z.BLUE,a),i.update(t)}mm.DefaultCustomShader=new AH({fragmentShaderText:`void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)
| {
| material.diffuse = vec3(1.0);
| material.alpha = 1.0;
| }`});function fbe(){this.ready=!0,this.shape=Nc.BOX,this.dimensions=new d(1,1,1),this.names=["data"],this.types=[Ct.SCALAR],this.componentTypes=[zt.FLOAT32],this.maximumTileCount=1}fbe.prototype.requestData=function(e){if(!((c(e)?g(e.tileLevel,0):0)>=1))return Promise.resolve([new Float32Array(1)])};mm.DefaultProvider=new fbe;var Z0=mm;function e_t(e,t,n,i){if(!c(e)||c(t)&&e.id!==t)return;let r=(e.classes||{})[n];if(!c(r))return;let a=(r.properties||{})[i];if(c(a))return a}var vH=e_t;function t_t(e,t,n,i){this.schemaId=e,this.className=t,this.propertyName=n,this.classProperty=i}var DH=t_t;var OH=function(e){return function(){e.frameState.afterRender.push(function(){e.requestRender()})}};function Kn(e){e=g(e,g.EMPTY_OBJECT);let t=e.canvas,n=e.creditContainer,i=e.creditViewport,o=ze(e.contextOptions);if(!c(t))throw new w("options and options.canvas are required.");let r=c(n),s=new oM(t,o);r||(n=document.createElement("div"),n.style.position="absolute",n.style.bottom="0",n.style["text-shadow"]="0 0 2px #000000",n.style.color="#ffffff",n.style["font-size"]="10px",n.style["padding-right"]="5px",t.parentNode.appendChild(n)),c(i)||(i=t.parentNode),this._id=Bn(),this._jobScheduler=new jz,this._frameState=new Vz(s,new Oz(n,"\u2022",i),this._jobScheduler),this._frameState.scene3DOnly=g(e.scene3DOnly,!1),this._removeCreditContainer=!r,this._creditContainer=n,this._canvas=t,this._context=s,this._computeEngine=new oP(s),this._ellipsoid=g(e.ellipsoid,Z.default),this._globe=void 0,this._globeTranslucencyState=new Hz,this._primitives=new $l,this._groundPrimitives=new $l,this._globeHeight=void 0,this._globeHeightDirty=!0,this._cameraUnderground=!1,this._removeUpdateHeightCallback=void 0,this._logDepthBuffer=Kn.defaultLogDepthBuffer&&s.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new yw,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._useOIT=g(e.orderIndependentTranslucency,!0),this._executeOITFunction=void 0,this._depthPlane=new Bz(e.depthPlaneEllipsoidOffset),this._clearColorCommand=new $n({color:new z,stencil:0,owner:this}),this._depthClearCommand=new $n({depth:1,owner:this}),this._stencilClearCommand=new $n({stencil:0}),this._classificationStencilClearCommand=new $n({stencil:0,renderState:Fe.fromCache({stencilMask:kt.CLASSIFICATION_MASK})}),this._depthOnlyRenderStateCache={},this._transitioner=new BV(this),this._preUpdate=new fe,this._postUpdate=new fe,this._renderError=new fe,this._preRender=new fe,this._postRender=new fe,this._minimumDisableDepthTestDistance=0,this._debugInspector=new JV,this._msaaSamples=g(e.msaaSamples,4),this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new fe,this.morphComplete=new fe,this.skyBox=void 0,this.skyAtmosphere=void 0,this.sun=void 0,this.sunBloom=!0,this._sunBloom=void 0,this.moon=void 0,this.backgroundColor=z.clone(z.BLACK),this._mode=J.SCENE3D,this._mapProjection=c(e.mapProjection)?e.mapProjection:new Ei(this._ellipsoid),this.morphTime=1,this.farToNearRatio=1e3,this.logarithmicDepthFarToNearRatio=1e9,this.nearToFarDistance2D=175e4,this.verticalExaggeration=1,this.verticalExaggerationRelativeHeight=0,this.debugCommandFilter=void 0,this.debugShowCommands=!1,this.debugShowFrustums=!1,this.debugShowFramesPerSecond=!1,this.debugShowDepthFrustum=1,this.debugShowFrustumPlanes=!1,this._debugShowFrustumPlanes=!1,this._debugFrustumPlanes=void 0,this.useDepthPicking=!0,this.pickTranslucentDepth=!1,this.cameraEventWaitTime=500,this.atmosphere=new WT,this.fog=new zz,this.fog.enabled=Z.WGS84.equals(this._ellipsoid),Z.WGS84.equals(this._ellipsoid)||(Qi.DEFAULT_VIEW_RECTANGLE=te.fromDegrees(-45,-45,45,45)),this._shadowMapCamera=new Qi(this),this.shadowMap=new Cy({context:s,lightCamera:this._shadowMapCamera,enabled:g(e.shadows,!1)}),this.invertClassification=!1,this.invertClassificationColor=z.clone(z.WHITE),this._actualInvertClassificationColor=z.clone(this._invertClassificationColor),this._invertClassification=new cI,this.focalLength=void 0,this.eyeSeparation=void 0,this.postProcessStages=new LV,this._brdfLutGenerator=new bz,this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new XV(this),this._cameraUnderground=!1,this._mapMode2D=g(e.mapMode2D,fu.INFINITE_SCROLL),this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,clearGlobeDepth:!1,useDepthPlane:!1,renderTranslucentDepthForPick:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,useOIT:!1,useInvertClassification:!1,usePostProcess:!1,usePostProcessSelected:!1,useWebVR:!1},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0,this.requestRenderMode=g(e.requestRenderMode,!1),this._renderRequested=!0,this.maximumRenderTimeChange=g(e.maximumRenderTimeChange,0),this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=tc.requestCompletedEvent.addEventListener(OH(this)),this._removeTaskProcessorListenerCallback=hi.taskCompletedEvent.addEventListener(OH(this)),this._removeGlobeCallbacks=[],this._removeTerrainProviderReadyListener=void 0;let a=new je(0,0,s.drawingBufferWidth,s.drawingBufferHeight),l=new Qi(this);this._logDepthBuffer&&(l.frustum.near=.1,l.frustum.far=1e10),this.preloadFlightCamera=new Qi(this),this.preloadFlightCullingVolume=void 0,this._picking=new dV(this),this._defaultView=new hw(this,l,a),this._view=this._defaultView,this._hdr=void 0,this._hdrDirty=void 0,this.highDynamicRange=!1,this.gamma=2.2,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this._specularEnvironmentCubeMap=void 0,this.light=new g_,_be(this,0,K.now()),this.updateFrameState(),this.initializeFrame()}Kn.defaultLogDepthBuffer=!0;function n_t(e,t){for(let i=0;i<e._removeGlobeCallbacks.length;++i)e._removeGlobeCallbacks[i]();e._removeGlobeCallbacks.length=0;let n=[];c(t)&&(n.push(t.imageryLayersUpdatedEvent.addEventListener(OH(e))),n.push(t.terrainProviderChanged.addEventListener(OH(e)))),e._removeGlobeCallbacks=n}Object.defineProperties(Kn.prototype,{canvas:{get:function(){return this._canvas}},drawingBufferHeight:{get:function(){return this._context.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._context.drawingBufferWidth}},maximumAliasedLineWidth:{get:function(){return ht.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return ht.maximumCubeMapSize}},pickPositionSupported:{get:function(){return this._context.depthTexture}},sampleHeightSupported:{get:function(){return this._context.depthTexture}},clampToHeightSupported:{get:function(){return this._context.depthTexture}},invertClassificationSupported:{get:function(){return this._context.depthTexture}},specularEnvironmentMapsSupported:{get:function(){return hh.isSupported(this._context)}},ellipsoid:{get:function(){return this._ellipsoid}},globe:{get:function(){return this._globe},set:function(e){this._globe=this._globe&&this._globe.destroy(),this._globe=e,n_t(this,e)}},primitives:{get:function(){return this._primitives}},groundPrimitives:{get:function(){return this._groundPrimitives}},camera:{get:function(){return this._view.camera},set:function(e){this._view.camera=e}},view:{get:function(){return this._view},set:function(e){this._view=e}},defaultView:{get:function(){return this._defaultView}},picking:{get:function(){return this._picking}},screenSpaceCameraController:{get:function(){return this._screenSpaceCameraController}},mapProjection:{get:function(){return this._mapProjection}},jobScheduler:{get:function(){return this._jobScheduler}},frameState:{get:function(){return this._frameState}},environmentState:{get:function(){return this._environmentState}},tweens:{get:function(){return this._tweens}},imageryLayers:{get:function(){if(c(this.globe))return this.globe.imageryLayers}},terrainProvider:{get:function(){if(c(this.globe))return this.globe.terrainProvider},set:function(e){this._removeTerrainProviderReadyListener=this._removeTerrainProviderReadyListener&&this._removeTerrainProviderReadyListener(),c(this.globe)&&(this.globe.terrainProvider=e)}},terrainProviderChanged:{get:function(){if(c(this.globe))return this.globe.terrainProviderChanged}},preUpdate:{get:function(){return this._preUpdate}},postUpdate:{get:function(){return this._postUpdate}},renderError:{get:function(){return this._renderError}},preRender:{get:function(){return this._preRender}},postRender:{get:function(){return this._postRender}},lastRenderTime:{get:function(){return this._lastRenderTime}},context:{get:function(){return this._context}},debugFrustumStatistics:{get:function(){return this._view.debugFrustumStatistics}},scene3DOnly:{get:function(){return this._frameState.scene3DOnly}},orderIndependentTranslucency:{get:function(){return this._useOIT}},id:{get:function(){return this._id}},mode:{get:function(){return this._mode},set:function(e){if(this.scene3DOnly&&e!==J.SCENE3D)throw new w("Only SceneMode.SCENE3D is valid when scene3DOnly is true.");if(e===J.SCENE2D)this.morphTo2D(0);else if(e===J.SCENE3D)this.morphTo3D(0);else if(e===J.COLUMBUS_VIEW)this.morphToColumbusView(0);else throw new w("value must be a valid SceneMode enumeration.");this._mode=e}},frustumCommandsList:{get:function(){return this._view.frustumCommandsList}},numberOfFrustums:{get:function(){return this._view.frustumCommandsList.length}},useWebVR:{get:function(){return this._useWebVR},set:function(e){if(this.camera.frustum instanceof an)throw new w("VR is unsupported with an orthographic projection.");this._useWebVR=e,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new Qi(this),c(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new Uz(this)),this._aspectRatioVR=this.camera.frustum.aspectRatio):(this._frameState.creditDisplay.container.style.visibility="visible",this._cameraVR=void 0,this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this._aspectRatioVR,this.camera.frustum.xOffset=0)}},mapMode2D:{get:function(){return this._mapMode2D}},splitPosition:{get:function(){return this._frameState.splitPosition},set:function(e){this._frameState.splitPosition=e}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance},set:function(e){if(!c(e)||e<0)throw new w("minimumDisableDepthTestDistance must be greater than or equal to 0.0.");this._minimumDisableDepthTestDistance=e}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(e){e=this._context.fragmentDepth&&e,this._logDepthBuffer!==e&&(this._logDepthBuffer=e,this._logDepthBufferDirty=!0)}},gamma:{get:function(){return this._context.uniformState.gamma},set:function(e){this._context.uniformState.gamma=e}},highDynamicRange:{get:function(){return this._hdr},set:function(e){let t=this._context,n=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=n!==this._hdr,this._hdr=n}},highDynamicRangeSupported:{get:function(){let e=this._context;return e.depthTexture&&(e.colorBufferFloat||e.colorBufferHalfFloat)}},cameraUnderground:{get:function(){return this._cameraUnderground}},msaaSamples:{get:function(){return this._msaaSamples},set:function(e){e=Math.min(e,ht.maximumSamples),this._msaaSamples=e}},msaaSupported:{get:function(){return this._context.msaa}},pixelRatio:{get:function(){return this._frameState.pixelRatio},set:function(e){this._frameState.pixelRatio=e}},opaqueFrustumNearOffset:{get:function(){return .9999}},globeHeight:{get:function(){return this._globeHeight}}});Kn.prototype.getCompressedTextureFormatSupported=function(e){let t=this.context;return(e==="WEBGL_compressed_texture_s3tc"||e==="s3tc")&&t.s3tc||(e==="WEBGL_compressed_texture_pvrtc"||e==="pvrtc")&&t.pvrtc||(e==="WEBGL_compressed_texture_etc"||e==="etc")&&t.etc||(e==="WEBGL_compressed_texture_etc1"||e==="etc1")&&t.etc1||(e==="WEBGL_compressed_texture_astc"||e==="astc")&&t.astc||(e==="EXT_texture_compression_bptc"||e==="bc7")&&t.bc7};function i_t(e,t){let n=e.pickedMetadataInfo,i=t.pickedMetadataInfo;return(n==null?void 0:n.schemaId)!==(i==null?void 0:i.schemaId)||(n==null?void 0:n.className)!==(i==null?void 0:i.className)||(n==null?void 0:n.propertyName)!==(i==null?void 0:i.propertyName)}function dbe(e,t,n){let i=e._frameState,o=e._context,r=e._view.oit,{lightShadowMaps:s,lightShadowsEnabled:a}=i.shadowState,l=t.derivedCommands;c(t.pickId)&&(l.picking=qp.createPickDerivedCommand(e,t,o,l.picking)),i.pickingMetadata&&t.pickMetadataAllowed&&(t.pickedMetadataInfo=i.pickedMetadataInfo,c(t.pickedMetadataInfo)&&(l.pickingMetadata=qp.createPickMetadataDerivedCommand(e,t,o,l.pickingMetadata))),t.pickOnly||(l.depth=qp.createDepthOnlyDerivedCommand(e,t,o,l.depth)),l.originalCommand=t,e._hdr&&(l.hdr=qp.createHdrCommand(t,o,l.hdr),t=l.hdr.command,l=t.derivedCommands),a&&t.receiveShadows&&(l.shadows=Cy.createReceiveDerivedCommand(s,t,n,o,l.shadows)),t.pass===xe.TRANSLUCENT&&c(r)&&r.isSupported()&&(a&&t.receiveShadows?(l.oit=c(l.oit)?l.oit:{},l.oit.shadows=r.createDerivedCommands(l.shadows.receiveCommand,o,l.oit.shadows)):l.oit=r.createDerivedCommands(t,o,l.oit))}Kn.prototype.updateDerivedCommands=function(e){let{derivedCommands:t}=e;if(!c(t))return;let n=this._frameState,{shadowState:i,useLogDepth:o}=this._frameState,r=this._context,s=!1,a=i.lastDirtyTime;e.lastDirtyTime!==a&&(e.lastDirtyTime=a,e.dirty=!0,s=!0);let l=this._hdr,u=c(t.logDepth),f=c(t.hdr),h=c(t.originalCommand),m=o&&!u,p=l&&!f,_=(!o||!l)&&!h,b=n.pickingMetadata&&i_t(e,n);if(e.dirty=e.dirty||m||p||_||b,!e.dirty)return;e.dirty=!1;let{shadowsEnabled:x,shadowMaps:T}=i;x&&e.castShadows&&(t.shadows=Cy.createCastDerivedCommand(T,e,s,r,t.shadows)),(u||m)&&(t.logDepth=qp.createLogDepthCommand(e,r,t.logDepth),dbe(this,t.logDepth.command,s)),(h||_)&&dbe(this,e,s)};var o_t=new Nd({pass:dr.RENDER}),O7=new Nd({pass:dr.PRELOAD}),P7=new Nd({pass:dr.PRELOAD_FLIGHT}),r_t=new Nd({pass:dr.REQUEST_RENDER_MODE_DEFER_CHECK}),hbe=new ne,R7;function s_t(e){var t;if(!(e._mode!==J.SCENE3D||!((t=e.globe)!=null&&t.show)||e._cameraUnderground||e._globeTranslucencyState.translucent))return hbe.radius=e.ellipsoid.minimumRadius+e.frameState.minimumTerrainHeight,R7=gz.fromBoundingSphere(hbe,e.camera.positionWC,R7),R7}Kn.prototype.clearPasses=function(e){e.render=!1,e.pick=!1,e.pickVoxel=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1};function _be(e,t,n){let i=e._frameState;i.frameNumber=t,i.time=K.clone(n,i.time)}Kn.prototype.updateFrameState=function(){let e=this.camera,t=this._frameState;t.commandList.length=0,t.shadowMaps.length=0,t.brdfLutGenerator=this._brdfLutGenerator,t.environmentMap=this.skyBox&&this.skyBox._cubeMap,t.mode=this._mode,t.morphTime=this.morphTime,t.mapProjection=this.mapProjection,t.camera=e,t.cullingVolume=e.frustum.computeCullingVolume(e.positionWC,e.directionWC,e.upWC),t.occluder=s_t(this),t.minimumTerrainHeight=0,t.minimumDisableDepthTestDistance=this._minimumDisableDepthTestDistance,t.invertClassification=this.invertClassification,t.useLogDepth=this._logDepthBuffer&&!(this.camera.frustum instanceof an||this.camera.frustum instanceof No),t.light=this.light,t.cameraUnderground=this._cameraUnderground,t.globeTranslucencyState=this._globeTranslucencyState;let{globe:n}=this;c(n)&&n._terrainExaggerationChanged&&(this.verticalExaggeration=n._terrainExaggeration,this.verticalExaggerationRelativeHeight=n._terrainExaggerationRelativeHeight,n._terrainExaggerationChanged=!1),t.verticalExaggeration=this.verticalExaggeration,t.verticalExaggerationRelativeHeight=this.verticalExaggerationRelativeHeight,c(this._specularEnvironmentCubeMap)&&this._specularEnvironmentCubeMap.ready?(t.specularEnvironmentMaps=this._specularEnvironmentCubeMap.texture,t.specularEnvironmentMapsMaximumLOD=this._specularEnvironmentCubeMap.maximumMipmapLevel):(t.specularEnvironmentMaps=void 0,t.specularEnvironmentMapsMaximumLOD=void 0),t.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,this._actualInvertClassificationColor=z.clone(this.invertClassificationColor,this._actualInvertClassificationColor),cI.isTranslucencySupported(this._context)||(this._actualInvertClassificationColor.alpha=1),t.invertClassificationColor=this._actualInvertClassificationColor,c(this.globe)?t.maximumScreenSpaceError=this.globe.maximumScreenSpaceError:t.maximumScreenSpaceError=2,this.clearPasses(t.passes),t.tilesetPassState=void 0};Kn.prototype.isVisible=function(e,t,n){if(!c(t))return!1;let{boundingVolume:i}=t;return!c(i)||!t.cull?!0:e.computeVisibility(i)===Gt.OUTSIDE?!1:!c(n)||!t.occlude||!i.isOccluded(n)};var IH=new N(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);IH=N.inverseTransformation(IH,IH);function a_t(e,t,n,i){let o=t._frameState,r=o.context,s=e.boundingVolume;c(t._debugVolume)&&t._debugVolume.destroy();let a=d.clone(s.center);if(o.mode!==J.SCENE3D){a=N.multiplyByPoint(IH,a,a);let _=o.mapProjection,b=_.unproject(a);a=_.ellipsoid.cartographicToCartesian(b)}let l,u,{radius:f}=s;c(f)?(l=Ks.createGeometry(new Ks({radii:new d(f,f,f),vertexFormat:nn.FLAT_VERTEX_FORMAT})),u=N.fromTranslation(a)):(l=Ia.createGeometry(Ia.fromDimensions({dimensions:new d(2,2,2),vertexFormat:nn.FLAT_VERTEX_FORMAT})),u=N.fromRotationTranslation(s.halfAxes,a,new N)),t._debugVolume=new An({geometryInstances:new wt({geometry:Pn.toWireframe(l),modelMatrix:u,attributes:{color:new Ht(1,0,0,1)}}),appearance:new nn({flat:!0,translucent:!1}),asynchronous:!1});let h=o.commandList,m=o.commandList=[];t._debugVolume.update(o),e=m[0],o.useLogDepth&&(e=qp.createLogDepthCommand(e,r).command);let p;c(i)&&(p=n.framebuffer,n.framebuffer=i),e.execute(r,n),c(p)&&(n.framebuffer=p),o.commandList=h}function pm(e,t,n,i){let o=t._frameState,r=t._context;if(c(t.debugCommandFilter)&&!t.debugCommandFilter(e))return;if(e instanceof $n){e.execute(r,n);return}e.debugShowBoundingVolume&&c(e.boundingVolume)&&a_t(e,t,n,i),o.useLogDepth&&c(e.derivedCommands.logDepth)&&(e=e.derivedCommands.logDepth.command);let s=o.passes;if(!s.pick&&!s.pickVoxel&&!s.depth&&t._hdr&&c(e.derivedCommands)&&c(e.derivedCommands.hdr)&&(e=e.derivedCommands.hdr.command),s.pick||s.depth){if(s.pick&&!s.depth){if(o.pickingMetadata&&c(e.derivedCommands.pickingMetadata)){e=e.derivedCommands.pickingMetadata.pickMetadataCommand,e.execute(r,n);return}if(!o.pickingMetadata&&c(e.derivedCommands.picking)){e=e.derivedCommands.picking.pickCommand,e.execute(r,n);return}}else if(c(e.derivedCommands.depth)){e=e.derivedCommands.depth.depthOnlyCommand,e.execute(r,n);return}}if(t.debugShowCommands||t.debugShowFrustums){t._debugInspector.executeDebugShowFrustumsCommand(t,e,n);return}o.shadowState.lightShadowsEnabled&&e.receiveShadows&&c(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand.execute(r,n):e.execute(r,n)}function mbe(e,t,n){let{derivedCommands:i}=e;if(!c(i))return;let o=t._frameState,r=t._context;o.useLogDepth&&c(i.logDepth)&&(e=i.logDepth.command);let{picking:s,pickingMetadata:a,depth:l}=e.derivedCommands;c(a)&&(e=i.pickingMetadata.pickMetadataCommand,e.execute(r,n)),c(s)?(e=s.pickCommand,e.execute(r,n)):c(l)&&(e=l.depthOnlyCommand,e.execute(r,n))}function gbe(e,t,n){return t.boundingVolume.distanceSquaredTo(n)-e.boundingVolume.distanceSquaredTo(n)}function c_t(e,t,n){return e.boundingVolume.distanceSquaredTo(n)-t.boundingVolume.distanceSquaredTo(n)+O.EPSILON12}function l_t(e,t,n,i,o){gy(i,gbe,e.camera.positionWC),c(o)&&t(o.unclassifiedCommand,e,n);for(let r=0;r<i.length;++r)t(i[r],e,n)}function u_t(e,t,n,i,o){gy(i,c_t,e.camera.positionWC),c(o)&&t(o.unclassifiedCommand,e,n);for(let r=0;r<i.length;++r)t(i[r],e,n)}function f_t(e,t,n){e.context.uniformState.updatePass(xe.VOXELS);let i=n.commands[xe.VOXELS];i.length=n.indices[xe.VOXELS],gy(i,gbe,e.camera.positionWC);for(let o=0;o<i.length;++o)pm(i[o],e,t)}var d_t=new bi,h_t=new gl,m_t=new an,p_t=new No;function __t(e){let{frustum:t}=e;return c(t.fov)?t.clone(d_t):c(t.infiniteProjectionMatrix)?t.clone(h_t):c(t.width)?t.clone(m_t):t.clone(p_t)}function g_t(e){if(e._environmentState.useOIT){if(!c(e._executeOITFunction)){let{view:t,context:n}=e;e._executeOITFunction=function(i,o,r,s,a){t.globeDepth.prepareColorTextures(n),t.oit.executeCommands(i,o,r,s,a)}}return e._executeOITFunction}return e.frameState.passes.render?l_t:u_t}function y_t(e,t,n){let{frameState:i,context:o}=e,{pick:r,pickVoxel:s}=i.passes,a=r||s,l;!a&&e._environmentState.useInvertClassification&&i.invertClassificationColor.alpha<1&&(l=e._invertClassification);let u=g_t(e);o.uniformState.updatePass(xe.TRANSLUCENT);let f=n.commands[xe.TRANSLUCENT];f.length=n.indices[xe.TRANSLUCENT],u(e,pm,t,f,l)}function b_t(e,t,n){let{translucentTileClassification:i,globeDepth:o}=e._view;if(!(n.indices[xe.CESIUM_3D_TILE_CLASSIFICATION]>0)||!i.isSupported())return;let s=n.commands[xe.TRANSLUCENT];i.executeTranslucentCommands(e,pm,t,s,o.depthStencilTexture),i.executeClassificationCommands(e,pm,t,n)}function L7(e,t){let{camera:n,context:i,frameState:o}=e,{uniformState:r}=i;r.updateCamera(n);let s=__t(n);s.near=n.frustum.near,s.far=n.frustum.far;let a=o.passes,l=a.pick||a.pickVoxel;l||x_t(e,t);let{clearGlobeDepth:u,renderTranslucentDepthForPick:f,useDepthPlane:h,useGlobeDepthFramebuffer:m,useInvertClassification:p,usePostProcessSelected:_}=e._environmentState,{globeDepth:b,globeTranslucencyFramebuffer:x,sceneFramebuffer:T,frustumCommandsList:E}=e._view,S=E.length,A=e._globeTranslucencyState,v=e._depthClearCommand,D=e._stencilClearCommand,R=e._classificationStencilClearCommand,P=e._depthPlane,L=n.position.z;function F(I,M){r.updatePass(M);let B=I.commands[M],U=I.indices[M];for(let V=0;V<U;++V)pm(B[V],e,t);return U}function y(I,M){r.updatePass(M);let B=I.commands[M],U=I.indices[M];for(let V=0;V<U;++V)mbe(B[V],e,t)}for(let I=0;I<S;++I){let M=S-I-1,B=E[M];e.mode===J.SCENE2D?(n.position.z=L-B.near+1,s.far=Math.max(1,B.far-B.near),s.near=1,r.update(o),r.updateFrustum(s)):(s.near=M!==0?B.near*e.opaqueFrustumNearOffset:B.near,s.far=B.far,r.updateFrustum(s)),v.execute(i,t),i.stencilBuffer&&D.execute(i,t),A.translucent?(r.updatePass(xe.GLOBE),A.executeGlobeCommands(B,pm,x,e,t)):F(B,xe.GLOBE),m&&b.executeCopyDepth(i,t),f||(A.translucent?(r.updatePass(xe.TERRAIN_CLASSIFICATION),A.executeGlobeClassificationCommands(B,pm,x,e,t)):F(B,xe.TERRAIN_CLASSIFICATION)),u&&(v.execute(i,t),h&&P.execute(i,t));let U;if(!p||l||f)U=F(B,xe.CESIUM_3D_TILE),U>0&&(m&&(b.prepareColorTextures(i,u),b.executeUpdateDepth(i,t,b.depthStencilTexture)),f||(U=F(B,xe.CESIUM_3D_TILE_CLASSIFICATION)));else{e._invertClassification.clear(i,t);let W=t.framebuffer;t.framebuffer=e._invertClassification._fbo.framebuffer,U=F(B,xe.CESIUM_3D_TILE),m&&(e._invertClassification.prepareTextures(i),b.executeUpdateDepth(i,t,e._invertClassification._fbo.getDepthStencilTexture())),U=F(B,xe.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),t.framebuffer=W,e._invertClassification.executeClassified(i,t),o.invertClassificationColor.alpha===1&&e._invertClassification.executeUnclassified(i,t),U>0&&i.stencilBuffer&&R.execute(i,t),U=F(B,xe.CESIUM_3D_TILE_CLASSIFICATION)}if(U>0&&i.stencilBuffer&&D.execute(i,t),f_t(e,t,B),F(B,xe.OPAQUE),M!==0&&e.mode!==J.SCENE2D&&(s.near=B.near,r.updateFrustum(s)),y_t(e,t,B),b_t(e,t,B),i.depthTexture&&e.useDepthPicking&&(m||f)){let W=e._picking.getPickDepth(e,M);W.update(i,b.depthStencilTexture),W.executeCopyDepth(i,t)}if(l||!_)continue;let V=t.framebuffer;t.framebuffer=T.getIdFramebuffer(),s.near=M!==0?B.near*e.opaqueFrustumNearOffset:B.near,s.far=B.far,r.updateFrustum(s),A.translucent?(r.updatePass(xe.GLOBE),A.executeGlobeCommands(B,mbe,x,e,t)):y(B,xe.GLOBE),u&&(v.framebuffer=t.framebuffer,v.execute(i,t),v.framebuffer=void 0),u&&h&&P.execute(i,t),y(B,xe.CESIUM_3D_TILE),y(B,xe.OPAQUE),y(B,xe.TRANSLUCENT),t.framebuffer=V}}function x_t(e,t){let{context:n,environmentState:i,view:o}=e;if(n.uniformState.updatePass(xe.ENVIRONMENT),c(i.skyBoxCommand)&&pm(i.skyBoxCommand,e,t),i.isSkyAtmosphereVisible&&pm(i.skyAtmosphereCommand,e,t),i.isSunVisible&&(i.sunDrawCommand.execute(n,t),e.sunBloom&&!i.useWebVR)){let r;i.useGlobeDepthFramebuffer?r=o.globeDepth.framebuffer:i.usePostProcess?r=o.sceneFramebuffer.framebuffer:r=i.originalFramebuffer,e._sunPostProcess.execute(n),e._sunPostProcess.copy(n,r),t.framebuffer=r}i.isMoonVisible&&i.moonCommand.execute(n,t)}function ybe(e){e.context.uniformState.updatePass(xe.COMPUTE);let t=e._environmentState.sunComputeCommand;c(t)&&t.execute(e._computeEngine);let n=e._computeCommandList;for(let i=0;i<n.length;++i)n[i].execute(e._computeEngine)}function T_t(e,t){e.context.uniformState.updatePass(xe.OVERLAY);let n=e.context,i=e._overlayCommandList;for(let o=0;o<i.length;++o)i[o].execute(n,t)}function C_t(e,t,n){let{shadowMapCullingVolume:i,isPointLight:o,passes:r}=n,s=r.length,a=[xe.GLOBE,xe.CESIUM_3D_TILE,xe.OPAQUE,xe.TRANSLUCENT];for(let l=0;l<t.length;++l){let u=t[l];if(e.updateDerivedCommands(u),!(!u.castShadows||a.indexOf(u.pass)<0||!e.isVisible(i,u)))if(o)for(let f=0;f<s;++f)r[f].commandList.push(u);else if(s===1)r[0].commandList.push(u);else{let f=!1;for(let h=s-1;h>=0;--h){let m=r[h].cullingVolume;if(e.isVisible(m,u))r[h].commandList.push(u),f=!0;else if(f)break}}}}function bbe(e){let{shadowState:t,commandList:n}=e.frameState,{shadowsEnabled:i,shadowMaps:o}=t;if(!i)return;let{context:r}=e,{uniformState:s}=r;for(let a=0;a<o.length;++a){let l=o[a];if(l.outOfView)continue;let{passes:u}=l;for(let f=0;f<u.length;++f)u[f].commandList.length=0;C_t(e,n,l);for(let f=0;f<u.length;++f){let h=l.passes[f],{camera:m,commandList:p}=h;s.updateCamera(m),l.updatePass(r,f);for(let _=0;_<p.length;++_){let b=p[_];s.updatePass(b.pass);let x=b.derivedCommands.shadows.castCommands[a];pm(x,e,h.passState)}}}}var E_t=new d;Kn.prototype.updateAndExecuteCommands=function(e,t){F_t(this,e,t),this._environmentState.useWebVR?w_t(this,e,t):this._frameState.mode!==J.SCENE2D||this._mapMode2D===fu.ROTATE?Dy(!0,this,e):M_t(this,e)};function w_t(e,t){let n=e._view,i=n.camera,r=e._environmentState.renderTranslucentDepthForPick;xbe(e),n.createPotentiallyVisibleSet(e),ybe(e),r||bbe(e);let s=t.viewport;s.x=0,s.y=0,s.width=s.width*.5;let a=Qi.clone(i,e._cameraVR);a.frustum=i.frustum;let l=i.frustum.near,u=l*g(e.focalLength,5),f=g(e.eyeSeparation,u/30),h=d.multiplyByScalar(a.right,f*.5,E_t);i.frustum.aspectRatio=s.width/s.height;let m=.5*f*l/u;d.add(a.position,h,i.position),i.frustum.xOffset=m,L7(e,t),s.x=s.width,d.subtract(a.position,h,i.position),i.frustum.xOffset=-m,L7(e,t),Qi.clone(a,i)}var S_t=new re(Math.PI,O.PI_OVER_TWO),A_t=new d,v_t=new d,D_t=new N,I_t=new N,O_t=new d,P_t=new d,R_t=new je;function M_t(e,t){let{frameState:n,camera:i}=e,{uniformState:o}=e.context,r=t.viewport,s=je.clone(r,R_t);t.viewport=s;let a=S_t,l=A_t;e.mapProjection.project(a,l);let f=d.clone(i.position,v_t),h=N.clone(i.transform,I_t),m=i.frustum.clone();i._setTransform(N.IDENTITY);let p=N.computeViewportTransformation(s,0,1,D_t),_=i.frustum.projectionMatrix,b=i.positionWC.y,x=d.fromElements(O.sign(b)*l.x-b,0,-i.positionWC.x,O_t),T=Lt.pointToGLWindowCoordinates(_,p,x,P_t);T.x=Math.floor(T.x);let E=s.x,S=s.width;if(b===0||T.x<=E||T.x>=E+S)Dy(!0,e,t);else if(Math.abs(E+S*.5-T.x)<1)s.width=T.x-s.x,i.position.x*=O.sign(i.position.x),i.frustum.right=0,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Dy(!0,e,t),s.x=T.x,i.position.x=-i.position.x,i.frustum.right=-i.frustum.left,i.frustum.left=0,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Dy(!1,e,t);else if(T.x>E+S*.5){s.width=T.x-E;let A=i.frustum.right;i.frustum.right=l.x-b,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Dy(!0,e,t),s.x=T.x,s.width=E+S-T.x,i.position.x=-i.position.x,i.frustum.left=-i.frustum.right,i.frustum.right=A-i.frustum.right*2,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Dy(!1,e,t)}else{s.x=T.x,s.width=E+S-T.x;let A=i.frustum.left;i.frustum.left=-l.x-b,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Dy(!0,e,t),s.x=E,s.width=T.x-E,i.position.x=-i.position.x,i.frustum.right=-i.frustum.left,i.frustum.left=A-i.frustum.left*2,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Dy(!1,e,t)}i._setTransform(h),d.clone(f,i.position),i.frustum=m.clone(),t.viewport=r}function Dy(e,t,n){let i=t._view,{renderTranslucentDepthForPick:o}=t._environmentState;e||(t.frameState.commandList.length=0),xbe(t),i.createPotentiallyVisibleSet(t),e&&(ybe(t),o||bbe(t)),L7(t,n)}var pbe=new rs;Kn.prototype.updateEnvironment=function(){let e=this._frameState,t=this._view,n=this._environmentState,i=e.passes.render,o=e.passes.offscreen,r=this.atmosphere,s=this.skyAtmosphere,a=this.globe,l=this._globeTranslucencyState;if(!i||this._mode!==J.SCENE2D&&t.camera.frustum instanceof an||!l.environmentVisible)n.skyAtmosphereCommand=void 0,n.skyBoxCommand=void 0,n.sunDrawCommand=void 0,n.sunComputeCommand=void 0,n.moonCommand=void 0;else{if(c(s)){if(c(a))s.setDynamicLighting(eg.fromGlobeFlags(a)),n.isReadyForAtmosphere=n.isReadyForAtmosphere||!a.show||a._surface._tilesToRender.length>0;else{let T=r.dynamicLighting;s.setDynamicLighting(T),n.isReadyForAtmosphere=!0}n.skyAtmosphereCommand=s.update(e,a),c(n.skyAtmosphereCommand)&&this.updateDerivedCommands(n.skyAtmosphereCommand)}else n.skyAtmosphereCommand=void 0;n.skyBoxCommand=c(this.skyBox)?this.skyBox.update(e,this._hdr):void 0;let x=c(this.sun)?this.sun.update(e,t.passState,this._hdr):void 0;n.sunDrawCommand=c(x)?x.drawCommand:void 0,n.sunComputeCommand=c(x)?x.computeCommand:void 0,n.moonCommand=c(this.moon)?this.moon.update(e):void 0}let u=n.clearGlobeDepth=c(a)&&a.show&&(!a.depthTestAgainstTerrain||this.mode===J.SCENE2D);(n.useDepthPlane=u&&this.mode===J.SCENE3D&&l.useDepthPlane)&&this._depthPlane.update(e),n.renderTranslucentDepthForPick=!1,n.useWebVR=this._useWebVR&&this.mode!==J.SCENE2D&&!o;let h=e.mode===J.SCENE3D&&!l.sunVisibleThroughGlobe?e.occluder:void 0,m=e.cullingVolume,p=pbe.planes;for(let x=0;x<5;++x)p[x]=m.planes[x];m=pbe,n.isSkyAtmosphereVisible=c(n.skyAtmosphereCommand)&&n.isReadyForAtmosphere,n.isSunVisible=this.isVisible(m,n.sunDrawCommand,h),n.isMoonVisible=this.isVisible(m,n.moonCommand,h);let _=this.specularEnvironmentMaps,b=this._specularEnvironmentCubeMap;c(_)&&(b==null?void 0:b.url)!==_?(b=b&&b.destroy(),this._specularEnvironmentCubeMap=new hh(_)):!c(_)&&c(b)&&(b.destroy(),this._specularEnvironmentCubeMap=void 0),c(this._specularEnvironmentCubeMap)&&this._specularEnvironmentCubeMap.update(e)};function L_t(e){let t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e.debugShowFrustumPlanes?e._debugFrustumPlanes=new Wp({camera:e.camera,updateOnChange:!1,frustumSplits:t.frustumSplits}):e._debugFrustumPlanes=e._debugFrustumPlanes&&e._debugFrustumPlanes.destroy(),e._debugShowFrustumPlanes=e.debugShowFrustumPlanes),c(e._debugFrustumPlanes)&&e._debugFrustumPlanes.update(t)}function N_t(e){let t=e._frameState,{passes:n,shadowState:i,shadowMaps:o}=t,r=o.length,s=r>0&&!n.pick&&!n.pickVoxel&&e.mode===J.SCENE3D;if(s!==i.shadowsEnabled&&(++i.lastDirtyTime,i.shadowsEnabled=s),i.lightShadowsEnabled=!1,!!s){for(let a=0;a<r;++a)if(o[a]!==i.shadowMaps[a]){++i.lastDirtyTime;break}i.shadowMaps.length=0,i.lightShadowMaps.length=0;for(let a=0;a<r;++a){let l=o[a];l.update(t),i.shadowMaps.push(l),l.fromLightSource&&(i.lightShadowMaps.push(l),i.lightShadowsEnabled=!0),l.dirty&&(++i.lastDirtyTime,l.dirty=!1)}}}function xbe(e){let t=e._frameState;e._groundPrimitives.update(t),e._primitives.update(t),L_t(e),N_t(e),e._globe&&e._globe.render(t)}function F_t(e,t,n){let i=e._context,o=e._frameState,r=e._environmentState,s=e._view,a=o.passes,l=a.pick||a.pickVoxel;c(s.globeDepth)&&(s.globeDepth.picking=l);let u=r.useWebVR;r.originalFramebuffer=t.framebuffer,c(e.sun)&&e.sunBloom!==e._sunBloom?(e.sunBloom&&!u?e._sunPostProcess=new ZV:c(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy()),e._sunBloom=e.sunBloom):!c(e.sun)&&c(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy(),e._sunBloom=!1);let f=e._clearColorCommand;z.clone(n,f.color),f.execute(i,t);let h=r.useGlobeDepthFramebuffer=c(s.globeDepth);h&&(s.globeDepth.update(i,t,s.viewport,e.msaaSamples,e._hdr,r.clearGlobeDepth),s.globeDepth.clear(i,t,n));let m=s.oit,p=r.useOIT=!l&&c(m)&&m.isSupported();p&&(m.update(i,t,s.globeDepth.colorFramebufferManager,e._hdr,e.msaaSamples),m.clear(i,t,n),r.useOIT=m.isSupported());let _=e.postProcessStages,b=r.usePostProcess=!l&&(e._hdr||_.length>0||_.ambientOcclusion.enabled||_.fxaa.enabled||_.bloom.enabled);if(r.usePostProcessSelected=!1,b&&(s.sceneFramebuffer.update(i,s.viewport,e._hdr,e.msaaSamples),s.sceneFramebuffer.clear(i,t,n),_.update(i,o.useLogDepth,e._hdr),_.clear(i),b=r.usePostProcess=_.ready,r.usePostProcessSelected=b&&_.hasSelected),r.isSunVisible&&e.sunBloom&&!u?(t.framebuffer=e._sunPostProcess.update(t),e._sunPostProcess.clear(i,t,n)):h?t.framebuffer=s.globeDepth.framebuffer:b&&(t.framebuffer=s.sceneFramebuffer.framebuffer),c(t.framebuffer)&&f.execute(i,t),r.useInvertClassification=!l&&c(t.framebuffer)&&e.invertClassification){let T;if(o.invertClassificationColor.alpha===1&&h&&(T=s.globeDepth.framebuffer),c(T)||i.depthTexture){if(e._invertClassification.previousFramebuffer=T,e._invertClassification.update(i,e.msaaSamples,s.globeDepth.colorFramebufferManager),e._invertClassification.clear(i,t),o.invertClassificationColor.alpha<1&&p){let E=e._invertClassification.unclassifiedCommand,S=E.derivedCommands;S.oit=m.createDerivedCommands(E,i,S.oit)}}else r.useInvertClassification=!1}e._globeTranslucencyState.translucent&&s.globeTranslucencyFramebuffer.updateAndClear(e._hdr,s.viewport,i,t)}Kn.prototype.resolveFramebuffers=function(e){let t=this._context,n=this._environmentState,i=this._view,{globeDepth:o,translucentTileClassification:r}=i;c(o)&&o.prepareColorTextures(t);let{useOIT:s,useGlobeDepthFramebuffer:a,usePostProcess:l,originalFramebuffer:u}=n,f=a?o.colorFramebufferManager:void 0,h=i.sceneFramebuffer._colorFramebuffer,m=i.sceneFramebuffer.idFramebuffer;if(s&&(e.framebuffer=l?h.framebuffer:u,i.oit.execute(t,e)),r.hasTranslucentDepth&&r.isSupported()&&r.execute(this,e),l){i.sceneFramebuffer.prepareColorTextures(t);let p=h;a&&!s&&(p=f);let _=this.postProcessStages,b=p.getColorTexture(0),x=m.getColorTexture(0),T=g(f,h).getDepthStencilTexture();_.execute(t,b,T,x),_.copy(t,u)}!s&&!l&&a&&(e.framebuffer=u,o.executeCopyColor(t,e))};function B_t(e){let t=e._frameState.afterRender;for(let n=0;n<t.length;++n)t[n]()&&e.requestRender();t.length=0}function k_t(e){if(e.mode===J.MORPHING)return;let t=e.camera.positionCartographic;return e.getHeight(t)}Kn.prototype.getHeight=function(e,t){if(!c(e))return;let n=t===qe.CLAMP_TO_TERRAIN||t===qe.RELATIVE_TO_TERRAIN,i=t===qe.CLAMP_TO_3D_TILE||t===qe.RELATIVE_TO_3D_TILE;if(!c(e))return;let o=Number.NEGATIVE_INFINITY;if(!n){let s=this.primitives.length;for(let a=0;a<s;++a){let l=this.primitives.get(a);if(!l.isCesium3DTileset||!l.show||!l.enableCollision)continue;let u=l.getHeight(e,this);c(u)&&u>o&&(o=u)}}let r=this._globe;if(!i&&c(r)&&r.show){let s=r.getHeight(e);s>o&&(o=s)}if(o>Number.NEGATIVE_INFINITY)return o};var M7=new re;Kn.prototype.updateHeight=function(e,t,n){C.typeOf.func("callback",t);let i=()=>{re.clone(e,M7);let p=this.getHeight(e,n);c(p)&&(M7.height=p,t(M7))},o=n===qe.CLAMP_TO_TERRAIN||n===qe.RELATIVE_TO_TERRAIN,r=n===qe.CLAMP_TO_3D_TILE||n===qe.RELATIVE_TO_3D_TILE,s;!r&&c(this.globe)&&(s=this.globe._surface.updateHeight(e,i));let a={},l=this._ellipsoid,u=p=>{if(o||p.isDestroyed()||!p.isCesium3DTileset)return;let _=p.updateHeight(e,i,l);a[p.id]=_};if(!o){let p=this.primitives.length;for(let _=0;_<p;++_){let b=this.primitives.get(_);u(b)}}let f=this.primitives.primitiveAdded.addEventListener(u),h=this.primitives.primitiveRemoved.addEventListener(p=>{p.isDestroyed()||!p.isCesium3DTileset||(c(a[p.id])&&a[p.id](),delete a[p.id])});return()=>{s=s&&s(),Object.values(a).forEach(p=>p()),a={},f(),h()}};function U_t(e){let t=e.camera,n=e._mode,i=e._screenSpaceCameraController,o=t.positionCartographic;if(!c(o))return!1;if(!i.onMap()&&o.height<0)return!0;if(n===J.SCENE2D||n===J.MORPHING)return!1;let r=e._globeHeight;return c(r)&&o.height<r}Kn.prototype.initializeFrame=function(){if(this._shaderFrameCount++===120&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._globeHeightDirty){c(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),this._globeHeight=k_t(this),this._globeHeightDirty=!1;let e=this.camera.positionCartographic;this._removeUpdateHeightCallback=this.updateHeight(e,t=>{this.isDestroyed()||(this._globeHeight=t.height)})}this._cameraUnderground=U_t(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),c(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};function z_t(e,t){if(e.debugShowFramesPerSecond){if(!c(e._performanceDisplay)){let n=document.createElement("div");n.className="cesium-performanceDisplay-defaultContainer",e._canvas.parentNode.appendChild(n);let o=new qz({container:n});e._performanceDisplay=o,e._performanceContainer=n}e._performanceDisplay.throttled=e.requestRenderMode,e._performanceDisplay.update(t)}else c(e._performanceDisplay)&&(e._performanceDisplay=e._performanceDisplay&&e._performanceDisplay.destroy(),e._performanceContainer.parentNode.removeChild(e._performanceContainer))}function V_t(e){e._jobScheduler.resetBudgets();let t=e._frameState;e.primitives.prePassesUpdate(t),c(e.globe)&&e.globe.update(t),e._picking.update(),t.creditDisplay.update()}function H_t(e){e.primitives.postPassesUpdate(e._frameState),tc.update()}var G_t=new z;function j_t(e){let t=e._frameState,n=e.context,{uniformState:i}=n,o=e._defaultView;e._view=o,e.updateFrameState(),t.passes.render=!0,t.passes.postProcess=e.postProcessStages.hasSelected,t.tilesetPassState=o_t;let r=g(e.backgroundColor,z.BLACK);e._hdr&&(r=z.clone(r,G_t),r.red=Math.pow(r.red,e.gamma),r.green=Math.pow(r.green,e.gamma),r.blue=Math.pow(r.blue,e.gamma)),t.backgroundColor=r,t.atmosphere=e.atmosphere,e.fog.update(t),i.update(t);let s=e.shadowMap;c(s)&&s.enabled&&(!c(e.light)||e.light instanceof g_?d.negate(i.sunDirectionWC,e._shadowMapCamera.direction):d.clone(e.light.direction,e._shadowMapCamera.direction),t.shadowMaps.push(s)),e._computeCommandList.length=0,e._overlayCommandList.length=0;let a=o.viewport;a.x=0,a.y=0,a.width=n.drawingBufferWidth,a.height=n.drawingBufferHeight;let l=o.passState;l.framebuffer=void 0,l.blendingEnabled=void 0,l.scissorTest=void 0,l.viewport=je.clone(a,l.viewport),c(e.globe)&&e.globe.beginFrame(t),e.updateEnvironment(),e.updateAndExecuteCommands(l,r),e.resolveFramebuffers(l),l.framebuffer=void 0,T_t(e,l),c(e.globe)&&(e.globe.endFrame(t),e.globe.tilesLoaded||(e._renderRequested=!0)),n.endFrame()}function J0(e,t){try{t(e)}catch(n){if(e._renderError.raiseEvent(e,n),e.rethrowRenderErrors)throw n}}function W_t(e){return e._picking.updateMostDetailedRayPicks(e)}Kn.prototype.render=function(e){this._preUpdate.raiseEvent(this,e);let t=this._frameState;t.newFrame=!1,c(e)||(e=K.now());let n=this._view.checkForCameraUpdates(this);n&&(this._globeHeightDirty=!0);let i=!this.requestRenderMode||this._renderRequested||n||this._logDepthBufferDirty||this._hdrDirty||this.mode===J.MORPHING;if(!i&&c(this.maximumRenderTimeChange)&&c(this._lastRenderTime)){let o=Math.abs(K.secondsDifference(this._lastRenderTime,e));i=i||o>this.maximumRenderTimeChange}if(i){this._lastRenderTime=K.clone(e,this._lastRenderTime),this._renderRequested=!1,this._logDepthBufferDirty=!1,this._hdrDirty=!1;let o=O.incrementWrap(t.frameNumber,15e6,1);_be(this,o,e),t.newFrame=!0}J0(this,V_t),this.primitives.show&&(J0(this,W_t),J0(this,q_t),J0(this,Y_t),i||J0(this,X_t)),this._postUpdate.raiseEvent(this,e),i&&(this._preRender.raiseEvent(this,e),t.creditDisplay.beginFrame(),J0(this,j_t)),z_t(this,i),J0(this,H_t),B_t(this),i&&(this._postRender.raiseEvent(this,e),t.creditDisplay.endFrame())};Kn.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)};Kn.prototype.requestRender=function(){this._renderRequested=!0};Kn.prototype.clampLineWidth=function(e){return Math.max(ht.minimumAliasedLineWidth,Math.min(e,ht.maximumAliasedLineWidth))};Kn.prototype.pick=function(e,t,n){return this._picking.pick(this,e,t,n)};Kn.prototype.pickVoxel=function(e,t,n){let i=this.pick(e,t,n);if(!c(i))return;let o=i.primitive;if(!(o instanceof Z0))return;let r=this._picking.pickVoxelCoordinate(this,e,t,n),s=255*r[0]+r[1],a=o._traversal.findKeyframeNode(s);if(!c(a))return;let l=255*r[2]+r[3];return QV.fromKeyframeNode(o,s,l,a)};Kn.prototype.pickMetadata=function(e,t,n,i){var u,f,h;C.typeOf.object("windowPosition",e),C.typeOf.string("className",n),C.typeOf.string("propertyName",i);let o=this.pick(e);if(!c(o))return;let r=(h=(f=(u=o.detail)==null?void 0:u.model)==null?void 0:f.structuralMetadata)==null?void 0:h.schema,s=vH(r,t,n,i);if(!c(s))return;let a=new DH(t,n,i,s);return this._picking.pickMetadata(this,e,a)};Kn.prototype.pickMetadataSchema=function(e){var i,o,r;C.typeOf.object("windowPosition",e);let t=this.pick(e);return c(t)?(r=(o=(i=t.detail)==null?void 0:i.model)==null?void 0:o.structuralMetadata)==null?void 0:r.schema:void 0};Kn.prototype.pickPositionWorldCoordinates=function(e,t){return this._picking.pickPositionWorldCoordinates(this,e,t)};Kn.prototype.pickPosition=function(e,t){return this._picking.pickPosition(this,e,t)};Kn.prototype.drillPick=function(e,t,n,i){return this._picking.drillPick(this,e,t,n,i)};function q_t(e){let t=e._frameState;O7.camera=t.camera,O7.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,O7)}function Y_t(e){let t=e._frameState;if(!t.camera.canPreloadFlight())return;P7.camera=e.preloadFlightCamera,P7.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,P7)}function X_t(e){e.primitives.updateForPass(e._frameState,r_t)}Kn.prototype.pickFromRay=function(e,t,n){return this._picking.pickFromRay(this,e,t,n)};Kn.prototype.drillPickFromRay=function(e,t,n,i){return this._picking.drillPickFromRay(this,e,t,n,i)};Kn.prototype.pickFromRayMostDetailed=function(e,t,n){return this._picking.pickFromRayMostDetailed(this,e,t,n)};Kn.prototype.drillPickFromRayMostDetailed=function(e,t,n,i){return this._picking.drillPickFromRayMostDetailed(this,e,t,n,i)};Kn.prototype.sampleHeight=function(e,t,n){return this._picking.sampleHeight(this,e,t,n)};Kn.prototype.clampToHeight=function(e,t,n,i){return this._picking.clampToHeight(this,e,t,n,i)};Kn.prototype.sampleHeightMostDetailed=function(e,t,n){return this._picking.sampleHeightMostDetailed(this,e,t,n)};Kn.prototype.clampToHeightMostDetailed=function(e,t,n){return this._picking.clampToHeightMostDetailed(this,e,t,n)};Kn.prototype.cartesianToCanvasCoordinates=function(e,t){return Yi.worldToWindowCoordinates(this,e,t)};Kn.prototype.completeMorph=function(){this._transitioner.completeMorph()};Kn.prototype.morphTo2D=function(e){e=g(e,2),this._transitioner.morphTo2D(e,this._ellipsoid)};Kn.prototype.morphToColumbusView=function(e){e=g(e,2),this._transitioner.morphToColumbusView(e,this._ellipsoid)};Kn.prototype.morphTo3D=function(e){e=g(e,2),this._transitioner.morphTo3D(e,this._ellipsoid)};function K_t(e,t){if(e._removeTerrainProviderReadyListener=e._removeTerrainProviderReadyListener&&e._removeTerrainProviderReadyListener(),t.ready){c(e.globe)&&(e.globe.terrainProvider=t.provider);return}e.globe.terrainProvider=void 0,e._removeTerrainProviderReadyListener=t.readyEvent.addEventListener(n=>{c(e)&&c(e.globe)&&(e.globe.terrainProvider=n),e._removeTerrainProviderReadyListener()})}Kn.prototype.setTerrain=function(e){return C.typeOf.object("terrain",e),K_t(this,e),e};Kn.prototype.isDestroyed=function(){return!1};Kn.prototype.destroy=function(){this._tweens.removeAll(),this._computeEngine=this._computeEngine&&this._computeEngine.destroy(),this._screenSpaceCameraController=this._screenSpaceCameraController&&this._screenSpaceCameraController.destroy(),this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._primitives=this._primitives&&this._primitives.destroy(),this._groundPrimitives=this._groundPrimitives&&this._groundPrimitives.destroy(),this._globe=this._globe&&this._globe.destroy(),this._removeTerrainProviderReadyListener=this._removeTerrainProviderReadyListener&&this._removeTerrainProviderReadyListener(),this.skyBox=this.skyBox&&this.skyBox.destroy(),this.skyAtmosphere=this.skyAtmosphere&&this.skyAtmosphere.destroy(),this._debugSphere=this._debugSphere&&this._debugSphere.destroy(),this.sun=this.sun&&this.sun.destroy(),this._sunPostProcess=this._sunPostProcess&&this._sunPostProcess.destroy(),this._depthPlane=this._depthPlane&&this._depthPlane.destroy(),this._transitioner=this._transitioner&&this._transitioner.destroy(),this._debugFrustumPlanes=this._debugFrustumPlanes&&this._debugFrustumPlanes.destroy(),this._brdfLutGenerator=this._brdfLutGenerator&&this._brdfLutGenerator.destroy(),this._picking=this._picking&&this._picking.destroy(),this._defaultView=this._defaultView&&this._defaultView.destroy(),this._view=void 0,this._removeCreditContainer&&this._canvas.parentNode.removeChild(this._creditContainer),this.postProcessStages=this.postProcessStages&&this.postProcessStages.destroy(),this._context=this._context&&this._context.destroy(),this._frameState.creditDisplay=this._frameState.creditDisplay&&this._frameState.creditDisplay.destroy(),c(this._performanceDisplay)&&(this._performanceDisplay=this._performanceDisplay&&this._performanceDisplay.destroy(),this._performanceContainer.parentNode.removeChild(this._performanceContainer)),this._removeRequestListenerCallback(),this._removeTaskProcessorListenerCallback();for(let e=0;e<this._removeGlobeCallbacks.length;++e)this._removeGlobeCallbacks[e]();return this._removeGlobeCallbacks.length=0,c(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),ue(this)};var PH=Kn;var vI=`float interpolateByDistance(vec4 nearFarScalar, float distance)
| {
| float startDistance = nearFarScalar.x;
| float startValue = nearFarScalar.y;
| float endDistance = nearFarScalar.z;
| float endValue = nearFarScalar.w;
| float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);
| return mix(startValue, endValue, t);
| }
|
| void computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity, out float underTranslucentGlobe)
| {
| float ellipsoidRadiiDifference = czm_ellipsoidRadii.x - czm_ellipsoidRadii.z;
|
| // Adjustment to the atmosphere radius applied based on the camera height.
| float distanceAdjustMin = czm_ellipsoidRadii.x / 4.0;
| float distanceAdjustMax = czm_ellipsoidRadii.x;
| float distanceAdjustModifier = ellipsoidRadiiDifference / 2.0;
| float distanceAdjust = distanceAdjustModifier * clamp((czm_eyeHeight - distanceAdjustMin) / (distanceAdjustMax - distanceAdjustMin), 0.0, 1.0);
|
| // Since atmosphere scattering assumes the atmosphere is a spherical shell, we compute an inner radius of the atmosphere best fit
| // for the position on the ellipsoid.
| float radiusAdjust = (ellipsoidRadiiDifference / 4.0) + distanceAdjust;
| float atmosphereInnerRadius = (length(czm_viewerPositionWC) - czm_eyeHeight) - radiusAdjust;
|
| // Setup the primary ray: from the camera position to the vertex position.
| vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
| vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
| czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);
|
| underTranslucentGlobe = 0.0;
|
| // Brighten the sky atmosphere under the Earth's atmosphere when translucency is enabled.
| #if defined(GLOBE_TRANSLUCENT)
|
| // Check for intersection with the inner radius of the atmopshere.
| czm_raySegment primaryRayEarthIntersect = czm_raySphereIntersectionInterval(primaryRay, vec3(0.0), atmosphereInnerRadius + radiusAdjust);
| if (primaryRayEarthIntersect.start > 0.0 && primaryRayEarthIntersect.stop > 0.0) {
|
| // Compute position on globe.
| vec3 direction = normalize(positionWC);
| czm_ray ellipsoidRay = czm_ray(positionWC, -direction);
| czm_raySegment ellipsoidIntersection = czm_rayEllipsoidIntersectionInterval(ellipsoidRay, vec3(0.0), czm_ellipsoidInverseRadii);
| vec3 onEarth = positionWC - (direction * ellipsoidIntersection.start);
|
| // Control the color using the camera angle.
| float angle = dot(normalize(czm_viewerPositionWC), normalize(onEarth));
|
| // Control the opacity using the distance from Earth.
| opacity = interpolateByDistance(vec4(0.0, 1.0, czm_ellipsoidRadii.x, 0.0), length(czm_viewerPositionWC - onEarth));
| vec3 horizonColor = vec3(0.1, 0.2, 0.3);
| vec3 nearColor = vec3(0.0);
|
| rayleighColor = mix(nearColor, horizonColor, exp(-angle) * opacity);
|
| // Set the traslucent flag to avoid alpha adjustment in computeFinalColor funciton.
| underTranslucentGlobe = 1.0;
| return;
| }
| #endif
|
| computeScattering(
| primaryRay,
| length(cameraToPositionWC),
| lightDirection,
| atmosphereInnerRadius,
| rayleighColor,
| mieColor,
| opacity
| );
|
| // Alter the opacity based on how close the viewer is to the ground.
| // (0.0 = At edge of atmosphere, 1.0 = On ground)
| float cameraHeight = czm_eyeHeight + atmosphereInnerRadius;
| float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;
| opacity = clamp((atmosphereOuterRadius - cameraHeight) / (atmosphereOuterRadius - atmosphereInnerRadius), 0.0, 1.0);
|
| // Alter alpha based on time of day (0.0 = night , 1.0 = day)
| float nightAlpha = (u_radiiAndDynamicAtmosphereColor.z != 0.0) ? clamp(dot(normalize(positionWC), lightDirection), 0.0, 1.0) : 1.0;
| opacity *= pow(nightAlpha, 0.5);
| }
| `;var RH=`in vec3 v_outerPositionWC;
|
| uniform vec3 u_hsbShift;
|
| #ifndef PER_FRAGMENT_ATMOSPHERE
| in vec3 v_mieColor;
| in vec3 v_rayleighColor;
| in float v_opacity;
| in float v_translucent;
| #endif
|
| void main (void)
| {
| float lightEnum = u_radiiAndDynamicAtmosphereColor.z;
| vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(v_outerPositionWC, lightEnum);
|
| vec3 mieColor;
| vec3 rayleighColor;
| float opacity;
| float translucent;
|
| #ifdef PER_FRAGMENT_ATMOSPHERE
| computeAtmosphereScattering(
| v_outerPositionWC,
| lightDirection,
| rayleighColor,
| mieColor,
| opacity,
| translucent
| );
| #else
| mieColor = v_mieColor;
| rayleighColor = v_rayleighColor;
| opacity = v_opacity;
| translucent = v_translucent;
| #endif
|
| vec4 color = computeAtmosphereColor(v_outerPositionWC, lightDirection, rayleighColor, mieColor, opacity);
|
| #ifndef HDR
| color.rgb = czm_pbrNeutralTonemapping(color.rgb);
| color.rgb = czm_inverseGamma(color.rgb);
| #endif
|
| #ifdef COLOR_CORRECT
| const bool ignoreBlackPixels = true;
| color.rgb = czm_applyHSBShift(color.rgb, u_hsbShift, ignoreBlackPixels);
| #endif
|
| // For the parts of the sky atmosphere that are not behind a translucent globe,
| // we mix in the default opacity so that the sky atmosphere still appears at distance.
| // This is needed because the opacity in the sky atmosphere is initially adjusted based
| // on the camera height.
| if (translucent == 0.0) {
| color.a = mix(color.b, 1.0, color.a) * smoothstep(0.0, 1.0, czm_morphTime);
| }
|
| out_FragColor = color;
| }
| `;var MH=`in vec4 position;
|
| out vec3 v_outerPositionWC;
|
| #ifndef PER_FRAGMENT_ATMOSPHERE
| out vec3 v_mieColor;
| out vec3 v_rayleighColor;
| out float v_opacity;
| out float v_translucent;
| #endif
|
| void main(void)
| {
| vec4 positionWC = czm_model * position;
| float lightEnum = u_radiiAndDynamicAtmosphereColor.z;
| vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC.xyz, lightEnum);
|
| #ifndef PER_FRAGMENT_ATMOSPHERE
| computeAtmosphereScattering(
| positionWC.xyz,
| lightDirection,
| v_rayleighColor,
| v_mieColor,
| v_opacity,
| v_translucent
| );
| #endif
|
| v_outerPositionWC = positionWC.xyz;
| gl_Position = czm_modelViewProjection * position;
| }
| `;function Sw(e){e=g(e,Z.WGS84),this.show=!0,this.perFragmentAtmosphere=!1,this._ellipsoid=e;let t=1.025,n=d.multiplyByScalar(e.radii,t,new d);this._scaleMatrix=N.fromScale(n),this._modelMatrix=new N,this._command=new Ke({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.atmosphereLightIntensity=50,this.atmosphereRayleighCoefficient=new d(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new d(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this._hueSaturationBrightness=new d;let i=new d;i.x=e.maximumRadius*t,i.y=e.maximumRadius,i.z=0,this._radiiAndDynamicAtmosphereColor=i;let o=this;this._command.uniformMap={u_radiiAndDynamicAtmosphereColor:function(){return o._radiiAndDynamicAtmosphereColor},u_hsbShift:function(){return o._hueSaturationBrightness.x=o.hueShift,o._hueSaturationBrightness.y=o.saturationShift,o._hueSaturationBrightness.z=o.brightnessShift,o._hueSaturationBrightness},u_atmosphereLightIntensity:function(){return o.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return o.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return o.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return o.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return o.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return o.atmosphereMieAnisotropy}}}Object.defineProperties(Sw.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});Sw.prototype.setDynamicLighting=function(e){this._radiiAndDynamicAtmosphereColor.z=e};var N7=new N;Sw.prototype.update=function(e,t){if(!this.show)return;let n=e.mode;if(n!==J.SCENE3D&&n!==J.MORPHING||!e.passes.render)return;let i=N.fromRotationTranslation(e.context.uniformState.inverseViewRotation,d.ZERO,N7),o=N.multiplyTransformation(i,vo.Y_UP_TO_Z_UP,N7),r=N.multiply(this._scaleMatrix,o,N7);N.clone(r,this._modelMatrix);let s=e.context,a=$_t(this),l=e.globeTranslucencyState.translucent,u=this.perFragmentAtmosphere||l||!c(t)||!t.show,f=this._command;if(!c(f.vertexArray)){let m=Ks.createGeometry(new Ks({radii:new d(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:Ce.POSITION_ONLY}));f.vertexArray=Zn.fromGeometry({context:s,geometry:m,attributeLocations:Pn.createAttributeLocations(m),bufferUsage:Pe.STATIC_DRAW}),f.renderState=Fe.fromCache({cull:{enabled:!0,face:pi.FRONT},blending:cn.ALPHA_BLEND,depthMask:!1})}let h=a|u<<2|l<<3;if(h!==this._flags){this._flags=h;let m=[];a&&m.push("COLOR_CORRECT"),u&&m.push("PER_FRAGMENT_ATMOSPHERE"),l&&m.push("GLOBE_TRANSLUCENT");let p=new Be({defines:m,sources:[Eh,vI,MH]}),_=new Be({defines:m,sources:[Eh,vI,RH]});this._spSkyAtmosphere=en.fromCache({context:s,vertexShaderSource:p,fragmentShaderSource:_}),f.shaderProgram=this._spSkyAtmosphere}return f};function $_t(e){return!(O.equalsEpsilon(e.hueShift,0,O.EPSILON7)&&O.equalsEpsilon(e.saturationShift,0,O.EPSILON7)&&O.equalsEpsilon(e.brightnessShift,0,O.EPSILON7))}Sw.prototype.isDestroyed=function(){return!1};Sw.prototype.destroy=function(){let e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyAtmosphere=this._spSkyAtmosphere&&this._spSkyAtmosphere.destroy(),ue(this)};var LH=Sw;var NH=`uniform samplerCube u_cubeMap;
|
| in vec3 v_texCoord;
|
| void main()
| {
| vec4 color = czm_textureCube(u_cubeMap, normalize(v_texCoord));
| out_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);
| }
| `;var FH=`in vec3 position;
| out vec3 v_texCoord;
|
| void main()
| {
| vec3 p = czm_viewRotation * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));
| gl_Position = czm_projection * vec4(p, 1.0);
| v_texCoord = position.xyz;
| }
| `;function vw(e){this.sources=e.sources,this._sources=void 0,this.show=g(e.show,!0),this._command=new Ke({modelMatrix:N.clone(N.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0}vw.prototype.update=function(e,t){let n=this,{mode:i,passes:o,context:r}=e;if(!this.show||i!==J.SCENE3D&&i!==J.MORPHING||!o.render)return;if(this._sources!==this.sources){this._sources=this.sources;let a=this.sources;if(C.defined("this.sources",a),Object.values(Lo.FaceName).some(u=>!c(a[u])))throw new w("this.sources must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");let l=typeof a.positiveX;if(Object.values(Lo.FaceName).some(u=>typeof a[u]!==l))throw new w("this.sources properties must all be the same type.");typeof a.positiveX=="string"?cM(r,this._sources).then(function(u){n._cubeMap=n._cubeMap&&n._cubeMap.destroy(),n._cubeMap=u}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new Lo({context:r,source:a}))}let s=this._command;if(!c(s.vertexArray)){s.uniformMap={u_cubeMap:function(){return n._cubeMap}};let a=Ia.createGeometry(Ia.fromDimensions({dimensions:new d(2,2,2),vertexFormat:Ce.POSITION_ONLY})),l=this._attributeLocations=Pn.createAttributeLocations(a);s.vertexArray=Zn.fromGeometry({context:r,geometry:a,attributeLocations:l,bufferUsage:Pe.STATIC_DRAW}),s.renderState=Fe.fromCache({blending:cn.ALPHA_BLEND})}if(!c(s.shaderProgram)||this._useHdr!==t){let a=new Be({defines:[t?"HDR":""],sources:[NH]});s.shaderProgram=en.fromCache({context:r,vertexShaderSource:FH,fragmentShaderSource:a,attributeLocations:this._attributeLocations}),this._useHdr=t}if(c(this._cubeMap))return s};vw.prototype.isDestroyed=function(){return!1};vw.prototype.destroy=function(){let e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),ue(this)};function Aw(e){return Mi(`Assets/Textures/SkyBox/tycho2t3_80_${e}.jpg`)}vw.createEarthSkyBox=function(){return new vw({sources:{positiveX:Aw("px"),negativeX:Aw("mx"),positiveY:Aw("py"),negativeY:Aw("my"),positiveZ:Aw("pz"),negativeZ:Aw("mz")}})};var BH=vw;var kH=`uniform sampler2D u_texture;
|
| in vec2 v_textureCoordinates;
|
| void main()
| {
| vec4 color = texture(u_texture, v_textureCoordinates);
| out_FragColor = czm_gammaCorrect(color);
| }
| `;var UH=`uniform float u_radiusTS;
|
| in vec2 v_textureCoordinates;
|
| vec2 rotate(vec2 p, vec2 direction)
| {
| return vec2(p.x * direction.x - p.y * direction.y, p.x * direction.y + p.y * direction.x);
| }
|
| vec4 addBurst(vec2 position, vec2 direction, float lengthScalar)
| {
| vec2 rotatedPosition = rotate(position, direction) * vec2(25.0, 0.75);
| float radius = length(rotatedPosition) * lengthScalar;
| float burst = 1.0 - smoothstep(0.0, 0.55, radius);
| return vec4(burst);
| }
|
| void main()
| {
| float lengthScalar = 2.0 / sqrt(2.0);
| vec2 position = v_textureCoordinates - vec2(0.5);
| float radius = length(position) * lengthScalar;
| float surface = step(radius, u_radiusTS);
| vec4 color = vec4(vec2(1.0), surface + 0.2, surface);
|
| float glow = 1.0 - smoothstep(0.0, 0.55, radius);
| color.ba += mix(vec2(0.0), vec2(1.0), glow) * 0.75;
|
| vec4 burst = vec4(0.0);
|
| // The following loop has been manually unrolled for speed, to
| // avoid sin() and cos().
| //
| //for (float i = 0.4; i < 3.2; i += 1.047) {
| // vec2 direction = vec2(sin(i), cos(i));
| // burst += 0.4 * addBurst(position, direction, lengthScalar);
| //
| // direction = vec2(sin(i - 0.08), cos(i - 0.08));
| // burst += 0.3 * addBurst(position, direction, lengthScalar);
| //}
|
| burst += 0.4 * addBurst(position, vec2(0.38942, 0.92106), lengthScalar); // angle == 0.4
| burst += 0.4 * addBurst(position, vec2(0.99235, 0.12348), lengthScalar); // angle == 0.4 + 1.047
| burst += 0.4 * addBurst(position, vec2(0.60327, -0.79754), lengthScalar); // angle == 0.4 + 1.047 * 2.0
|
| burst += 0.3 * addBurst(position, vec2(0.31457, 0.94924), lengthScalar); // angle == 0.4 - 0.08
| burst += 0.3 * addBurst(position, vec2(0.97931, 0.20239), lengthScalar); // angle == 0.4 + 1.047 - 0.08
| burst += 0.3 * addBurst(position, vec2(0.66507, -0.74678), lengthScalar); // angle == 0.4 + 1.047 * 2.0 - 0.08
|
| // End of manual loop unrolling.
|
| color += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;
|
| out_FragColor = clamp(color, vec4(0.0), vec4(1.0));
| }
| `;var zH=`in vec2 direction;
|
| uniform float u_size;
|
| out vec2 v_textureCoordinates;
|
| void main()
| {
| vec4 position;
| if (czm_morphTime == 1.0)
| {
| position = vec4(czm_sunPositionWC, 1.0);
| }
| else
| {
| position = vec4(czm_sunPositionColumbusView.zxy, 1.0);
| }
|
| vec4 positionEC = czm_view * position;
| vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);
|
| vec2 halfSize = vec2(u_size * 0.5);
| halfSize *= ((direction * 2.0) - 1.0);
|
| gl_Position = czm_viewportOrthographic * vec4(positionWC.xy + halfSize, -positionWC.z, 1.0);
|
| v_textureCoordinates = direction;
| }
| `;function II(){this.show=!0,this._drawCommand=new Ke({primitiveType:Se.TRIANGLES,boundingVolume:new ne,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new ne,this._boundingVolume2D=new ne,this._texture=void 0,this._drawingBufferWidth=void 0,this._drawingBufferHeight=void 0,this._radiusTS=void 0,this._size=void 0,this.glowFactor=1,this._glowFactorDirty=!1,this._useHdr=void 0;let e=this;this._uniformMap={u_texture:function(){return e._texture},u_size:function(){return e._size}}}Object.defineProperties(II.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var Z_t=new k,J_t=new k,Q_t=new ee,DI=new ee;II.prototype.update=function(e,t,n){if(!this.show)return;let i=e.mode;if(i===J.SCENE2D||i===J.MORPHING||!e.passes.render)return;let o=e.context,r=t.viewport.width,s=t.viewport.height;if(!c(this._texture)||r!==this._drawingBufferWidth||s!==this._drawingBufferHeight||this._glowFactorDirty||n!==this._useHdr){this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=r,this._drawingBufferHeight=s,this._glowFactorDirty=!1,this._useHdr=n;let A=Math.max(r,s);A=Math.pow(2,Math.ceil(Math.log(A)/Math.log(2))-2),A=Math.max(1,A);let v=n?o.halfFloatingPointTexture?Ne.HALF_FLOAT:Ne.FLOAT:Ne.UNSIGNED_BYTE;this._texture=new Ot({context:o,width:A,height:A,pixelFormat:Re.RGBA,pixelDatatype:v}),this._glowLengthTS=this._glowFactor*5,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;let D=this,R={u_radiusTS:function(){return D._radiusTS}};this._commands.computeCommand=new Vc({fragmentShaderSource:UH,outputTexture:this._texture,uniformMap:R,persists:!1,owner:this,postExecute:function(){D._commands.computeCommand=void 0}})}let a=this._drawCommand;if(!c(a.vertexArray)){let A={direction:0},v=new Uint8Array(4*2);v[0]=0,v[1]=0,v[2]=255,v[3]=0,v[4]=255,v[5]=255,v[6]=0,v[7]=255;let D=yt.createVertexBuffer({context:o,typedArray:v,usage:Pe.STATIC_DRAW}),R=[{index:A.direction,vertexBuffer:D,componentsPerAttribute:2,normalize:!0,componentDatatype:j.UNSIGNED_BYTE}],P=yt.createIndexBuffer({context:o,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Pe.STATIC_DRAW,indexDatatype:Oe.UNSIGNED_SHORT});a.vertexArray=new Zn({context:o,attributes:R,indexBuffer:P}),a.shaderProgram=en.fromCache({context:o,vertexShaderSource:zH,fragmentShaderSource:kH,attributeLocations:A}),a.renderState=Fe.fromCache({blending:cn.ALPHA_BLEND}),a.uniformMap=this._uniformMap}let l=o.uniformState.sunPositionWC,u=o.uniformState.sunPositionColumbusView,f=this._boundingVolume,h=this._boundingVolume2D;d.clone(l,f.center),h.center.x=u.z,h.center.y=u.x,h.center.z=u.y,f.radius=O.SOLAR_RADIUS+O.SOLAR_RADIUS*this._glowLengthTS,h.radius=f.radius,i===J.SCENE3D?ne.clone(f,a.boundingVolume):i===J.COLUMBUS_VIEW&&ne.clone(h,a.boundingVolume);let m=Yi.computeActualEllipsoidPosition(e,l,DI),p=d.magnitude(d.subtract(m,e.camera.position,DI)),_=o.uniformState.projection,b=Q_t;b.x=0,b.y=0,b.z=-p,b.w=1;let x=N.multiplyByVector(_,b,DI),T=Yi.clipToGLWindowCoordinates(t.viewport,x,Z_t);b.x=O.SOLAR_RADIUS;let E=N.multiplyByVector(_,b,DI),S=Yi.clipToGLWindowCoordinates(t.viewport,E,J_t);return this._size=k.magnitude(k.subtract(S,T,DI)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands};II.prototype.isDestroyed=function(){return!1};II.prototype.destroy=function(){let e=this._drawCommand;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._texture=this._texture&&this._texture.destroy(),ue(this)};var VH=II;var Ebe=Mr(oO(),1);function egt(e,t,n){return C.typeOf.string("samplerUniformName",e),C.typeOf.string("matrixUniformName",t),C.typeOf.string("styleUniformName",n),` float clipDistance = clip(gl_FragCoord, ${e}, ${t});
| vec4 clippingPlanesEdgeColor = vec4(1.0);
| clippingPlanesEdgeColor.rgb = ${n}.rgb;
| float clippingPlanesEdgeWidth = ${n}.a;
| if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth)
| {
| out_FragColor = clippingPlanesEdgeColor;
| }
| `}var HH=egt;var tgt={modifyFragmentShader:function(t){return t=Be.replaceMain(t,"czm_splitter_main"),t+=`uniform float czm_splitDirection;
| void main()
| {
| #ifndef SHADOW_MAP
| if (czm_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
| if (czm_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
| #endif
| czm_splitter_main();
| }
| `,t},addUniforms:function(t,n){n.czm_splitDirection=function(){return t.splitDirection}}},OI=tgt;var Q0={NEEDS_DECODE:0,DECODING:1,READY:2,FAILED:3};function PI(e){C.typeOf.object("options",e),C.typeOf.object("options.arrayBuffer",e.arrayBuffer),this._parsedContent=void 0,this._drawCommand=void 0,this._isTranslucent=!1,this._styleTranslucent=!1,this._constantColor=z.clone(z.DARKGRAY),this._highlightColor=z.clone(z.WHITE),this._pointSize=1,this._rtcCenter=void 0,this._quantizedVolumeScale=void 0,this._quantizedVolumeOffset=void 0,this._styleableShaderAttributes=void 0,this._isQuantized=!1,this._isOctEncoded16P=!1,this._isRGB565=!1,this._hasColors=!1,this._hasNormals=!1,this._hasBatchIds=!1,this._decodingState=Q0.READY,this._dequantizeInShader=!0,this._isQuantizedDraco=!1,this._isOctEncodedDraco=!1,this._quantizedRange=0,this._octEncodedRange=0,this.backFaceCulling=!1,this._backFaceCulling=!1,this.normalShading=!0,this._normalShading=!0,this._opaqueRenderState=void 0,this._translucentRenderState=void 0,this._mode=void 0,this._ready=!1,this._pointsLength=0,this._geometryByteLength=0,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._batchTableLoaded=e.batchTableLoaded,this._pickIdLoaded=e.pickIdLoaded,this._opaquePass=g(e.opaquePass,xe.OPAQUE),this._cull=g(e.cull,!0),this.style=void 0,this._style=void 0,this.styleDirty=!1,this.modelMatrix=N.clone(N.IDENTITY),this._modelMatrix=N.clone(N.IDENTITY),this.time=0,this.shadows=yn.ENABLED,this._boundingSphere=void 0,this.clippingPlanes=void 0,this.isClipped=!1,this.clippingPlanesDirty=!1,this.clippingPlanesOriginMatrix=void 0,this.attenuation=!1,this._attenuation=!1,this.geometricError=0,this.geometricErrorScale=1,this.maximumAttenuation=this._pointSize,this.splitDirection=g(e.splitDirection,Nr.NONE),this._splittingEnabled=!1,this._error=void 0,ngt(this,e)}Object.defineProperties(PI.prototype,{pointsLength:{get:function(){return this._pointsLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}},color:{get:function(){return z.clone(this._highlightColor)},set:function(e){this._highlightColor=z.clone(e,this._highlightColor)}},boundingSphere:{get:function(){if(c(this._drawCommand))return this._drawCommand.boundingVolume},set:function(e){this._boundingSphere=ne.clone(e,this._boundingSphere)}}});function ngt(e,t){let n=fC.parse(t.arrayBuffer,t.byteOffset);if(e._parsedContent=n,e._rtcCenter=n.rtcCenter,e._hasNormals=n.hasNormals,e._hasColors=n.hasColors,e._hasBatchIds=n.hasBatchIds,e._isTranslucent=n.isTranslucent,!n.hasBatchIds&&c(n.batchTableBinary)&&(n.styleableProperties=R_.getBinaryProperties(n.pointsLength,n.batchTableJson,n.batchTableBinary)),c(n.draco)){let a=n.draco;e._decodingState=Q0.NEEDS_DECODE,a.dequantizeInShader=e._dequantizeInShader}let i=n.positions;c(i)&&(e._isQuantized=i.isQuantized,e._quantizedVolumeScale=i.quantizedVolumeScale,e._quantizedVolumeOffset=i.quantizedVolumeOffset,e._quantizedRange=i.quantizedRange);let o=n.normals;c(o)&&(e._isOctEncoded16P=o.octEncoded);let r=n.colors;c(r)&&(c(r.constantColor)&&(e._constantColor=z.clone(r.constantColor,e._constantColor),e._hasColors=!1),e._isRGB565=r.isRGB565);let s=n.batchIds;c(n.batchIds)&&(s.name="BATCH_ID",s.semantic="BATCH_ID",s.setIndex=void 0),n.hasBatchIds&&e._batchTableLoaded(n.batchLength,n.batchTableJson,n.batchTableBinary),e._pointsLength=n.pointsLength}var igt=new d,ogt=new d,rgt=new d,Tbe,GH;function sgt(e){if(!c(GH)){Tbe=new Ebe.default(0),GH=new Array(e);for(let t=0;t<e;++t)GH[t]=Tbe.random()}return GH}function agt(e){let n=e.length/3,i=Math.min(n,20),o=sgt(20),r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=d.fromElements(r,r,r,igt),l=d.fromElements(s,s,s,ogt);for(let f=0;f<i;++f){let h=Math.floor(o[f]*n),m=d.unpack(e,h*3,rgt);d.minimumByComponent(a,m,a),d.maximumByComponent(l,m,l)}let u=ne.fromCornerPoints(a,l);return u.radius+=O.EPSILON2,u}function Cbe(e,t){let n=j.fromTypedArray(e);return n===j.INT||n===j.UNSIGNED_INT||n===j.DOUBLE?(mt("Cast pnts property to floats",`Point cloud property "${t}" will be cast to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.`),new Float32Array(e)):e}var cgt=new ee,lgt=new ee,ugt=new z,wbe=0,jH=1,z7=2,Sbe=3,fgt=4,F7=new N,dgt=new N;function hgt(e,t){let n=t.context,i=e._parsedContent,o=e._pointsLength,r=i.positions,s=i.colors,a=i.normals,l=i.batchIds,u=i.styleableProperties,f=c(u),h=e._isQuantized,m=e._isQuantizedDraco,p=e._isOctEncoded16P,_=e._isOctEncodedDraco,b=e._quantizedRange,x=e._octEncodedRange,T=e._isRGB565,E=e._isTranslucent,S=e._hasColors,A=e._hasNormals,v=e._hasBatchIds,D,R,P=[],L={};if(e._styleableShaderAttributes=L,f){let H=fgt;for(let X in u)if(u.hasOwnProperty(X)){let $=u[X],ae=Cbe($.typedArray,X);D=$.componentCount,R=j.fromTypedArray(ae);let se=yt.createVertexBuffer({context:n,typedArray:ae,usage:Pe.STATIC_DRAW});e._geometryByteLength+=se.sizeInBytes;let he={index:H,vertexBuffer:se,componentsPerAttribute:D,componentDatatype:R,normalize:!1,offsetInBytes:0,strideInBytes:0};P.push(he),L[X]={location:H,componentCount:D},++H}}let F=yt.createVertexBuffer({context:n,typedArray:r.typedArray,usage:Pe.STATIC_DRAW});e._geometryByteLength+=F.sizeInBytes;let y;S&&(y=yt.createVertexBuffer({context:n,typedArray:s.typedArray,usage:Pe.STATIC_DRAW}),e._geometryByteLength+=y.sizeInBytes);let I;A&&(I=yt.createVertexBuffer({context:n,typedArray:a.typedArray,usage:Pe.STATIC_DRAW}),e._geometryByteLength+=I.sizeInBytes);let M;v&&(l.typedArray=Cbe(l.typedArray,"batchIds"),M=yt.createVertexBuffer({context:n,typedArray:l.typedArray,usage:Pe.STATIC_DRAW}),e._geometryByteLength+=M.sizeInBytes);let B=[];if(h?R=j.UNSIGNED_SHORT:m?R=b<=255?j.UNSIGNED_BYTE:j.UNSIGNED_SHORT:R=j.FLOAT,B.push({index:wbe,vertexBuffer:F,componentsPerAttribute:3,componentDatatype:R,normalize:!1,offsetInBytes:0,strideInBytes:0}),e._cull&&(h||m?e._boundingSphere=ne.fromCornerPoints(d.ZERO,e._quantizedVolumeScale):e._boundingSphere=agt(r.typedArray)),S)if(T)B.push({index:jH,vertexBuffer:y,componentsPerAttribute:1,componentDatatype:j.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0});else{let H=E?4:3;B.push({index:jH,vertexBuffer:y,componentsPerAttribute:H,componentDatatype:j.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0})}A&&(p?(D=2,R=j.UNSIGNED_BYTE):_?(D=2,R=x<=255?j.UNSIGNED_BYTE:j.UNSIGNED_SHORT):(D=3,R=j.FLOAT),B.push({index:z7,vertexBuffer:I,componentsPerAttribute:D,componentDatatype:R,normalize:!1,offsetInBytes:0,strideInBytes:0})),v&&B.push({index:Sbe,vertexBuffer:M,componentsPerAttribute:1,componentDatatype:j.fromTypedArray(l.typedArray),normalize:!1,offsetInBytes:0,strideInBytes:0}),f&&(B=B.concat(P));let U=new Zn({context:n,attributes:B}),V={depthTest:{enabled:!0}},W={depthTest:{enabled:!0},depthMask:!1,blending:cn.ALPHA_BLEND};e._opaquePass===xe.CESIUM_3D_TILE&&(V.stencilTest=kt.setCesium3DTileBit(),V.stencilMask=kt.CESIUM_3D_TILE_MASK,W.stencilTest=kt.setCesium3DTileBit(),W.stencilMask=kt.CESIUM_3D_TILE_MASK),e._opaqueRenderState=Fe.fromCache(V),e._translucentRenderState=Fe.fromCache(W),e._drawCommand=new Ke({boundingVolume:new ne,cull:e._cull,modelMatrix:new N,primitiveType:Se.POINTS,vertexArray:U,count:o,shaderProgram:void 0,uniformMap:void 0,renderState:E?e._translucentRenderState:e._opaqueRenderState,pass:E?xe.TRANSLUCENT:e._opaquePass,owner:e,castShadows:!1,receiveShadows:!1,pickId:e._pickIdLoaded()})}function mgt(e,t){let n=t.context,i=e._isQuantized,o=e._isQuantizedDraco,r=e._isOctEncodedDraco,s={u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier:function(){let a=cgt;if(a.x=e._attenuation?e.maximumAttenuation:e._pointSize,a.x*=t.pixelRatio,a.y=e.time,e._attenuation){let l=t.camera.frustum,u;t.mode===J.SCENE2D||l instanceof an?u=Number.POSITIVE_INFINITY:u=n.drawingBufferHeight/t.camera.frustum.sseDenominator,a.z=e.geometricError*e.geometricErrorScale,a.w=u}return a},u_highlightColor:function(){return e._highlightColor},u_constantColor:function(){return e._constantColor},u_clippingPlanes:function(){let a=e.clippingPlanes;return e.isClipped?a.texture:n.defaultTexture},u_clippingPlanesEdgeStyle:function(){let a=e.clippingPlanes;if(!c(a))return z.TRANSPARENT;let l=z.clone(a.edgeColor,ugt);return l.alpha=a.edgeWidth,l},u_clippingPlanesMatrix:function(){let a=e.clippingPlanes;if(!c(a))return N.IDENTITY;let l=g(e.clippingPlanesOriginMatrix,e._modelMatrix);N.multiply(n.uniformState.view3D,l,F7);let u=N.multiply(F7,a.modelMatrix,F7);return N.inverseTranspose(u,dgt)}};OI.addUniforms(e,s),(i||o||r)&&(s=bt(s,{u_quantizedVolumeScaleAndOctEncodedRange:function(){let a=lgt;if(c(e._quantizedVolumeScale)){let l=d.clone(e._quantizedVolumeScale,a);d.divideByScalar(l,e._quantizedRange,a)}return a.w=e._octEncodedRange,a}})),c(e._uniformMapLoaded)&&(s=e._uniformMapLoaded(s)),e._drawCommand.uniformMap=s}function B7(e,t){let n=/czm_3dtiles_property_(\d+)/g,i=n.exec(e);for(;i!==null;){let o=parseInt(i[1]);t.indexOf(o)===-1&&t.push(o),i=n.exec(e)}}function k7(e,t){e=e.slice(e.indexOf(`
| `));let n=/czm_3dtiles_builtin_property_(\w+)/g,i=n.exec(e);for(;i!==null;){let o=i[1];t.indexOf(o)===-1&&t.push(o),i=n.exec(e)}}function U7(e,t){let n=e.numberOfAttributes;for(let i=0;i<n;++i){let o=e.getAttribute(i);if(o.index===t)return o}}var pgt={POSITION:"czm_3dtiles_builtin_property_POSITION",POSITION_ABSOLUTE:"czm_3dtiles_builtin_property_POSITION_ABSOLUTE",COLOR:"czm_3dtiles_builtin_property_COLOR",NORMAL:"czm_3dtiles_builtin_property_NORMAL"};function _gt(e,t,n){let i,o,r,s=t.context,a=c(n),l=e._isQuantized,u=e._isQuantizedDraco,f=e._isOctEncoded16P,h=e._isOctEncodedDraco,m=e._isRGB565,p=e._isTranslucent,_=e._hasColors,b=e._hasNormals,x=e._hasBatchIds,T=e._backFaceCulling,E=e._normalShading,S=e._drawCommand.vertexArray,A=e.clippingPlanes,v=e._attenuation,D,R,P,L=p,F=ze(pgt),y={},I=e._styleableShaderAttributes;for(o in I)I.hasOwnProperty(o)&&(r=I[o],F[o]=`czm_3dtiles_property_${r.location}`,y[r.location]=r);if(a){let De={translucent:!1},ke="(vec3 czm_3dtiles_builtin_property_POSITION, vec3 czm_3dtiles_builtin_property_POSITION_ABSOLUTE, vec4 czm_3dtiles_builtin_property_COLOR, vec3 czm_3dtiles_builtin_property_NORMAL)";D=n.getColorShaderFunction(`getColorFromStyle${ke}`,F,De),R=n.getShowShaderFunction(`getShowFromStyle${ke}`,F,De),P=n.getPointSizeShaderFunction(`getPointSizeFromStyle${ke}`,F,De),c(D)&&De.translucent&&(L=!0)}e._styleTranslucent=L;let M=c(D),B=c(R),U=c(P),V=e.isClipped,W=[],H=[];M&&(B7(D,W),k7(D,H)),B&&(B7(R,W),k7(R,H)),U&&(B7(P,W),k7(P,H));let X=H.indexOf("COLOR")>=0,$=H.indexOf("NORMAL")>=0;if($&&!b)throw new ie("Style references the NORMAL semantic but the point cloud does not have normals");for(o in I)if(I.hasOwnProperty(o)){r=I[o];let De=W.indexOf(r.location)>=0,ke=U7(S,r.location);ke.enabled=De}let ae=_&&(!M||X);if(_){let De=U7(S,jH);De.enabled=ae}let se=b&&(E||T||$);if(b){let De=U7(S,z7);De.enabled=se}let he={a_position:wbe};ae&&(he.a_color=jH),se&&(he.a_normal=z7),x&&(he.a_batchId=Sbe);let ge="",le=W.length;for(i=0;i<le;++i){let De=W[i];r=y[De];let ke=r.componentCount,He=`czm_3dtiles_property_${De}`,ft;ke===1?ft="float":ft=`vec${ke}`,ge+=`in ${ft} ${He};
| `,he[He]=r.location}mgt(e,t);let me=`in vec3 a_position;
| out vec4 v_color;
| uniform vec4 u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier;
| uniform vec4 u_constantColor;
| uniform vec4 u_highlightColor;
| `;me+=`float u_pointSize;
| float tiles3d_tileset_time;
| `,v&&(me+=`float u_geometricError;
| float u_depthMultiplier;
| `),me+=ge,ae&&(p?me+=`in vec4 a_color;
| `:m?me+=`in float a_color;
| const float SHIFT_RIGHT_11 = 1.0 / 2048.0;
| const float SHIFT_RIGHT_5 = 1.0 / 32.0;
| const float SHIFT_LEFT_11 = 2048.0;
| const float SHIFT_LEFT_5 = 32.0;
| const float NORMALIZE_6 = 1.0 / 64.0;
| const float NORMALIZE_5 = 1.0 / 32.0;
| `:me+=`in vec3 a_color;
| `),se&&(f||h?me+=`in vec2 a_normal;
| `:me+=`in vec3 a_normal;
| `),x&&(me+=`in float a_batchId;
| `),(l||u||h)&&(me+=`uniform vec4 u_quantizedVolumeScaleAndOctEncodedRange;
| `),M&&(me+=D),B&&(me+=R),U&&(me+=P),me+=`void main()
| {
| u_pointSize = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.x;
| tiles3d_tileset_time = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.y;
| `,v&&(me+=` u_geometricError = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.z;
| u_depthMultiplier = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.w;
| `),ae?p?me+=` vec4 color = a_color;
| `:m?me+=` float compressed = a_color;
| float r = floor(compressed * SHIFT_RIGHT_11);
| compressed -= r * SHIFT_LEFT_11;
| float g = floor(compressed * SHIFT_RIGHT_5);
| compressed -= g * SHIFT_LEFT_5;
| float b = compressed;
| vec3 rgb = vec3(r * NORMALIZE_5, g * NORMALIZE_6, b * NORMALIZE_5);
| vec4 color = vec4(rgb, 1.0);
| `:me+=` vec4 color = vec4(a_color, 1.0);
| `:me+=` vec4 color = u_constantColor;
| `,l||u?me+=` vec3 position = a_position * u_quantizedVolumeScaleAndOctEncodedRange.xyz;
| `:me+=` vec3 position = a_position;
| `,me+=` vec3 position_absolute = vec3(czm_model * vec4(position, 1.0));
| `,se?(f?me+=` vec3 normal = czm_octDecode(a_normal);
| `:h?me+=` vec3 normal = czm_octDecode(a_normal, u_quantizedVolumeScaleAndOctEncodedRange.w).zxy;
| `:me+=` vec3 normal = a_normal;
| `,me+=` vec3 normalEC = czm_normal * normal;
| `):me+=` vec3 normal = vec3(1.0);
| `,M&&(me+=` color = getColorFromStyle(position, position_absolute, color, normal);
| `),B&&(me+=` float show = float(getShowFromStyle(position, position_absolute, color, normal));
| `),U?me+=` gl_PointSize = getPointSizeFromStyle(position, position_absolute, color, normal) * czm_pixelRatio;
| `:v?me+=` vec4 positionEC = czm_modelView * vec4(position, 1.0);
| float depth = -positionEC.z;
| gl_PointSize = min((u_geometricError / depth) * u_depthMultiplier, u_pointSize);
| `:me+=` gl_PointSize = u_pointSize;
| `,me+=` color = color * u_highlightColor;
| `,se&&E&&(me+=` float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC);
| diffuseStrength = max(diffuseStrength, 0.4);
| color.xyz *= diffuseStrength * czm_lightColor;
| `),me+=` v_color = color;
| gl_Position = czm_modelViewProjection * vec4(position, 1.0);
| `,se&&T&&(me+=` float visible = step(-normalEC.z, 0.0);
| gl_Position *= visible;
| gl_PointSize *= visible;
| `),B&&(me+=` gl_Position.w *= float(show);
| gl_PointSize *= float(show);
| `),me+=`}
| `;let Me=`in vec4 v_color;
| `;V&&(Me+=`uniform highp sampler2D u_clippingPlanes;
| uniform mat4 u_clippingPlanesMatrix;
| uniform vec4 u_clippingPlanesEdgeStyle;
| `,Me+=`
| `,Me+=my(A,s),Me+=`
| `),Me+=`void main()
| {
| out_FragColor = czm_gammaCorrect(v_color);
| `,V&&(Me+=HH("u_clippingPlanes","u_clippingPlanesMatrix","u_clippingPlanesEdgeStyle")),Me+=`}
| `,e.splitDirection!==Nr.NONE&&(Me=OI.modifyFragmentShader(Me)),c(e._vertexShaderLoaded)&&(me=e._vertexShaderLoaded(me)),c(e._fragmentShaderLoaded)&&(Me=e._fragmentShaderLoaded(Me));let Ge=e._drawCommand;c(Ge.shaderProgram)&&Ge.shaderProgram.destroy(),Ge.shaderProgram=en.fromCache({context:s,vertexShaderSource:me,fragmentShaderSource:Me,attributeLocations:he});try{Ge.shaderProgram._bind()}catch{throw new ie("Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.")}}function ggt(e,t){if(e._decodingState===Q0.READY)return!1;if(e._decodingState===Q0.NEEDS_DECODE){let n=e._parsedContent,i=n.draco,o=H_.decodePointCloud(i,t);c(o)&&(e._decodingState=Q0.DECODING,o.then(function(r){e._decodingState=Q0.READY;let s=c(r.POSITION)?r.POSITION.array:void 0,a=c(r.RGB)?r.RGB.array:void 0,l=c(r.RGBA)?r.RGBA.array:void 0,u=c(r.NORMAL)?r.NORMAL.array:void 0,f=c(r.BATCH_ID)?r.BATCH_ID.array:void 0,h=c(s)&&c(r.POSITION.data.quantization),m=c(u)&&c(r.NORMAL.data.quantization);if(h){let x=r.POSITION.data.quantization,T=x.range;e._quantizedVolumeScale=d.fromElements(T,T,T),e._quantizedVolumeOffset=d.unpack(x.minValues),e._quantizedRange=(1<<x.quantizationBits)-1,e._isQuantizedDraco=!0}m&&(e._octEncodedRange=(1<<r.NORMAL.data.quantization.quantizationBits)-1,e._isOctEncodedDraco=!0);let p=n.styleableProperties,_=i.batchTableProperties;for(let x in _)if(_.hasOwnProperty(x)){let T=r[x];c(p)||(p={}),p[x]={typedArray:T.array,componentCount:T.data.componentsPerAttribute}}c(s)&&(n.positions={typedArray:s});let b=g(l,a);c(b)&&(n.colors={typedArray:b}),c(u)&&(n.normals={typedArray:u}),c(f)&&(n.batchIds={typedArray:f}),n.styleableProperties=p}).catch(function(r){e._decodingState=Q0.FAILED,e._error=r}))}return!0}var ygt=new ee,bgt=new d;PI.prototype.update=function(e){let t=e.context;if(c(this._error)){let u=this._error;throw this._error=void 0,u}if(ggt(this,t))return;let i=!1,o=!N.equals(this._modelMatrix,this.modelMatrix);if(this._mode!==e.mode&&(this._mode=e.mode,o=!0),c(this._drawCommand)||(hgt(this,e),o=!0,i=!0,this._ready=!0,this._parsedContent=void 0),o){N.clone(this.modelMatrix,this._modelMatrix);let u=this._drawCommand.modelMatrix;if(N.clone(this._modelMatrix,u),c(this._rtcCenter)&&N.multiplyByTranslation(u,this._rtcCenter,u),c(this._quantizedVolumeOffset)&&N.multiplyByTranslation(u,this._quantizedVolumeOffset,u),e.mode!==J.SCENE3D){let h=e.mapProjection,m=N.getColumn(u,3,ygt);ee.equals(m,ee.UNIT_W)||Lt.basisTo2D(h,u,u)}let f=this._drawCommand.boundingVolume;if(ne.clone(this._boundingSphere,f),this._cull){let h=f.center;N.multiplyByPoint(u,h,h);let m=N.getScale(u,bgt);f.radius*=d.maximumComponent(m)}}this.clippingPlanesDirty&&(this.clippingPlanesDirty=!1,i=!0),this._attenuation!==this.attenuation&&(this._attenuation=this.attenuation,i=!0),this.backFaceCulling!==this._backFaceCulling&&(this._backFaceCulling=this.backFaceCulling,i=!0),this.normalShading!==this._normalShading&&(this._normalShading=this.normalShading,i=!0),(this._style!==this.style||this.styleDirty)&&(this._style=this.style,this.styleDirty=!1,i=!0);let r=this.splitDirection!==Nr.NONE;this._splittingEnabled!==r&&(this._splittingEnabled=r,i=!0),i&&_gt(this,e,this._style),this._drawCommand.castShadows=yn.castShadows(this.shadows),this._drawCommand.receiveShadows=yn.receiveShadows(this.shadows);let s=this._highlightColor.alpha<1||this._constantColor.alpha<1||this._styleTranslucent;this._drawCommand.renderState=s?this._translucentRenderState:this._opaqueRenderState,this._drawCommand.pass=s?xe.TRANSLUCENT:this._opaquePass;let a=e.commandList,l=e.passes;(l.render||l.pick)&&a.push(this._drawCommand)};PI.prototype.isDestroyed=function(){return!1};PI.prototype.destroy=function(){let e=this._drawCommand;return c(e)&&(e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),ue(this)};var WH=PI;function tx(e){e=g(e,g.EMPTY_OBJECT),C.typeOf.object("options.clock",e.clock),C.typeOf.object("options.intervals",e.intervals),this.show=g(e.show,!0),this.modelMatrix=N.clone(g(e.modelMatrix,N.IDENTITY)),this.shadows=g(e.shadows,yn.ENABLED),this.maximumMemoryUsage=g(e.maximumMemoryUsage,256),this.shading=new np(e.shading),this.style=e.style,this.frameFailed=new fe,this.frameChanged=new fe,this._clock=e.clock,this._intervals=e.intervals,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._pointCloudEyeDomeLighting=new sg,this._loadTimestamp=void 0,this._clippingPlanesState=0,this._styleDirty=!1,this._pickId=void 0,this._totalMemoryUsageInBytes=0,this._frames=[],this._previousInterval=void 0,this._nextInterval=void 0,this._lastRenderedFrame=void 0,this._clockMultiplier=0,this._runningSum=0,this._runningLength=0,this._runningIndex=0,this._runningSamples=new Array(5).fill(0),this._runningAverage=0}Object.defineProperties(tx.prototype,{clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){as.setOwner(e,this,"_clippingPlanes")}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes}},boundingSphere:{get:function(){if(c(this._lastRenderedFrame))return this._lastRenderedFrame.pointCloud.boundingSphere}}});function xgt(e){return`uniform vec4 czm_pickColor;
| ${e}`}function Tgt(e){return function(t){return bt(t,{czm_pickColor:function(){return e._pickId.color}})}}function Cgt(){return"czm_pickColor"}tx.prototype.makeStyleDirty=function(){this._styleDirty=!0};tx.prototype._getAverageLoadTime=function(){return this._runningLength===0?.05:this._runningAverage};var Egt=new K;function H7(e){let t=e._clock,n=t.canAnimate&&t.shouldAnimate,i=t.multiplier;return n?i:0}function ex(e,t){return e._intervals.indexOf(t.start)}function wgt(e,t){let n=e._intervals,i=e._clock,o=H7(e);if(o===0)return;let r=e._getAverageLoadTime(),s=K.addSeconds(i.currentTime,r*o,Egt),a=n.indexOf(s),l=ex(e,t);return a===l&&(o>=0?++a:--a),n.get(a)}function Sgt(e){let t=e._intervals,i=e._clock.currentTime,o=t.indexOf(i);return t.get(o)}function Agt(e,t,n){let i=H7(e),o=ex(e,t),r=ex(e,n);return i>=0?o>=r:o<=r}function vbe(e,t){return function(n){let i=c(n.message)?n.message:n.toString();e.frameFailed.numberOfListeners>0?e.frameFailed.raiseEvent({uri:t,message:i}):(console.log(`A frame failed to load: ${t}`),console.log(`Error: ${i}`))}}function vgt(e,t,n){let i=ex(e,t),o=e._frames,r=o[i];if(!c(r)){let s=t.data.transform,a=c(s)?N.fromArray(s):void 0,l=t.data.uri;r={pointCloud:void 0,transform:a,timestamp:yi(),sequential:!0,ready:!1,touchedFrameNumber:n.frameNumber,uri:l},o[i]=r,Te.fetchArrayBuffer({url:l}).then(function(u){r.pointCloud=new WH({arrayBuffer:u,cull:!0,fragmentShaderLoaded:xgt,uniformMapLoaded:Tgt(e),pickIdLoaded:Cgt})}).catch(vbe(e,l))}return r}function Dgt(e,t){e._runningSum+=t,e._runningSum-=e._runningSamples[e._runningIndex],e._runningSamples[e._runningIndex]=t,e._runningLength=Math.min(e._runningLength+1,e._runningSamples.length),e._runningIndex=(e._runningIndex+1)%e._runningSamples.length,e._runningAverage=e._runningSum/e._runningLength}function Igt(e,t,n,i){t.touchedFrameNumber<i.frameNumber-1&&(t.sequential=!1);let o=t.pointCloud;if(c(o)&&!t.ready){let r=i.commandList,s=r.length;if(Dbe(e,t,n,i),o.ready&&(t.ready=!0,e._totalMemoryUsageInBytes+=o.geometryByteLength,r.length=s,t.sequential)){let a=(yi()-t.timestamp)/1e3;Dgt(e,a)}}t.touchedFrameNumber=i.frameNumber}var Ogt=new N;function Pgt(e,t){let n=e.shading;return c(n)&&c(n.baseResolution)?n.baseResolution:c(t.boundingSphere)?O.cbrt(t.boundingSphere.volume()/t.pointsLength):0}function Rgt(e){let t=e.shading;return c(t)&&c(t.maximumAttenuation)?t.maximumAttenuation:10}var Mgt=new np;function Dbe(e,t,n,i){let o=g(e.shading,Mgt),r=t.pointCloud,s=g(t.transform,N.IDENTITY);r.modelMatrix=N.multiplyTransformation(e.modelMatrix,s,Ogt),r.style=e.style,r.time=n.timeSinceLoad,r.shadows=e.shadows,r.clippingPlanes=e._clippingPlanes,r.isClipped=n.isClipped,r.attenuation=o.attenuation,r.backFaceCulling=o.backFaceCulling,r.normalShading=o.normalShading,r.geometricError=Pgt(e,r),r.geometricErrorScale=o.geometricErrorScale,r.maximumAttenuation=Rgt(e);try{r.update(i)}catch(a){vbe(e,t.uri)(a)}t.touchedFrameNumber=i.frameNumber}function V7(e,t,n,i){let o=vgt(e,t,i);Igt(e,o,n,i)}function Lgt(e){return function(t){return t.touchedFrameNumber<e.frameNumber}}function Ibe(e,t){let n=e._frames,i=n.length;for(let o=0;o<i;++o){let r=n[o];if(c(r)&&(!c(t)||t(r))){let s=r.pointCloud;r.ready&&(e._totalMemoryUsageInBytes-=s.geometryByteLength),c(s)&&s.destroy(),r===e._lastRenderedFrame&&(e._lastRenderedFrame=void 0),n[o]=void 0}}}function Ngt(e,t){let n=ex(e,t),i=e._frames[n];if(c(i)&&i.ready)return i}function Abe(e,t,n,i,o){return c(n)?n.ready?!0:(V7(e,t,i,o),n.ready):!1}function Fgt(e,t,n,i,o){let r,s,a,l=e._intervals,u=e._frames,f=ex(e,n),h=ex(e,t);if(f>=h){for(r=f;r>=h;--r)if(s=l.get(r),a=u[r],Abe(e,s,a,i,o))return s}else for(r=f;r<=h;++r)if(s=l.get(r),a=u[r],Abe(e,s,a,i,o))return s;return t}function Bgt(e,t,n){let i=e._frames,o=i.length;for(let r=0;r<o;++r){let s=i[r];c(s)&&c(s.pointCloud)&&(s.pointCloud.clippingPlanesDirty=t,s.pointCloud.styleDirty=n)}}var Dw={timeSinceLoad:0,isClipped:!1,clippingPlanesDirty:!1};tx.prototype.update=function(e){if(e.mode===J.MORPHING||!this.show)return;c(this._pickId)||(this._pickId=e.context.createPickId({primitive:this})),c(this._loadTimestamp)||(this._loadTimestamp=K.clone(e.time));let t=Math.max(K.secondsDifference(e.time,this._loadTimestamp)*1e3,0),n=this._clippingPlanes,i=0,o=!1,r=c(n)&&n.enabled;r&&(n.update(e),i=n.clippingPlanesState),this._clippingPlanesState!==i&&(this._clippingPlanesState=i,o=!0);let s=this._styleDirty;this._styleDirty=!1,(o||s)&&Bgt(this,o,s),Dw.timeSinceLoad=t,Dw.isClipped=r;let a=this.shading,l=this._pointCloudEyeDomeLighting,u=e.commandList,f=u.length,h=this._previousInterval,m=this._nextInterval,p=Sgt(this);if(!c(p))return;let _=!1,b=H7(this),x=b===0;b!==this._clockMultiplier&&(_=!0,this._clockMultiplier=b),(!c(h)||x)&&(h=p),(!c(m)||_||Agt(this,p,m))&&(m=wgt(this,p)),h=Fgt(this,h,p,Dw,e);let T=Ngt(this,h);c(T)||(V7(this,h,Dw,e),T=this._lastRenderedFrame),c(T)&&Dbe(this,T,Dw,e),c(m)&&V7(this,m,Dw,e);let E=this;c(T)&&!c(this._lastRenderedFrame)&&e.afterRender.push(function(){return!0}),c(T)&&T!==this._lastRenderedFrame&&E.frameChanged.numberOfListeners>0&&e.afterRender.push(function(){return E.frameChanged.raiseEvent(E),!0}),this._previousInterval=h,this._nextInterval=m,this._lastRenderedFrame=T;let S=this._totalMemoryUsageInBytes,A=this.maximumMemoryUsage*1024*1024;S>A&&Ibe(this,Lgt(e));let D=u.length-f;c(a)&&a.attenuation&&a.eyeDomeLighting&&D>0&&l.update(e,f,a,this.boundingSphere)};tx.prototype.isDestroyed=function(){return!1};tx.prototype.destroy=function(){return Ibe(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),ue(this)};var RI=tx;function Obe(e,t){if(c(t)){let n=t.clock;c(n)&&n.getValue(e)}}function kgt(e){e._renderLoopRunning=!0;let t=0;function n(i){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{let o=e._targetFrameRate;if(!c(o))e.resize(),e.render(),requestAnimationFrame(n);else{let r=1e3/o,s=i-t;s>r&&(e.resize(),e.render(),t=i-s%r),requestAnimationFrame(n)}}catch(o){e._useDefaultRenderLoop=!1,e._renderLoopRunning=!1,e._showRenderLoopErrors&&e.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,o)}else e._renderLoopRunning=!1}requestAnimationFrame(n)}function Pbe(e){let t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,c(e._scene)&&(e._scene.pixelRatio=t),t}function Rbe(e){let t=e._canvas,n=t.clientWidth,i=t.clientHeight,o=Pbe(e);e._canvasClientWidth=n,e._canvasClientHeight=i,n*=o,i*=o,t.width=n,t.height=i,e._canRender=n!==0&&i!==0,e._lastDevicePixelRatio=window.devicePixelRatio}function Mbe(e){let t=e._canvas,n=t.width,i=t.height;if(n!==0&&i!==0){let o=e._scene.camera.frustum;c(o.aspectRatio)?o.aspectRatio=n/i:(o.top=o.right*(i/n),o.bottom=-o.top)}}function yo(e,t){var m;if(!c(e))throw new w("container is required.");e=em(e),t=g(t,g.EMPTY_OBJECT);let n=document.createElement("div");n.className="cesium-widget",e.appendChild(n);let i=document.createElement("canvas"),o=sn.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=o,o&&(i.style.imageRendering=sn.imageRenderingValue()),i.oncontextmenu=function(){return!1},i.onselectstart=function(){return!1};function r(){i!==i.ownerDocument.activeElement&&i.ownerDocument.activeElement.blur()}g(t.blurActiveElementOnCanvasFocus,!0)&&(i.addEventListener("mousedown",r),i.addEventListener("pointerdown",r)),n.appendChild(i);let a=document.createElement("div");a.className="cesium-widget-credits";let l=c(t.creditContainer)?em(t.creditContainer):n;l.appendChild(a);let u=c(t.creditViewport)?em(t.creditViewport):n,f=g(t.showRenderLoopErrors,!0),h=g(t.useBrowserRecommendedResolution,!0);this._element=n,this._container=e,this._canvas=i,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=u,this._creditContainer=l,this._innerCreditContainer=a,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=f,this._resolutionScale=1,this._useBrowserRecommendedResolution=h,this._forceResize=!1,this._entityView=void 0,this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._trackedEntityChanged=new fe,this._allowDataSourcesToSuspendAnimation=!0,this._clock=c(t.clock)?t.clock:new XC,c(t.shouldAnimate)&&(this._clock.shouldAnimate=t.shouldAnimate),Rbe(this);try{let p=g(t.ellipsoid,Z.default),_=new PH({canvas:i,contextOptions:t.contextOptions,creditContainer:a,creditViewport:u,ellipsoid:p,mapProjection:t.mapProjection,orderIndependentTranslucency:t.orderIndependentTranslucency,scene3DOnly:g(t.scene3DOnly,!1),shadows:t.shadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples});this._scene=_,_.camera.constrainedAxis=d.UNIT_Z,Pbe(this),Mbe(this);let b=t.globe;c(b)||(b=new rz(p)),b!==!1&&(_.globe=b,_.globe.shadows=g(t.terrainShadows,yn.RECEIVE_ONLY));let x=t.skyBox;!c(x)&&Z.WGS84.equals(p)&&(x=BH.createEarthSkyBox()),x!==!1&&(_.skyBox=x,_.sun=new VH,Z.WGS84.equals(p)&&(_.moon=new hz));let T=t.skyAtmosphere;!c(T)&&Z.WGS84.equals(p)&&(T=new LH(p),T.show=t.globe!==!1&&b.show),T!==!1&&(_.skyAtmosphere=T);let E=t.baseLayer;if(t.globe!==!1&&E!==!1&&(c(E)||(E=lu.fromWorldImagery()),_.imageryLayers.add(E)),c(t.terrainProvider)&&t.globe!==!1&&(_.terrainProvider=t.terrainProvider),c(t.terrain)&&t.globe!==!1){if(c(t.terrainProvider))throw new w("Specify either options.terrainProvider or options.terrain.");_.setTerrain(t.terrain)}this._screenSpaceEventHandler=new Ay(i),c(t.sceneMode)&&(t.sceneMode===J.SCENE2D&&this._scene.morphTo2D(0),t.sceneMode===J.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=g(t.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=t.targetFrameRate;let S=this;this._onRenderError=function(L,F){S._useDefaultRenderLoop=!1,S._renderLoopRunning=!1,S._showRenderLoopErrors&&S.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,F)},_.renderError.addEventListener(this._onRenderError);let A=t.dataSources,v=!1;c(A)||(A=new jB,v=!0);let D=new R3({scene:_,dataSourceCollection:A}),R=new rl;this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=(m=t.automaticallyTrackDataSourceClocks)!=null?m:!0,this._dataSourceCollection=A,this._destroyDataSourceCollection=v,this._dataSourceDisplay=D,this._eventHelper=R,this._canAnimateUpdateCallback=this._updateCanAnimate,R.add(this._clock.onTick,yo.prototype._onTick,this),R.add(_.morphStart,yo.prototype._clearTrackedObject,this),R.add(A.dataSourceAdded,yo.prototype._onDataSourceAdded,this),R.add(A.dataSourceRemoved,yo.prototype._onDataSourceRemoved,this),R.add(_.postRender,yo.prototype._postRender,this);let P=A.length;for(let L=0;L<P;L++)this._dataSourceAdded(A,A.get(L));this._dataSourceAdded(void 0,D.defaultDataSource),R.add(A.dataSourceAdded,yo.prototype._dataSourceAdded,this),R.add(A.dataSourceRemoved,yo.prototype._dataSourceRemoved,this)}catch(p){throw f&&this.showErrorPanel("Error constructing CesiumWidget.",'Visit <a href="http://get.webgl.org">http://get.webgl.org</a> to verify that your web browser and hardware support WebGL. Consider trying a different web browser or updating your video drivers. Detailed error information is below:',p),p}}Object.defineProperties(yo.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(e){this._scene.terrainProvider=e}},creditDisplay:{get:function(){return this._scene.frameState.creditDisplay}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},camera:{get:function(){return this._scene.camera}},ellipsoid:{get:function(){return this._scene.ellipsoid}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(e){if(e<=0)throw new w("targetFrameRate must be greater than 0, or undefined.");this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e,e&&!this._renderLoopRunning&&kgt(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){if(e<=0)throw new w("resolutionScale must be greater than 0.");this._resolutionScale!==e&&(this._resolutionScale=e,this._forceResize=!0)}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(e){this._useBrowserRecommendedResolution!==e&&(this._useBrowserRecommendedResolution=e,this._forceResize=!0)}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(e){this._allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._trackedEntity},set:function(e){if(this._trackedEntity!==e){this._trackedEntity=e,G7(this);let t=this.scene,n=t.mode;!c(e)||!c(e.position)?(this._needTrackedEntityUpdate=!1,(n===J.COLUMBUS_VIEW||n===J.SCENE2D)&&(t.screenSpaceCameraController.enableTranslate=!0),(n===J.COLUMBUS_VIEW||n===J.SCENE3D)&&(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(N.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(e),this.scene.requestRender()}}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(e){this._clockTrackedDataSource!==e&&(this._clockTrackedDataSource=e,Obe(this.clock,e))}}});yo.prototype.showErrorPanel=function(e,t,n){let i=this._element,o=document.createElement("div");o.className="cesium-widget-errorPanel";let r=document.createElement("div");r.className="cesium-widget-errorPanel-content",o.appendChild(r);let s=document.createElement("div");s.className="cesium-widget-errorPanel-header",s.appendChild(document.createTextNode(e)),r.appendChild(s);let a=document.createElement("div");a.className="cesium-widget-errorPanel-scroll",r.appendChild(a);function l(){a.style.maxHeight=`${Math.max(Math.round(i.clientHeight*.9-100),30)}px`}l(),c(window.addEventListener)&&window.addEventListener("resize",l,!1);let u=c(t),f=c(n);if(u||f){let p=document.createElement("div");if(p.className="cesium-widget-errorPanel-message",a.appendChild(p),f){let _=Hp(n);u||(typeof n=="string"&&(n=new Error(n)),t=Hp({name:n.name,message:n.message}),_=n.stack),typeof console!="undefined"&&console.error(`${e}
| ${t}
| ${_}`);let b=document.createElement("div");b.className="cesium-widget-errorPanel-message-details collapsed";let x=document.createElement("span");x.className="cesium-widget-errorPanel-more-details",x.appendChild(document.createTextNode("See more...")),b.appendChild(x),b.onclick=function(T){b.removeChild(x),b.appendChild(document.createTextNode(_)),b.className="cesium-widget-errorPanel-message-details",r.className="cesium-widget-errorPanel-content expanded",b.onclick=void 0},a.appendChild(b)}p.innerHTML=`<p>${t}</p>`}let h=document.createElement("div");h.className="cesium-widget-errorPanel-buttonPanel",r.appendChild(h);let m=document.createElement("button");m.setAttribute("type","button"),m.className="cesium-button",m.appendChild(document.createTextNode("OK")),m.onclick=function(){c(l)&&c(window.removeEventListener)&&window.removeEventListener("resize",l,!1),i.removeChild(o)},h.appendChild(m),i.appendChild(o)};yo.prototype.isDestroyed=function(){return!1};yo.prototype.destroy=function(){let e=this.dataSources,t=e.length;for(let n=0;n<t;n++)this._dataSourceRemoved(e,e.get(n));this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),c(this._scene)&&(this._scene.renderError.removeEventListener(this._onRenderError),this._scene=this._scene.destroy()),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),this._eventHelper.removeAll(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),ue(this)};yo.prototype.resize=function(){let e=this._canvas;!this._forceResize&&this._canvasClientWidth===e.clientWidth&&this._canvasClientHeight===e.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,Rbe(this),Mbe(this),this._scene.requestRender())};yo.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();let e=this._clock.tick();this._scene.render(e)}else this._clock.tick()};yo.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(yo.prototype._onEntityCollectionChanged,this)};yo.prototype._dataSourceRemoved=function(e,t){let n=t.entities;n.collectionChanged.removeEventListener(yo.prototype._onEntityCollectionChanged,this),c(this.trackedEntity)&&n.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0)};yo.prototype._updateCanAnimate=function(e){this._clock.canAnimate=e};var Iw=new ne;yo.prototype._onTick=function(e){let t=e.currentTime,n=this._dataSourceDisplay.update(t);this._allowDataSourcesToSuspendAnimation&&this._canAnimateUpdateCallback(n);let i=this._entityView;if(c(i)){let o=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(o,!0,Iw)===lt.DONE&&i.update(t,Iw)}};yo.prototype._onEntityCollectionChanged=function(e,t,n){let i=n.length;for(let o=0;o<i;o++){let r=n[o];this.trackedEntity===r&&(this.trackedEntity=void 0)}};yo.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};yo.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&Obe(this.clock,e)};yo.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);let n=t.entities.id,i=this._eventHelper.add(t.changedEvent,yo.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i};yo.prototype._onDataSourceRemoved=function(e,t){let n=this.clockTrackedDataSource===t,i=t.entities.id;if(this._dataSourceChangedListeners[i](),this._dataSourceChangedListeners[i]=void 0,n){let o=e.length;this._automaticallyTrackDataSourceClocks&&o>0?this.clockTrackedDataSource=e.get(o-1):this.clockTrackedDataSource=void 0}};yo.prototype.zoomTo=function(e,t){return Lbe(this,e,{offset:t},!1)};yo.prototype.flyTo=function(e,t){return Lbe(this,e,t,!0)};function Lbe(e,t,n,i){if(!c(t))throw new w("zoomTarget is required.");G7(e);let o=new Promise(r=>{e._completeZoom=function(s){r(s)}});return e._zoomPromise=o,e._zoomIsFlight=i,e._zoomOptions=n,Promise.resolve(t).then(function(r){var s;if(e._zoomPromise===o){if(r instanceof lu){let a;c(r.imageryProvider)?a=Promise.resolve(r.getImageryRectangle()):a=new Promise(l=>{let u=r.readyEvent.addEventListener(()=>{u(),l(r.getImageryRectangle())})}),a.then(function(l){return sU(l,e.scene)}).then(function(l){e._zoomPromise===o&&(e._zoomTarget=l)});return}if(r instanceof ol||r instanceof RI||r instanceof Z0){e._zoomTarget=r;return}if(r.isLoading&&c(r.loadingEvent)){let a=r.loadingEvent.addEventListener(function(){a(),e._zoomPromise===o&&(e._zoomTarget=r.entities.values.slice(0))});return}if(Array.isArray(r)){e._zoomTarget=r.slice(0);return}r=(s=r.values)!=null?s:r,c(r.entities)&&(r=r.entities.values),Array.isArray(r)?e._zoomTarget=r.slice(0):e._zoomTarget=[r]}}),e.scene.requestRender(),o}function MI(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function G7(e){let t=e._zoomPromise;c(t)&&(MI(e),e._completeZoom(!1))}yo.prototype._postRender=function(){Ugt(this),zgt(this)};function Ugt(e){var f;let t=e._zoomTarget;if(!c(t)||e.scene.mode===J.MORPHING)return;let n=e.scene,i=n.camera,o=(f=e._zoomOptions)!=null?f:{},r;function s(h){c(o.offset)||(o.offset=new Cd(0,-.5,h.radius)),r={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyToBoundingSphere(t.boundingSphere,r):(i.viewBoundingSphere(h,o.offset),i.lookAtTransform(N.IDENTITY),e._completeZoom(!0)),MI(e)}if(t instanceof RI){if(c(t.boundingSphere)){s(t.boundingSphere);return}let h=t.frameChanged.addEventListener(function(m){s(m.boundingSphere),h()});return}if(t instanceof ol||t instanceof Z0){s(t.boundingSphere);return}if(t instanceof re){r={destination:n.ellipsoid.cartographicToCartesian(t),duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyTo(r):(i.setView(r),e._completeZoom(!0)),MI(e);return}let a=t,l=[];for(let h=0,m=a.length;h<m;h++){let p=e._dataSourceDisplay.getBoundingSphere(a[h],!1,Iw);if(p===lt.PENDING)return;p!==lt.FAILED&&l.push(ne.clone(Iw))}if(l.length===0){G7(e);return}e.trackedEntity=void 0;let u=ne.fromBoundingSpheres(l);e._zoomIsFlight?(MI(e),i.flyToBoundingSphere(u,{duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)},offset:o.offset})):(i.viewBoundingSphere(u,o.offset),i.lookAtTransform(N.IDENTITY),MI(e),e._completeZoom(!0))}function zgt(e){if(!e._needTrackedEntityUpdate)return;let t=e._trackedEntity,n=e.clock.currentTime,i=G.getValueOrUndefined(t.position,n);if(!c(i))return;let o=e.scene,r=e._dataSourceDisplay.getBoundingSphere(t,!1,Iw);if(r===lt.PENDING)return;let s=o.mode;(s===J.COLUMBUS_VIEW||s===J.SCENE2D)&&(o.screenSpaceCameraController.enableTranslate=!1),(s===J.COLUMBUS_VIEW||s===J.SCENE3D)&&(o.screenSpaceCameraController.enableTilt=!1);let a=r!==lt.FAILED?Iw:void 0;e._entityView=new N3(t,o,o.ellipsoid),e._entityView.update(n,a),e._needTrackedEntityUpdate=!1}var Nbe=yo;var qH=`uniform sampler2D u_noiseTexture;
| uniform vec3 u_noiseTextureDimensions;
| uniform float u_noiseDetail;
| in vec2 v_offset;
| in vec3 v_maximumSize;
| in vec4 v_color;
| in float v_slice;
| in float v_brightness;
|
| float wrap(float value, float rangeLength) {
| if(value < 0.0) {
| float absValue = abs(value);
| float modValue = mod(absValue, rangeLength);
| return mod(rangeLength - modValue, rangeLength);
| }
| return mod(value, rangeLength);
| }
|
| vec3 wrapVec(vec3 value, float rangeLength) {
| return vec3(wrap(value.x, rangeLength),
| wrap(value.y, rangeLength),
| wrap(value.z, rangeLength));
| }
|
| vec2 voxelToUV(vec3 voxelIndex) {
| float textureSliceWidth = u_noiseTextureDimensions.x;
| float noiseTextureRows = u_noiseTextureDimensions.y;
| float inverseNoiseTextureRows = u_noiseTextureDimensions.z;
|
| float textureSliceWidthSquared = textureSliceWidth * textureSliceWidth;
| vec2 inverseNoiseTextureDimensions = vec2(noiseTextureRows / textureSliceWidthSquared,
| inverseNoiseTextureRows / textureSliceWidth);
| vec3 wrappedIndex = wrapVec(voxelIndex, textureSliceWidth);
| float column = mod(wrappedIndex.z, textureSliceWidth * inverseNoiseTextureRows);
| float row = floor(wrappedIndex.z / textureSliceWidth * noiseTextureRows);
|
| float xPixelCoord = wrappedIndex.x + column * textureSliceWidth;
| float yPixelCoord = wrappedIndex.y + row * textureSliceWidth;
| return vec2(xPixelCoord, yPixelCoord) * inverseNoiseTextureDimensions;
| }
|
| // Interpolate a voxel with its neighbor (along the positive X-axis)
| vec4 lerpSamplesX(vec3 voxelIndex, float x) {
| vec2 uv0 = voxelToUV(voxelIndex);
| vec2 uv1 = voxelToUV(voxelIndex + vec3(1.0, 0.0, 0.0));
| vec4 sample0 = texture(u_noiseTexture, uv0);
| vec4 sample1 = texture(u_noiseTexture, uv1);
| return mix(sample0, sample1, x);
| }
|
| vec4 sampleNoiseTexture(vec3 position) {
| float textureSliceWidth = u_noiseTextureDimensions.x;
| vec3 recenteredPos = position + vec3(textureSliceWidth / 2.0);
| vec3 lerpValue = fract(recenteredPos);
| vec3 voxelIndex = floor(recenteredPos);
|
| vec4 xLerp00 = lerpSamplesX(voxelIndex, lerpValue.x);
| vec4 xLerp01 = lerpSamplesX(voxelIndex + vec3(0.0, 0.0, 1.0), lerpValue.x);
| vec4 xLerp10 = lerpSamplesX(voxelIndex + vec3(0.0, 1.0, 0.0), lerpValue.x);
| vec4 xLerp11 = lerpSamplesX(voxelIndex + vec3(0.0, 1.0, 1.0), lerpValue.x);
|
| vec4 yLerp0 = mix(xLerp00, xLerp10, lerpValue.y);
| vec4 yLerp1 = mix(xLerp01, xLerp11, lerpValue.y);
| return mix(yLerp0, yLerp1, lerpValue.z);
| }
|
| // Intersection with a unit sphere with radius 0.5 at center (0, 0, 0).
| bool intersectSphere(vec3 origin, vec3 dir, float slice,
| out vec3 point, out vec3 normal) {
| float A = dot(dir, dir);
| float B = dot(origin, dir);
| float C = dot(origin, origin) - 0.25;
| float discriminant = (B * B) - (A * C);
| if(discriminant < 0.0) {
| return false;
| }
| float root = sqrt(discriminant);
| float t = (-B - root) / A;
| if(t < 0.0) {
| t = (-B + root) / A;
| }
| point = origin + t * dir;
|
| if(slice >= 0.0) {
| point.z = (slice / 2.0) - 0.5;
| if(length(point) > 0.5) {
| return false;
| }
| }
|
| normal = normalize(point);
| point -= czm_epsilon2 * normal;
| return true;
| }
|
| // Transforms the ray origin and direction into unit sphere space,
| // then transforms the result back into the ellipsoid's space.
| bool intersectEllipsoid(vec3 origin, vec3 dir, vec3 center, vec3 scale, float slice,
| out vec3 point, out vec3 normal) {
| if(scale.x <= 0.01 || scale.y < 0.01 || scale.z < 0.01) {
| return false;
| }
|
| vec3 o = (origin - center) / scale;
| vec3 d = dir / scale;
| vec3 p, n;
| bool intersected = intersectSphere(o, d, slice, p, n);
| if(intersected) {
| point = (p * scale) + center;
| normal = n;
| }
| return intersected;
| }
|
| // Assume that if phase shift is being called for octave i,
| // the frequency is of i - 1. This saves us from doing extra
| // division / multiplication operations.
| vec2 phaseShift2D(vec2 p, vec2 freq) {
| return (czm_pi / 2.0) * sin(freq.yx * p.yx);
| }
|
| vec2 phaseShift3D(vec3 p, vec2 freq) {
| return phaseShift2D(p.xy, freq) + czm_pi * vec2(sin(freq.x * p.z));
| }
|
| // The cloud texture function derived from Gardner's 1985 paper,
| // "Visual Simulation of Clouds."
| // https://www.cs.drexel.edu/~david/Classes/Papers/p297-gardner.pdf
| const float T0 = 0.6; // contrast of the texture pattern
| const float k = 0.1; // computed to produce a maximum value of 1
| const float C0 = 0.8; // coefficient
| const float FX0 = 0.6; // frequency X
| const float FY0 = 0.6; // frequency Y
| const int octaves = 5;
|
| float T(vec3 point) {
| vec2 sum = vec2(0.0);
| float Ci = C0;
| vec2 FXY = vec2(FX0, FY0);
| vec2 PXY = vec2(0.0);
| for(int i = 1; i <= octaves; i++) {
| PXY = phaseShift3D(point, FXY);
| Ci *= 0.707;
| FXY *= 2.0;
| vec2 sinTerm = sin(FXY * point.xy + PXY);
| sum += Ci * sinTerm + vec2(T0);
| }
| return k * sum.x * sum.y;
| }
|
| const float a = 0.5; // fraction of surface reflection due to ambient or scattered light,
| const float t = 0.4; // fraction of texture shading
| const float s = 0.25; // fraction of specular reflection
|
| float I(float Id, float Is, float It) {
| return (1.0 - a) * ((1.0 - t) * ((1.0 - s) * Id + s * Is) + t * It) + a;
| }
|
| const vec3 lightDir = normalize(vec3(0.2, -1.0, 0.7));
|
| vec4 drawCloud(vec3 rayOrigin, vec3 rayDir, vec3 cloudCenter, vec3 cloudScale, float cloudSlice,
| float brightness) {
| vec3 cloudPoint, cloudNormal;
| if(!intersectEllipsoid(rayOrigin, rayDir, cloudCenter, cloudScale, cloudSlice,
| cloudPoint, cloudNormal)) {
| return vec4(0.0);
| }
|
| float Id = clamp(dot(cloudNormal, -lightDir), 0.0, 1.0); // diffuse reflection
| float Is = max(pow(dot(-lightDir, -rayDir), 2.0), 0.0); // specular reflection
| float It = T(cloudPoint); // texture function
| float intensity = I(Id, Is, It);
| vec3 color = vec3(intensity * clamp(brightness, 0.1, 1.0));
|
| vec4 noise = sampleNoiseTexture(u_noiseDetail * cloudPoint);
| float W = noise.x;
| float W2 = noise.y;
| float W3 = noise.z;
|
| // The dot product between the cloud's normal and the ray's direction is greatest
| // in the center of the ellipsoid's surface. It decreases towards the edge.
| // Thus, it is used to blur the areas leading to the edges of the ellipsoid,
| // so that no harsh lines appear.
|
| // The first (and biggest) layer of worley noise is then subtracted from this.
| // The final result is scaled up so that the base cloud is not too translucent.
| float ndDot = clamp(dot(cloudNormal, -rayDir), 0.0, 1.0);
| float TR = pow(ndDot, 3.0) - W; // translucency
| TR *= 1.3;
|
| // Subtracting the second and third layers of worley noise is more complicated.
| // If these layers of noise were simply subtracted from the current translucency,
| // the shape derived from the first layer of noise would be completely deleted.
| // The erosion of this noise should thus be constricted to the edges of the cloud.
| // However, because the edges of the ellipsoid were already blurred away, mapping
| // the noise to (1.0 - ndDot) will have no impact on most of the cloud's appearance.
| // The value of (0.5 - ndDot) provides the best compromise.
| float minusDot = 0.5 - ndDot;
|
| // Even with the previous calculation, subtracting the second layer of wnoise
| // erode too much of the cloud. The addition of it, however, will detailed
| // volume to the cloud. As long as the noise is only added and not subtracted,
| // the results are aesthetically pleasing.
|
| // The minusDot product is mapped in a way that it is larger at the edges of
| // the ellipsoid, so a subtraction and min operation are used instead of
| // an addition and max one.
| TR -= min(minusDot * W2, 0.0);
|
| // The third level of worley noise is subtracted from the result, with some
| // modifications. First, a scalar is added to minusDot so that the noise
| // starts affecting the shape farther away from the center of the ellipsoid's
| // surface. Then, it is scaled down so its impact is not too intense.
| TR -= 0.8 * (minusDot + 0.25) * W3;
|
| // The texture function's shading does not correlate with the shape of the cloud
| // produced by the layers of noise, so an extra shading scalar is calculated.
| // The darkest areas of the cloud are assigned to be where the noise erodes
| // the cloud the most. This is then interpolated based on the translucency
| // and the diffuse shading term of that point in the cloud.
| float shading = mix(1.0 - 0.8 * W * W, 1.0, Id * TR);
|
| // To avoid values that are too dark, this scalar is increased by a small amount
| // and clamped so it never goes to zero.
| shading = clamp(shading + 0.2, 0.3, 1.0);
|
| // Finally, the contrast of the cloud's color is increased.
| vec3 finalColor = mix(vec3(0.5), shading * color, 1.15);
| return vec4(finalColor, clamp(TR, 0.0, 1.0)) * v_color;
| }
|
| void main() {
| #ifdef DEBUG_BILLBOARDS
| out_FragColor = vec4(0.0, 0.5, 0.5, 1.0);
| #endif
| // To avoid calculations with high values,
| // we raycast from an arbitrarily smaller space.
| vec2 coordinate = v_maximumSize.xy * v_offset;
|
| vec3 ellipsoidScale = 0.82 * v_maximumSize;
| vec3 ellipsoidCenter = vec3(0.0);
|
| float zOffset = max(ellipsoidScale.z - 10.0, 0.0);
| vec3 eye = vec3(0, 0, -10.0 - zOffset);
| vec3 rayDir = normalize(vec3(coordinate, 1.0) - eye);
| vec3 rayOrigin = eye;
| #ifdef DEBUG_ELLIPSOIDS
| vec3 point, normal;
| if(intersectEllipsoid(rayOrigin, rayDir, ellipsoidCenter, ellipsoidScale, v_slice,
| point, normal)) {
| out_FragColor = v_brightness * v_color;
| }
| #else
| #ifndef DEBUG_BILLBOARDS
| vec4 cloud = drawCloud(rayOrigin, rayDir,
| ellipsoidCenter, ellipsoidScale, v_slice, v_brightness);
| if(cloud.w < 0.01) {
| discard;
| }
| out_FragColor = cloud;
| #endif
| #endif
| }
| `;var YH=`#ifdef INSTANCED
| in vec2 direction;
| #endif
| in vec4 positionHighAndScaleX;
| in vec4 positionLowAndScaleY;
| in vec4 packedAttribute0;
| in vec4 packedAttribute1;
| in vec4 color;
|
| out vec2 v_offset;
| out vec3 v_maximumSize;
| out vec4 v_color;
| out float v_slice;
| out float v_brightness;
|
| void main() {
| // Unpack attributes.
| vec3 positionHigh = positionHighAndScaleX.xyz;
| vec3 positionLow = positionLowAndScaleY.xyz;
| vec2 scale = vec2(positionHighAndScaleX.w, positionLowAndScaleY.w);
|
| float show = packedAttribute0.x;
| float brightness = packedAttribute0.y;
| vec2 coordinates = packedAttribute0.wz;
| vec3 maximumSize = packedAttribute1.xyz;
| float slice = packedAttribute1.w;
|
| #ifdef INSTANCED
| vec2 dir = direction;
| #else
| vec2 dir = coordinates;
| #endif
|
| vec2 offset = dir - vec2(0.5, 0.5);
| vec2 scaledOffset = scale * offset;
| vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
| vec4 positionEC = czm_modelViewRelativeToEye * p;
| positionEC.xy += scaledOffset;
|
| positionEC.xyz *= show;
| gl_Position = czm_projection * positionEC;
|
| v_offset = offset;
| v_maximumSize = maximumSize;
| v_color = color;
| v_slice = slice;
| v_brightness = brightness;
| }
| `;var XH=`uniform vec3 u_noiseTextureDimensions;
| uniform float u_noiseDetail;
| uniform vec3 u_noiseOffset;
| in vec2 v_position;
|
| float wrap(float value, float rangeLength) {
| if(value < 0.0) {
| float absValue = abs(value);
| float modValue = mod(absValue, rangeLength);
| return mod(rangeLength - modValue, rangeLength);
| }
| return mod(value, rangeLength);
| }
|
| vec3 wrapVec(vec3 value, float rangeLength) {
| return vec3(wrap(value.x, rangeLength),
| wrap(value.y, rangeLength),
| wrap(value.z, rangeLength));
| }
|
| vec3 random3(vec3 p) {
| float dot1 = dot(p, vec3(127.1, 311.7, 932.8));
| float dot2 = dot(p, vec3(269.5, 183.3, 421.4));
| return fract(vec3(sin(dot1 - dot2), cos(dot1 * dot2), dot1 * dot2));
| }
|
| // Frequency corresponds to cell size.
| // The higher the frequency, the smaller the cell size.
| vec3 getWorleyCellPoint(vec3 centerCell, vec3 offset, float freq) {
| float textureSliceWidth = u_noiseTextureDimensions.x;
| vec3 cell = centerCell + offset;
| cell = wrapVec(cell, textureSliceWidth / u_noiseDetail);
| cell += floor(u_noiseOffset / u_noiseDetail);
| vec3 p = offset + random3(cell);
| return p;
| }
|
| float worleyNoise(vec3 p, float freq) {
| vec3 centerCell = floor(p * freq);
| vec3 pointInCell = fract(p * freq);
| float shortestDistance = 1000.0;
|
| for(float z = -1.0; z <= 1.0; z++) {
| for(float y = -1.0; y <= 1.0; y++) {
| for(float x = -1.0; x <= 1.0; x++) {
| vec3 offset = vec3(x, y, z);
| vec3 point = getWorleyCellPoint(centerCell, offset, freq);
|
| float distance = length(pointInCell - point);
| if(distance < shortestDistance) {
| shortestDistance = distance;
| }
| }
| }
| }
|
| return shortestDistance;
| }
|
| const float MAX_FBM_ITERATIONS = 10.0;
|
| float worleyFBMNoise(vec3 p, float octaves, float scale) {
| float noise = 0.0;
| float freq = 1.0;
| float persistence = 0.625;
| for(float i = 0.0; i < MAX_FBM_ITERATIONS; i++) {
| if(i >= octaves) {
| break;
| }
|
| noise += worleyNoise(p * scale, freq * scale) * persistence;
| persistence *= 0.5;
| freq *= 2.0;
| }
| return noise;
| }
|
| void main() {
| float textureSliceWidth = u_noiseTextureDimensions.x;
| float inverseNoiseTextureRows = u_noiseTextureDimensions.z;
| float x = mod(v_position.x, textureSliceWidth);
| float y = mod(v_position.y, textureSliceWidth);
| float sliceRow = floor(v_position.y / textureSliceWidth);
| float z = floor(v_position.x / textureSliceWidth) + sliceRow * inverseNoiseTextureRows * textureSliceWidth;
|
| vec3 position = vec3(x, y, z);
| position /= u_noiseDetail;
| float worley0 = clamp(worleyFBMNoise(position, 3.0, 1.0), 0.0, 1.0);
| float worley1 = clamp(worleyFBMNoise(position, 3.0, 2.0), 0.0, 1.0);
| float worley2 = clamp(worleyFBMNoise(position, 3.0, 3.0), 0.0, 1.0);
| out_FragColor = vec4(worley0, worley1, worley2, 1.0);
| }
| `;var KH=`uniform vec3 u_noiseTextureDimensions;
| in vec2 position;
|
| out vec2 v_position;
|
| void main()
| {
| gl_Position = vec4(position, 0.1, 1.0);
|
| float textureSliceWidth = u_noiseTextureDimensions.x;
| float noiseTextureRows = u_noiseTextureDimensions.y;
| float inverseNoiseTextureRows = u_noiseTextureDimensions.z;
| vec2 transformedPos = (position * 0.5) + vec2(0.5);
| transformedPos *= textureSliceWidth;
| transformedPos.x *= textureSliceWidth * inverseNoiseTextureRows;
| transformedPos.y *= noiseTextureRows;
| v_position = transformedPos;
| }
| `;var $H=`
| in vec2 v_textureCoordinates;
|
| void main()
| {
| czm_materialInput materialInput;
|
| materialInput.s = v_textureCoordinates.s;
| materialInput.st = v_textureCoordinates;
| materialInput.str = vec3(v_textureCoordinates, 0.0);
| materialInput.normalEC = vec3(0.0, 0.0, -1.0);
|
| czm_material material = czm_getMaterial(materialInput);
|
| out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
| }
| `;function Rw(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}var nx=new te;function Vgt(e,t,n,i){let o=i.length;for(let r=0;r<o;++r){let s=i[r];if(s.x===t&&s.y===n&&s.level===e)return!0}return!1}Rw.prototype.addAvailableTileRange=function(e,t,n,i,o){let r=this._tilingScheme,s=this._rootNodes;if(e===0)for(let m=n;m<=o;++m)for(let p=t;p<=i;++p)Vgt(e,p,m,s)||s.push(new Ow(r,void 0,0,p,m));r.tileXYToRectangle(t,n,e,nx);let a=nx.west,l=nx.north;r.tileXYToRectangle(i,o,e,nx);let u=nx.east,f=nx.south,h=new qgt(e,a,f,u,l);for(let m=0;m<s.length;++m){let p=s[m];j7(p.extent,h)&&Ygt(this._maximumLevel,p,h)}};Rw.prototype.computeMaximumLevelAtPosition=function(e){let t;for(let n=0;n<this._rootNodes.length;++n){let i=this._rootNodes[n];if(Pw(i.extent,e)){t=i;break}}return c(t)?LI(void 0,t,e):-1};var Hgt=[],Ggt=[],jgt=new te,Wgt=new te;Rw.prototype.computeBestAvailableLevelOverRectangle=function(e){let t=Hgt;t.length=0,e.east<e.west?(t.push(te.fromRadians(-Math.PI,e.south,e.east,e.north,jgt)),t.push(te.fromRadians(e.west,e.south,Math.PI,e.north,Wgt))):t.push(e);let n=Ggt;n.length=0;let i;for(i=0;i<this._rootNodes.length;++i)NI(n,this._rootNodes[i],t);for(i=n.length-1;i>=0;--i)if(c(n[i])&&n[i].length===0)return i;return 0};var Fbe=new re;Rw.prototype.isTileAvailable=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(t,n,e,nx);return te.center(i,Fbe),this.computeMaximumLevelAtPosition(Fbe)>=e};Rw.prototype.computeChildMaskForTile=function(e,t,n){let i=e+1;if(i>=this._maximumLevel)return 0;let o=0;return o|=this.isTileAvailable(i,2*t,2*n+1)?1:0,o|=this.isTileAvailable(i,2*t+1,2*n+1)?2:0,o|=this.isTileAvailable(i,2*t,2*n)?4:0,o|=this.isTileAvailable(i,2*t+1,2*n)?8:0,o};function Ow(e,t,n,i,o){this.tilingScheme=e,this.parent=t,this.level=n,this.x=i,this.y=o,this.extent=e.tileXYToRectangle(i,o,n),this.rectangles=[],this._sw=void 0,this._se=void 0,this._nw=void 0,this._ne=void 0}Object.defineProperties(Ow.prototype,{nw:{get:function(){return this._nw||(this._nw=new Ow(this.tilingScheme,this,this.level+1,this.x*2,this.y*2)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new Ow(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new Ow(this.tilingScheme,this,this.level+1,this.x*2,this.y*2+1)),this._sw}},se:{get:function(){return this._se||(this._se=new Ow(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2+1)),this._se}}});function qgt(e,t,n,i,o){this.level=e,this.west=t,this.south=n,this.east=i,this.north=o}function j7(e,t){let n=Math.max(e.west,t.west),i=Math.max(e.south,t.south),o=Math.min(e.east,t.east),r=Math.min(e.north,t.north);return i<r&&n<o}function Ygt(e,t,n){for(;t.level<e;)if(ZH(t.nw.extent,n))t=t.nw;else if(ZH(t.ne.extent,n))t=t.ne;else if(ZH(t.sw.extent,n))t=t.sw;else if(ZH(t.se.extent,n))t=t.se;else break;if(t.rectangles.length===0||t.rectangles[t.rectangles.length-1].level<=n.level)t.rectangles.push(n);else{let i=Xo(t.rectangles,n.level,Xgt);i<0&&(i=~i),t.rectangles.splice(i,0,n)}}function Xgt(e,t){return e.level-t}function ZH(e,t){return t.west>=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function Pw(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function LI(e,t,n){let i=0,o=!1;for(;!o;){let r=t._nw&&Pw(t._nw.extent,n),s=t._ne&&Pw(t._ne.extent,n),a=t._sw&&Pw(t._sw.extent,n),l=t._se&&Pw(t._se.extent,n);if(r+s+a+l>1){r&&(i=Math.max(i,LI(t,t._nw,n))),s&&(i=Math.max(i,LI(t,t._ne,n))),a&&(i=Math.max(i,LI(t,t._sw,n))),l&&(i=Math.max(i,LI(t,t._se,n)));break}else r?t=t._nw:s?t=t._ne:a?t=t._sw:l?t=t._se:o=!0}for(;t!==e;){let r=t.rectangles;for(let s=r.length-1;s>=0&&r[s].level>i;--s){let a=r[s];Pw(a,n)&&(i=a.level)}t=t.parent}return i}function NI(e,t,n){if(!t)return;let i,o=!1;for(i=0;i<n.length;++i)o=o||j7(t.extent,n[i]);if(!o)return;let r=t.rectangles;for(i=0;i<r.length;++i){let s=r[i];e[s.level]||(e[s.level]=n),e[s.level]=Kgt(e[s.level],s)}NI(e,t._nw,n),NI(e,t._ne,n),NI(e,t._sw,n),NI(e,t._se,n)}function Kgt(e,t){let n=[];for(let i=0;i<e.length;++i){let o=e[i];j7(o,t)?(o.west<t.west&&n.push(new te(o.west,o.south,t.west,o.north)),o.east>t.east&&n.push(new te(t.east,o.south,o.east,o.north)),o.south<t.south&&n.push(new te(Math.max(t.west,o.west),o.south,Math.min(t.east,o.east),t.south)),o.north>t.north&&n.push(new te(Math.max(t.west,o.west),t.north,Math.min(t.east,o.east),o.north))):n.push(o)}return n}var _m=Rw;var $gt=15;function Bbe(e){this.ellipsoid=g(e.ellipsoid,Z.default),this.credit=void 0,this.tilingScheme=void 0,this.height=void 0,this.width=void 0,this.encoding=void 0,this.lodCount=void 0,this.hasAvailability=!1,this.tilesAvailable=void 0,this.tilesAvailabilityLoaded=void 0,this.levelZeroMaximumGeometricError=void 0,this.terrainDataStructure=void 0}Bbe.prototype.build=function(e){e._credit=this.credit,e._tilingScheme=this.tilingScheme,e._height=this.height,e._width=this.width,e._encoding=this.encoding,e._lodCount=this.lodCount,e._hasAvailability=this.hasAvailability,e._tilesAvailable=this.tilesAvailable,e._tilesAvailabilityLoaded=this.tilesAvailabilityLoaded,e._levelZeroMaximumGeometricError=this.levelZeroMaximumGeometricError,e._terrainDataStructure=this.terrainDataStructure};function Zgt(e,t){let n=t.copyrightText;c(n)&&(e.credit=new St(n));let i=t.spatialReference,o=g(i.latestWkid,i.wkid),r=t.extent,s={ellipsoid:e.ellipsoid};if(o===4326)s.rectangle=te.fromDegrees(r.xmin,r.ymin,r.xmax,r.ymax),e.tilingScheme=new Hi(s);else if(o===3857){let u=Math.PI*e.ellipsoid.maximumRadius;t.extent.xmax>u&&(t.extent.xmax=u),t.extent.ymax>u&&(t.extent.ymax=u),t.extent.xmin<-u&&(t.extent.xmin=-u),t.extent.ymin<-u&&(t.extent.ymin=-u),s.rectangleSouthwestInMeters=new k(r.xmin,r.ymin),s.rectangleNortheastInMeters=new k(r.xmax,r.ymax),e.tilingScheme=new Qr(s)}else throw new ie("Invalid spatial reference");let a=t.tileInfo;if(!c(a))throw new ie("tileInfo is required");e.width=a.rows+1,e.height=a.cols+1,e.encoding=a.format==="LERC"?Id.LERC:Id.NONE,e.lodCount=a.lods.length-1,(e.hasAvailability=t.capabilities.indexOf("Tilemap")!==-1)&&(e.tilesAvailable=new _m(e.tilingScheme,e.lodCount),e.tilesAvailable.addAvailableTileRange(0,0,0,e.tilingScheme.getNumberOfXTilesAtLevel(0),e.tilingScheme.getNumberOfYTilesAtLevel(0)),e.tilesAvailabilityLoaded=new _m(e.tilingScheme,e.lodCount)),e.levelZeroMaximumGeometricError=Jr.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.tilingScheme.ellipsoid,e.width,e.tilingScheme.getNumberOfXTilesAtLevel(0)),t.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),c(t.minValues)&&c(t.maxValues)?e.terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:t.minValues[0],highestEncodedHeight:t.maxValues[0]}:e.terrainDataStructure={elementMultiplier:1}}async function Jgt(e,t,n){try{let i=await t.fetchJson();Zgt(e,i)}catch(i){let o=`An error occurred while accessing ${t}.`;throw Eo.reportError(void 0,n,c(n)?n._errorEvent:void 0,o),i}}function Iy(e){e=g(e,g.EMPTY_OBJECT),this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._width=void 0,this._height=void 0,this._encoding=void 0,this._lodCount=void 0,this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailabilityLoaded=void 0,this._availableCache={},this._errorEvent=new fe}Object.defineProperties(Iy.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){return this._tilesAvailable}}});Iy.fromUrl=async function(e,t){C.defined("url",e),t=g(t,g.EMPTY_OBJECT),e=await Promise.resolve(e);let n=Te.createIfNeeded(e);n.appendForwardSlash(),c(t.token)&&(n=n.getDerivedResource({queryParameters:{token:t.token}}));let i=n.getDerivedResource({queryParameters:{f:"pjson"}}),o=new Bbe(t);await Jgt(o,i);let r=new Iy(t);return o.build(r),r._resource=n,r};Iy.prototype.requestTileGeometry=function(e,t,n,i){let o=this._resource.getDerivedResource({url:`tile/${n}/${t}/${e}`,request:i}),r=this._hasAvailability,s=Promise.resolve(!0),a;if(r&&!c(W7(this,n+1,e*2,t*2))){let h=kbe(this,n+1,e*2,t*2);s=h.promise,a=h.request}let l=o.fetchArrayBuffer();if(!c(l)||!c(s))return;let u=this,f=this._tilesAvailable;return Promise.all([l,s]).then(function(h){return new Wa({buffer:h[0],width:u._width,height:u._height,childTileMask:r?f.computeChildMaskForTile(n,e,t):$gt,structure:u._terrainDataStructure,encoding:u._encoding})}).catch(async function(h){var m;if(c(a)&&a.state===qn.CANCELLED){i.cancel();try{await((m=i.deferred)==null?void 0:m.promise)}catch{}return i.state=qn.CANCELLED,Promise.reject(h)}return Promise.reject(h)})};function W7(e,t,n,i){if(!e._hasAvailability)return;let o=e._tilesAvailabilityLoaded,r=e._tilesAvailable;if(t>e._lodCount)return!1;if(r.isTileAvailable(t,n,i))return!0;if(o.isTileAvailable(t,n,i))return!1}Iy.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};Iy.prototype.getTileDataAvailable=function(e,t,n){if(!this._hasAvailability)return;let i=W7(this,n,e,t);if(c(i))return i;kbe(this,n,e,t)};Iy.prototype.loadTileDataAvailability=function(e,t,n){};function Qgt(e,t,n,i){let o=t-1,r=n-1,s=i[e.y*t+e.x],a=[],l={startX:e.x,startY:e.y,endX:0,endY:0},u=new k(e.x+1,e.y+1),f=!1,h=!1;for(;!(f&&h);){let m=u.x,p=h?u.y+1:u.y;if(!f){for(let _=e.y;_<p;++_)if(i[_*t+u.x]!==s){f=!0;break}f?(a.push(new k(u.x,e.y)),--u.x,--m,l.endX=u.x):u.x===o?(l.endX=u.x,f=!0):++u.x}if(!h){let _=u.y*t;for(let b=e.x;b<=m;++b)if(i[_+b]!==s){h=!0;break}h?(a.push(new k(e.x,u.y)),--u.y,l.endY=u.y):u.y===r?(l.endY=u.y,h=!0):++u.y}}return{endingIndices:a,range:l,value:s}}function eyt(e,t,n,i,o){let r=[];if(o.every(function(l){return l===o[0]}))return o[0]===1&&r.push({startX:e,startY:t,endX:e+n-1,endY:t+i-1}),r;let a=[new k(0,0)];for(;a.length>0;){let l=a.pop(),u=Qgt(l,n,i,o);if(u.value===1){let h=u.range;h.startX+=e,h.endX+=e,h.startY+=t,h.endY+=t,r.push(h)}let f=u.endingIndices;f.length>0&&(a=a.concat(f))}return r}function kbe(e,t,n,i){if(!e._hasAvailability)return{};let o=Math.floor(n/128)*128,r=Math.floor(i/128)*128,s=Math.min(1<<t,128),a=`tilemap/${t}/${r}/${o}/${s}/${s}`,l=e._availableCache;if(c(l[a]))return l[a];let u=new Ko({throttle:!1,throttleByServer:!0,type:is.TERRAIN}),h=e._resource.getDerivedResource({url:a,request:u}).fetchJson();return c(h)?(h=h.then(function(m){let p=eyt(o,r,s,s,m.data);e._tilesAvailabilityLoaded.addAvailableTileRange(t,o,r,o+s,r+s);let _=e._tilesAvailable;for(let b=0;b<p.length;++b){let x=p[b];_.addAvailableTileRange(t,x.startX,x.startY,x.endX,x.endY)}return W7(e,t,n,i)}),l[a]={promise:h,request:u},h=h.finally(function(m){return delete l[a],m}),{promise:h,request:u}):{}}var Ube=Iy;var zbe="https://dev.virtualearth.net/REST/v1/Locations";function q7(e){e=g(e,g.EMPTY_OBJECT);let t=e.key;if(!c(t))throw new w("options.key is required.");this._key=t;let n={key:t};c(e.culture)&&(n.culture=e.culture),this._resource=new Te({url:zbe,queryParameters:n}),this._credit=new St('<img src="http://dev.virtualearth.net/Branding/logo_powered_by.png"/>',!1)}Object.defineProperties(q7.prototype,{url:{get:function(){return zbe}},key:{get:function(){return this._key}},credit:{get:function(){return this._credit}}});q7.prototype.geocode=async function(e){return C.typeOf.string("query",e),this._resource.getDerivedResource({queryParameters:{query:e}}).fetchJsonp("jsonp").then(function(n){return n.resourceSets.length===0?[]:n.resourceSets[0].resources.map(function(o){let r=o.bbox,s=r[0],a=r[1],l=r[2],u=r[3];return{displayName:o.name,destination:te.fromDegrees(a,s,u,l)}})})};var Vbe=q7;function Y7(){}Object.defineProperties(Y7.prototype,{credit:{get:function(){}}});Y7.prototype.geocode=function(e){C.typeOf.string("query",e);let t=e.match(/[^\s,\n]+/g);if(t.length===2||t.length===3){let n=+t[0],i=+t[1],o=t.length===3?+t[2]:300;if(isNaN(n)&&isNaN(i)){let r=/^(\d+.?\d*)([nsew])/i;for(let s=0;s<t.length;++s){let a=t[s].match(r);r.test(t[s])&&a.length===3&&(/^[ns]/i.test(a[2])?i=/^[n]/i.test(a[2])?+a[1]:-a[1]:/^[ew]/i.test(a[2])&&(n=/^[e]/i.test(a[2])?+a[1]:-a[1]))}}if(!isNaN(n)&&!isNaN(i)&&!isNaN(o)){let r={displayName:e,destination:d.fromDegrees(n,i,o)};return Promise.resolve([r])}}return Promise.resolve([])};var Hbe=Y7;var tyt=new ee,Gbe=new d,Mw=new d;function nyt(e){let t=e.points,n=e.times;if(t.length<3){let i=n[0],o=1/(n[1]-i),r=t[0],s=t[1];return function(a,l){c(l)||(l=new d);let u=(a-i)*o;return d.lerp(r,s,u,l)}}return function(i,o){c(o)||(o=new d);let r=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),s=(i-n[r])/(n[r+1]-n[r]),a=tyt;a.z=s,a.y=s*s,a.x=a.y*s,a.w=1;let l,u,f,h,m;return r===0?(l=t[0],u=t[1],f=e.firstTangent,h=d.subtract(t[2],l,Gbe),d.multiplyByScalar(h,.5,h),m=N.multiplyByVector(Fb.hermiteCoefficientMatrix,a,a)):r===t.length-2?(l=t[r],u=t[r+1],h=e.lastTangent,f=d.subtract(u,t[r-1],Gbe),d.multiplyByScalar(f,.5,f),m=N.multiplyByVector(Fb.hermiteCoefficientMatrix,a,a)):(l=t[r-1],u=t[r],f=t[r+1],h=t[r+2],m=N.multiplyByVector(Oy.catmullRomCoefficientMatrix,a,a)),o=d.multiplyByScalar(l,m.x,o),d.multiplyByScalar(u,m.y,Mw),d.add(o,Mw,o),d.multiplyByScalar(f,m.z,Mw),d.add(o,Mw,o),d.multiplyByScalar(h,m.w,Mw),d.add(o,Mw,o)}}var iyt=new d,oyt=new d;function Oy(e){e=g(e,g.EMPTY_OBJECT);let t=e.points,n=e.times,i=e.firstTangent,o=e.lastTangent;if(C.defined("points",t),C.defined("times",n),C.typeOf.number.greaterThanOrEquals("points.length",t.length,2),C.typeOf.number.equals("times.length","points.length",n.length,t.length),t.length>2&&(c(i)||(i=iyt,d.multiplyByScalar(t[1],2,i),d.subtract(i,t[2],i),d.subtract(i,t[0],i),d.multiplyByScalar(i,.5,i)),!c(o))){let r=t.length-1;o=oyt,d.multiplyByScalar(t[r-1],2,o),d.subtract(t[r],o,o),d.add(o,t[r-2],o),d.multiplyByScalar(o,.5,o)}this._times=n,this._points=t,this._firstTangent=d.clone(i),this._lastTangent=d.clone(o),this._evaluateFunction=nyt(this),this._lastTimeIndex=0}Object.defineProperties(Oy.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}});Oy.catmullRomCoefficientMatrix=new N(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0);Oy.prototype.findTimeInterval=Ai.prototype.findTimeInterval;Oy.prototype.wrapTime=Ai.prototype.wrapTime;Oy.prototype.clampTime=Ai.prototype.clampTime;Oy.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var jbe=Oy;var JH={};JH.clipTriangleAtAxisAlignedThreshold=function(e,t,n,i,o,r){if(!c(e))throw new w("threshold is required.");if(!c(t))throw new w("keepAbove is required.");if(!c(n))throw new w("u0 is required.");if(!c(i))throw new w("u1 is required.");if(!c(o))throw new w("u2 is required.");c(r)?r.length=0:r=[];let s,a,l;t?(s=n<e,a=i<e,l=o<e):(s=n>e,a=i>e,l=o>e);let u=s+a+l,f,h,m,p,_,b;return u===1?s?(f=(e-n)/(i-n),h=(e-n)/(o-n),r.push(1),r.push(2),h!==1&&(r.push(-1),r.push(0),r.push(2),r.push(h)),f!==1&&(r.push(-1),r.push(0),r.push(1),r.push(f))):a?(m=(e-i)/(o-i),p=(e-i)/(n-i),r.push(2),r.push(0),p!==1&&(r.push(-1),r.push(1),r.push(0),r.push(p)),m!==1&&(r.push(-1),r.push(1),r.push(2),r.push(m))):l&&(_=(e-o)/(n-o),b=(e-o)/(i-o),r.push(0),r.push(1),b!==1&&(r.push(-1),r.push(2),r.push(1),r.push(b)),_!==1&&(r.push(-1),r.push(2),r.push(0),r.push(_))):u===2?!s&&n!==e?(p=(e-i)/(n-i),_=(e-o)/(n-o),r.push(0),r.push(-1),r.push(1),r.push(0),r.push(p),r.push(-1),r.push(2),r.push(0),r.push(_)):!a&&i!==e?(b=(e-o)/(i-o),f=(e-n)/(i-n),r.push(1),r.push(-1),r.push(2),r.push(1),r.push(b),r.push(-1),r.push(0),r.push(1),r.push(f)):!l&&o!==e&&(h=(e-n)/(o-n),m=(e-i)/(o-i),r.push(2),r.push(-1),r.push(0),r.push(2),r.push(h),r.push(-1),r.push(1),r.push(2),r.push(m)):u!==3&&(r.push(0),r.push(1),r.push(2)),r};JH.computeBarycentricCoordinates=function(e,t,n,i,o,r,s,a,l){if(!c(e))throw new w("x is required.");if(!c(t))throw new w("y is required.");if(!c(n))throw new w("x1 is required.");if(!c(i))throw new w("y1 is required.");if(!c(o))throw new w("x2 is required.");if(!c(r))throw new w("y2 is required.");if(!c(s))throw new w("x3 is required.");if(!c(a))throw new w("y3 is required.");let u=n-s,f=s-o,h=r-a,m=i-a,p=1/(h*u+f*m),_=t-a,b=e-s,x=(h*b+f*_)*p,T=(-m*b+u*_)*p,E=1-x-T;return c(l)?(l.x=x,l.y=T,l.z=E,l):new d(x,T,E)};JH.computeLineSegmentLineSegmentIntersection=function(e,t,n,i,o,r,s,a,l){C.typeOf.number("x00",e),C.typeOf.number("y00",t),C.typeOf.number("x01",n),C.typeOf.number("y01",i),C.typeOf.number("x10",o),C.typeOf.number("y10",r),C.typeOf.number("x11",s),C.typeOf.number("y11",a);let u=(s-o)*(t-r)-(a-r)*(e-o),f=(n-e)*(t-r)-(i-t)*(e-o),h=(a-r)*(n-e)-(s-o)*(i-t);if(h===0)return;let m=u/h,p=f/h;if(m>=0&&m<=1&&p>=0&&p<=1)return c(l)||(l=new k),l.x=e+m*(n-e),l.y=t+m*(i-t),l};var Py=JH;function Ry(e){if(!c(e)||!c(e.quantizedVertices))throw new w("options.quantizedVertices is required.");if(!c(e.indices))throw new w("options.indices is required.");if(!c(e.minimumHeight))throw new w("options.minimumHeight is required.");if(!c(e.maximumHeight))throw new w("options.maximumHeight is required.");if(!c(e.maximumHeight))throw new w("options.maximumHeight is required.");if(!c(e.boundingSphere))throw new w("options.boundingSphere is required.");if(!c(e.horizonOcclusionPoint))throw new w("options.horizonOcclusionPoint is required.");if(!c(e.westIndices))throw new w("options.westIndices is required.");if(!c(e.southIndices))throw new w("options.southIndices is required.");if(!c(e.eastIndices))throw new w("options.eastIndices is required.");if(!c(e.northIndices))throw new w("options.northIndices is required.");if(!c(e.westSkirtHeight))throw new w("options.westSkirtHeight is required.");if(!c(e.southSkirtHeight))throw new w("options.southSkirtHeight is required.");if(!c(e.eastSkirtHeight))throw new w("options.eastSkirtHeight is required.");if(!c(e.northSkirtHeight))throw new w("options.northSkirtHeight is required.");this._quantizedVertices=e.quantizedVertices,this._encodedNormals=e.encodedNormals,this._indices=e.indices,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._boundingSphere=e.boundingSphere,this._orientedBoundingBox=e.orientedBoundingBox,this._horizonOcclusionPoint=e.horizonOcclusionPoint,this._credits=e.credits;let t=this._quantizedVertices.length/3,n=this._uValues=this._quantizedVertices.subarray(0,t),i=this._vValues=this._quantizedVertices.subarray(t,2*t);this._heightValues=this._quantizedVertices.subarray(2*t,3*t);function o(s,a){return i[s]-i[a]}function r(s,a){return n[s]-n[a]}this._westIndices=e4(e.westIndices,o,t),this._southIndices=e4(e.southIndices,r,t),this._eastIndices=e4(e.eastIndices,o,t),this._northIndices=e4(e.northIndices,r,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=g(e.childTileMask,15),this._createdByUpsampling=g(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0}Object.defineProperties(Ry.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return c(this._mesh)}}});var QH=[];function e4(e,t,n){QH.length=e.length;let i=!1;for(let o=0,r=e.length;o<r;++o)QH[o]=e[o],i=i||o>0&&t(e[o-1],e[o])>0;return i?(QH.sort(t),Oe.createTypedArray(n,QH)):e}var Wbe="createVerticesFromQuantizedTerrainMesh",ryt=new hi(Wbe),syt=new hi(Wbe,om.maximumAsynchronousTasks);Ry.prototype.createMesh=function(e){e=g(e,g.EMPTY_OBJECT),C.typeOf.object("options.tilingScheme",e.tilingScheme),C.typeOf.number("options.x",e.x),C.typeOf.number("options.y",e.y),C.typeOf.number("options.level",e.level);let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=g(e.exaggeration,1),s=g(e.exaggerationRelativeHeight,0),a=g(e.throttle,!0),l=t.ellipsoid,u=t.tileXYToRectangle(n,i,o),h=(a?syt:ryt).scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,includeWebMercatorT:!0,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:u,relativeToCenter:this._boundingSphere.center,ellipsoid:l,exaggeration:r,exaggerationRelativeHeight:s});if(!c(h))return;let m=this;return Promise.resolve(h).then(function(p){let _=m._quantizedVertices.length/3,b=_+m._westIndices.length+m._southIndices.length+m._eastIndices.length+m._northIndices.length,x=Oe.createTypedArray(b,p.indices),T=new Float32Array(p.vertices),E=p.center,S=p.minimumHeight,A=p.maximumHeight,v=m._boundingSphere,D=m._orientedBoundingBox,R=g(d.clone(p.occludeePointInScaledSpace),m._horizonOcclusionPoint),P=p.vertexStride,L=Ic.clone(p.encoding);return m._mesh=new Od(E,T,x,p.indexCountWithoutSkirts,_,S,A,v,R,P,D,L,p.westIndicesSouthToNorth,p.southIndicesEastToWest,p.eastIndicesNorthToSouth,p.northIndicesWestToEast),m._quantizedVertices=void 0,m._encodedNormals=void 0,m._indices=void 0,m._uValues=void 0,m._vValues=void 0,m._heightValues=void 0,m._westIndices=void 0,m._southIndices=void 0,m._eastIndices=void 0,m._northIndices=void 0,m._mesh})};var ayt=new hi("upsampleQuantizedTerrainMesh",om.maximumAsynchronousTasks);Ry.prototype.upsample=function(e,t,n,i,o,r,s){if(!c(e))throw new w("tilingScheme is required.");if(!c(t))throw new w("thisX is required.");if(!c(n))throw new w("thisY is required.");if(!c(i))throw new w("thisLevel is required.");if(!c(o))throw new w("descendantX is required.");if(!c(r))throw new w("descendantY is required.");if(!c(s))throw new w("descendantLevel is required.");if(s-i>1)throw new w("Upsampling through more than one level at a time is not currently supported.");let l=this._mesh;if(!c(this._mesh))return;let u=t*2!==o,f=n*2===r,h=e.ellipsoid,m=e.tileXYToRectangle(o,r,s),p=ayt.scheduleTask({vertices:l.vertices,vertexCountWithoutSkirts:l.vertexCountWithoutSkirts,indices:l.indices,indexCountWithoutSkirts:l.indexCountWithoutSkirts,encoding:l.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:u,isNorthChild:f,childRectangle:m,ellipsoid:h});if(!c(p))return;let _=Math.min(this._westSkirtHeight,this._eastSkirtHeight);_=Math.min(_,this._southSkirtHeight),_=Math.min(_,this._northSkirtHeight);let b=u?_*.5:this._westSkirtHeight,x=f?_*.5:this._southSkirtHeight,T=u?this._eastSkirtHeight:_*.5,E=f?this._northSkirtHeight:_*.5,S=this._credits;return Promise.resolve(p).then(function(A){let v=new Uint16Array(A.vertices),D=Oe.createTypedArray(v.length/3,A.indices),R;return c(A.encodedNormals)&&(R=new Uint8Array(A.encodedNormals)),new Ry({quantizedVertices:v,indices:D,encodedNormals:R,minimumHeight:A.minimumHeight,maximumHeight:A.maximumHeight,boundingSphere:ne.clone(A.boundingSphere),orientedBoundingBox:wn.clone(A.orientedBoundingBox),horizonOcclusionPoint:d.clone(A.horizonOcclusionPoint),westIndices:A.westIndices,southIndices:A.southIndices,eastIndices:A.eastIndices,northIndices:A.northIndices,westSkirtHeight:b,southSkirtHeight:x,eastSkirtHeight:T,northSkirtHeight:E,childTileMask:0,credits:S,createdByUpsampling:!0})})};var X7=32767,qbe=new d;Ry.prototype.interpolateHeight=function(e,t,n){let i=O.clamp((t-e.west)/e.width,0,1);i*=X7;let o=O.clamp((n-e.south)/e.height,0,1);return o*=X7,c(this._mesh)?fyt(this,i,o):dyt(this,i,o)};function Ybe(e,t,n,i,o,r,s,a){let l=Math.min(n,o,s),u=Math.max(n,o,s),f=Math.min(i,r,a),h=Math.max(i,r,a);return e>=l&&e<=u&&t>=f&&t<=h}var cyt=new k,lyt=new k,uyt=new k;function fyt(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,l=s.length;a<l;a+=3){let u=s[a],f=s[a+1],h=s[a+2],m=r.decodeTextureCoordinates(o,u,cyt),p=r.decodeTextureCoordinates(o,f,lyt),_=r.decodeTextureCoordinates(o,h,uyt);if(Ybe(t,n,m.x,m.y,p.x,p.y,_.x,_.y)){let b=Py.computeBarycentricCoordinates(t,n,m.x,m.y,p.x,p.y,_.x,_.y,qbe);if(b.x>=-1e-15&&b.y>=-1e-15&&b.z>=-1e-15){let x=r.decodeHeight(o,u),T=r.decodeHeight(o,f),E=r.decodeHeight(o,h);return b.x*x+b.y*T+b.z*E}}}}function dyt(e,t,n){let i=e._uValues,o=e._vValues,r=e._heightValues,s=e._indices;for(let a=0,l=s.length;a<l;a+=3){let u=s[a],f=s[a+1],h=s[a+2],m=i[u],p=i[f],_=i[h],b=o[u],x=o[f],T=o[h];if(Ybe(t,n,m,b,p,x,_,T)){let E=Py.computeBarycentricCoordinates(t,n,m,b,p,x,_,T,qbe);if(E.x>=-1e-15&&E.y>=-1e-15&&E.z>=-1e-15){let S=E.x*r[u]+E.y*r[f]+E.z*r[h];return O.lerp(e._minimumHeight,e._maximumHeight,S/X7)}}}}Ry.prototype.isChildAvailable=function(e,t,n,i){if(!c(e))throw new w("thisX is required.");if(!c(t))throw new w("thisY is required.");if(!c(n))throw new w("childX is required.");if(!c(i))throw new w("childY is required.");let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};Ry.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var Lw=Ry;function hyt(e){this.resource=e.resource,this.version=e.version,this.isHeightmap=e.isHeightmap,this.tileUrlTemplates=e.tileUrlTemplates,this.availability=e.availability,this.hasVertexNormals=e.hasVertexNormals,this.hasWaterMask=e.hasWaterMask,this.hasMetadata=e.hasMetadata,this.availabilityLevels=e.availabilityLevels,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.littleEndianExtensionSize=e.littleEndianExtensionSize,this.availabilityPromiseCache={}}function Kbe(e){this.requestVertexNormals=g(e.requestVertexNormals,!1),this.requestWaterMask=g(e.requestWaterMask,!1),this.requestMetadata=g(e.requestMetadata,!0),this.ellipsoid=g(e.ellipsoid,Z.default),this.heightmapWidth=65,this.heightmapStructure=void 0,this.hasWaterMask=!1,this.hasMetadata=!1,this.hasVertexNormals=!1,this.scheme=void 0,this.lastResource=void 0,this.layerJsonResource=void 0,this.previousError=void 0,this.availability=void 0,this.tilingScheme=void 0,this.levelZeroMaximumGeometricError=void 0,this.heightmapStructure=void 0,this.layers=[],this.attribution="",this.overallAvailability=[],this.overallMaxZoom=0,this.tileCredits=[]}Kbe.prototype.build=function(e){e._heightmapWidth=this.heightmapWidth,e._scheme=this.scheme;let t=c(this.lastResource.credits)?this.lastResource.credits:[];e._tileCredits=t.concat(this.tileCredits),e._availability=this.availability,e._tilingScheme=this.tilingScheme,e._requestWaterMask=this.requestWaterMask,e._levelZeroMaximumGeometricError=this.levelZeroMaximumGeometricError,e._heightmapStructure=this.heightmapStructure,e._layers=this.layers,e._hasWaterMask=this.hasWaterMask,e._hasVertexNormals=this.hasVertexNormals,e._hasMetadata=this.hasMetadata};async function $be(e,t,n){if(!t.format){let b="The tile format is not specified in the layer.json file.";throw e.previousError=Eo.reportError(e.previousError,n,c(n)?n._errorEvent:void 0,b),new ie(b)}if(!t.tiles||t.tiles.length===0){let b="The layer.json file does not specify any tile URL templates.";throw e.previousError=Eo.reportError(e.previousError,n,c(n)?n._errorEvent:void 0,b),new ie(b)}let i=!1,o=!1,r=!1,s=!0,a=!1;if(t.format==="heightmap-1.0")a=!0,c(e.heightmapStructure)||(e.heightmapStructure={heightScale:1/5,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1,lowestEncodedHeight:0,highestEncodedHeight:256*256-1}),o=!0,e.requestWaterMask=!0;else if(t.format.indexOf("quantized-mesh-1.")!==0){let b=`The tile format "${t.format}" is invalid or not supported.`;throw e.previousError=Eo.reportError(e.previousError,n,c(n)?n._errorEvent:void 0,b),new ie(b)}let l=t.tiles,u=t.maxzoom;if(e.overallMaxZoom=Math.max(e.overallMaxZoom,u),!t.projection||t.projection==="EPSG:4326")e.tilingScheme=new Hi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});else if(t.projection==="EPSG:3857")e.tilingScheme=new Qr({numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});else{let b=`The projection "${t.projection}" is invalid or not supported.`;throw e.previousError=Eo.reportError(e.previousError,n,c(n)?n._errorEvent:void 0,b),new ie(b)}if(e.levelZeroMaximumGeometricError=Jr.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.tilingScheme.ellipsoid,e.heightmapWidth,e.tilingScheme.getNumberOfXTilesAtLevel(0)),!t.scheme||t.scheme==="tms"||t.scheme==="slippyMap")e.scheme=t.scheme;else{let b=`The scheme "${t.scheme}" is invalid or not supported.`;throw e.previousError=Eo.reportError(e.previousError,n,c(n)?n._errorEvent:void 0,b),new ie(b)}let f;c(t.extensions)&&t.extensions.indexOf("octvertexnormals")!==-1?i=!0:c(t.extensions)&&t.extensions.indexOf("vertexnormals")!==-1&&(i=!0,s=!1),c(t.extensions)&&t.extensions.indexOf("watermask")!==-1&&(o=!0),c(t.extensions)&&t.extensions.indexOf("metadata")!==-1&&(r=!0);let h=t.metadataAvailability,m=t.available,p;if(c(m)&&!c(h)){p=new _m(e.tilingScheme,m.length);for(let b=0;b<m.length;++b){let x=m[b],T=e.tilingScheme.getNumberOfYTilesAtLevel(b);c(e.overallAvailability[b])||(e.overallAvailability[b]=[]);for(let E=0;E<x.length;++E){let S=x[E],A=T-S.endY-1,v=T-S.startY-1;e.overallAvailability[b].push([S.startX,A,S.endX,v]),p.addAvailableTileRange(b,S.startX,A,S.endX,v)}}}else c(h)&&(f=new _m(e.tilingScheme,u),p=new _m(e.tilingScheme,u),e.overallAvailability[0]=[[0,0,1,0]],p.addAvailableTileRange(0,0,0,1,0));e.hasWaterMask=e.hasWaterMask||o,e.hasVertexNormals=e.hasVertexNormals||i,e.hasMetadata=e.hasMetadata||r,c(t.attribution)&&(e.attribution.length>0&&(e.attribution+=" "),e.attribution+=t.attribution),e.layers.push(new hyt({resource:e.lastResource,version:t.version,isHeightmap:a,tileUrlTemplates:l,availability:p,hasVertexNormals:i,hasWaterMask:o,hasMetadata:r,availabilityLevels:h,availabilityTilesLoaded:f,littleEndianExtensionSize:s}));let _=t.parentUrl;return c(_)?c(p)?(e.lastResource=e.lastResource.getDerivedResource({url:_}),e.lastResource.appendForwardSlash(),e.layerJsonResource=e.lastResource.getDerivedResource({url:"layer.json"}),await Z7(e),!0):(console.log("A layer.json can't have a parentUrl if it does't have an available array."),!0):!0}function myt(e,t,n){let i=`An error occurred while accessing ${e.layerJsonResource.url}.`;if(c(t)&&(i+=`
| ${t.message}`),e.previousError=Eo.reportError(e.previousError,n,c(n)?n._errorEvent:void 0,i),e.previousError.retry)return Z7(e,n);throw new ie(i)}async function pyt(e,t,n){await $be(e,t,n);let i=e.overallAvailability.length;if(i>0){let o=e.availability=new _m(e.tilingScheme,e.overallMaxZoom);for(let r=0;r<i;++r){let s=e.overallAvailability[r];for(let a=0;a<s.length;++a){let l=s[a];o.addAvailableTileRange(r,l[0],l[1],l[2],l[3])}}}if(e.attribution.length>0){let o=new St(e.attribution);e.tileCredits.push(o)}return!0}async function Z7(e,t){try{let n=await e.layerJsonResource.fetchJson();return pyt(e,n,t)}catch(n){return c(n)&&n.statusCode===404?(await $be(e,{tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]},t),!0):myt(e,n,t)}}function zd(e){e=g(e,g.EMPTY_OBJECT),this._heightmapWidth=void 0,this._heightmapStructure=void 0,this._hasWaterMask=!1,this._hasVertexNormals=!1,this._hasMetadata=!1,this._scheme=void 0,this._ellipsoid=e.ellipsoid,this._requestVertexNormals=g(e.requestVertexNormals,!1),this._requestWaterMask=g(e.requestWaterMask,!1),this._requestMetadata=g(e.requestMetadata,!0),this._errorEvent=new fe;let t=e.credit;typeof t=="string"&&(t=new St(t)),this._credit=t,this._availability=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._layers=void 0,this._tileCredits=void 0}var K7={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4};function Xbe(e){return!c(e)||e.length===0?{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:`application/vnd.quantized-mesh;extensions=${e.join("-")},application/octet-stream;q=0.9,*/*;q=0.01`}}function _yt(e,t,n,i,o){let r=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new Wa({buffer:r,childTileMask:new Uint8Array(t,r.byteLength,1)[0],waterMask:new Uint8Array(t,r.byteLength+1,t.byteLength-r.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function gyt(e,t,n,i,o,r){let s=r.littleEndianExtensionSize,a=0,l=3,u=l+1,f=Float64Array.BYTES_PER_ELEMENT*l,h=Float64Array.BYTES_PER_ELEMENT*u,p=Uint16Array.BYTES_PER_ELEMENT*3,_=3,b=Uint16Array.BYTES_PER_ELEMENT,x=b*_,T=new DataView(t),E=new d(T.getFloat64(a,!0),T.getFloat64(a+8,!0),T.getFloat64(a+16,!0));a+=f;let S=T.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let A=T.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let v=new ne(new d(T.getFloat64(a,!0),T.getFloat64(a+8,!0),T.getFloat64(a+16,!0)),T.getFloat64(a+f,!0));a+=h;let D=new d(T.getFloat64(a,!0),T.getFloat64(a+8,!0),T.getFloat64(a+16,!0));a+=f;let R=T.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let P=new Uint16Array(t,a,R*3);a+=R*p,R>64*1024&&(b=Uint32Array.BYTES_PER_ELEMENT,x=b*_);let L=P.subarray(0,R),F=P.subarray(R,2*R),y=P.subarray(R*2,3*R);On.zigZagDeltaDecode(L,F,y),a%b!==0&&(a+=b-a%b);let I=T.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let M=Oe.createTypedArrayFromArrayBuffer(R,t,a,I*_);a+=I*x;let B=0,U=M.length;for(let De=0;De<U;++De){let ke=M[De];M[De]=B-ke,ke===0&&++B}let V=T.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let W=Oe.createTypedArrayFromArrayBuffer(R,t,a,V);a+=V*b;let H=T.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let X=Oe.createTypedArrayFromArrayBuffer(R,t,a,H);a+=H*b;let $=T.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let ae=Oe.createTypedArrayFromArrayBuffer(R,t,a,$);a+=$*b;let se=T.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let he=Oe.createTypedArrayFromArrayBuffer(R,t,a,se);a+=se*b;let ge,le;for(;a<T.byteLength;){let De=T.getUint8(a,!0);a+=Uint8Array.BYTES_PER_ELEMENT;let ke=T.getUint32(a,s);if(a+=Uint32Array.BYTES_PER_ELEMENT,De===K7.OCT_VERTEX_NORMALS&&e._requestVertexNormals)ge=new Uint8Array(t,a,R*2);else if(De===K7.WATER_MASK&&e._requestWaterMask)le=new Uint8Array(t,a,ke);else if(De===K7.METADATA&&e._requestMetadata){let He=T.getUint32(a,!0);if(He>0){let Ie=Do(new Uint8Array(t),a+Uint32Array.BYTES_PER_ELEMENT,He).available;if(c(Ie))for(let Kt=0;Kt<Ie.length;++Kt){let Pt=n+Kt+1,dt=Ie[Kt],rn=e._tilingScheme.getNumberOfYTilesAtLevel(Pt);for(let Vt=0;Vt<dt.length;++Vt){let Ae=dt[Vt],Qe=rn-Ae.endY-1,et=rn-Ae.startY-1;e.availability.addAvailableTileRange(Pt,Ae.startX,Qe,Ae.endX,et),r.availability.addAvailableTileRange(Pt,Ae.startX,Qe,Ae.endX,et)}}}r.availabilityTilesLoaded.addAvailableTileRange(n,i,o,i,o)}a+=ke}let me=e.getLevelMaximumGeometricError(n)*5,Me=e._tilingScheme.tileXYToRectangle(i,o,n),Ge=wn.fromRectangle(Me,S,A,e._tilingScheme.ellipsoid);return new Lw({center:E,minimumHeight:S,maximumHeight:A,boundingSphere:v,orientedBoundingBox:Ge,horizonOcclusionPoint:D,quantizedVertices:P,encodedNormals:ge,indices:M,westIndices:W,southIndices:X,eastIndices:ae,northIndices:he,westSkirtHeight:me,southSkirtHeight:me,eastSkirtHeight:me,northSkirtHeight:me,childTileMask:e.availability.computeChildMaskForTile(n,i,o),waterMask:le,credits:e._tileCredits})}zd.prototype.requestTileGeometry=function(e,t,n,i){let o=this._layers,r,s=o.length,a=!1,l=Promise.resolve();if(s===1)r=o[0];else for(let u=0;u<s;++u){let f=o[u];if(!c(f.availability)||f.availability.isTileAvailable(n,e,t)){r=f;break}let h=J7(this,e,t,n,f,u===0);h.result&&(a=!0,l=l.then(()=>h.promise))}return!c(r)&&a?l.then(()=>new Promise(u=>{setTimeout(()=>{let f=this.requestTileGeometry(e,t,n,i);u(f)},0)})):Zbe(this,e,t,n,r,i)};function Zbe(e,t,n,i,o,r){if(!c(o))return Promise.reject(new ie("Terrain tile doesn't exist"));let s=o.tileUrlTemplates;if(s.length===0)return;let a;!e._scheme||e._scheme==="tms"?a=e._tilingScheme.getNumberOfYTilesAtLevel(i)-n-1:a=n;let l=[];e._requestVertexNormals&&o.hasVertexNormals&&l.push(o.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&o.hasWaterMask&&l.push("watermask"),e._requestMetadata&&o.hasMetadata&&l.push("metadata");let u,f,h=s[(t+a+i)%s.length],m=o.resource;c(m._ionEndpoint)&&!c(m._ionEndpoint.externalType)?(l.length!==0&&(f={extensions:l.join("-")}),u=Xbe(void 0)):u=Xbe(l);let p=m.getDerivedResource({url:h,templateValues:{version:o.version,z:i,x:t,y:a},queryParameters:f,headers:u,request:r}).fetchArrayBuffer();if(c(p))return p.then(function(_){return c(_)?c(e._heightmapStructure)?_yt(e,_,i,t,n):gyt(e,_,i,t,n,o):Promise.reject(new ie("Mesh buffer doesn't exist."))})}Object.defineProperties(zd.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return this._hasWaterMask&&this._requestWaterMask}},hasVertexNormals:{get:function(){return this._hasVertexNormals&&this._requestVertexNormals}},hasMetadata:{get:function(){return this._hasMetadata&&this._requestMetadata}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},requestWaterMask:{get:function(){return this._requestWaterMask}},requestMetadata:{get:function(){return this._requestMetadata}},availability:{get:function(){return this._availability}}});zd.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};zd.fromIonAssetId=async function(e,t){C.defined("assetId",e);let n=await Uu.fromAssetId(e);return zd.fromUrl(n,t)};zd.fromUrl=async function(e,t){C.defined("url",e),t=g(t,g.EMPTY_OBJECT),e=await Promise.resolve(e);let n=Te.createIfNeeded(e);n.appendForwardSlash();let i=new Kbe(t);i.lastResource=n,i.layerJsonResource=i.lastResource.getDerivedResource({url:"layer.json"}),await Z7(i);let o=new zd(t);return i.build(o),o};zd.prototype.getTileDataAvailable=function(e,t,n){if(!c(this._availability))return;if(n>this._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(n,e,t))return!0;if(!this._hasMetadata)return!1;let i=this._layers,o=i.length;for(let r=0;r<o;++r)if(J7(this,e,t,n,i[r],r===0).result)return;return!1};zd.prototype.loadTileDataAvailability=function(e,t,n){if(!c(this._availability)||n>this._availability._maximumLevel||this._availability.isTileAvailable(n,e,t)||!this._hasMetadata)return;let i=this._layers,o=i.length;for(let r=0;r<o;++r){let s=J7(this,e,t,n,i[r],r===0);if(c(s.promise))return s.promise}};function $7(e,t,n,i){if(i===0)return;let o=e.availabilityLevels,r=i%o===0?i-o:(i/o|0)*o,s=1<<i-r,a=t/s|0,l=n/s|0;return{level:r,x:a,y:l}}function J7(e,t,n,i,o,r){if(!c(o.availabilityLevels))return{result:!1};let s,a=function(){delete o.availabilityPromiseCache[s]},l=o.availabilityTilesLoaded,u=o.availability,f=$7(o,t,n,i);for(;c(f);){if(u.isTileAvailable(f.level,f.x,f.y)&&!l.isTileAvailable(f.level,f.x,f.y)){let h;if(!r&&(s=`${f.level}-${f.x}-${f.y}`,h=o.availabilityPromiseCache[s],!c(h))){let m=new Ko({throttle:!1,throttleByServer:!0,type:is.TERRAIN});h=Zbe(e,f.x,f.y,f.level,o,m),c(h)&&(o.availabilityPromiseCache[s]=h,h.then(a))}return{result:!0,promise:h}}f=$7(o,f.x,f.y,f.level)}return{result:!1}}zd._getAvailabilityTile=$7;var Nw=zd;function i_(e){e=g(e,g.EMPTY_OBJECT);let t=e.radius;C.typeOf.number("radius",t);let n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new cl(n),this._workerName="createCircleGeometry"}i_.packedLength=cl.packedLength;i_.pack=function(e,t,n){return C.typeOf.object("value",e),cl.pack(e._ellipseGeometry,t,n)};var Jbe=new cl({center:new d,semiMajorAxis:1,semiMinorAxis:1}),ga={center:new d,radius:void 0,ellipsoid:Z.clone(Z.default),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new Ce,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};i_.unpack=function(e,t,n){let i=cl.unpack(e,t,Jbe);return ga.center=d.clone(i._center,ga.center),ga.ellipsoid=Z.clone(i._ellipsoid,ga.ellipsoid),ga.ellipsoid=Z.clone(i._ellipsoid,Jbe._ellipsoid),ga.height=i._height,ga.extrudedHeight=i._extrudedHeight,ga.granularity=i._granularity,ga.vertexFormat=Ce.clone(i._vertexFormat,ga.vertexFormat),ga.stRotation=i._stRotation,ga.shadowVolume=i._shadowVolume,c(n)?(ga.semiMajorAxis=i._semiMajorAxis,ga.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new cl(ga),n):(ga.radius=i._semiMajorAxis,new i_(ga))};i_.createGeometry=function(e){return cl.createGeometry(e._ellipseGeometry)};i_.createShadowVolume=function(e,t,n){let i=e._ellipseGeometry._granularity,o=e._ellipseGeometry._ellipsoid,r=t(i,o),s=n(i,o);return new i_({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:o,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Ce.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(i_.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var Qbe=i_;function Fw(e){e=g(e,g.EMPTY_OBJECT);let t=e.radius;C.typeOf.number("radius",t);let n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new pf(n),this._workerName="createCircleOutlineGeometry"}Fw.packedLength=pf.packedLength;Fw.pack=function(e,t,n){return C.typeOf.object("value",e),pf.pack(e._ellipseGeometry,t,n)};var yyt=new pf({center:new d,semiMajorAxis:1,semiMinorAxis:1}),gu={center:new d,radius:void 0,ellipsoid:Z.clone(Z.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};Fw.unpack=function(e,t,n){let i=pf.unpack(e,t,yyt);return gu.center=d.clone(i._center,gu.center),gu.ellipsoid=Z.clone(i._ellipsoid,gu.ellipsoid),gu.height=i._height,gu.extrudedHeight=i._extrudedHeight,gu.granularity=i._granularity,gu.numberOfVerticalLines=i._numberOfVerticalLines,c(n)?(gu.semiMajorAxis=i._semiMajorAxis,gu.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new pf(gu),n):(gu.radius=i._semiMajorAxis,new Fw(gu))};Fw.createGeometry=function(e){return pf.createGeometry(e._ellipseGeometry)};var e0e=Fw;function Bw(e){e=g(e,g.EMPTY_OBJECT),C.defined("options.callback",e.callback),C.defined("options.width",e.width),C.defined("options.height",e.height),this._callback=e.callback,this._tilingScheme=e.tilingScheme,c(this._tilingScheme)||(this._tilingScheme=new Hi({ellipsoid:g(e.ellipsoid,Z.default)})),this._width=e.width,this._height=e.height;let t=Math.max(this._width,this._height);this._levelZeroMaximumGeometricError=Jr.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,t,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new fe;let n=e.credit;typeof n=="string"&&(n=new St(n)),this._credit=n}Object.defineProperties(Bw.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});Bw.prototype.requestTileGeometry=function(e,t,n,i){let o=this._callback(e,t,n);if(!c(o))return;let r=this._width,s=this._height;return Promise.resolve(o).then(function(a){let l=a;return Array.isArray(l)&&(l=new Float64Array(l)),new Wa({buffer:l,width:r,height:s})})};Bw.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};Bw.prototype.getTileDataAvailable=function(e,t,n){};Bw.prototype.loadTileDataAvailability=function(e,t,n){};var t0e=Bw;function n0e(e){this.proxy=e}n0e.prototype.getURL=function(e){let t=this.proxy.indexOf("?")===-1?"?":"";return this.proxy+t+encodeURIComponent(e)};var i0e=n0e;var byt={SEARCH:0,AUTOCOMPLETE:1},t4=Object.freeze(byt);function n4(){w.throwInstantiationError()}Object.defineProperties(n4.prototype,{credit:{get:w.throwInstantiationError}});n4.getCreditsFromResult=function(e){if(c(e.attributions))return e.attributions.map(St.getIonCredit)};n4.prototype.geocode=w.throwInstantiationError;var o0e=n4;function r0e(){w.throwInstantiationError()}r0e.createGeometry=function(e){w.throwInstantiationError()};var s0e=r0e;var Syt=Mr(Q7(),1);function xyt(e,t){return(e&t)!==0}var Fc=xyt;var Tyt=[1,2,4,8],a0e=15,Cyt=16,Eyt=64,wyt=128;function gm(e,t,n,i,o,r){this._bits=e,this.cnodeVersion=t,this.imageryVersion=n,this.terrainVersion=i,this.imageryProvider=o,this.terrainProvider=r,this.ancestorHasTerrain=!1,this.terrainState=void 0}gm.clone=function(e,t){return c(t)?(t._bits=e._bits,t.cnodeVersion=e.cnodeVersion,t.imageryVersion=e.imageryVersion,t.terrainVersion=e.terrainVersion,t.imageryProvider=e.imageryProvider,t.terrainProvider=e.terrainProvider):t=new gm(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t};gm.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()};gm.prototype.hasSubtree=function(){return Fc(this._bits,Cyt)};gm.prototype.hasImagery=function(){return Fc(this._bits,Eyt)};gm.prototype.hasTerrain=function(){return Fc(this._bits,wyt)};gm.prototype.hasChildren=function(){return Fc(this._bits,a0e)};gm.prototype.hasChild=function(e){return Fc(this._bits,Tyt[e])};gm.prototype.getChildBitmask=function(){return this._bits&a0e};var i4=gm;function Ayt(e){let t=e.length,n=new ArrayBuffer(t),i=new Uint8Array(n);for(let o=0;o<t;++o)i[o]=e.charCodeAt(o);return n}var vyt=Ayt(`E\xF4\xBD\vy\xE2jE"\x92,\xCDq\xF8IFgQ\0B%\xC6\xE8a,f)\b\xC64\xDCjb%y
| wmi\xD6\xF0\x9Ck\x93\xA1\xBDNu\xE0A[\xDF@V\f\xD9\xBBr\x9B\x81|3S\xEEOl\xD4q\xB0{\xC0\x7FEVZ\xADwUe\v3\x92*\xACl5\xC50s\xF83>mF8J\xB4\xDD\xF0.\xDDu\xDA\x8CDt"\xFAa"\f3"So\xAF9D\v\x8C9\xD99L\xB9\xBF\x7F\xAB\\\x8CP_\x9F"ux\xE9\x07q\x91h;\xC1\xC4\x9B\x7F\xF0<VqH\x82'UfYNe\x98u\xA3aF}a?A\0\x9F\xD7\xB44M\xCE\x87F\xB0\xD5\xB8\x8A'{\x8B\xDC+\xBBMg0\xC8\xD1\xF6\\\x8FP\xFA[/F\x9Bn5/'C.\xEB
| \f^\xA5s\x1Be4\xE5l.jC'c#U\xA9?q{gC}:\xAF\xCD\xE2TU\x9C\xFDK\xC6\xE2\x9F/(\xED\xCB\\\xC6-f\x07\x88\xA7;/*"N\xB0k.\xDD\r\x95}}G\xBAC\xB2\xB2+>M\xAA>}\xE6\xCEI\x89\xC6\xE6x\fa1-\xA4O\xA5~q \x88\xEC\r1\xE8N\v\0nPh}=\b\r\x95\xA6n\xA3h\x97$[k\xF3#\xF3\xB6s\xB3\r\v@\xC0\x9F\xD8Q]\xFA".j\xDFI\0\xB9\xA0wU\xC6\xEFj\xBF{GL\x7F\x83\xEE\xDC\xDCF\x85\xA9\xADS\x07+S4\x07\xFF\x94Y\xE48\xE81\x83N\xB9XFk\xCB-#\x86\x92p\x005\x88"\xCF1\xB2&/\xE7\xC3u-6,rt\xB0#G\xB7\xD3\xD1&\x857r\xE2\0\x8CD\xCF\xDA3-\xDE\`\x86i#i*|\xCDKQ\r\x95T9w.)\xEA\x1B\xA6P\xA2j\x8FoP\x99\\>T\xFB\xEFP[\v\x07E\x89m(w7\xDB\x8EJfJo\x99 \xE5p\xE2\xB9q~\fmI-z\xFEr\xC7\xF2Y0\x8F\xBB]s\xE5\xC9 \xEAx\xEC \x90\xF0\x8A\x7FB|G\`\xB0\xBD&\xB7q\xB6\xC7\x9F\xD13\x82=\xD3\xAB\xEEc\x99\xC8+S\xA0D\\q\xC6\xCCD2O<\xCA\xC0)=R\xD3aX\xA9}e\xB4\xDC\xCF\r\xF4=\xF1\b\xA9B\xDA# \xD8\xBF^PI\xF8M\xC0\xCBGLO\xF7{+\xD8\xC51\x92;\xB5o\xDCl\r\x92\x88\xD1\x9E\xDB?\xE2\xE9\xDA_\xD4\x84\xE2FaZ\xDEU\xCF\xA4\0\xBE\xFD\xCEg\xF1Ji\x97\xE6 H\xD8]\x7F~\xAEq N\xAE\xC0V\xA9\x91<\x82r\xE7v\xEC)I\xD6]-\x83\xE3\xDB6\xA9;f\x97\x87j\xD5\xB6=P^R\xB9K\xC7sWx\xC9\xF4.Y\x07\x95\x93o\xD0KW>''\xC7\`\xDB;\xED\x9ASD>?\x8D\x92mw\xA2
| \xEB?R\xA8\xC6U^1I7\x85\xF4\xC5&-\xA9\xBF\x8B'T\xDA\xC3j \xE5*x\xB0\xD6\x90pr\xAA\x8Bh\xBD\x88\xF7_H\xB1~\xC0XL?f\xF9>\xE1e\xC0p\xA7\xCF8i\xAF\xF0VldI\x9C'\xADxtO\xC2\x87\xDEV9\0\xDAw\v\xCB-\x1B\x89\xFB5O\xF5\bQ\`\xC1
| ZGM&30x\xDA\xC0\x9CFG\xE2[y\`In7gS
| >\xE9\xECF9\xB2\xF14\r\xC6\x84Sun\xE1\fY\xD9\xDE)\x85{II\xA5wy\xBEIV.6\xE7\v:\xBBOb{\xD2M1\x95/\xBD8{\xA8O!\xE1\xECFpv\x95})"x\x88
| \x90\xDD\x9D\\\xDA\xDEQ\xCF\xF0\xFCYRe|3\xDF\xF3H\xDA\xBB*u\xDB\`\xB2\xD4\xFC\xED\x1B\xEC\x7F5\xA8\xFF(1\x07-\xC8\xDC\x88F|\x8A["`);function yu(e){this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=O.EPSILON12,this.providers={},this.key=void 0,this._resource=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={}}Object.defineProperties(yu.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}}});yu.fromUrl=async function(e){C.defined("resourceOrUrl",e);let t=e;typeof t!="string"&&!(t instanceof Te)&&(C.typeOf.string("resourceOrUrl.url",e.url),t=e.url);let n=Te.createIfNeeded(t);n.appendForwardSlash();let i=new yu;i._resource=n;try{await Dyt(i),await i.getQuadTreePacket("",i._quadPacketVersion)}catch(o){let r=`An error occurred while accessing ${l0e(i,"",1).url}: ${o}`;throw new ie(r)}return i};yu.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){let r=1<<o,s=0;Fc(t,r)?Fc(e,r)&&(s|=1):(s|=2,Fc(e,r)||(s|=1)),i+=s}return i};yu.quadKeyToTileXY=function(e){let t=0,n=0,i=e.length-1;for(let o=i;o>=0;--o){let r=1<<o,s=+e[i-o];Fc(s,2)?Fc(s,1)||(t|=r):(n|=r,Fc(s,1)&&(t|=r))}return{x:t,y:n,level:i}};yu.prototype.isValid=function(e){let t=this.getTileInformationFromQuadKey(e);if(c(t))return t!==null;let n=!0,i=e,o;for(;i.length>1;)if(o=i.substring(i.length-1),i=i.substring(0,i.length-1),t=this.getTileInformationFromQuadKey(i),c(t)){!t.hasSubtree()&&!t.hasChild(parseInt(o))&&(n=!1);break}else if(t===null){n=!1;break}return n};var c0e=new hi("decodeGoogleEarthEnterprisePacket");yu.prototype.getQuadTreePacket=function(e,t,n){t=g(t,1),e=g(e,"");let o=l0e(this,e,t,n).fetchArrayBuffer();if(!c(o))return;let r=this._tileInfo,s=this.key;return o.then(function(a){return c0e.scheduleTask({buffer:a,quadKey:e,type:"Metadata",key:s},[a]).then(function(u){let f,h=-1;if(e!==""){h=e.length+1;let _=u[e];f=r[e],f._bits|=_._bits,delete u[e]}let m=Object.keys(u);m.sort(function(_,b){return _.length-b.length});let p=m.length;for(let _=0;_<p;++_){let b=m[_];if(u[b]!==null){let T=i4.clone(u[b]),E=b.length;if(E===h)T.setParent(f);else if(E>1){let S=r[b.substring(0,b.length-1)];T.setParent(S)}r[b]=T}else r[b]=null}})})};yu.prototype.populateSubtree=function(e,t,n,i){let o=yu.tileXYToQuadKey(e,t,n);return nX(this,o,i)};function nX(e,t,n){let i=e._tileInfo,o=t,r=i[o];if(c(r)&&(!r.hasSubtree()||r.hasChildren()))return r;for(;r===void 0&&o.length>1;)o=o.substring(0,o.length-1),r=i[o];let s,a=e._subtreePromises,l=a[o];if(c(l))return l.then(function(){return s=new Ko({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),nX(e,t,s)});if(!c(r)||!r.hasSubtree())return Promise.reject(new ie(`Couldn't load metadata for tile ${t}`));if(l=e.getQuadTreePacket(o,r.cnodeVersion,n),!!c(l))return a[o]=l,l.then(function(){return s=new Ko({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),nX(e,t,s)}).finally(function(){delete a[o]})}yu.prototype.getTileInformation=function(e,t,n){let i=yu.tileXYToQuadKey(e,t,n);return this._tileInfo[i]};yu.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]};function l0e(e,t,n,i){return e._resource.getDerivedResource({url:`flatfile?q2-0${t}-q.${n.toString()}`,request:i})}var eX,tX;function Dyt(e){let t=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!c(tX)){let n=Mi("ThirdParty/google-earth-dbroot-parser.js"),i=window.cesiumGoogleEarthDbRootParser;tX=Dx(n).then(function(){eX=window.cesiumGoogleEarthDbRootParser(Syt),c(i)?window.cesiumGoogleEarthDbRootParser=i:delete window.cesiumGoogleEarthDbRootParser})}return tX.then(function(){return t.fetchArrayBuffer()}).then(function(n){let i=eX.EncryptedDbRootProto.decode(new Uint8Array(n)),o=i.encryptionData,r=o.byteOffset,s=r+o.byteLength,a=e.key=o.buffer.slice(r,s);o=i.dbrootData,r=o.byteOffset,s=r+o.byteLength;let l=o.buffer.slice(r,s);return c0e.scheduleTask({buffer:l,type:"DbRoot",key:a},[l])}).then(function(n){let i=eX.DbRootProto.decode(new Uint8Array(n.buffer));if(e.imageryPresent=g(i.imageryPresent,e.imageryPresent),e.protoImagery=i.protoImagery,e.terrainPresent=g(i.terrainPresent,e.terrainPresent),c(i.endSnippet)&&c(i.endSnippet.model)){let a=i.endSnippet.model;e.negativeAltitudeExponentBias=g(a.negativeAltitudeExponentBias,e.negativeAltitudeExponentBias),e.negativeAltitudeThreshold=g(a.compressedNegativeAltitudeThreshold,e.negativeAltitudeThreshold)}c(i.databaseVersion)&&(e._quadPacketVersion=g(i.databaseVersion.quadtreeVersion,e._quadPacketVersion));let o=e.providers,r=g(i.providerInfo,[]),s=r.length;for(let a=0;a<s;++a){let l=r[a],u=l.copyrightString;c(u)&&(o[l.providerId]=new St(u.value))}}).catch(function(){console.log(`Failed to retrieve ${t.url}. Using defaults.`),e.key=vyt})}var My=yu;function ix(e){e=g(e,g.EMPTY_OBJECT),C.typeOf.object("options.buffer",e.buffer),C.typeOf.number("options.negativeAltitudeExponentBias",e.negativeAltitudeExponentBias),C.typeOf.number("options.negativeElevationThreshold",e.negativeElevationThreshold),this._buffer=e.buffer,this._credits=e.credits,this._negativeAltitudeExponentBias=e.negativeAltitudeExponentBias,this._negativeElevationThreshold=e.negativeElevationThreshold;let t=g(e.childTileMask,15),n=t&3;n|=t&4?8:0,n|=t&8?4:0,this._childTileMask=n,this._createdByUpsampling=g(e.createdByUpsampling,!1),this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}Object.defineProperties(ix.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var d0e="createVerticesFromGoogleEarthEnterpriseBuffer",Iyt=new hi(d0e),Oyt=new hi(d0e,om.maximumAsynchronousTasks),u0e=new te,iX=new te;ix.prototype.createMesh=function(e){e=g(e,g.EMPTY_OBJECT),C.typeOf.object("options.tilingScheme",e.tilingScheme),C.typeOf.number("options.x",e.x),C.typeOf.number("options.y",e.y),C.typeOf.number("options.level",e.level);let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=g(e.exaggeration,1),s=g(e.exaggerationRelativeHeight,0),a=g(e.throttle,!0),l=t.ellipsoid;t.tileXYToNativeRectangle(n,i,o,u0e),t.tileXYToRectangle(n,i,o,iX);let u=l.cartographicToCartesian(te.center(iX)),h=40075.16/(1<<o);this._skirtHeight=Math.min(h*8,1e3);let p=(a?Oyt:Iyt).scheduleTask({buffer:this._buffer,nativeRectangle:u0e,rectangle:iX,relativeToCenter:u,ellipsoid:l,skirtHeight:this._skirtHeight,exaggeration:r,exaggerationRelativeHeight:s,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(!c(p))return;let _=this;return p.then(function(b){return _._mesh=new Od(u,new Float32Array(b.vertices),new Uint16Array(b.indices),b.indexCountWithoutSkirts,b.vertexCountWithoutSkirts,b.minimumHeight,b.maximumHeight,ne.clone(b.boundingSphere3D),d.clone(b.occludeePointInScaledSpace),b.numberOfAttributes,wn.clone(b.orientedBoundingBox),Ic.clone(b.encoding),b.westIndicesSouthToNorth,b.southIndicesEastToWest,b.eastIndicesNorthToSouth,b.northIndicesWestToEast),_._minimumHeight=b.minimumHeight,_._maximumHeight=b.maximumHeight,_._buffer=void 0,_._mesh})};ix.prototype.interpolateHeight=function(e,t,n){let i=O.clamp((t-e.west)/e.width,0,1),o=O.clamp((n-e.south)/e.height,0,1);return c(this._mesh)?Nyt(this,i,o):kyt(this,i,o,e)};var Pyt=new hi("upsampleQuantizedTerrainMesh",om.maximumAsynchronousTasks);ix.prototype.upsample=function(e,t,n,i,o,r,s){if(C.typeOf.object("tilingScheme",e),C.typeOf.number("thisX",t),C.typeOf.number("thisY",n),C.typeOf.number("thisLevel",i),C.typeOf.number("descendantX",o),C.typeOf.number("descendantY",r),C.typeOf.number("descendantLevel",s),s-i>1)throw new w("Upsampling through more than one level at a time is not currently supported.");let l=this._mesh;if(!c(this._mesh))return;let u=t*2!==o,f=n*2===r,h=e.ellipsoid,m=e.tileXYToRectangle(o,r,s),p=Pyt.scheduleTask({vertices:l.vertices,indices:l.indices,indexCountWithoutSkirts:l.indexCountWithoutSkirts,vertexCountWithoutSkirts:l.vertexCountWithoutSkirts,encoding:l.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:u,isNorthChild:f,childRectangle:m,ellipsoid:h});if(!c(p))return;let _=this;return p.then(function(b){let x=new Uint16Array(b.vertices),T=Oe.createTypedArray(x.length/3,b.indices),E=_._skirtHeight;return new Lw({quantizedVertices:x,indices:T,minimumHeight:b.minimumHeight,maximumHeight:b.maximumHeight,boundingSphere:ne.clone(b.boundingSphere),orientedBoundingBox:wn.clone(b.orientedBoundingBox),horizonOcclusionPoint:d.clone(b.horizonOcclusionPoint),westIndices:b.westIndices,southIndices:b.southIndices,eastIndices:b.eastIndices,northIndices:b.northIndices,westSkirtHeight:E,southSkirtHeight:E,eastSkirtHeight:E,northSkirtHeight:E,childTileMask:0,createdByUpsampling:!0,credits:_._credits})})};ix.prototype.isChildAvailable=function(e,t,n,i){C.typeOf.number("thisX",e),C.typeOf.number("thisY",t),C.typeOf.number("childX",n),C.typeOf.number("childY",i);let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};ix.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var Ryt=new k,Myt=new k,Lyt=new k,h0e=new d;function Nyt(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,l=s.length;a<l;a+=3){let u=s[a],f=s[a+1],h=s[a+2],m=r.decodeTextureCoordinates(o,u,Ryt),p=r.decodeTextureCoordinates(o,f,Myt),_=r.decodeTextureCoordinates(o,h,Lyt),b=Py.computeBarycentricCoordinates(t,n,m.x,m.y,p.x,p.y,_.x,_.y,h0e);if(b.x>=-1e-15&&b.y>=-1e-15&&b.z>=-1e-15){let x=r.decodeHeight(o,u),T=r.decodeHeight(o,f),E=r.decodeHeight(o,h);return b.x*x+b.y*T+b.z*E}}}var Fyt=Uint16Array.BYTES_PER_ELEMENT,f0e=Uint32Array.BYTES_PER_ELEMENT,oX=Int32Array.BYTES_PER_ELEMENT,Byt=Float32Array.BYTES_PER_ELEMENT,rX=Float64Array.BYTES_PER_ELEMENT;function kyt(e,t,n,i){let o=e._buffer,r=0,s=0,a=0;n>.5?(t>.5?(r=2,s=.5):r=3,a=.5):t>.5&&(r=1,s=.5);let l=new DataView(o),u=0;for(let v=0;v<r;++v)u+=l.getUint32(u,!0),u+=f0e;u+=f0e,u+=2*rX;let f=O.toRadians(l.getFloat64(u,!0)*180);u+=rX;let h=O.toRadians(l.getFloat64(u,!0)*180);u+=rX;let m=i.width/f/2,p=i.height/h/2,_=l.getInt32(u,!0);u+=oX;let b=l.getInt32(u,!0)*3;u+=oX,u+=oX;let x=new Array(_),T=new Array(_),E=new Array(_),S;for(S=0;S<_;++S)x[S]=s+l.getUint8(u++)*m,T[S]=a+l.getUint8(u++)*p,E[S]=l.getFloat32(u,!0)*6371010,u+=Byt;let A=new Array(b);for(S=0;S<b;++S)A[S]=l.getUint16(u,!0),u+=Fyt;for(S=0;S<b;S+=3){let v=A[S],D=A[S+1],R=A[S+2],P=x[v],L=x[D],F=x[R],y=T[v],I=T[D],M=T[R],B=Py.computeBarycentricCoordinates(t,n,P,y,L,I,F,M,h0e);if(B.x>=-1e-15&&B.y>=-1e-15&&B.z>=-1e-15)return B.x*E[v]+B.y*E[D]+B.z*E[R]}}var FI=ix;var Of={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},o4=new K;function r4(){this._terrainCache={},this._lastTidy=K.now()}r4.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:K.now()}};r4.prototype.get=function(e){let n=this._terrainCache[e];if(c(n))return delete this._terrainCache[e],n.buffer};r4.prototype.tidy=function(){if(K.now(o4),K.secondsDifference(o4,this._lastTidy)>10){let e=this._terrainCache,t=Object.keys(e),n=t.length;for(let i=0;i<n;++i){let o=t[i],r=e[o];K.secondsDifference(o4,r.timestamp)>10&&delete e[o]}K.clone(o4,this._lastTidy)}};function Ly(e){e=g(e,g.EMPTY_OBJECT),this._tilingScheme=new Hi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new te(-O.PI,-O.PI,O.PI,O.PI),ellipsoid:e.ellipsoid});let t=e.credit;typeof t=="string"&&(t=new St(t)),this._credit=t,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new r4,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new fe}Object.defineProperties(Ly.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});Ly.fromMetadata=function(e,t){if(C.defined("metadata",e),!e.terrainPresent)throw new ie(`The server ${e.url} doesn't have terrain`);let n=new Ly(t);return n._metadata=e,n};var Uyt=new hi("decodeGoogleEarthEnterprisePacket");function m0e(e,t,n){let i=t.getChildBitmask();if(t.terrainState===Of.PARENT){i=0;for(let o=0;o<4;++o){let r=n.getTileInformationFromQuadKey(e+o.toString());c(r)&&r.hasTerrain()&&(i|=1<<o)}}return i}Ly.prototype.requestTileGeometry=function(e,t,n,i){let o=My.tileXYToQuadKey(e,t,n),r=this._terrainCache,s=this._metadata,a=s.getTileInformationFromQuadKey(o);if(!c(a))return Promise.reject(new ie("Terrain tile doesn't exist"));let l=a.terrainState;c(l)||(l=a.terrainState=Of.UNKNOWN);let u=r.get(o);if(c(u)){let T=s.providers[a.terrainProvider];return Promise.resolve(new FI({buffer:u,childTileMask:m0e(o,a,s),credits:c(T)?[T]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold}))}if(r.tidy(),a.ancestorHasTerrain){if(l===Of.NONE)return Promise.reject(new ie("Terrain tile doesn't exist"))}else return Promise.resolve(new Wa({buffer:new Uint8Array(16*16),width:16,height:16}));let f,h=o,m=-1;switch(l){case Of.SELF:m=a.terrainVersion;break;case Of.PARENT:h=h.substring(0,h.length-1),f=s.getTileInformationFromQuadKey(h),m=f.terrainVersion;break;case Of.UNKNOWN:a.hasTerrain()?m=a.terrainVersion:(h=h.substring(0,h.length-1),f=s.getTileInformationFromQuadKey(h),c(f)&&f.hasTerrain()&&(m=f.terrainVersion));break}if(m<0)return Promise.reject(new ie("Terrain tile doesn't exist"));let p=this._terrainPromises,_=this._terrainRequests,b,x;if(c(p[h]))b=p[h],x=_[h];else{x=i;let T=zyt(this,h,m,x).fetchArrayBuffer();if(!c(T))return;b=T.then(function(E){return c(E)?Uyt.scheduleTask({buffer:E,type:"Terrain",key:s.key},[E]).then(function(S){let A=s.getTileInformationFromQuadKey(h);A.terrainState=Of.SELF,r.add(h,S[0]);let v=A.terrainProvider,D=S.length-1;for(let R=0;R<D;++R){let P=h+R.toString(),L=s.getTileInformationFromQuadKey(P);c(L)&&(r.add(P,S[R+1]),L.terrainState=Of.PARENT,L.terrainProvider===0&&(L.terrainProvider=v))}}):Promise.reject(new ie("Failed to load terrain."))}),p[h]=b,_[h]=x,b=b.finally(function(){delete p[h],delete _[h]})}return b.then(function(){let T=r.get(o);if(c(T)){let E=s.providers[a.terrainProvider];return new FI({buffer:T,childTileMask:m0e(o,a,s),credits:c(E)?[E]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold})}return Promise.reject(new ie("Failed to load terrain."))}).catch(function(T){return x.state===qn.CANCELLED?(i.state=x.state,Promise.reject(T)):(a.terrainState=Of.NONE,Promise.reject(T))})};Ly.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};Ly.prototype.getTileDataAvailable=function(e,t,n){let i=this._metadata,o=My.tileXYToQuadKey(e,t,n),r=i.getTileInformation(e,t,n);if(r===null)return!1;if(c(r)){if(!r.ancestorHasTerrain)return!0;let s=r.terrainState;if(s===Of.NONE)return!1;if((!c(s)||s===Of.UNKNOWN)&&(r.terrainState=Of.UNKNOWN,!r.hasTerrain())){o=o.substring(0,o.length-1);let a=i.getTileInformationFromQuadKey(o);if(!c(a)||!a.hasTerrain())return!1}return!0}if(i.isValid(o)){let s=new Ko({throttle:!1,throttleByServer:!0,type:is.TERRAIN});i.populateSubtree(e,t,n,s)}return!1};Ly.prototype.loadTileDataAvailability=function(e,t,n){};function zyt(e,t,n,i){return n=c(n)&&n>0?n:1,e._metadata.resource.getDerivedResource({url:`flatfile?f1c-0${t}-t.${n.toString()}`,request:i})}var p0e=Ly;var s4={};s4.defaultApiKey=void 0;s4.mapTilesApiEndpoint=new Te({url:"https://tile.googleapis.com/v1/"});s4.getDefaultCredit=function(){return new St('<img src="https://assets.ion.cesium.com/google-credit.png" style="vertical-align: -5px" alt="Google">',!0)};var kw=s4;var BI={};BI.type=void 0;BI.getRequiredDataPoints=w.throwInstantiationError;BI.interpolateOrderZero=w.throwInstantiationError;BI.interpolate=w.throwInstantiationError;var _0e=BI;function sX(e){C.defined("url",e),this._url=Te.createIfNeeded(e),this._url.appendForwardSlash()}Object.defineProperties(sX.prototype,{url:{get:function(){return this._url}},credit:{get:function(){}}});sX.prototype.geocode=async function(e,t){return C.typeOf.string("query",e),this._url.getDerivedResource({url:t===t4.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:e}}).fetchJson().then(function(i){return i.features.map(function(o){let r,s=o.bbox;if(c(s))r=te.fromDegrees(s[0],s[1],s[2],s[3]);else{let a=o.geometry.coordinates[0],l=o.geometry.coordinates[1];r=d.fromDegrees(a,l)}return{displayName:o.properties.label,destination:r,attributions:i.attributions}})})};var a4=sX;function aX(e){e=g(e,g.EMPTY_OBJECT),C.typeOf.object("options.scene",e.scene);let t=g(e.accessToken,mh.defaultAccessToken),n=Te.createIfNeeded(g(e.server,mh.defaultServer));n.appendForwardSlash();let i=mh.getDefaultTokenCredit(t);c(i)&&e.scene.frameState.creditDisplay.addStaticCredit(St.clone(i));let o=n.getDerivedResource({url:"v1/geocode"});c(t)&&o.appendQueryParameters({access_token:t}),this._accessToken=t,this._server=n,this._pelias=new a4(o)}Object.defineProperties(aX.prototype,{credit:{get:function(){}}});aX.prototype.geocode=async function(e,t){return this._pelias.geocode(e,t)};var g0e=aX;function c4(){w.throwInstantiationError()}Object.defineProperties(c4.prototype,{ellipsoid:{get:w.throwInstantiationError}});c4.prototype.project=w.throwInstantiationError;c4.prototype.unproject=w.throwInstantiationError;var y0e=c4;function Uw(e){e=g(e,g.EMPTY_OBJECT);let t=e.weights,n=e.times;if(C.defined("weights",t),C.defined("times",n),C.typeOf.number.greaterThanOrEquals("weights.length",t.length,3),t.length%n.length!==0)throw new w("times.length must be a factor of weights.length.");this._times=n,this._weights=t,this._count=t.length/n.length,this._lastTimeIndex=0}Object.defineProperties(Uw.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}});Uw.prototype.findTimeInterval=Ai.prototype.findTimeInterval;Uw.prototype.wrapTime=Ai.prototype.wrapTime;Uw.prototype.clampTime=Ai.prototype.clampTime;Uw.prototype.evaluate=function(e,t){let n=this.weights,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);c(t)||(t=new Array(this._count));for(let s=0;s<this._count;s++){let a=o*this._count+s;t[s]=n[a]*(1-r)+n[a+this._count]*r}return t};var b0e=Uw;function cX(e,t,n){C.defined("url",e),C.defined("apiKey",t),c(n)&&C.typeOf.object("params",n),e=Te.createIfNeeded(e),e.appendForwardSlash(),e.setQueryParameters({key:t}),this._url=e,this._params=g(n,{}),this._credit=new St('Geodata copyright <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',!1)}Object.defineProperties(cX.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}},credit:{get:function(){return this._credit}}});cX.prototype.geocode=async function(e){return C.typeOf.string("query",e),this._url.getDerivedResource({url:"json",queryParameters:bt(this._params,{q:e})}).fetchJson().then(function(n){return n.results.map(function(i){let o,r=i.bounds;if(c(r))o=te.fromDegrees(r.southwest.lng,r.southwest.lat,r.northeast.lng,r.northeast.lat);else{let s=i.geometry.lat,a=i.geometry.lng;o=d.fromDegrees(s,a)}return{displayName:i.formatted,destination:o}})})};var x0e=cX;var Vyt={packedLength:void 0,pack:w.throwInstantiationError,unpack:w.throwInstantiationError},T0e=Vyt;var Hyt={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:w.throwInstantiationError,unpackInterpolationResult:w.throwInstantiationError},C0e=Hyt;function E0e(){w.throwInstantiationError()}E0e.prototype.getURL=w.throwInstantiationError;var w0e=E0e;function Gyt(e,t,n,i,o,r,s){let a=Di.numberOfPoints(e,t,o),l,u=n.red,f=n.green,h=n.blue,m=n.alpha,p=i.red,_=i.green,b=i.blue,x=i.alpha;if(z.equals(n,i)){for(l=0;l<a;l++)r[s++]=z.floatToByte(u),r[s++]=z.floatToByte(f),r[s++]=z.floatToByte(h),r[s++]=z.floatToByte(m);return s}let T=(p-u)/a,E=(_-f)/a,S=(b-h)/a,A=(x-m)/a,v=s;for(l=0;l<a;l++)r[v++]=z.floatToByte(u+l*T),r[v++]=z.floatToByte(f+l*E),r[v++]=z.floatToByte(h+l*S),r[v++]=z.floatToByte(m+l*A);return v}function kI(e){e=g(e,g.EMPTY_OBJECT);let t=e.positions,n=e.colors,i=g(e.colorsPerVertex,!1);if(!c(t)||t.length<2)throw new w("At least two positions are required.");if(c(n)&&(i&&n.length<t.length||!i&&n.length<t.length-1))throw new w("colors has an invalid length.");this._positions=t,this._colors=n,this._colorsPerVertex=i,this._arcType=g(e.arcType,jt.GEODESIC),this._granularity=g(e.granularity,O.RADIANS_PER_DEGREE),this._ellipsoid=g(e.ellipsoid,Z.default),this._workerName="createSimplePolylineGeometry";let o=1+t.length*d.packedLength;o+=c(n)?1+n.length*z.packedLength:1,this.packedLength=o+Z.packedLength+3}kI.pack=function(e,t,n){if(!c(e))throw new w("value is required");if(!c(t))throw new w("array is required");n=g(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=d.packedLength)d.pack(o[i],t,n);let s=e._colors;for(r=c(s)?s.length:0,t[n++]=r,i=0;i<r;++i,n+=z.packedLength)z.pack(s[i],t,n);return Z.pack(e._ellipsoid,t,n),n+=Z.packedLength,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};kI.unpack=function(e,t,n){if(!c(e))throw new w("array is required");t=g(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=d.packedLength)r[i]=d.unpack(e,t);o=e[t++];let s=o>0?new Array(o):void 0;for(i=0;i<o;++i,t+=z.packedLength)s[i]=z.unpack(e,t);let a=Z.unpack(e,t);t+=Z.packedLength;let l=e[t++]===1,u=e[t++],f=e[t];return c(n)?(n._positions=r,n._colors=s,n._ellipsoid=a,n._colorsPerVertex=l,n._arcType=u,n._granularity=f,n):new kI({positions:r,colors:s,ellipsoid:a,colorsPerVertex:l,arcType:u,granularity:f})};var l4=new Array(2),u4=new Array(2),jyt={positions:l4,height:u4,ellipsoid:void 0,minDistance:void 0,granularity:void 0};kI.createGeometry=function(e){let t=e._positions,n=e._colors,i=e._colorsPerVertex,o=e._arcType,r=e._granularity,s=e._ellipsoid,a=O.chordLength(r,s.maximumRadius),l=c(n)&&!i,u,f=t.length,h,m,p,_,b=0;if(o===jt.GEODESIC||o===jt.RHUMB){let A,v,D;o===jt.GEODESIC?(A=O.chordLength(r,s.maximumRadius),v=Di.numberOfPoints,D=Di.generateArc):(A=r,v=Di.numberOfPointsRhumbLine,D=Di.generateRhumbArc);let R=Di.extractHeights(t,s),P=jyt;if(o===jt.GEODESIC?P.minDistance=a:P.granularity=r,P.ellipsoid=s,l){let L=0;for(u=0;u<f-1;u++)L+=v(t[u],t[u+1],A)+1;h=new Float64Array(L*3),p=new Uint8Array(L*4),P.positions=l4,P.height=u4;let F=0;for(u=0;u<f-1;++u){l4[0]=t[u],l4[1]=t[u+1],u4[0]=R[u],u4[1]=R[u+1];let y=D(P);if(c(n)){let I=y.length/3;_=n[u];for(let M=0;M<I;++M)p[F++]=z.floatToByte(_.red),p[F++]=z.floatToByte(_.green),p[F++]=z.floatToByte(_.blue),p[F++]=z.floatToByte(_.alpha)}h.set(y,b),b+=y.length}}else if(P.positions=t,P.height=R,h=new Float64Array(D(P)),c(n)){for(p=new Uint8Array(h.length/3*4),u=0;u<f-1;++u){let F=t[u],y=t[u+1],I=n[u],M=n[u+1];b=Gyt(F,y,I,M,a,p,b)}let L=n[f-1];p[b++]=z.floatToByte(L.red),p[b++]=z.floatToByte(L.green),p[b++]=z.floatToByte(L.blue),p[b++]=z.floatToByte(L.alpha)}}else{m=l?f*2-2:f,h=new Float64Array(m*3),p=c(n)?new Uint8Array(m*4):void 0;let A=0,v=0;for(u=0;u<f;++u){let D=t[u];if(l&&u>0&&(d.pack(D,h,A),A+=3,_=n[u-1],p[v++]=z.floatToByte(_.red),p[v++]=z.floatToByte(_.green),p[v++]=z.floatToByte(_.blue),p[v++]=z.floatToByte(_.alpha)),l&&u===f-1)break;d.pack(D,h,A),A+=3,c(n)&&(_=n[u],p[v++]=z.floatToByte(_.red),p[v++]=z.floatToByte(_.green),p[v++]=z.floatToByte(_.blue),p[v++]=z.floatToByte(_.alpha))}}let x=new fn;x.position=new be({componentDatatype:j.DOUBLE,componentsPerAttribute:3,values:h}),c(n)&&(x.color=new be({componentDatatype:j.UNSIGNED_BYTE,componentsPerAttribute:4,values:p,normalize:!0})),m=h.length/3;let T=(m-1)*2,E=Oe.createTypedArray(m,T),S=0;for(u=0;u<m-1;++u)E[S++]=u,E[S++]=u+1;return new st({attributes:x,indices:E,primitiveType:Se.LINES,boundingSphere:ne.fromPoints(t)})};var S0e=kI;function zw(e){let t=g(e.radius,1),i={radii:new d(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new Ks(i),this._workerName="createSphereGeometry"}zw.packedLength=Ks.packedLength;zw.pack=function(e,t,n){return C.typeOf.object("value",e),Ks.pack(e._ellipsoidGeometry,t,n)};var Wyt=new Ks,Ny={radius:void 0,radii:new d,vertexFormat:new Ce,stackPartitions:void 0,slicePartitions:void 0};zw.unpack=function(e,t,n){let i=Ks.unpack(e,t,Wyt);return Ny.vertexFormat=Ce.clone(i._vertexFormat,Ny.vertexFormat),Ny.stackPartitions=i._stackPartitions,Ny.slicePartitions=i._slicePartitions,c(n)?(d.clone(i._radii,Ny.radii),n._ellipsoidGeometry=new Ks(Ny),n):(Ny.radius=i._radii.x,new zw(Ny))};zw.createGeometry=function(e){return Ks.createGeometry(e._ellipsoidGeometry)};var A0e=zw;function Fy(e){throw new w("This type should not be instantiated directly. Instead, use WebMercatorTilingScheme or GeographicTilingScheme.")}Object.defineProperties(Fy.prototype,{ellipsoid:{get:w.throwInstantiationError},rectangle:{get:w.throwInstantiationError},projection:{get:w.throwInstantiationError}});Fy.prototype.getNumberOfXTilesAtLevel=w.throwInstantiationError;Fy.prototype.getNumberOfYTilesAtLevel=w.throwInstantiationError;Fy.prototype.rectangleToNativeRectangle=w.throwInstantiationError;Fy.prototype.tileXYToNativeRectangle=w.throwInstantiationError;Fy.prototype.tileXYToRectangle=w.throwInstantiationError;Fy.prototype.positionToTileXY=w.throwInstantiationError;var v0e=Fy;function qyt(e,t){this.rectangle=e,this.maxLevel=t}function D0e(e){this.ellipsoid=g(e.ellipsoid,Z.default),this.tilingScheme=void 0,this.heightmapWidth=void 0,this.heightmapHeight=void 0,this.levelZeroMaximumGeometricError=void 0,this.rectangles=[]}D0e.prototype.build=function(e){e._tilingScheme=this.tilingScheme,e._heightmapWidth=this.heightmapWidth,e._heightmapHeight=this.heightmapHeight,e._levelZeroMaximumGeometricError=this.levelZeroMaximumGeometricError,e._rectangles=this.rectangles};function Yyt(e,t){let n=t.getElementsByTagName("SRS")[0].textContent;if(n==="EPSG:4326")e.tilingScheme=new Hi({ellipsoid:e.ellipsoid});else throw new ie(`SRS ${n} is not supported`);let i=t.getElementsByTagName("TileFormat")[0];e.heightmapWidth=parseInt(i.getAttribute("width"),10),e.heightmapHeight=parseInt(i.getAttribute("height"),10),e.levelZeroMaximumGeometricError=Jr.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.ellipsoid,Math.min(e.heightmapWidth,e.heightmapHeight),e.tilingScheme.getNumberOfXTilesAtLevel(0));let o=t.getElementsByTagName("DataExtent");for(let r=0;r<o.length;++r){let s=o[r],a=O.toRadians(parseFloat(s.getAttribute("minx"))),l=O.toRadians(parseFloat(s.getAttribute("miny"))),u=O.toRadians(parseFloat(s.getAttribute("maxx"))),f=O.toRadians(parseFloat(s.getAttribute("maxy"))),h=parseInt(s.getAttribute("maxlevel"),10);e.rectangles.push(new qyt(new te(a,l,u,f),h))}}function Xyt(e,t,n){let i=`An error occurred while accessing ${e.url}`;throw c(t)&&c(t.message)&&(i=`${i}: ${t.message}`),Eo.reportError(void 0,n,c(n)?n._errorEvent:void 0,i),new ie(i)}async function Kyt(e,t,n){try{let i=await t.fetchXML();Yyt(e,i)}catch(i){Xyt(t,i,n)}}function By(e){e=g(e,g.EMPTY_OBJECT),this._errorEvent=new fe,this._terrainDataStructure={heightScale:1/1e3,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0,lowestEncodedHeight:0,highestEncodedHeight:256*256*256-1};let t=e.credit;typeof t=="string"&&(t=new St(t)),this._credit=t,this._tilingScheme=void 0,this._rectangles=[]}Object.defineProperties(By.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});By.fromUrl=async function(e,t){C.defined("url",e),t=g(t,g.EMPTY_OBJECT);let n=new D0e(t),i=Te.createIfNeeded(e);await Kyt(n,i);let o=new By(t);return n.build(o),o._resource=i,o};By.prototype.requestTileGeometry=function(e,t,n,i){let o=this._tilingScheme.getNumberOfYTilesAtLevel(n),s=this._resource.getDerivedResource({url:`${n}/${e}/${o-t-1}.tif`,queryParameters:{cesium:!0},request:i}).fetchImage({preferImageBitmap:!0});if(!c(s))return;let a=this;return Promise.resolve(s).then(function(l){return new Wa({buffer:Yd(l),width:a._heightmapWidth,height:a._heightmapHeight,childTileMask:$yt(a,e,t,n),structure:a._terrainDataStructure})})};By.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var I0e=new te;function $yt(e,t,n,i){let o=e._tilingScheme,r=e._rectangles,s=o.tileXYToRectangle(t,n,i),a=0;for(let l=0;l<r.length&&a!==15;++l){let u=r[l];if(u.maxLevel<=i)continue;let f=u.rectangle,h=te.intersection(f,s,I0e);c(h)&&(f4(o,f,t*2,n*2,i+1)&&(a|=4),f4(o,f,t*2+1,n*2,i+1)&&(a|=8),f4(o,f,t*2,n*2+1,i+1)&&(a|=1),f4(o,f,t*2+1,n*2+1,i+1)&&(a|=2))}return a}function f4(e,t,n,i,o){let r=e.tileXYToRectangle(n,i,o);return c(te.intersection(r,t,I0e))}By.prototype.getTileDataAvailable=function(e,t,n){};By.prototype.loadTileDataAvailability=function(e,t,n){};var O0e=By;function ox(e){e=g(e,g.EMPTY_OBJECT),this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=e.clock,this.element=e.element,this.epoch=g(e.epoch,Ue.MINIMUM_VALUE),this.tolerance=g(e.tolerance,1),this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}Object.defineProperties(ox.prototype,{clock:{get:function(){return this._clock},set:function(e){let t=this._clock;t!==e&&(c(t)&&(this._clockSubscription(),this._clockSubscription=void 0),c(e)&&(this._clockSubscription=e.onTick.addEventListener(ox.prototype._onTick,this)),this._clock=e)}},element:{get:function(){return this._element},set:function(e){let t=this._element;t!==e&&(c(t)&&t.removeEventListener("seeked",this._seekFunction,!1),c(e)&&(this._seeking=!1,this._seekFunction=Zyt(this),e.addEventListener("seeked",this._seekFunction,!1)),this._element=e,this._seeking=!1,this._firstTickAfterSeek=!1)}}});ox.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,ue(this)};ox.prototype.isDestroyed=function(){return!1};ox.prototype._trySetPlaybackRate=function(e){if(this._lastPlaybackRate===e.multiplier)return;let t=this._element;try{t.playbackRate=e.multiplier}catch{t.playbackRate=0}this._lastPlaybackRate=e.multiplier};ox.prototype._onTick=function(e){let t=this._element;if(!c(t)||t.readyState<2)return;let n=t.paused,i=e.shouldAnimate;if(i===n&&(i?t.play():t.pause()),this._seeking||this._firstTickAfterSeek){this._firstTickAfterSeek=!1;return}this._trySetPlaybackRate(e);let o=e.currentTime,r=g(this.epoch,Ue.MINIMUM_VALUE),s=K.secondsDifference(o,r),a=t.duration,l,u=t.currentTime;t.loop?(s=s%a,s<0&&(s=a-s),l=s):s>a?l=a:s<0?l=0:l=s;let f=i?g(this.tolerance,1):.001;Math.abs(l-u)>f&&(this._seeking=!0,t.currentTime=l)};function Zyt(e){return function(){e._seeking=!1,e._firstTickAfterSeek=!0}}var P0e=ox;var Jyt={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033},R0e=Object.freeze(Jyt);function Qyt(e){return e=g(e,g.EMPTY_OBJECT),Nw.fromIonAssetId(2426648,{requestVertexNormals:g(e.requestVertexNormals,!1)})}var d4=Qyt;function ebt(e){return e=g(e,g.EMPTY_OBJECT),Nw.fromIonAssetId(1,{requestVertexNormals:g(e.requestVertexNormals,!1),requestWaterMask:g(e.requestWaterMask,!1),ellipsoid:Z.WGS84})}var h4=ebt;var tbt=1953029805,nbt=2917034100;function lX(e,t){if(lX.passThroughDataForTesting)return t;C.typeOf.object("key",e),C.typeOf.object("data",t);let n=e.byteLength;if(n===0||n%4!==0)throw new ie("The length of key must be greater than 0 and a multiple of 4.");let i=new DataView(t),o=i.getUint32(0,!0);if(o===tbt||o===nbt)return t;let r=new DataView(e),s=0,a=t.byteLength,l=a-a%8,u=n,f,h=8;for(;s<l;)for(h=(h+8)%24,f=h;s<l&&f<u;)i.setUint32(s,i.getUint32(s,!0)^r.getUint32(f,!0),!0),i.setUint32(s+4,i.getUint32(s+4,!0)^r.getUint32(f+4,!0),!0),s+=8,f+=24;if(s<a)for(f>=u&&(h=(h+8)%24,f=h);s<a;)i.setUint8(s,i.getUint8(s)^r.getUint8(f)),s++,f++}lX.passThroughDataForTesting=!1;var m4=lX;var ibt=new d;function obt(e,t,n,i){let o=Ux(e,t,n,i,ibt);return c(o)?o.x>0&&o.y>0&&o.z>0:!1}var M0e=obt;function rbt(e){return C.defined("value",e),e<=.04045?e*.07739938080495357:Math.pow((e+.055)*.9478672985781991,2.4)}var Vw=rbt;function sbt(e){switch(e){case Y.FLOAT:return"float";case Y.FLOAT_VEC2:return"vec2";case Y.FLOAT_VEC3:return"vec3";case Y.FLOAT_VEC4:return"vec4";case Y.FLOAT_MAT2:return"mat2";case Y.FLOAT_MAT3:return"mat3";case Y.FLOAT_MAT4:return"mat4";case Y.SAMPLER_2D:return"sampler2D";case Y.BOOL:return"bool"}}var L0e=sbt;function abt(e,t,n){if(typeof t!="function")throw new w("oldFunction is required to be a function.");if(typeof n!="function")throw new w("oldFunction is required to be a function.");return function(){n.apply(e,arguments),t.apply(e,arguments)}}var N0e=abt;var cbt=new d(1,1,1);function uX(e){e=g(e,cbt),C.defined("dimensions",e),C.typeOf.number.greaterThanOrEquals("dimensions.x",e.x,0),C.typeOf.number.greaterThanOrEquals("dimensions.y",e.y,0),C.typeOf.number.greaterThanOrEquals("dimensions.z",e.z,0),this._dimensions=d.clone(e)}Object.defineProperties(uX.prototype,{dimensions:{get:function(){return this._dimensions},set:function(e){C.defined("value",e),C.typeOf.number.greaterThanOrEquals("value.x",e.x,0),C.typeOf.number.greaterThanOrEquals("value.y",e.y,0),C.typeOf.number.greaterThanOrEquals("value.z",e.z,0),d.clone(e,this._dimensions)}}});var lbt=new d;uX.prototype.emit=function(e){let t=this._dimensions,n=d.multiplyByScalar(t,.5,lbt),i=O.randomBetween(-n.x,n.x),o=O.randomBetween(-n.y,n.y),r=O.randomBetween(-n.z,n.z);e.position=d.fromElements(i,o,r,e.position),e.velocity=d.normalize(e.position,e.velocity)};var F0e=uX;function ym(){this.featurePropertiesDirty=!1}Object.defineProperties(ym.prototype,{featuresLength:{get:function(){w.throwInstantiationError()}},pointsLength:{get:function(){w.throwInstantiationError()}},trianglesLength:{get:function(){w.throwInstantiationError()}},geometryByteLength:{get:function(){w.throwInstantiationError()}},texturesByteLength:{get:function(){w.throwInstantiationError()}},batchTableByteLength:{get:function(){w.throwInstantiationError()}},innerContents:{get:function(){w.throwInstantiationError()}},ready:{get:function(){w.throwInstantiationError()}},tileset:{get:function(){w.throwInstantiationError()}},tile:{get:function(){w.throwInstantiationError()}},url:{get:function(){w.throwInstantiationError()}},batchTable:{get:function(){w.throwInstantiationError()}},metadata:{get:function(){w.throwInstantiationError()},set:function(e){w.throwInstantiationError()}},group:{get:function(){w.throwInstantiationError()},set:function(e){w.throwInstantiationError()}}});ym.prototype.hasProperty=function(e,t){w.throwInstantiationError()};ym.prototype.getFeature=function(e){w.throwInstantiationError()};ym.prototype.applyDebugSettings=function(e,t){w.throwInstantiationError()};ym.prototype.applyStyle=function(e){w.throwInstantiationError()};ym.prototype.update=function(e,t){w.throwInstantiationError()};ym.prototype.pick=function(e,t,n){w.throwInstantiationError()};ym.prototype.isDestroyed=function(){w.throwInstantiationError()};ym.prototype.destroy=function(){w.throwInstantiationError()};var B0e=ym;function Hw(e,t){this._conditionsExpression=ze(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,fbt(this,t)}Object.defineProperties(Hw.prototype,{conditionsExpression:{get:function(){return this._conditionsExpression}}});function ubt(e,t){this.condition=e,this.expression=t}function fbt(e,t){let n=[],i=e._conditions;if(!c(i))return;let o=i.length;for(let r=0;r<o;++r){let s=i[r],a=String(s[0]),l=String(s[1]);n.push(new ubt(new Wf(a,t),new Wf(l,t)))}e._runtimeConditions=n}Hw.prototype.evaluate=function(e,t){let n=this._runtimeConditions;if(!c(n))return;let i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.condition.evaluate(e))return r.expression.evaluate(e,t)}};Hw.prototype.evaluateColor=function(e,t){let n=this._runtimeConditions;if(!c(n))return;let i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.condition.evaluate(e))return r.expression.evaluateColor(e,t)}};Hw.prototype.getShaderFunction=function(e,t,n,i){let o=this._runtimeConditions;if(!c(o)||o.length===0)return;let r="",s=o.length;for(let a=0;a<s;++a){let l=o[a],u=l.condition.getShaderExpression(t,n),f=l.expression.getShaderExpression(t,n);r+=` ${a===0?"if":"else if"} (${u})
| {
| return ${f};
| }
| `}return r=`${i} ${e}
| {
| ${r} return ${i}(1.0);
| }
| `,r};Hw.prototype.getVariables=function(){let e=[],t=this._runtimeConditions;if(!c(t)||t.length===0)return e;let n=t.length;for(let i=0;i<n;++i){let o=t[i];e.push.apply(e,o.condition.getVariables()),e.push.apply(e,o.expression.getVariables())}return e=e.filter(function(i,o,r){return r.indexOf(i)===o}),e};var p4=Hw;function ky(e){this._style={},this._ready=!1,this._show=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._labelColor=void 0,this._labelOutlineColor=void 0,this._labelOutlineWidth=void 0,this._font=void 0,this._labelStyle=void 0,this._labelText=void 0,this._backgroundColor=void 0,this._backgroundPadding=void 0,this._backgroundEnabled=void 0,this._scaleByDistance=void 0,this._translucencyByDistance=void 0,this._distanceDisplayCondition=void 0,this._heightOffset=void 0,this._anchorLineEnabled=void 0,this._anchorLineColor=void 0,this._image=void 0,this._disableDepthTestDistance=void 0,this._horizontalOrigin=void 0,this._verticalOrigin=void 0,this._labelHorizontalOrigin=void 0,this._labelVerticalOrigin=void 0,this._meta=void 0,this._colorShaderFunction=void 0,this._showShaderFunction=void 0,this._pointSizeShaderFunction=void 0,this._colorShaderFunctionReady=!1,this._showShaderFunctionReady=!1,this._pointSizeShaderFunctionReady=!1,this._colorShaderTranslucent=!1,dbt(this,e)}function dbt(e,t){t=g(ze(t,!0),e._style),e._style=t,e.show=t.show,e.color=t.color,e.pointSize=t.pointSize,e.pointOutlineColor=t.pointOutlineColor,e.pointOutlineWidth=t.pointOutlineWidth,e.labelColor=t.labelColor,e.labelOutlineColor=t.labelOutlineColor,e.labelOutlineWidth=t.labelOutlineWidth,e.labelStyle=t.labelStyle,e.font=t.font,e.labelText=t.labelText,e.backgroundColor=t.backgroundColor,e.backgroundPadding=t.backgroundPadding,e.backgroundEnabled=t.backgroundEnabled,e.scaleByDistance=t.scaleByDistance,e.translucencyByDistance=t.translucencyByDistance,e.distanceDisplayCondition=t.distanceDisplayCondition,e.heightOffset=t.heightOffset,e.anchorLineEnabled=t.anchorLineEnabled,e.anchorLineColor=t.anchorLineColor,e.image=t.image,e.disableDepthTestDistance=t.disableDepthTestDistance,e.horizontalOrigin=t.horizontalOrigin,e.verticalOrigin=t.verticalOrigin,e.labelHorizontalOrigin=t.labelHorizontalOrigin,e.labelVerticalOrigin=t.labelVerticalOrigin;let n={};if(c(t.meta)){let i=t.defines,o=g(t.meta,g.EMPTY_OBJECT);for(let r in o)o.hasOwnProperty(r)&&(n[r]=new Wf(o[r],i))}e._meta=n,e._ready=!0}function Wo(e,t){let n=g(e._style,g.EMPTY_OBJECT).defines;if(c(t)){if(typeof t=="boolean"||typeof t=="number")return new Wf(String(t));if(typeof t=="string")return new Wf(t,n);if(c(t.conditions))return new p4(t,n)}else return;return t}function qo(e){if(c(e)){if(c(e.expression))return e.expression;if(c(e.conditionsExpression))return ze(e.conditionsExpression,!0)}else return;return e}Object.defineProperties(ky.prototype,{style:{get:function(){return this._style}},show:{get:function(){return this._show},set:function(e){this._show=Wo(this,e),this._style.show=qo(this._show),this._showShaderFunctionReady=!1}},color:{get:function(){return this._color},set:function(e){this._color=Wo(this,e),this._style.color=qo(this._color),this._colorShaderFunctionReady=!1}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=Wo(this,e),this._style.pointSize=qo(this._pointSize),this._pointSizeShaderFunctionReady=!1}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=Wo(this,e),this._style.pointOutlineColor=qo(this._pointOutlineColor)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=Wo(this,e),this._style.pointOutlineWidth=qo(this._pointOutlineWidth)}},labelColor:{get:function(){return this._labelColor},set:function(e){this._labelColor=Wo(this,e),this._style.labelColor=qo(this._labelColor)}},labelOutlineColor:{get:function(){return this._labelOutlineColor},set:function(e){this._labelOutlineColor=Wo(this,e),this._style.labelOutlineColor=qo(this._labelOutlineColor)}},labelOutlineWidth:{get:function(){return this._labelOutlineWidth},set:function(e){this._labelOutlineWidth=Wo(this,e),this._style.labelOutlineWidth=qo(this._labelOutlineWidth)}},font:{get:function(){return this._font},set:function(e){this._font=Wo(this,e),this._style.font=qo(this._font)}},labelStyle:{get:function(){return this._labelStyle},set:function(e){this._labelStyle=Wo(this,e),this._style.labelStyle=qo(this._labelStyle)}},labelText:{get:function(){return this._labelText},set:function(e){this._labelText=Wo(this,e),this._style.labelText=qo(this._labelText)}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=Wo(this,e),this._style.backgroundColor=qo(this._backgroundColor)}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){this._backgroundPadding=Wo(this,e),this._style.backgroundPadding=qo(this._backgroundPadding)}},backgroundEnabled:{get:function(){return this._backgroundEnabled},set:function(e){this._backgroundEnabled=Wo(this,e),this._style.backgroundEnabled=qo(this._backgroundEnabled)}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){this._scaleByDistance=Wo(this,e),this._style.scaleByDistance=qo(this._scaleByDistance)}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){this._translucencyByDistance=Wo(this,e),this._style.translucencyByDistance=qo(this._translucencyByDistance)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=Wo(this,e),this._style.distanceDisplayCondition=qo(this._distanceDisplayCondition)}},heightOffset:{get:function(){return this._heightOffset},set:function(e){this._heightOffset=Wo(this,e),this._style.heightOffset=qo(this._heightOffset)}},anchorLineEnabled:{get:function(){return this._anchorLineEnabled},set:function(e){this._anchorLineEnabled=Wo(this,e),this._style.anchorLineEnabled=qo(this._anchorLineEnabled)}},anchorLineColor:{get:function(){return this._anchorLineColor},set:function(e){this._anchorLineColor=Wo(this,e),this._style.anchorLineColor=qo(this._anchorLineColor)}},image:{get:function(){return this._image},set:function(e){this._image=Wo(this,e),this._style.image=qo(this._image)}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance=Wo(this,e),this._style.disableDepthTestDistance=qo(this._disableDepthTestDistance)}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin=Wo(this,e),this._style.horizontalOrigin=qo(this._horizontalOrigin)}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin=Wo(this,e),this._style.verticalOrigin=qo(this._verticalOrigin)}},labelHorizontalOrigin:{get:function(){return this._labelHorizontalOrigin},set:function(e){this._labelHorizontalOrigin=Wo(this,e),this._style.labelHorizontalOrigin=qo(this._labelHorizontalOrigin)}},labelVerticalOrigin:{get:function(){return this._labelVerticalOrigin},set:function(e){this._labelVerticalOrigin=Wo(this,e),this._style.labelVerticalOrigin=qo(this._labelVerticalOrigin)}},meta:{get:function(){return this._meta},set:function(e){this._meta=e}}});ky.fromUrl=function(e){if(!c(e))throw new w("url is required");return Te.createIfNeeded(e).fetchJson(e).then(function(n){return new ky(n)})};ky.prototype.getColorShaderFunction=function(e,t,n){return this._colorShaderFunctionReady?(n.translucent=this._colorShaderTranslucent,this._colorShaderFunction):(this._colorShaderFunctionReady=!0,c(this.color)&&c(this.color.getShaderFunction)?this._colorShaderFunction=this.color.getShaderFunction(e,t,n,"vec4"):this._colorShaderFunction=void 0,this._colorShaderTranslucent=n.translucent,this._colorShaderFunction)};ky.prototype.getShowShaderFunction=function(e,t,n){return this._showShaderFunctionReady?this._showShaderFunction:(this._showShaderFunctionReady=!0,c(this.show)&&c(this.show.getShaderFunction)?this._showShaderFunction=this.show.getShaderFunction(e,t,n,"bool"):this._showShaderFunction=void 0,this._showShaderFunction)};ky.prototype.getPointSizeShaderFunction=function(e,t,n){return this._pointSizeShaderFunctionReady?this._pointSizeShaderFunction:(this._pointSizeShaderFunctionReady=!0,c(this.pointSize)&&c(this.pointSize.getShaderFunction)?this._pointSizeShaderFunction=this.pointSize.getShaderFunction(e,t,n,"float"):this._pointSizeShaderFunction=void 0,this._pointSizeShaderFunction)};ky.prototype.getVariables=function(){let e=[];return c(this.color)&&c(this.color.getVariables)&&e.push.apply(e,this.color.getVariables()),c(this.show)&&c(this.show.getVariables)&&e.push.apply(e,this.show.getVariables()),c(this.pointSize)&&c(this.pointSize.getVariables)&&e.push.apply(e,this.pointSize.getVariables()),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};var _4=ky;function UI(e){e=g(e,g.EMPTY_OBJECT),this._maximumSubtreeCount=g(e.maximumSubtreeCount,0),this._subtreeRequestCounter=0,this._queue=new Cw({comparator:UI.comparator})}UI.prototype.addSubtree=function(e){let t=new hbt(e,this._subtreeRequestCounter);this._subtreeRequestCounter++,this._queue.insert(t);let n=e.implicitCoordinates;if(n.level>0){let i=n.getParentSubtreeCoordinates();if(this.find(i)===void 0)throw new w("parent node needs to exist")}if(this._maximumSubtreeCount>0)for(;this._queue.length>this._maximumSubtreeCount&&this._queue.getMinimum()!==t;)this._queue.removeMinimum()};UI.prototype.find=function(e){let t=this._queue,n=t.internalArray,i=t.length;for(let o=0;o<i;o++){let r=n[o],a=r.subtree.implicitCoordinates;if(e.isEqual(a))return r.subtree}};UI.comparator=function(e,t){let n=e.subtree.implicitCoordinates,i=t.subtree.implicitCoordinates;return n.isAncestor(i)?1:i.isAncestor(n)?-1:e.stamp-t.stamp};function hbt(e,t){this.subtree=e,this.stamp=t}var g4=UI;function y4(e){C.typeOf.object("resource",e),this._resource=e,this._metadataTable=void 0}Object.defineProperties(y4.prototype,{metadataTable:{get:function(){return this._metadataTable}}});y4.fromJson=async function(e,t,n,i){if(C.typeOf.object("resource",e),c(t)===c(n))throw new w("One of json and binary must be defined.");let o;c(t)?o={json:t,binary:void 0}:o=pbt(n);let r=await mbt(e,o.json,o.binary),s={},a=o.json.bufferViews.length;for(let h=0;h<a;++h){let m=o.json.bufferViews[h],p=m.byteOffset,_=p+m.byteLength,x=r[m.buffer].subarray(p,_);s[h]=x}let l=o.json.voxelTable,u=o.json.propertyTables[l],f=new y4(e);return f._metadataTable=new kl({count:u.count,properties:u.properties,class:i.classes[u.class],bufferViews:s}),f};function mbt(e,t,n){let i=t.buffers.length,o=new Array(i);for(let r=0;r<i;r++){let s=t.buffers[r];if(c(s.uri)){let l=e.getDerivedResource({url:s.uri});o[r]=l.fetchArrayBuffer().then(function(u){return new Uint8Array(u)})}else o[r]=Promise.resolve(n)}return Promise.all(o)}function pbt(e){let n=new DataView(e.buffer,e.byteOffset),i=8,o=n.getUint32(i,!0);i+=8;let r=n.getUint32(i,!0);i+=8;let s=Do(e,i,o);i+=o;let a=e.subarray(i,i+r);return{json:s,binary:a}}var b4=y4;function x4(e){e=g(e,g.EMPTY_OBJECT),this.shapeTransform=void 0,this.globalTransform=void 0,this.shape=void 0,this.minBounds=void 0,this.maxBounds=void 0,this.dimensions=void 0,this.paddingBefore=void 0,this.paddingAfter=void 0,this.names=void 0,this.types=void 0,this.componentTypes=void 0,this.minimumValues=void 0,this.maximumValues=void 0,this.maximumTileCount=void 0,this._implicitTileset=void 0,this._subtreeCache=new g4}x4.fromUrl=async function(e){C.defined("url",e);let t=Te.createIfNeeded(e),n=await t.fetchJson();gbt(n);let i=Cbt(n,t);await i.load();let o=n.root,r=o.content.extensions["3DTILES_content_voxels"],s=r.class,a=ei(n,"3DTILES_metadata")?n.extensions["3DTILES_metadata"]:n,l=i.schema,u=new RC({metadataJson:a,schema:l}),f=new x4;Ebt(f,u,s);let h=new LC(t,o,l),{shape:m,minBounds:p,maxBounds:_,shapeTransform:b,globalTransform:x}=ybt(o);f.shape=m,f.minBounds=p,f.maxBounds=_,f.dimensions=d.unpack(r.dimensions),f.shapeTransform=b,f.globalTransform=x,f.maximumTileCount=_bt(u);let T,E;return c(r.padding)&&(T=d.unpack(r.padding.before),E=d.unpack(r.padding.after)),f.paddingBefore=T,f.paddingAfter=E,f._implicitTileset=h,Fi.unload(i),f};function _bt(e){if(c(e.tileset))return e.tileset.getPropertyBySemantic(BT.TILESET_TILE_COUNT)}function gbt(e){let t=e.root;if(!c(t.content))throw new ie("Root must have content");if(!ei(t.content,"3DTILES_content_voxels"))throw new ie("Root tile content must have 3DTILES_content_voxels extension");if(!ei(t,"3DTILES_implicit_tiling")&&!c(t.implicitTiling))throw new ie("Root tile must have implicit tiling");if(!c(e.schema)&&!c(e.schemaUri)&&!ei(e,"3DTILES_metadata"))throw new ie("Tileset must have a metadata schema")}function ybt(e){let t=e.boundingVolume,n;if(c(e.transform)?n=N.unpack(e.transform):n=N.clone(N.IDENTITY),c(t.box))return xbt(t.box,n);if(c(t.region))return bbt(t.region);if(ei(t,"3DTILES_bounding_volume_cylinder"))return Tbt(t.extensions["3DTILES_bounding_volume_cylinder"].cylinder,n);throw new ie("Only box, region and 3DTILES_bounding_volume_cylinder are supported in Cesium3DTilesVoxelProvider")}function bbt(e){let t=e[0],n=e[1],i=e[2],o=e[3],r=e[4],s=e[5],a=N.fromScale(Z.WGS84.radii),l=new d(t,n,r),u=new d(i,o,s);return{shape:Nc.ELLIPSOID,minBounds:l,maxBounds:u,shapeTransform:a,globalTransform:N.clone(N.IDENTITY)}}function xbt(e,t){let n=wn.unpack(e),i=N.fromRotationTranslation(n.halfAxes,n.center);return{shape:Nc.BOX,minBounds:d.clone(Qp.DefaultMinBounds),maxBounds:d.clone(Qp.DefaultMaxBounds),shapeTransform:i,globalTransform:t}}function Tbt(e,t){let n=wn.unpack(e),i=N.fromRotationTranslation(n.halfAxes,n.center);return{shape:Nc.CYLINDER,minBounds:d.clone(e_.DefaultMinBounds),maxBounds:d.clone(e_.DefaultMaxBounds),shapeTransform:i,globalTransform:t}}function Cbt(e,t){let{schemaUri:n,schema:i}=e;return c(n)?Fi.getSchemaLoader({resource:t.getDerivedResource({url:n})}):Fi.getSchemaLoader({schema:i})}function Ebt(e,t,n){let{schema:i,statistics:o}=t,r=o==null?void 0:o.classes[n],s=i.classes[n].properties,a=Object.entries(s).map(([h,m])=>{let{type:p,componentType:_}=m,b=r==null?void 0:r.properties[h].min,x=r==null?void 0:r.properties[h].max,T=Ct.getComponentCount(p),E=k0e(b,T),S=k0e(x,T);return{id:h,type:p,componentType:_,minValue:E,maxValue:S}});e.names=a.map(h=>h.id),e.types=a.map(h=>h.type),e.componentTypes=a.map(h=>h.componentType);let l=a.map(h=>h.minValue),u=a.map(h=>h.maxValue),f=l.some(c);e.minimumValues=f?l:void 0,e.maximumValues=f?u:void 0}function k0e(e,t){if(!c(e))return;let n=Array.isArray(e)?e:[e];return Array.from({length:t},(i,o)=>n[o])}async function wbt(e,t){let n=e.contentUriTemplates[0].getDerivedResource({templateValues:t.getTemplateValues()}),i=e.baseResource.getDerivedResource({url:n.url}),o=await i.fetchArrayBuffer(),r=xp(o);return await b4.fromJson(i,r.jsonPayload,r.binaryPayload,e.metadataSchema)}async function Sbt(e,t){let n=e._implicitTileset,i=e._subtreeCache,o=i.find(t);if(c(o))return o;let r=n.subtreeUriTemplate.getDerivedResource({templateValues:t.getTemplateValues()}),s=n.baseResource.getDerivedResource({url:r.url}),a=await s.fetchArrayBuffer();if(o=i.find(t),c(o))return o;let l=xp(a);return o=await FT.fromSubtreeJson(s,l.jsonPayload,l.binaryPayload,n,t),i.addSubtree(o),o}x4.prototype.requestData=function(e){e=g(e,g.EMPTY_OBJECT);let t=g(e.tileLevel,0),n=g(e.tileX,0),i=g(e.tileY,0),o=g(e.tileZ,0);if(g(e.keyframe,0)!==0)return;let s=this._implicitTileset,a=this.names,l=new NC({subdivisionScheme:s.subdivisionScheme,subtreeLevels:s.subtreeLevels,level:t,x:n,y:i,z:o}),u=l.isSubtreeRoot()&&l.level>0,f=u?l.getParentSubtreeCoordinates():l.getSubtreeCoordinates();return Sbt(this,f).then(function(m){return(u?m.childSubtreeIsAvailableAtCoordinates(l):m.tileIsAvailableAtCoordinates(l))?wbt(s,l):Promise.reject("Tile is not available")}).then(function(m){return a.map(function(p){return m.metadataTable.getPropertyTypedArray(p)})})};var U0e=x4;function fX(e){e=g(e,1),C.typeOf.number.greaterThan("radius",e,0),this._radius=g(e,1)}Object.defineProperties(fX.prototype,{radius:{get:function(){return this._radius},set:function(e){C.typeOf.number.greaterThan("value",e,0),this._radius=e}}});fX.prototype.emit=function(e){let t=O.randomBetween(0,O.TWO_PI),n=O.randomBetween(0,this._radius),i=n*Math.cos(t),o=n*Math.sin(t),r=0;e.position=d.fromElements(i,o,r,e.position),e.velocity=d.clone(d.UNIT_Z,e.velocity)};var T4=fX;var dX={CUMULUS:0};dX.validate=function(e){return e===dX.CUMULUS};var Gw=Object.freeze(dX);function Vd(e,t){if(e=g(e,g.EMPTY_OBJECT),this._show=g(e.show,!0),this._position=d.clone(g(e.position,d.ZERO)),!c(e.scale)&&c(e.maximumSize))this._maximumSize=d.clone(e.maximumSize),this._scale=new k(this._maximumSize.x,this._maximumSize.y);else{this._scale=k.clone(g(e.scale,new k(20,12)));let n=new d(this._scale.x,this._scale.y,Math.min(this._scale.x,this._scale.y)/1.5);this._maximumSize=d.clone(g(e.maximumSize,n))}this._slice=g(e.slice,-1),this._color=z.clone(g(e.color,z.WHITE)),this._brightness=g(e.brightness,1),this._cloudCollection=t,this._index=-1}var Abt=Vd.SHOW_INDEX=0,vbt=Vd.POSITION_INDEX=1,Dbt=Vd.SCALE_INDEX=2,Ibt=Vd.MAXIMUM_SIZE_INDEX=3,Obt=Vd.SLICE_INDEX=4,Pbt=Vd.BRIGHTNESS_INDEX=5,Rbt=Vd.COLOR_INDEX=6;Vd.NUMBER_OF_PROPERTIES=7;function rx(e,t){let n=e._cloudCollection;c(n)&&(n._updateCloud(e,t),e._dirty=!0)}Object.defineProperties(Vd.prototype,{show:{get:function(){return this._show},set:function(e){C.typeOf.bool("value",e),this._show!==e&&(this._show=e,rx(this,Abt))}},position:{get:function(){return this._position},set:function(e){C.typeOf.object("value",e);let t=this._position;d.equals(t,e)||(d.clone(e,t),rx(this,vbt))}},scale:{get:function(){return this._scale},set:function(e){C.typeOf.object("value",e);let t=this._scale;k.equals(t,e)||(k.clone(e,t),rx(this,Dbt))}},maximumSize:{get:function(){return this._maximumSize},set:function(e){C.typeOf.object("value",e);let t=this._maximumSize;d.equals(t,e)||(d.clone(e,t),rx(this,Ibt))}},color:{get:function(){return this._color},set:function(e){C.typeOf.object("value",e);let t=this._color;z.equals(t,e)||(z.clone(e,t),rx(this,Rbt))}},slice:{get:function(){return this._slice},set:function(e){C.typeOf.number("value",e),this._slice!==e&&(this._slice=e,rx(this,Obt))}},brightness:{get:function(){return this._brightness},set:function(e){C.typeOf.number("value",e),this._brightness!==e&&(this._brightness=e,rx(this,Pbt))}}});Vd.prototype._destroy=function(){this._cloudCollection=void 0};var Pf=Vd;var bu,C4=new d,Mbt={positionHighAndScaleX:0,positionLowAndScaleY:1,packedAttribute0:2,packedAttribute1:3,color:4},Lbt={direction:0,positionHighAndScaleX:1,positionLowAndScaleY:2,packedAttribute0:3,packedAttribute1:4,color:5},Nbt=Pf.SHOW_INDEX,Fbt=Pf.POSITION_INDEX,Bbt=Pf.SCALE_INDEX,kbt=Pf.MAXIMUM_SIZE_INDEX,Ubt=Pf.SLICE_INDEX,zbt=Pf.BRIGHTNESS_INDEX,Vbt=Pf.NUMBER_OF_PROPERTIES,Hbt=Pf.COLOR_INDEX;function Hd(e){e=g(e,g.EMPTY_OBJECT),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(Vbt),this._noiseTexture=void 0,this._textureSliceWidth=128,this._noiseTextureRows=4,this.noiseDetail=g(e.noiseDetail,16),this.noiseOffset=d.clone(g(e.noiseOffset,d.ZERO)),this._loading=!1,this._ready=!1;let t=this;this._uniforms={u_noiseTexture:function(){return t._noiseTexture},u_noiseTextureDimensions:z0e(t),u_noiseDetail:function(){return t.noiseDetail}},this._vaNoise=void 0,this._spNoise=void 0,this._spCreated=!1,this._sp=void 0,this._rs=void 0,this.show=g(e.show,!0),this._colorCommands=[],this.debugBillboards=g(e.debugBillboards,!1),this._compiledDebugBillboards=!1,this.debugEllipsoids=g(e.debugEllipsoids,!1),this._compiledDebugEllipsoids=!1}function z0e(e){return function(){return C4.x=e._textureSliceWidth,C4.y=e._noiseTextureRows,C4.z=1/e._noiseTextureRows,C4}}Object.defineProperties(Hd.prototype,{length:{get:function(){return mX(this),this._clouds.length}}});function V0e(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}Hd.prototype.add=function(e){e=g(e,g.EMPTY_OBJECT);let t=g(e.cloudType,Gw.CUMULUS);if(!Gw.validate(t))throw new w("invalid cloud type");let n;return t===Gw.CUMULUS&&(n=new Pf(e,this),n._index=this._clouds.length,this._clouds.push(n),this._createVertexArray=!0),n};Hd.prototype.remove=function(e){return this.contains(e)?(this._clouds[e._index]=void 0,this._cloudsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};Hd.prototype.removeAll=function(){V0e(this._clouds),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!0};function mX(e){if(e._cloudsRemoved){e._cloudsRemoved=!1;let t=[],n=e._clouds,i=n.length;for(let o=0,r=0;o<i;++o){let s=n[o];c(s)&&(n._index=r++,t.push(s))}e._clouds=t}}Hd.prototype._updateCloud=function(e,t){e._dirty||(this._cloudsToUpdate[this._cloudsToUpdateIndex++]=e),++this._propertiesChanged[t]};Hd.prototype.contains=function(e){return c(e)&&e._cloudCollection===this};Hd.prototype.get=function(e){return C.typeOf.number("index",e),mX(this),this._clouds[e]};var Gbt=new Float32Array([-1,-1,1,-1,1,1,-1,1]),jbt=new Uint16Array([0,1,2,0,2,3]);function Wbt(e){let t=yt.createVertexBuffer({context:e,typedArray:Gbt,usage:Pe.STATIC_DRAW}),n=yt.createIndexBuffer({context:e,typedArray:jbt,usage:Pe.STATIC_DRAW,indexDatatype:Oe.UNSIGNED_SHORT}),i=[{index:0,vertexBuffer:t,componentsPerAttribute:2,componentDatatype:j.FLOAT}];return new Zn({context:e,attributes:i,indexBuffer:n})}var pX;function qbt(e){let n=e.cache.cloudCollection_indexBufferBatched;if(c(n))return n;let i=16384*6-6,o=new Uint16Array(i);for(let r=0,s=0;r<i;r+=6,s+=4)o[r]=s,o[r+1]=s+1,o[r+2]=s+2,o[r+3]=s,o[r+4]=s+2,o[r+5]=s+3;return n=yt.createIndexBuffer({context:e,typedArray:o,usage:Pe.STATIC_DRAW,indexDatatype:Oe.UNSIGNED_SHORT}),n.vertexArrayDestroyable=!1,e.cache.cloudCollection_indexBufferBatched=n,n}function Ybt(e){let t=e.cache.cloudCollection_indexBufferInstanced;return c(t)||(t=yt.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Pe.STATIC_DRAW,indexDatatype:Oe.UNSIGNED_SHORT}),t.vertexArrayDestroyable=!1,e.cache.cloudCollection_indexBufferInstanced=t),t}function Xbt(e){let t=e.cache.cloudCollection_vertexBufferInstanced;return c(t)||(t=yt.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:Pe.STATIC_DRAW}),t.vertexArrayDestroyable=!1,e.cache.cloudCollection_vertexBufferInstanced=t),t}function Kbt(e,t,n){let i=[{index:bu.positionHighAndScaleX,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:Pe.STATIC_DRAW},{index:bu.positionLowAndScaleY,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:Pe.STATIC_DRAW},{index:bu.packedAttribute0,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:Pe.STATIC_DRAW},{index:bu.packedAttribute1,componentsPerAttribute:4,componentDatatype:j.FLOAT,usage:Pe.STATIC_DRAW},{index:bu.color,componentsPerAttribute:4,componentDatatype:j.UNSIGNED_BYTE,normalize:!0,usage:Pe.STATIC_DRAW}];n&&i.push({index:bu.direction,componentsPerAttribute:2,componentDatatype:j.FLOAT,vertexBuffer:Xbt(e)});let o=n?t:4*t;return new y_(e,i,o,n)}var hX=new kn;function H0e(e,t,n,i){let o,r=n[bu.positionHighAndScaleX],s=n[bu.positionLowAndScaleY],a=i.position;kn.fromCartesian(a,hX);let l=i.scale,u=hX.high,f=hX.low;e._instanced?(o=i._index,r(o,u.x,u.y,u.z,l.x),s(o,f.x,f.y,f.z,l.y)):(o=i._index*4,r(o+0,u.x,u.y,u.z,l.x),r(o+1,u.x,u.y,u.z,l.x),r(o+2,u.x,u.y,u.z,l.x),r(o+3,u.x,u.y,u.z,l.x),s(o+0,f.x,f.y,f.z,l.y),s(o+1,f.x,f.y,f.z,l.y),s(o+2,f.x,f.y,f.z,l.y),s(o+3,f.x,f.y,f.z,l.y))}function G0e(e,t,n,i){let o,r=n[bu.packedAttribute0],s=i.show,a=i.brightness;e._instanced?(o=i._index,r(o,s,a,0,0)):(o=i._index*4,r(o+0,s,a,0,0),r(o+1,s,a,1,0),r(o+2,s,a,1,1),r(o+3,s,a,0,1))}function j0e(e,t,n,i){let o,r=n[bu.packedAttribute1],s=i.maximumSize,a=i.slice;e._instanced?(o=i._index,r(o,s.x,s.y,s.z,a)):(o=i._index*4,r(o+0,s.x,s.y,s.z,a),r(o+1,s.x,s.y,s.z,a),r(o+2,s.x,s.y,s.z,a),r(o+3,s.x,s.y,s.z,a))}function W0e(e,t,n,i){let o,r=n[bu.color],s=i.color,a=z.floatToByte(s.red),l=z.floatToByte(s.green),u=z.floatToByte(s.blue),f=z.floatToByte(s.alpha);e._instanced?(o=i._index,r(o,a,l,u,f)):(o=i._index*4,r(o+0,a,l,u,f),r(o+1,a,l,u,f),r(o+2,a,l,u,f),r(o+3,a,l,u,f))}function $bt(e,t,n,i){H0e(e,t,n,i),G0e(e,t,n,i),j0e(e,t,n,i),W0e(e,t,n,i)}function Zbt(e,t,n,i){let o=e,r=o._textureSliceWidth,s=o._noiseTextureRows;if(r/s<1||r%s!==0)throw new w("noiseTextureRows must evenly divide textureSliceWidth");let a=t.context;o._vaNoise=Wbt(a),o._spNoise=en.fromCache({context:a,vertexShaderSource:n,fragmentShaderSource:i,attributeLocations:{position:0}});let l=o.noiseDetail,u=o.noiseOffset;o._noiseTexture=new Ot({context:a,width:r*r/s,height:r*s,pixelDatatype:Ne.UNSIGNED_BYTE,pixelFormat:Re.RGBA,sampler:new Jt({wrapS:pn.REPEAT,wrapT:pn.REPEAT,minificationFilter:Wt.NEAREST,magnificationFilter:si.NEAREST})});let f=new Vc({vertexArray:o._vaNoise,shaderProgram:o._spNoise,outputTexture:o._noiseTexture,uniformMap:{u_noiseTextureDimensions:z0e(o),u_noiseDetail:function(){return l},u_noiseOffset:function(){return u}},persists:!1,owner:e,postExecute:function(h){o._ready=!0,o._loading=!1}});t.commandList.push(f),o._loading=!0}function Jbt(e,t){let n=e,i=t.context;n._createVertexArray=!1,n._vaf=n._vaf&&n._vaf.destroy();let o=e._clouds,r=o.length;if(r>0){n._vaf=Kbt(i,r,n._instanced);let s=n._vaf.writers,a;for(a=0;a<r;++a){let l=o[a];$bt(e,t,s,l)}n._vaf.commit(pX(i))}}var Qbt=[];function e0t(e,t){let n=t.context,i=e,r=i._clouds.length,s=i._cloudsToUpdate,a=i._cloudsToUpdateIndex,l=i._propertiesChanged,u=Qbt;u.length=0,(l[Fbt]||l[Bbt])&&u.push(H0e),(l[Nbt]||l[zbt])&&u.push(G0e),(l[kbt]||l[Ubt])&&u.push(j0e),l[Hbt]&&u.push(W0e);let f=u.length,h=i._vaf.writers,m,p,_;if(a/r>.1){for(m=0;m<a;++m)for(p=s[m],p._dirty=!1,_=0;_<f;++_)u[_](e,t,h,p);i._vaf.commit(pX(n))}else{for(m=0;m<a;++m){for(p=s[m],p._dirty=!1,_=0;_<f;++_)u[_](e,t,h,p);i._instanced?i._vaf.subCommit(p._index,1):i._vaf.subCommit(p._index*4,4)}i._vaf.endSubCommits()}i._cloudsToUpdateIndex=0}function t0t(e,t,n,i){let o=t.context,r=e,s=new Be({defines:[],sources:[n]});r._instanced&&s.defines.push("INSTANCED");let a=new Be({defines:[],sources:[i]});r.debugBillboards&&a.defines.push("DEBUG_BILLBOARDS"),r.debugEllipsoids&&a.defines.push("DEBUG_ELLIPSOIDS"),r._sp=en.replaceCache({context:o,shaderProgram:r._sp,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:bu}),r._rs=Fe.fromCache({depthTest:{enabled:!0,func:Y.LESS},depthMask:!1,blending:cn.ALPHA_BLEND}),r._spCreated=!0,r._compiledDebugBillboards=r.debugBillboards,r._compiledDebugEllipsoids=r.debugEllipsoids}function n0t(e,t){let n=e,i=t.passes,o=n._uniforms,r=t.commandList;if(i.render){let s=n._colorCommands,a=n._vaf.va,l=a.length;s.length=l;for(let u=0;u<l;u++){let f=s[u];c(f)||(f=s[u]=new Ke),f.pass=xe.TRANSLUCENT,f.owner=e,f.uniformMap=o,f.count=a[u].indicesCount,f.vertexArray=a[u].va,f.shaderProgram=n._sp,f.renderState=n._rs,n._instanced&&(f.count=6,f.instanceCount=n._clouds.length),r.push(f)}}}Hd.prototype.update=function(e){if(mX(this),!this.show)return;let t=this.debugBillboards||this.debugEllipsoids;this._ready=t?!0:c(this._noiseTexture),!this._ready&&!this._loading&&!t&&Zbt(this,e,KH,XH),this._instanced=e.context.instancedArrays,bu=this._instanced?Lbt:Mbt,pX=this._instanced?Ybt:qbt;let i=this._clouds.length,o=this._cloudsToUpdate,r=this._cloudsToUpdateIndex;this._createVertexArray?Jbt(this,e):r>0&&e0t(this,e),r>i*1.5&&(o.length=i),!(!c(this._vaf)||!c(this._vaf.va)||!this._ready&!t)&&((!this._spCreated||this.debugBillboards!==this._compiledDebugBillboards||this.debugEllipsoids!==this._compiledDebugEllipsoids)&&t0t(this,e,YH,qH),n0t(this,e))};Hd.prototype.isDestroyed=function(){return!1};Hd.prototype.destroy=function(){return this._noiseTexture=this._noiseTexture&&this._noiseTexture.destroy(),this._sp=this._sp&&this._sp.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),V0e(this._clouds),ue(this)};var q0e=Hd;var i0t=O.toRadians(30);function _X(e){this._angle=g(e,i0t)}Object.defineProperties(_X.prototype,{angle:{get:function(){return this._angle},set:function(e){C.typeOf.number("value",e),this._angle=e}}});_X.prototype.emit=function(e){let t=Math.tan(this._angle),n=O.randomBetween(0,O.TWO_PI),i=O.randomBetween(0,t),o=i*Math.cos(n),r=i*Math.sin(n),s=1;e.velocity=d.fromElements(o,r,s,e.velocity),d.normalize(e.velocity,e.velocity),e.position=d.clone(d.ZERO,e.position)};var Y0e=_X;function zI(e){e=g(e,g.EMPTY_OBJECT);let t=e.attributeName,n=e.perInstanceAttribute;if(!c(t))throw new w("options.attributeName is required.");c(n)||(n=!1);let i=g(e.glslDatatype,"vec3"),o=`v_${t}`,r;if(t==="normal"||t==="tangent"||t==="bitangent")r=`vec4 getColor() { return vec4((${o} + vec3(1.0)) * 0.5, 1.0); }
| `;else switch(t==="st"&&(i="vec2"),i){case"float":r=`vec4 getColor() { return vec4(vec3(${o}), 1.0); }
| `;break;case"vec2":r=`vec4 getColor() { return vec4(${o}, 0.0, 1.0); }
| `;break;case"vec3":r=`vec4 getColor() { return vec4(${o}, 1.0); }
| `;break;case"vec4":r=`vec4 getColor() { return ${o}; }
| `;break;default:throw new w("options.glslDatatype must be float, vec2, vec3, or vec4.")}let s=`in vec3 position3DHigh;
| in vec3 position3DLow;
| in float batchId;
| ${n?"":`in ${i} ${t};
| `}out ${i} ${o};
| void main()
| {
| vec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);
| ${n?`${o} = czm_batchTable_${t}(batchId);
| `:`${o} = ${t};
| `}gl_Position = czm_modelViewProjectionRelativeToEye * p;
| }`,a=`in ${i} ${o};
| ${r}
| void main()
| {
| out_FragColor = getColor();
| }`;this.material=void 0,this.translucent=g(e.translucent,!1),this._vertexShaderSource=g(e.vertexShaderSource,s),this._fragmentShaderSource=g(e.fragmentShaderSource,a),this._renderState=$i.getDefaultRenderState(!1,!1,e.renderState),this._closed=g(e.closed,!1),this._attributeName=t,this._glslDatatype=i}Object.defineProperties(zI.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},attributeName:{get:function(){return this._attributeName}},glslDatatype:{get:function(){return this._glslDatatype}}});zI.prototype.getFragmentShaderSource=$i.prototype.getFragmentShaderSource;zI.prototype.isTranslucent=$i.prototype.isTranslucent;zI.prototype.getRenderState=$i.prototype.getRenderState;var X0e=zI;function E4(e){e=g(e,g.EMPTY_OBJECT),this.length=g(e.length,1e7),this._length=void 0,this.width=g(e.width,2),this._width=void 0,this.show=g(e.show,!0),this.modelMatrix=N.clone(g(e.modelMatrix,N.IDENTITY)),this._modelMatrix=new N,this.id=e.id,this._id=void 0,this._primitive=void 0}E4.prototype.update=function(e){if(this.show){if(!c(this._primitive)||!N.equals(this._modelMatrix,this.modelMatrix)||this._length!==this.length||this._width!==this.width||this._id!==this.id){this._modelMatrix=N.clone(this.modelMatrix,this._modelMatrix),this._length=this.length,this._width=this.width,this._id=this.id,c(this._primitive)&&this._primitive.destroy(),this.modelMatrix[12]===0&&this.modelMatrix[13]===0&&this.modelMatrix[14]===0&&(this.modelMatrix[14]=.01);let t=new wt({geometry:new Kg({positions:[d.ZERO,d.UNIT_X],width:this.width,vertexFormat:qr.VERTEX_FORMAT,colors:[z.RED,z.RED],arcType:jt.NONE}),modelMatrix:N.multiplyByUniformScale(this.modelMatrix,this.length,new N),id:this.id,pickPrimitive:this}),n=new wt({geometry:new Kg({positions:[d.ZERO,d.UNIT_Y],width:this.width,vertexFormat:qr.VERTEX_FORMAT,colors:[z.GREEN,z.GREEN],arcType:jt.NONE}),modelMatrix:N.multiplyByUniformScale(this.modelMatrix,this.length,new N),id:this.id,pickPrimitive:this}),i=new wt({geometry:new Kg({positions:[d.ZERO,d.UNIT_Z],width:this.width,vertexFormat:qr.VERTEX_FORMAT,colors:[z.BLUE,z.BLUE],arcType:jt.NONE}),modelMatrix:N.multiplyByUniformScale(this.modelMatrix,this.length,new N),id:this.id,pickPrimitive:this});this._primitive=new An({geometryInstances:[t,n,i],appearance:new qr,asynchronous:!1})}this._primitive.update(e)}};E4.prototype.isDestroyed=function(){return!1};E4.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),ue(this)};var K0e=E4;function o0t(e){if(C.typeOf.object("options",e),C.typeOf.object("options.direction",e.direction),d.equals(e.direction,d.ZERO))throw new w("options.direction cannot be zero-length");this.direction=d.clone(e.direction),this.color=z.clone(g(e.color,z.WHITE)),this.intensity=g(e.intensity,1)}var $0e=o0t;var w4=`in vec3 v_positionMC;
| in vec3 v_positionEC;
| in vec2 v_st;
|
| void main()
| {
| czm_materialInput materialInput;
|
| vec3 normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));
| #ifdef FACE_FORWARD
| normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
| #endif
|
| materialInput.s = v_st.s;
| materialInput.st = v_st;
| materialInput.str = vec3(v_st, 0.0);
|
| // Convert tangent space material normal to eye space
| materialInput.normalEC = normalEC;
| materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);
|
| // Convert view vector to world space
| vec3 positionToEyeEC = -v_positionEC;
| materialInput.positionToEyeEC = positionToEyeEC;
|
| czm_material material = czm_getMaterial(materialInput);
|
| #ifdef FLAT
| out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
| #else
| out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
| #endif
| }
| `;var S4=`in vec3 position3DHigh;
| in vec3 position3DLow;
| in vec2 st;
| in float batchId;
|
| out vec3 v_positionMC;
| out vec3 v_positionEC;
| out vec2 v_st;
|
| void main()
| {
| vec4 p = czm_computePosition();
|
| v_positionMC = position3DHigh + position3DLow; // position in model coordinates
| v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
| v_st = st;
|
| gl_Position = czm_modelViewProjectionRelativeToEye * p;
| }
| `;function sx(e){e=g(e,g.EMPTY_OBJECT);let t=g(e.translucent,!0),n=g(e.aboveGround,!1);this.material=c(e.material)?e.material:Vi.fromType(Vi.ColorType),this.translucent=g(e.translucent,!0),this._vertexShaderSource=g(e.vertexShaderSource,S4),this._fragmentShaderSource=g(e.fragmentShaderSource,w4),this._renderState=$i.getDefaultRenderState(t,!n,e.renderState),this._closed=!1,this._flat=g(e.flat,!1),this._faceForward=g(e.faceForward,n),this._aboveGround=n}Object.defineProperties(sx.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return sx.VERTEX_FORMAT}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}},aboveGround:{get:function(){return this._aboveGround}}});sx.VERTEX_FORMAT=Ce.POSITION_AND_ST;sx.prototype.getFragmentShaderSource=$i.prototype.getFragmentShaderSource;sx.prototype.isTranslucent=$i.prototype.isTranslucent;sx.prototype.getRenderState=$i.prototype.getRenderState;var Z0e=sx;function Tl(e){if(!c(e)||!c(e.scene))throw new w("options.scene is required.");this._scene=e.scene,this.samplingWindow=g(e.samplingWindow,Tl.defaultSettings.samplingWindow),this.quietPeriod=g(e.quietPeriod,Tl.defaultSettings.quietPeriod),this.warmupPeriod=g(e.warmupPeriod,Tl.defaultSettings.warmupPeriod),this.minimumFrameRateDuringWarmup=g(e.minimumFrameRateDuringWarmup,Tl.defaultSettings.minimumFrameRateDuringWarmup),this.minimumFrameRateAfterWarmup=g(e.minimumFrameRateAfterWarmup,Tl.defaultSettings.minimumFrameRateAfterWarmup),this._lowFrameRate=new fe,this._nominalFrameRate=new fe,this._frameTimes=[],this._needsQuietPeriod=!0,this._quietPeriodEndTime=0,this._warmupPeriodEndTime=0,this._frameRateIsLow=!1,this._lastFramesPerSecond=void 0,this._pauseCount=0;let t=this;this._preUpdateRemoveListener=this._scene.preUpdate.addEventListener(function(o,r){r0t(t,r)}),this._hiddenPropertyName=document.hidden!==void 0?"hidden":document.mozHidden!==void 0?"mozHidden":document.msHidden!==void 0?"msHidden":document.webkitHidden!==void 0?"webkitHidden":void 0;let n=document.hidden!==void 0?"visibilitychange":document.mozHidden!==void 0?"mozvisibilitychange":document.msHidden!==void 0?"msvisibilitychange":document.webkitHidden!==void 0?"webkitvisibilitychange":void 0;function i(){s0t(t)}this._visibilityChangeRemoveListener=void 0,c(n)&&(document.addEventListener(n,i,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(n,i,!1)})}Tl.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8};Tl.fromScene=function(e){if(!c(e))throw new w("scene is required.");return(!c(e._frameRateMonitor)||e._frameRateMonitor.isDestroyed())&&(e._frameRateMonitor=new Tl({scene:e})),e._frameRateMonitor};Object.defineProperties(Tl.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}});Tl.prototype.pause=function(){++this._pauseCount,this._pauseCount===1&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)};Tl.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)};Tl.prototype.isDestroyed=function(){return!1};Tl.prototype.destroy=function(){return this._preUpdateRemoveListener(),c(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),ue(this)};function r0t(e,t){if(e._pauseCount>0)return;let n=yi();if(e._needsQuietPeriod)e._needsQuietPeriod=!1,e._frameTimes.length=0,e._quietPeriodEndTime=n+e.quietPeriod/Vn.SECONDS_PER_MILLISECOND,e._warmupPeriodEndTime=e._quietPeriodEndTime+(e.warmupPeriod+e.samplingWindow)/Vn.SECONDS_PER_MILLISECOND;else if(n>=e._quietPeriodEndTime){e._frameTimes.push(n);let i=n-e.samplingWindow/Vn.SECONDS_PER_MILLISECOND;if(e._frameTimes.length>=2&&e._frameTimes[0]<=i){for(;e._frameTimes.length>=2&&e._frameTimes[1]<i;)e._frameTimes.shift();let o=(n-e._frameTimes[0])/(e._frameTimes.length-1);e._lastFramesPerSecond=1e3/o;let r=1e3/(n>e._warmupPeriodEndTime?e.minimumFrameRateAfterWarmup:e.minimumFrameRateDuringWarmup);o>r?e._frameRateIsLow||(e._frameRateIsLow=!0,e._needsQuietPeriod=!0,e.lowFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond)):e._frameRateIsLow&&(e._frameRateIsLow=!1,e._needsQuietPeriod=!0,e.nominalFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond))}}}function s0t(e){document[e._hiddenPropertyName]?e.pause():e.unpause()}var J0e=Tl;var Q0e=Mr(Q7(),1);function gX(){this._image=new Image}gX.prototype.isReady=function(){return!0};gX.prototype.shouldDiscardImage=function(e){return e===this._image};function ax(e){e=g(e,g.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=new Hi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new te(-O.PI,-O.PI,O.PI,O.PI),ellipsoid:e.ellipsoid});let t=e.credit;typeof t=="string"&&(t=new St(t)),this._credit=t,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,c(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new gX),this._errorEvent=new fe}Object.defineProperties(ax.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}});ax.fromMetadata=function(e,t){if(C.defined("metadata",e),!e.imageryPresent)throw new ie(`The server ${e.url} doesn't have imagery`);let n=new ax(t);return n._metadata=e,n};ax.prototype.getTileCredits=function(e,t,n){let i=this._metadata,o=i.getTileInformation(e,t,n);if(c(o)){let r=i.providers[o.imageryProvider];if(c(r))return[r]}};ax.prototype.requestImage=function(e,t,n,i){let o=this._tileDiscardPolicy._image,r=this._metadata,s=My.tileXYToQuadKey(e,t,n),a=r.getTileInformation(e,t,n);if(!c(a)){if(r.isValid(s)){let u=new Ko({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction});r.populateSubtree(e,t,n,u);return}return Promise.resolve(o)}if(!a.hasImagery())return Promise.resolve(o);let l=a0t(this,a,e,t,n,i).fetchArrayBuffer();if(c(l))return l.then(function(u){m4(r.key,u);let f=new Uint8Array(u),h,m=r.protoImagery;if((!c(m)||!m)&&(h=c0t(f)),!c(h)&&(!c(m)||m)){let p=l0t(f);h=p.imageType,f=p.imageData}return!c(h)||!c(f)?o:PT({uint8Array:f,format:h,flipY:!0})})};ax.prototype.pickFeatures=function(e,t,n,i,o){};function a0t(e,t,n,i,o,r){let s=My.tileXYToQuadKey(n,i,o),a=t.imageryVersion;return a=c(a)&&a>0?a:1,e._metadata.resource.getDerivedResource({url:`flatfile?f1-0${s}-i.${a.toString()}`,request:r})}function c0t(e){let t="JFIF";if(e[6]===t.charCodeAt(0)&&e[7]===t.charCodeAt(1)&&e[8]===t.charCodeAt(2)&&e[9]===t.charCodeAt(3))return"image/jpeg";let n="PNG";if(e[1]===n.charCodeAt(0)&&e[2]===n.charCodeAt(1)&&e[3]===n.charCodeAt(2))return"image/png"}function l0t(e){let t=Q0e.Reader.create(e),n=t.len,i={};for(;t.pos<n;){let s=t.uint32(),a;switch(s>>>3){case 1:i.imageType=t.uint32();break;case 2:i.imageData=t.bytes();break;case 3:i.alphaType=t.uint32();break;case 4:i.imageAlpha=t.bytes();break;case 5:if(a=i.copyrightIds,c(a)||(a=i.copyrightIds=[]),(s&7)===2){let l=t.uint32()+t.pos;for(;t.pos<l;)a.push(t.uint32())}else a.push(t.uint32());break;default:t.skipType(s&7);break}}let o=i.imageType;if(c(o))switch(o){case 0:i.imageType="image/jpeg";break;case 4:i.imageType="image/png";break;default:throw new ie("GoogleEarthEnterpriseImageryProvider: Unsupported image type.")}let r=i.alphaType;return c(r)&&r!==0&&(console.log("GoogleEarthEnterpriseImageryProvider: External alpha not supported."),delete i.alphaType,delete i.imageAlpha),i}var exe=ax;var u0t=new z(1,1,1,.4),f0t=new z(0,1,0,.05),d0t=new z(0,.5,0,.2);function cx(e){e=g(e,g.EMPTY_OBJECT),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tilingScheme=c(e.tilingScheme)?e.tilingScheme:new Hi({ellipsoid:e.ellipsoid}),this._cells=g(e.cells,8),this._color=g(e.color,u0t),this._glowColor=g(e.glowColor,f0t),this._glowWidth=g(e.glowWidth,6),this._backgroundColor=g(e.backgroundColor,d0t),this._errorEvent=new fe,this._tileWidth=g(e.tileWidth,256),this._tileHeight=g(e.tileHeight,256),this._canvasSize=g(e.canvasSize,256),this._canvas=this._createGridCanvas()}Object.defineProperties(cx.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});cx.prototype._drawGrid=function(e){let n=this._canvasSize;for(let i=0;i<=this._cells;++i){let r=1+i/this._cells*(n-1);e.moveTo(r,0),e.lineTo(r,n),e.moveTo(0,r),e.lineTo(n,r)}e.stroke()};cx.prototype._createGridCanvas=function(){let e=document.createElement("canvas");e.width=this._canvasSize,e.height=this._canvasSize;let t=0,n=this._canvasSize,i=e.getContext("2d"),o=this._backgroundColor.toCssColorString();i.fillStyle=o,i.fillRect(t,t,n,n);let r=this._glowColor.toCssColorString();i.strokeStyle=r,i.lineWidth=this._glowWidth,i.strokeRect(t,t,n,n),this._drawGrid(i),i.lineWidth=this._glowWidth*.5,i.strokeRect(t,t,n,n),this._drawGrid(i);let s=this._color.toCssColorString();return i.strokeStyle=s,i.lineWidth=2,i.strokeRect(t,t,n,n),i.lineWidth=1,this._drawGrid(i),e};cx.prototype.getTileCredits=function(e,t,n){};cx.prototype.requestImage=function(e,t,n,i){return Promise.resolve(this._canvas)};cx.prototype.pickFeatures=function(e,t,n,i,o){};var txe=cx;function Gd(){}Gd._maxDecodingConcurrency=Math.max(sn.hardwareConcurrency-1,1);Gd._decodeTaskProcessor=new hi("decodeI3S",Gd._maxDecodingConcurrency);Gd._promise=void 0;async function h0t(){if(await Gd._decodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}))return Gd._decodeTaskProcessor;throw new ie("I3S decoder could not be initialized.")}Gd.decode=async function(e,t,n,i,o){return C.typeOf.string("url",e),C.defined("defaultGeometrySchema",t),C.defined("geometryData",n),c(Gd._promise)||(Gd._promise=h0t()),Gd._promise.then(function(r){let s=n._parent._data,a=n._parent._inverseRotationMatrix,l=0,u=0,f=0;c(s.obb)?(l=s.obb.center[0],u=s.obb.center[1],f=s.obb.center[2]):c(s.mbs)&&(l=s.mbs[0],u=s.mbs[1],f=s.mbs[2]);let h=q.fromRotationX(-O.PI_OVER_TWO),m=new q;q.multiply(h,a,m);let p=re.fromDegrees(l,u,f),_=Z.WGS84.cartographicToCartesian(p),b={binaryData:n._data,featureData:c(i)&&c(i[0])?i[0].data:void 0,schema:t,bufferInfo:n._geometryBufferInfo,ellipsoidRadiiSquare:Z.WGS84.radiiSquared,url:e,geoidDataList:n._dataProvider._geoidDataList,cartographicCenter:p,cartesianCenter:_,parentRotation:m,enableFeatures:n._dataProvider.showFeatures,splitGeometryByColorTransparency:n._dataProvider.adjustMaterialAlphaMode,symbologyData:o,calculateNormals:n._dataProvider.calculateNormals};return r.scheduleTask(b)})};var A4=Gd;function yX(e,t){this._parent=e,this._dataProvider=e._dataProvider,this._layer=e._layer,c(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${t}`}):this._resource=this._parent.resource.getDerivedResource({url:t})}Object.defineProperties(yX.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}}});yX.prototype.load=async function(){return this._data=await bm.loadJson(this._resource),this._data};var v4=yX;function o_(e,t){this._storageInfo=t,this._parent=e,this._dataProvider=e._dataProvider,this._loadPromise=void 0;let n=`attributes/${t.key}/0`;c(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${n}`}):this._resource=this._parent.resource.getDerivedResource({url:n})}Object.defineProperties(o_.prototype,{resource:{get:function(){return this._resource}},header:{get:function(){return this._header}},values:{get:function(){if(c(this._values)){if(c(this._values.attributeValues))return this._values.attributeValues;if(c(this._values.objectIds))return this._values.objectIds}return[]}},name:{get:function(){return this._storageInfo.name}}});function D4(e){return e==="UInt8"||e==="Int8"?1:e==="UInt16"||e==="Int16"?2:e==="UInt32"||e==="Int32"||e==="Oid32"||e==="Float32"?4:e==="UInt64"||e==="Int64"||e==="Float64"?8:0}function m0t(e){return e==="String"?1:D4(e)}async function p0t(e){let t=await e._dataProvider._loadBinary(e._resource),n=new DataView(t);e._data=t,e._validateHeader(n);let i=e._parseHeader(n),o=e._getBodyOffset(i);e._validateBody(n,o),e._parseBody(n,o)}o_.prototype.load=function(){return c(this._loadPromise)?this._loadPromise:(this._loadPromise=p0t(this).catch(function(e){console.error(e)}),this._loadPromise)};o_.prototype._parseValue=function(e,t,n){let i;if(t==="UInt8")i=e.getUint8(n),n+=1;else if(t==="Int8")i=e.getInt8(n),n+=1;else if(t==="UInt16")i=e.getUint16(n,!0),n+=2;else if(t==="Int16")i=e.getInt16(n,!0),n+=2;else if(t==="UInt32")i=e.getUint32(n,!0),n+=4;else if(t==="Oid32")i=e.getUint32(n,!0),n+=4;else if(t==="Int32")i=e.getInt32(n,!0),n+=4;else if(t==="UInt64"){let o=e.getUint32(n,!0),r=e.getUint32(n+4,!0);i=o+Math.pow(2,32)*r,n+=8}else if(t==="Int64"){let o=e.getUint32(n,!0),r=e.getUint32(n+4,!0);r<Math.pow(2,31)?i=o+Math.pow(2,32)*r:i=o+Math.pow(2,32)*(r-Math.pow(2,32)),n+=8}else t==="Float32"?(i=e.getFloat32(n,!0),n+=4):t==="Float64"?(i=e.getFloat64(n,!0),n+=8):t==="String"&&(i=String.fromCharCode(e.getUint8(n)),n+=1);return{value:i,offset:n}};o_.prototype._parseHeader=function(e){let t=0;this._header={};for(let n=0;n<this._storageInfo.header.length;n++){let i=this._storageInfo.header[n],o=this._parseValue(e,i.valueType,t);this._header[i.property]=o.value,t=o.offset}return t};o_.prototype._parseBody=function(e,t){this._values={};for(let n=0;n<this._storageInfo.ordering.length;n++){let i=this._storageInfo.ordering[n],o=i==="ObjectIds"?"objectIds":i,r=this._storageInfo[o];if(c(r)){this._values[o]=[];for(let s=0;s<this._header.count;++s)if(r.valueType!=="String"){let a=this._parseValue(e,r.valueType,t);this._values[o].push(a.value),t=a.offset}else{let a=this._values.attributeByteCounts[s],l="";for(let u=0;u<a;++u){let f=this._parseValue(e,r.valueType,t);f.value.charCodeAt(0)!==0&&(l+=f.value),t=f.offset}this._values[o].push(l)}}}};o_.prototype._getBodyOffset=function(e){let t=0;return c(this._storageInfo.attributeValues)?t=D4(this._storageInfo.attributeValues.valueType):c(this._storageInfo.objectIds)&&(t=D4(this._storageInfo.objectIds.valueType)),t>0?Math.ceil(e/t)*t:e};o_.prototype._validateHeader=function(e){let t=0;for(let n=0;n<this._storageInfo.header.length;n++){let i=this._storageInfo.header[n];t+=m0t(i.valueType)}if(e.byteLength<t)throw new ie(`Invalid attribute buffer size (field: ${this.name}, header: ${t}, actual: ${e.byteLength})`)};o_.prototype._validateBody=function(e,t){if(!c(this._header.count))throw new ie(`Invalid attribute buffer (field: ${this.name}, count is missing)`);let n;for(let i=0;i<this._storageInfo.ordering.length&&t<e.byteLength;i++){let o=this._storageInfo.ordering[i],r=o==="ObjectIds"?"objectIds":o,s=this._storageInfo[r];if(c(s))if(s.valueType!=="String"){r==="attributeByteCounts"&&(n=t);let a=D4(s.valueType);t+=a*this._header.count}else{if(!c(n))throw new ie(`Invalid attribute buffer (field: ${this.name}, attributeByteCounts is missing)`);for(let a=0;a<this._header.count&&t<e.byteLength;++a){let l=this._parseValue(e,this._storageInfo.attributeByteCounts.valueType,n);t+=l.value,n=l.offset}}else throw new ie(`Invalid attribute buffer (field: ${this.name}, ${r} is missing)`)}if(e.byteLength<t)throw new ie(`Invalid attribute buffer size (field: ${this.name}, expected: ${t}, actual: ${e.byteLength})`)};var I4=o_;function VI(e,t){let n=e._dataProvider,i=e._layer,o;c(e._nodeIndex)?o=i.resource.getDerivedResource({url:`nodes/${e._data.mesh.geometry.resource}/${t}`}):o=e.resource.getDerivedResource({url:t}),this._parent=e,this._dataProvider=n,this._layer=i,this._resource=o,this._customAttributes=void 0}Object.defineProperties(VI.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},customAttributes:{get:function(){return this._customAttributes}}});VI.prototype.load=function(){let e=this;return this._dataProvider._loadBinary(this._resource).then(function(t){return e._data=t,t})};var _0t=new d,g0t=new d,y0t=new d,b0t=new d,x0t=new d;function bX(e,t,n,i){let o=d.subtract(i,n,_0t),r=d.cross(o,d.subtract(e,n,g0t),b0t),s=d.cross(o,d.subtract(t,n,y0t),x0t);return d.dot(r,s)>=0}var T0t=new d,C0t=new d,E0t=new d,w0t=new d,S0t=new d,A0t=new d,v0t=new d,D0t=new d,I0t=new d,O0t=new d;VI.prototype.getClosestPointIndexOnTriangle=function(e,t,n){if(c(this._customAttributes)&&c(this._customAttributes.positions)){let i=new d(e,t,n);i.x-=this._customAttributes.cartesianCenter.x,i.y-=this._customAttributes.cartesianCenter.y,i.z-=this._customAttributes.cartesianCenter.z,q.multiplyByVector(this._customAttributes.parentRotation,i,i);let o=Number.MAX_VALUE,r,s,a,l,u=this._customAttributes.positions,f=this._customAttributes.indices,h;c(f)?h=f.length:h=u.length/3;for(let m=0;m<h;m++){let p,_,b;c(f)?(p=f[m],_=f[m+1],b=f[m+2]):(p=m*3,_=m*3+1,b=m*3+2);let x=d.fromElements(u[p*3],u[p*3+1],u[p*3+2],T0t),T=d.fromElements(u[_*3],u[_*3+1],u[_*3+2],C0t),E=new d(u[b*3],u[b*3+1],u[b*3+2],E0t);if(!bX(i,x,T,E)||!bX(i,T,x,E)||!bX(i,E,x,T))continue;let S=d.subtract(T,x,w0t),A=d.subtract(E,x,S0t),v=d.cross(S,A,A0t);if(d.magnitude(v)===0)continue;let D=d.normalize(v,v0t),R=d.subtract(i,x,D0t),P=Math.abs(d.dot(R,D));if(P<o){o=P,r=m;let L=d.magnitudeSquared(d.subtract(i,x,R)),F=d.magnitudeSquared(d.subtract(i,T,I0t)),y=d.magnitudeSquared(d.subtract(i,E,O0t));L<F&&L<y?(a=p,l=x,s=L):F<y?(a=_,l=T,s=F):(a=b,l=E,s=y)}}if(c(r))return{index:a,distanceSquared:s,distance:Math.sqrt(s),queriedPosition:i,closestPosition:d.clone(l)}}return{index:-1,distanceSquared:Number.Infinity,distance:Number.Infinity}};function nxe(e){let t=[],n=e.length;for(let i=0;i<n;i++)i<3?t.push(Vw(e[i])):t.push(e[i]);return t}VI.prototype._generateGltf=function(e,t,n,i,o,r,s,a){let l={pbrMetallicRoughness:{metallicFactor:0},doubleSided:!0,name:"Material"},u=!1,f,h="";if(c(this._parent._data.mesh)&&c(this._layer._data.materialDefinitions)){let S=this._parent._data.mesh.material.definition;if(S>=0&&S<this._layer._data.materialDefinitions.length){if(f=this._layer._data.materialDefinitions[S],l=f,c(l.pbrMetallicRoughness)&&c(l.pbrMetallicRoughness.baseColorTexture)){u=!0,l.pbrMetallicRoughness.baseColorTexture.index=0;let A="0";if(c(this._layer._data.textureSetDefinitions))for(let v=0;v<this._layer._data.textureSetDefinitions.length;v++){let D=this._layer._data.textureSetDefinitions[v];for(let R=0;R<D.formats.length;R++){let P=D.formats[R];if(P.format==="jpg"){A=P.name;break}}}c(this._parent._data.mesh)&&this._parent._data.mesh.material.resource>=0&&(h=this._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.material.resource}/textures/${A}`}).url)}c(l.pbrMetallicRoughness)&&c(l.pbrMetallicRoughness.baseColorFactor)&&(l.pbrMetallicRoughness.baseColorFactor=nxe(l.pbrMetallicRoughness.baseColorFactor)),c(l.emissiveFactor)&&(l.emissiveFactor=nxe(l.emissiveFactor))}}else c(this._parent._data.textureData)&&(u=!0,h=this._parent.resource.getDerivedResource({url:`${this._parent._data.textureData[0].href}`}).url,l.pbrMetallicRoughness.baseColorTexture={index:0});c(l.alphaMode)&&(l.alphaMode=l.alphaMode.toUpperCase());let m=[],p=[],_=[];u&&(m=[{sampler:0,source:0}],p=[{uri:h}],_=[{magFilter:9729,minFilter:9986,wrapS:10497,wrapT:10497}]);let b=[],x=n.length;for(let E=0;E<x;E++){let S=n[E].primitives,A=S.length;for(let v=0;v<A;v++){let D=S[v];if(c(D.material)){for(;D.material>=b.length;){let P=ze(l,!0);b.push(P)}let R=b[D.material];c(D.extra)&&D.extra.isTransparent?c(R.alphaMode)||(R.alphaMode="BLEND"):R.alphaMode==="BLEND"&&(R.alphaMode="OPAQUE")}}}return{scene:0,scenes:[{nodes:e}],nodes:t,meshes:n,buffers:i,bufferViews:o,accessors:r,materials:b,textures:m,images:p,samplers:_,asset:{version:"2.0"},extensions:s,extensionsUsed:a}};var HI=VI;function Za(e,t,n){let i,o,r,s;n?(i=0,o=e):(i=e._level+1,o=e._layer),typeof t=="number"?r=t:s=e.resource.getDerivedResource({url:`${t}/`}),this._parent=e,this._dataProvider=e._dataProvider,this._isRoot=n,this._level=i,this._layer=o,this._nodeIndex=r,this._resource=s,this._isLoading=!1,this._tile=void 0,this._data=void 0,this._geometryData=[],this._featureData=[],this._fields={},this._children=[],this._childrenReadyPromise=void 0,this._globalTransform=void 0,this._inverseGlobalTransform=void 0,this._inverseRotationMatrix=void 0,this._symbologyData=void 0}Object.defineProperties(Za.prototype,{resource:{get:function(){return this._resource}},layer:{get:function(){return this._layer}},parent:{get:function(){return this._parent}},children:{get:function(){return this._children}},geometryData:{get:function(){return this._geometryData}},featureData:{get:function(){return this._featureData}},fields:{get:function(){return this._fields}},tile:{get:function(){return this._tile}},data:{get:function(){return this._data}}});Za.prototype.load=async function(){let e=this;function t(){if(!e._isRoot){let o=e._create3DTileDefinition();e._tile=new ad(e._layer._tileset,e._dataProvider.resource,o,e._parent._tile),e._tile._i3sNode=e}}if(!c(this._nodeIndex)){let o=await bm.loadJson(this._resource);e._data=o,t();return}let n=await this._layer._getNodeInNodePages(this._nodeIndex);e._data=n;let i;e._isRoot?i="nodes/root/":c(n.mesh)&&(i=`../${n.mesh.geometry.resource}/`),c(i)&&c(e._parent.resource)&&(e._resource=e._parent.resource.getDerivedResource({url:i})),t()};function ixe(e,t){let n=new I4(e,t);return e._fields[t.name]=n,n.load()}Za.prototype.loadFields=function(){let e=this._layer._data.attributeStorageInfo,t=[];if(c(e))for(let n=0;n<e.length;n++){let i=e[n],o=this._fields[i.name];c(o)?t.push(o.load()):t.push(ixe(this,i))}return Promise.all(t)};Za.prototype.loadField=function(e){C.defined("name",e);let t=this._fields[e];if(c(t))return t.load();let n=this._layer._data.attributeStorageInfo;if(c(n))for(let i=0;i<n.length;i++){let o=n[i];if(o.name===e)return ixe(this,o)}return Promise.resolve()};Za.prototype.getFieldsForPickedPosition=function(e){let t=this.geometryData[0];if(!c(t.customAttributes.featureIndex))return{};let n=t.getClosestPointIndexOnTriangle(e.x,e.y,e.z);if(n.index===-1||n.index>t.customAttributes.featureIndex.length)return{};let i=t.customAttributes.featureIndex[n.index];return this.getFieldsForFeature(i)};Za.prototype.getFieldsForFeature=function(e){let t={};for(let n in this.fields)if(this.fields.hasOwnProperty(n)){let i=this.fields[n];e>=0&&e<i.values.length&&(t[i.name]=i.values[e])}return t};Za.prototype._loadChildren=function(){let e=this;if(c(this._childrenReadyPromise))return this._childrenReadyPromise;let t=[];if(c(e._data.children))for(let n=0;n<e._data.children.length;n++){let i=e._data.children[n],o=new Za(e,g(i.href,i),!1);e._children.push(o),t.push(o.load())}return this._childrenReadyPromise=Promise.all(t).then(function(){for(let n=0;n<e._children.length;n++)e._tile.children.push(e._children[n]._tile)}),this._childrenReadyPromise};Za.prototype._loadGeometryData=function(){let e=[];if(c(this._data.geometryData))for(let t=0;t<this._data.geometryData.length;t++){let n=new HI(this,this._data.geometryData[t].href);this._geometryData.push(n),e.push(n.load())}else if(c(this._data.mesh)){let t=this._layer._findBestGeometryBuffers(this._data.mesh.geometry.definition,["position","uv0"]),n=`./geometries/${t.bufferIndex}/`,i=new HI(this,n);i._geometryDefinitions=t.definition,i._geometryBufferInfo=t.geometryBufferInfo,this._geometryData.push(i),e.push(i.load())}return Promise.all(e)};Za.prototype._loadFeatureData=function(){let e=[];if(c(this._data.featureData))for(let t=0;t<this._data.featureData.length;t++){let n=new v4(this,this._data.featureData[t].href);this._featureData.push(n),e.push(n.load())}return Promise.all(e)};Za.prototype._clearGeometryData=function(){this._geometryData=[]};Za.prototype._create3DTileDefinition=function(){let e=this._data.obb,t=this._data.mbs;if(!c(e)&&!c(t)){console.error("Failed to load I3S node. Bounding volume is required.");return}let n;if(c(e)?n=re.fromDegrees(e.center[0],e.center[1],e.center[2]):n=re.fromDegrees(t[0],t[1],t[2]),c(this._dataProvider._geoidDataList)&&c(n))for(let T=0;T<this._dataProvider._geoidDataList.length;T++){let E=this._dataProvider._geoidDataList[T],S=E.projection.project(n);if(S.x>E.nativeExtent.west&&S.x<E.nativeExtent.east&&S.y>E.nativeExtent.south&&S.y<E.nativeExtent.north){n.height+=L0t(S.x,S.y,E);break}}let i={},o,r=0;c(e)?(i={box:[0,0,0,e.halfSize[0],0,0,0,e.halfSize[1],0,0,0,e.halfSize[2]]},r=Math.max(Math.max(this._data.obb.halfSize[0],this._data.obb.halfSize[1]),this._data.obb.halfSize[2]),o=Z.WGS84.cartographicToCartesian(n)):(i={sphere:[0,0,0,t[3]]},o=Z.WGS84.cartographicToCartesian(n),r=this._data.mbs[3]),r*=2;let s=1/0;if(c(this._data.lodThreshold))if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThresholdSQ"){let T=Math.sqrt(this._data.lodThreshold/(Math.PI*.25));s=r/T}else if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThreshold"){let T=this._data.lodThreshold;s=r/T}else console.error("Invalid lodSelectionMetricType in Layer");else if(c(this._data.lodSelection))for(let T=0;T<this._data.lodSelection.length;T++)this._data.lodSelection[T].metricType==="maxScreenThreshold"&&(s=r/this._data.lodSelection[T].maxError);s===1/0&&(s=1e5);let a=s*16,l=new Hc(0,0,0),u=Lt.headingPitchRollQuaternion(o,l);c(this._data.obb)&&(u=new ve(this._data.obb.quaternion[0],this._data.obb.quaternion[1],this._data.obb.quaternion[2],this._data.obb.quaternion[3]));let f=q.fromQuaternion(u),h=q.inverse(f,new q),m=new N(f[0],f[1],f[2],0,f[3],f[4],f[5],0,f[6],f[7],f[8],0,o.x,o.y,o.z,1),p=N.inverse(m,new N),_=N.clone(m);c(this._parent._globalTransform)&&N.multiply(m,this._parent._inverseGlobalTransform,_),this._globalTransform=m,this._inverseGlobalTransform=p,this._inverseRotationMatrix=h;let b=[];for(let T=0;T<this._children.length;T++)b.push(this._children[T]._create3DTileDefinition());return{children:b,refine:"REPLACE",boundingVolume:i,transform:[_[0],_[4],_[8],_[12],_[1],_[5],_[9],_[13],_[2],_[6],_[10],_[14],_[3],_[7],_[11],_[15]],content:{uri:c(this._resource)?this._resource.url:void 0},geometricError:a}};Za.prototype._loadSymbology=async function(){!c(this._symbologyData)&&c(this._layer._symbology)&&(this._symbologyData=await this._layer._symbology._getSymbology(this))};Za.prototype._createContentURL=async function(){let e={scene:0,scenes:[{nodes:[0]}],nodes:[{name:"singleNode"}],meshes:[],buffers:[],bufferViews:[],accessors:[],materials:[],textures:[],images:[],samplers:[],asset:{version:"2.0"}},t=[this._loadGeometryData()];if(this._dataProvider.legacyVersion16&&t.push(this._loadFeatureData()),await Promise.all(t),c(this._geometryData)&&this._geometryData.length>0){this._dataProvider._applySymbology&&await this._loadSymbology();let o=this._geometryData[0].resource.url,r=this._layer._data.store.defaultGeometrySchema,s=this._geometryData[0],a=await A4.decode(o,r,s,this._featureData[0],this._symbologyData);if(!c(a))return;e=s._generateGltf(a.meshData.nodesInScene,a.meshData.nodes,a.meshData.meshes,a.meshData.buffers,a.meshData.bufferViews,a.meshData.accessors,a.meshData.rootExtensions,a.meshData.extensionsUsed),this._geometryData[0]._customAttributes=a.meshData._customAttributes}let n=this._dataProvider._binarizeGltf(e),i=new Blob([n],{type:"application/binary"});return URL.createObjectURL(i)};async function P0t(e){let t=e._layer._filters,n=[];for(let i=0;i<t.length;i++){let o=e.loadField(t[i].name);n.push(o)}return await Promise.all(n),t}function R0t(e,t,n){if(!c(n.values)||n.values.length===0)return!1;let i=c(t)?t.values:[],o;e<i.length&&(o=i[e]);let r=!1;for(let s=0;s<n.values.length;s++)if(n.values[s]===o){r=!0;break}return r}async function oxe(e,t){let n=e._tile.content.batchTable;if(c(n)&&n.featuresLength>0){n.setAllShow(!0);let i=await P0t(e);if(i.length>0)for(let o=0;o<n.featuresLength;o++)for(let r=0;r<i.length;r++){let s=i[r];if(!R0t(o,e._fields[s.name],s)){n.setShow(o,!1);break}}}t.show=!0}Za.prototype._filterFeatures=function(){var n,i;let e=[];for(let o=0;o<this._children.length;o++){let r=this._children[o]._filterFeatures();e.push(r)}let t=(i=(n=this._tile)==null?void 0:n.content)==null?void 0:i._model;if(c(this._geometryData)&&this._geometryData.length>0&&c(t)&&t.ready){t.show=!1;let o=oxe(this,t);e.push(o)}return Promise.all(e)};ad.prototype._hookedRequestContent=ad.prototype.requestContent;ad.prototype.requestContent=function(){if(!this.tileset._isI3STileSet)return this._hookedRequestContent();if(!this._isLoading){this._isLoading=!0;let e=this;return this._i3sNode._createContentURL().then(t=>{if(!c(t)){e._isLoading=!1;return}return e._contentResource=new Te({url:t}),e._hookedRequestContent()}).then(t=>{let n=t==null?void 0:t._model;return c(e._i3sNode._geometryData)&&e._i3sNode._geometryData.length>0&&c(n)&&(n.show=!1,n.readyEvent.addEventListener(()=>{oxe(e._i3sNode,n)})),e._isLoading=!1,t})}};function M0t(e,t,n,i,o,r){let s=n*(1-e)+i*e,a=o*(1-e)+r*e;return s*(1-t)+a*t}function O4(e,t,n,i){let o=e+t*n;return i[o]}function L0t(e,t,n){let i=n.nativeExtent,o=(e-i.west)/(i.east-i.west)*(n.width-1),r=(t-i.south)/(i.north-i.south)*(n.height-1),s=Math.floor(o),a=Math.floor(r);o-=s,r-=a;let l=s<n.width?s+1:s,u=a<n.height?a+1:a;a=n.height-1-a,u=n.height-1-u;let f=O4(s,a,n.width,n.buffer),h=O4(l,a,n.width,n.buffer),m=O4(s,u,n.width,n.buffer),p=O4(l,u,n.width,n.buffer),_=M0t(o,r,f,h,m,p);return _=_*n.scale+n.offset,_}Object.defineProperties(ad.prototype,{i3sNode:{get:function(){return this._i3sNode}}});var GI=Za;function P4(e){this._layer=e,this._defaultSymbology=void 0,this._valueFields=[],this._uniqueValueHash=void 0,this._classBreaksHash=void 0,this._parseLayerSymbology()}Object.defineProperties(P4.prototype,{defaultSymbology:{get:function(){return this._defaultSymbology}}});function xX(e,t){let n=[];for(let i=0;i<e.length;i++){let o=z.byteToFloat(e[i]);i<3?n.push(Vw(o)):n.push(o)}return n.length===3&&(c(t)?n.push(1-t/100):n.push(1)),n}function jw(e,t){let n={edges:void 0,material:void 0};if(c(e)&&c(e.symbolLayers))for(let i=0;i<e.symbolLayers.length;i++){let o=e.symbolLayers[i];if(o.type==="Fill"){let r=o.edges,s=o.outline;if(c(r)?(n.edges={},c(r.color)&&(n.edges.color=xX(r.color,r.transparency))):c(s)&&(n.edges={},c(s.color)&&(n.edges.color=xX(s.color,s.transparency))),!t){let a=o.material;c(a)&&(n.material={colorMixMode:a.colorMixMode},c(a.color)&&(n.material.color=xX(a.color,a.transparency)))}break}}return n}function N0t(e,t){if(c(e.uniqueValueGroups)){let n={};for(let i=0;i<e.uniqueValueGroups.length;i++){let o=e.uniqueValueGroups[i].classes;if(c(o))for(let r=0;r<o.length;r++){let s=jw(o[r].symbol,t),a=o[r].values;for(let l=0;l<a.length;l++){let u=a[l],f=n;for(let h=0;h<u.length;h++){let m=u[h];h===u.length-1?f[m]=s:(c(f[m])||(f[m]={}),f=f[m])}}}}return n}if(c(e.uniqueValueInfos)){let n={};for(let i=0;i<e.uniqueValueInfos.length;i++){let o=e.uniqueValueInfos[i];n[o.value]=jw(o.symbol,t)}return n}}function F0t(e,t){if(c(e.classBreakInfos)){let n=[...e.classBreakInfos];n.sort(function(o,r){let s=g(o.classMaxValue,o.classMinValue),a=g(r.classMaxValue,r.classMinValue);return s-a});let i={ranges:[],symbols:[]};c(e.minValue)&&(i.ranges.push(e.minValue),i.symbols.push(void 0));for(let o=0;o<n.length;o++){let r=n[o];c(r.classMinValue)&&(i.ranges.length===0||r.classMinValue>i.ranges[i.ranges.length-1])&&(i.ranges.push(r.classMinValue),i.symbols.push(void 0)),c(r.classMaxValue)&&(i.ranges.length===0||r.classMaxValue>i.ranges[i.ranges.length-1])&&(i.ranges.push(r.classMaxValue),i.symbols.push(jw(r.symbol,t)))}return i.symbols.push(void 0),i}}P4.prototype._parseLayerSymbology=function(){let e=this._layer.data.drawingInfo;if(c(e)&&c(e.renderer)){let t=this._layer.data.cachedDrawingInfo,n=c(t)&&t.color===!0,i=e.renderer;i.type==="simple"?this._defaultSymbology=jw(i.symbol,n):i.type==="uniqueValue"?(this._defaultSymbology=jw(i.defaultSymbol,n),this._valueFields.push(i.field1),c(i.field2)&&this._valueFields.push(i.field2),c(i.field3)&&this._valueFields.push(i.field3),this._uniqueValueHash=N0t(i,n)):i.type==="classBreaks"&&(this._defaultSymbology=jw(i.defaultSymbol,n),this._valueFields.push(i.field),this._classBreaksHash=F0t(i,n))}};function rxe(e,t,n,i){let o=t[n];if(i<o.length){let r=o[i],s=e[r];return c(s)&&++n<t.length?rxe(s,t,n,i):s}}function B0t(e,t){let n=0,i=e.length;if(n<i)do{let o=n+i>>>1;e[o]<t?n=o+1:i=o}while(n<i);return n}function k0t(e,t,n){let i=t[n],o=B0t(e.ranges,i);return e.symbols[o]}P4.prototype._getSymbology=async function(e){let t={default:this._defaultSymbology};if(this._valueFields.length>0){let n=[];for(let r=0;r<this._valueFields.length;r++)n.push(e.loadField(this._valueFields[r]));await Promise.all(n);let i=[];for(let r=0;r<this._valueFields.length;r++)i.push(e.fields[this._valueFields[r]].values);let o;if(c(this._uniqueValueHash)?o=r=>rxe(this._uniqueValueHash,i,0,r):c(this._classBreaksHash)&&(o=r=>k0t(this._classBreaksHash,i[0],r)),c(o)){let r=i[0];for(let s=0;s<r.length;s++){let a=o(s);c(a)&&(t[s]=a)}}}return t};var R4=P4;function Cl(e,t,n){this._dataProvider=e,this._parent=n,!c(t.href)&&c(t.id)&&(t.href=`layers/${t.id}`);let i=this._parent.resource.getUrlComponent(),o="";i.match(/layers\/\d/)?o=`${i}`.replace(/\/+$/,""):o=`${i}`.replace(/\/?$/,"/").concat(`${t.href}`),this._version=t.store.version;let r=this._version.split(".");this._majorVersion=parseInt(r[0]),this._minorVersion=r.length>1?parseInt(r[1]):0,this._resource=new Te({url:o}),this._resource.setQueryParameters(this._dataProvider.resource.queryParameters),this._resource.appendForwardSlash(),this._data=t,this._rootNode=void 0,this._nodePages={},this._nodePageFetches={},this._extent=void 0,this._tileset=void 0,this._geometryDefinitions=void 0,this._filters=[],this._symbology=void 0,this._computeGeometryDefinitions(!0),this._computeExtent()}Object.defineProperties(Cl.prototype,{resource:{get:function(){return this._resource}},rootNode:{get:function(){return this._rootNode}},tileset:{get:function(){return this._tileset}},data:{get:function(){return this._data}},version:{get:function(){return this._version}},majorVersion:{get:function(){return this._majorVersion}},minorVersion:{get:function(){return this._minorVersion}},legacyVersion16:{get:function(){if(c(this.version))return this.majorVersion<1||this.majorVersion===1&&this.minorVersion<=6}}});Cl.prototype.load=async function(e){if(this._data.spatialReference.wkid!==4326)throw new ie(`Unsupported spatial reference: ${this._data.spatialReference.wkid}`);if(this._dataProvider.applySymbology&&(this._symbology=new R4(this)),await this._dataProvider.loadGeoidData(),await this._loadRootNode(e),await this._create3DTileset(e),this._rootNode._tile=this._tileset._root,this._tileset._root._i3sNode=this._rootNode,this.legacyVersion16)return this._rootNode._loadChildren()};Cl.prototype._computeGeometryDefinitions=function(e){if(this._geometryDefinitions=[],c(this._data.geometryDefinitions))for(let t=0;t<this._data.geometryDefinitions.length;t++){let n=[],i=this._data.geometryDefinitions[t].geometryBuffers;for(let o=0;o<i.length;o++){let r=i[o],s=[],a=!1;if(c(r.compressedAttributes)&&e){a=!0;let l=r.compressedAttributes.attributes;for(let u=0;u<l.length;u++)s.push(l[u])}else for(let l in r)l!=="offset"&&s.push(l);n.push({compressed:a,attributes:s,index:i.indexOf(r)})}n.sort(function(o,r){return o.compressed&&!r.compressed?-1:!o.compressed&&r.compressed?1:o.attributes.length-r.attributes.length}),this._geometryDefinitions.push(n)}};Cl.prototype._findBestGeometryBuffers=function(e,t){let n=this._geometryDefinitions[e];if(c(n)){for(let i=0;i<n.length;++i){let o=n[i],r=!1,s=o.attributes;for(let a=0;a<t.length;a++)if(!s.includes(t[a])){r=!0;break}if(!r)return{bufferIndex:o.index,definition:n,geometryBufferInfo:o}}if(c(n[0]))return{bufferIndex:0,definition:n,geometryBufferInfo:n[0]}}};Cl.prototype._loadRootNode=function(e){if(c(this._data.nodePages)){let t=0;c(this._data.nodePages.rootIndex)&&(t=this._data.nodePages.rootIndex),this._rootNode=new GI(this,t,!0)}else this._rootNode=new GI(this,this._data.store.rootNode,!0);return this._rootNode.load(e)};Cl.prototype._getNodeInNodePages=function(e){let t=Math.floor(e/this._data.nodePages.nodesPerPage),n=e%this._data.nodePages.nodesPerPage;return this._loadNodePage(t).then(function(i){return i.nodes[n]})};Cl._fetchJson=function(e){return e.fetchJson()};Cl.prototype._loadNodePage=function(e){let t=this;if(!c(this._nodePageFetches[e])){let n=this.resource.getDerivedResource({url:`nodepages/${e}/`}),i=Cl._fetchJson(n).then(function(o){return c(o.error)&&o.error.code!==200?Promise.reject(o.error):(t._nodePages[e]=o.nodes,o)});this._nodePageFetches[e]=i}return this._nodePageFetches[e]};Cl.prototype._computeExtent=function(){c(this._data.fullExtent)?this._extent=te.fromDegrees(this._data.fullExtent.xmin,this._data.fullExtent.ymin,this._data.fullExtent.xmax,this._data.fullExtent.ymax):c(this._data.store.extent)&&(this._extent=te.fromDegrees(this._data.store.extent[0],this._data.store.extent[1],this._data.store.extent[2],this._data.store.extent[3]))};Cl.prototype._create3DTileset=async function(e){var r,s,a;let t={asset:{version:"1.0"},geometricError:Number.MAX_VALUE,root:this._rootNode._create3DTileDefinition()},n=new Blob([JSON.stringify(t)],{type:"application/json"}),i=URL.createObjectURL(n),o=(a=(s=(r=this._symbology)==null?void 0:r.defaultSymbology)==null?void 0:s.edges)==null?void 0:a.color;c(o)&&!c(e==null?void 0:e.outlineColor)&&(e=c(e)?ze(e):{},e.outlineColor=z.fromCartesian4(ee.fromArray(o))),this._tileset=await ol.fromUrl(i,e),this._tileset.show=this._parent.show,this._tileset._isI3STileSet=!0,this._tileset.tileUnload.addEventListener(function(l){l._i3sNode._clearGeometryData(),URL.revokeObjectURL(l._contentResource._url),l._contentResource=l._i3sNode.resource}),this._tileset.tileVisible.addEventListener(function(l){c(l._i3sNode)&&l._i3sNode._loadChildren()})};Cl.prototype._updateVisibility=function(){c(this._tileset)&&(this._tileset.show=this._parent.show)};Cl.prototype.filterByAttributes=function(e){this._filters=c(e)?ze(e,!0):[];let t=this._rootNode;return c(t)?t._filterFeatures():Promise.resolve()};var Ww=Cl;function M4(e,t){this._dataProvider=e,this._resource=new Te({url:t}),this._resource.setQueryParameters(e.resource.queryParameters),this._resource.appendForwardSlash()}Object.defineProperties(M4.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},names:{get:function(){let e=[],t=this._data.summary;if(c(t))for(let n=0;n<t.length;++n)e.push(t[n].fieldName);return e}}});M4.prototype.load=async function(){return this._data=await bm.loadJson(this._resource),this._data};M4.prototype._getValues=function(e){let t=this._data.summary;if(c(t))for(let n=0;n<t.length;++n){let i=t[n];if(i.fieldName===e)return c(i.mostFrequentValues)?[...i.mostFrequentValues]:[]}};var L4=M4;function jI(e,t,n){this._dataProvider=e,this._parent=t,this._data=n,this._name=n.name,this._modelName=n.modelName,this._visibility=g(n.visibility,!0),this._resource=void 0,this._sublayers=[],this._i3sLayers=[]}Object.defineProperties(jI.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},name:{get:function(){return this._name}},modelName:{get:function(){return this._modelName}},sublayers:{get:function(){return this._sublayers}},visibility:{get:function(){return this._visibility},set:function(e){if(C.defined("value",e),this._visibility!==e){this._visibility=e;for(let t=0;t<this._i3sLayers.length;t++)this._i3sLayers[t]._updateVisibility()}}},show:{get:function(){return this._visibility&&this._parent.show}}});jI._fromData=async function(e,t,n,i){let o=new jI(e,i,n);if(o._data.layerType==="group"){let r=o._data.sublayers;if(c(r)){let s=[];for(let l=0;l<r.length;l++){let u=jI._fromData(e,t,r[l],o);s.push(u)}let a=await Promise.all(s);for(let l=0;l<a.length;l++){let u=a[l];o._sublayers.push(u),o._i3sLayers.push(...u._i3sLayers)}}}else if(o._data.layerType==="3DObject"){let r=t.concat(`/sublayers/${o._data.id}`),s=new Te({url:r});s.setQueryParameters(e.resource.queryParameters),s.appendForwardSlash(),o._resource=s;let a=await bm.loadJson(o._resource),l=new Ww(e,a,o);o._i3sLayers.push(l)}else console.log(`${o._data.layerType} layer ${o._data.name} is skipped as not supported.`);return o};var N4=jI;var cxe=Mr(sxe(),1);function es(e){e=g(e,g.EMPTY_OBJECT),this._name=e.name,this._show=g(e.show,!0),this._geoidTiledTerrainProvider=e.geoidTiledTerrainProvider,this._showFeatures=g(e.showFeatures,!1),this._adjustMaterialAlphaMode=g(e.adjustMaterialAlphaMode,!1),this._applySymbology=g(e.applySymbology,!1),this._calculateNormals=g(e.calculateNormals,!1),this._cesium3dTilesetOptions=g(e.cesium3dTilesetOptions,g.EMPTY_OBJECT),this._layers=[],this._sublayers=[],this._data=void 0,this._extent=void 0,this._geoidDataPromise=void 0,this._geoidDataList=void 0,this._decoderTaskProcessor=void 0,this._taskProcessorReadyPromise=void 0,this._attributeStatistics=[],this._layersExtent=[]}Object.defineProperties(es.prototype,{name:{get:function(){return this._name}},show:{get:function(){return this._show},set:function(e){if(C.defined("value",e),this._show!==e){this._show=e;for(let t=0;t<this._layers.length;t++)this._layers[t]._updateVisibility()}}},geoidTiledTerrainProvider:{get:function(){return this._geoidTiledTerrainProvider}},layers:{get:function(){return this._layers}},sublayers:{get:function(){return this._sublayers}},data:{get:function(){return this._data}},extent:{get:function(){return this._extent}},resource:{get:function(){return this._resource}},showFeatures:{get:function(){return this._showFeatures}},adjustMaterialAlphaMode:{get:function(){return this._adjustMaterialAlphaMode}},applySymbology:{get:function(){return this._applySymbology}},calculateNormals:{get:function(){return this._calculateNormals}}});es.prototype.destroy=function(){for(let e=0;e<this._layers.length;e++)c(this._layers[e]._tileset)&&this._layers[e]._tileset.destroy();return ue(this)};es.prototype.isDestroyed=function(){return!1};es.prototype.update=function(e){for(let t=0;t<this._layers.length;t++)c(this._layers[t]._tileset)&&this._layers[t]._tileset.update(e)};es.prototype.prePassesUpdate=function(e){for(let t=0;t<this._layers.length;t++)c(this._layers[t]._tileset)&&this._layers[t]._tileset.prePassesUpdate(e)};es.prototype.postPassesUpdate=function(e){for(let t=0;t<this._layers.length;t++)c(this._layers[t]._tileset)&&this._layers[t]._tileset.postPassesUpdate(e)};es.prototype.updateForPass=function(e,t){for(let n=0;n<this._layers.length;n++)c(this._layers[n]._tileset)&&this._layers[n]._tileset.updateForPass(e,t)};function U0t(e,t){let n=e.resource.getUrlComponent(),i="";return n.match(/layers\/\d/)?i=`${n}`.replace(/\/+$/,""):i=`${n}`.replace(/\/?$/,"/").concat(`layers/${t}`),i}async function axe(e,t,n){if(t.layerType==="Building"){c(n.showFeatures)||(e._showFeatures=!0),c(n.adjustMaterialAlphaMode)||(e._adjustMaterialAlphaMode=!0),c(n.applySymbology)||(e._applySymbology=!0),c(n.calculateNormals)||(e._calculateNormals=!0);let i=U0t(e,t.id);if(c(t.sublayers)){let o=[];for(let s=0;s<t.sublayers.length;s++){let a=N4._fromData(e,i,t.sublayers[s],e);o.push(a)}let r=await Promise.all(o);for(let s=0;s<r.length;s++){let a=r[s];e._sublayers.push(a),e._layers.push(...a._i3sLayers)}}if(c(t.statisticsHRef)){let o=i.concat(`/${t.statisticsHRef}`),r=new L4(e,o);await r.load(),e._attributeStatistics.push(r)}if(c(t.fullExtent)){let o=te.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax);e._layersExtent.push(o)}}else if(t.layerType==="3DObject"||t.layerType==="IntegratedMesh"){!c(n.calculateNormals)&&!c(t.textureSetDefinitions)&&(e._calculateNormals=!0);let i=new Ww(e,t,e);e._layers.push(i),c(i._extent)&&e._layersExtent.push(i._extent)}else console.log(`${t.layerType} layer ${t.name} is skipped as not supported.`)}es.fromUrl=async function(e,t){C.defined("url",e),t=g(t,g.EMPTY_OBJECT);let n=Te.createIfNeeded(e);n.setQueryParameters({f:"pjson"},!0);let i=await es.loadJson(n),o=new es(t);if(o._resource=n,o._data=i,c(i.layers)){let s=[];for(let a=0;a<i.layers.length;a++){let l=axe(o,i.layers[a],t);s.push(l)}await Promise.all(s)}else await axe(o,i,t);o._computeExtent();let r=[];for(let s=0;s<o._layers.length;s++)r.push(o._layers[s].load(t.cesium3dTilesetOptions));return await Promise.all(r),o};es._fetchJson=function(e){return e.fetchJson()};es.loadJson=async function(e){let t=await es._fetchJson(e);if(c(t.error)){if(console.error("Failed to fetch I3S ",e.url),c(t.error.message)&&console.error(t.error.message),c(t.error.details))for(let n=0;n<t.error.details.length;n++)console.log(t.error.details[n]);throw new ie(t.error)}return t};es.prototype._loadBinary=async function(e){let t=await e.fetchArrayBuffer();if(t.byteLength>0&&new Uint8Array(t)[0]===123&&new TextDecoder().decode(t).includes("404"))throw new ie(`Failed to load binary: ${e.url}`);return t};es.prototype._binarizeGltf=function(e){let n=new TextEncoder().encode(JSON.stringify(e)),i=new Uint8Array(n.byteLength+20),o={magic:new Uint8Array(i.buffer,0,4),version:new Uint32Array(i.buffer,4,1),length:new Uint32Array(i.buffer,8,1),chunkLength:new Uint32Array(i.buffer,12,1),chunkType:new Uint32Array(i.buffer,16,1),chunkData:new Uint8Array(i.buffer,20,n.byteLength)};return o.magic[0]=103,o.magic[1]=108,o.magic[2]=84,o.magic[3]=70,o.version[0]=2,o.length[0]=i.byteLength,o.chunkLength[0]=n.byteLength,o.chunkType[0]=1313821514,o.chunkData.set(n),i};var z0t=new k;function V0t(e,t){let n=e.tilingScheme,i=[],o={},r=e._lodCount,s=re.fromRadians(t.west,t.north),a=re.fromRadians(t.east,t.south),l=n.positionToTileXY(s,r),u=n.positionToTileXY(a,r);for(let h=l.x;h<=u.x;h++)for(let m=l.y;m<=u.y;m++){let p=k.fromElements(h,m,z0t),_=p.toString();if(!o.hasOwnProperty(_)){let b={x:p.x,y:p.y,level:r,tilingScheme:n,terrainProvider:e,positions:[]};o[_]=b,i.push(b)}}let f=[];for(let h=0;h<i.length;++h){let m=i[h],p=m.terrainProvider.requestTileGeometry(m.x,m.y,m.level);f.push(p)}return Promise.all(f).then(function(h){let m=[];for(let p=0;p<h.length;p++){let _={tilingScheme:n,x:i[p].x,y:i[p].y,level:i[p].level},b=h[p],x="Geographic";n._projection instanceof Si&&(x="WebMercator");let T={projectionType:x,projection:n._projection,nativeExtent:n.tileXYToNativeRectangle(_.x,_.y,_.level),height:b._height,width:b._width,scale:b._structure.heightScale,offset:b._structure.heightOffset};if(b._encoding===Id.LERC){let E=cxe.default.decode(b._buffer);T.buffer=E.pixels[0]}else T.buffer=b._buffer;m.push(T)}return m})}async function H0t(e){let t=e._geoidTiledTerrainProvider;if(c(t))try{let n=await V0t(t,e._extent);e._geoidDataList=n}catch{console.log("Error retrieving Geoid Terrain tiles - no geoid conversion will be performed.")}}es.prototype.loadGeoidData=async function(){return c(this._geoidDataPromise)?this._geoidDataPromise:(this._geoidDataPromise=H0t(this),this._geoidDataPromise)};es.prototype._computeExtent=function(){let e;for(let t=0;t<this._layersExtent.length;t++){let n=this._layersExtent[t];c(e)?te.union(e,n,e):e=te.clone(n)}this._extent=e};es.prototype.getAttributeNames=function(){let e=[];for(let t=0;t<this._attributeStatistics.length;++t)e.push(...this._attributeStatistics[t].names);return e};es.prototype.getAttributeValues=function(e){C.defined("name",e);for(let t=0;t<this._attributeStatistics.length;++t){let n=this._attributeStatistics[t]._getValues(e);if(c(n))return n}return[]};es.prototype.filterByAttributes=function(e){let t=[];for(let n=0;n<this._layers.length;n++){let i=this._layers[n].filterByAttributes(e);t.push(i)}return Promise.all(t)};var bm=es;function lxe(){}Object.defineProperties(lxe.prototype,{color:{get:w.throwInstantiationError},intensity:{get:w.throwInstantiationError}});var uxe=lxe;var G0t=/\/$/,fxe=new St('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function qw(e){e=g(e,g.EMPTY_OBJECT);let t=e.styleId;if(!c(t))throw new w("options.styleId is required.");let n=e.accessToken;if(!c(n))throw new w("options.accessToken is required.");this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let i=Te.createIfNeeded(g(e.url,"https://api.mapbox.com/styles/v1/"));this._styleId=t,this._accessToken=n;let o=g(e.tilesize,512);this._tilesize=o;let r=g(e.username,"mapbox");this._username=r;let s=c(e.scaleFactor)?"@2x":"",a=i.getUrlComponent();G0t.test(a)||(a+="/"),a+=`${this._username}/${t}/tiles/${this._tilesize}/{z}/{x}/{y}${s}`,i.url=a,i.setQueryParameters({access_token:n});let l;c(e.credit)?(l=e.credit,typeof l=="string"&&(l=new St(l))):l=fxe,this._resource=i,this._imageryProvider=new qa({url:i,credit:l,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(qw.prototype,{url:{get:function(){return this._imageryProvider.url}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});qw.prototype.getTileCredits=function(e,t,n){};qw.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};qw.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};qw._defaultCredit=fxe;var dxe=qw;function TX(e){}TX.prototype.isReady=function(){return!0};TX.prototype.shouldDiscardImage=function(e){return!1};var hxe=TX;var j0t=new St("MapQuest, Open Street Map and contributors, CC-BY-SA");function B4(e){e=g(e,g.EMPTY_OBJECT);let t=Te.createIfNeeded(g(e.url,"https://tile.openstreetmap.org/"));t.appendForwardSlash(),t.url+=`{z}/{x}/{y}${e.retinaTiles?"@2x":""}.${g(e.fileExtension,"png")}`;let n=new Qr({ellipsoid:e.ellipsoid}),i=256,o=256,r=g(e.minimumLevel,0),s=e.maximumLevel,a=g(e.rectangle,n.rectangle),l=n.positionToTileXY(te.southwest(a),r),u=n.positionToTileXY(te.northeast(a),r),f=(Math.abs(u.x-l.x)+1)*(Math.abs(u.y-l.y)+1);if(f>4)throw new w(`The rectangle and minimumLevel indicate that there are ${f} tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.`);let h=g(e.credit,j0t);typeof h=="string"&&(h=new St(h)),qa.call(this,{url:t,credit:h,tilingScheme:n,tileWidth:i,tileHeight:o,minimumLevel:r,maximumLevel:s,rectangle:a})}c(Object.create)&&(B4.prototype=Object.create(qa.prototype),B4.prototype.constructor=B4);var mxe=B4;var W0t=new k(1,1);function CX(e){e=g(e,g.EMPTY_OBJECT),this.mass=g(e.mass,1),this.position=d.clone(g(e.position,d.ZERO)),this.velocity=d.clone(g(e.velocity,d.ZERO)),this.life=g(e.life,Number.MAX_VALUE),this.image=e.image,this.startColor=z.clone(g(e.startColor,z.WHITE)),this.endColor=z.clone(g(e.endColor,z.WHITE)),this.startScale=g(e.startScale,1),this.endScale=g(e.endScale,1),this.imageSize=k.clone(g(e.imageSize,W0t)),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(CX.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var pxe=new d;CX.prototype.update=function(e,t){return d.multiplyByScalar(this.velocity,e,pxe),d.add(this.position,pxe,this.position),c(t)&&t(this,e),this._age+=e,this.life===Number.MAX_VALUE?this._normalizedAge=0:this._normalizedAge=this._age/this.life,this._age<=this.life};var WI=CX;function _xe(e){e=g(e,g.EMPTY_OBJECT),this.time=g(e.time,0),this.minimum=g(e.minimum,0),this.maximum=g(e.maximum,50),this._complete=!1}Object.defineProperties(_xe.prototype,{complete:{get:function(){return this._complete}}});var gxe=_xe;function yxe(e){throw new w("This type should not be instantiated directly. Instead, use BoxEmitter, CircleEmitter, ConeEmitter or SphereEmitter.")}yxe.prototype.emit=function(e){w.throwInstantiationError()};var bxe=yxe;var xxe=new k(1,1);function qI(e){e=g(e,g.EMPTY_OBJECT),this.show=g(e.show,!0),this.updateCallback=e.updateCallback,this.loop=g(e.loop,!0),this.image=g(e.image,void 0);let t=e.emitter;c(t)||(t=new T4(.5)),this._emitter=t,this._bursts=e.bursts,this._modelMatrix=N.clone(g(e.modelMatrix,N.IDENTITY)),this._emitterModelMatrix=N.clone(g(e.emitterModelMatrix,N.IDENTITY)),this._matrixDirty=!0,this._combinedMatrix=new N,this._startColor=z.clone(g(e.color,g(e.startColor,z.WHITE))),this._endColor=z.clone(g(e.color,g(e.endColor,z.WHITE))),this._startScale=g(e.scale,g(e.startScale,1)),this._endScale=g(e.scale,g(e.endScale,1)),this._emissionRate=g(e.emissionRate,5),this._minimumSpeed=g(e.speed,g(e.minimumSpeed,1)),this._maximumSpeed=g(e.speed,g(e.maximumSpeed,1)),this._minimumParticleLife=g(e.particleLife,g(e.minimumParticleLife,5)),this._maximumParticleLife=g(e.particleLife,g(e.maximumParticleLife,5)),this._minimumMass=g(e.mass,g(e.minimumMass,1)),this._maximumMass=g(e.mass,g(e.maximumMass,1)),this._minimumImageSize=k.clone(g(e.imageSize,g(e.minimumImageSize,xxe))),this._maximumImageSize=k.clone(g(e.imageSize,g(e.maximumImageSize,xxe))),this._sizeInMeters=g(e.sizeInMeters,!1),this._lifetime=g(e.lifetime,Number.MAX_VALUE),this._billboardCollection=void 0,this._particles=[],this._particlePool=[],this._previousTime=void 0,this._currentTime=0,this._carryOver=0,this._complete=new fe,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0}Object.defineProperties(qI.prototype,{emitter:{get:function(){return this._emitter},set:function(e){C.defined("value",e),this._emitter=e}},bursts:{get:function(){return this._bursts},set:function(e){this._bursts=e,this._updateParticlePool=!0}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){C.defined("value",e),this._matrixDirty=this._matrixDirty||!N.equals(this._modelMatrix,e),N.clone(e,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(e){C.defined("value",e),this._matrixDirty=this._matrixDirty||!N.equals(this._emitterModelMatrix,e),N.clone(e,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(e){C.defined("value",e),z.clone(e,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(e){C.defined("value",e),z.clone(e,this._endColor)}},startScale:{get:function(){return this._startScale},set:function(e){C.typeOf.number.greaterThanOrEquals("value",e,0),this._startScale=e}},endScale:{get:function(){return this._endScale},set:function(e){C.typeOf.number.greaterThanOrEquals("value",e,0),this._endScale=e}},emissionRate:{get:function(){return this._emissionRate},set:function(e){C.typeOf.number.greaterThanOrEquals("value",e,0),this._emissionRate=e,this._updateParticlePool=!0}},minimumSpeed:{get:function(){return this._minimumSpeed},set:function(e){C.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumSpeed=e}},maximumSpeed:{get:function(){return this._maximumSpeed},set:function(e){C.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumSpeed=e}},minimumParticleLife:{get:function(){return this._minimumParticleLife},set:function(e){C.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumParticleLife=e}},maximumParticleLife:{get:function(){return this._maximumParticleLife},set:function(e){C.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumParticleLife=e,this._updateParticlePool=!0}},minimumMass:{get:function(){return this._minimumMass},set:function(e){C.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumMass=e}},maximumMass:{get:function(){return this._maximumMass},set:function(e){C.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumMass=e}},minimumImageSize:{get:function(){return this._minimumImageSize},set:function(e){C.typeOf.object("value",e),C.typeOf.number.greaterThanOrEquals("value.x",e.x,0),C.typeOf.number.greaterThanOrEquals("value.y",e.y,0),this._minimumImageSize=e}},maximumImageSize:{get:function(){return this._maximumImageSize},set:function(e){C.typeOf.object("value",e),C.typeOf.number.greaterThanOrEquals("value.x",e.x,0),C.typeOf.number.greaterThanOrEquals("value.y",e.y,0),this._maximumImageSize=e}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){C.typeOf.bool("value",e),this._sizeInMeters=e}},lifetime:{get:function(){return this._lifetime},set:function(e){C.typeOf.number.greaterThanOrEquals("value",e,0),this._lifetime=e}},complete:{get:function(){return this._complete}},isComplete:{get:function(){return this._isComplete}}});function q0t(e){let t=e._emissionRate,n=e._maximumParticleLife,i=0,o=e._bursts;if(c(o)){let h=o.length;for(let m=0;m<h;++m)i+=o[m].maximum}let r=e._billboardCollection,s=e.image,a=Math.ceil(t*n+i),l=e._particles,u=e._particlePool,f=Math.max(a-l.length-u.length,0);for(let h=0;h<f;++h){let m=new WI;m._billboard=r.add({image:s,show:!1}),u.push(m)}e._particleEstimate=a}function Y0t(e){let t=e._particlePool.pop();return c(t)||(t=new WI),t}function X0t(e,t){e._particlePool.push(t)}function K0t(e){let t=e._particles,n=e._particlePool,i=e._billboardCollection,o=t.length,r=n.length,s=e._particleEstimate,a=r-Math.max(s-o-r,0);for(let l=a;l<r;++l){let u=n[l];i.remove(u._billboard)}n.length=a}function $0t(e){c(e._billboard)&&(e._billboard.show=!1)}function Txe(e,t){let n=t._billboard;c(n)||(n=t._billboard=e._billboardCollection.add({image:t.image})),n.width=t.imageSize.x,n.height=t.imageSize.y,n.position=t.position,n.sizeInMeters=e.sizeInMeters,n.show=!0;let i=O.lerp(t.startColor.red,t.endColor.red,t.normalizedAge),o=O.lerp(t.startColor.green,t.endColor.green,t.normalizedAge),r=O.lerp(t.startColor.blue,t.endColor.blue,t.normalizedAge),s=O.lerp(t.startColor.alpha,t.endColor.alpha,t.normalizedAge);n.color=new z(i,o,r,s),n.scale=O.lerp(t.startScale,t.endScale,t.normalizedAge)}function Z0t(e,t){t.startColor=z.clone(e._startColor,t.startColor),t.endColor=z.clone(e._endColor,t.endColor),t.startScale=e._startScale,t.endScale=e._endScale,t.image=e.image,t.life=O.randomBetween(e._minimumParticleLife,e._maximumParticleLife),t.mass=O.randomBetween(e._minimumMass,e._maximumMass),t.imageSize.x=O.randomBetween(e._minimumImageSize.x,e._maximumImageSize.x),t.imageSize.y=O.randomBetween(e._minimumImageSize.y,e._maximumImageSize.y),t._normalizedAge=0,t._age=0;let n=O.randomBetween(e._minimumSpeed,e._maximumSpeed);d.multiplyByScalar(t.velocity,n,t.velocity),e._particles.push(t)}function J0t(e,t){if(e._isComplete)return 0;t=O.mod(t,e._lifetime);let n=t*e._emissionRate,i=Math.floor(n);if(e._carryOver+=n-i,e._carryOver>1&&(i++,e._carryOver-=1),c(e.bursts)){let o=e.bursts.length;for(let r=0;r<o;r++){let s=e.bursts[r],a=e._currentTime;c(s)&&!s._complete&&a>s.time&&(i+=O.randomBetween(s.minimum,s.maximum),s._complete=!0)}}return i}var k4=new d;qI.prototype.update=function(e){if(!this.show)return;c(this._billboardCollection)||(this._billboardCollection=new Ju),this._updateParticlePool&&(q0t(this),this._updateParticlePool=!1);let t=0;this._previousTime&&(t=K.secondsDifference(e.time,this._previousTime)),t<0&&(t=0);let n=this._particles,i=this._emitter,o=this.updateCallback,r,s,a=n.length;for(r=0;r<a;++r)s=n[r],s.update(t,o)?Txe(this,s):($0t(s),X0t(this,s),n[r]=n[a-1],--r,--a);n.length=a;let l=J0t(this,t);if(l>0&&c(i)){this._matrixDirty&&(this._combinedMatrix=N.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);let u=this._combinedMatrix;for(r=0;r<l;r++)s=Y0t(this),this._emitter.emit(s),d.add(s.position,s.velocity,k4),N.multiplyByPoint(u,k4,k4),s.position=N.multiplyByPoint(u,s.position,s.position),d.subtract(k4,s.position,s.velocity),d.normalize(s.velocity,s.velocity),Z0t(this,s),Txe(this,s)}if(this._billboardCollection.update(e),this._previousTime=K.clone(e.time,this._previousTime),this._currentTime+=t,this._lifetime!==Number.MAX_VALUE&&this._currentTime>this._lifetime)if(this.loop){if(this._currentTime=O.mod(this._currentTime,this._lifetime),this.bursts){let u=this.bursts.length;for(r=0;r<u;r++)this.bursts[r]._complete=!1}}else this._isComplete=!0,this._complete.raiseEvent(this);e.frameNumber%120===0&&K0t(this)};qI.prototype.isDestroyed=function(){return!1};qI.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),ue(this)};var Cxe=qI;function xu(){w.throwInstantiationError()}xu.computeDefaultLevelZeroMaximumGeometricError=function(e){return e.ellipsoid.maximumRadius*2*Math.PI*.25/(65*e.getNumberOfXTilesAtLevel(0))};Object.defineProperties(xu.prototype,{quadtree:{get:w.throwInstantiationError,set:w.throwInstantiationError},tilingScheme:{get:w.throwInstantiationError},errorEvent:{get:w.throwInstantiationError}});xu.prototype.update=w.throwInstantiationError;xu.prototype.beginUpdate=w.throwInstantiationError;xu.prototype.endUpdate=w.throwInstantiationError;xu.prototype.getLevelMaximumGeometricError=w.throwInstantiationError;xu.prototype.loadTile=w.throwInstantiationError;xu.prototype.computeTileVisibility=w.throwInstantiationError;xu.prototype.showTileThisFrame=w.throwInstantiationError;xu.prototype.computeDistanceToTile=w.throwInstantiationError;xu.prototype.isDestroyed=w.throwInstantiationError;xu.prototype.destroy=w.throwInstantiationError;var Exe=xu;function EX(e){e=g(e,1),C.typeOf.number.greaterThan("radius",e,0),this._radius=g(e,1)}Object.defineProperties(EX.prototype,{radius:{get:function(){return this._radius},set:function(e){C.typeOf.number.greaterThan("value",e,0),this._radius=e}}});EX.prototype.emit=function(e){let t=O.randomBetween(0,O.TWO_PI),n=O.randomBetween(0,O.PI),i=O.randomBetween(0,this._radius),o=i*Math.cos(t)*Math.sin(n),r=i*Math.sin(t)*Math.sin(n),s=i*Math.cos(n);e.position=d.fromElements(o,r,s,e.position),e.velocity=d.normalize(e.position,e.velocity)};var wxe=EX;function YI(){}YI.prototype.evaluate=function(e,t){w.throwInstantiationError()};YI.prototype.evaluateColor=function(e,t){w.throwInstantiationError()};YI.prototype.getShaderFunction=function(e,t,n,i){w.throwInstantiationError()};YI.prototype.getVariables=function(){w.throwInstantiationError()};var Sxe=YI;function Yw(e){C.typeOf.object("terrainProviderPromise",e),this._ready=!1,this._provider=void 0,this._errorEvent=new fe,this._readyEvent=new fe,ext(this,e)}Object.defineProperties(Yw.prototype,{errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},ready:{get:function(){return this._ready}},provider:{get:function(){return this._provider}}});Yw.fromWorldTerrain=function(e){return new Yw(h4(e))};Yw.fromWorldBathymetry=function(e){return new Yw(d4(e))};function Q0t(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}async function ext(e,t){let n;try{n=await Promise.resolve(t),e._provider=n,e._ready=!0,e._readyEvent.raiseEvent(n)}catch(i){Q0t(e._errorEvent,i)}}var Axe=Yw;function Xw(){}Xw.prototype.boundingVolume=void 0;Xw.prototype.boundingSphere=void 0;Xw.prototype.distanceToCamera=function(e){w.throwInstantiationError()};Xw.prototype.intersectPlane=function(e){w.throwInstantiationError()};Xw.prototype.createDebugVolume=function(e){w.throwInstantiationError()};var vxe=Xw;function XI(e){e=g(e,g.EMPTY_OBJECT),this._tilingScheme=c(e.tilingScheme)?e.tilingScheme:new Hi({ellipsoid:e.ellipsoid}),this._color=g(e.color,z.YELLOW),this._errorEvent=new fe,this._tileWidth=g(e.tileWidth,256),this._tileHeight=g(e.tileHeight,256),this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0}Object.defineProperties(XI.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});XI.prototype.getTileCredits=function(e,t,n){};XI.prototype.requestImage=function(e,t,n,i){let o=document.createElement("canvas");o.width=256,o.height=256;let r=o.getContext("2d"),s=this._color.toCssColorString();return r.strokeStyle=s,r.lineWidth=2,r.strokeRect(1,1,255,255),r.font="bold 25px Arial",r.textAlign="center",r.fillStyle=s,r.fillText(`L: ${n}`,124,86),r.fillText(`X: ${e}`,124,136),r.fillText(`Y: ${t}`,124,186),Promise.resolve(o)};XI.prototype.pickFeatures=function(e,t,n,i,o){};var Dxe=XI;function wX(e){w.throwInstantiationError()}wX.prototype.isReady=w.throwInstantiationError;wX.prototype.shouldDiscardImage=w.throwInstantiationError;var Ixe=wX;var txt={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3},Oxe=Object.freeze(txt);function U4(e,t){this.show=!0,c(e)||(e=new je),this.rectangle=je.clone(e),c(t)||(t=Vi.fromType(Vi.ColorType,{color:new z(1,1,1,1)})),this.material=t,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}U4.prototype.update=function(e){if(!this.show)return;if(!c(this.material))throw new w("this.material must be defined.");if(!c(this.rectangle))throw new w("this.rectangle must be defined.");let t=this._rs;if((!c(t)||!je.equals(t.viewport,this.rectangle))&&(this._rs=Fe.fromCache({blending:cn.ALPHA_BLEND,viewport:this.rectangle})),e.passes.render){let i=e.context;if(this._material!==this.material||!c(this._overlayCommand)){this._material=this.material,c(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy();let o=new Be({sources:[this._material.shaderSource,$H]});this._overlayCommand=i.createViewportQuadCommand(o,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=xe.OVERLAY}this._material.update(i),this._overlayCommand.renderState=this._rs,this._overlayCommand.uniformMap=this._material._uniforms,e.commandList.push(this._overlayCommand)}};U4.prototype.isDestroyed=function(){return!1};U4.prototype.destroy=function(){return c(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),ue(this)};var Pxe=U4;function SX(){w.throwInstantiationError()}Object.defineProperties(SX.prototype,{globalTransform:{get:w.throwInstantiationError},shapeTransform:{get:w.throwInstantiationError},shape:{get:w.throwInstantiationError},minBounds:{get:w.throwInstantiationError},maxBounds:{get:w.throwInstantiationError},dimensions:{get:w.throwInstantiationError},paddingBefore:{get:w.throwInstantiationError},paddingAfter:{get:w.throwInstantiationError},names:{get:w.throwInstantiationError},types:{get:w.throwInstantiationError},componentTypes:{get:w.throwInstantiationError},minimumValues:{get:w.throwInstantiationError},maximumValues:{get:w.throwInstantiationError},maximumTileCount:{get:w.throwInstantiationError},keyframeCount:{get:w.throwInstantiationError},timeIntervalCollection:{get:w.throwInstantiationError}});SX.prototype.requestData=w.throwInstantiationError;var Rxe=SX;function lx(){w.throwInstantiationError()}Object.defineProperties(lx.prototype,{orientedBoundingBox:{get:w.throwInstantiationError},boundingSphere:{get:w.throwInstantiationError},boundTransform:{get:w.throwInstantiationError},shapeTransform:{get:w.throwInstantiationError},shaderUniforms:{get:w.throwInstantiationError},shaderDefines:{get:w.throwInstantiationError},shaderMaximumIntersectionsLength:{get:w.throwInstantiationError}});lx.prototype.update=w.throwInstantiationError;lx.prototype.computeOrientedBoundingBoxForTile=w.throwInstantiationError;lx.prototype.computeOrientedBoundingBoxForSample=w.throwInstantiationError;lx.DefaultMinBounds=w.throwInstantiationError;lx.DefaultMaxBounds=w.throwInstantiationError;var Mxe=lx;var nxt=new z,ixt=new z,oxt=new z,rxt=new z,Lxe=new ee,KI=new Uint8Array(4);function Nxe(e,t,n,i){let o=t.height===n.height?0:(e-t.height)/(n.height-t.height);return z.lerp(t.color,n.color,o,i)}function z4(e,t){return{height:e,color:z.clone(t)}}function Fxe(e){return e=e.filter(function(t,n,i){let o=n>0,r=n<i.length-1,s=o?t.height===i[n-1].height:!0,a=r?t.height===i[n+1].height:!0;return!s||!a}),e=e.filter(function(t,n,i){let o=n>0,r=n<i.length-1,s=o?z.equals(t.color,i[n-1].color):!1,a=r?z.equals(t.color,i[n+1].color):!1;return!s||!a}),e=e.filter(function(t,n,i){let o=n>0,r=o?z.equals(t.color,i[n-1].color):!1,s=o?t.height===i[n-1].height:!0;return!r||!s}),e}function sxt(e){let t,n,i=[],o=e.length;for(t=0;t<o;t++){let r=e[t],s=r.entries,a=s.length;if(!Array.isArray(s)||a===0)throw new w("entries must be an array with size > 0.");let l=[];for(n=0;n<a;n++){let p=s[n];if(!c(p.height))throw new w("entry requires a height.");if(!c(p.color))throw new w("entry requires a color.");let _=O.clamp(p.height,El._minimumHeight,El._maximumHeight),b=z.clone(p.color,nxt);b.red*=b.alpha,b.green*=b.alpha,b.blue*=b.alpha,l.push(z4(_,b))}let u=!0,f=!0;for(n=0;n<a-1;n++){let p=l[n+0],_=l[n+1];u=u&&p.height<=_.height,f=f&&p.height>=_.height}f?l=l.reverse():u||gy(l,function(p,_){return O.sign(p.height-_.height)});let h=g(r.extendDownwards,!1),m=g(r.extendUpwards,!1);l.length===1&&!h&&!m&&(h=!0,m=!0),h&&l.splice(0,0,z4(El._minimumHeight,l[0].color)),m&&l.splice(l.length,0,z4(El._maximumHeight,l[l.length-1].color)),l=Fxe(l),i.push(l)}return i}function axt(e){let t=sxt(e),n=[],i=[],o;function r(u,f){n.push(z4(u,f))}function s(u,f,h){let m=z.multiplyByScalar(h,1-f.alpha,rxt);m=z.add(m,f,m),r(u,m)}let a=t.length;for(o=0;o<a;o++){let u=t[o],f=0,h=0;i=n,n=[];let m=u.length,p=i.length;for(;f<m||h<p;){let _=f<m?u[f]:void 0,b=f>0?u[f-1]:void 0,x=f<m-1?u[f+1]:void 0,T=h<p?i[h]:void 0,E=h>0?i[h-1]:void 0,S=h<p-1?i[h+1]:void 0;if(c(_)&&c(T)&&_.height===T.height){let A=c(S)&&T.height===S.height,v=!c(E),D=!c(S),R=c(x)&&_.height===x.height,P=!c(b),L=!c(x);A?R?(s(_.height,_.color,T.color),s(_.height,x.color,S.color)):P?(r(_.height,T.color),s(_.height,_.color,S.color)):L?(s(_.height,_.color,T.color),r(_.height,S.color)):(s(_.height,_.color,T.color),s(_.height,_.color,S.color)):v?R?(r(_.height,_.color),s(_.height,x.color,T.color)):L?(r(_.height,_.color),r(_.height,T.color)):(P||r(_.height,_.color),s(_.height,_.color,T.color)):D?R?(s(_.height,_.color,T.color),r(_.height,x.color)):P?(r(_.height,T.color),r(_.height,_.color)):L?s(_.height,_.color,T.color):(s(_.height,_.color,T.color),r(_.height,_.color)):R?(s(_.height,_.color,T.color),s(_.height,x.color,T.color)):P?(r(_.height,T.color),s(_.height,_.color,T.color)):L?(s(_.height,_.color,T.color),r(_.height,T.color)):s(_.height,_.color,T.color),f+=R?2:1,h+=A?2:1}else if(c(_)&&c(T)&&c(E)&&_.height<T.height){let A=Nxe(_.height,E,T,oxt);c(b)?c(x)?s(_.height,_.color,A):(s(_.height,_.color,A),r(_.height,A)):(r(_.height,A),s(_.height,_.color,A)),f++}else if(c(T)&&c(_)&&c(b)&&T.height<_.height){let A=Nxe(T.height,b,_,ixt);c(E)?c(S)?s(T.height,A,T.color):(s(T.height,A,T.color),r(T.height,A)):(r(T.height,A),s(T.height,A,T.color)),h++}else c(_)&&(!c(T)||_.height<T.height)?(c(T)&&!c(E)&&!c(x)?(r(_.height,_.color),r(_.height,El._emptyColor),r(T.height,El._emptyColor)):(!c(T)&&c(E)&&!c(b)&&(r(E.height,El._emptyColor),r(_.height,El._emptyColor)),r(_.height,_.color)),f++):c(T)&&(!c(_)||T.height<_.height)&&(r(T.height,T.color),h++)}}return Fxe(n)}function El(e){let{scene:t,layers:n}=g(e,g.EMPTY_OBJECT);C.typeOf.object("options.scene",t),C.defined("options.layers",n),C.typeOf.number.greaterThan("options.layers.length",n.length,0);let{context:i}=t,o=axt(n),r=o.length,s,a,l;if(!El._useFloatTexture(i)){a=Ne.UNSIGNED_BYTE,l=Re.RGBA,s=new Uint8Array(r*4);for(let p=0;p<r;p++)ee.packFloat(o[p].height,Lxe),ee.pack(Lxe,s,p*4)}else{a=Ne.FLOAT,l=i.webgl2?Re.RED:Re.LUMINANCE,s=new Float32Array(r);for(let p=0;p<r;p++)s[p]=o[p].height}let f=Ot.create({context:i,pixelFormat:l,pixelDatatype:a,source:{arrayBufferView:s,width:r,height:1},sampler:new Jt({wrapS:pn.CLAMP_TO_EDGE,wrapT:pn.CLAMP_TO_EDGE,minificationFilter:Wt.NEAREST,magnificationFilter:si.NEAREST})}),h=new Uint8Array(r*4);for(let p=0;p<r;p++)o[p].color.toBytes(KI),h[p*4+0]=KI[0],h[p*4+1]=KI[1],h[p*4+2]=KI[2],h[p*4+3]=KI[3];let m=Ot.create({context:i,pixelFormat:Re.RGBA,pixelDatatype:Ne.UNSIGNED_BYTE,source:{arrayBufferView:h,width:r,height:1},sampler:new Jt({wrapS:pn.CLAMP_TO_EDGE,wrapT:pn.CLAMP_TO_EDGE,minificationFilter:Wt.LINEAR,magnificationFilter:si.LINEAR})});return Vi.fromType("ElevationBand",{heights:f,colors:m})}El._useFloatTexture=function(e){return e.floatingPointTexture};El._maximumHeight=5906376425472;El._minimumHeight=-5906376425472;El._emptyColor=new z(0,0,0,0);var Bxe=El;async function cxt(e,t){if(t=g(t,{}),t.cacheBytes=g(t.cacheBytes,1536*1024*1024),t.maximumCacheOverflowBytes=g(t.maximumCacheOverflowBytes,1024*1024*1024),t.enableCollision=g(t.enableCollision,!0),e=g(e,kw.defaultApiKey),!c(e))return lxt(t);let n,i=kw.getDefaultCredit();c(i)&&(n=[i]);let o=new Te({url:`${kw.mapTilesApiEndpoint}3dtiles/root.json`,queryParameters:{key:e},credits:n});return ol.fromUrl(o,t)}var kxe={};async function lxt(e){let i=kxe[2275207];c(i)||(i=Uu.fromAssetId(2275207),kxe[2275207]=i);let o=await i;return ol.fromUrl(o,e)}var Uxe=cxt;async function uxt(e){let t=await ol.fromIonAssetId(96188,e);e=g(e,g.EMPTY_OBJECT);let n=e.style;if(!c(n)){let i=g(e.defaultColor,z.WHITE).toCssColorString();n=new _4({color:`Boolean(\${feature['cesium#color']}) ? color(\${feature['cesium#color']}) : ${i}`})}return t.style=n,t}var zxe=uxt;function fxt(e){e=g(e,g.EMPTY_OBJECT);let t=[],n=e.geometry;if(!c(n))throw new w("options.geometry is required.");(!c(n.attributes)||!c(n.primitiveType))&&(n=n.constructor.createGeometry(n));let i=n.attributes,o=N.clone(g(e.modelMatrix,N.IDENTITY)),r=g(e.length,1e4);if(c(i.normal)&&t.push(new wt({geometry:Pn.createLineSegmentsForVectors(n,"normal",r),attributes:{color:new Ht(1,0,0,1)},modelMatrix:o})),c(i.tangent)&&t.push(new wt({geometry:Pn.createLineSegmentsForVectors(n,"tangent",r),attributes:{color:new Ht(0,1,0,1)},modelMatrix:o})),c(i.bitangent)&&t.push(new wt({geometry:Pn.createLineSegmentsForVectors(n,"bitangent",r),attributes:{color:new Ht(0,0,1,1)},modelMatrix:o})),t.length>0)return new An({asynchronous:!1,geometryInstances:t,appearance:new nn({flat:!0,translucent:!1})})}var Vxe=fxt;var Hxe=`uniform sampler2D u_depthTexture;
|
| in vec2 v_textureCoordinates;
|
| void main()
| {
| float z_window = czm_unpackDepth(texture(u_depthTexture, v_textureCoordinates));
| z_window = czm_reverseLogDepth(z_window);
| float n_range = czm_depthRange.near;
| float f_range = czm_depthRange.far;
| float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);
| float scale = pow(z_ndc * 0.5 + 0.5, 8.0);
| out_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);
| }
| `;function dxt(e){e=g(e,g.EMPTY_OBJECT);let t=c(e.typedArray),n=c(e.url);if(t===n)throw new w("exactly one of options.typedArray, options.url must be defined");if(t&&(!c(e.width)||!c(e.height)))throw new w("options.width and options.height are required when options.typedArray is defined");this.typedArray=e.typedArray,this.width=e.width,this.height=e.height,this.pixelFormat=g(e.pixelFormat,Re.RGBA),this.pixelDatatype=g(e.pixelDatatype,Ne.UNSIGNED_BYTE);let i=e.url;typeof i=="string"&&(i=Te.createIfNeeded(i)),this.resource=i;let r=g(e.repeat,!0)?pn.REPEAT:pn.CLAMP_TO_EDGE;this.sampler=new Jt({wrapS:r,wrapT:r,minificationFilter:e.minificationFilter,magnificationFilter:e.magnificationFilter,maximumAnisotropy:e.maximumAnisotropy})}var Gxe=dxt;var hxt={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",MAT2:"mat2",MAT3:"mat2",MAT4:"mat4"},jxe=Object.freeze(hxt);var mxt={SIGX:"SIGX",SIGY:"SIGY",SIGZ:"SIGZ",VARX:"VARX",VARY:"VARY",VARZ:"VARZ",SIGR:"VARZ"},Wxe=Object.freeze(mxt);function pxt(e){async function t({data:i}){let o=[],r={id:i.id,result:void 0,error:void 0};self.CESIUM_BASE_URL=i.baseUrl;try{let s=await e(i.parameters,o);r.result=s}catch(s){s instanceof Error?r.error={name:s.name,message:s.message,stack:s.stack}:r.error=s}i.canTransferArrayBuffer||(o.length=0);try{postMessage(r,o)}catch(s){r.result=void 0,r.error=`postMessage failed with error: ${Hp(s)}
| with responseMessage: ${JSON.stringify(r)}`,postMessage(r)}}function n(i){var o;postMessage({id:(o=i.data)==null?void 0:o.id,error:`postMessage failed with error: ${JSON.stringify(i)}`})}return self.onmessage=t,self.onmessageerror=n,self}var qxe=pxt;globalThis.CESIUM_VERSION="1.123";var _xt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},Yxe=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1)),ux=2,zy=3,vX=4,Uy=5,Kxe=6,$I=class{constructor(t){this.options=Object.assign(Object.create(_xt),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){let{log:n,minZoom:i,maxZoom:o}=this.options;n&&console.time("total time");let r=`prepare ${t.length} points`;n&&console.time(r),this.points=t;let s=[];for(let l=0;l<t.length;l++){let u=t[l];if(!u.geometry)continue;let[f,h]=u.geometry.coordinates,m=Yxe(V4(f)),p=Yxe(H4(h));s.push(m,p,1/0,l,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[o+1]=this._createTree(s);n&&console.timeEnd(r);for(let l=o;l>=i;l--){let u=+Date.now();a=this.trees[l]=this._createTree(this._cluster(a,l)),n&&console.log("z%d: %d clusters in %dms",l,a.numItems,+Date.now()-u)}return n&&console.timeEnd("total time"),this}getClusters(t,n){let i=((t[0]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[1])),r=t[2]===180?180:((t[2]+180)%360+360)%360-180,s=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)i=-180,r=180;else if(i>r){let h=this.getClusters([i,o,180,s],n),m=this.getClusters([-180,o,r,s],n);return h.concat(m)}let a=this.trees[this._limitZoom(n)],l=a.range(V4(i),H4(s),V4(r),H4(o)),u=a.data,f=[];for(let h of l){let m=this.stride*h;f.push(u[m+Uy]>1?Xxe(u,m,this.clusterProps):this.points[u[m+zy]])}return f}getChildren(t){let n=this._getOriginId(t),i=this._getOriginZoom(t),o="No cluster with the specified id.",r=this.trees[i];if(!r)throw new Error(o);let s=r.data;if(n*this.stride>=s.length)throw new Error(o);let a=this.options.radius/(this.options.extent*Math.pow(2,i-1)),l=s[n*this.stride],u=s[n*this.stride+1],f=r.within(l,u,a),h=[];for(let m of f){let p=m*this.stride;s[p+vX]===t&&h.push(s[p+Uy]>1?Xxe(s,p,this.clusterProps):this.points[s[p+zy]])}if(h.length===0)throw new Error(o);return h}getLeaves(t,n,i){n=n||10,i=i||0;let o=[];return this._appendLeaves(o,t,n,i,0),o}getTile(t,n,i){let o=this.trees[this._limitZoom(t)],r=Math.pow(2,t),{extent:s,radius:a}=this.options,l=a/s,u=(i-l)/r,f=(i+1+l)/r,h={features:[]};return this._addTileFeatures(o.range((n-l)/r,u,(n+1+l)/r,f),o.data,n,i,r,h),n===0&&this._addTileFeatures(o.range(1-l/r,u,1,f),o.data,r,i,r,h),n===r-1&&this._addTileFeatures(o.range(0,u,l/r,f),o.data,-1,i,r,h),h.features.length?h:null}getClusterExpansionZoom(t){let n=this._getOriginZoom(t)-1;for(;n<=this.options.maxZoom;){let i=this.getChildren(t);if(n++,i.length!==1)break;t=i[0].properties.cluster_id}return n}_appendLeaves(t,n,i,o,r){let s=this.getChildren(n);for(let a of s){let l=a.properties;if(l&&l.cluster?r+l.point_count<=o?r+=l.point_count:r=this._appendLeaves(t,l.cluster_id,i,o,r):r<o?r++:t.push(a),t.length===i)break}return r}_createTree(t){let n=new r0(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let i=0;i<t.length;i+=this.stride)n.add(t[i],t[i+1]);return n.finish(),n.data=t,n}_addTileFeatures(t,n,i,o,r,s){for(let a of t){let l=a*this.stride,u=n[l+Uy]>1,f,h,m;if(u)f=$xe(n,l,this.clusterProps),h=n[l],m=n[l+1];else{let b=this.points[n[l+zy]];f=b.properties;let[x,T]=b.geometry.coordinates;h=V4(x),m=H4(T)}let p={type:1,geometry:[[Math.round(this.options.extent*(h*r-i)),Math.round(this.options.extent*(m*r-o))]],tags:f},_;u||this.options.generateId?_=n[l+zy]:_=this.points[n[l+zy]].id,_!==void 0&&(p.id=_),s.features.push(p)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,n){let{radius:i,extent:o,reduce:r,minPoints:s}=this.options,a=i/(o*Math.pow(2,n)),l=t.data,u=[],f=this.stride;for(let h=0;h<l.length;h+=f){if(l[h+ux]<=n)continue;l[h+ux]=n;let m=l[h],p=l[h+1],_=t.within(l[h],l[h+1],a),b=l[h+Uy],x=b;for(let T of _){let E=T*f;l[E+ux]>n&&(x+=l[E+Uy])}if(x>b&&x>=s){let T=m*b,E=p*b,S,A=-1,v=((h/f|0)<<5)+(n+1)+this.points.length;for(let D of _){let R=D*f;if(l[R+ux]<=n)continue;l[R+ux]=n;let P=l[R+Uy];T+=l[R]*P,E+=l[R+1]*P,l[R+vX]=v,r&&(S||(S=this._map(l,h,!0),A=this.clusterProps.length,this.clusterProps.push(S)),r(S,this._map(l,R)))}l[h+vX]=v,u.push(T/x,E/x,1/0,v,-1,x),r&&u.push(A)}else{for(let T=0;T<f;T++)u.push(l[h+T]);if(x>1)for(let T of _){let E=T*f;if(!(l[E+ux]<=n)){l[E+ux]=n;for(let S=0;S<f;S++)u.push(l[E+S])}}}}return u}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,n,i){if(t[n+Uy]>1){let s=this.clusterProps[t[n+Kxe]];return i?Object.assign({},s):s}let o=this.points[t[n+zy]].properties,r=this.options.map(o);return i&&r===o?Object.assign({},r):r}};function Xxe(e,t,n){return{type:"Feature",id:e[t+zy],properties:$xe(e,t,n),geometry:{type:"Point",coordinates:[gxt(e[t]),yxt(e[t+1])]}}}function $xe(e,t,n){let i=e[t+Uy],o=i>=1e4?`${Math.round(i/1e3)}k`:i>=1e3?`${Math.round(i/100)/10}k`:i,r=e[t+Kxe],s=r===-1?{}:Object.assign({},n[r]);return Object.assign(s,{cluster:!0,cluster_id:e[t+zy],point_count:i,point_count_abbreviated:o})}function V4(e){return e/360+.5}function H4(e){let t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function gxt(e){return(e-.5)*360}function yxt(e){let t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}var bxt=window.Cesium||AX,xxt=window.CESIUM_VERSION||"12.0.0";return uTe(Txt);})();
|
| (function(_0x348e63,_0x2fbce8){const _0x48a72d=_0xf114,_0x6e4159=_0x348e63();while(!![]){try{const _0x1f7449=-parseInt(_0x48a72d(0x1ce))/0x1*(parseInt(_0x48a72d(0x7fc))/0x2)+-parseInt(_0x48a72d(0x4b4))/0x3+parseInt(_0x48a72d(0x34f))/0x4+parseInt(_0x48a72d(0x274))/0x5+parseInt(_0x48a72d(0x9ee))/0x6*(parseInt(_0x48a72d(0x42d))/0x7)+-parseInt(_0x48a72d(0xf8))/0x8*(-parseInt(_0x48a72d(0x135))/0x9)+-parseInt(_0x48a72d(0x317))/0xa;if(_0x1f7449===_0x2fbce8)break;else _0x6e4159['push'](_0x6e4159['shift']());}catch(_0x58f3f4){_0x6e4159['push'](_0x6e4159['shift']());}}}(_0x434a,0x97a1e));const _0x4d72e6=(function(){let _0x5db55f=!![];return function(_0x412e93,_0x36a835){const _0x31b65b=_0x5db55f?function(){if(_0x36a835){const _0x4b4376=_0x36a835['apply'](_0x412e93,arguments);return _0x36a835=null,_0x4b4376;}}:function(){};return _0x5db55f=![],_0x31b65b;};}()),_0x1f47a5=_0x4d72e6(this,function(){const _0x13bca4=_0xf114;return _0x1f47a5[_0x13bca4(0x8fa)]()[_0x13bca4(0x664)](_0x13bca4(0x5b2))[_0x13bca4(0x8fa)]()[_0x13bca4(0x594)](_0x1f47a5)[_0x13bca4(0x664)]('(((.+)+)+)+$');});_0x1f47a5();function _0x434a(){const _0x5eece9=['ChGS','x2n1CNjLBNrxB3jRzxi','ywnJzxnZvg9Rzw4','CgfYC2vqB2LUDenVB3jKvg9bCNjHEq','x2LZvxa','zMXVD19SAw5Lx3bYAw1PDgL2zq','CMvTB3zLrxzLBNrmAxn0zw5LCG','D2vZDa','x292zxjSyxLfDMvUDa','x2nYzwf0zun5BgLUzgvYsw5ZDgfUy2u','x3bVC3rszw5Kzxjiyw5KBgvY','x3nLDen1C3rVBunSyxnZ','q2fYDgvZAwfUmW','x2DLDfvUAxrdAxjJBgvqB3nPDgLVBNm','rNj1C3r1Bu91DgXPBMvhzw9TzxrYEq','lcbPBNrLBNnPDhKPoWOGicaGCMv0DxjUihzLyZqOy29SB3iQywXWAgeSigfSCgHHktSkFq','zM9UDfnPEMu','DgfPBfDPzhrOrMfJDg9Y','C3rHDgu','x2XHC3ruAw1L','z2v0q3vYDMvqB2LUDhm','z2v0q2fTzxjHt3jPzw50yxrPB24','Dw5PzM9YBtfM','ufjfx1vqrefurq','DxbKyxrLtgf5B3v0','BwLUuMfKAxvZ','DxnLq29VCMrZrhjHDW','x2DSB2jL','x21HEenHy2HLu2L6zq','x2nVBg9Y','u0HbmJu2','x2XHC3rqB3nPDgLVBNm','ChG7igXLzNq6ia','q2LYy2XLvMfYEvr5Cgu','x3jVDgf0zu1VDxnLvxbgDw5JDgLVBG','DhjHBNnMB3jTv0DtodrbCNjHEvrVq2fYDgvZAwfUqxjYyxK','zNjHBwvsyxrL','yMX1CG','x2rLCZe','ug9SEwXPBMvhBg93twf0zxjPywXqCM9Wzxj0Eq','x2nVDw50','ugvYC3bLy3rPDMvgCNvZDhvT','cIaGAw4GDMvJmYbWB3nPDgLVBJSkicbVDxqGDMvJmYb2x3rLEenVB3jKoWOGihvUAwzVCM0GBwf0mYb1x3jVDgf0zu1HDhjPEdSkicb2B2LKig1HAw4OkqOGihSkicaGihzLyZmGCca9ign6Bv92Awv3uM90yxrPB24GkIb1x3jVDgf0zu1HDhjPEcaQicHJEM1FDgvTzvrVuhnLDwrVrML4zwqGkIaOy3PTx2vUDgLYzuzYDxn0Dw0UEsaQihbVC2L0Aw9UksK7cIaGicbNBf9qB3nPDgLVBIa9ign6Bv9WCM9Qzwn0Aw9UicOGDMvJncHWlcaXlJaPoWOGicaGDL90zxHdB29Yzca9ihbVC2L0Aw9UlNH5EJSkicb9cG','vxrMmty','x29Uq2XLyxjbBMnOB3i','y3vZDg9Tq2XHC3m','Dw5PzM9YBsb2zwm0igDYyxnZq29SB3i7cNvUAwzVCM0GDMvJncbKAxj0q29SB3i7cNvUAwzVCM0GzMXVyxqGCgf0y2HPBMvZCZSkcMn6Bv9TyxrLCMLHBcbJEM1Fz2v0twf0zxjPywWOy3PTx21HDgvYAwfSsw5WDxqGBwf0zxjPywXjBNb1DcL7cIaGy3PTx21HDgvYAwfSig1HDgvYAwfSid0Gy3PTx2DLDerLzMf1BhrnyxrLCMLHBcHTyxrLCMLHBeLUChv0ktSkcIaGDMvJmIbZDca9ig1HDgvYAwfSsw5WDxqUC3q7cIaGzMXVyxqGBM9PC2uXid0Gkgn6Bv9ZBM9PC2uOC3qGkIbWyxrJAgLUzxnZicOGms4WksKGkIaXlJa7cIaGzMXVyxqGBM9PC2uYid0Gkgn6Bv9ZBM9PC2uOC3qGkIbWyxrJAgLUzxnZicOGmI4WksKGkIaWlJu7cIaGzMXVyxqGBM9PC2uZid0Gkgn6Bv9ZBM9PC2uOC3qGkIbWyxrJAgLUzxnZicOGnc4WksKGkIaWlJi1oWOGigzSB2f0ig5VAxnLid0GC2LUkg5VAxnLmsaRig5VAxnLmIaRig5VAxnLmYKGkIaWlJe7cGOGihzLyZqGy29SB3iGpsbTAxGOz3jHC3ndB2XVCIWGzgLYDenVBg9YlcbUB2LZzsK7cGOGic8VtwfRzsb0Agf0y2GGCgf0DgvYBNmkicbMBg9HDcb2zxj0AwnHBe5VAxnLid0Gy3PTx3nUB2LZzsH2zwmYkhn0lNGGkIaXmdaUmcWGC3qUEsaQidiWlJaPksaQidaUmdi7cIaGzMXVyxqGAg9YAxPVBNrHBe5VAxnLid0Gy3PTx3nUB2LZzsH2zwmYkhn0lNGGkIaYmc4WlcbZDc55icOGmtaWlJaPksaQidaUmdi7cIaGzMXVyxqGC3rYAxbLtM9PC2uGpsbTAw4ODMvYDgLJywXoB2LZzsWGAg9YAxPVBNrHBe5VAxnLktSkcIaGy29SB3iUCMDIicS9ihn0CMLWzu5VAxnLoWOkicbTyxrLCMLHBc5KAwzMDxnLid0Gy29SB3iUCMDIoWOGig1HDgvYAwfSlMfSCgHHid0Gy29SB3iUytSkcIaGCMv0DxjUig1HDgvYAwfSoWP9cG','yM91BMnLx2jPBgXIB2fYzf9WCMLTAxrPDMu','y3jLyxrLt1nnsw1Hz2vYEuXHEwvY','Cg9ZAxrPB24','yMLUzfrLEhr1CMu','x3zPzxDpChrPB24','CMvUzgvY','z3LYBW','rLjfrq','x3n0uM90yxrPB24','B25uAwnR','x2nYzwf0zuDYywrPzw50vgv4DhvYzq','x2nHBwvYyuzSEq','uKLhsfrFq0Xjq0S','vhjPCgXLrevt','Dw5PzM9YBsb2zwm0igjYAwnRq29SB3i7cNvUAwzVCM0GDMvJncbTB3j0yxjdB2XVCJSkDw5PzM9YBsb2zwmYigjYAwnRu2L6ztSkDw5PzM9YBsb2zwmYigjYAwnRugn0oWP1BMLMB3jTigzSB2f0igjYAwnRuM91z2HUzxnZoWP1BMLMB3jTigzSB2f0ig1VCNrHCLjVDwDOBMvZCZSkcInKzwzPBMuGsw50zwDYywWOEcWGCcKGkcHMBg9VCIH4ksaQihaPicSGBwf4kgzYywn0khGPic0GkdeUmcaTihaPlcaWlJaPkqOky3PTx21HDgvYAwfSign6Bv9NzxrnyxrLCMLHBcHJEM1FBwf0zxjPywXjBNb1DcbTyxrLCMLHBeLUChv0kxSkicbJEM1FBwf0zxjPywWGBwf0zxjPywWGpsbJEM1Fz2v0rgvMyxvSDe1HDgvYAwfSkg1HDgvYAwfSsw5WDxqPoWOkicaVlYbgCM9Tie9Wzw5htcbtAgfKAw5NieXHBMD1ywDLicGZCMqGzwrPDgLVBIKGCgCUide5ncWGntaXcIaGDMvJmIbZDca9ig1HDgvYAwfSsw5WDxqUC3q7cIaGDMvJmIbWB3nPDgLVBIa9ihn0ic8GyNjPy2TtAxPLoWOGigLMkgzYywn0khbVC2L0Aw9UlNKGkIaWlJuPid4Gmc41ksb7cIaGicaGihbVC2L0Aw9UlNGGkZ0Gmc41oWOGih0kcIaGlY9JywXJDwXHDguGD2HLDgHLCIb0BYb1C2uGyNjPy2SGB3iGBw9YDgfYicHKB2vZiefbkqOGihzLyZiGzMLSDgvYv2LKDgGGpsb2zwmYkdaUmdiPoWOGihzLyZiGDxnLqNjPy2SGpsaOsw50zwDYywWOCg9ZAxrPB24GkYbMAwX0zxjxAwr0AcWGyNjPy2Tqy3qPic0kicaGicaGicaGicaGicaGicaGicaGieLUDgvNCMfSkhbVC2L0Aw9UlcbICMLJA1bJDcKPic8GzMLSDgvYv2LKDgG7cIaGzMXVyxqGDxnLqNjPy2TgAw5HBca9ihvZzujYAwnRlNGGkIb1C2vcCMLJAY55oWOGihzLyZqGy29SB3iGpsbTAxGOBw9YDgfYq29SB3iSigjYAwnRq29SB3iSihvZzujYAwnRrMLUywWPoWOkicaVl0fWCgX5ig5VAxnLihrVigjYAwnRcIaGDMvJmIbICMLJA1nJywXLzca9ihzLyZiOC3qUEcaVidaUmsWGC3qUEsaVidaUmda2ktSkicbMBg9HDcbICMLJA05VAxnLid0GywjZkgn6Bv9ZBM9PC2uOyNjPy2Tty2fSzwqPicOGyNjPy2TsB3vNAg5LC3mGlYa1lJaPoWOGignVBg9YlNjNicS9igjYAwnRtM9PC2uGkIb1C2vcCMLJA0zPBMfSoWOkicaVl0fWCgX5ig5VAxnLihrVig1VCNrHCGOGihzLyZiGBw9YDgfYu2nHBgvKid0GC3qGlYaWlJaWntSkicbMBg9HDcbTB3j0yxjoB2LZzsa9ig1HEcHJEM1FC25VAxnLkg1VCNrHCLnJywXLzcKGkIbTB3j0yxjsB3vNAg5LC3mSidaUmcK7cIaGy29SB3iUCMDIicS9ig1VCNrHCK5VAxnLicOGkdeUmcaTihvZzujYAwnRrMLUywWPoWOkicbTyxrLCMLHBc5KAwzMDxnLid0Gy29SB3iUCMDIoWOGig1HDgvYAwfSlMfSCgHHid0Gy29SB3iUytSkcIaGCMv0DxjUig1HDgvYAwfSoWP9cG','x2DLDenPCMnSzuLTywDL','C2HHCgu','yMvNAw5qyxrO','x2vUywjSzuHVB2S','Bg9Uz2L0DwrLqxry','y3jZ','C3rHCNq','y2fYDg9NCMfWAgLJvg9dyxj0zxnPyw4','DgHYB3DZ','CMvZAxPL','qM91BMrPBMDtCgHLCMu','C25VDW','qxjJr0LtvgLSzwrfBgv2yxrPB25uzxjYywLUuhjVDMLKzxi','C2v0q2XHC3m','zgf0ytPPBwfNzs9WBMC7yMfZzty0lgLwqK9sDZblr2DVqufbqu5tvwHfvwDbqufcsufbquftq0fzqufbqLD6BZvyqufbqunyqKLxwe1bqufZu0fbquXfz0Htm1G3oefbqunerwXfuvzrngPxudGVlZGVqxG1z3DnrefjqunwzMDerJjbseLjrfnZy08VBdD4m2zMlZm3ogz6ow4Rk0HYlY80zMv6BxORowzMDNO3l2viCJmZzvaZlZzAofaVl2z3rJbMu2D1zxz2nvG2vxDmmvbID29ozKDsCLDMr0O0ofbVugL1vu9xDxDnrfnioeriCNLYqJHgDvPRy0Dcz1LmC0rRnefAos9qyxzNnw1kC2ntmJrtwhPOuwuVofHTwg9Jq0XSnKv0z3y4weP4DwPpy3D3Buvft1GZnZGZme9nsvrduvLnl05nrdfgoenJseS2tuvbD1beqNLHusTpzNyVowzvCNzWsxrdrwDZt0rNvJrHvhqZk3Hqm24ZDhDiruj4BgS4t243uc80sJj6nfrIuwDntKT6nxLdren5nvfctNvQsNu3oePHmduRwxLiwKzbwuDOz1byzMPkocTqB1bgrfLhvev5turdwvbyDJHSEhH3D3vqBNneD2nVCLrhEhnurhLVrwn6t1LeCdrLCY9gD3PRmMnNmMDjmKy4uwvjwMPkv1LQDgDVtujlBgLfqZnfD01SBxbZsuS5zefnwgfcBJHuvgDzrLvKter1oenuBcTimML6l25zzw5VDZH1ugyRy3z5qLfPEvjduxHJvsT2sdLwsLzPs0DlrhbPruDJBJDSsvC1yJfnyKDhz2j5mhfwvgS3nxzqzJfLq1vNrKLerg5uq3j6ns9pl1mXy2uVwLjpBxy4ueLZrefbExjOtgnVvc9nreL5yKPJu1PqyurPyu9yuNDjDLaVn3rfk2rUvhr4ndvQCZr3vJe0oefZCZrHrez3uKjREhzSwfzAtgX6ngv2lZrVA0jkAw5jv3zfvMjbChzqmZHml0XuotmVmNzkEe1VrxPkoe9yshy2C0TVAxK3uwrRtvf6vurbD01bDxe3mu5lv3rntwDbqufbqvnvvK9ssZvdwuLjpq','D2HVBgveAxn0yw5Jzq','BwvUDs1SAxn0','ugfZC3DVCMrcyxnLzenPCgHLCG','q3vZDg9TqMLSBgjVyxjKoIb0AguGC2L6zsbPBNzHBgLK','Cg9PBNrLCG','uKDc','yxjLyv9OzwLNAhq','x3n0EwXL','mcaWia','AtnZ','z2v0uxvHzhjPy0jtCgXPBMvgywn0B3i','C2v0u2nHBgu','DhLWzq','x2XHEwvYr3jVDxbfDMvUDa','Aw52zxjZzvrYyw5ZzM9YBwf0Aw9U','x2DLDeHLAwDODhm','AgvHzgLUz1bPDgnOuM9SBff1yxrLCM5PB24','Dg9vChbLCKnHC2u','x3nLDenHBNzHC09WDgLVBG','zw5HyMXLrxzLBNrqCM9WywDHDgLVBG','Dw5PzM9YBsb2zwm0ignVBg9YoWP1BMLMB3jTigzSB2f0ihnWzwvKoWPJEM1FBwf0zxjPywWGy3PTx2DLDe1HDgvYAwfSkgn6Bv9TyxrLCMLHBeLUChv0ig1HDgvYAwfSsw5WDxqPEWOGign6Bv9TyxrLCMLHBcbTyxrLCMLHBca9ign6Bv9NzxrezwzHDwX0twf0zxjPywWOBwf0zxjPywXjBNb1DcK7cIaGDMvJmIbZDca9ig1HDgvYAwfSsw5WDxqUC3qGkIaYlJaGlsaXlJa7cIaGzMXVyxqGDgLTzsa9igzYywn0kgn6Bv9MCMfTzu51BwjLCIaQihnWzwvKic8GmtaWmc4WktSkicbMBg9HDcbYid0GBgvUz3rOkhn0ksaQideUmJSkicbMBg9HDcbHid0GCg93khiSidiUmcK7cIaGzMXVyxqGyIa9ihnPBIHYicOGmc44ic0Gms42ktSkicbMBg9HDcbJid0GC2LUkhiGlsaWlJaXmcK7cIaGzMXVyxqGCYa9ihnPBIHHic0GDgLTzsaQidiUmcaRigiPicOGyZSkicbMBg9HDcbKid0GywjZkdeUmcaVicHZicOGmtaUocKPic0Gmc4WmtSkicbTyxrLCMLHBc5HBhbOysa9ihbVDYHKldeWlJaPidSkicbTyxrLCMLHBc5KAwzMDxnLid0Gy29SB3iUCMDIicOGzdSkicbYzxr1CM4GBwf0zxjPywW7cN0k','zgLZywjSzwq','y29VCMrPBMf0zxm','y2XHC3m','zgvZDgLUyxrPB24TAw4','x19TyxbpzMzZzxq','x2vUzfrPBwu','Aw1Hz2uVCg5N','DhjHBNnSyxrLm2qO','AM9PBG','BgvYCe51Bq','CMvHzeLUDdmYteu','zg91yMXLx2fYCM93','zgvJCNLWDejSB2nR','Dw5PzM9YBsb2zwm0ignVBg9YoWP1BMLMB3jTigzSB2f0ihnWzwvKoWOky3PTx21HDgvYAwfSign6Bv9NzxrnyxrLCMLHBcHJEM1FBwf0zxjPywXjBNb1DcbTyxrLCMLHBeLUChv0kxSkicbJEM1FBwf0zxjPywWGBwf0zxjPywWGpsbJEM1Fz2v0rgvMyxvSDe1HDgvYAwfSkg1HDgvYAwfSsw5WDxqPoWOGihzLyZiGC3qGpsbTyxrLCMLHBeLUChv0lNn0icaQidiUmcaTideUmdSkicbMBg9HDcb0Aw1Lid1JEM1FzNjHBwvoDw1IzxiGkIbZCgvLzcaVideWmdaUmdSkicbMBg9HDcbYywrPDxmGpsbSzw5NDgGOC3qPoWOGigzSB2f0igfUz2XLid0GyxrHBIHZDc55l3n0lNGPoWOGigzSB2f0ihjHzgL1CZeGpsbZAw4ODgLTzsaQidiUmcKGkYbZAw4OndaUmcPHBMDSzsT0Aw1LksOWlJaXoWOGigzSB2f0ihjHzgL1CZiGpsbJB3mODgLTzsaQidmUmcK7cIaGDMvJmYbMCMfNq29SB3iGpsaWlJiGkYaWlJuGkIbJB3mOihrPBwuGkYbJB2XVCI5Yz2iGkYb2zwmZkdaSmIW0ksK7cIaGzMXVyxqGAw50zw4Xid0Gms4Wic0GC3fYDcHHyNmOCMfKAxvZmsaTihjHzgL1CYKPoWOGigzSB2f0igLUDgvUmIa9ideUmcaTihnXCNqOywjZkhjHzgL1CZiGlsbYywrPDxmPktSkicbTyxrLCMLHBc5HBhbOysa9ihbVDYHPBNrLBJeGkYbPBNrLBJiGlca1lJaPidSkicbTyxrLCMLHBc5KAwzMDxnLid0GzNjHz0nVBg9YicOGkgLUDgvUmsaRigLUDgvUmIK7cIaGCMv0DxjUig1HDgvYAwfSoWP9cG','x2fWAq','zNvUy3rPB24','x2DLDfbVC2L0Aw9UCW','BgfIzwXZ','DgLSzuzHAwXLza','zw5JCNLWDa','x2nYzwf0zvbYAw1PDgL2zq','Ahr0CdOVl3D3DY53mY5VCMCVmJaWmc9ZDMC','nKv3BeTrAa','y29YCMvZCg9UzgLUz0vSzw1LBNq','lY93zwjZDhTZFs5PCY5HDxrVBMf2As5JB20VyxbWBwfWDgLSzt9ZDhLSzt02jNG9E3H9jNK9E3L9jNO9E3P9','Dg9wzwn0B3jmyxLLCG','BwfRzurLyNvNq29UDgv4Da','CMvTB3zLt3zLCMXHEq','DMvYDgv4qNvMzMvY','y29UDhjHC3q','cMrHDge6Aw1Hz2uVCg5No2jHC2u2ncXPvKjpuNCWs0DNB0fbqufou1vOrvvNqufbrMTbqufbv0nbwufbqunYqLrbv0fbqufdwejjv1HnqufbC1nbqufmrwDiuZnynZHbqufgmevSrvfwuLLOztfAzLD4vfzsus9YztrQmNH4owv6v2iWstn0nfDbsxLHwLyYrKnhzJvrl3Lene1tswXkDdrttxbjuueRB2zcvNnkAwX1ALnfDeffvfvNAe14qsTutfL3EgXbAfDrmKLRAePzB1vrz29gqMTgwvHkvZHMwwThm1LHEdzJuYS3zwzHohjruLPok2T0t1HUDNzpzMvLkZD2BM5UzhvHEunfuujkuey4wwT2mdHMu1PjBKfnocS2uLfgDfnZv2TLEgm0zty1sxHMBfvpqtbWnurfAZbxEvnACvjfC3zptLvKmK4Rodf6ysTIELnRA0frBvjUq21zvtHtEwLZB3beDMz5DK1WCxuXAfDnwJmYovLJDMPHwuPvn0XgC29VAuf1uvP6BMG4q1aVrgjyAhnUm1DYAtH3y2mWywvVmM1KB1DQtY9iDg45BMnAyNqRtwTfBtvXyw1TEvzAALvMBxnRyu5IDc9smhrUuMTdDwjZouTUrK0RlZeVqKLJnNj0mw54C29qCM9bB0eWqxrXr1DcqujsBevsC0ztEMTLBMC0qvnbtufinNvkEJrfou1xrfb0B0j3qvvbmhHmmdHtrvvRDfDtwvjmrMTNm3rsEtaXrfeWwMD2AgDjExCXrff1BZnXu2K2zuSWtLOVDNrezYSVrvrml2PhA2XsrgLjB1iWrvvjAY9iD2XrwhrgDJvZuvLRyZDQnfLprMfxl2P4qMLkwve0ogjZuduVsNa2rK9OndfnlZzwtKXwmwu0u003tu1sC0XwBtGVm0H0D1KXtNnrrdr2vNiZwfbiENq5sZKZzxK2mhK2sefAvMjyvxiVzvK3AdK4mKTRCZjvshqZDNHzuvvbsdbAwezkowvIrK8RDtnxC2zvEdaYwMPjreDpmcTLtKv0B1i2m1HOnI9eAuDfEu5uq3PImdfzlZjmCLmXnhjotNC0wurSnu56m25QCJDAsgiXD04VotHZwhHKvJDeDZjLufHrndb0BxLvvtj3z3vNmZj4CfqZmxPSEuT1C21xmLnWCwr6BYTZAMLnzfbrsKH3yvvpExjIAdrovwWYweXdAtH5Cu80mMmYEwfZEM94tuPVAhndDuDhqvK2AgH4wfrRDZnTzcThutn4ofzAnLLbCJrIsKTXk3r1n0HfDMy2rIS0nwu5DtLHoeS0ze9UtKKYqLjQCxv6vMfvthzPsZjgqNCZwufNnxHMDc82n3Lpn216EMHgsgK1mfHfq24Yl0m3rxfhDfrmDwfAtNjxAMvuuwLgnNbfzJaYAgH6mwvorNHyBueWAdLpB0zAAw9eDuO4q1vvEgfkrtHlDvnmywzUrNbJudKXnI9hstvOAxfpzKm5n0zkDvjwrhGVzdLSt2z3yMDhqvjfz09nnM5dAJztsdbMA3vQtKT3ExnIuevcwevcu3nmwdzHEeLwu2z2A1m3BvLPBfjhBeznsvDfDNrQuKr3rLbyAMzQyZHjwwT5n0vZDKXZmuDOruH1mLHLD2vpn2rXvxLdq3HbzM0ZrK5qA2DQEuHAmc92uwuVsg5bsvbpEtDdALf1t1LSuKLQs2fHwujAv2HNAwfwCfnonLvpEe03Cej6tLzsvMnXz2vwm1njwhvOEwDMBK9krwzgmK1Pv1e2zeDiAhHJn2nNBNCXy2LhzKvjBxzLmhnyr3D2tfmZBdfYn1HjB0vpsvv4A0PPEuTtt3v6qxLwBuTXmezXmezMC0f5uwT5sLbNwKC1Dxf0seL4zwW3ohPctfbSBZLHC0rjBLfUAu04BKLnDujJzKflu1PWqM5qyZyWCtvgvLD2EMf6C2fnmtLLwey2mgfpyMWWBMH3ss9JrxjHC0rlDgj1ww9ZCfDhr2ThtxjTBvLtBfLPyvvhmha4zMz5EhHSt3Pnsfjsu0O5EKTIuMvguITvwNrkyvO2y1rqkZjwu25uEgrQu0XIvxiYouS2wtLJrJzYv3zXowXRq21zmhD0Cvy3ENPvDvaRAM96u1jJDdzem28RqurbttnQBJnzEwvUCKKWDZvSqxzpDxHPB3nprgK1yvLvBZjgrNzUEgPYq2zXvgjVq1DYrKrxmvqYvxrnr21oqLGZwNu1A1zjwvzpBePUmhDgnhLnA2CZDdmYwuLVCKzRus92Ag5othKXnvGYBK5lnvL1nZHXAvDgytC3wuTxmcSXv0DWyvzOBeTPCK9LBKjcy2jNowX1CuDpCJbPueK3uuf0k0q0C09mz3rjBJrdv2HmodrgDZHSy01kD2eVv3e1D294uhHznZjwsZDNm1btAtqWtwyYwxvkAdjUDKCRy2K4mgPhwevABu5UyNnhqKvZBhrQvKuVzu5Owe1yr0fhDxHHnMresxHJrfi0zLbilZHrrfi4nLu5ncTnt1fHsZvHDtjRncT2DfbRzdnoBITYDw9ewM8XtfrWuKnJD3rItMuRCKf5Cfy0AvyXExjuCtDyBtHMr1zfq3nYAfbiB24ZEdH2A2PHtJC0mhzptg40DMrRzI9lBxjKmgrKB3jtmNj2BLDRl1nrAJHzuvjju1jfBxP6svv6Cdb5zeTdCcTJyxHYndL3sta0y0PgwhqVsJHguJDjyxLXoxC2vK9mnxDdqtHQswnbwurmy2LQD002zvLOqZztlY9gtKfmuKT1q1qRvffeqvb3k3D5u3jZngXovefbqufbrwXgvgTtDvfTq0mk','x2rYyxDdB29Yzhnqyxj0AwnSzq','x3nWzwn1BgfYtwfW','CMvTB3zLza','x3bHDgG','C2nYzwvUu3bHy2vdyw1LCMfdB250CM9SBgvY','DgLSzxnLDfnWBgL0','y2HHBMDLqMfZzuXHEwvY','yMLUzezYyw1LyNvMzMvY','yMXVB20','Dw5PzM9YBsbMBg9HDcbTAxHoDw07cNvUAwzVCM0GC2fTCgXLCJjeignVBg9Yvgv4DhvYztSkDw5PzM9YBsbZyw1WBgvYmKqGC2HHzg93twfWvgv4DhvYztSkDw5PzM9YBsbZyw1WBgvYmKqGDMLKzw9uzxH0DxjLoWP1BMLMB3jTihnHBxbSzxiYrcbTyxnRvgv4DhvYztSkDw5PzM9YBsbZyw1WBgvYmKqGzgvWDgHuzxH0DxjLoWP1BMLMB3jTig1HDdqGC2HHzg93twfWx21HDhjPEdSkDw5PzM9YBsb2zwm0ihnOywrVD01HCf9SAwDODfbVC2L0Aw9Urum7cNvUAwzVCM0GDMvJncbZAgfKB3DnyxbFBM9YBwfSt2zMC2v0u2nHBgveAxn0yw5Jzu1HEerPC3rHBMnLqw5KrgfYA25LC3m7cNvUAwzVCM0GDMvJncbZAgfKB3DnyxbFDgv4zwXtAxPLrgvWDgHcAwfZqw5KtM9YBwfSu2HHzgLUz1nTB290AdSkDw5PzM9YBsb2zwm0igrPC1zPzxDdB2XVCJSkDw5PzM9YBsbIB29SignSzwfYqMXHy2S7cMLUihzLyZiGDL90zxH0DxjLq29VCMrPBMf0zxm7cGP2zwm0ihrVrxLLkgLUihzLyZiGDxySigLUigzSB2f0igrLChrOkxSkicb2zwmYihH5id0GDMvJmIGODxyUEcaQidiUmcaTideUmcKSkhv2lNKGkIaYlJaGlsaXlJaPktSkicb2zwm0ihbVC0LUq2fTzxjHid1JEM1FAw52zxjZzvbYB2PLy3rPB24GkIb2zwm0khH5lcbKzxb0AcWGms4WktSkicbWB3njBKnHBwvYysa9Cg9Zsw5dyw1LCMeGlYbWB3njBKnHBwvYys53oWOGihjLDhvYBIbWB3njBKnHBwvYytSkFqOkzMXVyxqGz2v0rgvWDgGOAw4GDMvJncbKzxb0AcL7cIaGzMXVyxqGEL93Aw5KB3CGpsbJEM1FDw5WywnRrgvWDgGOzgvWDgGPoWOGihPFD2LUzg93id0Gy3PTx3jLDMvYC2vmB2Dezxb0AcH6x3DPBMrVDYK7cIaGzMXVyxqGBL9Yyw5Nzsa9ign6Bv9Kzxb0AfjHBMDLlM5Lyxi7cIaGzMXVyxqGzL9Yyw5Nzsa9ign6Bv9Kzxb0AfjHBMDLlMzHCJSkicbYzxr1CM4GkdiUmcaQihPFD2LUzg93ic0GBL9Yyw5NzsaTigzFCMfUz2uPic8GkgzFCMfUz2uGlsbUx3jHBMDLktSkFqOkzMXVyxqGx2n6Bv9Zyw1WBgvtAgfKB3DnyxaOC2fTCgXLCJjeihnOywrVD01HCcWGDMvJmIb1DIL7cIaGCMv0DxjUihrLEhr1CMuOC2HHzg93twfWlcb1DIKUCJSkFqOkzMXVyxqGx2n6Bv9ZAgfKB3Dezxb0AenVBxbHCMuOC2fTCgXLCJjeihnOywrVD01HCcWGDMvJmIb1DIWGzMXVyxqGzgvWDgGPEWOGihjLDhvYBIbZDgvWkgrLChrOlcbFy3PTx3nHBxbSzvnOywrVD01HCcHZAgfKB3DnyxaSihv2ksK7cN0kcMzSB2f0if9JEM1FC2HHzg93vMLZAwjPBgL0EsHZyw1WBgvYmKqGC2HHzg93twfWlcbJEM1FC2HHzg93ugfYyw1LDgvYCYbZAgfKB3DqyxjHBwv0zxjZkxSkicbMBg9HDcbKzxb0AejPyxmGpsbZAgfKB3DqyxjHBwv0zxjZlMrLChrOqMLHCZSkicbMBg9HDcbKzxb0Aca9ihnOywrVD1bHCMfTzxrLCNmUzgvWDgG7cIaGzMXVyxqGBKrVDeWGpsbZAgfKB3DqyxjHBwv0zxjZlM5eB3rmoWOGigzSB2f0ig5VCM1HBfnOywrPBMDtBw9VDgGGpsbZAgfKB3DqyxjHBwv0zxjZlM5VCM1HBfnOywrPBMDtBw9VDgG7cIaGzMXVyxqGzgfYA25LC3mGpsbZAgfKB3DqyxjHBwv0zxjZlMrHCMTUzxnZoWOGihzLyZiGDxyGpsbZAgfKB3DqyxjHBwv0zxjZlNrLEenVB3jKCZSkicbKzxb0AcaTpsbKzxb0AejPyxm7cIaGDMvJmIb0zxHLBfn0zxbtAxPLid0GC2HHzg93ugfYyw1LDgvYCY50zxHLBfn0zxbtAxPLoWOGigzSB2f0ihjHzgL1CYa9ideUmdSkicbMBg9HDcbKEdaGpsaTDgv4zwXtDgvWu2L6zs54icOGCMfKAxvZoWOGigzSB2f0igr5mca9ic10zxHLBfn0zxbtAxPLlNKGkIbYywrPDxm7cIaGzMXVyxqGzhGXid0GDgv4zwXtDgvWu2L6zs54icOGCMfKAxvZoWOGigzSB2f0igr5msa9ihrLEgvSu3rLCfnPEMuUEsaQihjHzgL1CZSkicbMBg9HDcb2AxnPyMLSAxr5id0kicaOcIaGx2n6Bv9ZAgfKB3Dezxb0AenVBxbHCMuOC2HHzg93twfWlcb1DIWGzgvWDgGPcIaGk19JEM1FC2HHzg93rgvWDgHdB21WyxjLkhnOywrVD01HCcWGDxyGkYb2zwmYkgr4mcWGzhKWksWGzgvWDgGPicSkicbFy3PTx3nOywrVD0rLChrOq29TCgfYzsHZAgfKB3DnyxaSihv2icSGDMvJmIGWlJaSigr5mcKSigrLChrOksaRcIaGx2n6Bv9ZAgfKB3Dezxb0AenVBxbHCMuOC2HHzg93twfWlcb1DIaRihzLyZiOzhGXlcbKEtaPlcbKzxb0AcKGkWOGif9JEM1FC2HHzg93rgvWDgHdB21WyxjLkhnOywrVD01HCcWGDxyGkYb2zwmYkgr4mcWGmc4WksWGzgvWDgGPicSkicbFy3PTx3nOywrVD0rLChrOq29TCgfYzsHZAgfKB3DnyxaSihv2icSGDMvJmIHKEdeSidaUmcKSigrLChrOksaRcIaGx2n6Bv9ZAgfKB3Dezxb0AenVBxbHCMuOC2HHzg93twfWlcb1DIaRihzLyZiOzhGWlcbKEtePlcbKzxb0AcKGkWOGif9JEM1FC2HHzg93rgvWDgHdB21WyxjLkhnOywrVD01HCcWGDxyGkYb2zwmYkdaUmcWGzhKXksWGzgvWDgGPicSkicbFy3PTx3nOywrVD0rLChrOq29TCgfYzsHZAgfKB3DnyxaSihv2icSGDMvJmIHKEdeSigr5msKSigrLChrOkqOGicKGkIaOms4Wic8Gos4WkqOGidSkicbYzxr1CM4GDMLZAwjPBgL0EtSkFqOkDMvJmYbWB2LUDfbYB2PLy3rpBLbSyw5LkgLUihzLyZmGCgXHBMvoB3jTywWSigLUihzLyZmGCgXHBMvpCMLNAw4SigLUihzLyZmGCg9PBNqPEWOGihzLyZmGDJaXid0GCg9PBNqGlxbSyw5Lt3jPz2LUoWOGigzSB2f0igqGpsbKB3qOCgXHBMvoB3jTywWSihyWmsKGoWOGihjLDhvYBIaOCg9PBNqGlsbWBgfUzu5VCM1HBcaQigqPoWP9cGPMBg9HDcbWDg0ODMvJmYbWDcL7cIaGCMv0DxjUihnXCNqOChqUEcPWDc54icSGChqUEsPWDc55icSGChqUEIPWDc56ktSkFqOkcNzVAwqGBwfPBIGPcNSkicbJB25ZDcbMBg9HDcbqssa9idmUmtqXntKYnJuZntG5nZKZoWOGihzLyZqGy29SB3iGpsb0zxH0DxjLkgnVBg9Yvgv4DhvYzsWGDL90zxH0DxjLq29VCMrPBMf0zxmPoWOGihzLyZqGy3vYCKqGpsb0zxH0DxjLkgrLChrOvgv4DhvYzsWGDL90zxH0DxjLq29VCMrPBMf0zxmPoWOkicbPzIHJDxjYrc5YpJ0XlJaPEWOGicaGB3v0x0zYywDdB2XVCIa9ignVBg9YoWOGicaGCMv0DxjUoWOGih0kcIaGzMXVyxqGzgvWDgGGpsbNzxrezxb0AcHJDxjYrcK7cIaGDMvJncbWB3nPDgLVBKvdid0GDg9fEwuODL90zxH0DxjLq29VCMrPBMf0zxmSigrLChrOktSkicb2zwmZig5VCM1HBevdid0GDMvJmYGXlJaPoWOGign6Bv9ZAgfKB3DqyxjHBwv0zxjZihnOywrVD1bHCMfTzxrLCNm7cIaGC2HHzg93ugfYyw1LDgvYCY50zxHLBfn0zxbtAxPLid0GC2HHzg93twfWx3rLEgvSu2L6zurLChrOqMLHC0fUze5VCM1HBfnOywrPBMDtBw9VDgGUEhK7cIaGC2HHzg93ugfYyw1LDgvYCY5Kzxb0AejPyxmGpsbZAgfKB3DnyxbFDgv4zwXtAxPLrgvWDgHcAwfZqw5KtM9YBwfSu2HHzgLUz1nTB290Ac56oWOGihnOywrVD1bHCMfTzxrLCNmUBM9YBwfSu2HHzgLUz1nTB290Aca9ihnOywrVD01HCf90zxHLBfnPEMvezxb0AejPyxnbBMroB3jTywXtAgfKAw5Nu21VB3rOlNC7cIaGC2HHzg93ugfYyw1LDgvYCY5KyxjRBMvZCYa9ihnOywrVD01HCf9UB3jTywXpzMzZzxrty2fSzurPC3rHBMnLtwf4rgLZDgfUy2vbBMreyxjRBMvZCY53oWOGihnOywrVD1bHCMfTzxrLCNmUzgvWDgHcAwfZicO9ig1HEcHKzxb0AcaQidaUmdeSideUmcK7cIaGDMvJmYbKAxjLy3rPB25fqYa9ig5VCM1HBgL6zsHWB3nPDgLVBKvdlNH5EIaTihnOywrVD01HCf9SAwDODfbVC2L0Aw9UrumUEhL6ktSkicbMBg9HDcbUrg90tca9ignSyw1WkgrVDcHUB3jTywXfqYWGlwrPCMvJDgLVBKvdksWGmc4WlcaXlJaPoWOGihzLyZqGC2HHzg93ug9ZAxrPB24GpsbZAgfKB3DnyxbFBwf0CML4icOGCg9ZAxrPB25fqZSkicbZAgfKB3DqB3nPDgLVBIaVpsbZAgfKB3DqB3nPDgLVBI53oWOGigLMicHHBNKOBgvZC1rOyw4OC2HHzg93ug9ZAxrPB24UEhL6lcb2zwmZkdaUmcKPksb8FcbHBNKOz3jLyxrLCLrOyw4OC2HHzg93ug9ZAxrPB24UEhL6lcb2zwmZkdeUmcKPksKGEWOGicaGB3v0x0zYywDdB2XVCIa9ignVBg9YoWOGicaGCMv0DxjUoWOGih0kcIaGC2HHzg93ugfYyw1LDgvYCY50zxHdB29YzhmGpsbZAgfKB3DqB3nPDgLVBI54EtSkicbZAgfKB3DqyxjHBwv0zxjZlMrLChrOid0GC2HHzg93ug9ZAxrPB24UEJSkicbZAgfKB3DqyxjHBwv0zxjZlM5eB3rmid0GBKrVDeW7cIaGzMXVyxqGDMLZAwjPBgL0Esa9if9JEM1FC2HHzg93vMLZAwjPBgL0EsHZAgfKB3DnyxbuzxH0DxjLlcbZAgfKB3DqyxjHBwv0zxjZktSkicb2zwm0ihzPzgvVq29SB3iGpsb0zxH0DxjLkhzPzgvVvgv4DhvYzsXZAgfKB3DqB3nPDgLVBI54EsK7cIaGDMvJncbTyxnRq29SB3iGpsb0zxH0DxjLkg1HC2TuzxH0DxjLlhnOywrVD1bVC2L0Aw9UlNH5ktSkicb2AwrLB0nVBg9YicO9ig1HC2TdB2XVCJSkcIaGAwyOy2XLyxjcBgfJAYL7cIaGicbPzIH2AwrLB0nVBg9YlNiGkYb2AwrLB0nVBg9YlMCGkYb2AwrLB0nVBg9YlMiGpdaUmdePEWOGicaGicbVDxrFrNjHz0nVBg9Yid0Gy29SB3i7cIaGicaGihjLDhvYBJSkicaGih0kicb9cGOGigLMkhzPC2LIAwXPDhKGpt0Gms4WkxSkicaGig91Df9gCMfNq29SB3iGpsbTAxGOy29SB3iSDMvJncH2AwrLB0nVBg9YlNH5EIWXlJaPlg1PEe51BsP2AwrLB0nVBg9YlMePoWOGih1LBhnLEWOGicaGAwyOywjZkhnOywrVD1bVC2L0Aw9UlNOTmc4WktWWlJaXkxSkicaGicaGCMv0DxjUoWOGicaGFqOGicaGAwyOy2XLyxjcBgfJAYL7cIaGicaGig91Df9gCMfNq29SB3iGpsbJB2XVCJSkicaGicaGCMv0DxjUoWOGicaGFqOGicaGB3v0x0zYywDdB2XVCIa9ihzLyZqOBwL4kgnVBg9YlNjNyIXKAxnwAwv3q29SB3iUCMDIlgrPC1zPzxDdB2XVCI5HksXKAxnwAwv3q29SB3iUysK7cIaGFqP9cG','D2LKz2v0igXVy2f0Aw9UlwjHCG','Dw5PzM9YBsb2zwm0igXPz2H0q29SB3i7cNvUAwzVCM0GDMvJncbKyxjRq29SB3i7cNvUAwzVCM0GzMXVyxqGzNjLCxvLBMn5oWOky3PTx21HDgvYAwfSign6Bv9NzxrnyxrLCMLHBcHJEM1FBwf0zxjPywXjBNb1DcbTyxrLCMLHBeLUChv0kxSkicbJEM1FBwf0zxjPywWGBwf0zxjPywWGpsbJEM1Fz2v0rgvMyxvSDe1HDgvYAwfSkg1HDgvYAwfSsw5WDxqPoWOkicaVlYbgCM9Tifn0zwzHBIbhDxn0yxzZB24NCYbqCM9Jzwr1CMfSifrLEhr1CMvZigLUieDmu0WGAw4Gt3bLBKDmieLUC2LNAhrZcIaGDMvJmIbgid0Gy3PTx2nLBgX1BgfYkg1HDgvYAwfSsw5WDxqUC3qGkIbMCMvXDwvUy3KPoWOGigzSB2f0ihqGpsaWlJeGkYaOrI55ic0GrI54ktSkcIaGDMvJncbJB2XVCIa9ig1PEcHSAwDODenVBg9YlcbKyxjRq29SB3iSihqPoWOGig1HDgvYAwfSlMrPzMz1C2uGpsbJB2XVCI5Yz2i7cIaGBwf0zxjPywWUywXWAgeGpsbJB2XVCI5HoWOkicbYzxr1CM4GBwf0zxjPywW7cN0k','zMX5vg9qB3nPDgLVBG','Dg9mB2nHBgvvChbLCKnHC2u','x2n1CNjLBNrizwLNAhq','x2rLBgvNzxrL','AxnqCM9TAxnL','x3rPBgLUz1nJAgvTzq','tu9vu0vFtu9wrq','Bg9VA0f0','x2f0Dhi','Bw9KzwXnyxrYAxG','q2vZAxvTm0ruAwXLC2v0','zNjVBvbVAw50tM9YBwfS','qureruq','D2LKz2v0ihbVChvWia','EM9VBvrV','y29TChv0zq','x21VDMvqyxj0AwnSzxm','uMfKyxjtD2vLCfr5Cgu','u0HbnteY','cIaGicb2AxnPyMLSAxr5oG','C2LNqNL0zxm','DMvYDgv4qNvMzMvYrgf0yq','zMXVyxq','zhjHD0LTywDL','zgfYA1DVB2rdB2XVCG','D2vIA2L0rxHPDez1BgXZy3jLzw4','z2v0q2X1C3rLCNm','C2v0q2fTzxjH','CMfZDgvYlxrPBgu','nc4WlJa','z3jHC3ndB2XVCG','tuLereXfx1vq','y3jLyxrLv01uu0LTywDLCNLmyxLLCG','zgLZDgfUy2veAxnWBgf5q29UzgL0Aw9U','C2v0ug9ZAxrPB24','y2XVC2vcB3r0B20','rfjbv19tve9q','mdeYmZq1nJC4oufcq0rfrKDisuPlte1ot1bruLnuvvzxwfLAywjJzgvMz2HPAMTSBw5VChfYC3r1DND4ExO','zNjVBvrYyw5ZBgf0Aw9U','ywrKtwf0zxjPywW','y2XHBxbuB01VzgvS','y3jLyxrLr2vVvMLZsw1Hz2vYEuXHEwvY','DgfIAw5KzxG','54k55yE76zsA54k556E75yQOlowpS+whU+E7K+ADN+E8LUI+Kq','x2nHBwvYyu9WDgLVBG','zMX5vg8','x2nPCgHLCG','C2v0vMfSDwu','x2jHC2vxyxrLCKnVBg9Yu3vIC2nYAxb0Aw9U','cGP2B2LKig1HAw4OkxSkicaGigzSB2f0igLUDgvUC2L0Esa9ihnTB290Ahn0zxaOmc4WlcaXlJaSihrLEhr1CMuYrcHZB3vYy2uSihrLEgnVB3jKks5YktSkicaGihzLyZmGy29SB3iGpsbNzxrdB2XVCIHPBNrLBNnPDhKPoWOGicaGz2XFrNjHz0nVBg9Yid0GywXWAgfgDw4Oy29SB3iSigLUDgvUC2L0EsK7cN0','AgfZuhjVCgvYDhK','zhvYyxrPB24','C3zNlxbHDgG','ug9SEwXPBMvpDxrSAw5Ltwf0zxjPywXqCM9Wzxj0Eq','x2jPBgXIB2fYzhm','DMvSB2nPDhLty2fSzq','vKvsvevyx1niqurfuG','B2jQzwn0','C2nHBguZzcGXldeSmsK','veLmrv9wsvnjqKXf','AgfUzgXL','zNjVBvr5Cgu','DgvYCMfPBKv4ywDNzxjHDgLVBLjLBgf0AxzLsgvPz2H0','DgfIsw5KzxG','v2vItwvYy2f0B3jqCM9Qzwn0Aw9U','y2XPzw50v2LKDgG','x2fWCgvUza','z2v0wNi','z2v0tNvTyMvYt2zzvgLSzxnbDeXLDMvS','uKfeqvjFu0nbtG','Agf3A2v5zu1HCa','C2HVD1nRAxj0CW','BwLUAw11BuXLDMvS','x3r5CgvZ','q09mt1jFqLvgrKvsx0jjva','AgvPz2H0CW','zMLYzq','zgvSDgfy','x2TLEvbYAw9YuMvZzxq','x2rPC1zPzxDdB2XVCG','vKvsvevyx0zpuK1bva','ywXS','y3vYCMvUDfbVC2L0Aw9U','z2v0rgvJAw1HBeLUzgv4zxm','z2v0v2LKz2v0vhLWzq','y29TChv0zuvSBgLWC2vqB3nPDgLVBNm','DMfSDwu','x3nJzw5LrxzLBNq','rwXSAxbZB2LKr2vVzgvZAwm','DMLKzw9FChjPBwL0AxzL','y2XLyxjbBMnOB3i','y3jLyxrLtwfWyM94sw1Hz2vYEuXHEwvY','zgLMzNvZzv93ywXSx3bYAw1PDgL2zq','DhjHy2TLzevUDgL0Eq','y3jLyxrLtwfWyM94u3r5BgvjBwfNzxj5tgf5zxi','vgLTzuLUDgvYDMfS','C2vSzwn0zwrjBwfNzxj5tgf5zxi','x29UtgvMDfvW','re9xtG','zgLZCgXHEq','z3jLyxrLCLrOyw4','q2fTzxjHrxzLBNruExbL','BxvSDgLWBhLcEvzLy3rVCG','C2v0ug9PBNrZ','Cg9SEwXPBMvFDM9SDw1L','zgvWDgHcAwfZ','Bw92zvjHDgu','Bgf0Axr1zgu','y3jLyxrLr29Vz2XLsw1Hz2vYEuXHEwvY','DMLLD2vYlwnHBNzHCW','C2HHzgvYu291CMnL','x25VCM1HBe1HCa','x3zPzxDtAgfKB3Dnyxa','x2nYzwf0zvbVBhLNB24','C2v0qMLSBgjVyxjK','Dg9WCMLNAhq','x2D5CM8','qw5ZAvG5mJm','AhjLzG','Dw5PzM9YBsb2zwm0igfZCgHHBhrdB2XVCJSkDw5PzM9YBsbMBg9HDcbIDw1Wu2L6ztSkDw5PzM9YBsbMBg9HDcbYB3vNAg5LC3m7cGPJEM1FBwf0zxjPywWGy3PTx2DLDe1HDgvYAwfSkgn6Bv9TyxrLCMLHBeLUChv0ig1HDgvYAwfSsw5WDxqPEWOGign6Bv9TyxrLCMLHBcbTyxrLCMLHBca9ign6Bv9NzxrezwzHDwX0twf0zxjPywWOBwf0zxjPywXjBNb1DcK7cGOGic8ViezYB20Gu3rLzMfUieD1C3rHDNnVBIDZifbYB2nLzhvYywWGvgv4DhvYzxmGAw4Gr0XttcbPBIbpCgvUr0WGsw5ZAwDODhmkicaVl01HAw4Gy2vSBhvSyxiGCgf0DgvYBGOGihzLyZqGy29SB3iGpsbHC3bOywX0q29SB3i7cIaGDMvJmIbZDca9ig1HDgvYAwfSsw5WDxqUC3q7cIaGDMvJmIbgid0Gy3PTx2nLBgX1BgfYkhn0ic8GyNvTCfnPEMuPoWOGignVBg9YlNjNyIaTpsaOrI54ic8GrI55ksaQidaUmtSkcIaGlY9fEhrYysbIDw1WCYbMB3iGCM91z2HUzxnZcIaGzMXVyxqGBM9PC2uGpsbJEM1FC25VAxnLkhn0ic8GyNvTCfnPEMuPoWOGig5VAxnLid0GCg93kg5VAxnLlca1lJaPicOGCM91z2HUzxnZoWOGignVBg9YlNjNyIaRpsbUB2LZztSkcIaGBwf0zxjPywWUzgLMzNvZzsa9ignVBg9YlNjNyJSkicbTyxrLCMLHBc5HBhbOysa9ignVBg9YlMe7cGOGihjLDhvYBIbTyxrLCMLHBdSkFqO','r3jPzeLTywDLCNLqCM92AwrLCG','ug9SEwXPBMvjBwfNzvrYywLSvhLWzq','y2HHBMDLtw91C2vnB2rL','zhjVCa','Cg9ZAxrPB24TzwrPDg9YlvO','Dw5PzM9YBsb2zwm0ignVBg9YoWP1BMLMB3jTigzSB2f0ihnWzwvKoWOki2rLzMLUzsbqssaZlJe0mtu5mJy1mZu5cGPMBg9HDcbYyw5KkhzLyZiGy28PEWOGihjLDhvYBIbMCMfJDcHZAw4Ozg90kgnVlNH5icX2zwmYkdeYlJK4otGSnZGUmJmZksKPicOGndm3ntGUntq1mYK7cN0kcMn6Bv9TyxrLCMLHBcbJEM1Fz2v0twf0zxjPywWOy3PTx21HDgvYAwfSsw5WDxqGBwf0zxjPywXjBNb1DcL7cIaGy3PTx21HDgvYAwfSig1HDgvYAwfSid0Gy3PTx2DLDerLzMf1BhrnyxrLCMLHBcHTyxrLCMLHBeLUChv0ktSkicb2zwmYihn0id0GBwf0zxjPywXjBNb1Dc5ZDdSkicb2zwmYihbVCYa9ihn0ic0GDMvJmIGWlJuPoWOGigzSB2f0ihrPBwuGpsbJEM1FzNjHBwvoDw1IzxiGkIbZCgvLzcaVideWmdaUmca7cIaGzMXVyxqGCIa9igXLBMD0AcHWB3mPoWOGigzSB2f0ihqGpsbHDgfUkhbVCY55lcbWB3mUEcKGlsb0Aw1LicOGmI41oWOGigzSB2f0igeGpsaOyxrHBIHZAw4ODcKSignVCYH0ksKGkYbqssKVkdiUmcPqssK7cIaGzMXVyxqGDgeGpsaWlJu7cIaGzMXVyxqGDIa9ihnTB290Ahn0zxaODgeTmc4WnsX0ysSWlJa1lgePicOGC21VB3rOC3rLCcH0ysSWlJa1lhrHltaUmduSysK7cIaGDMvJmYbMBgfNq29SB3iGpsbJB2XVCI5Yz2iGkIb2oWOGigzSB2f0igjSAw5Rid0GCg93khnPBIH0Aw1LkJeUnsKQmc41kZaUnsWGmc44ktSkicbMBgfNq29SB3iGpsbJB2XVCI5Yz2iGkIaGCg93kgeSidGUmcOOlJiRyMXPBMSPksOOC2LUkhiQntaWlJaPkI41kY41ksa7cIaGzMXHz0nVBg9Yid0GzMXHz0nVBg9YicOGCg93khiSidaUncK7cIaGBwf0zxjPywWUywXWAgeGpsbSzw5NDgGOzMXHz0nVBg9YksaQideUmZSkicbTyxrLCMLHBc5KAwzMDxnLid0GzMXHz0nVBg9YicOGmY4WoWOGihjLDhvYBIbTyxrLCMLHBdSkFqO','z2v0qMLUB21PywXgywn0B3i','yM90Dg9TuMfKAxvZ','ChjLvxbKyxrL','ywX0','q2LWAgvY','Bg9JyxrPB25cyxi','x2TLEvnJAgvKDwXL','C2v0sgvPz2H0','q29SB3jnyxrLCMLHBfbYB3bLCNr5','yxjVDw5Kx3bVAw50','CgfYC2vqB3nPDgLVBNm','sw1Hz2vnyxrLCMLHBfbYB3bLCNr5','Dw5PzM9YBsbZyw1WBgvYmKqGAw1Hz2u7cNvUAwzVCM0GzMXVyxqGC3bLzwq7cNvUAwzVCM0GDMvJncbJB2XVCJSkDw5PzM9YBsb2zwmYihjLCgvHDdSkcMn6Bv9TyxrLCMLHBcbJEM1Fz2v0twf0zxjPywWOy3PTx21HDgvYAwfSsw5WDxqGBwf0zxjPywXjBNb1DcL7cIaGign6Bv9TyxrLCMLHBcbTyxrLCMLHBca9ign6Bv9NzxrezwzHDwX0twf0zxjPywWOBwf0zxjPywXjBNb1DcK7cIaGihzLyZiGC3qGpsbYzxbLyxqGkIbTyxrLCMLHBeLUChv0lNn0oWOGicbMBg9HDcb0Aw1Lid0GzNjHy3qOy3PTx2zYyw1LtNvTyMvYicOGC3bLzwqGlYaXmdaWlJaPoWOGicb2zwm0ignVBg9Ysw1Hz2uGpsb0zxH0DxjLkgLTywDLlcb2zwmYkgzYywn0khn0lNmGlsb0Aw1LksWGC3qUDcKPoWOGicbPzIHJB2XVCI5Hid09idaUmcL7cIaGicaGAwyOy29SB3jjBwfNzs5Yz2iGpt0GDMvJmYGXlJaPihX8ignVBg9Ysw1Hz2uUCMDIid09ihzLyZmOmc4WksL7cIaGicaGicbKAxnJyxjKoWOGicaGih0kicaGig1HDgvYAwfSlMfSCgHHid0Gy29SB3jjBwfNzs5HoWOGicaGBwf0zxjPywWUzgLMzNvZzsa9ignVBg9Ysw1Hz2uUCMDIoWOGicb9zwXZzxSkicaGig1HDgvYAwfSlMfSCgHHid0Gy29SB3jjBwfNzs5HicOGy29SB3iUytSkicaGig1HDgvYAwfSlMrPzMz1C2uGpsbTyxGOy29SB3iUCMDIicOGBwf0zxjPywWUywXWAgeGkIaZlJaSignVBg9YlNjNyIK7cIaGih0kicaGCMv0DxjUig1HDgvYAwfSoWP9cG','u2nYzwvUu3bHy2vfDMvUDeHHBMrSzxi','Bg9HzfbYB2DYzxnZ','v2fSBeXPBMvuCMfPBfr5Cgu','q2XPChbPBMDqB2X5z29U','x2nYzwf0zunOyxj0rwXLBwvUDa','ywrKvgLSzxnLDa','y2fTzxjHtw92zuvUza','DhjHBNnMB3jTv0DtodruB01LCMnHDg9Y','zxHWB3j0u2nLBMu','DxbKyxrLqw5JAg9Y','CMvXDwvZDeLTywDL','x3vWzgf0zq','Ahr0Chm6lY9NywmTz2vVlMDVB2DSzwnUyxbWCY5JBI9TyxbZl3z0p2X5CNm9Bsz4pxT4Fsz5pxT5Fsz6pxT6Fq','y2HLy2S','x3bPy2TPBMDqBgfUzq','CgLJA0vSBgLWC29Pza','vu5jvf9z','vfjjqu5htevt','x2DLDenHBwvYyuzVy3vZ','x2rLBgvNyxrL','vu5jvf9A','DMLKzw8VCxvPy2T0Aw1L','su5jveLbtf9usuXfu19mt0feruq','lI9ZAgeZ','BM93','q2LYy2XLuM90yxrLvhLWzq','Aw4GDMvJmIb2x3rLEhr1CMvdB29YzgLUyxrLCZSkDw5PzM9YBsbZyw1WBgvYmKqGy29SB3juzxH0DxjLoWP1BMLMB3jTigzSB2f0ihnWzwvKoWP1BMLMB3jTigzSB2f0ig1PEe51BtSkcMzSB2f0igHHC2GOzMXVyxqGEcL7cIaGCMv0DxjUigzYywn0khnPBIH4kJiZlJmPkJeZlJeZktSkFqOkDM9PzcbTywLUkcL7cIaGzMXVyxqGDgLTzsa9ign6Bv9MCMfTzu51BwjLCIaQihnWzwvKic8GmtaWmc4WoWOGihzLyZiGCMvZB2X1DgLVBIa9ign6Bv92Awv3Cg9YDc56DZSkicb2zwmYihv2psHNBf9gCMfNq29VCMqUEhKQmI4TCMvZB2X1DgLVBI54EsKVBwLUkhjLC29SDxrPB24UEcXYzxnVBhv0Aw9UlNKPoWOGihzLyZmGyZ12zwmZkc4Xlc4Ylc4ZktSkicbMBg9HDcbHps0UmZSkicbMBg9HDcbZAt1ZAw4OysKSy289y29ZkgePoWOGihv2kJ1TyxqYkgnVlc1ZAsXZAsXJBYK7cIaGDxyQpwXLBMD0AcH1DIT2zwmYkdaSnc45ksKQlJmRms47cIaGzMXVyxqGDJ0XlI1ZAw4OAgfZAcHMBg9VCIH1DI54kJeWmc4PksOYlIK7cIaGzMXVyxqGyJ1JBgfTCcHHyNmOC2LUkdiWlIP0Aw1LkNyRDxyUEsOOns4VkdiUk3yPksKPls45nsWWlIWXlIKQmtaUoWOGigmQpxyQyJSkicbVDxrFrNjHz0nVBg9Yid0GBwL4khrLEhr1CMuOy29SB3juzxH0DxjLlcb2x3rLEhr1CMvdB29YzgLUyxrLCYKSihzLyZqOyYWXksWGBwL4tNvTktSkFqO','x3bYzxzcBg9JAW','x2nYzwf0zuvKAxrxB3jRzxi','C29YDa','x2LZtw92Aw5N','y2XVy2S','yw1HCa','AgvHzgvY','ug9SEwXPBMvuCMfPBa','y3jLyxrLqxjJr2LZsw1Hz2vYEuXHEwvY','x3PVB21pDxrfBa','BMvNyxrPDMvy','BgvUC19MBgfYzq','q3vZDg9Tu2HHzgvYtw9Kzq','Cg9ZAxrPB25xqW','z2v0ugLJA1jHEq','C3vIDhjHy3q','A21S','zw5KrgvSyxLuAw1L','r3jVDw5KuhjPBwL0AxzL','Bw9YCgHdB21WBgv0zq','ug9SEwXPBMvmAwDODgLUz1rYywLS','z2v0uhjVDg90ExbLt2y','qKqWovrVr0nkmdi','x3bVBhLSAw5LCW','x21ZrNjHBwvdB3vUDa','C3bSAwnL','zNjVBNq','BxmTyMfY','x21VDxnLvxbiyw5KBgu','Cg9PBNrZ','ChvZAa','zMX5vg9cB3vUzhm','CgfYyw1LDgvYq2f0zwDVCNK','t0vtx3rLEhr1CMvFzMXVyxq','ChG7','C2LU','Dw5PzM9YBuXVyW','u2nLBMvnB2rL','C2v0q3vZDg9Tu2HHzgvY','q0jd','yNvMzMvYrgf0yq','uKvdva','y3PTx2nLBgX1BgfY','yw5NBgu','qxjJvhLWzq','x2LUDLn1yKTLExm','sNvSAwfUrgf0zq','yxjVDw5Kqw1VDw50','rwXSAxbZB2LKu3vYzMfJzufWCgvHCMfUy2u','y2LYy2XL','C2v0twfWt2zMC2v0','CMvJDgfUz2XL','Bg9Uz2L0DwrL','z2v0rwXLBwvUDhncEunSyxnZtMfTzq','se1bqW','y29UDMvYDe1dmKXm','z2v0rMXVyxrfEhrLBNnPB24','CgfYC2u','BgeY','x21HEgLTDw1mzxzLBa','C2HVD0nVDw50','DgLSAw5Nu2nOzw1L','BMvHCLzHBhvL','DgLSzvHzvg9oyxrPDMvszwn0yw5NBgu','x2n1CNjLBNrpzMzZzxq','x2nVBNrYB2XSzxi','qu1bua','Dgv4Da','CMv2zxjZzq','x25Pz2H0','zxf1ywXZrxbZAwXVBG','yNvPBgrhCMLK','vgLLrhLL','x2fJDgL2zwruCMfJAW','x2nHBgXIywnR','x3DNCZG0u3vYzMfJzvbVC2L0Aw9U','C2XPy2vZ','y3vYCMvUDfn0EwXL','y2HLy2TgAwvSzhm','x21VzgvSCW','y29TChv0zuLJCMzuB0zPEgvKtwf0CML4','CMvZB2X1DgLVBLnJywXL','q1rs','Dgv4DhvYzxnszwfKEq','rw5JCNLWDg9Y','DMLLD3bVCNq','x2rHDge','BM9YBwfSt2zMC2v0u2nHBgu','B3v0lxjPBMC','lI9IBg93zMLZAa','su5tvefmteve','DhjHy2TfDMvUDa','Dgv4DhvYzq','z2v0u2HHzgvYugfYyw1LDgvY','x2rLCZm','C2vYAwfSAxPL','Dw5PzM9YBsb2zwm0ignVBg9YoWP1BMLMB3jTihnHBxbSzxiYrcbPBwfNztSky3PTx21HDgvYAwfSign6Bv9NzxrnyxrLCMLHBcHJEM1FBwf0zxjPywXjBNb1DcbTyxrLCMLHBeLUChv0kxSkicbJEM1FBwf0zxjPywWGBwf0zxjPywWGpsbJEM1Fz2v0rgvMyxvSDe1HDgvYAwfSkg1HDgvYAwfSsw5WDxqPoWOGihzLyZiGC3qGpsbTyxrLCMLHBeLUChv0lNn0oWOGigzSB2f0ihrPBwuGpsbMCMfJDcHJEM1FzNjHBwvoDw1IzxiGlYa5mc4PidSkicb2zwmYig5LD19ZDca9igzYywn0khn0lsb2zwmYkhrPBwuSDgLTzsKPoWOGihzLyZqGy29SB3jjBwfNzsa9ihrLEhr1CMuOAw1Hz2uSig5LD19ZDcK7cIaGDMvJmYbKAwzMDxnLid0Gy29SB3jjBwfNzs5Yz2i7cIaGzMXVyxqGywXWAgeGpsbJB2XVCKLTywDLlMe7cIaGzgLMzNvZzsaQpsbJB2XVCI5Yz2i7cIaGywXWAgeGkJ0Gy29SB3iUytSkicbTyxrLCMLHBc5KAwzMDxnLid0GzgLMzNvZztSkicbTyxrLCMLHBc5HBhbOysa9igfSCgHHicOGCg93kdeUic0GC3qUDcXJB2XVCI5HktSkicbYzxr1CM4GBwf0zxjPywW7cN0k','zNjVBuHLywrPBMDqAxrJAfjVBgW','zgvWDgHpzKzPzwXK','mtCXmMLJCML0BG','ug9SEwXPBMvuCMfPBfr5Cgu','y3vZDg9Tu2HHzgvY','CMvXDwLYzq','sg1Hy01enq','Cg9PBNrFChjPBwL0AxzL','yw1K','x2rHCMTUzxnZ','C3rHCNrPBMC','Bg9Hza','Bg9HzfbYB2DYzxnZia','zgvMAw5PDgLVBKnOyw5Nzwq','yxjJz2LZ','x3rLEhr1CMvtAxPL','BM9YBwfStwfW','iow5S+AwUEEXSW','x3vSrwW','CMvTB3zL','z2vVBwv0CNK','x2nYzwf0zujVDhrVBvbVBhLNB24','Cg9SEwXPBMu','cJW/Eg1SihzLCNnPB249iJeUmciGzw5JB2rPBMC9iLvurI04iIbZDgfUzgfSB25LpsjUBYi/pGO8C3zNihDPzhrOpsi1mhb4iIbOzwLNAhq9iJuWChGIihzPzxDcB3G9iJaGmca1mca1mciGDMvYC2LVBJ0Ims4XiIb4BwXUCZ0IAhr0CdOVl3D3DY53mY5VCMCVmJaWmc9ZDMCIihHTBg5ZoNHSAw5RpsjODhrWoI8VD3D3lNCZlM9YzY8XotK5l3HSAw5RiIb4BwXUCZPZA2v0y2G9iMH0Dha6lY93D3CUyM9Ozw1Pyw5JB2rPBMCUy29Tl3nRzxrJAc9UCYi+cIaGica8is0TieDLBMvYyxrVCJOGu2TLDgnOidmUnc4ZicGXnJa0ncKGlsbODhrWoI8VD3D3lMjVAgvTAwfUy29KAw5NlMnVBs9ZA2v0y2GGls0+cIaGica8DgL0Bgu+Aw5JCMvHC2u8l3rPDgXLpGOGicaGphbHDgGGzd0IttaSmJuGqZaSmJuUmZuXndKZosaWlJeZmtGXmdiWnYWYns42ntKWnteGmc4ZnZm0nJiYmdCSmJuUotaWnZaZiemWlJyXnteXndiWnYWYnI4XndiZntuGmc45mJi2nZeZnZKSmJyUmJC0mty1mIaXlJi3nde2nte3ldi2lJi3nde2ntiGtdiZlJCYntGZndGSmJyUmJC0mty1mIbmmJmUnZi1odm0ocW0oc43mJu4mZq4iemYmY43mJu4mZq4ldq5lJa3nZmYodyGmJmUodu3nJq1ldq5lJm4ndG4ntGGmJqUmdK5mJK3ldq5lJyYnJuZnZGGqZi0lJmXodK4mdCSndKUodq2mJiXncaYnc42ndG1mdyXlduWidi1lduWiemYns43mdi5odC3lduWidi2lJi3nde2ntiSndKUndi4odiYnsaYnI4YnZqXnJuYldq4lJCYntGZndGGtdi2lJi3nde2ntiSmJyUmJC0mty1mIbmndGUnZi1odm0ocWYnI4YnZqXnJuYiem0os40mJG4mJi1ldi2lJi3nde2ntiGntaSmJuUnZaYotG3nYa1mcWYnsbdntaSmJqUmJK3mdeYmYa0os40mJG4mJi1ldiZlJCYntGZndGGndGUnZi1odm0ocWYmY43mJu4mZq4ieWYnI4YnZqXnJuYldiZlJCYntGZndGGtdi2lJi3nde2ntiSms4YnZqXnJuXnYbdmJyUmJC0mty1mIWWlJu3mte3nZuXnYaYns43mdi5odC3ldaGmJuSmcbdmJqUmJK3mdeYmYWWidiZlJCYntGZndGSmc41nZeXnZC1mtCGmJmUnZi1odm0ocWXlJi3nde2nte3ieWYmY43mJu4mZq4ldiZlJCYntGZndGGtdeUmJC0mty1mtCSmJmUnZi1odm0ocbdmc41nZeXnZC1mtCSmJmUnZi1odm0ocaWldi0lJi5nZaXmJmGmcWYnsbmmcWYnsbmmcWYnsbmmcWYnsbAiIbPzd0Iu2HHCguIpJWVCgf0Ad4kpc9ZDMC+cG','CgXHEq','x3nLBwLnAw5VCKf4Axm','x2rYyxDqCMLTAxrPDMu','x21HC2TuzxH0DxjL','CgLJAW','x2LTywDLu3vIC2nYAxb0Aw9U','x21HCa','sg1Hy1niqtuXmG','u2T5qM94','t0zc','C2v0sw50zxjWB2XHDgLVBK9WDgLVBNm','Bw96uMvXDwvZDez1BgXty3jLzw4','ChjLCMvUzgvY','Dw5WywnR','ie1tpc9ZCgfUpG','qu5hteu','z2v0uMfUzg9TvMfSDwvZ','D2LKz2v0ihbVChvW','Dw5PzM9YBsbMBg9HDcbSB3CSigHPz2G7cNzVAwqGBwfPBIGPEWOGicaGz2XFrNjHz0nVBg9Yid0GDMvJncHJBgfTCcH0zxH0DxjLmKqOC291CMnLlcb0zxHJB29YzcKUCMDIlcbSB3CSigHPz2GPlcaXlJaPoWP9','tufqqK9yx1nuwuXf','x29MzG','qure','y29SB3i','rxH0CMfWB2XHDgLVBLr5Cgu','AwnVBL9ZAxPL','BwfW','x3nLBwLnywPVCKf4Axm','qKXbq0S','y29UDgfPBMvY','Bgf5zxjZ','v0DtodruB0DdsJaY','q2LYy2XLu2nHBLr5Cgu','B25Jzq','x2rPC3rVCNrPB24','BMfTzq','Bwf4Aw11BvPVB21eAxn0yw5Jzq','Cg9ZAxrPB24TzwrPDg9YlvK','ywjZ','y3jLyxrLqNvMzMvY','mJu0otDpvK9XELu','Bgf5zxjdB250ywLUzxi','yMfZzvzHBa','CMvTB3zLugf0Aa','ywrKq2XHC3m','Dw5PzM9YBu1HCa','AgfZAgvY','z2v0rMfJDg9YAwfS','zM9N','x3rVB2X0AxbnzxnZ','x21VDMvsyxrL','z2v0rgLZDgfUy2vcEu1d','qKXvrq','x29UrwrPDefUy2HVCLn0B3a','Bw9YCgHuBZje','veru','x3rPBwvY','DhjHBNnMB3jTtg5N','zwfZDa','C2nLBMu','x3n1CMzHy2vqB3nPDgLVBG','x2LZr3jVDw5K','x3nWzwvKu3vIC2nYAxb0Aw9U','x3DPzhrO','Dg9Rzw4','x2XLDMvStgf5zxjZ','ug9ZDfbYB2nLC3ntDgfNzq','uMfKyxjxyxzL','z2v0tM9YBwfS','Cg9ZAxrPB24TzwrPDg9Ylq','sgvYBwL0zq','sefmrL9gte9bvf9prvm','x3vWzgf0zvn0EwXL','yM91BMrPBMDwB2X1Bwu','B3v0x29Mx2nOAw5H','uxvHDgvYBMLVBG','CgLJA1bVC2L0Aw9Uu3vWCg9YDgvK','rgvMyxvSDen1yMvnyxbjza','Cg9ZAxrPDMvz','x3bSyw5Lq29SBgvJDgLVBG','x21VDxnLtw92zuHHBMrSzq','C3bLy3vSyxjnyxa','CMfUzg9T','y3vYCMvUDfrHCMDLDa','rLjbr01ftLrFu0Hbrevs','x2DYywrPzw50u3vIC2nYAxb0Aw9U','y3jLyxrLuhjVz3jHBq','x3vYBa','C2LKzuLTywDL','qMXVy2TdAxbOzxjnB2rL','y29UDgv4Dg1LBNu','ChjLy2LZAw9U','ChjVCgvYDhLoyw1L','y2fUy2vSrMXPz2H0','zgvSDgfz','Dw5PzM9YBsb2zwm0ignVBg9YoWP1BMLMB3jTigzSB2f0ihnWzwvKoWOki2rLzMLUzsbqssaZlJe0mtu5mJy1mZu5cGP2zwmYihjVDgf0ztjeicH2zwmYif9ZDcWGzMXVyxqGx2fUz2XLksb7cIaGx3n0id0Gig1HDdiOy29Zkf9HBMDSzsKSlxnPBIHFyw5NBguPlcaGC2LUkf9HBMDSzsKSy29Zkf9HBMDSzsKPicOGx3n0oWOGihjLDhvYBIbFC3q7cN0kcMn6Bv9TyxrLCMLHBcbJEM1Fz2v0twf0zxjPywWOy3PTx21HDgvYAwfSsw5WDxqGBwf0zxjPywXjBNb1DcL7cIaGy3PTx21HDgvYAwfSig1HDgvYAwfSid0Gy3PTx2DLDerLzMf1BhrnyxrLCMLHBcHTyxrLCMLHBeLUChv0ktSkicb2zwmYihn0id0GBwf0zxjPywXjBNb1Dc5ZDcaQidiUmcaTideUmdSkicbZDcaQpsaXlJy7cIaGzMXVyxqGDgLTzsa9ign6Bv9MCMfTzu51BwjLCIaQihnWzwvKic8GmtaWmc4WoWOGigzSB2f0ihiGpsbSzw5NDgGOC3qPoWOGigzSB2f0ihCGpsaUmZSkicbZDca9ihjVDgf0ztjekhn0lcHYkLbjkJyUlxrPBwuQmI4PktSkicbMBg9HDcbHid0GC21VB3rOC3rLCcGTDYWUmIXZDc54ksaQihnTB290Ahn0zxaODYWUmIXZDc54ktSkicbMBg9HDcbIid0GywjZkdeUlYHZAw4OCg93khiSmI4PkJiUlxrPBwuQms4ZksO2lIKPkI40oWOGig1HDgvYAwfSlMfSCgHHid0GysaQigiGoWOGig1HDgvYAwfSlMrPzMz1C2uGpsbJB2XVCI5Yz2iGkIbHicOGyIaGkIaZlJa7cIaGCMv0DxjUig1HDgvYAwfSoWP9cG','Ahr0Chm6lY9NywmTz2vVlMDVB2DSzwnUyxbWCY5JBI9TyxbZl3z0p2X5CNm9DeaXmZeSCIz4pxT4Fsz5pxT5Fsz6pxT6Fq','C3rYB2TL','yM90Dg9T','vevyvfvsrta','yxbWzwfYyw5Jzq','x3jLC2v0uM90yxrPB24','x2DLDfjVDgf0Aw9Uqw5NBgu','zM9JDxm','uMfIyML0','ue9tsvrjt05Fqu5ex1nu','CMfUzg9TAxPL','C3bLzwq','x3nHBxbSzwrqB3nPDgLVBG','zNjVBunHCNrLC2LHBG','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','uKvtrvrFveLnrv9msu5f','z2v0twf0CML4mW','x2HLAwDODa','x3nOyxbL','y2X1C3rLCG','v2vItwvYy2f0B3juAwXPBMDty2HLBwu','zgvWDgHgywLStwf0zxjPywW','x21PEe51Bq','v2fSBerPzMz1C2vuExbL','y3jLyxrLr29Vz2XLugHVDg9YzwfSAxn0AwmZrfrPBgvZzxq','x2zVzW','yMXLBMrgDw5J','sg1Hy1niqti1nG','yMLUzej1zMzLCG','CMfKktSkicaGicaGlxDLyMTPDc10CMfUC2zVCM0GoIbYB3rHDguOlq','rLjbtuvcvuzgrvjFsu5dt01qtevurv9esu1ftLnjt05t','q2fSBgjHy2TqCM9Wzxj0Eq','x21PBKj1zMzLCLnPEMu','y2XHBxbuB1rPBgvZzxq','x3jLCgvHDa','CMvWzwf0','Cg93','zM9NqNLeAxn0yw5Jzq','CM9SBa','D3jHChbLzfG','B25JBgLJAW','DhjHy2TLza','x2LJCMy','Ahr0Chm6lY9NywmTz2vVlMDVB2DSzwnUyxbWCY5JBI9TyxbZl3z0p2X5CNm9Acz4pxT4Fsz5pxT5Fsz6pxT6Fq','x2jSB29T','Cg9PBNruB0rHDge','zMX5Aw5N','ywrKtgf5zxjhCM91Ca','x3jHAw4','ug9ZDfbYB2nLC3ntDgfNzuXPyNjHCNK','Cg9SEwXPBMvwB2X1Bwu','y3jLyxrLve1tsw1Hz2vYEuXHEwvY','r0nkmdjuB0jemdK','x2DLDfnHBxbSzwrizwLNAhq','y3jLyxrLtgvUC0zSyxjLu3rHz2u','y3jLyxrLr2vVBwv0CNK','BxnfEgL0rNvSBhnJCMvLBG','AgfSB1DPzhrO','x2DLDerPCMvJDgLVBK5VCMfTBa','z2v0qw5NBgvpzLrOCMvLug9PBNrZ','6AUy5BQM77YA','Aw1Hz2vYEsbMB3jTyxqGzxjYB3i','q2LYy2XLu2nHBG','yMXVy2TtAxPL','y3jLyxrLrwXLBwvUDe5t','zgvJCNLWDa','qKfjrfu','Aw5KzxGGzxjYB3i','zMjV','uKDcqq','tKvbuKvtva','BgfIzwXFChjPBwL0AxzL','x2n1CNjLBNrsywrPDxm','D2LKz2v0igXVywrPBMCTBwfZAW','CM90yxrLtgvMDa','q2vZAxvTm0ruAwXLu3r5Bgu','tevgvf9et1Do','qujdrevgr0HjsKTmtu5puffsu1rvvLDywvPHyMnKzwzNAgLQA2XTBM9WCxjZDhv2D3H5EJaXmJm0nty3odKRlZ0','x3nLDe1VzgvStwf0CML4','x2r1CMf0Aw9U','vfDpx1bj','phnWyw4+','x2rLCZi','CMvTB3zLqxr0CMLIDxrL','msWY','x2rPCNrbBw91BNq','x2XHyMvSCW','ywXSB3DeCMLSBfbPy2TPBMC','x2rLzMf1Bhrnzw51','quvt','CMvXDwvZDez1BgXZy3jLzw4','Bg8X','AgvHzeHLAwDODezHy3rVCG','q09mvu1cvvnFvKLfvW','yMLSBgjVyxjK','vgLSzu1HCfnLCNzPy2vjBwfNzxj5uhjVDMLKzxi','ChG7cIaGica','mxrAtxv1qG','v2f0zxjuExbL','uMfKyxjmAw5L','A2rM','zNjVBvf1yxrLCM5PB24','x25eyxrHqNL0zxm','x2HHBMrSzxi','CMvTB3zLu2fTCgXLCW','Agf3A2v5zv9Tyxa','yw5PBwf0Aw9Uu3bLzwq','z2v0vgLTzxn0yw1W','veLmrv9gquLmruq','yNL0zuXLBMD0Aa','z3b4','x2rHDgftB3vYy2u','Dg9VBhrPCa','v2fSBfrYywLS','zNHHyq','Bw9VBG','zNjVBuj5DgvZ','DMfSDwvZ','q2vZAxvTvgvYCMfPBLbYB3zPzgvY','yxr0CMLItg9JyxrPB24','DhvYzG','Bg9HzgLUzW','x29YyML0rNjHBwu','CMvZzxq','z2v0rxzLBNq','BwfWyM94','CMfPC2vfDMvUDa','BgLUzvn0CMLUzW','z2v0uhjVCgvYDhK','yxnWAgfSDenVBg9Y','z3jHzgLLBNq','DgLSzuHLAwDODa','Bw92zuzVCNDHCMq','C2vSzwn0zwq','zwfJAe92zxjSyxK','CgL4zwXpzMzZzxq','ug9SEwXPBMvjBwfNzvrYywLS','zw50AxrPzxm','jwmGcIbeqY1treSGcIaGjwmGcIdNLkJMLBdLRzFMJ4/NU5JKUjBNLyZKUyVNVO4GicvJiaOkicaGioEjIoACRdOGnc4WlJaGlsaYmdi0lteXlta5cIaGicbdzxnPDw0Grw5NAw5LioEjIoACRo+8MJeYlJaUmaOGicaG5BYa5y+r5l2C6icfoIbdyxzLBIbdAgvUidXJyxzLBMnQqgDTywLSlMnVBt4kicaGioE9KEERMEs4U+MHTtOGAhr0Chm6lY9KyY5KDMDPCY5JBGOGicaGz2L0AhvIoIbODhrWCZOVl2DPDgH1yI5JB20VzhzNAxmVzgmTC2rRlMDPDaOGicaG5O6i5P2d5l+H5OgV77YA5O6i5P2dlEAWUos5HEs9V+EuQoATPoI9R+s7TUw9K+wjJEEjIoACRooaGIakcGOGicaG54Mi5P2d5AoW5PIooGOGicaGms7MOyBMNRBKVzZKUlRKUidKUkRLN7RNOydLUBpLJ7dVViZKU6pNOihLVidMUPdVViZKU7VKVzxKUkRKURRLKOZMNlRMNOtLJ6/KU6xKV67MLlNJGihPH43MNOtVViZML6dPNidNU4/OV4FMIjhMLRNMJOJMNypJGiikicaGidiU5lU75l2v5lIQ5lQ65zkm5PY65P6e5l+U5Ps55Qgg5P625yE6546W55Qe6zEU6Aky77Ym5OIr5PA55PEG6zYa6lsF6lsJ44cccIaGicaZlUwqJUACN+s8MUA3U+wkOos4Gos6M+IHJos4MUAaP+EAHoApKUs7TUwsJow3PEwfT++8Jos7O+EGGEs8MUMaGUMhJ+w8GoA6KooaGGOGicaGnc7LR7NKUO7MIjhMLRNLJ5hLUipNMOtMOyBMNRBLJixVViZKU7VKVzxKUkRKURRLKOZMNlRMNOtLNkJPGBxLROJKUiVLIjFMNAhKU7BNMOtLIy3MJ5dKUiVLJ6/KU6xMSlJKUyxLHy3OTlNKVB/NLkG6cIaGicaGmsNNQiVLUO/LJixLROZMLBtLVjxNLkGkicaGicaYkEs/NEEvMEATPoEjIoADG+s/OEAbR+wCQoAoP+wiTUwpSoI+K+whUGOGicaG5OIr5PA55l+D55wz5A+55Q2K54Mi5P2d5l+H5OgV55Qe5PYa57Ui6kEJ6yEk5P2d44cc','lI9OBwfJ','v2vItwfWu2vYDMLJzuLTywDLCNLqCM92AwrLCG','zgLZvMLLD0nVBg9Y','ue9tsvrjvKvFsu5gsu5jvfK','tufyx1zbtfvf','qKXftKq','z2XVyMfSq29TCg9ZAxrLt3bLCMf0Aw9U','z2v0vhjHy2TZ','Dg9WuMfKAxvZ','x3nPz2H0tgLUzq','x3bYB3bLCNrPzxm','DhjHBNnMB3jT','zxHW','v01uuW','z2v0ugf0Aa','CMvTB3zLqwXS','zgvWDgHuzxn0qwDHAw5ZDfrLCNjHAw4','x2jSywnRqw5Kv2HPDgu','x2LK','y3PTx3nUB2LZzq','vevyvfvsrv9nsu5FrKLmvevs','ugvYsw5ZDgfUy2vdB2XVCKfWCgvHCMfUy2u','z2v0rxH0zw5ZAw9U','x2rYyxDqAxHLBfbHCNrPy2XL','x21VzgvSvxjS','DMvJDg9Y','x2XUzW','wMvYB1bHzgrPBMC','yxjJ','AgLZDg9YEs10CMfJAY1SyxLLCG','BMLNAhq','x3rYywnRrxzLBNq','x29Us2v5Dxa','Cgf0Ae1Vzgu','zgLZyxbWzwfYu2vJB25KCW','vu5jvf9y','Dw5PzM9YBsbZyw1WBgvYq3vIzsbJDwjLtwfWoWOky3PTx21HDgvYAwfSign6Bv9NzxrnyxrLCMLHBcHJEM1FBwf0zxjPywXjBNb1DcbTyxrLCMLHBeLUChv0kxSkicbJEM1FBwf0zxjPywWGBwf0zxjPywWGpsbJEM1Fz2v0rgvMyxvSDe1HDgvYAwfSkg1HDgvYAwfSsw5WDxqPoWOkicb2zwmZig5VCM1HBfDdid0GBM9YBwfSAxPLkgn6Bv9PBNzLCNnLvMLLD1jVDgf0Aw9UicOGBwf0zxjPywWUBM9YBwfSktSkicb2zwmZihbVC2L0Aw9Uv0mGpsbUB3jTywXPEMuOy3PTx2LUDMvYC2vwAwv3uM90yxrPB24GkIbTyxrLCMLHBeLUChv0lNbVC2L0Aw9Uvg9fEwvfqYK7cIaGDMvJmYbYzwzSzwn0zwrxqYa9ihjLzMXLy3qOCg9ZAxrPB25xqYWGBM9YBwfSv0mPoWOGig1HDgvYAwfSlMrPzMz1C2uGpsb0zxH0DxjLq3vIzsHJDwjLtwfWlcbYzwzSzwn0zwrxqYKUy2HHBM5LBhm7cGOGihjLDhvYBIbTyxrLCMLHBdSkFqO','zw5HyMXLvhjHBNnSyxrL','CMfKAwK','Dw5PzM9YBsbZyw1WBgvYmKqGAw1Hz2u7cNvUAwzVCM0GDMvJncbJB2XVCJSkDw5PzM9YBsbMBg9HDcbZCgvLzdSkDw5PzM9YBsb2zwmYihjLCgvHDdSky3PTx21HDgvYAwfSign6Bv9NzxrnyxrLCMLHBcHJEM1FBwf0zxjPywXjBNb1DcbTyxrLCMLHBeLUChv0kxSkicbJEM1FBwf0zxjPywWGBwf0zxjPywWGpsbJEM1Fz2v0rgvMyxvSDe1HDgvYAwfSkg1HDgvYAwfSsw5WDxqPoWOGihzLyZiGC3qGpsbTyxrLCMLHBeLUChv0lNn0icOGCMvWzwf0oWOGigzSB2f0ihrPBwuGpsbMCMfJDcHJEM1FzNjHBwvoDw1IzxiGkIbZCgvLzcaVideWmdaUmcK7cIaGDMvJncbJB2XVCKLTywDLid0GDgv4DhvYzsHPBwfNzsWGDMvJmIHMCMfJDcHZDc5Zic0GDgLTzsKSihn0lNqPktSkicbTyxrLCMLHBc5HBhbOysa9icbJB2XVCKLTywDLlMeGkIbJB2XVCI5HidSkicbTyxrLCMLHBc5KAwzMDxnLid0Gy29SB3jjBwfNzs5Yz2iGkIbJB2XVCI5Yz2iGkIaZlJaGoWOGihjLDhvYBIbTyxrLCMLHBdSkFqO','CMfUzg9TqNL0zxm','Dw5PzM9YBsb2zwm0ignVBg9YoWP1BMLMB3jTigzSB2f0ihnWzwvKoWPJEM1FBwf0zxjPywWGy3PTx2DLDe1HDgvYAwfSkgn6Bv9TyxrLCMLHBeLUChv0ig1HDgvYAwfSsw5WDxqPEWOGign6Bv9TyxrLCMLHBcbTyxrLCMLHBca9ign6Bv9NzxrezwzHDwX0twf0zxjPywWOBwf0zxjPywXjBNb1DcK7cIaGzMXVyxqGDgLTzsa9igzYywn0kcbJEM1FzNjHBwvoDw1IzxiGicOGihnWzwvKic8GmtaWmc4WktSkicb2zwmYihn0id0GBwf0zxjPywXjBNb1Dc5ZDdSkicbMBg9HDcbZy2fSyxiGpsbZBw9VDgHZDgvWkdaUmcWXlJaSDgLTzsK7cIaGBwf0zxjPywWUzgLMzNvZzsa9ignVBg9YlNjNyIaQihnJywXHCJSkicbTyxrLCMLHBc5HBhbOysa9ignVBg9YlMeGkIbZy2fSyxiGoWOGihjLDhvYBIbTyxrLCMLHBdSkFqO','x3n0B3bWzwriB29R','DMvYDgv4qxr0CMLIug9PBNrLCG','C2T5tgLUzq','y3jLyxrLqMfPzhvjBwfNzxj5tgf5zxi','ug9SEwXPBMvbCNjVD01HDgvYAwfSuhjVCgvYDhK','BxvSDgLWBhLcEvvUAwzVCM1ty2fSzq','AgvHzgLUz1bPDgnOuM9SBfrVrML4zwrgCMfTzq','y3vYCMvUDfrPBwu','Dw5PzM9YBsbZyw1WBgvYmKqGAw1Hz2u7cNvUAwzVCM0GDMvJncbJB2XVCJSky3PTx21HDgvYAwfSign6Bv9NzxrnyxrLCMLHBcHJEM1FBwf0zxjPywXjBNb1DcbTyxrLCMLHBeLUChv0kxSkicbJEM1FBwf0zxjPywWGBwf0zxjPywWGpsbJEM1Fz2v0rgvMyxvSDe1HDgvYAwfSkg1HDgvYAwfSsw5WDxqPoWOGihzLyZiGC3qGpsbTyxrLCMLHBeLUChv0lNn0oWOGihzLyZqGy29SB3jjBwfNzsa9ihrLEhr1CMuOAw1Hz2uSC3qPoWOGihzLyZmGzNjHz0nVBg9Yid0Gy29SB3iUCMDIoWOGig1HDgvYAwfSlMfSCgHHid0Gy29SB3jjBwfNzs5HicOGy29SB3iUysaQidmUoWOGig1HDgvYAwfSlMrPzMz1C2uGpsbTyxGOzNjHz0nVBg9YlNjNyIaGkYaGy29SB3jjBwfNzs5Yz2iGlcbMCMfNq29SB3iUCMDIktSkicbYzxr1CM4GBwf0zxjPywW7cN0k','x2nHBNzHCW','yM90Dg9TBgvMDa','Aw1Hz2vYEuXHEwvYCW','Bwf0zxjPywW','x3jLC3vSDeXHyMvS','Bwf4q2fJAgvtAxPL','lI9ZAgeYnty','z2f0AgvYAw5Nx3bSywnL','qvjpvu5ex1bpsu5u','z2v0uhjVCgvYDhLoyw1LCW','ug9ZAxrPB25fzgL0B3i6ig5Vig92zxjSyxK','Bwf4Aw11BufSAwfZzwrmAw5Lv2LKDgG','q2LWAgvYugfYyw1Z','x2f0DhjPyNv0zuXVy2f0Aw9UCW','DhjHBNnMB3jTtgf0','rurjvf9tve9q','x3jLy3rHBMDSzq','q2vTzw50vhLWzq','zgmTy29UDgv4Dc1Tzw51ia','x2DLDenSDxn0zxjjBwfNzq','y29TChv0zvzPzxDszwn0yw5NBgu','C3rsB3rHDgLVBG','DMvYDgv4qxjYyxK','zgvWDgHgywLS','BgLUzwfY','q2LYy2XLuMLUz1r5Cgu','AgLLCMfYy2H5','y3jLyxrLr3jPzeLTywDLCNLmyxLLCG','i2zMzG','ywrKsw1Hz2vYEvbYB3zPzgvY','x2nYzwf0zuXPBMu','v2fSBerPzMz1C2u','r0Xnyxa','r0XpqKvFuK9uqvrf','B2zM','Bwf4vMvSB2nPDhK','x2fKzerLzMf1BhrfDMvUDa','u0Hbmq','x3nLDfzPzxDLCK9WDgLVBG','zgvJCMvHC2u','rNjLC25LBfr5Cgu','vMLLD3nOzwq','BxvZDcbIzsbVDMvYCMLKzq','y2XHC3noyw1L','x2zPEgvKrNjHBwu','rLjbtuvcvuzgrvjFvu5tvvbqt1juruq','y3vYC29Y','C2nHBguTyMfY','x2XHEwvYq2fJAgu','v2fSBeXPBMvuCMfPBa','C291DgH3zxn0','vevyx1jfqurz','y2XVy2TuAwnR','x2XHC3rvCgrHDgu','DgfPBgvKx2f0DgfJA19HCNjVDW','B3zLCMXHEq','y3jLyxrLvgvUy2vUDeLTywDLCNLmyxLLCG','zgf0ytPPBwfNzs9NAwy7yMfZzty0lfiWBeDprgXOqvfbqKfbrc9bq3DbqufbqufrqujbqufdqurZpq','x2jVDw5KC0LUtwv0zxi','y2HLy2TqB3nPDgLVBG','x3zPzgvV','zgf0yvnVDxjJzxm','x3nVDxjJzxm','yMLUzerVBq','x2DLDefYCM93qM9KEvbVAw50CW','DMvJncbHBhbOyuz1BIH2zwmZignVBg9YlcbMBg9HDcbPBNrLBNnPDhKPEWOGicaGzMXVyxqGywXWAgeGpsbZBw9VDgHZDgvWka','uMfKyxjtD2vLCa','u2vYAwfSAxPHyMXLq2LWAgvY','revgqvvmvf9nru5v','q1rsta','ueLoq0HFu1rbuLq','Dw5IAw5K','r0nkmdjuB1DhuZG0','mZK1ndC5mezYvennCG','x3jVDgf0zuLUAxrPywXdDxjZB3jbBMDSzq','y3jLyxrLu2HHzgvY','z2v0tgf5zxjhCM91Ca','ywrKrxzLBNrmAxn0zw5LCG','x2jSzw5Kq29SB3i','Cg9SEwXPBMvZ','yxjLyv9ZDxjMywnL','zNjVBvbVAw50CW','vvbeqvrfx0foq0HpuG','B3zLCMXHEuv2zw50','z2v0v3jHChbLzeXVBMDPDhvKzxm','x2nSB2nR','zwrPDevUza','qvjfqq','DhjPBq','ywn0AxzLza','x2n1CNjLBNrjBMrLEa','BgvYCeLUDgvYDMfS','x3bSyw5LCW','z2XfBNvTvg9tDhjPBMC','D2fYBG','z2vVBwv0CNLjBNn0yw5Jzxm','C2HVD01VzgvS','sw1Hz2vYEvbYB3zPzgvY','y3jLyxrLwfLAsw1Hz2vYEuXHEwvY','CMfKAxvZ','DMvYDgv4u2L6zq','CMvTB3zLsw5WDxrby3rPB24','v0vcr0XFy29SB3jFyNvMzMvYx2zSB2f0','x29Us2v5zg93BG','vw5PzM9YBvr5Cgu','Bw92zujHy2T3yxjK','q0Xfqvjfra','q2LYy2XLrMfKzvr5Cgu','BM90ihn1ChbVCNqGDgHPCYbMDw5JDgLVBG','qvjfqv9tvvjgqunf','DMvJ','Aw4GihzLyZiGDL90zxH0DxjLq29VCMrPBMf0zxm7cGOkDw5PzM9YBsbZyw1WBgvYmKqGy29SB3juzxH0DxjLoWP1BMLMB3jTihnHBxbSzxiYrcb1x3nPBgHVDwv0DgvuzxH0DxjLoWP1BMLMB3jTihnHBxbSzxiYrcb1x3jLzfrLEhr1CMu7cNvUAwzVCM0GDMvJncb1x2nVBg9YoWOkDM9PzcbTywLUkhzVAwqPihSkicb2zwm0ignVBg9Yid0GDgv4DhvYzsHJB2XVCLrLEhr1CMuSihzFDgv4DhvYzunVB3jKAw5HDgvZktSkicb2zwm0ihnPBgHVDwv0DgvdB2XVCIa9ihrLEhr1CMuODv9ZAwXOB3vLDhrLvgv4DhvYzsWGDL90zxH0DxjLq29VCMrPBMf0zxmPoWOGihzLyZqGCMvKq29SB3iGpsb0zxH0DxjLkhvFCMvKvgv4DhvYzsWGDL90zxH0DxjLq29VCMrPBMf0zxmPoWOkicbPzIHYzwrdB2XVCI5Yid09ideUmcaPEWOGicaGB3v0x0zYywDdB2XVCIa9ig1PEcHJB2XVCIWGDv9JB2XVCIWGC2LSAg91zxr0zunVBg9YlMePoWOGih1LBhnLihSkicaGig91Df9gCMfNq29SB3iGpsbJB2XVCJSkicb9cN0k','x21VDxnLtw9Kzq','BwfWlwL0zw0Gywn0AxzL','z3jHzgLLBNrjBwfNzxm','x3rPBgvZzxrfDMvUDa','x2zWC0vS','lI9LDNbRzgy','x3vUyMLUzev2zw50','DMLZAwjSzq','x21VDw50twvUDq','uMfKyxjxyxzLvhLWzq','t0vtx3rLEhr1CMvFAgfSzL9MBg9HDa','CMvTB3zLtgf5zxi','x3rYyw5ZzM9YBwvKqM91BMrPBMDtCgHLCMu','Dg1Z','sw1Hz2u','lI9TB2rLlwn0CG','x2HLAwDODeXHyMvS','ugXHBMu','zwfJAeXHEwvY','y3PTx21HDgvYAwfSign6Bv9NzxrnyxrLCMLHBcHJEM1FBwf0zxjPywXjBNb1DcbTyxrLCMLHBeLUChv0kxSkicbJEM1FBwf0zxjPywWGBwf0zxjPywWGpsbJEM1Fz2v0rgvMyxvSDe1HDgvYAwfSkg1HDgvYAwfSsw5WDxqPoWOkicb2zwmZig5VCM1HBfDdid0GBM9YBwfSAxPLkgn6Bv9PBNzLCNnLvMLLD1jVDgf0Aw9UicOGBwf0zxjPywWUBM9YBwfSktSkicb2zwmZihbVC2L0Aw9Uv0mGpsbUB3jTywXPEMuOy3PTx2LUDMvYC2vwAwv3uM90yxrPB24GkIbTyxrLCMLHBeLUChv0lNbVC2L0Aw9Uvg9fEwvfqYK7cIaGzMXVyxqGy29Zqw5Nsw5JAwrLBMnLid0GBwf4kgrVDcHUB3jTywXxqYWGCg9ZAxrPB25xqYKSidaUmcK7cGOGig1HDgvYAwfSlMrPzMz1C2uGpsbTAxGOCMvMBgvJDgLVBI5KAwzMDxnLlcbYzwzYywn0Aw9UlMrPzMz1C2uSignVC0fUz0LUy2LKzw5JzsK7cGOGihjLDhvYBIbTyxrLCMLHBdSkFqO','Dw5PzM9YBsb2zwm0ignVBg9YoWP1BMLMB3jTigzSB2f0ihnWzwvKoWOky3PTx21HDgvYAwfSign6Bv9NzxrnyxrLCMLHBcHJEM1FBwf0zxjPywXjBNb1DcbTyxrLCMLHBeLUChv0kxSkicaGy3PTx21HDgvYAwfSig1HDgvYAwfSid0Gy3PTx2DLDerLzMf1BhrnyxrLCMLHBcHTyxrLCMLHBeLUChv0ktSkicaGDMvJmIbZDca9ig1HDgvYAwfSsw5WDxqUC3q7cIaGigzSB2f0ihrPBwuGpsbMCMfJDcHJEM1FzNjHBwvoDw1IzxiGkIbZCgvLzcaVideWmdaUmcK7cIaGig1HDgvYAwfSlMrPzMz1C2uGpsbJB2XVCI5Yz2i7cIaGig1HDgvYAwfSlMfSCgHHid0Gy29SB3iUysaQigzYywn0khn0lNmTDgLTzsK7cIaGihjLDhvYBIbTyxrLCMLHBdSkFqO','Dg9sywrPyw5Z','yxjLyq','B3jPzw50yxrPB24','y2fTzxjHq2HHBMDLza','C2v0vKXPBMu','Dw5PzM9YBsb2zwm0igXPz2H0q29SB3i7cNvUAwzVCM0GDMvJncbKyxjRq29SB3i7cNvUAwzVCM0GzMXVyxqGzNjLCxvLBMn5oWOky3PTx21HDgvYAwfSign6Bv9NzxrnyxrLCMLHBcHJEM1FBwf0zxjPywXjBNb1DcbTyxrLCMLHBeLUChv0kxSkicbJEM1FBwf0zxjPywWGBwf0zxjPywWGpsbJEM1Fz2v0rgvMyxvSDe1HDgvYAwfSkg1HDgvYAwfSsw5WDxqPoWOkicaVlYbgCM9Tifn0zwzHBIbhDxn0yxzZB24NCYbqCM9Jzwr1CMfSifrLEhr1CMvZigLUieDmu0WGAw4Gt3bLBKDmieLUC2LNAhrZcIaGDMvJmIbgid0Gy3PTx2nLBgX1BgfYkg1HDgvYAwfSsw5WDxqUC3qGkIbMCMvXDwvUy3KPoWOGigzSB2f0ihqGpsaXlJaGlsbglNGGkIbglNG7cGOGihzLyZqGy29SB3iGpsbTAxGOBgLNAhrdB2XVCIWGzgfYA0nVBg9Ylcb0ktSkicbTyxrLCMLHBc5KAwzMDxnLid0Gy29SB3iUCMDIoWOGig1HDgvYAwfSlMfSCgHHid0Gy29SB3iUytSkcIaGCMv0DxjUig1HDgvYAwfSoWP9cG','x2fYB3vUzefTB3vUDa','x2nLBNrLCG','z3jHzgLLBNrdB2XVCNm','C291CMnL','r2vVz3jHCgHPy1rPBgLUz1nJAgvTzq','x2r1CMf0Aw9UCW','Cg9ZAxrPDMvA','zwrPDfn0yxj0','y3vZDg9T','Aw4GDMvJmIb2x3rLEhr1CMvdB29YzgLUyxrLCZSkDw5PzM9YBsbZyw1WBgvYmKqGy29SB3juzxH0DxjLoWP1BMLMB3jTihnHBxbSzxiYrcbKzxb0AfrLEhr1CMu7cNvUAwzVCM0GDMvJmYbJzw50zxjxqZSkDw5PzM9YBsb2zwmZig5VCM1HBfDdoWP1BMLMB3jTigzSB2f0ihjHzgL1CZSkDw5PzM9YBsb2zwm0ignVBg9YoWP1BMLMB3jTigzSB2f0ihnWzwvKoWOkzMXVyxqGz2v0rgvWDgGOkxSkicbMBg9HDcb6x3DPBMrVDYa9ign6Bv91BNbHy2Tezxb0AcH0zxH0DxjLkgrLChrOvgv4DhvYzsWGDL90zxH0DxjLq29VCMrPBMf0zxmPktSkicb6x3DPBMrVDYa9ign6Bv9YzxzLCNnLtg9NrgvWDgGOEL93Aw5KB3CPoWOGigzSB2f0ig5FCMfUz2uGpsbJEM1FzgvWDgHsyw5Nzs5UzwfYoWOGigzSB2f0igzFCMfUz2uGpsbJEM1FzgvWDgHsyw5Nzs5Myxi7cIaGCMv0DxjUicaOmI4WicOGEL93Aw5KB3CGlsbUx3jHBMDLic0GzL9Yyw5NzsKGlYaOzL9Yyw5NzsaTig5FCMfUz2uPoWP9cGP2zwm0ihrVrxLLkgLUihzLyZiGDxySigLUigzSB2f0igrLChrOkxSkicb2zwmYihH5id0GDMvJmIGODxyUEcaQidiUmcaTideUmcKSkhv2lNKGkIaYlJaGlsaXlJaPktSkicb2zwm0ihbVC0LUq2fTzxjHid1JEM1FAw52zxjZzvbYB2PLy3rPB24GkIb2zwm0khH5lcbKzxb0AcWGms4WktSkicbWB3njBKnHBwvYysa9ihbVC0LUq2fTzxjHic8GCg9Zsw5dyw1LCMeUDZSkicbYzxr1CM4GCg9Zsw5dyw1LCMe7cN0kcNzLyZmGCg9PBNrqCM9Qzwn0t25qBgfUzsHPBIb2zwmZihbSyw5LtM9YBwfSlcbPBIb2zwmZihbSyw5Lt3jPz2LUlcbPBIb2zwmZihbVAw50kxSkicb2zwmZihyWmsa9ihbVAw50ic0GCgXHBMvpCMLNAw47cIaGzMXVyxqGzca9igrVDcHWBgfUzu5VCM1HBcWGDJaXksa7cIaGCMv0DxjUicHWB2LUDcaTihbSyw5LtM9YBwfSicOGzcK7cN0kcNzVAwqGBwfPBIGPihSkicbVDxrFrNjHz0nVBg9Yid0GDgv4DhvYzsHJB2XVCLrLEhr1CMuSihzFDgv4DhvYzunVB3jKAw5HDgvZktSkicbMBg9HDcbKzxb0Aca9igDLDerLChrOkcK7cIaGDMvJncb2Awv3ug9Zid0GDg9fEwuODL90zxH0DxjLq29VCMrPBMf0zxmSigrLChrOktSkicb2zwm0ignLBNrLCIa9ign6Bv92Awv3icOGDMvJncHJzw50zxjxqYWXktSkicb2zwm0ihbSyw5LtM9YBwfSid0Gy3PTx3zPzxCGkIb2zwm0kg5VCM1HBfDdldaPoWOGihzLyZmGChjQt25qBgfUzsa9ihbVAw50uhjVAMvJDe9UugXHBMuOCgXHBMvoB3jTywWUEhL6lcbJzw50zxiUEhL6lcb2Awv3ug9ZlNH5EIK7cIaGzMXVyxqGzgLZid0GBgvUz3rOkhbYAK9UugXHBMuUEhL6ic0Gy2vUDgvYlNH5EIK7cIaGzMXVyxqGDgLTzsa9igzYywn0kgn6Bv9MCMfTzu51BwjLCIaQihnWzwvKic8GmtaWmc4WktSkicbMBg9HDcb0zw1Wid0GCMfKAxvZicOGDgLTztSkicbPzIHKAxmGpcb0zw1WksaGEWOGicaGzMXVyxqGzIa9ideUmcaTigfICYH0zw1Wic0GzgLZksaVihrLBxa7cIaGicbMid0GCg93kgySidqUmcK7cIaGicbVDxrFrNjHz0nVBg9Yid0GBwL4kg91Df9gCMfNq29SB3iSignVBg9YlcbMktSkicb9cN0k','mIWZ','veLmrv9mt0fe','x2rVq3j5ChrcBg9JAW','Bwf4','x2XHC3rdAgfUz2vKvgLTzq','x29U','q2vZAxvTv2LKz2v0','zNjVBu9IAMvJDa','zw5HyMXLrNHHyq','z2v0vMfSDwvpCLvUzgvMAw5Lza','zhDLBgXuAw1L','q2LYy2XLuMLUzW','x2LTywDLCNLmyxLLCG','E3P9','r1jjra','lY9WE3n9lM1HCc5NDgLTzY5JB20VC2f0zvrPBgvZl3T6Fs97C3H9l3TZEx0VE3H9x3TYzxzLCNnLwx0UANbNp3zLCNnPB249ndaW','DhvYBKXLzNq','y2XLyxjdyw52yxm','rKLorv9buLjpvW','Cg9ZDfjLBMrLCG','D29Yzhm','ChjPBwL0AxzLCW','qMfZzty0','CgLJA1bVC2L0Aw9U','CxvHza','x3n0zxbtAxPL','C3vIzg9TywLUCW','x2nOyw5NzunSDxn0zxi','q2LYy2XLrgLMzNvZzvr5Cgu','x3nLDefWCgvHCMfUy2u','zM9YrwfJAa','Aw5PDgLHBfrPBgvZtg9HzgvK','x2rPC3rHBMnL','yw5JAg9Ytw92Aw5N','EM9VBvrVqM91BMrZ','v2fSBeLTywDLvhjHAwXuExbL','Dw5PzM9YBsb2zwm0ignVBg9YoWP1BMLMB3jTigzSB2f0ihnWzwvKoWOky3PTx21HDgvYAwfSign6Bv9NzxrnyxrLCMLHBcHJEM1FBwf0zxjPywXjBNb1DcbTyxrLCMLHBeLUChv0kxSkicbJEM1FBwf0zxjPywWGBwf0zxjPywWGpsbJEM1Fz2v0rgvMyxvSDe1HDgvYAwfSkg1HDgvYAwfSsw5WDxqPoWOGihzLyZiGC3qGpsbTyxrLCMLHBeLUChv0lNn0icOGmI4Wic0Gms4WoWOGigzSB2f0ihqGpsbJEM1FzNjHBwvoDw1IzxiGkIbZCgvLzcaVideWmdaUmca7cIaGDMvJmYbJB2WGpsb2zwmZkdaUmcK7cIaGDMvJmIbWid0GDMvJmIHZAw4ODcKSignVCYH0ksK7cIaGzMXVyxqGzca9igXLBMD0AcHZDcaTigrVDcHWlcbZDcKGkIbWktSkicbPzIaOzg90khn0lcbWksa8idaUksb7cIaGicbKid0GBgvUz3rOkhn0ktSkicb9cGOGignVBca9ic4WmdyGlYbKicOGy29SB3iUCMDIoWOkicbPzIHKAxn0yw5JzsHZDcX2zwmYkdaPksa+icaWlJK5icL7cIaGicbJB2WGpwnVBg9YlNjNyJSkicb9cGOGig1HDgvYAwfSlMfSCgHHica9ihbVDYHSzw5NDgGOy29SksWYlJaPoWOGig1HDgvYAwfSlMrPzMz1C2uGpsbJB2WGkIaZlJaGoWOGihjLDhvYBIbTyxrLCMLHBdSkFqO','y29VCMrPBMf0zvn5C3rLBq','AwnVBL9TAwrbBMnOB3i','yM94','z2v0uMfUz2u','y3jLyxrLu2LUz2XLvgLSzuLTywDLCNLmyxLLCG','ug9SEwXPBMvgBgLJA2vYvhLWzq','Dw5PzM9YBxm','x2XLBNngBgfYzq','x21VDxnLv2HLzwXiyw5KBgvY','x2zVy2fSrgLZDgfUy2u','y2zN','yxr0CG','CMvSzwfZzq','yMfZzvDHDgvYq29SB3i','x2nOyxj0','z2v0qMLZzwn0B3joB3jTywXZ','BwL4tNvT','x29YAwDPBG','x2nYzwf0zuXHyMvS','x2HLBhbmAw5L','x2zVz0j5rgLZDgfUy2u','zMLSBfn0EwXL','BgLNAhrxB29Kq29SB3i','u1rsrufnx0rsqvC','yMXHy2TbBMrxAgL0zq','DxjP','zMfYvMfSDwu','BM9YDgHLyxn0','ywrKug9ZAxrPB24','y2XHBxbdB2X1Bw5jBMrLEa','x3nLDeHquG','BxvSDgLWBgLLCG','ywrKvg8','y3vZDg9Tx2XHyMvS','C2v0sw5WDxrby3rPB24','qKLmtejpqvje','z2v0rwXLBwvUDej5swq','q1rsr2XHzg1HBG','DhjHBNnMB3jTq2fYDgvZAwfUvg9xr1m4na','tuq1','uMvZB3vYy2u','qMXVy2TdAxbOzxi','x29Uq3jLyxrLqw5JAg9Y','BxvSDgLWBhK','x2LZug9PBNrmAwDODa','x2XHEwvYr3jVDxbdywnOzq','x2HLBhbmAw5Lug9ZAxrPB25Z','y29UDgv4De1LBNu','x3jLBw92zuXHEwvY','yxr0ywnOu2HHzgvY','mteYmJe3odbTzg95rLq','C3bLy3vSyxjjBNrLBNnPDhK','v2fSBeDLB21LDhj5','yMLUza','ug9PBNrqCMLTAxrPDMvdB2XSzwn0Aw9U','C2vTAu1HAM9YqxHPCW','x29YAvbVC2L0Aw9UCW','ywrKu2fTCgXL','x3vWzgf0zvbYAw1PDgL2zxm','zMv0y2HkC29U','Cg9W','C3bSAxreAxjLy3rPB24','u1rbveLdx0rsqvC','zgf0yvrVug9PBNq','A2v5Dxa','C2v0q29UDgvUDa','qMXVyLr5Cgu','6AoE5yIW6BUy6k6K5l2n572U','zgvMyxvSDfzPzxC','x3jLBw92zwriB29R','x2jYAwDODg5LC3m','C2v0rgf0yq','u0Lor0Xfx1rjteu','x3jVDgf0Aw9Ux21HCMTLCG','yM91BMnLx2XHyMvSx3bYAw1PDgL2zq','Dg9W','y3jLyxrLtMLNAhrwAxnPB25tDgfNzq','vxjSvgvTCgXHDgvjBwfNzxj5uhjVDMLKzxi','uKLqru1emtyW','CMvZzxrsB3rHDgLVBG','Cgf1C2u','ug9SEwXPBMveyxnOtwf0zxjPywXqCM9Wzxj0Eq','CgjVEa','x3nOywrVD3m','B25TB3vZzwrVD24','z2v0t3zLCMXHEuj5swq','q29UDg91CKXPBMu','x292zxjSyxK','x2nVBxb1DgvcB3vUzhm','y29UDgfPBNm','Aw50zxjWB2XHDgvKvMfSDwvbDa','x2DLDeHPzxjHCMnOEq','Bg9NB0LTywDL','x3bYB2nLC3m','r3jHC3m','x2XPz2H0q2fTzxjH','x2LTywDLCNK','se9mra','CMvZDg9Yzq','zMXVyxqGBgLUC3rLCcHMBg9HDcbSB3CSigzSB2f0igHPz2GSigzSB2f0ihzHBhvLkxSkicaGihjLDhvYBIbJBgfTCcGODMfSDwuTBg93ks8OAgLNAc1SB3CPlcaWlJaSideUmcK7cN0kcMzSB2f0igzHzguOzMXVyxqGBg93lcbMBg9HDcbOAwDOlcbMBg9HDcb2ywX1zsL7cIaGicbMBg9HDcbTAwqGpsaOBg93k2HPz2GPkJaUntSkicaGigzSB2f0ihjHBMDLid0GkgHPz2GTBg93ksOWlJu7cIaGicbMBg9HDcb4id0Gms4Wic0Gy2XHBxaOywjZkg1Pzc12ywX1zsKVCMfUz2uSidaUmcWGms4WktSkicaGihjLDhvYBIbZBw9VDgHZDgvWkdaUmcWGms4Wlcb4ktSkFqOk','qxnWAgfSDfr5Cgu','vevoq0vova','zgf0ys1SyxLLCI10ExbL','x3nWzwn1BgfYtwfWu3vIC2nYAxb0Aw9U','zg9TywLU','BwfWu3bSAxq','mJy3mtGYnhbRDLjeDW','jhn1CgvY','sg9YAxPVBNrHBe9YAwDPBG','zNjVBunOyxjdB2rL','zNjVBvjVDgf0Aw9UwG','x2fKzeXHEwvYr3jVDxa','Dg9nB2rLBeXHEwvY','x3jVDgf0Aw9UugXHBMu','cIaGicaGicaGicaGicb1BMLMB3jTihnHBxbSzxiYrcbPBwfNztSkicaGicaGicaGicaGign6Bv9TyxrLCMLHBcbJEM1Fz2v0twf0zxjPywWOy3PTx21HDgvYAwfSsw5WDxqGBwf0zxjPywXjBNb1DcL7cIaGicaGicaGicaGicaGign6Bv9TyxrLCMLHBcbTyxrLCMLHBca9ign6Bv9NzxrezwzHDwX0twf0zxjPywWOBwf0zxjPywXjBNb1DcK7cIaGicaGicaGicaGicaGihzLyZiGC3qGpsbTyxrLCMLHBeLUChv0lNn0oWOGicaGicaGicaGicaGicb2zwm0ignVBg9Ysw1Hz2uGpsb0zxH0DxjLkgLTywDLlhn0ktSkicaGicaGicaGicaGicaGAwyOy29SB3jjBwfNzs5Yz2iGpt0GDMvJmYGXlJaPihX8ignVBg9Ysw1Hz2uUCMDIid09ihzLyZmOmc4WksL7cIaGicaGicaGicaGicaGicaGigrPC2nHCMq7cIaGicaGicaGicaGicaGih0kicaGicaGicaGicaGicaGBwf0zxjPywWUzgLMzNvZzsa9ignVBg9Ysw1Hz2uUCMDIoWOGicaGicaGicaGicaGicbTyxrLCMLHBc5HBhbOysa9ignVBg9Ysw1Hz2uUytSkicaGicaGicaGicaGicaGCMv0DxjUig1HDgvYAwfSoWOGicaGicaGicaGicaGFqOGicaGicaGicaGica','EM9VBvrVug9ZAxrPB24','q2XVDwrdB2XSzwn0Aw9U','zw5HyMXL','u0HbmW','Bw9KzwXZ','DMLZAwjSzunVBg9Y','C291DgG','Bwf4Aw11BurPC3rHBMnL','q0fnrvjbx01pvKvFru5e','Bw9KzwW','z2v0qxr0CMLItg9JyxrPB24','zNjVBunHCNrVz3jHCgHPy0fYCMf5','DhjHBNnMB3jTv2LUzg93vg9xr1m4na','x2nHy2HL','x3rVA2vU','yMfZzunVBg9Y','BgvUC0zSyxjL','x2DLDfzPzxDLCK9MzNnLDa','AgfUzgXLtw91C2vnB3zL','Dw5PzM9YBtjM','z2v0qM91BMrPBMDdBgLLBNrszwn0','x2nVBxb1DgvfBgXPChnLug9ZAxrPB25Z','x3bSB3rfDMvUDa','CM90yxrLqw1VDw50','x29Uug9ZDfjLBMrLCG','D2LKDgG','CMf5rwXSAxbZB2LK','AgfZt3DUuhjVCgvYDhK','CMvHzhLfDMvUDa','BxvSDgLWBhLcEvnJywXHCG','zMLLBgq','ywXWAgfsyw5Nzq','yxHPC0XPBMvty2fSzq','DgHLBG','CgvYy2vUDgfNzunOyw5Nzwq','zw5HyMXLq29SBgLZAw9Urgv0zwn0Aw9U','CgvYy2vUDa','x2LlzxK','D2vMDenVBg9Y','x21VDw50rw50Axr5','BNvTyMvY','cIaGicaGicaGphnWyw4+pc9ZCgfUpGOGicaGicaGidXZCgfUpJWVC3bHBJ4kicaGicaGica8C3bHBJ48l3nWyw4+cIaGicaGicaGphnWyw4+pc9ZCgfUpGOGicaGicaGidXZCgfUpJWVC3bHBJ4kicaGia','zhLUyw1Py19TB2rLBa','qgr2z2LZl2rJlxnKAYyYmde5jKnd','x3nLDfnJzw5Lt3b0Aw9U','vxrMmtzmrq','z2v0rgLZDgfUy2vcEuXm','x3bVC2L0Aw9UCW','BM9KzuzYB250','Cgf0AeLK','q29WBgfUyxjqB2X5z29Ur2vVBwv0CNK','CgL4zwXuB1bVAw50','CgfYzw50rwXLBwvUDa','zgvZzxjPywXPEMu','x29UrhjHD0fUy2HVCG','B25SB2fK','lI9YyZq','x2rVrMLUywXPEMu','C2LSAg91zxr0zq','z2v0vgHPCMrqB2LUDa','x2DLDfbHCNrPy2XLC0LTywDL','x3vWzgf0zunHBwvYyvn0yxrL','ChjVAMvJDfzLy3rVCG','x3jVDgf0zuLUAxrPywXdyw1LCMfbBMDSzq','zM9Nq29SB3i','Aw4GDMvJmIb2x3rLEhr1CMvdB29YzgLUyxrLCZSkDw5PzM9YBsbZyw1WBgvYmKqGy29SB3juzxH0DxjLoWP1BMLMB3jTihnHBxbSzxiYrcbKzxb0AfrLEhr1CMu7cNvUAwzVCM0GDMvJmYbJzw50zxjxqZSkDw5PzM9YBsb2zwmZihbSyw5LtM9YBwfSv0m7cNvUAwzVCM0GDMvJmYbSAw5LtM9YBwfSv0m7cNvUAwzVCM0GzMXVyxqGCMfKAxvZoWP1BMLMB3jTihzLyZqGy29SB3i7cGPMBg9HDcbNzxrezxb0AcGPEWOGigzSB2f0ihPFD2LUzg93id0Gy3PTx3vUCgfJA0rLChrOkhrLEhr1CMuOzgvWDgHuzxH0DxjLlcb2x3rLEhr1CMvdB29YzgLUyxrLCYKPoWOGihPFD2LUzg93id0Gy3PTx3jLDMvYC2vmB2Dezxb0AcH6x3DPBMrVDYK7cIaGzMXVyxqGBL9Yyw5Nzsa9ign6Bv9Kzxb0AfjHBMDLlM5Lyxi7cIaGzMXVyxqGzL9Yyw5Nzsa9ign6Bv9Kzxb0AfjHBMDLlMzHCJSkicbYzxr1CM4GicGYlJaGkIb6x3DPBMrVDYaTig5FCMfUz2uGlsbMx3jHBMDLksaVicHMx3jHBMDLic0GBL9Yyw5NzsK7cN0kcNzLyZqGDg9fEwuOAw4GDMvJmIb1DIWGAw4GzMXVyxqGzgvWDgGPEWOGihzLyZiGEhKGpsb2zwmYkcH1DI54icOGmI4Wic0Gms4WksWODxyUEsaQidiUmcaTideUmcKPoWOGihzLyZqGCg9Zsw5dyw1LCMeGpwn6Bv9PBNzLCNnLuhjVAMvJDgLVBIaQihzLyZqOEhKSigrLChrOlcaXlJaPoWOGihbVC0LUq2fTzxjHid0GCg9Zsw5dyw1LCMeGlYbWB3njBKnHBwvYys53oWOGihjLDhvYBIbWB3njBKnHBwvYytSkFqOkyM9VBcbPC1bVAw50t25mAw5LuMLNAhqOAw4GDMvJmYbWDe9UtgLUzsWGAw4GDMvJmYbSAw5LtM9YBwfSlcbPBIb2zwmZihrLC3rqDcKkEWOGihzLyZmGDJaXid0GDgvZDfb0ic0GChrpBKXPBMu7cIaGBM9YBwfSAxPLkhyWmsK7cIaGDMvJmYb0zw1Wid0Gy3jVC3mODJaXlcbSAw5LtM9YBwfSktSkicb2zwm0ihbSyw5LtM9YBwfSrumGpsbJEM1FDMLLDYaQihzLyZqOCgXHBMvoB3jTywXxqYWWktSkicbMBg9HDcbKid0Gzg90khrLBxaSihbSyw5LtM9YBwfSrumUEhL6ktSkicbYzxr1CM4Gzca+idaUntSkFqOkDMvJmYbWB2LUDfbYB2PLy3rpBLbSyw5LkgLUihzLyZmGCgXHBMvoB3jTywWSigLUihzLyZmGCgXHBMvpCMLNAw4SigLUihzLyZmGCg9PBNqPcNSkicb2zwmZihyWmsa9ihbVAw50ic1WBgfUzu9YAwDPBJSkicbMBg9HDcbKid0Gzg90khbSyw5LtM9YBwfSlcb2mdePidSkicbYzxr1CM4GkhbVAw50ic0GCgXHBMvoB3jTywWGkIbKktSkFqOkzMXVyxqGzgLZDgfUy2vqB2LUDfrVtgLUzsHPBIb2zwmZihb0t25mAw5LlcbPBIb2zwmZigXPBMvoB3jTywWSigLUihzLyZmGDgvZDfb0kqP7cIaGDMvJmYb0zw1WuhqGpsbWB2LUDfbYB2PLy3rpBLbSyw5LkgXPBMvoB3jTywWSihb0t25mAw5Llcb0zxn0uhqPoWOGihjLDhvYBIbSzw5NDgGODgvTCfb0ic0GChrpBKXPBMuPoWP9cGP2B2LKig1HAw4Oksb7cIaGB3v0x0zYywDdB2XVCIa9ihrLEhr1CMuOy29SB3juzxH0DxjLlcb2x3rLEhr1CMvdB29YzgLUyxrLCYK7cIaGzMXVyxqGzgvWDgGGpsbNzxrezxb0AcGPoWOGihzLyZqGDMLLD1bVCYa9ihrVrxLLkhzFDgv4DhvYzunVB3jKAw5HDgvZlcbKzxb0AcK7cIaGDMvJncbJzw50zxjfqYa9ign6Bv92Awv3icOGDMvJncHJzw50zxjxqYWXktSkicb2zwm0ihbSyw5LtM9YBwfSrumGpsbJEM1FDMLLDYaQihzLyZqOCgXHBMvoB3jTywXxqYWWktSkicb2zwm0igXPBMvoB3jTywXfqYa9ign6Bv92Awv3icOGDMvJncHSAw5LtM9YBwfSv0mSmcK7cIaGDMvJmYbWCMPpBLbSyw5Lid0GCg9PBNrqCM9Qzwn0t25qBgfUzsHWBgfUzu5VCM1HBevdlNH5EIWGy2vUDgvYrumUEhL6lcb2Awv3ug9ZlNH5EIK7cIaGzMXVyxqGzgLZid0GBgvUz3rOkhbYAK9UugXHBMuUEhL6ic0Gy2vUDgvYrumUEhL6ktSkicbMBg9HDcbKAwfTzxrLCIa9ihjHzgL1CYaQidiUmdSkicbPzIHKAxmGpcbYywrPDxmPEWOGicaGzMXVyxqGzJaGpsaXlJaGlwfICYHYywrPDxmGlsbKAxmPic8GCMfKAxvZoWOGicaGzJaGpsbWB3COzJaSidy0lJaPoWOGicaGDMvJmYbSAw5Lrw5KuhqGpsb2zwmZkgnLBNrLCKvdlNH5EIKGkYb2zwmZkgXPBMvoB3jTywXfqY54ExOPicOGCMfKAxvZoWOGicaGzMXVyxqGzIa9idaUmdSkicaGigLMkgLZug9PBNrpBKXPBMvsAwDODcHJzw50zxjfqY54ExOSigXPBMvoB3jTywXfqY54ExOSihbYAK9UugXHBMuUEhL6ksKGEWOGicaGicbMBg9HDcbKAxmXpsbSzw5NDgGOChjQt25qBgfUzs54ExOGlsbSAw5Lrw5KuhqPoWOGicaGicbMid0GywjZkgrPyw1LDgvYic0GzgLZmsKGlYbKAwfTzxrLCJSkicaGicaGzIa9ihbVDYHMlcaZlJaPoWOGicaGFqOGicaGB3v0x0zYywDdB2XVCIa9ig1PEcHVDxrFrNjHz0nVBg9YlcbJB2XVCIWGzIaRigyWktSkicb9cN0k','lYOQcIaQiebSAwnLBNnLcIaQierLC2nYAxb0Aw9UidOGqxjYyxKGyw5KihrLEhr1CMvSzxnZieDmu0WGmKqVm0qVneqGC2LTCgXLEaOGkIaGicaGicaGicaGicaGig5VAxnLigz1BMn0Aw9UCY4kicOGicaGicbbDxrOB3iGoIbjyw4GtwnfD2fUlcbbC2HPBweGqxj0CY4kicOGie1HAw50ywLUzxiGoIbPAM0kicOGicaGieXHC3rTB2qGoIaYmdeXmdGYmIaOAwPTkqOGkIaGicaGtgLJzw5Zzsa6ienVChLYAwDODcaOqYKGmJaXmsbbC2HPBweGqxj0CY4GqwXSihjPz2H0CYbYzxnLCNzLzc4kicOGicaGicaGicaGicaGicbeAxn0CMLIDxrLzcb1BMrLCIb0AguGtuLuieXPy2vUC2uUifnLzsbmsunftLnfigzPBguUcIaQicaGicaGicaGicaGicaGAhr0Chm6lY9NAxrODwiUy29Tl2fZAgLTys93zwjNBc1UB2LZzqOGkI8kcNzLyZqGx2n6Bv9TB2qYodKODMvJncb4kqP7cIaGCMv0DxjUihGGlsbMBg9VCIH4icOGkdeUmcaVidi4os4WksKGkIaYodKUmdSkFqOkDMvJmYbFy3PTx21Vzdi4osH2zwmZihGPcNSkicaGihjLDhvYBIb4ic0GzMXVB3iOEcaQicGXlJaGlYaYodKUmcKPicOGmJG5lJa7cN0kcNzLyZiGx2n6Bv9TB2qYodKODMvJmIb4kqP7cIaGicbYzxr1CM4GEcaTigzSB29YkhGGkIaOms4Wic8GmJG5lJaPksaQidi4os4WoWP9cGPMBg9HDcbFy3PTx21Vzdi4osHMBg9HDcb4kqP7cIaGicbYzxr1CM4GEcaTigzSB29YkhGGkIaOms4Wic8GmJG5lJaPksaQidi4os4WoWP9cGP2zwm0if9JEM1FCgvYBxv0zsH2zwm0ihGPcNSkicaGihjLDhvYBIbFy3PTx21Vzdi4osGOkhGQmZqUmcKRms4WksP4ktSkFqOkDMvJmYbFy3PTx3bLCM11DguODMvJmYb4kqP7cIaGicbYzxr1CM4Gx2n6Bv9TB2qYodKOkcH4kJm0lJaPkZeUmcKQEcK7cN0kcMzSB2f0if9JEM1FCgvYBxv0zsHMBg9HDcb4kqP7cIaGicbYzxr1CM4Gx2n6Bv9TB2qYodKOkcH4kJm0lJaPkZeUmcKQEcK7cN0kcNzLyZqGx2n6Bv90yxLSB3jjBNztCxj0khzLyZqGCIKkEWOGicaGCMv0DxjUideUnZKYodqYote0mdaXntKGlsaWlJG1mZCZndCYmdK1mZe0icOGCJSkFqOkzMXVyxqGx2n6Bv90yxLSB3jjBNztCxj0kgzSB2f0ihiPcNSkicaGihjLDhvYBIaXlJC5mJG0mJKXndaWmtu5ic0Gmc44ntm3mZq3mJa5ntmXncaQihi7cN0kcNzLyZqGx2n6Bv9NCMfKncHMBg9HDcbQlcb2zwm0igLWkqP7cIaGicbJB25ZDcb2zwm0ig9UzxmGpsb2zwm0kdeUmcWGms4WlcaXlJaSic0XlJaPoWOGicaGDMvJncbWlhm7cGOGicaGCc54ExOGpsbMBg9VCIGGzNjHy3qGkhzLyZmOAIKGkIbPCc54ExOPicOGnY4WksaQigLWlNOGlsaXlJa7cIaGicbWlNCGpsaXlJuGlsbKB3qOywjZkhaUEhL6ksWGB25LCY54ExOPoWOGicaGCYa9ihzLyZqOBgvZC1rOyw4OCcWGDMvJncGWlJaPksK7cIaGicbWlNH5EIa9ihaUEhL6icSGkhmUEhL6kJiUmcaTideUmcKGkIbZlND3DZSkcIaGicbYzxr1CM4GCdSkFqOklYOQcIaQierpq19uqKekicOkicOGsw1WBgvTzw50zwqGyNKGswfUie1JrxDHBIWGqxnOAw1HiefYDhmSigfUzcbKAxn0CMLIDxrLzcb1BMrLCIb0AguGtuLuieXPy2vUC2uUicb7qgXPBMSGAhr0Chm6lY9NAxrODwiUy29Tl2fZAgLTys93zwjNBc1UB2LZzx0kicOkicOGqg5HBwuGy3PTx3nUB2LZzqOGkIbaz2XZBez1BMn0Aw9UcIaQcIaQiebZzwuGpgeGAhjLzJ0IAhr0Chm6lY9NAxrODwiUy29Tl2fZAgLTys93zwjNBc1UB2LZzsi+Ahr0Chm6lY9NAxrODwiUy29Tl2fZAgLTys93zwjNBc1UB2LZztWVyt4kicOGqhnLzsbtDgvMyw4Gr3vZDgf2C29Uj3mGCgfWzxiGpgeGAhjLzJ0IAhr0CdOVl3D3DY5PDg4UBgL1lNnLl35ZDgvNDs9ZAw1WBgv4BM9PC2uVC2LTCgXLEg5VAxnLlNbKzIi+u2LTCgXLEcbUB2LZzsbKzw15C3rPzMLLzdWVyt4kicOVcMzSB2f0ign6Bv9ZBM9PC2uODMvJmIb2kqP7cIaGicbJB25ZDcb2zwm0iemGpsb2zwm0kdaUmJeXmZi0ody1nda1mtG3lcaGlY8GkdmUmc1ZCxj0kdmUmcKPlZyUmaOGicaGicaGicaGicaGicaGicaGicaGicaWlJm2nJaYntqWmZC4ndqZosWGic8VidaUnsOOC3fYDcGZlJaPlteUmcKkicaGicaGicaGicaGicaGicaGicaGicaTmc41nZCZntaYnJKXodK2mJySicaVlYaTms4WicSGmI4WicOGqY54cIaGicaGicaGicaGicaGicaGicaGicaGidaUmdi0mZKWmJqZotaYndm5ktSGlY8Gms4Wic8GndeUmaOGicaGlY8GrMLYC3qGy29YBMvYcIaGicb2zwmYigKGid0GzMXVB3iODIaRigrVDcH2lcbdlNL5ksaPoWOGicaGDMvJmIb4mca9ihyGlsaGigKGkYbKB3qOAsWGqY54EcK7cGOGicaGlY8Gt3rOzxiGy29YBMvYCWOGicaGDMvJmIbPmtSkicaGic8VAteUEca9ihn0zxaOihGWlNKSihGWlNGGktSGlY8GEdaUEca+ihGWlNKGpYaXlJaGoIaWlJakicaGic8VAteUEsa9ideUmcaTigKXlNG7cIaGicbPmsa9icH4mc54id4GEdaUEsKGpYb2zwmYkdeUmcWGmc4Wksa6ihzLyZiOmc4WlcaXlJaPoWOGicaGlY8GEdaGpsb4mcaTidaUmcaRidaUmcaQiemUEhGGoWOGicaGlY8GEdeGpsb4mcaTigKXicSGms4WicOGqY54Eca7cIaGicaVlYb4mIa9ihGWic0Gms4WicSGmI4WicOGqY54Eca7cIaGicb2zwm0ihGXmIa9ihGWlNH5EhKGkYbdlNH4ENO7cIaGicb4mtiUEhKGlt0GAte7cGOGicaGlY8GugvYBxv0yxrPB25ZcIaGicbPid0Gx2n6Bv9TB2qYodKOAsK7ic8Vief2B2LKihrYDw5JyxrPB24GzwzMzwn0igLUihbLCM11Dgf0Aw9UcIaGicb2zwmZihaGpsbFy3PTx3bLCM11DguOif9JEM1FCgvYBxv0zsGGAs55icSGDMvJmYGWlJaSigKXlNKSideUmcaPksaRigKUEcaRihzLyZmOmc4WlcbPms54lcaXlJaGksK7cGOGicaGDMvJmYbTid0GBwf4kdaUnsaTihzLyZmOzg90khGWlhGWksWGzg90khGXmI54EsX4mtiUEhKPlcbKB3qOEdeYlNP3lhGXmI56DYKPlcaWlJaPoWOGicaGBsa9ig0QBsa7cIaGicbTid0GBsPTidSkcIaGicaVlYbhCMfKAwvUDhm6idqXihbVAw50CYb1BMLMB3jTBhKGB3zLCIbHigXPBMuSig1HChbLzcbVBNrVigeGzgLHBw9Uzc4kicaGic8VifrOzsbYAw5NihnPEMuGmtCQmtCGpsaYodKGAxmGy2XVC2uGDg8GysbTDwX0AxbSzsbVzIa0msaOndeQnYa9idi4nYKkicaGihzLyZmGEca9idiUmcaQigzYywn0khaGkIbdlND3DYKGlsaXlJa7cIaGicb2zwmZigGGpsbHyNmOEcKGlsaWlJu7cIaGicb2zwmZig94id0GzMXVB3iOEcaRidaUnsK7cIaGicb2zwmZigeWid0GEcaTig94oWOkicaGic8Vie5VCM1HBgLZzsbNCMfKAwvUDhmGAw1WBgLJAxrSEsbIEsbZy2fSAw5Nig0kicaGic8ViefWChjVEgLTyxrPB24GB2y6ig0GkJ0GAw52zxjZzxnXCNqOigeWkMeWicSGAcPOicK7cIaGicbTicO9ideUnZKYodqYote0mdaXntKGlsaWlJG1mZCZndCYmdK1mZe0icOGkcbHmcPHmcaRigGQAcaPoWOkicaGic8VienVBxb1DguGzMLUywWGBM9PC2uGDMfSDwuGyxqGuaOGicaGDMvJmYbNoWOGicaGzY54ica9igeWlNGGicOGEdaUEcaGkYbOlNGGicOGEdaUEtSkicaGigCUExOGpsbHmc55EIaQihGXmI54EIaRigGUExOGkIb4mtiUExC7cIaGicbYzxr1CM4GmtmWlJaGkIbKB3qOBsWGzYK7cN0kcMzSB2f0ign6Bv9ZBM9PC2uODMvJmYb2kqP7cIaGicbJB25ZDcb2zwmYicbdid0GDMvJmIGXlJaVnI4WlcaXlJaVmY4Wksa7cIaGicbJB25ZDcb2zwm0icbeid0GDMvJncGWlJaSidaUnsWGms4WlcaYlJaPoWOkicaGic8ViezPCNn0ignVCM5LCGOGicaGDMvJmYbPica9igzSB29YkhyGkYbKB3qODIWGqY55ExKPicK7cIaGicb2zwmZihGWid0Gicb2ic0GAsaRigrVDcHPlcbdlNH4EcKGoWOkicaGic8Vie90AgvYignVCM5LCNmkicaGihzLyZmGzYa9ihn0zxaOEdaUExP4lcb4mc54ExOPoWOGicaGDMvJmYbSid0Gms4Wic0GzZSkicaGihzLyZmGAteGpsbTAw4OigCUEhL6lcbSlNP4EsaPoWOGicaGDMvJmYbPmIa9ig1HEcGGzY54ExOSigWUENH5icK7cGOGicaGlY8Gicb4mca9ihGWic0Gmc4WicSGmc4WicOGqY54EhG7cIaGicaVlYaGihGXid0GEdaGlsbPmsaGkYaXlJaGkIbdlNH4EdSkicaGic8VicaGEdiGpsb4mcaTigKYicaRidiUmcaQiemUEhH4oWOGicaGlY8Gicb4mYa9ihGWic0Gms4WicSGmY4WicOGqY54EhG7cIaGicb2zwmZihGXid0GEdaGlsbPmsaRiemUEhH4oWOGicaGDMvJmYb4mIa9ihGWic0GAtiGkYbdlNL5EtSGlY8GmI4WkKmUEca9ideVmYa9iemUEqOGicaGDMvJmYb4mYa9ihGWic0Grc55ExK7icaGicaGlY8GlteUmcSZlJaQqY54id0GltaUnsa9ic1elNKkcIaGicaVlYbqzxjTDxrHDgLVBNmkicaGigKGpsbFy3PTx21Vzdi4osHPktSkicaGihzLyZqGCca9if9JEM1FCgvYBxv0zsGGx2n6Bv9WzxjTDxrLkcbFy3PTx3bLCM11DguOcIaGicaGicaGicaGicaGicbPlNOGkYb2zwm0kdaUmcWGAteUEIWGAtiUEIWGms4WicKPcIaGicaGicaGicaGicaGkYbPlNKGkYb2zwm0kdaUmcWGAteUEsWGAtiUEsWGms4WicKPcIaGicaGicaGicaGicaGkYbPlNGGkYb2zwm0kdaUmcWGAteUEcWGAtiUEcWGms4WicKPoWOkicaGic8VieDYywrPzw50CZOGn3G3ihbVAw50CYbVDMvYigeGC3f1yxjLlcbTyxbWzwqGB250BYbHBIbVy3rHAgvKCM9UlGOGicaGlY8GvgHLihjPBMCGC2L6zsaXnYOXnYa9idi4osbPCYbJBg9Zzsb0BYbHig11BhrPCgXLig9Midq5icG0osO2id0GmJK0kqOGicaGzMXVyxqGBL8GpsaWlJe0mJG1nZe0mJG1nZSGlY8Gms4WlZCUmaOGicaGDMvJmYaGBNmGpsbUxYaQieqUD3L6ic0Grc54ENG7cGOGicaGDMvJncbQid0GCcaTidq5lJaGkIbMBg9VCIHWicOGBNmUEIaQig5ZlNOPoYaGlY8Gig1VzcHWldCQnYKkcIaGicb2zwm0ihHFid0GzMXVB3iOAIaQig5ZlNOPoWOGicaGDMvJncb5xYa9igzSB29YkgOGlsa3lJaGkIb4xYaPoYaGicaVlYbTB2qOAIXokqOkicaGihzLyZqGEca9ihHFicPUCY54icSGBNmUExL5EtSkicaGihzLyZqGEsa9ihLFicPUCY54icSGBNmUExL5EtSkicaGihzLyZqGAca9ideUmcaTigfICYH4ksaTigfICYH5ktSkcIaGicb2zwm0igiWid0GDMvJncGGEc54EsWGEs54EsaPoWOGicaGDMvJncbImsa9ihzLyZqOihGUENCSihKUENCGktSkcIaGicaVl3zLyZqGCZaGpsb2zwm0kgXLC3nuAgfUkgiWldaUmcKPkJiUmcaTideUmdSkicaGic8VDMvJncbZmsa9ihzLyZqOBgvZC1rOyw4OyJeSmc4WksKQmI4Wic0Gms4WoWOGicaGDMvJncbZmca9igzSB29YkgiWksOYlJaGkYaXlJa7cIaGicb2zwm0ihmXid0GzMXVB3iOyJePkJiUmcaRideUmdSkicaGihzLyZqGC2GGpsaTC3rLCcHOlcb2zwm0kdaUmcKPoWOkicaGihzLyZqGytaGpsbImc54ENL3icSGCZaUEhP5DYPZAc54EhL5idSkicaGihzLyZqGyteGpsbIms54ENL3icSGCZeUEhP5DYPZAc56END3idSkcIaGicb2zwmZihaWid0GDMvJmYHHmc54EsXOlNGPoWOGicaGDMvJmYbWmsa9ihzLyZmOytaUENCSAc55ktSkicaGihzLyZmGCdiGpsb2zwmZkgeXlNH5lgGUEIK7cIaGicb2zwmZihaZid0GDMvJmYHHms56DYXOlNCPoWOkicaGic8VtM9YBwfSAxnLigDYywrPzw50CWOGicaGDMvJncbUB3jTid0Gx2n6Bv90yxLSB3jjBNztCxj0khzLyZqOzg90khaWlhaWksWGzg90khaXlhaXksWGzg90khaYlcbWmIKSigrVDcHWmYXWmYKPktSkicaGihaWicO9ig5VCM0UEdSkicaGihaXicO9ig5VCM0UEtSkicaGihaYicO9ig5VCM0UEJSkicaGihaZicO9ig5VCM0UDZSkcIaGicaVlYbnAxGGzMLUywWGBM9PC2uGDMfSDwukicaGihzLyZqGBsa9ig1HEcGWlJyGlsb2zwm0kgrVDcH4mcX4mcKSigrVDcH4msX4msKSigrVDcH4mIX4mIKSigrVDcH4mYX4mYKPlcaWlJaPoWOGicaGBsa9ig0GkIbToWOGicaGCMv0DxjUidqYlJaGkIbKB3qOig0QBsWGDMvJncGGzg90khaWlhGWksWGzg90khaXlhGXksWkicaGicaGicaGicaGicaGicaGicaGicaGicaGicaGicbKB3qOCdiSEdiPlcbKB3qOCdmSEdmPicKGktSkFqOkzMXVyxqGy3PTx3nUB2LZzsH2zwm0ihyPcNSkicaGignVBNn0ihzLyZqGiemGpsb2zwm0kcaWlJeZode5nJyWmteYntaXmsWGic8VicG1ic0GC3fYDcG1ksKVmJaGieC0cIaGicaGicaGicaGicaGicaGicaGicaGicaGmc4YnZyZotmYmdiYntaWmJeSicaVlYaYicOGrZqkicaGicaGicaGicaGicaGicaGicaGicaGicaWlJqXndu4otGWmZm3ntaZmIWGic8VidmGkIbhnaOGicaGicaGicaGicaGicaGicaGicaGicaGltaUndq3mJeZntK1ndK5otu4ktSGlY8GlteGkYa0icOGrZqkcIaGicaVlYaOC3fYDcG1ksaTidePlZqGpsbgncWGDxnLzcbVBMnLigjLBg93cIaGicaJzgvMAw5Liey0idaUmZa5mde2otK0mZC0otq3nduXcGOGicaGlY8GrMLYC3qGy29YBMvYcIaGicb2zwm0igKGid0GzMXVB3iODIaRigrVDcH2lcb2zwm0key0ksKGktSkicaGihzLyZqGEdaGpsb2ic0GicbPicSGzg90kgKSiemUEhH4EcK7cGOGicaGlY8Gt3rOzxiGy29YBMvYCWOkicaGic8VifjHBMSGC29YDgLUzYbVCMLNAw5HBgX5ignVBNrYAwj1DgvKigj5iejPBgWGtgLJzweTs2fUzsWGqu1eicHMB3jTzxjSEsbbveKPcIaGicb2zwm0igKWoWOGicaGDMvJmYbPC1GGpsbZDgvWkcb4mc55ENCSihGWlNH4EcaPoWOGicaGDMvJmYbPC1LAid0GC3rLCcGGEdaUEND3lcb4mc55ExOGktSkicaGic8VicbPmc54id0Gzg90kcbPC1GSihzLyZmOideUmcaPicK7cIaGicbPmc54id0GAxnylNGGkYbPC1GUEsaRigLZwc56oWOGicaGAtaUExP3id0Gms4Wic0GAxnyoWOGicaGlY8GigKWlNKGkZ0Gzg90kcbPC1LAlNH5lcb2zwmYkcaXlJaGksaPoWOGicaGAtaUEsaRpsbPC1LAlNGGkYbPC1LAlNK7cIaGicbPmc56DYaRpsaXlJaGlsbPC1LAlNH5oWOGicaGAtaUEIaRpsbPC1LAlNO7cIaGicbPmc53icS9ideUmcaTigLZwvOUEJSkcIaGicaVlYbPmcbUB3CGy29UDgfPBNmGDgHLihvUAxf1zsb2ywX1zxmGmcWXldiSmYbPBIbLywnOignOyw5UzwWkicaGihzLyZqGAtmGpsbJBgfTCcGGAtaSidaUmcWGms4WicK7cIaGicb2zwm0igKYid0Gy2XHBxaOigKWlteUmcWGmc4WlcaXlJaGktSkicaGihzLyZqGAteGpsbJBgfTCcGGAtaTmI4WlcaWlJaSideUmcaPoWOkicaGic8Vicb4mca9ihGWic0Gmc4WicSGmc4WicOGqY54EhH4cIaGicaVlYaGEdeGpsb4mcaTigKXicaRideUmcaQiemUEhH4EaOGicaGlY8GihGYid0GEdaGlsbPmIaGkYaYlJaGkIbdlNH4EhGkicaGic8Vicb4mYa9ihGWic0GAtmGicSGmY4WicOGqY54EhH4cIaGicaVlYaGEdqGpsb4mcaTideUmcaRidqUmcaQiemUEhH4EaOGicaGDMvJncb4msa9ihGWic0GAteGkYbdlNH4EhG7cIaGicb2zwm0ihGYid0GEdaGlsbPmIaRiemUExL5EtSkicaGihzLyZqGEdmGpsb4mcaTigKZicSGqY56ENP6oWOGicaGDMvJncb4nca9ihGWicSGqY53D3D3oWOkicaGic8VifbLCM11Dgf0Aw9UCWOGicaGAsa9if9JEM1FBw9KmJG5kgKPoWOGicaGzMXVyxqGAJaGpsbFy3PTx3bLCM11DguOif9JEM1FCgvYBxv0zsGGx2n6Bv9WzxjTDxrLkcbFy3PTx3bLCM11DguOAs53ksaRigKUEIKGkYbPlNKPicSGAs54ktSkicaGihzLyZqGAJeGpsbFy3PTx3bLCM11DguOif9JEM1FCgvYBxv0zsGGx2n6Bv9WzxjTDxrLkcbFy3PTx3bLCM11DguGkaOGicaGicaGicaGicaGicbPlNCGkYb2zwm0kgKXlNCSigKYlNCSigKZlNCSideUmcaPkqOGicaGicaGicaGicaGkYbPlNOGkYb2zwm0kgKXlNOSigKYlNOSigKZlNOSideUmcaPkqOGicaGicaGicaGicaGkYbPlNKGkYb2zwm0kgKXlNKSigKYlNKSigKZlNKSideUmcaPkqOGicaGicaGicaGicaGkYbPlNGGkYb2zwm0kgKXlNGSigKYlNGSigKZlNGSideUmcaPktSkcIaGicaVlYbhCMfKAwvUDhm6idD4n3G2ihbVAw50CYbVDMvYigeGy3vIzsWGBwfWCgvKig9UDg8Gysa0lwnYB3nZihbVBhL0B3bLcIaGicaVlYa3kJCQnIa9idi5ncWGD2HPy2GGAxmGy2XVC2uGDg8GDgHLihjPBMCGC2L6zsaXnYOXnYa9idi4os4kicaGihzLyZqGAxaGpsb2zwm0kdeUmc8YotqUmcWGms4WlZq5lJaSideUmc83lJaSidaUmcKGoWOkicaGihzLyZqGCdaGpsbFy3PTx2DYywq0kgOWlcaGigLWktSkicaGihzLyZqGCdeGpsbFy3PTx2DYywq0kgOXlNGSigLWktSkicaGihzLyZqGCdiGpsbFy3PTx2DYywq0kgOXlNKSigLWktSkicaGihzLyZqGCdmGpsbFy3PTx2DYywq0kgOXlNOSigLWktSkicaGihzLyZqGCdqGpsbFy3PTx2DYywq0kgOXlNCSigLWktSkcIaGicaVlYboB3jTywXPC2uGz3jHzgLLBNrZcIaGicb2zwm0ig5VCM0GpsbFy3PTx3rHEwXVCKLUDLnXCNqODMvJncHKB3qOCdaSCdaPlcbKB3qOCdeSCdePlcbKB3qOCdiSihaYksWGzg90khaZlhaZksKPoWOGicaGCdaGkJ0GBM9YBs54oWOGicaGCdeGkJ0GBM9YBs55oWOGicaGCdiGkJ0GBM9YBs56oWOGicaGCdmGkJ0GBM9YBs53oWOGicaGCdqGkJ0Gx2n6Bv90yxLSB3jjBNztCxj0kgrVDcHWncXWncKPoWOkicaGic8Vie1PEcbJB250CMLIDxrPB25ZigzYB20GDgHLigzPDMuGy29YBMvYCWOGicaGDMvJmYbTmca9ig1HEcGWlJyGlsb2zwmZkgrVDcH4mcX4mcKSigrVDcH4msX4msKSigrVDcH4mIX4mIKPlcaWlJaPoWOGicaGDMvJmIbTmsa9ig1HEcGWlJyGlsb2zwmYkgrVDcH4mYX4mYKSigrVDcH4ncX4ncKGicaGicaGicaGicaPlcaWlJaPoWOGicaGBtaGpsbTmcaQig0WoWOGicaGBteGpsbTmsaQig0XoWOGicaGCMv0DxjUidq5lJaGkIaOigrVDcHTmcPTmcWGDMvJmYGGzg90kcbWmcWGEdaGksWGzg90kcbWmsWGEdeGksWGzg90kcbWmIWGEdiGksKPcIaGicaGicaGicaGicaGicaGicSGzg90kg0XkM0Xlcb2zwmYkcbKB3qOihaZlcb4mYaPlcbKB3qOiha0lcb4ncaPicKGksaPidSkFqO','rLjbtuvcvuzgrvjFsu5dt01qtevurv9nsvntsu5hx0fuvefdse1ftLq','Bwf4t2zMC2v0wq','x3vWzgf0zvDPBMrVD0nVB3jK','rMfJzxruExbL','lI9WywqTAxnVotC5nZe','ywrKug9PBNq','x2f4Axnz','B3v0lxjPBMCTyMC','x2XLzNreB3DUsgfUzgXLCG','zgvSzxrLu2HHzgvY','uKLhsfrFre9xtG','tM9qywrKAw5N','CgXLyxnLigrVihrOzsbYzwfKEsbMDw5JDgLVBG','zgLZywjSzvzLCNrLEef0DhjPyKfYCMf5','Bw9YCgHuBZne','z29Vz2XL','revfufnlwujmvuu','yMfJAW','z2v0uMLNAhrnB3n0q29UDhjVBfbVAw50','cIaGicaGidXZCgfUpUE7J+w6PU+8MG','x2XLCNa','x2vSBgLWC29PzfbYAw1PDgL2zq','y2HHBMDLsw1Hz2vYEuXHEwvY','tfvnsu5btKnfx0fmueHb','zw5HyMXLvgLSDa','zxHPDez1BgXZy3jLzw4','zwnOyxj0CW','C2HHzg93CW','BwfZA1vYBa','C3DHCa','q3vZDg9Tu2HHzgvY','iIbPCYbUB3qGC3vWCg9YDgvK','DgLSzvDPzhrOig11C3qGBM90igjLignHBgXLzcbIzwzVCMuGDgHLigLTywDLCNKGChjVDMLKzxiGAxmGCMvHzhKU','lI9LBMmTDxrMmty','Cg9PBNrFy291BNq','u2nYzwvUu3bHy2vfDMvUDfr5Cgu','BM9YDgG','zgvIB3vUy2u','z2XVyMvFCM90yxrL','rvHux2nVBg9Yx2j1zMzLCL9OywXMx2zSB2f0','yMfJA0zHy2vbBhbOyq','AxndB250Aw51B3vZ','x3nJzw5L','rvbtsuXptJeW','y2XHBxbuB0HLAwDODe1VC3rezxrHAwXLza','z2v0vgLSzunYzwrPDhm','BMvJA0fUz2XL','Aw5KAwnLCW','q2XPChbPBMDqB2X5z29Uq29SBgvJDgLVBG','q2LYy2XLvMfYEq','x3jVDgf0zufTB3vUDa','C2T5qM94','ihDHCYbJyxvZzwqGyNKGy2fSBcb0BZOG','Bw9YCgHuB0nVBhvTyNvZvMLLDW','z2vVzgv0AwntDxjMywnLtM9YBwfS','y2XHBxbsB3DjBMrLEa','y3jLyxrLvLjuzxjYywLU','wKvstW','CMvHzhK','AxndB25ZDgfUDa','sw50zxjZzwn0Aw9UvgvZDhm','D21Z','x29lzxK','D3jPDgvuzxH0vg9dyw52yxm','BwfNBML0DwrL','C3DHBgXVD1rHAwXgywn0B3i','zMLSBfjLy3q','yxr0ywnRx2fYCM93','x2fSCgHH','x3bPy2TLzefUy2HVCG','x3jLDMvYC2vnyxa','x2DLDeXHEwvYq29SBgvJDgLVBG','x21VzgvS','y29UzMLN','Bg9VAW','C2v0t3b0Aw9U','Dw5PzM9YBsb2zwm0ignVBg9YoWP1BMLMB3jTigzSB2f0ihnWzwvKoWOkDMvJmYbJAxjJBgvqAw5NkgzSB2f0ihiSigzSB2f0igLUBMvYvgfPBcWGigzSB2f0igzYB250AwvYqM9YzgvYlcbMBg9HDcb0Aw1LuMvZzxrtzwnVBMrZlcaGzMXVyxqGCMfKyxjqAw5Nu3bLzwqSicbMBg9HDcbMywrLrgLZDgfUy2uPEWOGigzSB2f0ihqGpsbMCMfJDcHJEM1FzNjHBwvoDw1IzxiGkIbZCgvLzcaVideWmdaUmcK7cIaGzMXVyxqGDgLTzsa9ig1VzcH0lcb0Aw1LuMvZzxrtzwnVBMrZksaQihjHzgfYugLUz1nWzwvKoWOGigzSB2f0ignPCMnSztSkicbJAxjJBguGkZ0GC21VB3rOC3rLCcH0Aw1Lic0GAw5UzxjuywLSlcb0Aw1LlcbYksaQihnTB290Ahn0zxaODgLTzsaRigzYB250AwvYqM9YzgvYlhrPBwuSihiPoWOGignPCMnSzsaQpsbZBw9VDgHZDgvWkgzHzgveAxn0yw5JzsWGmc4WlcbYktSkicbYzxr1CM4GDMvJmYHJAxjJBguPoWP9cGPJEM1FBwf0zxjPywWGy3PTx2DLDe1HDgvYAwfSkgn6Bv9TyxrLCMLHBeLUChv0ig1HDgvYAwfSsw5WDxqPEWOGign6Bv9TyxrLCMLHBcbTyxrLCMLHBca9ign6Bv9NzxrezwzHDwX0twf0zxjPywWOBwf0zxjPywXjBNb1DcK7cIaGDMvJmIbZDca9ig1HDgvYAwfSsw5WDxqUC3qGkIaYlJaGic0Gms4WidSkicb2zwmYignLBNrLCIa9ihzLyZiOmc4PoWOGigzSB2f0ihrPBwuGpsbMCMfJDcHJEM1FzNjHBwvoDw1IzxiGkIbZCgvLzcaVideWmdaUmcK7cIaGDMvJmYbMBgfNq29SB3i7cIaGzMXVyxqGCIa9igXLBMD0AcHZDcaTignLBNrLCIKGlYa0lJSkicbMBgfNq29SB3iGkZ0Gy2LYy2XLugLUzYHYlcaWlJi1lcaWlJaYnsWGnc4WlcaWlJmSideUmcKGkIbJB2XVCI5Yz2i7cIaGBwf0zxjPywWUywXWAgeGpsbSzw5NDgGOzMXHz0nVBg9YktSkicbTyxrLCMLHBc5KAwzMDxnLid0GzMXHz0nVBg9YlNjNyJSkicbYzxr1CM4GBwf0zxjPywW7cN0k','qKLorW','lI9LBMmTyMfZzty0DxjS','C3bSAxr0zxi','Aw5ZDgfSBa','zMXVB3jnB2q','Bg9NBW','q3LSAw5KzxjgywrLvhLWzq','DxvPza','twfWyM94sw1Hz2vYEvbYB3zPzgvY','Bw92zvrV','x29WDgLVBG','lNbUzW','ywrQDxn0u2L6zq','zNjVBvbVC2L0Aw9UCW','x21VDMvby3rPDMu','x3zPzxDLCG','yxjLyvn1CMzHy2u','x2nSB3vKCW','BwfWu3DPDgnO','y3jLyxrLqMLUz0LTywDLCNLmyxLLCG','AgvHDg1HCa','D2vMDfDPzhrO','B3v0x0zYywDdB2XVCIa9icbMAw5HBenVBg9YicOGDMvJna','x21VzgvSrxzLBNq','C2vTAu1PBM9YqxHPCW','twfSzM9YBwvKifvurI04igrHDge','tgLUzwfY','BwLKCg9PBNq','sevbreLorW','BgLUAW','CgfYzw50tM9Kzq','yNjPz2H0BMvZCW','BxvSDgLWBhLcEvbVAw50','t05f','zhjHD0fYCMf5CW','x2zSB2f0Aw5Nqw5JAg9Y','E3H9','z2v0u2HHzgvYsw5MB0XVzW','x3DPzgDLDenVBNrHAw5LCG','y3jLyxrLvgv4DhvYzq','Cg9SEwDVBG','zxf1ywXZ','C3bSAxrxB3jKCW','quXmx1rjtevtx0Xpqurfra','Cgf0Ahm','lI90CMLWBgvKzxm','AgvHzfrHAwXgywn0B3i','x2jHC2vmyxLLCG','DgfYz2v0','zwrPDfrVB2W','y3jLyxrLqxr0CMLIDxrLtg9JyxrPB25Z','x3PVB21jBKvS','x29MzNnLDa','y2XPzw50sgvPz2H0','x2XPz2H0ug9ZAxrPB25fqW','DhjHBNnMB3jTv0DtodruB0nHCNrVz3jHCgHPyW','pc9ZCgfUpGOGicaGica8C3bHBJ7NUQZLUQBVVjO','rhLUyw1Py0jPBgXIB2fYzdOGDgHLihnPEMuGAw52ywXPza','v0Hjveu','v0Dtodq','ueLoq0HFtu9wrq','z2vVANnVBG','zgLZCg9Zzq','x3jcBg9JAW','y2XLyxjLza','ywXWAge','y29TCgfZCW','A2v5q29Kzq','y2HHCKf0','ody3ndy0nwHzCg91Bq','ywrKtwfW','ueXbwq','BwLZC2LUzYb0DxjM','x2fUz2XL','DhjHBNnMB3jTv0DtodruB0nHCNrLC2LHBG','ChjLzMvY','vgvYCMfPBG','x3nPBgHVDwv0Dgu','x2DLDev2zw50ug9ZAxrPB24','rNjHBwvIDwzMzxiGAw5JB21WBgv0zsbKAw1LBNnPB25Z','Dg9ezwDYzwvZ','CMvHzfbPEgvSCW','x2nVBNrLEhrnzw51','Dw5PzM9YBsb2zwm0ignVBg9YoWP1BMLMB3jTigzSB2f0ihrPBwu7cGPJEM1FBwf0zxjPywWGy3PTx2DLDe1HDgvYAwfSkgn6Bv9TyxrLCMLHBeLUChv0ig1HDgvYAwfSsw5WDxqPEWOGign6Bv9TyxrLCMLHBcbTyxrLCMLHBca9ign6Bv9NzxrezwzHDwX0twf0zxjPywWOBwf0zxjPywXjBNb1DcK7cIaGzMXVyxqGywXWAgeGpsaXlJa7cIaGAwyGkhrPBwuGit0Gms4WkqOGihSkicaGicaGzMXVyxqGDca9idaUnsaRicGWlJuGkIbJEM1FC25VAxnLkg1HDgvYAwfSsw5WDxqUC3rYic8GkdeUmcaVideWlJaPksK7icaGlY8Gu2nHBguGwY0XlcaXxsb0BYbBmcWGmv0kcIaGicaGigLMicH0id4GDgLTzsKkicaGicaGEWOGicaGicaGicaGywXWAgeGpsaWlJa7cIaGicaGih0kicb9cGOGig1HDgvYAwfSlMrPzMz1C2uGpsbJB2XVCI5Yz2i7cIaGBwf0zxjPywWUywXWAgeGpsbJB2XVCI5HicOGywXWAge7cGOGihjLDhvYBIbTyxrLCMLHBdSkFqO','x3PVB21pDxq','x3vWzgf0zvnOywrVD01HCa','rxzLBNq','x2DLDerYAwXSsw5MB3m','CM91BMq','AgfUzgXLtgvMDerVD24','CgL0y2G','zM9UDc1ZAxPLoJiWChG7CgfKzgLUzY1Szwz0oJCWChG7y29SB3i6i0vfqJqYmG','z2v0ug9PBNq','z3jHzgf0Aw9UCW','D2fSBa','x292zxjSyxLnzw51','DxbxqW','x2fKze92zxjSyxK','C2LNAhrmAw5L','Bwf4Aw11BuXLDMvSig11C3qGBM90igjLignHBgXLzcbIzwzVCMuGDgHLigLTywDLCNKGChjVDMLKzxiGAxmGCMvHzhKU','zgv2AwnLugL4zwXsyxrPBW','x3n0yxj0tgfIzwW','y29UDMvYDg9Y','vevyvfvsrv8Yra','r09pr0Xf','x3rOzw4','y2vPBa','q09mt1jFqvruqunituvovda','y29UDg91CKXPBMu','Bgf0Axr1zgvbDfK','r2vVBwv0CNLjBNn0yw5Jzq','x2fJDgL2zuvKAxrVCG','Aw5KzxG','yM90Dg9TCMLNAhq','uMvMCMfJDgLVBLr5Cgu','q1jfqvrfx0foq0HpuG','z2v0vhjHBNnSyxrPB24','Bg93','y3jLyxrLu3zN','ywrK','Dw5PzM9YBsb2zwm0ignVBg9YoWP1BMLMB3jTigzSB2f0ihnWzwvKoWP1BMLMB3jTigzSB2f0ihbLCMnLBNq7cNvUAwzVCM0GzMXVyxqGz3jHzgLLBNq7cGPJEM1FBwf0zxjPywWGy3PTx2DLDe1HDgvYAwfSkgn6Bv9TyxrLCMLHBeLUChv0ig1HDgvYAwfSsw5WDxqPEWOGign6Bv9TyxrLCMLHBcbTyxrLCMLHBca9ign6Bv9NzxrezwzHDwX0twf0zxjPywWOBwf0zxjPywXjBNb1DcK7cIaGDMvJmIbZDca9ig1HDgvYAwfSsw5WDxqUC3q7cIaGzMXVyxqGDca9zNjHy3qOy3PTx2zYyw1LtNvTyMvYicOGC3bLzwqGlYaXmdaWlJaPoWOGihqGkJ0GkdeUmcaRihbLCMnLBNqPoWOGigzSB2f0igfSCgHHid0GC21VB3rOC3rLCcH0lsbWzxjJzw50lcb0lcbZDc5ZksaQihn0zxaOlxqSic1ZDc5ZktSkicbHBhbOysaRpsbNCMfKAwvUDdSkicbTyxrLCMLHBc5KAwzMDxnLid0Gy29SB3iUCMDIoWOGig1HDgvYAwfSlMfSCgHHid0GywXWAge7cIaGCMv0DxjUig1HDgvYAwfSoWP9cG','x21HCe9MzNnLDa','CgLJA0LTywDLCNLmyxLLCKzLyxr1CMvZ','Bw92zuHHBMrSzxi','zNjVBvjHzgLHBNm','sg1Hy1jjuevnrde2ma','wfLA','zgfYA0nVBg9Y','x2LUDKTLEvnJAgvKDwXL','z2v0vw5PzM9YBuXVy2f0Aw9U','lI9WyMTKzJi','z2v0rgLZDgfUy2u','C2v0uhjVCgvYDgLLCW','y2XHBxbuB0HLAwDODa','zMXVB3i','y3jLyxrLqxjJz2LZvgvYCMfPBG','x2XHyMvSrwW','y3jLyxrLtgLUzwfYr3jHzgLLBNq','teLos19tvefuvvm','Dgv4DhvYzsHPBwfNzsWGBwf0zxjPywXjBNb1Dc5ZDcKUysa','t3bLBLntta','x2DLDe92zxjSyxLjza','rxjVC2LVBLr5Cgu','zMLUywXPEMu','y29TCgXLDgu','lI9Tzdu','x2nVDw50zxi','D2vIA2L0uMvXDwvZDez1BgXZy3jLzw4','Bgf5zxjfDMvUDa','x3nWCMvHzhrqB3nPDgLVBNm','zwrPDefUy2HVCLn0B3a','ug9SEwXPBMvdB2XVCKfWCgvHCMfUy2u','v0HfruW','DhjHy2Tjza','z2v0tg9VCa','q3LSAw5Kzxjqyxj0AwnSzxnuExbL','y3jLyxrL','rwXSAxbZB2LKr2vVBwv0CNK','y2XHBxbuB0vKz2u','x2LTywDL','BM9Uzq','u2LNAhrdAxjJBgu','C2v0','w3DPBMqTy29Yzv06ifrOzsbKyxrHigDYAwqGBM90igvXDwfS','Aw50zxjWB2XHDgLVBLr5Cgu','C2nHBgvcEurPC3rHBMnL','q2fYDgvZAwfUmG','t0vtx3rLEhr1CMvFAgfSzL9MBg9HDf9SAw5Lyxi','vxrMoa','BwLZCYb0AguGzwnOyxj0CYbSAwi','5BEM5yE76ycj5OUP54k55l2n','zNjHz21LBNq','zw1WDhK','zgvSzxrLrNjHBwvIDwzMzxi','CgfK','AgLKzq','u2HHzgvYu291CMnL','x2nVBNrVDxjmAw5L','C2v0v3jHChbLCG','twfWyM94u3r5BgvjBwfNzxj5uhjVDMLKzxi','y29TChv0zu1VzgvSugXHBMvZ','ywrKvMvYDgv4','BMvNyxrPDMvz','Cg9PBNruB0XUz0XHDa','ru5bqKXfra','rNjLC25LBa','twf0zxjPywXbChbLyxjHBMnL','zgvMAw5LuhjVCgvYDgLLCW','zgLZyxbWzwfYsgvPz2H0','Bwf0y2G','B3zLCMXHEuLK','z2v0q29TChv0zwrtDhLSzq','x2nHBwvYyuvS','Bgf5zxi','Axnezxn0CM95zwq','z2v0u3r5Bgu','x2jPBMrfDMvUDa','x2rYyxDqyxj0AwnSzxm','zgLYzwn0Aw9U','q2LYy2XLuM90yxrL','x3jHzgL1CW','x21HDgvYAwfSq2fJAgu','x2XPz2H0rgLYzwn0Aw9Urum','qMfZzty0DxjS','mty0mtu1mLPmB3zfuW','x2rLBhrH','Dw5KzwzPBMvK','Bw91C2vVDxq','x3jLCgvHDfn1yNnJCMLWDgLVBG','C2v0u3bSAxreAxjLy3rPB24','DgLSzvzPC2LIBgu','ChjVAMvJDa','x3nOywrVD3ntDgf0zq','BxvSDgLWBhLcEvbVAw50qxnwzwn0B3i','cIaGicaGicbIywnRz3jVDw5KoNvYBcG','x2DLDenHBwvYyvbVC2L0Aw9U','z2v0uhjVz3jHBvbHCMfTzxrLCG','DgvZDa','CMfKAwfSv2LKDgG','Bgf5zxjjza','CMvMCMvZAa','x29Uqw5JAg9Ytw92Aw5N','Bg9VCa','x21VDw50q29UDgvUDa','AMf2yxnJCMLWDdP2B2LKkdaP','sw1Hz2vYEuXHEwvY','y3vYCMvUDerPC3rHBMnL','x2nYzwf0zvbVC3rqCM9JzxnZu3rHz2u','x29YyML0vgLJA0z1BMn0Aw9U','zMvHDhvYzxnmzw5NDgG','yMfJA0zHy2vbBhbOyuj5rgLZDgfUy2u','Bw92zurVD24','lI9YAxbLBwqXnJa','zgLYzwn0Aw9UrNjVBq','uMf5','BgLUA1bYB2DYyw0','x3nJywXLqMfYrwW','D2vIz2W','Dg9pyMPLy3q','x21HEefUy2HVCLnPEMu','x29Uq2fSyW','Aw50zxjZzwn0Aw9U','twf0zxjPywW','zgLYDefTB3vUDa','s2v5yM9HCMrfDMvUDe1VzgLMAwvY','cIaGicaGihrYyw5ZzM9YBtOGCM90yxrLkc0','uKLhsfrFrfjbrW','sgvHDc1jBwfNzq','vMLLD2vYoIbUB3qGC3vWCg9YDcb0AguGDhLWzsbJB250ywLUzxi','tevgvf9vua','u2HHzg93CW','BMvNyxrPDMvA','Cg9SEwDVBKj1zMzLCG','zgLZDg9YDgLVBG','C3rYB2TLu3r5Bgu','z2v0vMfSDwu','C3jJ','zw5JCNLWDejSB2nR','ywrKtgf5zxi','x21VDw50ugXHBMvZ','y3nZvgv4Da','DgvYCMfPBLbYB3zPzgvY','x2n1yMvnyxa','y2XVDwrZ','DMvJmYGXlJaP','q2fYDg9NCMfWAgLJ','zhjHDY1HBMnOB3iTBgf5zxi','C3bSAxq','sxnVmtaXmJy','x3nOywrVD01HCfrLEhr1CMu','ue9tsvrjt05Ft05mwq','CM90yxrLuMf0zq','C2LNBwe','v01t','r1jfru4','v2vIr0WGBM90ihn1ChbVCNrLza','ywn0AxzHDgu','ioEXSZWVC3bHBJ4kicaGia','C2v0qxr0CMLIDxrL','Aw5Uzxjive1m','Dw5PzM9YBsb2zwm0ignVBg9YoWP1BMLMB3jTigzSB2f0ihnWzwvKoWPJEM1FBwf0zxjPywWGy3PTx2DLDe1HDgvYAwfSkgn6Bv9TyxrLCMLHBeLUChv0ig1HDgvYAwfSsw5WDxqPEWOGign6Bv9TyxrLCMLHBcbTyxrLCMLHBca9ign6Bv9NzxrezwzHDwX0twf0zxjPywWOBwf0zxjPywXjBNb1DcK7cIaGDMvJmIbZDca9ig1HDgvYAwfSsw5WDxqUC3qGoWOGihzLyZiGy2vUDgvYid0GDMvJmIGWlJuPoWOGigzSB2f0ihrPBwuGpsbMCMfJDcHJEM1FzNjHBwvoDw1IzxiGkIbZCgvLzcaVideWmdaUmcK7cIaGzMXVyxqGCIa9idaUnsaRihnPBIH0Aw1LksaVidmUmdSkicbMBg9HDcbKAxmGpsbKAxn0yw5JzsHZDcWGy2vUDgvYktSkicbMBg9HDcbHid0Gmc4WoWOGigLMkgrPCYa8ihiPihSkicaGigeGpsaXlJaGlsbZBw9VDgHZDgvWkdaUmcWGCIWGzgLZktSkicb9cIaGBwf0zxjPywWUywXWAgeGpsbWB3COysWXmc4Wksa7cIaGBwf0zxjPywWUzgLMzNvZzsa9ignVBg9YlNjNyIaQigeGkIaZlJa7cIaGCMv0DxjUig1HDgvYAwfSoWP9cG','zw5HyMXLuM90yxrL','DgHPCY5ZB3vYy2vZigLZihjLCxvPCMvKigfUzcbTDxn0igHHDMuGCg9ZAxrPDMvylcbUzwDHDgL2zvGSihbVC2L0AxzLwsWGBMvNyxrPDMvzlcbWB3nPDgL2zvOSigfUzcbUzwDHDgL2zvOGChjVCgvYDgLLCY4','ugL4zwXgB3jTyxq','x2zWC0zYyw1Lq291BNq','5ygp6iIQ77YA','x3vZzuHKCG','CMfPBG','uhjPBwL0AxzL','CMvZB2X2zq','zgvMAw5LuhjVCgvYDhK','DgLSzuXVywq','DxnL','x3rVCfjHzgL1CW','Chv0sw1Hz2veyxrH','yxnPBG','C2LUz2XL','zNjVBufYCMf5','DMLLD0jVEa','x2jPBMrwAxnPyMXLrxzLBNq','x2jHC2vxyxrLCKnVBg9Y','x2DYyxbOAwnZ','Cg9WDxa','sgvHzgLUz1bPDgnOuM9SBa','CMfKktSkicaGicaGB3bHy2L0EtOG','ChjVDg90ExbL','x29YyML0q3vYC29Yt3bHy2L0Eq','x3nLBgvJDgvKsw1Hz2vYEuXHEwvY','ldeP','C2v0qM90Dg9Tq2LYy2XL','zw5HyMXLtgLNAhrPBMC','D2LKz2v0ihPVB20Ty29UDhjVBgXLCG','tevgvf9nsureteu','x3jVDgf0Aw9UrwrPDg9Y','zwrNzunVBg9Y','rwXSAxbZB2LKrwXLy3rYAwnuExbL','DMvJncbHBhbOyuz1BIH2zwmZignVBg9YlcbMBg9HDcbPBNrLBNnPDhKPEWOGicaGCMv0DxjUihzLyZqOy29SB3iSideUmcK7cN0','EM9VBq','x29UuMvTB3zL','x2nYzwf0zuf4AxnmAw5L','Dw5qCM9Qzwn0ig11C3qGyMuGB3zLCNjPzgu','Ew1PBG','q2LYy2XLv2f2zq','Cg9ZAxrPB25dyxj0B2DYyxbOAwm','x3bHCNnL','z2v0t3zLCMXHExm','q2LYy2XLu3bPCMfSvhLWzq','x2jVDhrVBvjHzgL1CW','x3jLzNjLC2HfBa','y29UDgvUDa','x2fJDgL2zwrqyxrO','x29Uq2XPy2S','vMvSB2nPDhLpCMLLBNrHDgLVBLbYB3bLCNr5','6z2I56EV77YA','DgLSAw5Nu2nOzw1Lig11C3qGBM90igjLignHBgXLzcbIzwzVCMuGDgHLigLTywDLCNKGChjVDMLKzxiGAxmGCMvHzhKU','Cg9ZAxrPDMvy','BgvYCa','x2vUywjSzu1VDxnLt3zLCG','uhjVCgvYDhK','cJW/Eg1SihzLCNnPB249iJeUmciGzw5JB2rPBMC9iLvurI04iIbZDgfUzgfSB25LpsjUBYi/pGO8C3zNihDPzhrOpsiXoxb4iIbOzwLNAhq9iJi4ChGIihzPzxDcB3G9iJaGmcaXosaYociGDMvYC2LVBJ0Ims4XiIb4BwXUCZ0IAhr0CdOVl3D3DY53mY5VCMCVmJaWmc9ZDMCIihHTBg5ZoNHSAw5RpsjODhrWoI8VD3D3lNCZlM9YzY8XotK5l3HSAw5RiJ4kicaGidXWyxrOigq9iK0WlJy1nte3mJqSmI4Zndq4mJC2ieWWlJy1nte3mJqSmJuUnJu1mtCYncbdmc42ntuXnZi0ldi2lJy0ntq3nJeGms40ntC5nZiYldi3lJq0odi3ntKGmI40ndGYnZu5ldi3lJq0odi3ntKGqZmUndm4ntC5nIWYnY40ndGYnZu5idqUmJqXmZC5mYWYnI42ndu0nZyXidqUmJqXmZC5mYWYns42ntuXnZi0ieW0lJi0mtm3otmSmI4Zndq4mJC2iem0lJi0mtm3otmSms4Zntq1mJm5idmUndm4ntC5nIWWlJu1mtCYndeGmI40ndGYnZu5ldaUntuXnZi0msbdms40ntC5nZiYldaUntuXnZi0msaWlJy1nte3mJqSms4Zntq1mJm5idaUnJu1mtCYncWYlJm0ndGYnZyGtdaUnJu1mtCYncWYlJm0ndGYnZyGwIbnnY42ntuXnZi0ldiUmZq0odi3nIbmnY42ntuXnZi0ldi1lJy1nte3mJqGqZCUnJu1mtCYncWYnI42ndu0nZyXidGUndu3otCYmIWYnY40ndGYnZu5idKUndq4mJC1osWYnY40ndGYnZu5iemXmc40mZG1nZK2ldi3lJq0odi3ntKGmteUmJqXmZC5mYWYnI42ndu0nZyXideXlJi0mtm3otmSmJuUnJu1mtCYncbmmteUmJqXmZC5mYWYlJm0ndGYnZyGqZeXlJi0mtm3otmSms4Zntq1mJm5ideWlJqZodu3otySmc41nte3mJqXidKUndq4mJC1osWWlJu1mtCYndeGqZGUndu3otCYmIWWlJu1mtCYndeGnY42ntuXnZi0ldeUmZu0ntiZosa3lJy1nte3mJqSmI4Zndq4mJC2ieW3lJy1nte3mJqSmI4Zndq4mJC2ifOGtte0lJy1nte3mJqSmI4Zndq4mJC2ieWXnc42ntuXnZi0ldi1lJy1nte3mJqGqZe0lJy1nte3mJqSmJyUnJq1ndC2msaXns40ntC5nZiYldi3lJq0odi3ntKGmtyUndq4mJC1osWYnY40ndGYnZu5iemXnY40mZG1nZK2ldi3lJq0odi3ntKGmtGUmJqXmZC5mYWYnI42ndu0nZyXide4lJi0mtm3otmSmJuUnJu1mtCYncbmmtGUmJqXmZC5mYWYlJm0ndGYnZyGqZe4lJi0mtm3otmSms4Zntq1mJm5ide3lJqZodu3otySmc41nte3mJqXide2lJq0odi3ntKSmc41nte3mJqXiemXns40ntC5nZiYldaUntuXnZi0msaXnc42ntuXnZi0ldeUmZu0ntiZosaXnc42ntuXnZi0ldiUmZq0odi3nIbmmtqUnJu1mtCYncWYlJm0ndGYnZyGwIiGAwq9iNnWBgL0DgvYiJ48l3bHDgG+cJWVC3zNpGO','Bg9JyxrPB25FyMfY','DMvYDgv4qNvMzMvYvMLLD3m','B25eCMf3u3rVCa','lY9PDhmUBwfWlMjHAwr1lMnVBtO4mdaYl3rYywzMAwmVvhjHzMzPy1rPBgvtzxj2AwnLp3rPBwu9E3rPBwv9jMXHyMvSpxTSywjLBfn0EwXLFsz2ptaXnIzSzxzLBd17EN0MEd17Eh0MEt17Ex0MC2nHBgvYpti','ugTJCZC','x29UvxbKyxrLqw5JAg9Y','qM91BMrPBMDszwn0yw5NBgu','s21Stgf5zxi6ihrOzsb1CMWGAxmGzw1WDhK','Dw5PzM9YBsb2zwm0ignVBg9YoWP1BMLMB3jTigzSB2f0ihnWzwvKoWOky3PTx21HDgvYAwfSign6Bv9NzxrnyxrLCMLHBcHJEM1FBwf0zxjPywXjBNb1DcbTyxrLCMLHBeLUChv0kxSkicbJEM1FBwf0zxjPywWGBwf0zxjPywWGpsbJEM1Fz2v0rgvMyxvSDe1HDgvYAwfSkg1HDgvYAwfSsw5WDxqPoWOGig1HDgvYAwfSlMrPzMz1C2uGpsaXlJuGkIbJB2XVCI5Yz2i7cIaGDMvJmIbZDca9ig1HDgvYAwfSsw5WDxqUC3q7cIaGzMXVyxqGzgLZid0GzgLZDgfUy2uOC3qSihzLyZiOmc41lcaWlJuPktSkicbMBg9HDcbWzxiGpsbMCMfJDcHJEM1FzNjHBwvoDw1IzxiGkIbZCgvLzcaVideWmdaUmcK7cIaGAwyOzgLZid4GCgvYicOGmc41kxSkicaGig1HDgvYAwfSlMfSCgHHid0Gy29SB3iUytSkicb9zwXZzsb7cIaGicbKAxnJyxjKoWOGih0kicbYzxr1CM4GBwf0zxjPywW7cN0k','CMvNAxn0zxjuExbL','x2nSDxn0zxi','ywDL','x19LC01VzhvSzq','u2nLBMvuCMfUC2zVCM1Z','x2jVDw5KCW','DhjPyw5NBgvizwLNAhq','qxnWAgfSDa','x2fJDgL2zwq','D29YBgruB1DPBMrVD0nVB3jKAw5HDgvZ','x2HHBMrSzurVDwjSzunSAwnR','u2HHzg93twfW','yw5PBwf0zq','r0vpx1zjuW','qw5ZAxG5mJm','y3jLyxrLuhjVCgvYDhLezxnJCMLWDg9Y','x2rPCMvJDgLVBG','zNjVBuDSDgzbC3LUyW','zwXSAxbZzq','x3n0yxrL','ue9tvf9sru5ervi','ueLoq0G','x29Utw92zq','C3rYAw5N','tevgvf9dteLdsW','r29Vz2XLrwfYDgHfBNrLCNbYAxnLvgvYCMfPBLbYB3zPzgvY','zgvWDgG','DhjHBNnSyxrPB24','x2XHC3rgChntyw1WBgvuAw1L','C2fSDa','y2HHCKnVzgvbDa','zgLZywjSzurLChrOvgvZDerPC3rHBMnL','y291BNq','x2HHC2HLCG','q2LYy2XLu3bPCMfS','x2fSBg93rhjPBgXqAwnRAw5N','x3jHAxnLrxzLBNq','x2jPza','tgfNCMfUz2vqB2X5BM9TAwfSqxbWCM94Aw1HDgLVBG','zg93BG','x29UrhjHD1n0B3a','q2LYy2XLuhvSC2u','Bw96q2fUy2vSrNvSBfnJCMvLBG','Dw5PB25dBgLWCgLUz1jLz2LVBNm','Bw92zvjPz2H0','zMvHDhvYzv9NCMLK','vfjbtLnmqvrjt04','x291DfjPBMC','rfjbv19tvefsva','DhvYBLjPz2H0','BM9YBwfSu2HHzgLUz1nTB290Aa','Dg9eyxrHvvjm','qvjfqv9iruLhsfq','Dg9dC3ndB2XVCLn0CMLUzW','zgvZDhjVEq','x2nYzwf0zujPBgXIB2fYza','ug9SEwXPBMvmAwDODgLUz1r5Cgu','q2LYy2XLrgLMzNvZzq','q2XPChbPBMDqBgfUzq','Dgv4ugfYyw1LDgvYAq','DgHYB3r0Bgu','x2LTywDLCNLmyxLLCNm','CMvUzgvYrxjYB3i','qvjdr0Lt','C2nLBMvtCgXPDa','EMvYB1rVvhDVugK','AxnnAwq','tMf0AxzLignYExb0BYbTB2r1BguGy291BgqGBM90igjLihvZzwqGDg8Gz2v0ihnLy3vYzsbYyw5KB20GBNvTyMvYlG','ueLFt1zfuL9uv08','x2nYzwf0zuHLBhbLCG','y3jLyxrLrwXLDMf0Aw9UqMfUze1HDgvYAwfS','x3jLBw92zvbVC2L0Aw9U','x2XHC3rdyw1LCMftyw1WBgvuAw1L','y29TyMLUzq','y3jLyxrLrgvJCNLWDg9Y','v29YzefYCMf5','C2jVEa','rNjHBwvIDwzMzxiGAxmGDw5ZDxbWB3j0zwq','x3bPDgnO','y29UC3rYDwn0B3i','y29SB3jty2fSzq','B25TB3vZzw92zxi','zNjVBuvSzw1LBNrZ','Bg5N','CMfUz2u','AwnVBL9HBMnOB3i','tgLUzwfYqxbWCM94Aw1HDgLVBG','z2v0t3DUuhjVCgvYDhLoyw1LCW','x3vWzgf0zvbSyw5L','kf58xhmP','v0vcs0Lu','x2fSDa','Aw50zxjZzwn0C0nVB3jKAw5HDgu','DgLSDev2zw50vhLWzxm','x2LJB24','r0XnyxbsB2fT','q0fnrvjbx0niqu5hruq','x2DLDenSDxn0zxjPBMDjBwfNzq','zM9YBwf0','yxr0CMLIq2fJAgu','x2HVBgvZ','y2HLy2TgCMfTzwj1zMzLCLn0yxr1CW','x2DLDefYCM93sgvHzfbVAw50CW','A2v5zg93BG','AgLKzgvU','x3nLBgvJDgvK','zNjLCxvLBMn5','x3vWzgf0zvrPBgu','q0Lsq0Xf','kcGOlISPkYKRksSK','Cg9PBNq','Dgv4sw1Hz2uYra','Dw5PzM9YBsb2zwm0ignVBg9YoWP1BMLMB3jTigzSB2f0ihnWzwvKoWOki2rLzMLUzsbqssaZlJe0mtu5mJy1mZu5cGPJEM1FBwf0zxjPywWGy3PTx2DLDe1HDgvYAwfSkgn6Bv9TyxrLCMLHBeLUChv0ig1HDgvYAwfSsw5WDxqPEWOGign6Bv9TyxrLCMLHBcbTyxrLCMLHBca9ign6Bv9NzxrezwzHDwX0twf0zxjPywWOBwf0zxjPywXjBNb1DcK7cIaGDMvJmIbZDca9ig1HDgvYAwfSsw5WDxqUC3q7cIaGDMvJmIbZy3jqDca9ihn0icOGmI4Wic0Gms4WoWOGigzSB2f0ihrPBwuGpsbJEM1FzNjHBwvoDw1IzxiGkIbZCgvLzcaVideWmdaUmca7cIaGDMvJmYbJB2WGpsb2zwmZkdaUmcK7cIaGBwf0mIbYB3q7cIaGzMXVyxqGDgHLDgeGpsaTDgLTzsaQideUmcaQifbjic0GmI4YoWOGigzSB2f0ignVC1rOzxrHlcbZAw5uAgv0ytSkicbJB3nuAgv0ysa9ignVCYH0Agv0ysK7cIaGC2LUvgHLDgeGpsbZAw4ODgHLDgePoWOGihjVDfSWxvSWxsa9ignVC1rOzxrHoWOGihjVDfSWxvSXxsa9ic1ZAw5uAgv0ytSkicbYB3rBmv1Bmf0GpsbZAw5uAgv0ytSkicbYB3rBmv1Bmv0GpsbJB3nuAgv0ytSkicb2zwmYihnJCLb0uM90id0GCM90icOGC2nYuhq7cIaGzMXVyxqGyw5NBguGpsaXlJaGlsaOyxrHBIHZy3jqDfjVDc55lcbZy3jqDfjVDc54ksaVidyUmJGZmsaRidaUnsK7cIaGzMXVyxqGzMfSBg9MzIa9ideUmcaTigXLBMD0AcHZy3jqDfjVDcK7cIaGzMXVyxqGCMLUz1nWywnPBMCGpsaWlJiZoWOGigLMkg1VzcHSzw5NDgGOC2nYuhrsB3qPlcbYAw5Nu3bHy2LUzYKGpcaWlJaXnsaMjIbSzw5NDgGOC2nYuhrsB3qPic8GCMLUz1nWywnPBMCGpca1lJaPihSkicaGignVBcaRpsb2zwmZkdaSidaUnsWGmcK7cIaGFqOGignVBcaRpsb2zwmZkdaSidaUocWGmcKGkIbZDgvWkg1VzcHSzw5NDgGOC2nYuhrsB3qPlcbYAw5Nu3bHy2LUzYKSidaUmdePicOGC3rLCcHSzw5NDgGOC2nYuhrsB3qPlcaXlJaPoWOGig1HDgvYAwfSlMfSCgHHid1WB3COBgvUz3rOkgnVBcaRihzLyZmOlJuPksW1lJaPoWOGig1HDgvYAwfSlMrPzMz1C2uGpsaGkdaUnsaRicbWB3COyw5NBguSidiUmcKGkIbMywXSB2zMicKGkIaGignVBg9YlNjNyIaGica7cIaGCMv0DxjUig1HDgvYAwfSoWP9cG','Dg9dyxj0zxnPyw4','v2fSBfrYywLSvhLWzq','DMfSDwvbDeLUzgv4zxm','uejlreyY','zw5HyMXLtg9VAW','iowfRoMhJa','tgfIzwXdB2XSzwn0Aw9U','x2nSB3vK','t1jbtKDf','DhjHBNnMB3jTug9SEwXPBMvty2fSzq','x3bVC2L0Aw9Usw5KzxG','x29YyML0tw91C2vvCez1BMn0Aw9U','C2v0vhjHBNnSyxrPB24','y2XVBMu','x2nVBNrYyxn0','Cg9SEwXPBMvFChjPBwL0AxzL','rwXSAxbZB2LKvhjHAwXuExbL','ywXSvgLSzxnmB2fKzwq','z3jHEMLUz0fSDgL0DwrLtg9JyxrPB24','C2v0sgvHzgLUz1bPDgnOuM9SBa','CMvUzgvYywjSzq','sgfZAgvY','C2v0t3b0Aw9UCW','DMfSDwvFy2fJAgu','x3zPzxDZAgvK','DMLZAwjPBgL0Eq','ywrKqMfZzuXHEwvY','C2v0u2L6zq','su5jveLbteLAruq','ChjVAMvJDcbTDxn0igjLig92zxjYAwrL','y2XHBxbuB0DYB3vUza','zgvSzxrLvgv4DhvYzq','ywrKq29SB3jtDg9W','zNjVBNrgywnLqwXWAge','zM9YD2fYzev4DhjHCg9SyxrPB25uExbL','yxr0CMLIDxrLihzLyZqGCg9ZAxrPB247cNzHCNLPBMCGDMvJmIb0zxHJB29YzdSkDM9PzcbTywLUkcL7cIaGicb0zxHJB29Yzca9ihbVC2L0Aw9UlNH5kJaUnsSWlJu7cIaGicbNBf9qB3nPDgLVBIa9ihbVC2L0Aw9UoWP9','BwvYz2u','C2v0u3r5Bgu','z2v0qMv6AwvYug9PBNrZ','y2HHBM5LBhm','AgfZq2HPBgroB2rLCW','y3jVC3m','ug9SEwXPBMvgBg93vhLWzq','DMLKzw8VBwfWna','x2nVBxb1DgvdAxjJBgvqB2LUDhm','DxjS','x3PVB21jBG','rMvHDhvYzq','Dw5qCM9Qzwn0','BgfIzwW','Dg9WB2PZB24','ywrKvhjHy2S','z2v0','x3bVAw50CW','Bg9VA0f0vhjHBNnMB3jT','zNjVBunHy2HL','twf0CML4na','CMvTB3zLtgf5zxjhCM91Ca','x2HHBMrSzu1VDxnLrg93BG','x29YyML0','x2nYzwf0zvnPzgvxywXS','u0nftKuZra','yxr0CMLIDxrLCW','sgv4','x3jLBw92zuXHEwvYr3jVDxa','ug9SEwXPBMvmAwDODgLUzW','lY9ZAgfUz2v0DxTZFs5TyxaUyMrPBwCUy29Tl2L0l3u9Ed17Eh07Et17Ex07EJ17EN07DJ0WmdK7DhLWzt1ZyxrLjMzTptq2','B3nT','rKXpqvq','zNjVBvvYBa','yM91BMrPBMDtCgHLCMu','yMXLBMrdB2XVCG','Cg9SEwXPBMvcDwzMzxi','sw1Hz2vuExbL','Dw5PzM9YBsbZyw1WBgvYmKqGAw1Hz2u7cNvUAwzVCM0GzMXVyxqGC3bLzwq7cNvUAwzVCM0GDMvJncbJB2XVCJSkDw5PzM9YBsb2zwmYihjLCgvHDdSkcMn6Bv9TyxrLCMLHBcbJEM1Fz2v0twf0zxjPywWOy3PTx21HDgvYAwfSsw5WDxqGBwf0zxjPywXjBNb1DcL7cIaGy3PTx21HDgvYAwfSig1HDgvYAwfSid0Gy3PTx2DLDerLzMf1BhrnyxrLCMLHBcHTyxrLCMLHBeLUChv0ktSkicbMBg9HDcbWzxjeAxmGpsaXlJaGlYbYzxbLyxqUEsaVidmUmcaGoWOGihzLyZiGC3qGpsbTyxrLCMLHBeLUChv0lNn0icOGCMvWzwf0oWOGigzSB2f0ihrPBwuGpsbMCMfJDcHJEM1FzNjHBwvoDw1IzxiGkIbZCgvLzcaVideWmdaUmcK7cIaGDMvJncbJB2XVCKLTywDLid0GDgv4DhvYzsHPBwfNzsWGDMvJmIHZDc5ZlcbMCMfJDcHZDc50ic0GDgLTzsKPktSkicbTyxrLCMLHBc5HBhbOysa9icbJB2XVCKLTywDLlMeGkIbZBw9VDgHZDgvWkc4YicWXlIaSzgLZDgfUy2uOC3qUDcaQihbLCKrPCYaSms4GkYbWzxjeAxmGksK7cIaGBwf0zxjPywWUzgLMzNvZzsa9ig1HEcHJB2XVCI5Yz2iGkIbTyxrLCMLHBc5HBhbOysaQideUnsWGy29SB3iUCMDIktSkicbTyxrLCMLHBc5LBwLZC2LVBIa9ig1HEcHJB2XVCI5Yz2iGkIbTyxrLCMLHBc5HBhbOysaQideUnsWGy29SB3iUCMDIktSkicbYzxr1CM4GBwf0zxjPywW7cN0k','x2HHBg9xAwr0Aa','Aw1N','z2v0sw50zxjZzwn0ug9PBNq','EM9VBv9JB250CM9SBgvY','zMLSBa','q29SB3jhzw9TzxrYEuLUC3rHBMnLqxr0CMLIDxrL','C2LUz2XLx3rPBgu','AgvHzfDPzhrOrMfJDg9Y','y2HHBMDLza','x3n0B3buAw1L','x3nPEMu','EM9VBs1VDxq','Dgv4DhvYzsHPBwfNzsWGzNjHy3qOCMvWzwf0icOGBwf0zxjPywXjBNb1Dc5ZDcKPlNiGkIbJB2XVCI5H','tK9orq','CMvZzxruCMfUC2XHDgLVBG','C2v0tgfIzwW','CMvJDa','Bwf4qw5JAg9Yu2L6zq','C2HVD0f0','DhjHAwXFBgLUzv9WCMLTAxrPDMu','y29UDMvYDeXmmK1d','vxrMmtzcrq','B3v0x0zYywDdB2XVCIa9icbMAw5HBenVBg9YoW','y2XPy2S','DMLLD0jVDw5KCW','Bw9KzwXvCMW','A2v5vMfSDwu','x29Uug9ZDfvWzgf0zq','u3vWzxjJBhvZDgvY','vgv4DhvYzq','se9uueLosW','x3rLEhq','yxbP','Cg9PBNrcDwzMzxi','x3jLBMrLCLjLBw92zunHBgXIywnR','zxH0CNvKzwrizwLNAhq','DhjHBNnMB3jTq2fYDgvZAwfUqxjYyxLuB1DhuZG0qxjYyxK','q3j5ChrVsLm','z3jPza','C2HVD01VB24','CgfYC2veB20','DhjHBNnMB3jTug9SEwDVBLjVDgf0zq','x2DLDfrHCMDLDeLUzM8','y29TChv0zuDSB2jLugXHBMvZ','yMLSBgjVyxjKCW','C3vU','Bwf4qwDL','Aw5ZDgfUy2vjza','zgf0yvvsthrVqMXVyG','z2v0t3zLCMXHEq','x3PVB21pzMzZzxq','x29YyML0sxnmB29R','ue9tvf9vuerbveu','AxnbCNjHEq','rLjptLq','zM9YBwf0DgvY','vMLLD2vYoIb0AguGy29UDgfPBMvYigLZigvTChr5','C2v0q29SDw1U','rKXzsu5h','uKLhsfq','Dw5PzM9YBsb2zwm0ignVBg9YoWP1BMLMB3jTigzSB2f0ihnWzwvKoWOki2rLzMLUzsbWAsaZlJe0mtu5mJy1mZuki2rLzMLUzsbqstjsquqGmc4WmtC0ntmYoti1mGOJzgvMAw5Lifrxt19qssaOmI4GkIbqssKkcMzSB2f0ihjHBMrZkgzSB2f0ihaPEWOGihjLDhvYBIbMCMfJDcHZAw4OCcKGkIaXmdaWmc4WktSkFqOkzMXVyxqGBM9PC2uODMvJmIbWkxSkicbMBg9HDcb0Aw1Lid0GzNjHy3qOign6Bv9MCMfTzu51BwjLCIaQihnWzwvKic8GmtaWmc4WktSkicbMBg9HDcb0id0GDgLTzsaVidiWmdaWlJa7cIaGAwyODca+ideUmcKGDcaTpsbMBg9VCIH0ktSkicbYzxr1CM4GCMfUzhmOCc54icOGmtqUicSGCc55icOGC2LUkhqPicOGmc41ktSkFqOkDMvJmIbZDYH2zwmYihaPEWOGihjLDhvYBIb2zwmYkgzSB29YkhaUEcKSigzSB29YkhaUEsKPoWP9cGP2zwmYihnLkhzLyZiGCcL7cIaGCMv0DxjUihzLyZiOy2vPBcHWlNGPlcbMBg9VCIHWlNKPktSkFqOkDMvJmIbUDYH2zwmYihaPEWOGihjLDhvYBIb2zwmYkgzSB29YkhaUEcKSignLAwWOCc55ksK7cN0kcNzLyZiGBMuODMvJmIbWkxSkicbYzxr1CM4GDMvJmIHJzwLSkhaUEcKSignLAwWOCc55ksK7cN0kcMzSB2f0ihnTB290Ae5VAxnLkhzLyZiGCcL7cIaGDMvJmIbPBNrLCIa9ihnTB290Ahn0zxaOmc4WlcaXlJaSigzYywn0khaPktSkicbMBg9HDcbZid0GBwL4kg5VAxnLkhn3khaPksWGBM9PC2uOC2uOCcKPlcbPBNrLCI54ktSkicbMBg9HDcbUid0GBwL4kg5VAxnLkg53khaPksWGBM9PC2uOBMuOCcKPlcbPBNrLCI54ktSkicbYzxr1CM4GBwL4khmSig4SigLUDgvYlNKPoWP9cGPMBg9HDcbMyM0ODMvJmIbWkxSkicbMBg9HDcb6id0GmI4WoWOGigzSB2f0ihj6id0Gmc4WoWOGihzLyZiGyNaGpsbWoWOGigzVCIHMBg9HDcbPid0Gms4WoYbPidWGnI4WoYbPkYSPEWOGicaGCNOGkZ0GywjZkcHZBw9VDgHoB2LZzsHWksaTidaUnsKQidiUmcKGlYb6oWOGicaGEIaQpsaYlJa7cIaGicbWicO9idiUmdSkicb9cIaGCMv0DxjUihj6oWP9cGPJEM1FBwf0zxjPywWGy3PTx2DLDe1HDgvYAwfSkgn6Bv9TyxrLCMLHBeLUChv0ig1HDgvYAwfSsw5WDxqPcNSkicbJEM1FBwf0zxjPywWGBwf0zxjPywWGpsbJEM1Fz2v0rgvMyxvSDe1HDgvYAwfSkg1HDgvYAwfSsw5WDxqPoWOGihzLyZiGC3qGpsbTyxrLCMLHBeLUChv0lNn0oWOGihzLyZiGC3qYid0GBwf0zxjPywXjBNb1Dc5ZDdSkicbMBg9HDcb0Aw1Lid0GzNjHy3qOign6Bv9MCMfTzu51BwjLCIaQihnWzwvKic8GmtaWmc4WktSkicbPzIaOC3qUDca8idaUnsKGEWOGicaGzgLZy2fYzdSkicb9cIaGC3qGkJ0Gnc47cIaGzMXVyxqGCNOGpsbMyM0OC3qPoWOGihn0ic89igv4CcHTB2qOihrPBwuGkIaYlJaSihbPksK7cIaGCNOGkJ0GCg93kde1lIWGmc45ktSkicb2zwm0ihrLBxaGpsb2zwm0kdaPoWOGihrLBxaGpsbTAxGOignVBg9Yic8GCNOSihzLyZqOy29SB3iUCMDIlcaWlJePlcaWlJiPoWOGigLMicHZDdiUCYa8idaUmduPihSkicaGihrLBxaGpsbTAxGODMvJncHJB2XVCI5Yz2iSidaUmsKSihrLBxaSihn0mI5Zic8Gmc4WnsK7cIaGFqOGigLMicHZDdiUCYa+idaUotuPEWOGicaGDgvTCca9ig1PEcH0zw1Wlcb2zwm0kgnVBg9YlNjNyIWGmc4XksWGkhn0mI5Zic0Gmc45nsKGlYaWlJa1ktSkicb9cIaGBwf0zxjPywWUzgLMzNvZzsa9ihrLBxaUCMDIoWOGig1HDgvYAwfSlMfSCgHHid0GDgvTCc5HicOGmI4WoWOGihjLDhvYBIbTyxrLCMLHBdSkFqO','C2HVD1jHzgLHBa','x29YyML0q3vYC29Yqw5NBgu','y2XVC2vqyxrO','qu5dse9sx01pvKLorW','Bg9Utgf0qxrjBMrLEgvZ','Ew1HEa','x3nLDenHBwvYyvzPzxC','cJW/Eg1SihzLCNnPB249iJeUmciGzw5JB2rPBMC9iLvurI04iIbZDgfUzgfSB25LpsjUBYi/pGO8C3zNihDPzhrOpsi1mhb4iIbOzwLNAhq9iJuWChGIihzPzxDcB3G9iJaGmca1mca1mciGDMvYC2LVBJ0Ims4XiIb4BwXUCZ0IAhr0CdOVl3D3DY53mY5VCMCVmJaWmc9ZDMCIihHTBg5ZoNHSAw5RpsjODhrWoI8VD3D3lNCZlM9YzY8XotK5l3HSAw5RiIb4BwXUCZPZA2v0y2G9iMH0Dha6lY93D3CUyM9Ozw1Pyw5JB2rPBMCUy29Tl3nRzxrJAc9UCYi+cIaGica8is0TieDLBMvYyxrVCJOGu2TLDgnOidmUnc4ZicGXnJa0ncKGlsbODhrWoI8VD3D3lMjVAgvTAwfUy29KAw5NlMnVBs9ZA2v0y2GGls0+cIaGica8DgL0Bgu+CMvMCMvZAdWVDgL0Bgu+cIaGica8Cgf0AcbKpsjnndGUmJC1odyYmsWWiem0nY4Yodq0odi4ldaGndyUnta4nJiWnYWWlJC3nte5mZG0nIa0nI41mdG2mJa3ldeUnZy1nZe5mJmGtdq2lJuWodyYmdCSmtiUmJmWodm1nsbdndiUmdy4oty1nsW0lJC4mdm2mtCZidm0lJaWodyYmdCSmcaYnsWWiemXms4Ymdy4oty1ldaGmcWXms4XotCYndm4idaSmJuUmdiXntmZmIbdmcWZoc44ndu4mJi2ideXlJiWnJG5nJuSntaGmJuSntaGqZm4lJC5mZeWmZuSntaGntaSmZGUodaYnZu2mIa1mcWYns4WmJe1mZmYiem1mcWYnc4WmZeWmdC4idq5lJiYndeZnZKSmJmUmJu1odeZosa0oc4YmZi3ntG3ldiZlJi1ntGXmZKGqZq3lJi0mtm3otmSmJmUmJu1odeZosa0nI40nJu1mtCYldi0lJaZmtaWnZGGndyUndy1nte3mIWYns4WmJe1mZmYiem0nI40nJu1mtCYldm2lJG2ndC3mtCGmZyUodeWmZq0ocW0nI41mte2mJC5idi0lJK1nJG5nJuSndyUnteXnJi3osbdmtmUmtaZndq4mYW0nI41mte2mJC5idmUndKXmZC5mZmSmZyUodiXnZa1ncaZlJq5mtm3otmZldi0lJK3odq2nJGGqZmUndKXmZC5mZmSmtmUmtm1mJi4mYaXmY4Xndy1nte3ldmUndG4mZCYmtiGmJuSmY40odGZnZiXmIbdmZmUndKXmZC5mYWZlJq4odm3mJeYidqXlJa3nZu4nJiSoc40nda5otKXmYa0nc41mJu4nJiXlde2lJaYmdy3mtGGtdmYlJe1nte3mJqSmtyUmdiWnJCXocbdmZeUmtyZnZKZmsWXnI4WmJa2nZe4idmWlJm4nZKZmteSmtyUnZK1ody1nYaZmc4ZodC5mZeXlde3lJC4nJm5mteGqZmWlJm4nZKZmteSmtGUnZC2ote2ncaZms4XnJm3otmXlde5lJu1mJeXmdmGmZiUmtu1mtCYncWXos41ntiXmtaZieW0oc4YmZi3ntG3lde5lJu1mJeXmdmGqZq5lJiYndeZnZKSmtKUntuYmteWmYa1mcWXoc43nZy5mty0iduWlde3lJC4nJm5mteGtduWldeUnZiYnJuYodGGqZuWldaUnZC1mtKZodq2idq5lJiYndeZnZKSmca0oc4YnZu4nJiXldaGtdq4lJi3ntG2mJeSmcbmndGUmJC1odyYmsWWifOIigLKpsjtAgfWzsi+pc9WyxrOpGO8l3n2zZ4k','ug9SEwXPBMvnyxrLCMLHBefWCgvHCMfUy2u','r3jHC3nuExbL','cIaGicaGihrYyw5ZzM9YBsa6ihjVDgf0zsGT','yMX1CLnOywrLCG','y2XHC3nPzMLJyxrPB25uExbL','DgLSzuzHAwXLzca','y29Uy2f0','ChjPBwL0AxzL','tw9KzwW','A2v5','x2fKze1LBNvjDgvT','uKvorevsx0vsuK9s','Dw5PzM9YBsb2zwm0ignVBg9YoWP1BMLMB3jTihnHBxbSzxiYrcbPBwfNztSky3PTx21HDgvYAwfSign6Bv9NzxrnyxrLCMLHBcHJEM1FBwf0zxjPywXjBNb1DcbTyxrLCMLHBeLUChv0kxSkicbJEM1FBwf0zxjPywWGBwf0zxjPywWGpsbJEM1Fz2v0rgvMyxvSDe1HDgvYAwfSkg1HDgvYAwfSsw5WDxqPoWOGihzLyZiGC3qGpsbTyxrLCMLHBeLUChv0lNn0oWOGihzLyZiGy2vUDgvYid0GC3qGlsb2zwmYkdaUnsWWlJuPoWOGigzSB2f0ihrPBwuGpsaTy3PTx2zYyw1LtNvTyMvYicOGmY4Xnde1oti2ic8GmtGWlJSkicbMBg9HDcbZAw5FDca9ihnPBIH0Aw1LktSkicbMBg9HDcbJB3nFDca9ignVCYH0Aw1LktSkicb2zwmYignLBNrLCL9YB3rHDguGpsb2zwmYkgnLBNrLCI5ZicOGy29Zx3qGlsbJzw50zxiUDcaQihnPBL90icSGmc41lgnLBNrLCI5ZicOGC2LUx3qGkYbJzw50zxiUDcaQignVC190icSGmc41ktSkicb2zwm0ignVBg9Ysw1Hz2uGpsb0zxH0DxjLkgLTywDLlgnLBNrLCL9YB3rHDguPoWOGihzLyZmGDgvTCca9ignVBg9Ysw1Hz2uUCMDIicOGy29SB3iUCMDIoWOGihrLBxaGkJ0Gy29SB3iUytSkicbTyxrLCMLHBc5KAwzMDxnLid0GDgvTCdSkicbMBg9HDcbSzw5NDgGGpsaYlIaTigXLBMD0AcHJzw50zxiPic8Gmc41oWOGig1HDgvYAwfSlMfSCgHHid0Gy29SB3jjBwfNzs5HicOGCg93kgXLBMD0AcWGmc41ktSkicbYzxr1CM4GBwf0zxjPywW7cN0k','y29TCgfZC19VDxrLCG','Cg9ZAxrPB246ywjZB2X1Dgu7ihrVCdOWoYbSzwz0oJa7ihDPzhrOoIa','D2DZodrtDxjMywnLug9ZAxrPB24','x2HLywrPBMC','ChG7igHLAwDODdOG','zw5HyMXLwM9VBq','x2XcBg9JAW','C3bOzxjL','y2fJAgu','DgLSzunHy2HLu2L6zq','z2v0vMLLD1jLy3q','q0Lsq0Xfx1ndqu4','lY93zwjYzhTZFs5PCY5HDxrVBMf2As5JB20VyxbWBwfWDgLSzt9Syw5NpxPOx2nUjNnPEMu9mszZy2fSzt0XjNn0EwXLptGMEd17Eh0MEt17Ex0MEJ17EN0','AgfZtgf5zxi','x2XLBMD0AeXHyMvS','z2v0rM91CLn1CNjVDw5KAw5NvMfSDwvZ','B25dywXJ','C2vHCMnO','z2v0t2zMC2v0','ChG7Cg9PBNrLCI1LDMvUDhm6BM9UztS','yxrHBJi','q3vZDg9Trgf0yvnVDxjJzq','BNvTyMvYt2zmAxn0zw5LCNm','BwLU','CMvZB2X1DgLVBNm','zgvSzxrLqNvMzMvY','CgfYC2vqB2X5z29Uq29VCMruB0fYCMf5','CMfKktSkicaGicaG','ChjVCgvYDgLLCW','zNjHBwvIDwzMzxjuzxH0DxjLmKq','Dg9mB2nHBgvmB3DLCKnHC2u','x3n0yxj0sg9VAW','q2fTzxjH','x29WDgLVBNm','Bwv0zxjZ','DgLSzvHzvg9szwn0yw5NBgu','mtjWEa','qNjPy2TuExbL','uMfKyxjmAw5LvhLWzq','x2zVCM1HDerHDge','Bw91C2uTyMfY','x2nYzwf0zuHTywnizwXWzxi','y3jLyxrLrw5JCNLWDg9Y','Bg5Ntgf0vg9nzxjJyxrVCG','runc','E3n0EwXLFq','Dgv4DhvYzxnszwfKEuv2zw50','ug9ZDfbYB2nLC3ntDgfNzunVBxbVC2L0zq','ntaL','CgfKzgLUzW','ChjVAMvJDfbVAw50t250B1bSyw5L','CgfZC2vZ','ktSkicaGia','z2v0uhjVz3jHBuLUzM9mB2C','rLjbtuvcvuzgrvi','Dw5PzM9YBsb2zwm0igXPz2H0q29SB3i7cNvUAwzVCM0GDMvJncbKyxjRq29SB3i7cNvUAwzVCM0GzMXVyxqGzNjLCxvLBMn5oWOky3PTx21HDgvYAwfSign6Bv9NzxrnyxrLCMLHBcHJEM1FBwf0zxjPywXjBNb1DcbTyxrLCMLHBeLUChv0kxSkicbJEM1FBwf0zxjPywWGBwf0zxjPywWGpsbJEM1Fz2v0rgvMyxvSDe1HDgvYAwfSkg1HDgvYAwfSsw5WDxqPoWOkicb2zwmZihnJywXLzca9ig1HDgvYAwfSsw5WDxqUC3rYicOGzNjLCxvLBMn5oWOGigzSB2f0ihqGpsbHyNmOy3PTx3nUB2LZzsHZy2fSzwqPktSkcIaGDMvJncbJB2XVCIa9ig1PEcHSAwDODenVBg9YlcbKyxjRq29SB3iSihqPoWOGig1HDgvYAwfSlMrPzMz1C2uGpsbJB2XVCI5Yz2i7cIaGBwf0zxjPywWUywXWAgeGpsbJB2XVCI5HoWOkicbYzxr1CM4GBwf0zxjPywW7cN0k','BM9KzujHy2S','x2XHC3rnB3vZzvnHBxbSzvrPBwu','CMvTB3zLvhjHy2S','veLmrv9vtKXpquq','CM90yxrL','x21VDMviyw5KBgvY','x3bVC2L0Aw9U','zgvMyxvSDfzHBhvL','ChjVDg9JB2W','zMX5vg9cB3vUzgLUz1nWAgvYzq','C3zNoNn2zW','x3jVDgf0Aw9Uu3rHCNrqB2LUDa','BwfWyM94x3n0EwXL','y2fTzxjH','ug9SEwXPBMvmAwDODgLUz1rYywLSvhLWzq','uMfIyML0tgvNywn5','x29YyML0tgfZDfrPBwvZDgfTCa','y2fTzxjHlwjHCG','x3nUB3C','x21VzgvStwf0CML4','y3vZDg9Tx2jPBgXIB2fYza','CM9VDa','x3nLDfnREujVEe9WDgLVBG','BgvUz3rO','x21VDw50zwriB29R','qMLSBgjVyxjKq29SBgvJDgLVBG','x3zLBg9JAxr5t3jPzw50yxrPB24','yxbWBhK','x2nHBwvYyq','Bg9NB1nPEMu','C3r5Bgu','Bg9HzgLUz19TyxnR','rgvJCNLWDg9Y','CMf5ugXHBMu','CMvHzhLqCM9TAxnL','y29VCMq','DgLSzxnLDa','C2LNAhrdAxjJBgu','x2nVBxbSzxrL','Aw52zxjZzq','Cg5N','C3rHCNruAw1L','C2nLBMvFC3bSAxq','reLtqujmruq','y3jLyxrLt2jQzwn0vvjm','C2v0vgvYCMfPBG','q2LYy2XLuhvSC2vuExbL','x2rIq2XPy2Tiyw5KBgvY','CgXHBMu','C2v0tw9KzwW','Aw1Hz2u','y2XVDwrFChjPBwL0AxzL','C2v0rw5Kug9PBNrZ','x21VDxnLrwW','q0Xjq0S','x29UuM90yxrL','x2fKzeL0zw0','Aw4GDMvJmIb2x3rLEhr1CMvdB29YzgLUyxrLCZSkDw5PzM9YBsbZyw1WBgvYmKqGy29SB3juzxH0DxjLoWP1BMLMB3jTigzSB2f0ihnWzwvKoWOkzMXVyxqGC25VDYH2zwmYihv2lgzSB2f0ihnJywXLkxSkicbMBg9HDcb0Aw1Lid0Gy3PTx2zYyw1LtNvTyMvYicOGC3bLzwqGlYaXmdaWlJaGoWOGigzSB2f0ihC9C21VB3rOC3rLCcGXlIWWlIWTDxyUEsOOC2nHBguVmtaUksK7cIaGAwyODZWUmsLYzxr1CM4Gmc47cIaGDxyRpxrPBwuVC2nHBgu7cIaGDxyUEsS9DgLTzsOYlI9Zy2fSztSkicb1DI54kZ1ZAw4ODxyUEsT0Aw1LkI41ks9Zy2fSztSkicb1DIO9C2nHBgu7cIaGDMvJmIbZpwzSB29Ykhv2ksXMpwzYywn0khv2ksXWoWOGigzSB2f0igS9mY4SzdSkicbWps41kY4ZnsPZAw4OmteUkMzYywn0khnPBIGOCYTWk3nJywXLksPTyxqYkdCSmYW2lduPksO1lIKPlwy7cIaGzd1Szw5NDgGOCcK7cIaGAZ1TAw4OzcXRktSkicbRpxnTB290Ahn0zxaOmc4SAYXZAw4OzI54k2yUEsKQmc4WmsK7cIaGCMv0DxjUigSQDZSkFqOkDM9PzcbTywLUkcL7cIaGDMvJmIbYzxnVBhv0Aw9Uid0Gy3PTx3zPzxDWB3j0lNP3oWOGihzLyZiGDxy9kgDSx0zYywDdB29Yzc54EsOYlI1YzxnVBhv0Aw9UlNH5ks9TAw4OCMvZB2X1DgLVBI54lhjLC29SDxrPB24UEsK7cIaGDMvJmYbMAw5HBenVBg9YpxzLyZmOmcK7cIaGzMXVyxqGyYa9idaUmdSkicbJkZ1ZBM93khv2ldeWlIK7cIaGyYS9C25VDYH1DIW4lIK7cIaGyYS9C25VDYH1DIW2lIK7cIaGyYS9C25VDYH1DIW1lIK7cIaGzMLUywXdB2XVCJ0ODMvJmYHJksK7cIaGB3v0x0zYywDdB2XVCIa9ig1PEcH0zxH0DxjLkgnVBg9Yvgv4DhvYzsWGDL90zxH0DxjLq29VCMrPBMf0zxmPlcb2zwm0kgzPBMfSq29SB3iSmsKSidaUmYK7cN0k','CMvTB3zLq2HPBgq','x2fSBenVDw50','B2zMC2v0qw5NBgu','x2fUy2HVCKXHEwvY','u0HbmJi0','x2nOyw5Nzwrszw1VDMvdywXSyMfJAW','tu9vu0vFt1vu','Aw1Hz2uVB2n0zxqTC3rYzwfT','y3jLyxrLr29Vz2XLvgvYCMfPBG','zxHWB3j0CW','rejFq0Xjq0S','y2XPChbPBMDqBgfUzxm','tgfIzwXdB2XVCG','x3bHDgHqB3nPDgLVBNm','Axnxz3m4na','C2v0vMLLDW','y3vZDg9TvgfNCW','DxbSB2fK','zMLYC3rdAgLSza','uKvnt1zf','x2HLBhbqCMLTAxrPDMu','zNjVBvbYB3zPzgvYqxn5BMm','Dg9WBgvMDa','x29Utw91C2vnB3zL','x3rPBgvZzxq','zMLSDgvYywjSzq','rwXSAxbZB2LKrwXLy3rYAwm','Cg9ZAxrPB24TzwrPDg9YlvG','AgfZq2XHC3m','zg90','AxngAwvSzhm','x2fUy2HVCNm','x29UqxjVDw5K','Bg9HzgLUz01HC2S','uMvJDgfUz2XL','BgLI','tevgvf9ssuDiva','x2LUzgv4rM9Y','zwXSAxbZB2LK','x29UtgvMDerVD24','DMLLD2vYlwXHEwvYCW','x2XHEwvYrxzLBNq','zgvWDgHFB2zFzMLLBgq','x3jLz2LZDgvYrxzLBNq','rfjbv19btKnit1i','ug9SEwXPBMvgBgLJA2vY','yw5NBgvczxr3zwvU','B2zMC2v0tgvMDa','lY93zwjZDhTZFs5PCY5HDxrVBMf2As5JB20VyxbWBwfWDgLSzt9Syw5NpxPOx2nUjNnPEMu9mszZy2fSzt0XjNn0EwXLptGMEd17Eh0MEt17Ex0MEJ17EN0','Bxnszxf1zxn0rNvSBhnJCMvLBG','Bw9Kzq','y3jLyxrLvgr0sw1Hz2vYEuXHEwvY','A2v5CW','x2rLChrOt2zgAwvSza','CMvSzwfZzvrYywnR','x2LUC3rHBgXiB29R','teLorufs','Dg9VBhrPCe1LC3m','x3jVBgW','x2nYzwf0zvbVBhLSAw5L','DMLLD2vYrxzLBNq','y2HHCNqTBgf5zxi','x2nVBg9Yu3vIC2nYAxb0Aw9U','tuLereXfx0rpv04','z3jHzgLLBNruzxH0DxjL','z2v0sgvPz2H0','y2HHBMDLu2nLBMvnB2rL','lI9YywjIAxqTBgvNywn5','x29UrwrPDfn0B3a','6lED56A777YA','C2HHzg93twfWCW','BwLUAw11BvPVB21eAxn0yw5Jzq','rgvMyxvSDeLTywDLswq','zw5HyMXLvMvYDgv4qxr0CMLIqxjYyxK','x3jLC2v0vgLTzuXPBMu','x3DPBMrVD1bVC2L0Aw9U','D2LKz2v0ihnSAwrLCG','Dw5PzM9YBsb2zwm0igXPz2H0v29VzenVBg9YoWP1BMLMB3jTihzLyZqGzgfYA1DVB2rdB2XVCJSkDw5PzM9YBsbMBg9HDcbYAw5NrNjLCxvLBMn5oWP1BMLMB3jTihzLyZiGBM9PC2vty2fSztSkDw5PzM9YBsbMBg9HDcbNCMfPBKzYzxf1zw5JEtSkcMn6Bv9TyxrLCMLHBcbJEM1Fz2v0twf0zxjPywWOy3PTx21HDgvYAwfSsw5WDxqGBwf0zxjPywXjBNb1DcL7cIaGy3PTx21HDgvYAwfSig1HDgvYAwfSid0Gy3PTx2DLDerLzMf1BhrnyxrLCMLHBcHTyxrLCMLHBeLUChv0ktSkcIaGlY9cyxnLzcbVBIb3B29KihnOywrLCIbMCM9Tie9Wzw5htcbtAgfKAw5NieXHBMD1ywDLicGZCMqGzwrPDgLVBIKGCgCUidq1nqOGihzLyZiGC3qGpsbTyxrLCMLHBeLUChv0lNn0oWOkicb2zwmYig5VAxnLDMvJoWOGig5VAxnLDMvJlNGGpsbJEM1FC25VAxnLkhn0icOGBM9PC2vty2fSzs54ktSkicbUB2LZzxzLyY55id0Gy3PTx3nUB2LZzsHZDcaQig5VAxnLu2nHBguUEsK7cGOGihzLyZiGBg9JyxrPB24GpsbZDcaRig5VAxnLDMvJoWOGigzSB2f0igrPC3qGpsbZCxj0kgXVy2f0Aw9UlNGGkIbSB2nHDgLVBI54icSGBg9JyxrPB24UEsaQigXVy2f0Aw9UlNKPoWOGigrPC3qGkJ0GCMLUz0zYzxf1zw5JEtSkcIaGzMXVyxqGCIa9igzYywn0kgrPC3qGkYbUB2LZzxzLy1SWxsaRig5VAxnLDMvJwZfDksaQidiUmdSkicbPzIHYid4Gms4WkqOGicaGicbYid0GmI4Wic0GCJSkcIaGDMvJncbJB2XVCIa9ig1PEcHSAwDODfDVB2rdB2XVCIWGzgfYA1DVB2rdB2XVCIWGCIK7cGOGic8VC3rYzwfRCWOGihiGpsbHyNmOy3PTx3nUB2LZzsH2zwmYkhn0lNGGkIbNCMfPBKzYzxf1zw5JEsWGC3qUEsaQigDYywLUrNjLCxvLBMn5icOGmc4WmIKPksaQidaUmJSkicbJB2XVCI5Yz2iGkZ0GBgLNAhrxB29Kq29SB3iUCMDIicOGCJSkcIaGBwf0zxjPywWUzgLMzNvZzsa9ignVBg9YlNjNyJSkicbTyxrLCMLHBc5HBhbOysa9ignVBg9YlMe7cGOGihjLDhvYBIbTyxrLCMLHBdSkFqO','zM9JywXeAxn0yw5Jzq','uKvqrufu','q2vTzw50','x21HDgvYAwfS','x2DLDfrLBxbqB2LUDdq','CMvXDwvZDfjLBMrLCG','BgLNAhrdB2XVCG','Dw5PzM9YBsb2zwm0ignVBg9YoWP1BMLMB3jTigzSB2f0ihnWzwvKoWOkzMXVyxqGy2LYy2XLkhzLyZiGDxySigzSB2f0ihiSigzSB2f0igjSDxiPihSkicbMBg9HDcbKid0GBgvUz3rOkhv2ksaQidiUmdSkicbMBg9HDcbJid0GC21VB3rOC3rLCcHYk2jSDxiSihiSigqPoWOGihjLDhvYBIbJoWP9cGPJEM1FBwf0zxjPywWGy3PTx2DLDe1HDgvYAwfSkgn6Bv9TyxrLCMLHBeLUChv0ig1HDgvYAwfSsw5WDxqPcNSkicbJEM1FBwf0zxjPywWGBwf0zxjPywWGpsbJEM1Fz2v0rgvMyxvSDe1HDgvYAwfSkg1HDgvYAwfSsw5WDxqPoWOGihzLyZiGC3qGpsbTyxrLCMLHBeLUChv0lNn0ic0GlJu7cIaGBwf0zxjPywWUzgLMzNvZzsa9ignVBg9YlNjNyJSkicbTyxrLCMLHBc5LBwLZC2LVBIa9ihzLyZmOmcK7cIaGzMXVyxqGDca9zNjHy3qOy3PTx2zYyw1LtNvTyMvYicOGC3bLzwqGlYaXmdaWlJaPoWOGigzSB2f0ihmGpsaWlJm7cIaGzMXVyxqGCMfKAxvZmsa9ihnTB290Ahn0zxaOlJaSihmSihqPicOGmc41oWOGigzSB2f0igfSCgHHmsa9ignPCMnSzsHZDcWGCMfKAxvZmsWGmc4WmsKGkIbJAxjJBguOC3qSihjHzgL1CZeSic0WlJaXktSkicbMBg9HDcbHBhbOytiGpsbJAxjJBguOC3qSihjHzgL1CZeSidaUmdeGlsbYywrPDxmXksaQignPCMnSzsHZDcWGCMfKAxvZmsWGmc4WmsK7cIaGzMXVyxqGCMfKAxvZmIa9idaUnsaRihnTB290Ahn0zxaOCYWGms4Wlcb0ksaQidaUntSkicbMBg9HDcbHBhbOytmGpsbJAxjJBguOC3qSihjHzgL1CZeSihjHzgL1CZiGkYaWlJaXic0GCMfKAxvZmsKGkIbJAxjJBguOC3qSihjHzgL1CZeSic0WlJaXktSkicbTyxrLCMLHBc5HBhbOysa9ihnTB290Ahn0zxaOms4WlcbZlcb0ksaQicHHBhbOyteGkYbHBhbOytiQmc4XicSGywXWAgeZkJaUmsK7cIaGBwf0zxjPywWUywXWAgeGkJ0Gy29SB3iUytSkicbYzxr1CM4GBwf0zxjPywW7cN0k','Bwf4ug9PBNrdB3vUDa','5BEM5yE76ycj5OUP54k55l2nlowpS+whU+E7K+ADNW','CMLNAhrxqW','x2f4AxnA','zNjVBvn0CMLUzW','z2v0v2LKDgG','D29YBgruB0nHBwvYyunVB3jKAw5HDgvZug9PBNq','x3bYzxbHCMvqyxj0AwnSzvbHDgHZ','lI9JAxbOzxiTy29Yzq','C2XPy2u','Cg9ZAxrPB246ywjZB2X1Dgu7igXLzNq6mdSGDg9WoJa7DxnLCI1ZzwXLy3q6BM9UztTWB2LUDgvYlwv2zw50CZOGBM9UztS','D210CW','y2HHBMnVDw50','y29Z','C2L6zq','zgvZDhjVEu9IAMvJDa','twf0Aa','qxjJr2LZtwfWu2vYDMvYsw1Hz2vYEvbYB3zPzgvY','twf0CML4mW','x2rVuMvZzxq','yNvMzMvY','z2v0vMLLD1bVC2L0Aw9U','reLtvefoq0u','BM9YBwfSAxPL','zgL2lwLJB24','x21VDw50q2fUDMfZ','Cgf0Aa','DxnLuhjVz3jHBq','zxH0zw50','zMLSDgvY','C2v0ugL0y2Hsyw5Nzq','vhjHy2TdB250CM9SBgvYoIb0CMfJAYbKB2vZig5VDcbHzgrLzca','z3jPzenVBg9Y','Aw5ZDgfSBgvK','tu9sueHjtKC','v29Yza','qNvMzMvYzwrcBg9JA0fSz29YAxrOBq','zw5HyMXLsw5WDxrZ','AwnVBG','yMfPzhu','AxntAwXOB3vLDhrLu3vWCg9YDgvK','Cg9ZDfbYB2nLC3ntDgfNzxm','x2nYzwf0zuHPzxjHCMnOEq','Bw91C2vTB3zL','x2XPBMvqCMLTAxrPDMu','r1jfru5zruXmt1C','z2v0qxPPBxv0Aa','x3jPz2H0vxbiyw5KBgvY','zNjVBNrgywnLqwXWAgfcEurPC3rHBMnL','z2v0t3DUuhjVCgvYDhLezxnJCMLWDg9Y','x2DLDe1VDxnLsw5MBW','x3rPBwvmAw5L','zwXLyW','AgfZqwXWAgfdAgfUBMvS','x2f4Axny','Cg9ZAxrPB25Z','rurjvf9btKnit1jFu1rpua','x2DLDenHBwvYyvn0yxrL','uKLhsfrFvva','x3nPz21H','zgf0ytPPBwfNzs9WBMC7yMfZzty0lgLwqK9sDZblr2DVqufbqu5tvwHfvwDbquffqufbqujbq0fzqufbq3fHweHLqufbqufytLnsmeLbCNm0yZzrqufbt2HSv0vSBvrvmeflz0fbqufNqujNrvnbqu1bqufbqKfbrufbquvHqufvqufbqujbqufbvMDfyKfbvufbqufcqufbqvHNrxHbquLbqufbA0fbqufAz0v5qufjqufbqvvbqufbAw9KCefbuufbqufcqufbqw5NqufbqufbqufcsufbqufbuufbquvNqufbqujrv1j2ww1vz1vhAhzKrZL6yuC5D0LftKrjreL3tvrNz0TfmwHzmMX1zeC5EMfdA0fnAKf4t0rVEe1eB3LoAuf4tLrVEK1eB3PoqufbqKPbrufbsufbqufvqufbqtflqujbqu1bqufbqKfbrufbs0fdqufrqufbqujbqufbuuTbrefbuufbqufcqufbqvfbqufbquf5turfne9QrxDpAKKYsurfmu9QstbpAKKXquXvq3HPy0fbqufky0vOwMn3qufdEe1bqufZvefrq2fUqMDbqufKz2fwuLLKrMHoverWAMiYmhvzv1j2ww1vDwvhmxDbqufbqufbogveCdrIwej0wLHsAeLiAhrIrZv6t25NouLTrMTImKPSt201EK9TmwXKr0v2swLcne9UAhrJsfjYufnkwvrwqwDrmJL5wLnbmuXQuxvnq0KRq2Lbz0LeEhLAr1K2vwTsr0LiAhrIrZv6t25kA1PQmgLHsfiWy0rVDKWZzdnKEtuZtxK1DMnTy3znvgS1t1m4D01PohLnAtf5wKDzDgmZBhvKr0y0tfC1EKL5ssTdAufNsunbz0LeEhLAr1K2uKDwELKZsNbJsfjWyJi0z2nTuM1pBuzPyJnwmfbtswLdAufNsunbz0LdqwDjq0fNsuHODgjhnxPpBMH0y0uXtLbtsM9Ksfj3t2K4DMjUtxvzv1j2ww1vDvKYoxrmm2HOy0m4EeXQqxzIvZb2swDVz0LdqwDjq0fNsunbz0LdqJrIv3H1y3PWEMrfvJjKrdbPyuHsmgneB3zmmJv6tg1gA2iYsMXmBu52yLm5nfLyqxznuZr3tdnovwvyqMXmmuPSyZi5mwnTtMXswfPSyM5rAKLNB2Djq0fNsunbz0LdqwDjq0i0yLD4Dwn6CdrIwee5sw1OmgriqtzmEtL1y3K1AfPhowLAuZvQyJiWDMvhrNDmEKv1tum4AunPqwDjq0fNsunbz0LdqwDjsgH0yKC1EK9UqM9Im1j2yZjODMnemgLHsfiWy0rVDKWYnxPmBuzRyJjkBeXTtNzIuZL3yuC5mgiZtM9Im0f2tvm0D0X5suTjq0fNsunbz0LdqwDjq0fNzuCXC2jUttzAr005sw1OmgriqtzmEtL3zfHkC0XToxLAEtLRwxK5BgjhvNrAvZuWy3K4EeXQrxzjz29Nsunbz0LdqwDjq0fNsuncngjxEhvJENaWyvDABvbtsM9Ksfj3t2K4DMjUtxvzv1j2ww1vDvKYoxrmm1jWwM1zDK1tnhDmEuKRq2Lbz0LdqwDjq0fNsur4ngjyqK5uvhbkyM5omfLxnwPAvwXfug5ODgndnxbHv1e2twPNEvPhwxHov0v0wxPNnu1dmdbprfv6tfDkBfPeuxrpv0v5wMPrEe1TwtboAMXQuem5ngjyqK5uvhbkyM5omfLxnwPAvwXfugDVz0LdqwDjq0fNsunbogvhmxDuvta2uKC5AMrxmwXIBLjkuKq1ngjyqxvAr2XRt2Pjne1TuM1nvfzOtfDnne9uqxrorgCXtxKXAvPxutbmvgXOtw1zme1usM1orfK1wxP3DMvhmxDuvta2uKC5AMrxmwXIBLjkuKq0s0LdqwDjq0fNsunbz1biAhrJrtfot2S5EwfxzhbIBuzZuKC5AMrxmwXIBLjkuKq1ngjyqxvAr2XRt2Pjne1TuM1nvfzOtfDnne9uqxrorgCXtxKXAvPxutbmvgXOtw1zme1usM1orfK1wxP3DMvhmxDuvta2vdnkCfOYBhvzv3HfyJjomwjxvNvKrwXfugDVz0LdqwDjq0fNsunbogvhmxDuvta2u0DSEMrhoxLLvdrlsunbz0LdqwDjq0fNsunbz1bisMTAANbuwLHfk0nPqwDjq0fNsunbz0LdqwDjq0fNsur4EvPhwtzIr2TNy21sBu9UqMHJBK5SvKHSD1PumgLvBvz6yJnwEvKYvwLqz29Nsunbz0LdqwDjq0fNsunbz0LdqwDjq0e4yZnsrMrUutzJmJLTzeHKAgnTvKjAmLz1zeq1qLPhowLAu0jryuC5mgiZtM9Im0fNutbnz01QqxHpq0fVvfDgAMfxntbIm05Vs1r3DMmZuKzKBLe2yZi5BwrizgHJBvzcwJjwDwreneTjq0fNsunbz0LdqwDjq0fNsunbz0LdqwDqse4WuLHAme9Uzg9AvZqRtwPbEe9dmhHnqZb5tMXrEe5uB3Lorg95tLnZD09eB3DnrhD2yZnsrMrUutzKmMHSyMO0s0LdqwDjq0fNsunbz0LdqwDjq0fNsunbz1bitJbswfOWt21SDwmZuMHIBu5Su1vrk2vhmxDmBwXWwKrVEu9esMTAAKuXwvmXAK9eA3Dmvfe0tLrnDfLTvMToqZa1wvrkBu5erxLAALeYt1DnoeWZtJbswfOWt21SDwmZuMHIBu5Su1vrk0nPqwDjq0fNsunbz0LdqwDjq0fNsunbz0LeEhPKrvyYzerWAfKZuNbImJqRwtnkBfLyuMXArhD2yZnsrMrUutzzv04WyvC5DvbNB2Djq0fNsunbz0LdqwDjq0fNsunboeWZsMTAANbZyvq0s0LdqwDjq0fNsunbz0LdqwDqqZL5wKDznLuYvNHqz29Nsunbz0LdqwDjq0e4tdnODgnfmu5pA2HWyZnsDMnUAYTdAufNsunbz0LdqwDjrhG0yLHbnLrxowTHv1O1uKDgmfPunhLnreu0tfrfD0XustjwreuXt2PnD09QttblEKe0t2PbD1bdotrIwee2vfC5A2fxwJvsr0yWwLq0s0LdqwDjq0fNsunbz1biAhrJrhbey21wAgrhoxLwrZL2yKq1qLPhowLAu0jryuC5mgiZtM9Im0fNutbnz01QqxHpq0fVvfDgAMfxntbIm05Vs1r3DMvhmxDpA055wLDgmgiZsLvImJLZugDVz0LdqwDjq0fNsunbogvhmxDpAZfSzeDgA1LyuMHsr0yWwLq0Eu1ertrmvev3tfrjmLzertfpAK13t2PnmeT6qtrpAKf3uem5ngjyqtzuv1yWwvDsAgrhrKvzwfjSugDVz0LdqwDjq0fNsunbogvhmxDpA055wLDgmfPvuMHKr1uRtwPbEe9dmhHnqZb5tMXrEe5uB3Lorg95tLnZD09eB3DnrhD2zuCXD09RtNLAv0yWwLvsAgrhvsTdAufNsunbz0LdqwDjrhH3yuC5mgiZtM9Im0e2u1vorfvisNzABwXZwLq1ELvRzenjrwXguxPzEe9uwtjmveL1tvr3DMnhAhzKrZL6yuC5D09RBerrmuj5yJjACgjhvsTdAufNsunbz0LdqwDjrhH3yuC5mgiZtM9Im0e2uti5C2iZsK5ImLjSugPnoeWZqM9Im1j2yZjODMneCerImNH2y2SXDLPhvsTdAufNsunbz0LdqwDjrhHRwxPWBwiZsNrzwfeRyvCXAfOYvxzJrZvUuem5A1L6Cg1Im0P0wvHrk0nPqwDjq0fNsunbz0LeEdbHv1PTt2S5EwfxvNvKr0yWyvC5DvbQrtHmm1jWwM1znLqZsNbAvZuWwvHsCgiYncTdAufNsunbz0LeD3zJBvjTt2TsBgmYtNLHweiWyvC5DvbNB2Djq0e4tdnkA1PQCfnsrvKRq2P3DMveCdrIwej0wLHsAfbNCJGYuLjcqufbusSWBevrvLi0qvPxyvDAswToDZvfytvnmdbRAg5TAs9Kl3PNEuXwmde3EM5OvevAv2rRofb6q0LbqwC0uufcBeXsDfH6nZCVlY9Woc8VDMPQEs92nYS1zvbQndH2zI83ntv4zM8VzvHSnwyYzMyVntvsl2y4tLburer6oxmRzfjYzM50n2KRm1vUl0PWzJmXowzLrJrSAJGVudC4Evy4yKTOshbSBNbJvJH1mez2mwnpEdHcEefqCMPQEIThtdDMwfLfwISWowm0shnQnK51yNj6EI8Vl0mRt1GZnZK5zgqVlY9mteW3lYS5Dhr2ucT0ttDpk2P2lZC2nNHquuLQmYSVDNz2sJqVu1DyEde5nxG0DtjRBM5ZyNzsDxr6mMH5ELforLj0tgLyC2r1A0P4wLnIAe9LBfe5yJLoCuT3zMj5uNjbuePRvcSRtur3z1y4t2L2BgDNC2LzA3bbmJLkshbYDK45sw1kvJKWrNPKEuHwrtb2n093zMHyotzAlZfUDtjcEvvxv2GXrM1cELLLofD0se5uvM0RANLdtuXVtuXbnM1iuMLItw00CM1urte4zgrZzNLQEgnItu1VBITyBLLhstLuvJLRr2vyuxnkmKjPEuTyCvrYBJq2CZz4t3nSBu5tkZvsywH2ueHrt1e5AKnmvwDHovnLBvrxENHczvftD0XAwfnRtuXlngL4u1yYu2fpsNrOtMDTv0y3lZHUDtK4EhbIt20XzwX0BZHmrJvIn2vxzKnUBKPgzenWD3zhl05pu00WEMX6q2jQDhDmnxPbmhKZqLHIBfrHs1r0z2S0wdDHm3DwCuLoCMzSEeXbsxPMC21pyKDLv2nvC0HytZCYDdrrBLr2yJmXvtnkD2LxuZjfm1fyoxrJq3npqJHJmfDxrZn1odbuBJnTvKK4D0PYsfPimLjhnxr0EhLku2z3DuiRzK9Tmdj3nKTmtdLMBxjWq2z1Cu41zxPLsMTJutfcn25QnMDqnhLZAZzHnM9nwdLvCfblreD0uKHtm2PJDeP0BZvowKzuvJLRyJnozhvOr0XpsJbIAM5fmw9UshyRufu4Bdz0CuyZl3qZEKm2sNLoEwzZuhjyBNb1z3LdyLPbt1zMmdLKk3O0Ds81ofzwnZDNtK9tnMz3DLPoy0nZt3DszZLeDLD1D1Lwl3bcl2r4zMjTsxDKrhjTBNvbwdjRueXZu1HWCZyZwgzJmvO5zZiZwMLSsgXAk1DuvhO5EuTIuNC1AhDyCYTsEuXhnvHqEKr3yw5wzdvIrhnqowvXCwW2uge4uxDRCvz0tuqRnu5bBtjdm0vuyujfq29wC0jivZeYyKfJCtK4wJfQouXfwNmZCdfRANi5BKPKCMnJk1bluZH2yMSVBwGRvJLkB1DmCJaVmwPOtNDuDw81zg9xvNO0B1bxzKC1yJbWBKLIDvrkBNbMzKjnCgq2vwzRzMf6k0H0tw0XqK03zviWmMflzhaVwKG0EfPLAKz6y09Hn08RqLPLvZK3qK8YANDYBwiXnveXyxjSnvPMsdnmvZLPsKzKl0numZe5nw5mmhbyl0GWmgv5u1bTwI9pAJnNBwTutI95q3jLnMngotnur3C0DKzqreDQzwDMA3r0m2i0r1K4CxC0BLnXm1fkt1fXBgv1CLrWnwq1thLkt1bvwMH1tZnsohDmB2KZnY95suLvntaVDMHcChKXAJnJuKiRvKvftgPfoePMAhGYz1LfwxDPqNaXshL0mg5NnMfLzMzUCMGWzvDmAevisu0Rl2XSoePnshfJuwnSyY9mmezUmgzpEwntBtz6mtf3k2nfEujtus9PogvLnu16sgDWAwTzohzAAfuWqMfAD0DtyxHJBtLuEdfcs2rkogjArMnyqJf3nvfVq0rZCI92nLeVyuH5CvzjvJDgtKTey1L6zhy2zeDKtZjQB3vMDdC2m0Hxns80qxbymxrcCdjTq0LVzxiZq0T5uxHQzJGRmNjuyKnJDwnpCePMnK1KEuj0sgPun3PrBNLjoeHwswriodbQq0fuuunvytvjstrznvbHBuHHsLDkoeT0B0v0qLzYyKnQsLrHn1O5DuK0C3jKshy3oezusJu3ExHnDvrAqKX1Aw5QwNDNCgvRk2PREgviDunPwefjnuDnvuHMndDpBgzvA1jVCZn0CxGXkZjKyMftDe84uZzgDfjNCZnisw5SqM9My2HnufzTn1DgywXnzwPhs1nKn3PXv1GXAtDOu2TMuxPSuuLqvKX0AhHptgTRmxnswK82q0P6BNq0sgW4qxfezs9nAhLUEMHIAw9enhH6swS1C3nYBhHoAgPju1PPreXTwMDWtKPoAtzYCLK3wwjrCLfMrdnlEw9qCMPTAMHIvMH1A3zPr0vWr1rJu1nmBgPdr09yl0PomeDen0PvrdrHzxH2s0m0nhyRCJzotNvRy1K2zfu2Bs90qMXIBfjKmvn5BNLzr05uBZrKzgL0zu9KBfbNnuj2zxP5mxjwmwOWy1LXm2nyzhuWrtL4l051qufRBvnyzuj5yZzfBNG2rezPtxHruxbIBZf1qIThmZL4rw04B3DiwKnAtKfIB2fwvffOl2W4zMLjC096k3fVDgLNstDgChfKwwPVt0LjDeTznLLsn3q3DxbQuuDLEhrRDK5vquHqy3fbzMP3vhiXmI85CxvmzKXRtgnNzZfHDgP3BK8XshPIs0PiD0S2s2m4EvDIvKXMs3DWEwP6utuZDfbRvuDwCxDNwxbOsgLQwgvvrdzjANy5Dufmwvu3l1rAqvfktxHNtgnbvJC3qLbhrffIwxPZDwfrzhnKDffeA3H0BZrdzhvhmu40wMPdohDWDge2yKLvA1i0BLLkv0LbndLAn3C3m1HLsgfbou51m0u3wdncwvGWENO4D1GVveXSnxi1mKfjB0vVvhj2oeW2tMfqqKXPEdG4y2DTBZG1m0fjDNz1mZHmutDsmgD6AtDwChf5ufzkmLLjnKD1EeTWkYTrtuPkuYTIqxuXq2jJuxL2oxLxr1PdruXyr01inMqXAvvrl1KRzxuVow90r0ztneXqnZHuyKXfrxfQtZD3vxbVAxnzqunKoeXZwgvQnhnQmwK3zuPQzZjYDMLOCKjInJzez2HYBxvIqLvRAuDPu0X4ognQEM93tNnrC1nVmdbHCK9ku0TfsevKCxHMq056yKC2DNfsELvmmhvkvhDlDKf0meTMsdyWBgPsquH3zfPYC2nfru9dwJrZrZfHtwfKtLDAB2Tuq2HkCxLnvLPrC3LwBvm1oxD2oevgzgPgtunTrvDeve1ymfzkmfPPAw9nEui0A2WZDKeWsw5qyvPIytzelZb2tK1kn1fenvK0DwGZDwX3q3fvCLblzfP4nvjAwMPkEvLHuwDuyKP6nITNEhzRz3PuEerIrdvPuNHeuLPbBKLOEurwqNvTsePWzgTWCZaREtK3zLzcDdiRme5dAKjwAM84qLfbwtbkwdjfl1vyquuZzxiWuK92BJHMBK1xs1a0DhKXy1DXBNLumJfOk2nYteDos3DiuerRDwHmuwHKDg43sdrqwtjwnMrMyLjAudjbuNLIBJnomJzjzfL6DgPKmdv4mNzjvtHfA0eVC05qmgKVDujUn2m1re01DxDmtwXzEwD4AuXSk01NDvr3yunsmwvnzZvRDZncAerHwvr6zwDOveqZwvHQthDkEK5AyJvgqJbTBLe5tujhsJzHv1zLngu4vg9qvMXQocT1C3b1zLjvv2XQk01bCZq5nen5rxfkAhzey2LbrtLQzeDpu29unY9XqMHMqxfOvu52C281vgzis1vjCLLrCumZtfqVre5bou1PC2nOALHcC1Hcthb2vuK1t20Zr1PiEMjbuxG4ouGZuK1jmxDhnLvcmKvjDgLdAtDztguRtKPorK5RyuvpwJaYwtvuvwm3u0f5q3zvnMTPCvG1AxvJANfdzJrXvMX5EMnvtvLLDwfIC0Xhmhu3Dw1QBKjJAgiXCfeVDgDVsJrdEw1Ln3jynerkwtfqC3rAEhfire5cze9yCvn1ALnRtNjRmem3y0fyt2XbDMH1Aw43vMT6EKrwv0nfDgrlA3m5EtbQyJvoEu1Wuhzpqu1qzKDJDZfXzs9yDdyVANHTrgLzrITIoen2Aeq1u3v5DtjlDxbRog1LvKH2nuL4C1rszdbKtK5OvxaREwTRCKLgCvzlzw9TC0WXEtzkmfm0BK9pCgrKlZnIneHcoujnA2XMrhPxCxPdqJH2CuXjBITIC3DfAZy0udnZz1b3kZjVrdHivvzzogy5C2LpmgXxEKntvtjhsfbuzhPuz0TfAtrZAfzSrhGRBZzwCwq4ANrxmvnxswW3ttruAM4ZzKeWELL1A01bDLaYnYTPA0vpv1r5nerYy09Nv0qXvKrnCwf0tJnvBgDKmuXXtZvIugnfutnsnhjMDtbrrdflwc90ueLHAMfgzNfysMO1Edzbtvrwz3PjDvfzrhncyuyVAKXxqLDJt3zcn01lthfvne9qCNvVt2TkBNbutwHtDvPZqwvMs1PjDu95wffRBtLos0rkzKnuCtrZnLvModjkAYT1Dg95u0yRuZK3t3z3vY9vywO1wMzrqITetfHbzKjuvJHjAKf0zKr5rgnomZyWnvPrtwnTB2P4rKTTwMmVyZe4vZnyzdbHy0ORzZaYCtf6wLmWA1PIt0L4yM9ovMi5sNverYT0oeDeu0fgos8WvM04Ahn2CtrIvePQrhr3vITcAMntntrArZaYvNb3mLnADgmZy3PWt0rjy1DkCwf4sMfICxqYwhLqAJfmuYTgAtfqBK1HsgPWsI9dEeeXv3Poq2uWmhvbsNvynvnnmwz0t2nhAu02BNDinfjzCuO5uxP5tfjmk3fOAK5Au0yZBhfZnNG5B05tB1DqBvr0tgWRr1rJnhvuq0zQvfL1rdnrvZHLsNe3EJuYtMvIsun0BevywxjYoerjsvvcn0i2AhD0DKT6suDwDhb3n2z2zuXlA2PZq1DLz20XsKHsuZLvBLvrCeXvmurxrujbkZjtvJfHqu9nCfr4A3jqzZviBJjnAhO0tK9poeiVDJDqCfvdD05nrw95qMrtwLq5t0PyttGWz1veug4YyM5Aww5PlZrSzKjxyMjgywqYtKDAl0fQrKHlCtfzl1fwtM9zDhf4DwjpAw1zy28YnujpDZbfl3bpBtf1BtjKB0z4EwjdofLSmfbWwdnzEwe1tKvtnfjLDwPQweD5r3ORwNLrm2jKBfjmvNbbq0Hgl3OXCZjQogTdq2m5vurPr2vln3C1wwP1AJnXn0qXqwS3Dg5ND0vtndnVvfy1n3HZz21hn2TUsJzVoc9essS3y3brBgHPzuPqshbQzeHbwNPnq05Wl0jjDty2DxfkuKjeAK5lsvPzDgvTBNzkC2XqANzbz2LeDMDjAJDHnujgn3H1zLjxr1G3wLzvEgSRmKnAzeXJkZDiquOXthfWquuXuNnMDKC5DJjOBxvKD1Livu1znxjyr3vKl1zQrer0mMDUCM5ttKvHswqWDfLVzKPID0v0vhn3DwDim2TArvDpnvnwz0zyy1rwCNLSEgPKrMjoqvm0Avj1zhbUAJrWDZzzEM1zse5XsgTXAdz6wwn5nhHOshfrD1Pll3LvqJD4DMTgngfJk1riA0W5vwn2turTqweWy0Lky0DTqMLiqMvHAvm0nKC2rumYmfyVAKzqBZvoneDAtfDnsIThneC4thCWmLvcvgPWEhuWsgP1n28Yr0Dknc9wudnLA3fzBMPQm21Wzuj3ywO3DgDnB0LWy0fLBKmZBdvXvLCXutvnvtz4tJGXtNfNmxvjkZj1CwKWyM03rNPXocT5Atnntva2ovzNng9kzhzeqNfstMjUyunOk3fKsJznuMS1y1ztyZjcDMzqn3L2me95qxPcndu3y1ruDwPoD0zUzezuB2TLDZbSyKrACer4v0KWzwu5D3PssgPgAhbzB1DIz2nSB1v4EwvOrwrMsgnqyJLOyM5TrMPstta0yZu3DKrHwKTdyZziqKTcCZnmrgrcq3jvENnpD0e0B1PtDKvTwdbcCxn3D3zyquOWtNvsuMrZsMDNAdqRk2LwotrbBeTvCtHyy1nKAMm4vwTjwLe5DeTWuLbhAxHZk2rNqur6qJLit1KVuKXQCdvPDhfqB0Pzt2HoA1DAv2HwsxHunuHlq3rXwNDJzejgmtHhovfsEuHPuwD4C01SBLzsmMi4rdjWudiWDgfQz3nqAtDbm3zYrJfjohG5wwm2EdfpzKfSyxPKD0j5rZrdngLjuxvewMPRyxC0seLezJnPlZzsy3bmvgHkAg1Uz1yYBdj3zhvduxrYk3HfCfznm3nxDMeZswTNEdCWvtbNrhzcDM1gnvnwquLbDe5ky29JDLy2m3jbngyYu2n5k2LJBen0v0vQvte1y0DhzuPpm1fmAJzeDuDAn0CXwLzhmKv4rJKYsNj6D0zpoxLquviZwKi4wJuYAZHcsNqRwhDlmYTkEK55rxbouevsBxmWoe5dytDJwuOZAee1DeTTDhrPtxvsvgX1vfr3tLG0tZHuCeO2Avr0sLHyrNO1D2rkowjNmxqWueflveSWmgrLAffUz0XQz3zbvLjYsZbunhHZBeLQohLXyMnmwgjdyujYzLKYsZjoAMXZuvvpngTItxi2sfbYCdDiogjwBJHwyMvblY9eu0r2BMi0tsTtCxnrEduVq2XbDMHuvJzMrZD5AJyXtgeYnZa0ouLrzgjUEhfwzuDhAxngCwH1rfrbB2vUqvyWvJj4tuC2te5xqK5qudbUzLHpnxCVvvbUrg5bthvhBYTImLrMvtn3BMX6DNbjm3bRv0jTDuHqvePlAhveywrvmLHOqMPeEtzltLzKrwe5rMvzogzgr1e5zdH0veDjwte1l2Peq3LcmffVsvzmqM9uA2D0zgC3z00XBI9VveyVrgr5u0nrqMfzngvnwurPk3DknM9sCK5nv0TvmeH5EhvNt2LgCvrLDtnlqtqZtM05mLfKB3zyotnzvdLlBuL3CITpyw5en0K2yITJsffknu9SyK5mAhzrv0PIodyRz0e4wJfgmJjtCxfnyNjPEwqRz0jhBvLlsM05mgPql3DPENPQm2DJtM12zs81sfLez0rZz0HRsMTVEgrZsxG2txOYudHRzKLbBJjHowLcvurHDZaRzMKYrKyYs3bWwhb6mhnKz3HIz3PdAMP2EhqWms9KwenmAJK1n29pl0eYuuvzDMy3DhbgC2Dmq2Dhl3C5tMPhwNLJvfuWtwryBePel0G1AgjQvvfNk0CYuhnZwxvmwhz2B3D3zgzUoefimJnJqMjMCM5indn5yZvPEgOWrNyXvhbjAuORu1HAyNzpqNuVEfjcwdjxENPOreHcrM1lB2XJDtzKDgr3ovDcohnYvLaZswXyBMDomJHJDMDmBdz1zJrhBc9gmKfPzhDcnNb6txvxqZDfvw04owDpvgLvk2nQAwnomwKRDLC4mhrWm0LuyKP3mfjsl0Lfk0O2s2T5EK1SwNvmC1vnshjAohLVovLnzujYAK1rzxPqB1C0q1DNwvLWsJvHn2ftzNaXy3zPDe95zM8Yn0PuyKLsrMriqwfcAe9IC2TTteCWELL5t29pmdrjwtf6EteZvgnlBLiZutvStueYtxvizNHWnZvwtJrmz09PnfPoDgy3ne1pvw5jD0nxrfyVnwu3DvnSA2jMq2nstxvimNLYDKjsBeXNy085EfHXAKLqlZLSvwvutgPgstn6oeyRDwfSsxzSChresKfbqufbrwXgvgTtDvfTq0m','x2fJDgL2zq','y3jLyxrLrwXSAxbZB2LKvgvYCMfPBG','x3n0yxj0vgLTzq','x2LUAxrmywjLBa','BM9YBwfS','z2v0uM9HBvrYyw5ZzM9YBq','ywrKt3zLCMXHEq','q09ove9vuL9msu5f','x3rPBgvizwLNAhq','x2XHEwvY','AxndBg9JA1DPC2u','ywrKu2fTCgXLCW','y29YCMLKB3i','y2vUDgvY','Dw5PzM9YBsbMBg9HDcb2ywX1ztSkDM9PzcbTywLUkcL7cIaGicbNBf9gCMfNq29SB3iGpsb2zwm0khrLEhr1CMuYrcHZB3vYy2uSihrLEgnVB3jKks5Yz2iQDMfSDwuSideUmcK7cN0','x3jLC3rHCNq','x2XLzNrvCeHHBMrSzxi','x2DLDe1PBKHLAwDODa','zgf0ytPPBwfNzs9WBMC7yMfZzty0lgLwqK9sDZblr2DVqufbqu5tvwHfvwDbqufwD0fbqujbq0fzqufbqLDKyZK0qufbqunyqKLxwe1bqufZvefbquXfD0vbBxb3wufbquD4mMXvv0HswvrvDZzzmJL0tg1gA2iYsMXmBMH0y0fbqufbqufqrdK0y0DgAMeYvJbjr0PSwJjSDvbtthz1nZHPsuDSA1btsLHovtb3vfHcrfPxAhbtshb5wLzonLrSuMPLBxrQt1DrAvb6ngDqsgC2zuCXD2jxvJbzu0i0yLD4Dwn6Cdrqu0POwKC5AvPuChvJENb0wLHsAeX5swDLrha0yLHcmgf6mgLrv1j2ww1vz1Dfmvfjru52y21vz05PnhDmv013turjz01urtjmAKuYtKrzmu5tD2DnAKf5tvm4D01tohLoAtb4tLrVme1uB3Lnq0fNsunbz0LdqwDjAJrNueHkA1PQCfnsrvLNzuCXC2jUttzJBvjTufnkB2riuNDpAtH2zdnKm0XUy3PmBtL5wNK4Ee9uAZvmEKf5thPjEuXysMTAAtf6zvC1mfLyz3rIBK1QswO0z1bisMTAANbfwLHoAMnTBhDKr2X2yMLcEvPhwtzzv0P2zfHrouLPswDLrZfZyM5nnMvhmxDqu0PVzeHsD09PohzIBK11wvDsDLLTvxvzmJL0tdnOAgndohHmAKf2swLcngjxEhvJENa0yLHctLrumgLHsfiWy0rVDKWYnxPmBuzRyJjkBeXTtNzIuZK0wvHbDK1tnhDmmJf0thLjz2vhmxnIBK02yZnsrMrUutLjBwGWzeHbnKX5oxvJEtvOwKC5AvPtnwPImJb2zuDgD0X6rxvnqZL6vKHSD1PtovnAwe52zfHkALPvvJjAvZuWsxLjz2vhmxnIBK02wKDnouLTAdbKsee2thK5D2rysNnmBtL5wNK5A1L5owXIr1z0wLC1mgn5ohHmAKv2swLcngjxEhvJENb3yuC5mgiZtM9Im0e5sw1OmgriqtzmEtL1y3K1AfPhowLAuZvQyJiWDMnhAhzKrZL6yuC5D0X6rxvnqZHPsuHODgneCerJBvzOzeC5EvzhoxzIrdbPuvDsDLLTvwDvr2H2zeC5EMfhoxDjreL4tgPjz0TfmwHzmMX1zeC5EMfdA2LjsgH0y0rWrgnTvMHKr1zfwvHsBfbtsxLnreL4tfrbEuXusxPwreuZt2Pfme9QtxLlEKe0t2PbD0LPqJrIwee2vfDwmfLxuMHKr0zfwvHsBfbtsxLnreL4tfrbEuXustbwreuWt2PjD09QrtjlEKe0t2PbD0LPqJrIwee2vfC5A2fxwJvsr0yWwLqWAu1QqxLnuZb3twKWEu5guxHorg95turVEe5PC3Dprg93tunjz2vhmxDuvta2u1C1EMrhrNvzmLzkuKqWAwvhmxDmBwXWwKrVmu56uxPzmKKWtKmWEK16AZnmvfe1t1rbDfLQzZrpqZb5tKrgBe5TrxHzBvf5wvDzAuLiAhrJrtfot2TsDLKZvNrAvZuWu1vrouLTrMTImKPSt21sDLKYBgTpBKjVyJnsDMmYAhzJrg81wvDzEfPewtfnqZfQtLDsBeXuvM1orgD0wvDzEK5PmwHAreu0wLDsA04YuxPzvefPsuHODgnfmu5pAZL5yvDKCgjTrNnsrZLQzfCXBgjUuKPsrdbPzuCXD0XTuNbArhbPtw1AALPTvtjAAtfOwLDrD0XuuMPnv1f0wwPABu9tmwXoAKf3twPkAu5TrxDpr1vPsuDsAK9TwNzJBtfOzeqWAwfxmwHAmLv2y0C1BKLPqNDHrZKWyJnoB2iZqtzrmJLZyJnktMiYuMXqu0L6swLcD2fhotbIm05VyJnbnLnvtKrvseP2wM1SC1PumgLJmuPiuwLcsLjvttjnvgSYtMKWEuXQrwLqAue4zuCXD1rvmdztr2X6zeC5EwvungDqsePRwMPWvfPyrsTjrhH5wKDznMjhA2DJm1jgzg5rnLLxtJbHvZL1ufnkAMnTvMHKr1zRswLcEMrfvJjKrhbWyM5omfLxnwPAvwXfufnkngjyqxvHv2XRt21jEvPTtM1AvfPTtfDgBfPeqxror014wKmXAu5Twtvmv1uYturbEu1Tstjzvee0wLnjz2mZuKzKBLe2zdjOBgjQmgLnAKf5tvmWD01PmhLnmvf4tNPVEe5eB3PnAxn3t0rVD01dswDJm1jgzg5rnMmYow1KsgrOy21wqLOYvNvKrdbPuvDsDLLTvwDvr2H2zeC5EMfhoxDjreL4tgPjz0TfmwHzmMX1zeC5EMfdA2LmEJrNueHkA1PQChnHu0j6zevwmMreCgHzm1jWyJi0ouLUtMHKBvzRswLcEMrfvJjKrhbWyM5omfLxnwPAvwXfufnkngjyqxvHv2XRt2PoAK0YsMPnmKK1tfrRD05erxrorgSXwLmWne1uyZvmvgrRwMPJm05esxDArgn6t1njz2mZuKzKBLe2zdjOBgjQmgLnAKf5tvmWD01PmhLnmvf4tNPVEe5eB3PnAxn3t0rVD01dswDJm1jgzg5rnMmYow1KsgrOy21wqLOYvNvKrdbPuvDsDLLTvwDvr2H2zeC5EMfhoxDjreL4tgPjz0TfmwHzmMX1zeC5EMfdA2Ljse4WuLHAme9TtM9zvZvUwLDrouLPogLmEJrNueHkA1PQChnHu0j6zevwmMreCgHzm1jWyJi0ouLUtMHKBvzRswLcEMrfvJjKrhbWyM5omfLxnwPAvwXfufnkngjyqxvHv2XRt2Pvm05etMPzALeWtfrnEK9uy3rorgS1tumXAu9ezZrmveKWtvDvmLLurMLArePOwMLjz2mZuKzKBLe2zdjOBgjQmgLnAKf5tvmWD01PmhLorLf4tKrVEu1eB3HoAxn3t0rVD01dswDJm1jgzg5rnMmYow1KsgrOy21wqLOYvNvKrdbPuvDsDLLTvwDvr2H2zeC5EMfhoxDjreL4tgPjz0TfmwHzmMX1zeC5EMfdA2Ljse4WuLHAme9TtM9zvZvUwLDrouLPogLmEJrNuem5EvPhwtzvmLz4ugLboeWZAhrJrtfot2TOCgmZuNzJBMSRsur3DMnTuM1pA1jSyZjoEwfyqJbHvZL1ugLboeWZsMTAANbtuKvzk0LeD3zLrha0yLHcDfPyuMHqAue4udnOD1LxtNjAwffNwLC1A1btsNLjAJGRzufPtgT3qufbuvPkuKvgvwvkENqZtevsD0rbtxHeqwW1lZfyzhfzsvHsAvLrqLvmrMyVC3zrzueVnZjUrhDdngHLqunsqvfysunlnefcsejcwwDjtgTcrwnbrwLNz3nrrvz5qwLpqunsqvfysunlnefcsejcwwDjtgTcA3PzEdLsB0rbBxbUBJLcrufol0jtquLNsuXRqKvJquvPz2DZuuvwEufPt0fduKfrweLdsZrbqKHcqLLNsuXRqKvJquvPz2DZuuvwEufPt0fduKfrweLhs0fiq0jPz0j3zZrXvuffqKzJz0LQz0fRuuvgEufPDufbuNDrv0LdqZvbuKHbqKLVsuXfqKzJz0LQz0fRuuvgEufPDufbuNDrv0KYtu1gAu5QrejzAdrluujfqKjJz0LYz0ffy0vgAufNDvffuNDbu0Tdq3HbuLHjq0K0quPfqKjJz0LYz0ffy0vgAufNDvffuNDbu0LMuM1br2LxvgDVtvLbqufbqvnvvK9ssZvdwuLjpq','y3jLyxrLqMXHy2TbBMrxAgL0zvn0ywDL','zgLTzw5ZAw9UCW','z2v0sw1Hz2vYEuXHEwvYsw5MBW','yMfZzvvYBa','C2nVCMu','EM9VBuLU','x2DYywrHDgLVBNm','ihb4ihnHBNmTC2vYAwy','u0HbmZG0','y2XHBxbuB0HLAwDODfn1ChbVCNrLza','x3bHDgHfDMvUDa','zw5HyMXLza','Bwf4Aw11BuXLDMvS','tevgvf9euKfh','BxvSDgLWBhLtAgfKzxi','yw5PBwf0Aw9Utg9VCa','y3jLyxrLq29VCMrjBwfNzxj5tgf5zxi','AgvHzgLUzW','zNjVBunHCNrLC2LHBKfYCMf5','Aw5JCMvHC2u','z3jHDgLJDwXL','z2v0uujtCgXPBMvqB2LUDhm','lI9TB2rLlwn0CI1NBgfKBwfU','qKfdsW','Edy0','Bw91C2v1Ca','v29Vza','x3zPzxDLza','x3bLCMnLBNrtDwjZy3jPChrPB24','y2fTzxjHx3zPzgvV','zwfJAenVBxbVBMvUDa','x29Uq2fTzxjHq2HHBMDLza','yM90Dg9Tsw1Hz2u','lI9Hzxm','x2DLDefYCM93ug9PBNrZ','yw1WBgL0DwrL','x3n1yKTLExm','y2fUDMfZ','x2rPC3rHBMnLtgfIzwW','Cg9PBNrdB3vUDa','uKvbrfK','u0nftKuYra','AgvPz2H0','C2fTCgXLvgvYCMfPBK1VC3rezxrHAwXLza','u2fTCgXLzfbVC2L0Aw9UuhjVCgvYDhK','sxnVotC5nZe','zNjVBuvUDgL0Eq','z2v0q2XHC3m','z2v0wM9VBvvUAxrZ','Eg1PBG','zNjVBurHDgu','tMfo','x2XHEwvYq29UDgfPBMvY','vMvYDgv4rM9YBwf0','rwXSAxbZB2LK','z2v0ug9PBNreAxn0yw5Jzq','AgfZvMfSDwvbDa','y2fSBa','zhjHD1n0B3a','vhjHBNnMB3jTCW','rhLUyw1PyYbYzxf1AxjLig9Mici','x3jVDgf0zvjHDgu','DhjHBNnMB3jTtwvYy2f0B3juB1DhuZG0','q2vZAxvT','y2XHC3nmAxn0','C3rLCfnPEMu','y3jLyxrLv01tsw1Hz2vYEuXHEwvY','zM92','y3PTBa','rgv2zwXVCgvYrxjYB3i','C3vYzMfJzvbVC2L0Aw9U','lI9SAwjZl2rJlxnKAY9YzxnVDxjJzxmV','zNj1C3r1Bq','uhjPBwL0AxzLq29SBgvJDgLVBG','zML4zwrgCMfTzvrVsgvHzgLUz1bPDgnOuM9SBa','z2v0tgf5zxjuExbL','tu9vu0vFt1zfuG','D2LKz2v0ihrVB2WTDgLW','x2TLEq','q2vZAxvTm0ruAwXLrMvHDhvYzq','CM90yxrLuMLNAhq','Bw91C2vVDMvY','y3jLyxrLvxjSvgvYCMfPBG','vevyvfvsrv9xuKfqx1q','Bwf0CML4','CM90yxrPB24','tM8GzMXVyxrPBMCGCg9PBNqGDgv4DhvYzsbZDxbWB3j0ihrOyxqGAxmG','y2LYy2XLx3nJyw4','y29TCgLSzvnOywrLCG','x3bHDgHnB2rL','ywrKugf0Aa','B3jPz2LU','C2HVDwXKqw5PBwf0zq','lI9LBMmTyMfZzty0','zgLYzwn0Aw9Uv0m','ywn0AxzL','x2rLChrOvgHYzxnOB2XK','y2fSBgjHy2S','BMvHCG','uKm0','yxr0CMLIDxrLihzLyZqGCg9ZAxrPB24SigLUDgvUC2L0EtSkDMfYEwLUzYb2zwmYig9MzIWGzgLToWP2yxj5Aw5NigzSB2f0ihzjBNrLBNnPDhK7cNvUAwzVCM0GDMvJmIb2Awv3Cg9YDdSkcNzVAwqGBwfPBIGPEWOGicaGzgLTid0GywjZkhbVC2L0Aw9UlNP3ktSkicaGig9MzIa9ihbVC2L0Aw9UlNP3oWOGicaGDMvJmIbWB3mGpsbWB3nPDgLVBI54EsaRihbVC2L0Aw9UlNP3oWOGicaGDKLUDgvUC2L0Esa9igLUDgvUC2L0Es54oWOGicaGz2XFug9ZAxrPB24Gpsb2zwm0kcHWB3mVDMLLD3bVCNqPkJiUmc0XlJaSidaUmcWGms4WktSkFq','lI9JB3jL','y3LSAw5Kzxi','q29SB3i','EM9VBu9MzNnLDa','qMLSBgjVyxjKifbYAw1PDgL2ztOGDgHLihnPEMuGAw52ywXPza','DMLLD3nOzwq','lI94nJqTy29Yzq','C2f2zq','B2zMC2v0v2LKDgG','Dw5PzM9YBsb2zwm0ignVBg9YoWPJEM1FBwf0zxjPywWGy3PTx2DLDe1HDgvYAwfSkgn6Bv9TyxrLCMLHBeLUChv0ig1HDgvYAwfSsw5WDxqPEWOGign6Bv9TyxrLCMLHBcbTyxrLCMLHBca9ign6Bv9NzxrezwzHDwX0twf0zxjPywWOBwf0zxjPywXjBNb1DcK7cIaGDMvJmIbZDca9ig1HDgvYAwfSsw5WDxqUC3q7cIaGzMXVyxqGCg93zxjsyxrPBYa9ideUic8GkgzYywn0kgn6Bv9MCMfTzu51BwjLCIaVidmWlJaPicSGideUksa7cIaGzMXVyxqGywXWAgeGpsbWB3COms4GlsbZDc50lhbVD2vYuMf0Aw8PoWOGihzLyZqGDgvTCca9ihzLyZqOy29SB3iUCMDIlcbHBhbOysaQignVBg9YlMePoWOGig1HDgvYAwfSlMrPzMz1C2uGpsb0zw1WlNjNyJSkicbTyxrLCMLHBc5HBhbOysa9ihrLBxaUytSkicbYzxr1CM4GBwf0zxjPywW7cN0k','B2zMC2v0sgvPz2H0','x2nVBMzPzW','y3jLyxrLrwXLBwvUDa','x2nVBxbHC3nszwn0yw5NBgu','DhjHBNnMB3jTq2fYDg9NCMfWAgLJvg9xr1m4na','x3nWzwvK','y2XVDwq','zgL2','y29TChv0zvbSyw5LCW','BxndCNLWDg8','B3b0Aw9UCW','z2v0q3vIAwnwywX1zq','Bg9N','x2LUC3rHBMnLswq','zgLZDgfUy2vFBgvNzw5K','ywnVCW','ug9SEwXPBMvgBg93','zgvMyxvSDa','zgmTD2LUzc1SyxLLCG','zMfY','x2nYzwf0zu1VzgvS','Aw5PDa','z2v0q29UDgv4Da','Aw5PDgLHBgL6zvrLCNjHAw5izwLNAhrZ','ChjLuMvUzgvY','AxnjBML0AwfSAxPLza','zgLZDgfUy2u','vhLLrhLLvhLWzq','z2v0vhLWzq','Aw50zw5ZAxr5','y3jLyxrLu2LSAg91zxr0zvn0ywDL','lI9TB2rLlw9MyG','Dw5PzM9YBsbMBg9HDcbJENPQoWP1BMLMB3jTigzSB2f0igrPCZSkDw5PzM9YBsbMBg9HDcbZChPQoWP1BMLMB3jTihzLyZmGDMLZAwjSzunVBg9YoWP1BMLMB3jTihzLyZmGzgLZvMLZAwjSzunVBg9YoWP1BMLMB3jTigzSB2f0ig1PEe51BtSkDw5PzM9YBsbZyw1WBgvYmKqGy29SB3juzxH0DxjLoWP1BMLMB3jTihnHBxbSzxiYrcbZDgnZAgfKB3C7cNvUAwzVCM0GC2fTCgXLCJjeigrLChrOvgv4DhvYztSkDw5PzM9YBsbTyxq0if9ZAgfKB3DnyxbFBwf0CML4oWP1BMLMB3jTihzLyZqGC2HHzg93twfWx2XPz2H0ug9ZAxrPB25fqZSkDw5PzM9YBsb2zwm0ihnOywrVD01HCf9SAwDODerPCMvJDgLVBKvdoWP1BMLMB3jTihzLyZmGC2HHzg93twfWx2XPz2H0vxa7cNvUAwzVCM0GDMvJmYbZAgfKB3DnyxbFBgLNAhreAxi7cNvUAwzVCM0GDMvJmYbZAgfKB3DnyxbFBgLNAhrsAwDODdSkDw5PzM9YBsb2zwm0ihnOywrVD01HCf9UB3jTywXpzMzZzxrty2fSzurPC3rHBMnLtwf4rgLZDgfUy2vbBMreyxjRBMvZCZSkDw5PzM9YBsb2zwm0ihnOywrVD01HCf90zxHLBfnPEMvezxb0AejPyxnbBMroB3jTywXtAgfKAw5Nu21VB3rOoWPPBIb2zwmYihzFDgv4DhvYzunVB3jKAw5HDgvZoWP2zwm0ihrVrxLLkgLUihzLyZiGDxySigLUigzSB2f0igrLChrOkxSkicb2zwmYihH5id0GDMvJmIGODxyUEcaQidiUmcaTideUmcKSkhv2lNKGkIaYlJaGlsaXlJaPktSkicb2zwm0ihbVC0LUq2fTzxjHid1JEM1FAw52zxjZzvbYB2PLy3rPB24GkIb2zwm0khH5lcbKzxb0AcWGms4WktSkicbWB3njBKnHBwvYysa9Cg9Zsw5dyw1LCMeGlYbWB3njBKnHBwvYys53oWOGihjLDhvYBIbWB3njBKnHBwvYytSkFqPMBg9HDcbNzxrezxb0AcHPBIb2zwm0igrLChrOkxSkicbMBg9HDcb6x3DPBMrVDYa9ign6Bv91BNbHy2Tezxb0AcHKzxb0AcK7cIaGEL93Aw5KB3CGpsbJEM1FCMv2zxjZzuXVz0rLChrOkhPFD2LUzg93ktSkicbMBg9HDcbUx3jHBMDLid0Gy3PTx2rLChrOuMfUz2uUBMvHCJSkicbMBg9HDcbMx3jHBMDLid0Gy3PTx2rLChrOuMfUz2uUzMfYoWOGihjLDhvYBIaOmI4WicOGEL93Aw5KB3CGlsbUx3jHBMDLic0GzL9Yyw5NzsKGlYaOzL9Yyw5NzsaTig5FCMfUz2uPoWP9cMzSB2f0if9JEM1FC2fTCgXLu2HHzg93twfWkhnHBxbSzxiYrcbZAgfKB3DnyxaSihzLyZiGDxyPEWOGihjLDhvYBIb0zxH0DxjLkhnOywrVD01HCcWGDxyPlNi7cN0kzMXVyxqGx2n6Bv9ZAgfKB3Dezxb0AenVBxbHCMuOC2fTCgXLCJjeihnOywrVD01HCcWGDMvJmIb1DIWGzMXVyxqGzgvWDgGPEWOGicaGCMv0DxjUihn0zxaOzgvWDgGSif9JEM1FC2fTCgXLu2HHzg93twfWkhnOywrVD01HCcWGDxyPktSkFqPMBg9HDcbFy3PTx3nOywrVD1zPC2LIAwXPDhKOC2fTCgXLCJjeihnOywrVD01HCcWGy3PTx3nOywrVD1bHCMfTzxrLCNmGC2HHzg93ugfYyw1LDgvYCYL7cIaGzMXVyxqGzgvWDgHcAwfZid0GC2HHzg93ugfYyw1LDgvYCY5Kzxb0AejPyxm7cIaGzMXVyxqGzgvWDgGGpsbZAgfKB3DqyxjHBwv0zxjZlMrLChrOoWOGigzSB2f0ig5eB3rmid0GC2HHzg93ugfYyw1LDgvYCY5Urg90tdSkicbMBg9HDcbUB3jTywXtAgfKAw5Nu21VB3rOid0GC2HHzg93ugfYyw1LDgvYCY5UB3jTywXtAgfKAw5Nu21VB3rOoWOGigzSB2f0igrHCMTUzxnZid0GC2HHzg93ugfYyw1LDgvYCY5KyxjRBMvZCZSkicb2zwmYihv2id0GC2HHzg93ugfYyw1LDgvYCY50zxHdB29Yzhm7cIaGzgvWDgGGlt0GzgvWDgHcAwfZoWOGihzLyZiGDgv4zwXtDgvWu2L6zsa9ihnOywrVD1bHCMfTzxrLCNmUDgv4zwXtDgvWu2L6ztSkicbMBg9HDcbYywrPDxmGpsaXlJa7cIaGzMXVyxqGzhGWid0GlxrLEgvSu3rLCfnPEMuUEcaQihjHzgL1CZSkicbMBg9HDcbKEtaGpsaTDgv4zwXtDgvWu2L6zs55icOGCMfKAxvZoWOGigzSB2f0igr4msa9ihrLEgvSu3rLCfnPEMuUEcaQihjHzgL1CZSkicbMBg9HDcbKEteGpsb0zxHLBfn0zxbtAxPLlNKGkIbYywrPDxm7cIaGzMXVyxqGDMLZAwjPBgL0Esa9cIaGkaOGif9JEM1FC2HHzg93rgvWDgHdB21WyxjLkhnOywrVD01HCcWGDxySigrLChrOkqOGicTFy3PTx3nOywrVD0rLChrOq29TCgfYzsHZAgfKB3DnyxaSihv2icSGDMvJmIHKEdaSigr5mcKSigrLChrOksaRcIaGx2n6Bv9ZAgfKB3Dezxb0AenVBxbHCMuOC2HHzg93twfWlcb1DIaRihzLyZiOmc4WlcbKEtaPlcbKzxb0AcKGkWOGif9JEM1FC2HHzg93rgvWDgHdB21WyxjLkhnOywrVD01HCcWGDxyGkYb2zwmYkgr4msWGzhKWksWGzgvWDgGPicSkicbFy3PTx3nOywrVD0rLChrOq29TCgfYzsHZAgfKB3DnyxaSihv2icSGDMvJmIHKEdaSidaUmcKSigrLChrOksaRcIaGx2n6Bv9ZAgfKB3Dezxb0AenVBxbHCMuOC2HHzg93twfWlcb1DIaRihzLyZiOzhGXlcaWlJaPlcbKzxb0AcKGkWOGif9JEM1FC2HHzg93rgvWDgHdB21WyxjLkhnOywrVD01HCcWGDxyGkYb2zwmYkgr4mcWGzhKXksWGzgvWDgGPicSkicbFy3PTx3nOywrVD0rLChrOq29TCgfYzsHZAgfKB3DnyxaSihv2icSGDMvJmIGWlJaSigr5msKSigrLChrOksaRcIaGx2n6Bv9ZAgfKB3Dezxb0AenVBxbHCMuOC2HHzg93twfWlcb1DIaRihzLyZiOzhGXlcbKEtePlcbKzxb0AcKkicaPicOGkdeUmcaVidKUmcKkica7cIaGCMv0DxjUihzPC2LIAwXPDhK7cN0kDMvJmYbWB2LUDfbYB2PLy3rpBLbSyw5LkgLUihzLyZmGCgXHBMvoB3jTywWSigLUihzLyZmGCgXHBMvpCMLNAw4SigLUihzLyZmGCg9PBNqPEWOGihzLyZmGDJaXid0GCg9PBNqGlxbSyw5Lt3jPz2LUoWOGigzSB2f0igqGpsbKB3qOCgXHBMvoB3jTywWSihyWmsKGoWOGihjLDhvYBIaOCg9PBNqGlsbWBgfUzu5VCM1HBcaQigqPoWP9cMzSB2f0ihb0BsH2zwmZihb0kxSkicbYzxr1CM4GC3fYDcHWDc54kNb0lNGGkYbWDc55kNb0lNKGkYbWDc56kNb0lNOPoWP9cNzVAwqGBwfPBIGPcNSkicbJB25ZDcbMBg9HDcbqssa9idmUmtqXntKYnJuZntG5nZKZoWOGihzLyZqGy29SB3iGpsb0zxH0DxjLkgnVBg9Yvgv4DhvYzsWGDL90zxH0DxjLq29VCMrPBMf0zxmPoWOGihzLyZqGy3vYCKqGpsb0zxH0DxjLkgrLChrOvgv4DhvYzsWGDL90zxH0DxjLq29VCMrPBMf0zxmPoWOGigLMkgn1CNjelNi+pteUmcL7cIaGicbVDxrFrNjHz0nVBg9Yid0Gy29SB3i7cIaGicbYzxr1CM47cIaGFqOkicbMBg9HDcbKzxb0Aca9igDLDerLChrOkgn1CNjektSkicb2zwm0ihbVC2L0Aw9UrumGpsb0B0v5zsH2x3rLEhr1CMvdB29YzgLUyxrLCYWGzgvWDgGPoWOGihzLyZmGBM9YBwfSrumGpsb2zwmZkdeUmcK7cIaGy3PTx3nOywrVD1bHCMfTzxrLCNmGC2HHzg93ugfYyw1LDgvYCZSkicbZAgfKB3DqyxjHBwv0zxjZlNrLEgvSu3rLCfnPEMuGpsbZAgfKB3DnyxbFDgv4zwXtAxPLrgvWDgHcAwfZqw5KtM9YBwfSu2HHzgLUz1nTB290Ac54EtSkicbZAgfKB3DqyxjHBwv0zxjZlMrLChrOqMLHCYa9ihnOywrVD01HCf90zxHLBfnPEMvezxb0AejPyxnbBMroB3jTywXtAgfKAw5Nu21VB3rOlNO7cIaGC2HHzg93ugfYyw1LDgvYCY5UB3jTywXtAgfKAw5Nu21VB3rOid0GC2HHzg93twfWx3rLEgvSu2L6zurLChrOqMLHC0fUze5VCM1HBfnOywrPBMDtBw9VDgGUDZSkicbZAgfKB3DqyxjHBwv0zxjZlMrHCMTUzxnZid0GC2HHzg93twfWx25VCM1HBe9MzNnLDfnJywXLrgLZDgfUy2vnyxHeAxn0yw5JzufUzerHCMTUzxnZlNC7cIaGC2HHzg93ugfYyw1LDgvYCY5Kzxb0AejPyxmGkJ0GBwf4kgrLChrOicOGmc4WmsWGms4WktSkicb2zwmZigrPCMvJDgLVBKvdid0GBM9YBwfSAxPLkhbVC2L0Aw9UrumUEhL6ic0GC2HHzg93twfWx2XPz2H0ug9ZAxrPB25fqY54ExOPoWOGigzSB2f0ig5eB3rmid0Gy2XHBxaOzg90kg5VCM1HBevdlcaTzgLYzwn0Aw9UrumPlcaWlJaSideUmcK7cIaGDMvJncbZAgfKB3DqB3nPDgLVBIa9if9ZAgfKB3DnyxbFBwf0CML4icOGCg9ZAxrPB25fqZSkicbZAgfKB3DqB3nPDgLVBIaVpsbZAgfKB3DqB3nPDgLVBI53oWOGigLMicHHBNKOBgvZC1rOyw4OC2HHzg93ug9ZAxrPB24UEhL6lcb2zwmZkdaUmcKPksb8FcbHBNKOz3jLyxrLCLrOyw4OC2HHzg93ug9ZAxrPB24UEhL6lcb2zwmZkdeUmcKPksKkicb7cIaGicbVDxrFrNjHz0nVBg9Yid0Gy29SB3i7cIaGicbYzxr1CM47cIaGFqOkicaVl+wDKoAGH+s4JUINHUEcUEs9JEE9RUI3NEEMU++8JowKP+s6JUACGowKP+I3NEEMU+wiMEIiJEw8G+MyTow9SEAvIoAENaOGihzLyZqGBhCGpsbJEM1FAw52zxjZzvzPzxCQicb2zwm0khnOywrVD01HCf9SAwDODfbVC2L0Aw9UrumUEhL6lcaXlJaPoWOGihzLyZqGDNCGpsbJEM1FAw52zxjZzvzPzxCQihzLyZqOCg9ZAxrPB25fqY54ExOSideUmcK7cIaGAwyOzgLZDgfUy2uOBhCUEhL6lhz3lNH5EIK+zgLZkxSkicaGig91Df9gCMfNq29SB3iGpsbJB2XVCJSkicaGihjLDhvYBJSkicb9cGOkicaVl+AWTow5S+wKUEINKUMzKowiTGOGihzLyZmGChrpBLnqid0GCg9PBNrqCM9Qzwn0t25qBgfUzsHZAgfKB3DnyxbFBgLNAhrvCcXSDY54ExOSDNCUEhL6ktSkicbKAxjLy3rPB25fqYa9ihb0t25tucaTigX3lNH5EJSkicbMBg9HDcbKAxjLy3rPB25fq01pid0GChrTkgrPCMvJDgLVBKvdlNH5EIK7cIaGzMXVyxqGC2HHzg93twfWx2XPz2H0rgLYtu8GpsbWDg0OC2HHzg93twfWx2XPz2H0rgLYlNH5EIK7cIaGzMXVyxqGy29ZsKOGpsbKB3qOzgLYzwn0Aw9UrumSC2HHzg93twfWx2XPz2H0rgLYks8OzgLYzwn0Aw9UrunntYPZAgfKB3DnyxbFBgLNAhreAxjntYK7cIaGzMXVyxqGzgvNsKOGpsbHy29ZkgnVC0PkksOOmtGWlJaGlYbqssK7cIaGzgvNsKOGpsbHyNmOzgvNsKOPoWOGigLMkgrLz0PkpNnWEMOVmI4WkxSkicaGig91Df9gCMfNq29SB3iGpsbJB2XVCJSkicaGihjLDhvYBJSkicb9cGOGic8V5z6c55U05As56kEs6zMq5yI2cIaGDMvJmYbWDe9Uq1OGpsbWB2LUDfbYB2PLy3rpBLbSyw5LkhnOywrVD01HCf9SAwDODfjPz2H0lgX3lNH5EIX2DY54ExOPoWOGihzLyZmGzgLYt25dwIa9ihb0t25dwIaTigX3lNH5EJSkicbMBg9HDcbKAxjpBKnAtu8GpsbWDg0OzgLYt25dwIK7cIaGzMXVyxqGy29ZsKPdwIa9igrVDcHKAxjpBKnAlhnOywrVD01HCf9SAwDODerPCIKVkgrPCK9Uq1PntYPZAgfKB3DnyxbFBgLNAhreAxjntYK7cIaGzMXVyxqGzgvNsKPdwIa9igfJB3mOy29ZsKPdwIKQkde4mc4Wic8GueKPoWOGigrLz0Pkq1OGpsbHyNmOzgvNsKPdwIK7cIaGAwyOzgvNsKPdwJ5JENPQlZiUmcL7cIaGicbVDxrFrNjHz0nVBg9Yid0Gy29SB3i7cIaGicbYzxr1CM47cIaGFqOkicbZAgfKB3DqyxjHBwv0zxjZlNrLEenVB3jKCYa9ihnOywrVD1bVC2L0Aw9UlNH5oWOGihnOywrVD1bHCMfTzxrLCNmUzgvWDgGGpsbZAgfKB3DqB3nPDgLVBI56oWOGihnOywrVD1bHCMfTzxrLCNmUBKrVDeWGpsbUrg90tdSkicbMBg9HDcb2AxnPyMLSAxr5id0Gx2n6Bv9ZAgfKB3DwAxnPyMLSAxr5khn0y3nOywrVDYWGC2HHzg93ugfYyw1LDgvYCYK7cIaGAwyODMLZAwjPBgL0Et09ms4WkxSkicaGig91Df9gCMfNq29SB3iGpsbTAxGOy29SB3iSDMvJncH2AxnPyMXLq29SB3iSms4WksXTAxHoDw0PoWOGih1LBhnLEWOGicaGAwyOywjZkhnOywrVD1bVC2L0Aw9UlNOTmc4WktWWlJaXkxSkicaGicaGCMv0DxjUoWOGicaGFqOGicaGB3v0x0zYywDdB2XVCIa9ig1PEcHJB2XVCIX2zwm0kgrPC1zPC2LIBgvdB2XVCIWXlJaPlg1PEe51BsK7cIaGFqP9cG','vevyvfvsrv9nquDFrKLmvevs','mJaYnZKYnMD5C1z2qG','z2XVyMu','x3nOywrVD01HCe1HDhjPEa','uMvMBgvJDgLVBG','Aw50zxjWB2XHDgLVBKrLz3jLzq','wuvmte9x','y2fSy3vSyxrLuMfUz2u','z2v0tgf5zxi','rwXLDMf0Aw9Uq29UDg91CLr5Cgu','rLjbtuvcvuzgrvjFq09nueXfveu','x2n6Buj1AwX0Aw5Zqw5Kvw5PzM9YBxm','zMX5sg9Tzq','BwLZC2LUzYb2Awv3zxiGCgfYyw0','A2v5u2L6zq','y2XHBxa','uKve','y3r4','CMvZDfrPBwvmAw5L','zgL2x2LJB24','uMvMCMfJDgLVBG','x3zPzxDLCKv2zw50','ywrKvhjHy2TZ','Cg9ZAxrPB25uB1rPBgvywq','u3rYzwfTq2LWAgvY','zgLZDgfUy2vtDxjMywnL','D2LKz2v0q29UDgfPBMvY','BgLNAhqTy3LSAw5KzxiTChjPBwL0AxzL','zNjVBunVBg9Y','zgLZvMLZAwjSzunVBg9Y','z2v0qxr0CMLIDxrL','CgfYC2vqB3nPDgLVBG','z3jVDw5Kx3bYAw1PDgL2zq','x2jVDw5KAw5Nu3bOzxjL','CM93CW','zNjVBurLz3jLzxm','ywrKrwzMzwn0','C2v0uhjVCgvYDhK','y2X1C3rLCLnPEMu','CM90yxrLvxa','x2fKzeXHEwvY','zwfZDe5VCNrOvxbuB0zPEgvKrNjHBwu','z2v0t3zLCMXHExncEuf0Dhi','q2XPChbPBMDqBgfUzunVBgXLy3rPB24','q0XbtvbFve9Fr1jpvu5e','CMLNAhq','ug9SEwDVBKDLB21LDhj5','x2jHC2vmyxLLCLbPy2TLCG','lI9SAwiTDhLWzwrHCNjHExm','C3rVCfrPBwu','zgf0yq','CMDI','zgvSzxrLuhjVz3jHBq','y2XLyxjdB2XVCG','u2HHzgvYienVBxbPBguGrxjYB3i6ia','qvjsqvLFqLvgrKvs','Cgf0Aev2zw50','DgLSzvnPEMu','zM9UDc1ZAxPLoJe0ChG7CgfKzgLUzY1Szwz0oJuWChG7y29SB3i6i0vfqJqYmJTMB250lxn0EwXLoM9IBgLXDwu','qMfZzq','zw5Kug9ZAxrPB24','cIaGicaGidXZCgfUpUINHUINKU+8MG','DMLLD1rYywnR','DMLLD2vK','x3nREuXPBMu','qMXVD2zPC2G','x2nYzwf0zurYyxDxB3jRzxi','DMLKzw8','uefvu0u','AhrTBa','zhLUyw1Py19IAwXSyM9HCMq','Bw92zuXLzNq','q2LYy2XLqMX1CLr5Cgu','x3rPBgvxAwr0Aa','x3jLC2v0vhjHBNnSyxrPB24','z2v0qMfZzuXLBMD0Aa','x3vWzgf0zuHLBhbqCMLTAxrPDMu','y3j5ChrV','q2fYDgvZAwfUna','CgfYDgLJBgvZ','s21Srgf0yvnVDxjJzq','D2LUzg93ug9ZAxrPB24','x29UqwrK','BwLUAw11BuXLDMvSig11C3qGBM90igjLignHBgXLzcbIzwzVCMuGDgHLigLTywDLCNKGChjVDMLKzxiGAxmGCMvHzhKU','x2HHC2G','x3nOB3C','ueLoq0HFru5e','Dw5PzM9YBv9JywnOzq','z2v0t3zLCMXHEvr5Cgu','re9vqKXfx0fsuK9x','x29YyML0tw91C2vnB3zLrNvUy3rPB24','Aw5PDgLHBgL6zwq','Aw50','ywrKsw1Hz2vYEuXHEwvY','x2HLyxq','x0rsqvC','x2nVBxb1DgviAwvYyxjJAhK','C3vYzMfJzurPC3rHBMnL','r2vVsNnVBKrHDgftB3vYy2u','x2rYyxDtDhjVA2u','DMvJmG','Aw50zxjWB2XHDgvqB2LUDa','x3nLDeDSB2jLt3b0Aw9U','tgfNCMfUz2u','x2TLExn0CMvHBq','BwLUvMvSB2nPDhK','yxnWzwn0uMf0Aw8','Cg9ZAxrPB25vCgrHDgu','C2HVDW','x3n1CMzHy2vtAgfKzxjtzxq','x2DLDezSywDgB3jlzxLdB2rL','C2nHBgu','zxHLy3v0zq','AxnwywXPza','C3rVCa','C291CMnLCW','zNjHBwvtDgf0zq','lY9HCgL7C30UBwfWlMjKAw1NlMnVBs9JDxn0B21PBwfNzs90AwXLpYz4pxT4Fsz5pxT5Fsz6pxT6FszZy2fSzt0XjMn1C3rVBwLKpxTZDhLSzx0','x3bVAw50qMLHCW','y2XLyxjszwn0','x3jVDgf0zuzYyw1L','C2HHzgvY','x2fJDgL2zuf4Axm','DhjPyw5NBgvFAgvPz2H0','Dw5WywnRqxjYyxK','ug9SEwXPBMvdB2XSzwn0Aw9U','yxjVDw5Kx3zPzxC','zgf0yvbYB3bLCNr5','yxbWzw5Kq2HPBgq','iezquZWVC3bHBJ4','C3bSAxrqB3nPDgLVBG','cIaGicb2AxnPyMLSAxr5oNzPC2LIBgu7cIaGicb6lwLUzgv4oJe7cIaGicb0CMfUC2zVCM06DhjHBNnSyxrLm2qO','x2jSzw5Kq29SB3jtDwjZy3jPChrPB24','i2LMzgvMieDmx0zsquDnru5ux1bsrunju0LptL9isuDicIaGicbWCMvJAxnPB24GAgLNAhaGAw50oWOGicaGChjLy2LZAw9UigHPz2HWigzSB2f0oWOJzwXZzqOGicaGChjLy2LZAw9Uig1LzgL1BxaGAw50oWOGicaGChjLy2LZAw9Uig1LzgL1BxaGzMXVyxq7cInLBMrPzGP1BMLMB3jTihnHBxbSzxiYrcbZB3vYy2u7cNzHCNLPBMCGDMvJmIb0zxHJB29YzdS','Bw9YDgfYq29SB3i','tu9sueHFq09nueXfveu','ufjfx1jftKrfuG','y2LWAgvYDgv4Da','x2L2','tevgvf9et1vctevFq0Xjq0S','x3zPzgvVvgv4DhvYzq','x2LZq2n3','x3bYAw1PDgL2zq','z2XVyMfSqwXWAge','BxnHyvnHBxbSzxm','DMLLD2vY','CMvZB2X1DgLVBG','ywjZB2X1Dgu','CgXHBMvFDMLKzw8','x29UuMLNAhrdBgLJAW','x3nLDeXUz0XHDefSDa','y3jLyxrLvMLKzw8','x2nSzwfYqMXHy2S','vLjuAgvxB3jSzfrLCNjHAw5qCM92AwrLCG','AgvHzefUz2XL','C2HVD1n1BG','rxjVC2LVBG','5y2v5yE76ycj5OUP54k55l2n','vevyvfvsrv9xuKfqx1m','qMLUz01HChnjBwfNzxj5uhjVDMLKzxi','zhvYyxrPB25Z','z2v0tgf5zxjZ','zgvMAw5Lza','sgvPz2H0uMvMzxjLBMnL','ug9SEwDVBKHPzxjHCMnOEq','zhjPBgXqAwnR','x29Uq2XVy2TuAwnR','x3nJywXL','y2fTzxjHq29UDhjVBgXLCG','ChGSidaPoWOGicaG','z2XVD09UBhK','y3jLyxrLqu1HCeLTywDLCNLmyxLLCG','AgfUzgXLtgvMDfvW','Dw5PzM9YBsbZyw1WBgvYmKqGz3jHzgLLBNruzxH0DxjLoWP2zwmZigDLDenVBg9YkgzSB2f0igLUDgvUC2L0EsL7cIaGicbYzxr1CM4GDgv4DhvYztjekgDYywrPzw50vgv4DhvYzsWGDMvJmIHPBNrLBNnPDhKSidaUmcKPlNjNyJSkFq','zw5K','zgf0ytPPBwfNzs9WBMC7yMfZzty0lgLwqK9sDZblr2DVqufbqu5tvwHfvwDbqufNqufbqunzq0fzqufbq1mWBeG5qufbqunyqKLxwe1bqufZvefbquXfD0vbBxb3wufbquOWr2Xvv0HswvrvDZzzmJL0tg1gA2iYsMXmBMH0y0fbqufbqufqrdK0y0DgAMeYvJbjr0PSwJjSDvbtthz1nZHPsuDSA1btsLHovtb3vfHcrfPxAhbtshb5wLzonLrSuMPLBxrQt1DrAvb6ngDqsgC2zuCXD2jxvJbzu0i0yLD4Dwn6Cdrqu0POwKC5AvPuChvJENb0wLHsAeX5swDLrha0yLHcmgf6mgLrv1j2ww1vz1Dfmvfjru52y21vz05PnhDmv013turjz01urtjmAKuYtKrzmu5tD2DnAKf5tvm4D01tohLoAtb4tLrVme1uB3Lnq0fNsunbz0LdqwDjAJrNueHkA1PQCfnsrvLNzuCXC2jUttzJBvjTufnkB2riuNDpAtH2zdnKm0XUy3PmBtL5wNK4Ee9uAZvmEKf5thPjEuXysMTAAtf6zvC1mfLyz3rIBK1QswO0z1bisMTAANbfwLHoAMnTBhDKr2X2yMLcEvPhwtzzv0P2zfHrouLPswDLrZfZyM5nnMvhmxDuvta5sw1OmgriqtzmEtL1y3K1AfPhowLAuZvQyJiWDMvhrNDmEKv1tum5DgjtogLjsgH0yKC1EK9UtJbswfOWufnkB2riuNDpAtH2yM5nDvLxuNzzBvv1wti5DeWZAgHJqZH4tgPbDMmXuJvJr1v2vw1wEMiZvNLzmLzgzg1wDwrdtwLjsgH0yKC1EK9UtJbvBvzTufnkB2riuNDpAtH2yM5nDvLxuNzzBvv1wti5DeWZAgHJqZH4tgPbDMmXuJvJr1v2vw1wEMiZvNLzmLztwLDzAKLPqJrIv3H1y3PWA1L6mgLHsfiWy0rVDKWZqJfJBxD1yJnkBKWYuMPmmLzZwLCXBgjUuNPmEKv1tvm4AuLiAhrIrZv6t25cB2iZuNzJmMH2y0qWAwfiuJbJrg92tdi1EKXTrMTImKPStg1oDMjtoxDHrZKWyJnoB2iZqxznuZr3thLjz2vhmxnIBK02zeDSBvPQmgLHsfiWy0rVDKWYnxPmBuzRyJjkBeXTtNzIuZKWyvDABuX6rxvnqZHPsuHODgjhnxPpBvy0yvDzouLTAdbKsee2thK5Dwn5nwHArZLPwLm1AMiYmhzAwgHWwMK4EeXQqxzjAui0yLD4Dwn6CdrIwee5sw1OmgriqtzmEtL1y3K1AfPhowLAuZvQyJiWDMvhrNDmEKv1tum4AuLiAhrJrtfot2TsDLKZvNrAvZuWu1vrouLTrMTImKPSt21sDLKYBgTpBKjVyJnsDMmYAhzJrhbSt0rzmfLTtM1oEtfSwKDjEuXxsxLorff0wvDjme5dmdrpv1PRtM1nD09uutrnrfLPsuHODgnfmu5pA2X1yZnsAgjTtMXtvve5sw5ODgndnxbHv1e2tMPjEu9htxHnrfv0t0rgBvPtmdbnAKf4tfDjD09urxrArgT3tuDjme5ustbov013swLcngjyqK5uvhbqy21SBMfxnwHIrvj2wtnwDfPxntbtvve5swPJEe56qtvpruPht0rbD09etKvsruPhuKrrEvf6qxPnELe1tKrSrfjerKrjAujRwxPWBwiZsNrzwfe5sw1SDfLxzgXmm0j1wNLjz2nhAhzKrZL6yuC5D09RtNzIrZL5vfC5A1PumgLnEuLNy0DODMrhoxPHrZL3t2TSrfeXqNLImLPWyKDvouLPswDKr2XTwMPWsMjxrM5AvMrWwKHsB1btstfnveLPsuHsCfPTwtztvZfOwJjwtvPxnw5Kr2C5swPfmu1PswDKr2XTwMPWuwfhotbImJfSzeHkCfKWBhvKr1z5y0HkBgrhrJbHvZL1ufnjEuLPqJbHv1PTt2XoAgjyqNnAwe5rwLHkuwfyAgXIrdbPtxLjz2rhBg1AANbzvw1wEMiYEdfKr2X2yMOWAu1tohHjAuiWyvDABu9SBfnAwe52yKHwmgfxoxvqu0L4thPfAuLiuNbABvK2vw1wEMiYEdfKr2X2yMXwDwfyutLjAKvPsuDwngfxwtzswgHWwMXABgnUtNbImJq5swPbEu16rwLjr1y0yvDznLeYoxnIm0Puy0DgALPumgLoALuXtxPvAuLhvJrHv1K2vuDSnfPxEfLsr2X0wLC1EMfxoxvqu0KXtvrjAuLhvJrHv1K2vuDSnfPxEfPsr2X0wLC1EMfxoxvqu0L4tLrjAuLiAhrJrhbey21wAgrhvKvzwfjSufnjEu1esxHmvef5tfrjELzerxDpAKf5t2PrEeT6qtrpAKf3swLcngjyqtzuvZLRyvDAnvjhrJbAvdbPtwPbEu1tmhDnAtb5ttfrEe1eB3Dprg8WtKnZD09eB3Dnq0LNzuCXD09RmwXKr0zRwvHsAfjhrJbAvdbPtwPbEu1tmhDnAtb5ttfrEe1eB3Dprg8WtKnZD09eB3Dnq0KRsur4ngjyqK5uvhbjyvHomgiZsJvqAue4y21sBu9StMXJvdrNueHkA1PQChnHu0j6zevwmMreCgHzm1jWyJi0ouLUtMHKBvzRswLcEMrfvJjKrhbWyM5omfLxnwPAvwXfufnkngjyqxvHv2XRt21ABvLuAZvAAMHOtfrKAvPTuxrorgn4tMKWne1uz3Dmv0PTwLrvEu1TrM1or1v6tLnjz2mZuKzKBLe2zdjOBgjQmgLnAKf5tvmWD01PmhLnmvf4turVD09eBZboq3n3t0rVD01dswDJm1jgzg5rnMmYow1KsgrOy21wqLOYvNvKrdbPuvDsDLLTvwDvr2H2zeC5EMfhoxDjreL4tgPjz0TfmwHzmMX1zeC5EMfdA2Ljse4WuLHAme9TtM9zvZvUwLDrouLPogLmEJrNueHkA1PQChnHu0j6zevwmMreCgHzm1jWyJi0ouLTtNzIBLPSy25sBfPdswDJm1jgzg5rnMnhrNLzvZfSzeDwEwn6mgLABKP2yLncCgjxrM5AuZLXy0DwBKLiuNzjr2X0wvDKBeWZqNvAEuL2ugLbognTuM1pBxHWsuHomfjywJbpBuzQzeDSDMjQmgLAr1z5yvHABfPdswDJm1jgzg5rnMnhrNLzvZfSzeDwEwn6mgLzmJL1zg1wEwrhvMTjr1P5yJiWz2fxmwHAmLv2yw5cBfP5qJbIEujWyLDgBLPtoxDIBwnPthO0z1bisMTAANbZyvncEMrfvJjKrhbOwtnsCgiYndLjBK5Ozg1wA0LPqNPKrvyYzerWCgjUtJbzvZvQwLvSrvbtsJrIwef1yvDSA09QwxLnAMHQtvrbmuXuz3HABvv0tKrjD01tmwLnrgT4tfDrnu1eqMLorfv5tKrwAK1dswDJm1jgzg5rnMqYAgXIAJbPtwPbEu1tmhDnAtb5ttfrEe1eB3Dprg8WtKnZD09eB3Dnq0LNyZnsrMrUutzJmJLTzeHKAgnTvKjAmLz1zeqWAvfxuNzzBvvNvuDODMrhoxPHrZL3surjEeXQswDlrtfOwtjSDwrhoxPHq2TPsuHomfjywJbpBu5VwvC1BLPxutLjAtHPthO0z1bdoxLAr1K2vtjwEfbPqtHmm2H0y0uXtK9RAhbJm1j2y25Rk0LeEdrIwejovfrWrvPysNbKBvzRuM5kDMjtqNPKrKPSwMPWCgjUtJbzvZvQwLvSrvbtsJrIwef1yvDSA09TwM1zvgS1wMPOAeXuzgLABvf0tKrJEe5PmdrnvgD3tfDkBvPuvxLnBuzTtKDvEK5tswDJm1jtwLDznLPhowPKvZfSyM5ssLjemgLoEKuZturRnffRwtrnree0ttbsrvfRwKvorePeturnEK5eAZbpvu5ftvvnAuLitJbvBvzTt205EwfxzhbIBuzZuKC5AMrxmwXIBLjkuKqWAu56rtnnrgS0uwTzne1eqtrnmfjfuwTAru5esKrnre16tKrRme9vtKvnvu1PthO0z1biqM9Im1j2yZjODMneCevImK4XyLDwDwrfrNvzmLz6zeC5Ewn6ngDqsePRwMPWq1LxyYTjrhH5wKDznMjhAYToEKuZturRnffRwtrnree0ttbsrvfRwKvorePeturnEK5eAZbpvu5ftvvnoeWZsMTAANbZyvq0z1bdoxLAr1K2uw1gBLbPqtHmm0jVyJnsDMmYAhzJrhbfyJjomwjxvNvKruz1wtjwEMrhoxLJEJrNueHsCfPTwtzrBwWWyZfcBgnStMHIwejZwLq0z1bisMTAANbuwLHfk0LeEhLAr1K2yKDRk09eD3zJBvjTt214CfbPqtHJBvjTt214CfbQzZHmm0PRwMPWC2fungDqsePRwMPWC2fundrqqZL5wKDznMjhAYTjrhD2y21sBu9StMXJvdrNuem5mgfxwM1pA0PWzeHouvPysLrzvZf3yKDvk0LeD3zJBvjTt2TsBgmYtNLHweiWyvC5DvbPqtHmm0PRwMPWu1jfwsTjrhD2zurWngjyqNrAwfjOugLbofaZAhDzv05YwLHrz1PxnwTqu0P5swO4k2G5rwj1D0fbqtaXsLjfrLvLsNP0m1r1t0zwA1fctKrVsMHTrwTeqMDADJHmnuDnz0LJuNzizZvYEuruAuHlBJK4q282n3eXnLq0l0HzD0LbvKHTk0rNque3rK1bquTduufNqufOu2jkmdnvsufhq1Hcuufbq2LRqufgreLfuufbrKXjquffqwHcuufbq2LRqufgqM9Vz1fbuuiWugz3qw9WqufbuunhDKfrsKfjuxnbqujtEufbqKfjuxnbqujtEufbqKfjuvvbqufVnufNq0frCJrfq0fdrLbqD0jVsKfdqufdrKHbrufrq0vqzNDbB1PbrufNruLLl2DcuxLbsufbsvu4l0fhz2Tbvufbqxi1tffbquTpuY9MD0fVwKffqwDfthvbqujbsvfZqufcuLnbqunNA0fjqufjwgnbuunbuwHzqufdAgTbuunbuwDVqufcuLnbqunNA0LJl0fcu2fkqYT1uxDbqxu3D0zbqungrKfbquTeuI8VD0nbswHzqufdAMTfAufbrKXjquffq2HtzKX5t2DrqxnnDvHbquDNA0XJquflq1fbz0fbAgj3rKfbq0zgqufbs09rsufbquTuwKOVCMTnqufmC1vbqufVnufNqufbCJvfAufbrKzjquflq1fpD0fbvuvNqKfjqKnRk1rwzffNqvLoy2TLwe1KqwDewu5vBMvyB2nbquHAtMT2zLHjuunbwfPqA3yRC1fbtun1u2zmDMrrz0fztMnRzvHJzefNrfK1uKLNqujtyuPlk3zrD0fbDs93v0fbqvvTAvjqmxLfqwDgmLq1sevKqwDewu5vBcTyB2nbquHAtMTTl1HjuunbwfPqA3KZvuLbr0rysLbSoeHrsueYrfzkugW2sefbqJjuwKLqmxLfqwDgmLq1tK4Xq0fcz2WWDufbrKjVA255ourNrue3sM9RmZy5refbqZDkC21qnNHbqxDdnezbquflk1mWqufdAwTbqujbB1vUEtz6B0vbtermsffbquTluufbrufOuNDbqvvhAvmVtdrpqvfeC1vNqufVsKfQqufbB3bbqufrs0zkohy5munbqMDSEtHcqwTdAfnMsZrez0vbn1bjv0fbqvvZz0fbuungDKfrqKfjuxnbqujsu0fbq2DRrxvbquzeBYTuB0fbterqBhDbqM9kqunbqungrKfbquTpuxrbqufVwKffqwDfsvDbqufVCefbqvfdruzbquflDvfnqufjvxnbqujrEuTLqufHq1fcuufbq3jRrefbq0ziquvbuunftefbqvvZz0fbuunftefbqvvZz0fbuunftefbqvvZz0fbuunfrKfbquTpuuLbz0vjv0fbqw81tgnbquTduufNqufOuNDcquvbAen3qufgteLbquvbAen3qufgteLbquvbAejrqufdDMTtsufbvxnNqufrq0vgqufbs0TrqufvtwHYz0fcuxLbsufbsvvvqufbBZvbz0fbqxbAqufdz2TbsufbsvvvqufbBZvbnefbqLq2qtzNyvbrnI93uKLMqufbquffBezuA1n1uw1dqW','zNjVBurLz3jLzxnbCNjHEq','yMLSBgjVyxjKx3bYAw1PDgL2zq','ue9mwuDptG','D2LUza','zhLUyw1PyW','qvruqunlx0fsuK9x','ugL4zwXeyxrHDhLWzq','C3rYAw5NAwz5','ywrKzwq','x29UvgLJAW','x3vZzq','CMvTB3zLq2XHC3m','u0LhsfrFteLorq','v2vItwfWvgLSzvnLCNzPy2vjBwfNzxj5uhjVDMLKzxi','ug9SEwXPBMvhzw9TzxrYEq','zgf0ytPPBwfNzs9WBMC7yMfZzty0lgLwqK9sDZblr2DVqufbqu5tvwHfvwDbqufcsufbquftq0fzqufbqLD6BZvyqufbqunyqKLxwe1bqufZu0fbquXfz0Htm1G3oefbquiRA2XfuvzrngPAmLvumMDuuvjur3y1BMq3rZDuC05UvZfrAw1xqYTdz2Hcrxfkn3ntvhG1mg9nm2L3AgvQu0O0odzknhfKv0X0nKPyC1fKufzKuKrQmfDrqNffzwHlsM90tgjfyNjmtKP2Dg5ABfLTwKv1yJfYtePcoe13ocTIovP0n01LmfbPt01zk0TNr3D1Dwj2m2jHm0PlAw5QvwzcAJDKqYTenKWXDhqRodjqA2u1l2fNBNnswIS0r0mZoc9PzvbznNzyyMnttejUwhrvr1HUwwrpyLfxsJHcqZzZn05QzuD6EuPMDufytK9or2DtBJrtuunxEgjzruuZm3Hfq0WZELORv3LfDNbMowDZwhbUmgrwDuz1u0TNEgTJqvmWr1fZDKe5CeLjBhLjmwn3zxvsqLfjAcThrunKzgS0ANzmBJyYBLjXAuzuvgvzv2D0yvr6yvbxk0HfDfflzwfIzwjJmM14CvnXteuYqtzXtZn1EufLtfi2CMrxwvyVDw1buem5uLfQDxLYC3bvwunLwvzfmwHKDMvPB0LwusTzyuPtu1q2mZnTuvvswJLlDwLewJbJr0vdstvZDwvHA09UrMPmr1Ldq3fTtKn6CdjwB0zMBhfYn1bTqMfOyxnxk1furxDxzKz0sZHXAK9xztm1z2vkmfH4qZvZv25MneTWk3jjEhviA0zsn2jlBuGVk1PgAvPet25smgXUug12qvn3su9LmKy2mgWYtwjUtvbNnJLYzdzLmwzcsNblrMe0odLAuui1BZjrs2W1tduZDI9jnhf6mLDgshrXwMi3rg9hm2LmqZKZrevzDvHqsw1OzgXlrxH3Ddz5B0i1oxrKl3PMEhPzDxvitLy4t1O1u29KBfvvs0KXCKTXrMq4rgvmrNjowuiVqtzImvf6ouv6uK1bqufbqvnvvK9ssZvdwuLjpq','x2zYDxn0Dw0','x21ZrwW','q09nueLmrv9tvefuvvm','B25fzgL0u3rVCa','BwLK','uMvMBgvJDgLVBLr5Cgu','x2zSywDZ','zwrNzvDPzhrO','qMLSBgjVyxjKoIb0AguGC2L6zsbPBNzHBgLK','x2DLDfzLy3rVCG','yNjPy2TdB2XVCG','BwvZC2fNzq','D2LKz2v0ignVBxbHC3m','x21HC2TvCMW','BxnHyvn1ChbVCNrLza','zgvSzwDHDgu','x2XLBMD0Aa','Bg5Ntgf0vg9qB2LUDa','zxH0zw5K','x3jLC29SDxrPB25Z','zMLUzv9HCNjVDW','EM9VBunVBNrYB2XSzxi','z2v0q2LYy2XLq2vUDgvYt2zuAhjLzvbVAw50CW','x3jLBw92zu92zxjSyxK','x2vUywjSzq','rwXSAxbZzuDLB21LDhj5tgLICMfYEq','C3fYDa','te9brf9quK9huKvtuW','vefjtevex0fuvefds19buLjpvW','C2HVD0f0Bw9ZCgHLCMu','y29SCW','zgf0ytPPBwfNzs9QCgvNo2jHC2u2ncWVowOVnefbuvnRwKPsz0fcqvfbqvnbqKLbquqVnffdtvjyAhbAz0fbvfuWquTNqufbqwDbqLffu0fbtufbqufcquffqufbrwfbqvvbqufbqKfbquftz0vIqufvqufbqujbqufbvwDfB0fbtufbqufcqufjqufjzhbbqvfbqufbqKfbqufxz0fbqufbqufbqKLbqufbqvfbquffz0fbqufcqufpz0frqurbqufbqvfbqKfbq2Dbz0ffqufbqufrqufbz0nNqxDbrufbqufbuufbqvfbqufbqueVkZbbt0zcB2iZuNzJmMH2y0nbEKXQqufpruPkvffrrufbqufbqufbt0vksLrruwXbqufbqufbutfcmK0YwtHbC2DuCgDbBvK3ugHdzNyVqufcruLbuufdqufnqKLNqunfuuvervfil3HbqwzbqufcqLffqKfrrujbuufbqufbqufbqufbuuLeqKfvr0j3z0Pdz3yVEefdmuvbqunbuu1eqwDrrejrvuvcqufbqvGWqKfNtufcqKvgrwLfEffrwvrvv0visw5fvu1Vr1jVuwDQuxjiqKzwtfi4q1f6ww5lq0nrB1DgEgDAr2LvBuP5z3blALeXtMPJne9uCersrvzhuJbOsLnStLvwvLPyv0zSyvKYuMXABwrVyvDWEMrivJjKm2G1zw9prwHzyuHPsw1lA3bpvwXAyvHTsM1HB3fpA3bHyw5Xs21XC3jpmhrIytn1tg02D3nqrxHJyKH5tw5lmhrqvtfKyLGYtM5HngvmAJvpwg01k2PWnNziEtGVvde5DMy0k2zYl3HbqwzbuufeqvffqKfrrujbuuvcqufbqufbqufbuuLeqKfvr0j3z0Pdz3yVEefdmuvrqunbuuLfqKfnruj3vuvcqufcqw5Jqufrsurfuvfgsvrfr0vRrLjcmKz4rxLjEwDrz1vrCeDOC2nfsKL6tLm4qLzPy3rfs0zPuta0u1H4rNHNwKDPww5lq2TXtLrzm09eAZzrmfjguMTKsvnvCfrwrLzxvJfOwLDTtMTAv1PUyuDSCwmZuJfKBMq0zvHXq2C0u0zOB2vjAvLXu2S1u1zSCgvzBvPXAw82u2XWCwvVCwfXExm3uZf0CMu0DwjYq3C4vez4C2zjEwnYuZa5vfyXDgzzmMrYAtqRvgW1DwzVnMvYEtGVvde5DMy0k2zYlZj3qKrbqLfrrujRu0Dty1HgEwn5sMG4Bu1Png1kAvLTtgO0mu5uvtfovdvfuvvgqLfvrKjsrvjfuKvsrvjfuKvsrvjfuKvsrvjfuKvsrvjfuKvsrvjfuKvsrvqVmNDcrefsvvPhu0fJsunzwuDdwtjkAufTtMTrmKT5CZjsrvjfuwPwq1jfuKvsrvjfuKvsrvjfuKvsrvjfuKvsrvjfuKvsrvjfuKvsrvjfuKvsrvjfuKvsrvjfvc8ZuuffqunelZjNqu1bD0vbqwHfrevrqs9bt1fiv3a0muPXrMv0wfLcBMLNq1Dlse5xBhrZmvP0B1fHmuLYwuDNreCREtb2mLeXmef0qLmVwKjrqNOZmLeWDJjnmtbimLfvB3rsuuj6mZjnmgzzALHtzLPSChyYzgfbt2qREeDSk3HhDwHgDJDvzLPsuuj6mZjjmg4Yr3vQk3LNvwzAz2vSquHpl1Lts1bZtMrgow1bCfbjv2DeBNzZtKGYr3q4mJrWCgDgquDiowLVk3HLmwjyA2LQExfbtvG3rLnMwweZvMLgudHNvufJogjjAw0VwxPyu0nbr2CYCw1Nrg1QwM1Rk3LhDw0REuXtr3LcB0e1BJDjyvbZChjWuhnjCerzk2Xbse8VwKrsowXoyJvZEuTzyLHiywDercT6r2SREw10EJDouwjIrKfhrwjvmg4Yyxq3n1bvyLC5quDkow5Vk3PTDfPVqu90sJvzn1vbwKP0AuTrD1zXAfjtzvD2vvvbwMyYyZbMwNPxBJvsrKW1vKfhwdvcCgzZEhjvrvLivvzlswGXsdyWqvKVmLDQn0THmLbkn2TdANLwugvNreGREw1Rk3PTDhnrqtbMwNG2vufzBJjzmg90u2eYEMjenLu1yMziu2DercT4r2O3sMP2vZrzugfVBwPiy1vbwKGYu2O3sfDWnvnUCfnLvMLNre0REdbUmLa2mxa3udG1ChjcuJfoquDHyLqWqNb2mK52u3rSueXiv3brmfLVqxDeyu1pmu44AKHvr3q5mLz2DtuVrezrDeDttwjQk1fVqxHMsZLlwhLQnLzXuge1nxLMEhf1mePvmefvAKrvthbPDfb5Ddfru3G0B0f5BKDlAvbxCMnXmvvICLfclY9rnu9qCLDQyKqWCK5yCLyRmK9eELfcmezWDdCXCxHSuLDgre9ZwxOVu3jZvJLRng9bmLbnrK5mmvDxwuHYEfzOqM5Yuuf2v2T3udCXu2Tjt3zgvxbYA0fiqtvistL4uujqBe83vwzmmMfZvtn4EMPgv0e3wtyVA0TbtKvtrhnHzuHowtvJzZK4mvLPDunNEvjUmxLHqu5cANHtsZjcvKfymI90oujuDNrcl3DeCLvbwfmXs0jTCvf1rdzwsJv4uffvqvDQz1zfy0DVv2TzAw9wndCWqvD5twnvnvK4mvDerwreAw5YtxC0l25rqMnxtuWXCvr5muzwrwTkCwrLzxrbrgLcvwjhCgDUseznzgDNELfcwfOYsffvCwX6mK5nys9vsee2mu10mfziudHbt2Ddt1v5z2rnvKf0D2u1EgOXCtzIELbethGRzfjhu0iRrgPoquvqmMS5vgPimxbey3i3vwT0B3jey2XvoxbvnhHrqMq4ovq2vwPtztrXCuzzoda3sLHYuujjwfHYvernrdKYB3L4wtrvyZLlDfi2zKLLvdbquezbrLK3Bxb5mNP0mejYvxq3weHwyxvIuxzbB0f4qNa4AdzQodzRr210m0LYvKTmnJfgsKDqwdLHqu01Dfbjl2LgtIT3C080Cte1yKeVs1fqmxfwvMj1yufludjrtdK2BMjfu3rbEhiWsNfYsKfYkZLbrLrNogLRBffzELryqwPhwKCVqvzvzwvkEJK3sgjNsezbrhDVuhnMww1Tt1HyAfDoufvNAKfpzND4vfHQmI9nv29byxjnudrQBw5dvNGWyw9Pu2vHz2TSmJLHquW0Bwy4qwLjk25tBw1AAu1zsfb2v2mXmeTRAMXkr1jTz0m2Atu2og1Qn09emwfXm21RyZvXEKz0zM5YAwDcnhrRugvRyungt0nuBxa0nhHQsJzLBfvIChO1z1PLBu9lquPureD2uw1TDuf2qK9nl3DcnNfWtZDYmsT0tuXRy2yVwe5brNPTuhvlzuPuAKe1CLaZtZn2vwLXy2u1B0fUrwHcD2vHBLzwwwrZvKjiC2PiEM1RytvsuvfUnJbbrxfOzNuXvwTpywnyteHjEwzxB0PhufrcB0fXvgLXtgrHDhPfotzXtJfVqs8VuJvgvhPwCuPQvLfKyxrsy0HTz0rsAgT4muDMCLD2qxnequu5zNjxueHvnK5QA1vbyw8YAdL3yMTKALq1yNGXrZvwEu85wMPuyJHgDw82sdfXD2WRrKDinKvKztLbrJzpoe13qvLiqJy1ouTVEhL2reLvnNbUse5lC3LtzeCVqMHNzM1lzvviyMP2DdyVBffcrMqYz3O1A2zroxuYywLNBKSVstnjouSXsu00t0rRvLuXqZfcvhPvr0npDuTbstjREJbWtM1LCc9xC3P6AJn5ywnZEKG3DwmWqwe2uKvJnxOYCvLmENLJvM53Ew1msLLftJj6Efy2mg1Az1DModzbsMHNztLdEKeVl0fgnNnjquj6mZDwvMXvu25HtNK0oxvlquXdngjYvuv6CeDLzxbXCeT1EhzSsK9Lk2vlAMjJv3KZv2Ddzdv0DeXizefUqtyRovzysKf4vuT0nwzknZbbyKvJl1bovhe1wNv2rLLPweDqBxf6rMvOvtyVtLfcDxeVsfDTtwHICJi2vMX4nMDemva1mvLyvJrSngi4D2mWqvzACKOWzMzftxi5n0HLCfv2vuH5Dg5iDfyXtdjdzMHhr1qWsfeXBdzOyNrhEgrsoha2kZfbrNCZq3q5D2LVwhKZt1fMD3joAM14me5uAtz4mw9bDvf5Bu5PttHKs2uWCxyXshvem3fPyM5KD01vmtvdt1qXoxfbtdjol3Dcm3jvAfe0r2fVCgrqmeHuDLr6y00ZsM9bwgToBNbxCLPyD1G1sKnqwtfQyNnPBwjLl05bsfCRzw5rrvzistvivdLlnwzJm3zur21Svs9lEeG0mefHoxHLAu0VtNDHChrXr1rQAKzwrgn5tu1nEfaXCuuVtNPrqNn4whnyyZrWogX4DhDJwKi3AxnjsM5RsdHlBMLUtvnSrhLLmufhDKHJtxPKt1bvBw50y0PiD3Pzntq0CwPizxHOzJLYmhfhnNzonunIutjuEdy0owfbstC5ohnKChOXCxnYqKfdBNLUAJn6vdDQwKnJDNOVCZqVCLzMywO1tvDJzw5Wk0zbrNbWvLHcm1PqDfnLy0G2BM1Xv3HOnJHKCw1QyMfpmMzHz0nJBKzwBLvJBNfHy3O1ChvsuujxEMC1stzwwvy4AMLSohnhAfL5rdDvqvnAqKDek2XHzhnjz0r0nfbVvfDzu0vhztLprNLbzvj6uujWwfjKuM1qBJfYtg1Rws9Lr09LsZbIyu1ZtwXPuLmZC082twHrtsTWB0f6tNbJwLHRk2DWneTOy3fpzwH6vK1ttKuZvwDPCKf1AtuZshiWt1btz0nwBKCZALaWELviEKGYCxHisKDsz1LclZjOvhbzv1joneDwovzoquvvvNnArgDKzMzPDeCZC1zvngjcugnKyw9xCNnyqKe0Cs9IuYTvnurRAJyWqvHTDgTrwNHPC3u2rvrfneL6v25nm21luxbYBwjSsgHkqI9pz0nUzhj0sNfNEhPwDwr5m1DXvgrHqvaVuZvbzgfZuM5Kmu5rs2vHBvznouTbthnuneHov0e0CwDbuJfXvfbitKfgANPLy2rsnJaWDvHps2DjsuC3seH2vM16u05Ul2zAntzby2zUuue1q1yVD3e1rgrQwNnMueHrANrwD2fAqvj2DZiZAM8XtxvKtgPwy3HUyviYsNPrqxf6BuHewNLWt04Xwdq1qKTnAKHjnujYBw83Bg95vwjWBKrbkZfyndDOwxDyvNvrzvbWl3Dev29bzhfhBKP4sKz3rde3Aw9Izg9IyMmYzhHiusS5ytf0t3m0nfbvy2LZwfvotMeYsMTyn2HquhrrqKjmy05osvHIDwzyz1zYv0W0wdvJyZLJBKPYq0DcvMLdvfK0t2veuujZzMjSAuPcqKK5yY93qxfQys9esgPWmI93rhiXrLbgr1vhmxzTnJu2nxOYrLvMtuS4vufHBM5SDwvqExfhv2r6EvfnzxrvDK9qCLnhzLbxz0n3wMmXqxPLDe1csJzvAfLkowfbsevUDJbWEvi4wNbjmKXJneOVq3jinZuRAw5QC0j4AwDdq1rKmKzsEvP4EJfXvdDHofHcqs9hBLf1wNO4ExjQk0K0nw9bCuz5t2XHDg5XthfbsMzTvtHLCezxsu5nDff1nw1mwJzbvtu5seeRytnIqKHpmxvUntbbvNiYquTqt2K1vtHRrhq3mvi4mgq2C3zqsKe1u1fzEND5BJnXCK5bvITAt1vqnLvbv1uYDsSZt0jQogvqu2TKBerMs0ncnKu1CwP2t2nNoda0EKvUtKfhBuC5k3zHCMnoDvPcAZfNk2numvbiDfCZyvHRu3fcDKfqvejoquzNB2Tzk2rek0HouxrMuuW4B3PUnLzIodrnrdGZC0C3vLDSog5hwK1Al3zznc8RDffcvMX1qtnpu283vLzSA1HZyYS5tgrcudrtzLHUA0DXAe9pAhPrqK41BuTdmLr4vevPm0fRogvUDLronNj3D0LqzM1NqZzkqvjNzM5vtgDXvgS0Cg4YAey1u21twfLSr0C1ugjgquvRyZbJwu9JBhfgA0n1sgjjsg9uBxfsss9bvMyRExLusuHttNr2yKHql3DczwDdDMntAdj3DLnYzhjirMDpD0PjuePICdLlCITtvxPSserMn2GVBMPguNbbl3Dcn2fMEJzMAffcB0vmsxjtzevcD3bksI9xCZvArg1YzdjZA1vtCvj3ztLAnfjQnJbbwhCWwtrmwvaWsNbRCxG0EuneouTWnhH3yw1QwLa0DvbWmu5brdfiCdbXy0HbnJHwvwvrzNDAmIS5ttnTz0mXsKXUCfnWtuz4DuDLovyWtKSZrKfhDLPyDZncrZv5zvbHDenKtJmZvgCRmZLHnwHuAMTwDwfAzgGYohaVDKvMtcTgquzlnNr4r2zTr0nLm3rwvuLWkZrLvdjqrMrpoxvYAKXbrNv4rMn6zvf0yNLRtNLLDKH2uueXz1zkvtLsvtbJnunSvdLrzJHbnJfvExG2mdHpCdyWqvHct2vVD0TQztrAEgH1ywDeqwrevcTVB0ffBMvqn3b4vwm5mhO4tLnqvurUC2fbstnzzhfXDwnTCfDovNOXB0eVl1q0oeHcCtfis0fntJm3mvvWEeLjnw9bDgPKDxDQyYTTyw1QDuPbzhnPCwzMrLOYnxnfzM5TCfLdEKHkuefVqtbTAJnMzu9qwunXohLTtdvRtZC4tvvVA0DeBK9LEdLlr2PAuvmZve9cnZbbvZLlDvPAvZH0q2nbrM00l0XqDcT0t2T2whL3teHQz1KVBgOVsNaYBvDRD2PnCu1vuMD3EwuRzLfKl1K5s2zLus9AtfHIru1nmKfxnKvUmeGWrKfhytbWAYTzowfMq1jUrgrevMvkr0Drl1rZztLts2DizNb3s0fosKztserWsvi3shbwnKrvmwnLvfbQqJrerg9HDZfImxbWtZnWuujADM9qswSRwdDWnuzwz3DXwdDtsKuYu2rpmZfXCZjwufa1mefxqKLsmdqRBejIufbLB0eYywTcB0fMAZa0u2v3l0TVD1nHwgjrqK41DeC3tLjNvs9WuujnCKTpl0LWEJnvAu1erZviDLzzBw1Rmefxm3vfBsTHvurjnKvzqNPwv2vHtKz3ALO1ou1eBxeWAZjcEJbXBZCRwwzrvufIru9XAgzRkZzeENLMogL0ohLZCujVAgTzEvnemJLJzdy0tNuZCdjYy3m5yJHVsxa0D2vtzLqVsw9bmgryA0u4yxLVqNvizJe5DJHbnNHYuhrYz2C4ofO2k2XHlZLVvZKXsdbbEwuVvs9OnLzQu1DmstrnweToBKfilZe2qumRuLLPr1HOvY9rmvzevsTtvgvWAwyXk1G4s3bgExz5BNflquXLn05pq2SXvvDMsfDYCvnll0fVqwXQodjqn3bpudaVs3b0n3PerZnqCM1UsZbXuMWWsefhy0H2Bw9mzwrWvgHuAhvtEeHbse9ck2rbrwfcD1rQuezuuLjduMDom05tn1vSl2rXuM52EMTUl3DdDLv5B0zjuhK3CZrjyMC0k2G0B0fUwsTxCwHZwuHKBZHPC3KRt1CZs0j6nKrQoeSZws9TuwS4wtrbstqVEhjeDNjVu3zNAKHiyNbrqLrfm21Ms2nenJHvCNrQDhDMu3fvC2Hzn2W3zM5urgnpzs93q1zbrJv6r1Dbm0vKk2XIzhzKCNrduLngsee0EujNmxLPDvzpyurju1aXELfcmfyXCtf5m3LIDhbiqJi5nM94EMXxEJnYufnJCJe1l0DYrvvTl21NrfLUmuvpBu1IvdDJmhKYBgC3AKPqCwvSwMPqDvbotuXznMzWuuj2tMjswefkAKDen1zSELf0qZjeBJHHAgGXrM8YqKHqndrYvg11Bhvzz3Hpu09sz2nPz0rprK93uLvtm0fznfbhzw1LAhfLr0X6wenNneO2rtLnmefbou1MBfnfoda2yuDxrtvKv0HInvjRy2q4mvvoEurrqLO4EKHgv2jtuwLAq1bysduXBuDustq2BM9lm2rjmdrZuK5nrgDMzeHYl1DNrgn1CMO3uevysePbEujys3PyAhvhm1bNwNjYwgLQBejwmureCfDkzgviEgT0yNzNzJnynueVshiRzwfbtwHdCe9ht0i2nhPvAenez1aRBePoCgWXrhLwreqXutuVD0flyKrIu3vLAfuVD0mWq0TbsLzNzKC4rdvsEhvqqxPur1LQzY9WvNqYzuzoAMDfzZviCc84qvHXAKXJBvfUsITNovbWuueWBw9Ut2fKDJrjCu5QuujdovjiCLvYyZffzxrbsc8Vvtq3DLiWCgnAChrbq2S1nJfqrsSXudfXDfq4ofLVqxrxogPLwunMDw5Nl2PxBZb2BvjSvufkuef6mhjcrwPbntLlmerknwLPu1bOAhDsnJbbzeXWohLqDgKRwdD1nZvLt25infzUyxzJn3bKzZzjvdfqzKfYrMD2CgjLuu92vvPcsKHprdfgsMrywg1tr1fKvde5l2vNqZr6Ctn6wxDquvzdwhLJmvyRmguXtMfJBNb4uujnodvwC2r1ovDbuxC5ALDHv0O1tLC0wMnYENHPz0nqugXUqJvvBNbuDK1nwKfisvbzmgPgqti4zMW3mdb5nYTtt25oquv5twPUAKTRzwXxrLvQB2mXuKTOBujvowv1rhPvDNPVzuD6nMnvqvC5mK9ds1vptZfvmxvPq1eVtLrcBgjRr2Ddy3zuuZLsntK2utGWqvnhuurYvNuYA2DzyLD4Dva5n29qEhjnswj2AKH2vuPMy2niCg5hqLfcCLnHzezpq1KZqNH3y0HhudzwBg0WA0rfrvLbne9JzJvqnfzpC3bQuxjhmJbAn2r6mZqRBgfpBITysKDjwLz5r0Hiudq4zJbVqxDkqufJrhfpDfiXB1HMBhD5DKDXoeTJthGVt3fmsfbqyZbbqwjhugfWAgr1uvf4EJniC2zxCtLgquy1CgX1qMS4t0r5udD3ovi3AJLLmvyZt1bSyNqWtK5Ot0HcEMPRyYTUtLHICMf6rwr4nMqVy2zxz0nVrNG4mZnOn1zore9gD01hCxzlBMPPBKjUse9Hqu5ukZfQDdjQsuDnws8RDfDzv1PZz0riC0TrttftuM83yZr6owfbte5ZngPhmfOZsgTUCgLYuM5bwgnxsLbyt2mVCfzkvKm5u0fMwtfhogDhn0j3zLLKyufozxCXChr4AMW1qJzfzgf6ovfku1rdou9tCdLrzwfVwKLpuJfXzduVt1reohn2utbbvNLJBKPVCfn4sxHtvufct2v0quDHu25SEMPbncTSqurunLzIDezpq3C3vLrYuwDhmKXQAJfVqxftt1e1ChzTtM5ou3PWEMTwq2D5uuTbshfVueXMCfv5EsTwExb5t21lBfjbB3HtzvD2vvvbt2PTAMX3sKjUsfrov0LAEevwu1e4qtvrkZfAn1e3uNviwhvlzhy0qKORwdLsuujLDu5uwK14zMvyt1r6mtq0CKOZndzwtKLfze55AKjcCxrrqKTZBta1sfGXCLjQDLbluwjUtZq5z1r4v1vlA2PrDwnMBgLNrgfuvtjyrfi1mM5QCvr6nZfMDhrzm1LfBunem3jdANqYuurJu0iXsxGYB2qXqtnsCvzhzNzfowz3B0e2zhjNu0q1q0fMCg1RywjAohHjugjWwe1Yt1CVAue2wtC4kZrXv083Bwncy0e5k0Tbt2DMntHAquLYtxvKugPRk1PJzY9WvdDHzvLcv1Prqwvqwc85vMfJA0OYAhr1uJn4uuj6vfDYsJCVu29TvwPXt1bxDhvtmKjpnwnNk2XrEKv4BKrKrdnVqxHhk2XsrvLYuw1jtLvyB0eVovHQAwnhBtbWB29bu25IvfrHA01Osue5s0fhBgndBNe0vMnYDZfsA21RB0fLn2jQBw0WBezbqLjsuZbbsLmWvvLVqvvKELq0nhK3wujVAvf5sgfqogL0uZnZsgTjuw5fzwncz09Wl21un1vbwJaWsMPbCgDSsJrozgLUAhbsAg5IzJe0uhzwqY84qurNshP4A0Lbt2PKs0fnqLK0mLbmzJbXyNLgEgXdyxjzohrPtwC0ndLXy0XNAKfisdbVqwTzEvi5zvi2AwDyr0TtvZrerefXDg5cng9bDwX3nhDpDLHcrLfjAMjNvhDdyvPhv0j5t1ruDK1JAKi1rKfeCMC3u0y5t2f1ywrLBuLIq080mM4VucTLyw9qodDisJvVutDuz2OWl25rqNryzg9IBhPnDu5Wr1nny2C5nNHkwtjrogPWEg11z3rkoer5mJziDLDyy3HIBvLAnhO4DNa5uhjrqM4Wvxbht3rkuuf0v28ZmZrqzNaRvLzlA2LIywztz0n4swDzztLwm1rzy0DYyxnds1K0l0vLBefgwhaWCcS0AJnWwgPbnLzhvuLVqvHJyZaWBK5kuZbbs0jtwNaYodr3t0juyuffCgnJwM96EgLRB0fls2n5ne9byY9tA3HPz0jlDvC4EwDIrg5cCw5tmefHtefYEwvStufivwzUvMfpzgXqsNLqu3b0ngPpm3qXqIT0quv3B3PutJnWvwnRDtm2mefusgPRvLHTweKZrhfLmuLAohjQB2fNm0GXB0fbu09svgPNBLa2vxLUs3bqstDvquDnvKLiqxLruhH6l2Hvv2fyt1q2vufytgu2seT1vdb3q0r4k05sEwLoBxD1quqXsK5wAu1vvufuuZi1vgTiy3y5nfP4vvLRs2PQzYTVnhfxqZzRz3Lguerbz2PZywH3vffcy3nIBgTMmLaXCNe3s1zRvMq0ngTpuvr4our6weHxCKXhngTMshK4ndLMyxiXmxjvDdaZEMDcy2jrrKDnyYT2Cvbxz0rWCITeyu53sxDpDZCXEMWYm09dzwv2tMj1AxLWy1CZBfnoBgDnz2ruzZfQnNjIBeHlAKrfodrptwO4nKfnAg5jndyWD3rTA0TgvgLNofvbzI8XDu5or2fyr1rtBenWEdnVqvfbtJeVEg9br00XCtzIwxCZr1e1yMnMDtrhuhi5zLrindfKDhrcBwjkAvb5nxDty2zQn1O5nKfnyu1Wsu1treDpovnevhHlnvnduLHjnKrpq2zWBNiRwxjzyLnwz0CXoe14EMS3y2TLDwzVtZLzvg9Mttj3qw5cEunpu2nizZbbvgyYugnPtxLZAfzcEvmZseHYANjwrMH0t090yvuXn2mRu2jLuNvnn21iy2TUDwuRt3DgvKXREe50ohbtDKH6qtG4l1DNq3vVEJDvrtL2u2Pizw5bnuDnrdf6uue1svHSyMfNEwzrvMnRC3HftvnzEuj6ANflte9hnuTZoeDwmMDgAM5hy25QrLHMn0TTwdvAmITJAK9nBMDUC1npCc9tz0nQqLLRwwTMt3C4qxaXsJLquvyXk2L3B3nptxvsmLy4wui3nhDps3DYyxHSrwLRntHYsff0z2DQmdLXmLLhytnSs01Js3DkqtDinMq2qu5IBe9OndLlCvHJyNLVmKr5uNH3ywD2tLPtmvzKD3LnnhOXCKH1DKvfBtrhtxi1wJr3udy5l3Dbs0fnCtGWDwffr1jSD283nhjqvLmZqxeVsNfRCKvRC1nuA1L6AgnMvc9bqNf6yJnoEtzOBZbhn29Ys09rudfgquzgyKPZrva4quTLDLbHz1DLqNzmtgO2mwrTmZnqk3zkEu91quiVu2KWDgjKAue1swjZqMORDK5bruvwBuHpmwP0EgDUl0feEITwyKTHsNnysuDduMTSCZuVthruCLmWDeK1rMn1vhrpuwDivs8Xshzxl1bXtvfiy0H1q0Tbt0rTC1HPsMjXyZK2vKzvDg1rsfbrwxjyDxj1s1Duzw1eEJjYtg52vhzzAM9LqwnKnKfjCfbRAKLct2veAZfhv2fuotr2wgDfzsTqoc9QvermnwK3u2uVzI9qu3joB3LOrdvOnhP5Cs9LueHymKDMnhmRmKTbstbNyvLfDhDJneHizJHbD3ffmNPNn1D3rdDTDg1gndnOt2z6EI9xCwqXtuPuC0fit1bTss95yuflvfe3tuuVze9JrwuXuK5QDfzSBwfoueXkrerpuNq1nMuVCfvHEcTHvhq1yNfbs0fjBfLXy2LUk2f4CvLxCffZAMDOBdzNofLqyxf6rgfJzwXbrhK1ufDRwNmVmxbOCeTbrK5kuLjrqvvwteHbmgD5t25tBu1WwhjrqtjPAwLNqxbtyZbStffctezboc9fwxLsl252u1j3BhLsnLPXv0jTAeHTB3D5t05Wr2yWCvDhn0jMzeLpk1C5EffbnK95vxG3mKjpztrougfhtKjOEgHJzgv0yuvkExDbtZzoEM5htNbil0fozxf0mMP5n2XQr2ninwO2qtLnmefwvenbDvK4odDJshr6vu4XyxzeohPJzZKVzwX1rMuZsuf6Dc9OyKHcl29HtgLHu1LbDNDbtwDMnfvbvKTLq0zcENLLmuT1ruK3BNztDti4n2ORBefey2PImdvqzw0WwxblquzVnJbSrKfdmgXmu1vbrKzgrKfcuZbSrKfhDLO2BuXyotzNqwnbsxK0nfLeDM5ZywjLnMLmDM1suunpAdLsv1zsuue1Btnvz29Wy1LVqs8VmsTqshjwk3K4B3rTveHiyZLOvKjLDwuXvhv3D3a3qtbbytDyme5RmITiA25cweHume5HmxzXD2TQs1jguxPzwvL6DvbXzwvpsZvpvZq4lZvWvhL2q2DeAJHHDhCZyvnRyNnstufwm0q3DJvKyZbbyK41y0m1AgTnAKG1u29jwgDRrtLun0qYn1zRD1G2mKjKyLvcAvrNt3K1Evbumty5s2reyZC0EMf4Dg5kqKXKrhDLt2zuohLHBNm0wtrSttDZDtGVnNnZtwy4qY93ouj6m29bEKX2ELPAq1P5qxGRwwPhtwnwswXNtuT5BMvxr1fVsffLCKH0l25Yv3HzD05ltJu4B3nhug1nEe9cnLLhrc9bufHWEhrAv1bRCeLftfPpq09eDdzRzdHLnsTVrKfhreXAt2vvqMnQCvj5uhC3BKGRuLu5DNa3uxLlotrOrwzvCwvduva2vLPLnwTsrMLnCLnbA2jvAuLizMTiqxP5uhu0sNOZCe5uDujjueXUtejSshLNzfaVmsT1yufoCZnnrxbfzhnND0fxnMrnzI9yowfwvLCZwe54suL4BK8ZsKL5zwvtzvq3y0femhjSqMvuDxv5ugHpqMHsANa3k3rtuLj6m0rcCfn6AK9dtJjul1bWuujXmNr4reXqtezJu0fjuu5QC1fqodvWyMPvzNmYsuf3Bue0qKfiqtDwuxvKs21PvhPKz0firejnBKe5zLDXzZnPtujSstu0y2C4zMPrqM95BdLsl2rVExjQqJjZmKTMwITiuZjxDwnXqJbbsfHUmtLqCfzhshPft1LODMm1EtnivcTSzeHHEw1tthLWEwz4wwO5yufhrfjYuejnvvPmrdfkss9jBKG1mhiYC3P4AuSZneKRk1zbD1q5zJzKufnYteLIwdvYzgLruNrjstm1l1bUAJjovNjAsgOVmuS1vwS3C0vQofi2rdi1EdjVqxf2B1yWt2PlEeO2wNGVBJzwvxvmqZv0msTLtLnby2zly242mtbADvHPt0P1ttK4mwXHChfvrZbWDuPprda2nw9bEfjXyxjSveDWsfrqutfgugvXntrvwtzir2fWEvnLwwmWD1vbuY9HrdzesgjPB3vxuhvHzgHJzgzTn0r0vdbwuxK1uejjENq2AwDcueLMCufLrgLYCtjvmgfXDYTyzurUmKe5zNjwEhbfAgPeCxK3qtjbDu9tufvMAJe3mvf1n29uze1Umfbtz0nuvdbLuNPduM5qwtLbyw50De5JDMXzEKPQsva5me4YEwu2ndzNzLnUnMrLCMPmCNrdAMX1m3aRzgjnvJnqtxL3Eeq1v3DwstrvCu9WsJu2vufAzw82sePfBM1lCwPUA0ThnY9vBMORvLvmztrRmdzrB3uWAZHfA1Pjl1HPDhzxtLLLtLrICvbUwdCVuwDQmNDJAJfYBeHMyZi3CdnVqta1nxvuss93qxPUCwmXqtDmtMDXz1vLz05wBg5IBLbjugfSqKq4AJCYzND4uujlEwX1v1G1vdm5s3jTtwS4qtr6AxvPC3b3A1LxuKf6ze9Mu25sEvDQu01er1zjqKP4nMqRufGZnZbbyZjzBKHvsg5WEfy2ExrVENvHvvOYoxLJs1buugzingmXCfHKm2fsEg1grKKZqvLSEdH4EdjknJGXwc90DuPmyZi2uufXvgXPn0u1uhjQk21Jq2DdqKPxzhzmuxjNsej3tuTMEhflowLxtujSntnQueO3kZfvy2O4l1nUu09yt2nRl1DNq09PCgTlCxD5tZnLAfDsvg5YELfbmw9TvwjQEg5WvwrxsJuVue9uohvpzZyXrJHVqty1nZbbvZDxr05WqKzmsuzrnePJshbxBgi2wLP1sNyZD093yMXpuMCVndfNC3DquvLVrfKVCffcCw05qMDxteDnBNiWsxG3oxeWCg1Hm2HQytnqBwDNBdLOr0zjowuVwdf6nLz6sMTkt1qZnJfZrZvOmujsr2TMBdncqvjur2njD0e2tu05zMnvqvzIALvAyJjzu3K0ExvbqujNzMXvrhHYstjbEhOYvtHUnMnwyNv0swuWA1ziwwjxrZriDITymxjrmdyWrJb3vZjjqLH1Edz0nZL4ANncEffcENj4Benwufvvmer0wfC2AhaVmKDknuPyvNbywerfqufUueH5lZfYtgLZm2DQsJi1tefzmMTAk2jVttLQBNfqmw9bEvHvqtrcEITgtu5HrJzxDdvbCeDktM9eou01ufvim3flrM9dnMj5Exfnn2PQt1bVs0flCfvQCuTyExOZCvDMwuq4AKzNrgPkr0rQms8RDfq0wMP3z0nNBgDKEeHjl0HZtZvVqxjIvg5Ht3rxshrOr3u0Dde2tdn6vMK4mcTxm0fKoerJy29smfLLBY9UELzLsxjjy09ruff0nITWB0fRAMHQmI9nzJK3Dc9qoefWvMfrrfbdn1i3muTJCZuYodrpqwy2l2Pwk0X5CLProdjhA09ttJmRvffcvhr0t2XUsJjNneHLCNnTBuThrwjNB1fpt09unZu2sdHlvZrJwerjz2jHrdflz2DLDJrfrhbwBtjHugj0odfWBujhmvfLuxbqsKf4BMDKuM1Nq25MnLL0BwDmy05NrurpyZvYs1jdEefisLbzvMuXvZrHuNDTn2nXnxGRzJG4vLDPBvDou051v1bct2y1ztLbqJvLrZj0D1iYCgPmANjtueP1tZDUuhvJmdbfmefMlY9rnuflrdfps2rlqu1LDJzvD0HcChDpodG5quTbsJfOrwHbwwHwl3zzEujUC2fRzur6rZHPtuT4qI8XAtLdqJfqmhe1wMHkuvzysZDNvKPqsxf4ChfIwvrnt1DksvveDuyVCM5Tz0jmzLnznenksNnJzgLLt2zxAtv1suK1zuq1BZuZwKDgEdzemI9UnZfZwgLNuMvJCdnbtgOVzvbvnc9Swe4ZvNnIAdH4n1zvqwnbBMPQCgCVnenNrfryEeHdqwnlvKDnyKvvws9fnxjfDu5szvi5EwS5zhK3AM5HzMiYn1K2vLDSAeTir01im3flz0mVqKK4Efzvs3jjv3P1uhLRwJq2k25qvhrvoxPAD1fOAtH4A2zhvKnXzvq3AZu0ovbxC3nly0u5CwW4CgD3rgnRAMHLCdL1s0fpnJbXEgHyvfzpuvnwte1Lt0nLBY9eCfHqmNvYuLCWnujvn2m5zu9ql0flm3jxve85EeiRnMzlqwDfB0nrt2zvrcT0vJbsnw1dCu1ZzwC3BwDeCwjPvYT1CePmwK51m2fhsKP4Bfq2wxfWy1ftueDZqueZtMC1sI9UBM1WouX0vMHvu3LOA0P6Agr4sdb6EITqtMfLnvHus1nftJnzwuXMvePcB0e1CuCXDu5pDufxvtHKEdbpuI9UCLC5yK5lu0jKA3nOnMjnrvPqDNGRBfu3BfPnte0WAfPinMnKvcTUk0zItMXHDeL2s0zRnJHZts9Ouue0mMnAk2rtEufKofPcChPxmgnHCZi1vhHQAMO2zdzIzgfWrLPQyvnvuhbNBxvxDMruttHTnevRtde0r0nqD29bthHPwe9tvcTktLPKD2vrs2zmy2X1uI9lB1m0yMX1DefbC1PotLzJoenWstvhl2H4ouqZoxzLA0LHvePbnuHvqvvbq1nTsNC4zKjcEu8VodzRBg1LuMHny1PhqMTeseK5CxjvB29bDfHSmdf3vKPdAKfkk1zJy2S1t2zLCti3AKzoB29bBsSWtNndqw5hyY9QuY9HCgngzhPzufvbBKj6vuzgqum1B0j3tvvSrKfcuLjvA2fNogS0EffcCwfKyNOZBtfnngPiChGWouT0m05StMj6ueHiohPSyZDZneH6wtrhzs93q2XAmwXLExHUEwTksZG5rhrpuhiYovqZB3vICvDsAtL3EcTKvNLVn2DKttbbvM5QztfSs3LMsZrqt2vVudrwrK5lwLHmA0ffBLbbD0THn2iYtgv2CwmWmMDbB29XEMj3q1viBKCZBKHYuujxB3jIDLLmt0nczhvus2vxEwvUsgfZu2DbB29WExfxt0zhvdDvqu5VCwvtmg1Qwgu2txeRCfvQk2rrvufmv25VohLrweThvgDIAhLsBKi3zLrYELDzqwuXufzZwNOZr0rrqJj2Au95AM1PtNC1D1zbsuLqqJLOn250weTdl0T4Au1eqLu4t0rNnc9ek2rrue16tdvLu1zcEu92k1jvtKfhDwWXyK5HC3nPnZuYsKnZmMr3n2C1ugjouJi3s3nLk1nrl0W5EvbhuvneBKjqyM5UBNjxwurQBxrMuZvzq1CRmefKugXkwfaVD0nXz0nQzfnTngn5C2r6DhLJrefXCLC1CLvtsKTjB0L3DKfIzhLdy2PWouT4z2HkD090qunlmJnZrdi1CeTdtvv1EgOYB0fMtfbktuj2sMjiqxLJmgLlwe9fr1qYEfrnshbxEhbKDwTIzwm3y0fzsxH6uujRDuDrA04XnZaYCITWvgzHn2HWruDbu09MB01wu1PdChDHqufnvITzsg4XCdzuDuntrgDUDurNl3buqJb3zNDWrLvZy0rYuueRuI9ot1r3ztu5zMy2mhHvsKLivfbYvtu4CeyYA0v0m3b6wfG3C0LVEgPQsJy0B0fXouTcuLflqvaVuJqWmhfmDuLiCNHtr25suhnztJzitKfivfD0AvjdEeHvrgOVnJfvte4ZrefKB3D6qwC4zK1Hv1rwtNnsohrZtwv3CKTgD3DkstC1l1HYAwDeuwP1sKW2uvjcAxfeBK9uD1a4yta3AtnRrwv5sevtAKDolZmYl3DcBY93qJbiDc9tC1ruCMO3teLkvhL2r2e2mKHvyLC2ohLnrvPREgPImufbEhO3vufJzfbIu3HAtgTJBJfXDxH5y2L0ufzzDgHdnuHintLMnLzvDgjrEKHmy0LpCMy1nZbbtMPsBfr6rdKZt01LChjvA3vfDgTyn0SYwMLbr1PsBMDQA0fUmva0ANrxzMrun2LXAgrXCJbumc8RDwu5uunAmu9ry1K5s0fmmdbLns9mAsTKEhL6DdyRBvq2vMnNDxHzuujzmejTzgLxy1L3qJjbCKPonuLsDfHdzZHiyw9gtuu3qvKVv2Dev04Rohi3u1bTl0n0v0n6A01MBue3uNr5m0Hqnen1yxr4l0vLDgjwCMv6qxfcohDbsZrjndu1l1nNrfrZmwnXEMHgvvLhm3PdtNG5vg5VtsTNELzcChjNt3PrC0jUnZr5y2v4r01ztMrwsenwweeYwu9eAZLOl0TZELvurev5u3HezwnRrMvqodHKCufpvxvACeP4Dw5vCZy4wKO3zJu5yw96refcqxHRvNq2Be1ACe44yuzcD0T6sJDzDJH5z0fNy2PhuhHVqw9iBwTWu01JvwXbq2C0k3zHCfnqndbkndy5AM1VywTQzMjRsg9sAM4ZnZbbtxbly3K3vgLTmefgrKzgqujsuLjrqvvvvvvbrKztEffTweLyDhPtu3GRv2r2weHvANbTz0jVyKzpBgXHvNr6BKO2zMHutvK2mgXbqZbSthrot08WCJC5nKfhmuPetKPgBLLJwJrotue0EM1SwuHqvgTKyufcBLP1v09HyLnXzgHcB0PiywDbEdnoyxvSmZf0yvnln3HRA2ngDxy2vMXgEwv0rZa5y0G4CufpBJeZwg9mDuL4uufRsgPJD3H4n1z5ouTuEgLTmefuvYTomKnJqtHACxHkyxfxEenJzZHludD4oxyVCJfuvNL2utrWEu9wtZrJztLbrNu1BuuYv1PfvMDrCee0uee1t1aVquS5utiXDZfYsJvPCu00suC0wKHjnI80vKHmr1u3wxfnBK5br3PeyJjkEvPhzhrVrZLSsti1yJLLrde3vM43Aev4Eg5zD3Lqwg1VrwTlze9LAdu5CwrotdvYyNnzouiYrKfgmLj6tu03AvDyz0vUucTMoefhCM8WBhPIl0fhBendDu1RC2nfrwrrzJzwBLDpzc9rwtLOEJLlmKDMn1bdu2vWn1O0l0DNrg5wt0H5zwf0mvrRy3Lnv1bvk2XprxHvwuG2mefxz0jvBM5nvJjAndLcvLngExH3vfzNq2DcuuTHnKfXywTvvxvlquTsuMWRBfrjnLi4Duj1ChHzqvO3yZftwML4EwfbshLoDK9MyZGXsfjuA2PAk2DVqvPtAxaYDgL2sJrXtxjPz0qVmhvotKPvz0DuvgPeuujevgXyy1fqwgLOBdiXsKj0qJnntJjeota5nKfgALLXmJfNr0iRweGVmxHxoxa5DKrfEK9xD0fcA0fAyM50AZvqnvzTk2jhvtnSvdvUCvC3AIS2B0DqzM45yw10wMXkugXjwgnQnZu2zMO2rcTKquvon202DxrPrefpqui3zJfXm2vXmw5dDtnWD0jwmNDZreGRl21pnLeVD0nMmhfHuJrABKLAAgLqCLfcEuq1EwqZwhzTA3e3ueDIAvPTquLysNG4Cfa0y1u2rKPzutbIzYTxDYTIANi2yZrVqwL0BMLwD1DystC1nxjyzZa2rZzIELLxr004CxzyogOVqunYsMWRuvPvrezrsK82tNvrBfq2AMORvKfivI93qMPxnfHzrZu5zw42vviYwxr2m2H6ohvtt2vqEezzme9ZwfbbEunLBtvOEITKv1zRA2S1BuLzztDiqI9elZyXquuWBxb5ugXWu2nAD0fWnhf1oxPfshCYuJnXtJvdsKfPruLxD0jNwKf6m3OWCLDNme9cqvPAm1zZnhHQAJzQA25YuujREMfUC0DfvhaZyKzwr3zUBNLYquqWsuzHmtnHmKnisujdnxDqBuLbovrvqMuWmJDzvgOZsva4nKfnuJfAvhPus3r6DZD6BeTNtuXQDffcsfnNneDltvvSquv5uxzntxfdy2niquP3ugzgtdLRBhPQwtnYD3a2zxzuCfv0ChfnmxbRuM41vYS4ufG4zxy1vxn1CfrtqufnvKfhm2DUA0HYk0H0uujcs2Hvqu1btwzTzNjvtK9bteGXsNfKCKDAuuDlBM5NrhzrqLDVCwnxC3bpmeTtzMfYs2fszfa5murUmdCWqvO5v0XLmgT1rdHNndLLmwjKANbkqvaYBfnTm3z4z2PgtwLTrxPSwhLzqwnmDdrishaVAdnVqwHSAvCWqxqWk2fsoe1tt0jQmfa0mwXts1zkvfbuCJLHnK81mvmWAwLlEeLtEMzlyZHfrdf6mxO2zM5xztbgDNzQyvbpq0r2m0rJB3O3os93qtzbs1nxB2rrnvLeufHKmhflu0L4Dhq3mxnuDfLLv1KWm0z6nKfXqI93scT2v3m4AMvtvZryz0fKk0TbsurQseK1oxfQq2XTmMPXzuTUwK54mMPQDu0RBezWrJvREwDJl01nBwDdEc9ACKztm0nXB3L6r2Xon0reshrOAKjREgD5C1a1rg5imu5xovD1ugTxmMO2rwXTEdm5uhDYtwL0v0P3vgOWtKfgy3vxr0nLs0nOr1bMCfy2s3C4EhzTuhvts3zrv1vHAMnpzxDkB0f5BfjzuM1rzK4YCePmAKKYAgz4sK9HDLqYnMC3Au9Mzxn0CZvqDffbmMTVB29bs2S4mwH6nLziu2LNqJHRCLnitfzivNKWtwvtA25jt01JzhHvD2H0vZnZEKvzkZzXA2yXnJbbwNrmANrvCLjOz1rhugXiyZLMEhHxB21SEeT5A3nLuM5htY8XB0fRmheYm0ffoxnAtLi2A04WCduRwcTisdG2mxG1zhzenvfpr0LprdzwA0noCfDizhuXquzfv3vqDKDXnwPjsKHWELDXneTUytnvzgfNBxHQtKfgt0HdnvKVu3jryMPkChfxnem1ufaWB2P0m3vhmMPNrhq5s0feENGRsfHouNzKsfb5l21HzdLRteHRmdLIvKfLzvrrqLvwv2nLm3jtrLjUAJLHmejdzw1nq3a3wfmYBe81uufVnZKVEw9bCLDLBLbJDgDMzc9Pugf0tdDpBhvNyMDKDhPwChGYlZjLrtDcBhnACM41CfPiwtC2quLICvfpzMW2rhy2mvrkEwvHA2TkCuTNrc8VmcTsvNnhDemZvu54v1PwAuP5DKLoquDPmM1LwNL0uMyYt3G2ofzorgzqAKfqtKPlmxHjtu16qwrPudHbt2fbsKXMu294Ag5MuhrNnu5yv21NAfveCZnrthDulZLIDLDIqMf1y2juA0e1stnik1zxBhmXAtn2ss9mrgPbnMuZndLlquLmBLu1wJnny0L3uhu1l25Ql0fcCu8YDgLMBfLOzxzknJfVuwfHBMXcmtrzovn4ndLOAIT0uvHvwLjZownQss9il0fbB0fYr1LssevyvdfknvaVD0jHB3bWwgzXzNC3vtDAAw5smJvRntDKt0Tbs3zyCLrhqKLprKPbnMTeAxrLrfnUDuDjvwDlDLvTCtaXBeHfu2DSndzfs0rNlZbVqw94BhG2l2Puns9Twei2oxfRvLKWyNy5uu92k0zkugnmAJvuoufcuueYmuDsDfPrDZKRB3jWyMuXDfPVogjrCKe1neDqEJDwEwTrtwPJBKDMD3jxDhPpAeTWBgGWEwH5zNH6D0i3mefmzKLTofjQCNu3ownznLK5ttK2Cw1nstrbEgTUr0i2wxe4k3fYr1bmBwKZtNPOANG5y2v2uhbxtxnQtKX2EhLeD1bunLvbyuPOqu9cEfzVywnYl01hqJLXCu14wtvkCtfHDwDpr2jHs0flmxPWDwvJAJHevLzos2TMBfftufHhqLD3l2TVD2vqzdLxsxe2zfPPAvHHqNvIC08Zntbbwtf0ngzAANvUyMfNns9eogfQBxnzzYT5rLmZDwvLs3z2zvr6DhvMCdjvy0qVnJLnzwfyDMTAnJq5s0ffAgDNC3H1BhPUmfvvC3vVuNLerwfRtcTACxnzotv5uwz4tLbQDfHvy0rbownvquXczvbfu1LSqvbusLHqowfTvZD1mNP2A09LnefbsdzJl21HsKjgqxe0swrPt25jk2DXtNj0vwTjnufiqLHYk1Hxz0nhnwTmnuDKnuHYmc9Uv2u0BvbIAJjYuwTxutvzuMXwEdfqCcTguwXAtue5vM9bB0mZzg01l09WtNfVtwzny2rZnc9SvNrgr2mVAwnvu01oDLbHz0nlsLfcBgu5weLVD0j1t0TXEdr3twrlBLyRtM80ovrrqKrkrhvqCvrwnKn4k3L4Bvz1BZrhs0XsuKPjzZq0nML0sfzjohDiseDdrgOXB0f3wLDnEJDTnhH3uhDXyuPjExzktZCYCujgCvrIAwDeu2D0D1z4Du9emtqVBLn2yK12wha3vM1XEeHrBJG2C3bJDNDdzujrqLPTC0rnt0rQsgfZodjPtgTiyNG2zZfVuNPPusSVmxbZoeT5ogTzuhiWEITgquDeteftzu1zowHvugXznMDUnLz1tKrNwxf2nvLoquzen0H2nwLpzLK4r21hmgXcD1zYu1DqyNLlBwLSs0HRqs9vvufACtzIy0zrneHcnMm4mhDxrNCVuKqVtcTKyNO2z1fns09qwufwu2vLu1HprgPqntbbvfDbDdDhtwK0sKvQzwD5qvb3nJfmsgv4rNPNzNv4mdnKyxPMC3j0A244ELnsD2LqCwz6tKfhCK5MuNPnu2LRseDcmfbjCfbos1LJrKvIsfjru2zYowfVzZDeBfrtn2LLvhPrqxnPC3HksNOZsLbLB2zktgztCee3rdnXzueRwxD5y1vbs2jmotb1t3jiBJzbvKnhtM00s2zLshj6vZaWA1L4nNiZnMCXshfvq1rlr1vMtMTMtu9SqunxoxPgt284nunYqwzLqtros1LVy25eque5AfvoCKD5rgf4k2DXr2rZBKzbrNfps0ffCNuRBKLXnNfcuMHsmNHSvfHqEuL4rZreAJfWoxzKuef3svbbnMLNrgj5wKzAvZrqvuuXENnPDhvlDJfcEfHrChffrJbntunemZuVD0flCfrxC0L5EwnQnJvVqtuYy0rqsfnXntyXCvHltdzwBxn1rffclZLuAJzSu29OmxfAs0fkndbqCfDNDtL4EhORtLeYEJvjqtzLowfdm1r3l2nrwuHvodLlquK0wuPpv1HNndrYvNrymKLwBufqugnAnxjlytLKBu8WwxOYCtDzm0XUsg1esui0nhHPz0rsDunVvereB01PDwn1sdnftdzMmu5Ks3LWsMTNnuO2AK5zrNHHn0Pnrw5Rovq2vufsCgjIC2mXy2HIEwDsCZu5vdmVthztsIS3qtC0ChHUtgrOuujuDuXOmKPbrZbLD3fVvLK5Ctbyk2y3muThzKCZt1i2runNre84AhO3zLDVwKLxl2Lhytf2tei2CvaXCuTtrwz3CITwquDjme9puM1UyNbgnvzPrdDhDey0q2vtquTXtw9cEc9lz0mZrhfvDZrSrZDZq3DcssTUsezpu0TlzvrLndqVstuRB3fNu2uXs2jPvLjNtMDMuvvbzeO5z3qZquTQBNnMyJbYqMXwnhbhuMHQqJrkCujmCwreA2TRzLHioheXstC4sc9xrwjMoefHwePVqwH0CdHJuZHYv2PTm2Trk1D1rdfmze9MmxbXvfDIAJvwEtnrl0X0Cu53z09zDMXqC2y2vufysvj1ANLNr1qXsLbul1a1muXewJvpv09noxu5wMfuueGYqITVEfqVDfrtnejAuvbvshaRvKfgmLD6ohq5DYTArhDJofzUENe4uKTVu0i2vM95nMXfB0vHDhv3t1q2mvfnDtq1yNaYnZbbvuCZtwvLDwv0ufDovK9yENHxAhnQy2u5vLPjDKTpuNLlquH2zvnRAKO3wxHQz2LVt3Hqvfbrq2XqsxPur0jVqvLbvJqVvvu0uI9mDu5xBZDJCMDZt2zrotzIt29IBJa0D0Tbs2jimhfLr1b6qMPVvdbXrwPirLbPwxj3zwXbrJyWDhntwwzOEgDNmxnOreTeseX5rdnYtMD1DZjctJa2qNvOsdqXC3DIuwD3y2OXB0e1mJuWBvnoAvu1whfptZfxn2v3wxb0A0fqmfbjCLPmCLrdu2vOB0f3CeXqEvC1r1iYowfXEKXQA1zVELn5ueLJy0TpquqVt3e4AdvkB0f6D3G3vMv0m0ORofnMyNjwq1e0yMLYmw1oD0Xfsee3mefyv3qXvKn3sxLMENjiyZG4vNjhtwTSBdviB0qYtLPZA2veA0nNq0Xkn1v1y2zLCe9LBMvSqZu0suzbq0HmzervuMLzvMjtmMnQsuG0mdqYCfrODxrbrLzinhDMntbQwvbuowfZzLO2qKrTz0nfswztCeK0z1r5yYT3ChHurLnlDZzfy2zYuujmnxnLm0vHsgq3l0fnnNj1A2DpuNDMveGRrLHVwLLLqtrjuhiYCtnZqKDjAM42mefAq1n5sI85zxjJt29Lwc9bquqVquLdu1aVCLzIztbjshPbzMHws1mXsfvvqvDMuhq3zZvMs3qVBJbWwMjxq1G3DKO5C2LZlY9wzNCXugiZyxfLwtGVu2Ddu096vKiVrJLpBJG2ChPxCeXisdzwzMSXreG4qJLZmvvRDLHRnMLNq29ZteLJogOZCtm1CMjJucTcCuvuDwvdzvbLCc9SEc9pz0roDuziv3m2vhjxBMnbzhf6sK90quGVovHQEdfXEKDXAZHUrLz3zwfZuM1NqZrVAKHrBK5yswjWBfHABMOWsxfNB0zus0TbtdHntvvOk2rNudbYuwfptuLbCLP3yZv6m3jentLHweO5yufozdnjne9nshfMoefdCePvu2nbqtLpAhjfvJjvnujXEwW2DYS4qwzLz0i4BhrjCKHhrdDACuyXA1GRqwLYAwfRCwO3BLaXBY90twrSl1DNq2Lksei1qI9lCLvKmenntxrlmtHxr0fVEdLlrxvzlZqXqLaWB0fJv1zOBgfYEu9HBe54r0rSuwy1vKjmthvpuunlquLyl2veAZfdwvziu3jisfvJvwDzzwXbrMnlqJfgqMPvodrXmwPquvzhuMLNq0HHrdjWAgLiDfv4r2vSsNPrqKG1utDPBKHbr0jtA05vwgXhz0jnAwX5Dva4qunUqKnpBeCYz0fyuffwtKDem05sreLWEwTQCffcyvfznNrNztLln0TnyZvgvMCXs1nnofvbteLQsg9LugfVmhLYqw5RzdzJEhfnvufHtxjRofOVsdjXB3HHBfu4wKHvzxruyKjjttLeuujbCsT0t0DsELvXEdDumu9lsLnemtriDLfbC2jNzffqCfz4tdHsAMfgsdrwBhzju01eCdLlA2LyufvvqwfcDKDIn3zimhbss3G2Bw9vvunWtNvHquHUBNjvvhHNmuPZEhPTAe51y3rrqM1tmNPAnheVq0DQAdjRwtq0tLrAuu5UtLDfBxH4ohaVu2DdDKfJB2nQrgv0uLHnutyRDLbgyuLRvtHhtwzTs1L5Efa5nwnLne5br01XsfbjCxLXn2HNCvbXt3rHzMTxEMrxwwzOu2vsyMDArxbbl3DcmdbbvKvOstvbD2fJofC0wMSVtwv0wfe5C09cs1aXCha4AZLkBfa0mefAnxrTnuDnkZLwzKOYDMPWouSWnuXOvKDgzfDXAxPostjJvufwm2P5m3ruDgDXvwC5nLrHuLfcrNrXnufOEg5pugjqtLjIyvjQz2rQuujWEgX5tuuWtKvLmvPjBeLqsezcBwzYDu9HquXRC1riChPwtMXSEMDvAhvAzJD4Cez1BKHyqM9bBLzTwgH3rfryrvO2qwLOthrcExKVmxbiDuvznuHimuzbrMnOvZzhALLbttDOu09Km1fPCxnVwvvbtNviwdfYt1LNBMLWCe0Xwfbxz0qVlZf1ueHxCKvACufeBxjnytbbv1KYtLrlEhfptKqVA1zzrvjVqwj1uhrrv1bWvw5Sr2P5ALfbEfH4mKztzMfxsfLvm3KYBZH0CufgttvIn3D6k0zknxvLDY9bvwvxmuW1vfvbsJvWn1vUBxq3mdD5ALi1uM9bwvDknu5mnwPeCfr2s05lswPrqKz1wtbWww5YvxzRBJfinJbLvJCVEM9bAdyWBfDqsKGRuwfcqvbyourrqKjtmvK4Agzyourrsvu5vcTsB0fYrvuZyLyZEvu5l3LWD2PQsfvMB2fbs0D3AwXdBJbYuKfPshiRuNfAwJqXnenMCffcBenkAJjWueTImhjwtxLUC2z5ChbRvwPbqI9lz0rlsxHuytbTvMv5AJHXwJvrouTbs0LbB3DlmejhuffvBxDLmZvvqvvNqu9OCvPyn2zYvxzSrdjVogXHquvwl2nhBMjvyMXOEJDvEg92n3rnmNLLBeffCLjsDdbpuhDWAti1EJHYvwDfBNaRDeORoc91mefus3Pmm3fru3q2l3bwyKWVqu4ZowfJtI9VzNPVqw1oD1iXsdzhBZjUyNrQowfunxzrmfPHz0j2BLnLmuO1ANqXEfq4twuZnLvIvdzvqvfUzdyVCLnzy2qVmxf4nvO5s05OoxfbswXmrhztBMnLCfaWCvr5ELfjEJDvqvfgt092nJbXCuiZtLrLv2zHANLQl2TvqvjzrLberMvOCdnSsdfgsgXimw9bvgnumuPWDwzLBITwnZbLu1bxz0jTn0zkBK5tk1D0thniCffcshO2vwvxvZLlBdjdAKzbruXsA2rHwMCXwKL6ve5WrKffsLDRsZfqzZbzwwrXquTYq3e4BfHTqLbvvLzSwdjVqw9tvLHqv3jvCsSXvMLpyufqlZjrpt0','q2LYy2XLqMX1CG','zgf0ytPPBwfNzs9WBMC7yMfZzty0lgLwqK9sDZblr2DVqufbqu5tvwHfvwDbqufdqufbquvbq0fzqufbrfnVwfiYqufbquDyuKzxsfjuyJjAmgqYrNLAuujcwKC5AvPtqKPIv0zUwLzkBfLxuJvJy2XSuefbquf5wNbwrMGWv0uXtu9TtNzIuZvOwKC5AvPtntrIwefbqufbqufeDY9LsejOwtj0BgrdqMLAv2rWyMOWAtC3Ds9jAujWwKqWAvz6vK5nrtf3utjwB2fvAdzJBvzuzwS1vvKZChjzEMXRswO4k0LeEdrpBMH0y0CXBgrhrwDLrZfZyM5nnMvemgLzv1j2ww1vnMjUttzIv1yWwvm4AuLizZzLrZf3zeDZouLRrMTImKPSsuzOtLvdqKrIm0PSsurvDu5PmwPnvfeXsurJnuXQrtjnELe1t1n3z01QqxHpqZH3t0m4Ee15mhHoAM8WturVEu1PqwDjq0fNsunbz0LQngDqsePRwMPWu1jfwwDLrZfZyM5nnMnTuM1qu0PVzeHsD09PohzKm2qZtg5JEKXToxLAEtH4t1rRnuX6qxLmEKL5tfHkA1PPmxPLvZuWwvHNDgjUtwPjAJrNueHkA1PQCevAwe5Qy21SD2rhBhzIAuj5wKDznLLxsNzKwfe5swLjz2vhmxnIBK02zuCXD1btsM9Ksfj3t2K4DMjUtxvzv1j2ww1vDvKYoxrmm2HOy0m4EeXQqxzjAui0yLD4Dwn6CdrIwejovfqWAwfiuJbJrg92tdi1EKXTrMTImKPStg1oDMjtotrzwef2tvm0D0WYmxrmEuLNzuCXC2jUttzJm1jtwLDzouLTAdbKsee2thK5Dwn5nwHArZLPwLm1AMiYmhzLr0z3thPfDu1doxPwsgX3wLm5u1PytNzKwePQwLzkBfPPtwLjsgH0y0rWrgnTvMHKrZL5vKC5DMjemgLrv1j2ww1vz1vhAhzKrZL6yuC5D0LftKrjreL3tvrRz0TgzhbIBvj2zdnnCeLPqJrIwejovfrWsMjUtJbzvZvQwLvSrvbtsJrIwef1yvDSA09QrxHrvgCWtKrfEu1erxPrAKv4uLvgqK5eAejsAMHhtvvnEK9vvxLovfuWswLcngjyqK5uvhbfyJjomwjxvNvKrwXfufnkngjyqxvAr2XRt2PfEffuzZborev6turfELfQrxHsvuzctKrOqLjQAeDnvu16t1vvEu5uvtbjAJrNueHODgnfmu5pA1jSy21SmLPxuKDJBtL0suHomfvTvM1pBwX1yZnsAgjTtMXtvve5sw5ODgndnxbHv1e2tvrgqK9eutbnvef3tvroq01urKzrvuuWt0vgr09fwxHrEK01uLrjmu5uuwLjse4Wvw1wBu9TuNzzm1z0wLC1mfnvutLjBMH0y0m1A2fxutznvezct0rrme1urxDnve5dtvrgrLfvrtbpruzht0vzEff6ttvsveKXtLrrAuX6ngDqqZL5wKDznLjhvNPzm0PWy0HsCgiYncTjrhD2y21sBu9SsKvsAJrNuem5ne9UAhrJrZfSzeDfk0LeDY9LsejOwtj0BgrdqMXIBve5sw5jAvb6ndf2uNDbqufbrtKWBevrvLi0mNv5zhLxnfvnuKnhm1qYzgDzu0ffr3m0C3a0ngndsKjJr1vkyNDdDKfmD1DqquK4quj3qwLvvNDNtejKA0vPA0PfAufhtwHRwNfOzLuXyweXC3KWzYT5yuPqEvDtDxbpCfbQEJb1vNL1y3jkzxiYzuCYzKOZwMDmqvfOqwDdmfbNtJHyswXRCwDhteu3nw9PAdbxBvjwwKv2B3aWCKHVzZe4CM5sztzjEKLUC3rOEunyrNqRvhvts3LhBvjywLPez0S1zuzYA3y4BdDRAvvOCNHol0PtBZnWAwDtDMnoBuKXyKnOm2i1teSYk05XshL2EuvgoxGZEJviz3fsuLzPt0fyAfC1sNjdB05KzwKVEtiWz01zEgHTuLn5svHswtzkve1unerftKXxk1nKEuqXoxGVtMfQrg13BvLjvZC5sg5Uk01bneDkrufbsvfNqujkyK1kqITUnvnSoxPxwNzsourbqLvMA0PRvNq4zMKZELvSzeffB0TSmJrzmLmXzLbArw1czfPgsgTRyJr2EfrmuLe1zgPIEvvMmg5Jwxjel1vbrfvcoe1ABM8Yute5ExG3z0LXsufbuwDbquvjuuLbDfLAvcS4nuX2uM5QuunVueTsm3jrvwDonfKZwMvlmZbNohfWCZbXzwvbEKrUnfrxrdKREvnhk0jcuZKWrgfhBLzNoweYDgDUuJrPBdKVAMTpqunVAufOq0fbqvnjwNbbquzSnNL1Be8WsKfdBY9jrhjUnKnLzfaXENHpy2L2nNDbwu5UqvaZuLzczvD0sLfdv3PhogLml1G5zZr2A3foEK1JDhPvwhrPBNr0mKTnl2ftk2jTuwfzotbYyJHdrJz0u0TPsunfsufbqKnbqufrAxDIzMngsvDwq2jvy2m5yLPeteTPwuflAJr1t3y3qMiRsuXmAIS4vZDqq2Ddn0POENy0nffKAdL5CNj1ofy2mwPqz2q2ndvNrdjPBYSXnvjPqZvAqtvftK5qBuDTrg10CNrHovLbvKvrrtjgBhjrvu0VsJzLzLu4y1nbrdG3B2PVzejHy2ntnMTNAwLfCKDPCs9XztKZwfqRm29hvtvcsM5IEuTYsvvZnKjrwM9rvuvJCLe3q1LHz2LhCwvlAu1NBLHmwhnNnxvkvw0VuLfks3K4zKDtn1bnDZztz1zruhjkrKDACJbRq2zvtc83suzQsxPYteDWzw1cutbRugjLAeW2stL2twPvAdzVrvzfqufjuwDbquvjqufczhb5AJbXy0S3mvLYCuDvsKfotNj2k3nit2nbAvjWrernmwnuwtfcruHRn2TXEvaVmKfJnxzmruvrruC4yurUsw9uyJvpyLPsv2C1ExDhnw8XzfG0q2XowxHun0Lju2Dkuhnyr3bmDxq5tunxvtbtnwjXA21KqweZtfffD2nArefMA1OZDhrOuwzRD05RvMvLrdzRAxvHvwfIy3a2rhbtovL5ywXYqwrrogjumuvguvzvywjHCK5eowzoDxLcmMDsrvLbqujdqufbuwHbqufjuw9nnZCWvwDcwefsq0LYl2TVrg9NvMX6z3jxDxHLBujlzdbTnePUqMvKmcS1wLe5z24ZqKS1teSRudr5nwv3B0i4rezPs085munptezMD1z1venAvJfOu29zDZfbufPdC0zjA2jomuHHywe4n3D3AuTrztzLvdi3quvynMvZufzwzdGVA09pzef6l296ouzfmhaRDuDjs1vLCuu1qZH4z1nlAuLdruLbqujdqufbuwHbqufjuwDbquvjqufcq0vdqtzbqsTZyMTsrxLevvvzBeTenMDNwND6uMTYohrLD0jODxnPC3yRmgLUnxffl2Hgy2HVwLrfmfrmnha4C1rIDeLWEwfOutrbzZvMs3btvKjTzMrerun2uvrAAM9nmfu5tJzlz2T3sdL4wtDqwhbqAunTCtv5DwfmvMXKseLpn2PNtMK1wgzprwHdCu5OoxvKsfyVuM5dnvLbvuruzNrKvJqVAxz2D0vVuLztovHyufDHmuzjvdvPCMq4ANbtqITcre4ZCK84qwfhtw5hEtbjmffswvr2zgS2tMTpC3vJDwHhq01bz0K4utbPC2fiyM1bzxzotwHPrdrqnMLAAhn0qu5hAvffmLbfr0nsBZjoy2DbC1feD0TUEfDgzgXumtCVzhvxvtfcsM11shO2qtvID2jfC0nty2DOk3fbsgL0m0PYmw9VB09qrxHKuKjmyMvkALnWDxD1EtmWqufik0nequfqsdvSDevttLLSnefbqufbu1vwt1jlnunzsuK9','D2LKz2v0ig1HCc1ZD2L0y2G','zgLZCgf0y2Hby3rPB24','x21VDw50qw5JAg9Y','DgLSzvvUBg9Hza','B3v0zxjqB3nPDgLVBNm','CgfYDgLJBgvbz2u','Aw5KzxHpzG','D2L0AefSCgHH','y2fYDgvZAwfUvg9dyxj0B2DYyxbOAwm','yxrHBG','x3rYyw5ZBgf0Aw9UrwrPDg9Y','5y+Z5yE757Ut5P2F57Yw6l6r','q3LSAw5KzxjgywrL','q2LYy2XLv2f2zvr5Cgu','rwXSAxbZB2LKt3v0BgLUzuDLB21LDhj5','Bw9KzwXFChjPBwL0AxzL','EhL6','Eg1HEa','DgLSzxnLDf9ZCgXPDa','C3bYzwfK','Ahr0Chm6lY9NywmTz2vVlMDVB2DSzwnUyxbWCY5JBI9TyxbZl3z0p2X5CNm9CYz4pxT4Fsz5pxT5Fsz6pxT6Fq','ChjVz3jHBq','x3DNCZG0ug9ZAxrPB24','x0voq19yrK9stv9nt0rf','v2vIr0Xezwj1z1v0AwXZ','DhjHBNnMB3jTuM90yxrL','vgv4DhvYzsb1BML0ihrVBYbSyxjNztOG','u2HHzgvYieXPBMSGrxjYB3i6ia','x3nLDenHBwvYyunVBNrYB2XSzxi','Dg9tDhjPBMC','sgvYBwL0zvbVBhLUB21PywXbChbYB3HPBwf0Aw9U','y29WEq','uKm0rhjVCa','Bgf5zxjFz3jVDxa','sgvHzgLUz1bPDgnOuMfUz2u','x2nVBxb1DgvcB3vUzhnjBK1LDgvY','q0Xpq0TFveLdsW','zwrPDc1HBMnOB3iTBgf5zxi','C2HVD0HLBha','yxv0BW','x3bYAw1PDgL2zujPyxm','u2LUz2XLvgLSzuLTywDLCNLqCM92AwrLCG','BgLUzvDPzhrO','CM90yxrPB25FBwfYA2vY','ChjLBg9HzfnPyMXPBMDZ','q0XfqvjFqu5dse9s','yNvMzMvYsw5KzxG','zNjVBvjVDgf0Aw9UvhjHBNnSyxrPB24','y2XLyxi','yNL0zu9MzNnLDa','zhjHDW','BgvMDa','y2vYDgLMAwvK','zgvSDge','C2nHBguZzcG','AgfSzG','D2f0zxjFChjPBwL0AxzL','q0zc','zxHWzxjPBwvUDgfSlxDLyMDS','BgvZC1rOyw5pCKvXDwfSCW','BwvYy2f0B3juB0XUz0XHDa','y3jLyxrLrgvWDgHpzKzPzwXKu3rHz2u','z2v0vgLTzq','cJW/Eg1SihzLCNnPB249iJeUmciGzw5JB2rPBMC9iLvurI04iIbZDgfUzgfSB25LpsjUBYi/pGO8C3zNihDPzhrOpsiXnJjWEciGAgvPz2H0psiXnJjWEciGDMLLD0jVEd0ImcaWide2mIaXnJiIihzLCNnPB249iJeUmsiGEg1SBNm9iMH0Dha6lY93D3CUDZmUB3jNlZiWmdaVC3zNiIb4BwXUCZP4BgLUAZ0IAhr0CdOVl3D3DY53mY5VCMCVmtK5os94BgLUAYi+cIaGica8is0TieDLBMvYyxrVCJOGu2TLDgnOidqZlJiGkdm5mdy5ksaTigH0Dha6lY93D3CUyM9Ozw1Pyw5JB2rPBMCUy29Tl3nRzxrJAcaTlt4kicaGidX0AxrSzt5JB21WyxnZlw91DgvYpc90AxrSzt4kicaGidXKzxnJpKnYzwf0zwqGD2L0AcbtA2v0y2GUpc9KzxnJpGOGicaGpgrLzNm+pc9KzwzZpGOGicaGpgCGAwq9iLbHz2uTmsiGC3rYB2TLpsjUB25LiIbZDhjVA2uTD2LKDgG9iJeIigzPBgWTCNvSzt0IzxzLBM9Kzci+cIaGicaGicaGpgCGAwq9iMnVBxbHC3mTB3v0zxiIigzPBgWTCNvSzt0IBM9UEMvYBYi+cIaGicaGicaGicaGidXWyxrOigq9iK04mc44ndeWntq0lde2ms42odiXmdKGqZm2lJe5mZC3mZeSmtyXlJy4mJeWosaWldeYns40odGZmZyGmcW4mc44ndeWntq0iemWldm2lJe5mZC3mZeGmZyUmtKZnZCZmsWWidGWlJG0mta1ndqSmcbdmti1lJq4odmZnIWWide2ms42odiXmdKSmZyUmtKZnZCZmsaXnJeUnJGYmta5ldGWlJG0mta1ndqGqZe2ms42odiXmdKSmti1lJq4odmZnIaXmJuUndG4mZm2lde2ms42odiXmdKGodaUodqXmdu0ncWXnJeUnJGYmta5ifOGttGXlJe4mZyWmteSmtm0lJyYmdKWosbdmteWlJy5nJiXmsWXmZqUnJiWota5ideZnc42mJa5mdKSmteWlJy5nJiXmsaXmZqUnJiWota5ldGXlJe4mZyWmteGqZeZnc42mJa5mdKSnteUnJCWotKXnIaXmtaUnJK2mJeXldi3lJC0nJi5ndeGodeUmtGZnJaXmsWYnY43ndyYotqXiem1ms42nZa5ote2ldi3lJC0nJi5ndeGmJCUnZq2mJK0msW1ms42nZa5ote2idi3lJC0nJi5ndeSodeUmtGZnJaXmsbdmJCUnZq2mJK0msWXmtaUnJK2mJeXiduXlJy3mdK5mtySmtm0lJyYmdKWosa4ms4Xodm2mdeXldeZnc42mJa5mdKGwIiGAwq9iK92ywWTmta4iJ48l3bHDgG+cIaGicaGicaGicaGidXJAxjJBguGAwq9iK92ywWTnZqIigzPBgW9iIngrKzgrKyIign4psiXmJKUndKZnJGZiIbJEt0Imti3lJK1mJa5mIiGCJ0Ims41nde1ote0nYi+pc9JAxjJBgu+cIaGicaGicaGicaGidXJAxjJBguGAwq9iK92ywWTnZqTq29WEs0ZiIbMAwXSpsiJrKzgrKzgiIbJEd0Imti5lJq5mZy4mYiGy3K9iJm1lJq1nJyWmZGIihi9iJeUntqXntKXndCIpJWVy2LYy2XLpGOGicaGicaGicaGica8y2LYy2XLigLKpsjpDMfSltC0lunVChKTnsiGzMLSBd0Ii0zgrKzgrIiGy3G9iJmWlJGZmtGYotqIign5psiXmJCUotuYmdKYiIbYpsiXlJu0mtu5mtq3iJ48l2nPCMnSzt4kicaGicaGicaGicaGpgnPCMnSzsbPzd0It3zHBc03nc1dB3b5ltqIigzPBgW9iIngrKzgrKyIign4psiZmc44mZe4mJK0iIbJEt0ImZuUndu2nJaZociGCJ0Ims41nde1ote0nYi+pc9JAxjJBgu+cIaGicaGicaGicaGidXWB2X5z29UigLKpsjoiIbMAwXSpsiJrKzgrKzgiIbWB2LUDhm9iJG0lJKZmtGWnZiGmJmUmtiZodCYmsa4nc45mZe4mdCYideZlJeZmJeZnJiGodiUntyYmZm4nsaXmY4XmZiXmZyYidGYlJu2mJmZoduGmtKUmJK4ndy0nIa3nY45nte4nJyGmtmUmtmYmtm2mIa3ns43mta4nJi1ideZlJeZmJeZnJiGnZuUnZeWodyYnsaYmY4XmJm4nZiXidC4lJa5ndyWntmGmJmUmtiZodCYmsa3oc4Wotq2mduZide2lJK3mtGXnZyGodiUnJKWodaZnYaYmY4XmJm4nZiXiJ48l3bVBhLNB24+cIaGicaGicaGicaGidXWB2X5z29UigLKpsjmAw5LiIbMAwXSpsiJrKzgrKzgiIbWB2LUDhm9iJe0mY4ZnJGWmdCGodiUmta5mZq3nIaXntiUnJe3ntu1idGYlJeWotm0nZyGmtuYlJyXnZu1nsa4ms4YotKZndC2ide0mY4ZnJGWmdCGodeUmJK5mZq3nIi+pc9WB2X5z29UpGOGicaGicaGicaGica8Cg9SEwDVBIbPzd0ItgLUzs1dB3b5ltGIigzPBgW9iIngrKzgrKyIihbVAw50CZ0Ios4YndK1ndG4nca4mI4XmdKZndC2ide4lJq5ota5nZyGodiUmta5mZq3nIaXoc40otKWotC2idGXlJi5otm0nZyGos4YndK1ndG4nca4ms4YotKZndC2iJ48l3bVBhLNB24+cIaGicaGicaGicaGidXWB2X5z29UigLKpsjmAw5LiIbMAwXSpsiJrKzgrKzgiIbWB2LUDhm9iJGXlJi5otm0nZyGmtqZlJm2odaWnYa4ms4YotKZndC2ide1mI42mtC1ntuGodiUmta5mZq3nIaXntiUnJe3ntu1idGYlJeWotm0nZyGmtqZlJm2odaWnYi+pc9WB2X5z29UpGOGicaGicaGidWVzZ4kicaGidWVzZ4kpc9ZDMC+cG','revt','DMvJmYbNzxrdB2XVCIHMBg9HDcbPBNrLBNnPDhKPEWOGicaGDMvJmYbIBhvLid0GDMvJmYGWlJaSidaUmcWGms4WktSkicaGihzLyZmGy3LHBIa9ihzLyZmOmc4WlcaXlJaSideUmcK7cIaGicb2zwmZigDYzwvUid0GDMvJmYGWlJaSideUmcWGmc4WktSkicaGihzLyZmGEwvSBg93id0GDMvJmYGXlJaSideUmcWGmc4WktSkicaGihzLyZmGCMvKid0GDMvJmYGXlJaSidaUmcWGmc4WktSkcIaGicb2zwmZignVBg9Yid0GkaOGicaGicaGigzHzguOltaUmJuSidaUmJuSigLUDgvUC2L0EsKQyMX1zsaRcIaGicaGicaGzMfKzsGWlJaSidaUnsWGAw50zw5ZAxr5ksPJEwfUicSkicaGicaGicbMywrLkdaUmJuSidaUnZuSigLUDgvUC2L0EsKQz3jLzw4GkWOGicaGicaGigzHzguOmc41lcaXlJaSigLUDgvUC2L0EsKQEwvSBg93icSkicaGicaGicbZBw9VDgHZDgvWkdaUnZuSideUmcWGAw50zw5ZAxr5ksPYzwqkicaGicK7cIaGicbYzxr1CM4Gy29SB3i7cN0','x3bLCMnLBNq','x3jVDgf0zq','zM92Eq','x2rLzMLUAxrPB25dAgfUz2vK','Aw1Hz2vYEs1UBY0','igD5CM8Tywn0AxzL','Cg9ZDfvWzgf0zq','rw50Axr5','x2DSB3DpBMX5','x2LUDgvUC2L0Eq','rNjHBwvIDwzMzxiGAw5JB21WBgv0zsbHDhrHy2HTzw50','x25sB3vUzhm','x2DYywrPzw50','x3rPBgvtAxPL','zxLLt2zMC2v0','Dg9bCNjHEq','yxjYB3C','ywrKu2vJB25KCW','rxzWs0rg','x3bHCNnLug9PBNrZ','ywrKug9PBNrZ','x3rPBgvwAxnPyMXLq2fSBgjHy2S','D2LKz2v0igrPC3rHBMnLlwXLz2vUza','BMvHCMvZDa','Bgf5zxjhCM91Cev2zw50','x3jLywr5','x3n5BMnnyxa','v2fSBeLTywDLvhjHAwW','BwL4sw4','DhjHBNnSDwnLBMn5','y2HPBgroB2rLCW','B2zMC2v0qw1VDw50','x21Vzgu','rwXSAxbZB2LKvgvYCMfPBLbYB3zPzgvY','Bgf0','y2XVC2vuB3a','x3bYB2PLy3rPB24','zNjVBurPBwvUC2LVBNm','x2fKzgvKsg9VAW','zNjLzq','uKvnt1zfra','x3zPzxDLCK9WDgLVBG','x2vUywjSzuv2zw50uhjVCgfNyxrPB24','zgvWDgHuAhjLC2HVBgq','ywXNBW','AgLNAa','CgfYDgLJBgvnDwX0AxbSAwvY','sg1Hy1niqtm','q0XbtvbFve9Frurhrq','C2vJB25KC0rPzMzLCMvUy2u','CgfYC2vqB2X5BgLUzunVB3jKvg9bCNjHEq','x2XHDa','Axnezxb0Ae9MrMLLBgrtDxbWB3j0zwq','vfjjqu5htevFsevjr0Hu','Dw5WCM9Qzwn0','DgLSzuHLAwDODcbTDxn0ig5VDcbIzsbJywXSzwqGyMvMB3jLihrOzsbPBwfNzxj5ihbYB3zPzgvYigLZihjLywr5lG','Aw50zxjWB2XHDgvvC2LUz0zYywn0Aw9U','vu5tsuDorurFqLLurq','DMfSDwvbDa','yMLSAw5LyxjjBNrLCNbVBgf0zvzLy3rVCG','zM9Yy2vtDg9W','x3DYyxbWzxi','zhjHD1rVB2W','AxztAxPL','Ahr0Chm6lY9NywmTz2vVlMDVB2DSzwnUyxbWCY5JBI9TyxbZl3z0p2X5CNm9Esz4pxT4Fsz5pxT5Fsz6pxT6Fq','ue9jtLq','zw5J','EM9VBuv2zw50vhLWzxm','v29Vzfr5Cgu','Dg9gAxHLza','CMvWBgfJzq','y2XHBxbtAgfKzxi','AxrLCMf0Aw9UCW','Bw9KzwXuCMfUC2XHDgLVBG','Ag9Szxm','zgvHy3rPDMf0zq','q2LYy2XLrMfKzq','z2vVvMLZ','surftLrjvfK','C2vJDg9Y','DxbKyxrL','y29UDgv4Da','t0vtx3rLEhr1CMvFzMXVyxrFBgLUzwfY','BMvJA1DPzhrOrMfJDg9Y','BMvJA0HLAwDODezHy3rVCG','Bw92zvvW','r0fusevssu5hx1bmqunf'];_0x434a=function(){return _0x5eece9;};return _0x434a();}function _0xf114(_0x4f8ef1,_0x3a8e08){const _0x5bca08=_0x434a();return _0xf114=function(_0x1f47a5,_0x4d72e6){_0x1f47a5=_0x1f47a5-0x9a;let _0x434afe=_0x5bca08[_0x1f47a5];if(_0xf114['lKFBtQ']===undefined){var _0xf11464=function(_0x2f0968){const _0x2c1a31='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1a5a9b='',_0x5db55f='',_0x412e93=_0x1a5a9b+_0xf11464;for(let _0x36a835=0x0,_0x31b65b,_0x4b4376,_0x3baf99=0x0;_0x4b4376=_0x2f0968['charAt'](_0x3baf99++);~_0x4b4376&&(_0x31b65b=_0x36a835%0x4?_0x31b65b*0x40+_0x4b4376:_0x4b4376,_0x36a835++%0x4)?_0x1a5a9b+=_0x412e93['charCodeAt'](_0x3baf99+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x31b65b>>(-0x2*_0x36a835&0x6)):_0x36a835:0x0){_0x4b4376=_0x2c1a31['indexOf'](_0x4b4376);}for(let _0x43843a=0x0,_0x4a9a4e=_0x1a5a9b['length'];_0x43843a<_0x4a9a4e;_0x43843a++){_0x5db55f+='%'+('00'+_0x1a5a9b['charCodeAt'](_0x43843a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5db55f);};_0xf114['OkvxpB']=_0xf11464,_0x4f8ef1=arguments,_0xf114['lKFBtQ']=!![];}const _0x200590=_0x5bca08[0x0],_0x6d8832=_0x1f47a5+_0x200590,_0x2abf74=_0x4f8ef1[_0x6d8832];if(!_0x2abf74){const _0x523a70=function(_0x4fd413){this['YwHCfQ']=_0x4fd413,this['fDznmm']=[0x1,0x0,0x0],this['zkVNeu']=function(){return'newState';},this['EiPHNv']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['IfbfTJ']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x523a70['prototype']['QlRlRe']=function(){const _0x49a1aa=new RegExp(this['EiPHNv']+this['IfbfTJ']),_0x3427cc=_0x49a1aa['test'](this['zkVNeu']['toString']())?--this['fDznmm'][0x1]:--this['fDznmm'][0x0];return this['ttymKf'](_0x3427cc);},_0x523a70['prototype']['ttymKf']=function(_0x2d851e){if(!Boolean(~_0x2d851e))return _0x2d851e;return this['YZPJnu'](this['YwHCfQ']);},_0x523a70['prototype']['YZPJnu']=function(_0x16ce9f){for(let _0x51072e=0x0,_0x399686=this['fDznmm']['length'];_0x51072e<_0x399686;_0x51072e++){this['fDznmm']['push'](Math['round'](Math['random']())),_0x399686=this['fDznmm']['length'];}return _0x16ce9f(this['fDznmm'][0x0]);},new _0x523a70(_0xf114)['QlRlRe'](),_0x434afe=_0xf114['OkvxpB'](_0x434afe),_0x4f8ef1[_0x6d8832]=_0x434afe;}else _0x434afe=_0x2abf74;return _0x434afe;},_0xf114(_0x4f8ef1,_0x3a8e08);}var DC=((()=>{const _0x43bf95=_0xf114;var _0x3baf99=Object[_0x43bf95(0x484)],_0x43843a=Object[_0x43bf95(0x50a)],_0x4a9a4e=Object[_0x43bf95(0x74c)],_0x523a70=Object[_0x43bf95(0x59c)],_0x4fd413=Object[_0x43bf95(0xaa)],_0x49a1aa=Object[_0x43bf95(0x519)][_0x43bf95(0x373)],_0x3427cc=(_0x5732ea=>typeof require!=_0x43bf95(0x4b6)?require:typeof Proxy!=_0x43bf95(0x4b6)?new Proxy(_0x5732ea,{'get':(_0x2cfff0,_0x47cd65)=>(typeof require!=_0x43bf95(0x4b6)?require:_0x2cfff0)[_0x47cd65]}):_0x5732ea)(function(_0x41dfa3){const _0x4caf28=_0x43bf95;if(typeof require!=_0x4caf28(0x4b6))return require[_0x4caf28(0x6a6)](this,arguments);throw Error(_0x4caf28(0x7a7)+_0x41dfa3+_0x4caf28(0x3ba));}),_0x2d851e=(_0x3d6463,_0x4bf8de)=>()=>(_0x4bf8de||_0x3d6463((_0x4bf8de={'exports':{}})[_0x43bf95(0x6ce)],_0x4bf8de),_0x4bf8de['exports']),_0x16ce9f=(_0x59f4ae,_0x355c70)=>{for(var _0x319445 in _0x355c70)_0x43843a(_0x59f4ae,_0x319445,{'get':_0x355c70[_0x319445],'enumerable':!0x0});},_0x51072e=(_0xae9c45,_0x396199,_0x5b32b1,_0x38f613)=>{const _0x1d9ead=_0x43bf95;if(_0x396199&&typeof _0x396199==_0x1d9ead(0xa3c)||typeof _0x396199==_0x1d9ead(0x9e7)){for(let _0x2a4ee0 of _0x523a70(_0x396199))!_0x49a1aa[_0x1d9ead(0x7a4)](_0xae9c45,_0x2a4ee0)&&_0x2a4ee0!==_0x5b32b1&&_0x43843a(_0xae9c45,_0x2a4ee0,{'get':()=>_0x396199[_0x2a4ee0],'enumerable':!(_0x38f613=_0x4a9a4e(_0x396199,_0x2a4ee0))||_0x38f613['enumerable']});}return _0xae9c45;},_0x399686=(_0x26b7a9,_0x4221b7,_0x1ed70b)=>(_0x1ed70b=_0x26b7a9!=null?_0x3baf99(_0x4fd413(_0x26b7a9)):{},_0x51072e(_0x4221b7||!_0x26b7a9||!_0x26b7a9[_0x43bf95(0x548)]?_0x43843a(_0x1ed70b,_0x43bf95(0x7eb),{'value':_0x26b7a9,'enumerable':!0x0}):_0x1ed70b,_0x26b7a9)),_0xbb775c=_0x4bb60e=>_0x51072e(_0x43843a({},'__esModule',{'value':!0x0}),_0x4bb60e),_0x2a7143=_0x2d851e(()=>{}),_0x2b1809=_0x2d851e((_0x20afaa,_0xca0e95)=>{(function(_0x2cdfa2,_0xd1c04e){const _0x4d8bd8=_0xf114;typeof _0x20afaa==_0x4d8bd8(0xa3c)?_0xca0e95[_0x4d8bd8(0x6ce)]=_0x20afaa=_0xd1c04e():typeof define==_0x4d8bd8(0x9e7)&&define[_0x4d8bd8(0xfe)]?define([],_0xd1c04e):_0x2cdfa2['CryptoJS']=_0xd1c04e();}(_0x20afaa,function(){var _0x3ee37e=_0x3ee37e||function(_0x4fa4a0,_0x53a73c){const _0x1495e0=_0xf114;var _0x47611a;if(typeof window!=_0x1495e0(0x4b6)&&window[_0x1495e0(0x848)]&&(_0x47611a=window['crypto']),typeof self!=_0x1495e0(0x4b6)&&self[_0x1495e0(0x848)]&&(_0x47611a=self['crypto']),typeof globalThis!=_0x1495e0(0x4b6)&&globalThis[_0x1495e0(0x848)]&&(_0x47611a=globalThis[_0x1495e0(0x848)]),!_0x47611a&&typeof window!='undefined'&&window[_0x1495e0(0x7e3)]&&(_0x47611a=window[_0x1495e0(0x7e3)]),!_0x47611a&&typeof global!=_0x1495e0(0x4b6)&&global[_0x1495e0(0x848)]&&(_0x47611a=global[_0x1495e0(0x848)]),!_0x47611a&&typeof _0x3427cc=='function')try{_0x47611a=_0x2a7143();}catch{}var _0x50426c=function(){const _0x579431=_0x1495e0;if(_0x47611a){if(typeof _0x47611a[_0x579431(0x11e)]==_0x579431(0x9e7))try{return _0x47611a['getRandomValues'](new Uint32Array(0x1))[0x0];}catch{}if(typeof _0x47611a[_0x579431(0x220)]==_0x579431(0x9e7))try{return _0x47611a[_0x579431(0x220)](0x4)[_0x579431(0x9e2)]();}catch{}}throw new Error(_0x579431(0x588));},_0x2589c2=Object[_0x1495e0(0x484)]||(function(){function _0x35885c(){}return function(_0x93ca82){const _0x1cb6a1=_0xf114;var _0xb22c1d;return _0x35885c['prototype']=_0x93ca82,_0xb22c1d=new _0x35885c(),_0x35885c[_0x1cb6a1(0x519)]=null,_0xb22c1d;};}()),_0x3ce013={},_0x425515=_0x3ce013[_0x1495e0(0x6e8)]={},_0x23a3b4=_0x425515[_0x1495e0(0x836)]=(function(){return{'extend':function(_0x5554dc){const _0x1c4d04=_0xf114;var _0x1deb20=_0x2589c2(this);return _0x5554dc&&_0x1deb20[_0x1c4d04(0x93b)](_0x5554dc),(!_0x1deb20[_0x1c4d04(0x373)](_0x1c4d04(0x7ef))||this[_0x1c4d04(0x7ef)]===_0x1deb20[_0x1c4d04(0x7ef)])&&(_0x1deb20[_0x1c4d04(0x7ef)]=function(){const _0x5612ee=_0x1c4d04;_0x1deb20[_0x5612ee(0x350)]['init']['apply'](this,arguments);}),_0x1deb20['init']['prototype']=_0x1deb20,_0x1deb20[_0x1c4d04(0x350)]=this,_0x1deb20;},'create':function(){const _0xb4ce05=_0xf114;var _0x37b1c0=this['extend']();return _0x37b1c0[_0xb4ce05(0x7ef)][_0xb4ce05(0x6a6)](_0x37b1c0,arguments),_0x37b1c0;},'init':function(){},'mixIn':function(_0x5d8db9){const _0x14658d=_0xf114;for(var _0x317595 in _0x5d8db9)_0x5d8db9[_0x14658d(0x373)](_0x317595)&&(this[_0x317595]=_0x5d8db9[_0x317595]);_0x5d8db9[_0x14658d(0x373)](_0x14658d(0x8fa))&&(this[_0x14658d(0x8fa)]=_0x5d8db9[_0x14658d(0x8fa)]);},'clone':function(){const _0x1a46c6=_0xf114;return this['init'][_0x1a46c6(0x519)][_0x1a46c6(0x8cd)](this);}};}()),_0x19ad5f=_0x425515[_0x1495e0(0x590)]=_0x23a3b4[_0x1495e0(0x8cd)]({'init':function(_0xa69b8c,_0x45ffa1){const _0xf1c989=_0x1495e0;_0xa69b8c=this[_0xf1c989(0x2d4)]=_0xa69b8c||[],_0x45ffa1!=_0x53a73c?this[_0xf1c989(0xa17)]=_0x45ffa1:this['sigBytes']=_0xa69b8c['length']*0x4;},'toString':function(_0x499cb3){const _0x579fa9=_0x1495e0;return(_0x499cb3||_0x16b3f9)[_0x579fa9(0x8b2)](this);},'concat':function(_0x27acd9){const _0x1eb482=_0x1495e0;var _0x5403b0=this['words'],_0xb538a3=_0x27acd9[_0x1eb482(0x2d4)],_0x3f04a6=this[_0x1eb482(0xa17)],_0x403993=_0x27acd9[_0x1eb482(0xa17)];if(this[_0x1eb482(0x80a)](),_0x3f04a6%0x4)for(var _0x4d506b=0x0;_0x4d506b<_0x403993;_0x4d506b++){var _0x146a8a=_0xb538a3[_0x4d506b>>>0x2]>>>0x18-_0x4d506b%0x4*0x8&0xff;_0x5403b0[_0x3f04a6+_0x4d506b>>>0x2]|=_0x146a8a<<0x18-(_0x3f04a6+_0x4d506b)%0x4*0x8;}else{for(var _0xd576d9=0x0;_0xd576d9<_0x403993;_0xd576d9+=0x4)_0x5403b0[_0x3f04a6+_0xd576d9>>>0x2]=_0xb538a3[_0xd576d9>>>0x2];}return this[_0x1eb482(0xa17)]+=_0x403993,this;},'clamp':function(){const _0x24cc62=_0x1495e0;var _0x4f490b=this[_0x24cc62(0x2d4)],_0x44248a=this[_0x24cc62(0xa17)];_0x4f490b[_0x44248a>>>0x2]&=0xffffffff<<0x20-_0x44248a%0x4*0x8,_0x4f490b['length']=_0x4fa4a0[_0x24cc62(0x452)](_0x44248a/0x4);},'clone':function(){const _0x25fbd0=_0x1495e0;var _0x53733a=_0x23a3b4['clone'][_0x25fbd0(0x7a4)](this);return _0x53733a['words']=this[_0x25fbd0(0x2d4)][_0x25fbd0(0x724)](0x0),_0x53733a;},'random':function(_0x114e82){for(var _0x24162c=[],_0x33e569=0x0;_0x33e569<_0x114e82;_0x33e569+=0x4)_0x24162c['push'](_0x50426c());return new _0x19ad5f['init'](_0x24162c,_0x114e82);}}),_0x4ce9dc=_0x3ce013['enc']={},_0x16b3f9=_0x4ce9dc[_0x1495e0(0x5f5)]={'stringify':function(_0xc1b84b){const _0x590891=_0x1495e0;for(var _0x290936=_0xc1b84b[_0x590891(0x2d4)],_0x43d7c5=_0xc1b84b[_0x590891(0xa17)],_0x9591c=[],_0x2fdc8c=0x0;_0x2fdc8c<_0x43d7c5;_0x2fdc8c++){var _0x364f36=_0x290936[_0x2fdc8c>>>0x2]>>>0x18-_0x2fdc8c%0x4*0x8&0xff;_0x9591c[_0x590891(0xb3)]((_0x364f36>>>0x4)['toString'](0x10)),_0x9591c[_0x590891(0xb3)]((_0x364f36&0xf)[_0x590891(0x8fa)](0x10));}return _0x9591c[_0x590891(0x9e0)]('');},'parse':function(_0x5046e5){const _0x1bbedb=_0x1495e0;for(var _0x4fbb48=_0x5046e5['length'],_0xcfe340=[],_0x12cee7=0x0;_0x12cee7<_0x4fbb48;_0x12cee7+=0x2)_0xcfe340[_0x12cee7>>>0x3]|=parseInt(_0x5046e5['substr'](_0x12cee7,0x2),0x10)<<0x18-_0x12cee7%0x8*0x4;return new _0x19ad5f[(_0x1bbedb(0x7ef))](_0xcfe340,_0x4fbb48/0x2);}},_0x32752c=_0x4ce9dc['Latin1']={'stringify':function(_0x2d8c26){const _0x31e77a=_0x1495e0;for(var _0x1f30dc=_0x2d8c26[_0x31e77a(0x2d4)],_0xe2be86=_0x2d8c26['sigBytes'],_0x56e713=[],_0x4c9245=0x0;_0x4c9245<_0xe2be86;_0x4c9245++){var _0x349672=_0x1f30dc[_0x4c9245>>>0x2]>>>0x18-_0x4c9245%0x4*0x8&0xff;_0x56e713[_0x31e77a(0xb3)](String['fromCharCode'](_0x349672));}return _0x56e713['join']('');},'parse':function(_0x1c2d17){const _0x513585=_0x1495e0;for(var _0x518574=_0x1c2d17['length'],_0x157dbe=[],_0x1c0fe1=0x0;_0x1c0fe1<_0x518574;_0x1c0fe1++)_0x157dbe[_0x1c0fe1>>>0x2]|=(_0x1c2d17['charCodeAt'](_0x1c0fe1)&0xff)<<0x18-_0x1c0fe1%0x4*0x8;return new _0x19ad5f[(_0x513585(0x7ef))](_0x157dbe,_0x518574);}},_0x21192a=_0x4ce9dc[_0x1495e0(0x490)]={'stringify':function(_0x438fea){const _0x27c5e1=_0x1495e0;try{return decodeURIComponent(escape(_0x32752c[_0x27c5e1(0x8b2)](_0x438fea)));}catch{throw new Error(_0x27c5e1(0x401));}},'parse':function(_0x3ad828){const _0x5abdaf=_0x1495e0;return _0x32752c[_0x5abdaf(0xce)](unescape(encodeURIComponent(_0x3ad828)));}},_0x5635fc=_0x425515[_0x1495e0(0x73f)]=_0x23a3b4[_0x1495e0(0x8cd)]({'reset':function(){const _0x4ea97a=_0x1495e0;this[_0x4ea97a(0xeb)]=new _0x19ad5f['init'](),this[_0x4ea97a(0x1d3)]=0x0;},'_append':function(_0x1909cc){const _0x201edc=_0x1495e0;typeof _0x1909cc==_0x201edc(0x55c)&&(_0x1909cc=_0x21192a[_0x201edc(0xce)](_0x1909cc)),this['_data']['concat'](_0x1909cc),this['_nDataBytes']+=_0x1909cc[_0x201edc(0xa17)];},'_process':function(_0x4a0a3c){const _0x57900e=_0x1495e0;var _0x2dc9a7,_0x11e213=this['_data'],_0x5ca510=_0x11e213[_0x57900e(0x2d4)],_0x233120=_0x11e213[_0x57900e(0xa17)],_0x390cb1=this[_0x57900e(0x1ac)],_0x59e892=_0x390cb1*0x4,_0x7998e5=_0x233120/_0x59e892;_0x4a0a3c?_0x7998e5=_0x4fa4a0['ceil'](_0x7998e5):_0x7998e5=_0x4fa4a0['max']((_0x7998e5|0x0)-this[_0x57900e(0x18d)],0x0);var _0x34605e=_0x7998e5*_0x390cb1,_0x118050=_0x4fa4a0[_0x57900e(0x66a)](_0x34605e*0x4,_0x233120);if(_0x34605e){for(var _0x4248a7=0x0;_0x4248a7<_0x34605e;_0x4248a7+=_0x390cb1)this['_doProcessBlock'](_0x5ca510,_0x4248a7);_0x2dc9a7=_0x5ca510[_0x57900e(0xae)](0x0,_0x34605e),_0x11e213[_0x57900e(0xa17)]-=_0x118050;}return new _0x19ad5f[(_0x57900e(0x7ef))](_0x2dc9a7,_0x118050);},'clone':function(){const _0x20dde0=_0x1495e0;var _0x20caec=_0x23a3b4[_0x20dde0(0x5c3)]['call'](this);return _0x20caec[_0x20dde0(0xeb)]=this['_data']['clone'](),_0x20caec;},'_minBufferSize':0x0}),_0x18bdf7=_0x425515[_0x1495e0(0x5cb)]=_0x5635fc[_0x1495e0(0x8cd)]({'cfg':_0x23a3b4[_0x1495e0(0x8cd)](),'init':function(_0x25bd10){const _0x4302a7=_0x1495e0;this[_0x4302a7(0x2ef)]=this['cfg'][_0x4302a7(0x8cd)](_0x25bd10),this[_0x4302a7(0x1e8)]();},'reset':function(){const _0x563cb2=_0x1495e0;_0x5635fc[_0x563cb2(0x1e8)][_0x563cb2(0x7a4)](this),this['_doReset']();},'update':function(_0x8ef9d6){const _0x201205=_0x1495e0;return this['_append'](_0x8ef9d6),this[_0x201205(0x342)](),this;},'finalize':function(_0x3ac510){_0x3ac510&&this['_append'](_0x3ac510);var _0x391d20=this['_doFinalize']();return _0x391d20;},'blockSize':0x200/0x20,'_createHelper':function(_0x427683){return function(_0x4fe72e,_0x21b2e2){const _0x38fc25=_0xf114;return new _0x427683[(_0x38fc25(0x7ef))](_0x21b2e2)[_0x38fc25(0x477)](_0x4fe72e);};},'_createHmacHelper':function(_0x58ee43){return function(_0x4a3de0,_0xa69f4f){const _0x3cce0c=_0xf114;return new _0x1ec697['HMAC'][(_0x3cce0c(0x7ef))](_0x58ee43,_0xa69f4f)[_0x3cce0c(0x477)](_0x4a3de0);};}}),_0x1ec697=_0x3ce013[_0x1495e0(0x94b)]={};return _0x3ce013;}(Math);return _0x3ee37e;}));}),_0x2f0e66=_0x2d851e((_0xd0d174,_0x1de097)=>{(function(_0x486427,_0xb4efdd){const _0x9b7c77=_0xf114;typeof _0xd0d174==_0x9b7c77(0xa3c)?_0x1de097[_0x9b7c77(0x6ce)]=_0xd0d174=_0xb4efdd(_0x2b1809()):typeof define=='function'&&define[_0x9b7c77(0xfe)]?define([_0x9b7c77(0x7d0)],_0xb4efdd):_0xb4efdd(_0x486427[_0x9b7c77(0x626)]);}(_0xd0d174,function(_0x50c63e){return function(_0x2aca9f){const _0x2055be=_0xf114;var _0x69984d=_0x50c63e,_0x59c76e=_0x69984d[_0x2055be(0x6e8)],_0x560de6=_0x59c76e[_0x2055be(0x836)],_0x293686=_0x59c76e[_0x2055be(0x590)],_0x5076a1=_0x69984d[_0x2055be(0x783)]={},_0x4de2a8=_0x5076a1[_0x2055be(0x73e)]=_0x560de6[_0x2055be(0x8cd)]({'init':function(_0x9e053b,_0x5c00a2){const _0x1ef9a6=_0x2055be;this[_0x1ef9a6(0x94c)]=_0x9e053b,this[_0x1ef9a6(0x45d)]=_0x5c00a2;}}),_0x2eaf64=_0x5076a1['WordArray']=_0x560de6[_0x2055be(0x8cd)]({'init':function(_0x1bf238,_0x3fa768){const _0x5a69cf=_0x2055be;_0x1bf238=this[_0x5a69cf(0x2d4)]=_0x1bf238||[],_0x3fa768!=_0x2aca9f?this[_0x5a69cf(0xa17)]=_0x3fa768:this['sigBytes']=_0x1bf238[_0x5a69cf(0x6a2)]*0x8;},'toX32':function(){const _0x29e915=_0x2055be;for(var _0x4c4909=this['words'],_0x2822f0=_0x4c4909['length'],_0x120d0c=[],_0x51eae3=0x0;_0x51eae3<_0x2822f0;_0x51eae3++){var _0x3f27cc=_0x4c4909[_0x51eae3];_0x120d0c[_0x29e915(0xb3)](_0x3f27cc[_0x29e915(0x94c)]),_0x120d0c[_0x29e915(0xb3)](_0x3f27cc[_0x29e915(0x45d)]);}return _0x293686[_0x29e915(0x484)](_0x120d0c,this[_0x29e915(0xa17)]);},'clone':function(){const _0x39b700=_0x2055be;for(var _0x31d3f2=_0x560de6[_0x39b700(0x5c3)][_0x39b700(0x7a4)](this),_0xee6a1e=_0x31d3f2[_0x39b700(0x2d4)]=this['words'][_0x39b700(0x724)](0x0),_0x5a61ce=_0xee6a1e[_0x39b700(0x6a2)],_0x46f809=0x0;_0x46f809<_0x5a61ce;_0x46f809++)_0xee6a1e[_0x46f809]=_0xee6a1e[_0x46f809]['clone']();return _0x31d3f2;}});}(),_0x50c63e;}));}),_0x15edfc=_0x2d851e((_0x58aa65,_0x4b5ca5)=>{(function(_0x2093c6,_0x1e8949){const _0x11c7db=_0xf114;typeof _0x58aa65=='object'?_0x4b5ca5[_0x11c7db(0x6ce)]=_0x58aa65=_0x1e8949(_0x2b1809()):typeof define==_0x11c7db(0x9e7)&&define[_0x11c7db(0xfe)]?define([_0x11c7db(0x7d0)],_0x1e8949):_0x1e8949(_0x2093c6[_0x11c7db(0x626)]);}(_0x58aa65,function(_0x399aaf){const _0x185278=_0xf114;return(function(){const _0x8ef823=_0xf114;if(typeof ArrayBuffer==_0x8ef823(0x9e7)){var _0x5438b3=_0x399aaf,_0x5c0981=_0x5438b3[_0x8ef823(0x6e8)],_0x29f1f3=_0x5c0981[_0x8ef823(0x590)],_0x46fa56=_0x29f1f3[_0x8ef823(0x7ef)],_0x3491e7=_0x29f1f3[_0x8ef823(0x7ef)]=function(_0x22430b){const _0x2950e5=_0x8ef823;if(_0x22430b instanceof ArrayBuffer&&(_0x22430b=new Uint8Array(_0x22430b)),(_0x22430b instanceof Int8Array||typeof Uint8ClampedArray!='undefined'&&_0x22430b instanceof Uint8ClampedArray||_0x22430b instanceof Int16Array||_0x22430b instanceof Uint16Array||_0x22430b instanceof Int32Array||_0x22430b instanceof Uint32Array||_0x22430b instanceof Float32Array||_0x22430b instanceof Float64Array)&&(_0x22430b=new Uint8Array(_0x22430b[_0x2950e5(0x72f)],_0x22430b[_0x2950e5(0x90e)],_0x22430b[_0x2950e5(0x1da)])),_0x22430b instanceof Uint8Array){for(var _0x48a292=_0x22430b[_0x2950e5(0x1da)],_0x12eb75=[],_0x3cba62=0x0;_0x3cba62<_0x48a292;_0x3cba62++)_0x12eb75[_0x3cba62>>>0x2]|=_0x22430b[_0x3cba62]<<0x18-_0x3cba62%0x4*0x8;_0x46fa56[_0x2950e5(0x7a4)](this,_0x12eb75,_0x48a292);}else _0x46fa56[_0x2950e5(0x6a6)](this,arguments);};_0x3491e7['prototype']=_0x29f1f3;}}()),_0x399aaf[_0x185278(0x6e8)][_0x185278(0x590)];}));}),_0x242431=_0x2d851e((_0x3364ca,_0x675a35)=>{(function(_0x4cbbb2,_0x3c1382){const _0x4fe74b=_0xf114;typeof _0x3364ca=='object'?_0x675a35[_0x4fe74b(0x6ce)]=_0x3364ca=_0x3c1382(_0x2b1809()):typeof define==_0x4fe74b(0x9e7)&&define['amd']?define(['./core'],_0x3c1382):_0x3c1382(_0x4cbbb2[_0x4fe74b(0x626)]);}(_0x3364ca,function(_0x57d75a){const _0x368918=_0xf114;return(function(){const _0x153c99=_0xf114;var _0x209775=_0x57d75a,_0x3a3deb=_0x209775[_0x153c99(0x6e8)],_0x39433e=_0x3a3deb[_0x153c99(0x590)],_0x414b91=_0x209775[_0x153c99(0x961)],_0x344781=_0x414b91[_0x153c99(0x9a1)]=_0x414b91[_0x153c99(0x616)]={'stringify':function(_0x383507){const _0xecdfa2=_0x153c99;for(var _0x1971a6=_0x383507['words'],_0x33a811=_0x383507[_0xecdfa2(0xa17)],_0x48ded3=[],_0x11044d=0x0;_0x11044d<_0x33a811;_0x11044d+=0x2){var _0x596b37=_0x1971a6[_0x11044d>>>0x2]>>>0x10-_0x11044d%0x4*0x8&0xffff;_0x48ded3[_0xecdfa2(0xb3)](String[_0xecdfa2(0x352)](_0x596b37));}return _0x48ded3[_0xecdfa2(0x9e0)]('');},'parse':function(_0x36401f){const _0x1c68e6=_0x153c99;for(var _0x3e1a17=_0x36401f['length'],_0x395c55=[],_0x5c5e00=0x0;_0x5c5e00<_0x3e1a17;_0x5c5e00++)_0x395c55[_0x5c5e00>>>0x1]|=_0x36401f[_0x1c68e6(0x563)](_0x5c5e00)<<0x10-_0x5c5e00%0x2*0x10;return _0x39433e[_0x1c68e6(0x484)](_0x395c55,_0x3e1a17*0x2);}};_0x414b91[_0x153c99(0x385)]={'stringify':function(_0xc450e1){const _0x5daee5=_0x153c99;for(var _0x18c554=_0xc450e1[_0x5daee5(0x2d4)],_0x33db27=_0xc450e1[_0x5daee5(0xa17)],_0x25d2a6=[],_0x1d844e=0x0;_0x1d844e<_0x33db27;_0x1d844e+=0x2){var _0x596d3c=_0x1db3f3(_0x18c554[_0x1d844e>>>0x2]>>>0x10-_0x1d844e%0x4*0x8&0xffff);_0x25d2a6['push'](String[_0x5daee5(0x352)](_0x596d3c));}return _0x25d2a6[_0x5daee5(0x9e0)]('');},'parse':function(_0x15be67){const _0x2971c6=_0x153c99;for(var _0x8246b6=_0x15be67['length'],_0x5c08f0=[],_0x5d90da=0x0;_0x5d90da<_0x8246b6;_0x5d90da++)_0x5c08f0[_0x5d90da>>>0x1]|=_0x1db3f3(_0x15be67[_0x2971c6(0x563)](_0x5d90da)<<0x10-_0x5d90da%0x2*0x10);return _0x39433e[_0x2971c6(0x484)](_0x5c08f0,_0x8246b6*0x2);}};function _0x1db3f3(_0x485cc0){return _0x485cc0<<0x8&0xff00ff00|_0x485cc0>>>0x8&0xff00ff;}}()),_0x57d75a['enc'][_0x368918(0x9a1)];}));}),_0x3043ab=_0x2d851e((_0x556d17,_0x487f61)=>{(function(_0x2c923b,_0x602c55){const _0x2cfb7f=_0xf114;typeof _0x556d17=='object'?_0x487f61[_0x2cfb7f(0x6ce)]=_0x556d17=_0x602c55(_0x2b1809()):typeof define==_0x2cfb7f(0x9e7)&&define[_0x2cfb7f(0xfe)]?define([_0x2cfb7f(0x7d0)],_0x602c55):_0x602c55(_0x2c923b[_0x2cfb7f(0x626)]);}(_0x556d17,function(_0x19048e){return(function(){const _0x1ebd2e=_0xf114;var _0x4e2606=_0x19048e,_0x485ddd=_0x4e2606[_0x1ebd2e(0x6e8)],_0x5e28ca=_0x485ddd[_0x1ebd2e(0x590)],_0x4e2a88=_0x4e2606[_0x1ebd2e(0x961)],_0x3e842c=_0x4e2a88[_0x1ebd2e(0x2d6)]={'stringify':function(_0x170906){const _0x42de2c=_0x1ebd2e;var _0x4e176b=_0x170906['words'],_0x2ff5cd=_0x170906[_0x42de2c(0xa17)],_0x20a9fc=this[_0x42de2c(0x114)];_0x170906[_0x42de2c(0x80a)]();for(var _0x660c43=[],_0x29fc16=0x0;_0x29fc16<_0x2ff5cd;_0x29fc16+=0x3)for(var _0x42894c=_0x4e176b[_0x29fc16>>>0x2]>>>0x18-_0x29fc16%0x4*0x8&0xff,_0x4746e6=_0x4e176b[_0x29fc16+0x1>>>0x2]>>>0x18-(_0x29fc16+0x1)%0x4*0x8&0xff,_0x412271=_0x4e176b[_0x29fc16+0x2>>>0x2]>>>0x18-(_0x29fc16+0x2)%0x4*0x8&0xff,_0x53abed=_0x42894c<<0x10|_0x4746e6<<0x8|_0x412271,_0x487dda=0x0;_0x487dda<0x4&&_0x29fc16+_0x487dda*0.75<_0x2ff5cd;_0x487dda++)_0x660c43['push'](_0x20a9fc[_0x42de2c(0x42c)](_0x53abed>>>0x6*(0x3-_0x487dda)&0x3f));var _0x2ba761=_0x20a9fc[_0x42de2c(0x42c)](0x40);if(_0x2ba761){for(;_0x660c43[_0x42de2c(0x6a2)]%0x4;)_0x660c43['push'](_0x2ba761);}return _0x660c43['join']('');},'parse':function(_0x5acfb2){const _0x372ffa=_0x1ebd2e;var _0x1dc876=_0x5acfb2['length'],_0x477f1d=this[_0x372ffa(0x114)],_0x1ce22a=this[_0x372ffa(0x3e1)];if(!_0x1ce22a){_0x1ce22a=this['_reverseMap']=[];for(var _0x58fc41=0x0;_0x58fc41<_0x477f1d['length'];_0x58fc41++)_0x1ce22a[_0x477f1d['charCodeAt'](_0x58fc41)]=_0x58fc41;}var _0x520bb2=_0x477f1d['charAt'](0x40);if(_0x520bb2){var _0x1815f4=_0x5acfb2[_0x372ffa(0x8e3)](_0x520bb2);_0x1815f4!==-0x1&&(_0x1dc876=_0x1815f4);}return _0x3b3dc7(_0x5acfb2,_0x1dc876,_0x1ce22a);},'_map':_0x1ebd2e(0x1ba)};function _0x3b3dc7(_0x4af098,_0x85d42d,_0x4fcc92){const _0x2ee7e5=_0x1ebd2e;for(var _0x510d00=[],_0xc302a1=0x0,_0x5224f7=0x0;_0x5224f7<_0x85d42d;_0x5224f7++)if(_0x5224f7%0x4){var _0x184326=_0x4fcc92[_0x4af098['charCodeAt'](_0x5224f7-0x1)]<<_0x5224f7%0x4*0x2,_0x10be95=_0x4fcc92[_0x4af098[_0x2ee7e5(0x563)](_0x5224f7)]>>>0x6-_0x5224f7%0x4*0x2,_0x42f56a=_0x184326|_0x10be95;_0x510d00[_0xc302a1>>>0x2]|=_0x42f56a<<0x18-_0xc302a1%0x4*0x8,_0xc302a1++;}return _0x5e28ca[_0x2ee7e5(0x484)](_0x510d00,_0xc302a1);}}()),_0x19048e['enc']['Base64'];}));}),_0x21650e=_0x2d851e((_0x570259,_0x5f1a44)=>{(function(_0x35660b,_0x42e9f8){const _0xe9e3f3=_0xf114;typeof _0x570259=='object'?_0x5f1a44[_0xe9e3f3(0x6ce)]=_0x570259=_0x42e9f8(_0x2b1809()):typeof define==_0xe9e3f3(0x9e7)&&define[_0xe9e3f3(0xfe)]?define([_0xe9e3f3(0x7d0)],_0x42e9f8):_0x42e9f8(_0x35660b[_0xe9e3f3(0x626)]);}(_0x570259,function(_0x11a6da){const _0x1942b0=_0xf114;return(function(){const _0x5dceeb=_0xf114;var _0x482745=_0x11a6da,_0x4c7b06=_0x482745['lib'],_0x8f2354=_0x4c7b06['WordArray'],_0x3cfce8=_0x482745[_0x5dceeb(0x961)],_0x446359=_0x3cfce8[_0x5dceeb(0x4b3)]={'stringify':function(_0x4ef9c0,_0x50bc9d){const _0x2b35f7=_0x5dceeb;_0x50bc9d===void 0x0&&(_0x50bc9d=!0x0);var _0x2e6580=_0x4ef9c0[_0x2b35f7(0x2d4)],_0x219f68=_0x4ef9c0['sigBytes'],_0x6e92a9=_0x50bc9d?this['_safe_map']:this[_0x2b35f7(0x114)];_0x4ef9c0[_0x2b35f7(0x80a)]();for(var _0x1c8e17=[],_0x48a0ec=0x0;_0x48a0ec<_0x219f68;_0x48a0ec+=0x3)for(var _0x409344=_0x2e6580[_0x48a0ec>>>0x2]>>>0x18-_0x48a0ec%0x4*0x8&0xff,_0x48b438=_0x2e6580[_0x48a0ec+0x1>>>0x2]>>>0x18-(_0x48a0ec+0x1)%0x4*0x8&0xff,_0x1947d7=_0x2e6580[_0x48a0ec+0x2>>>0x2]>>>0x18-(_0x48a0ec+0x2)%0x4*0x8&0xff,_0x3b9d78=_0x409344<<0x10|_0x48b438<<0x8|_0x1947d7,_0x471792=0x0;_0x471792<0x4&&_0x48a0ec+_0x471792*0.75<_0x219f68;_0x471792++)_0x1c8e17[_0x2b35f7(0xb3)](_0x6e92a9[_0x2b35f7(0x42c)](_0x3b9d78>>>0x6*(0x3-_0x471792)&0x3f));var _0x3e2586=_0x6e92a9['charAt'](0x40);if(_0x3e2586){for(;_0x1c8e17[_0x2b35f7(0x6a2)]%0x4;)_0x1c8e17['push'](_0x3e2586);}return _0x1c8e17[_0x2b35f7(0x9e0)]('');},'parse':function(_0x49a065,_0x2ba515){const _0x1b5221=_0x5dceeb;_0x2ba515===void 0x0&&(_0x2ba515=!0x0);var _0x1bd0b9=_0x49a065[_0x1b5221(0x6a2)],_0x423e33=_0x2ba515?this['_safe_map']:this[_0x1b5221(0x114)],_0x190aba=this[_0x1b5221(0x3e1)];if(!_0x190aba){_0x190aba=this[_0x1b5221(0x3e1)]=[];for(var _0x315c85=0x0;_0x315c85<_0x423e33[_0x1b5221(0x6a2)];_0x315c85++)_0x190aba[_0x423e33[_0x1b5221(0x563)](_0x315c85)]=_0x315c85;}var _0x2ca08a=_0x423e33[_0x1b5221(0x42c)](0x40);if(_0x2ca08a){var _0x136e75=_0x49a065['indexOf'](_0x2ca08a);_0x136e75!==-0x1&&(_0x1bd0b9=_0x136e75);}return _0x5a58b5(_0x49a065,_0x1bd0b9,_0x190aba);},'_map':'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=','_safe_map':'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'};function _0x5a58b5(_0x4305e3,_0x279d14,_0x231c8b){const _0x11dad7=_0x5dceeb;for(var _0x3aab8f=[],_0x916392=0x0,_0x260632=0x0;_0x260632<_0x279d14;_0x260632++)if(_0x260632%0x4){var _0x48d736=_0x231c8b[_0x4305e3[_0x11dad7(0x563)](_0x260632-0x1)]<<_0x260632%0x4*0x2,_0x466428=_0x231c8b[_0x4305e3[_0x11dad7(0x563)](_0x260632)]>>>0x6-_0x260632%0x4*0x2,_0x5bab5a=_0x48d736|_0x466428;_0x3aab8f[_0x916392>>>0x2]|=_0x5bab5a<<0x18-_0x916392%0x4*0x8,_0x916392++;}return _0x8f2354[_0x11dad7(0x484)](_0x3aab8f,_0x916392);}}()),_0x11a6da[_0x1942b0(0x961)]['Base64url'];}));}),_0x93aced=_0x2d851e((_0x54d01e,_0x1171e3)=>{(function(_0x368948,_0x54b217){const _0x39d198=_0xf114;typeof _0x54d01e=='object'?_0x1171e3[_0x39d198(0x6ce)]=_0x54d01e=_0x54b217(_0x2b1809()):typeof define=='function'&&define[_0x39d198(0xfe)]?define([_0x39d198(0x7d0)],_0x54b217):_0x54b217(_0x368948[_0x39d198(0x626)]);}(_0x54d01e,function(_0x361b46){const _0x496fd9=_0xf114;return function(_0x1a07d6){const _0x2ea870=_0xf114;var _0x40021e=_0x361b46,_0x381b06=_0x40021e['lib'],_0x4e5874=_0x381b06[_0x2ea870(0x590)],_0x5e0110=_0x381b06[_0x2ea870(0x5cb)],_0x2de636=_0x40021e[_0x2ea870(0x94b)],_0x32f11a=[];(function(){const _0x530aad=_0x2ea870;for(var _0x147ef0=0x0;_0x147ef0<0x40;_0x147ef0++)_0x32f11a[_0x147ef0]=_0x1a07d6[_0x530aad(0x133)](_0x1a07d6['sin'](_0x147ef0+0x1))*0x100000000|0x0;}());var _0x5ef90e=_0x2de636[_0x2ea870(0x30c)]=_0x5e0110['extend']({'_doReset':function(){const _0x58e560=_0x2ea870;this['_hash']=new _0x4e5874[(_0x58e560(0x7ef))]([0x67452301,0xefcdab89,0x98badcfe,0x10325476]);},'_doProcessBlock':function(_0x1dbe6a,_0x4d88ee){const _0x1871e4=_0x2ea870;for(var _0x1ede1c=0x0;_0x1ede1c<0x10;_0x1ede1c++){var _0x1b022f=_0x4d88ee+_0x1ede1c,_0x53b66e=_0x1dbe6a[_0x1b022f];_0x1dbe6a[_0x1b022f]=(_0x53b66e<<0x8|_0x53b66e>>>0x18)&0xff00ff|(_0x53b66e<<0x18|_0x53b66e>>>0x8)&0xff00ff00;}var _0x1a224f=this[_0x1871e4(0x84f)]['words'],_0x4f7474=_0x1dbe6a[_0x4d88ee+0x0],_0x1b7179=_0x1dbe6a[_0x4d88ee+0x1],_0x4c6d31=_0x1dbe6a[_0x4d88ee+0x2],_0x170513=_0x1dbe6a[_0x4d88ee+0x3],_0x191a53=_0x1dbe6a[_0x4d88ee+0x4],_0x6e148d=_0x1dbe6a[_0x4d88ee+0x5],_0x5d5ed1=_0x1dbe6a[_0x4d88ee+0x6],_0x3cf9e9=_0x1dbe6a[_0x4d88ee+0x7],_0x3deb65=_0x1dbe6a[_0x4d88ee+0x8],_0x40828e=_0x1dbe6a[_0x4d88ee+0x9],_0x353a2b=_0x1dbe6a[_0x4d88ee+0xa],_0x5d8641=_0x1dbe6a[_0x4d88ee+0xb],_0x582597=_0x1dbe6a[_0x4d88ee+0xc],_0x24c24f=_0x1dbe6a[_0x4d88ee+0xd],_0x152192=_0x1dbe6a[_0x4d88ee+0xe],_0x554cc8=_0x1dbe6a[_0x4d88ee+0xf],_0x57ff82=_0x1a224f[0x0],_0x171bac=_0x1a224f[0x1],_0x59582b=_0x1a224f[0x2],_0x626aae=_0x1a224f[0x3];_0x57ff82=_0x352611(_0x57ff82,_0x171bac,_0x59582b,_0x626aae,_0x4f7474,0x7,_0x32f11a[0x0]),_0x626aae=_0x352611(_0x626aae,_0x57ff82,_0x171bac,_0x59582b,_0x1b7179,0xc,_0x32f11a[0x1]),_0x59582b=_0x352611(_0x59582b,_0x626aae,_0x57ff82,_0x171bac,_0x4c6d31,0x11,_0x32f11a[0x2]),_0x171bac=_0x352611(_0x171bac,_0x59582b,_0x626aae,_0x57ff82,_0x170513,0x16,_0x32f11a[0x3]),_0x57ff82=_0x352611(_0x57ff82,_0x171bac,_0x59582b,_0x626aae,_0x191a53,0x7,_0x32f11a[0x4]),_0x626aae=_0x352611(_0x626aae,_0x57ff82,_0x171bac,_0x59582b,_0x6e148d,0xc,_0x32f11a[0x5]),_0x59582b=_0x352611(_0x59582b,_0x626aae,_0x57ff82,_0x171bac,_0x5d5ed1,0x11,_0x32f11a[0x6]),_0x171bac=_0x352611(_0x171bac,_0x59582b,_0x626aae,_0x57ff82,_0x3cf9e9,0x16,_0x32f11a[0x7]),_0x57ff82=_0x352611(_0x57ff82,_0x171bac,_0x59582b,_0x626aae,_0x3deb65,0x7,_0x32f11a[0x8]),_0x626aae=_0x352611(_0x626aae,_0x57ff82,_0x171bac,_0x59582b,_0x40828e,0xc,_0x32f11a[0x9]),_0x59582b=_0x352611(_0x59582b,_0x626aae,_0x57ff82,_0x171bac,_0x353a2b,0x11,_0x32f11a[0xa]),_0x171bac=_0x352611(_0x171bac,_0x59582b,_0x626aae,_0x57ff82,_0x5d8641,0x16,_0x32f11a[0xb]),_0x57ff82=_0x352611(_0x57ff82,_0x171bac,_0x59582b,_0x626aae,_0x582597,0x7,_0x32f11a[0xc]),_0x626aae=_0x352611(_0x626aae,_0x57ff82,_0x171bac,_0x59582b,_0x24c24f,0xc,_0x32f11a[0xd]),_0x59582b=_0x352611(_0x59582b,_0x626aae,_0x57ff82,_0x171bac,_0x152192,0x11,_0x32f11a[0xe]),_0x171bac=_0x352611(_0x171bac,_0x59582b,_0x626aae,_0x57ff82,_0x554cc8,0x16,_0x32f11a[0xf]),_0x57ff82=_0x188945(_0x57ff82,_0x171bac,_0x59582b,_0x626aae,_0x1b7179,0x5,_0x32f11a[0x10]),_0x626aae=_0x188945(_0x626aae,_0x57ff82,_0x171bac,_0x59582b,_0x5d5ed1,0x9,_0x32f11a[0x11]),_0x59582b=_0x188945(_0x59582b,_0x626aae,_0x57ff82,_0x171bac,_0x5d8641,0xe,_0x32f11a[0x12]),_0x171bac=_0x188945(_0x171bac,_0x59582b,_0x626aae,_0x57ff82,_0x4f7474,0x14,_0x32f11a[0x13]),_0x57ff82=_0x188945(_0x57ff82,_0x171bac,_0x59582b,_0x626aae,_0x6e148d,0x5,_0x32f11a[0x14]),_0x626aae=_0x188945(_0x626aae,_0x57ff82,_0x171bac,_0x59582b,_0x353a2b,0x9,_0x32f11a[0x15]),_0x59582b=_0x188945(_0x59582b,_0x626aae,_0x57ff82,_0x171bac,_0x554cc8,0xe,_0x32f11a[0x16]),_0x171bac=_0x188945(_0x171bac,_0x59582b,_0x626aae,_0x57ff82,_0x191a53,0x14,_0x32f11a[0x17]),_0x57ff82=_0x188945(_0x57ff82,_0x171bac,_0x59582b,_0x626aae,_0x40828e,0x5,_0x32f11a[0x18]),_0x626aae=_0x188945(_0x626aae,_0x57ff82,_0x171bac,_0x59582b,_0x152192,0x9,_0x32f11a[0x19]),_0x59582b=_0x188945(_0x59582b,_0x626aae,_0x57ff82,_0x171bac,_0x170513,0xe,_0x32f11a[0x1a]),_0x171bac=_0x188945(_0x171bac,_0x59582b,_0x626aae,_0x57ff82,_0x3deb65,0x14,_0x32f11a[0x1b]),_0x57ff82=_0x188945(_0x57ff82,_0x171bac,_0x59582b,_0x626aae,_0x24c24f,0x5,_0x32f11a[0x1c]),_0x626aae=_0x188945(_0x626aae,_0x57ff82,_0x171bac,_0x59582b,_0x4c6d31,0x9,_0x32f11a[0x1d]),_0x59582b=_0x188945(_0x59582b,_0x626aae,_0x57ff82,_0x171bac,_0x3cf9e9,0xe,_0x32f11a[0x1e]),_0x171bac=_0x188945(_0x171bac,_0x59582b,_0x626aae,_0x57ff82,_0x582597,0x14,_0x32f11a[0x1f]),_0x57ff82=_0xbc5a02(_0x57ff82,_0x171bac,_0x59582b,_0x626aae,_0x6e148d,0x4,_0x32f11a[0x20]),_0x626aae=_0xbc5a02(_0x626aae,_0x57ff82,_0x171bac,_0x59582b,_0x3deb65,0xb,_0x32f11a[0x21]),_0x59582b=_0xbc5a02(_0x59582b,_0x626aae,_0x57ff82,_0x171bac,_0x5d8641,0x10,_0x32f11a[0x22]),_0x171bac=_0xbc5a02(_0x171bac,_0x59582b,_0x626aae,_0x57ff82,_0x152192,0x17,_0x32f11a[0x23]),_0x57ff82=_0xbc5a02(_0x57ff82,_0x171bac,_0x59582b,_0x626aae,_0x1b7179,0x4,_0x32f11a[0x24]),_0x626aae=_0xbc5a02(_0x626aae,_0x57ff82,_0x171bac,_0x59582b,_0x191a53,0xb,_0x32f11a[0x25]),_0x59582b=_0xbc5a02(_0x59582b,_0x626aae,_0x57ff82,_0x171bac,_0x3cf9e9,0x10,_0x32f11a[0x26]),_0x171bac=_0xbc5a02(_0x171bac,_0x59582b,_0x626aae,_0x57ff82,_0x353a2b,0x17,_0x32f11a[0x27]),_0x57ff82=_0xbc5a02(_0x57ff82,_0x171bac,_0x59582b,_0x626aae,_0x24c24f,0x4,_0x32f11a[0x28]),_0x626aae=_0xbc5a02(_0x626aae,_0x57ff82,_0x171bac,_0x59582b,_0x4f7474,0xb,_0x32f11a[0x29]),_0x59582b=_0xbc5a02(_0x59582b,_0x626aae,_0x57ff82,_0x171bac,_0x170513,0x10,_0x32f11a[0x2a]),_0x171bac=_0xbc5a02(_0x171bac,_0x59582b,_0x626aae,_0x57ff82,_0x5d5ed1,0x17,_0x32f11a[0x2b]),_0x57ff82=_0xbc5a02(_0x57ff82,_0x171bac,_0x59582b,_0x626aae,_0x40828e,0x4,_0x32f11a[0x2c]),_0x626aae=_0xbc5a02(_0x626aae,_0x57ff82,_0x171bac,_0x59582b,_0x582597,0xb,_0x32f11a[0x2d]),_0x59582b=_0xbc5a02(_0x59582b,_0x626aae,_0x57ff82,_0x171bac,_0x554cc8,0x10,_0x32f11a[0x2e]),_0x171bac=_0xbc5a02(_0x171bac,_0x59582b,_0x626aae,_0x57ff82,_0x4c6d31,0x17,_0x32f11a[0x2f]),_0x57ff82=_0x32cbe1(_0x57ff82,_0x171bac,_0x59582b,_0x626aae,_0x4f7474,0x6,_0x32f11a[0x30]),_0x626aae=_0x32cbe1(_0x626aae,_0x57ff82,_0x171bac,_0x59582b,_0x3cf9e9,0xa,_0x32f11a[0x31]),_0x59582b=_0x32cbe1(_0x59582b,_0x626aae,_0x57ff82,_0x171bac,_0x152192,0xf,_0x32f11a[0x32]),_0x171bac=_0x32cbe1(_0x171bac,_0x59582b,_0x626aae,_0x57ff82,_0x6e148d,0x15,_0x32f11a[0x33]),_0x57ff82=_0x32cbe1(_0x57ff82,_0x171bac,_0x59582b,_0x626aae,_0x582597,0x6,_0x32f11a[0x34]),_0x626aae=_0x32cbe1(_0x626aae,_0x57ff82,_0x171bac,_0x59582b,_0x170513,0xa,_0x32f11a[0x35]),_0x59582b=_0x32cbe1(_0x59582b,_0x626aae,_0x57ff82,_0x171bac,_0x353a2b,0xf,_0x32f11a[0x36]),_0x171bac=_0x32cbe1(_0x171bac,_0x59582b,_0x626aae,_0x57ff82,_0x1b7179,0x15,_0x32f11a[0x37]),_0x57ff82=_0x32cbe1(_0x57ff82,_0x171bac,_0x59582b,_0x626aae,_0x3deb65,0x6,_0x32f11a[0x38]),_0x626aae=_0x32cbe1(_0x626aae,_0x57ff82,_0x171bac,_0x59582b,_0x554cc8,0xa,_0x32f11a[0x39]),_0x59582b=_0x32cbe1(_0x59582b,_0x626aae,_0x57ff82,_0x171bac,_0x5d5ed1,0xf,_0x32f11a[0x3a]),_0x171bac=_0x32cbe1(_0x171bac,_0x59582b,_0x626aae,_0x57ff82,_0x24c24f,0x15,_0x32f11a[0x3b]),_0x57ff82=_0x32cbe1(_0x57ff82,_0x171bac,_0x59582b,_0x626aae,_0x191a53,0x6,_0x32f11a[0x3c]),_0x626aae=_0x32cbe1(_0x626aae,_0x57ff82,_0x171bac,_0x59582b,_0x5d8641,0xa,_0x32f11a[0x3d]),_0x59582b=_0x32cbe1(_0x59582b,_0x626aae,_0x57ff82,_0x171bac,_0x4c6d31,0xf,_0x32f11a[0x3e]),_0x171bac=_0x32cbe1(_0x171bac,_0x59582b,_0x626aae,_0x57ff82,_0x40828e,0x15,_0x32f11a[0x3f]),_0x1a224f[0x0]=_0x1a224f[0x0]+_0x57ff82|0x0,_0x1a224f[0x1]=_0x1a224f[0x1]+_0x171bac|0x0,_0x1a224f[0x2]=_0x1a224f[0x2]+_0x59582b|0x0,_0x1a224f[0x3]=_0x1a224f[0x3]+_0x626aae|0x0;},'_doFinalize':function(){const _0x326c8c=_0x2ea870;var _0xbaaee6=this[_0x326c8c(0xeb)],_0x131da5=_0xbaaee6[_0x326c8c(0x2d4)],_0x8b0870=this[_0x326c8c(0x1d3)]*0x8,_0x659665=_0xbaaee6[_0x326c8c(0xa17)]*0x8;_0x131da5[_0x659665>>>0x5]|=0x80<<0x18-_0x659665%0x20;var _0xa4645d=_0x1a07d6[_0x326c8c(0x46e)](_0x8b0870/0x100000000),_0xb3ea57=_0x8b0870;_0x131da5[(_0x659665+0x40>>>0x9<<0x4)+0xf]=(_0xa4645d<<0x8|_0xa4645d>>>0x18)&0xff00ff|(_0xa4645d<<0x18|_0xa4645d>>>0x8)&0xff00ff00,_0x131da5[(_0x659665+0x40>>>0x9<<0x4)+0xe]=(_0xb3ea57<<0x8|_0xb3ea57>>>0x18)&0xff00ff|(_0xb3ea57<<0x18|_0xb3ea57>>>0x8)&0xff00ff00,_0xbaaee6['sigBytes']=(_0x131da5['length']+0x1)*0x4,this[_0x326c8c(0x342)]();for(var _0x4f181a=this[_0x326c8c(0x84f)],_0x5a9489=_0x4f181a[_0x326c8c(0x2d4)],_0xeb27b7=0x0;_0xeb27b7<0x4;_0xeb27b7++){var _0x1c9f24=_0x5a9489[_0xeb27b7];_0x5a9489[_0xeb27b7]=(_0x1c9f24<<0x8|_0x1c9f24>>>0x18)&0xff00ff|(_0x1c9f24<<0x18|_0x1c9f24>>>0x8)&0xff00ff00;}return _0x4f181a;},'clone':function(){const _0x200829=_0x2ea870;var _0x39c22d=_0x5e0110[_0x200829(0x5c3)]['call'](this);return _0x39c22d[_0x200829(0x84f)]=this[_0x200829(0x84f)][_0x200829(0x5c3)](),_0x39c22d;}});function _0x352611(_0x5a8161,_0xf1a62,_0x377890,_0x89c654,_0x51b85,_0x2bf939,_0x26d97f){var _0x2107d4=_0x5a8161+(_0xf1a62&_0x377890|~_0xf1a62&_0x89c654)+_0x51b85+_0x26d97f;return(_0x2107d4<<_0x2bf939|_0x2107d4>>>0x20-_0x2bf939)+_0xf1a62;}function _0x188945(_0xea4b82,_0x185854,_0x45aa0b,_0x57e294,_0x65c854,_0x228387,_0x11ce2){var _0x1f00ce=_0xea4b82+(_0x185854&_0x57e294|_0x45aa0b&~_0x57e294)+_0x65c854+_0x11ce2;return(_0x1f00ce<<_0x228387|_0x1f00ce>>>0x20-_0x228387)+_0x185854;}function _0xbc5a02(_0x3e1c2e,_0x129d37,_0x4b84c2,_0x57c6ba,_0x37b37d,_0x5568d2,_0x455f7a){var _0x2bd882=_0x3e1c2e+(_0x129d37^_0x4b84c2^_0x57c6ba)+_0x37b37d+_0x455f7a;return(_0x2bd882<<_0x5568d2|_0x2bd882>>>0x20-_0x5568d2)+_0x129d37;}function _0x32cbe1(_0x184cc8,_0x456084,_0x347f3a,_0x3346a9,_0x30ae53,_0x5692a1,_0x5b902c){var _0x55660c=_0x184cc8+(_0x347f3a^(_0x456084|~_0x3346a9))+_0x30ae53+_0x5b902c;return(_0x55660c<<_0x5692a1|_0x55660c>>>0x20-_0x5692a1)+_0x456084;}_0x40021e[_0x2ea870(0x30c)]=_0x5e0110['_createHelper'](_0x5ef90e),_0x40021e[_0x2ea870(0xfc)]=_0x5e0110[_0x2ea870(0x67c)](_0x5ef90e);}(Math),_0x361b46[_0x496fd9(0x30c)];}));}),_0x4b8031=_0x2d851e((_0x5ec9e0,_0x388b3f)=>{(function(_0x3e397a,_0x493e44){const _0x39aaa9=_0xf114;typeof _0x5ec9e0=='object'?_0x388b3f[_0x39aaa9(0x6ce)]=_0x5ec9e0=_0x493e44(_0x2b1809()):typeof define==_0x39aaa9(0x9e7)&&define[_0x39aaa9(0xfe)]?define([_0x39aaa9(0x7d0)],_0x493e44):_0x493e44(_0x3e397a[_0x39aaa9(0x626)]);}(_0x5ec9e0,function(_0x1ce766){const _0x314425=_0xf114;return(function(){const _0x262767=_0xf114;var _0x30b362=_0x1ce766,_0xf609a4=_0x30b362['lib'],_0x2fe7a6=_0xf609a4['WordArray'],_0x1f69bf=_0xf609a4[_0x262767(0x5cb)],_0x345c9b=_0x30b362[_0x262767(0x94b)],_0x48bd8b=[],_0x315e05=_0x345c9b['SHA1']=_0x1f69bf[_0x262767(0x8cd)]({'_doReset':function(){const _0x2d3891=_0x262767;this[_0x2d3891(0x84f)]=new _0x2fe7a6[(_0x2d3891(0x7ef))]([0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0]);},'_doProcessBlock':function(_0x18d90d,_0x1d880c){const _0x4de8ba=_0x262767;for(var _0x22a8f3=this['_hash'][_0x4de8ba(0x2d4)],_0x129df9=_0x22a8f3[0x0],_0x1f18dc=_0x22a8f3[0x1],_0x49f942=_0x22a8f3[0x2],_0x1702ef=_0x22a8f3[0x3],_0x116d05=_0x22a8f3[0x4],_0x313a8f=0x0;_0x313a8f<0x50;_0x313a8f++){if(_0x313a8f<0x10)_0x48bd8b[_0x313a8f]=_0x18d90d[_0x1d880c+_0x313a8f]|0x0;else{var _0x3c3f8d=_0x48bd8b[_0x313a8f-0x3]^_0x48bd8b[_0x313a8f-0x8]^_0x48bd8b[_0x313a8f-0xe]^_0x48bd8b[_0x313a8f-0x10];_0x48bd8b[_0x313a8f]=_0x3c3f8d<<0x1|_0x3c3f8d>>>0x1f;}var _0x5d0219=(_0x129df9<<0x5|_0x129df9>>>0x1b)+_0x116d05+_0x48bd8b[_0x313a8f];_0x313a8f<0x14?_0x5d0219+=(_0x1f18dc&_0x49f942|~_0x1f18dc&_0x1702ef)+0x5a827999:_0x313a8f<0x28?_0x5d0219+=(_0x1f18dc^_0x49f942^_0x1702ef)+0x6ed9eba1:_0x313a8f<0x3c?_0x5d0219+=(_0x1f18dc&_0x49f942|_0x1f18dc&_0x1702ef|_0x49f942&_0x1702ef)-0x70e44324:_0x5d0219+=(_0x1f18dc^_0x49f942^_0x1702ef)-0x359d3e2a,_0x116d05=_0x1702ef,_0x1702ef=_0x49f942,_0x49f942=_0x1f18dc<<0x1e|_0x1f18dc>>>0x2,_0x1f18dc=_0x129df9,_0x129df9=_0x5d0219;}_0x22a8f3[0x0]=_0x22a8f3[0x0]+_0x129df9|0x0,_0x22a8f3[0x1]=_0x22a8f3[0x1]+_0x1f18dc|0x0,_0x22a8f3[0x2]=_0x22a8f3[0x2]+_0x49f942|0x0,_0x22a8f3[0x3]=_0x22a8f3[0x3]+_0x1702ef|0x0,_0x22a8f3[0x4]=_0x22a8f3[0x4]+_0x116d05|0x0;},'_doFinalize':function(){const _0x1a1145=_0x262767;var _0x4d0365=this['_data'],_0x545c02=_0x4d0365[_0x1a1145(0x2d4)],_0x57f8ca=this['_nDataBytes']*0x8,_0x4d9824=_0x4d0365[_0x1a1145(0xa17)]*0x8;return _0x545c02[_0x4d9824>>>0x5]|=0x80<<0x18-_0x4d9824%0x20,_0x545c02[(_0x4d9824+0x40>>>0x9<<0x4)+0xe]=Math['floor'](_0x57f8ca/0x100000000),_0x545c02[(_0x4d9824+0x40>>>0x9<<0x4)+0xf]=_0x57f8ca,_0x4d0365[_0x1a1145(0xa17)]=_0x545c02[_0x1a1145(0x6a2)]*0x4,this['_process'](),this[_0x1a1145(0x84f)];},'clone':function(){const _0x49954b=_0x262767;var _0x724f21=_0x1f69bf['clone'][_0x49954b(0x7a4)](this);return _0x724f21[_0x49954b(0x84f)]=this[_0x49954b(0x84f)][_0x49954b(0x5c3)](),_0x724f21;}});_0x30b362[_0x262767(0x250)]=_0x1f69bf[_0x262767(0x58a)](_0x315e05),_0x30b362['HmacSHA1']=_0x1f69bf['_createHmacHelper'](_0x315e05);}()),_0x1ce766[_0x314425(0x250)];}));}),_0x4f46ff=_0x2d851e((_0x228ca6,_0x4b3725)=>{(function(_0x3de129,_0x11d8af){const _0x24d9d7=_0xf114;typeof _0x228ca6==_0x24d9d7(0xa3c)?_0x4b3725[_0x24d9d7(0x6ce)]=_0x228ca6=_0x11d8af(_0x2b1809()):typeof define==_0x24d9d7(0x9e7)&&define['amd']?define([_0x24d9d7(0x7d0)],_0x11d8af):_0x11d8af(_0x3de129[_0x24d9d7(0x626)]);}(_0x228ca6,function(_0x172404){const _0xe38191=_0xf114;return function(_0x3ffee8){const _0x47daa6=_0xf114;var _0x130c38=_0x172404,_0xfd5626=_0x130c38[_0x47daa6(0x6e8)],_0x466a4e=_0xfd5626[_0x47daa6(0x590)],_0xe37315=_0xfd5626[_0x47daa6(0x5cb)],_0x2f6f19=_0x130c38['algo'],_0x456aa0=[],_0x420d35=[];(function(){const _0x5db2b4=_0x47daa6;function _0x346848(_0xa135c4){for(var _0x6bccb5=_0x3ffee8['sqrt'](_0xa135c4),_0x2b32f1=0x2;_0x2b32f1<=_0x6bccb5;_0x2b32f1++)if(!(_0xa135c4%_0x2b32f1))return!0x1;return!0x0;}function _0x127f69(_0x1d13a5){return(_0x1d13a5-(_0x1d13a5|0x0))*0x100000000|0x0;}for(var _0x5b9346=0x2,_0xf77bc4=0x0;_0xf77bc4<0x40;)_0x346848(_0x5b9346)&&(_0xf77bc4<0x8&&(_0x456aa0[_0xf77bc4]=_0x127f69(_0x3ffee8[_0x5db2b4(0x191)](_0x5b9346,0x1/0x2))),_0x420d35[_0xf77bc4]=_0x127f69(_0x3ffee8[_0x5db2b4(0x191)](_0x5b9346,0x1/0x3)),_0xf77bc4++),_0x5b9346++;}());var _0x124546=[],_0x542470=_0x2f6f19[_0x47daa6(0x994)]=_0xe37315[_0x47daa6(0x8cd)]({'_doReset':function(){const _0x2e9bf6=_0x47daa6;this[_0x2e9bf6(0x84f)]=new _0x466a4e[(_0x2e9bf6(0x7ef))](_0x456aa0[_0x2e9bf6(0x724)](0x0));},'_doProcessBlock':function(_0x5b7a1f,_0x14ba29){const _0x3838c2=_0x47daa6;for(var _0x5977b0=this[_0x3838c2(0x84f)][_0x3838c2(0x2d4)],_0x509772=_0x5977b0[0x0],_0x35ee56=_0x5977b0[0x1],_0x54db2e=_0x5977b0[0x2],_0x2aff3a=_0x5977b0[0x3],_0x52a645=_0x5977b0[0x4],_0xcc9ecf=_0x5977b0[0x5],_0x1d96e8=_0x5977b0[0x6],_0x1beacd=_0x5977b0[0x7],_0x5237a2=0x0;_0x5237a2<0x40;_0x5237a2++){if(_0x5237a2<0x10)_0x124546[_0x5237a2]=_0x5b7a1f[_0x14ba29+_0x5237a2]|0x0;else{var _0x3987eb=_0x124546[_0x5237a2-0xf],_0x31c395=(_0x3987eb<<0x19|_0x3987eb>>>0x7)^(_0x3987eb<<0xe|_0x3987eb>>>0x12)^_0x3987eb>>>0x3,_0x699cfa=_0x124546[_0x5237a2-0x2],_0x37a2f1=(_0x699cfa<<0xf|_0x699cfa>>>0x11)^(_0x699cfa<<0xd|_0x699cfa>>>0x13)^_0x699cfa>>>0xa;_0x124546[_0x5237a2]=_0x31c395+_0x124546[_0x5237a2-0x7]+_0x37a2f1+_0x124546[_0x5237a2-0x10];}var _0x3944c6=_0x52a645&_0xcc9ecf^~_0x52a645&_0x1d96e8,_0x28a1ff=_0x509772&_0x35ee56^_0x509772&_0x54db2e^_0x35ee56&_0x54db2e,_0x4046b9=(_0x509772<<0x1e|_0x509772>>>0x2)^(_0x509772<<0x13|_0x509772>>>0xd)^(_0x509772<<0xa|_0x509772>>>0x16),_0xc2ed74=(_0x52a645<<0x1a|_0x52a645>>>0x6)^(_0x52a645<<0x15|_0x52a645>>>0xb)^(_0x52a645<<0x7|_0x52a645>>>0x19),_0x54ef2e=_0x1beacd+_0xc2ed74+_0x3944c6+_0x420d35[_0x5237a2]+_0x124546[_0x5237a2],_0x509ed5=_0x4046b9+_0x28a1ff;_0x1beacd=_0x1d96e8,_0x1d96e8=_0xcc9ecf,_0xcc9ecf=_0x52a645,_0x52a645=_0x2aff3a+_0x54ef2e|0x0,_0x2aff3a=_0x54db2e,_0x54db2e=_0x35ee56,_0x35ee56=_0x509772,_0x509772=_0x54ef2e+_0x509ed5|0x0;}_0x5977b0[0x0]=_0x5977b0[0x0]+_0x509772|0x0,_0x5977b0[0x1]=_0x5977b0[0x1]+_0x35ee56|0x0,_0x5977b0[0x2]=_0x5977b0[0x2]+_0x54db2e|0x0,_0x5977b0[0x3]=_0x5977b0[0x3]+_0x2aff3a|0x0,_0x5977b0[0x4]=_0x5977b0[0x4]+_0x52a645|0x0,_0x5977b0[0x5]=_0x5977b0[0x5]+_0xcc9ecf|0x0,_0x5977b0[0x6]=_0x5977b0[0x6]+_0x1d96e8|0x0,_0x5977b0[0x7]=_0x5977b0[0x7]+_0x1beacd|0x0;},'_doFinalize':function(){const _0x3b8186=_0x47daa6;var _0x530867=this[_0x3b8186(0xeb)],_0x303876=_0x530867['words'],_0x248b25=this[_0x3b8186(0x1d3)]*0x8,_0xeaaeaa=_0x530867['sigBytes']*0x8;return _0x303876[_0xeaaeaa>>>0x5]|=0x80<<0x18-_0xeaaeaa%0x20,_0x303876[(_0xeaaeaa+0x40>>>0x9<<0x4)+0xe]=_0x3ffee8[_0x3b8186(0x46e)](_0x248b25/0x100000000),_0x303876[(_0xeaaeaa+0x40>>>0x9<<0x4)+0xf]=_0x248b25,_0x530867[_0x3b8186(0xa17)]=_0x303876[_0x3b8186(0x6a2)]*0x4,this['_process'](),this[_0x3b8186(0x84f)];},'clone':function(){const _0x16d67a=_0x47daa6;var _0x3d2514=_0xe37315[_0x16d67a(0x5c3)][_0x16d67a(0x7a4)](this);return _0x3d2514[_0x16d67a(0x84f)]=this[_0x16d67a(0x84f)][_0x16d67a(0x5c3)](),_0x3d2514;}});_0x130c38['SHA256']=_0xe37315['_createHelper'](_0x542470),_0x130c38[_0x47daa6(0x188)]=_0xe37315[_0x47daa6(0x67c)](_0x542470);}(Math),_0x172404[_0xe38191(0x994)];}));}),_0x354a2b=_0x2d851e((_0x1efcc4,_0x43c808)=>{(function(_0x2df9ef,_0x274af5,_0x418dfe){const _0x173bc6=_0xf114;typeof _0x1efcc4=='object'?_0x43c808['exports']=_0x1efcc4=_0x274af5(_0x2b1809(),_0x4f46ff()):typeof define=='function'&&define[_0x173bc6(0xfe)]?define([_0x173bc6(0x7d0),_0x173bc6(0x231)],_0x274af5):_0x274af5(_0x2df9ef[_0x173bc6(0x626)]);}(_0x1efcc4,function(_0x5bc750){const _0x3269d3=_0xf114;return(function(){const _0x43fa0f=_0xf114;var _0x526a51=_0x5bc750,_0x263229=_0x526a51[_0x43fa0f(0x6e8)],_0x24483a=_0x263229[_0x43fa0f(0x590)],_0x387280=_0x526a51['algo'],_0x9b23b8=_0x387280[_0x43fa0f(0x994)],_0x5c0a8b=_0x387280[_0x43fa0f(0x6c9)]=_0x9b23b8[_0x43fa0f(0x8cd)]({'_doReset':function(){const _0x1239fb=_0x43fa0f;this[_0x1239fb(0x84f)]=new _0x24483a[(_0x1239fb(0x7ef))]([0xc1059ed8,0x367cd507,0x3070dd17,0xf70e5939,0xffc00b31,0x68581511,0x64f98fa7,0xbefa4fa4]);},'_doFinalize':function(){const _0x31ecc3=_0x43fa0f;var _0x906c8b=_0x9b23b8['_doFinalize'][_0x31ecc3(0x7a4)](this);return _0x906c8b[_0x31ecc3(0xa17)]-=0x4,_0x906c8b;}});_0x526a51[_0x43fa0f(0x6c9)]=_0x9b23b8[_0x43fa0f(0x58a)](_0x5c0a8b),_0x526a51['HmacSHA224']=_0x9b23b8[_0x43fa0f(0x67c)](_0x5c0a8b);}()),_0x5bc750[_0x3269d3(0x6c9)];}));}),_0xf4b641=_0x2d851e((_0x4643d5,_0x5bbf8e)=>{(function(_0x424c9c,_0x5aca0b,_0x2547cc){const _0x905dbc=_0xf114;typeof _0x4643d5=='object'?_0x5bbf8e['exports']=_0x4643d5=_0x5aca0b(_0x2b1809(),_0x2f0e66()):typeof define=='function'&&define[_0x905dbc(0xfe)]?define([_0x905dbc(0x7d0),'./x64-core'],_0x5aca0b):_0x5aca0b(_0x424c9c[_0x905dbc(0x626)]);}(_0x4643d5,function(_0x59c5ea){const _0x10062d=_0xf114;return(function(){const _0x33af3f=_0xf114;var _0x26ea01=_0x59c5ea,_0x4f62ed=_0x26ea01[_0x33af3f(0x6e8)],_0x301c2d=_0x4f62ed[_0x33af3f(0x5cb)],_0xe3b60d=_0x26ea01[_0x33af3f(0x783)],_0x114d15=_0xe3b60d[_0x33af3f(0x73e)],_0x2d392a=_0xe3b60d['WordArray'],_0x579bf8=_0x26ea01['algo'];function _0x1ce09a(){const _0x51d52c=_0x33af3f;return _0x114d15[_0x51d52c(0x484)]['apply'](_0x114d15,arguments);}var _0x54f5de=[_0x1ce09a(0x428a2f98,0xd728ae22),_0x1ce09a(0x71374491,0x23ef65cd),_0x1ce09a(0xb5c0fbcf,0xec4d3b2f),_0x1ce09a(0xe9b5dba5,0x8189dbbc),_0x1ce09a(0x3956c25b,0xf348b538),_0x1ce09a(0x59f111f1,0xb605d019),_0x1ce09a(0x923f82a4,0xaf194f9b),_0x1ce09a(0xab1c5ed5,0xda6d8118),_0x1ce09a(0xd807aa98,0xa3030242),_0x1ce09a(0x12835b01,0x45706fbe),_0x1ce09a(0x243185be,0x4ee4b28c),_0x1ce09a(0x550c7dc3,0xd5ffb4e2),_0x1ce09a(0x72be5d74,0xf27b896f),_0x1ce09a(0x80deb1fe,0x3b1696b1),_0x1ce09a(0x9bdc06a7,0x25c71235),_0x1ce09a(0xc19bf174,0xcf692694),_0x1ce09a(0xe49b69c1,0x9ef14ad2),_0x1ce09a(0xefbe4786,0x384f25e3),_0x1ce09a(0xfc19dc6,0x8b8cd5b5),_0x1ce09a(0x240ca1cc,0x77ac9c65),_0x1ce09a(0x2de92c6f,0x592b0275),_0x1ce09a(0x4a7484aa,0x6ea6e483),_0x1ce09a(0x5cb0a9dc,0xbd41fbd4),_0x1ce09a(0x76f988da,0x831153b5),_0x1ce09a(0x983e5152,0xee66dfab),_0x1ce09a(0xa831c66d,0x2db43210),_0x1ce09a(0xb00327c8,0x98fb213f),_0x1ce09a(0xbf597fc7,0xbeef0ee4),_0x1ce09a(0xc6e00bf3,0x3da88fc2),_0x1ce09a(0xd5a79147,0x930aa725),_0x1ce09a(0x6ca6351,0xe003826f),_0x1ce09a(0x14292967,0xa0e6e70),_0x1ce09a(0x27b70a85,0x46d22ffc),_0x1ce09a(0x2e1b2138,0x5c26c926),_0x1ce09a(0x4d2c6dfc,0x5ac42aed),_0x1ce09a(0x53380d13,0x9d95b3df),_0x1ce09a(0x650a7354,0x8baf63de),_0x1ce09a(0x766a0abb,0x3c77b2a8),_0x1ce09a(0x81c2c92e,0x47edaee6),_0x1ce09a(0x92722c85,0x1482353b),_0x1ce09a(0xa2bfe8a1,0x4cf10364),_0x1ce09a(0xa81a664b,0xbc423001),_0x1ce09a(0xc24b8b70,0xd0f89791),_0x1ce09a(0xc76c51a3,0x654be30),_0x1ce09a(0xd192e819,0xd6ef5218),_0x1ce09a(0xd6990624,0x5565a910),_0x1ce09a(0xf40e3585,0x5771202a),_0x1ce09a(0x106aa070,0x32bbd1b8),_0x1ce09a(0x19a4c116,0xb8d2d0c8),_0x1ce09a(0x1e376c08,0x5141ab53),_0x1ce09a(0x2748774c,0xdf8eeb99),_0x1ce09a(0x34b0bcb5,0xe19b48a8),_0x1ce09a(0x391c0cb3,0xc5c95a63),_0x1ce09a(0x4ed8aa4a,0xe3418acb),_0x1ce09a(0x5b9cca4f,0x7763e373),_0x1ce09a(0x682e6ff3,0xd6b2b8a3),_0x1ce09a(0x748f82ee,0x5defb2fc),_0x1ce09a(0x78a5636f,0x43172f60),_0x1ce09a(0x84c87814,0xa1f0ab72),_0x1ce09a(0x8cc70208,0x1a6439ec),_0x1ce09a(0x90befffa,0x23631e28),_0x1ce09a(0xa4506ceb,0xde82bde9),_0x1ce09a(0xbef9a3f7,0xb2c67915),_0x1ce09a(0xc67178f2,0xe372532b),_0x1ce09a(0xca273ece,0xea26619c),_0x1ce09a(0xd186b8c7,0x21c0c207),_0x1ce09a(0xeada7dd6,0xcde0eb1e),_0x1ce09a(0xf57d4f7f,0xee6ed178),_0x1ce09a(0x6f067aa,0x72176fba),_0x1ce09a(0xa637dc5,0xa2c898a6),_0x1ce09a(0x113f9804,0xbef90dae),_0x1ce09a(0x1b710b35,0x131c471b),_0x1ce09a(0x28db77f5,0x23047d84),_0x1ce09a(0x32caab7b,0x40c72493),_0x1ce09a(0x3c9ebe0a,0x15c9bebc),_0x1ce09a(0x431d67c4,0x9c100d4c),_0x1ce09a(0x4cc5d4be,0xcb3e42b6),_0x1ce09a(0x597f299c,0xfc657e2a),_0x1ce09a(0x5fcb6fab,0x3ad6faec),_0x1ce09a(0x6c44198c,0x4a475817)],_0x9b4eb4=[];(function(){for(var _0x312edd=0x0;_0x312edd<0x50;_0x312edd++)_0x9b4eb4[_0x312edd]=_0x1ce09a();}());var _0x1fa0bf=_0x579bf8[_0x33af3f(0xa15)]=_0x301c2d[_0x33af3f(0x8cd)]({'_doReset':function(){const _0x2c5a98=_0x33af3f;this[_0x2c5a98(0x84f)]=new _0x2d392a['init']([new _0x114d15[(_0x2c5a98(0x7ef))](0x6a09e667,0xf3bcc908),new _0x114d15[(_0x2c5a98(0x7ef))](0xbb67ae85,0x84caa73b),new _0x114d15[(_0x2c5a98(0x7ef))](0x3c6ef372,0xfe94f82b),new _0x114d15['init'](0xa54ff53a,0x5f1d36f1),new _0x114d15[(_0x2c5a98(0x7ef))](0x510e527f,0xade682d1),new _0x114d15[(_0x2c5a98(0x7ef))](0x9b05688c,0x2b3e6c1f),new _0x114d15[(_0x2c5a98(0x7ef))](0x1f83d9ab,0xfb41bd6b),new _0x114d15[(_0x2c5a98(0x7ef))](0x5be0cd19,0x137e2179)]);},'_doProcessBlock':function(_0xee2564,_0x41ca18){const _0x1d5489=_0x33af3f;for(var _0x1dc4ed=this[_0x1d5489(0x84f)][_0x1d5489(0x2d4)],_0x33c493=_0x1dc4ed[0x0],_0x2c22ce=_0x1dc4ed[0x1],_0x16886a=_0x1dc4ed[0x2],_0x5d8b7f=_0x1dc4ed[0x3],_0x2c3e50=_0x1dc4ed[0x4],_0x3dcc85=_0x1dc4ed[0x5],_0x54a177=_0x1dc4ed[0x6],_0x1e02b0=_0x1dc4ed[0x7],_0x4b899e=_0x33c493[_0x1d5489(0x94c)],_0x46706b=_0x33c493[_0x1d5489(0x45d)],_0x117ed5=_0x2c22ce[_0x1d5489(0x94c)],_0x4f3de1=_0x2c22ce[_0x1d5489(0x45d)],_0x5d36eb=_0x16886a['high'],_0x1a0365=_0x16886a[_0x1d5489(0x45d)],_0x4a92a1=_0x5d8b7f[_0x1d5489(0x94c)],_0x112cf7=_0x5d8b7f[_0x1d5489(0x45d)],_0x2f4dd1=_0x2c3e50[_0x1d5489(0x94c)],_0x45231c=_0x2c3e50[_0x1d5489(0x45d)],_0x1de8fa=_0x3dcc85[_0x1d5489(0x94c)],_0x46fb84=_0x3dcc85['low'],_0x4a6301=_0x54a177[_0x1d5489(0x94c)],_0x9d95fd=_0x54a177['low'],_0x2737b7=_0x1e02b0[_0x1d5489(0x94c)],_0x19cf24=_0x1e02b0[_0x1d5489(0x45d)],_0x5a3361=_0x4b899e,_0x363f01=_0x46706b,_0x2483d0=_0x117ed5,_0x46d2cb=_0x4f3de1,_0x547275=_0x5d36eb,_0x382576=_0x1a0365,_0x477e81=_0x4a92a1,_0x2b41cf=_0x112cf7,_0x3da000=_0x2f4dd1,_0x95b93b=_0x45231c,_0x51ef56=_0x1de8fa,_0x228d73=_0x46fb84,_0xb01fa6=_0x4a6301,_0x4a741b=_0x9d95fd,_0x2742b9=_0x2737b7,_0x330fbb=_0x19cf24,_0x3517a4=0x0;_0x3517a4<0x50;_0x3517a4++){var _0x5de094,_0x3f51e6,_0x19b3d0=_0x9b4eb4[_0x3517a4];if(_0x3517a4<0x10)_0x3f51e6=_0x19b3d0[_0x1d5489(0x94c)]=_0xee2564[_0x41ca18+_0x3517a4*0x2]|0x0,_0x5de094=_0x19b3d0['low']=_0xee2564[_0x41ca18+_0x3517a4*0x2+0x1]|0x0;else{var _0x47e235=_0x9b4eb4[_0x3517a4-0xf],_0x577560=_0x47e235['high'],_0x4e2f6b=_0x47e235[_0x1d5489(0x45d)],_0x118f57=(_0x577560>>>0x1|_0x4e2f6b<<0x1f)^(_0x577560>>>0x8|_0x4e2f6b<<0x18)^_0x577560>>>0x7,_0x7628bb=(_0x4e2f6b>>>0x1|_0x577560<<0x1f)^(_0x4e2f6b>>>0x8|_0x577560<<0x18)^(_0x4e2f6b>>>0x7|_0x577560<<0x19),_0x2a044a=_0x9b4eb4[_0x3517a4-0x2],_0x5626a4=_0x2a044a[_0x1d5489(0x94c)],_0x528cf3=_0x2a044a[_0x1d5489(0x45d)],_0x23731a=(_0x5626a4>>>0x13|_0x528cf3<<0xd)^(_0x5626a4<<0x3|_0x528cf3>>>0x1d)^_0x5626a4>>>0x6,_0x5c3287=(_0x528cf3>>>0x13|_0x5626a4<<0xd)^(_0x528cf3<<0x3|_0x5626a4>>>0x1d)^(_0x528cf3>>>0x6|_0x5626a4<<0x1a),_0x442533=_0x9b4eb4[_0x3517a4-0x7],_0x34c299=_0x442533[_0x1d5489(0x94c)],_0x49d929=_0x442533[_0x1d5489(0x45d)],_0x21b576=_0x9b4eb4[_0x3517a4-0x10],_0x29bf2b=_0x21b576[_0x1d5489(0x94c)],_0x169fc6=_0x21b576[_0x1d5489(0x45d)];_0x5de094=_0x7628bb+_0x49d929,_0x3f51e6=_0x118f57+_0x34c299+(_0x5de094>>>0x0<_0x7628bb>>>0x0?0x1:0x0),_0x5de094=_0x5de094+_0x5c3287,_0x3f51e6=_0x3f51e6+_0x23731a+(_0x5de094>>>0x0<_0x5c3287>>>0x0?0x1:0x0),_0x5de094=_0x5de094+_0x169fc6,_0x3f51e6=_0x3f51e6+_0x29bf2b+(_0x5de094>>>0x0<_0x169fc6>>>0x0?0x1:0x0),_0x19b3d0[_0x1d5489(0x94c)]=_0x3f51e6,_0x19b3d0[_0x1d5489(0x45d)]=_0x5de094;}var _0x5ecc01=_0x3da000&_0x51ef56^~_0x3da000&_0xb01fa6,_0x5176cc=_0x95b93b&_0x228d73^~_0x95b93b&_0x4a741b,_0x310cff=_0x5a3361&_0x2483d0^_0x5a3361&_0x547275^_0x2483d0&_0x547275,_0x2ed4fa=_0x363f01&_0x46d2cb^_0x363f01&_0x382576^_0x46d2cb&_0x382576,_0x534787=(_0x5a3361>>>0x1c|_0x363f01<<0x4)^(_0x5a3361<<0x1e|_0x363f01>>>0x2)^(_0x5a3361<<0x19|_0x363f01>>>0x7),_0x2a4be7=(_0x363f01>>>0x1c|_0x5a3361<<0x4)^(_0x363f01<<0x1e|_0x5a3361>>>0x2)^(_0x363f01<<0x19|_0x5a3361>>>0x7),_0x4b4310=(_0x3da000>>>0xe|_0x95b93b<<0x12)^(_0x3da000>>>0x12|_0x95b93b<<0xe)^(_0x3da000<<0x17|_0x95b93b>>>0x9),_0x3cf476=(_0x95b93b>>>0xe|_0x3da000<<0x12)^(_0x95b93b>>>0x12|_0x3da000<<0xe)^(_0x95b93b<<0x17|_0x3da000>>>0x9),_0xd7c502=_0x54f5de[_0x3517a4],_0x5c4112=_0xd7c502[_0x1d5489(0x94c)],_0x10e11c=_0xd7c502[_0x1d5489(0x45d)],_0x53f553=_0x330fbb+_0x3cf476,_0x475c12=_0x2742b9+_0x4b4310+(_0x53f553>>>0x0<_0x330fbb>>>0x0?0x1:0x0),_0x53f553=_0x53f553+_0x5176cc,_0x475c12=_0x475c12+_0x5ecc01+(_0x53f553>>>0x0<_0x5176cc>>>0x0?0x1:0x0),_0x53f553=_0x53f553+_0x10e11c,_0x475c12=_0x475c12+_0x5c4112+(_0x53f553>>>0x0<_0x10e11c>>>0x0?0x1:0x0),_0x53f553=_0x53f553+_0x5de094,_0x475c12=_0x475c12+_0x3f51e6+(_0x53f553>>>0x0<_0x5de094>>>0x0?0x1:0x0),_0x2a9b62=_0x2a4be7+_0x2ed4fa,_0x74e272=_0x534787+_0x310cff+(_0x2a9b62>>>0x0<_0x2a4be7>>>0x0?0x1:0x0);_0x2742b9=_0xb01fa6,_0x330fbb=_0x4a741b,_0xb01fa6=_0x51ef56,_0x4a741b=_0x228d73,_0x51ef56=_0x3da000,_0x228d73=_0x95b93b,_0x95b93b=_0x2b41cf+_0x53f553|0x0,_0x3da000=_0x477e81+_0x475c12+(_0x95b93b>>>0x0<_0x2b41cf>>>0x0?0x1:0x0)|0x0,_0x477e81=_0x547275,_0x2b41cf=_0x382576,_0x547275=_0x2483d0,_0x382576=_0x46d2cb,_0x2483d0=_0x5a3361,_0x46d2cb=_0x363f01,_0x363f01=_0x53f553+_0x2a9b62|0x0,_0x5a3361=_0x475c12+_0x74e272+(_0x363f01>>>0x0<_0x53f553>>>0x0?0x1:0x0)|0x0;}_0x46706b=_0x33c493[_0x1d5489(0x45d)]=_0x46706b+_0x363f01,_0x33c493[_0x1d5489(0x94c)]=_0x4b899e+_0x5a3361+(_0x46706b>>>0x0<_0x363f01>>>0x0?0x1:0x0),_0x4f3de1=_0x2c22ce[_0x1d5489(0x45d)]=_0x4f3de1+_0x46d2cb,_0x2c22ce['high']=_0x117ed5+_0x2483d0+(_0x4f3de1>>>0x0<_0x46d2cb>>>0x0?0x1:0x0),_0x1a0365=_0x16886a[_0x1d5489(0x45d)]=_0x1a0365+_0x382576,_0x16886a['high']=_0x5d36eb+_0x547275+(_0x1a0365>>>0x0<_0x382576>>>0x0?0x1:0x0),_0x112cf7=_0x5d8b7f['low']=_0x112cf7+_0x2b41cf,_0x5d8b7f['high']=_0x4a92a1+_0x477e81+(_0x112cf7>>>0x0<_0x2b41cf>>>0x0?0x1:0x0),_0x45231c=_0x2c3e50[_0x1d5489(0x45d)]=_0x45231c+_0x95b93b,_0x2c3e50['high']=_0x2f4dd1+_0x3da000+(_0x45231c>>>0x0<_0x95b93b>>>0x0?0x1:0x0),_0x46fb84=_0x3dcc85[_0x1d5489(0x45d)]=_0x46fb84+_0x228d73,_0x3dcc85[_0x1d5489(0x94c)]=_0x1de8fa+_0x51ef56+(_0x46fb84>>>0x0<_0x228d73>>>0x0?0x1:0x0),_0x9d95fd=_0x54a177['low']=_0x9d95fd+_0x4a741b,_0x54a177[_0x1d5489(0x94c)]=_0x4a6301+_0xb01fa6+(_0x9d95fd>>>0x0<_0x4a741b>>>0x0?0x1:0x0),_0x19cf24=_0x1e02b0['low']=_0x19cf24+_0x330fbb,_0x1e02b0[_0x1d5489(0x94c)]=_0x2737b7+_0x2742b9+(_0x19cf24>>>0x0<_0x330fbb>>>0x0?0x1:0x0);},'_doFinalize':function(){const _0x2a6a9f=_0x33af3f;var _0x5f2594=this[_0x2a6a9f(0xeb)],_0x590db2=_0x5f2594[_0x2a6a9f(0x2d4)],_0x124fcc=this[_0x2a6a9f(0x1d3)]*0x8,_0x30c9e5=_0x5f2594['sigBytes']*0x8;_0x590db2[_0x30c9e5>>>0x5]|=0x80<<0x18-_0x30c9e5%0x20,_0x590db2[(_0x30c9e5+0x80>>>0xa<<0x5)+0x1e]=Math[_0x2a6a9f(0x46e)](_0x124fcc/0x100000000),_0x590db2[(_0x30c9e5+0x80>>>0xa<<0x5)+0x1f]=_0x124fcc,_0x5f2594[_0x2a6a9f(0xa17)]=_0x590db2['length']*0x4,this[_0x2a6a9f(0x342)]();var _0x2f52ad=this[_0x2a6a9f(0x84f)]['toX32']();return _0x2f52ad;},'clone':function(){const _0x3a527b=_0x33af3f;var _0x4293d9=_0x301c2d[_0x3a527b(0x5c3)][_0x3a527b(0x7a4)](this);return _0x4293d9[_0x3a527b(0x84f)]=this[_0x3a527b(0x84f)][_0x3a527b(0x5c3)](),_0x4293d9;},'blockSize':0x400/0x20});_0x26ea01[_0x33af3f(0xa15)]=_0x301c2d[_0x33af3f(0x58a)](_0x1fa0bf),_0x26ea01[_0x33af3f(0x115)]=_0x301c2d['_createHmacHelper'](_0x1fa0bf);}()),_0x59c5ea[_0x10062d(0xa15)];}));}),_0x5f1b66=_0x2d851e((_0x4a4f78,_0x16dca5)=>{(function(_0x4831d2,_0x2a830c,_0xdd4371){const _0x3fc8ba=_0xf114;typeof _0x4a4f78==_0x3fc8ba(0xa3c)?_0x16dca5[_0x3fc8ba(0x6ce)]=_0x4a4f78=_0x2a830c(_0x2b1809(),_0x2f0e66(),_0xf4b641()):typeof define==_0x3fc8ba(0x9e7)&&define[_0x3fc8ba(0xfe)]?define(['./core',_0x3fc8ba(0x7d6),'./sha512'],_0x2a830c):_0x2a830c(_0x4831d2['CryptoJS']);}(_0x4a4f78,function(_0x249e6a){const _0x35abe5=_0xf114;return(function(){const _0x3900d5=_0xf114;var _0x3bd120=_0x249e6a,_0x45550a=_0x3bd120[_0x3900d5(0x783)],_0x2c685e=_0x45550a[_0x3900d5(0x73e)],_0x135e00=_0x45550a[_0x3900d5(0x590)],_0x56e2bf=_0x3bd120[_0x3900d5(0x94b)],_0x5a8f4b=_0x56e2bf[_0x3900d5(0xa15)],_0x3a122b=_0x56e2bf[_0x3900d5(0x773)]=_0x5a8f4b[_0x3900d5(0x8cd)]({'_doReset':function(){const _0x4d3668=_0x3900d5;this[_0x4d3668(0x84f)]=new _0x135e00['init']([new _0x2c685e[(_0x4d3668(0x7ef))](0xcbbb9d5d,0xc1059ed8),new _0x2c685e['init'](0x629a292a,0x367cd507),new _0x2c685e[(_0x4d3668(0x7ef))](0x9159015a,0x3070dd17),new _0x2c685e[(_0x4d3668(0x7ef))](0x152fecd8,0xf70e5939),new _0x2c685e['init'](0x67332667,0xffc00b31),new _0x2c685e[(_0x4d3668(0x7ef))](0x8eb44a87,0x68581511),new _0x2c685e['init'](0xdb0c2e0d,0x64f98fa7),new _0x2c685e[(_0x4d3668(0x7ef))](0x47b5481d,0xbefa4fa4)]);},'_doFinalize':function(){const _0x15df41=_0x3900d5;var _0x28b9fe=_0x5a8f4b['_doFinalize'][_0x15df41(0x7a4)](this);return _0x28b9fe[_0x15df41(0xa17)]-=0x10,_0x28b9fe;}});_0x3bd120['SHA384']=_0x5a8f4b['_createHelper'](_0x3a122b),_0x3bd120['HmacSHA384']=_0x5a8f4b['_createHmacHelper'](_0x3a122b);}()),_0x249e6a[_0x35abe5(0x773)];}));}),_0x5bda7d=_0x2d851e((_0x5eaceb,_0x4ee9fa)=>{(function(_0x20c8ba,_0x1b6565,_0x579933){const _0x528e38=_0xf114;typeof _0x5eaceb==_0x528e38(0xa3c)?_0x4ee9fa[_0x528e38(0x6ce)]=_0x5eaceb=_0x1b6565(_0x2b1809(),_0x2f0e66()):typeof define==_0x528e38(0x9e7)&&define[_0x528e38(0xfe)]?define([_0x528e38(0x7d0),_0x528e38(0x7d6)],_0x1b6565):_0x1b6565(_0x20c8ba[_0x528e38(0x626)]);}(_0x5eaceb,function(_0x45fa11){const _0x564944=_0xf114;return function(_0x380808){const _0xf31dfc=_0xf114;var _0x279d2e=_0x45fa11,_0x592a81=_0x279d2e['lib'],_0x5803cd=_0x592a81['WordArray'],_0x2756f3=_0x592a81[_0xf31dfc(0x5cb)],_0x2e4838=_0x279d2e[_0xf31dfc(0x783)],_0x1ac559=_0x2e4838[_0xf31dfc(0x73e)],_0x131ed8=_0x279d2e[_0xf31dfc(0x94b)],_0x550ca3=[],_0x23fa96=[],_0x19b412=[];(function(){const _0x1daf76=_0xf31dfc;for(var _0x842fac=0x1,_0x19dea7=0x0,_0x1aaaed=0x0;_0x1aaaed<0x18;_0x1aaaed++){_0x550ca3[_0x842fac+0x5*_0x19dea7]=(_0x1aaaed+0x1)*(_0x1aaaed+0x2)/0x2%0x40;var _0x1dce0c=_0x19dea7%0x5,_0x3b85ce=(0x2*_0x842fac+0x3*_0x19dea7)%0x5;_0x842fac=_0x1dce0c,_0x19dea7=_0x3b85ce;}for(var _0x842fac=0x0;_0x842fac<0x5;_0x842fac++)for(var _0x19dea7=0x0;_0x19dea7<0x5;_0x19dea7++)_0x23fa96[_0x842fac+0x5*_0x19dea7]=_0x19dea7+(0x2*_0x842fac+0x3*_0x19dea7)%0x5*0x5;for(var _0x2f37e7=0x1,_0x457650=0x0;_0x457650<0x18;_0x457650++){for(var _0x1f5e56=0x0,_0x463580=0x0,_0x2aea00=0x0;_0x2aea00<0x7;_0x2aea00++){if(_0x2f37e7&0x1){var _0x23b6d1=(0x1<<_0x2aea00)-0x1;_0x23b6d1<0x20?_0x463580^=0x1<<_0x23b6d1:_0x1f5e56^=0x1<<_0x23b6d1-0x20;}_0x2f37e7&0x80?_0x2f37e7=_0x2f37e7<<0x1^0x71:_0x2f37e7<<=0x1;}_0x19b412[_0x457650]=_0x1ac559[_0x1daf76(0x484)](_0x1f5e56,_0x463580);}}());var _0x1b0f19=[];(function(){const _0x463975=_0xf31dfc;for(var _0x398001=0x0;_0x398001<0x19;_0x398001++)_0x1b0f19[_0x398001]=_0x1ac559[_0x463975(0x484)]();}());var _0x5bf747=_0x131ed8[_0xf31dfc(0x35b)]=_0x2756f3[_0xf31dfc(0x8cd)]({'cfg':_0x2756f3[_0xf31dfc(0x2ef)][_0xf31dfc(0x8cd)]({'outputLength':0x200}),'_doReset':function(){const _0x42e1f8=_0xf31dfc;for(var _0x1446d2=this[_0x42e1f8(0x558)]=[],_0x48a8f3=0x0;_0x48a8f3<0x19;_0x48a8f3++)_0x1446d2[_0x48a8f3]=new _0x1ac559[(_0x42e1f8(0x7ef))]();this[_0x42e1f8(0x1ac)]=(0x640-0x2*this[_0x42e1f8(0x2ef)]['outputLength'])/0x20;},'_doProcessBlock':function(_0x58a698,_0x56529a){const _0x397071=_0xf31dfc;for(var _0xc7c674=this['_state'],_0x47c069=this[_0x397071(0x1ac)]/0x2,_0x115f03=0x0;_0x115f03<_0x47c069;_0x115f03++){var _0x392188=_0x58a698[_0x56529a+0x2*_0x115f03],_0x741e91=_0x58a698[_0x56529a+0x2*_0x115f03+0x1];_0x392188=(_0x392188<<0x8|_0x392188>>>0x18)&0xff00ff|(_0x392188<<0x18|_0x392188>>>0x8)&0xff00ff00,_0x741e91=(_0x741e91<<0x8|_0x741e91>>>0x18)&0xff00ff|(_0x741e91<<0x18|_0x741e91>>>0x8)&0xff00ff00;var _0x3c87ef=_0xc7c674[_0x115f03];_0x3c87ef[_0x397071(0x94c)]^=_0x741e91,_0x3c87ef[_0x397071(0x45d)]^=_0x392188;}for(var _0x2db399=0x0;_0x2db399<0x18;_0x2db399++){for(var _0x461072=0x0;_0x461072<0x5;_0x461072++){for(var _0xcfa8d=0x0,_0x4fad23=0x0,_0x1440a2=0x0;_0x1440a2<0x5;_0x1440a2++){var _0x3c87ef=_0xc7c674[_0x461072+0x5*_0x1440a2];_0xcfa8d^=_0x3c87ef[_0x397071(0x94c)],_0x4fad23^=_0x3c87ef[_0x397071(0x45d)];}var _0x1352de=_0x1b0f19[_0x461072];_0x1352de[_0x397071(0x94c)]=_0xcfa8d,_0x1352de[_0x397071(0x45d)]=_0x4fad23;}for(var _0x461072=0x0;_0x461072<0x5;_0x461072++)for(var _0x412bcd=_0x1b0f19[(_0x461072+0x4)%0x5],_0x437a03=_0x1b0f19[(_0x461072+0x1)%0x5],_0x3add9a=_0x437a03[_0x397071(0x94c)],_0x30aeb1=_0x437a03['low'],_0xcfa8d=_0x412bcd[_0x397071(0x94c)]^(_0x3add9a<<0x1|_0x30aeb1>>>0x1f),_0x4fad23=_0x412bcd[_0x397071(0x45d)]^(_0x30aeb1<<0x1|_0x3add9a>>>0x1f),_0x1440a2=0x0;_0x1440a2<0x5;_0x1440a2++){var _0x3c87ef=_0xc7c674[_0x461072+0x5*_0x1440a2];_0x3c87ef[_0x397071(0x94c)]^=_0xcfa8d,_0x3c87ef['low']^=_0x4fad23;}for(var _0x1ced89=0x1;_0x1ced89<0x19;_0x1ced89++){var _0xcfa8d,_0x4fad23,_0x3c87ef=_0xc7c674[_0x1ced89],_0x53eeb5=_0x3c87ef[_0x397071(0x94c)],_0x5ee641=_0x3c87ef[_0x397071(0x45d)],_0x1cc3fb=_0x550ca3[_0x1ced89];_0x1cc3fb<0x20?(_0xcfa8d=_0x53eeb5<<_0x1cc3fb|_0x5ee641>>>0x20-_0x1cc3fb,_0x4fad23=_0x5ee641<<_0x1cc3fb|_0x53eeb5>>>0x20-_0x1cc3fb):(_0xcfa8d=_0x5ee641<<_0x1cc3fb-0x20|_0x53eeb5>>>0x40-_0x1cc3fb,_0x4fad23=_0x53eeb5<<_0x1cc3fb-0x20|_0x5ee641>>>0x40-_0x1cc3fb);var _0x5e35dd=_0x1b0f19[_0x23fa96[_0x1ced89]];_0x5e35dd[_0x397071(0x94c)]=_0xcfa8d,_0x5e35dd[_0x397071(0x45d)]=_0x4fad23;}var _0x161329=_0x1b0f19[0x0],_0x342464=_0xc7c674[0x0];_0x161329[_0x397071(0x94c)]=_0x342464['high'],_0x161329[_0x397071(0x45d)]=_0x342464[_0x397071(0x45d)];for(var _0x461072=0x0;_0x461072<0x5;_0x461072++)for(var _0x1440a2=0x0;_0x1440a2<0x5;_0x1440a2++){var _0x1ced89=_0x461072+0x5*_0x1440a2,_0x3c87ef=_0xc7c674[_0x1ced89],_0x4cbe4a=_0x1b0f19[_0x1ced89],_0x1bc233=_0x1b0f19[(_0x461072+0x1)%0x5+0x5*_0x1440a2],_0x52fed=_0x1b0f19[(_0x461072+0x2)%0x5+0x5*_0x1440a2];_0x3c87ef[_0x397071(0x94c)]=_0x4cbe4a[_0x397071(0x94c)]^~_0x1bc233[_0x397071(0x94c)]&_0x52fed[_0x397071(0x94c)],_0x3c87ef[_0x397071(0x45d)]=_0x4cbe4a[_0x397071(0x45d)]^~_0x1bc233[_0x397071(0x45d)]&_0x52fed[_0x397071(0x45d)];}var _0x3c87ef=_0xc7c674[0x0],_0x2baf2d=_0x19b412[_0x2db399];_0x3c87ef['high']^=_0x2baf2d[_0x397071(0x94c)],_0x3c87ef[_0x397071(0x45d)]^=_0x2baf2d[_0x397071(0x45d)];}},'_doFinalize':function(){const _0x5f4dd5=_0xf31dfc;var _0x3c7e7c=this[_0x5f4dd5(0xeb)],_0x20c475=_0x3c7e7c[_0x5f4dd5(0x2d4)],_0x234107=this[_0x5f4dd5(0x1d3)]*0x8,_0x2eb07e=_0x3c7e7c[_0x5f4dd5(0xa17)]*0x8,_0xda7373=this[_0x5f4dd5(0x1ac)]*0x20;_0x20c475[_0x2eb07e>>>0x5]|=0x1<<0x18-_0x2eb07e%0x20,_0x20c475[(_0x380808['ceil']((_0x2eb07e+0x1)/_0xda7373)*_0xda7373>>>0x5)-0x1]|=0x80,_0x3c7e7c[_0x5f4dd5(0xa17)]=_0x20c475[_0x5f4dd5(0x6a2)]*0x4,this['_process']();for(var _0x19ae23=this[_0x5f4dd5(0x558)],_0x1ef08c=this[_0x5f4dd5(0x2ef)]['outputLength']/0x8,_0x2a5577=_0x1ef08c/0x8,_0xf3ac5a=[],_0x3c94c3=0x0;_0x3c94c3<_0x2a5577;_0x3c94c3++){var _0x46b7a2=_0x19ae23[_0x3c94c3],_0x37ea63=_0x46b7a2[_0x5f4dd5(0x94c)],_0x29dbac=_0x46b7a2['low'];_0x37ea63=(_0x37ea63<<0x8|_0x37ea63>>>0x18)&0xff00ff|(_0x37ea63<<0x18|_0x37ea63>>>0x8)&0xff00ff00,_0x29dbac=(_0x29dbac<<0x8|_0x29dbac>>>0x18)&0xff00ff|(_0x29dbac<<0x18|_0x29dbac>>>0x8)&0xff00ff00,_0xf3ac5a['push'](_0x29dbac),_0xf3ac5a[_0x5f4dd5(0xb3)](_0x37ea63);}return new _0x5803cd[(_0x5f4dd5(0x7ef))](_0xf3ac5a,_0x1ef08c);},'clone':function(){const _0x53393e=_0xf31dfc;for(var _0x527410=_0x2756f3['clone']['call'](this),_0x42e131=_0x527410[_0x53393e(0x558)]=this[_0x53393e(0x558)][_0x53393e(0x724)](0x0),_0x4ad994=0x0;_0x4ad994<0x19;_0x4ad994++)_0x42e131[_0x4ad994]=_0x42e131[_0x4ad994][_0x53393e(0x5c3)]();return _0x527410;}});_0x279d2e[_0xf31dfc(0x35b)]=_0x2756f3['_createHelper'](_0x5bf747),_0x279d2e[_0xf31dfc(0x94e)]=_0x2756f3[_0xf31dfc(0x67c)](_0x5bf747);}(Math),_0x45fa11[_0x564944(0x35b)];}));}),_0x28f317=_0x2d851e((_0x236564,_0x2d51b6)=>{(function(_0x472ee8,_0x433f9b){const _0x35ac53=_0xf114;typeof _0x236564=='object'?_0x2d51b6[_0x35ac53(0x6ce)]=_0x236564=_0x433f9b(_0x2b1809()):typeof define==_0x35ac53(0x9e7)&&define[_0x35ac53(0xfe)]?define([_0x35ac53(0x7d0)],_0x433f9b):_0x433f9b(_0x472ee8[_0x35ac53(0x626)]);}(_0x236564,function(_0x3f02d2){const _0x4effa5=_0xf114;return function(_0x54b391){const _0x311873=_0xf114;var _0x415ba4=_0x3f02d2,_0x12a97d=_0x415ba4['lib'],_0x102d5a=_0x12a97d[_0x311873(0x590)],_0x36175e=_0x12a97d[_0x311873(0x5cb)],_0x163443=_0x415ba4[_0x311873(0x94b)],_0x3f5851=_0x102d5a['create']([0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xa,0xb,0xc,0xd,0xe,0xf,0x7,0x4,0xd,0x1,0xa,0x6,0xf,0x3,0xc,0x0,0x9,0x5,0x2,0xe,0xb,0x8,0x3,0xa,0xe,0x4,0x9,0xf,0x8,0x1,0x2,0x7,0x0,0x6,0xd,0xb,0x5,0xc,0x1,0x9,0xb,0xa,0x0,0x8,0xc,0x4,0xd,0x3,0x7,0xf,0xe,0x5,0x6,0x2,0x4,0x0,0x5,0x9,0x7,0xc,0x2,0xa,0xe,0x1,0x3,0x8,0xb,0x6,0xf,0xd]),_0x2e6f0d=_0x102d5a['create']([0x5,0xe,0x7,0x0,0x9,0x2,0xb,0x4,0xd,0x6,0xf,0x8,0x1,0xa,0x3,0xc,0x6,0xb,0x3,0x7,0x0,0xd,0x5,0xa,0xe,0xf,0x8,0xc,0x4,0x9,0x1,0x2,0xf,0x5,0x1,0x3,0x7,0xe,0x6,0x9,0xb,0x8,0xc,0x2,0xa,0x0,0x4,0xd,0x8,0x6,0x4,0x1,0x3,0xb,0xf,0x0,0x5,0xc,0x2,0xd,0x9,0x7,0xa,0xe,0xc,0xf,0xa,0x4,0x1,0x5,0x8,0x7,0x6,0x2,0xd,0xe,0x0,0x3,0x9,0xb]),_0x113800=_0x102d5a[_0x311873(0x484)]([0xb,0xe,0xf,0xc,0x5,0x8,0x7,0x9,0xb,0xd,0xe,0xf,0x6,0x7,0x9,0x8,0x7,0x6,0x8,0xd,0xb,0x9,0x7,0xf,0x7,0xc,0xf,0x9,0xb,0x7,0xd,0xc,0xb,0xd,0x6,0x7,0xe,0x9,0xd,0xf,0xe,0x8,0xd,0x6,0x5,0xc,0x7,0x5,0xb,0xc,0xe,0xf,0xe,0xf,0x9,0x8,0x9,0xe,0x5,0x6,0x8,0x6,0x5,0xc,0x9,0xf,0x5,0xb,0x6,0x8,0xd,0xc,0x5,0xc,0xd,0xe,0xb,0x8,0x5,0x6]),_0x1dcd63=_0x102d5a[_0x311873(0x484)]([0x8,0x9,0x9,0xb,0xd,0xf,0xf,0x5,0x7,0x7,0x8,0xb,0xe,0xe,0xc,0x6,0x9,0xd,0xf,0x7,0xc,0x8,0x9,0xb,0x7,0x7,0xc,0x7,0x6,0xf,0xd,0xb,0x9,0x7,0xf,0xb,0x8,0x6,0x6,0xe,0xc,0xd,0x5,0xe,0xd,0xd,0x7,0x5,0xf,0x5,0x8,0xb,0xe,0xe,0x6,0xe,0x6,0x9,0xc,0x9,0xc,0x5,0xf,0x8,0x8,0x5,0xc,0x9,0xc,0x5,0xe,0x6,0x8,0xd,0x6,0x5,0xf,0xd,0xb,0xb]),_0x1a001b=_0x102d5a[_0x311873(0x484)]([0x0,0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xa953fd4e]),_0x2c072a=_0x102d5a['create']([0x50a28be6,0x5c4dd124,0x6d703ef3,0x7a6d76e9,0x0]),_0x19ab84=_0x163443[_0x311873(0x333)]=_0x36175e['extend']({'_doReset':function(){const _0xb38ccc=_0x311873;this[_0xb38ccc(0x84f)]=_0x102d5a[_0xb38ccc(0x484)]([0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0]);},'_doProcessBlock':function(_0x137585,_0xf3c44d){const _0x4b91c4=_0x311873;for(var _0x568246=0x0;_0x568246<0x10;_0x568246++){var _0x216c41=_0xf3c44d+_0x568246,_0x5e14d2=_0x137585[_0x216c41];_0x137585[_0x216c41]=(_0x5e14d2<<0x8|_0x5e14d2>>>0x18)&0xff00ff|(_0x5e14d2<<0x18|_0x5e14d2>>>0x8)&0xff00ff00;}var _0x181ea5=this[_0x4b91c4(0x84f)][_0x4b91c4(0x2d4)],_0x2313b0=_0x1a001b[_0x4b91c4(0x2d4)],_0x3bfc69=_0x2c072a[_0x4b91c4(0x2d4)],_0x4aeb22=_0x3f5851[_0x4b91c4(0x2d4)],_0x4a440a=_0x2e6f0d[_0x4b91c4(0x2d4)],_0x38c76f=_0x113800[_0x4b91c4(0x2d4)],_0x360bde=_0x1dcd63[_0x4b91c4(0x2d4)],_0x563ddd,_0x296e60,_0x12f11f,_0x3463fc,_0x4420a6,_0x3056df,_0x29e637,_0x53722a,_0x1d2172,_0x5d27c2;_0x3056df=_0x563ddd=_0x181ea5[0x0],_0x29e637=_0x296e60=_0x181ea5[0x1],_0x53722a=_0x12f11f=_0x181ea5[0x2],_0x1d2172=_0x3463fc=_0x181ea5[0x3],_0x5d27c2=_0x4420a6=_0x181ea5[0x4];for(var _0x1feab8,_0x568246=0x0;_0x568246<0x50;_0x568246+=0x1)_0x1feab8=_0x563ddd+_0x137585[_0xf3c44d+_0x4aeb22[_0x568246]]|0x0,_0x568246<0x10?_0x1feab8+=_0x593bb8(_0x296e60,_0x12f11f,_0x3463fc)+_0x2313b0[0x0]:_0x568246<0x20?_0x1feab8+=_0x4f9aa5(_0x296e60,_0x12f11f,_0x3463fc)+_0x2313b0[0x1]:_0x568246<0x30?_0x1feab8+=_0x2aa55a(_0x296e60,_0x12f11f,_0x3463fc)+_0x2313b0[0x2]:_0x568246<0x40?_0x1feab8+=_0x28ca35(_0x296e60,_0x12f11f,_0x3463fc)+_0x2313b0[0x3]:_0x1feab8+=_0x3d3dd5(_0x296e60,_0x12f11f,_0x3463fc)+_0x2313b0[0x4],_0x1feab8=_0x1feab8|0x0,_0x1feab8=_0x3042b5(_0x1feab8,_0x38c76f[_0x568246]),_0x1feab8=_0x1feab8+_0x4420a6|0x0,_0x563ddd=_0x4420a6,_0x4420a6=_0x3463fc,_0x3463fc=_0x3042b5(_0x12f11f,0xa),_0x12f11f=_0x296e60,_0x296e60=_0x1feab8,_0x1feab8=_0x3056df+_0x137585[_0xf3c44d+_0x4a440a[_0x568246]]|0x0,_0x568246<0x10?_0x1feab8+=_0x3d3dd5(_0x29e637,_0x53722a,_0x1d2172)+_0x3bfc69[0x0]:_0x568246<0x20?_0x1feab8+=_0x28ca35(_0x29e637,_0x53722a,_0x1d2172)+_0x3bfc69[0x1]:_0x568246<0x30?_0x1feab8+=_0x2aa55a(_0x29e637,_0x53722a,_0x1d2172)+_0x3bfc69[0x2]:_0x568246<0x40?_0x1feab8+=_0x4f9aa5(_0x29e637,_0x53722a,_0x1d2172)+_0x3bfc69[0x3]:_0x1feab8+=_0x593bb8(_0x29e637,_0x53722a,_0x1d2172)+_0x3bfc69[0x4],_0x1feab8=_0x1feab8|0x0,_0x1feab8=_0x3042b5(_0x1feab8,_0x360bde[_0x568246]),_0x1feab8=_0x1feab8+_0x5d27c2|0x0,_0x3056df=_0x5d27c2,_0x5d27c2=_0x1d2172,_0x1d2172=_0x3042b5(_0x53722a,0xa),_0x53722a=_0x29e637,_0x29e637=_0x1feab8;_0x1feab8=_0x181ea5[0x1]+_0x12f11f+_0x1d2172|0x0,_0x181ea5[0x1]=_0x181ea5[0x2]+_0x3463fc+_0x5d27c2|0x0,_0x181ea5[0x2]=_0x181ea5[0x3]+_0x4420a6+_0x3056df|0x0,_0x181ea5[0x3]=_0x181ea5[0x4]+_0x563ddd+_0x29e637|0x0,_0x181ea5[0x4]=_0x181ea5[0x0]+_0x296e60+_0x53722a|0x0,_0x181ea5[0x0]=_0x1feab8;},'_doFinalize':function(){const _0x1d877f=_0x311873;var _0x976573=this['_data'],_0x2c3c07=_0x976573['words'],_0x477e91=this[_0x1d877f(0x1d3)]*0x8,_0x39cf32=_0x976573[_0x1d877f(0xa17)]*0x8;_0x2c3c07[_0x39cf32>>>0x5]|=0x80<<0x18-_0x39cf32%0x20,_0x2c3c07[(_0x39cf32+0x40>>>0x9<<0x4)+0xe]=(_0x477e91<<0x8|_0x477e91>>>0x18)&0xff00ff|(_0x477e91<<0x18|_0x477e91>>>0x8)&0xff00ff00,_0x976573[_0x1d877f(0xa17)]=(_0x2c3c07[_0x1d877f(0x6a2)]+0x1)*0x4,this['_process']();for(var _0x15995d=this['_hash'],_0x4f3975=_0x15995d[_0x1d877f(0x2d4)],_0x1bf4c1=0x0;_0x1bf4c1<0x5;_0x1bf4c1++){var _0x751dc3=_0x4f3975[_0x1bf4c1];_0x4f3975[_0x1bf4c1]=(_0x751dc3<<0x8|_0x751dc3>>>0x18)&0xff00ff|(_0x751dc3<<0x18|_0x751dc3>>>0x8)&0xff00ff00;}return _0x15995d;},'clone':function(){const _0x428e53=_0x311873;var _0x38b43c=_0x36175e[_0x428e53(0x5c3)]['call'](this);return _0x38b43c['_hash']=this[_0x428e53(0x84f)]['clone'](),_0x38b43c;}});function _0x593bb8(_0x18cbac,_0x55865c,_0x486d48){return _0x18cbac^_0x55865c^_0x486d48;}function _0x4f9aa5(_0x11b66f,_0x2e5c0a,_0x23fbf2){return _0x11b66f&_0x2e5c0a|~_0x11b66f&_0x23fbf2;}function _0x2aa55a(_0x50e2ac,_0x4e2fc3,_0x14c6c0){return(_0x50e2ac|~_0x4e2fc3)^_0x14c6c0;}function _0x28ca35(_0x22dbc2,_0x296fa,_0x14a811){return _0x22dbc2&_0x14a811|_0x296fa&~_0x14a811;}function _0x3d3dd5(_0x5113fc,_0x267e7c,_0x51ba23){return _0x5113fc^(_0x267e7c|~_0x51ba23);}function _0x3042b5(_0x961c92,_0x23fed0){return _0x961c92<<_0x23fed0|_0x961c92>>>0x20-_0x23fed0;}_0x415ba4[_0x311873(0x333)]=_0x36175e['_createHelper'](_0x19ab84),_0x415ba4[_0x311873(0x465)]=_0x36175e[_0x311873(0x67c)](_0x19ab84);}(Math),_0x3f02d2[_0x4effa5(0x333)];}));}),_0x356886=_0x2d851e((_0x10e23a,_0x44a2c9)=>{(function(_0x59b9a1,_0x4d5c04){const _0x1e473b=_0xf114;typeof _0x10e23a=='object'?_0x44a2c9[_0x1e473b(0x6ce)]=_0x10e23a=_0x4d5c04(_0x2b1809()):typeof define==_0x1e473b(0x9e7)&&define[_0x1e473b(0xfe)]?define([_0x1e473b(0x7d0)],_0x4d5c04):_0x4d5c04(_0x59b9a1[_0x1e473b(0x626)]);}(_0x10e23a,function(_0x295ad3){(function(){const _0x5cd6bf=_0xf114;var _0x439e4c=_0x295ad3,_0x4389c4=_0x439e4c[_0x5cd6bf(0x6e8)],_0x4497d4=_0x4389c4[_0x5cd6bf(0x836)],_0x1543bc=_0x439e4c[_0x5cd6bf(0x961)],_0x38e9c4=_0x1543bc[_0x5cd6bf(0x490)],_0x5a9662=_0x439e4c['algo'],_0x4c1c9c=_0x5a9662[_0x5cd6bf(0xcb)]=_0x4497d4[_0x5cd6bf(0x8cd)]({'init':function(_0x48f5dd,_0x288236){const _0x166eeb=_0x5cd6bf;_0x48f5dd=this[_0x166eeb(0x566)]=new _0x48f5dd['init'](),typeof _0x288236==_0x166eeb(0x55c)&&(_0x288236=_0x38e9c4[_0x166eeb(0xce)](_0x288236));var _0xd8eba1=_0x48f5dd[_0x166eeb(0x1ac)],_0x83f46b=_0xd8eba1*0x4;_0x288236['sigBytes']>_0x83f46b&&(_0x288236=_0x48f5dd[_0x166eeb(0x477)](_0x288236)),_0x288236['clamp']();for(var _0x49e9ed=this[_0x166eeb(0x3d9)]=_0x288236['clone'](),_0x532a7e=this[_0x166eeb(0x37d)]=_0x288236['clone'](),_0x423558=_0x49e9ed[_0x166eeb(0x2d4)],_0x2b64e9=_0x532a7e['words'],_0x80011=0x0;_0x80011<_0xd8eba1;_0x80011++)_0x423558[_0x80011]^=0x5c5c5c5c,_0x2b64e9[_0x80011]^=0x36363636;_0x49e9ed[_0x166eeb(0xa17)]=_0x532a7e[_0x166eeb(0xa17)]=_0x83f46b,this['reset']();},'reset':function(){const _0x3dada6=_0x5cd6bf;var _0x11e384=this[_0x3dada6(0x566)];_0x11e384[_0x3dada6(0x1e8)](),_0x11e384['update'](this[_0x3dada6(0x37d)]);},'update':function(_0x3d12d0){const _0x246751=_0x5cd6bf;return this[_0x246751(0x566)][_0x246751(0x96f)](_0x3d12d0),this;},'finalize':function(_0x50a381){const _0x3f1ce1=_0x5cd6bf;var _0x5be304=this[_0x3f1ce1(0x566)],_0x3d2a96=_0x5be304['finalize'](_0x50a381);_0x5be304[_0x3f1ce1(0x1e8)]();var _0x3c60ed=_0x5be304[_0x3f1ce1(0x477)](this[_0x3f1ce1(0x3d9)][_0x3f1ce1(0x5c3)]()[_0x3f1ce1(0x64c)](_0x3d2a96));return _0x3c60ed;}});}());}));}),_0xd6f3e6=_0x2d851e((_0xa549a1,_0x48ca32)=>{(function(_0x3dcad1,_0x44b31f,_0x38363e){const _0x363047=_0xf114;typeof _0xa549a1==_0x363047(0xa3c)?_0x48ca32[_0x363047(0x6ce)]=_0xa549a1=_0x44b31f(_0x2b1809(),_0x4f46ff(),_0x356886()):typeof define=='function'&&define[_0x363047(0xfe)]?define(['./core','./sha256','./hmac'],_0x44b31f):_0x44b31f(_0x3dcad1['CryptoJS']);}(_0xa549a1,function(_0x4488a0){const _0x19a598=_0xf114;return(function(){const _0x2d18a1=_0xf114;var _0x46d1a1=_0x4488a0,_0x32f530=_0x46d1a1['lib'],_0x57c3a7=_0x32f530[_0x2d18a1(0x836)],_0x5e19d9=_0x32f530['WordArray'],_0x1bd028=_0x46d1a1['algo'],_0x15550c=_0x1bd028[_0x2d18a1(0x994)],_0x2519bb=_0x1bd028[_0x2d18a1(0xcb)],_0x767244=_0x1bd028['PBKDF2']=_0x57c3a7[_0x2d18a1(0x8cd)]({'cfg':_0x57c3a7['extend']({'keySize':0x80/0x20,'hasher':_0x15550c,'iterations':0x3d090}),'init':function(_0x278e5e){const _0x148071=_0x2d18a1;this[_0x148071(0x2ef)]=this[_0x148071(0x2ef)][_0x148071(0x8cd)](_0x278e5e);},'compute':function(_0x30c453,_0x4384d2){const _0x13f33d=_0x2d18a1;for(var _0x568542=this[_0x13f33d(0x2ef)],_0x2f163d=_0x2519bb['create'](_0x568542[_0x13f33d(0x13b)],_0x30c453),_0x1f863d=_0x5e19d9[_0x13f33d(0x484)](),_0x1e3f3b=_0x5e19d9[_0x13f33d(0x484)]([0x1]),_0x1cdde4=_0x1f863d[_0x13f33d(0x2d4)],_0x4bd9f6=_0x1e3f3b[_0x13f33d(0x2d4)],_0x2d6936=_0x568542[_0x13f33d(0x809)],_0x1dfedb=_0x568542[_0x13f33d(0x967)];_0x1cdde4['length']<_0x2d6936;){var _0x4967d2=_0x2f163d[_0x13f33d(0x96f)](_0x4384d2)[_0x13f33d(0x477)](_0x1e3f3b);_0x2f163d[_0x13f33d(0x1e8)]();for(var _0x676747=_0x4967d2['words'],_0x4a16ed=_0x676747[_0x13f33d(0x6a2)],_0x5b2033=_0x4967d2,_0x22b9b2=0x1;_0x22b9b2<_0x1dfedb;_0x22b9b2++){_0x5b2033=_0x2f163d[_0x13f33d(0x477)](_0x5b2033),_0x2f163d['reset']();for(var _0x4d60ab=_0x5b2033['words'],_0x37073d=0x0;_0x37073d<_0x4a16ed;_0x37073d++)_0x676747[_0x37073d]^=_0x4d60ab[_0x37073d];}_0x1f863d[_0x13f33d(0x64c)](_0x4967d2),_0x4bd9f6[0x0]++;}return _0x1f863d[_0x13f33d(0xa17)]=_0x2d6936*0x4,_0x1f863d;}});_0x46d1a1[_0x2d18a1(0x5b9)]=function(_0x3fe839,_0x3bfffd,_0x4102aa){const _0x44596b=_0x2d18a1;return _0x767244[_0x44596b(0x484)](_0x4102aa)[_0x44596b(0xa12)](_0x3fe839,_0x3bfffd);};}()),_0x4488a0[_0x19a598(0x5b9)];}));}),_0xf907bf=_0x2d851e((_0x575227,_0x1f33ad)=>{(function(_0x126060,_0x441549,_0x3c43ba){const _0xdfd9c9=_0xf114;typeof _0x575227==_0xdfd9c9(0xa3c)?_0x1f33ad[_0xdfd9c9(0x6ce)]=_0x575227=_0x441549(_0x2b1809(),_0x4b8031(),_0x356886()):typeof define==_0xdfd9c9(0x9e7)&&define[_0xdfd9c9(0xfe)]?define([_0xdfd9c9(0x7d0),'./sha1',_0xdfd9c9(0x1f8)],_0x441549):_0x441549(_0x126060['CryptoJS']);}(_0x575227,function(_0x2d752c){const _0x210ea3=_0xf114;return(function(){const _0x4068f2=_0xf114;var _0x46e07e=_0x2d752c,_0x1a39cb=_0x46e07e[_0x4068f2(0x6e8)],_0x49a908=_0x1a39cb[_0x4068f2(0x836)],_0x1fa844=_0x1a39cb[_0x4068f2(0x590)],_0xb141f8=_0x46e07e[_0x4068f2(0x94b)],_0x222627=_0xb141f8[_0x4068f2(0x30c)],_0x165838=_0xb141f8[_0x4068f2(0x931)]=_0x49a908[_0x4068f2(0x8cd)]({'cfg':_0x49a908[_0x4068f2(0x8cd)]({'keySize':0x80/0x20,'hasher':_0x222627,'iterations':0x1}),'init':function(_0x27ea8c){const _0x44bddb=_0x4068f2;this['cfg']=this[_0x44bddb(0x2ef)][_0x44bddb(0x8cd)](_0x27ea8c);},'compute':function(_0x47489f,_0x5bcd7d){const _0x3e93a8=_0x4068f2;for(var _0x519884,_0x20f4e2=this[_0x3e93a8(0x2ef)],_0x1fc0b7=_0x20f4e2[_0x3e93a8(0x13b)][_0x3e93a8(0x484)](),_0x1d2429=_0x1fa844[_0x3e93a8(0x484)](),_0x5dbe05=_0x1d2429['words'],_0x1c76c2=_0x20f4e2[_0x3e93a8(0x809)],_0xc5b008=_0x20f4e2['iterations'];_0x5dbe05[_0x3e93a8(0x6a2)]<_0x1c76c2;){_0x519884&&_0x1fc0b7['update'](_0x519884),_0x519884=_0x1fc0b7[_0x3e93a8(0x96f)](_0x47489f)[_0x3e93a8(0x477)](_0x5bcd7d),_0x1fc0b7[_0x3e93a8(0x1e8)]();for(var _0x371b09=0x1;_0x371b09<_0xc5b008;_0x371b09++)_0x519884=_0x1fc0b7[_0x3e93a8(0x477)](_0x519884),_0x1fc0b7['reset']();_0x1d2429[_0x3e93a8(0x64c)](_0x519884);}return _0x1d2429[_0x3e93a8(0xa17)]=_0x1c76c2*0x4,_0x1d2429;}});_0x46e07e[_0x4068f2(0x931)]=function(_0x528b03,_0x1304f3,_0xdd47ac){const _0x3bccb4=_0x4068f2;return _0x165838[_0x3bccb4(0x484)](_0xdd47ac)['compute'](_0x528b03,_0x1304f3);};}()),_0x2d752c[_0x210ea3(0x931)];}));}),_0x1b437e=_0x2d851e((_0x1fb920,_0x4ae079)=>{(function(_0x1f3d27,_0x50965e,_0x3870cb){const _0x5ed301=_0xf114;typeof _0x1fb920=='object'?_0x4ae079[_0x5ed301(0x6ce)]=_0x1fb920=_0x50965e(_0x2b1809(),_0xf907bf()):typeof define==_0x5ed301(0x9e7)&&define[_0x5ed301(0xfe)]?define([_0x5ed301(0x7d0),_0x5ed301(0x2a0)],_0x50965e):_0x50965e(_0x1f3d27[_0x5ed301(0x626)]);}(_0x1fb920,function(_0x54fb26){const _0x6a2e5c=_0xf114;_0x54fb26['lib'][_0x6a2e5c(0xa85)]||function(_0x4625b4){const _0x13a2dc=_0x6a2e5c;var _0x331caa=_0x54fb26,_0x30e716=_0x331caa[_0x13a2dc(0x6e8)],_0x201e02=_0x30e716[_0x13a2dc(0x836)],_0x4526c3=_0x30e716[_0x13a2dc(0x590)],_0x2079e7=_0x30e716[_0x13a2dc(0x73f)],_0x428f05=_0x331caa[_0x13a2dc(0x961)],_0x3a7fea=_0x428f05[_0x13a2dc(0x490)],_0x1a774c=_0x428f05[_0x13a2dc(0x2d6)],_0x193ade=_0x331caa[_0x13a2dc(0x94b)],_0x396d15=_0x193ade[_0x13a2dc(0x931)],_0x5af515=_0x30e716[_0x13a2dc(0xa85)]=_0x2079e7[_0x13a2dc(0x8cd)]({'cfg':_0x201e02[_0x13a2dc(0x8cd)](),'createEncryptor':function(_0x15ea55,_0x33a5c1){const _0x4d7e00=_0x13a2dc;return this[_0x4d7e00(0x484)](this[_0x4d7e00(0x8f4)],_0x15ea55,_0x33a5c1);},'createDecryptor':function(_0x5c194e,_0x5ccd0a){const _0x555e97=_0x13a2dc;return this[_0x555e97(0x484)](this['_DEC_XFORM_MODE'],_0x5c194e,_0x5ccd0a);},'init':function(_0x566356,_0x851b44,_0x3e32d9){const _0x349e50=_0x13a2dc;this[_0x349e50(0x2ef)]=this[_0x349e50(0x2ef)][_0x349e50(0x8cd)](_0x3e32d9),this['_xformMode']=_0x566356,this[_0x349e50(0x7b9)]=_0x851b44,this[_0x349e50(0x1e8)]();},'reset':function(){const _0x587273=_0x13a2dc;_0x2079e7[_0x587273(0x1e8)][_0x587273(0x7a4)](this),this[_0x587273(0x72e)]();},'process':function(_0x220aa1){const _0x26e820=_0x13a2dc;return this['_append'](_0x220aa1),this[_0x26e820(0x342)]();},'finalize':function(_0x27a829){const _0x565c82=_0x13a2dc;_0x27a829&&this[_0x565c82(0xa45)](_0x27a829);var _0xdc77c4=this[_0x565c82(0x391)]();return _0xdc77c4;},'keySize':0x80/0x20,'ivSize':0x80/0x20,'_ENC_XFORM_MODE':0x1,'_DEC_XFORM_MODE':0x2,'_createHelper':(function(){function _0x4cabfc(_0x2815f9){const _0x3b3e38=_0xf114;return typeof _0x2815f9==_0x3b3e38(0x55c)?_0xa44ca7:_0x4af357;}return function(_0x2cbe77){return{'encrypt':function(_0xb98d42,_0x4c332e,_0x5cfe85){const _0x4a72a3=_0xf114;return _0x4cabfc(_0x4c332e)[_0x4a72a3(0x9eb)](_0x2cbe77,_0xb98d42,_0x4c332e,_0x5cfe85);},'decrypt':function(_0x5a7d78,_0x14d433,_0x3a9a0a){return _0x4cabfc(_0x14d433)['decrypt'](_0x2cbe77,_0x5a7d78,_0x14d433,_0x3a9a0a);}};};}())}),_0x1ec7fe=_0x30e716[_0x13a2dc(0x813)]=_0x5af515[_0x13a2dc(0x8cd)]({'_doFinalize':function(){var _0x480998=this['_process'](!0x0);return _0x480998;},'blockSize':0x1}),_0x4ef409=_0x331caa['mode']={},_0x1ba46c=_0x30e716['BlockCipherMode']=_0x201e02['extend']({'createEncryptor':function(_0x40ae3d,_0x5efd21){const _0x2d4c79=_0x13a2dc;return this[_0x2d4c79(0xe9)][_0x2d4c79(0x484)](_0x40ae3d,_0x5efd21);},'createDecryptor':function(_0x12c01e,_0x374802){const _0x2657fa=_0x13a2dc;return this[_0x2657fa(0x6ab)][_0x2657fa(0x484)](_0x12c01e,_0x374802);},'init':function(_0x2f4283,_0x5e4c1b){const _0x6778cf=_0x13a2dc;this[_0x6778cf(0xa31)]=_0x2f4283,this['_iv']=_0x5e4c1b;}}),_0x46dd31=_0x4ef409[_0x13a2dc(0xbc)]=(function(){const _0x4ac9b1=_0x13a2dc;var _0x417dcd=_0x1ba46c['extend']();_0x417dcd[_0x4ac9b1(0xe9)]=_0x417dcd[_0x4ac9b1(0x8cd)]({'processBlock':function(_0x5d0255,_0x92b023){const _0x3f985c=_0x4ac9b1;var _0x582cd9=this[_0x3f985c(0xa31)],_0x2e87a3=_0x582cd9[_0x3f985c(0x1ac)];_0x1804ad[_0x3f985c(0x7a4)](this,_0x5d0255,_0x92b023,_0x2e87a3),_0x582cd9[_0x3f985c(0x4e9)](_0x5d0255,_0x92b023),this[_0x3f985c(0xaa9)]=_0x5d0255[_0x3f985c(0x724)](_0x92b023,_0x92b023+_0x2e87a3);}}),_0x417dcd['Decryptor']=_0x417dcd[_0x4ac9b1(0x8cd)]({'processBlock':function(_0x1cb08e,_0x24e950){const _0x1f9374=_0x4ac9b1;var _0x4f8379=this[_0x1f9374(0xa31)],_0x574fdf=_0x4f8379[_0x1f9374(0x1ac)],_0x3a674b=_0x1cb08e[_0x1f9374(0x724)](_0x24e950,_0x24e950+_0x574fdf);_0x4f8379[_0x1f9374(0x9e4)](_0x1cb08e,_0x24e950),_0x1804ad[_0x1f9374(0x7a4)](this,_0x1cb08e,_0x24e950,_0x574fdf),this[_0x1f9374(0xaa9)]=_0x3a674b;}});function _0x1804ad(_0x5573da,_0x56c219,_0x3a5c8d){const _0x40fe53=_0x4ac9b1;var _0xa206d3,_0x1a414c=this[_0x40fe53(0x885)];_0x1a414c?(_0xa206d3=_0x1a414c,this['_iv']=_0x4625b4):_0xa206d3=this[_0x40fe53(0xaa9)];for(var _0x270613=0x0;_0x270613<_0x3a5c8d;_0x270613++)_0x5573da[_0x56c219+_0x270613]^=_0xa206d3[_0x270613];}return _0x417dcd;}()),_0x1c7c22=_0x331caa[_0x13a2dc(0x496)]={},_0x34d930=_0x1c7c22[_0x13a2dc(0x540)]={'pad':function(_0x19c304,_0x2150c1){const _0x273602=_0x13a2dc;for(var _0x42dab2=_0x2150c1*0x4,_0x220082=_0x42dab2-_0x19c304[_0x273602(0xa17)]%_0x42dab2,_0x2b02c8=_0x220082<<0x18|_0x220082<<0x10|_0x220082<<0x8|_0x220082,_0x428217=[],_0x344db9=0x0;_0x344db9<_0x220082;_0x344db9+=0x4)_0x428217[_0x273602(0xb3)](_0x2b02c8);var _0x347726=_0x4526c3[_0x273602(0x484)](_0x428217,_0x220082);_0x19c304[_0x273602(0x64c)](_0x347726);},'unpad':function(_0x5bf00c){const _0x3b3ec2=_0x13a2dc;var _0xe0200b=_0x5bf00c[_0x3b3ec2(0x2d4)][_0x5bf00c[_0x3b3ec2(0xa17)]-0x1>>>0x2]&0xff;_0x5bf00c[_0x3b3ec2(0xa17)]-=_0xe0200b;}},_0x211c1f=_0x30e716[_0x13a2dc(0x30e)]=_0x5af515[_0x13a2dc(0x8cd)]({'cfg':_0x5af515['cfg']['extend']({'mode':_0x46dd31,'padding':_0x34d930}),'reset':function(){const _0x82206=_0x13a2dc;var _0x26e347;_0x5af515[_0x82206(0x1e8)][_0x82206(0x7a4)](this);var _0x24f43f=this[_0x82206(0x2ef)],_0x2eae4c=_0x24f43f['iv'],_0x17c1bf=_0x24f43f[_0x82206(0x6f7)];this['_xformMode']==this[_0x82206(0x8f4)]?_0x26e347=_0x17c1bf['createEncryptor']:(_0x26e347=_0x17c1bf[_0x82206(0x58f)],this[_0x82206(0x18d)]=0x1),this[_0x82206(0x93f)]&&this[_0x82206(0x93f)]['__creator']==_0x26e347?this[_0x82206(0x93f)][_0x82206(0x7ef)](this,_0x2eae4c&&_0x2eae4c[_0x82206(0x2d4)]):(this[_0x82206(0x93f)]=_0x26e347['call'](_0x17c1bf,this,_0x2eae4c&&_0x2eae4c['words']),this[_0x82206(0x93f)]['__creator']=_0x26e347);},'_doProcessBlock':function(_0x394fa5,_0x13df6e){const _0x4218b5=_0x13a2dc;this[_0x4218b5(0x93f)]['processBlock'](_0x394fa5,_0x13df6e);},'_doFinalize':function(){const _0x361a9a=_0x13a2dc;var _0x42faa8,_0x18a6ab=this[_0x361a9a(0x2ef)]['padding'];return this['_xformMode']==this[_0x361a9a(0x8f4)]?(_0x18a6ab[_0x361a9a(0x496)](this[_0x361a9a(0xeb)],this[_0x361a9a(0x1ac)]),_0x42faa8=this[_0x361a9a(0x342)](!0x0)):(_0x42faa8=this[_0x361a9a(0x342)](!0x0),_0x18a6ab['unpad'](_0x42faa8)),_0x42faa8;},'blockSize':0x80/0x20}),_0x54fb52=_0x30e716[_0x13a2dc(0x237)]=_0x201e02[_0x13a2dc(0x8cd)]({'init':function(_0x3fd201){const _0x3d30b1=_0x13a2dc;this[_0x3d30b1(0x93b)](_0x3fd201);},'toString':function(_0xaf11d7){const _0x5ce156=_0x13a2dc;return(_0xaf11d7||this[_0x5ce156(0x638)])[_0x5ce156(0x8b2)](this);}}),_0x20f0e1=_0x331caa[_0x13a2dc(0x5a7)]={},_0x2b4124=_0x20f0e1[_0x13a2dc(0x474)]={'stringify':function(_0x221a7c){const _0xe182fb=_0x13a2dc;var _0x43fbbd,_0x5bbec8=_0x221a7c[_0xe182fb(0x884)],_0x57f4d8=_0x221a7c[_0xe182fb(0x562)];return _0x57f4d8?_0x43fbbd=_0x4526c3[_0xe182fb(0x484)]([0x53616c74,0x65645f5f])[_0xe182fb(0x64c)](_0x57f4d8)[_0xe182fb(0x64c)](_0x5bbec8):_0x43fbbd=_0x5bbec8,_0x43fbbd[_0xe182fb(0x8fa)](_0x1a774c);},'parse':function(_0x202b1e){const _0x2d8fae=_0x13a2dc;var _0x13b1e4,_0x57a409=_0x1a774c[_0x2d8fae(0xce)](_0x202b1e),_0x7899a3=_0x57a409[_0x2d8fae(0x2d4)];return _0x7899a3[0x0]==0x53616c74&&_0x7899a3[0x1]==0x65645f5f&&(_0x13b1e4=_0x4526c3[_0x2d8fae(0x484)](_0x7899a3[_0x2d8fae(0x724)](0x2,0x4)),_0x7899a3[_0x2d8fae(0xae)](0x0,0x4),_0x57a409[_0x2d8fae(0xa17)]-=0x10),_0x54fb52[_0x2d8fae(0x484)]({'ciphertext':_0x57a409,'salt':_0x13b1e4});}},_0x4af357=_0x30e716[_0x13a2dc(0x26e)]=_0x201e02['extend']({'cfg':_0x201e02[_0x13a2dc(0x8cd)]({'format':_0x2b4124}),'encrypt':function(_0x2401a7,_0x30598a,_0x3f2c7b,_0x2a93b0){const _0x30f6ed=_0x13a2dc;_0x2a93b0=this[_0x30f6ed(0x2ef)][_0x30f6ed(0x8cd)](_0x2a93b0);var _0x25925e=_0x2401a7['createEncryptor'](_0x3f2c7b,_0x2a93b0),_0x86cca6=_0x25925e[_0x30f6ed(0x477)](_0x30598a),_0x4880de=_0x25925e[_0x30f6ed(0x2ef)];return _0x54fb52[_0x30f6ed(0x484)]({'ciphertext':_0x86cca6,'key':_0x3f2c7b,'iv':_0x4880de['iv'],'algorithm':_0x2401a7,'mode':_0x4880de['mode'],'padding':_0x4880de[_0x30f6ed(0x684)],'blockSize':_0x2401a7[_0x30f6ed(0x1ac)],'formatter':_0x2a93b0[_0x30f6ed(0x5a7)]});},'decrypt':function(_0x3b0d3e,_0x2d77a9,_0x176ae9,_0x4a5bf1){const _0x419f48=_0x13a2dc;_0x4a5bf1=this[_0x419f48(0x2ef)]['extend'](_0x4a5bf1),_0x2d77a9=this['_parse'](_0x2d77a9,_0x4a5bf1[_0x419f48(0x5a7)]);var _0x4e9596=_0x3b0d3e[_0x419f48(0x58f)](_0x176ae9,_0x4a5bf1)[_0x419f48(0x477)](_0x2d77a9[_0x419f48(0x884)]);return _0x4e9596;},'_parse':function(_0x257565,_0x30d590){const _0x2e84b8=_0x13a2dc;return typeof _0x257565=='string'?_0x30d590[_0x2e84b8(0xce)](_0x257565,this):_0x257565;}}),_0x4a5ebd=_0x331caa['kdf']={},_0x92333a=_0x4a5ebd[_0x13a2dc(0x474)]={'execute':function(_0x559d8d,_0x157708,_0x1d654f,_0x47eb3e,_0x42eb6c){const _0x22e612=_0x13a2dc;if(_0x47eb3e||(_0x47eb3e=_0x4526c3[_0x22e612(0x15f)](0x40/0x8)),_0x42eb6c)var _0x75056=_0x396d15[_0x22e612(0x484)]({'keySize':_0x157708+_0x1d654f,'hasher':_0x42eb6c})['compute'](_0x559d8d,_0x47eb3e);else var _0x75056=_0x396d15['create']({'keySize':_0x157708+_0x1d654f})[_0x22e612(0xa12)](_0x559d8d,_0x47eb3e);var _0x3a7b7c=_0x4526c3[_0x22e612(0x484)](_0x75056[_0x22e612(0x2d4)][_0x22e612(0x724)](_0x157708),_0x1d654f*0x4);return _0x75056[_0x22e612(0xa17)]=_0x157708*0x4,_0x54fb52[_0x22e612(0x484)]({'key':_0x75056,'iv':_0x3a7b7c,'salt':_0x47eb3e});}},_0xa44ca7=_0x30e716[_0x13a2dc(0x9c5)]=_0x4af357[_0x13a2dc(0x8cd)]({'cfg':_0x4af357['cfg'][_0x13a2dc(0x8cd)]({'kdf':_0x92333a}),'encrypt':function(_0x20a60d,_0x35526c,_0x38e51a,_0x6df30c){const _0x176f39=_0x13a2dc;_0x6df30c=this['cfg'][_0x176f39(0x8cd)](_0x6df30c);var _0xa9b903=_0x6df30c['kdf']['execute'](_0x38e51a,_0x20a60d[_0x176f39(0x809)],_0x20a60d[_0x176f39(0x95e)],_0x6df30c[_0x176f39(0x562)],_0x6df30c[_0x176f39(0x13b)]);_0x6df30c['iv']=_0xa9b903['iv'];var _0x40e9b6=_0x4af357[_0x176f39(0x9eb)][_0x176f39(0x7a4)](this,_0x20a60d,_0x35526c,_0xa9b903[_0x176f39(0x64f)],_0x6df30c);return _0x40e9b6[_0x176f39(0x93b)](_0xa9b903),_0x40e9b6;},'decrypt':function(_0x33688b,_0x1459c9,_0x1a454e,_0x1ff834){const _0x14339e=_0x13a2dc;_0x1ff834=this[_0x14339e(0x2ef)][_0x14339e(0x8cd)](_0x1ff834),_0x1459c9=this[_0x14339e(0x52c)](_0x1459c9,_0x1ff834[_0x14339e(0x5a7)]);var _0x3c2d07=_0x1ff834[_0x14339e(0x1d1)][_0x14339e(0x86b)](_0x1a454e,_0x33688b[_0x14339e(0x809)],_0x33688b[_0x14339e(0x95e)],_0x1459c9[_0x14339e(0x562)],_0x1ff834[_0x14339e(0x13b)]);_0x1ff834['iv']=_0x3c2d07['iv'];var _0x5ab896=_0x4af357[_0x14339e(0x1ae)][_0x14339e(0x7a4)](this,_0x33688b,_0x1459c9,_0x3c2d07['key'],_0x1ff834);return _0x5ab896;}});}();}));}),_0x53499e=_0x2d851e((_0x50d4cd,_0x7e0f3a)=>{(function(_0x37afd3,_0x355837,_0x387059){const _0x17c2d2=_0xf114;typeof _0x50d4cd=='object'?_0x7e0f3a[_0x17c2d2(0x6ce)]=_0x50d4cd=_0x355837(_0x2b1809(),_0x1b437e()):typeof define=='function'&&define[_0x17c2d2(0xfe)]?define([_0x17c2d2(0x7d0),_0x17c2d2(0x723)],_0x355837):_0x355837(_0x37afd3[_0x17c2d2(0x626)]);}(_0x50d4cd,function(_0x1eae12){const _0x34a1ee=_0xf114;return _0x1eae12[_0x34a1ee(0x6f7)]['CFB']=(function(){const _0x260f09=_0x34a1ee;var _0x356b69=_0x1eae12[_0x260f09(0x6e8)][_0x260f09(0x166)][_0x260f09(0x8cd)]();_0x356b69[_0x260f09(0xe9)]=_0x356b69[_0x260f09(0x8cd)]({'processBlock':function(_0x22dd4e,_0x1b50ff){const _0x599c71=_0x260f09;var _0x5bbab5=this[_0x599c71(0xa31)],_0x5fcedb=_0x5bbab5[_0x599c71(0x1ac)];_0x2794d4[_0x599c71(0x7a4)](this,_0x22dd4e,_0x1b50ff,_0x5fcedb,_0x5bbab5),this[_0x599c71(0xaa9)]=_0x22dd4e[_0x599c71(0x724)](_0x1b50ff,_0x1b50ff+_0x5fcedb);}}),_0x356b69[_0x260f09(0x6ab)]=_0x356b69[_0x260f09(0x8cd)]({'processBlock':function(_0xb9f371,_0x45bd2f){const _0x9f6324=_0x260f09;var _0xa31f89=this['_cipher'],_0x3eecec=_0xa31f89['blockSize'],_0x1bc99a=_0xb9f371['slice'](_0x45bd2f,_0x45bd2f+_0x3eecec);_0x2794d4[_0x9f6324(0x7a4)](this,_0xb9f371,_0x45bd2f,_0x3eecec,_0xa31f89),this[_0x9f6324(0xaa9)]=_0x1bc99a;}});function _0x2794d4(_0x6e8b63,_0x45b27d,_0x497536,_0x351fa7){const _0x482afe=_0x260f09;var _0x2d0a2a,_0x78b764=this[_0x482afe(0x885)];_0x78b764?(_0x2d0a2a=_0x78b764[_0x482afe(0x724)](0x0),this[_0x482afe(0x885)]=void 0x0):_0x2d0a2a=this['_prevBlock'],_0x351fa7[_0x482afe(0x4e9)](_0x2d0a2a,0x0);for(var _0x4fc42b=0x0;_0x4fc42b<_0x497536;_0x4fc42b++)_0x6e8b63[_0x45b27d+_0x4fc42b]^=_0x2d0a2a[_0x4fc42b];}return _0x356b69;}()),_0x1eae12[_0x34a1ee(0x6f7)][_0x34a1ee(0x916)];}));}),_0x75e388=_0x2d851e((_0x5c0112,_0x57eaf1)=>{(function(_0xce0e12,_0x5bb647,_0x565045){const _0x2b9e7b=_0xf114;typeof _0x5c0112==_0x2b9e7b(0xa3c)?_0x57eaf1['exports']=_0x5c0112=_0x5bb647(_0x2b1809(),_0x1b437e()):typeof define==_0x2b9e7b(0x9e7)&&define['amd']?define([_0x2b9e7b(0x7d0),'./cipher-core'],_0x5bb647):_0x5bb647(_0xce0e12[_0x2b9e7b(0x626)]);}(_0x5c0112,function(_0x365de7){const _0x15598a=_0xf114;return _0x365de7[_0x15598a(0x6f7)][_0x15598a(0xe7)]=(function(){const _0x17a7f6=_0x15598a;var _0x4f3ea2=_0x365de7[_0x17a7f6(0x6e8)][_0x17a7f6(0x166)][_0x17a7f6(0x8cd)](),_0x597fea=_0x4f3ea2[_0x17a7f6(0xe9)]=_0x4f3ea2[_0x17a7f6(0x8cd)]({'processBlock':function(_0x3472fe,_0x40fd8a){const _0xd31232=_0x17a7f6;var _0x16e9c4=this[_0xd31232(0xa31)],_0x33f2be=_0x16e9c4['blockSize'],_0x16341a=this[_0xd31232(0x885)],_0xa93385=this['_counter'];_0x16341a&&(_0xa93385=this['_counter']=_0x16341a[_0xd31232(0x724)](0x0),this[_0xd31232(0x885)]=void 0x0);var _0x95a4a7=_0xa93385[_0xd31232(0x724)](0x0);_0x16e9c4['encryptBlock'](_0x95a4a7,0x0),_0xa93385[_0x33f2be-0x1]=_0xa93385[_0x33f2be-0x1]+0x1|0x0;for(var _0x4febfe=0x0;_0x4febfe<_0x33f2be;_0x4febfe++)_0x3472fe[_0x40fd8a+_0x4febfe]^=_0x95a4a7[_0x4febfe];}});return _0x4f3ea2['Decryptor']=_0x597fea,_0x4f3ea2;}()),_0x365de7['mode'][_0x15598a(0xe7)];}));}),_0x288784=_0x2d851e((_0x3ef0c1,_0x1a6718)=>{(function(_0x298064,_0x33b355,_0xe8f9e9){const _0x5218fa=_0xf114;typeof _0x3ef0c1==_0x5218fa(0xa3c)?_0x1a6718[_0x5218fa(0x6ce)]=_0x3ef0c1=_0x33b355(_0x2b1809(),_0x1b437e()):typeof define==_0x5218fa(0x9e7)&&define['amd']?define([_0x5218fa(0x7d0),'./cipher-core'],_0x33b355):_0x33b355(_0x298064[_0x5218fa(0x626)]);}(_0x3ef0c1,function(_0x30d9c0){const _0x3b53fa=_0xf114;return _0x30d9c0['mode']['CTRGladman']=(function(){const _0x3c80be=_0xf114;var _0x4a02c7=_0x30d9c0[_0x3c80be(0x6e8)][_0x3c80be(0x166)][_0x3c80be(0x8cd)]();function _0x88f37a(_0x46883a){if((_0x46883a>>0x18&0xff)===0xff){var _0x1c9d7b=_0x46883a>>0x10&0xff,_0xe023ee=_0x46883a>>0x8&0xff,_0x1649d3=_0x46883a&0xff;_0x1c9d7b===0xff?(_0x1c9d7b=0x0,_0xe023ee===0xff?(_0xe023ee=0x0,_0x1649d3===0xff?_0x1649d3=0x0:++_0x1649d3):++_0xe023ee):++_0x1c9d7b,_0x46883a=0x0,_0x46883a+=_0x1c9d7b<<0x10,_0x46883a+=_0xe023ee<<0x8,_0x46883a+=_0x1649d3;}else _0x46883a+=0x1<<0x18;return _0x46883a;}function _0x1623db(_0x2b52da){return(_0x2b52da[0x0]=_0x88f37a(_0x2b52da[0x0]))===0x0&&(_0x2b52da[0x1]=_0x88f37a(_0x2b52da[0x1])),_0x2b52da;}var _0x5ee296=_0x4a02c7['Encryptor']=_0x4a02c7[_0x3c80be(0x8cd)]({'processBlock':function(_0x439662,_0xa3072){const _0x1845e8=_0x3c80be;var _0x3ef5dd=this[_0x1845e8(0xa31)],_0x3e0c45=_0x3ef5dd[_0x1845e8(0x1ac)],_0x58a163=this[_0x1845e8(0x885)],_0x5a20ae=this[_0x1845e8(0x47a)];_0x58a163&&(_0x5a20ae=this['_counter']=_0x58a163[_0x1845e8(0x724)](0x0),this['_iv']=void 0x0),_0x1623db(_0x5a20ae);var _0xe2f442=_0x5a20ae[_0x1845e8(0x724)](0x0);_0x3ef5dd[_0x1845e8(0x4e9)](_0xe2f442,0x0);for(var _0x703a59=0x0;_0x703a59<_0x3e0c45;_0x703a59++)_0x439662[_0xa3072+_0x703a59]^=_0xe2f442[_0x703a59];}});return _0x4a02c7['Decryptor']=_0x5ee296,_0x4a02c7;}()),_0x30d9c0[_0x3b53fa(0x6f7)][_0x3b53fa(0x30a)];}));}),_0x175352=_0x2d851e((_0x38eb9,_0x38d536)=>{(function(_0x5330b0,_0x286f3c,_0x493d4d){const _0x38285c=_0xf114;typeof _0x38eb9==_0x38285c(0xa3c)?_0x38d536[_0x38285c(0x6ce)]=_0x38eb9=_0x286f3c(_0x2b1809(),_0x1b437e()):typeof define==_0x38285c(0x9e7)&&define['amd']?define(['./core','./cipher-core'],_0x286f3c):_0x286f3c(_0x5330b0[_0x38285c(0x626)]);}(_0x38eb9,function(_0x489706){const _0x1b443b=_0xf114;return _0x489706[_0x1b443b(0x6f7)][_0x1b443b(0x117)]=(function(){const _0x5426eb=_0x1b443b;var _0x5ad506=_0x489706[_0x5426eb(0x6e8)][_0x5426eb(0x166)][_0x5426eb(0x8cd)](),_0x2528b5=_0x5ad506[_0x5426eb(0xe9)]=_0x5ad506[_0x5426eb(0x8cd)]({'processBlock':function(_0x36eb04,_0x35a625){const _0x5803b1=_0x5426eb;var _0x4b67a2=this['_cipher'],_0x2e5db1=_0x4b67a2[_0x5803b1(0x1ac)],_0x445536=this[_0x5803b1(0x885)],_0x2b2d65=this[_0x5803b1(0x863)];_0x445536&&(_0x2b2d65=this[_0x5803b1(0x863)]=_0x445536[_0x5803b1(0x724)](0x0),this['_iv']=void 0x0),_0x4b67a2[_0x5803b1(0x4e9)](_0x2b2d65,0x0);for(var _0x5001ec=0x0;_0x5001ec<_0x2e5db1;_0x5001ec++)_0x36eb04[_0x35a625+_0x5001ec]^=_0x2b2d65[_0x5001ec];}});return _0x5ad506[_0x5426eb(0x6ab)]=_0x2528b5,_0x5ad506;}()),_0x489706[_0x1b443b(0x6f7)]['OFB'];}));}),_0x1d6fba=_0x2d851e((_0x37924d,_0x2ba17a)=>{(function(_0x45f211,_0x4c1658,_0x249445){const _0xafbe91=_0xf114;typeof _0x37924d==_0xafbe91(0xa3c)?_0x2ba17a[_0xafbe91(0x6ce)]=_0x37924d=_0x4c1658(_0x2b1809(),_0x1b437e()):typeof define==_0xafbe91(0x9e7)&&define[_0xafbe91(0xfe)]?define(['./core',_0xafbe91(0x723)],_0x4c1658):_0x4c1658(_0x45f211['CryptoJS']);}(_0x37924d,function(_0x17b408){const _0x1a73ae=_0xf114;return _0x17b408['mode'][_0x1a73ae(0x67f)]=(function(){const _0x478085=_0x1a73ae;var _0x5f4ecd=_0x17b408[_0x478085(0x6e8)]['BlockCipherMode'][_0x478085(0x8cd)]();return _0x5f4ecd[_0x478085(0xe9)]=_0x5f4ecd['extend']({'processBlock':function(_0x2ab61c,_0x5caea1){const _0x2f9da7=_0x478085;this[_0x2f9da7(0xa31)][_0x2f9da7(0x4e9)](_0x2ab61c,_0x5caea1);}}),_0x5f4ecd[_0x478085(0x6ab)]=_0x5f4ecd[_0x478085(0x8cd)]({'processBlock':function(_0x43d8e1,_0x3e880d){const _0x494db9=_0x478085;this[_0x494db9(0xa31)][_0x494db9(0x9e4)](_0x43d8e1,_0x3e880d);}}),_0x5f4ecd;}()),_0x17b408[_0x1a73ae(0x6f7)][_0x1a73ae(0x67f)];}));}),_0x5e55ba=_0x2d851e((_0x32544e,_0x455b29)=>{(function(_0xee68e0,_0x21d2f8,_0x409e8b){const _0x51f255=_0xf114;typeof _0x32544e==_0x51f255(0xa3c)?_0x455b29['exports']=_0x32544e=_0x21d2f8(_0x2b1809(),_0x1b437e()):typeof define==_0x51f255(0x9e7)&&define[_0x51f255(0xfe)]?define([_0x51f255(0x7d0),_0x51f255(0x723)],_0x21d2f8):_0x21d2f8(_0xee68e0[_0x51f255(0x626)]);}(_0x32544e,function(_0xbd0460){const _0x464722=_0xf114;return _0xbd0460['pad'][_0x464722(0xa78)]={'pad':function(_0x1508de,_0x5ce310){const _0x2a9f58=_0x464722;var _0x5d4528=_0x1508de[_0x2a9f58(0xa17)],_0x35b732=_0x5ce310*0x4,_0x84c6dc=_0x35b732-_0x5d4528%_0x35b732,_0x3642a1=_0x5d4528+_0x84c6dc-0x1;_0x1508de['clamp'](),_0x1508de[_0x2a9f58(0x2d4)][_0x3642a1>>>0x2]|=_0x84c6dc<<0x18-_0x3642a1%0x4*0x8,_0x1508de[_0x2a9f58(0xa17)]+=_0x84c6dc;},'unpad':function(_0x39c9d5){const _0x3b180c=_0x464722;var _0x37f92f=_0x39c9d5[_0x3b180c(0x2d4)][_0x39c9d5[_0x3b180c(0xa17)]-0x1>>>0x2]&0xff;_0x39c9d5[_0x3b180c(0xa17)]-=_0x37f92f;}},_0xbd0460['pad'][_0x464722(0x553)];}));}),_0x55548d=_0x2d851e((_0x1acbd5,_0x564e19)=>{(function(_0x1ef246,_0x1a8877,_0x5d99b4){const _0x301847=_0xf114;typeof _0x1acbd5==_0x301847(0xa3c)?_0x564e19[_0x301847(0x6ce)]=_0x1acbd5=_0x1a8877(_0x2b1809(),_0x1b437e()):typeof define==_0x301847(0x9e7)&&define[_0x301847(0xfe)]?define([_0x301847(0x7d0),_0x301847(0x723)],_0x1a8877):_0x1a8877(_0x1ef246[_0x301847(0x626)]);}(_0x1acbd5,function(_0x4515c3){const _0x5866e5=_0xf114;return _0x4515c3[_0x5866e5(0x496)][_0x5866e5(0x4f4)]={'pad':function(_0x4a5b6d,_0x3b8836){const _0x5398e5=_0x5866e5;var _0x5615cc=_0x3b8836*0x4,_0x7846f3=_0x5615cc-_0x4a5b6d[_0x5398e5(0xa17)]%_0x5615cc;_0x4a5b6d['concat'](_0x4515c3[_0x5398e5(0x6e8)]['WordArray'][_0x5398e5(0x15f)](_0x7846f3-0x1))[_0x5398e5(0x64c)](_0x4515c3[_0x5398e5(0x6e8)]['WordArray'][_0x5398e5(0x484)]([_0x7846f3<<0x18],0x1));},'unpad':function(_0x590321){const _0x1b1a76=_0x5866e5;var _0x910642=_0x590321[_0x1b1a76(0x2d4)][_0x590321['sigBytes']-0x1>>>0x2]&0xff;_0x590321[_0x1b1a76(0xa17)]-=_0x910642;}},_0x4515c3[_0x5866e5(0x496)][_0x5866e5(0x4f4)];}));}),_0x5f338a=_0x2d851e((_0x214eb1,_0x231c8d)=>{(function(_0x3c4ddb,_0x1a1424,_0x15c302){const _0x8c3439=_0xf114;typeof _0x214eb1==_0x8c3439(0xa3c)?_0x231c8d['exports']=_0x214eb1=_0x1a1424(_0x2b1809(),_0x1b437e()):typeof define==_0x8c3439(0x9e7)&&define['amd']?define([_0x8c3439(0x7d0),_0x8c3439(0x723)],_0x1a1424):_0x1a1424(_0x3c4ddb[_0x8c3439(0x626)]);}(_0x214eb1,function(_0x5437d2){const _0xea4f9b=_0xf114;return _0x5437d2[_0xea4f9b(0x496)][_0xea4f9b(0x798)]={'pad':function(_0x5d8dc2,_0x393d1b){const _0x5443d5=_0xea4f9b;_0x5d8dc2[_0x5443d5(0x64c)](_0x5437d2[_0x5443d5(0x6e8)][_0x5443d5(0x590)][_0x5443d5(0x484)]([0x80000000],0x1)),_0x5437d2[_0x5443d5(0x496)][_0x5443d5(0x213)][_0x5443d5(0x496)](_0x5d8dc2,_0x393d1b);},'unpad':function(_0x289fe2){const _0x11f725=_0xea4f9b;_0x5437d2['pad'][_0x11f725(0x213)]['unpad'](_0x289fe2),_0x289fe2[_0x11f725(0xa17)]--;}},_0x5437d2[_0xea4f9b(0x496)][_0xea4f9b(0x798)];}));}),_0x2f7f56=_0x2d851e((_0x3718a3,_0x56a51f)=>{(function(_0x1b0f39,_0x3e857e,_0x53487f){const _0xf54c19=_0xf114;typeof _0x3718a3==_0xf54c19(0xa3c)?_0x56a51f['exports']=_0x3718a3=_0x3e857e(_0x2b1809(),_0x1b437e()):typeof define==_0xf54c19(0x9e7)&&define[_0xf54c19(0xfe)]?define([_0xf54c19(0x7d0),'./cipher-core'],_0x3e857e):_0x3e857e(_0x1b0f39[_0xf54c19(0x626)]);}(_0x3718a3,function(_0x5945d4){const _0x5dea87=_0xf114;return _0x5945d4[_0x5dea87(0x496)][_0x5dea87(0x213)]={'pad':function(_0x5117e2,_0x3a8e2e){const _0x5365d0=_0x5dea87;var _0x5ce87b=_0x3a8e2e*0x4;_0x5117e2['clamp'](),_0x5117e2[_0x5365d0(0xa17)]+=_0x5ce87b-(_0x5117e2[_0x5365d0(0xa17)]%_0x5ce87b||_0x5ce87b);},'unpad':function(_0x54e370){const _0x12616c=_0x5dea87;for(var _0x24690f=_0x54e370[_0x12616c(0x2d4)],_0x9f7ca3=_0x54e370[_0x12616c(0xa17)]-0x1,_0x9f7ca3=_0x54e370['sigBytes']-0x1;_0x9f7ca3>=0x0;_0x9f7ca3--)if(_0x24690f[_0x9f7ca3>>>0x2]>>>0x18-_0x9f7ca3%0x4*0x8&0xff){_0x54e370['sigBytes']=_0x9f7ca3+0x1;break;}}},_0x5945d4[_0x5dea87(0x496)][_0x5dea87(0x213)];}));}),_0x379a7b=_0x2d851e((_0x54ea9f,_0x3b4012)=>{(function(_0x1993f0,_0x58b884,_0x41c05d){const _0x5697e4=_0xf114;typeof _0x54ea9f==_0x5697e4(0xa3c)?_0x3b4012[_0x5697e4(0x6ce)]=_0x54ea9f=_0x58b884(_0x2b1809(),_0x1b437e()):typeof define=='function'&&define[_0x5697e4(0xfe)]?define([_0x5697e4(0x7d0),_0x5697e4(0x723)],_0x58b884):_0x58b884(_0x1993f0[_0x5697e4(0x626)]);}(_0x54ea9f,function(_0x208c7e){const _0x4786c7=_0xf114;return _0x208c7e[_0x4786c7(0x496)][_0x4786c7(0x3a6)]={'pad':function(){},'unpad':function(){}},_0x208c7e['pad'][_0x4786c7(0x3a6)];}));}),_0x58a73e=_0x2d851e((_0xbbc63b,_0x17739a)=>{(function(_0x20eb63,_0x567894,_0x4bc7fc){const _0x1b9655=_0xf114;typeof _0xbbc63b==_0x1b9655(0xa3c)?_0x17739a[_0x1b9655(0x6ce)]=_0xbbc63b=_0x567894(_0x2b1809(),_0x1b437e()):typeof define==_0x1b9655(0x9e7)&&define[_0x1b9655(0xfe)]?define([_0x1b9655(0x7d0),_0x1b9655(0x723)],_0x567894):_0x567894(_0x20eb63[_0x1b9655(0x626)]);}(_0xbbc63b,function(_0x2508ea){const _0x2915ce=_0xf114;return function(_0x5ebed3){const _0x523ed2=_0xf114;var _0x13f439=_0x2508ea,_0x7694cb=_0x13f439[_0x523ed2(0x6e8)],_0x1179fe=_0x7694cb[_0x523ed2(0x237)],_0x59fd12=_0x13f439['enc'],_0x4aded3=_0x59fd12[_0x523ed2(0x5f5)],_0xe875a3=_0x13f439[_0x523ed2(0x5a7)],_0x469f43=_0xe875a3[_0x523ed2(0x5f5)]={'stringify':function(_0x18b3cf){const _0x2e0ec3=_0x523ed2;return _0x18b3cf[_0x2e0ec3(0x884)][_0x2e0ec3(0x8fa)](_0x4aded3);},'parse':function(_0x56b65a){const _0x1f4440=_0x523ed2;var _0x1a75ea=_0x4aded3[_0x1f4440(0xce)](_0x56b65a);return _0x1179fe[_0x1f4440(0x484)]({'ciphertext':_0x1a75ea});}};}(),_0x2508ea[_0x2915ce(0x5a7)][_0x2915ce(0x5f5)];}));}),_0x2447eb=_0x2d851e((_0x41b5ab,_0x266ce7)=>{(function(_0x514d53,_0x1640aa,_0x385be4){const _0x4b80c3=_0xf114;typeof _0x41b5ab=='object'?_0x266ce7[_0x4b80c3(0x6ce)]=_0x41b5ab=_0x1640aa(_0x2b1809(),_0x3043ab(),_0x93aced(),_0xf907bf(),_0x1b437e()):typeof define==_0x4b80c3(0x9e7)&&define[_0x4b80c3(0xfe)]?define([_0x4b80c3(0x7d0),_0x4b80c3(0x7c8),_0x4b80c3(0x479),_0x4b80c3(0x2a0),_0x4b80c3(0x723)],_0x1640aa):_0x1640aa(_0x514d53[_0x4b80c3(0x626)]);}(_0x41b5ab,function(_0x4819a9){const _0x2c1349=_0xf114;return(function(){const _0x35befd=_0xf114;var _0x4accb5=_0x4819a9,_0x2669ec=_0x4accb5[_0x35befd(0x6e8)],_0x7a42f2=_0x2669ec[_0x35befd(0x30e)],_0x56455d=_0x4accb5[_0x35befd(0x94b)],_0x28cc70=[],_0x40c202=[],_0x3f8946=[],_0x2e88b5=[],_0x4bad26=[],_0xfb92b7=[],_0x10b25a=[],_0xc1e466=[],_0x3d2d98=[],_0x3dd531=[];(function(){for(var _0x4b100f=[],_0x27002f=0x0;_0x27002f<0x100;_0x27002f++)_0x27002f<0x80?_0x4b100f[_0x27002f]=_0x27002f<<0x1:_0x4b100f[_0x27002f]=_0x27002f<<0x1^0x11b;for(var _0x2d578c=0x0,_0x39de6a=0x0,_0x27002f=0x0;_0x27002f<0x100;_0x27002f++){var _0x2a3216=_0x39de6a^_0x39de6a<<0x1^_0x39de6a<<0x2^_0x39de6a<<0x3^_0x39de6a<<0x4;_0x2a3216=_0x2a3216>>>0x8^_0x2a3216&0xff^0x63,_0x28cc70[_0x2d578c]=_0x2a3216,_0x40c202[_0x2a3216]=_0x2d578c;var _0x51e669=_0x4b100f[_0x2d578c],_0x469071=_0x4b100f[_0x51e669],_0x28b7fe=_0x4b100f[_0x469071],_0x5cdcd9=_0x4b100f[_0x2a3216]*0x101^_0x2a3216*0x1010100;_0x3f8946[_0x2d578c]=_0x5cdcd9<<0x18|_0x5cdcd9>>>0x8,_0x2e88b5[_0x2d578c]=_0x5cdcd9<<0x10|_0x5cdcd9>>>0x10,_0x4bad26[_0x2d578c]=_0x5cdcd9<<0x8|_0x5cdcd9>>>0x18,_0xfb92b7[_0x2d578c]=_0x5cdcd9;var _0x5cdcd9=_0x28b7fe*0x1010101^_0x469071*0x10001^_0x51e669*0x101^_0x2d578c*0x1010100;_0x10b25a[_0x2a3216]=_0x5cdcd9<<0x18|_0x5cdcd9>>>0x8,_0xc1e466[_0x2a3216]=_0x5cdcd9<<0x10|_0x5cdcd9>>>0x10,_0x3d2d98[_0x2a3216]=_0x5cdcd9<<0x8|_0x5cdcd9>>>0x18,_0x3dd531[_0x2a3216]=_0x5cdcd9,_0x2d578c?(_0x2d578c=_0x51e669^_0x4b100f[_0x4b100f[_0x4b100f[_0x28b7fe^_0x51e669]]],_0x39de6a^=_0x4b100f[_0x4b100f[_0x39de6a]]):_0x2d578c=_0x39de6a=0x1;}}());var _0x4dab86=[0x0,0x1,0x2,0x4,0x8,0x10,0x20,0x40,0x80,0x1b,0x36],_0xc92713=_0x56455d['AES']=_0x7a42f2[_0x35befd(0x8cd)]({'_doReset':function(){const _0x487d2a=_0x35befd;var _0x18707c;if(!(this[_0x487d2a(0x92a)]&&this['_keyPriorReset']===this[_0x487d2a(0x7b9)])){for(var _0x374a1b=this[_0x487d2a(0xa51)]=this['_key'],_0x2319e8=_0x374a1b[_0x487d2a(0x2d4)],_0x30377c=_0x374a1b['sigBytes']/0x4,_0x53c02d=this[_0x487d2a(0x92a)]=_0x30377c+0x6,_0x3106f0=(_0x53c02d+0x1)*0x4,_0x465150=this['_keySchedule']=[],_0x56baa1=0x0;_0x56baa1<_0x3106f0;_0x56baa1++)_0x56baa1<_0x30377c?_0x465150[_0x56baa1]=_0x2319e8[_0x56baa1]:(_0x18707c=_0x465150[_0x56baa1-0x1],_0x56baa1%_0x30377c?_0x30377c>0x6&&_0x56baa1%_0x30377c==0x4&&(_0x18707c=_0x28cc70[_0x18707c>>>0x18]<<0x18|_0x28cc70[_0x18707c>>>0x10&0xff]<<0x10|_0x28cc70[_0x18707c>>>0x8&0xff]<<0x8|_0x28cc70[_0x18707c&0xff]):(_0x18707c=_0x18707c<<0x8|_0x18707c>>>0x18,_0x18707c=_0x28cc70[_0x18707c>>>0x18]<<0x18|_0x28cc70[_0x18707c>>>0x10&0xff]<<0x10|_0x28cc70[_0x18707c>>>0x8&0xff]<<0x8|_0x28cc70[_0x18707c&0xff],_0x18707c^=_0x4dab86[_0x56baa1/_0x30377c|0x0]<<0x18),_0x465150[_0x56baa1]=_0x465150[_0x56baa1-_0x30377c]^_0x18707c);for(var _0x3ed4c2=this[_0x487d2a(0x468)]=[],_0x31645f=0x0;_0x31645f<_0x3106f0;_0x31645f++){var _0x56baa1=_0x3106f0-_0x31645f;if(_0x31645f%0x4)var _0x18707c=_0x465150[_0x56baa1];else var _0x18707c=_0x465150[_0x56baa1-0x4];_0x31645f<0x4||_0x56baa1<=0x4?_0x3ed4c2[_0x31645f]=_0x18707c:_0x3ed4c2[_0x31645f]=_0x10b25a[_0x28cc70[_0x18707c>>>0x18]]^_0xc1e466[_0x28cc70[_0x18707c>>>0x10&0xff]]^_0x3d2d98[_0x28cc70[_0x18707c>>>0x8&0xff]]^_0x3dd531[_0x28cc70[_0x18707c&0xff]];}}},'encryptBlock':function(_0x3f837f,_0x4a24d5){const _0x125c6b=_0x35befd;this[_0x125c6b(0x2c2)](_0x3f837f,_0x4a24d5,this[_0x125c6b(0xa87)],_0x3f8946,_0x2e88b5,_0x4bad26,_0xfb92b7,_0x28cc70);},'decryptBlock':function(_0x25d44a,_0x4bd1a4){var _0x3ce963=_0x25d44a[_0x4bd1a4+0x1];_0x25d44a[_0x4bd1a4+0x1]=_0x25d44a[_0x4bd1a4+0x3],_0x25d44a[_0x4bd1a4+0x3]=_0x3ce963,this['_doCryptBlock'](_0x25d44a,_0x4bd1a4,this['_invKeySchedule'],_0x10b25a,_0xc1e466,_0x3d2d98,_0x3dd531,_0x40c202);var _0x3ce963=_0x25d44a[_0x4bd1a4+0x1];_0x25d44a[_0x4bd1a4+0x1]=_0x25d44a[_0x4bd1a4+0x3],_0x25d44a[_0x4bd1a4+0x3]=_0x3ce963;},'_doCryptBlock':function(_0x533d28,_0x10f611,_0x288073,_0x436d3d,_0x177520,_0xf0498a,_0x91eae3,_0x5f57a7){for(var _0x33686b=this['_nRounds'],_0x7bde0e=_0x533d28[_0x10f611]^_0x288073[0x0],_0x31cd37=_0x533d28[_0x10f611+0x1]^_0x288073[0x1],_0x54ac98=_0x533d28[_0x10f611+0x2]^_0x288073[0x2],_0x2b396e=_0x533d28[_0x10f611+0x3]^_0x288073[0x3],_0x4aeaa1=0x4,_0x49d6ac=0x1;_0x49d6ac<_0x33686b;_0x49d6ac++){var _0x1eee5f=_0x436d3d[_0x7bde0e>>>0x18]^_0x177520[_0x31cd37>>>0x10&0xff]^_0xf0498a[_0x54ac98>>>0x8&0xff]^_0x91eae3[_0x2b396e&0xff]^_0x288073[_0x4aeaa1++],_0x4b6647=_0x436d3d[_0x31cd37>>>0x18]^_0x177520[_0x54ac98>>>0x10&0xff]^_0xf0498a[_0x2b396e>>>0x8&0xff]^_0x91eae3[_0x7bde0e&0xff]^_0x288073[_0x4aeaa1++],_0x26c959=_0x436d3d[_0x54ac98>>>0x18]^_0x177520[_0x2b396e>>>0x10&0xff]^_0xf0498a[_0x7bde0e>>>0x8&0xff]^_0x91eae3[_0x31cd37&0xff]^_0x288073[_0x4aeaa1++],_0x4eaba7=_0x436d3d[_0x2b396e>>>0x18]^_0x177520[_0x7bde0e>>>0x10&0xff]^_0xf0498a[_0x31cd37>>>0x8&0xff]^_0x91eae3[_0x54ac98&0xff]^_0x288073[_0x4aeaa1++];_0x7bde0e=_0x1eee5f,_0x31cd37=_0x4b6647,_0x54ac98=_0x26c959,_0x2b396e=_0x4eaba7;}var _0x1eee5f=(_0x5f57a7[_0x7bde0e>>>0x18]<<0x18|_0x5f57a7[_0x31cd37>>>0x10&0xff]<<0x10|_0x5f57a7[_0x54ac98>>>0x8&0xff]<<0x8|_0x5f57a7[_0x2b396e&0xff])^_0x288073[_0x4aeaa1++],_0x4b6647=(_0x5f57a7[_0x31cd37>>>0x18]<<0x18|_0x5f57a7[_0x54ac98>>>0x10&0xff]<<0x10|_0x5f57a7[_0x2b396e>>>0x8&0xff]<<0x8|_0x5f57a7[_0x7bde0e&0xff])^_0x288073[_0x4aeaa1++],_0x26c959=(_0x5f57a7[_0x54ac98>>>0x18]<<0x18|_0x5f57a7[_0x2b396e>>>0x10&0xff]<<0x10|_0x5f57a7[_0x7bde0e>>>0x8&0xff]<<0x8|_0x5f57a7[_0x31cd37&0xff])^_0x288073[_0x4aeaa1++],_0x4eaba7=(_0x5f57a7[_0x2b396e>>>0x18]<<0x18|_0x5f57a7[_0x7bde0e>>>0x10&0xff]<<0x10|_0x5f57a7[_0x31cd37>>>0x8&0xff]<<0x8|_0x5f57a7[_0x54ac98&0xff])^_0x288073[_0x4aeaa1++];_0x533d28[_0x10f611]=_0x1eee5f,_0x533d28[_0x10f611+0x1]=_0x4b6647,_0x533d28[_0x10f611+0x2]=_0x26c959,_0x533d28[_0x10f611+0x3]=_0x4eaba7;},'keySize':0x100/0x20});_0x4accb5['AES']=_0x7a42f2['_createHelper'](_0xc92713);}()),_0x4819a9[_0x2c1349(0x1c6)];}));}),_0x2bcc95=_0x2d851e((_0x15ba22,_0x459889)=>{(function(_0x3d23a7,_0x266580,_0x7f1da4){const _0xd31808=_0xf114;typeof _0x15ba22=='object'?_0x459889[_0xd31808(0x6ce)]=_0x15ba22=_0x266580(_0x2b1809(),_0x3043ab(),_0x93aced(),_0xf907bf(),_0x1b437e()):typeof define==_0xd31808(0x9e7)&&define[_0xd31808(0xfe)]?define([_0xd31808(0x7d0),_0xd31808(0x7c8),'./md5','./evpkdf','./cipher-core'],_0x266580):_0x266580(_0x3d23a7[_0xd31808(0x626)]);}(_0x15ba22,function(_0x3aac82){const _0x30c383=_0xf114;return(function(){const _0xaff9fd=_0xf114;var _0x22ad72=_0x3aac82,_0x37b3e8=_0x22ad72[_0xaff9fd(0x6e8)],_0x13b80a=_0x37b3e8[_0xaff9fd(0x590)],_0x15095f=_0x37b3e8[_0xaff9fd(0x30e)],_0x1a9744=_0x22ad72[_0xaff9fd(0x94b)],_0x42e8be=[0x39,0x31,0x29,0x21,0x19,0x11,0x9,0x1,0x3a,0x32,0x2a,0x22,0x1a,0x12,0xa,0x2,0x3b,0x33,0x2b,0x23,0x1b,0x13,0xb,0x3,0x3c,0x34,0x2c,0x24,0x3f,0x37,0x2f,0x27,0x1f,0x17,0xf,0x7,0x3e,0x36,0x2e,0x26,0x1e,0x16,0xe,0x6,0x3d,0x35,0x2d,0x25,0x1d,0x15,0xd,0x5,0x1c,0x14,0xc,0x4],_0x5dd52b=[0xe,0x11,0xb,0x18,0x1,0x5,0x3,0x1c,0xf,0x6,0x15,0xa,0x17,0x13,0xc,0x4,0x1a,0x8,0x10,0x7,0x1b,0x14,0xd,0x2,0x29,0x34,0x1f,0x25,0x2f,0x37,0x1e,0x28,0x33,0x2d,0x21,0x30,0x2c,0x31,0x27,0x38,0x22,0x35,0x2e,0x2a,0x32,0x24,0x1d,0x20],_0x377861=[0x1,0x2,0x4,0x6,0x8,0xa,0xc,0xe,0xf,0x11,0x13,0x15,0x17,0x19,0x1b,0x1c],_0x534e2a=[{0x0:0x808200,0x10000000:0x8000,0x20000000:0x808002,0x30000000:0x2,0x40000000:0x200,0x50000000:0x808202,0x60000000:0x800202,0x70000000:0x800000,0x80000000:0x202,0x90000000:0x800200,0xa0000000:0x8200,0xb0000000:0x808000,0xc0000000:0x8002,0xd0000000:0x800002,0xe0000000:0x0,0xf0000000:0x8202,0x8000000:0x0,0x18000000:0x808202,0x28000000:0x8202,0x38000000:0x8000,0x48000000:0x808200,0x58000000:0x200,0x68000000:0x808002,0x78000000:0x2,0x88000000:0x800200,0x98000000:0x8200,0xa8000000:0x808000,0xb8000000:0x800202,0xc8000000:0x800002,0xd8000000:0x8002,0xe8000000:0x202,0xf8000000:0x800000,0x1:0x8000,0x10000001:0x2,0x20000001:0x808200,0x30000001:0x800000,0x40000001:0x808002,0x50000001:0x8200,0x60000001:0x200,0x70000001:0x800202,0x80000001:0x808202,0x90000001:0x808000,0xa0000001:0x800002,0xb0000001:0x8202,0xc0000001:0x202,0xd0000001:0x800200,0xe0000001:0x8002,0xf0000001:0x0,0x8000001:0x808202,0x18000001:0x808000,0x28000001:0x800000,0x38000001:0x200,0x48000001:0x8000,0x58000001:0x800002,0x68000001:0x2,0x78000001:0x8202,0x88000001:0x8002,0x98000001:0x800202,0xa8000001:0x202,0xb8000001:0x808200,0xc8000001:0x800200,0xd8000001:0x0,0xe8000001:0x8200,0xf8000001:0x808002},{0x0:0x40084010,0x1000000:0x4000,0x2000000:0x80000,0x3000000:0x40080010,0x4000000:0x40000010,0x5000000:0x40084000,0x6000000:0x40004000,0x7000000:0x10,0x8000000:0x84000,0x9000000:0x40004010,0xa000000:0x40000000,0xb000000:0x84010,0xc000000:0x80010,0xd000000:0x0,0xe000000:0x4010,0xf000000:0x40080000,0x800000:0x40004000,0x1800000:0x84010,0x2800000:0x10,0x3800000:0x40004010,0x4800000:0x40084010,0x5800000:0x40000000,0x6800000:0x80000,0x7800000:0x40080010,0x8800000:0x80010,0x9800000:0x0,0xa800000:0x4000,0xb800000:0x40080000,0xc800000:0x40000010,0xd800000:0x84000,0xe800000:0x40084000,0xf800000:0x4010,0x10000000:0x0,0x11000000:0x40080010,0x12000000:0x40004010,0x13000000:0x40084000,0x14000000:0x40080000,0x15000000:0x10,0x16000000:0x84010,0x17000000:0x4000,0x18000000:0x4010,0x19000000:0x80000,0x1a000000:0x80010,0x1b000000:0x40000010,0x1c000000:0x84000,0x1d000000:0x40004000,0x1e000000:0x40000000,0x1f000000:0x40084010,0x10800000:0x84010,0x11800000:0x80000,0x12800000:0x40080000,0x13800000:0x4000,0x14800000:0x40004000,0x15800000:0x40084010,0x16800000:0x10,0x17800000:0x40000000,0x18800000:0x40084000,0x19800000:0x40000010,0x1a800000:0x40004010,0x1b800000:0x80010,0x1c800000:0x0,0x1d800000:0x4010,0x1e800000:0x40080010,0x1f800000:0x84000},{0x0:0x104,0x100000:0x0,0x200000:0x4000100,0x300000:0x10104,0x400000:0x10004,0x500000:0x4000004,0x600000:0x4010104,0x700000:0x4010000,0x800000:0x4000000,0x900000:0x4010100,0xa00000:0x10100,0xb00000:0x4010004,0xc00000:0x4000104,0xd00000:0x10000,0xe00000:0x4,0xf00000:0x100,0x80000:0x4010100,0x180000:0x4010004,0x280000:0x0,0x380000:0x4000100,0x480000:0x4000004,0x580000:0x10000,0x680000:0x10004,0x780000:0x104,0x880000:0x4,0x980000:0x100,0xa80000:0x4010000,0xb80000:0x10104,0xc80000:0x10100,0xd80000:0x4000104,0xe80000:0x4010104,0xf80000:0x4000000,0x1000000:0x4010100,0x1100000:0x10004,0x1200000:0x10000,0x1300000:0x4000100,0x1400000:0x100,0x1500000:0x4010104,0x1600000:0x4000004,0x1700000:0x0,0x1800000:0x4000104,0x1900000:0x4000000,0x1a00000:0x4,0x1b00000:0x10100,0x1c00000:0x4010000,0x1d00000:0x104,0x1e00000:0x10104,0x1f00000:0x4010004,0x1080000:0x4000000,0x1180000:0x104,0x1280000:0x4010100,0x1380000:0x0,0x1480000:0x10004,0x1580000:0x4000100,0x1680000:0x100,0x1780000:0x4010004,0x1880000:0x10000,0x1980000:0x4010104,0x1a80000:0x10104,0x1b80000:0x4000004,0x1c80000:0x4000104,0x1d80000:0x4010000,0x1e80000:0x4,0x1f80000:0x10100},{0x0:0x80401000,0x10000:0x80001040,0x20000:0x401040,0x30000:0x80400000,0x40000:0x0,0x50000:0x401000,0x60000:0x80000040,0x70000:0x400040,0x80000:0x80000000,0x90000:0x400000,0xa0000:0x40,0xb0000:0x80001000,0xc0000:0x80400040,0xd0000:0x1040,0xe0000:0x1000,0xf0000:0x80401040,0x8000:0x80001040,0x18000:0x40,0x28000:0x80400040,0x38000:0x80001000,0x48000:0x401000,0x58000:0x80401040,0x68000:0x0,0x78000:0x80400000,0x88000:0x1000,0x98000:0x80401000,0xa8000:0x400000,0xb8000:0x1040,0xc8000:0x80000000,0xd8000:0x400040,0xe8000:0x401040,0xf8000:0x80000040,0x100000:0x400040,0x110000:0x401000,0x120000:0x80000040,0x130000:0x0,0x140000:0x1040,0x150000:0x80400040,0x160000:0x80401000,0x170000:0x80001040,0x180000:0x80401040,0x190000:0x80000000,0x1a0000:0x80400000,0x1b0000:0x401040,0x1c0000:0x80001000,0x1d0000:0x400000,0x1e0000:0x40,0x1f0000:0x1000,0x108000:0x80400000,0x118000:0x80401040,0x128000:0x0,0x138000:0x401000,0x148000:0x400040,0x158000:0x80000000,0x168000:0x80001040,0x178000:0x40,0x188000:0x80000040,0x198000:0x1000,0x1a8000:0x80001000,0x1b8000:0x80400040,0x1c8000:0x1040,0x1d8000:0x80401000,0x1e8000:0x400000,0x1f8000:0x401040},{0x0:0x80,0x1000:0x1040000,0x2000:0x40000,0x3000:0x20000000,0x4000:0x20040080,0x5000:0x1000080,0x6000:0x21000080,0x7000:0x40080,0x8000:0x1000000,0x9000:0x20040000,0xa000:0x20000080,0xb000:0x21040080,0xc000:0x21040000,0xd000:0x0,0xe000:0x1040080,0xf000:0x21000000,0x800:0x1040080,0x1800:0x21000080,0x2800:0x80,0x3800:0x1040000,0x4800:0x40000,0x5800:0x20040080,0x6800:0x21040000,0x7800:0x20000000,0x8800:0x20040000,0x9800:0x0,0xa800:0x21040080,0xb800:0x1000080,0xc800:0x20000080,0xd800:0x21000000,0xe800:0x1000000,0xf800:0x40080,0x10000:0x40000,0x11000:0x80,0x12000:0x20000000,0x13000:0x21000080,0x14000:0x1000080,0x15000:0x21040000,0x16000:0x20040080,0x17000:0x1000000,0x18000:0x21040080,0x19000:0x21000000,0x1a000:0x1040000,0x1b000:0x20040000,0x1c000:0x40080,0x1d000:0x20000080,0x1e000:0x0,0x1f000:0x1040080,0x10800:0x21000080,0x11800:0x1000000,0x12800:0x1040000,0x13800:0x20040080,0x14800:0x20000000,0x15800:0x1040080,0x16800:0x80,0x17800:0x21040000,0x18800:0x40080,0x19800:0x21040080,0x1a800:0x0,0x1b800:0x21000000,0x1c800:0x1000080,0x1d800:0x40000,0x1e800:0x20040000,0x1f800:0x20000080},{0x0:0x10000008,0x100:0x2000,0x200:0x10200000,0x300:0x10202008,0x400:0x10002000,0x500:0x200000,0x600:0x200008,0x700:0x10000000,0x800:0x0,0x900:0x10002008,0xa00:0x202000,0xb00:0x8,0xc00:0x10200008,0xd00:0x202008,0xe00:0x2008,0xf00:0x10202000,0x80:0x10200000,0x180:0x10202008,0x280:0x8,0x380:0x200000,0x480:0x202008,0x580:0x10000008,0x680:0x10002000,0x780:0x2008,0x880:0x200008,0x980:0x2000,0xa80:0x10002008,0xb80:0x10200008,0xc80:0x0,0xd80:0x10202000,0xe80:0x202000,0xf80:0x10000000,0x1000:0x10002000,0x1100:0x10200008,0x1200:0x10202008,0x1300:0x2008,0x1400:0x200000,0x1500:0x10000000,0x1600:0x10000008,0x1700:0x202000,0x1800:0x202008,0x1900:0x0,0x1a00:0x8,0x1b00:0x10200000,0x1c00:0x2000,0x1d00:0x10002008,0x1e00:0x10202000,0x1f00:0x200008,0x1080:0x8,0x1180:0x202000,0x1280:0x200000,0x1380:0x10000008,0x1480:0x10002000,0x1580:0x2008,0x1680:0x10202008,0x1780:0x10200000,0x1880:0x10202000,0x1980:0x10200008,0x1a80:0x2000,0x1b80:0x202008,0x1c80:0x200008,0x1d80:0x0,0x1e80:0x10000000,0x1f80:0x10002008},{0x0:0x100000,0x10:0x2000401,0x20:0x400,0x30:0x100401,0x40:0x2100401,0x50:0x0,0x60:0x1,0x70:0x2100001,0x80:0x2000400,0x90:0x100001,0xa0:0x2000001,0xb0:0x2100400,0xc0:0x2100000,0xd0:0x401,0xe0:0x100400,0xf0:0x2000000,0x8:0x2100001,0x18:0x0,0x28:0x2000401,0x38:0x2100400,0x48:0x100000,0x58:0x2000001,0x68:0x2000000,0x78:0x401,0x88:0x100401,0x98:0x2000400,0xa8:0x2100000,0xb8:0x100001,0xc8:0x400,0xd8:0x2100401,0xe8:0x1,0xf8:0x100400,0x100:0x2000000,0x110:0x100000,0x120:0x2000401,0x130:0x2100001,0x140:0x100001,0x150:0x2000400,0x160:0x2100400,0x170:0x100401,0x180:0x401,0x190:0x2100401,0x1a0:0x100400,0x1b0:0x1,0x1c0:0x0,0x1d0:0x2100000,0x1e0:0x2000001,0x1f0:0x400,0x108:0x100400,0x118:0x2000401,0x128:0x2100001,0x138:0x1,0x148:0x2000000,0x158:0x100000,0x168:0x401,0x178:0x2100400,0x188:0x2000001,0x198:0x2100000,0x1a8:0x0,0x1b8:0x2100401,0x1c8:0x100401,0x1d8:0x400,0x1e8:0x2000400,0x1f8:0x100001},{0x0:0x8000820,0x1:0x20000,0x2:0x8000000,0x3:0x20,0x4:0x20020,0x5:0x8020820,0x6:0x8020800,0x7:0x800,0x8:0x8020000,0x9:0x8000800,0xa:0x20800,0xb:0x8020020,0xc:0x820,0xd:0x0,0xe:0x8000020,0xf:0x20820,0x80000000:0x800,0x80000001:0x8020820,0x80000002:0x8000820,0x80000003:0x8000000,0x80000004:0x8020000,0x80000005:0x20800,0x80000006:0x20820,0x80000007:0x20,0x80000008:0x8000020,0x80000009:0x820,0x8000000a:0x20020,0x8000000b:0x8020800,0x8000000c:0x0,0x8000000d:0x8020020,0x8000000e:0x8000800,0x8000000f:0x20000,0x10:0x20820,0x11:0x8020800,0x12:0x20,0x13:0x800,0x14:0x8000800,0x15:0x8000020,0x16:0x8020020,0x17:0x20000,0x18:0x0,0x19:0x20020,0x1a:0x8020000,0x1b:0x8000820,0x1c:0x8020820,0x1d:0x20800,0x1e:0x820,0x1f:0x8000000,0x80000010:0x20000,0x80000011:0x800,0x80000012:0x8020020,0x80000013:0x20820,0x80000014:0x20,0x80000015:0x8020000,0x80000016:0x8000000,0x80000017:0x8000820,0x80000018:0x8020820,0x80000019:0x8000020,0x8000001a:0x8000800,0x8000001b:0x0,0x8000001c:0x20800,0x8000001d:0x820,0x8000001e:0x20020,0x8000001f:0x8020800}],_0x47fc12=[0xf8000001,0x1f800000,0x1f80000,0x1f8000,0x1f800,0x1f80,0x1f8,0x8000001f],_0x4cb815=_0x1a9744[_0xaff9fd(0x91d)]=_0x15095f[_0xaff9fd(0x8cd)]({'_doReset':function(){const _0x291fcb=_0xaff9fd;for(var _0x49927a=this[_0x291fcb(0x7b9)],_0x1864c4=_0x49927a[_0x291fcb(0x2d4)],_0x55d7aa=[],_0x5e84a0=0x0;_0x5e84a0<0x38;_0x5e84a0++){var _0x363d46=_0x42e8be[_0x5e84a0]-0x1;_0x55d7aa[_0x5e84a0]=_0x1864c4[_0x363d46>>>0x5]>>>0x1f-_0x363d46%0x20&0x1;}for(var _0x25e976=this[_0x291fcb(0x78f)]=[],_0xa39fe9=0x0;_0xa39fe9<0x10;_0xa39fe9++){for(var _0x54705a=_0x25e976[_0xa39fe9]=[],_0x5a5ca9=_0x377861[_0xa39fe9],_0x5e84a0=0x0;_0x5e84a0<0x18;_0x5e84a0++)_0x54705a[_0x5e84a0/0x6|0x0]|=_0x55d7aa[(_0x5dd52b[_0x5e84a0]-0x1+_0x5a5ca9)%0x1c]<<0x1f-_0x5e84a0%0x6,_0x54705a[0x4+(_0x5e84a0/0x6|0x0)]|=_0x55d7aa[0x1c+(_0x5dd52b[_0x5e84a0+0x18]-0x1+_0x5a5ca9)%0x1c]<<0x1f-_0x5e84a0%0x6;_0x54705a[0x0]=_0x54705a[0x0]<<0x1|_0x54705a[0x0]>>>0x1f;for(var _0x5e84a0=0x1;_0x5e84a0<0x7;_0x5e84a0++)_0x54705a[_0x5e84a0]=_0x54705a[_0x5e84a0]>>>(_0x5e84a0-0x1)*0x4+0x3;_0x54705a[0x7]=_0x54705a[0x7]<<0x5|_0x54705a[0x7]>>>0x1b;}for(var _0x73d34=this[_0x291fcb(0xc2)]=[],_0x5e84a0=0x0;_0x5e84a0<0x10;_0x5e84a0++)_0x73d34[_0x5e84a0]=_0x25e976[0xf-_0x5e84a0];},'encryptBlock':function(_0x73235d,_0x119b1e){const _0xdab135=_0xaff9fd;this[_0xdab135(0x2c2)](_0x73235d,_0x119b1e,this[_0xdab135(0x78f)]);},'decryptBlock':function(_0xd5cd92,_0x489b8c){const _0x588bde=_0xaff9fd;this['_doCryptBlock'](_0xd5cd92,_0x489b8c,this[_0x588bde(0xc2)]);},'_doCryptBlock':function(_0x1f3a60,_0x28f11a,_0x5932a2){const _0x1aa53c=_0xaff9fd;this[_0x1aa53c(0x659)]=_0x1f3a60[_0x28f11a],this[_0x1aa53c(0x427)]=_0x1f3a60[_0x28f11a+0x1],_0x268532['call'](this,0x4,0xf0f0f0f),_0x268532['call'](this,0x10,0xffff),_0x1479fd[_0x1aa53c(0x7a4)](this,0x2,0x33333333),_0x1479fd[_0x1aa53c(0x7a4)](this,0x8,0xff00ff),_0x268532[_0x1aa53c(0x7a4)](this,0x1,0x55555555);for(var _0x3de411=0x0;_0x3de411<0x10;_0x3de411++){for(var _0xdf6dda=_0x5932a2[_0x3de411],_0x9fd410=this[_0x1aa53c(0x659)],_0x1eb459=this[_0x1aa53c(0x427)],_0x4ba484=0x0,_0x59f4c8=0x0;_0x59f4c8<0x8;_0x59f4c8++)_0x4ba484|=_0x534e2a[_0x59f4c8][((_0x1eb459^_0xdf6dda[_0x59f4c8])&_0x47fc12[_0x59f4c8])>>>0x0];this[_0x1aa53c(0x659)]=_0x1eb459,this[_0x1aa53c(0x427)]=_0x9fd410^_0x4ba484;}var _0x50ad68=this['_lBlock'];this[_0x1aa53c(0x659)]=this['_rBlock'],this['_rBlock']=_0x50ad68,_0x268532['call'](this,0x1,0x55555555),_0x1479fd[_0x1aa53c(0x7a4)](this,0x8,0xff00ff),_0x1479fd[_0x1aa53c(0x7a4)](this,0x2,0x33333333),_0x268532[_0x1aa53c(0x7a4)](this,0x10,0xffff),_0x268532[_0x1aa53c(0x7a4)](this,0x4,0xf0f0f0f),_0x1f3a60[_0x28f11a]=this[_0x1aa53c(0x659)],_0x1f3a60[_0x28f11a+0x1]=this['_rBlock'];},'keySize':0x40/0x20,'ivSize':0x40/0x20,'blockSize':0x40/0x20});function _0x268532(_0x5e68c9,_0x320138){const _0x56638b=_0xaff9fd;var _0x4c0afb=(this[_0x56638b(0x659)]>>>_0x5e68c9^this[_0x56638b(0x427)])&_0x320138;this[_0x56638b(0x427)]^=_0x4c0afb,this['_lBlock']^=_0x4c0afb<<_0x5e68c9;}function _0x1479fd(_0x39a496,_0x14aa53){const _0x19e93d=_0xaff9fd;var _0x954c5=(this[_0x19e93d(0x427)]>>>_0x39a496^this[_0x19e93d(0x659)])&_0x14aa53;this[_0x19e93d(0x659)]^=_0x954c5,this['_rBlock']^=_0x954c5<<_0x39a496;}_0x22ad72[_0xaff9fd(0x91d)]=_0x15095f[_0xaff9fd(0x58a)](_0x4cb815);var _0x1ab59a=_0x1a9744[_0xaff9fd(0x9b2)]=_0x15095f['extend']({'_doReset':function(){const _0x112642=_0xaff9fd;var _0x3a9831=this['_key'],_0x2cb5e2=_0x3a9831[_0x112642(0x2d4)];if(_0x2cb5e2['length']!==0x2&&_0x2cb5e2['length']!==0x4&&_0x2cb5e2[_0x112642(0x6a2)]<0x6)throw new Error('Invalid\x20key\x20length\x20-\x203DES\x20requires\x20the\x20key\x20length\x20to\x20be\x2064,\x20128,\x20192\x20or\x20>192.');var _0x175219=_0x2cb5e2[_0x112642(0x724)](0x0,0x2),_0x164b35=_0x2cb5e2[_0x112642(0x6a2)]<0x4?_0x2cb5e2[_0x112642(0x724)](0x0,0x2):_0x2cb5e2['slice'](0x2,0x4),_0x2da2bb=_0x2cb5e2['length']<0x6?_0x2cb5e2['slice'](0x0,0x2):_0x2cb5e2['slice'](0x4,0x6);this[_0x112642(0x99c)]=_0x4cb815[_0x112642(0x67d)](_0x13b80a['create'](_0x175219)),this[_0x112642(0x1bf)]=_0x4cb815[_0x112642(0x67d)](_0x13b80a[_0x112642(0x484)](_0x164b35)),this[_0x112642(0xf3)]=_0x4cb815[_0x112642(0x67d)](_0x13b80a[_0x112642(0x484)](_0x2da2bb));},'encryptBlock':function(_0x4ccf66,_0x3d663c){const _0x120e7e=_0xaff9fd;this[_0x120e7e(0x99c)]['encryptBlock'](_0x4ccf66,_0x3d663c),this[_0x120e7e(0x1bf)][_0x120e7e(0x9e4)](_0x4ccf66,_0x3d663c),this[_0x120e7e(0xf3)][_0x120e7e(0x4e9)](_0x4ccf66,_0x3d663c);},'decryptBlock':function(_0x449c96,_0x343106){const _0x5e0699=_0xaff9fd;this[_0x5e0699(0xf3)][_0x5e0699(0x9e4)](_0x449c96,_0x343106),this[_0x5e0699(0x1bf)]['encryptBlock'](_0x449c96,_0x343106),this['_des1'][_0x5e0699(0x9e4)](_0x449c96,_0x343106);},'keySize':0xc0/0x20,'ivSize':0x40/0x20,'blockSize':0x40/0x20});_0x22ad72['TripleDES']=_0x15095f[_0xaff9fd(0x58a)](_0x1ab59a);}()),_0x3aac82[_0x30c383(0x9b2)];}));}),_0x3782fb=_0x2d851e((_0x373ea0,_0x37f9f9)=>{(function(_0x1e2da2,_0x3e4ac0,_0x1201bd){const _0x1a270c=_0xf114;typeof _0x373ea0==_0x1a270c(0xa3c)?_0x37f9f9['exports']=_0x373ea0=_0x3e4ac0(_0x2b1809(),_0x3043ab(),_0x93aced(),_0xf907bf(),_0x1b437e()):typeof define==_0x1a270c(0x9e7)&&define[_0x1a270c(0xfe)]?define([_0x1a270c(0x7d0),_0x1a270c(0x7c8),_0x1a270c(0x479),_0x1a270c(0x2a0),_0x1a270c(0x723)],_0x3e4ac0):_0x3e4ac0(_0x1e2da2[_0x1a270c(0x626)]);}(_0x373ea0,function(_0x5a6bc0){const _0x4d23d5=_0xf114;return(function(){const _0x183881=_0xf114;var _0x4d75a1=_0x5a6bc0,_0x61e2f4=_0x4d75a1['lib'],_0x50dc4c=_0x61e2f4[_0x183881(0x813)],_0x74c83d=_0x4d75a1['algo'],_0x20832f=_0x74c83d['RC4']=_0x50dc4c[_0x183881(0x8cd)]({'_doReset':function(){const _0x170e0a=_0x183881;for(var _0xee3da=this[_0x170e0a(0x7b9)],_0x2a1110=_0xee3da[_0x170e0a(0x2d4)],_0x21f2b5=_0xee3da['sigBytes'],_0x4d278=this['_S']=[],_0xc15e0=0x0;_0xc15e0<0x100;_0xc15e0++)_0x4d278[_0xc15e0]=_0xc15e0;for(var _0xc15e0=0x0,_0x2d4f16=0x0;_0xc15e0<0x100;_0xc15e0++){var _0x5e1f0a=_0xc15e0%_0x21f2b5,_0x1cd088=_0x2a1110[_0x5e1f0a>>>0x2]>>>0x18-_0x5e1f0a%0x4*0x8&0xff;_0x2d4f16=(_0x2d4f16+_0x4d278[_0xc15e0]+_0x1cd088)%0x100;var _0x2e4eff=_0x4d278[_0xc15e0];_0x4d278[_0xc15e0]=_0x4d278[_0x2d4f16],_0x4d278[_0x2d4f16]=_0x2e4eff;}this['_i']=this['_j']=0x0;},'_doProcessBlock':function(_0x27a85f,_0x471725){const _0x588d5f=_0x183881;_0x27a85f[_0x471725]^=_0xe04e11[_0x588d5f(0x7a4)](this);},'keySize':0x100/0x20,'ivSize':0x0});function _0xe04e11(){for(var _0x5d9a26=this['_S'],_0x696288=this['_i'],_0x620500=this['_j'],_0x7ac4df=0x0,_0x30aee1=0x0;_0x30aee1<0x4;_0x30aee1++){_0x696288=(_0x696288+0x1)%0x100,_0x620500=(_0x620500+_0x5d9a26[_0x696288])%0x100;var _0x59071d=_0x5d9a26[_0x696288];_0x5d9a26[_0x696288]=_0x5d9a26[_0x620500],_0x5d9a26[_0x620500]=_0x59071d,_0x7ac4df|=_0x5d9a26[(_0x5d9a26[_0x696288]+_0x5d9a26[_0x620500])%0x100]<<0x18-_0x30aee1*0x8;}return this['_i']=_0x696288,this['_j']=_0x620500,_0x7ac4df;}_0x4d75a1['RC4']=_0x50dc4c[_0x183881(0x58a)](_0x20832f);var _0x2e7729=_0x74c83d['RC4Drop']=_0x20832f[_0x183881(0x8cd)]({'cfg':_0x20832f[_0x183881(0x2ef)][_0x183881(0x8cd)]({'drop':0xc0}),'_doReset':function(){const _0x161067=_0x183881;_0x20832f['_doReset'][_0x161067(0x7a4)](this);for(var _0x28c0bd=this['cfg'][_0x161067(0xa7e)];_0x28c0bd>0x0;_0x28c0bd--)_0xe04e11[_0x161067(0x7a4)](this);}});_0x4d75a1[_0x183881(0x8fd)]=_0x50dc4c['_createHelper'](_0x2e7729);}()),_0x5a6bc0[_0x4d23d5(0x7ce)];}));}),_0x449137=_0x2d851e((_0x141c29,_0x47c9e6)=>{(function(_0x5956a6,_0x4237dc,_0x27605e){const _0x3c5df4=_0xf114;typeof _0x141c29==_0x3c5df4(0xa3c)?_0x47c9e6[_0x3c5df4(0x6ce)]=_0x141c29=_0x4237dc(_0x2b1809(),_0x3043ab(),_0x93aced(),_0xf907bf(),_0x1b437e()):typeof define=='function'&&define['amd']?define([_0x3c5df4(0x7d0),_0x3c5df4(0x7c8),_0x3c5df4(0x479),_0x3c5df4(0x2a0),_0x3c5df4(0x723)],_0x4237dc):_0x4237dc(_0x5956a6[_0x3c5df4(0x626)]);}(_0x141c29,function(_0x1a086a){const _0x4069d8=_0xf114;return(function(){const _0x1880ef=_0xf114;var _0x2d3902=_0x1a086a,_0x1f9d1b=_0x2d3902[_0x1880ef(0x6e8)],_0x2f008b=_0x1f9d1b['StreamCipher'],_0xd66d66=_0x2d3902[_0x1880ef(0x94b)],_0x381b95=[],_0xe5c4a9=[],_0x4314f0=[],_0x25879b=_0xd66d66['Rabbit']=_0x2f008b['extend']({'_doReset':function(){const _0x1668e9=_0x1880ef;for(var _0xf621fc=this[_0x1668e9(0x7b9)][_0x1668e9(0x2d4)],_0x4ab2ac=this[_0x1668e9(0x2ef)]['iv'],_0x4170b6=0x0;_0x4170b6<0x4;_0x4170b6++)_0xf621fc[_0x4170b6]=(_0xf621fc[_0x4170b6]<<0x8|_0xf621fc[_0x4170b6]>>>0x18)&0xff00ff|(_0xf621fc[_0x4170b6]<<0x18|_0xf621fc[_0x4170b6]>>>0x8)&0xff00ff00;var _0x288cdc=this['_X']=[_0xf621fc[0x0],_0xf621fc[0x3]<<0x10|_0xf621fc[0x2]>>>0x10,_0xf621fc[0x1],_0xf621fc[0x0]<<0x10|_0xf621fc[0x3]>>>0x10,_0xf621fc[0x2],_0xf621fc[0x1]<<0x10|_0xf621fc[0x0]>>>0x10,_0xf621fc[0x3],_0xf621fc[0x2]<<0x10|_0xf621fc[0x1]>>>0x10],_0x5e7dd1=this['_C']=[_0xf621fc[0x2]<<0x10|_0xf621fc[0x2]>>>0x10,_0xf621fc[0x0]&0xffff0000|_0xf621fc[0x1]&0xffff,_0xf621fc[0x3]<<0x10|_0xf621fc[0x3]>>>0x10,_0xf621fc[0x1]&0xffff0000|_0xf621fc[0x2]&0xffff,_0xf621fc[0x0]<<0x10|_0xf621fc[0x0]>>>0x10,_0xf621fc[0x2]&0xffff0000|_0xf621fc[0x3]&0xffff,_0xf621fc[0x1]<<0x10|_0xf621fc[0x1]>>>0x10,_0xf621fc[0x3]&0xffff0000|_0xf621fc[0x0]&0xffff];this['_b']=0x0;for(var _0x4170b6=0x0;_0x4170b6<0x4;_0x4170b6++)_0x2285fd[_0x1668e9(0x7a4)](this);for(var _0x4170b6=0x0;_0x4170b6<0x8;_0x4170b6++)_0x5e7dd1[_0x4170b6]^=_0x288cdc[_0x4170b6+0x4&0x7];if(_0x4ab2ac){var _0x52d354=_0x4ab2ac[_0x1668e9(0x2d4)],_0x2cb0e8=_0x52d354[0x0],_0x2a412f=_0x52d354[0x1],_0x17aa38=(_0x2cb0e8<<0x8|_0x2cb0e8>>>0x18)&0xff00ff|(_0x2cb0e8<<0x18|_0x2cb0e8>>>0x8)&0xff00ff00,_0x161502=(_0x2a412f<<0x8|_0x2a412f>>>0x18)&0xff00ff|(_0x2a412f<<0x18|_0x2a412f>>>0x8)&0xff00ff00,_0x523ac4=_0x17aa38>>>0x10|_0x161502&0xffff0000,_0x296be5=_0x161502<<0x10|_0x17aa38&0xffff;_0x5e7dd1[0x0]^=_0x17aa38,_0x5e7dd1[0x1]^=_0x523ac4,_0x5e7dd1[0x2]^=_0x161502,_0x5e7dd1[0x3]^=_0x296be5,_0x5e7dd1[0x4]^=_0x17aa38,_0x5e7dd1[0x5]^=_0x523ac4,_0x5e7dd1[0x6]^=_0x161502,_0x5e7dd1[0x7]^=_0x296be5;for(var _0x4170b6=0x0;_0x4170b6<0x4;_0x4170b6++)_0x2285fd[_0x1668e9(0x7a4)](this);}},'_doProcessBlock':function(_0x583cfa,_0x12d36c){const _0x16df07=_0x1880ef;var _0x9eabde=this['_X'];_0x2285fd[_0x16df07(0x7a4)](this),_0x381b95[0x0]=_0x9eabde[0x0]^_0x9eabde[0x5]>>>0x10^_0x9eabde[0x3]<<0x10,_0x381b95[0x1]=_0x9eabde[0x2]^_0x9eabde[0x7]>>>0x10^_0x9eabde[0x5]<<0x10,_0x381b95[0x2]=_0x9eabde[0x4]^_0x9eabde[0x1]>>>0x10^_0x9eabde[0x7]<<0x10,_0x381b95[0x3]=_0x9eabde[0x6]^_0x9eabde[0x3]>>>0x10^_0x9eabde[0x1]<<0x10;for(var _0x138567=0x0;_0x138567<0x4;_0x138567++)_0x381b95[_0x138567]=(_0x381b95[_0x138567]<<0x8|_0x381b95[_0x138567]>>>0x18)&0xff00ff|(_0x381b95[_0x138567]<<0x18|_0x381b95[_0x138567]>>>0x8)&0xff00ff00,_0x583cfa[_0x12d36c+_0x138567]^=_0x381b95[_0x138567];},'blockSize':0x80/0x20,'ivSize':0x40/0x20});function _0x2285fd(){for(var _0x4af820=this['_X'],_0x25d442=this['_C'],_0xd33555=0x0;_0xd33555<0x8;_0xd33555++)_0xe5c4a9[_0xd33555]=_0x25d442[_0xd33555];_0x25d442[0x0]=_0x25d442[0x0]+0x4d34d34d+this['_b']|0x0,_0x25d442[0x1]=_0x25d442[0x1]+0xd34d34d3+(_0x25d442[0x0]>>>0x0<_0xe5c4a9[0x0]>>>0x0?0x1:0x0)|0x0,_0x25d442[0x2]=_0x25d442[0x2]+0x34d34d34+(_0x25d442[0x1]>>>0x0<_0xe5c4a9[0x1]>>>0x0?0x1:0x0)|0x0,_0x25d442[0x3]=_0x25d442[0x3]+0x4d34d34d+(_0x25d442[0x2]>>>0x0<_0xe5c4a9[0x2]>>>0x0?0x1:0x0)|0x0,_0x25d442[0x4]=_0x25d442[0x4]+0xd34d34d3+(_0x25d442[0x3]>>>0x0<_0xe5c4a9[0x3]>>>0x0?0x1:0x0)|0x0,_0x25d442[0x5]=_0x25d442[0x5]+0x34d34d34+(_0x25d442[0x4]>>>0x0<_0xe5c4a9[0x4]>>>0x0?0x1:0x0)|0x0,_0x25d442[0x6]=_0x25d442[0x6]+0x4d34d34d+(_0x25d442[0x5]>>>0x0<_0xe5c4a9[0x5]>>>0x0?0x1:0x0)|0x0,_0x25d442[0x7]=_0x25d442[0x7]+0xd34d34d3+(_0x25d442[0x6]>>>0x0<_0xe5c4a9[0x6]>>>0x0?0x1:0x0)|0x0,this['_b']=_0x25d442[0x7]>>>0x0<_0xe5c4a9[0x7]>>>0x0?0x1:0x0;for(var _0xd33555=0x0;_0xd33555<0x8;_0xd33555++){var _0x340437=_0x4af820[_0xd33555]+_0x25d442[_0xd33555],_0x6b402f=_0x340437&0xffff,_0x2a2282=_0x340437>>>0x10,_0x42b062=((_0x6b402f*_0x6b402f>>>0x11)+_0x6b402f*_0x2a2282>>>0xf)+_0x2a2282*_0x2a2282,_0x43ee28=((_0x340437&0xffff0000)*_0x340437|0x0)+((_0x340437&0xffff)*_0x340437|0x0);_0x4314f0[_0xd33555]=_0x42b062^_0x43ee28;}_0x4af820[0x0]=_0x4314f0[0x0]+(_0x4314f0[0x7]<<0x10|_0x4314f0[0x7]>>>0x10)+(_0x4314f0[0x6]<<0x10|_0x4314f0[0x6]>>>0x10)|0x0,_0x4af820[0x1]=_0x4314f0[0x1]+(_0x4314f0[0x0]<<0x8|_0x4314f0[0x0]>>>0x18)+_0x4314f0[0x7]|0x0,_0x4af820[0x2]=_0x4314f0[0x2]+(_0x4314f0[0x1]<<0x10|_0x4314f0[0x1]>>>0x10)+(_0x4314f0[0x0]<<0x10|_0x4314f0[0x0]>>>0x10)|0x0,_0x4af820[0x3]=_0x4314f0[0x3]+(_0x4314f0[0x2]<<0x8|_0x4314f0[0x2]>>>0x18)+_0x4314f0[0x1]|0x0,_0x4af820[0x4]=_0x4314f0[0x4]+(_0x4314f0[0x3]<<0x10|_0x4314f0[0x3]>>>0x10)+(_0x4314f0[0x2]<<0x10|_0x4314f0[0x2]>>>0x10)|0x0,_0x4af820[0x5]=_0x4314f0[0x5]+(_0x4314f0[0x4]<<0x8|_0x4314f0[0x4]>>>0x18)+_0x4314f0[0x3]|0x0,_0x4af820[0x6]=_0x4314f0[0x6]+(_0x4314f0[0x5]<<0x10|_0x4314f0[0x5]>>>0x10)+(_0x4314f0[0x4]<<0x10|_0x4314f0[0x4]>>>0x10)|0x0,_0x4af820[0x7]=_0x4314f0[0x7]+(_0x4314f0[0x6]<<0x8|_0x4314f0[0x6]>>>0x18)+_0x4314f0[0x5]|0x0;}_0x2d3902[_0x1880ef(0x175)]=_0x2f008b['_createHelper'](_0x25879b);}()),_0x1a086a[_0x4069d8(0x175)];}));}),_0x45fea0=_0x2d851e((_0x10cf85,_0x279e30)=>{(function(_0x4d555f,_0x40d441,_0x2e8987){const _0x231403=_0xf114;typeof _0x10cf85=='object'?_0x279e30['exports']=_0x10cf85=_0x40d441(_0x2b1809(),_0x3043ab(),_0x93aced(),_0xf907bf(),_0x1b437e()):typeof define==_0x231403(0x9e7)&&define[_0x231403(0xfe)]?define([_0x231403(0x7d0),'./enc-base64',_0x231403(0x479),'./evpkdf','./cipher-core'],_0x40d441):_0x40d441(_0x4d555f[_0x231403(0x626)]);}(_0x10cf85,function(_0x53741d){const _0x2ec9b3=_0xf114;return(function(){const _0x10d059=_0xf114;var _0xcb4c1=_0x53741d,_0x58d103=_0xcb4c1[_0x10d059(0x6e8)],_0x5ad26e=_0x58d103['StreamCipher'],_0x3f480e=_0xcb4c1['algo'],_0xf4785e=[],_0x512bb8=[],_0x5c2add=[],_0x598e01=_0x3f480e[_0x10d059(0x69a)]=_0x5ad26e[_0x10d059(0x8cd)]({'_doReset':function(){const _0x27d55f=_0x10d059;var _0x1be098=this[_0x27d55f(0x7b9)][_0x27d55f(0x2d4)],_0x2d41c7=this[_0x27d55f(0x2ef)]['iv'],_0x5f398e=this['_X']=[_0x1be098[0x0],_0x1be098[0x3]<<0x10|_0x1be098[0x2]>>>0x10,_0x1be098[0x1],_0x1be098[0x0]<<0x10|_0x1be098[0x3]>>>0x10,_0x1be098[0x2],_0x1be098[0x1]<<0x10|_0x1be098[0x0]>>>0x10,_0x1be098[0x3],_0x1be098[0x2]<<0x10|_0x1be098[0x1]>>>0x10],_0x2a8114=this['_C']=[_0x1be098[0x2]<<0x10|_0x1be098[0x2]>>>0x10,_0x1be098[0x0]&0xffff0000|_0x1be098[0x1]&0xffff,_0x1be098[0x3]<<0x10|_0x1be098[0x3]>>>0x10,_0x1be098[0x1]&0xffff0000|_0x1be098[0x2]&0xffff,_0x1be098[0x0]<<0x10|_0x1be098[0x0]>>>0x10,_0x1be098[0x2]&0xffff0000|_0x1be098[0x3]&0xffff,_0x1be098[0x1]<<0x10|_0x1be098[0x1]>>>0x10,_0x1be098[0x3]&0xffff0000|_0x1be098[0x0]&0xffff];this['_b']=0x0;for(var _0x13b332=0x0;_0x13b332<0x4;_0x13b332++)_0x14534c[_0x27d55f(0x7a4)](this);for(var _0x13b332=0x0;_0x13b332<0x8;_0x13b332++)_0x2a8114[_0x13b332]^=_0x5f398e[_0x13b332+0x4&0x7];if(_0x2d41c7){var _0x53f70e=_0x2d41c7['words'],_0x4a1003=_0x53f70e[0x0],_0x558df2=_0x53f70e[0x1],_0x1b46c1=(_0x4a1003<<0x8|_0x4a1003>>>0x18)&0xff00ff|(_0x4a1003<<0x18|_0x4a1003>>>0x8)&0xff00ff00,_0x5a8b87=(_0x558df2<<0x8|_0x558df2>>>0x18)&0xff00ff|(_0x558df2<<0x18|_0x558df2>>>0x8)&0xff00ff00,_0x12fa0b=_0x1b46c1>>>0x10|_0x5a8b87&0xffff0000,_0x22c06f=_0x5a8b87<<0x10|_0x1b46c1&0xffff;_0x2a8114[0x0]^=_0x1b46c1,_0x2a8114[0x1]^=_0x12fa0b,_0x2a8114[0x2]^=_0x5a8b87,_0x2a8114[0x3]^=_0x22c06f,_0x2a8114[0x4]^=_0x1b46c1,_0x2a8114[0x5]^=_0x12fa0b,_0x2a8114[0x6]^=_0x5a8b87,_0x2a8114[0x7]^=_0x22c06f;for(var _0x13b332=0x0;_0x13b332<0x4;_0x13b332++)_0x14534c[_0x27d55f(0x7a4)](this);}},'_doProcessBlock':function(_0xd60a54,_0x437db3){const _0x2c3a66=_0x10d059;var _0x413d60=this['_X'];_0x14534c[_0x2c3a66(0x7a4)](this),_0xf4785e[0x0]=_0x413d60[0x0]^_0x413d60[0x5]>>>0x10^_0x413d60[0x3]<<0x10,_0xf4785e[0x1]=_0x413d60[0x2]^_0x413d60[0x7]>>>0x10^_0x413d60[0x5]<<0x10,_0xf4785e[0x2]=_0x413d60[0x4]^_0x413d60[0x1]>>>0x10^_0x413d60[0x7]<<0x10,_0xf4785e[0x3]=_0x413d60[0x6]^_0x413d60[0x3]>>>0x10^_0x413d60[0x1]<<0x10;for(var _0x5dbd12=0x0;_0x5dbd12<0x4;_0x5dbd12++)_0xf4785e[_0x5dbd12]=(_0xf4785e[_0x5dbd12]<<0x8|_0xf4785e[_0x5dbd12]>>>0x18)&0xff00ff|(_0xf4785e[_0x5dbd12]<<0x18|_0xf4785e[_0x5dbd12]>>>0x8)&0xff00ff00,_0xd60a54[_0x437db3+_0x5dbd12]^=_0xf4785e[_0x5dbd12];},'blockSize':0x80/0x20,'ivSize':0x40/0x20});function _0x14534c(){for(var _0x2a978b=this['_X'],_0x3bc1ca=this['_C'],_0x5094e9=0x0;_0x5094e9<0x8;_0x5094e9++)_0x512bb8[_0x5094e9]=_0x3bc1ca[_0x5094e9];_0x3bc1ca[0x0]=_0x3bc1ca[0x0]+0x4d34d34d+this['_b']|0x0,_0x3bc1ca[0x1]=_0x3bc1ca[0x1]+0xd34d34d3+(_0x3bc1ca[0x0]>>>0x0<_0x512bb8[0x0]>>>0x0?0x1:0x0)|0x0,_0x3bc1ca[0x2]=_0x3bc1ca[0x2]+0x34d34d34+(_0x3bc1ca[0x1]>>>0x0<_0x512bb8[0x1]>>>0x0?0x1:0x0)|0x0,_0x3bc1ca[0x3]=_0x3bc1ca[0x3]+0x4d34d34d+(_0x3bc1ca[0x2]>>>0x0<_0x512bb8[0x2]>>>0x0?0x1:0x0)|0x0,_0x3bc1ca[0x4]=_0x3bc1ca[0x4]+0xd34d34d3+(_0x3bc1ca[0x3]>>>0x0<_0x512bb8[0x3]>>>0x0?0x1:0x0)|0x0,_0x3bc1ca[0x5]=_0x3bc1ca[0x5]+0x34d34d34+(_0x3bc1ca[0x4]>>>0x0<_0x512bb8[0x4]>>>0x0?0x1:0x0)|0x0,_0x3bc1ca[0x6]=_0x3bc1ca[0x6]+0x4d34d34d+(_0x3bc1ca[0x5]>>>0x0<_0x512bb8[0x5]>>>0x0?0x1:0x0)|0x0,_0x3bc1ca[0x7]=_0x3bc1ca[0x7]+0xd34d34d3+(_0x3bc1ca[0x6]>>>0x0<_0x512bb8[0x6]>>>0x0?0x1:0x0)|0x0,this['_b']=_0x3bc1ca[0x7]>>>0x0<_0x512bb8[0x7]>>>0x0?0x1:0x0;for(var _0x5094e9=0x0;_0x5094e9<0x8;_0x5094e9++){var _0x557c1d=_0x2a978b[_0x5094e9]+_0x3bc1ca[_0x5094e9],_0x4d0981=_0x557c1d&0xffff,_0x2d0784=_0x557c1d>>>0x10,_0x36fc62=((_0x4d0981*_0x4d0981>>>0x11)+_0x4d0981*_0x2d0784>>>0xf)+_0x2d0784*_0x2d0784,_0x39ed5b=((_0x557c1d&0xffff0000)*_0x557c1d|0x0)+((_0x557c1d&0xffff)*_0x557c1d|0x0);_0x5c2add[_0x5094e9]=_0x36fc62^_0x39ed5b;}_0x2a978b[0x0]=_0x5c2add[0x0]+(_0x5c2add[0x7]<<0x10|_0x5c2add[0x7]>>>0x10)+(_0x5c2add[0x6]<<0x10|_0x5c2add[0x6]>>>0x10)|0x0,_0x2a978b[0x1]=_0x5c2add[0x1]+(_0x5c2add[0x0]<<0x8|_0x5c2add[0x0]>>>0x18)+_0x5c2add[0x7]|0x0,_0x2a978b[0x2]=_0x5c2add[0x2]+(_0x5c2add[0x1]<<0x10|_0x5c2add[0x1]>>>0x10)+(_0x5c2add[0x0]<<0x10|_0x5c2add[0x0]>>>0x10)|0x0,_0x2a978b[0x3]=_0x5c2add[0x3]+(_0x5c2add[0x2]<<0x8|_0x5c2add[0x2]>>>0x18)+_0x5c2add[0x1]|0x0,_0x2a978b[0x4]=_0x5c2add[0x4]+(_0x5c2add[0x3]<<0x10|_0x5c2add[0x3]>>>0x10)+(_0x5c2add[0x2]<<0x10|_0x5c2add[0x2]>>>0x10)|0x0,_0x2a978b[0x5]=_0x5c2add[0x5]+(_0x5c2add[0x4]<<0x8|_0x5c2add[0x4]>>>0x18)+_0x5c2add[0x3]|0x0,_0x2a978b[0x6]=_0x5c2add[0x6]+(_0x5c2add[0x5]<<0x10|_0x5c2add[0x5]>>>0x10)+(_0x5c2add[0x4]<<0x10|_0x5c2add[0x4]>>>0x10)|0x0,_0x2a978b[0x7]=_0x5c2add[0x7]+(_0x5c2add[0x6]<<0x8|_0x5c2add[0x6]>>>0x18)+_0x5c2add[0x5]|0x0;}_0xcb4c1['RabbitLegacy']=_0x5ad26e[_0x10d059(0x58a)](_0x598e01);}()),_0x53741d[_0x2ec9b3(0x69a)];}));}),_0x553f99=_0x2d851e((_0x499e9c,_0x46511c)=>{(function(_0x25ac71,_0x2a5cfe,_0x2e70f2){const _0x23870e=_0xf114;typeof _0x499e9c==_0x23870e(0xa3c)?_0x46511c['exports']=_0x499e9c=_0x2a5cfe(_0x2b1809(),_0x3043ab(),_0x93aced(),_0xf907bf(),_0x1b437e()):typeof define=='function'&&define[_0x23870e(0xfe)]?define([_0x23870e(0x7d0),_0x23870e(0x7c8),'./md5',_0x23870e(0x2a0),_0x23870e(0x723)],_0x2a5cfe):_0x2a5cfe(_0x25ac71[_0x23870e(0x626)]);}(_0x499e9c,function(_0x2963f3){return(function(){const _0xe2ef=_0xf114;var _0x12b17=_0x2963f3,_0x5de69b=_0x12b17['lib'],_0x355aa5=_0x5de69b[_0xe2ef(0x30e)],_0x29444b=_0x12b17[_0xe2ef(0x94b)];let _0x89e6f4=0x10,_0x892727=[0x243f6a88,0x85a308d3,0x13198a2e,0x3707344,0xa4093822,0x299f31d0,0x82efa98,0xec4e6c89,0x452821e6,0x38d01377,0xbe5466cf,0x34e90c6c,0xc0ac29b7,0xc97c50dd,0x3f84d5b5,0xb5470917,0x9216d5d9,0x8979fb1b],_0x154223=[[0xd1310ba6,0x98dfb5ac,0x2ffd72db,0xd01adfb7,0xb8e1afed,0x6a267e96,0xba7c9045,0xf12c7f99,0x24a19947,0xb3916cf7,0x801f2e2,0x858efc16,0x636920d8,0x71574e69,0xa458fea3,0xf4933d7e,0xd95748f,0x728eb658,0x718bcd58,0x82154aee,0x7b54a41d,0xc25a59b5,0x9c30d539,0x2af26013,0xc5d1b023,0x286085f0,0xca417918,0xb8db38ef,0x8e79dcb0,0x603a180e,0x6c9e0e8b,0xb01e8a3e,0xd71577c1,0xbd314b27,0x78af2fda,0x55605c60,0xe65525f3,0xaa55ab94,0x57489862,0x63e81440,0x55ca396a,0x2aab10b6,0xb4cc5c34,0x1141e8ce,0xa15486af,0x7c72e993,0xb3ee1411,0x636fbc2a,0x2ba9c55d,0x741831f6,0xce5c3e16,0x9b87931e,0xafd6ba33,0x6c24cf5c,0x7a325381,0x28958677,0x3b8f4898,0x6b4bb9af,0xc4bfe81b,0x66282193,0x61d809cc,0xfb21a991,0x487cac60,0x5dec8032,0xef845d5d,0xe98575b1,0xdc262302,0xeb651b88,0x23893e81,0xd396acc5,0xf6d6ff3,0x83f44239,0x2e0b4482,0xa4842004,0x69c8f04a,0x9e1f9b5e,0x21c66842,0xf6e96c9a,0x670c9c61,0xabd388f0,0x6a51a0d2,0xd8542f68,0x960fa728,0xab5133a3,0x6eef0b6c,0x137a3be4,0xba3bf050,0x7efb2a98,0xa1f1651d,0x39af0176,0x66ca593e,0x82430e88,0x8cee8619,0x456f9fb4,0x7d84a5c3,0x3b8b5ebe,0xe06f75d8,0x85c12073,0x401a449f,0x56c16aa6,0x4ed3aa62,0x363f7706,0x1bfedf72,0x429b023d,0x37d0d724,0xd00a1248,0xdb0fead3,0x49f1c09b,0x75372c9,0x80991b7b,0x25d479d8,0xf6e8def7,0xe3fe501a,0xb6794c3b,0x976ce0bd,0x4c006ba,0xc1a94fb6,0x409f60c4,0x5e5c9ec2,0x196a2463,0x68fb6faf,0x3e6c53b5,0x1339b2eb,0x3b52ec6f,0x6dfc511f,0x9b30952c,0xcc814544,0xaf5ebd09,0xbee3d004,0xde334afd,0x660f2807,0x192e4bb3,0xc0cba857,0x45c8740f,0xd20b5f39,0xb9d3fbdb,0x5579c0bd,0x1a60320a,0xd6a100c6,0x402c7279,0x679f25fe,0xfb1fa3cc,0x8ea5e9f8,0xdb3222f8,0x3c7516df,0xfd616b15,0x2f501ec8,0xad0552ab,0x323db5fa,0xfd238760,0x53317b48,0x3e00df82,0x9e5c57bb,0xca6f8ca0,0x1a87562e,0xdf1769db,0xd542a8f6,0x287effc3,0xac6732c6,0x8c4f5573,0x695b27b0,0xbbca58c8,0xe1ffa35d,0xb8f011a0,0x10fa3d98,0xfd2183b8,0x4afcb56c,0x2dd1d35b,0x9a53e479,0xb6f84565,0xd28e49bc,0x4bfb9790,0xe1ddf2da,0xa4cb7e33,0x62fb1341,0xcee4c6e8,0xef20cada,0x36774c01,0xd07e9efe,0x2bf11fb4,0x95dbda4d,0xae909198,0xeaad8e71,0x6b93d5a0,0xd08ed1d0,0xafc725e0,0x8e3c5b2f,0x8e7594b7,0x8ff6e2fb,0xf2122b64,0x8888b812,0x900df01c,0x4fad5ea0,0x688fc31c,0xd1cff191,0xb3a8c1ad,0x2f2f2218,0xbe0e1777,0xea752dfe,0x8b021fa1,0xe5a0cc0f,0xb56f74e8,0x18acf3d6,0xce89e299,0xb4a84fe0,0xfd13e0b7,0x7cc43b81,0xd2ada8d9,0x165fa266,0x80957705,0x93cc7314,0x211a1477,0xe6ad2065,0x77b5fa86,0xc75442f5,0xfb9d35cf,0xebcdaf0c,0x7b3e89a0,0xd6411bd3,0xae1e7e49,0x250e2d,0x2071b35e,0x226800bb,0x57b8e0af,0x2464369b,0xf009b91e,0x5563911d,0x59dfa6aa,0x78c14389,0xd95a537f,0x207d5ba2,0x2e5b9c5,0x83260376,0x6295cfa9,0x11c81968,0x4e734a41,0xb3472dca,0x7b14a94a,0x1b510052,0x9a532915,0xd60f573f,0xbc9bc6e4,0x2b60a476,0x81e67400,0x8ba6fb5,0x571be91f,0xf296ec6b,0x2a0dd915,0xb6636521,0xe7b9f9b6,0xff34052e,0xc5855664,0x53b02d5d,0xa99f8fa1,0x8ba4799,0x6e85076a],[0x4b7a70e9,0xb5b32944,0xdb75092e,0xc4192623,0xad6ea6b0,0x49a7df7d,0x9cee60b8,0x8fedb266,0xecaa8c71,0x699a17ff,0x5664526c,0xc2b19ee1,0x193602a5,0x75094c29,0xa0591340,0xe4183a3e,0x3f54989a,0x5b429d65,0x6b8fe4d6,0x99f73fd6,0xa1d29c07,0xefe830f5,0x4d2d38e6,0xf0255dc1,0x4cdd2086,0x8470eb26,0x6382e9c6,0x21ecc5e,0x9686b3f,0x3ebaefc9,0x3c971814,0x6b6a70a1,0x687f3584,0x52a0e286,0xb79c5305,0xaa500737,0x3e07841c,0x7fdeae5c,0x8e7d44ec,0x5716f2b8,0xb03ada37,0xf0500c0d,0xf01c1f04,0x200b3ff,0xae0cf51a,0x3cb574b2,0x25837a58,0xdc0921bd,0xd19113f9,0x7ca92ff6,0x94324773,0x22f54701,0x3ae5e581,0x37c2dadc,0xc8b57634,0x9af3dda7,0xa9446146,0xfd0030e,0xecc8c73e,0xa4751e41,0xe238cd99,0x3bea0e2f,0x3280bba1,0x183eb331,0x4e548b38,0x4f6db908,0x6f420d03,0xf60a04bf,0x2cb81290,0x24977c79,0x5679b072,0xbcaf89af,0xde9a771f,0xd9930810,0xb38bae12,0xdccf3f2e,0x5512721f,0x2e6b7124,0x501adde6,0x9f84cd87,0x7a584718,0x7408da17,0xbc9f9abc,0xe94b7d8c,0xec7aec3a,0xdb851dfa,0x63094366,0xc464c3d2,0xef1c1847,0x3215d908,0xdd433b37,0x24c2ba16,0x12a14d43,0x2a65c451,0x50940002,0x133ae4dd,0x71dff89e,0x10314e55,0x81ac77d6,0x5f11199b,0x43556f1,0xd7a3c76b,0x3c11183b,0x5924a509,0xf28fe6ed,0x97f1fbfa,0x9ebabf2c,0x1e153c6e,0x86e34570,0xeae96fb1,0x860e5e0a,0x5a3e2ab3,0x771fe71c,0x4e3d06fa,0x2965dcb9,0x99e71d0f,0x803e89d6,0x5266c825,0x2e4cc978,0x9c10b36a,0xc6150eba,0x94e2ea78,0xa5fc3c53,0x1e0a2df4,0xf2f74ea7,0x361d2b3d,0x1939260f,0x19c27960,0x5223a708,0xf71312b6,0xebadfe6e,0xeac31f66,0xe3bc4595,0xa67bc883,0xb17f37d1,0x18cff28,0xc332ddef,0xbe6c5aa5,0x65582185,0x68ab9802,0xeecea50f,0xdb2f953b,0x2aef7dad,0x5b6e2f84,0x1521b628,0x29076170,0xecdd4775,0x619f1510,0x13cca830,0xeb61bd96,0x334fe1e,0xaa0363cf,0xb5735c90,0x4c70a239,0xd59e9e0b,0xcbaade14,0xeecc86bc,0x60622ca7,0x9cab5cab,0xb2f3846e,0x648b1eaf,0x19bdf0ca,0xa02369b9,0x655abb50,0x40685a32,0x3c2ab4b3,0x319ee9d5,0xc021b8f7,0x9b540b19,0x875fa099,0x95f7997e,0x623d7da8,0xf837889a,0x97e32d77,0x11ed935f,0x16681281,0xe358829,0xc7e61fd6,0x96dedfa1,0x7858ba99,0x57f584a5,0x1b227263,0x9b83c3ff,0x1ac24696,0xcdb30aeb,0x532e3054,0x8fd948e4,0x6dbc3128,0x58ebf2ef,0x34c6ffea,0xfe28ed61,0xee7c3c73,0x5d4a14d9,0xe864b7e3,0x42105d14,0x203e13e0,0x45eee2b6,0xa3aaabea,0xdb6c4f15,0xfacb4fd0,0xc742f442,0xef6abbb5,0x654f3b1d,0x41cd2105,0xd81e799e,0x86854dc7,0xe44b476a,0x3d816250,0xcf62a1f2,0x5b8d2646,0xfc8883a0,0xc1c7b6a3,0x7f1524c3,0x69cb7492,0x47848a0b,0x5692b285,0x95bbf00,0xad19489d,0x1462b174,0x23820e00,0x58428d2a,0xc55f5ea,0x1dadf43e,0x233f7061,0x3372f092,0x8d937e41,0xd65fecf1,0x6c223bdb,0x7cde3759,0xcbee7460,0x4085f2a7,0xce77326e,0xa6078084,0x19f8509e,0xe8efd855,0x61d99735,0xa969a7aa,0xc50c06c2,0x5a04abfc,0x800bcadc,0x9e447a2e,0xc3453484,0xfdd56705,0xe1e9ec9,0xdb73dbd3,0x105588cd,0x675fda79,0xe3674340,0xc5c43465,0x713e38d8,0x3d28f89e,0xf16dff20,0x153e21e7,0x8fb03d4a,0xe6e39f2b,0xdb83adf7],[0xe93d5a68,0x948140f7,0xf64c261c,0x94692934,0x411520f7,0x7602d4f7,0xbcf46b2e,0xd4a20068,0xd4082471,0x3320f46a,0x43b7d4b7,0x500061af,0x1e39f62e,0x97244546,0x14214f74,0xbf8b8840,0x4d95fc1d,0x96b591af,0x70f4ddd3,0x66a02f45,0xbfbc09ec,0x3bd9785,0x7fac6dd0,0x31cb8504,0x96eb27b3,0x55fd3941,0xda2547e6,0xabca0a9a,0x28507825,0x530429f4,0xa2c86da,0xe9b66dfb,0x68dc1462,0xd7486900,0x680ec0a4,0x27a18dee,0x4f3ffea2,0xe887ad8c,0xb58ce006,0x7af4d6b6,0xaace1e7c,0xd3375fec,0xce78a399,0x406b2a42,0x20fe9e35,0xd9f385b9,0xee39d7ab,0x3b124e8b,0x1dc9faf7,0x4b6d1856,0x26a36631,0xeae397b2,0x3a6efa74,0xdd5b4332,0x6841e7f7,0xca7820fb,0xfb0af54e,0xd8feb397,0x454056ac,0xba489527,0x55533a3a,0x20838d87,0xfe6ba9b7,0xd096954b,0x55a867bc,0xa1159a58,0xcca92963,0x99e1db33,0xa62a4a56,0x3f3125f9,0x5ef47e1c,0x9029317c,0xfdf8e802,0x4272f70,0x80bb155c,0x5282ce3,0x95c11548,0xe4c66d22,0x48c1133f,0xc70f86dc,0x7f9c9ee,0x41041f0f,0x404779a4,0x5d886e17,0x325f51eb,0xd59bc0d1,0xf2bcc18f,0x41113564,0x257b7834,0x602a9c60,0xdff8e8a3,0x1f636c1b,0xe12b4c2,0x2e1329e,0xaf664fd1,0xcad18115,0x6b2395e0,0x333e92e1,0x3b240b62,0xeebeb922,0x85b2a20e,0xe6ba0d99,0xde720c8c,0x2da2f728,0xd0127845,0x95b794fd,0x647d0862,0xe7ccf5f0,0x5449a36f,0x877d48fa,0xc39dfd27,0xf33e8d1e,0xa476341,0x992eff74,0x3a6f6eab,0xf4f8fd37,0xa812dc60,0xa1ebddf8,0x991be14c,0xdb6e6b0d,0xc67b5510,0x6d672c37,0x2765d43b,0xdcd0e804,0xf1290dc7,0xcc00ffa3,0xb5390f92,0x690fed0b,0x667b9ffb,0xcedb7d9c,0xa091cf0b,0xd9155ea3,0xbb132f88,0x515bad24,0x7b9479bf,0x763bd6eb,0x37392eb3,0xcc115979,0x8026e297,0xf42e312d,0x6842ada7,0xc66a2b3b,0x12754ccc,0x782ef11c,0x6a124237,0xb79251e7,0x6a1bbe6,0x4bfb6350,0x1a6b1018,0x11caedfa,0x3d25bdd8,0xe2e1c3c9,0x44421659,0xa121386,0xd90cec6e,0xd5abea2a,0x64af674e,0xda86a85f,0xbebfe988,0x64e4c3fe,0x9dbc8057,0xf0f7c086,0x60787bf8,0x6003604d,0xd1fd8346,0xf6381fb0,0x7745ae04,0xd736fccc,0x83426b33,0xf01eab71,0xb0804187,0x3c005e5f,0x77a057be,0xbde8ae24,0x55464299,0xbf582e61,0x4e58f48f,0xf2ddfda2,0xf474ef38,0x8789bdc2,0x5366f9c3,0xc8b38e74,0xb475f255,0x46fcd9b9,0x7aeb2661,0x8b1ddf84,0x846a0e79,0x915f95e2,0x466e598e,0x20b45770,0x8cd55591,0xc902de4c,0xb90bace1,0xbb8205d0,0x11a86248,0x7574a99e,0xb77f19b6,0xe0a9dc09,0x662d09a1,0xc4324633,0xe85a1f02,0x9f0be8c,0x4a99a025,0x1d6efe10,0x1ab93d1d,0xba5a4df,0xa186f20f,0x2868f169,0xdcb7da83,0x573906fe,0xa1e2ce9b,0x4fcd7f52,0x50115e01,0xa70683fa,0xa002b5c4,0xde6d027,0x9af88c27,0x773f8641,0xc3604c06,0x61a806b5,0xf0177a28,0xc0f586e0,0x6058aa,0x30dc7d62,0x11e69ed7,0x2338ea63,0x53c2dd94,0xc2c21634,0xbbcbee56,0x90bcb6de,0xebfc7da1,0xce591d76,0x6f05e409,0x4b7c0188,0x39720a3d,0x7c927c24,0x86e3725f,0x724d9db9,0x1ac15bb4,0xd39eb8fc,0xed545578,0x8fca5b5,0xd83d7cd3,0x4dad0fc4,0x1e50ef5e,0xb161e6f8,0xa28514d9,0x6c51133c,0x6fd5c7e7,0x56e14ec4,0x362abfce,0xddc6c837,0xd79a3234,0x92638212,0x670efa8e,0x406000e0],[0x3a39ce37,0xd3faf5cf,0xabc27737,0x5ac52d1b,0x5cb0679e,0x4fa33742,0xd3822740,0x99bc9bbe,0xd5118e9d,0xbf0f7315,0xd62d1c7e,0xc700c47b,0xb78c1b6b,0x21a19045,0xb26eb1be,0x6a366eb4,0x5748ab2f,0xbc946e79,0xc6a376d2,0x6549c2c8,0x530ff8ee,0x468dde7d,0xd5730a1d,0x4cd04dc6,0x2939bbdb,0xa9ba4650,0xac9526e8,0xbe5ee304,0xa1fad5f0,0x6a2d519a,0x63ef8ce2,0x9a86ee22,0xc089c2b8,0x43242ef6,0xa51e03aa,0x9cf2d0a4,0x83c061ba,0x9be96a4d,0x8fe51550,0xba645bd6,0x2826a2f9,0xa73a3ae1,0x4ba99586,0xef5562e9,0xc72fefd3,0xf752f7da,0x3f046f69,0x77fa0a59,0x80e4a915,0x87b08601,0x9b09e6ad,0x3b3ee593,0xe990fd5a,0x9e34d797,0x2cf0b7d9,0x22b8b51,0x96d5ac3a,0x17da67d,0xd1cf3ed6,0x7c7d2d28,0x1f9f25cf,0xadf2b89b,0x5ad6b472,0x5a88f54c,0xe029ac71,0xe019a5e6,0x47b0acfd,0xed93fa9b,0xe8d3c48d,0x283b57cc,0xf8d56629,0x79132e28,0x785f0191,0xed756055,0xf7960e44,0xe3d35e8c,0x15056dd4,0x88f46dba,0x3a16125,0x564f0bd,0xc3eb9e15,0x3c9057a2,0x97271aec,0xa93a072a,0x1b3f6d9b,0x1e6321f5,0xf59c66fb,0x26dcf319,0x7533d928,0xb155fdf5,0x3563482,0x8aba3cbb,0x28517711,0xc20ad9f8,0xabcc5167,0xccad925f,0x4de81751,0x3830dc8e,0x379d5862,0x9320f991,0xea7a90c2,0xfb3e7bce,0x5121ce64,0x774fbe32,0xa8b6e37e,0xc3293d46,0x48de5369,0x6413e680,0xa2ae0810,0xdd6db224,0x69852dfd,0x9072166,0xb39a460a,0x6445c0dd,0x586cdecf,0x1c20c8ae,0x5bbef7dd,0x1b588d40,0xccd2017f,0x6bb4e3bb,0xdda26a7e,0x3a59ff45,0x3e350a44,0xbcb4cdd5,0x72eacea8,0xfa6484bb,0x8d6612ae,0xbf3c6f47,0xd29be463,0x542f5d9e,0xaec2771b,0xf64e6370,0x740e0d8d,0xe75b1357,0xf8721671,0xaf537d5d,0x4040cb08,0x4eb4e2cc,0x34d2466a,0x115af84,0xe1b00428,0x95983a1d,0x6b89fb4,0xce6ea048,0x6f3f3b82,0x3520ab82,0x11a1d4b,0x277227f8,0x611560b1,0xe7933fdc,0xbb3a792b,0x344525bd,0xa08839e1,0x51ce794b,0x2f32c9b7,0xa01fbac9,0xe01cc87e,0xbcc7d1f6,0xcf0111c3,0xa1e8aac7,0x1a908749,0xd44fbd9a,0xd0dadecb,0xd50ada38,0x339c32a,0xc6913667,0x8df9317c,0xe0b12b4f,0xf79e59b7,0x43f5bb3a,0xf2d519ff,0x27d9459c,0xbf97222c,0x15e6fc2a,0xf91fc71,0x9b941525,0xfae59361,0xceb69ceb,0xc2a86459,0x12baa8d1,0xb6c1075e,0xe3056a0c,0x10d25065,0xcb03a442,0xe0ec6e0e,0x1698db3b,0x4c98a0be,0x3278e964,0x9f1f9532,0xe0d392df,0xd3a0342b,0x8971f21e,0x1b0a7441,0x4ba3348c,0xc5be7120,0xc37632d8,0xdf359f8d,0x9b992f2e,0xe60b6f47,0xfe3f11d,0xe54cda54,0x1edad891,0xce6279cf,0xcd3e7e6f,0x1618b166,0xfd2c1d05,0x848fd2c5,0xf6fb2299,0xf523f357,0xa6327623,0x93a83531,0x56cccd02,0xacf08162,0x5a75ebb5,0x6e163697,0x88d273cc,0xde966292,0x81b949d0,0x4c50901b,0x71c65614,0xe6c6c7bd,0x327a140a,0x45e1d006,0xc3f27b9a,0xc9aa53fd,0x62a80f00,0xbb25bfe2,0x35bdd2f6,0x71126905,0xb2040222,0xb6cbcf7c,0xcd769c2b,0x53113ec0,0x1640e3d3,0x38abbd60,0x2547adf0,0xba38209c,0xf746ce76,0x77afa1c5,0x20756060,0x85cbfe4e,0x8ae88dd8,0x7aaaf9b0,0x4cf9aa7e,0x1948c25c,0x2fb8a8c,0x1c36ae4,0xd6ebe1f9,0x90d4f869,0xa65cdea0,0x3f09252d,0xc208e69f,0xb74e6132,0xce77e25b,0x578fdfe3,0x3ac372e6]];var _0x1a3161={'pbox':[],'sbox':[]};function _0x132311(_0x39d66b,_0x4ef888){const _0x14b8d1=_0xe2ef;let _0x50149c=_0x4ef888>>0x18&0xff,_0x26588c=_0x4ef888>>0x10&0xff,_0x243581=_0x4ef888>>0x8&0xff,_0x38fe46=_0x4ef888&0xff,_0x2951c4=_0x39d66b[_0x14b8d1(0x591)][0x0][_0x50149c]+_0x39d66b[_0x14b8d1(0x591)][0x1][_0x26588c];return _0x2951c4=_0x2951c4^_0x39d66b[_0x14b8d1(0x591)][0x2][_0x243581],_0x2951c4=_0x2951c4+_0x39d66b[_0x14b8d1(0x591)][0x3][_0x38fe46],_0x2951c4;}function _0x3535c2(_0xf5d8f5,_0x4a1ead,_0x116347){const _0x3b2d57=_0xe2ef;let _0x5454df=_0x4a1ead,_0x17ea9d=_0x116347,_0x485ffb;for(let _0x2982b3=0x0;_0x2982b3<_0x89e6f4;++_0x2982b3)_0x5454df=_0x5454df^_0xf5d8f5[_0x3b2d57(0x337)][_0x2982b3],_0x17ea9d=_0x132311(_0xf5d8f5,_0x5454df)^_0x17ea9d,_0x485ffb=_0x5454df,_0x5454df=_0x17ea9d,_0x17ea9d=_0x485ffb;return _0x485ffb=_0x5454df,_0x5454df=_0x17ea9d,_0x17ea9d=_0x485ffb,_0x17ea9d=_0x17ea9d^_0xf5d8f5[_0x3b2d57(0x337)][_0x89e6f4],_0x5454df=_0x5454df^_0xf5d8f5[_0x3b2d57(0x337)][_0x89e6f4+0x1],{'left':_0x5454df,'right':_0x17ea9d};}function _0x43a17c(_0x48f582,_0x4c6eb8,_0x58653a){const _0x34cba8=_0xe2ef;let _0x39bfa1=_0x4c6eb8,_0x511c48=_0x58653a,_0x15ccca;for(let _0x1da928=_0x89e6f4+0x1;_0x1da928>0x1;--_0x1da928)_0x39bfa1=_0x39bfa1^_0x48f582['pbox'][_0x1da928],_0x511c48=_0x132311(_0x48f582,_0x39bfa1)^_0x511c48,_0x15ccca=_0x39bfa1,_0x39bfa1=_0x511c48,_0x511c48=_0x15ccca;return _0x15ccca=_0x39bfa1,_0x39bfa1=_0x511c48,_0x511c48=_0x15ccca,_0x511c48=_0x511c48^_0x48f582[_0x34cba8(0x337)][0x1],_0x39bfa1=_0x39bfa1^_0x48f582[_0x34cba8(0x337)][0x0],{'left':_0x39bfa1,'right':_0x511c48};}function _0x3e8ce1(_0x4f364a,_0x333287,_0x64a1e0){const _0x55e7c4=_0xe2ef;for(let _0x2a34a4=0x0;_0x2a34a4<0x4;_0x2a34a4++){_0x4f364a[_0x55e7c4(0x591)][_0x2a34a4]=[];for(let _0x4c69da=0x0;_0x4c69da<0x100;_0x4c69da++)_0x4f364a[_0x55e7c4(0x591)][_0x2a34a4][_0x4c69da]=_0x154223[_0x2a34a4][_0x4c69da];}let _0x3de165=0x0;for(let _0x9acdd1=0x0;_0x9acdd1<_0x89e6f4+0x2;_0x9acdd1++)_0x4f364a[_0x55e7c4(0x337)][_0x9acdd1]=_0x892727[_0x9acdd1]^_0x333287[_0x3de165],_0x3de165++,_0x3de165>=_0x64a1e0&&(_0x3de165=0x0);let _0x111d67=0x0,_0x39939c=0x0,_0x4ebc31=0x0;for(let _0x2c7b1f=0x0;_0x2c7b1f<_0x89e6f4+0x2;_0x2c7b1f+=0x2)_0x4ebc31=_0x3535c2(_0x4f364a,_0x111d67,_0x39939c),_0x111d67=_0x4ebc31[_0x55e7c4(0x910)],_0x39939c=_0x4ebc31[_0x55e7c4(0x828)],_0x4f364a[_0x55e7c4(0x337)][_0x2c7b1f]=_0x111d67,_0x4f364a[_0x55e7c4(0x337)][_0x2c7b1f+0x1]=_0x39939c;for(let _0x1a39ab=0x0;_0x1a39ab<0x4;_0x1a39ab++)for(let _0x1e7b09=0x0;_0x1e7b09<0x100;_0x1e7b09+=0x2)_0x4ebc31=_0x3535c2(_0x4f364a,_0x111d67,_0x39939c),_0x111d67=_0x4ebc31[_0x55e7c4(0x910)],_0x39939c=_0x4ebc31[_0x55e7c4(0x828)],_0x4f364a[_0x55e7c4(0x591)][_0x1a39ab][_0x1e7b09]=_0x111d67,_0x4f364a['sbox'][_0x1a39ab][_0x1e7b09+0x1]=_0x39939c;return!0x0;}var _0x28a871=_0x29444b[_0xe2ef(0x83c)]=_0x355aa5[_0xe2ef(0x8cd)]({'_doReset':function(){const _0x5bf6e5=_0xe2ef;if(this[_0x5bf6e5(0xa51)]!==this[_0x5bf6e5(0x7b9)]){var _0x4e9574=this[_0x5bf6e5(0xa51)]=this['_key'],_0x3f0adc=_0x4e9574[_0x5bf6e5(0x2d4)],_0x50fe2e=_0x4e9574[_0x5bf6e5(0xa17)]/0x4;_0x3e8ce1(_0x1a3161,_0x3f0adc,_0x50fe2e);}},'encryptBlock':function(_0x4bbae8,_0x3ee692){const _0x4a00a1=_0xe2ef;var _0x37ea32=_0x3535c2(_0x1a3161,_0x4bbae8[_0x3ee692],_0x4bbae8[_0x3ee692+0x1]);_0x4bbae8[_0x3ee692]=_0x37ea32[_0x4a00a1(0x910)],_0x4bbae8[_0x3ee692+0x1]=_0x37ea32[_0x4a00a1(0x828)];},'decryptBlock':function(_0x20f315,_0x1040b9){const _0x35142b=_0xe2ef;var _0x5aa087=_0x43a17c(_0x1a3161,_0x20f315[_0x1040b9],_0x20f315[_0x1040b9+0x1]);_0x20f315[_0x1040b9]=_0x5aa087[_0x35142b(0x910)],_0x20f315[_0x1040b9+0x1]=_0x5aa087[_0x35142b(0x828)];},'blockSize':0x40/0x20,'keySize':0x80/0x20,'ivSize':0x40/0x20});_0x12b17['Blowfish']=_0x355aa5['_createHelper'](_0x28a871);}()),_0x2963f3['Blowfish'];}));}),_0x1626e8=_0x2d851e((_0x40112b,_0x5f0222)=>{(function(_0x1a19b3,_0x4efb19,_0x1ddf96){const _0x5e8e9a=_0xf114;typeof _0x40112b=='object'?_0x5f0222['exports']=_0x40112b=_0x4efb19(_0x2b1809(),_0x2f0e66(),_0x15edfc(),_0x242431(),_0x3043ab(),_0x21650e(),_0x93aced(),_0x4b8031(),_0x4f46ff(),_0x354a2b(),_0xf4b641(),_0x5f1b66(),_0x5bda7d(),_0x28f317(),_0x356886(),_0xd6f3e6(),_0xf907bf(),_0x1b437e(),_0x53499e(),_0x75e388(),_0x288784(),_0x175352(),_0x1d6fba(),_0x5e55ba(),_0x55548d(),_0x5f338a(),_0x2f7f56(),_0x379a7b(),_0x58a73e(),_0x2447eb(),_0x2bcc95(),_0x3782fb(),_0x449137(),_0x45fea0(),_0x553f99()):typeof define=='function'&&define['amd']?define([_0x5e8e9a(0x7d0),'./x64-core',_0x5e8e9a(0x82b),_0x5e8e9a(0x3bc),'./enc-base64',_0x5e8e9a(0x3e9),_0x5e8e9a(0x479),'./sha1',_0x5e8e9a(0x231),'./sha224','./sha512','./sha384',_0x5e8e9a(0xaa5),_0x5e8e9a(0x4d0),_0x5e8e9a(0x1f8),_0x5e8e9a(0x46a),_0x5e8e9a(0x2a0),_0x5e8e9a(0x723),'./mode-cfb',_0x5e8e9a(0x2aa),_0x5e8e9a(0x781),_0x5e8e9a(0x7f9),'./mode-ecb','./pad-ansix923','./pad-iso10126',_0x5e8e9a(0x39f),'./pad-zeropadding','./pad-nopadding','./format-hex',_0x5e8e9a(0x78c),_0x5e8e9a(0x415),_0x5e8e9a(0x390),'./rabbit',_0x5e8e9a(0x708),_0x5e8e9a(0xee)],_0x4efb19):_0x1a19b3[_0x5e8e9a(0x626)]=_0x4efb19(_0x1a19b3[_0x5e8e9a(0x626)]);}(_0x40112b,function(_0x54aa9a){return _0x54aa9a;}));}),_0x5b5116=_0x2d851e((_0x54d904,_0x5bd7d3)=>{const _0xaa1aa6=_0x43bf95;_0x5bd7d3[_0xaa1aa6(0x6ce)]=DC_Common;}),_0x1b64d5={};_0x16ce9f(_0x1b64d5,{'Analysis':()=>_0x16dcf1,'AnalysisType':()=>_0x140f34,'AnimationType':()=>_0x28f6c8,'AroundPoint':()=>_0x18efab,'AroundView':()=>_0x4e9754,'AttackArrow':()=>_0x22d820,'Billboard':()=>_0x25d4a3,'BillboardPrimitive':()=>_0x27a280,'BounceBillboardPrimitive':()=>_0x5b654e,'BounceLabelPrimitive':()=>_0x32da49,'Box':()=>_0x2d1076,'CallbackProperty':()=>_0x23a193,'CameraVideo':()=>_0x1065ff,'CameraVideoLayer':()=>_0x1224ec,'Cartesian2':()=>_0x1ae9e2,'Cartesian3':()=>_0x427355,'ChartLayer':()=>_0x2f8e82,'Circle':()=>_0x2614b6,'CircleBlurMaterialProperty':()=>_0x285282,'CircleDiffuseMaterialProperty':()=>_0x263473,'CircleFadeMaterialProperty':()=>_0x3a7331,'CirclePulseMaterialProperty':()=>_0x438d13,'CircleScan':()=>_0x4af2be,'CircleScanMaterialProperty':()=>_0xc43f06,'CircleSpiralMaterialProperty':()=>_0x34954f,'CircleVaryMaterialProperty':()=>_0x3a7c80,'CircleWaveMaterialProperty':()=>_0x21a60b,'ClassificationType':()=>_0x5d26ca,'ClippingDirection':()=>_0x2ad0cd,'ClippingPlane':()=>_0x2253ba,'ClippingPlaneCollection':()=>_0x18529e,'ClippingPolygon':()=>_0x467bce,'ClippingPolygonCollection':()=>_0x17f9c1,'CloudPrimitive':()=>_0x2baad7,'ClusterLayer':()=>_0x1967a7,'Color':()=>_0x530035,'ColorMaterialProperty':()=>_0x12d142,'CoordTransform':()=>_0x3dccda,'Corridor':()=>_0x382272,'CustomBillboard':()=>_0xb0aeb0,'CustomGeographicTilingScheme':()=>_0x5b4e2a,'CustomLabel':()=>_0x583d41,'CustomMercatorTilingScheme':()=>_0x236817,'CustomShader':()=>_0xe8a9cd,'CustomShaderMode':()=>_0x3ad815,'CustomShaderTranslucencyMode':()=>_0x21b29f,'Cylinder':()=>_0x54bda2,'CzmlLayer':()=>_0x53d123,'DiffuseWallPrimitive':()=>_0x12cebb,'DivIcon':()=>_0x33ba45,'DomUtil':()=>_0x5b03f8,'DoubleArrow':()=>_0xa72d62,'DynamicBillboard':()=>_0x3e958a,'DynamicLayer':()=>_0x1b565f,'DynamicModel':()=>_0xaba7bb,'Effect':()=>_0x2aca32,'ElecEllipsoidPrimitive':()=>_0x58e525,'Ellipse':()=>_0x3ffde7,'Ellipsoid':()=>_0x4dd5ef,'EllipsoidElectricMaterialProperty':()=>_0x2c6202,'EllipsoidTrailMaterialProperty':()=>_0x579b4e,'FeatureGridLayer':()=>_0x5a6ce5,'FineArrow':()=>_0x3d1b87,'FlowLinePrimitive':()=>_0xa80619,'Flying':()=>_0x4337a5,'GatheringPlace':()=>_0x5e3739,'GeoJsonLayer':()=>_0x26f29e,'GeoTools':()=>_0x5ecfaf,'GeographicTilingScheme':()=>_0x188c9e,'GlobeClipping':()=>_0x5a8bc2,'GlobeRotate':()=>_0x375f82,'GpxLayer':()=>_0x2a4898,'GraticuleLayer':()=>_0x519f92,'GroundPrimitiveLayer':()=>_0x2abcff,'GroundSkyBox':()=>_0x4b798d,'HeatMapLayer':()=>_0x4b34d6,'HeightReference':()=>_0x36bb50,'HorizontalOrigin':()=>_0x520f06,'HtmlLayer':()=>_0x323d13,'I3S':()=>_0x2b81dc,'I3SLayer':()=>_0xbd2483,'ImageMaterialProperty':()=>_0x41e9b5,'ImageryLayerFactory':()=>_0x50f811,'ImageryType':()=>_0x234967,'JulianDate':()=>_0x1cedf9,'KeyboardRoaming':()=>_0x46d845,'KmlLayer':()=>_0x3d98c2,'Label':()=>_0x2e18ac,'LabelLayer':()=>_0x5309d5,'LabelPrimitive':()=>_0x167283,'Layer':()=>_0x49dd70,'LayerGroup':()=>_0x538cdb,'LayerType':()=>_0x250406,'LightCylinderPrimitive':()=>_0x466bc3,'Material':()=>_0x2f22a4,'Math':()=>_0x596257,'Matrix3':()=>_0x4ff012,'Matrix4':()=>_0x4f2af2,'Measure':()=>_0x3bbc6d,'MeasureType':()=>_0x3d2045,'Model':()=>_0x8e8b2c,'ModelAnimationLoop':()=>_0x3e29eb,'ModelEventType':()=>_0x4ca43f,'ModelManager':()=>_0xe5a7e4,'ModelPrimitive':()=>_0x25a30f,'MouseEventType':()=>_0x5b424c,'MouseMode':()=>_0x5e3ffa,'Overlay':()=>_0x4f8204,'OverlayType':()=>_0x10d75a,'P':()=>_0x16f48b,'Parse':()=>_0x16f48b,'Plane':()=>_0x36d7e9,'PlaneVideo':()=>_0x5d88cb,'PlaneVideoLayer':()=>_0xabd273,'Plot':()=>_0xaa461c,'Point':()=>_0xa05a30,'PointPrimitive':()=>_0x144488,'Polygon':()=>_0x291d2b,'Polyline':()=>_0x210775,'PolylineArrowMaterialProperty':()=>_0x16b1c0,'PolylineDashMaterialProperty':()=>_0x88bc9,'PolylineFlickerMaterialProperty':()=>_0x3617d3,'PolylineFlowMaterialProperty':()=>_0x475c96,'PolylineGlowMaterialProperty':()=>_0x4ebbbc,'PolylineImageTrailMaterialProperty':()=>_0x5a0f20,'PolylineLightingMaterialProperty':()=>_0xd34b80,'PolylineLightingTrailMaterialProperty':()=>_0x466f8c,'PolylineOutlineMaterialProperty':()=>_0xc51353,'PolylinePrimitive':()=>_0x50c2d1,'PolylineTrailMaterialProperty':()=>_0x1be278,'PolylineVolume':()=>_0x7b2f17,'Position':()=>_0x2d88b3,'PositionEditor':()=>_0x3a8530,'PositionEditorType':()=>_0x138d4a,'PrimitiveLayer':()=>_0x2f36a3,'RadarLineMaterialProperty':()=>_0x126a85,'RadarScan':()=>_0x15616a,'RadarSweepMaterialProperty':()=>_0x44b681,'RadarWaveMaterialProperty':()=>_0x4f2b75,'RasterTileLayer':()=>_0xc43515,'Rect':()=>_0x3415b7,'Rectangle':()=>_0xb39b2,'Resource':()=>_0x253ec3,'RoamingController':()=>_0x3fb8d8,'RoamingPath':()=>_0xe0379a,'ScanCirclePrimitive':()=>_0x47678c,'SceneEventType':()=>_0x3f9fee,'SceneMode':()=>_0x2f0b0a,'ShadowMode':()=>_0x37eb6e,'SkyBox':()=>_0x1e2554,'Sphere':()=>_0x573bda,'T':()=>_0x5e5f93,'TailedAttackArrow':()=>_0x2c4845,'TerrainClipping':()=>_0x11153e,'TerrainFactory':()=>_0x40fc9b,'TerrainType':()=>_0x1dc0f5,'TileSetEventType':()=>_0x695e8e,'Tileset':()=>_0x1ab2c8,'TilesetClipping':()=>_0x485bc0,'TilesetLayer':()=>_0x1ab616,'TilesetStyle':()=>_0x4457a5,'Track':()=>_0x3a847a,'TrackController':()=>_0x3edf5b,'TrackViewMode':()=>_0x47c824,'TrailLinePrimitive':()=>_0x3dbbac,'Transform':()=>_0x5e5f93,'UniformType':()=>_0x723cd1,'Util':()=>_0x3f7522,'VERSION':()=>_0x55b01a,'VectorLayer':()=>_0x6343d4,'VerticalOrigin':()=>_0x4bd78b,'VideoPrimitive':()=>_0x291145,'Viewer':()=>_0x2e7414,'Wall':()=>_0x2fc0fb,'WallImageTrailMaterialProperty':()=>_0x331bba,'WallLineTrailMaterialProperty':()=>_0x1d3b64,'WallTrailMaterialProperty':()=>_0x29a900,'WaterMaterialProperty':()=>_0x303e6e,'WaterPrimitive':()=>_0x8b9297,'Weather':()=>_0x178d49,'WindLayer':()=>_0x543b02,'config':()=>_0x427ca0,'createElevationBandMaterial':()=>_0x42fdc5,'createGooglePhotorealistic3DTileset':()=>_0x2b07ac,'ebMercatorTilingScheme':()=>_0x17a670,'getLib':()=>_0x2c4b9b,'ready':()=>_0x146b8b,'registerLib':()=>_0x5ae98d,'writeTextToCanvas':()=>_0x1d7c24});var _0x28b398={};function _0x5ae98d(_0x3168cc,_0x48b33b){_0x28b398[_0x3168cc]=_0x48b33b;}function _0x2c4b9b(_0x3eb06a){return _0x28b398[_0x3eb06a];}var _0x2831c2={};function _0x4f6200(_0x1988b4,_0x4d8736){_0x2831c2[_0x1988b4]=_0x4d8736;}function _0x5c9d04(_0x57388a){return _0x2831c2[_0x57388a];}var _0xf8fd60=_0x399686(_0x1626e8(),0x1),_0x48a220=_0x43bf95(0x383);function _0x114382(_0x274d34){const _0x50f4cf=_0x43bf95;let _0x350d4d;if(!_0x274d34)return _0x350d4d;let _0x3457c3=_0xf8fd60[_0x50f4cf(0x7eb)][_0x50f4cf(0x1c6)][_0x50f4cf(0x1ae)](_0x274d34,_0x48a220,{'mode':_0xf8fd60[_0x50f4cf(0x7eb)][_0x50f4cf(0x6f7)][_0x50f4cf(0x67f)],'padding':_0xf8fd60[_0x50f4cf(0x7eb)]['pad']['Pkcs7']});if(_0x3457c3)try{_0x350d4d=JSON[_0x50f4cf(0xce)](_0x3457c3[_0x50f4cf(0x8fa)](_0xf8fd60['default'][_0x50f4cf(0x961)][_0x50f4cf(0x490)]));}catch{_0x350d4d=void 0x0;}return _0x350d4d;}function _0x501d11(_0x57ff93){const _0x5dbfc1=_0x43bf95;if(!_0x57ff93)return!0x1;let _0x205494=_0x114382(_0x57ff93);if(_0x205494){let _0x5e5f17=(_0x205494[_0x5dbfc1(0x34d)]||'')[_0x5dbfc1(0x4f3)](';');return _0x5e5f17['length']>0x2?!0x1:_0x5e5f17[_0x5dbfc1(0x8e3)](document[_0x5dbfc1(0x34d)])>=0x0;}return!0x1;}var _0x43ec29={},_0x250406=_0x43ec29,_0x34d1e5=_0x399686(_0x5b5116(),0x1);_0x5ae98d(_0x43bf95(0x7aa),_0x34d1e5[_0x43bf95(0x7aa)]),_0x5ae98d(_0x43bf95(0x61d),_0x34d1e5[_0x43bf95(0x61d)]);var _0x147eef=new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0xa43))](),_0xe5581d=class{static[_0x43bf95(0x30b)](_0x475dcf){const _0x1751ef=_0x43bf95;if(_0x475dcf){let _0x353fd6=_0x34d1e5['Cesium']['Ellipsoid'][_0x1751ef(0x423)][_0x1751ef(0x8e5)](_0x475dcf);return new _0x2d88b3(_0x34d1e5[_0x1751ef(0x7aa)][_0x1751ef(0x72b)]['toDegrees']((_0x353fd6==null?void 0x0:_0x353fd6[_0x1751ef(0xc9)])||0x0),_0x34d1e5[_0x1751ef(0x7aa)][_0x1751ef(0x72b)][_0x1751ef(0x438)]((_0x353fd6==null?void 0x0:_0x353fd6['latitude'])||0x0),_0x353fd6[_0x1751ef(0x795)]||0x0);}return new _0x2d88b3(0x0,0x0);}static[_0x43bf95(0x7de)](_0x43ef53){const _0x32a306=_0x43bf95;return _0x43ef53?new _0x2d88b3(_0x34d1e5[_0x32a306(0x7aa)][_0x32a306(0x72b)][_0x32a306(0x438)]((_0x43ef53==null?void 0x0:_0x43ef53[_0x32a306(0xc9)])||0x0),_0x34d1e5['Cesium'][_0x32a306(0x72b)][_0x32a306(0x438)]((_0x43ef53==null?void 0x0:_0x43ef53['latitude'])||0x0),_0x43ef53['height']||0x0):new _0x2d88b3(0x0,0x0);}static[_0x43bf95(0x432)](_0x10cab3){const _0x3e63ac=_0x43bf95;return _0x10cab3?_0x34d1e5['Cesium'][_0x3e63ac(0x982)]['fromDegrees'](_0x10cab3[_0x3e63ac(0x598)],_0x10cab3[_0x3e63ac(0x941)],_0x10cab3[_0x3e63ac(0xa84)],_0x34d1e5[_0x3e63ac(0x7aa)][_0x3e63ac(0x7a1)][_0x3e63ac(0x423)]):_0x34d1e5[_0x3e63ac(0x7aa)]['Cartesian3'][_0x3e63ac(0x3d4)];}static[_0x43bf95(0x41f)](_0x2ca6b1){const _0x6ead30=_0x43bf95;return _0x2ca6b1?_0x34d1e5[_0x6ead30(0x7aa)][_0x6ead30(0x4f1)][_0x6ead30(0x81e)](_0x2ca6b1['lng'],_0x2ca6b1[_0x6ead30(0x941)],_0x2ca6b1['alt']):_0x34d1e5[_0x6ead30(0x7aa)][_0x6ead30(0x4f1)]['ZERO'];}static[_0x43bf95(0x625)](_0x35b53e){return _0x35b53e?_0x35b53e['map'](_0x2524f2=>this['transformCartesianToWGS84'](_0x2524f2)):[];}static[_0x43bf95(0x999)](_0x13c4ff){const _0x2c400a=_0x43bf95;return _0x13c4ff?_0x13c4ff[_0x2c400a(0x127)](_0x4086fd=>this[_0x2c400a(0x432)](_0x4086fd)):[];}static[_0x43bf95(0xa95)](_0x4b3001){const _0x524799=_0x43bf95;let _0x459894=_0x147eef[_0x524799(0x4bb)](_0x34d1e5[_0x524799(0x7aa)][_0x524799(0x4f1)]['fromDegrees'](_0x4b3001[_0x524799(0x598)],_0x4b3001['lat'],_0x4b3001[_0x524799(0xa84)]));return new _0x2d88b3(_0x459894['x'],_0x459894['y'],_0x459894['z']);}static[_0x43bf95(0x7a9)](_0x54b5b3){const _0x41f3c2=_0x43bf95;let _0x445bd7=_0x147eef[_0x41f3c2(0x955)](new _0x34d1e5[(_0x41f3c2(0x7aa))][(_0x41f3c2(0x982))](_0x54b5b3[_0x41f3c2(0x598)],_0x54b5b3[_0x41f3c2(0x941)],_0x54b5b3[_0x41f3c2(0xa84)]));return new _0x2d88b3(_0x34d1e5[_0x41f3c2(0x7aa)][_0x41f3c2(0x72b)][_0x41f3c2(0x438)](_0x445bd7['longitude']),_0x34d1e5['Cesium'][_0x41f3c2(0x72b)][_0x41f3c2(0x438)](_0x445bd7['latitude']),_0x445bd7[_0x41f3c2(0x795)]);}static[_0x43bf95(0x364)](_0xd23e96,_0x578166){const _0x41d4e0=_0x43bf95;let _0x5f047c=_0x578166[_0x41d4e0(0x148)],_0x4d844e;if(_0x5f047c[_0x41d4e0(0x6f7)]===_0x34d1e5['Cesium'][_0x41d4e0(0xba)]['SCENE3D']){let _0x3993b0=_0x5f047c[_0x41d4e0(0x698)][_0x41d4e0(0xa3)](_0xd23e96);_0x4d844e=_0x5f047c[_0x41d4e0(0x7fd)][_0x41d4e0(0x112)](_0x3993b0,_0x5f047c);}else _0x4d844e=_0x5f047c[_0x41d4e0(0x698)][_0x41d4e0(0xa9d)](_0xd23e96,_0x34d1e5[_0x41d4e0(0x7aa)][_0x41d4e0(0x7a1)][_0x41d4e0(0x423)]);return this['transformCartesianToWGS84'](_0x4d844e);}static['transformWGS84ToWindow'](_0x2b3d3c,_0x2835d5){const _0x5cda78=_0x43bf95;let _0x35b9f5=_0x2835d5[_0x5cda78(0x148)];return _0x34d1e5[_0x5cda78(0x7aa)][_0x5cda78(0x549)]['worldToWindowCoordinates'](_0x35b9f5,this['transformWGS84ToCartesian'](_0x2b3d3c));}},_0x5e5f93=_0xe5581d,_0x5c0a03=52.35987755982988,_0x534605=3.141592653589793,_0x59b417=0x615305,_0x15eece=0.006693421622965943,_0x1d6a11=class{static[_0x43bf95(0xab)](_0x1e3a4b,_0x575aeb){const _0x3731d3=_0x43bf95;let _0x3a8de1=+_0x1e3a4b-0.0065,_0x3871fe=+_0x575aeb-0.006,_0x124d3a=Math['sqrt'](_0x3a8de1*_0x3a8de1+_0x3871fe*_0x3871fe)-0.00002*Math[_0x3731d3(0xb8)](_0x3871fe*_0x5c0a03),_0x7b6295=Math[_0x3731d3(0x667)](_0x3871fe,_0x3a8de1)-0.000003*Math[_0x3731d3(0x728)](_0x3a8de1*_0x5c0a03),_0x234f06=_0x124d3a*Math[_0x3731d3(0x728)](_0x7b6295),_0x8101e0=_0x124d3a*Math[_0x3731d3(0xb8)](_0x7b6295);return[_0x234f06,_0x8101e0];}static[_0x43bf95(0x1a1)](_0xda4fb5,_0x326771){const _0x410da8=_0x43bf95;_0x326771=+_0x326771,_0xda4fb5=+_0xda4fb5;let _0x186d7a=Math['sqrt'](_0xda4fb5*_0xda4fb5+_0x326771*_0x326771)+0.00002*Math[_0x410da8(0xb8)](_0x326771*_0x5c0a03),_0x101785=Math[_0x410da8(0x667)](_0x326771,_0xda4fb5)+0.000003*Math[_0x410da8(0x728)](_0xda4fb5*_0x5c0a03),_0x11453a=_0x186d7a*Math[_0x410da8(0x728)](_0x101785)+0.0065,_0xd1b903=_0x186d7a*Math[_0x410da8(0xb8)](_0x101785)+0.006;return[_0x11453a,_0xd1b903];}static[_0x43bf95(0x12c)](_0x2e32c5,_0x4290f2){if(_0x4290f2=+_0x4290f2,_0x2e32c5=+_0x2e32c5,this['out_of_china'](_0x2e32c5,_0x4290f2))return[_0x2e32c5,_0x4290f2];{let _0x4e2a95=this['delta'](_0x2e32c5,_0x4290f2);return[_0x2e32c5+_0x4e2a95[0x0],_0x4290f2+_0x4e2a95[0x1]];}}static[_0x43bf95(0x273)](_0x532686,_0x727c3a){const _0x5791ad=_0x43bf95;if(_0x727c3a=+_0x727c3a,_0x532686=+_0x532686,this[_0x5791ad(0x157)](_0x532686,_0x727c3a))return[_0x532686,_0x727c3a];{let _0x279268=[_0x532686,_0x727c3a],_0x2bd200=this['WGS84ToGCJ02'](_0x532686,_0x727c3a),_0x30d9fa=_0x2bd200[0x0]-_0x532686,_0x2b9351=_0x2bd200[0x1]-_0x727c3a;do _0x2bd200=this[_0x5791ad(0x12c)](_0x279268[0x0]-=_0x30d9fa,_0x279268[0x1]-=_0x2b9351),_0x30d9fa=_0x2bd200[0x0]-_0x532686,_0x2b9351=_0x2bd200[0x1]-_0x727c3a;while(Math['abs'](_0x30d9fa)>1e-7||Math[_0x5791ad(0x133)](_0x2b9351)>1e-7);return _0x279268;}}static['delta'](_0x912950,_0x39b106){const _0x580814=_0x43bf95;let _0xcc2f84=this[_0x580814(0x146)](_0x912950-0x69,_0x39b106-0x23),_0x37a84f=this['transformLat'](_0x912950-0x69,_0x39b106-0x23),_0x274567=_0x39b106/0xb4*_0x534605,_0x53a514=Math['sin'](_0x274567);_0x53a514=0x1-_0x15eece*_0x53a514*_0x53a514;let _0x5d6ca1=Math[_0x580814(0x8d5)](_0x53a514);return _0xcc2f84=_0xcc2f84*0xb4/(_0x59b417/_0x5d6ca1*Math['cos'](_0x274567)*_0x534605),_0x37a84f=_0x37a84f*0xb4/(_0x59b417*(0x1-_0x15eece)/(_0x53a514*_0x5d6ca1)*_0x534605),[_0xcc2f84,_0x37a84f];}static['transformLng'](_0xdb7cfc,_0x1fdb9d){const _0x18639c=_0x43bf95;_0x1fdb9d=+_0x1fdb9d,_0xdb7cfc=+_0xdb7cfc;let _0x5cddf7=0x12c+_0xdb7cfc+0x2*_0x1fdb9d+0.1*_0xdb7cfc*_0xdb7cfc+0.1*_0xdb7cfc*_0x1fdb9d+0.1*Math[_0x18639c(0x8d5)](Math['abs'](_0xdb7cfc));return _0x5cddf7+=(0x14*Math['sin'](0x6*_0xdb7cfc*_0x534605)+0x14*Math[_0x18639c(0xb8)](0x2*_0xdb7cfc*_0x534605))*0x2/0x3,_0x5cddf7+=(0x14*Math['sin'](_0xdb7cfc*_0x534605)+0x28*Math[_0x18639c(0xb8)](_0xdb7cfc/0x3*_0x534605))*0x2/0x3,_0x5cddf7+=(0x96*Math[_0x18639c(0xb8)](_0xdb7cfc/0xc*_0x534605)+0x12c*Math[_0x18639c(0xb8)](_0xdb7cfc/0x1e*_0x534605))*0x2/0x3,_0x5cddf7;}static[_0x43bf95(0x239)](_0x2fbef4,_0x44451c){const _0x396818=_0x43bf95;_0x44451c=+_0x44451c,_0x2fbef4=+_0x2fbef4;let _0x3330bc=-0x64+0x2*_0x2fbef4+0x3*_0x44451c+0.2*_0x44451c*_0x44451c+0.1*_0x2fbef4*_0x44451c+0.2*Math['sqrt'](Math['abs'](_0x2fbef4));return _0x3330bc+=(0x14*Math[_0x396818(0xb8)](0x6*_0x2fbef4*_0x534605)+0x14*Math[_0x396818(0xb8)](0x2*_0x2fbef4*_0x534605))*0x2/0x3,_0x3330bc+=(0x14*Math[_0x396818(0xb8)](_0x44451c*_0x534605)+0x28*Math[_0x396818(0xb8)](_0x44451c/0x3*_0x534605))*0x2/0x3,_0x3330bc+=(0xa0*Math[_0x396818(0xb8)](_0x44451c/0xc*_0x534605)+0x140*Math[_0x396818(0xb8)](_0x44451c*_0x534605/0x1e))*0x2/0x3,_0x3330bc;}static[_0x43bf95(0x157)](_0xf185bf,_0x227f70){return _0x227f70=+_0x227f70,_0xf185bf=+_0xf185bf,!(_0xf185bf>73.66&&_0xf185bf<135.05&&_0x227f70>3.86&&_0x227f70<53.55);}},_0x3dccda=_0x1d6a11,_0x824aa3=class _0x12a7b0{constructor(_0x17e6cd,_0x506a14,_0x4d41d4,_0x407cf2,_0x20d7d7,_0x2ed066){const _0x57d4fa=_0x43bf95;this[_0x57d4fa(0x212)]=+_0x17e6cd||0x0,this[_0x57d4fa(0x952)]=+_0x506a14||0x0,this['_alt']=+_0x4d41d4||0x0,this[_0x57d4fa(0x656)]=+_0x407cf2||0x0,this[_0x57d4fa(0x593)]=+_0x20d7d7||0x0,this[_0x57d4fa(0x6ff)]=+_0x2ed066||0x0;}set['lng'](_0x223de9){const _0xec05bc=_0x43bf95;this[_0xec05bc(0x212)]=+_0x223de9;}get['lng'](){const _0x4929f0=_0x43bf95;return this[_0x4929f0(0x212)];}set[_0x43bf95(0x941)](_0x5f3bdb){const _0x675711=_0x43bf95;this[_0x675711(0x952)]=+_0x5f3bdb;}get[_0x43bf95(0x941)](){return this['_lat'];}set[_0x43bf95(0xa84)](_0x27f9c7){const _0x18a36b=_0x43bf95;this[_0x18a36b(0x5a0)]=+_0x27f9c7;}get[_0x43bf95(0xa84)](){return this['_alt'];}set[_0x43bf95(0x77c)](_0x88a08e){const _0x30882c=_0x43bf95;this[_0x30882c(0x656)]=+_0x88a08e;}get[_0x43bf95(0x77c)](){return this['_heading'];}set[_0x43bf95(0x442)](_0x3089a1){const _0x37af9e=_0x43bf95;this[_0x37af9e(0x593)]=+_0x3089a1;}get[_0x43bf95(0x442)](){const _0x203acb=_0x43bf95;return this[_0x203acb(0x593)];}set[_0x43bf95(0x193)](_0x1958a5){const _0x386c12=_0x43bf95;this[_0x386c12(0x6ff)]=+_0x1958a5;}get[_0x43bf95(0x193)](){const _0x571778=_0x43bf95;return this[_0x571778(0x6ff)];}[_0x43bf95(0xf4)](){const _0x28e85e=_0x43bf95;let _0x455beb=new _0x12a7b0(this[_0x28e85e(0x212)],this[_0x28e85e(0x952)],this[_0x28e85e(0x5a0)],this['_heading'],this[_0x28e85e(0x593)],this[_0x28e85e(0x6ff)]);return JSON[_0x28e85e(0x8b2)](_0x455beb);}[_0x43bf95(0x7f4)](_0x33c353){const _0x2b1d75=_0x43bf95;return!_0x33c353||!(_0x33c353 instanceof _0x12a7b0)?0x0:_0x34d1e5[_0x2b1d75(0x7aa)][_0x2b1d75(0x982)][_0x2b1d75(0x7f4)](_0x5e5f93['transformWGS84ToCartesian'](this),_0x5e5f93[_0x2b1d75(0x432)](_0x33c353));}['clone'](){const _0x5f3f64=_0x43bf95;let _0x9e63f8=new _0x12a7b0();return _0x9e63f8[_0x5f3f64(0x598)]=this[_0x5f3f64(0x598)]||0x0,_0x9e63f8['lat']=this[_0x5f3f64(0x941)]||0x0,_0x9e63f8['alt']=this[_0x5f3f64(0xa84)]||0x0,_0x9e63f8[_0x5f3f64(0x77c)]=this['heading']||0x0,_0x9e63f8['pitch']=this[_0x5f3f64(0x442)]||0x0,_0x9e63f8['roll']=this[_0x5f3f64(0x193)]||0x0,_0x9e63f8;}[_0x43bf95(0x8fc)](){return this['clone']();}[_0x43bf95(0x92e)](){const _0x5d2742=_0x43bf95;return[this['lng'],this['lat'],this[_0x5d2742(0xa84)],this['heading'],this[_0x5d2742(0x442)],this['roll']];}['toString'](){const _0x299b1e=_0x43bf95;return this[_0x299b1e(0x598)]+','+this['lat']+','+this[_0x299b1e(0xa84)]+','+this[_0x299b1e(0x77c)]+','+this['pitch']+','+this[_0x299b1e(0x193)];}[_0x43bf95(0x4d6)](){const _0x225de9=_0x43bf95;return{'lng':this[_0x225de9(0x598)],'lat':this['lat'],'alt':this[_0x225de9(0xa84)],'heading':this['heading'],'pitch':this[_0x225de9(0x442)],'roll':this[_0x225de9(0x193)]};}static[_0x43bf95(0x511)](_0x4b3d5b){const _0x14e398=_0x43bf95;let _0x1ee70b=new _0x12a7b0();return Array[_0x14e398(0x636)](_0x4b3d5b)&&(_0x1ee70b[_0x14e398(0x598)]=_0x4b3d5b[0x0]||0x0,_0x1ee70b[_0x14e398(0x941)]=_0x4b3d5b[0x1]||0x0,_0x1ee70b[_0x14e398(0xa84)]=_0x4b3d5b[0x2]||0x0,_0x1ee70b['heading']=_0x4b3d5b[0x3]||0x0,_0x1ee70b['pitch']=_0x4b3d5b[0x4]||0x0,_0x1ee70b[_0x14e398(0x193)]=_0x4b3d5b[0x5]||0x0),_0x1ee70b;}static[_0x43bf95(0x71f)](_0x3c8f9e){const _0x2549af=_0x43bf95;let _0x29653d=new _0x12a7b0();if(_0x3c8f9e&&typeof _0x3c8f9e==_0x2549af(0x55c)){let _0x4c7a5f=_0x3c8f9e['split'](',');_0x29653d=this[_0x2549af(0x511)](_0x4c7a5f);}return _0x29653d;}static[_0x43bf95(0x2c7)](_0x23b6b7){const _0x22c47b=_0x43bf95;return new _0x12a7b0(_0x23b6b7['lng'],_0x23b6b7['lat'],_0x23b6b7['alt'],_0x23b6b7['heading'],_0x23b6b7['pitch'],_0x23b6b7[_0x22c47b(0x193)]);}static[_0x43bf95(0x38d)](_0x47d03f){const _0x532e07=_0x43bf95;let _0x9223aa=new _0x12a7b0(),_0x3a99b8=JSON[_0x532e07(0xce)](_0x47d03f);return _0x3a99b8&&(_0x9223aa[_0x532e07(0x598)]=_0x3a99b8[_0x532e07(0x598)]||0x0,_0x9223aa[_0x532e07(0x941)]=_0x3a99b8[_0x532e07(0x941)]||0x0,_0x9223aa[_0x532e07(0xa84)]=_0x3a99b8[_0x532e07(0xa84)]||0x0,_0x9223aa['heading']=_0x3a99b8[_0x532e07(0x77c)]||0x0,_0x9223aa[_0x532e07(0x442)]=_0x3a99b8[_0x532e07(0x442)]||0x0,_0x9223aa[_0x532e07(0x193)]=_0x3a99b8[_0x532e07(0x193)]||0x0),_0x9223aa;}},_0x2d88b3=_0x824aa3,_0x40ac0a=class{static[_0x43bf95(0x81a)](_0xd7fa34){const _0x3affd1=_0x43bf95;let _0x495d05=new _0x2d88b3();return _0xd7fa34&&(typeof _0xd7fa34=='string'?_0x495d05=_0x2d88b3[_0x3affd1(0x71f)](_0xd7fa34):Array[_0x3affd1(0x636)](_0xd7fa34)?_0x495d05=_0x2d88b3['fromArray'](_0xd7fa34):!(Object(_0xd7fa34)instanceof _0x2d88b3)&&Object(_0xd7fa34)[_0x3affd1(0x373)](_0x3affd1(0x598))&&Object(_0xd7fa34)[_0x3affd1(0x373)](_0x3affd1(0x941))?_0x495d05=_0x2d88b3['fromObject'](_0xd7fa34):Object(_0xd7fa34)instanceof _0x2d88b3?_0x495d05=_0xd7fa34:Object(_0xd7fa34)instanceof _0x34d1e5[_0x3affd1(0x7aa)][_0x3affd1(0x982)]?_0x495d05=_0x5e5f93[_0x3affd1(0x30b)](_0xd7fa34):Object(_0xd7fa34)instanceof _0x34d1e5[_0x3affd1(0x7aa)][_0x3affd1(0x4f1)]&&(_0x495d05=_0x5e5f93[_0x3affd1(0x7de)](_0xd7fa34))),_0x495d05;}static[_0x43bf95(0xa8b)](_0xf47191){const _0xa29863=_0x43bf95;if(typeof _0xf47191==_0xa29863(0x55c)){if(_0xf47191[_0xa29863(0x8e3)]('#')>=0x0)throw new Error('the\x20positions\x20invalid');_0xf47191=_0xf47191[_0xa29863(0x4f3)](';')[_0xa29863(0x738)](_0x53acad=>!!_0x53acad);}return _0xf47191[_0xa29863(0x127)](_0x4bbb56=>this[_0xa29863(0x81a)](_0x4bbb56));}static[_0x43bf95(0x979)](_0x243b86){const _0x1b34d1=_0x43bf95;return _0x243b86=this['parsePosition'](_0x243b86),[_0x243b86[_0x1b34d1(0x598)],_0x243b86['lat']];}static[_0x43bf95(0x951)](_0x57af57){const _0x3349ac=_0x43bf95;let _0x386b29=[];return _0x57af57=this[_0x3349ac(0xa8b)](_0x57af57),_0x57af57[_0x3349ac(0x2de)](_0x35530c=>{const _0x2a126f=_0x3349ac;_0x386b29['push']([_0x35530c[_0x2a126f(0x598)],_0x35530c[_0x2a126f(0x941)]]);}),_0x386b29;}static[_0x43bf95(0x66d)](_0xda4a2c,_0x3fbef3=!0x1){const _0x40d846=_0x43bf95;let _0x42114d=[];return _0xda4a2c=this[_0x40d846(0xa8b)](_0xda4a2c),_0xda4a2c[_0x40d846(0x2de)](_0x362195=>{const _0x3857f9=_0x40d846;_0x42114d[_0x3857f9(0xb3)]([_0x362195[_0x3857f9(0x598)],_0x362195[_0x3857f9(0x941)]]);}),_0x3fbef3&&_0x42114d['length']>0x0&&_0x42114d[_0x40d846(0xb3)](_0x42114d[0x0]),[_0x42114d];}},_0x16f48b=_0x40ac0a,_0x2ea1e5=class{static[_0x43bf95(0x730)](_0x50159c,_0x413acc){const _0x26d805=_0x43bf95;_0x50159c=_0x16f48b[_0x26d805(0x81a)](_0x50159c);let _0x1d7fad=_0x34d1e5['Cesium'][_0x26d805(0x72b)][_0x26d805(0x2b0)](_0x50159c[_0x26d805(0x77c)]),_0x5577bb=_0x34d1e5[_0x26d805(0x7aa)]['Math']['toRadians'](_0x50159c[_0x26d805(0x442)]),_0x596d17=_0x5577bb>=0x0?_0x413acc*Math[_0x26d805(0xb8)](_0x5577bb):-0x1*_0x413acc*Math[_0x26d805(0xb8)](Math[_0x26d805(0x133)](_0x5577bb)),_0x2bf74c=_0x413acc*Math[_0x26d805(0x728)](_0x5577bb),_0x9abeb7,_0x21cc5d;_0x1d7fad<=Math['PI']/0x2?(_0x9abeb7=_0x2bf74c*Math[_0x26d805(0xb8)](_0x1d7fad),_0x21cc5d=_0x2bf74c*Math['cos'](_0x1d7fad)):_0x1d7fad>Math['PI']/0x2&&_0x1d7fad<Math['PI']?(_0x9abeb7=_0x2bf74c*Math['cos'](_0x1d7fad-Math['PI']/0x2),_0x21cc5d=-0x1*_0x2bf74c*Math[_0x26d805(0xb8)](_0x1d7fad-Math['PI']/0x2)):_0x1d7fad>Math['PI']&&_0x1d7fad<Math['PI']*0x3/0x2?(_0x9abeb7=-0x1*_0x2bf74c*Math[_0x26d805(0xb8)](_0x1d7fad-Math['PI']),_0x21cc5d=-0x1*_0x2bf74c*Math['cos'](_0x1d7fad-Math['PI'])):(_0x9abeb7=-0x1*_0x2bf74c*Math[_0x26d805(0xb8)](Math['PI']*0x2-_0x1d7fad),_0x21cc5d=_0x2bf74c*Math[_0x26d805(0x728)](Math['PI']*0x2-_0x1d7fad));let _0x12da30=_0x34d1e5['Cesium'][_0x26d805(0x982)]['fromDegrees'](_0x50159c['lng'],_0x50159c[_0x26d805(0x941)],_0x50159c[_0x26d805(0xa84)]),_0x1abc78=Math[_0x26d805(0xb8)](_0x34d1e5[_0x26d805(0x7aa)][_0x26d805(0x72b)][_0x26d805(0x2b0)](_0x50159c[_0x26d805(0x598)])),_0x5c31cd=Math[_0x26d805(0x728)](_0x34d1e5[_0x26d805(0x7aa)][_0x26d805(0x72b)]['toRadians'](_0x50159c['lng'])),_0x1db3a5=Math[_0x26d805(0xb8)](_0x34d1e5['Cesium'][_0x26d805(0x72b)][_0x26d805(0x2b0)](_0x50159c[_0x26d805(0x941)])),_0x74c15c=Math[_0x26d805(0x728)](_0x34d1e5[_0x26d805(0x7aa)][_0x26d805(0x72b)]['toRadians'](_0x50159c[_0x26d805(0x941)])),_0x133bed=_0x74c15c*_0x596d17-_0x1db3a5*_0x21cc5d,_0xff90e0=_0x5c31cd*_0x133bed-_0x1abc78*_0x9abeb7,_0x47d0f1=_0x1abc78*_0x133bed+_0x5c31cd*_0x9abeb7,_0x46f069=_0x1db3a5*_0x596d17+_0x74c15c*_0x21cc5d;return new _0x34d1e5[(_0x26d805(0x7aa))]['Cartesian3'](_0x12da30['x']+_0xff90e0,_0x12da30['y']+_0x47d0f1,_0x12da30['z']+_0x46f069);}static[_0x43bf95(0x98b)](_0x29261b){const _0x207d25=_0x43bf95;let _0x1878f0=new _0x34d1e5[(_0x207d25(0x7aa))]['Matrix3']();return _0x34d1e5[_0x207d25(0x7aa)][_0x207d25(0x72d)][_0x207d25(0x63a)](_0x1878f0,0x0,_0x34d1e5[_0x207d25(0x7aa)][_0x207d25(0x982)]['negate'](_0x29261b[_0x207d25(0x71d)],new _0x34d1e5[(_0x207d25(0x7aa))][(_0x207d25(0x982))]()),_0x1878f0),_0x34d1e5['Cesium'][_0x207d25(0x72d)][_0x207d25(0x63a)](_0x1878f0,0x1,_0x29261b[_0x207d25(0x448)],_0x1878f0),_0x34d1e5[_0x207d25(0x7aa)][_0x207d25(0x72d)][_0x207d25(0x63a)](_0x1878f0,0x2,_0x29261b[_0x207d25(0x7c9)],_0x1878f0),_0x34d1e5[_0x207d25(0x7aa)][_0x207d25(0x158)]['fromRotationMatrix'](_0x1878f0,new _0x34d1e5[(_0x207d25(0x7aa))][(_0x207d25(0x158))]());}static[_0x43bf95(0xa1e)](_0x5ddf2c,_0x428703,_0x5ace72,_0x1f9536){const _0x33f825=_0x43bf95;_0x5ddf2c[_0x33f825(0x9a7)]=_0x428703,_0x5ddf2c[_0x33f825(0x4ae)]=_0x34d1e5['Cesium'][_0x33f825(0x982)][_0x33f825(0x732)](_0x34d1e5[_0x33f825(0x7aa)][_0x33f825(0x982)][_0x33f825(0xa4)](_0x5ace72,_0x428703,new _0x34d1e5[(_0x33f825(0x7aa))][(_0x33f825(0x982))]()),new _0x34d1e5[(_0x33f825(0x7aa))][(_0x33f825(0x982))]());let _0x393473=new _0x34d1e5[(_0x33f825(0x7aa))]['Matrix3']();_0x34d1e5['Cesium'][_0x33f825(0x72d)]['fromRotationY'](-_0x34d1e5[_0x33f825(0x7aa)]['Math'][_0x33f825(0x2b0)](_0x1f9536)/0x2,_0x393473);let _0x5dc25c=new _0x34d1e5['Cesium']['Cartesian3']();_0x34d1e5[_0x33f825(0x7aa)][_0x33f825(0x72d)][_0x33f825(0xa69)](_0x393473,_0x428703,_0x5dc25c),_0x34d1e5[_0x33f825(0x7aa)][_0x33f825(0x982)][_0x33f825(0x732)](_0x5dc25c,_0x5dc25c),_0x5ddf2c['up']=_0x5dc25c;}},_0x1ea9e9=_0x2ea1e5,_0x53784d=_0x43bf95(0xa28)[_0x43bf95(0x4f3)](''),_0x1870bc=class{static[_0x43bf95(0x3ef)](_0x124047='D'){let _0x56b8b8=[];_0x56b8b8[0x8]=_0x56b8b8[0xd]=_0x56b8b8[0x12]=_0x56b8b8[0x17]='-',_0x56b8b8[0xe]='4';let _0xd80c38;for(let _0x4b8f2b=0x0;_0x4b8f2b<0x24;_0x4b8f2b++)_0x56b8b8[_0x4b8f2b]||(_0xd80c38=0x0|Math['random']()*0x10,_0x56b8b8[_0x4b8f2b]=_0x53784d[_0x4b8f2b===0x13?_0xd80c38&0x3|0x8:_0xd80c38]);return _0x124047+'-'+_0x56b8b8['join']('');}static[_0x43bf95(0x5da)](_0x4dd022,..._0x1bc1c1){let _0x56d786,_0x46b158,_0x47059b,_0x4bdc39;for(_0x46b158=0x0,_0x47059b=_0x1bc1c1['length'];_0x46b158<_0x47059b;_0x46b158++){_0x4bdc39=_0x1bc1c1[_0x46b158];for(_0x56d786 in _0x4bdc39)_0x4dd022[_0x56d786]=_0x4bdc39[_0x56d786];}return _0x4dd022;}static[_0x43bf95(0x412)](_0x5ca265){const _0x2b4106=_0x43bf95;return this[_0x2b4106(0x283)](_0x5ca265)[_0x2b4106(0x4f3)](/\s+/);}static['setOptions'](_0x4077f9,_0x1e7a9e){const _0x1cb704=_0x43bf95;_0x4077f9[_0x1cb704(0x373)](_0x1cb704(0x7e4))||(_0x4077f9[_0x1cb704(0x7e4)]=_0x4077f9['options']?Object['create'](_0x4077f9['options']):{});for(let _0x7755e9 in _0x1e7a9e)_0x4077f9['options'][_0x7755e9]=_0x1e7a9e[_0x7755e9];return _0x4077f9[_0x1cb704(0x7e4)];}static['formatNum'](_0x295a17,_0xd62246){const _0x14da73=_0x43bf95;let _0x55d17e=Math[_0x14da73(0x191)](0xa,_0xd62246===void 0x0?0x6:_0xd62246);return Math[_0x14da73(0x440)](_0x295a17*_0x55d17e)/_0x55d17e;}static['trim'](_0x10f56f){const _0xf7af3=_0x43bf95;return _0x10f56f['trim']?_0x10f56f['trim']():_0x10f56f[_0xf7af3(0x965)](/^\s+|\s+$/g,'');}static['emptyImageUrl'](){return(function(){const _0x2622bc=_0xf114;return _0x2622bc(0x264);}());}static[_0x43bf95(0x266)](_0x737e03){const _0x4578b3=_0x43bf95;return _0x737e03&&_0x737e03['hasOwnProperty'](_0x4578b3(0x212))&&_0x737e03[_0x4578b3(0x373)](_0x4578b3(0x952))&&_0x737e03['hasOwnProperty'](_0x4578b3(0x5a0));}static[_0x43bf95(0x3c0)](_0x3228d7,_0x39e333){let _0x44d401=null;return function(){_0x44d401&&clearTimeout(_0x44d401),_0x44d401=setTimeout(_0x3228d7,_0x39e333);};}static[_0x43bf95(0x581)](_0xe6e390,_0x3653fe){let _0xe31ad8=!0x0;return function(){if(!_0xe31ad8)return!0x1;_0xe31ad8=!0x1,setTimeout(()=>{_0xe6e390(),_0xe31ad8=!0x0;},_0x3653fe);};}static[_0x43bf95(0x631)](_0x2a9116){const _0xfcc64b=_0x43bf95;let _0x2d7872=_0x2a9116[_0xfcc64b(0x4f3)](','),_0x4488bd=_0x2d7872[0x0]['match'](/:(.*?);/)[0x1],_0x35bfc9=atob(_0x2d7872[0x1]),_0x8a905f=_0x35bfc9[_0xfcc64b(0x6a2)],_0x552aee=new Uint8Array(_0x8a905f);for(;_0x8a905f--;)_0x552aee[_0x8a905f]=_0x35bfc9['charCodeAt'](_0x8a905f);return new Blob([_0x552aee],{'type':_0x4488bd});}static['isPromise'](_0x484803){const _0x4c3272=_0x43bf95;return Promise[_0x4c3272(0x509)](_0x484803)==_0x484803;}},_0x3f7522=_0x1870bc,_0xf85aba=class{static[_0x43bf95(0x5ea)](_0x9dcde7){const _0x2bf9e4=_0x43bf95;return typeof _0x9dcde7==_0x2bf9e4(0x55c)?document['getElementById'](_0x9dcde7):_0x9dcde7;}static[_0x43bf95(0x4ab)](_0x204f8f,_0x5a29ba){const _0x544e6e=_0x43bf95;let _0xf09cbd=_0x204f8f['style'][_0x5a29ba]||_0x204f8f['currentStyle']&&_0x204f8f[_0x544e6e(0xe2)][_0x5a29ba];if((!_0xf09cbd||_0xf09cbd===_0x544e6e(0x904))&&document[_0x544e6e(0x329)]){let _0x59dd0f=document['defaultView'][_0x544e6e(0x4a7)](_0x204f8f,null);_0xf09cbd=_0x59dd0f?_0x59dd0f[_0x5a29ba]:null;}return _0xf09cbd===_0x544e6e(0x904)?null:_0xf09cbd;}static['create'](_0x279a8c,_0x40a637,_0x147533=null){const _0x26b8ee=_0x43bf95;let _0x5af63c=document[_0x26b8ee(0x7dc)](_0x279a8c);return _0x5af63c[_0x26b8ee(0x256)]=_0x40a637||'',_0x147533&&_0x147533[_0x26b8ee(0x87b)](_0x5af63c),_0x5af63c;}static['remove'](_0x213a57){const _0x3d4afc=_0x43bf95;let _0x45d420=_0x213a57[_0x3d4afc(0x406)];_0x45d420&&_0x45d420[_0x3d4afc(0x6c5)](_0x213a57);}static[_0x43bf95(0x494)](_0x36b616){const _0x2f568b=_0x43bf95;for(;_0x36b616[_0x2f568b(0x6d7)];)_0x36b616[_0x2f568b(0x6c5)](_0x36b616[_0x2f568b(0x6d7)]);}static[_0x43bf95(0x6e1)](_0x8aaad,_0x31b55a){const _0x4a54ac=_0x43bf95;if(_0x8aaad['classList']!==void 0x0)return _0x8aaad[_0x4a54ac(0x7ab)][_0x4a54ac(0x33e)](_0x31b55a);let _0x456159=this[_0x4a54ac(0x79a)](_0x8aaad);return _0x456159[_0x4a54ac(0x6a2)]>0x0&&new RegExp(_0x4a54ac(0x59e)+_0x31b55a+'(\x5cs|$)')[_0x4a54ac(0x4c1)](_0x456159);}static[_0x43bf95(0x139)](_0x105433,_0x477d0f){const _0x720abc=_0x43bf95;if(_0x105433['classList']!==void 0x0){let _0x54c112=_0x3f7522[_0x720abc(0x412)](_0x477d0f);for(let _0x3e30c0=0x0,_0x4640f4=_0x54c112['length'];_0x3e30c0<_0x4640f4;_0x3e30c0++)_0x105433['classList'][_0x720abc(0x45f)](_0x54c112[_0x3e30c0]);}else{if(!this['hasClass'](_0x105433,_0x477d0f)){let _0x666c03=this[_0x720abc(0x79a)](_0x105433);this[_0x720abc(0x9c1)](_0x105433,(_0x666c03?_0x666c03+'\x20':'')+_0x477d0f);}}}static[_0x43bf95(0x8b6)](_0x4ca81c,_0x453d83){const _0x34c492=_0x43bf95;_0x4ca81c[_0x34c492(0x7ab)]!==void 0x0?_0x4ca81c[_0x34c492(0x7ab)][_0x34c492(0x109)](_0x453d83):this['setClass'](_0x4ca81c,_0x3f7522[_0x34c492(0x283)](('\x20'+this['getClass'](_0x4ca81c)+'\x20')[_0x34c492(0x965)]('\x20'+_0x453d83+'\x20','\x20')));}static[_0x43bf95(0x9c1)](_0x3292d5,_0x4fa5a3){const _0x42b94d=_0x43bf95;_0x3292d5[_0x42b94d(0x256)]['baseVal']===void 0x0?_0x3292d5[_0x42b94d(0x256)]=_0x4fa5a3:_0x3292d5['className'][_0x42b94d(0x137)]=_0x4fa5a3;}static[_0x43bf95(0x79a)](_0x34001c){const _0x59062c=_0x43bf95;return _0x34001c[_0x59062c(0x9ef)]&&(_0x34001c=_0x34001c['correspondingElement']),_0x34001c['className'][_0x59062c(0x137)]===void 0x0?_0x34001c['className']:_0x34001c[_0x59062c(0x256)][_0x59062c(0x137)];}static[_0x43bf95(0x45e)](_0x5984b4,_0x455f76,_0x1d592c,_0x7e86fd){const _0x739ac4=_0x43bf95;let _0x209cd6=document[_0x739ac4(0x1ad)]('http://www.w3.org/2000/svg',_0x739ac4(0x695));_0x209cd6[_0x739ac4(0x4fe)](_0x739ac4(0x9da),_0x739ac4(0xa37)),_0x209cd6[_0x739ac4(0x4fe)](_0x739ac4(0x371),_0x5984b4),_0x209cd6['setAttribute'](_0x739ac4(0x795),_0x455f76),_0x209cd6[_0x739ac4(0x4fe)](_0x739ac4(0x512),_0x739ac4(0x9cb)+_0x5984b4+'\x20'+_0x455f76);let _0x35e322=document[_0x739ac4(0x1ad)](_0x739ac4(0x9ed),_0x739ac4(0x735));return _0x35e322[_0x739ac4(0x4fe)]('d',_0x1d592c),_0x209cd6[_0x739ac4(0x87b)](_0x35e322),_0x7e86fd&&_0x7e86fd[_0x739ac4(0x87b)](_0x209cd6),_0x209cd6;}static['parseDom'](_0x418da7,_0x481199,_0x55500a){const _0x5691e4=_0x43bf95;_0x481199=_0x481199!=null?_0x481199:!0x1;let _0x5bc292=document[_0x5691e4(0x7dc)]('div');return _0x5bc292[_0x5691e4(0x256)]=_0x55500a||'',_0x5bc292['innerHTML']=_0x418da7,_0x481199?_0x5bc292:_0x5bc292['childNodes'];}static['enterFullscreen'](_0x2c61a7){const _0x2f4665=_0x43bf95;_0x2c61a7&&(_0x2c61a7['requestFullscreen']?_0x2c61a7[_0x2f4665(0x1c7)]():_0x2c61a7['msRequestFullscreen']?_0x2c61a7[_0x2f4665(0x6f6)]():_0x2c61a7[_0x2f4665(0x119)]?_0x2c61a7[_0x2f4665(0x119)]():_0x2c61a7['webkitRequestFullscreen']&&_0x2c61a7[_0x2f4665(0x47b)]());}static['exitFullscreen'](){const _0x3ceb4f=_0x43bf95;document[_0x3ceb4f(0x3b4)]?document[_0x3ceb4f(0x3b4)]():document['msExitFullscreen']?document[_0x3ceb4f(0x1a5)]():document[_0x3ceb4f(0x56f)]?document[_0x3ceb4f(0x56f)]():document[_0x3ceb4f(0xa1c)]&&document[_0x3ceb4f(0xa1c)]();}static[_0x43bf95(0x892)](_0x4699ff,_0x5ccea2,_0x2a1255=null){const _0x5d76e0=_0x43bf95;let _0x2a9ea4=this[_0x5d76e0(0x484)](_0x5d76e0(0x83e),_0x5ccea2,_0x2a1255),_0x2cc348=this['create'](_0x5d76e0(0x2b9),'',_0x2a9ea4);_0x2cc348[_0x5d76e0(0x4fe)](_0x5d76e0(0x4e8),_0x4699ff),_0x2cc348[_0x5d76e0(0x4fe)](_0x5d76e0(0x9cf),_0x5d76e0(0x5e1));let _0x271197=this[_0x5d76e0(0x484)](_0x5d76e0(0x2b9),'',_0x2a9ea4);return _0x271197[_0x5d76e0(0x4fe)](_0x5d76e0(0x4e8),_0x4699ff),_0x271197[_0x5d76e0(0x4fe)]('type',_0x5d76e0(0xaa3)),_0x2a9ea4;}},_0x5b03f8=_0xf85aba,_0x4c8610=Math['PI']*0x2,_0x47857b=0x64,_0x5514ae=0.0001,_0x22934a=class{static[_0x43bf95(0x7f4)](_0xff883a,_0x56faa0){const _0xedc537=_0x43bf95;return Math[_0xedc537(0x8d5)](Math[_0xedc537(0x191)](_0xff883a[0x0]-_0x56faa0[0x0],0x2)+Math[_0xedc537(0x191)](_0xff883a[0x1]-_0x56faa0[0x1],0x2));}static['wholeDistance'](_0x339aaf){const _0x272511=_0x43bf95;let _0x425dc3=0x0;for(let _0x5c74ea=0x0;_0x5c74ea<_0x339aaf['length']-0x1;_0x5c74ea++)_0x425dc3+=this[_0x272511(0x7f4)](_0x339aaf[_0x5c74ea],_0x339aaf[_0x5c74ea+0x1]);return _0x425dc3;}static[_0x43bf95(0x846)](_0x58bcf5){return Math['pow'](this['wholeDistance'](_0x58bcf5),0.99);}static[_0x43bf95(0x8bf)](_0x499924,_0x145532){return[(_0x499924[0x0]+_0x145532[0x0])/0x2,(_0x499924[0x1]+_0x145532[0x1])/0x2];}static[_0x43bf95(0x8d1)](_0x335acc,_0x2d2e39,_0x19d8bc){let _0x993e80=[(_0x335acc[0x0]+_0x2d2e39[0x0])/0x2,(_0x335acc[0x1]+_0x2d2e39[0x1])/0x2],_0x2ff999=[_0x993e80[0x0]-_0x335acc[0x1]+_0x2d2e39[0x1],_0x993e80[0x1]+_0x335acc[0x0]-_0x2d2e39[0x0]],_0x1def01=[(_0x335acc[0x0]+_0x19d8bc[0x0])/0x2,(_0x335acc[0x1]+_0x19d8bc[0x1])/0x2],_0x337326=[_0x1def01[0x0]-_0x335acc[0x1]+_0x19d8bc[0x1],_0x1def01[0x1]+_0x335acc[0x0]-_0x19d8bc[0x0]];return this['getIntersectPoint'](_0x993e80,_0x2ff999,_0x1def01,_0x337326);}static[_0x43bf95(0x603)](_0x32747c,_0x20204a,_0x40f0b8,_0x5437fc){let _0x4deedb,_0x4070e8,_0x390745,_0x5934f0;return _0x32747c[0x1]===_0x20204a[0x1]?(_0x390745=(_0x5437fc[0x0]-_0x40f0b8[0x0])/(_0x5437fc[0x1]-_0x40f0b8[0x1]),_0x4deedb=_0x390745*(_0x32747c[0x1]-_0x40f0b8[0x1])+_0x40f0b8[0x0],_0x4070e8=_0x32747c[0x1],[_0x4deedb,_0x4070e8]):_0x40f0b8[0x1]===_0x5437fc[0x1]?(_0x5934f0=(_0x20204a[0x0]-_0x32747c[0x0])/(_0x20204a[0x1]-_0x32747c[0x1]),_0x4deedb=_0x5934f0*(_0x40f0b8[0x1]-_0x32747c[0x1])+_0x32747c[0x0],_0x4070e8=_0x40f0b8[0x1],[_0x4deedb,_0x4070e8]):(_0x5934f0=(_0x20204a[0x0]-_0x32747c[0x0])/(_0x20204a[0x1]-_0x32747c[0x1]),_0x390745=(_0x5437fc[0x0]-_0x40f0b8[0x0])/(_0x5437fc[0x1]-_0x40f0b8[0x1]),_0x4070e8=(_0x5934f0*_0x32747c[0x1]-_0x32747c[0x0]-_0x390745*_0x40f0b8[0x1]+_0x40f0b8[0x0])/(_0x5934f0-_0x390745),_0x4deedb=_0x5934f0*_0x4070e8-_0x5934f0*_0x32747c[0x1]+_0x32747c[0x0],[_0x4deedb,_0x4070e8]);}static[_0x43bf95(0x749)](_0x3922a8,_0x27203e){const _0x4edb07=_0x43bf95;let _0x4c3d92,_0x2532b7=Math[_0x4edb07(0x50f)](Math[_0x4edb07(0x133)](_0x27203e[0x1]-_0x3922a8[0x1])/this[_0x4edb07(0x7f4)](_0x3922a8,_0x27203e));return _0x27203e[0x1]>=_0x3922a8[0x1]&&_0x27203e[0x0]>=_0x3922a8[0x0]?_0x4c3d92=_0x2532b7+Math['PI']:_0x27203e[0x1]>=_0x3922a8[0x1]&&_0x27203e[0x0]<_0x3922a8[0x0]?_0x4c3d92=_0x4c8610-_0x2532b7:_0x27203e[0x1]<_0x3922a8[0x1]&&_0x27203e[0x0]<_0x3922a8[0x0]?_0x4c3d92=_0x2532b7:_0x27203e[0x1]<_0x3922a8[0x1]&&_0x27203e[0x0]>=_0x3922a8[0x0]&&(_0x4c3d92=Math['PI']-_0x2532b7),_0x4c3d92;}static[_0x43bf95(0x1a8)](_0x2e8ccf,_0x33e8ce,_0x272cb0){const _0x32dabe=_0x43bf95;let _0x5f0516=this[_0x32dabe(0x749)](_0x33e8ce,_0x2e8ccf)-this[_0x32dabe(0x749)](_0x33e8ce,_0x272cb0);return _0x5f0516<0x0?_0x5f0516+_0x4c8610:_0x5f0516;}static[_0x43bf95(0x762)](_0x4298e0,_0x54eb6e,_0x36a57b){return(_0x36a57b[0x1]-_0x4298e0[0x1])*(_0x54eb6e[0x0]-_0x4298e0[0x0])>(_0x54eb6e[0x1]-_0x4298e0[0x1])*(_0x36a57b[0x0]-_0x4298e0[0x0]);}static['getPointOnLine'](_0x4a37ab,_0x1a84e9,_0x41ac42){let _0x2f246f=_0x1a84e9[0x0]+_0x4a37ab*(_0x41ac42[0x0]-_0x1a84e9[0x0]),_0x3e5568=_0x1a84e9[0x1]+_0x4a37ab*(_0x41ac42[0x1]-_0x1a84e9[0x1]);return[_0x2f246f,_0x3e5568];}static[_0x43bf95(0x7e5)](_0x203621,_0x3db9ba,_0x4b7bf5,_0x31c731,_0x571df3){const _0xc37959=_0x43bf95;_0x203621=Math[_0xc37959(0x2c3)](Math['min'](_0x203621,0x1),0x0);let _0x1e2026=0x1-_0x203621,_0x47eb72=_0x203621*_0x203621,_0x38b9eb=_0x47eb72*_0x203621,_0x5d2140=_0x1e2026*_0x1e2026,_0x357339=_0x5d2140*_0x1e2026,_0x2f4cd3=_0x357339*_0x3db9ba[0x0]+0x3*_0x5d2140*_0x203621*_0x4b7bf5[0x0]+0x3*_0x1e2026*_0x47eb72*_0x31c731[0x0]+_0x38b9eb*_0x571df3[0x0],_0x49ef51=_0x357339*_0x3db9ba[0x1]+0x3*_0x5d2140*_0x203621*_0x4b7bf5[0x1]+0x3*_0x1e2026*_0x47eb72*_0x31c731[0x1]+_0x38b9eb*_0x571df3[0x1];return[_0x2f4cd3,_0x49ef51];}static[_0x43bf95(0x393)](_0x2ce265,_0x498f27,_0x28bb5a,_0x18154f,_0xc26314){const _0x34d025=_0x43bf95;let _0x2e0d6b=this['getAzimuth'](_0x2ce265,_0x498f27),_0x170868=_0xc26314?_0x2e0d6b+_0x28bb5a:_0x2e0d6b-_0x28bb5a,_0x80e121=_0x18154f*Math[_0x34d025(0x728)](_0x170868),_0x227e62=_0x18154f*Math[_0x34d025(0xb8)](_0x170868);return[_0x498f27[0x0]+_0x80e121,_0x498f27[0x1]+_0x227e62];}static['getArcPoints'](_0x152bcf,_0x48394e,_0x35d5f4,_0x2811df){const _0x3b6d6d=_0x43bf95;let _0x1104f6,_0x14c087,_0x2a8681=[],_0x52d8ad=_0x2811df-_0x35d5f4;_0x52d8ad=_0x52d8ad<0x0?_0x52d8ad+_0x4c8610:_0x52d8ad;for(let _0x4f3843=0x0;_0x4f3843<=_0x47857b;_0x4f3843++){let _0x39367c=_0x35d5f4+_0x52d8ad*_0x4f3843/_0x47857b;_0x1104f6=_0x152bcf[0x0]+_0x48394e*Math[_0x3b6d6d(0x728)](_0x39367c),_0x14c087=_0x152bcf[0x1]+_0x48394e*Math[_0x3b6d6d(0xb8)](_0x39367c),_0x2a8681[_0x3b6d6d(0xb3)]([_0x1104f6,_0x14c087]);}return _0x2a8681;}static[_0x43bf95(0x2f4)](_0x2b7b44,_0x53dcf9,_0x4e3ab6,_0x247063){const _0x10cf8c=_0x43bf95;let _0x781b2b=this[_0x10cf8c(0x151)](_0x53dcf9,_0x4e3ab6,_0x247063),_0x1d1905=Math[_0x10cf8c(0x8d5)](_0x781b2b[0x0]*_0x781b2b[0x0]+_0x781b2b[0x1]*_0x781b2b[0x1]),_0x213bd9=_0x781b2b[0x0]/_0x1d1905,_0x47e869=_0x781b2b[0x1]/_0x1d1905,_0x948baf=this[_0x10cf8c(0x7f4)](_0x53dcf9,_0x4e3ab6),_0x30b5bf=this[_0x10cf8c(0x7f4)](_0x4e3ab6,_0x247063),_0x38f3e4,_0x2d1764,_0x1525ba,_0x124e28,_0x22e83f;return _0x1d1905>_0x5514ae?this[_0x10cf8c(0x762)](_0x53dcf9,_0x4e3ab6,_0x247063)?(_0x38f3e4=_0x2b7b44*_0x948baf,_0x2d1764=_0x4e3ab6[0x0]-_0x38f3e4*_0x47e869,_0x1525ba=_0x4e3ab6[0x1]+_0x38f3e4*_0x213bd9,_0x22e83f=[_0x2d1764,_0x1525ba],_0x38f3e4=_0x2b7b44*_0x30b5bf,_0x2d1764=_0x4e3ab6[0x0]+_0x38f3e4*_0x47e869,_0x1525ba=_0x4e3ab6[0x1]-_0x38f3e4*_0x213bd9,_0x124e28=[_0x2d1764,_0x1525ba]):(_0x38f3e4=_0x2b7b44*_0x948baf,_0x2d1764=_0x4e3ab6[0x0]+_0x38f3e4*_0x47e869,_0x1525ba=_0x4e3ab6[0x1]-_0x38f3e4*_0x213bd9,_0x22e83f=[_0x2d1764,_0x1525ba],_0x38f3e4=_0x2b7b44*_0x30b5bf,_0x2d1764=_0x4e3ab6[0x0]-_0x38f3e4*_0x47e869,_0x1525ba=_0x4e3ab6[0x1]+_0x38f3e4*_0x213bd9,_0x124e28=[_0x2d1764,_0x1525ba]):(_0x2d1764=_0x4e3ab6[0x0]+_0x2b7b44*(_0x53dcf9[0x0]-_0x4e3ab6[0x0]),_0x1525ba=_0x4e3ab6[0x1]+_0x2b7b44*(_0x53dcf9[0x1]-_0x4e3ab6[0x1]),_0x22e83f=[_0x2d1764,_0x1525ba],_0x2d1764=_0x4e3ab6[0x0]+_0x2b7b44*(_0x247063[0x0]-_0x4e3ab6[0x0]),_0x1525ba=_0x4e3ab6[0x1]+_0x2b7b44*(_0x247063[0x1]-_0x4e3ab6[0x1]),_0x124e28=[_0x2d1764,_0x1525ba]),[_0x22e83f,_0x124e28];}static[_0x43bf95(0x151)](_0x4b82d3,_0x30e1bc,_0x4bed9f){const _0xfe841e=_0x43bf95;let _0x2b1417=_0x4b82d3[0x0]-_0x30e1bc[0x0],_0x174ae7=_0x4b82d3[0x1]-_0x30e1bc[0x1],_0xda42c1=Math[_0xfe841e(0x8d5)](_0x2b1417*_0x2b1417+_0x174ae7*_0x174ae7);_0x2b1417/=_0xda42c1,_0x174ae7/=_0xda42c1;let _0x1070d3=_0x4bed9f[0x0]-_0x30e1bc[0x0],_0x2f18a=_0x4bed9f[0x1]-_0x30e1bc[0x1],_0x3bb239=Math['sqrt'](_0x1070d3*_0x1070d3+_0x2f18a*_0x2f18a);_0x1070d3/=_0x3bb239,_0x2f18a/=_0x3bb239;let _0x2080df=_0x2b1417+_0x1070d3,_0x54cab4=_0x174ae7+_0x2f18a;return[_0x2080df,_0x54cab4];}static[_0x43bf95(0x98a)](_0x5b0804,_0x2a41d4){const _0x534895=_0x43bf95;let _0x23dff7=[this['getLeftMostControlPoint'](_0x5b0804,_0x2a41d4)],_0x56d77d,_0xf4c31c,_0x4eb66b,_0x44bae6;for(let _0x26e0bd=0x0;_0x26e0bd<_0x2a41d4[_0x534895(0x6a2)]-0x2;_0x26e0bd++)_0x56d77d=_0x2a41d4[_0x26e0bd],_0xf4c31c=_0x2a41d4[_0x26e0bd+0x1],_0x4eb66b=_0x2a41d4[_0x26e0bd+0x2],_0x44bae6=this[_0x534895(0x2f4)](_0x5b0804,_0x56d77d,_0xf4c31c,_0x4eb66b),_0x23dff7=_0x23dff7['concat'](_0x44bae6);let _0x3b0d86=this['getRightMostControlPoint'](_0x5b0804,_0x2a41d4);_0x23dff7[_0x534895(0xb3)](_0x3b0d86);let _0x30b5d0=[];for(let _0x175115=0x0;_0x175115<_0x2a41d4[_0x534895(0x6a2)]-0x1;_0x175115++){_0x56d77d=_0x2a41d4[_0x175115],_0xf4c31c=_0x2a41d4[_0x175115+0x1],_0x30b5d0[_0x534895(0xb3)](_0x56d77d);for(let _0xe66aaa=0x0;_0xe66aaa<_0x47857b;_0xe66aaa++){let _0x4bf50b=this['getCubicValue'](_0xe66aaa/_0x47857b,_0x56d77d,_0x23dff7[_0x175115*0x2],_0x23dff7[_0x175115*0x2+0x1],_0xf4c31c);_0x30b5d0[_0x534895(0xb3)](_0x4bf50b);}_0x30b5d0[_0x534895(0xb3)](_0xf4c31c);}return _0x30b5d0;}static['getLeftMostControlPoint'](_0x4af7ba,_0x3e9f78){const _0x40c224=_0x43bf95;let _0x3683a6=_0x3e9f78[0x0],_0x4cb23f=_0x3e9f78[0x1],_0x1741bc=_0x3e9f78[0x2],_0x50cae6=this['getBisectorNormals'](0x0,_0x3683a6,_0x4cb23f,_0x1741bc)[0x0],_0x36754a=this[_0x40c224(0x151)](_0x3683a6,_0x4cb23f,_0x1741bc),_0x1b3f11=Math[_0x40c224(0x8d5)](_0x36754a[0x0]*_0x36754a[0x0]+_0x36754a[0x1]*_0x36754a[0x1]),_0x335ce1,_0x58eac8;if(_0x1b3f11>_0x5514ae){let _0x25f36b=this[_0x40c224(0x8bf)](_0x3683a6,_0x4cb23f),_0x209243=_0x3683a6[0x0]-_0x25f36b[0x0],_0x42388a=_0x3683a6[0x1]-_0x25f36b[0x1],_0x3324dc=0x2/this[_0x40c224(0x7f4)](_0x3683a6,_0x4cb23f),_0x4da35c=-_0x3324dc*_0x42388a,_0x43c480=_0x3324dc*_0x209243,_0x1548df=_0x4da35c*_0x4da35c-_0x43c480*_0x43c480,_0xb6472b=0x2*_0x4da35c*_0x43c480,_0x1d81fd=_0x43c480*_0x43c480-_0x4da35c*_0x4da35c,_0x1c28d8=_0x50cae6[0x0]-_0x25f36b[0x0],_0x1fa032=_0x50cae6[0x1]-_0x25f36b[0x1];_0x335ce1=_0x25f36b[0x0]+_0x1548df*_0x1c28d8+_0xb6472b*_0x1fa032,_0x58eac8=_0x25f36b[0x1]+_0xb6472b*_0x1c28d8+_0x1d81fd*_0x1fa032;}else _0x335ce1=_0x3683a6[0x0]+_0x4af7ba*(_0x4cb23f[0x0]-_0x3683a6[0x0]),_0x58eac8=_0x3683a6[0x1]+_0x4af7ba*(_0x4cb23f[0x1]-_0x3683a6[0x1]);return[_0x335ce1,_0x58eac8];}static[_0x43bf95(0x3ad)](_0x378cd1,_0xe4a50b){const _0x442193=_0x43bf95;let _0xb1d5bd=_0xe4a50b[_0x442193(0x6a2)],_0x50d9f2=_0xe4a50b[_0xb1d5bd-0x3],_0x3565a9=_0xe4a50b[_0xb1d5bd-0x2],_0x3bfe48=_0xe4a50b[_0xb1d5bd-0x1],_0x6b29b3=this[_0x442193(0x2f4)](0x0,_0x50d9f2,_0x3565a9,_0x3bfe48)[0x1],_0x1d0d05=this[_0x442193(0x151)](_0x50d9f2,_0x3565a9,_0x3bfe48),_0x375416=Math[_0x442193(0x8d5)](_0x1d0d05[0x0]*_0x1d0d05[0x0]+_0x1d0d05[0x1]*_0x1d0d05[0x1]),_0x3165e9,_0x1af189;if(_0x375416>_0x5514ae){let _0x4beff4=this['mid'](_0x3565a9,_0x3bfe48),_0x429b2a=_0x3bfe48[0x0]-_0x4beff4[0x0],_0x47c196=_0x3bfe48[0x1]-_0x4beff4[0x1],_0x205431=0x2/this['distance'](_0x3565a9,_0x3bfe48),_0x5b128a=-_0x205431*_0x47c196,_0x3b24ed=_0x205431*_0x429b2a,_0x42eaed=_0x5b128a*_0x5b128a-_0x3b24ed*_0x3b24ed,_0x25c614=0x2*_0x5b128a*_0x3b24ed,_0x497cd8=_0x3b24ed*_0x3b24ed-_0x5b128a*_0x5b128a,_0x3a0a61=_0x6b29b3[0x0]-_0x4beff4[0x0],_0x1e5aff=_0x6b29b3[0x1]-_0x4beff4[0x1];_0x3165e9=_0x4beff4[0x0]+_0x42eaed*_0x3a0a61+_0x25c614*_0x1e5aff,_0x1af189=_0x4beff4[0x1]+_0x25c614*_0x3a0a61+_0x497cd8*_0x1e5aff;}else _0x3165e9=_0x3bfe48[0x0]+_0x378cd1*(_0x3565a9[0x0]-_0x3bfe48[0x0]),_0x1af189=_0x3bfe48[0x1]+_0x378cd1*(_0x3565a9[0x1]-_0x3bfe48[0x1]);return[_0x3165e9,_0x1af189];}static[_0x43bf95(0x5dc)](_0x8acd2b){const _0x4e1734=_0x43bf95;if(_0x8acd2b[_0x4e1734(0x6a2)]<=0x2)return _0x8acd2b;let _0x246530=[],_0x2d1b99=_0x8acd2b[_0x4e1734(0x6a2)]-0x1;for(let _0x422aca=0x0;_0x422aca<=0x1;_0x422aca+=0.01){let _0x1ec286=0x0,_0x1a6c14=0x0;for(let _0x2c8588=0x0;_0x2c8588<=_0x2d1b99;_0x2c8588++){let _0x20d3af=this['getBinomialFactor'](_0x2d1b99,_0x2c8588),_0x54bdc4=Math[_0x4e1734(0x191)](_0x422aca,_0x2c8588),_0x19b9ec=Math[_0x4e1734(0x191)](0x1-_0x422aca,_0x2d1b99-_0x2c8588);_0x1ec286+=_0x20d3af*_0x54bdc4*_0x19b9ec*_0x8acd2b[_0x2c8588][0x0],_0x1a6c14+=_0x20d3af*_0x54bdc4*_0x19b9ec*_0x8acd2b[_0x2c8588][0x1];}_0x246530[_0x4e1734(0xb3)]([_0x1ec286,_0x1a6c14]);}return _0x246530[_0x4e1734(0xb3)](_0x8acd2b[_0x2d1b99]),_0x246530;}static[_0x43bf95(0xa81)](_0x52a2d0,_0xe30a93){const _0x11bcf2=_0x43bf95;return this[_0x11bcf2(0x13c)](_0x52a2d0)/(this[_0x11bcf2(0x13c)](_0xe30a93)*this[_0x11bcf2(0x13c)](_0x52a2d0-_0xe30a93));}static[_0x43bf95(0x13c)](_0x5b8b22){if(_0x5b8b22<=0x1)return 0x1;if(_0x5b8b22===0x2)return 0x2;if(_0x5b8b22===0x3)return 0x6;if(_0x5b8b22===0x4)return 0x18;if(_0x5b8b22===0x5)return 0x78;let _0x4bc168=0x1;for(let _0x14c0ef=0x1;_0x14c0ef<=_0x5b8b22;_0x14c0ef++)_0x4bc168*=_0x14c0ef;return _0x4bc168;}static[_0x43bf95(0x780)](_0x5cf1ad){const _0x3ee617=_0x43bf95;if(_0x5cf1ad[_0x3ee617(0x6a2)]<=0x2)return _0x5cf1ad;let _0x1be2de=0x2,_0x134086=[],_0xb7978c=_0x5cf1ad[_0x3ee617(0x6a2)]-_0x1be2de-0x1;_0x134086[_0x3ee617(0xb3)](_0x5cf1ad[0x0]);for(let _0x3ab4e3=0x0;_0x3ab4e3<=_0xb7978c;_0x3ab4e3++)for(let _0x2ec6ed=0x0;_0x2ec6ed<=0x1;_0x2ec6ed+=0.05){let _0x1e19dc=0x0,_0x4c79a2=0x0;for(let _0x59362d=0x0;_0x59362d<=_0x1be2de;_0x59362d++){let _0x58285c=this['getQuadricBSplineFactor'](_0x59362d,_0x2ec6ed);_0x1e19dc+=_0x58285c*_0x5cf1ad[_0x3ab4e3+_0x59362d][0x0],_0x4c79a2+=_0x58285c*_0x5cf1ad[_0x3ab4e3+_0x59362d][0x1];}_0x134086[_0x3ee617(0xb3)]([_0x1e19dc,_0x4c79a2]);}return _0x134086['push'](_0x5cf1ad[_0x5cf1ad[_0x3ee617(0x6a2)]-0x1]),_0x134086;}static[_0x43bf95(0x9cd)](_0x1a78b6,_0x1ccda7){const _0x441ba3=_0x43bf95;return _0x1a78b6===0x0?Math[_0x441ba3(0x191)](_0x1ccda7-0x1,0x2)/0x2:_0x1a78b6===0x1?(-0x2*Math['pow'](_0x1ccda7,0x2)+0x2*_0x1ccda7+0x1)/0x2:_0x1a78b6===0x2?Math[_0x441ba3(0x191)](_0x1ccda7,0x2)/0x2:0x0;}},_0x6f549e=_0x22934a,_0x3f25b4={'INITIALIZED':_0x43bf95(0x856),'ADDED':_0x43bf95(0x8b3),'REMOVED':_0x43bf95(0x9f9),'CLEARED':_0x43bf95(0x428),'INSTALLED':_0x43bf95(0x73c),'ENABLED':_0x43bf95(0x776),'DISABLED':_0x43bf95(0x9d8),'PLAY':_0x43bf95(0x10e),'PAUSE':_0x43bf95(0x335),'RESTORE':_0x43bf95(0x347)},_0x4075ae=_0x3f25b4,_0x30af05={'ADD':_0x43bf95(0x45f),'REMOVE':'remove'},_0x5b424c={'LEFT_DOWN':_0x34d1e5['Cesium'][_0x43bf95(0x3be)][_0x43bf95(0x1b9)],'LEFT_UP':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3be)][_0x43bf95(0x4e1)],'CLICK':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3be)][_0x43bf95(0x55d)],'RIGHT_DOWN':_0x34d1e5['Cesium'][_0x43bf95(0x3be)]['RIGHT_DOWN'],'RIGHT_UP':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3be)]['RIGHT_UP'],'RIGHT_CLICK':_0x34d1e5['Cesium'][_0x43bf95(0x3be)]['RIGHT_CLICK'],'DB_CLICK':_0x34d1e5['Cesium']['ScreenSpaceEventType']['LEFT_DOUBLE_CLICK'],'MOUSE_MOVE':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3be)]['MOUSE_MOVE'],'WHEEL':_0x34d1e5['Cesium']['ScreenSpaceEventType'][_0x43bf95(0x480)],'MOUSE_OVER':'mouseover','MOUSE_OUT':_0x43bf95(0x4b7)},_0x257139={'ADD_LAYER':_0x43bf95(0x4ea),'REMOVE_LAYER':_0x43bf95(0x2a6),'ADD_EFFECT':_0x43bf95(0x81f),'REMOVE_EFFECT':'removeEffect','LEFT_DOWN':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3be)][_0x43bf95(0x1b9)],'LEFT_UP':_0x34d1e5['Cesium'][_0x43bf95(0x3be)]['LEFT_UP'],'CLICK':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3be)][_0x43bf95(0x55d)],'RIGHT_DOWN':_0x34d1e5['Cesium'][_0x43bf95(0x3be)][_0x43bf95(0x3a5)],'RIGHT_UP':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3be)][_0x43bf95(0x755)],'RIGHT_CLICK':_0x34d1e5['Cesium'][_0x43bf95(0x3be)][_0x43bf95(0x9b1)],'DB_CLICK':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3be)][_0x43bf95(0x886)],'MOUSE_MOVE':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3be)][_0x43bf95(0xa09)],'WHEEL':_0x34d1e5[_0x43bf95(0x7aa)]['ScreenSpaceEventType']['WHEEL']},_0x3f9fee={'CAMERA_MOVE_END':_0x43bf95(0xa94),'CAMERA_CHANGED':_0x43bf95(0x2b3),'PRE_UPDATE':'preUpdate','POST_UPDATE':_0x43bf95(0x925),'PRE_RENDER':_0x43bf95(0x7f2),'POST_RENDER':'postRender','MORPH_COMPLETE':'morphComplete','CLOCK_TICK':_0x43bf95(0x25f),'RENDER_ERROR':_0x43bf95(0x583)},_0x19c032={..._0x30af05,'LEFT_DOWN':_0x34d1e5['Cesium']['ScreenSpaceEventType'][_0x43bf95(0x1b9)],'LEFT_UP':_0x34d1e5['Cesium'][_0x43bf95(0x3be)]['LEFT_UP'],'CLICK':_0x34d1e5['Cesium']['ScreenSpaceEventType'][_0x43bf95(0x55d)],'RIGHT_DOWN':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3be)][_0x43bf95(0x3a5)],'RIGHT_UP':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3be)][_0x43bf95(0x755)],'RIGHT_CLICK':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3be)][_0x43bf95(0x9b1)],'DB_CLICK':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3be)][_0x43bf95(0x886)],'MOUSE_MOVE':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3be)][_0x43bf95(0xa09)],'MOUSE_OVER':_0x43bf95(0x7bc),'MOUSE_OUT':_0x43bf95(0x4b7),'POSITION_UPDATE':_0x43bf95(0x866)},_0x4ca43f={'READY':'ready','TEX_READY':_0x43bf95(0xe8)},_0x695e8e={'INITIAL_TILES_LOADED':'initialTilesLoaded','ALL_TILES_LOADED':'allTilesLoaded\x20','LOAD_PROGRESS':_0x43bf95(0x102),'TILE_FAILED':_0x43bf95(0x64b),'TILE_LOAD':_0x43bf95(0x50b),'TILE_UNLOAD':_0x43bf95(0x8e0),'TILE_VISIBLE':_0x43bf95(0x4ba)},_0x2a0e44=_0x30af05,_0x3a74c0={..._0x30af05,'LEFT_DOWN':_0x34d1e5['Cesium'][_0x43bf95(0x3be)][_0x43bf95(0x1b9)],'LEFT_UP':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3be)][_0x43bf95(0x4e1)],'CLICK':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3be)][_0x43bf95(0x55d)],'RIGHT_DOWN':_0x34d1e5['Cesium'][_0x43bf95(0x3be)][_0x43bf95(0x3a5)],'RIGHT_UP':_0x34d1e5['Cesium'][_0x43bf95(0x3be)][_0x43bf95(0x755)],'RIGHT_CLICK':_0x34d1e5['Cesium'][_0x43bf95(0x3be)][_0x43bf95(0x9b1)],'DB_CLICK':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3be)][_0x43bf95(0x886)]},_0x4133b5={..._0x30af05,'POST_RENDER':'postRender','ACTIVATE':_0x43bf95(0x4fc),'DEACTIVATE':_0x43bf95(0x96a),'RESET_TIME_LINE':_0x43bf95(0x80d)},_0x3437c9={..._0x30af05,'POST_RENDER':'postRender','RESET_TIME_LINE':_0x43bf95(0x80d)},_0x14f7b9={'DRAW_START':'drawStart','DRAW_STOP':_0x43bf95(0x7a5),'EDIT_START':_0x43bf95(0x2bd),'EDIT_STOP':_0x43bf95(0x281),'DRAW_ANCHOR':'drawAnchor','CREATE_ANCHOR':'createAnchor','UPDATE_ANCHOR':_0x43bf95(0xa97),'ANCHOR_MOVING':_0x43bf95(0x2e1),'EDIT_ANCHOR_STOP':_0x43bf95(0x47e),'CLEAR_ANCHOR':_0x43bf95(0xa5d)},_0x2cdc32=class{constructor(_0x33f3e7){const _0x5948fc=_0x43bf95;this[_0x5948fc(0xa4c)]=_0x33f3e7,this['_cache']={};}['_on'](_0x193b09,_0x1f31f5,_0x3ce1f0){const _0x497df0=_0x43bf95;let _0x592381=this[_0x497df0(0x1e9)](_0x193b09),_0x59dae6;return _0x592381&&_0x1f31f5&&(_0x59dae6=_0x592381[_0x497df0(0x278)](_0x1f31f5,_0x3ce1f0||this)),_0x59dae6;}['_off'](_0x177a3b,_0x5b24dd,_0x18aae2){const _0x14181a=_0x43bf95;let _0x59bae4=this[_0x14181a(0x1e9)](_0x177a3b),_0x40f471=!0x1;return _0x59bae4&&_0x5b24dd&&(_0x40f471=_0x59bae4[_0x14181a(0x97c)](_0x5b24dd,_0x18aae2||this)),_0x40f471;}['_fire'](_0x135d3c,_0x453411){const _0x2f476c=_0x43bf95;let _0x3e7097=this[_0x2f476c(0x1e9)](_0x135d3c);_0x3e7097&&_0x3e7097[_0x2f476c(0x1eb)](_0x453411);}['_registerEvent'](){const _0x109da1=_0x43bf95;Object[_0x109da1(0x6f9)](this[_0x109da1(0xa4c)])[_0x109da1(0x2de)](_0x4d81c3=>{const _0x500301=_0x109da1;let _0x263ad2=this[_0x500301(0xa4c)][_0x4d81c3];this['_cache'][_0x263ad2]=new _0x34d1e5[(_0x500301(0x7aa))][(_0x500301(0x43e))]();});}['on'](_0x4bf17f,_0x24d79b,_0x10b8ed){const _0x244364=_0x43bf95;return this[_0x244364(0x2c5)](_0x4bf17f,_0x24d79b,_0x10b8ed);}[_0x43bf95(0x12e)](_0x19f077,_0x11f63e,_0x677eff){const _0x333d1c=_0x43bf95;let _0x51b96d=this[_0x333d1c(0x2c5)](_0x19f077,_0x5aec41=>{_0x11f63e(_0x5aec41),_0x51b96d&&_0x51b96d();},_0x677eff);}[_0x43bf95(0x24d)](_0xf1fb6b,_0x340d7c,_0x43500e){const _0x724740=_0x43bf95;return this[_0x724740(0x122)](_0xf1fb6b,_0x340d7c,_0x43500e);}['fire'](_0x16484d,_0x1b0ccc){this['_fire'](_0x16484d,_0x1b0ccc);}[_0x43bf95(0x1e9)](_0x1a91a6){return this['_cache'][_0x1a91a6]||void 0x0;}},_0x5ef292=_0x2cdc32,_0x548994=class extends _0x5ef292{constructor(_0x104b4e,_0x36eaac={}){const _0x3edbc3=_0x43bf95;super(_0x5b424c),this[_0x3edbc3(0x3f7)]=_0x104b4e,this[_0x3edbc3(0x5ae)]=void 0x0,this['_enableEventPropagation']=_0x36eaac[_0x3edbc3(0x9d6)],this[_0x3edbc3(0x539)]=_0x36eaac['enableMouseOver'],this['_registerEvent'](),this[_0x3edbc3(0x24f)]();}[_0x43bf95(0x6f0)](){const _0x510002=_0x43bf95;let _0x496209=new _0x34d1e5[(_0x510002(0x7aa))][(_0x510002(0xa8e))](this[_0x510002(0x3f7)][_0x510002(0x790)]);Object['keys'](_0x34d1e5[_0x510002(0x7aa)][_0x510002(0x3be)])[_0x510002(0x2de)](_0x3584cb=>{const _0x282c31=_0x510002;let _0x2a3cb4=_0x34d1e5[_0x282c31(0x7aa)][_0x282c31(0x3be)][_0x3584cb];this['_cache'][_0x2a3cb4]=new _0x34d1e5['Cesium'][(_0x282c31(0x43e))](),_0x496209[_0x282c31(0x307)](_0x238d61=>{const _0x2cfa5f=_0x282c31;this[_0x2cfa5f(0x365)][_0x2a3cb4][_0x2cfa5f(0x1eb)](_0x238d61);},_0x2a3cb4);});}[_0x43bf95(0x24f)](){const _0x599c1e=_0x43bf95;this['on'](this[_0x599c1e(0xa4c)][_0x599c1e(0x1b9)],this[_0x599c1e(0x3a3)],this),this['on'](this['_types']['LEFT_UP'],this[_0x599c1e(0x768)],this),this['on'](this[_0x599c1e(0xa4c)][_0x599c1e(0x6c1)],this['_clickHandler'],this),this['on'](this[_0x599c1e(0xa4c)][_0x599c1e(0x6cf)],this['_dbClickHandler'],this),this['on'](this[_0x599c1e(0xa4c)][_0x599c1e(0x3a5)],this['_rightDownHandler'],this),this['on'](this[_0x599c1e(0xa4c)][_0x599c1e(0x755)],this['_rightUpHandler'],this),this['on'](this[_0x599c1e(0xa4c)][_0x599c1e(0x9b1)],this['_rightClickHandler'],this),this['on'](this[_0x599c1e(0xa4c)][_0x599c1e(0xa09)],this['_mouseMoveHandler'],this),this['on'](this[_0x599c1e(0xa4c)][_0x599c1e(0x480)],this[_0x599c1e(0x2ed)],this);}['_adjustPosition'](_0x2eb30b){const _0x2c2a5e=_0x43bf95;let _0x5549bc=this[_0x2c2a5e(0x3f7)][_0x2c2a5e(0x12a)][_0x2c2a5e(0x36c)](),_0x2f6ed3=_0x5549bc['width']/this['_viewer'][_0x2c2a5e(0x12a)]['offsetWidth'],_0x3b88b7=_0x5549bc[_0x2c2a5e(0x795)]/this[_0x2c2a5e(0x3f7)]['container'][_0x2c2a5e(0x7da)],_0x425714=window[_0x2c2a5e(0x44c)],_0x3500bc=(_0x2eb30b['x']-_0x5549bc['left'])/_0x2f6ed3/_0x425714,_0x460a5e=(_0x2eb30b['y']-_0x5549bc[_0x2c2a5e(0x330)])/_0x3b88b7/_0x425714;return new _0x34d1e5[(_0x2c2a5e(0x7aa))][(_0x2c2a5e(0x48e))](_0x3500bc,_0x460a5e);}['_getMouseInfo'](_0x462b3c){const _0x141228=_0x43bf95;let _0x220dfc=this[_0x141228(0x3f7)][_0x141228(0x148)],_0x2a80f3=_0x220dfc[_0x141228(0x112)](_0x462b3c),_0x333735,_0x27de71,_0x281917,_0x35283f;if(_0x220dfc[_0x141228(0x159)]&&(_0x333735=_0x220dfc[_0x141228(0x2d7)](_0x462b3c)),_0x333735){let _0x504ccd=_0x34d1e5['Cesium'][_0x141228(0x7a1)][_0x141228(0x423)]['cartesianToCartographic'](_0x333735);_0x504ccd&&(_0x281917={'lng':_0x34d1e5[_0x141228(0x7aa)]['Math'][_0x141228(0x438)](_0x504ccd['longitude']),'lat':_0x34d1e5['Cesium'][_0x141228(0x72b)][_0x141228(0x438)](_0x504ccd[_0x141228(0xa6e)]),'alt':_0x504ccd[_0x141228(0x795)]});}if(_0x220dfc[_0x141228(0x6f7)]===_0x34d1e5['Cesium']['SceneMode'][_0x141228(0x5f3)]&&!(this['_viewer'][_0x141228(0x4ed)]instanceof _0x34d1e5[_0x141228(0x7aa)][_0x141228(0x940)])){let _0x199e88=_0x220dfc[_0x141228(0x698)]['getPickRay'](_0x462b3c);_0x27de71=_0x220dfc[_0x141228(0x7fd)][_0x141228(0x112)](_0x199e88,_0x220dfc);}else _0x27de71=_0x220dfc[_0x141228(0x698)][_0x141228(0xa9d)](_0x462b3c,_0x34d1e5[_0x141228(0x7aa)][_0x141228(0x7a1)][_0x141228(0x423)]);if(_0x27de71){let _0x5d4f96=_0x34d1e5[_0x141228(0x7aa)][_0x141228(0x7a1)][_0x141228(0x423)][_0x141228(0x8e5)](_0x27de71);_0x5d4f96&&(_0x35283f={'lng':_0x34d1e5['Cesium'][_0x141228(0x72b)][_0x141228(0x438)](_0x5d4f96['longitude']),'lat':_0x34d1e5[_0x141228(0x7aa)][_0x141228(0x72b)]['toDegrees'](_0x5d4f96[_0x141228(0xa6e)]),'alt':_0x5d4f96[_0x141228(0x795)]});}return{'target':_0x2a80f3,'windowPosition':_0x462b3c,'position':_0x333735,'wgs84Position':_0x281917,'surfacePosition':_0x27de71,'wgs84SurfacePosition':_0x35283f};}[_0x43bf95(0x43f)](_0x389faf){const _0x9d3ef6=_0x43bf95;let _0x325cb6=[],_0x42364c=this[_0x9d3ef6(0x3f7)][_0x9d3ef6(0x148)][_0x9d3ef6(0x8a0)](_0x389faf);return _0x42364c&&_0x42364c[_0x9d3ef6(0x6a2)]&&_0x42364c['forEach'](_0x4a31d6=>{const _0x10c812=_0x9d3ef6;_0x325cb6['push'](this[_0x10c812(0x62b)](_0x4a31d6));}),_0x325cb6;}[_0x43bf95(0x475)](_0x55e9e4){const _0x56b2b8=_0x43bf95;let _0x2e5e0b;return(_0x55e9e4==null?void 0x0:_0x55e9e4['id'])instanceof _0x34d1e5['Cesium']['Entity']?_0x2e5e0b=_0x55e9e4['id']['overlayId']:_0x55e9e4 instanceof _0x34d1e5[_0x56b2b8(0x7aa)][_0x56b2b8(0x7ba)]?_0x2e5e0b=_0x55e9e4['tileset']['overlayId']:((_0x55e9e4==null?void 0x0:_0x55e9e4['primitive'])instanceof _0x34d1e5[_0x56b2b8(0x7aa)]['Cesium3DTileset']||_0x55e9e4!=null&&_0x55e9e4['primitive'])&&(_0x2e5e0b=_0x55e9e4[_0x56b2b8(0x64d)][_0x56b2b8(0x4a6)]),_0x2e5e0b;}[_0x43bf95(0x62b)](_0x2851c9){const _0x1c938f=_0x43bf95;let _0x15cd28,_0x49fea0,_0x47687d;return(_0x2851c9==null?void 0x0:_0x2851c9['id'])instanceof _0x34d1e5['Cesium'][_0x1c938f(0x926)]?(_0x49fea0=this[_0x1c938f(0x3f7)][_0x1c938f(0x89c)]()[_0x1c938f(0x738)](_0x53235a=>_0x53235a['layerId']===_0x2851c9['id'][_0x1c938f(0x4c3)])[0x0],_0x49fea0!=null&&_0x49fea0[_0x1c938f(0x632)]&&(_0x15cd28=_0x49fea0['getOverlay'](_0x2851c9['id'][_0x1c938f(0x4a6)]))):_0x2851c9 instanceof _0x34d1e5[_0x1c938f(0x7aa)]['Cesium3DTileFeature']?(_0x49fea0=this[_0x1c938f(0x3f7)][_0x1c938f(0x89c)]()[_0x1c938f(0x738)](_0x6d3ca9=>_0x6d3ca9[_0x1c938f(0x4c3)]===_0x2851c9[_0x1c938f(0x6af)]['layerId'])[0x0],_0x47687d=_0x2851c9,_0x49fea0!=null&&_0x49fea0[_0x1c938f(0x632)]&&(_0x15cd28=_0x49fea0[_0x1c938f(0x632)](_0x2851c9[_0x1c938f(0x6af)]['overlayId']),_0x47687d&&_0x47687d[_0x1c938f(0x234)]&&_0x47687d[_0x1c938f(0x234)]()['forEach'](_0x133bf3=>{const _0x5661d7=_0x1c938f;_0x15cd28[_0x5661d7(0x2f0)][_0x133bf3]=_0x47687d['getProperty'](_0x133bf3);}))):(_0x2851c9==null?void 0x0:_0x2851c9[_0x1c938f(0x64d)])instanceof _0x34d1e5[_0x1c938f(0x7aa)][_0x1c938f(0xa0d)]?(_0x49fea0=this['_viewer'][_0x1c938f(0x89c)]()[_0x1c938f(0x738)](_0x2a9ebf=>_0x2a9ebf[_0x1c938f(0x4c3)]===_0x2851c9['primitive'][_0x1c938f(0x4c3)])[0x0],_0x49fea0!=null&&_0x49fea0[_0x1c938f(0x632)]&&(_0x15cd28=_0x49fea0['getOverlay'](_0x2851c9[_0x1c938f(0x64d)][_0x1c938f(0x4a6)]))):_0x2851c9!=null&&_0x2851c9[_0x1c938f(0x64d)]&&(_0x49fea0=this[_0x1c938f(0x3f7)][_0x1c938f(0x89c)]()[_0x1c938f(0x738)](_0x3de12a=>_0x3de12a[_0x1c938f(0x4c3)]===_0x2851c9['primitive']['layerId'])[0x0],_0x49fea0!=null&&_0x49fea0[_0x1c938f(0x632)]&&(_0x15cd28=_0x49fea0[_0x1c938f(0x632)](_0x2851c9[_0x1c938f(0x64d)][_0x1c938f(0x4a6)]))),{'layer':_0x49fea0,'overlay':_0x15cd28,'feature':_0x47687d,'instanceId':_0x2851c9==null?void 0x0:_0x2851c9['instanceId']};}['_raiseEvent'](_0x4672fb,_0x36dc69={}){const _0x5cf08f=_0x43bf95;var _0x2a3ac3;let _0x108cbd,_0x11d254=this['_getTargetInfo'](_0x36dc69['target']),_0x4dd4a6=_0x11d254==null?void 0x0:_0x11d254['overlay'],_0x108713=_0x11d254==null?void 0x0:_0x11d254[_0x5cf08f(0x4a9)];_0x4dd4a6!=null&&_0x4dd4a6['overlayEvent']&&(_0x108cbd=_0x4dd4a6['overlayEvent'][_0x5cf08f(0x1e9)](_0x4672fb),_0x108cbd&&_0x108cbd[_0x5cf08f(0x669)]>0x0&&_0x108cbd[_0x5cf08f(0x1eb)]({..._0x11d254,..._0x36dc69})),(!_0x108cbd||_0x108cbd[_0x5cf08f(0x669)]===0x0||this['_eventPropagation'])&&(_0x108713!=null&&_0x108713[_0x5cf08f(0x47c)])&&(_0x108cbd=_0x108713[_0x5cf08f(0x47c)]['getEvent'](_0x4672fb),_0x108cbd&&_0x108cbd[_0x5cf08f(0x669)]>0x0&&_0x108cbd['raiseEvent']({..._0x11d254,..._0x36dc69})),(!_0x108cbd||_0x108cbd[_0x5cf08f(0x669)]===0x0||this[_0x5cf08f(0x949)])&&((_0x2a3ac3=this[_0x5cf08f(0x3f7)])!=null&&_0x2a3ac3['viewerEvent'])&&(_0x108cbd=this['_viewer']['viewerEvent'][_0x5cf08f(0x1e9)](_0x4672fb),_0x108cbd&&_0x108cbd[_0x5cf08f(0x669)]>0x0&&_0x108cbd[_0x5cf08f(0x1eb)]({..._0x11d254,..._0x36dc69})),_0x4dd4a6!=null&&_0x4dd4a6['allowDrillPicking']&&this['_getDrillInfos'](_0x36dc69['windowPosition'])['forEach'](_0x51badc=>{const _0x150c99=_0x5cf08f;let _0x318771=_0x51badc==null?void 0x0:_0x51badc[_0x150c99(0x262)],_0x183d7a=_0x51badc==null?void 0x0:_0x51badc['layer'];(_0x318771==null?void 0x0:_0x318771[_0x150c99(0x4a6)])!==_0x4dd4a6[_0x150c99(0x4a6)]&&(_0x318771!=null&&_0x318771[_0x150c99(0x27e)])&&(_0x108cbd=_0x318771['overlayEvent']['getEvent'](_0x4672fb),(!_0x108cbd||_0x108cbd[_0x150c99(0x669)]===0x0)&&(_0x183d7a!=null&&_0x183d7a[_0x150c99(0x47c)])&&(_0x108cbd=_0x183d7a[_0x150c99(0x47c)][_0x150c99(0x1e9)](_0x4672fb)),_0x108cbd&&_0x108cbd[_0x150c99(0x669)]>0x0&&_0x108cbd[_0x150c99(0x1eb)]({..._0x51badc,..._0x36dc69}));});}['_clickHandler'](_0x441678){const _0x470163=_0x43bf95;if(!(_0x441678!=null&&_0x441678[_0x470163(0x9a7)]))return!0x1;this[_0x470163(0x569)](_0x5b424c[_0x470163(0x6c1)],this['_getMouseInfo'](_0x441678['position']));}[_0x43bf95(0x6ba)](_0x589372){const _0x58718e=_0x43bf95;if(!(_0x589372!=null&&_0x589372['position']))return!0x1;this[_0x58718e(0x569)](_0x5b424c[_0x58718e(0x6cf)],this[_0x58718e(0x74d)](_0x589372[_0x58718e(0x9a7)]));}['_rightClickHandler'](_0x37e094){const _0x52e767=_0x43bf95;if(!(_0x37e094!=null&&_0x37e094['position']))return!0x1;this[_0x52e767(0x569)](_0x5b424c[_0x52e767(0x9b1)],this[_0x52e767(0x74d)](_0x37e094['position']));}['_mouseMoveHandler'](_0x5d9545){const _0x23772b=_0x43bf95;if(!(_0x5d9545!=null&&_0x5d9545[_0x23772b(0x837)]))return!0x1;let _0x12b101=this[_0x23772b(0x74d)](_0x5d9545[_0x23772b(0x837)]);this[_0x23772b(0x3f7)][_0x23772b(0x790)][_0x23772b(0x6a9)]['cursor']=_0x12b101['target']?_0x23772b(0x9c7):'default',this[_0x23772b(0x569)](_0x5b424c[_0x23772b(0xa09)],_0x12b101),this[_0x23772b(0x539)]&&(!this[_0x23772b(0x5ae)]||this['_getOverlayId'](this['_selected'][_0x23772b(0x418)])!==this[_0x23772b(0x475)](_0x12b101[_0x23772b(0x418)]))&&(this[_0x23772b(0x569)](_0x5b424c[_0x23772b(0x6cb)],this['_selected']),this[_0x23772b(0x569)](_0x5b424c[_0x23772b(0x7b7)],_0x12b101),this[_0x23772b(0x5ae)]=_0x12b101);}[_0x43bf95(0x3a3)](_0x269c49){const _0x5c7d2c=_0x43bf95;if(!(_0x269c49!=null&&_0x269c49[_0x5c7d2c(0x9a7)]))return!0x1;this['_raiseEvent'](_0x5b424c[_0x5c7d2c(0x1b9)],this[_0x5c7d2c(0x74d)](_0x269c49['position']));}[_0x43bf95(0x768)](_0x257d13){const _0x2581b3=_0x43bf95;this[_0x2581b3(0x569)](_0x5b424c[_0x2581b3(0x4e1)],this[_0x2581b3(0x74d)](_0x257d13['position']));}['_rightDownHandler'](_0x383157){const _0x32c01a=_0x43bf95;if(!(_0x383157!=null&&_0x383157[_0x32c01a(0x9a7)]))return!0x1;this[_0x32c01a(0x569)](_0x5b424c[_0x32c01a(0x3a5)],this[_0x32c01a(0x74d)](_0x383157['position']));}[_0x43bf95(0x74a)](_0x294410){const _0xc4e606=_0x43bf95;this[_0xc4e606(0x569)](_0x5b424c[_0xc4e606(0x755)],this[_0xc4e606(0x74d)](_0x294410[_0xc4e606(0x9a7)]));}[_0x43bf95(0x2ed)](_0x4f8a46){this['_raiseEvent'](_0x5b424c['WHEEL'],{'movement':_0x4f8a46});}},_0x2f8030=_0x548994,_0x2551ef=class extends _0x5ef292{constructor(){const _0x52205a=_0x43bf95;super(_0x257139),this[_0x52205a(0x6f0)]();}},_0x303577=_0x2551ef,_0x52dab1=class extends _0x5ef292{constructor(_0x75473f){const _0x544887=_0x43bf95;super(_0x3f9fee),this[_0x544887(0x6a7)]=_0x75473f[_0x544887(0x698)],this[_0x544887(0x3c5)]=_0x75473f[_0x544887(0x148)],this[_0x544887(0x280)]=_0x75473f['clock'];}['on'](_0x3dbf4b,_0x17b247,_0x22283d){const _0x5da5fd=_0x43bf95;let _0x5e6ad5;switch(_0x3dbf4b){case _0x3f9fee[_0x5da5fd(0x360)]:_0x5e6ad5=this[_0x5da5fd(0x6a7)]['moveEnd']['addEventListener'](_0x17b247,_0x22283d||this);break;case _0x3f9fee[_0x5da5fd(0x5a5)]:_0x5e6ad5=this['_camera']['changed'][_0x5da5fd(0x278)](_0x17b247,_0x22283d||this);break;case _0x3f9fee[_0x5da5fd(0x98d)]:_0x5e6ad5=this[_0x5da5fd(0x3c5)][_0x5da5fd(0xa83)][_0x5da5fd(0x278)](_0x17b247,_0x22283d||this);break;case _0x3f9fee['POST_UPDATE']:_0x5e6ad5=this[_0x5da5fd(0x3c5)][_0x5da5fd(0x925)][_0x5da5fd(0x278)](_0x17b247,_0x22283d||this);break;case _0x3f9fee[_0x5da5fd(0x883)]:_0x5e6ad5=this[_0x5da5fd(0x3c5)][_0x5da5fd(0x7f2)][_0x5da5fd(0x278)](_0x17b247,_0x22283d||this);break;case _0x3f9fee[_0x5da5fd(0x559)]:_0x5e6ad5=this[_0x5da5fd(0x3c5)][_0x5da5fd(0x2d3)][_0x5da5fd(0x278)](_0x17b247,_0x22283d||this);break;case _0x3f9fee[_0x5da5fd(0x882)]:_0x5e6ad5=this['_scene']['morphComplete']['addEventListener'](_0x17b247,_0x22283d||this);break;case _0x3f9fee[_0x5da5fd(0x901)]:_0x5e6ad5=this['_clock'][_0x5da5fd(0x9ae)][_0x5da5fd(0x278)](_0x17b247,_0x22283d||this);break;case _0x3f9fee[_0x5da5fd(0x651)]:_0x5e6ad5=this[_0x5da5fd(0x3c5)][_0x5da5fd(0x583)][_0x5da5fd(0x278)](_0x17b247,_0x22283d||this);break;default:break;}return _0x5e6ad5;}['off'](_0x43d8ca,_0x4dedbf,_0x198d9c){const _0x102371=_0x43bf95;let _0xdea67e=!0x1;switch(_0x43d8ca){case _0x3f9fee[_0x102371(0x360)]:_0xdea67e=this['_camera']['moveEnd'][_0x102371(0x97c)](_0x4dedbf,_0x198d9c||this);break;case _0x3f9fee[_0x102371(0x5a5)]:_0xdea67e=this[_0x102371(0x6a7)][_0x102371(0x609)][_0x102371(0x97c)](_0x4dedbf,_0x198d9c||this);break;case _0x3f9fee[_0x102371(0x98d)]:_0xdea67e=this[_0x102371(0x3c5)][_0x102371(0xa83)]['removeEventListener'](_0x4dedbf,_0x198d9c||this);break;case _0x3f9fee[_0x102371(0x635)]:_0xdea67e=this[_0x102371(0x3c5)][_0x102371(0x925)][_0x102371(0x97c)](_0x4dedbf,_0x198d9c||this);break;case _0x3f9fee[_0x102371(0x883)]:_0xdea67e=this[_0x102371(0x3c5)]['preRender']['removeEventListener'](_0x4dedbf,_0x198d9c||this);break;case _0x3f9fee[_0x102371(0x559)]:_0xdea67e=this[_0x102371(0x3c5)][_0x102371(0x2d3)]['removeEventListener'](_0x4dedbf,_0x198d9c||this);break;case _0x3f9fee['MORPH_COMPLETE']:_0xdea67e=this[_0x102371(0x3c5)][_0x102371(0xa8)][_0x102371(0x97c)](_0x4dedbf,_0x198d9c||this);break;case _0x3f9fee[_0x102371(0x901)]:_0xdea67e=this['_clock']['onTick'][_0x102371(0x97c)](_0x4dedbf,_0x198d9c||this);break;case _0x3f9fee['RENDER_ERROR']:_0xdea67e=this[_0x102371(0x3c5)]['renderError'][_0x102371(0x97c)](_0x4dedbf,_0x198d9c||this);break;default:break;}return _0xdea67e;}},_0x1e38d6=_0x52dab1,_0x359988=class extends _0x5ef292{constructor(){const _0x52eb17=_0x43bf95;super(_0x2a0e44),this[_0x52eb17(0x6f0)]();}},_0x146d96=_0x359988,_0xf3acb5=class extends _0x5ef292{constructor(){super(_0x3a74c0),this['_registerEvent']();}},_0x5d9406=_0xf3acb5,_0x57ab34=class extends _0x5ef292{constructor(){const _0x5cab01=_0x43bf95;super(_0x19c032),this[_0x5cab01(0x6f0)]();}},_0x501cef=_0x57ab34,_0x1b2cbe=class extends _0x5ef292{constructor(_0x1d04b8){const _0xbb7dda=_0x43bf95;super(_0x695e8e),this[_0xbb7dda(0x6dd)]=_0x1d04b8;}['on'](_0x3d2e37,_0x54aab3,_0x4b987f){const _0x3b2989=_0x43bf95;return this[_0x3b2989(0x6dd)][_0x3b2989(0x379)](_0x33ec2e=>{const _0x124aef=_0x3b2989;switch(_0x3d2e37){case _0x695e8e['INITIAL_TILES_LOADED']:_0x33ec2e[_0x124aef(0x2df)]['addEventListener'](_0x54aab3,_0x4b987f||this);break;case _0x695e8e[_0x124aef(0x413)]:_0x33ec2e[_0x124aef(0x5c7)][_0x124aef(0x278)](_0x54aab3,_0x4b987f||this);break;case _0x695e8e[_0x124aef(0x8d6)]:_0x33ec2e[_0x124aef(0xa8f)][_0x124aef(0x278)](_0x54aab3,_0x4b987f||this);break;case _0x695e8e[_0x124aef(0x1d9)]:_0x33ec2e[_0x124aef(0x9ea)][_0x124aef(0x278)](_0x54aab3,_0x4b987f||this);break;case _0x695e8e[_0x124aef(0x2c1)]:_0x33ec2e[_0x124aef(0x50b)][_0x124aef(0x278)](_0x54aab3,_0x4b987f||this);break;case _0x695e8e['TILE_UNLOAD']:_0x33ec2e['tileUnload']['addEventListener'](_0x54aab3,_0x4b987f||this);break;case _0x695e8e[_0x124aef(0xa3e)]:_0x33ec2e['tileVisible'][_0x124aef(0x278)](_0x54aab3,_0x4b987f||this);break;default:break;}}),null;}[_0x43bf95(0x24d)](_0x1ad23b,_0x3161bd,_0x5c9642){const _0xe5c4aa=_0x43bf95;return this[_0xe5c4aa(0x6dd)]['then'](_0x5d28f2=>{const _0x28a4e1=_0xe5c4aa;switch(_0x1ad23b){case _0x695e8e[_0x28a4e1(0xaa4)]:_0x5d28f2[_0x28a4e1(0x2df)]['removeEventListener'](_0x3161bd,_0x5c9642||this);break;case _0x695e8e[_0x28a4e1(0x413)]:_0x5d28f2[_0x28a4e1(0x5c7)]['removeEventListener'](_0x3161bd,_0x5c9642||this);break;case _0x695e8e[_0x28a4e1(0x8d6)]:_0x5d28f2[_0x28a4e1(0xa8f)]['removeEventListener'](_0x3161bd,_0x5c9642||this);break;case _0x695e8e[_0x28a4e1(0x1d9)]:_0x5d28f2[_0x28a4e1(0x9ea)][_0x28a4e1(0x97c)](_0x3161bd,_0x5c9642||this);break;case _0x695e8e[_0x28a4e1(0x2c1)]:_0x5d28f2[_0x28a4e1(0x50b)][_0x28a4e1(0x97c)](_0x3161bd,_0x5c9642||this);break;case _0x695e8e[_0x28a4e1(0x68e)]:_0x5d28f2['tileUnload'][_0x28a4e1(0x97c)](_0x3161bd,_0x5c9642||this);break;case _0x695e8e[_0x28a4e1(0xa3e)]:_0x5d28f2[_0x28a4e1(0x4ba)]['removeEventListener'](_0x3161bd,_0x5c9642||this);break;default:break;}}),!0x0;}},_0x3a00dd=_0x1b2cbe,_0xd08335=class extends _0x5ef292{constructor(_0x5db6f8){const _0x24be5b=_0x43bf95;super(_0x4ca43f),this[_0x24be5b(0x3e3)]=_0x5db6f8;}['on'](_0x2b5261,_0x153ec9,_0x226fef){const _0x147568=_0x43bf95;return this[_0x147568(0x3e3)][_0x147568(0x379)](_0x5e279d=>{const _0x578c87=_0x147568;switch(_0x2b5261){case _0x4ca43f[_0x578c87(0x793)]:_0x5e279d['readyEvent'][_0x578c87(0x278)](_0x153ec9,_0x226fef||this);break;case _0x4ca43f[_0x578c87(0x25e)]:_0x5e279d[_0x578c87(0x681)][_0x578c87(0x278)](_0x153ec9,_0x226fef||this);break;default:break;}}),null;}[_0x43bf95(0x24d)](_0x32eb2a,_0x4f69eb,_0x32585e){const _0xfc5a97=_0x43bf95;return this[_0xfc5a97(0x3e3)][_0xfc5a97(0x379)](_0x1c46a4=>{const _0x526dad=_0xfc5a97;switch(_0x32eb2a){case _0x4ca43f['READY']:_0x1c46a4[_0x526dad(0x374)][_0x526dad(0x97c)](_0x4f69eb,_0x32585e||this);break;case _0x4ca43f['TEX_READY']:_0x1c46a4[_0x526dad(0x681)][_0x526dad(0x97c)](_0x4f69eb,_0x32585e||this);break;default:break;}}),!0x0;}},_0x4763ca=_0xd08335,_0x4af3ba=class extends _0x5ef292{constructor(){super(_0x4133b5),this['_registerEvent']();}},_0x3ba0b9=_0x4af3ba,_0x30f6e5=class extends _0x5ef292{constructor(){const _0x135fa0=_0x43bf95;super(_0x3437c9),this[_0x135fa0(0x6f0)]();}},_0x3bec08=_0x30f6e5,_0x373302=class extends _0x5ef292{constructor(){const _0xf6fe7=_0x43bf95;super(_0x14f7b9),this[_0xf6fe7(0x6f0)]();}},_0x3a7cdd=_0x373302,_0x40aee2=class{constructor(_0x1f80ab){const _0x482523=_0x43bf95;this[_0x482523(0x20a)]=_0x3f7522[_0x482523(0x3ef)](),this[_0x482523(0x56a)]=_0x1f80ab||_0x3f7522[_0x482523(0x3ef)](),this[_0x482523(0xaa1)]=void 0x0,this['_viewer']=void 0x0,this[_0x482523(0x558)]=void 0x0,this[_0x482523(0x850)]=!0x0,this[_0x482523(0x14a)]=!0x1,this[_0x482523(0x365)]={},this[_0x482523(0xa0b)]={},this[_0x482523(0x6ee)]=new _0x5d9406(),this['_layerEvent']['on'](_0x3a74c0[_0x482523(0x123)],this[_0x482523(0x84d)],this),this[_0x482523(0x6ee)]['on'](_0x3a74c0['REMOVE'],this[_0x482523(0x526)],this);}get[_0x43bf95(0x4c3)](){return this['_id'];}get['id'](){const _0x57e1e8=_0x43bf95;return this[_0x57e1e8(0x56a)];}get[_0x43bf95(0x8ca)](){const _0x142c93=_0x43bf95;return this[_0x142c93(0xaa1)];}set[_0x43bf95(0x867)](_0xc15050){const _0x48edb4=_0x43bf95;this[_0x48edb4(0x850)]=_0xc15050,this['_delegate']&&(this[_0x48edb4(0xaa1)]['show']=this[_0x48edb4(0x850)]);}get['show'](){const _0x3023c0=_0x43bf95;return this[_0x3023c0(0x850)];}get['layerEvent'](){const _0xf2abac=_0x43bf95;return this[_0xf2abac(0x6ee)];}set['attr'](_0xc2a477){const _0x7eddb=_0x43bf95;this[_0x7eddb(0xa0b)]=_0xc2a477;}get['attr'](){const _0x214cbf=_0x43bf95;return this[_0x214cbf(0xa0b)];}get[_0x43bf95(0x988)](){const _0x4ec443=_0x43bf95;return this[_0x4ec443(0x558)];}['_addedHook'](){}[_0x43bf95(0x32a)](){}[_0x43bf95(0x84d)](_0x523cc3){const _0x5af9d0=_0x43bf95;this[_0x5af9d0(0x3f7)]=_0x523cc3,this['_delegate']&&(this['_delegate']instanceof _0x34d1e5[_0x5af9d0(0x7aa)]['PrimitiveCollection']?this['_isGround']?this[_0x5af9d0(0x3f7)][_0x5af9d0(0x148)]['groundPrimitives'][_0x5af9d0(0x45f)](this['_delegate']):this['_viewer'][_0x5af9d0(0x148)][_0x5af9d0(0x2d5)][_0x5af9d0(0x45f)](this['_delegate']):this[_0x5af9d0(0xaa1)]instanceof _0x34d1e5[_0x5af9d0(0x7aa)][_0x5af9d0(0x4c9)]?this['_viewer']['imageryLayers']['add'](this[_0x5af9d0(0xaa1)]):this[_0x5af9d0(0x3f7)][_0x5af9d0(0x268)][_0x5af9d0(0x45f)](this[_0x5af9d0(0xaa1)]),this[_0x5af9d0(0x945)]&&this['_addedHook'](),this[_0x5af9d0(0x558)]=_0x4075ae['ADDED']);}[_0x43bf95(0x526)](){const _0x576e69=_0x43bf95;this['_delegate']&&this['_viewer']&&(this[_0x576e69(0x365)]={},this[_0x576e69(0xaa1)]instanceof _0x34d1e5['Cesium']['PrimitiveCollection']?(this[_0x576e69(0xaa1)]['removeAll'](),this['_isGround']?this['_viewer'][_0x576e69(0x148)]['groundPrimitives'][_0x576e69(0x109)](this[_0x576e69(0xaa1)]):this[_0x576e69(0x3f7)]['scene'][_0x576e69(0x2d5)]['remove'](this[_0x576e69(0xaa1)])):this[_0x576e69(0xaa1)]instanceof _0x34d1e5['Cesium'][_0x576e69(0x4c9)]?this[_0x576e69(0x3f7)]['imageryLayers'][_0x576e69(0x109)](this[_0x576e69(0xaa1)],!0x1):this['_delegate']instanceof Promise?(this[_0x576e69(0xaa1)][_0x576e69(0x379)](_0x322c05=>{_0x322c05['entities']['removeAll']();}),this['_viewer']['dataSources']['remove'](this[_0x576e69(0xaa1)])):(this['_delegate'][_0x576e69(0x1f6)]&&this[_0x576e69(0xaa1)][_0x576e69(0x1f6)][_0x576e69(0x207)](),this[_0x576e69(0x3f7)][_0x576e69(0x268)]['remove'](this[_0x576e69(0xaa1)])),this[_0x576e69(0x32a)]&&this['_removedHook'](),this['_state']=_0x4075ae[_0x576e69(0x947)]);}[_0x43bf95(0x449)](_0x1bcd82){const _0x3a145d=_0x43bf95;this['_cache'][_0x3a145d(0x373)](_0x1bcd82[_0x3a145d(0x4a6)])||(this['_cache'][_0x1bcd82['overlayId']]=_0x1bcd82,this[_0x3a145d(0xaa1)]&&_0x1bcd82[_0x3a145d(0xa4f)](_0x19c032[_0x3a145d(0x123)],this),this[_0x3a145d(0x558)]===_0x4075ae['CLEARED']&&(this[_0x3a145d(0x558)]=_0x4075ae[_0x3a145d(0xa0f)]));}[_0x43bf95(0x8d2)](_0x5094ae){const _0x55a063=_0x43bf95;this['_cache'][_0x55a063(0x373)](_0x5094ae[_0x55a063(0x4a6)])&&(this[_0x55a063(0xaa1)]&&_0x5094ae['fire'](_0x19c032[_0x55a063(0x6d8)],this),delete this[_0x55a063(0x365)][_0x5094ae[_0x55a063(0x4a6)]]);}[_0x43bf95(0x75e)](_0x221be1){const _0x39c727=_0x43bf95;return this[_0x39c727(0x449)](_0x221be1),this;}['addOverlays'](_0x17d0e1){return Array['isArray'](_0x17d0e1)&&_0x17d0e1['forEach'](_0x23c508=>{const _0x229b25=_0xf114;this[_0x229b25(0x449)](_0x23c508);}),this;}[_0x43bf95(0x9f3)](_0x71644d){return this['_removeOverlay'](_0x71644d),this;}['getOverlay'](_0x146c25){const _0x3a5f58=_0x43bf95;return this[_0x3a5f58(0x365)][_0x146c25]||void 0x0;}[_0x43bf95(0x33a)](_0x5bee83){const _0x45fe39=_0x43bf95;let _0x1f3d52;return Object[_0x45fe39(0x6f9)](this[_0x45fe39(0x365)])[_0x45fe39(0x2de)](_0x8c14b4=>{const _0x32249e=_0x45fe39;this['_cache'][_0x8c14b4]['id']===_0x5bee83&&(_0x1f3d52=this[_0x32249e(0x365)][_0x8c14b4]);}),_0x1f3d52;}[_0x43bf95(0x825)](_0x47eb93,_0x4207a7){const _0x2ebab6=_0x43bf95;let _0x5341f4=[];return this[_0x2ebab6(0x1f3)](_0x53114c=>{const _0x3d4495=_0x2ebab6;_0x53114c[_0x3d4495(0x2f0)][_0x47eb93]===_0x4207a7&&_0x5341f4[_0x3d4495(0xb3)](_0x53114c);},this),_0x5341f4;}['eachOverlay'](_0x5c415d,_0x141e58){const _0x39e4e9=_0x43bf95;return Object['keys'](this[_0x39e4e9(0x365)])[_0x39e4e9(0x2de)](_0x1c0069=>{const _0xaf8b99=_0x39e4e9;_0x5c415d&&_0x5c415d[_0xaf8b99(0x7a4)](_0x141e58||this,this[_0xaf8b99(0x365)][_0x1c0069]);}),this;}[_0x43bf95(0x52d)](){const _0x4ae668=_0x43bf95;let _0x567717=[];return Object['keys'](this['_cache'])[_0x4ae668(0x2de)](_0x378a23=>{const _0x335d00=_0x4ae668;_0x567717[_0x335d00(0xb3)](this['_cache'][_0x378a23]);}),_0x567717;}['clear'](){}[_0x43bf95(0x109)](){const _0x2eabae=_0x43bf95;this[_0x2eabae(0x3f7)]&&this[_0x2eabae(0x3f7)]['removeLayer'](this);}[_0x43bf95(0x305)](_0x159245){const _0x2170da=_0x43bf95;return _0x159245!=null&&_0x159245[_0x2170da(0x4ea)]&&_0x159245[_0x2170da(0x4ea)](this),this;}[_0x43bf95(0x5db)](_0x2ce45a){}['on'](_0x124860,_0x5a74b7,_0x42a619){const _0x561b15=_0x43bf95;return this[_0x561b15(0x6ee)]['on'](_0x124860,_0x5a74b7,_0x42a619||this),this;}[_0x43bf95(0x24d)](_0x44060a,_0x1609c1,_0x59ee21){const _0x742346=_0x43bf95;return this['_layerEvent'][_0x742346(0x24d)](_0x44060a,_0x1609c1,_0x59ee21||this),this;}[_0x43bf95(0xa4f)](_0x3f92aa,_0xc729a0){const _0x42ffc0=_0x43bf95;return this[_0x42ffc0(0x6ee)][_0x42ffc0(0xa4f)](_0x3f92aa,_0xc729a0),this;}static[_0x43bf95(0x545)](_0x265b72){const _0x4b4c7f=_0x43bf95;_0x265b72&&(_0x250406[_0x265b72[_0x4b4c7f(0xa04)]()]=_0x265b72[_0x4b4c7f(0x671)]());}static[_0x43bf95(0x7b6)](_0x5a82df){const _0x37b8dc=_0x43bf95;return _0x250406[_0x5a82df[_0x37b8dc(0xa04)]()]||void 0x0;}},_0x49dd70=_0x40aee2,_0xe9018a=class{constructor(_0x36225c){const _0x56ab4a=_0x43bf95;this[_0x56ab4a(0x20a)]=_0x36225c||_0x3f7522[_0x56ab4a(0x3ef)](),this['_cache']={},this[_0x56ab4a(0x850)]=!0x0,this[_0x56ab4a(0x3f7)]=void 0x0,this[_0x56ab4a(0x9d0)]=new _0x146d96(),this['_layerGroupEvent']['on'](_0x2a0e44['ADD'],this[_0x56ab4a(0x84d)],this),this[_0x56ab4a(0x9d0)]['on'](_0x2a0e44[_0x56ab4a(0x6d8)],this[_0x56ab4a(0x526)],this),this[_0x56ab4a(0x558)]=_0x4075ae[_0x56ab4a(0x5d2)];}get['id'](){const _0x12903b=_0x43bf95;return this[_0x12903b(0x20a)];}get[_0x43bf95(0x9cf)](){const _0x477b6d=_0x43bf95;return _0x49dd70[_0x477b6d(0x7b6)](_0x477b6d(0x8fe));}set[_0x43bf95(0x867)](_0xb47bdb){const _0x100dfb=_0x43bf95;this[_0x100dfb(0x850)]=_0xb47bdb,Object['keys'](this['_cache'])[_0x100dfb(0x2de)](_0x51282d=>{const _0x2b5e5b=_0x100dfb;this[_0x2b5e5b(0x365)][_0x51282d][_0x2b5e5b(0x867)]=this['_show'];});}get[_0x43bf95(0x867)](){const _0x3d22a6=_0x43bf95;return this[_0x3d22a6(0x850)];}get['layerGroupEvent'](){return this['_layerGroupEvent'];}get[_0x43bf95(0x988)](){const _0x4b8d26=_0x43bf95;return this[_0x4b8d26(0x558)];}[_0x43bf95(0x84d)](_0x19c607){const _0xa7b592=_0x43bf95;this[_0xa7b592(0x3f7)]=_0x19c607,Object[_0xa7b592(0x6f9)](this[_0xa7b592(0x365)])['forEach'](_0x2b4e0d=>{const _0x1a23ff=_0xa7b592;this[_0x1a23ff(0x3f7)][_0x1a23ff(0x4ea)](this[_0x1a23ff(0x365)][_0x2b4e0d]);}),this['_state']=_0x4075ae['ADDED'];}[_0x43bf95(0x526)](){const _0x55f174=_0x43bf95;Object[_0x55f174(0x6f9)](this['_cache'])[_0x55f174(0x2de)](_0x517c02=>{const _0x1ed3c7=_0x55f174;this[_0x1ed3c7(0x3f7)]&&this[_0x1ed3c7(0x3f7)][_0x1ed3c7(0x2a6)](this['_cache'][_0x517c02]);}),this['_cache']={},this[_0x55f174(0x558)]=_0x4075ae['REMOVED'];}[_0x43bf95(0x4ea)](_0x470c2c){const _0x51a1b2=_0x43bf95;return Object(this['_cache'])[_0x51a1b2(0x373)](_0x470c2c['id'])||(this[_0x51a1b2(0x365)][_0x470c2c['id']]=_0x470c2c,this[_0x51a1b2(0x3f7)]&&this['_viewer'][_0x51a1b2(0x4ea)](_0x470c2c)),this;}['removeLayer'](_0x2fd1d9){const _0x292c09=_0x43bf95;return Object(this[_0x292c09(0x365)])[_0x292c09(0x373)](_0x2fd1d9['id'])&&(this[_0x292c09(0x3f7)]&&this[_0x292c09(0x3f7)][_0x292c09(0x2a6)](_0x2fd1d9),delete this[_0x292c09(0x365)][_0x2fd1d9['id']]),this;}['getLayer'](_0x452cea){return this['_cache'][_0x452cea]||void 0x0;}[_0x43bf95(0x89c)](){const _0x2a8b41=_0x43bf95;let _0xee2a99=[];return Object[_0x2a8b41(0x6f9)](this[_0x2a8b41(0x365)])[_0x2a8b41(0x2de)](_0x173281=>{const _0x33297c=_0x2a8b41;_0xee2a99[_0x33297c(0xb3)](this[_0x33297c(0x365)][_0x173281]);}),_0xee2a99;}[_0x43bf95(0x305)](_0x53625e){const _0x3b512f=_0x43bf95;return _0x53625e&&_0x53625e[_0x3b512f(0x19c)]&&_0x53625e['addLayerGroup'](this),this;}[_0x43bf95(0x109)](){const _0x43d9eb=_0x43bf95;return this['_viewer']&&this[_0x43d9eb(0x3f7)]['removeLayerGroup'](this),this;}};_0x49dd70[_0x43bf95(0x545)](_0x43bf95(0x8fe));var _0x538cdb=_0xe9018a,_0x3ed66f={'radius':0x3c,'maxZoom':0x19,'style':_0x43bf95(0xc6),'image':'','gradientColors':{0.0001:_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x7d2)][_0x43bf95(0x3ab)],0.001:_0x34d1e5['Cesium']['Color']['GREEN'],0.01:_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x7d2)][_0x43bf95(0x5be)],0.1:_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x7d2)][_0x43bf95(0x80b)]},'gradientImages':{},'showCount':!0x0,'fontSize':0xc,'clusterSize':0x10,'fontColor':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x7d2)][_0x43bf95(0x129)],'getCountOffset':_0xa9a92e=>({'x':-3.542857*String(_0xa9a92e)[_0x43bf95(0x6a2)]+1.066667,'y':String(_0xa9a92e)[_0x43bf95(0x6a2)]>0x3?0x5:0x4})},_0x42641d=class extends _0x49dd70{constructor(_0x2c061d,_0x3daee3={}){const _0x4414c3=_0x43bf95;super(_0x2c061d),this['_delegate']=new _0x34d1e5[(_0x4414c3(0x7aa))][(_0x4414c3(0x7b4))](),this[_0x4414c3(0x674)]={..._0x3ed66f,..._0x3daee3},this[_0x4414c3(0xa39)]=this[_0x4414c3(0xaa1)][_0x4414c3(0x45f)](new _0x34d1e5[(_0x4414c3(0x7aa))][(_0x4414c3(0x6a4))]()),this['_labels']=this['_delegate'][_0x4414c3(0x45f)](new _0x34d1e5[(_0x4414c3(0x7aa))][(_0x4414c3(0x5bc))]()),this['_cluster']=new _0x34d1e5[(_0x4414c3(0x61d))]({'radius':this['_options'][_0x4414c3(0x28e)],'maxZoom':this[_0x4414c3(0x674)]['maxZoom']}),this[_0x4414c3(0x6c6)]=0x0,this[_0x4414c3(0x6ca)]=void 0x0,this[_0x4414c3(0x2c4)]=null,this[_0x4414c3(0x558)]=_0x4075ae[_0x4414c3(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x3fdb3f=_0x43bf95;return _0x49dd70[_0x3fdb3f(0x7b6)](_0x3fdb3f(0x180));}[_0x43bf95(0x449)](_0x234677){}[_0x43bf95(0x8d2)](_0xe73c69){}[_0x43bf95(0x9b4)](_0x4204e9,_0x749084){const _0x87952=_0x43bf95;let _0x28a687=this[_0x87952(0x674)][_0x87952(0x821)]*(String(_0x749084)['length']+0x1),_0x127e31=_0x4204e9[_0x87952(0x57a)]()+'-'+_0x749084;if(!this[_0x87952(0x365)][_0x127e31]){let _0x475a0b=document[_0x87952(0x7dc)]('canvas');_0x475a0b[_0x87952(0x371)]=_0x28a687,_0x475a0b[_0x87952(0x795)]=_0x28a687;let _0x223946=_0x475a0b[_0x87952(0x7f0)]('2d');_0x223946[_0x87952(0x7d7)](),_0x223946[_0x87952(0x86a)](_0x28a687/0x18,_0x28a687/0x18),_0x223946[_0x87952(0x2fa)]=_0x4204e9['withAlpha'](0.2)[_0x87952(0x57a)](),_0x223946['beginPath'](),_0x223946['arc'](0xc,0xc,0x9,0x0,0x2*Math['PI']),_0x223946['closePath'](),_0x223946['fill'](),_0x223946[_0x87952(0x9b6)](),_0x223946[_0x87952(0x214)](0xc,0xc,0x6,0x0,0x2*Math['PI']),_0x223946[_0x87952(0x2fa)]=_0x4204e9['toCssColorString'](),_0x223946[_0x87952(0x640)](),_0x223946[_0x87952(0x605)](),_0x223946[_0x87952(0x347)](),this[_0x87952(0x365)][_0x127e31]=_0x475a0b[_0x87952(0x578)]();}return this[_0x87952(0x365)][_0x127e31];}[_0x43bf95(0x5a6)](_0xd33376,_0x554917){const _0x5e40e6=_0x43bf95;let _0xa538c=this[_0x5e40e6(0x674)][_0x5e40e6(0x821)]*(String(_0x554917)[_0x5e40e6(0x6a2)]+0x1),_0x55de7a=_0xd33376[_0x5e40e6(0x57a)]()+'-'+_0x554917,_0x4954a8=-Math['PI']/0xc,_0x2f30fd=Math['PI']/0x2,_0x1bee20=Math['PI']/0x6;if(!this['_cache'][_0x55de7a]){let _0x54138a=document[_0x5e40e6(0x7dc)](_0x5e40e6(0x790));_0x54138a[_0x5e40e6(0x371)]=_0xa538c,_0x54138a[_0x5e40e6(0x795)]=_0xa538c;let _0x3086c9=_0x54138a[_0x5e40e6(0x7f0)]('2d');_0x3086c9[_0x5e40e6(0x7d7)](),_0x3086c9['scale'](_0xa538c/0x18,_0xa538c/0x18),_0x3086c9['beginPath'](),_0x3086c9[_0x5e40e6(0x214)](0xc,0xc,0x6,0x0,0x2*Math['PI']),_0x3086c9[_0x5e40e6(0x2fa)]=_0xd33376[_0x5e40e6(0x57a)](),_0x3086c9[_0x5e40e6(0x605)](),_0x3086c9[_0x5e40e6(0x640)](),_0x3086c9[_0x5e40e6(0x907)]=0x2;for(let _0x2e0792=0x0;_0x2e0792<0x3;_0x2e0792++)_0x3086c9[_0x5e40e6(0x9b6)](),_0x3086c9[_0x5e40e6(0x214)](0xc,0xc,0x8,_0x4954a8,_0x4954a8+_0x2f30fd,!0x1),_0x3086c9['strokeStyle']=_0xd33376[_0x5e40e6(0x8e4)](0.4)[_0x5e40e6(0x57a)](),_0x3086c9[_0x5e40e6(0x16e)](),_0x3086c9[_0x5e40e6(0x214)](0xc,0xc,0xb,_0x4954a8,_0x4954a8+_0x2f30fd,!0x1),_0x3086c9[_0x5e40e6(0x4e6)]=_0xd33376[_0x5e40e6(0x8e4)](0.2)[_0x5e40e6(0x57a)](),_0x3086c9[_0x5e40e6(0x16e)](),_0x3086c9['closePath'](),_0x4954a8=_0x4954a8+_0x2f30fd+_0x1bee20;_0x3086c9[_0x5e40e6(0x347)](),this[_0x5e40e6(0x365)][_0x55de7a]=_0x54138a[_0x5e40e6(0x578)]();}return this[_0x5e40e6(0x365)][_0x55de7a];}[_0x43bf95(0x23e)](_0x396860){const _0x116dc3=_0x43bf95;let _0x2de85a=_0x396860/this[_0x116dc3(0x6c6)],_0x3d3158;if(this[_0x116dc3(0x674)]['style']==='custom'){let _0x2b43a5=Object[_0x116dc3(0x6f9)](this[_0x116dc3(0x674)][_0x116dc3(0x29d)])[_0x116dc3(0xaab)]((_0x5eacbc,_0x32abea)=>Number(_0x5eacbc)-Number(_0x32abea));for(let _0xa45183=_0x2b43a5[_0x116dc3(0x6a2)]-0x1;_0xa45183>=0x0;_0xa45183--)if(_0x2de85a>=Number(_0x2b43a5[_0xa45183])){_0x3d3158=this['_options'][_0x116dc3(0x29d)][_0x2b43a5[_0xa45183]];break;}_0x3d3158||(_0x3d3158=this[_0x116dc3(0x674)]['gradientImages'][_0x2b43a5[0x0]]);}else{let _0x3e790d=Object[_0x116dc3(0x6f9)](this[_0x116dc3(0x674)][_0x116dc3(0x2b8)])[_0x116dc3(0xaab)]((_0x1559de,_0x13a133)=>Number(_0x1559de)-Number(_0x13a133)),_0x46d5ae;for(let _0x25f6a6=_0x3e790d[_0x116dc3(0x6a2)]-0x1;_0x25f6a6>=0x0;_0x25f6a6--)if(_0x2de85a>=Number(_0x3e790d[_0x25f6a6])){_0x46d5ae=this[_0x116dc3(0x674)][_0x116dc3(0x2b8)][_0x3e790d[_0x25f6a6]];break;}_0x46d5ae||(_0x46d5ae=this[_0x116dc3(0x674)][_0x116dc3(0x2b8)][_0x3e790d[0x0]]),_0x3d3158=this[_0x116dc3(0x674)]['style']===_0x116dc3(0xc6)?this[_0x116dc3(0x9b4)](_0x46d5ae,_0x396860):this['_getClusteringImage'](_0x46d5ae,_0x396860);}return _0x3d3158;}[_0x43bf95(0x2db)](_0x203874){const _0x3f5e47=_0x43bf95;let _0x2b1906=_0x34d1e5[_0x3f5e47(0x7aa)]['getTimestamp']();if(this[_0x3f5e47(0x2c4)]&&_0x2b1906-this[_0x3f5e47(0x2c4)]<=0x3e8)return;this[_0x3f5e47(0x2c4)]=_0x2b1906,this[_0x3f5e47(0x365)]={},this['_billboards'][_0x3f5e47(0x207)](),this[_0x3f5e47(0x1c3)]['removeAll']();let _0x2226ab=this['_viewer'][_0x3f5e47(0x698)][_0x3f5e47(0x23f)]();_0x2226ab||(_0x2226ab=this[_0x3f5e47(0x3f7)][_0x3f5e47(0x619)]),this[_0x3f5e47(0x6c6)]&&this[_0x3f5e47(0x546)][_0x3f5e47(0xa1d)]([_0x34d1e5[_0x3f5e47(0x7aa)][_0x3f5e47(0x72b)][_0x3f5e47(0x438)](_0x2226ab['west']),_0x34d1e5[_0x3f5e47(0x7aa)]['Math']['toDegrees'](_0x2226ab[_0x3f5e47(0x35e)]),_0x34d1e5[_0x3f5e47(0x7aa)][_0x3f5e47(0x72b)][_0x3f5e47(0x438)](_0x2226ab[_0x3f5e47(0x147)]),_0x34d1e5[_0x3f5e47(0x7aa)][_0x3f5e47(0x72b)][_0x3f5e47(0x438)](_0x2226ab['north'])],this[_0x3f5e47(0x3f7)][_0x3f5e47(0x525)])[_0x3f5e47(0x2de)](_0x21813d=>{const _0x12055a=_0x3f5e47;let _0xc908b5=_0x3f7522['uuid']();if(_0x21813d[_0x12055a(0x66f)][_0x12055a(0x180)]){let _0x14fe7b=_0x21813d[_0x12055a(0x66f)][_0x12055a(0x3bd)],_0x5b63c5=this[_0x12055a(0xa39)]['add']({'position':_0x34d1e5[_0x12055a(0x7aa)][_0x12055a(0x982)][_0x12055a(0x81e)](+_0x21813d[_0x12055a(0x10a)]['coordinates'][0x0],+_0x21813d[_0x12055a(0x10a)][_0x12055a(0x9d9)][0x1]),'image':this[_0x12055a(0x23e)](_0x14fe7b)});if(_0x5b63c5['layerId']=this['layerId'],_0x5b63c5[_0x12055a(0x4a6)]=_0xc908b5,_0x5b63c5['attr']={'count':_0x14fe7b},this[_0x12055a(0x365)][_0xc908b5]=_0x5b63c5,this['_options'][_0x12055a(0xd1)]){let _0x12bc18=this[_0x12055a(0x1c3)][_0x12055a(0x45f)]({'position':_0x34d1e5['Cesium'][_0x12055a(0x982)]['fromDegrees'](+_0x21813d[_0x12055a(0x10a)][_0x12055a(0x9d9)][0x0],+_0x21813d['geometry'][_0x12055a(0x9d9)][0x1]),'text':String(_0x14fe7b),'font':this[_0x12055a(0x674)][_0x12055a(0x986)]+_0x12055a(0x772),'disableDepthTestDistance':Number[_0x12055a(0x1fb)],'fillColor':this[_0x12055a(0x674)]['fontColor'],'scale':0.8,'pixelOffset':this[_0x12055a(0x674)]['getCountOffset'](_0x14fe7b)});_0x12bc18[_0x12055a(0x4c3)]=this[_0x12055a(0x4c3)],_0x12bc18['overlayId']=_0xc908b5,_0x12bc18[_0x12055a(0x2f0)]={'count':_0x14fe7b},this[_0x12055a(0x365)][_0xc908b5]=_0x12bc18;}}else{let _0x23fda3=this[_0x12055a(0xa39)]['add']({'position':_0x34d1e5[_0x12055a(0x7aa)][_0x12055a(0x982)][_0x12055a(0x81e)](+_0x21813d[_0x12055a(0x10a)]['coordinates'][0x0],+_0x21813d['geometry'][_0x12055a(0x9d9)][0x1]),'image':this[_0x12055a(0x674)][_0x12055a(0x6bd)],..._0x21813d[_0x12055a(0x66f)][_0x12055a(0x6a9)]});_0x23fda3['layerId']=this[_0x12055a(0x4c3)],_0x23fda3['overlayId']=_0xc908b5,_0x23fda3[_0x12055a(0x2f0)]=_0x21813d[_0x12055a(0x66f)],this[_0x12055a(0x365)][_0xc908b5]=_0x23fda3;}});}[_0x43bf95(0x945)](){const _0x16057e=_0x43bf95;this['_changedRemoveCallback']=this[_0x16057e(0x3f7)][_0x16057e(0x698)][_0x16057e(0x609)][_0x16057e(0x278)](this[_0x16057e(0x2db)],this);}[_0x43bf95(0x32a)](){const _0x4b079b=_0x43bf95;this[_0x4b079b(0x6ca)]&&this['_changedRemoveCallback']();}[_0x43bf95(0xa6a)](_0x40f462=[]){const _0x5431dc=_0x43bf95;return _0x40f462['length']&&(this[_0x5431dc(0x6c6)]=_0x40f462['length'],this[_0x5431dc(0x546)]['load'](_0x40f462[_0x5431dc(0x127)](_0x222979=>{const _0x2a0bda=_0x5431dc;let _0x24701a=_0x16f48b[_0x2a0bda(0x81a)](_0x222979);return{'type':_0x2a0bda(0x5e5),'geometry':{'type':'Point','coordinates':[_0x24701a[_0x2a0bda(0x598)],_0x24701a[_0x2a0bda(0x941)]]},'properties':_0x222979[_0x2a0bda(0x2f0)]||{}};}))),this;}[_0x43bf95(0x90d)](){const _0xf961ea=_0x43bf95;return this['_cache']={},this[_0xf961ea(0x6c6)]=0x0,this[_0xf961ea(0x558)]=_0x4075ae[_0xf961ea(0x295)],this;}};_0x49dd70['registerType'](_0x43bf95(0x180));var _0x1967a7=_0x42641d,_0x3c03b8=class extends _0x49dd70{constructor(_0x364ab4,_0x55388a='',_0x30aed7={}){const _0xf6a626=_0x43bf95;super(_0x364ab4),this[_0xf6a626(0xaa1)]=_0x34d1e5[_0xf6a626(0x7aa)]['CzmlDataSource']['load'](_0x55388a,_0x30aed7),this['_state']=_0x4075ae[_0xf6a626(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x47a041=_0x43bf95;return _0x49dd70[_0x47a041(0x7b6)](_0x47a041(0x7af));}set[_0x43bf95(0x867)](_0x25317a){const _0xac29df=_0x43bf95;this[_0xac29df(0x850)]=_0x25317a,this[_0xac29df(0xaa1)]&&this['_delegate'][_0xac29df(0x379)](_0x576c03=>{const _0x32fc13=_0xac29df;_0x576c03[_0x32fc13(0x867)]=this[_0x32fc13(0x850)];});}get['show'](){const _0x527b8a=_0x43bf95;return this[_0x527b8a(0x850)];}['eachOverlay'](_0x6c9491,_0x2db486){const _0x427d24=_0x43bf95;if(this[_0x427d24(0xaa1)])return this[_0x427d24(0xaa1)]['then'](_0x2ec43c=>{const _0x2f9608=_0x427d24;_0x2ec43c['entities']['values'][_0x2f9608(0x2de)](_0x4a5458=>{_0x6c9491['call'](_0x2db486,_0x4a5458);});}),this;}};_0x49dd70[_0x43bf95(0x545)](_0x43bf95(0x7af));var _0x53d123=_0x3c03b8,_0x1f41ee=class extends _0x49dd70{constructor(_0x34378d){const _0x18df61=_0x43bf95;super(_0x34378d),this[_0x18df61(0xaa1)]=new _0x34d1e5['Cesium']['CustomDataSource'](_0x34378d),this[_0x18df61(0x558)]=_0x4075ae[_0x18df61(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x1e6318=_0x43bf95;return _0x49dd70[_0x1e6318(0x7b6)](_0x1e6318(0x8af));}[_0x43bf95(0x90d)](){const _0x3fb83c=_0x43bf95;return this[_0x3fb83c(0xaa1)][_0x3fb83c(0x1f6)]&&this['_delegate'][_0x3fb83c(0x1f6)][_0x3fb83c(0x207)](),this[_0x3fb83c(0x365)]={},this[_0x3fb83c(0x558)]=_0x4075ae[_0x3fb83c(0x295)],this;}};_0x49dd70[_0x43bf95(0x545)](_0x43bf95(0x8af));var _0x1b565f=_0x1f41ee,_0x554701=class extends _0x49dd70{constructor(_0x3bbbe7){const _0x43ed85=_0x43bf95;super(_0x3bbbe7),this['_delegate']=new _0x34d1e5[(_0x43ed85(0x7aa))][(_0x43ed85(0x668))](_0x3bbbe7),this['_state']=_0x4075ae[_0x43ed85(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x22eac0=_0x43bf95;return _0x49dd70[_0x22eac0(0x7b6)](_0x22eac0(0x211));}['clear'](){const _0x3a9976=_0x43bf95;return this[_0x3a9976(0xaa1)][_0x3a9976(0x1f6)]&&this[_0x3a9976(0xaa1)][_0x3a9976(0x1f6)]['removeAll'](),this['_cache']={},this[_0x3a9976(0x558)]=_0x4075ae['CLEARED'],this;}};_0x49dd70[_0x43bf95(0x545)](_0x43bf95(0x211));var _0x6343d4=_0x554701,_0x566ada={'name':'','count':0xa,'maximumLevel':0x15,'dataProperty':'','callback':()=>null},_0x32b331=class extends _0x49dd70{constructor(_0x29e863,_0x27b10e,_0x31f1eb={}){const _0x5dd17f=_0x43bf95;super(_0x29e863),this['_url']=_0x27b10e,this[_0x5dd17f(0x674)]={..._0x566ada,..._0x31f1eb},this[_0x5dd17f(0x14e)]={},this[_0x5dd17f(0x844)]=0x100,this['_tileHeight']=0x100,this[_0x5dd17f(0xd0)]=this[_0x5dd17f(0x674)][_0x5dd17f(0x777)],this['_tilingScheme']=this[_0x5dd17f(0x674)][_0x5dd17f(0xd2)]||new _0x34d1e5[(_0x5dd17f(0x7aa))][(_0x5dd17f(0x2ba))](),this['_rectangle']=this[_0x5dd17f(0xa08)][_0x5dd17f(0xc8)],this['_credit']=void 0x0,this[_0x5dd17f(0x366)]=void 0x0;for(let _0x2ea027=0x0;_0x2ea027<this[_0x5dd17f(0x777)];_0x2ea027++)this[_0x5dd17f(0x14e)][String(_0x2ea027)]=new _0x6343d4(_0x29e863+'-grid-'+_0x2ea027);this[_0x5dd17f(0x3f7)]=void 0x0,this[_0x5dd17f(0x2cc)]=void 0x0,this[_0x5dd17f(0x345)]=document[_0x5dd17f(0x7dc)](_0x5dd17f(0x790)),this['_imagery'][_0x5dd17f(0x371)]=this[_0x5dd17f(0x844)],this['_imagery'][_0x5dd17f(0x795)]=this[_0x5dd17f(0x760)],this[_0x5dd17f(0x558)]=_0x4075ae[_0x5dd17f(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x15aa9d=_0x43bf95;return _0x49dd70[_0x15aa9d(0x7b6)](_0x15aa9d(0x572));}get[_0x43bf95(0x5e3)](){const _0x57f0f0=_0x43bf95;return this[_0x57f0f0(0x164)];}set['show'](_0x3aa63a){const _0x1ccda0=_0x43bf95;this[_0x1ccda0(0x850)]=_0x3aa63a,Object[_0x1ccda0(0x6f9)](this[_0x1ccda0(0x14e)])['forEach'](_0x540869=>{const _0x13aed3=_0x1ccda0;this[_0x13aed3(0x14e)][_0x540869][_0x13aed3(0x867)]=_0x3aa63a;});}get[_0x43bf95(0x867)](){const _0xacbfa1=_0x43bf95;return this[_0xacbfa1(0x850)];}get[_0x43bf95(0x14d)](){const _0x5f0b5d=_0x43bf95;return this[_0x5f0b5d(0x366)];}get['tileWidth'](){const _0x17c90c=_0x43bf95;if(!this[_0x17c90c(0x3d5)])throw new _0x34d1e5[(_0x17c90c(0x7aa))][(_0x17c90c(0x7b0))](_0x17c90c(0x3bb));return this[_0x17c90c(0x844)];}get[_0x43bf95(0x1f0)](){const _0x3267c6=_0x43bf95;if(!this[_0x3267c6(0x3d5)])throw new _0x34d1e5[(_0x3267c6(0x7aa))][(_0x3267c6(0x7b0))](_0x3267c6(0x956));return this[_0x3267c6(0x760)];}get['maximumLevel'](){const _0x2e5a2b=_0x43bf95;if(!this[_0x2e5a2b(0x3d5)])throw new _0x34d1e5[(_0x2e5a2b(0x7aa))][(_0x2e5a2b(0x7b0))](_0x2e5a2b(0x44b));return this['_maximumLevel'];}get[_0x43bf95(0xa4b)](){const _0x23e643=_0x43bf95;if(!this['ready'])throw new _0x34d1e5[(_0x23e643(0x7aa))][(_0x23e643(0x7b0))](_0x23e643(0x84e));return 0x0;}get[_0x43bf95(0xd2)](){const _0x1f821a=_0x43bf95;if(!this[_0x1f821a(0x3d5)])throw new _0x34d1e5[(_0x1f821a(0x7aa))][(_0x1f821a(0x7b0))](_0x1f821a(0x536));return this[_0x1f821a(0xa08)];}get[_0x43bf95(0xc8)](){const _0x5a877a=_0x43bf95;if(!this['ready'])throw new _0x34d1e5[(_0x5a877a(0x7aa))][(_0x5a877a(0x7b0))]('rectangle\x20must\x20not\x20be\x20called\x20before\x20the\x20imagery\x20provider\x20is\x20ready.');return this['_rectangle'];}get[_0x43bf95(0x3d5)](){const _0x40b549=_0x43bf95;return!!this[_0x40b549(0x164)];}get['credit'](){return this['_credit'];}get[_0x43bf95(0x750)](){return!0x0;}[_0x43bf95(0x84d)](_0x98a054){const _0x202bfa=_0x43bf95;this['_viewer']=_0x98a054,this[_0x202bfa(0x2cc)]=this[_0x202bfa(0x3f7)][_0x202bfa(0x22d)][_0x202bfa(0x248)](this),Object[_0x202bfa(0x6f9)](this['_levelLayers'])[_0x202bfa(0x2de)](_0x5c6eba=>{const _0x2a0786=_0x202bfa;this[_0x2a0786(0x3f7)][_0x2a0786(0x4ea)](this['_levelLayers'][_0x5c6eba]);}),this[_0x202bfa(0x558)]=_0x4075ae[_0x202bfa(0xa0f)];}['_onRemove'](){const _0x43bd21=_0x43bf95;this['_imageryLayer']&&this[_0x43bd21(0x3f7)][_0x43bd21(0x22d)][_0x43bd21(0x109)](this['_imageryLayer']),Object[_0x43bd21(0x6f9)](this[_0x43bd21(0x14e)])[_0x43bd21(0x2de)](_0x2ca730=>{const _0x51fd32=_0x43bd21;this[_0x51fd32(0x3f7)]['removeLayer'](this[_0x51fd32(0x14e)][_0x2ca730]);}),this[_0x43bd21(0x558)]=_0x4075ae[_0x43bd21(0x947)];}[_0x43bf95(0x3c8)](_0x479512,_0x3e28ee,_0xa3bbcc){}['requestImage'](_0x5233a1,_0x31fff8,_0x2ce0e6,_0x29eba4){const _0x36c653=_0x43bf95;let _0x442bb7=this[_0x36c653(0x14e)][String(_0x2ce0e6)],_0x59d7c6=this[_0x36c653(0xa08)][_0x36c653(0x676)](_0x5233a1,_0x31fff8,_0x2ce0e6);return this[_0x36c653(0x3f7)]&&_0x59d7c6&&_0x442bb7&&_0x34d1e5['Cesium'][_0x36c653(0x6e7)][_0x36c653(0x4d9)](_0x59d7c6,this[_0x36c653(0x3f7)]['viewBounds'])&&_0x34d1e5['Cesium']['Resource'][_0x36c653(0x320)]({'url':this[_0x36c653(0x164)],'queryParameters':{'minX':_0x34d1e5[_0x36c653(0x7aa)][_0x36c653(0x72b)][_0x36c653(0x438)](_0x59d7c6['west']),'minY':_0x34d1e5[_0x36c653(0x7aa)]['Math'][_0x36c653(0x438)](_0x59d7c6['south']),'maxX':_0x34d1e5[_0x36c653(0x7aa)]['Math']['toDegrees'](_0x59d7c6[_0x36c653(0x147)]),'maxY':_0x34d1e5[_0x36c653(0x7aa)][_0x36c653(0x72b)][_0x36c653(0x438)](_0x59d7c6[_0x36c653(0x3bf)]),'count':this[_0x36c653(0x674)][_0x36c653(0x565)]}})[_0x36c653(0x379)](_0x3181ce=>{const _0x87313e=_0x36c653;let _0x5eb3cf=_0x3181ce;if(this[_0x87313e(0x674)][_0x87313e(0x87a)]&&(_0x5eb3cf=_0x3181ce[this[_0x87313e(0x674)]['dataProperty']]),_0x5eb3cf&&_0x5eb3cf[_0x87313e(0x6a2)]){for(let _0x1f1722=_0x2ce0e6+0x3;_0x1f1722<this[_0x87313e(0xd0)];_0x1f1722++)this[_0x87313e(0x14e)][String(_0x1f1722)]&&this[_0x87313e(0x14e)][String(_0x1f1722)][_0x87313e(0x90d)]();_0x5eb3cf[_0x87313e(0x2de)](_0x220476=>{const _0x20e45b=_0x87313e;let _0x5ab124=this[_0x20e45b(0x674)]['callback'](_0x220476);_0x5ab124&&_0x442bb7[_0x20e45b(0x75e)](_0x5ab124);});}}),this[_0x36c653(0x345)];}[_0x43bf95(0x90d)](){const _0x3910df=_0x43bf95;Object[_0x3910df(0x6f9)](this[_0x3910df(0x14e)])['forEach'](_0x253a03=>{const _0x27feff=_0x3910df;this[_0x27feff(0x14e)][_0x253a03][_0x27feff(0x90d)]();}),this[_0x3910df(0x558)]=_0x4075ae['CLEARED'];}};_0x49dd70[_0x43bf95(0x545)](_0x43bf95(0x572));var _0x5a6ce5=_0x32b331,_0x6065e8={},_0x10d75a=_0x6065e8,_0x4794c9=class{constructor(){const _0x518c04=_0x43bf95;this['_id']=_0x3f7522[_0x518c04(0x3ef)](),this[_0x518c04(0x56a)]=_0x3f7522['uuid'](),this[_0x518c04(0xaa1)]=void 0x0,this[_0x518c04(0x761)]=void 0x0,this[_0x518c04(0x558)]=void 0x0,this[_0x518c04(0x850)]=!0x0,this['_style']={},this['_attr']={},this[_0x518c04(0x568)]=!0x1,this[_0x518c04(0x43a)]=[],this[_0x518c04(0x97e)]=new _0x501cef(),this[_0x518c04(0x97e)]['on'](_0x19c032[_0x518c04(0x123)],this[_0x518c04(0x84d)],this),this[_0x518c04(0x97e)]['on'](_0x19c032[_0x518c04(0x6d8)],this['_onRemove'],this);}get[_0x43bf95(0x4a6)](){return this['_id'];}get[_0x43bf95(0x9cf)](){return'';}set['id'](_0x1ccc8a){this['_bid']=_0x1ccc8a;}get['id'](){const _0x2563a6=_0x43bf95;return this[_0x2563a6(0x56a)];}set[_0x43bf95(0x867)](_0x49b0ea){const _0x387a84=_0x43bf95;this['_show']=_0x49b0ea,_0x3f7522[_0x387a84(0xa07)](this[_0x387a84(0xaa1)])?this[_0x387a84(0xaa1)][_0x387a84(0x379)](_0x1ed3e9=>{const _0x505b89=_0x387a84;_0x1ed3e9[_0x505b89(0x867)]=this[_0x505b89(0x850)];}):this[_0x387a84(0xaa1)]&&(this[_0x387a84(0xaa1)]['show']=this['_show']);}get[_0x43bf95(0x867)](){return this['_show'];}set[_0x43bf95(0x2f0)](_0x329e8a){const _0x5afd68=_0x43bf95;this[_0x5afd68(0xa0b)]=_0x329e8a;}get[_0x43bf95(0x2f0)](){const _0x49a086=_0x43bf95;return this[_0x49a086(0xa0b)];}set[_0x43bf95(0x1c4)](_0x58ac3c){const _0x46ed94=_0x43bf95;this[_0x46ed94(0x568)]=_0x58ac3c;}get[_0x43bf95(0x1c4)](){const _0x795fda=_0x43bf95;return this[_0x795fda(0x568)];}get['overlayEvent'](){return this['_overlayEvent'];}get['delegate'](){const _0x3756a6=_0x43bf95;return this[_0x3756a6(0xaa1)];}get['state'](){const _0x3c5a5d=_0x43bf95;return this[_0x3c5a5d(0x558)];}set[_0x43bf95(0x314)](_0x594204){const _0x3a9b11=_0x43bf95;this[_0x3a9b11(0x43a)]=_0x594204;}get[_0x43bf95(0x314)](){const _0x21e15e=_0x43bf95;return this[_0x21e15e(0x43a)];}[_0x43bf95(0x3e2)](_0x128e6c){const _0x3be27e=_0x43bf95;let _0x294e58;switch(_0x128e6c){case _0x3be27e(0xfd):_0x294e58=this['_layer'][_0x3be27e(0xb2)];break;case _0x3be27e(0x8ac):case _0x3be27e(0x9a5):_0x294e58=this['_layer'][_0x3be27e(0x62d)];break;case _0x3be27e(0x1b4):case'bounce_label_primitive':_0x294e58=this['_layer'][_0x3be27e(0x9e9)];break;case _0x3be27e(0x5c5):_0x294e58=this[_0x3be27e(0x761)][_0x3be27e(0x27a)];break;case _0x3be27e(0x6be):_0x294e58=this['_layer']['clouds'];break;default:break;}return _0x294e58;}[_0x43bf95(0x6a3)](){}[_0x43bf95(0x945)](){const _0x87913c=_0x43bf95;var _0x1fdd28;if(!this[_0x87913c(0xaa1)])return!0x1;this['_delegate']instanceof Promise?this[_0x87913c(0xaa1)][_0x87913c(0x379)](_0xd26b90=>{const _0x55c98b=_0x87913c;var _0x10e591;_0xd26b90[_0x55c98b(0x4c3)]=(_0x10e591=this['_layer'])==null?void 0x0:_0x10e591[_0x55c98b(0x4c3)],_0xd26b90[_0x55c98b(0x4a6)]=this['_id'];}):(this[_0x87913c(0xaa1)][_0x87913c(0x4c3)]=(_0x1fdd28=this[_0x87913c(0x761)])==null?void 0x0:_0x1fdd28[_0x87913c(0x4c3)],this['_delegate']['overlayId']=this['_id']);}['_removedHook'](){}[_0x43bf95(0x84d)](_0xd1bbcb){const _0x33c0f0=_0x43bf95;var _0x213f1a,_0x38b648,_0x48cc64,_0x20d95e;if(_0xd1bbcb){if(this[_0x33c0f0(0x761)]=_0xd1bbcb,this['_mountedHook']&&this[_0x33c0f0(0x6a3)](),(_0x38b648=(_0x213f1a=this[_0x33c0f0(0x761)])==null?void 0x0:_0x213f1a['delegate'])!=null&&_0x38b648[_0x33c0f0(0x1f6)]&&this[_0x33c0f0(0xaa1)])this['_layer']['delegate'][_0x33c0f0(0x1f6)][_0x33c0f0(0x45f)](this[_0x33c0f0(0xaa1)]);else{if((_0x20d95e=(_0x48cc64=this[_0x33c0f0(0x761)])==null?void 0x0:_0x48cc64['delegate'])!=null&&_0x20d95e[_0x33c0f0(0x45f)]){let _0x238934=this['_getLayerCollection'](this[_0x33c0f0(0x9cf)]);_0x238934?(this[_0x33c0f0(0xaa1)]&&(this['_delegate']=_0x238934['add'](this[_0x33c0f0(0xaa1)])),_0x3f7522['merge'](this[_0x33c0f0(0xaa1)],this['_style']),this[_0x33c0f0(0x96f)]&&this[_0x33c0f0(0x57b)]&&this['_layer'][_0x33c0f0(0x8ca)][_0x33c0f0(0x45f)](this)):_0x3f7522[_0x33c0f0(0xa07)](this['_delegate'])?this['_delegate'][_0x33c0f0(0x379)](_0x2ffea7=>{const _0x383456=_0x33c0f0;this[_0x383456(0x761)][_0x383456(0x8ca)]['add'](_0x2ffea7);}):this['update']&&this[_0x33c0f0(0x57b)]?this[_0x33c0f0(0x761)]['delegate'][_0x33c0f0(0x45f)](this):this['_delegate']&&this[_0x33c0f0(0x761)][_0x33c0f0(0x8ca)][_0x33c0f0(0x45f)](this['_delegate']);}}this['_addedHook']&&this[_0x33c0f0(0x945)](),this[_0x33c0f0(0x558)]=_0x4075ae[_0x33c0f0(0xa0f)];}}[_0x43bf95(0x526)](){const _0x4fb662=_0x43bf95;var _0x20a5b5,_0x10124f,_0x3f7388,_0x521613;if(this[_0x4fb662(0x761)]){if((_0x10124f=(_0x20a5b5=this[_0x4fb662(0x761)])==null?void 0x0:_0x20a5b5['delegate'])!=null&&_0x10124f['entities'])this['_layer'][_0x4fb662(0x8ca)][_0x4fb662(0x1f6)][_0x4fb662(0x109)](this[_0x4fb662(0xaa1)]);else{if((_0x521613=(_0x3f7388=this[_0x4fb662(0x761)])==null?void 0x0:_0x3f7388[_0x4fb662(0x8ca)])!=null&&_0x521613[_0x4fb662(0x109)]){let _0x3a27e3=this[_0x4fb662(0x3e2)](this['type']);_0x3a27e3?(this[_0x4fb662(0xaa1)]&&_0x3a27e3[_0x4fb662(0x109)](this[_0x4fb662(0xaa1)]),this[_0x4fb662(0x96f)]&&this['destroy']&&this[_0x4fb662(0x761)][_0x4fb662(0x8ca)]['remove'](this)):_0x3f7522[_0x4fb662(0xa07)](this[_0x4fb662(0xaa1)])?this[_0x4fb662(0xaa1)][_0x4fb662(0x379)](_0x59c44d=>{const _0x1887c7=_0x4fb662;this[_0x1887c7(0x761)][_0x1887c7(0x8ca)][_0x1887c7(0x109)](_0x59c44d);}):this['update']&&this['destroy']?this['_layer'][_0x4fb662(0x8ca)][_0x4fb662(0x109)](this):this['_delegate']&&this['_layer']['delegate']['remove'](this[_0x4fb662(0xaa1)]);}}this['_removedHook']&&this['_removedHook'](),this[_0x4fb662(0x558)]=_0x4075ae[_0x4fb662(0x947)];}}[_0x43bf95(0x610)](_0x52a182,_0x1dc709){const _0x2caab4=_0x43bf95;return this['_delegate']?(this[_0x2caab4(0xaa1)]instanceof _0x34d1e5[_0x2caab4(0x7aa)]['Entity']&&(this[_0x2caab4(0xaa1)]['label']={..._0x1dc709,'text':_0x52a182}),this):this;}[_0x43bf95(0x5db)](_0x46cbe9){return this;}[_0x43bf95(0x109)](){const _0x311ef7=_0x43bf95;return this[_0x311ef7(0x761)]&&this[_0x311ef7(0x761)][_0x311ef7(0x9f3)](this),this;}['addTo'](_0x5a421c){const _0xc2bf94=_0x43bf95;return _0x5a421c&&_0x5a421c[_0xc2bf94(0x75e)]&&_0x5a421c['addOverlay'](this),this;}['on'](_0x3585c5,_0x3b56da,_0x848a55){const _0x3e0be9=_0x43bf95;return this[_0x3e0be9(0x97e)]['on'](_0x3585c5,_0x3b56da,_0x848a55||this),this;}[_0x43bf95(0x24d)](_0x538415,_0x2af5dd,_0x1bece4){const _0x680d51=_0x43bf95;return this[_0x680d51(0x97e)][_0x680d51(0x24d)](_0x538415,_0x2af5dd,_0x1bece4||this),this;}[_0x43bf95(0xa4f)](_0x2344db,_0x512983){const _0x4906ee=_0x43bf95;return this['_overlayEvent'][_0x4906ee(0xa4f)](_0x2344db,_0x512983),this;}static[_0x43bf95(0x545)](_0x97a983){const _0x578610=_0x43bf95;_0x97a983&&(_0x10d75a[_0x97a983[_0x578610(0xa04)]()]=_0x97a983[_0x578610(0x671)]());}static['getOverlayType'](_0x4ddf74){return _0x10d75a[_0x4ddf74['toLocaleUpperCase']()]||void 0x0;}},_0x4f8204=_0x4794c9,_0x140fff=class extends _0x4f8204{constructor(_0x3f1f7b,_0x5b9184){const _0x4f261d=_0x43bf95;super(),this[_0x4f261d(0xaa1)]=new _0x34d1e5[(_0x4f261d(0x7aa))][(_0x4f261d(0x926))]({'billboard':{}}),this[_0x4f261d(0x691)]=_0x16f48b[_0x4f261d(0x81a)](_0x3f1f7b),this['_icon']=_0x5b9184,this[_0x4f261d(0x60b)]=[0x20,0x20],this[_0x4f261d(0x558)]=_0x4075ae[_0x4f261d(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x1daf05=_0x43bf95;return _0x4f8204[_0x1daf05(0x853)](_0x1daf05(0x69f));}set[_0x43bf95(0x9a7)](_0x58b008){const _0x2b873f=_0x43bf95;this[_0x2b873f(0x691)]=_0x16f48b[_0x2b873f(0x81a)](_0x58b008),this[_0x2b873f(0xaa1)][_0x2b873f(0x9a7)]=_0x5e5f93['transformWGS84ToCartesian'](this['_position']);}get[_0x43bf95(0x9a7)](){const _0x223ed7=_0x43bf95;return this[_0x223ed7(0x691)];}set[_0x43bf95(0x741)](_0x2ba1aa){const _0x144355=_0x43bf95;this[_0x144355(0x5a3)]=_0x2ba1aa,this['_delegate']['billboard']['image']=this[_0x144355(0x5a3)];}get[_0x43bf95(0x741)](){return this['_icon'];}set[_0x43bf95(0x729)](_0x51f4b8){const _0x1d094f=_0x43bf95;if(!Array[_0x1d094f(0x636)](_0x51f4b8))throw new Error(_0x1d094f(0x9c6));this[_0x1d094f(0x60b)]=_0x51f4b8,this['_delegate']['billboard']['width']=this['_size'][0x0]||0x20,this[_0x1d094f(0xaa1)][_0x1d094f(0x1cb)][_0x1d094f(0x795)]=this[_0x1d094f(0x60b)][0x1]||0x20;}get['size'](){const _0x2ee605=_0x43bf95;return this[_0x2ee605(0x60b)];}[_0x43bf95(0x6a3)](){const _0x5df224=_0x43bf95;this['position']=this['_position'],this[_0x5df224(0x741)]=this[_0x5df224(0x5a3)],this[_0x5df224(0x729)]=this[_0x5df224(0x60b)];}[_0x43bf95(0x610)](_0x12d1a9,_0x3d8bce){const _0x57f99b=_0x43bf95;return this[_0x57f99b(0xaa1)][_0x57f99b(0x5e7)]={..._0x3d8bce,'text':_0x12d1a9},this;}[_0x43bf95(0x5db)](_0x2097a2){const _0x5129d8=_0x43bf95;return!_0x2097a2||Object[_0x5129d8(0x6f9)](_0x2097a2)[_0x5129d8(0x6a2)]===0x0?this:(delete _0x2097a2['image']&&delete _0x2097a2['width']&&delete _0x2097a2[_0x5129d8(0x795)],_0x3f7522['merge'](this[_0x5129d8(0x9ca)],_0x2097a2),_0x3f7522[_0x5129d8(0x5da)](this[_0x5129d8(0xaa1)]['billboard'],_0x2097a2),this);}[_0x43bf95(0x2b4)](_0x4d64ca={}){const _0x9ff594=_0x43bf95;if(this[_0x9ff594(0x691)][_0x9ff594(0xa84)]>0x0&&!this[_0x9ff594(0xaa1)][_0x9ff594(0x10c)]){let _0xbeee04=this[_0x9ff594(0x691)][_0x9ff594(0x8fc)]();_0xbeee04[_0x9ff594(0xa84)]=_0x4d64ca[_0x9ff594(0x795)]||0x0,this[_0x9ff594(0xaa1)][_0x9ff594(0x10c)]={..._0x4d64ca,'positions':_0x5e5f93[_0x9ff594(0x999)]([_0xbeee04,this[_0x9ff594(0x691)]])};}return this;}[_0x43bf95(0x51d)](_0x127ec2,_0x3b6e8d={},_0x298ba6=0x0){const _0x308478=_0x43bf95;let _0x5da31d=0x0,_0x6c3c8=_0x298ba6;return this[_0x308478(0xaa1)]['ellipse']={..._0x3b6e8d,'semiMajorAxis':_0x127ec2,'semiMinorAxis':_0x127ec2,'stRotation':new _0x34d1e5['Cesium']['CallbackProperty'](()=>(_0x5da31d+=_0x6c3c8,(_0x5da31d>=0x168||_0x5da31d<=-0x168)&&(_0x5da31d=0x0),_0x5da31d),!0x1)},this;}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x69f));var _0xb0aeb0=_0x140fff,_0x544c81=class extends _0x4f8204{constructor(_0x23e74b,_0x593514){const _0x669f7f=_0x43bf95;super(),this['_delegate']=new _0x34d1e5[(_0x669f7f(0x7aa))][(_0x669f7f(0x926))]({'label':{}}),this['_position']=_0x16f48b[_0x669f7f(0x81a)](_0x23e74b),this[_0x669f7f(0x620)]=_0x593514,this[_0x669f7f(0x558)]=_0x4075ae[_0x669f7f(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0xfb698d=_0x43bf95;return _0x4f8204[_0xfb698d(0x853)](_0xfb698d(0x306));}set[_0x43bf95(0x9a7)](_0x3c9504){const _0x5c4663=_0x43bf95;this[_0x5c4663(0x691)]=_0x16f48b[_0x5c4663(0x81a)](_0x3c9504),this[_0x5c4663(0xaa1)][_0x5c4663(0x9a7)]=_0x5e5f93[_0x5c4663(0x432)](this['_position']);}get[_0x43bf95(0x9a7)](){const _0x2246f2=_0x43bf95;return this[_0x2246f2(0x691)];}set[_0x43bf95(0xd8)](_0xdca1d2){const _0x405427=_0x43bf95;this[_0x405427(0x620)]=_0xdca1d2,this['_delegate'][_0x405427(0x5e7)][_0x405427(0xd8)]=this[_0x405427(0x620)];}get[_0x43bf95(0xd8)](){return this['_text'];}[_0x43bf95(0x6a3)](){const _0x431d84=_0x43bf95;this[_0x431d84(0x9a7)]=this[_0x431d84(0x691)],this[_0x431d84(0xd8)]=this['_text'];}['setStyle'](_0x2b5bdd){const _0x116edb=_0x43bf95;return!_0x2b5bdd||Object[_0x116edb(0x6f9)](_0x2b5bdd)['length']===0x0?this:(delete _0x2b5bdd['text'],_0x3f7522[_0x116edb(0x5da)](this[_0x116edb(0x9ca)],_0x2b5bdd),_0x3f7522[_0x116edb(0x5da)](this['_delegate'][_0x116edb(0x5e7)],_0x2b5bdd),this);}['setVLine'](_0x3d59ee={}){const _0x5ba8bf=_0x43bf95;if(this[_0x5ba8bf(0x691)][_0x5ba8bf(0xa84)]>0x0&&!this[_0x5ba8bf(0xaa1)][_0x5ba8bf(0x10c)]){let _0x56ed3a=this[_0x5ba8bf(0x691)][_0x5ba8bf(0x8fc)]();_0x56ed3a[_0x5ba8bf(0xa84)]=_0x3d59ee[_0x5ba8bf(0x795)]||0x0,this['_delegate'][_0x5ba8bf(0x10c)]={..._0x3d59ee,'positions':_0x5e5f93['transformWGS84ArrayToCartesianArray']([_0x56ed3a,this[_0x5ba8bf(0x691)]])};}return this;}['setBottomCircle'](_0x466ce7,_0x1cb735={},_0x2409bd=0x0){const _0x19a7b2=_0x43bf95;let _0x3ab6e6=0x0,_0x6bc23f=_0x2409bd;return this['_delegate']['ellipse']={..._0x1cb735,'semiMajorAxis':_0x466ce7,'semiMinorAxis':_0x466ce7,'stRotation':new _0x34d1e5[(_0x19a7b2(0x7aa))][(_0x19a7b2(0x18c))](()=>(_0x3ab6e6+=_0x6bc23f,(_0x3ab6e6>=0x168||_0x3ab6e6<=-0x168)&&(_0x3ab6e6=0x0),_0x3ab6e6),!0x1)},this;}};_0x4f8204['registerType'](_0x43bf95(0x306));var _0x583d41=_0x544c81,_0x6cfeed=class extends _0x4f8204{constructor(){const _0x203e4c=_0x43bf95;super(),this['_startTime']=void 0x0,this[_0x203e4c(0x989)]=void 0x0,this['_sampledPosition']=new _0x34d1e5['Cesium']['SampledPositionProperty'](),this[_0x203e4c(0x365)]=[],this[_0x203e4c(0x992)]=0xa,this[_0x203e4c(0x558)]=_0x4075ae['INITIALIZED'];}set[_0x43bf95(0x230)](_0x2d6bd5){const _0x4802d7=_0x43bf95;this[_0x4802d7(0x992)]=_0x2d6bd5;}get['maxCacheSize'](){const _0x28ca85=_0x43bf95;return this[_0x28ca85(0x992)];}get[_0x43bf95(0x9a7)](){const _0x31449b=_0x43bf95;return _0x5e5f93[_0x31449b(0x30b)](this['_sampledPosition'][_0x31449b(0x4e7)](_0x34d1e5[_0x31449b(0x7aa)][_0x31449b(0xc3)][_0x31449b(0xaa6)]()));}[_0x43bf95(0x58c)](){const _0x5e565a=_0x43bf95;if(this['_cache'][_0x5e565a(0x6a2)]>this[_0x5e565a(0x992)]){let _0x291b7d=_0x34d1e5[_0x5e565a(0x7aa)][_0x5e565a(0xc3)][_0x5e565a(0x930)](this[_0x5e565a(0x365)][0x0],-0.2,new _0x34d1e5[(_0x5e565a(0x7aa))][(_0x5e565a(0xc3))]()),_0x1e2e9e=_0x34d1e5['Cesium'][_0x5e565a(0xc3)][_0x5e565a(0x930)](this[_0x5e565a(0x365)][this[_0x5e565a(0x365)]['length']-this[_0x5e565a(0x992)]],-0.2,new _0x34d1e5[(_0x5e565a(0x7aa))][(_0x5e565a(0xc3))]());this['_sampledPosition'][_0x5e565a(0x1d5)](new _0x34d1e5[(_0x5e565a(0x7aa))][(_0x5e565a(0xa62))]({'start':_0x291b7d,'stop':_0x1e2e9e})),this[_0x5e565a(0x365)][_0x5e565a(0xae)](0x0,this['_cache'][_0x5e565a(0x6a2)]-this[_0x5e565a(0x992)]);}}[_0x43bf95(0x301)](_0x5df736,_0x3e5d0f){const _0xcab45b=_0x43bf95;this[_0xcab45b(0x58c)]();let _0x32b6bb=_0x34d1e5[_0xcab45b(0x7aa)][_0xcab45b(0xc3)][_0xcab45b(0xaa6)](),_0x506073=_0x34d1e5[_0xcab45b(0x7aa)]['JulianDate'][_0xcab45b(0x930)](_0x32b6bb,_0x3e5d0f,new _0x34d1e5[(_0xcab45b(0x7aa))]['JulianDate']());return this['_sampledPosition'][_0xcab45b(0x31e)](_0x506073,_0x5e5f93[_0xcab45b(0x432)](_0x16f48b[_0xcab45b(0x81a)](_0x5df736))),this['_lastTime']=_0x506073,this['_cache']['push'](this[_0xcab45b(0x989)]),this;}[_0x43bf95(0x26a)](_0x5c6cf4){return this;}},_0x4462b3=_0x6cfeed,_0x2e2a9e=class extends _0x4462b3{constructor(_0x1c2539,_0x121426){const _0x758f46=_0x43bf95;super(),this['_position']=_0x16f48b[_0x758f46(0x81a)](_0x1c2539),this[_0x758f46(0x5a3)]=_0x121426,this['_delegate']=new _0x34d1e5[(_0x758f46(0x7aa))]['Entity']({'billboard':{}}),this[_0x758f46(0x558)]=_0x4075ae[_0x758f46(0x5d2)];}get['type'](){const _0x4ca4cd=_0x43bf95;return _0x4f8204['getOverlayType'](_0x4ca4cd(0x841));}set[_0x43bf95(0x741)](_0x5352c6){const _0x3a3e81=_0x43bf95;this[_0x3a3e81(0x5a3)]=_0x5352c6,this['_delegate'][_0x3a3e81(0x1cb)]['image']=this[_0x3a3e81(0x5a3)];}get[_0x43bf95(0x741)](){const _0x4bf15b=_0x43bf95;return this[_0x4bf15b(0x5a3)];}set[_0x43bf95(0x729)](_0x5ea50a){const _0x5887c3=_0x43bf95;if(!Array[_0x5887c3(0x636)](_0x5ea50a))throw new Error(_0x5887c3(0x421));this[_0x5887c3(0x60b)]=_0x5ea50a,this[_0x5887c3(0xaa1)][_0x5887c3(0x1cb)][_0x5887c3(0x371)]=this[_0x5887c3(0x60b)][0x0]||0x20,this[_0x5887c3(0xaa1)][_0x5887c3(0x1cb)][_0x5887c3(0x795)]=this['_size'][0x1]||0x20;}get['size'](){return this['_size'];}[_0x43bf95(0x6a3)](){const _0x5bc48f=_0x43bf95;this[_0x5bc48f(0x179)][_0x5bc48f(0x5d8)]=_0x34d1e5[_0x5bc48f(0x7aa)][_0x5bc48f(0x125)][_0x5bc48f(0x346)],this['_startTime']=_0x34d1e5['Cesium'][_0x5bc48f(0xc3)][_0x5bc48f(0xaa6)](),this[_0x5bc48f(0x179)]['addSample'](this[_0x5bc48f(0x75a)],_0x5e5f93['transformWGS84ToCartesian'](this[_0x5bc48f(0x691)])),this['_delegate'][_0x5bc48f(0x9a7)]=this['_sampledPosition'],this['_cache'][_0x5bc48f(0xb3)](this[_0x5bc48f(0x75a)]),this[_0x5bc48f(0x741)]=this['_icon'],this[_0x5bc48f(0x729)]=this[_0x5bc48f(0x60b)];}[_0x43bf95(0x5db)](_0xcad6cc){const _0xc46933=_0x43bf95;return!_0xcad6cc||Object[_0xc46933(0x6f9)](_0xcad6cc)[_0xc46933(0x6a2)]===0x0?this:(delete _0xcad6cc[_0xc46933(0x6bd)]&&delete _0xcad6cc[_0xc46933(0x371)]&&delete _0xcad6cc[_0xc46933(0x795)],_0x3f7522[_0xc46933(0x5da)](this[_0xc46933(0x9ca)],_0xcad6cc),_0x3f7522['merge'](this[_0xc46933(0xaa1)]['billboard'],_0xcad6cc),this);}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x841));var _0x3e958a=_0x2e2a9e,_0x2341cf=class extends _0x4462b3{constructor(_0x54ece6,_0x1cdaf4){const _0x325e87=_0x43bf95;super(),this[_0x325e87(0x691)]=_0x16f48b['parsePosition'](_0x54ece6),this[_0x325e87(0x210)]=_0x1cdaf4,this[_0x325e87(0xaa1)]=new _0x34d1e5[(_0x325e87(0x7aa))][(_0x325e87(0x926))]({'model':{}}),this[_0x325e87(0x558)]=_0x4075ae[_0x325e87(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x5873b7=_0x43bf95;return _0x4f8204['getOverlayType'](_0x5873b7(0x382));}set['modelUrl'](_0x5720dc){const _0x507f0b=_0x43bf95;this[_0x507f0b(0x210)]=_0x5720dc,this[_0x507f0b(0xaa1)][_0x507f0b(0x361)][_0x507f0b(0x2fe)]=this[_0x507f0b(0x210)];}get[_0x43bf95(0x61a)](){const _0x57571e=_0x43bf95;return this[_0x57571e(0x210)];}[_0x43bf95(0x6a3)](){const _0x531a74=_0x43bf95;this[_0x531a74(0x179)][_0x531a74(0x5d8)]=_0x34d1e5[_0x531a74(0x7aa)]['ExtrapolationType']['HOLD'],this[_0x531a74(0x75a)]=_0x34d1e5[_0x531a74(0x7aa)][_0x531a74(0xc3)][_0x531a74(0xaa6)](),this[_0x531a74(0x179)]['addSample'](this[_0x531a74(0x75a)],_0x5e5f93['transformWGS84ToCartesian'](this[_0x531a74(0x691)])),this[_0x531a74(0xaa1)][_0x531a74(0x9a7)]=this[_0x531a74(0x179)],this['_delegate'][_0x531a74(0x2b2)]=new _0x34d1e5['Cesium'][(_0x531a74(0x534))](this['_sampledPosition']),this[_0x531a74(0x365)][_0x531a74(0xb3)](this[_0x531a74(0x75a)]),this[_0x531a74(0x61a)]=this[_0x531a74(0x210)];}[_0x43bf95(0x5db)](_0x42f95d){const _0x3ac408=_0x43bf95;return!_0x42f95d||Object[_0x3ac408(0x6f9)](_0x42f95d)[_0x3ac408(0x6a2)]===0x0?this:(delete _0x42f95d[_0x3ac408(0x2fe)],_0x3f7522[_0x3ac408(0x5da)](this[_0x3ac408(0x9ca)],_0x42f95d),_0x3f7522[_0x3ac408(0x5da)](this['_delegate'][_0x3ac408(0x361)],_0x42f95d),this);}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x382));var _0xaba7bb=_0x2341cf;function _0x227561(_0x277c74,_0x47821e,_0xac1448){const _0x31083d=_0x43bf95;let _0x58a7dd=_0x34d1e5['Cesium'][_0x31083d(0x982)]['subtract'](_0x277c74,_0x47821e,new _0x34d1e5['Cesium'][(_0x31083d(0x982))]()),_0x549bb8=_0x34d1e5[_0x31083d(0x7aa)][_0x31083d(0x982)]['subtract'](_0xac1448,_0x47821e,new _0x34d1e5[(_0x31083d(0x7aa))][(_0x31083d(0x982))]()),_0x3b093b=_0x34d1e5['Cesium'][_0x31083d(0x982)][_0x31083d(0x5df)](_0x58a7dd,_0x549bb8,_0x58a7dd);return _0x34d1e5['Cesium'][_0x31083d(0x982)][_0x31083d(0x3db)](_0x3b093b)*0.5;}function _0x1b9dd7(_0x130231){const _0x174f02=_0x43bf95;let _0x886efd=0x0;if(!Array[_0x174f02(0x636)](_0x130231))return _0x886efd;_0x130231[0x0]instanceof _0x34d1e5[_0x174f02(0x7aa)][_0x174f02(0x982)]||(_0x130231=_0x5e5f93['transformWGS84ArrayToCartesianArray'](_0x130231));let _0x139b69=_0x34d1e5['Cesium'][_0x174f02(0x38a)][_0x174f02(0x1a4)](_0x34d1e5['Cesium'][_0x174f02(0x38a)][_0x174f02(0x3f5)]({'positions':_0x130231,'vertexFormat':_0x34d1e5['Cesium'][_0x174f02(0x7a0)][_0x174f02(0x4f6)]}));if(!_0x139b69)return _0x886efd;let _0x518e8f=_0x139b69[_0x174f02(0x5f4)][_0x174f02(0x9a7)][_0x174f02(0x1e2)],_0x2c8cf0=_0x139b69[_0x174f02(0x3ca)];for(let _0x4242cc=0x0;_0x4242cc<_0x2c8cf0[_0x174f02(0x6a2)];_0x4242cc+=0x3){let _0x550361=_0x34d1e5[_0x174f02(0x7aa)][_0x174f02(0x982)][_0x174f02(0x11b)](_0x518e8f,_0x2c8cf0[_0x4242cc]*0x3,new _0x34d1e5['Cesium'][(_0x174f02(0x982))]()),_0x1a6ee6=_0x34d1e5[_0x174f02(0x7aa)][_0x174f02(0x982)][_0x174f02(0x11b)](_0x518e8f,_0x2c8cf0[_0x4242cc+0x1]*0x3,new _0x34d1e5[(_0x174f02(0x7aa))][(_0x174f02(0x982))]()),_0x4b9d81=_0x34d1e5[_0x174f02(0x7aa)][_0x174f02(0x982)][_0x174f02(0x11b)](_0x518e8f,_0x2c8cf0[_0x4242cc+0x2]*0x3,new _0x34d1e5[(_0x174f02(0x7aa))]['Cartesian3']());_0x886efd+=_0x227561(_0x550361,_0x1a6ee6,_0x4b9d81);}return _0x886efd;}function _0x138f50(_0x49e483=[],_0x49deda=0x0){const _0x648350=_0x43bf95;let _0x1be939=0xb4,_0x3c222b=0x5a,_0x1dd91f=-0xb4,_0x100ce9=-0x5a;if(_0x49e483['forEach'](_0x1cd121=>{const _0x1c1e73=_0xf114;_0x1be939=Math['min'](_0x1be939,_0x1cd121[_0x1c1e73(0x598)]||_0x1cd121['x']),_0x3c222b=Math['min'](_0x3c222b,_0x1cd121[_0x1c1e73(0x941)]||_0x1cd121['y']),_0x1dd91f=Math[_0x1c1e73(0x2c3)](_0x1dd91f,_0x1cd121[_0x1c1e73(0x598)]||_0x1cd121['x']),_0x100ce9=Math[_0x1c1e73(0x2c3)](_0x100ce9,_0x1cd121['lat']||_0x1cd121['y']);}),_0x49deda>0x0){let _0x3c6258=Math[_0x648350(0x133)](_0x1dd91f-_0x1dd91f),_0x24a80e=Math[_0x648350(0x133)](_0x100ce9-_0x3c222b);_0x1be939-=_0x3c6258*_0x49deda,_0x3c222b-=_0x24a80e*_0x49deda,_0x1dd91f+=_0x3c6258*_0x49deda,_0x100ce9+=_0x24a80e*_0x49deda;}return{'west':_0x1be939,'south':_0x3c222b,'east':_0x1dd91f,'north':_0x100ce9};}function _0x2cf4fc(_0x1a1a1a){const _0x27d080=_0x43bf95;if(_0x1a1a1a&&Array[_0x27d080(0x636)](_0x1a1a1a)){let _0xf1a3be=0x0;_0x1a1a1a[_0x27d080(0x2de)](({alt:_0x80a74f})=>_0xf1a3be=Math[_0x27d080(0x2c3)](_0xf1a3be,_0x80a74f));let _0x555a3d=_0x34d1e5['Cesium'][_0x27d080(0x9be)][_0x27d080(0x27c)](_0x5e5f93[_0x27d080(0x999)](_0x1a1a1a)),_0x2b091c=_0x5e5f93[_0x27d080(0x30b)](_0x555a3d[_0x27d080(0x765)]);return _0x2b091c[_0x27d080(0xa84)]=_0xf1a3be,_0x2b091c;}return new _0x2d88b3();}function _0x1425f2(_0x535acc,_0x554548){const _0x12f645=_0x43bf95;_0x554548=_0x554548||{};let _0x3b9fb8=[];for(let _0x2930b0=0x0;_0x2930b0<_0x535acc[_0x12f645(0x6a2)]-0x1;_0x2930b0++){let _0x516093=_0x431ca7(_0x535acc[_0x2930b0],_0x535acc[_0x2930b0+0x1],_0x554548[_0x12f645(0x565)]);_0x516093&&_0x516093[_0x12f645(0x6a2)]>0x0&&(_0x3b9fb8=_0x3b9fb8[_0x12f645(0x64c)](_0x516093));}return _0x3b9fb8;}function _0x431ca7(_0x4b09dc,_0x1d4f40,_0x5ac709){const _0x458e4b=_0x43bf95;if(!_0x4b09dc||!_0x1d4f40)return null;let _0x44d183=[];_0x5ac709=_0x5ac709||0x28;let _0x51d7f7=function(_0x764c18){return 0x1-0x2*_0x764c18+_0x764c18*_0x764c18;},_0x10b2b0=_0x165854=>0x2*_0x165854-0x2*_0x165854*_0x165854,_0x1995be=_0xfc54c=>_0xfc54c*_0xfc54c,_0x1a7105,_0x182cf2,_0x57db98,_0x26d7e8,_0x28e699,_0x13ae53,_0x4fab50=0x0,_0x2c0a25=parseFloat(_0x4b09dc[_0x458e4b(0x941)]),_0x581780=parseFloat(_0x1d4f40[_0x458e4b(0x941)]),_0x533efc=parseFloat(_0x4b09dc[_0x458e4b(0x598)]),_0x3ab577=parseFloat(_0x1d4f40[_0x458e4b(0x598)]);_0x3ab577>_0x533efc&&_0x3ab577-_0x533efc>0xb4&&_0x533efc<0x0&&(_0x533efc=0x168+_0x533efc,_0x3ab577=0x168+_0x3ab577),_0x13ae53=0x0,_0x581780===_0x2c0a25?(_0x1a7105=0x0,_0x182cf2=_0x533efc-_0x3ab577):_0x3ab577===_0x533efc?(_0x1a7105=Math['PI']/0x2,_0x182cf2=_0x2c0a25-_0x581780):(_0x1a7105=Math[_0x458e4b(0x8e6)]((_0x581780-_0x2c0a25)/(_0x3ab577-_0x533efc)),_0x182cf2=(_0x581780-_0x2c0a25)/Math[_0x458e4b(0xb8)](_0x1a7105)),_0x13ae53===0x0&&(_0x13ae53=_0x1a7105+Math['PI']/0x5),_0x57db98=_0x182cf2/0x2,_0x28e699=_0x57db98*Math[_0x458e4b(0x728)](_0x13ae53)+_0x533efc,_0x26d7e8=_0x57db98*Math[_0x458e4b(0xb8)](_0x13ae53)+_0x2c0a25;for(let _0x5250d0=0x0;_0x5250d0<_0x5ac709+0x1;_0x5250d0++){let _0x44f04c=_0x533efc*_0x51d7f7(_0x4fab50)+_0x28e699*_0x10b2b0(_0x4fab50)+_0x3ab577*_0x1995be(_0x4fab50),_0x1f8dbd=_0x2c0a25*_0x51d7f7(_0x4fab50)+_0x26d7e8*_0x10b2b0(_0x4fab50)+_0x581780*_0x1995be(_0x4fab50),_0x4344e9=_0x4b09dc[_0x458e4b(0x598)],_0x240d9b=_0x1d4f40[_0x458e4b(0x598)];_0x44d183[_0x458e4b(0xb3)]([_0x4344e9<0x0&&_0x240d9b>0x0?_0x44f04c-0x168:_0x44f04c,_0x1f8dbd]),_0x4fab50=_0x4fab50+0x1/_0x5ac709;}return _0x44d183;}function _0x55c5f1(_0x480140){const _0x18a71b=_0x43bf95;let _0x3b238f=0x0;if(_0x480140&&Array[_0x18a71b(0x636)](_0x480140))for(let _0x2b59e6=0x0;_0x2b59e6<_0x480140[_0x18a71b(0x6a2)]-0x1;_0x2b59e6++){let _0x59091f=_0x5e5f93['transformWGS84ToCartographic'](_0x480140[_0x2b59e6]),_0x3c01fd=_0x5e5f93[_0x18a71b(0x41f)](_0x480140[_0x2b59e6+0x1]),_0x3976d5=new _0x34d1e5['Cesium'][(_0x18a71b(0xa5b))]();_0x3976d5[_0x18a71b(0x6bf)](_0x59091f,_0x3c01fd);let _0x31e7c1=_0x3976d5[_0x18a71b(0x85c)];_0x31e7c1=Math[_0x18a71b(0x8d5)](Math[_0x18a71b(0x191)](_0x31e7c1,0x2)+Math[_0x18a71b(0x191)](_0x3c01fd['height']-_0x59091f[_0x18a71b(0x795)],0x2)),_0x3b238f+=_0x31e7c1;}return _0x3b238f[_0x18a71b(0x964)](0x3);}function _0x4a436d(_0x155f60,_0x2a0143){const _0x594253=_0x43bf95;let _0x489db7=_0x155f60,_0x5b4319=_0x2a0143;if(!_0x489db7||!_0x5b4319)return 0x0;_0x155f60 instanceof _0x34d1e5[_0x594253(0x7aa)]['Cartesian3']||(_0x489db7=_0x16f48b[_0x594253(0x81a)](_0x155f60),_0x489db7=_0x5e5f93['transformWGS84ToCartesian'](_0x489db7)),_0x2a0143 instanceof _0x34d1e5['Cesium'][_0x594253(0x982)]||(_0x5b4319=_0x16f48b[_0x594253(0x81a)](_0x2a0143),_0x5b4319=_0x5e5f93[_0x594253(0x432)](_0x5b4319));let _0x3caddf=_0x34d1e5['Cesium'][_0x594253(0x7a6)]['eastNorthUpToFixedFrame'](_0x489db7),_0x30d475=_0x34d1e5[_0x594253(0x7aa)][_0x594253(0x982)]['subtract'](_0x5b4319,_0x489db7,new _0x34d1e5['Cesium']['Cartesian3']()),_0x455e30=_0x34d1e5[_0x594253(0x7aa)][_0x594253(0x5ee)][_0x594253(0x4bd)](_0x34d1e5[_0x594253(0x7aa)]['Matrix4'][_0x594253(0x6b2)](_0x3caddf,new _0x34d1e5['Cesium'][(_0x594253(0x5ee))]()),_0x30d475,new _0x34d1e5[(_0x594253(0x7aa))]['Cartesian3']()),_0x248593=Math['atan2'](_0x455e30['y'],_0x455e30['x'])-_0x34d1e5[_0x594253(0x7aa)][_0x594253(0x72b)][_0x594253(0x589)];return _0x248593=_0x34d1e5[_0x594253(0x7aa)][_0x594253(0x72b)][_0x594253(0x1bd)]-_0x34d1e5['Cesium'][_0x594253(0x72b)][_0x594253(0x586)](_0x248593),isNaN(_0x248593)?0x0:_0x248593;}function _0x2c6034(_0x3036b9,_0x121973,_0x191153){return _0x3036b9=parseFloat(_0x3036b9)||0x0,_0x3036b9>=parseFloat(_0x121973)&&_0x3036b9<=parseFloat(_0x191153);}function _0x3a8784(_0x41e0d0,_0x30f6cc){const _0x5b0959=_0x43bf95;return _0x34d1e5['Cesium'][_0x5b0959(0x982)][_0x5b0959(0x403)](_0x41e0d0,_0x30f6cc,new _0x34d1e5[(_0x5b0959(0x7aa))][(_0x5b0959(0x982))]());}function _0x4c4b79(_0x1d1fa5,_0x1f560){const _0x4bca0f=_0x43bf95;let _0x3ea696=_0x16f48b[_0x4bca0f(0x81a)](_0x1d1fa5),_0x5300ec=_0x16f48b[_0x4bca0f(0x81a)](_0x1f560);_0x3ea696=_0x5e5f93[_0x4bca0f(0x41f)](_0x3ea696),_0x5300ec=_0x5e5f93[_0x4bca0f(0x41f)](_0x5300ec);let _0x3456ec=new _0x34d1e5['Cesium'][(_0x4bca0f(0xa5b))](_0x3ea696,_0x5300ec)[_0x4bca0f(0x957)](0.5);return new _0x2d88b3(_0x34d1e5[_0x4bca0f(0x7aa)]['Math'][_0x4bca0f(0x438)](_0x3456ec['longitude']),_0x34d1e5[_0x4bca0f(0x7aa)][_0x4bca0f(0x72b)]['toDegrees'](_0x3456ec[_0x4bca0f(0xa6e)]),_0x3456ec[_0x4bca0f(0x795)]);}function _0x246b53(_0xdd8361,_0x28754f,_0x3e77c2=0x0,_0x6ebf0e=0x32){const _0x2fd528=_0x43bf95;let _0x3ea15e=[];_0x3e77c2=Math[_0x2fd528(0x2c3)](+_0x3e77c2,0x64),_0x6ebf0e=Math[_0x2fd528(0x2c3)](+_0x6ebf0e,0x32);let _0x34dc93=Math[_0x2fd528(0x133)](_0xdd8361[_0x2fd528(0x598)]-_0x28754f[_0x2fd528(0x598)]),_0x130ef0=Math[_0x2fd528(0x133)](_0xdd8361[_0x2fd528(0x941)]-_0x28754f[_0x2fd528(0x941)]),_0x1743da=Math[_0x2fd528(0x2c3)](_0x34dc93,_0x130ef0),_0x381c79=_0x1743da/_0x6ebf0e;if(_0x34dc93>_0x130ef0){let _0x37850c=(_0x28754f[_0x2fd528(0x941)]-_0xdd8361[_0x2fd528(0x941)])/_0x6ebf0e;_0xdd8361[_0x2fd528(0x598)]-_0x28754f[_0x2fd528(0x598)]>0x0&&(_0x381c79=-_0x381c79);for(let _0x23d303=0x0;_0x23d303<_0x6ebf0e;_0x23d303++){let _0x66eaae=_0x3e77c2-Math[_0x2fd528(0x191)](-0.5*_0x1743da+Math[_0x2fd528(0x133)](_0x381c79)*_0x23d303,0x2)*0x4*_0x3e77c2/Math[_0x2fd528(0x191)](_0x1743da,0x2),_0x58003e=_0xdd8361[_0x2fd528(0x598)]+_0x381c79*_0x23d303,_0x3addf8=_0xdd8361[_0x2fd528(0x941)]+_0x37850c*_0x23d303;_0x3ea15e['push']([_0x58003e,_0x3addf8,_0x66eaae]);}}else{let _0x10fa77=(_0x28754f[_0x2fd528(0x598)]-_0xdd8361[_0x2fd528(0x598)])/_0x6ebf0e;_0xdd8361['lat']-_0x28754f[_0x2fd528(0x941)]>0x0&&(_0x381c79=-_0x381c79);for(let _0x6ae8df=0x0;_0x6ae8df<_0x6ebf0e;_0x6ae8df++){let _0x4344d3=_0x3e77c2-Math['pow'](-0.5*_0x1743da+Math[_0x2fd528(0x133)](_0x381c79)*_0x6ae8df,0x2)*0x4*_0x3e77c2/Math[_0x2fd528(0x191)](_0x1743da,0x2),_0x525e7c=_0xdd8361['lng']+_0x10fa77*_0x6ae8df,_0x518f06=_0xdd8361[_0x2fd528(0x941)]+_0x381c79*_0x6ae8df;_0x3ea15e[_0x2fd528(0xb3)]([_0x525e7c,_0x518f06,_0x4344d3]);}}return _0x3ea15e[_0x2fd528(0xb3)]([_0x28754f['lng'],_0x28754f['lat'],_0x28754f[_0x2fd528(0xa84)]||0x0]),_0x3ea15e;}var {Math:_0x2c22f0}=_0x34d1e5[_0x43bf95(0x7aa)],_0x596257={};_0x3f7522[_0x43bf95(0x5da)](_0x596257,_0x2c22f0,{'area':_0x1b9dd7,'bounds':_0x138f50,'center':_0x2cf4fc,'curve':_0x1425f2,'distance':_0x55c5f1,'heading':_0x4a436d,'isBetween':_0x2c6034,'midCartesian':_0x3a8784,'midPosition':_0x4c4b79,'parabola':_0x246b53});var _0x5cedeb=class _0x4b7241 extends _0x4f8204{constructor(_0xa1939,_0x4fe100){const _0xca2e16=_0x43bf95;super(),this[_0xca2e16(0xaa1)]=_0x5b03f8[_0xca2e16(0x484)](_0xca2e16(0x7e1),_0xca2e16(0x733)),this[_0xca2e16(0x691)]=_0x16f48b[_0xca2e16(0x81a)](_0xa1939),this[_0xca2e16(0xaa1)][_0xca2e16(0x4fe)]('id',this[_0xca2e16(0x20a)]),_0x3f7522[_0xca2e16(0x5da)](this['_delegate'][_0xca2e16(0x6a9)],{'position':_0xca2e16(0x88e),'top':'0','left':'0'}),this[_0xca2e16(0x531)]=_0x4fe100,this[_0xca2e16(0x558)]=_0x4075ae['INITIALIZED'];}get['type'](){const _0x15fd67=_0x43bf95;return _0x4f8204[_0x15fd67(0x853)](_0x15fd67(0x80e));}set[_0x43bf95(0x867)](_0x2bc6ca){const _0x2836c5=_0x43bf95;this[_0x2836c5(0x850)]=_0x2bc6ca,this[_0x2836c5(0xaa1)][_0x2836c5(0x6a9)][_0x2836c5(0x5cf)]=this['_show']?_0x2836c5(0x2a2):'hidden';}get[_0x43bf95(0x867)](){return this['_show'];}set[_0x43bf95(0x9a7)](_0x44297d){const _0x536564=_0x43bf95;this[_0x536564(0x691)]=_0x16f48b[_0x536564(0x81a)](_0x44297d);}get[_0x43bf95(0x9a7)](){const _0x4e7f40=_0x43bf95;return this[_0x4e7f40(0x691)];}set[_0x43bf95(0x531)](_0x3ff64f){const _0x59c42c=_0x43bf95;if(_0x3ff64f&&typeof _0x3ff64f==_0x59c42c(0x55c))this[_0x59c42c(0xaa1)][_0x59c42c(0x4ff)]=_0x3ff64f;else{if(_0x3ff64f&&_0x3ff64f instanceof Element){for(;this[_0x59c42c(0xaa1)][_0x59c42c(0x5de)]();)this[_0x59c42c(0xaa1)][_0x59c42c(0x6c5)](this[_0x59c42c(0xaa1)][_0x59c42c(0x6d7)]);this['_delegate'][_0x59c42c(0x87b)](_0x3ff64f);}}}get[_0x43bf95(0x531)](){const _0x5d73ce=_0x43bf95;return this[_0x5d73ce(0xaa1)][_0x5d73ce(0x93d)]||[];}[_0x43bf95(0x155)](_0x508aa0,_0x387946,_0x52d1bf){const _0x1ca63e=_0x43bf95;if(!this[_0x1ca63e(0x850)]||!_0x508aa0)return;let _0x1d9ecf=_0x508aa0['x']-this[_0x1ca63e(0xaa1)][_0x1ca63e(0x7d8)]/0x2,_0x58ce30=_0x508aa0['y']-this[_0x1ca63e(0xaa1)][_0x1ca63e(0x7da)]/0x2;this[_0x1ca63e(0x9ca)][_0x1ca63e(0x9a7)]===_0x1ca63e(0x6db)?(_0x1d9ecf=_0x508aa0['x']-this[_0x1ca63e(0xaa1)]['offsetWidth'],_0x58ce30=_0x508aa0['y']-this[_0x1ca63e(0xaa1)][_0x1ca63e(0x7da)]):this[_0x1ca63e(0x9ca)][_0x1ca63e(0x9a7)]===_0x1ca63e(0xa76)?(_0x1d9ecf=_0x508aa0['x'],_0x58ce30=_0x508aa0['y']-this[_0x1ca63e(0xaa1)][_0x1ca63e(0x7da)]):this[_0x1ca63e(0x9ca)][_0x1ca63e(0x9a7)]===_0x1ca63e(0x22c)?(_0x1d9ecf=_0x508aa0['x']-this['_delegate'][_0x1ca63e(0x7d8)],_0x58ce30=_0x508aa0['y']):this[_0x1ca63e(0x9ca)][_0x1ca63e(0x9a7)]===_0x1ca63e(0x459)&&(_0x1d9ecf=_0x508aa0['x'],_0x58ce30=_0x508aa0['y']);let _0x5566e1=_0x1ca63e(0x9df)+Math[_0x1ca63e(0x440)](_0x1d9ecf)+_0x1ca63e(0x976)+Math[_0x1ca63e(0x440)](_0x58ce30)+'px,\x200)',_0x1f0c90=_0x1ca63e(0xa3d),_0x18eec5=this['_style'][_0x1ca63e(0x48d)];if(_0x387946&&_0x18eec5){let _0x3a02f2=_0x18eec5['near']||0x0,_0x5ea37d=_0x18eec5[_0x1ca63e(0xd3)]||0x1,_0x12aa84=_0x18eec5[_0x1ca63e(0x7ed)]||Number[_0x1ca63e(0x1fc)],_0x30e209=_0x18eec5[_0x1ca63e(0x2ff)]||0x0,_0x37cc40=_0x387946/_0x12aa84;if(_0x387946<_0x3a02f2)_0x1f0c90=_0x1ca63e(0x913)+_0x5ea37d+','+_0x5ea37d+_0x1ca63e(0x51c);else{if(_0x387946>_0x12aa84)_0x1f0c90=_0x1ca63e(0x913)+_0x30e209+','+_0x30e209+',1)';else{let _0x165cd4=_0x30e209+_0x37cc40*(_0x5ea37d-_0x30e209);_0x1f0c90='scale3d('+_0x165cd4+','+_0x165cd4+',1)';}}}let _0x595867=!0x0,_0x17d1fe=this[_0x1ca63e(0x9ca)][_0x1ca63e(0xa24)];_0x387946&&_0x17d1fe&&(_0x595867=_0x2c6034(_0x387946,_0x17d1fe[_0x1ca63e(0x7cd)]||0x0,_0x17d1fe['far']||Number['MAX_VALUE'])),this[_0x1ca63e(0xaa1)]['style'][_0x1ca63e(0x203)]=_0x5566e1+'\x20'+_0x1f0c90,this['_delegate'][_0x1ca63e(0x6a9)]['visibility']=_0x595867&&_0x52d1bf?_0x1ca63e(0x2a2):_0x1ca63e(0x5ad);}[_0x43bf95(0x84d)](_0x51f2ea){const _0x367806=_0x43bf95;this[_0x367806(0x761)]=_0x51f2ea,this[_0x367806(0x761)][_0x367806(0x8ca)][_0x367806(0x87b)](this[_0x367806(0xaa1)]);let _0x26842e={'layer':_0x51f2ea,'overlay':this,'position':_0x5e5f93['transformWGS84ToCartesian'](this[_0x367806(0x691)])};this[_0x367806(0xaa1)][_0x367806(0x278)](_0x367806(0x618),()=>{const _0x12b84a=_0x367806;this[_0x12b84a(0x97e)][_0x12b84a(0xa4f)](_0x5b424c[_0x12b84a(0x6c1)],_0x26842e);}),this['_delegate']['addEventListener'](_0x367806(0x7bc),()=>{const _0x52b1cf=_0x367806;this[_0x52b1cf(0x97e)][_0x52b1cf(0xa4f)](_0x5b424c['MOUSE_OVER'],_0x26842e);}),this[_0x367806(0xaa1)][_0x367806(0x278)]('mouseout',()=>{const _0x3f197d=_0x367806;this[_0x3f197d(0x97e)][_0x3f197d(0xa4f)](_0x5b424c[_0x3f197d(0x6cb)],_0x26842e);}),this[_0x367806(0x558)]=_0x4075ae[_0x367806(0xa0f)];}[_0x43bf95(0x526)](){const _0x2e550d=_0x43bf95;this[_0x2e550d(0x761)]&&(this[_0x2e550d(0x761)][_0x2e550d(0x8ca)][_0x2e550d(0x6c5)](this[_0x2e550d(0xaa1)]),this[_0x2e550d(0x558)]=_0x4075ae[_0x2e550d(0x947)]);}[_0x43bf95(0x610)](_0x3defbe,_0x262ebb){return this;}[_0x43bf95(0x5db)](_0x3d9d5c){const _0x21d14f=_0x43bf95;return!_0x3d9d5c||Object[_0x21d14f(0x6f9)](_0x3d9d5c)['length']===0x0?this:(_0x3f7522['merge'](this[_0x21d14f(0x9ca)],_0x3d9d5c),this[_0x21d14f(0x9ca)][_0x21d14f(0x256)]&&_0x5b03f8['addClass'](this[_0x21d14f(0xaa1)],this[_0x21d14f(0x9ca)][_0x21d14f(0x256)]),this);}static['fromEntity'](_0x3258d7,_0x5386ee){const _0x499878=_0x43bf95;var _0x3f055f;let _0x1ea4d4,_0x20cd1e=_0x34d1e5[_0x499878(0x7aa)]['JulianDate'][_0x499878(0xaa6)](),_0x461baf=_0x5e5f93[_0x499878(0x30b)](_0x3258d7[_0x499878(0x9a7)][_0x499878(0x4e7)](_0x20cd1e));return _0x1ea4d4=new _0x4b7241(_0x461baf,_0x5386ee),_0x3258d7[_0x499878(0x1cb)]&&(_0x1ea4d4[_0x499878(0x2f0)]={...(_0x3f055f=_0x3258d7==null?void 0x0:_0x3258d7[_0x499878(0x66f)])==null?void 0x0:_0x3f055f[_0x499878(0x4e7)](_0x20cd1e)}),_0x1ea4d4;}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x80e));var _0x33ba45=_0x5cedeb,_0x236cd8=class _0x3f7820 extends _0x4f8204{constructor(_0x1ac77a,_0x150c21){const _0x3e6303=_0x43bf95;super(),this['_delegate']=new _0x34d1e5[(_0x3e6303(0x7aa))][(_0x3e6303(0x926))]({'model':{}}),this[_0x3e6303(0x691)]=_0x16f48b['parsePosition'](_0x1ac77a),this[_0x3e6303(0x210)]=_0x150c21,this['_rotateAmount']=0x0,this[_0x3e6303(0x558)]=_0x4075ae[_0x3e6303(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x4a1565=_0x43bf95;return _0x4f8204['getOverlayType'](_0x4a1565(0x361));}set[_0x43bf95(0x9a7)](_0x1cba9e){const _0x53655c=_0x43bf95;this['_position']=_0x16f48b[_0x53655c(0x81a)](_0x1cba9e),this['_delegate'][_0x53655c(0x9a7)]=_0x5e5f93[_0x53655c(0x432)](this[_0x53655c(0x691)]),this[_0x53655c(0x3cd)]===0x0&&(this['_delegate'][_0x53655c(0x2b2)]=_0x34d1e5['Cesium'][_0x53655c(0x7a6)][_0x53655c(0x9d3)](_0x5e5f93[_0x53655c(0x432)](this[_0x53655c(0x691)]),new _0x34d1e5[(_0x53655c(0x7aa))][(_0x53655c(0x517))](_0x34d1e5[_0x53655c(0x7aa)][_0x53655c(0x72b)]['toRadians'](this[_0x53655c(0x691)][_0x53655c(0x77c)]),_0x34d1e5[_0x53655c(0x7aa)][_0x53655c(0x72b)][_0x53655c(0x2b0)](this[_0x53655c(0x691)][_0x53655c(0x442)]),_0x34d1e5[_0x53655c(0x7aa)][_0x53655c(0x72b)][_0x53655c(0x2b0)](this[_0x53655c(0x691)][_0x53655c(0x193)]))));}get[_0x43bf95(0x9a7)](){const _0x2cfa8c=_0x43bf95;return this[_0x2cfa8c(0x691)];}set[_0x43bf95(0x61a)](_0x3c46ba){const _0x391cb0=_0x43bf95;this[_0x391cb0(0x210)]=_0x3c46ba,this[_0x391cb0(0xaa1)][_0x391cb0(0x361)][_0x391cb0(0x2fe)]=this[_0x391cb0(0x210)];}get[_0x43bf95(0x61a)](){const _0x2c17f0=_0x43bf95;return this[_0x2c17f0(0x210)];}set[_0x43bf95(0x36f)](_0x2c687d){const _0x4fbefd=_0x43bf95;this[_0x4fbefd(0x3cd)]=+_0x2c687d,this['_delegate'][_0x4fbefd(0x2b2)]=new _0x34d1e5['Cesium'][(_0x4fbefd(0x18c))](()=>(this[_0x4fbefd(0x691)][_0x4fbefd(0x77c)]+=this[_0x4fbefd(0x3cd)],(this[_0x4fbefd(0x691)]['heading']>=0x168||this[_0x4fbefd(0x691)][_0x4fbefd(0x77c)]<=-0x168)&&(this[_0x4fbefd(0x691)][_0x4fbefd(0x77c)]=0x0),_0x34d1e5[_0x4fbefd(0x7aa)][_0x4fbefd(0x7a6)][_0x4fbefd(0x9d3)](_0x5e5f93[_0x4fbefd(0x432)](this[_0x4fbefd(0x691)]),new _0x34d1e5[(_0x4fbefd(0x7aa))][(_0x4fbefd(0x517))](_0x34d1e5['Cesium'][_0x4fbefd(0x72b)][_0x4fbefd(0x2b0)](this['_position'][_0x4fbefd(0x77c)]),_0x34d1e5[_0x4fbefd(0x7aa)][_0x4fbefd(0x72b)][_0x4fbefd(0x2b0)](this['_position']['pitch']),_0x34d1e5[_0x4fbefd(0x7aa)][_0x4fbefd(0x72b)][_0x4fbefd(0x2b0)](this[_0x4fbefd(0x691)][_0x4fbefd(0x193)])))),!0x1);}get[_0x43bf95(0x36f)](){const _0x73fc5f=_0x43bf95;return this[_0x73fc5f(0x3cd)];}[_0x43bf95(0x6a3)](){const _0x252e35=_0x43bf95;this[_0x252e35(0x9a7)]=this[_0x252e35(0x691)],this[_0x252e35(0x61a)]=this[_0x252e35(0x210)];}[_0x43bf95(0x5db)](_0x11f24e){const _0x279bb8=_0x43bf95;return!_0x11f24e||Object[_0x279bb8(0x6f9)](_0x11f24e)[_0x279bb8(0x6a2)]===0x0?this:(delete _0x11f24e['uri'],_0x3f7522[_0x279bb8(0x5da)](this[_0x279bb8(0x9ca)],_0x11f24e),_0x3f7522[_0x279bb8(0x5da)](this[_0x279bb8(0xaa1)][_0x279bb8(0x361)],_0x11f24e),this);}static[_0x43bf95(0x799)](_0x296c96,_0x4574ab){const _0x48cb18=_0x43bf95;let _0x14056f=_0x34d1e5[_0x48cb18(0x7aa)]['JulianDate']['now'](),_0x5474ac=_0x5e5f93[_0x48cb18(0x30b)](_0x296c96[_0x48cb18(0x9a7)]['getValue'](_0x14056f)),_0x4f85a3=new _0x3f7820(_0x5474ac,_0x4574ab);return _0x4f85a3[_0x48cb18(0x2f0)]={..._0x296c96[_0x48cb18(0x66f)]['getValue'](_0x14056f)},_0x4f85a3;}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x361));var _0x8e8b2c=_0x236cd8,_0x1ab1ad=class extends _0x4f8204{constructor(_0x46ecbf,_0x488674={}){const _0x353ec9=_0x43bf95;super(),this[_0x353ec9(0xaa1)]=_0x34d1e5[_0x353ec9(0x7aa)]['I3SDataProvider'][_0x353ec9(0x5fb)](_0x46ecbf,_0x488674),this['_state']=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){const _0xb724aa=_0x43bf95;return _0x4f8204[_0xb724aa(0x853)](_0xb724aa(0x9cc));}[_0x43bf95(0x3d5)](_0x40cc68){const _0x5d3322=_0x43bf95;return this[_0x5d3322(0xaa1)][_0x5d3322(0x379)](_0x40cc68),this;}[_0x43bf95(0x610)](_0x5e1fba,_0x1185ef){const _0x417362=_0x43bf95;return console['warn'](_0x417362(0x297)),this;}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x9cc));var _0x2b81dc=_0x1ab1ad,_0x3f9355=class extends _0x4f8204{constructor(_0x1046b8,_0x5b5095={}){const _0x948af5=_0x43bf95;super(),this[_0x948af5(0xaa1)]=_0x34d1e5[_0x948af5(0x7aa)][_0x948af5(0xa0d)][_0x948af5(0x5fb)](_0x1046b8,_0x5b5095),this[_0x948af5(0x29e)]=new _0x3a00dd(this[_0x948af5(0xaa1)]),this['_tileVisibleCallback']=void 0x0,this[_0x948af5(0x202)]=void 0x0,this[_0x948af5(0x558)]=_0x4075ae[_0x948af5(0x5d2)];}get['type'](){const _0x5051f9=_0x43bf95;return _0x4f8204[_0x5051f9(0x853)](_0x5051f9(0x6af));}set[_0x43bf95(0x867)](_0x38fe3c){const _0x582ef8=_0x43bf95;this['_show']=_0x38fe3c,this['_delegate'][_0x582ef8(0x379)](_0x429dc4=>{const _0x5e4012=_0x582ef8;_0x429dc4[_0x5e4012(0x867)]=_0x38fe3c;});}[_0x43bf95(0x513)](){const _0x52d352=_0x43bf95;this[_0x52d352(0x934)]&&this[_0x52d352(0x934)](),this[_0x52d352(0x934)]=this[_0x52d352(0xaa1)][_0x52d352(0x379)](_0x305da4=>{const _0x31119e=_0x52d352;_0x305da4['tileVisible'][_0x31119e(0x278)](this['_updateTile'],this);});}[_0x43bf95(0x5b0)](_0x1c8f84){const _0x2a012d=_0x43bf95;let _0x3dc480=_0x1c8f84[_0x2a012d(0x531)];for(let _0x349f44=0x0;_0x349f44<_0x3dc480[_0x2a012d(0x4cd)];_0x349f44++){let _0x19eb21=_0x3dc480['getFeature'](_0x349f44);this[_0x2a012d(0x202)]&&this[_0x2a012d(0x202)]['length']&&this['_properties']['forEach'](_0x2a8218=>{const _0x34c95e=_0x2a012d;_0x19eb21[_0x34c95e(0xa35)](_0x2a8218[_0x34c95e(0x64f)])&&_0x19eb21[_0x34c95e(0x1ed)](_0x2a8218[_0x34c95e(0x64f)])===_0x2a8218[_0x34c95e(0x61b)]&&_0x19eb21[_0x34c95e(0x820)](_0x2a8218[_0x34c95e(0x169)],_0x2a8218['propertyValue']);});}}[_0x43bf95(0x3d5)](_0x54ff34){const _0x54a9d4=_0x43bf95;return this[_0x54a9d4(0xaa1)]['then'](_0x54ff34),this;}[_0x43bf95(0xa25)](_0x5207ec){const _0x171454=_0x43bf95;return _0x5207ec=_0x16f48b[_0x171454(0x81a)](_0x5207ec),this[_0x171454(0xaa1)][_0x171454(0x379)](_0x51c232=>{const _0x1f69c4=_0x171454;let _0x41887a=_0x34d1e5[_0x1f69c4(0x7aa)]['Transforms'][_0x1f69c4(0x824)](_0x34d1e5[_0x1f69c4(0x7aa)][_0x1f69c4(0x982)][_0x1f69c4(0x81e)](_0x5207ec[_0x1f69c4(0x598)],_0x5207ec[_0x1f69c4(0x941)],_0x5207ec[_0x1f69c4(0xa84)])),_0x43bb1=_0x34d1e5[_0x1f69c4(0x7aa)][_0x1f69c4(0x5ee)][_0x1f69c4(0x90c)](_0x34d1e5[_0x1f69c4(0x7aa)][_0x1f69c4(0x72d)]['fromHeadingPitchRoll'](new _0x34d1e5[(_0x1f69c4(0x7aa))][(_0x1f69c4(0x517))](_0x34d1e5[_0x1f69c4(0x7aa)]['Math'][_0x1f69c4(0x2b0)](_0x5207ec[_0x1f69c4(0x77c)]),_0x34d1e5['Cesium'][_0x1f69c4(0x72b)][_0x1f69c4(0x2b0)](_0x5207ec[_0x1f69c4(0x442)]),_0x34d1e5['Cesium'][_0x1f69c4(0x72b)][_0x1f69c4(0x2b0)](_0x5207ec[_0x1f69c4(0x193)]))));_0x34d1e5[_0x1f69c4(0x7aa)][_0x1f69c4(0x5ee)]['multiply'](_0x41887a,_0x43bb1,_0x41887a),_0x51c232[_0x1f69c4(0x6a0)]['transform']=_0x41887a;}),this;}[_0x43bf95(0x5c9)](_0x3d07a1,_0x3f651f,_0x4bea99){const _0x44d9b3=_0x43bf95;return this[_0x44d9b3(0xaa1)][_0x44d9b3(0x379)](_0x66fde4=>{const _0x1dc112=_0x44d9b3;let _0x376ac4=_0x66fde4[_0x1dc112(0x6a0)][_0x1dc112(0x203)],_0x31ba34=_0x34d1e5[_0x1dc112(0x7aa)][_0x1dc112(0x5ee)][_0x1dc112(0x90c)](_0x34d1e5[_0x1dc112(0x7aa)][_0x1dc112(0x72d)][_0x1dc112(0xf6)](new _0x34d1e5['Cesium']['HeadingPitchRoll'](_0x34d1e5[_0x1dc112(0x7aa)][_0x1dc112(0x72b)]['toRadians'](_0x3d07a1||0x0),_0x34d1e5['Cesium']['Math'][_0x1dc112(0x2b0)](_0x3f651f||0x0),_0x34d1e5[_0x1dc112(0x7aa)][_0x1dc112(0x72b)]['toRadians'](_0x4bea99||0x0))));_0x34d1e5[_0x1dc112(0x7aa)][_0x1dc112(0x5ee)][_0x1dc112(0x310)](_0x376ac4,_0x31ba34,_0x376ac4),_0x66fde4[_0x1dc112(0x6a0)]['transform']=_0x376ac4;}),this;}[_0x43bf95(0x610)](_0x27bce1,_0x32818f){const _0x60738d=_0x43bf95;return console[_0x60738d(0x289)](_0x60738d(0x297)),this;}[_0x43bf95(0x5d4)](){const _0x3d6bb9=_0x43bf95;return this[_0x3d6bb9(0xaa1)]['then'](_0x476e97=>{const _0x189fa6=_0x3d6bb9;let _0x929a5d=_0x34d1e5[_0x189fa6(0x7aa)][_0x189fa6(0x4f1)][_0x189fa6(0x17a)](_0x476e97[_0x189fa6(0x5fc)]['center']),_0x4347bc=_0x34d1e5[_0x189fa6(0x7aa)][_0x189fa6(0x982)][_0x189fa6(0x464)](_0x929a5d[_0x189fa6(0xc9)],_0x929a5d['latitude'],_0x929a5d[_0x189fa6(0x795)]),_0x2119a6=_0x34d1e5[_0x189fa6(0x7aa)][_0x189fa6(0x982)]['fromRadians'](_0x929a5d['longitude'],_0x929a5d[_0x189fa6(0xa6e)],0x0),_0x4c1a7a=_0x34d1e5[_0x189fa6(0x7aa)]['Cartesian3']['subtract'](_0x2119a6,_0x4347bc,new _0x34d1e5[(_0x189fa6(0x7aa))][(_0x189fa6(0x982))]());_0x476e97[_0x189fa6(0xa0c)]=_0x34d1e5['Cesium']['Matrix4'][_0x189fa6(0xa29)](_0x4c1a7a);}),this;}[_0x43bf95(0xa88)](_0x3029b0,_0x2dc1fa=!0x1){const _0x485db4=_0x43bf95;return this['_delegate'][_0x485db4(0x379)](_0x5a354e=>{const _0x4684b7=_0x485db4;let _0xe99783=_0x34d1e5[_0x4684b7(0x7aa)]['Cartographic'][_0x4684b7(0x17a)](_0x5a354e[_0x4684b7(0x5fc)][_0x4684b7(0x765)]),_0x46751e=_0x34d1e5['Cesium'][_0x4684b7(0x982)]['fromRadians'](_0xe99783[_0x4684b7(0xc9)],_0xe99783[_0x4684b7(0xa6e)],_0xe99783[_0x4684b7(0x795)]),_0xf13c7=_0x34d1e5[_0x4684b7(0x7aa)][_0x4684b7(0x982)][_0x4684b7(0x464)](_0xe99783['longitude'],_0xe99783[_0x4684b7(0xa6e)],_0x2dc1fa?_0x3029b0:_0xe99783[_0x4684b7(0x795)]+_0x3029b0),_0x2fcbe3=_0x34d1e5['Cesium'][_0x4684b7(0x982)][_0x4684b7(0xa4)](_0xf13c7,_0x46751e,new _0x34d1e5[(_0x4684b7(0x7aa))][(_0x4684b7(0x982))]());_0x5a354e[_0x4684b7(0xa0c)]=_0x34d1e5[_0x4684b7(0x7aa)][_0x4684b7(0x5ee)][_0x4684b7(0xa29)](_0x2fcbe3);}),this;}[_0x43bf95(0x9ce)](_0x1e9696){const _0x5654f3=_0x43bf95;return this[_0x5654f3(0xaa1)][_0x5654f3(0x379)](_0x118ba6=>{const _0x24c64f=_0x5654f3;let _0x57b632=_0x118ba6[_0x24c64f(0x6a0)][_0x24c64f(0x203)];_0x1e9696>0x0&&_0x1e9696!==0x1&&_0x34d1e5['Cesium'][_0x24c64f(0x5ee)]['multiplyByUniformScale'](_0x57b632,_0x1e9696,_0x57b632),_0x118ba6[_0x24c64f(0x6a0)][_0x24c64f(0x203)]=_0x57b632;}),this;}[_0x43bf95(0x46c)](_0x13f06e){const _0x88202e=_0x43bf95;return this[_0x88202e(0x202)]=_0x13f06e,this[_0x88202e(0x513)](),this;}[_0x43bf95(0x4b9)](_0x360603){const _0x5eb895=_0x43bf95;return this[_0x5eb895(0xaa1)]['then'](_0x2280fe=>{const _0x3a94d5=_0x5eb895;_0x2280fe[_0x3a94d5(0x322)]=_0x360603;}),this;}[_0x43bf95(0xbb)](_0x580dc4){const _0x1dc2ce=_0x43bf95;return this['_delegate'][_0x1dc2ce(0x379)](_0x12c836=>{const _0x49d2ee=_0x1dc2ce;_0x12c836[_0x49d2ee(0xfa)]=_0x580dc4;}),this;}[_0x43bf95(0x5db)](_0x2128fe){const _0x56379a=_0x43bf95;return _0x2128fe&&_0x2128fe instanceof _0x34d1e5['Cesium'][_0x56379a(0x1b8)]&&(this['_style']=_0x2128fe,this['_delegate'][_0x56379a(0x379)](_0x5821e6=>{_0x5821e6['style']=_0x2128fe;})),this;}['on'](_0x41a73f,_0x2ecc31,_0x2af18b){const _0x161f73=_0x43bf95;return this[_0x161f73(0x97e)]['on'](_0x41a73f,_0x2ecc31,_0x2af18b||this),this['_tilesetEvent']['on'](_0x41a73f,_0x2ecc31,_0x2af18b||this),this;}['off'](_0x171a9f,_0x313792,_0x2c0ee8){const _0x32f2cd=_0x43bf95;return this[_0x32f2cd(0x97e)][_0x32f2cd(0x24d)](_0x171a9f,_0x313792,_0x2c0ee8||this),this[_0x32f2cd(0x29e)][_0x32f2cd(0x24d)](_0x171a9f,_0x313792,_0x2c0ee8||this),this;}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x6af));var _0x1ab2c8=_0x3f9355,_0x89edaf=Math['PI']/0x2,_0x26fc84=class extends _0x4f8204{constructor(_0x8e8b18){const _0x137c81=_0x43bf95;super(),this[_0x137c81(0x387)]=_0x16f48b[_0x137c81(0xa8b)](_0x8e8b18),this['_delegate']=new _0x34d1e5[(_0x137c81(0x7aa))]['Entity']({'polygon':{}}),this[_0x137c81(0x1c9)]=0.18,this[_0x137c81(0x608)]=0.3,this[_0x137c81(0x973)]=0.85,this[_0x137c81(0x972)]=0.15,this[_0x137c81(0x416)]=0.8,this[_0x137c81(0x558)]=_0x4075ae[_0x137c81(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x4657ba=_0x43bf95;return _0x4f8204[_0x4657ba(0x853)](_0x4657ba(0x3de));}set[_0x43bf95(0x752)](_0xed595c){const _0x1ef0f4=_0x43bf95;this[_0x1ef0f4(0x387)]=_0x16f48b['parsePositions'](_0xed595c),this['_delegate'][_0x1ef0f4(0x410)][_0x1ef0f4(0x245)]=this[_0x1ef0f4(0x340)]();}get[_0x43bf95(0x752)](){return this['_positions'];}['_getArrowHeadPoints'](_0x240224,_0x369154,_0x3353c7){const _0xe713a=_0x43bf95;let _0x5e5834=_0x6f549e['getBaseLength'](_0x240224),_0xef9b0c=_0x5e5834*this[_0xe713a(0x1c9)],_0x2a9441=_0x240224[_0x240224[_0xe713a(0x6a2)]-0x1];_0x5e5834=_0x6f549e[_0xe713a(0x7f4)](_0x2a9441,_0x240224[_0x240224[_0xe713a(0x6a2)]-0x2]);let _0x51bee5=_0x6f549e[_0xe713a(0x7f4)](_0x369154,_0x3353c7);_0xef9b0c>_0x51bee5*this[_0xe713a(0x416)]&&(_0xef9b0c=_0x51bee5*this[_0xe713a(0x416)]);let _0x5c2d34=_0xef9b0c*this[_0xe713a(0x608)],_0x2f01ac=_0xef9b0c*this[_0xe713a(0x972)];_0xef9b0c=_0xef9b0c>_0x5e5834?_0x5e5834:_0xef9b0c;let _0x34bc9d=_0xef9b0c*this[_0xe713a(0x973)],_0x98a328=_0x6f549e[_0xe713a(0x393)](_0x240224[_0x240224[_0xe713a(0x6a2)]-0x2],_0x2a9441,0x0,_0xef9b0c,!0x0),_0x25f874=_0x6f549e[_0xe713a(0x393)](_0x240224[_0x240224[_0xe713a(0x6a2)]-0x2],_0x2a9441,0x0,_0x34bc9d,!0x0),_0x45c684=_0x6f549e['getThirdPoint'](_0x2a9441,_0x98a328,_0x89edaf,_0x5c2d34,!0x1),_0x262834=_0x6f549e[_0xe713a(0x393)](_0x2a9441,_0x98a328,_0x89edaf,_0x5c2d34,!0x0),_0x1bc4b4=_0x6f549e['getThirdPoint'](_0x2a9441,_0x25f874,_0x89edaf,_0x2f01ac,!0x1),_0x9dee1=_0x6f549e[_0xe713a(0x393)](_0x2a9441,_0x25f874,_0x89edaf,_0x2f01ac,!0x0);return[_0x1bc4b4,_0x45c684,_0x2a9441,_0x262834,_0x9dee1];}[_0x43bf95(0x26b)](_0x46e4f6,_0x30781c,_0x337145,_0x34cdee){const _0x1c7c48=_0x43bf95;let _0x3a7232=_0x6f549e[_0x1c7c48(0x9c3)](_0x46e4f6),_0x2d6878=_0x6f549e[_0x1c7c48(0x846)](_0x46e4f6)*_0x34cdee,_0x11f60a=_0x6f549e['distance'](_0x30781c,_0x337145),_0x87b1ec=(_0x2d6878-_0x11f60a)/0x2,_0x58606c=0x0,_0xeafbc7=[],_0x433f2a=[];for(let _0x40ae21=0x1;_0x40ae21<_0x46e4f6[_0x1c7c48(0x6a2)]-0x1;_0x40ae21++){let _0x401dc2=_0x6f549e['getAngleOfThreePoints'](_0x46e4f6[_0x40ae21-0x1],_0x46e4f6[_0x40ae21],_0x46e4f6[_0x40ae21+0x1])/0x2;_0x58606c+=_0x6f549e[_0x1c7c48(0x7f4)](_0x46e4f6[_0x40ae21-0x1],_0x46e4f6[_0x40ae21]);let _0x44fc29=(_0x2d6878/0x2-_0x58606c/_0x3a7232*_0x87b1ec)/Math['sin'](_0x401dc2),_0x1b1b9d=_0x6f549e[_0x1c7c48(0x393)](_0x46e4f6[_0x40ae21-0x1],_0x46e4f6[_0x40ae21],Math['PI']-_0x401dc2,_0x44fc29,!0x0),_0x22d83e=_0x6f549e['getThirdPoint'](_0x46e4f6[_0x40ae21-0x1],_0x46e4f6[_0x40ae21],_0x401dc2,_0x44fc29,!0x1);_0xeafbc7['push'](_0x1b1b9d),_0x433f2a[_0x1c7c48(0xb3)](_0x22d83e);}return _0xeafbc7[_0x1c7c48(0x64c)](_0x433f2a);}[_0x43bf95(0x340)](){const _0x171717=_0x43bf95;let _0x5d0b4b=_0x16f48b[_0x171717(0x66d)](this[_0x171717(0x387)])[0x0],_0x56a4cf=_0x5d0b4b[0x0],_0x226877=_0x5d0b4b[0x1];_0x6f549e[_0x171717(0x762)](_0x5d0b4b[0x0],_0x5d0b4b[0x1],_0x5d0b4b[0x2])&&(_0x56a4cf=_0x5d0b4b[0x1],_0x226877=_0x5d0b4b[0x0]);let _0x26676b=[_0x6f549e[_0x171717(0x8bf)](_0x56a4cf,_0x226877)]['concat'](_0x5d0b4b[_0x171717(0x724)](0x2)),_0x2b46d3=this[_0x171717(0x5ab)](_0x26676b,_0x56a4cf,_0x226877),_0xd3ff8b=_0x2b46d3[0x0],_0x580488=_0x2b46d3[0x4],_0x58c349=_0x6f549e[_0x171717(0x7f4)](_0x56a4cf,_0x226877)/_0x6f549e[_0x171717(0x846)](_0x26676b),_0x2ed8d2=this[_0x171717(0x26b)](_0x26676b,_0xd3ff8b,_0x580488,_0x58c349),_0x11932a=_0x2ed8d2[_0x171717(0x6a2)],_0x498296=[_0x56a4cf][_0x171717(0x64c)](_0x2ed8d2[_0x171717(0x724)](0x0,_0x11932a/0x2));_0x498296[_0x171717(0xb3)](_0xd3ff8b);let _0x4c570a=[_0x226877][_0x171717(0x64c)](_0x2ed8d2[_0x171717(0x724)](_0x11932a/0x2,_0x11932a));return _0x4c570a[_0x171717(0xb3)](_0x580488),_0x498296=_0x6f549e['getQBSplinePoints'](_0x498296),_0x4c570a=_0x6f549e[_0x171717(0x780)](_0x4c570a),new _0x34d1e5[(_0x171717(0x7aa))][(_0x171717(0x89f))](_0x5e5f93[_0x171717(0x999)](_0x16f48b['parsePositions'](_0x498296[_0x171717(0x64c)](_0x2b46d3,_0x4c570a[_0x171717(0xd9)]()))));}[_0x43bf95(0x6a3)](){const _0x15e707=_0x43bf95;this[_0x15e707(0x752)]=this[_0x15e707(0x387)];}[_0x43bf95(0x610)](_0x875a7f,_0x34dc24){return this;}[_0x43bf95(0x5db)](_0x30266f){const _0x488fc7=_0x43bf95;return Object[_0x488fc7(0x6f9)](_0x30266f)[_0x488fc7(0x6a2)]===0x0?this:(delete _0x30266f['positions'],_0x3f7522[_0x488fc7(0x5da)](this[_0x488fc7(0x9ca)],_0x30266f),_0x3f7522[_0x488fc7(0x5da)](this[_0x488fc7(0xaa1)][_0x488fc7(0x410)],_0x30266f),this);}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x3de));var _0x22d820=_0x26fc84,_0x5ecd5a=Math['PI']/0x2,_0x87898f=class extends _0x4f8204{constructor(_0xc03396){const _0x1cda9a=_0x43bf95;super(),this[_0x1cda9a(0x387)]=_0x16f48b[_0x1cda9a(0xa8b)](_0xc03396),this['_delegate']=new _0x34d1e5[(_0x1cda9a(0x7aa))][(_0x1cda9a(0x926))]({'polygon':{}}),this[_0x1cda9a(0x1c9)]=0.25,this[_0x1cda9a(0x608)]=0.3,this[_0x1cda9a(0x973)]=0.85,this[_0x1cda9a(0x972)]=0.15,this['_state']=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){const _0x18a75d=_0x43bf95;return _0x4f8204[_0x18a75d(0x853)](_0x18a75d(0x9e3));}set[_0x43bf95(0x752)](_0x2b0976){const _0x1b04ca=_0x43bf95;this[_0x1b04ca(0x387)]=_0x16f48b[_0x1b04ca(0xa8b)](_0x2b0976),this[_0x1b04ca(0xaa1)][_0x1b04ca(0x410)][_0x1b04ca(0x245)]=this['_getHierarchy']();}get[_0x43bf95(0x752)](){return this['_positions'];}[_0x43bf95(0x78d)](_0x36fcfd,_0x2b03a1,_0xfe0b0a,_0x2ee6dc){const _0x3cadc8=_0x43bf95;let _0x402a03=_0x6f549e[_0x3cadc8(0x8bf)](_0x36fcfd,_0x2b03a1),_0x9971fe=_0x6f549e[_0x3cadc8(0x7f4)](_0x402a03,_0xfe0b0a),_0xc2d11a=_0x6f549e[_0x3cadc8(0x393)](_0xfe0b0a,_0x402a03,0x0,_0x9971fe*0.3,!0x0),_0x214c72=_0x6f549e[_0x3cadc8(0x393)](_0xfe0b0a,_0x402a03,0x0,_0x9971fe*0.5,!0x0);_0xc2d11a=_0x6f549e['getThirdPoint'](_0x402a03,_0xc2d11a,_0x5ecd5a,_0x9971fe/0x5,_0x2ee6dc),_0x214c72=_0x6f549e[_0x3cadc8(0x393)](_0x402a03,_0x214c72,_0x5ecd5a,_0x9971fe/0x4,_0x2ee6dc);let _0x1dae47=[_0x402a03,_0xc2d11a,_0x214c72,_0xfe0b0a],_0x3680d5=this[_0x3cadc8(0x5ab)](_0x1dae47),_0x16dccf=_0x3680d5[0x0],_0x12b0db=_0x3680d5[0x4],_0x2102c9=_0x6f549e['distance'](_0x36fcfd,_0x2b03a1)/_0x6f549e[_0x3cadc8(0x846)](_0x1dae47)/0x2,_0x18e83a=this[_0x3cadc8(0x26b)](_0x1dae47,_0x16dccf,_0x12b0db,_0x2102c9),_0x338a1e=_0x18e83a['length'],_0xe7cd68=_0x18e83a[_0x3cadc8(0x724)](0x0,_0x338a1e/0x2),_0x172383=_0x18e83a[_0x3cadc8(0x724)](_0x338a1e/0x2,_0x338a1e);return _0xe7cd68[_0x3cadc8(0xb3)](_0x16dccf),_0x172383[_0x3cadc8(0xb3)](_0x12b0db),_0xe7cd68=_0xe7cd68[_0x3cadc8(0xd9)](),_0xe7cd68[_0x3cadc8(0xb3)](_0x2b03a1),_0x172383=_0x172383['reverse'](),_0x172383['push'](_0x36fcfd),_0xe7cd68[_0x3cadc8(0xd9)]()['concat'](_0x3680d5,_0x172383);}[_0x43bf95(0x5ab)](_0x2c284e){const _0xdda6ae=_0x43bf95;let _0xf88763=_0x6f549e[_0xdda6ae(0x846)](_0x2c284e)*this[_0xdda6ae(0x1c9)],_0x529257=_0x2c284e[_0x2c284e[_0xdda6ae(0x6a2)]-0x1],_0x5f317d=_0xf88763*this[_0xdda6ae(0x608)],_0x4a9e0a=_0xf88763*this['neckWidthFactor'],_0x3e6a06=_0xf88763*this['neckHeightFactor'],_0x42b1ed=_0x6f549e[_0xdda6ae(0x393)](_0x2c284e[_0x2c284e[_0xdda6ae(0x6a2)]-0x2],_0x529257,0x0,_0xf88763,!0x0),_0xab0b41=_0x6f549e[_0xdda6ae(0x393)](_0x2c284e[_0x2c284e[_0xdda6ae(0x6a2)]-0x2],_0x529257,0x0,_0x3e6a06,!0x0),_0x53de6f=_0x6f549e[_0xdda6ae(0x393)](_0x529257,_0x42b1ed,_0x5ecd5a,_0x5f317d,!0x1),_0x5df7c8=_0x6f549e['getThirdPoint'](_0x529257,_0x42b1ed,_0x5ecd5a,_0x5f317d,!0x0),_0x23cbcc=_0x6f549e[_0xdda6ae(0x393)](_0x529257,_0xab0b41,_0x5ecd5a,_0x4a9e0a,!0x1),_0x426fb1=_0x6f549e[_0xdda6ae(0x393)](_0x529257,_0xab0b41,_0x5ecd5a,_0x4a9e0a,!0x0);return[_0x23cbcc,_0x53de6f,_0x529257,_0x5df7c8,_0x426fb1];}[_0x43bf95(0x26b)](_0x2410ba,_0x115afa,_0x1e7a03,_0x3f6938){const _0x21d869=_0x43bf95;let _0x3b5c8d=_0x6f549e[_0x21d869(0x9c3)](_0x2410ba),_0x1c55a3=_0x6f549e['getBaseLength'](_0x2410ba)*_0x3f6938,_0x32c117=_0x6f549e['distance'](_0x115afa,_0x1e7a03),_0x2c1a7d=(_0x1c55a3-_0x32c117)/0x2,_0x2d0db9=0x0,_0x518376=[],_0x33d402=[];for(let _0x4d093d=0x1;_0x4d093d<_0x2410ba[_0x21d869(0x6a2)]-0x1;_0x4d093d++){let _0x7bd4c9=_0x6f549e[_0x21d869(0x1a8)](_0x2410ba[_0x4d093d-0x1],_0x2410ba[_0x4d093d],_0x2410ba[_0x4d093d+0x1])/0x2;_0x2d0db9+=_0x6f549e[_0x21d869(0x7f4)](_0x2410ba[_0x4d093d-0x1],_0x2410ba[_0x4d093d]);let _0x891dc1=(_0x1c55a3/0x2-_0x2d0db9/_0x3b5c8d*_0x2c1a7d)/Math[_0x21d869(0xb8)](_0x7bd4c9),_0x1b6072=_0x6f549e[_0x21d869(0x393)](_0x2410ba[_0x4d093d-0x1],_0x2410ba[_0x4d093d],Math['PI']-_0x7bd4c9,_0x891dc1,!0x0),_0x4eb12d=_0x6f549e['getThirdPoint'](_0x2410ba[_0x4d093d-0x1],_0x2410ba[_0x4d093d],_0x7bd4c9,_0x891dc1,!0x1);_0x518376[_0x21d869(0xb3)](_0x1b6072),_0x33d402['push'](_0x4eb12d);}return _0x518376[_0x21d869(0x64c)](_0x33d402);}[_0x43bf95(0x717)](_0x46a565,_0x520825,_0x59c255){const _0x378301=_0x43bf95;let _0x81798d=_0x6f549e['mid'](_0x46a565,_0x520825),_0x551565=_0x6f549e[_0x378301(0x7f4)](_0x81798d,_0x59c255),_0x8ef23f=_0x6f549e[_0x378301(0x1a8)](_0x46a565,_0x81798d,_0x59c255),_0xc5af98,_0x1e4ef1,_0x1b5fcf,_0x5e4f56;return _0x8ef23f<_0x5ecd5a?(_0x1e4ef1=_0x551565*Math[_0x378301(0xb8)](_0x8ef23f),_0x1b5fcf=_0x551565*Math[_0x378301(0x728)](_0x8ef23f),_0x5e4f56=_0x6f549e[_0x378301(0x393)](_0x46a565,_0x81798d,_0x5ecd5a,_0x1e4ef1,!0x1),_0xc5af98=_0x6f549e[_0x378301(0x393)](_0x81798d,_0x5e4f56,_0x5ecd5a,_0x1b5fcf,!0x0)):_0x8ef23f>=_0x5ecd5a&&_0x8ef23f<Math['PI']?(_0x1e4ef1=_0x551565*Math['sin'](Math['PI']-_0x8ef23f),_0x1b5fcf=_0x551565*Math[_0x378301(0x728)](Math['PI']-_0x8ef23f),_0x5e4f56=_0x6f549e['getThirdPoint'](_0x46a565,_0x81798d,_0x5ecd5a,_0x1e4ef1,!0x1),_0xc5af98=_0x6f549e[_0x378301(0x393)](_0x81798d,_0x5e4f56,_0x5ecd5a,_0x1b5fcf,!0x1)):_0x8ef23f>=Math['PI']&&_0x8ef23f<Math['PI']*1.5?(_0x1e4ef1=_0x551565*Math[_0x378301(0xb8)](_0x8ef23f-Math['PI']),_0x1b5fcf=_0x551565*Math[_0x378301(0x728)](_0x8ef23f-Math['PI']),_0x5e4f56=_0x6f549e[_0x378301(0x393)](_0x46a565,_0x81798d,_0x5ecd5a,_0x1e4ef1,!0x0),_0xc5af98=_0x6f549e[_0x378301(0x393)](_0x81798d,_0x5e4f56,_0x5ecd5a,_0x1b5fcf,!0x0)):(_0x1e4ef1=_0x551565*Math[_0x378301(0xb8)](Math['PI']*0x2-_0x8ef23f),_0x1b5fcf=_0x551565*Math[_0x378301(0x728)](Math['PI']*0x2-_0x8ef23f),_0x5e4f56=_0x6f549e[_0x378301(0x393)](_0x46a565,_0x81798d,_0x5ecd5a,_0x1e4ef1,!0x0),_0xc5af98=_0x6f549e[_0x378301(0x393)](_0x81798d,_0x5e4f56,_0x5ecd5a,_0x1b5fcf,!0x1)),_0xc5af98;}['_getHierarchy'](){const _0x2c0959=_0x43bf95;let _0x2f7fd1=this[_0x2c0959(0x387)]['length'],_0x173c0a,_0x68a853,_0x19419e=_0x16f48b[_0x2c0959(0x66d)](this[_0x2c0959(0x387)])[0x0],_0x3783a1=_0x19419e[0x0],_0x376b35=_0x19419e[0x1],_0x394e5f=_0x19419e[0x2];_0x2f7fd1===0x3?_0x173c0a=this[_0x2c0959(0x717)](_0x3783a1,_0x376b35,_0x394e5f):_0x173c0a=_0x19419e[0x3],_0x2f7fd1===0x3||_0x2f7fd1===0x4?_0x68a853=_0x6f549e[_0x2c0959(0x8bf)](_0x3783a1,_0x376b35):_0x68a853=_0x19419e[0x4];let _0x311618,_0x496e8f;_0x6f549e[_0x2c0959(0x762)](_0x3783a1,_0x376b35,_0x394e5f)?(_0x311618=this[_0x2c0959(0x78d)](_0x3783a1,_0x68a853,_0x173c0a,!0x1),_0x496e8f=this['_getArrowPoints'](_0x68a853,_0x376b35,_0x394e5f,!0x0)):(_0x311618=this['_getArrowPoints'](_0x376b35,_0x68a853,_0x394e5f,!0x1),_0x496e8f=this['_getArrowPoints'](_0x68a853,_0x3783a1,_0x173c0a,!0x0));let _0xf990e9=_0x311618[_0x2c0959(0x6a2)],_0x83ea83=(_0xf990e9-0x5)/0x2,_0x1876c5=_0x311618['slice'](0x0,_0x83ea83),_0x411d65=_0x311618[_0x2c0959(0x724)](_0x83ea83,_0x83ea83+0x5),_0x105794=_0x311618['slice'](_0x83ea83+0x5,_0xf990e9),_0x2750e7=_0x496e8f['slice'](0x0,_0x83ea83),_0x5c3865=_0x496e8f['slice'](_0x83ea83,_0x83ea83+0x5),_0x3c1ff1=_0x496e8f[_0x2c0959(0x724)](_0x83ea83+0x5,_0xf990e9);_0x2750e7=_0x6f549e[_0x2c0959(0x5dc)](_0x2750e7);let _0x9caff6=_0x6f549e['getBezierPoints'](_0x3c1ff1[_0x2c0959(0x64c)](_0x1876c5['slice'](0x1)));return _0x105794=_0x6f549e[_0x2c0959(0x5dc)](_0x105794),new _0x34d1e5['Cesium']['PolygonHierarchy'](_0x5e5f93[_0x2c0959(0x999)](_0x16f48b['parsePositions'](_0x2750e7[_0x2c0959(0x64c)](_0x5c3865,_0x9caff6,_0x411d65,_0x105794))));}[_0x43bf95(0x6a3)](){const _0x5b261e=_0x43bf95;this[_0x5b261e(0x752)]=this['_positions'];}[_0x43bf95(0x610)](_0x5bb9ee,_0xca6e0){return this;}['setStyle'](_0x29499a){const _0x399888=_0x43bf95;return Object[_0x399888(0x6f9)](_0x29499a)[_0x399888(0x6a2)]===0x0?this:(delete _0x29499a[_0x399888(0x752)],_0x3f7522[_0x399888(0x5da)](this['_style'],_0x29499a),_0x3f7522['merge'](this['_delegate'][_0x399888(0x410)],_0x29499a),this);}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x9e3));var _0xa72d62=_0x87898f,_0x47aab6=Math['PI']/0x2,_0x5d2699=class extends _0x4f8204{constructor(_0x64c738){const _0x35b517=_0x43bf95;super(),this[_0x35b517(0x387)]=_0x16f48b[_0x35b517(0xa8b)](_0x64c738),this[_0x35b517(0xaa1)]=new _0x34d1e5[(_0x35b517(0x7aa))][(_0x35b517(0x926))]({'polygon':{}}),this[_0x35b517(0x987)]=0.15,this[_0x35b517(0x972)]=0.2,this['headWidthFactor']=0.25,this[_0x35b517(0x895)]=Math['PI']/8.5,this[_0x35b517(0x3c9)]=Math['PI']/0xd,this['_state']=_0x4075ae[_0x35b517(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x4e4882=_0x43bf95;return _0x4f8204[_0x4e4882(0x853)](_0x4e4882(0x8cf));}set[_0x43bf95(0x752)](_0x428b84){const _0x4e0794=_0x43bf95;this['_positions']=_0x16f48b[_0x4e0794(0xa8b)](_0x428b84),this['_delegate'][_0x4e0794(0x410)][_0x4e0794(0x245)]=this[_0x4e0794(0x340)]();}get['positions'](){const _0x14f80d=_0x43bf95;return this[_0x14f80d(0x387)];}[_0x43bf95(0x340)](){const _0x4c380c=_0x43bf95;let _0xe4285d=_0x16f48b[_0x4c380c(0x66d)](this[_0x4c380c(0x387)])[0x0],_0x1b2a8f=_0xe4285d[0x0],_0x3a7923=_0xe4285d[0x1],_0x4f7461=_0x6f549e[_0x4c380c(0x846)](_0xe4285d),_0x296d67=_0x4f7461*this[_0x4c380c(0x987)],_0x4db49b=_0x4f7461*this[_0x4c380c(0x972)],_0x545c12=_0x4f7461*this['headWidthFactor'],_0x4f4d11=_0x6f549e[_0x4c380c(0x393)](_0x3a7923,_0x1b2a8f,_0x47aab6,_0x296d67,!0x0),_0x44be10=_0x6f549e[_0x4c380c(0x393)](_0x3a7923,_0x1b2a8f,_0x47aab6,_0x296d67,!0x1),_0x3dc5df=_0x6f549e['getThirdPoint'](_0x1b2a8f,_0x3a7923,this[_0x4c380c(0x895)],_0x545c12,!0x1),_0x25188f=_0x6f549e[_0x4c380c(0x393)](_0x1b2a8f,_0x3a7923,this[_0x4c380c(0x895)],_0x545c12,!0x0),_0x3e842e=_0x6f549e[_0x4c380c(0x393)](_0x1b2a8f,_0x3a7923,this[_0x4c380c(0x3c9)],_0x4db49b,!0x1),_0x452e24=_0x6f549e[_0x4c380c(0x393)](_0x1b2a8f,_0x3a7923,this[_0x4c380c(0x3c9)],_0x4db49b,!0x0);return new _0x34d1e5[(_0x4c380c(0x7aa))][(_0x4c380c(0x89f))](_0x5e5f93[_0x4c380c(0x999)](_0x16f48b[_0x4c380c(0xa8b)]([_0x4f4d11,_0x3e842e,_0x3dc5df,_0x3a7923,_0x25188f,_0x452e24,_0x44be10])));}['_mountedHook'](){const _0x9b23e2=_0x43bf95;this[_0x9b23e2(0x752)]=this['_positions'];}[_0x43bf95(0x610)](_0x52d368,_0x430482){return this;}[_0x43bf95(0x5db)](_0x7821b0){const _0x555e7b=_0x43bf95;return Object[_0x555e7b(0x6f9)](_0x7821b0)[_0x555e7b(0x6a2)]===0x0?this:(delete _0x7821b0[_0x555e7b(0x752)],_0x3f7522['merge'](this['_style'],_0x7821b0),_0x3f7522[_0x555e7b(0x5da)](this['_delegate'][_0x555e7b(0x410)],_0x7821b0),this);}};_0x4f8204[_0x43bf95(0x545)]('fine_arrow');var _0x3d1b87=_0x5d2699,_0x288c8e=Math['PI']/0x2,_0x52ecfa=0x64,_0x225bfc=class extends _0x4f8204{constructor(_0xe15a9e){const _0x10ceb0=_0x43bf95;super(),this['_positions']=_0x16f48b[_0x10ceb0(0xa8b)](_0xe15a9e),this[_0x10ceb0(0xaa1)]=new _0x34d1e5['Cesium'][(_0x10ceb0(0x926))]({'polygon':{}}),this['t']=0.4,this[_0x10ceb0(0x558)]=_0x4075ae[_0x10ceb0(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x48281e=_0x43bf95;return _0x4f8204[_0x48281e(0x853)](_0x48281e(0x232));}set[_0x43bf95(0x752)](_0x345484){const _0x1dc80a=_0x43bf95;this[_0x1dc80a(0x387)]=_0x16f48b['parsePositions'](_0x345484),this[_0x1dc80a(0xaa1)]['polygon'][_0x1dc80a(0x245)]=this['_getHierarchy']();}get['positions'](){return this['_positions'];}[_0x43bf95(0x340)](){const _0x2f8261=_0x43bf95;let _0x34be38=_0x16f48b[_0x2f8261(0x66d)](this[_0x2f8261(0x387)])[0x0];if(this[_0x2f8261(0x387)][_0x2f8261(0x6a2)]===0x2){let _0x2dfa61=_0x6f549e[_0x2f8261(0x8bf)](_0x34be38[0x0],_0x34be38[0x1]),_0x49ba46=_0x6f549e[_0x2f8261(0x7f4)](_0x34be38[0x0],_0x2dfa61)/0.9,_0x4b68d2=_0x6f549e[_0x2f8261(0x393)](_0x34be38[0x0],_0x2dfa61,_0x288c8e,_0x49ba46,!0x0);_0x34be38=[_0x34be38[0x0],_0x4b68d2,_0x34be38[0x1]];}let _0xbd9742=_0x6f549e[_0x2f8261(0x8bf)](_0x34be38[0x0],_0x34be38[0x2]);_0x34be38['push'](_0xbd9742,_0x34be38[0x0],_0x34be38[0x1]);let _0xd92598=[];for(let _0x4804cc=0x0;_0x4804cc<_0x34be38['length']-0x2;_0x4804cc++){let _0x380e1c=_0x34be38[_0x4804cc],_0x1d8e0e=_0x34be38[_0x4804cc+0x1],_0x474b5f=_0x34be38[_0x4804cc+0x2],_0x5d6f14=_0x6f549e[_0x2f8261(0x2f4)](this['t'],_0x380e1c,_0x1d8e0e,_0x474b5f);_0xd92598=_0xd92598[_0x2f8261(0x64c)](_0x5d6f14);}let _0x2b09cc=_0xd92598['length'];_0xd92598=[_0xd92598[_0x2b09cc-0x1]][_0x2f8261(0x64c)](_0xd92598['slice'](0x0,_0x2b09cc-0x1));let _0x3d3ba4=[];for(let _0x97aed4=0x0;_0x97aed4<_0x34be38['length']-0x2;_0x97aed4++){let _0x4d1e18=_0x34be38[_0x97aed4],_0x3acea2=_0x34be38[_0x97aed4+0x1];_0x3d3ba4[_0x2f8261(0xb3)](_0x4d1e18);for(let _0x392d4a=0x0;_0x392d4a<=_0x52ecfa;_0x392d4a++){let _0x4f3a28=_0x6f549e['getCubicValue'](_0x392d4a/_0x52ecfa,_0x4d1e18,_0xd92598[_0x97aed4*0x2],_0xd92598[_0x97aed4*0x2+0x1],_0x3acea2);_0x3d3ba4[_0x2f8261(0xb3)](_0x4f3a28);}_0x3d3ba4['push'](_0x3acea2);}return new _0x34d1e5[(_0x2f8261(0x7aa))][(_0x2f8261(0x89f))](_0x5e5f93['transformWGS84ArrayToCartesianArray'](_0x16f48b['parsePositions'](_0x3d3ba4)));}['_mountedHook'](){const _0x5b0f08=_0x43bf95;this[_0x5b0f08(0x752)]=this[_0x5b0f08(0x387)];}[_0x43bf95(0x610)](_0x117008,_0x23492a){return this;}[_0x43bf95(0x5db)](_0x387494){const _0x52b18a=_0x43bf95;return Object[_0x52b18a(0x6f9)](_0x387494)[_0x52b18a(0x6a2)]===0x0?this:(delete _0x387494['positions'],_0x3f7522[_0x52b18a(0x5da)](this['_style'],_0x387494),_0x3f7522[_0x52b18a(0x5da)](this[_0x52b18a(0xaa1)]['polygon'],_0x387494),this);}};_0x4f8204['registerType'](_0x43bf95(0x232));var _0x5e3739=_0x225bfc,_0x45e8d6=class extends _0x22d820{constructor(_0x5bf345){const _0x112f44=_0x43bf95;super(_0x5bf345),this[_0x112f44(0xaa1)]=new _0x34d1e5[(_0x112f44(0x7aa))][(_0x112f44(0x926))]({'polygon':{}}),this[_0x112f44(0x1c9)]=0.18,this[_0x112f44(0x608)]=0.3,this['neckHeightFactor']=0.85,this['neckWidthFactor']=0.15,this[_0x112f44(0x987)]=0.1,this['headTailFactor']=0.8,this[_0x112f44(0x3dc)]=0x1,this[_0x112f44(0x558)]=_0x4075ae[_0x112f44(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x5794df=_0x43bf95;return _0x4f8204[_0x5794df(0x853)](_0x5794df(0x261));}set[_0x43bf95(0x752)](_0x2623a3){const _0x2a3a17=_0x43bf95;this[_0x2a3a17(0x387)]=_0x16f48b[_0x2a3a17(0xa8b)](_0x2623a3),this[_0x2a3a17(0xaa1)][_0x2a3a17(0x410)][_0x2a3a17(0x245)]=this[_0x2a3a17(0x340)]();}get['positions'](){const _0x59f2f7=_0x43bf95;return this[_0x59f2f7(0x387)];}[_0x43bf95(0x340)](){const _0x32474f=_0x43bf95;let _0x48ce69=_0x16f48b[_0x32474f(0x66d)](this[_0x32474f(0x387)])[0x0],_0x4a0c46=_0x48ce69[0x0],_0x50f320=_0x48ce69[0x1];_0x6f549e[_0x32474f(0x762)](_0x48ce69[0x0],_0x48ce69[0x1],_0x48ce69[0x2])&&(_0x4a0c46=_0x48ce69[0x1],_0x50f320=_0x48ce69[0x0]);let _0x3ef6c5=[_0x6f549e[_0x32474f(0x8bf)](_0x4a0c46,_0x50f320)][_0x32474f(0x64c)](_0x48ce69[_0x32474f(0x724)](0x2)),_0x422342=this[_0x32474f(0x5ab)](_0x3ef6c5,_0x4a0c46,_0x50f320),_0x3aedb9=_0x422342[0x0],_0x50c8cd=_0x422342[0x4],_0x47eb08=_0x6f549e[_0x32474f(0x7f4)](_0x4a0c46,_0x50f320),_0x240929=_0x6f549e[_0x32474f(0x846)](_0x3ef6c5),_0x36c1ae=_0x240929*this[_0x32474f(0x987)]*this['swallowTailFactor'],_0x298c6c=_0x6f549e[_0x32474f(0x393)](_0x3ef6c5[0x1],_0x3ef6c5[0x0],0x0,_0x36c1ae,!0x0),_0x418c32=_0x47eb08/_0x240929,_0x364e7f=this['_getArrowBodyPoints'](_0x3ef6c5,_0x3aedb9,_0x50c8cd,_0x418c32),_0x1b2ea0=_0x364e7f[_0x32474f(0x6a2)],_0x916722=[_0x4a0c46][_0x32474f(0x64c)](_0x364e7f['slice'](0x0,_0x1b2ea0/0x2));_0x916722['push'](_0x3aedb9);let _0x447def=[_0x50f320][_0x32474f(0x64c)](_0x364e7f['slice'](_0x1b2ea0/0x2,_0x1b2ea0));return _0x447def[_0x32474f(0xb3)](_0x50c8cd),_0x916722=_0x6f549e[_0x32474f(0x780)](_0x916722),_0x447def=_0x6f549e[_0x32474f(0x780)](_0x447def),new _0x34d1e5[(_0x32474f(0x7aa))]['PolygonHierarchy'](_0x5e5f93[_0x32474f(0x999)](_0x16f48b[_0x32474f(0xa8b)](_0x916722[_0x32474f(0x64c)](_0x422342,_0x447def[_0x32474f(0xd9)](),[_0x298c6c,_0x916722[0x0]]))));}};_0x4f8204[_0x43bf95(0x545)]('tailed_attack_arrow');var _0x2c4845=_0x45e8d6,_0x3a2f76=class extends _0x4f8204{constructor(_0x2f924d,_0x1ff723){const _0x7aa39=_0x43bf95;super(),this['_position']=_0x16f48b[_0x7aa39(0x81a)](_0x2f924d),this[_0x7aa39(0x5a3)]=_0x1ff723,this[_0x7aa39(0x60b)]=[0x20,0x20],this[_0x7aa39(0xaa1)]={'position':void 0x0,'image':void 0x0,'width':0x0,'height':0x0},this[_0x7aa39(0x558)]=_0x4075ae[_0x7aa39(0x5d2)];}get['type'](){const _0x2425f8=_0x43bf95;return _0x4f8204[_0x2425f8(0x853)](_0x2425f8(0x8ac));}set[_0x43bf95(0x9a7)](_0x1fb3da){const _0xba3934=_0x43bf95;this[_0xba3934(0x691)]=_0x16f48b['parsePosition'](_0x1fb3da),this[_0xba3934(0xaa1)][_0xba3934(0x9a7)]=_0x5e5f93[_0xba3934(0x432)](this['_position']);}get[_0x43bf95(0x9a7)](){const _0x31f19e=_0x43bf95;return this[_0x31f19e(0x691)];}set[_0x43bf95(0x741)](_0x11b803){const _0x12536b=_0x43bf95;this[_0x12536b(0x5a3)]=_0x11b803,this[_0x12536b(0xaa1)][_0x12536b(0x6bd)]=this[_0x12536b(0x5a3)];}get[_0x43bf95(0x741)](){return this['_icon'];}set[_0x43bf95(0x729)](_0x2b2896){const _0xaaef51=_0x43bf95;if(!Array['isArray'](_0x2b2896))throw new Error(_0xaaef51(0x7d4));this[_0xaaef51(0x60b)]=_0x2b2896,this[_0xaaef51(0xaa1)]['width']=this[_0xaaef51(0x60b)][0x0]||0x20,this[_0xaaef51(0xaa1)]['height']=this[_0xaaef51(0x60b)][0x1]||0x20;}get[_0x43bf95(0x729)](){const _0x496155=_0x43bf95;return this[_0x496155(0x60b)];}[_0x43bf95(0x6a3)](){const _0x39eb19=_0x43bf95;this['position']=this['_position'],this[_0x39eb19(0x741)]=this[_0x39eb19(0x5a3)],this[_0x39eb19(0x729)]=this[_0x39eb19(0x60b)];}[_0x43bf95(0x5db)](_0x48ed27){const _0x9b4038=_0x43bf95;return!_0x48ed27||Object['keys'](_0x48ed27)[_0x9b4038(0x6a2)]===0x0?this:(delete _0x48ed27['position']&&delete _0x48ed27[_0x9b4038(0x6bd)]&&delete _0x48ed27[_0x9b4038(0x371)]&&delete _0x48ed27[_0x9b4038(0x795)],_0x3f7522[_0x9b4038(0x5da)](this['_style'],_0x48ed27),_0x3f7522[_0x9b4038(0x5da)](this[_0x9b4038(0xaa1)],_0x48ed27),this);}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x8ac));var _0x27a280=_0x3a2f76,_0x286c95={'maxOffsetY':0xa,'offsetAmount':0.1},_0x4901aa=class extends _0x27a280{constructor(_0x14bc4d,_0x4598e2){const _0x4abe38=_0x43bf95;super(_0x14bc4d,_0x4598e2),this[_0x4abe38(0xd5)]=new _0x34d1e5[(_0x4abe38(0x7aa))][(_0x4abe38(0x48e))](0x0,0x0),this[_0x4abe38(0x97a)]=!0x0,this[_0x4abe38(0x558)]=_0x4075ae[_0x4abe38(0x5d2)];}get['type'](){const _0x4f0922=_0x43bf95;return _0x4f8204[_0x4f0922(0x853)](_0x4f0922(0x9a5));}['update'](_0x38064a){const _0x5476c4=_0x43bf95;var _0x3ec944,_0x3fac42;if(!this['_show'])return;let _0x509885=((_0x3ec944=this['_style'])==null?void 0x0:_0x3ec944[_0x5476c4(0x39c)])||_0x286c95['maxOffsetY'],_0x5bacc2=((_0x3fac42=this[_0x5476c4(0x9ca)])==null?void 0x0:_0x3fac42['offsetAmount'])||_0x286c95['offsetAmount'];this[_0x5476c4(0xd5)]['y']>=0x0?this[_0x5476c4(0x97a)]=!0x0:this[_0x5476c4(0xd5)]['y']<=-_0x509885&&(this[_0x5476c4(0x97a)]=!0x1),this[_0x5476c4(0xd5)]['y']+=_0x5bacc2*(this['_isUp']?-0x1:0x1),this[_0x5476c4(0xaa1)][_0x5476c4(0x1f4)]=this['_currentOffset'];}[_0x43bf95(0x57b)](){const _0x28d7a6=_0x43bf95;return _0x34d1e5[_0x28d7a6(0x7aa)][_0x28d7a6(0x72a)](this);}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x9a5));var _0x5b654e=_0x4901aa,_0x5acc25=class extends _0x4f8204{constructor(_0x794904,_0x5a2bac){const _0x38fcb7=_0x43bf95;super(),this[_0x38fcb7(0x691)]=_0x16f48b[_0x38fcb7(0x81a)](_0x794904),this[_0x38fcb7(0x620)]=_0x5a2bac,this[_0x38fcb7(0xaa1)]={'position':void 0x0,'text':void 0x0},this[_0x38fcb7(0x558)]=_0x4075ae[_0x38fcb7(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x28bdd9=_0x43bf95;return _0x4f8204[_0x28bdd9(0x853)]('label_primitive');}set[_0x43bf95(0x9a7)](_0x567920){const _0x2c7b87=_0x43bf95;this[_0x2c7b87(0x691)]=_0x16f48b[_0x2c7b87(0x81a)](_0x567920),this[_0x2c7b87(0xaa1)][_0x2c7b87(0x9a7)]=_0x5e5f93['transformWGS84ToCartesian'](this[_0x2c7b87(0x691)]);}get['position'](){return this['_position'];}set[_0x43bf95(0xd8)](_0x3d5dc8){const _0x294bb3=_0x43bf95;this[_0x294bb3(0x620)]=_0x3d5dc8,this[_0x294bb3(0xaa1)][_0x294bb3(0xd8)]=this['_text'];}get['text'](){const _0x35d20d=_0x43bf95;return this[_0x35d20d(0x620)];}[_0x43bf95(0x6a3)](){const _0x4dbb92=_0x43bf95;this[_0x4dbb92(0x9a7)]=this[_0x4dbb92(0x691)],this[_0x4dbb92(0xd8)]=this['_text'];}['setLabel'](_0x1fb125,_0x5e3415){return this;}['setStyle'](_0x8529f6){const _0xd365aa=_0x43bf95;return!_0x8529f6||Object[_0xd365aa(0x6f9)](_0x8529f6)[_0xd365aa(0x6a2)]===0x0?this:(delete _0x8529f6[_0xd365aa(0x9a7)]&&delete _0x8529f6[_0xd365aa(0xd8)],_0x3f7522[_0xd365aa(0x5da)](this['_style'],_0x8529f6),_0x3f7522[_0xd365aa(0x5da)](this['_delegate'],_0x8529f6),this);}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x1b4));var _0x167283=_0x5acc25,_0x58ee5e={'maxOffsetY':0xa,'offsetAmount':0.1},_0x570814=class extends _0x167283{constructor(_0x1e9614,_0x42ab45){const _0x22b37e=_0x43bf95;super(_0x1e9614,_0x42ab45),this[_0x22b37e(0xd5)]=new _0x34d1e5[(_0x22b37e(0x7aa))][(_0x22b37e(0x48e))](0x0,0x0),this['_isUp']=!0x0,this[_0x22b37e(0x558)]=_0x4075ae[_0x22b37e(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x3c5c77=_0x43bf95;return _0x4f8204[_0x3c5c77(0x853)]('bounce_label_primitive');}[_0x43bf95(0x96f)](_0x2ad9cb){const _0x580125=_0x43bf95;var _0x13f0d0,_0x16133e;if(!this[_0x580125(0x850)])return;let _0x6bd8a8=((_0x13f0d0=this[_0x580125(0x9ca)])==null?void 0x0:_0x13f0d0[_0x580125(0x39c)])||_0x58ee5e['maxOffsetY'],_0x3e5eb6=((_0x16133e=this[_0x580125(0x9ca)])==null?void 0x0:_0x16133e[_0x580125(0x93e)])||_0x58ee5e[_0x580125(0x93e)];this[_0x580125(0xd5)]['y']>=0x0?this[_0x580125(0x97a)]=!0x0:this[_0x580125(0xd5)]['y']<=-_0x6bd8a8&&(this['_isUp']=!0x1),this[_0x580125(0xd5)]['y']+=_0x3e5eb6*(this['_isUp']?-0x1:0x1),this[_0x580125(0xaa1)]['pixelOffset']=this[_0x580125(0xd5)];}[_0x43bf95(0x57b)](){const _0x49a4d6=_0x43bf95;return _0x34d1e5[_0x49a4d6(0x7aa)][_0x49a4d6(0x72a)](this);}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x32f));var _0x32da49=_0x570814,_0x34babb=class extends _0x4f8204{constructor(_0x2201d9){const _0x3bcd93=_0x43bf95;super(),this['_position']=_0x16f48b['parsePosition'](_0x2201d9),this['_delegate']={'position':void 0x0,'scale':{'x':0xc,'y':0x8}},this[_0x3bcd93(0x558)]=_0x4075ae[_0x3bcd93(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x534a59=_0x43bf95;return _0x4f8204[_0x534a59(0x853)](_0x534a59(0x6be));}set[_0x43bf95(0x9a7)](_0x4e19b7){const _0x4db478=_0x43bf95;this['_position']=_0x16f48b[_0x4db478(0x81a)](_0x4e19b7),this[_0x4db478(0xaa1)]['position']=_0x5e5f93[_0x4db478(0x432)](this[_0x4db478(0x691)]);}get[_0x43bf95(0x9a7)](){const _0x3a4ff8=_0x43bf95;return this[_0x3a4ff8(0x691)];}[_0x43bf95(0x6a3)](){const _0x33c560=_0x43bf95;this[_0x33c560(0x9a7)]=this[_0x33c560(0x691)];}['setStyle'](_0x30b64f){const _0x36d4a2=_0x43bf95;return!_0x30b64f||Object[_0x36d4a2(0x6f9)](_0x30b64f)[_0x36d4a2(0x6a2)]===0x0?this:(delete _0x30b64f[_0x36d4a2(0x9a7)],_0x3f7522[_0x36d4a2(0x5da)](this[_0x36d4a2(0x9ca)],_0x30b64f),_0x3f7522[_0x36d4a2(0x5da)](this[_0x36d4a2(0xaa1)],_0x30b64f),this);}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x6be));var _0x2baad7=_0x34babb,_0x3efc1a={'minRadius':0xa,'minHeight':0x1e,'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x7d2)][_0x43bf95(0x80b)],'slices':0x80,'speed':0xa},_0x3a472d=class extends _0x4f8204{constructor(_0x46642d,_0x31cc20,_0x2e1423){const _0x5c41b1=_0x43bf95;super(),this[_0x5c41b1(0x2b7)]=_0x16f48b[_0x5c41b1(0x81a)](_0x46642d),this[_0x5c41b1(0xaa1)]=void 0x0,this[_0x5c41b1(0x17e)]=_0x2e1423,this[_0x5c41b1(0x4b0)]=_0x31cc20,this[_0x5c41b1(0xa05)]=_0x2e1423||0x0,this['_currentRadius']=0xa,this[_0x5c41b1(0x9ca)]={..._0x3efc1a},this[_0x5c41b1(0x558)]=_0x4075ae[_0x5c41b1(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0xba7fb7=_0x43bf95;return _0x4f8204[_0xba7fb7(0x853)](_0xba7fb7(0xa5f));}set['center'](_0x2ae74e){const _0x53bd93=_0x43bf95;this[_0x53bd93(0x2b7)]=_0x16f48b[_0x53bd93(0x81a)](_0x2ae74e);}get[_0x43bf95(0x765)](){const _0x4f81ce=_0x43bf95;return this[_0x4f81ce(0x2b7)];}set['radius'](_0x4d3eb8){const _0x270fd9=_0x43bf95;this[_0x270fd9(0x4b0)]=_0x4d3eb8;}get['radius'](){const _0x1c0a51=_0x43bf95;return this[_0x1c0a51(0x4b0)];}set[_0x43bf95(0x795)](_0x4d9770){this['_height']=_0x4d9770;}get[_0x43bf95(0x795)](){return this['_height'];}[_0x43bf95(0x9e8)](){const _0x431dfa=_0x43bf95;let _0x5676f1=[],_0x1f65b1=_0x34d1e5[_0x431dfa(0x7aa)]['Transforms'][_0x431dfa(0x824)](_0x5e5f93[_0x431dfa(0x432)](this[_0x431dfa(0x2b7)]));for(let _0x336ded=0x0;_0x336ded<this[_0x431dfa(0x9ca)]['slices'];_0x336ded++){let _0x30d3e6=_0x336ded/this[_0x431dfa(0x9ca)][_0x431dfa(0xe1)]*_0x34d1e5[_0x431dfa(0x7aa)][_0x431dfa(0x72b)]['TWO_PI'],_0x53dd5a=Math[_0x431dfa(0x728)](_0x30d3e6),_0x4b7053=Math['sin'](_0x30d3e6),_0x44099f=new _0x34d1e5[(_0x431dfa(0x7aa))][(_0x431dfa(0x982))](_0x53dd5a*this[_0x431dfa(0x1b5)],_0x4b7053*this[_0x431dfa(0x1b5)],0x0);_0x5676f1[_0x431dfa(0xb3)](_0x34d1e5[_0x431dfa(0x7aa)][_0x431dfa(0x5ee)][_0x431dfa(0x408)](_0x1f65b1,_0x44099f,new _0x34d1e5['Cesium'][(_0x431dfa(0x982))]()));}return _0x5676f1['push'](_0x5676f1[0x0]),_0x5676f1;}[_0x43bf95(0x9d2)](_0x23ab08,_0xa6d04a){const _0xb198e2=_0x43bf95;let _0x56a2d9=[];for(let _0x3f04f9=0x0;_0x3f04f9<_0x23ab08;_0x3f04f9++)_0x56a2d9[_0xb198e2(0xb3)](_0xa6d04a);return _0x56a2d9;}[_0x43bf95(0x96f)](_0x12a9a1){const _0x333c3e=_0x43bf95;var _0x33f753;if(this[_0x333c3e(0xaa1)]=this['_delegate']&&this[_0x333c3e(0xaa1)][_0x333c3e(0x57b)](),this[_0x333c3e(0x1b5)]+=this[_0x333c3e(0x4b0)]/this[_0x333c3e(0x9ca)][_0x333c3e(0x178)]/0x14,this[_0x333c3e(0xa05)]-=this[_0x333c3e(0x17e)]/this[_0x333c3e(0x9ca)][_0x333c3e(0x178)]/0x14,(this[_0x333c3e(0x1b5)]>this[_0x333c3e(0x4b0)]||this[_0x333c3e(0xa05)]<this['_style']['minHeight'])&&(this[_0x333c3e(0x1b5)]=this[_0x333c3e(0x9ca)][_0x333c3e(0x98f)],this[_0x333c3e(0xa05)]=this[_0x333c3e(0x17e)]),!this['_style'][_0x333c3e(0xe1)]||this[_0x333c3e(0x9ca)]['slices']<0x3)return!0x1;let _0x358649=this['_getPositions']();if(!_0x358649||!_0x358649['length'])return!0x1;let _0x2dbc76=new _0x34d1e5['Cesium'][(_0x333c3e(0x319))]({'positions':_0x358649,'minimumHeights':this[_0x333c3e(0x9d2)](_0x358649[_0x333c3e(0x6a2)],0x0),'maximumHeights':this['_getHeights'](_0x358649[_0x333c3e(0x6a2)],this[_0x333c3e(0xa05)])});this[_0x333c3e(0xaa1)]=new _0x34d1e5[(_0x333c3e(0x7aa))][(_0x333c3e(0x508))]({'geometryInstances':new _0x34d1e5[(_0x333c3e(0x7aa))][(_0x333c3e(0x456))]({'geometry':_0x2dbc76}),'appearance':new _0x34d1e5['Cesium']['MaterialAppearance']({'material':_0x34d1e5[_0x333c3e(0x7aa)]['Material']['fromType']('WallDiffuse',{'color':(_0x33f753=this[_0x333c3e(0x9ca)])==null?void 0x0:_0x33f753[_0x333c3e(0x124)]}),'flat':!0x0}),'asynchronous':!0x1}),this[_0x333c3e(0xaa1)][_0x333c3e(0x96f)](_0x12a9a1);}[_0x43bf95(0x5db)](_0x4ea2f4){const _0x552967=_0x43bf95;return!_0x4ea2f4||Object[_0x552967(0x6f9)](_0x4ea2f4)[_0x552967(0x6a2)]===0x0?this:(_0x3f7522[_0x552967(0x5da)](this[_0x552967(0x9ca)],_0x4ea2f4),this);}['destroy'](){const _0x42e8ad=_0x43bf95;return _0x34d1e5[_0x42e8ad(0x7aa)][_0x42e8ad(0x72a)](this);}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0xa5f));var _0x12cebb=_0x3a472d,_0x54b728=class extends _0x4f8204{constructor(_0x57b354,_0x343743){const _0x3821e8=_0x43bf95;super(),this[_0x3821e8(0x691)]=_0x16f48b[_0x3821e8(0x81a)](_0x57b354),this['_radius']=_0x343743||{'x':0xa,'y':0xa,'z':0xa},this[_0x3821e8(0xaa1)]=new _0x34d1e5[(_0x3821e8(0x7aa))]['Primitive']({'geometryInstances':new _0x34d1e5[(_0x3821e8(0x7aa))][(_0x3821e8(0x456))]({'geometry':{}})}),this['_state']=_0x4075ae[_0x3821e8(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x418136=_0x43bf95;return _0x4f8204[_0x418136(0x853)]('elec_ellipsoid_primitive');}set['position'](_0x448ff3){const _0x858b1a=_0x43bf95;this[_0x858b1a(0x691)]=_0x16f48b[_0x858b1a(0x81a)](_0x448ff3),this[_0x858b1a(0xaa1)][_0x858b1a(0x28a)][_0x858b1a(0xa0c)]=_0x34d1e5[_0x858b1a(0x7aa)][_0x858b1a(0x7a6)][_0x858b1a(0x824)](_0x5e5f93[_0x858b1a(0x432)](this[_0x858b1a(0x691)]));}get['position'](){const _0x4922cd=_0x43bf95;return this[_0x4922cd(0x691)];}set[_0x43bf95(0x28e)](_0x44b313){const _0x5111f6=_0x43bf95;this['_radius']=_0x44b313,this[_0x5111f6(0xaa1)][_0x5111f6(0x28a)][_0x5111f6(0x10a)]=new _0x34d1e5[(_0x5111f6(0x7aa))][(_0x5111f6(0x485))]({'radii':this['_radius'],'maximumCone':_0x34d1e5[_0x5111f6(0x7aa)][_0x5111f6(0x72b)]['PI_OVER_TWO']});}get[_0x43bf95(0x28e)](){const _0x54dc24=_0x43bf95;return this[_0x54dc24(0x4b0)];}[_0x43bf95(0x2dd)](){const _0xed556a=_0x43bf95;var _0x357717,_0x1da709;this[_0xed556a(0x9ca)]&&(this[_0xed556a(0xaa1)][_0xed556a(0x171)]=new _0x34d1e5[(_0xed556a(0x7aa))][(_0xed556a(0x4a2))]({'material':_0x34d1e5[_0xed556a(0x7aa)][_0xed556a(0x4da)]['fromType'](_0xed556a(0x6df),{'color':((_0x357717=this[_0xed556a(0x9ca)])==null?void 0x0:_0x357717[_0xed556a(0x124)])||_0x34d1e5['Cesium'][_0xed556a(0x7d2)][_0xed556a(0x4fa)],'speed':((_0x1da709=this['_style'])==null?void 0x0:_0x1da709[_0xed556a(0x178)])||0x5})}));}[_0x43bf95(0x6a3)](){const _0x4d5943=_0x43bf95;this['radius']=this[_0x4d5943(0x4b0)],this[_0x4d5943(0x9a7)]=this[_0x4d5943(0x691)],!this['_delegate'][_0x4d5943(0x171)]&&this[_0x4d5943(0x2dd)]();}[_0x43bf95(0x610)](_0x3d6c55,_0x10eb51){return this;}['setStyle'](_0x57a76b={}){const _0x545da6=_0x43bf95;return Object['keys'](_0x57a76b)[_0x545da6(0x6a2)]===0x0?this:(_0x3f7522['merge'](this[_0x545da6(0x9ca)],_0x57a76b),this['_setAppearance'](),this);}};_0x4f8204[_0x43bf95(0x545)]('elec_ellipsoid_primitive');var _0x58e525=_0x54b728,_0x3fec86=class extends _0x4f8204{constructor(_0x51d8a4,_0x59530b=0x1){const _0x563e7e=_0x43bf95;super(),this[_0x563e7e(0x387)]=_0x16f48b['parsePositions'](_0x51d8a4),this[_0x563e7e(0x14c)]=_0x59530b,this['_delegate']=new _0x34d1e5[(_0x563e7e(0x7aa))][(_0x563e7e(0x508))]({'geometryInstances':new _0x34d1e5['Cesium'][(_0x563e7e(0x456))]({'geometry':{}})}),this[_0x563e7e(0x558)]=_0x4075ae[_0x563e7e(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0xcd3447=_0x43bf95;return _0x4f8204['getOverlayType'](_0xcd3447(0x97b));}set['positions'](_0x479c27){const _0xd9d408=_0x43bf95;this[_0xd9d408(0x387)]=_0x16f48b[_0xd9d408(0xa8b)](_0x479c27),this[_0xd9d408(0xaa1)][_0xd9d408(0x28a)]['geometry']=new _0x34d1e5[(_0xd9d408(0x7aa))]['PolylineGeometry']({'positions':_0x5e5f93[_0xd9d408(0x999)](this[_0xd9d408(0x387)]),'width':this[_0xd9d408(0x14c)]});}get[_0x43bf95(0x752)](){return this['_positions'];}[_0x43bf95(0x2dd)](){const _0x2c71c2=_0x43bf95;var _0x2b8a47,_0x4d2d61,_0x4cbb04,_0x2a7c0a;this[_0x2c71c2(0xaa1)]['appearance']=new _0x34d1e5[(_0x2c71c2(0x7aa))][(_0x2c71c2(0x646))]({'material':_0x34d1e5[_0x2c71c2(0x7aa)][_0x2c71c2(0x4da)][_0x2c71c2(0xa40)]('PolylineFlow',{'color':((_0x2b8a47=this[_0x2c71c2(0x9ca)])==null?void 0x0:_0x2b8a47['color'])||new _0x34d1e5[(_0x2c71c2(0x7aa))][(_0x2c71c2(0x7d2))](0x1,0x0,0x0,0.7),'speed':((_0x4d2d61=this['_style'])==null?void 0x0:_0x4d2d61['speed'])||0x1,'percent':((_0x4cbb04=this[_0x2c71c2(0x9ca)])==null?void 0x0:_0x4cbb04[_0x2c71c2(0x37c)])||0.03,'gradient':((_0x2a7c0a=this[_0x2c71c2(0x9ca)])==null?void 0x0:_0x2a7c0a[_0x2c71c2(0x1ef)])||0.1})});}[_0x43bf95(0x6a3)](){const _0x1b6b74=_0x43bf95;this['positions']=this[_0x1b6b74(0x387)],!this[_0x1b6b74(0xaa1)]['appearance']&&this[_0x1b6b74(0x2dd)]();}['setLabel'](_0x5990dc,_0x350310){return this;}[_0x43bf95(0x5db)](_0x3b57d0={}){const _0x38e976=_0x43bf95;return Object[_0x38e976(0x6f9)](_0x3b57d0)[_0x38e976(0x6a2)]===0x0?this:(_0x3f7522[_0x38e976(0x5da)](this[_0x38e976(0x9ca)],_0x3b57d0),_0x3b57d0['classificationType']&&(this[_0x38e976(0xaa1)][_0x38e976(0x64a)]=this[_0x38e976(0x9ca)]['classificationType']),this['_setAppearance'](),this);}};_0x4f8204[_0x43bf95(0x545)]('flow_line_primitive');var _0xa80619=_0x3fec86,_0x3fdc48=_0x43bf95(0x8dc),_0x557d7a={'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x7d2)]['ORANGE']},_0x201abb=class extends _0x4f8204{constructor(_0x1726d4,_0x135cea,_0x384ef2,_0x5761fb){const _0x320531=_0x43bf95;super(),this[_0x320531(0x2b7)]=_0x16f48b['parsePosition'](_0x1726d4),this[_0x320531(0x8cb)]=_0x135cea||0x64,this[_0x320531(0x50d)]=_0x384ef2||0x1,this['_bottomRadius']=_0x5761fb||0x32,this['_delegate']=new _0x34d1e5[(_0x320531(0x7aa))][(_0x320531(0x7b4))](),this[_0x320531(0x9ca)]={..._0x557d7a},this[_0x320531(0x558)]=_0x4075ae[_0x320531(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x12893d=_0x43bf95;return _0x4f8204[_0x12893d(0x853)](_0x12893d(0x816));}set[_0x43bf95(0x765)](_0x49ae1e){const _0x597fdc=_0x43bf95;this[_0x597fdc(0x2b7)]=_0x16f48b[_0x597fdc(0x81a)](_0x49ae1e),this['_updatePrimitives']();}get[_0x43bf95(0x765)](){const _0x3bb230=_0x43bf95;return this[_0x3bb230(0x2b7)];}set[_0x43bf95(0x6a2)](_0x5da184){const _0x3d430c=_0x43bf95;this[_0x3d430c(0x8cb)]=_0x5da184,this[_0x3d430c(0x31f)]();}get[_0x43bf95(0x6a2)](){const _0x25b6a2=_0x43bf95;return this[_0x25b6a2(0x8cb)];}set[_0x43bf95(0x200)](_0x41afc0){const _0x57494b=_0x43bf95;this[_0x57494b(0x50d)]=_0x41afc0,this[_0x57494b(0x31f)]();}get[_0x43bf95(0x200)](){const _0xe7f8ef=_0x43bf95;return this[_0xe7f8ef(0x50d)];}set['bottomRadius'](_0x3cf137){const _0x1e5632=_0x43bf95;this[_0x1e5632(0x52f)]=_0x3cf137,this[_0x1e5632(0x31f)]();}get[_0x43bf95(0xa82)](){const _0x24e885=_0x43bf95;return this[_0x24e885(0x52f)];}[_0x43bf95(0x36d)](_0x585a1d,_0x2d0df7){const _0x27182b=_0x43bf95;let _0x25f416=_0x34d1e5[_0x27182b(0x7aa)][_0x27182b(0x8d4)][_0x27182b(0xa58)]({'center':_0x5e5f93[_0x27182b(0x432)](_0x585a1d),'semiMajorAxis':_0x2d0df7,'semiMinorAxis':_0x2d0df7,'rotation':0x0,'granularity':0.005},!0x1,!0x0),_0xe28f09=_0x34d1e5[_0x27182b(0x7aa)][_0x27182b(0x982)][_0x27182b(0x877)](_0x25f416[_0x27182b(0x8e1)]);return _0xe28f09['push'](_0xe28f09[0x0]),_0xe28f09;}[_0x43bf95(0x97f)](_0x380b33,_0x463c4d,_0x57e002){const _0x590e2e=_0x43bf95;let _0x38a686=_0x463c4d['slice'](),_0x32c115=_0x463c4d[_0x590e2e(0x6a2)],_0x1db4fe=0x2*_0x32c115,_0x288ceb=[],_0x488c4b=0x1/(_0x32c115-0x1),_0x28804c=[],_0x3711ec=[],_0x44607e=(_0x5c6afb,_0x108790=0x0)=>{const _0x540a6a=_0x590e2e;let _0x574ccb=_0x34d1e5[_0x540a6a(0x7aa)][_0x540a6a(0x4f1)][_0x540a6a(0x17a)](_0x5c6afb);return _0x574ccb[_0x540a6a(0x795)]+=_0x108790,_0x34d1e5[_0x540a6a(0x7aa)][_0x540a6a(0x4f1)]['toCartesian'](_0x574ccb);};for(let _0x4c5db8=0x0;_0x4c5db8<_0x32c115;_0x4c5db8++){_0x3711ec[_0x590e2e(0xb3)](_0x44607e(_0x380b33[_0x4c5db8],_0x57e002)),_0x288ceb[_0x590e2e(0xb3)](_0x4c5db8*_0x488c4b,0x0);let _0x1e571b=_0x4c5db8+0x1,_0x8db86=(_0x4c5db8+0x1)%_0x32c115,_0x3cdc5b=_0x1db4fe-_0x1e571b;_0x28804c[_0x590e2e(0xb3)](_0x3cdc5b-0x1,_0x3cdc5b,_0x4c5db8),_0x28804c[_0x590e2e(0xb3)](_0x4c5db8,_0x8db86,_0x3cdc5b-0x1);}for(let _0x4d5c90 in _0x3711ec)_0x38a686['push'](_0x3711ec[_0x32c115-_0x4d5c90-0x1]),_0x288ceb[_0x590e2e(0xb3)](0x1-_0x4d5c90*_0x488c4b,0x1);let _0x2c4836=_0x34d1e5['Cesium'][_0x590e2e(0x829)][_0x590e2e(0x1a4)](new _0x34d1e5[(_0x590e2e(0x7aa))][(_0x590e2e(0x829))]({'polygonHierarchy':new _0x34d1e5[(_0x590e2e(0x7aa))][(_0x590e2e(0x89f))](_0x38a686),'perPositionHeight':!0x0}));return _0x2c4836[_0x590e2e(0x3ca)]=_0x28804c,_0x2c4836[_0x590e2e(0x5f4)]['st'][_0x590e2e(0x1e2)]=_0x288ceb,new _0x34d1e5[(_0x590e2e(0x7aa))][(_0x590e2e(0x456))]({'geometry':_0x2c4836});}[_0x43bf95(0x9b4)](){const _0x46f359=_0x43bf95;let _0x5d6591=document[_0x46f359(0x7dc)](_0x46f359(0x790));_0x5d6591[_0x46f359(0x371)]=0x200,_0x5d6591[_0x46f359(0x795)]=0x200;let _0x221ee9=_0x5d6591[_0x46f359(0x7f0)]('2d');return _0x221ee9['fillStyle']='rgba(255,255,255,0)',_0x221ee9[_0x46f359(0x4e6)]='rgba(255,\x20255,\x20255,255)',_0x221ee9['setLineDash']([0x32,0x32]),_0x221ee9[_0x46f359(0x907)]=0x1e,_0x221ee9[_0x46f359(0x9b6)](),_0x221ee9['arc'](0x100,0x100,0x96,0x0,Math['PI']*0x2,!0x0),_0x221ee9[_0x46f359(0x16e)](),_0x221ee9[_0x46f359(0x347)](),_0x5d6591;}[_0x43bf95(0x394)](_0x12745d){const _0x38da16=_0x43bf95;let _0x3c23af=document['createElement'](_0x38da16(0x790));_0x3c23af['width']=0x40,_0x3c23af['height']=0x100;let _0x2fa1ed=_0x3c23af[_0x38da16(0x7f0)]('2d');return _0x2fa1ed['clearRect'](0x0,0x0,0x40,0x100),_0x2fa1ed[_0x38da16(0xa1a)](_0x12745d,0x0,0x0),_0x2fa1ed[_0x38da16(0xa1a)](_0x12745d,0x21,0x0),_0x3c23af;}[_0x43bf95(0x31f)](){const _0x591a12=_0x43bf95;this[_0x591a12(0xaa1)]['removeAll']();let _0x4c7903=this[_0x591a12(0x2b7)][_0x591a12(0xa84)]===0x0,_0x4ca5a9=this[_0x591a12(0x36d)](this[_0x591a12(0x2b7)],this[_0x591a12(0x50d)]),_0x3fc038=this[_0x591a12(0x36d)](this[_0x591a12(0x2b7)],this[_0x591a12(0x52f)]*0.7),_0x409958=this['_computeEllipsePositions'](this[_0x591a12(0x2b7)],this[_0x591a12(0x52f)]),_0x4d486f={'geometryInstances':new _0x34d1e5[(_0x591a12(0x7aa))][(_0x591a12(0x456))]({'geometry':new _0x34d1e5['Cesium'][(_0x591a12(0x829))]({'polygonHierarchy':new _0x34d1e5[(_0x591a12(0x7aa))][(_0x591a12(0x89f))](this[_0x591a12(0x36d)](this[_0x591a12(0x2b7)],this[_0x591a12(0x52f)]*0x2)),'perPositionHeight':!_0x4c7903}),'asynchronous':!0x1})},_0x4ff4b5=_0x4c7903?new _0x34d1e5['Cesium'][(_0x591a12(0xa7))](_0x4d486f):new _0x34d1e5[(_0x591a12(0x7aa))][(_0x591a12(0x508))](_0x4d486f);_0x4ff4b5[_0x591a12(0x171)]=new _0x34d1e5['Cesium'][(_0x591a12(0xc5))]({'material':_0x34d1e5[_0x591a12(0x7aa)][_0x591a12(0x4da)]['fromType'](_0x34d1e5[_0x591a12(0x7aa)]['Material']['CircleRingType'],{'color':this[_0x591a12(0x9ca)]['color']})});let _0x1147ab=_0x4c7903?new _0x34d1e5[(_0x591a12(0x7aa))]['GroundPrimitive'](_0x4d486f):new _0x34d1e5[(_0x591a12(0x7aa))][(_0x591a12(0x508))](_0x4d486f);_0x1147ab[_0x591a12(0x171)]=new _0x34d1e5[(_0x591a12(0x7aa))][(_0x591a12(0xc5))]({'material':_0x34d1e5['Cesium'][_0x591a12(0x4da)][_0x591a12(0xa40)](_0x34d1e5[_0x591a12(0x7aa)]['Material'][_0x591a12(0xaa7)],{'color':this[_0x591a12(0x9ca)]['color'],'image':this[_0x591a12(0x9b4)]()})});let _0x36452b=new _0x34d1e5[(_0x591a12(0x7aa))][(_0x591a12(0x508))]({'geometryInstances':this['_createCylinderInstance'](_0x4ca5a9,_0x3fc038,this['_length']),'appearance':new _0x34d1e5[(_0x591a12(0x7aa))][(_0x591a12(0xc5))]({'material':_0x34d1e5[_0x591a12(0x7aa)]['Material'][_0x591a12(0xa40)](_0x34d1e5[_0x591a12(0x7aa)][_0x591a12(0x4da)][_0x591a12(0x3ee)],{'color':this[_0x591a12(0x9ca)][_0x591a12(0x124)]})}),'asynchronous':!0x1});_0x4c7903?_0x34d1e5[_0x591a12(0x7aa)][_0x591a12(0xa7)][_0x591a12(0x7f1)]()['then'](()=>{const _0x55cca1=_0x591a12;this[_0x55cca1(0xaa1)][_0x55cca1(0x45f)](_0x4ff4b5),this[_0x55cca1(0xaa1)][_0x55cca1(0x45f)](_0x1147ab),this[_0x55cca1(0xaa1)][_0x55cca1(0x45f)](_0x36452b);}):(this[_0x591a12(0xaa1)][_0x591a12(0x45f)](_0x4ff4b5),this['_delegate'][_0x591a12(0x45f)](_0x1147ab),this[_0x591a12(0xaa1)]['add'](_0x36452b)),_0x34d1e5[_0x591a12(0x7aa)]['Resource']['fetchImage']({'url':_0x3fdc48})[_0x591a12(0x379)](_0x5b0f23=>{const _0x5c2d80=_0x591a12;let _0x12614f=new _0x34d1e5[(_0x5c2d80(0x7aa))][(_0x5c2d80(0x508))]({'geometryInstances':this[_0x5c2d80(0x97f)](_0x4ca5a9,_0x409958,this['_length']),'appearance':new _0x34d1e5[(_0x5c2d80(0x7aa))][(_0x5c2d80(0xc5))]({'material':_0x34d1e5[_0x5c2d80(0x7aa)]['Material']['fromType'](_0x34d1e5[_0x5c2d80(0x7aa)][_0x5c2d80(0x4da)][_0x5c2d80(0x483)],{'color':this[_0x5c2d80(0x9ca)][_0x5c2d80(0x124)],'image':this[_0x5c2d80(0x394)](_0x5b0f23)})}),'asynchronous':!0x1});this[_0x5c2d80(0xaa1)]['add'](_0x12614f);});}['_mountedHook'](){const _0x54b998=_0x43bf95;this[_0x54b998(0x765)]=this[_0x54b998(0x2b7)];}[_0x43bf95(0x96f)](_0x476eb3){const _0x17cfef=_0x43bf95;this[_0x17cfef(0xaa1)][_0x17cfef(0x96f)](_0x476eb3);}['setStyle'](_0x11172f){const _0x436b16=_0x43bf95;return!_0x11172f||Object['keys'](_0x11172f)['length']===0x0?this:(_0x3f7522['merge'](this[_0x436b16(0x9ca)],_0x11172f),this);}['destroy'](){const _0x6c0e83=_0x43bf95;return _0x34d1e5[_0x6c0e83(0x7aa)][_0x6c0e83(0x72a)](this);}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x816));var _0x466bc3=_0x201abb,_0x551e98=class extends _0x4f8204{constructor(_0x10064e,_0xee5b5a){const _0x4d8d8d=_0x43bf95;super(),this[_0x4d8d8d(0x691)]=_0x16f48b[_0x4d8d8d(0x81a)](_0x10064e),this[_0x4d8d8d(0x210)]=_0xee5b5a,this['_delegate']=_0x34d1e5[_0x4d8d8d(0x7aa)][_0x4d8d8d(0x64e)][_0x4d8d8d(0x556)]({'url':_0xee5b5a}),this[_0x4d8d8d(0x3ff)]=new _0x4763ca(this[_0x4d8d8d(0xaa1)]),this['_state']=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){const _0x5947a6=_0x43bf95;return _0x4f8204[_0x5947a6(0x853)](_0x5947a6(0x8ec));}set[_0x43bf95(0x9a7)](_0x130d2a){const _0x26a41c=_0x43bf95;this[_0x26a41c(0x691)]=_0x16f48b[_0x26a41c(0x81a)](_0x130d2a);let _0x45832e=_0x5e5f93[_0x26a41c(0x432)](this[_0x26a41c(0x691)]);this[_0x26a41c(0xaa1)][_0x26a41c(0x379)](_0x58e5aa=>{const _0x16f14f=_0x26a41c;_0x58e5aa[_0x16f14f(0xa0c)]=_0x34d1e5[_0x16f14f(0x7aa)][_0x16f14f(0x7a6)][_0x16f14f(0x228)](_0x45832e,new _0x34d1e5[(_0x16f14f(0x7aa))][(_0x16f14f(0x517))](_0x34d1e5[_0x16f14f(0x7aa)][_0x16f14f(0x72b)][_0x16f14f(0x2b0)](this['_position'][_0x16f14f(0x77c)]),_0x34d1e5[_0x16f14f(0x7aa)]['Math']['toRadians'](this[_0x16f14f(0x691)]['pitch']),_0x34d1e5[_0x16f14f(0x7aa)][_0x16f14f(0x72b)][_0x16f14f(0x2b0)](this[_0x16f14f(0x691)][_0x16f14f(0x193)])));});}get[_0x43bf95(0x9a7)](){const _0x3a40a1=_0x43bf95;return this[_0x3a40a1(0x691)];}set[_0x43bf95(0x61a)](_0x5225b3){const _0xc5b6be=_0x43bf95;this[_0xc5b6be(0x210)]=_0x5225b3,this[_0xc5b6be(0xaa1)]=_0x34d1e5['Cesium'][_0xc5b6be(0x64e)][_0xc5b6be(0x556)]({'url':_0x5225b3,...this[_0xc5b6be(0x9ca)]}),this['position']=this['_position'];}get[_0x43bf95(0x61a)](){const _0x58a935=_0x43bf95;return this[_0x58a935(0x210)];}[_0x43bf95(0x6a3)](){const _0x334207=_0x43bf95;this[_0x334207(0x9a7)]=this[_0x334207(0x691)];}[_0x43bf95(0x5db)](_0x21bb00){const _0x5aa467=_0x43bf95;return!_0x21bb00||Object[_0x5aa467(0x6f9)](_0x21bb00)['length']===0x0?this:(_0x3f7522[_0x5aa467(0x5da)](this['_style'],_0x21bb00),this[_0x5aa467(0xaa1)][_0x5aa467(0x379)](_0x66db64=>{_0x3f7522['merge'](_0x66db64,_0x21bb00);}),this);}['on'](_0x33941e,_0x1e9ed8,_0x13048a){const _0x2496ad=_0x43bf95;return this[_0x2496ad(0x97e)]['on'](_0x33941e,_0x1e9ed8,_0x13048a||this),this[_0x2496ad(0x3ff)]['on'](_0x33941e,_0x1e9ed8,_0x13048a||this),this;}[_0x43bf95(0x24d)](_0x47da8c,_0x27a42c,_0x20192e){const _0x351935=_0x43bf95;return this['_overlayEvent'][_0x351935(0x24d)](_0x47da8c,_0x27a42c,_0x20192e||this),this[_0x351935(0x3ff)][_0x351935(0x24d)](_0x47da8c,_0x27a42c,_0x20192e||this),this;}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x8ec));var _0x25a30f=_0x551e98,_0x18424b={'pixelSize':0x8,'outlineColor':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x7d2)][_0x43bf95(0x141)],'outlineWidth':0x2},_0x3e54d0=class extends _0x4f8204{constructor(_0x3ad4cb){const _0x37b07b=_0x43bf95;super(),this['_position']=_0x16f48b[_0x37b07b(0x81a)](_0x3ad4cb),this['_delegate']={'position':void 0x0},this['_state']=_0x4075ae[_0x37b07b(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x3675cc=_0x43bf95;return _0x4f8204['getOverlayType'](_0x3675cc(0xfd));}set['position'](_0x85cd1e){const _0x589dae=_0x43bf95;this[_0x589dae(0x691)]=_0x16f48b['parsePosition'](_0x85cd1e),this[_0x589dae(0xaa1)][_0x589dae(0x9a7)]=_0x5e5f93[_0x589dae(0x432)](this['_position']);}get[_0x43bf95(0x9a7)](){const _0x1fdaa3=_0x43bf95;return this[_0x1fdaa3(0x691)];}[_0x43bf95(0x6a3)](){const _0x55d515=_0x43bf95;this[_0x55d515(0x9a7)]=this[_0x55d515(0x691)],_0x3f7522[_0x55d515(0x5da)](this[_0x55d515(0xaa1)],_0x18424b,this[_0x55d515(0x9ca)]);}[_0x43bf95(0x5db)](_0x87f216){const _0x3597da=_0x43bf95;return!_0x87f216||Object[_0x3597da(0x6f9)](_0x87f216)['length']===0x0?this:(delete _0x87f216[_0x3597da(0x9a7)],_0x3f7522[_0x3597da(0x5da)](this[_0x3597da(0x9ca)],_0x87f216),_0x3f7522['merge'](this[_0x3597da(0xaa1)],_0x18424b,this[_0x3597da(0x9ca)]),this);}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0xfd));var _0x144488=_0x3e54d0,_0x5d0523=class extends _0x4f8204{constructor(_0x395149){const _0x11eff6=_0x43bf95;super(),this['_positions']=_0x16f48b[_0x11eff6(0xa8b)](_0x395149),this[_0x11eff6(0xaa1)]={'positions':[]},this[_0x11eff6(0x558)]=_0x4075ae[_0x11eff6(0x5d2)];}get['type'](){const _0x526183=_0x43bf95;return _0x4f8204[_0x526183(0x853)](_0x526183(0x5c5));}set['positions'](_0x4ae123){const _0x33033a=_0x43bf95;this[_0x33033a(0x387)]=_0x16f48b[_0x33033a(0xa8b)](_0x4ae123),this['_delegate'][_0x33033a(0x752)]=_0x5e5f93['transformWGS84ArrayToCartesianArray'](this['_positions']);}get['positions'](){return this['_positions'];}get[_0x43bf95(0x765)](){const _0x264553=_0x43bf95;return _0x2cf4fc(this[_0x264553(0x387)]);}get[_0x43bf95(0x7f4)](){const _0x9bfd79=_0x43bf95;return _0x55c5f1(this[_0x9bfd79(0x387)]);}[_0x43bf95(0x6a3)](){const _0x20f8d1=_0x43bf95;this['positions']=this[_0x20f8d1(0x387)];}[_0x43bf95(0x5db)](_0x5b3398){const _0x53f60d=_0x43bf95;return!_0x5b3398||Object[_0x53f60d(0x6f9)](_0x5b3398)[_0x53f60d(0x6a2)]===0x0?this:(delete _0x5b3398[_0x53f60d(0x752)],_0x3f7522[_0x53f60d(0x5da)](this[_0x53f60d(0x9ca)],_0x5b3398),_0x3f7522['merge'](this[_0x53f60d(0xaa1)],_0x5b3398),this);}};_0x4f8204['registerType']('polyline_primitive');var _0x50c2d1=_0x5d0523,_0x2793f2=class extends _0x4f8204{constructor(_0x1459b7,_0x91f01e){const _0x4729e4=_0x43bf95;super(),this[_0x4729e4(0x691)]=_0x16f48b[_0x4729e4(0x81a)](_0x1459b7),this[_0x4729e4(0x4b0)]=_0x91f01e,this[_0x4729e4(0xaa1)]=new _0x34d1e5[(_0x4729e4(0x7aa))][(_0x4729e4(0xa7))]({'geometryInstances':new _0x34d1e5[(_0x4729e4(0x7aa))]['GeometryInstance']({'geometry':{}})}),this['_state']=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){return _0x4f8204['getOverlayType']('scan_circle_primitive');}set[_0x43bf95(0x9a7)](_0x38ffbf){const _0x5a4a35=_0x43bf95;this[_0x5a4a35(0x691)]=_0x16f48b['parsePosition'](_0x38ffbf),this[_0x5a4a35(0xaa1)][_0x5a4a35(0x28a)][_0x5a4a35(0x10a)]=new _0x34d1e5['Cesium']['EllipseGeometry']({'center':_0x5e5f93[_0x5a4a35(0x432)](this['_position']),'semiMajorAxis':this[_0x5a4a35(0x4b0)],'semiMinorAxis':this[_0x5a4a35(0x4b0)]});}get[_0x43bf95(0x9a7)](){const _0x57b83e=_0x43bf95;return this[_0x57b83e(0x691)];}set['radius'](_0x239b5c){const _0x12fa01=_0x43bf95;this[_0x12fa01(0x4b0)]=_0x239b5c,this['_delegate']['geometryInstances'][_0x12fa01(0x10a)][_0x12fa01(0x31c)]=this['_radius'],this[_0x12fa01(0xaa1)]['geometryInstances'][_0x12fa01(0x10a)][_0x12fa01(0x400)]=this[_0x12fa01(0x4b0)];}get[_0x43bf95(0x28e)](){const _0xa2f8ec=_0x43bf95;return this[_0xa2f8ec(0x4b0)];}[_0x43bf95(0x2dd)](){const _0x4a91bd=_0x43bf95;var _0x4880c9,_0x42ff79;this[_0x4a91bd(0x9ca)]&&(this['_delegate']['appearance']=new _0x34d1e5[(_0x4a91bd(0x7aa))][(_0x4a91bd(0x4a2))]({'material':_0x34d1e5[_0x4a91bd(0x7aa)]['Material'][_0x4a91bd(0xa40)](_0x4a91bd(0x1ab),{'color':((_0x4880c9=this['_style'])==null?void 0x0:_0x4880c9[_0x4a91bd(0x124)])||_0x34d1e5[_0x4a91bd(0x7aa)][_0x4a91bd(0x7d2)][_0x4a91bd(0x422)],'speed':((_0x42ff79=this[_0x4a91bd(0x9ca)])==null?void 0x0:_0x42ff79['speed'])||0xa})}));}['_mountedHook'](){const _0x288826=_0x43bf95;this[_0x288826(0x9a7)]=this['_position'],!this[_0x288826(0xaa1)]['appearance']&&this[_0x288826(0x2dd)]();}[_0x43bf95(0x5db)](_0x32aae5={}){const _0x187194=_0x43bf95;return Object['keys'](_0x32aae5)[_0x187194(0x6a2)]===0x0?this:(_0x3f7522[_0x187194(0x5da)](this[_0x187194(0x9ca)],_0x32aae5),_0x32aae5['classificationType']&&(this['_delegate']['classificationType']=this[_0x187194(0x9ca)][_0x187194(0x64a)]),this['_setAppearance'](),this);}};_0x4f8204[_0x43bf95(0x545)]('scan_circle_primitive');var _0x47678c=_0x2793f2,_0x56853b=class extends _0x4f8204{constructor(_0x179331,_0x3ace74=0x1){const _0x5a64fd=_0x43bf95;super(),this[_0x5a64fd(0x387)]=_0x16f48b[_0x5a64fd(0xa8b)](_0x179331),this['_width']=_0x3ace74,this[_0x5a64fd(0xaa1)]=new _0x34d1e5[(_0x5a64fd(0x7aa))]['Primitive']({'geometryInstances':new _0x34d1e5[(_0x5a64fd(0x7aa))][(_0x5a64fd(0x456))]({'geometry':{}})}),this[_0x5a64fd(0x558)]=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){return _0x4f8204['getOverlayType']('trail_line_primitive');}set[_0x43bf95(0x752)](_0x1f2205){const _0x42ce63=_0x43bf95;this[_0x42ce63(0x387)]=_0x16f48b['parsePositions'](_0x1f2205),this[_0x42ce63(0xaa1)][_0x42ce63(0x28a)][_0x42ce63(0x10a)]=new _0x34d1e5[(_0x42ce63(0x7aa))][(_0x42ce63(0x8b9))]({'positions':_0x5e5f93[_0x42ce63(0x999)](this[_0x42ce63(0x387)]),'width':this[_0x42ce63(0x14c)]});}get[_0x43bf95(0x752)](){return this['_positions'];}[_0x43bf95(0x2dd)](){const _0x5c25bc=_0x43bf95;var _0x4756b8,_0x623ddb;this[_0x5c25bc(0xaa1)][_0x5c25bc(0x171)]=new _0x34d1e5[(_0x5c25bc(0x7aa))][(_0x5c25bc(0x646))]({'material':_0x34d1e5[_0x5c25bc(0x7aa)][_0x5c25bc(0x4da)][_0x5c25bc(0xa40)]('PolylineTrail',{'color':((_0x4756b8=this[_0x5c25bc(0x9ca)])==null?void 0x0:_0x4756b8[_0x5c25bc(0x124)])||new _0x34d1e5[(_0x5c25bc(0x7aa))][(_0x5c25bc(0x7d2))](0x1,0x0,0x0,0.7),'speed':((_0x623ddb=this[_0x5c25bc(0x9ca)])==null?void 0x0:_0x623ddb['speed'])||0x5})});}[_0x43bf95(0x6a3)](){const _0x37f927=_0x43bf95;this['positions']=this[_0x37f927(0x387)],!this[_0x37f927(0xaa1)][_0x37f927(0x171)]&&this[_0x37f927(0x2dd)]();}[_0x43bf95(0x5db)](_0xd194e3={}){const _0xb8a0e8=_0x43bf95;return Object[_0xb8a0e8(0x6f9)](_0xd194e3)[_0xb8a0e8(0x6a2)]===0x0?this:(_0x3f7522[_0xb8a0e8(0x5da)](this['_style'],_0xd194e3),_0xd194e3[_0xb8a0e8(0x64a)]&&(this['_delegate'][_0xb8a0e8(0x64a)]=this[_0xb8a0e8(0x9ca)]['classificationType']),this['_setAppearance'](),this);}};_0x4f8204['registerType'](_0x43bf95(0x614));var _0x3dbbac=_0x56853b,_0x5ab75c=class extends _0x4f8204{constructor(_0x461e49,_0x59e705){const _0x402596=_0x43bf95;super(),this[_0x402596(0x387)]=_0x16f48b['parsePositions'](_0x461e49),this[_0x402596(0xaa1)]=new _0x34d1e5[(_0x402596(0x7aa))][(_0x402596(0xa7))]({'geometryInstances':new _0x34d1e5[(_0x402596(0x7aa))]['GeometryInstance']({'geometry':{}})}),this['_video']=_0x59e705,this['_state']=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){const _0x254554=_0x43bf95;return _0x4f8204[_0x254554(0x853)]('video_primitive');}set[_0x43bf95(0x752)](_0x3fd002){const _0x5a8678=_0x43bf95;var _0x365abe,_0x321705,_0x3e3dc8,_0x537cbc;this[_0x5a8678(0x387)]=_0x16f48b['parsePositions'](_0x3fd002),this['_delegate'][_0x5a8678(0x28a)]['geometry']=_0x34d1e5[_0x5a8678(0x7aa)][_0x5a8678(0x829)]['fromPositions']({'positions':_0x5e5f93[_0x5a8678(0x999)](this[_0x5a8678(0x387)]),'height':(_0x365abe=this[_0x5a8678(0x9ca)])==null?void 0x0:_0x365abe['height'],'extrudedHeight':(_0x321705=this['_style'])==null?void 0x0:_0x321705['extrudedHeight'],'closeTop':(_0x3e3dc8=this[_0x5a8678(0x9ca)])==null?void 0x0:_0x3e3dc8['closeTop'],'closeBottom':(_0x537cbc=this['_style'])==null?void 0x0:_0x537cbc[_0x5a8678(0xa26)],'vertexFormat':_0x34d1e5[_0x5a8678(0x7aa)]['EllipsoidSurfaceAppearance'][_0x5a8678(0xa53)]});}get[_0x43bf95(0x752)](){const _0x5593b6=_0x43bf95;return this[_0x5593b6(0x387)];}set[_0x43bf95(0x83e)](_0x1735df){const _0xe5a5c3=_0x43bf95;this['_video']=_0x1735df,this[_0xe5a5c3(0x2dd)]();}get[_0x43bf95(0x83e)](){return this['_video'];}['_setAppearance'](){const _0x539342=_0x43bf95;this[_0x539342(0xaa1)][_0x539342(0x171)]=new _0x34d1e5[(_0x539342(0x7aa))][(_0x539342(0xc5))]({'material':_0x34d1e5[_0x539342(0x7aa)]['Material'][_0x539342(0xa40)](_0x539342(0x2a9),{'image':this[_0x539342(0x267)]})});}[_0x43bf95(0x6a3)](){const _0x5735d4=_0x43bf95;this['positions']=this[_0x5735d4(0x387)],this[_0x5735d4(0x83e)]=this['_video'];}[_0x43bf95(0x5db)](_0x5d2809){const _0x45dd58=_0x43bf95;var _0x5b472c;return Object['keys'](_0x5d2809)[_0x45dd58(0x6a2)]===0x0?this:(_0x3f7522[_0x45dd58(0x5da)](this[_0x45dd58(0x9ca)],_0x5d2809),(_0x5b472c=this['_style'])!=null&&_0x5b472c[_0x45dd58(0x64a)]&&(this[_0x45dd58(0xaa1)][_0x45dd58(0x64a)]=this[_0x45dd58(0x9ca)][_0x45dd58(0x64a)]),this);}};_0x4f8204['registerType'](_0x43bf95(0xa5c));var _0x291145=_0x5ab75c,_0x6aff8f=class extends _0x4f8204{constructor(_0x401df8,_0x5c34bc=[]){const _0x2eeded=_0x43bf95;super(),this[_0x2eeded(0x387)]=_0x16f48b[_0x2eeded(0xa8b)](_0x401df8),this[_0x2eeded(0x5a9)]=_0x5c34bc[_0x2eeded(0x127)](_0x47ba6b=>_0x16f48b['parsePositions'](_0x47ba6b)),this[_0x2eeded(0xaa1)]=new _0x34d1e5[(_0x2eeded(0x7aa))][(_0x2eeded(0xa7))]({'geometryInstances':new _0x34d1e5[(_0x2eeded(0x7aa))][(_0x2eeded(0x456))]({'geometry':{}}),'asynchronous':!0x0}),this[_0x2eeded(0x558)]=_0x4075ae[_0x2eeded(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x59f9a3=_0x43bf95;return _0x4f8204[_0x59f9a3(0x853)](_0x59f9a3(0x915));}set[_0x43bf95(0x752)](_0x4c35b9){const _0x20c7ca=_0x43bf95;var _0x226cb1,_0x141f83,_0xed802e,_0x163bb5;this[_0x20c7ca(0x387)]=_0x16f48b['parsePositions'](_0x4c35b9),this[_0x20c7ca(0xaa1)]['geometryInstances'][_0x20c7ca(0x10a)]=new _0x34d1e5[(_0x20c7ca(0x7aa))][(_0x20c7ca(0x829))]({'polygonHierarchy':new _0x34d1e5[(_0x20c7ca(0x7aa))]['PolygonHierarchy'](_0x5e5f93['transformWGS84ArrayToCartesianArray'](this[_0x20c7ca(0x387)]),this['_holes']['map'](_0x1130fe=>new _0x34d1e5['Cesium'][(_0x20c7ca(0x89f))](_0x5e5f93[_0x20c7ca(0x999)](_0x1130fe)))),'height':(_0x226cb1=this[_0x20c7ca(0x9ca)])==null?void 0x0:_0x226cb1[_0x20c7ca(0x795)],'extrudedHeight':(_0x141f83=this[_0x20c7ca(0x9ca)])==null?void 0x0:_0x141f83[_0x20c7ca(0x624)],'closeTop':(_0xed802e=this[_0x20c7ca(0x9ca)])==null?void 0x0:_0xed802e[_0x20c7ca(0x942)],'closeBottom':(_0x163bb5=this[_0x20c7ca(0x9ca)])==null?void 0x0:_0x163bb5[_0x20c7ca(0xa26)],'vertexFormat':_0x34d1e5['Cesium']['EllipsoidSurfaceAppearance']['VERTEX_FORMAT']});}get[_0x43bf95(0x752)](){const _0x222c56=_0x43bf95;return this[_0x222c56(0x387)];}[_0x43bf95(0x2dd)](){const _0x5d4375=_0x43bf95;var _0x2d6df3,_0xf78df8,_0x57ec5a,_0xa79957,_0xcdb519,_0x51edc5,_0x3c26f,_0x59853a;this[_0x5d4375(0x9ca)]&&(this[_0x5d4375(0xaa1)][_0x5d4375(0x171)]=new _0x34d1e5[(_0x5d4375(0x7aa))][(_0x5d4375(0xc5))]({'material':_0x34d1e5['Cesium'][_0x5d4375(0x4da)][_0x5d4375(0xa40)]('Water',{'baseWaterColor':((_0x2d6df3=this[_0x5d4375(0x9ca)])==null?void 0x0:_0x2d6df3[_0x5d4375(0x2f2)])||new _0x34d1e5[(_0x5d4375(0x7aa))][(_0x5d4375(0x7d2))](0.2,0.3,0.6,0x1),'blendColor':((_0xf78df8=this[_0x5d4375(0x9ca)])==null?void 0x0:_0xf78df8['blendColor'])||new _0x34d1e5[(_0x5d4375(0x7aa))][(_0x5d4375(0x7d2))](0x0,0x1,0.699,0x1),'specularMap':((_0x57ec5a=this[_0x5d4375(0x9ca)])==null?void 0x0:_0x57ec5a[_0x5d4375(0x15e)])||_0x34d1e5[_0x5d4375(0x7aa)]['Material'][_0x5d4375(0x70d)],'normalMap':((_0xa79957=this['_style'])==null?void 0x0:_0xa79957['normalMap'])||_0x34d1e5['Cesium'][_0x5d4375(0x4da)][_0x5d4375(0x70d)],'frequency':((_0xcdb519=this[_0x5d4375(0x9ca)])==null?void 0x0:_0xcdb519[_0x5d4375(0x5af)])||0x3e8,'animationSpeed':((_0x51edc5=this['_style'])==null?void 0x0:_0x51edc5[_0x5d4375(0x1d7)])||0.01,'amplitude':((_0x3c26f=this[_0x5d4375(0x9ca)])==null?void 0x0:_0x3c26f[_0x5d4375(0x78e)])||0xa,'specularIntensity':((_0x59853a=this[_0x5d4375(0x9ca)])==null?void 0x0:_0x59853a['specularIntensity'])||0.5})}));}['_mountedHook'](){const _0xb46b8f=_0x43bf95;this[_0xb46b8f(0x752)]=this[_0xb46b8f(0x387)],!this[_0xb46b8f(0xaa1)][_0xb46b8f(0x171)]&&this[_0xb46b8f(0x2dd)]();}[_0x43bf95(0x5db)](_0x2caba3){const _0x4de875=_0x43bf95;var _0x158121;return Object[_0x4de875(0x6f9)](_0x2caba3)['length']===0x0?this:(_0x3f7522[_0x4de875(0x5da)](this['_style'],_0x2caba3),(_0x158121=this[_0x4de875(0x9ca)])!=null&&_0x158121[_0x4de875(0x64a)]&&(this[_0x4de875(0xaa1)][_0x4de875(0x64a)]=this['_style'][_0x4de875(0x64a)]),this[_0x4de875(0x2dd)](),this);}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x915));var _0x8b9297=_0x6aff8f,_0x5d3035=class _0x22fa4f extends _0x4f8204{constructor(_0x4e8e7e,_0x447c58){const _0x333d24=_0x43bf95;super(),this[_0x333d24(0xaa1)]=new _0x34d1e5[(_0x333d24(0x7aa))]['Entity']({'billboard':{}}),this[_0x333d24(0x691)]=_0x16f48b[_0x333d24(0x81a)](_0x4e8e7e),this[_0x333d24(0x5a3)]=_0x447c58,this['_size']=[0x20,0x20],this[_0x333d24(0x558)]=_0x4075ae[_0x333d24(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x5e9d16=_0x43bf95;return _0x4f8204[_0x5e9d16(0x853)](_0x5e9d16(0x1cb));}set[_0x43bf95(0x9a7)](_0x63acac){const _0x4152e1=_0x43bf95;this['_position']=_0x16f48b[_0x4152e1(0x81a)](_0x63acac),this['_delegate'][_0x4152e1(0x9a7)]=_0x5e5f93[_0x4152e1(0x432)](this[_0x4152e1(0x691)]);}get[_0x43bf95(0x9a7)](){const _0x3aaa39=_0x43bf95;return this[_0x3aaa39(0x691)];}set[_0x43bf95(0x741)](_0x1fa2e4){const _0x17ae3c=_0x43bf95;this[_0x17ae3c(0x5a3)]=_0x1fa2e4,this[_0x17ae3c(0xaa1)][_0x17ae3c(0x1cb)]['image']=this['_icon'];}get['icon'](){const _0xc15691=_0x43bf95;return this[_0xc15691(0x5a3)];}set[_0x43bf95(0x729)](_0x34cf7e){const _0x42d021=_0x43bf95;if(!Array[_0x42d021(0x636)](_0x34cf7e))throw new Error(_0x42d021(0x8c3));this['_size']=_0x34cf7e,this[_0x42d021(0xaa1)][_0x42d021(0x1cb)][_0x42d021(0x371)]=this[_0x42d021(0x60b)][0x0]||0x20,this[_0x42d021(0xaa1)]['billboard'][_0x42d021(0x795)]=this['_size'][0x1]||0x20;}get[_0x43bf95(0x729)](){const _0x4502e6=_0x43bf95;return this[_0x4502e6(0x60b)];}[_0x43bf95(0x6a3)](){const _0x18a791=_0x43bf95;this[_0x18a791(0x9a7)]=this['_position'],this[_0x18a791(0x741)]=this[_0x18a791(0x5a3)],this[_0x18a791(0x729)]=this['_size'];}[_0x43bf95(0x5db)](_0x5aa433){const _0x5c9487=_0x43bf95;return!_0x5aa433||Object[_0x5c9487(0x6f9)](_0x5aa433)[_0x5c9487(0x6a2)]===0x0?this:(delete _0x5aa433[_0x5c9487(0x6bd)]&&delete _0x5aa433[_0x5c9487(0x371)]&&delete _0x5aa433[_0x5c9487(0x795)],_0x3f7522[_0x5c9487(0x5da)](this[_0x5c9487(0x9ca)],_0x5aa433),_0x3f7522[_0x5c9487(0x5da)](this[_0x5c9487(0xaa1)][_0x5c9487(0x1cb)],_0x5aa433),this);}static[_0x43bf95(0x799)](_0x221be4){const _0xb3ce18=_0x43bf95;var _0x491043;let _0xf139b3,_0x233a67=_0x34d1e5[_0xb3ce18(0x7aa)]['JulianDate']['now'](),_0x3bdb5b=_0x5e5f93[_0xb3ce18(0x30b)](_0x221be4['position'][_0xb3ce18(0x4e7)](_0x233a67));return _0x221be4[_0xb3ce18(0x1cb)]&&(_0xf139b3=new _0x22fa4f(_0x3bdb5b,_0x221be4[_0xb3ce18(0x1cb)][_0xb3ce18(0x6bd)][_0xb3ce18(0x4e7)](_0x233a67)),_0xf139b3[_0xb3ce18(0x2f0)]={...(_0x491043=_0x221be4==null?void 0x0:_0x221be4[_0xb3ce18(0x66f)])==null?void 0x0:_0x491043[_0xb3ce18(0x4e7)](_0x233a67)}),_0xf139b3;}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x1cb));var _0x25d4a3=_0x5d3035,_0x5aa4d1=class extends _0x4f8204{constructor(_0x102aec,_0x27e727,_0x23f464,_0x37d7df){const _0x5af642=_0x43bf95;super(),this[_0x5af642(0x691)]=_0x16f48b[_0x5af642(0x81a)](_0x102aec),this[_0x5af642(0x8cb)]=_0x27e727,this[_0x5af642(0x14c)]=_0x23f464,this['_height']=_0x37d7df,this['_delegate']=new _0x34d1e5[(_0x5af642(0x7aa))][(_0x5af642(0x926))]({'box':{'dimensions':{'x':+this['_length'],'y':+this[_0x5af642(0x14c)],'z':+this[_0x5af642(0x17e)]}}}),this[_0x5af642(0x558)]=_0x4075ae[_0x5af642(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x13b31e=_0x43bf95;return _0x4f8204[_0x13b31e(0x853)]('box');}set[_0x43bf95(0x9a7)](_0x242f4d){const _0x1b468b=_0x43bf95;this[_0x1b468b(0x691)]=_0x16f48b['parsePosition'](_0x242f4d),this[_0x1b468b(0xaa1)]['position']=_0x5e5f93[_0x1b468b(0x432)](this[_0x1b468b(0x691)]),this[_0x1b468b(0xaa1)][_0x1b468b(0x2b2)]=_0x34d1e5[_0x1b468b(0x7aa)][_0x1b468b(0x7a6)][_0x1b468b(0x9d3)](_0x5e5f93[_0x1b468b(0x432)](this[_0x1b468b(0x691)]),new _0x34d1e5[(_0x1b468b(0x7aa))][(_0x1b468b(0x517))](_0x34d1e5[_0x1b468b(0x7aa)]['Math'][_0x1b468b(0x2b0)](this['_position'][_0x1b468b(0x77c)]),_0x34d1e5[_0x1b468b(0x7aa)][_0x1b468b(0x72b)][_0x1b468b(0x2b0)](this[_0x1b468b(0x691)][_0x1b468b(0x442)]),_0x34d1e5[_0x1b468b(0x7aa)]['Math'][_0x1b468b(0x2b0)](this[_0x1b468b(0x691)][_0x1b468b(0x193)])));}get['position'](){const _0x1a3a53=_0x43bf95;return this[_0x1a3a53(0x691)];}set[_0x43bf95(0x6a2)](_0x4d3234){const _0x59b36a=_0x43bf95;let _0x521033=this[_0x59b36a(0xaa1)]['box'][_0x59b36a(0x76c)][_0x59b36a(0x4e7)]();this[_0x59b36a(0x8cb)]=_0x4d3234||0x0,_0x521033['x']=+this['_length'],this['_delegate'][_0x59b36a(0x2e7)][_0x59b36a(0x76c)][_0x59b36a(0xa32)](_0x521033);}get['length'](){const _0x3c3062=_0x43bf95;return this[_0x3c3062(0x8cb)];}set['width'](_0x5777d7){const _0x5e05a0=_0x43bf95;let _0x95741a=this[_0x5e05a0(0xaa1)][_0x5e05a0(0x2e7)][_0x5e05a0(0x76c)][_0x5e05a0(0x4e7)]();this[_0x5e05a0(0x14c)]=_0x5777d7||0x0,_0x95741a['y']=+this[_0x5e05a0(0x14c)],this[_0x5e05a0(0xaa1)][_0x5e05a0(0x2e7)][_0x5e05a0(0x76c)]['setValue'](_0x95741a);}get[_0x43bf95(0x371)](){const _0x5ac936=_0x43bf95;return this[_0x5ac936(0x14c)];}set[_0x43bf95(0x795)](_0x3083e2){const _0x221bb4=_0x43bf95;let _0x5b96e6=this['_delegate'][_0x221bb4(0x2e7)]['dimensions'][_0x221bb4(0x4e7)]();this[_0x221bb4(0x17e)]=_0x3083e2||0x0,_0x5b96e6['z']=+this['_height'],this[_0x221bb4(0xaa1)][_0x221bb4(0x2e7)][_0x221bb4(0x76c)][_0x221bb4(0xa32)](_0x5b96e6);}get[_0x43bf95(0x795)](){const _0x560160=_0x43bf95;return this[_0x560160(0x17e)];}[_0x43bf95(0x6a3)](){const _0x167587=_0x43bf95;this[_0x167587(0x9a7)]=this[_0x167587(0x691)];}[_0x43bf95(0x5db)](_0x3f0a75){const _0x40206b=_0x43bf95;return Object[_0x40206b(0x6f9)](_0x3f0a75)['length']===0x0?this:(delete _0x3f0a75['length']&&delete _0x3f0a75[_0x40206b(0x371)]&&delete _0x3f0a75[_0x40206b(0x795)],_0x3f7522[_0x40206b(0x5da)](this[_0x40206b(0x9ca)],_0x3f0a75),_0x3f7522[_0x40206b(0x5da)](this[_0x40206b(0xaa1)][_0x40206b(0x2e7)],_0x3f0a75),this);}};_0x4f8204[_0x43bf95(0x545)]('box');var _0x2d1076=_0x5aa4d1,_0x2c58af=class extends _0x4f8204{constructor(_0xa88498,_0x26f61c){const _0x1f08db=_0x43bf95;super(),this['_delegate']=new _0x34d1e5['Cesium'][(_0x1f08db(0x926))]({'polygon':{}}),this[_0x1f08db(0x2b7)]=_0x16f48b[_0x1f08db(0x81a)](_0xa88498),this['_radius']=+_0x26f61c||0x0,this['_rotateAmount']=0x0,this['_stRotation']=0x0,this[_0x1f08db(0x558)]=_0x4075ae[_0x1f08db(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x2003e4=_0x43bf95;return _0x4f8204[_0x2003e4(0x853)](_0x2003e4(0xc6));}set[_0x43bf95(0x765)](_0x5a8f00){const _0x125b1d=_0x43bf95;this[_0x125b1d(0x2b7)]=_0x16f48b[_0x125b1d(0x81a)](_0x5a8f00),this['_delegate'][_0x125b1d(0x410)][_0x125b1d(0x245)]=this[_0x125b1d(0x85b)]();}get[_0x43bf95(0x765)](){const _0x4224d7=_0x43bf95;return this[_0x4224d7(0x2b7)];}set[_0x43bf95(0x28e)](_0x570786){const _0x1b1012=_0x43bf95;this[_0x1b1012(0x4b0)]=+_0x570786,this[_0x1b1012(0xaa1)][_0x1b1012(0x410)][_0x1b1012(0x245)]=this[_0x1b1012(0x85b)]();}get[_0x43bf95(0x28e)](){const _0x5ad167=_0x43bf95;return this[_0x5ad167(0x4b0)];}set[_0x43bf95(0x36f)](_0x13b036){const _0x160431=_0x43bf95;this[_0x160431(0x3cd)]=+_0x13b036,this['_delegate'][_0x160431(0x410)][_0x160431(0x240)]=new _0x34d1e5['Cesium'][(_0x160431(0x18c))](()=>(this[_0x160431(0x9ad)]+=this[_0x160431(0x3cd)],(this[_0x160431(0x9ad)]>=0x168||this[_0x160431(0x9ad)]<=-0x168)&&(this[_0x160431(0x9ad)]=0x0),_0x34d1e5['Cesium'][_0x160431(0x72b)]['toRadians'](this[_0x160431(0x9ad)])),!0x1);}get['rotateAmount'](){return this['_rotateAmount'];}['_computeHierarchy'](){const _0x35d637=_0x43bf95;let _0x4d6b47=new _0x34d1e5[(_0x35d637(0x7aa))]['PolygonHierarchy'](),_0x1dc635=_0x34d1e5[_0x35d637(0x7aa)][_0x35d637(0x8d4)][_0x35d637(0xa58)]({'center':_0x5e5f93[_0x35d637(0x432)](this[_0x35d637(0x2b7)]),'semiMajorAxis':this['_radius'],'semiMinorAxis':this['_radius'],'rotation':0x0,'granularity':0.005},!0x1,!0x0),_0x138117=_0x34d1e5['Cesium'][_0x35d637(0x982)][_0x35d637(0x877)](_0x1dc635['outerPositions']);return _0x138117[_0x35d637(0xb3)](_0x138117[0x0]),_0x4d6b47['positions']=_0x138117,_0x4d6b47;}[_0x43bf95(0x6a3)](){const _0x3832b3=_0x43bf95;this['center']=this[_0x3832b3(0x2b7)];}[_0x43bf95(0x610)](_0x372ceb,_0x19d4e7){const _0x37db51=_0x43bf95;return this[_0x37db51(0xaa1)][_0x37db51(0x9a7)]=_0x5e5f93[_0x37db51(0x432)](this['_center']),this[_0x37db51(0xaa1)][_0x37db51(0x5e7)]={..._0x19d4e7,'text':_0x372ceb},this;}[_0x43bf95(0x5db)](_0x350142){const _0xf428d=_0x43bf95;return!_0x350142||Object[_0xf428d(0x6f9)](_0x350142)[_0xf428d(0x6a2)]===0x0?this:(delete _0x350142[_0xf428d(0x752)],_0x3f7522[_0xf428d(0x5da)](this[_0xf428d(0x9ca)],_0x350142),_0x3f7522[_0xf428d(0x5da)](this['_delegate']['polygon'],_0x350142),this);}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0xc6));var _0x2614b6=_0x2c58af,_0x373f35=class _0x5cd4b7 extends _0x4f8204{constructor(_0x4fa75e){const _0x481d72=_0x43bf95;super(),this[_0x481d72(0x387)]=_0x16f48b[_0x481d72(0xa8b)](_0x4fa75e),this['_delegate']=new _0x34d1e5[(_0x481d72(0x7aa))][(_0x481d72(0x926))]({'corridor':{}}),this[_0x481d72(0x558)]=_0x4075ae[_0x481d72(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x2a010d=_0x43bf95;return _0x4f8204['getOverlayType'](_0x2a010d(0x764));}set[_0x43bf95(0x752)](_0x2bf697){const _0x5d0d38=_0x43bf95;this[_0x5d0d38(0x387)]=_0x16f48b['parsePositions'](_0x2bf697),this['_delegate'][_0x5d0d38(0x764)][_0x5d0d38(0x752)]=_0x5e5f93[_0x5d0d38(0x999)](this[_0x5d0d38(0x387)]);}get['positions'](){const _0xa7a1ee=_0x43bf95;return this[_0xa7a1ee(0x387)];}[_0x43bf95(0x6a3)](){this['positions']=this['_positions'];}[_0x43bf95(0x610)](_0x3e796f,_0x258afd){return this;}['setStyle'](_0x40dac9){const _0x3ba703=_0x43bf95;return Object[_0x3ba703(0x6f9)](_0x40dac9)[_0x3ba703(0x6a2)]===0x0?this:(delete _0x40dac9[_0x3ba703(0x752)],_0x3f7522['merge'](this[_0x3ba703(0x9ca)],_0x40dac9),_0x3f7522['merge'](this['_delegate'][_0x3ba703(0x764)],_0x40dac9),this);}static['fromEntity'](_0x22c928){const _0x25780b=_0x43bf95;var _0xdb35d3;let _0x2f8974,_0x30a226=_0x34d1e5['Cesium'][_0x25780b(0xc3)][_0x25780b(0xaa6)]();if(_0x22c928[_0x25780b(0x10c)]){let _0x1c2d41=_0x5e5f93[_0x25780b(0x625)](_0x22c928[_0x25780b(0x10c)]['positions'][_0x25780b(0x4e7)](_0x30a226));_0x2f8974=new _0x5cd4b7(_0x1c2d41),_0x2f8974[_0x25780b(0x2f0)]={...(_0xdb35d3=_0x22c928==null?void 0x0:_0x22c928[_0x25780b(0x66f)])==null?void 0x0:_0xdb35d3[_0x25780b(0x4e7)](_0x30a226)};}return _0x2f8974;}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x764));var _0x382272=_0x373f35,_0x539619=class extends _0x4f8204{constructor(_0xf8b1ce,_0x1d9ae4,_0x4d65fe,_0x4e82a7){const _0x3d8ca4=_0x43bf95;super(),this[_0x3d8ca4(0x691)]=_0x16f48b[_0x3d8ca4(0x81a)](_0xf8b1ce),this[_0x3d8ca4(0x8cb)]=+_0x1d9ae4||0x0,this['_topRadius']=+_0x4d65fe||0x0,this[_0x3d8ca4(0x52f)]=+_0x4e82a7||0x0,this[_0x3d8ca4(0xaa1)]=new _0x34d1e5[(_0x3d8ca4(0x7aa))][(_0x3d8ca4(0x926))]({'cylinder':{}}),this[_0x3d8ca4(0x558)]=_0x4075ae[_0x3d8ca4(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x5178f0=_0x43bf95;return _0x4f8204[_0x5178f0(0x853)]('cylinder');}set[_0x43bf95(0x9a7)](_0xc526f0){const _0x1a7dc2=_0x43bf95;this[_0x1a7dc2(0x691)]=_0x16f48b[_0x1a7dc2(0x81a)](_0xc526f0),this[_0x1a7dc2(0xaa1)][_0x1a7dc2(0x9a7)]=_0x5e5f93[_0x1a7dc2(0x432)](this[_0x1a7dc2(0x691)]),this[_0x1a7dc2(0xaa1)][_0x1a7dc2(0x2b2)]=_0x34d1e5[_0x1a7dc2(0x7aa)][_0x1a7dc2(0x7a6)][_0x1a7dc2(0x9d3)](_0x5e5f93[_0x1a7dc2(0x432)](this[_0x1a7dc2(0x691)]),new _0x34d1e5[(_0x1a7dc2(0x7aa))][(_0x1a7dc2(0x517))](_0x34d1e5['Cesium']['Math']['toRadians'](this[_0x1a7dc2(0x691)][_0x1a7dc2(0x77c)]),_0x34d1e5[_0x1a7dc2(0x7aa)][_0x1a7dc2(0x72b)][_0x1a7dc2(0x2b0)](this[_0x1a7dc2(0x691)][_0x1a7dc2(0x442)]),_0x34d1e5[_0x1a7dc2(0x7aa)][_0x1a7dc2(0x72b)][_0x1a7dc2(0x2b0)](this[_0x1a7dc2(0x691)][_0x1a7dc2(0x193)])));}get[_0x43bf95(0x9a7)](){const _0x2691b4=_0x43bf95;return this[_0x2691b4(0x691)];}set['length'](_0x48ba15){const _0x49ab9f=_0x43bf95;this['_length']=+_0x48ba15||0x0,this[_0x49ab9f(0xaa1)][_0x49ab9f(0x7d1)][_0x49ab9f(0x6a2)]=this[_0x49ab9f(0x8cb)];}get['length'](){return this['_length'];}set[_0x43bf95(0x200)](_0x10c8dc){const _0x2d233e=_0x43bf95;this[_0x2d233e(0x50d)]=+_0x10c8dc||0x0,this[_0x2d233e(0xaa1)][_0x2d233e(0x7d1)][_0x2d233e(0x200)]=this[_0x2d233e(0x50d)];}get[_0x43bf95(0x200)](){return this['_topRadius'];}set[_0x43bf95(0xa82)](_0xf42ec1){const _0x119a3a=_0x43bf95;this[_0x119a3a(0x52f)]=+_0xf42ec1||0x0,this[_0x119a3a(0xaa1)][_0x119a3a(0x7d1)][_0x119a3a(0xa82)]=this[_0x119a3a(0x52f)];}get[_0x43bf95(0xa82)](){const _0x3f1242=_0x43bf95;return this[_0x3f1242(0x52f)];}[_0x43bf95(0x6a3)](){const _0x6db954=_0x43bf95;this['position']=this[_0x6db954(0x691)],this[_0x6db954(0x6a2)]=this[_0x6db954(0x8cb)],this[_0x6db954(0x200)]=this[_0x6db954(0x50d)],this['bottomRadius']=this['_bottomRadius'];}['setLabel'](_0x4eade6,_0x21a3a9){return this;}['setStyle'](_0x3a9090){const _0x222345=_0x43bf95;return Object['keys'](_0x3a9090)[_0x222345(0x6a2)]===0x0?this:(delete _0x3a9090[_0x222345(0x6a2)]&&delete _0x3a9090[_0x222345(0x200)]&&delete _0x3a9090[_0x222345(0xa82)],_0x3f7522[_0x222345(0x5da)](this[_0x222345(0x9ca)],_0x3a9090),_0x3f7522['merge'](this[_0x222345(0xaa1)][_0x222345(0x7d1)],_0x3a9090),this);}};_0x4f8204['registerType'](_0x43bf95(0x7d1));var _0x54bda2=_0x539619,_0x112079=class extends _0x4f8204{constructor(_0xf34d6f,_0x24f82a,_0x3cf5b7){const _0x17d8e3=_0x43bf95;super(),this[_0x17d8e3(0x691)]=_0x16f48b[_0x17d8e3(0x81a)](_0xf34d6f),this[_0x17d8e3(0x128)]=+_0x24f82a||0x0,this[_0x17d8e3(0x10f)]=+_0x3cf5b7||0x0,this[_0x17d8e3(0xaa1)]=new _0x34d1e5[(_0x17d8e3(0x7aa))][(_0x17d8e3(0x926))]({'ellipse':{}}),this[_0x17d8e3(0x558)]=_0x4075ae[_0x17d8e3(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x5163f9=_0x43bf95;return _0x4f8204[_0x5163f9(0x853)](_0x5163f9(0x557));}set['position'](_0x2c8fc7){const _0x24295f=_0x43bf95;this[_0x24295f(0x691)]=_0x16f48b[_0x24295f(0x81a)](_0x2c8fc7),this[_0x24295f(0xaa1)][_0x24295f(0x9a7)]=_0x5e5f93['transformWGS84ToCartesian'](this[_0x24295f(0x691)]),this[_0x24295f(0xaa1)][_0x24295f(0x2b2)]=_0x34d1e5[_0x24295f(0x7aa)][_0x24295f(0x7a6)][_0x24295f(0x9d3)](_0x5e5f93[_0x24295f(0x432)](this[_0x24295f(0x691)]),new _0x34d1e5[(_0x24295f(0x7aa))]['HeadingPitchRoll'](_0x34d1e5['Cesium'][_0x24295f(0x72b)][_0x24295f(0x2b0)](this[_0x24295f(0x691)][_0x24295f(0x77c)]),_0x34d1e5['Cesium'][_0x24295f(0x72b)]['toRadians'](this[_0x24295f(0x691)][_0x24295f(0x442)]),_0x34d1e5[_0x24295f(0x7aa)][_0x24295f(0x72b)][_0x24295f(0x2b0)](this[_0x24295f(0x691)][_0x24295f(0x193)])));}get[_0x43bf95(0x9a7)](){const _0x5d1b47=_0x43bf95;return this[_0x5d1b47(0x691)];}set['semiMajorAxis'](_0x4a2dce){const _0x5ea31f=_0x43bf95;this[_0x5ea31f(0x128)]=+_0x4a2dce||0x0,this[_0x5ea31f(0xaa1)]['ellipse']['semiMajorAxis']=this[_0x5ea31f(0x128)];}get[_0x43bf95(0x31c)](){const _0x2a581d=_0x43bf95;return this[_0x2a581d(0x128)];}set[_0x43bf95(0x400)](_0x4a49c8){const _0x13c5a3=_0x43bf95;this[_0x13c5a3(0x10f)]=+_0x4a49c8||0x0,this[_0x13c5a3(0xaa1)][_0x13c5a3(0x557)][_0x13c5a3(0x400)]=this[_0x13c5a3(0x10f)];}get['semiMinorAxis'](){const _0x508307=_0x43bf95;return this[_0x508307(0x10f)];}['_mountedHook'](){const _0x12ce90=_0x43bf95;this[_0x12ce90(0x9a7)]=this[_0x12ce90(0x691)],this[_0x12ce90(0x31c)]=this['_semiMajorAxis'],this[_0x12ce90(0x400)]=this[_0x12ce90(0x10f)];}[_0x43bf95(0x5db)](_0x3ce229){const _0x5c2285=_0x43bf95;return Object[_0x5c2285(0x6f9)](_0x3ce229)[_0x5c2285(0x6a2)]===0x0?this:(delete _0x3ce229[_0x5c2285(0x31c)]&&delete _0x3ce229[_0x5c2285(0x400)],_0x3f7522[_0x5c2285(0x5da)](this['_style'],_0x3ce229),_0x3f7522[_0x5c2285(0x5da)](this[_0x5c2285(0xaa1)]['ellipse'],_0x3ce229),this);}};_0x4f8204[_0x43bf95(0x545)]('ellipse');var _0x3ffde7=_0x112079,_0x46a301=class extends _0x4f8204{constructor(_0x3cc9c6,_0x5c9f55){const _0x1e38e0=_0x43bf95;super(),this[_0x1e38e0(0x691)]=_0x16f48b['parsePosition'](_0x3cc9c6),this[_0x1e38e0(0x4b0)]=_0x5c9f55||{'x':0xa,'y':0xa,'z':0xa},this[_0x1e38e0(0xaa1)]=new _0x34d1e5[(_0x1e38e0(0x7aa))]['Entity']({'ellipsoid':{}}),this[_0x1e38e0(0x558)]=_0x4075ae[_0x1e38e0(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x40e216=_0x43bf95;return _0x4f8204['getOverlayType'](_0x40e216(0x65a));}set['position'](_0x11d169){const _0x341556=_0x43bf95;this[_0x341556(0x691)]=_0x16f48b[_0x341556(0x81a)](_0x11d169),this[_0x341556(0xaa1)]['position']=_0x5e5f93[_0x341556(0x432)](this[_0x341556(0x691)]),this[_0x341556(0xaa1)][_0x341556(0x2b2)]=_0x34d1e5[_0x341556(0x7aa)][_0x341556(0x7a6)][_0x341556(0x9d3)](_0x5e5f93[_0x341556(0x432)](this[_0x341556(0x691)]),new _0x34d1e5[(_0x341556(0x7aa))][(_0x341556(0x517))](_0x34d1e5[_0x341556(0x7aa)][_0x341556(0x72b)]['toRadians'](this[_0x341556(0x691)][_0x341556(0x77c)]),_0x34d1e5[_0x341556(0x7aa)][_0x341556(0x72b)]['toRadians'](this[_0x341556(0x691)][_0x341556(0x442)]),_0x34d1e5['Cesium'][_0x341556(0x72b)][_0x341556(0x2b0)](this[_0x341556(0x691)]['roll'])));}get['position'](){const _0x6dd18b=_0x43bf95;return this[_0x6dd18b(0x691)];}set[_0x43bf95(0x28e)](_0x33a384){const _0x248950=_0x43bf95;this[_0x248950(0x4b0)]=_0x33a384||{'x':0xa,'y':0xa,'z':0xa},this[_0x248950(0xaa1)]['ellipsoid'][_0x248950(0x21e)]=this[_0x248950(0x4b0)];}get[_0x43bf95(0x28e)](){const _0x5c53d1=_0x43bf95;return this[_0x5c53d1(0x4b0)];}['_mountedHook'](){const _0x3b0a8a=_0x43bf95;this[_0x3b0a8a(0x9a7)]=this[_0x3b0a8a(0x691)],this['radius']=this[_0x3b0a8a(0x4b0)];}[_0x43bf95(0x5db)](_0xba53a2){const _0x52bc32=_0x43bf95;return Object[_0x52bc32(0x6f9)](_0xba53a2)[_0x52bc32(0x6a2)]===0x0?this:(delete _0xba53a2[_0x52bc32(0x28e)],_0x3f7522['merge'](this[_0x52bc32(0x9ca)],_0xba53a2),_0x3f7522[_0x52bc32(0x5da)](this[_0x52bc32(0xaa1)]['ellipsoid'],_0xba53a2),this);}};_0x4f8204[_0x43bf95(0x545)]('ellipsoid');var _0x573bda=_0x46a301,_0x370c7b=class _0x2e8dae extends _0x4f8204{constructor(_0xbe1842,_0x14458c){const _0x4adad3=_0x43bf95;super(),this['_delegate']=new _0x34d1e5[(_0x4adad3(0x7aa))][(_0x4adad3(0x926))]({'label':{}}),this[_0x4adad3(0x691)]=_0x16f48b[_0x4adad3(0x81a)](_0xbe1842),this[_0x4adad3(0x620)]=_0x14458c,this[_0x4adad3(0x558)]=_0x4075ae[_0x4adad3(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x29b6f1=_0x43bf95;return _0x4f8204[_0x29b6f1(0x853)](_0x29b6f1(0x5e7));}set[_0x43bf95(0x9a7)](_0x3eba90){const _0x3e16b4=_0x43bf95;this[_0x3e16b4(0x691)]=_0x16f48b[_0x3e16b4(0x81a)](_0x3eba90),this['_delegate'][_0x3e16b4(0x9a7)]=_0x5e5f93[_0x3e16b4(0x432)](this[_0x3e16b4(0x691)]);}get[_0x43bf95(0x9a7)](){const _0x2ea521=_0x43bf95;return this[_0x2ea521(0x691)];}set[_0x43bf95(0xd8)](_0x598338){const _0x134cdf=_0x43bf95;this[_0x134cdf(0x620)]=_0x598338,this[_0x134cdf(0xaa1)]['label']['text']=this[_0x134cdf(0x620)];}get[_0x43bf95(0xd8)](){const _0x93aab8=_0x43bf95;return this[_0x93aab8(0x620)];}[_0x43bf95(0x6a3)](){const _0x1a6e0b=_0x43bf95;this[_0x1a6e0b(0x9a7)]=this[_0x1a6e0b(0x691)],this['text']=this[_0x1a6e0b(0x620)];}['setLabel'](_0x1c3d70,_0x462e30){return this;}['setStyle'](_0x558e83){const _0xa98062=_0x43bf95;return!_0x558e83||Object[_0xa98062(0x6f9)](_0x558e83)[_0xa98062(0x6a2)]===0x0?this:(delete _0x558e83['text'],_0x3f7522['merge'](this[_0xa98062(0x9ca)],_0x558e83),_0x3f7522['merge'](this['_delegate'][_0xa98062(0x5e7)],_0x558e83),this);}static['fromEntity'](_0x1d2a78){const _0x18b50d=_0x43bf95;var _0x4e9d1d;let _0x4f974d=_0x34d1e5['Cesium'][_0x18b50d(0xc3)][_0x18b50d(0xaa6)](),_0x47ee70=_0x5e5f93[_0x18b50d(0x30b)](_0x1d2a78['position']['getValue'](_0x4f974d)),_0x188162;return _0x1d2a78[_0x18b50d(0x1cb)]&&(_0x188162=new _0x2e8dae(_0x47ee70,_0x1d2a78[_0x18b50d(0x130)]),_0x188162[_0x18b50d(0x2f0)]={...(_0x4e9d1d=_0x1d2a78==null?void 0x0:_0x1d2a78[_0x18b50d(0x66f)])==null?void 0x0:_0x4e9d1d[_0x18b50d(0x4e7)](_0x4f974d)}),_0x188162;}};_0x4f8204['registerType'](_0x43bf95(0x5e7));var _0x2e18ac=_0x370c7b,_0x2c2c18=class extends _0x4f8204{constructor(_0x44bf47,_0x31ae1f,_0x3d38d4,_0x330153={}){const _0x4f70df=_0x43bf95;if(super(),this[_0x4f70df(0x691)]=_0x16f48b[_0x4f70df(0x81a)](_0x44bf47),this[_0x4f70df(0x14c)]=+_0x31ae1f||0x64,this[_0x4f70df(0x17e)]=+_0x3d38d4||0x64,_0x330153[_0x4f70df(0x75c)]&&typeof _0x330153[_0x4f70df(0x75c)]==_0x4f70df(0x55c)){let _0x48a08c=String(_0x330153[_0x4f70df(0x75c)])[_0x4f70df(0xa04)]();_0x330153['normal']=_0x48a08c==='X'?_0x34d1e5[_0x4f70df(0x7aa)][_0x4f70df(0x982)]['UNIT_X']:_0x48a08c==='Y'?_0x34d1e5[_0x4f70df(0x7aa)]['Cartesian3'][_0x4f70df(0xa9e)]:_0x34d1e5[_0x4f70df(0x7aa)]['Cartesian3']['UNIT_Z'];}else _0x330153[_0x4f70df(0x75c)]=_0x34d1e5[_0x4f70df(0x7aa)][_0x4f70df(0x982)][_0x4f70df(0xaa2)];this['_normal']=_0x330153[_0x4f70df(0x75c)],this[_0x4f70df(0x2e0)]=_0x330153[_0x4f70df(0x7f4)]||0x0,this[_0x4f70df(0xaa1)]=new _0x34d1e5[(_0x4f70df(0x7aa))][(_0x4f70df(0x926))]({'plane':{'dimensions':{'x':this[_0x4f70df(0x14c)],'y':this[_0x4f70df(0x17e)]},'plane':new _0x34d1e5[(_0x4f70df(0x7aa))][(_0x4f70df(0x2ac))](this['_normal'],this[_0x4f70df(0x2e0)])}}),this['_state']=_0x4075ae[_0x4f70df(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x520519=_0x43bf95;return _0x4f8204[_0x520519(0x853)](_0x520519(0x6bb));}set[_0x43bf95(0x9a7)](_0x3acdfd){const _0x16b1f0=_0x43bf95;this['_position']=_0x16f48b[_0x16b1f0(0x81a)](_0x3acdfd),this['_delegate'][_0x16b1f0(0x9a7)]=_0x5e5f93[_0x16b1f0(0x432)](this['_position']),this[_0x16b1f0(0xaa1)][_0x16b1f0(0x2b2)]=_0x34d1e5[_0x16b1f0(0x7aa)][_0x16b1f0(0x7a6)][_0x16b1f0(0x9d3)](_0x5e5f93[_0x16b1f0(0x432)](this[_0x16b1f0(0x691)]),new _0x34d1e5['Cesium'][(_0x16b1f0(0x517))](_0x34d1e5['Cesium']['Math'][_0x16b1f0(0x2b0)](this[_0x16b1f0(0x691)][_0x16b1f0(0x77c)]),_0x34d1e5[_0x16b1f0(0x7aa)][_0x16b1f0(0x72b)][_0x16b1f0(0x2b0)](this[_0x16b1f0(0x691)]['pitch']),_0x34d1e5[_0x16b1f0(0x7aa)][_0x16b1f0(0x72b)][_0x16b1f0(0x2b0)](this['_position'][_0x16b1f0(0x193)])));}get[_0x43bf95(0x9a7)](){const _0xd6b1b0=_0x43bf95;return this[_0xd6b1b0(0x691)];}set[_0x43bf95(0x371)](_0x16affc){const _0x2fce6a=_0x43bf95;let _0x33353c=this['_delegate'][_0x2fce6a(0x6bb)]['dimensions'][_0x2fce6a(0x4e7)]();this[_0x2fce6a(0x14c)]=+_0x16affc||0x0,_0x33353c['x']=this['_width'];}get['width'](){const _0x3f29a2=_0x43bf95;return this[_0x3f29a2(0x14c)];}set['height'](_0x48b266){const _0x40f248=_0x43bf95;let _0x1f2399=this[_0x40f248(0xaa1)][_0x40f248(0x6bb)][_0x40f248(0x76c)][_0x40f248(0x4e7)]();this[_0x40f248(0x17e)]=+_0x48b266||0x0,_0x1f2399['y']=this['_height'];}get[_0x43bf95(0x795)](){const _0x1155bd=_0x43bf95;return this[_0x1155bd(0x17e)];}set[_0x43bf95(0x7f4)](_0x29514a){const _0x3b7035=_0x43bf95;let _0x39f093=this['entityGraphic'][_0x3b7035(0x6bb)][_0x3b7035(0x4e7)]();this[_0x3b7035(0x2e0)]=_0x29514a,_0x39f093[_0x3b7035(0x7f4)]=_0x29514a;}get[_0x43bf95(0x7f4)](){const _0x292d08=_0x43bf95;return this[_0x292d08(0x2e0)];}[_0x43bf95(0x6a3)](){const _0x34246b=_0x43bf95;this[_0x34246b(0x9a7)]=this['_position'],this[_0x34246b(0x7f4)]=this[_0x34246b(0x2e0)];}[_0x43bf95(0x5db)](_0x3d68f9){const _0xc92d47=_0x43bf95;return Object[_0xc92d47(0x6f9)](_0x3d68f9)[_0xc92d47(0x6a2)]===0x0?this:(delete _0x3d68f9[_0xc92d47(0x76c)]&&delete[_0xc92d47(0x6bb)],_0x3f7522['merge'](this['_style'],_0x3d68f9),_0x3f7522['merge'](this[_0xc92d47(0xaa1)]['plane'],_0x3d68f9),this);}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x6bb));var _0x36d7e9=_0x2c2c18,_0xfe589e={'pixelSize':0x8,'outlineColor':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x7d2)][_0x43bf95(0x141)],'outlineWidth':0x2},_0x584765=class _0x63ee77 extends _0x4f8204{constructor(_0x4febfd){const _0x56f377=_0x43bf95;super(),this['_delegate']=new _0x34d1e5[(_0x56f377(0x7aa))]['Entity']({'point':{}}),this['_position']=_0x16f48b['parsePosition'](_0x4febfd),this['_state']=_0x4075ae[_0x56f377(0x5d2)];}get['type'](){const _0x325615=_0x43bf95;return _0x4f8204[_0x325615(0x853)]('point');}set['position'](_0x452cb4){const _0xada611=_0x43bf95;this['_position']=_0x16f48b[_0xada611(0x81a)](_0x452cb4),this[_0xada611(0xaa1)][_0xada611(0x9a7)]=_0x5e5f93[_0xada611(0x432)](this[_0xada611(0x691)]);}get[_0x43bf95(0x9a7)](){return this['_position'];}[_0x43bf95(0x6a3)](){const _0x33fc6d=_0x43bf95;this[_0x33fc6d(0x9a7)]=this[_0x33fc6d(0x691)],_0x3f7522[_0x33fc6d(0x5da)](this[_0x33fc6d(0xaa1)][_0x33fc6d(0x5b3)],_0xfe589e,this[_0x33fc6d(0x9ca)]);}['setStyle'](_0x27fbc){const _0x19d5f2=_0x43bf95;return!_0x27fbc||Object[_0x19d5f2(0x6f9)](_0x27fbc)[_0x19d5f2(0x6a2)]===0x0?this:(delete _0x27fbc[_0x19d5f2(0x9a7)],_0x3f7522[_0x19d5f2(0x5da)](this[_0x19d5f2(0x9ca)],_0x27fbc),_0x3f7522[_0x19d5f2(0x5da)](this[_0x19d5f2(0xaa1)][_0x19d5f2(0x5b3)],_0xfe589e,this['_style']),this);}static[_0x43bf95(0x799)](_0x3c9a43){const _0x101e96=_0x43bf95;var _0x5419bf;let _0x500be3,_0x38ddd7=_0x34d1e5[_0x101e96(0x7aa)][_0x101e96(0xc3)][_0x101e96(0xaa6)](),_0x813f88=_0x5e5f93['transformCartesianToWGS84'](_0x3c9a43[_0x101e96(0x9a7)]['getValue'](_0x38ddd7));return _0x500be3=new _0x63ee77(_0x813f88),_0x500be3[_0x101e96(0x2f0)]={...(_0x5419bf=_0x3c9a43==null?void 0x0:_0x3c9a43[_0x101e96(0x66f)])==null?void 0x0:_0x5419bf[_0x101e96(0x4e7)](_0x38ddd7)},_0x500be3;}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x5b3));var _0xa05a30=_0x584765,_0x582e2a=class _0x37f0a2 extends _0x4f8204{constructor(_0x13c2b4){const _0x2e575f=_0x43bf95;super(),this[_0x2e575f(0xaa1)]=new _0x34d1e5[(_0x2e575f(0x7aa))][(_0x2e575f(0x926))]({'polygon':{}}),this[_0x2e575f(0x387)]=_0x16f48b[_0x2e575f(0xa8b)](_0x13c2b4),this[_0x2e575f(0x5a9)]=[],this[_0x2e575f(0x558)]=_0x4075ae[_0x2e575f(0x5d2)];}get['type'](){const _0x26aba6=_0x43bf95;return _0x4f8204[_0x26aba6(0x853)](_0x26aba6(0x410));}set[_0x43bf95(0x752)](_0x79e5f4){const _0x2a0d88=_0x43bf95;this[_0x2a0d88(0x387)]=_0x16f48b[_0x2a0d88(0xa8b)](_0x79e5f4),this[_0x2a0d88(0xaa1)][_0x2a0d88(0x410)]['hierarchy']=this[_0x2a0d88(0x85b)]();}get[_0x43bf95(0x752)](){const _0x429299=_0x43bf95;return this[_0x429299(0x387)];}set[_0x43bf95(0x969)](_0x51e93a){const _0x179d61=_0x43bf95;_0x51e93a&&_0x51e93a[_0x179d61(0x6a2)]&&(this[_0x179d61(0x5a9)]=_0x51e93a[_0x179d61(0x127)](_0x906bf5=>_0x16f48b[_0x179d61(0xa8b)](_0x906bf5)),this['_delegate'][_0x179d61(0x410)][_0x179d61(0x245)]=this[_0x179d61(0x85b)]());}get[_0x43bf95(0x969)](){const _0x31916f=_0x43bf95;return this[_0x31916f(0x5a9)];}get['center'](){const _0x4636e8=_0x43bf95;return _0x2cf4fc([...this['_positions'],this[_0x4636e8(0x387)][0x0]]);}get[_0x43bf95(0x2b1)](){const _0x383583=_0x43bf95;return _0x1b9dd7(this[_0x383583(0x387)]);}[_0x43bf95(0x85b)](){const _0x5cdbeb=_0x43bf95;let _0x872ef1=new _0x34d1e5['Cesium'][(_0x5cdbeb(0x89f))]();return _0x872ef1[_0x5cdbeb(0x752)]=_0x5e5f93['transformWGS84ArrayToCartesianArray'](this[_0x5cdbeb(0x387)]),_0x872ef1[_0x5cdbeb(0x969)]=this[_0x5cdbeb(0x5a9)][_0x5cdbeb(0x127)](_0x871fe=>new _0x34d1e5[(_0x5cdbeb(0x7aa))][(_0x5cdbeb(0x89f))](_0x5e5f93[_0x5cdbeb(0x999)](_0x871fe))),_0x872ef1;}['_mountedHook'](){const _0x57b149=_0x43bf95;this[_0x57b149(0x752)]=this[_0x57b149(0x387)];}[_0x43bf95(0x610)](_0x283b19,_0x8e720b){const _0x5b7861=_0x43bf95;return this[_0x5b7861(0xaa1)][_0x5b7861(0x9a7)]=_0x5e5f93[_0x5b7861(0x432)](this[_0x5b7861(0x765)]),this[_0x5b7861(0xaa1)][_0x5b7861(0x5e7)]={'text':_0x283b19,..._0x8e720b},this;}[_0x43bf95(0x5db)](_0x73010e){const _0x552765=_0x43bf95;return!_0x73010e||Object[_0x552765(0x6f9)](_0x73010e)[_0x552765(0x6a2)]===0x0?this:(delete _0x73010e[_0x552765(0x752)],_0x3f7522[_0x552765(0x5da)](this[_0x552765(0x9ca)],_0x73010e),_0x3f7522[_0x552765(0x5da)](this['_delegate']['polygon'],_0x73010e),this);}static[_0x43bf95(0x799)](_0x5626f1){const _0xb8fb9f=_0x43bf95;var _0x41efa7;let _0x2b232c,_0x24831d=_0x34d1e5[_0xb8fb9f(0x7aa)][_0xb8fb9f(0xc3)][_0xb8fb9f(0xaa6)]();if(_0x5626f1['polygon']){let _0x675e97=_0x5e5f93[_0xb8fb9f(0x625)](_0x5626f1[_0xb8fb9f(0x410)][_0xb8fb9f(0x245)][_0xb8fb9f(0x4e7)](_0x24831d)[_0xb8fb9f(0x752)]);_0x2b232c=new _0x37f0a2(_0x675e97),_0x2b232c[_0xb8fb9f(0x2f0)]={...(_0x41efa7=_0x5626f1==null?void 0x0:_0x5626f1['properties'])==null?void 0x0:_0x41efa7['getValue'](_0x24831d)};}return _0x2b232c;}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x410));var _0x291d2b=_0x582e2a,_0xf2cbe2=class _0x8664b8 extends _0x4f8204{constructor(_0x14083a){const _0x545845=_0x43bf95;super(),this[_0x545845(0x387)]=_0x16f48b[_0x545845(0xa8b)](_0x14083a),this[_0x545845(0xaa1)]=new _0x34d1e5['Cesium']['Entity']({'polyline':{}}),this[_0x545845(0x558)]=_0x4075ae[_0x545845(0x5d2)];}get['type'](){const _0x554dcb=_0x43bf95;return _0x4f8204[_0x554dcb(0x853)](_0x554dcb(0x10c));}set[_0x43bf95(0x752)](_0x424325){const _0x315ce3=_0x43bf95;this[_0x315ce3(0x387)]=_0x16f48b[_0x315ce3(0xa8b)](_0x424325),this[_0x315ce3(0xaa1)][_0x315ce3(0x10c)]['positions']=_0x5e5f93['transformWGS84ArrayToCartesianArray'](this['_positions']);}get[_0x43bf95(0x752)](){return this['_positions'];}get[_0x43bf95(0x765)](){const _0x2ce741=_0x43bf95;return _0x2cf4fc(this[_0x2ce741(0x387)]);}get[_0x43bf95(0x7f4)](){const _0x4cae12=_0x43bf95;return _0x55c5f1(this[_0x4cae12(0x387)]);}['_mountedHook'](){const _0xef4bb5=_0x43bf95;this[_0xef4bb5(0x752)]=this[_0xef4bb5(0x387)];}[_0x43bf95(0x610)](_0x3d168c,_0x2c0baa){const _0x4a3c08=_0x43bf95;return this['_delegate'][_0x4a3c08(0x9a7)]=_0x5e5f93[_0x4a3c08(0x432)](this[_0x4a3c08(0x765)]),this['_delegate'][_0x4a3c08(0x5e7)]={'text':_0x3d168c,..._0x2c0baa},this;}[_0x43bf95(0x5db)](_0xfcb4fc){const _0x3839ad=_0x43bf95;return!_0xfcb4fc||Object[_0x3839ad(0x6f9)](_0xfcb4fc)[_0x3839ad(0x6a2)]===0x0?this:(delete _0xfcb4fc['positions'],_0x3f7522[_0x3839ad(0x5da)](this[_0x3839ad(0x9ca)],_0xfcb4fc),_0x3f7522[_0x3839ad(0x5da)](this[_0x3839ad(0xaa1)][_0x3839ad(0x10c)],_0xfcb4fc),this);}static[_0x43bf95(0x799)](_0x191431){const _0x20e127=_0x43bf95;var _0x228551;let _0x25c294,_0x2d9566=_0x34d1e5['Cesium'][_0x20e127(0xc3)][_0x20e127(0xaa6)]();if(_0x191431[_0x20e127(0x10c)]){let _0xf4f6d6=_0x5e5f93['transformCartesianArrayToWGS84Array'](_0x191431['polyline']['positions'][_0x20e127(0x4e7)](_0x2d9566));_0x25c294=new _0x8664b8(_0xf4f6d6),_0x25c294[_0x20e127(0x2f0)]={...(_0x228551=_0x191431==null?void 0x0:_0x191431['properties'])==null?void 0x0:_0x228551[_0x20e127(0x4e7)](_0x2d9566)};}return _0x25c294;}};_0x4f8204[_0x43bf95(0x545)]('polyline');var _0x210775=_0xf2cbe2,_0x421f44=class _0x42e12e extends _0x4f8204{constructor(_0x44c325,_0x2917ab){const _0x8f0749=_0x43bf95;super(),this[_0x8f0749(0x387)]=_0x16f48b['parsePositions'](_0x44c325),this['_shape']=_0x2917ab||[],this[_0x8f0749(0xaa1)]=new _0x34d1e5['Cesium']['Entity']({'polylineVolume':{}}),this[_0x8f0749(0x558)]=_0x4075ae[_0x8f0749(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x2a7af3=_0x43bf95;return _0x4f8204[_0x2a7af3(0x853)](_0x2a7af3(0xa6b));}set[_0x43bf95(0x752)](_0x208612){const _0xb8b03e=_0x43bf95;this[_0xb8b03e(0x387)]=_0x16f48b['parsePositions'](_0x208612),this['_delegate'][_0xb8b03e(0x19f)][_0xb8b03e(0x752)]=_0x5e5f93[_0xb8b03e(0x999)](this[_0xb8b03e(0x387)]);}get[_0x43bf95(0x752)](){const _0x1d9215=_0x43bf95;return this[_0x1d9215(0x387)];}set[_0x43bf95(0x9b5)](_0xa603de){const _0x5e31f0=_0x43bf95;this['_shape']=_0xa603de||[],this[_0x5e31f0(0xaa1)][_0x5e31f0(0x19f)][_0x5e31f0(0x9b5)]=this[_0x5e31f0(0x17f)];}get[_0x43bf95(0x9b5)](){const _0x4c5ac6=_0x43bf95;return this[_0x4c5ac6(0x17f)];}[_0x43bf95(0x6a3)](){const _0x34ed72=_0x43bf95;this[_0x34ed72(0x752)]=this[_0x34ed72(0x387)],this['shape']=this[_0x34ed72(0x17f)];}[_0x43bf95(0x610)](_0x30ac5f,_0x1045c5){return this;}[_0x43bf95(0x5db)](_0x3e64ff){const _0x1d993a=_0x43bf95;return Object[_0x1d993a(0x6f9)](_0x3e64ff)[_0x1d993a(0x6a2)]===0x0?this:(delete _0x3e64ff[_0x1d993a(0x752)]&&delete _0x3e64ff[_0x1d993a(0x9b5)],_0x3f7522[_0x1d993a(0x5da)](this[_0x1d993a(0x9ca)],_0x3e64ff),_0x3f7522[_0x1d993a(0x5da)](this[_0x1d993a(0xaa1)][_0x1d993a(0x19f)],_0x3e64ff),this);}static[_0x43bf95(0x799)](_0x535264,_0x3669c0){const _0x29add5=_0x43bf95;var _0x3e30ca;let _0x1f2656,_0x1a8786=_0x34d1e5[_0x29add5(0x7aa)][_0x29add5(0xc3)][_0x29add5(0xaa6)]();if(_0x535264[_0x29add5(0x10c)]){let _0x2cb39a=_0x5e5f93[_0x29add5(0x625)](_0x535264[_0x29add5(0x10c)]['positions'][_0x29add5(0x4e7)](_0x1a8786));_0x1f2656=new _0x42e12e(_0x2cb39a,_0x3669c0),_0x1f2656[_0x29add5(0x2f0)]={...(_0x3e30ca=_0x535264==null?void 0x0:_0x535264[_0x29add5(0x66f)])==null?void 0x0:_0x3e30ca['getValue'](_0x1a8786)};}return _0x1f2656;}};_0x4f8204['registerType'](_0x43bf95(0xa6b));var _0x7b2f17=_0x421f44,_0x1828f4=class extends _0x4f8204{constructor(_0x1f867b){const _0x43886=_0x43bf95;super(),this[_0x43886(0x387)]=_0x16f48b[_0x43886(0xa8b)](_0x1f867b),this['_delegate']=new _0x34d1e5[(_0x43886(0x7aa))]['Entity']({'rectangle':{}}),this[_0x43886(0x558)]=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){const _0x23a5dc=_0x43bf95;return _0x4f8204['getOverlayType'](_0x23a5dc(0x611));}set[_0x43bf95(0x752)](_0xe181e0){const _0x3c1b67=_0x43bf95;this[_0x3c1b67(0x387)]=_0x16f48b['parsePositions'](_0xe181e0),this[_0x3c1b67(0xaa1)]['rectangle'][_0x3c1b67(0x9d9)]=_0x34d1e5['Cesium']['Rectangle'][_0x3c1b67(0x77d)](_0x5e5f93[_0x3c1b67(0x999)](this[_0x3c1b67(0x387)]));}get[_0x43bf95(0x752)](){const _0xd23b80=_0x43bf95;return this[_0xd23b80(0x387)];}[_0x43bf95(0x6a3)](){const _0x548f66=_0x43bf95;this['positions']=this[_0x548f66(0x387)];}[_0x43bf95(0x610)](_0x482292,_0x5ad17b){const _0x4fae67=_0x43bf95;let _0x31a10e=this[_0x4fae67(0xaa1)][_0x4fae67(0xc8)][_0x4fae67(0x9d9)][_0x4fae67(0x4e7)]();return this[_0x4fae67(0xaa1)]['position']=_0x34d1e5['Cesium'][_0x4fae67(0x4f1)][_0x4fae67(0x5b6)](_0x34d1e5[_0x4fae67(0x7aa)][_0x4fae67(0x6e7)][_0x4fae67(0x765)](_0x31a10e,new _0x34d1e5[(_0x4fae67(0x7aa))][(_0x4fae67(0x4f1))]())),this['_delegate']['label']={..._0x5ad17b,'text':_0x482292},this;}[_0x43bf95(0x5db)](_0xc368bf){const _0x4953b0=_0x43bf95;return Object[_0x4953b0(0x6f9)](_0xc368bf)[_0x4953b0(0x6a2)]===0x0?this:(delete _0xc368bf[_0x4953b0(0x752)],_0x3f7522[_0x4953b0(0x5da)](this[_0x4953b0(0x9ca)],_0xc368bf),_0x3f7522[_0x4953b0(0x5da)](this[_0x4953b0(0xaa1)][_0x4953b0(0xc8)],_0xc368bf),this);}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x611));var _0x3415b7=_0x1828f4,_0x51f48a=class _0x27d7b4 extends _0x4f8204{constructor(_0x52685c){const _0x25085b=_0x43bf95;super(),this['_positions']=_0x16f48b[_0x25085b(0xa8b)](_0x52685c),this[_0x25085b(0xaa1)]=new _0x34d1e5[(_0x25085b(0x7aa))][(_0x25085b(0x926))]({'wall':{}}),this[_0x25085b(0x558)]=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){const _0x59e4ef=_0x43bf95;return _0x4f8204[_0x59e4ef(0x853)](_0x59e4ef(0x446));}set[_0x43bf95(0x752)](_0x2a7d47){const _0x4200e8=_0x43bf95;this['_positions']=_0x16f48b[_0x4200e8(0xa8b)](_0x2a7d47),this[_0x4200e8(0xaa1)][_0x4200e8(0x446)][_0x4200e8(0x752)]=_0x5e5f93[_0x4200e8(0x999)](this[_0x4200e8(0x387)]);}get['positions'](){const _0x3b53da=_0x43bf95;return this[_0x3b53da(0x387)];}[_0x43bf95(0x6a3)](){const _0x5bac24=_0x43bf95;this['positions']=this[_0x5bac24(0x387)];}[_0x43bf95(0x610)](_0x4266b2,_0x59987d){return this;}[_0x43bf95(0x5db)](_0x96146d){const _0x213414=_0x43bf95;return Object[_0x213414(0x6f9)](_0x96146d)[_0x213414(0x6a2)]===0x0?this:(delete _0x96146d['positions'],_0x3f7522['merge'](this[_0x213414(0x9ca)],_0x96146d),_0x3f7522[_0x213414(0x5da)](this[_0x213414(0xaa1)][_0x213414(0x446)],_0x96146d),this);}static[_0x43bf95(0x799)](_0x5a28ca){const _0x1cb560=_0x43bf95;var _0x309a18;let _0x4ebff2,_0x299451=_0x34d1e5[_0x1cb560(0x7aa)]['JulianDate'][_0x1cb560(0xaa6)]();if(_0x5a28ca[_0x1cb560(0x10c)]){let _0x110cc3=_0x5e5f93['transformCartesianArrayToWGS84Array'](_0x5a28ca['polyline'][_0x1cb560(0x752)][_0x1cb560(0x4e7)](_0x299451));_0x4ebff2=new _0x27d7b4(_0x110cc3),_0x4ebff2[_0x1cb560(0x2f0)]={...(_0x309a18=_0x5a28ca==null?void 0x0:_0x5a28ca[_0x1cb560(0x66f)])==null?void 0x0:_0x309a18[_0x1cb560(0x4e7)](_0x299451)};}return _0x4ebff2;}};_0x4f8204['registerType']('wall');var _0x2fc0fb=_0x51f48a,_0x2ec14c=class extends _0x49dd70{constructor(_0x5efd91,_0x28a9e8,_0x43454c={}){const _0x9157a8=_0x43bf95;if(!_0x28a9e8)throw new Error('GeoJsonLayer:the\x20url\x20invalid');super(_0x5efd91),this['_delegate']=_0x34d1e5[_0x9157a8(0x7aa)][_0x9157a8(0x85d)][_0x9157a8(0x101)](_0x28a9e8,_0x43454c),this['_state']=_0x4075ae[_0x9157a8(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x3e3b72=_0x43bf95;return _0x49dd70[_0x3e3b72(0x7b6)](_0x3e3b72(0x425));}set[_0x43bf95(0x867)](_0x1ba594){const _0x3202fd=_0x43bf95;this[_0x3202fd(0x850)]=_0x1ba594,this['_delegate']&&this[_0x3202fd(0xaa1)][_0x3202fd(0x379)](_0x6d2b16=>{_0x6d2b16['show']=this['_show'];});}get[_0x43bf95(0x867)](){const _0x29916c=_0x43bf95;return this[_0x29916c(0x850)];}[_0x43bf95(0x57c)](_0x21d51e){const _0x3ce5ca=_0x43bf95;if(_0x21d51e[_0x3ce5ca(0x9a7)]&&_0x21d51e[_0x3ce5ca(0x1cb)])return _0x25d4a3[_0x3ce5ca(0x799)](_0x21d51e);}['_createPolyline'](_0xd200ca){const _0x4865e7=_0x43bf95;if(_0xd200ca['polyline'])return _0x210775[_0x4865e7(0x799)](_0xd200ca);}[_0x43bf95(0xa74)](_0x3d8702){const _0x272cdf=_0x43bf95;if(_0x3d8702['polygon'])return _0x291d2b[_0x272cdf(0x799)](_0x3d8702);}[_0x43bf95(0x7ee)](_0x1d440a,_0x18cdc3){const _0x1765e3=_0x43bf95;if(_0x1d440a)return _0x8e8b2c[_0x1765e3(0x799)](_0x1d440a,_0x18cdc3);}['eachOverlay'](_0xc8ddf,_0x4ef97f){const _0x35b291=_0x43bf95;if(this['_delegate'])return this['_delegate'][_0x35b291(0x379)](_0x15047d=>{const _0x3ecf12=_0x35b291;_0x15047d[_0x3ecf12(0x1f6)]['values']['forEach'](_0x37cfa7=>{const _0x5b924d=_0x3ecf12;_0xc8ddf[_0x5b924d(0x7a4)](_0x4ef97f,_0x37cfa7);});}),this;}[_0x43bf95(0x9f1)](){const _0x1c2ca2=_0x43bf95;let _0x27d50e=new _0x6343d4(this['id']);return this[_0x1c2ca2(0x1f3)](_0x477c8b=>{const _0x515993=_0x1c2ca2;_0x477c8b['billboard']?_0x27d50e[_0x515993(0x75e)](this['_createBillboard'](_0x477c8b)):_0x477c8b[_0x515993(0x10c)]?_0x27d50e[_0x515993(0x75e)](this[_0x515993(0x700)](_0x477c8b)):_0x477c8b['polygon']&&_0x27d50e[_0x515993(0x75e)](this['_createPolygon'](_0x477c8b));},this),_0x27d50e;}[_0x43bf95(0x355)](_0x1c4695){const _0x4e3117=_0x43bf95;let _0x27edcf=new _0x6343d4(this['id']);return this[_0x4e3117(0x1f3)](_0xdb91c1=>{const _0x36f116=_0x4e3117;_0x27edcf[_0x36f116(0x75e)](this[_0x36f116(0x7ee)](_0xdb91c1,_0x1c4695));},this),_0x27edcf;}};_0x49dd70['registerType'](_0x43bf95(0x425));var _0x26f29e=_0x2ec14c,_0x3669f4=class extends _0x49dd70{constructor(_0x1cff59,_0x1f04f5,_0x4af57c={}){const _0x1195a7=_0x43bf95;if(!_0x1f04f5)throw new Error('GpxLayer:\x20the\x20url\x20is\x20empty');super(_0x1cff59),this['_delegate']=_0x34d1e5[_0x1195a7(0x7aa)]['KmlDataSource'][_0x1195a7(0x101)](_0x1f04f5,_0x4af57c),this[_0x1195a7(0x558)]=_0x4075ae[_0x1195a7(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x184b49=_0x43bf95;return _0x49dd70[_0x184b49(0x7b6)](_0x184b49(0x1db));}set[_0x43bf95(0x867)](_0x507f2e){const _0x2e6b88=_0x43bf95;this['_show']=_0x507f2e,this[_0x2e6b88(0xaa1)]&&this[_0x2e6b88(0xaa1)]['then'](_0x346790=>{const _0x5ad4e1=_0x2e6b88;_0x346790[_0x5ad4e1(0x867)]=this['_show'];});}get['show'](){const _0x3e47dc=_0x43bf95;return this[_0x3e47dc(0x850)];}[_0x43bf95(0x1f3)](_0x284cc1,_0x3a8401){const _0x303047=_0x43bf95;if(this[_0x303047(0xaa1)])return this[_0x303047(0xaa1)]['then'](_0x2671c7=>{const _0x2699cf=_0x303047;_0x2671c7[_0x2699cf(0x1f6)]['values'][_0x2699cf(0x2de)](_0x167a2a=>{const _0x4b96c9=_0x2699cf;_0x284cc1[_0x4b96c9(0x7a4)](_0x3a8401,_0x167a2a);});}),this;}};_0x49dd70['registerType']('gpx');var _0x2a4898=_0x3669f4,_0x5081ed={'radialColor':_0x34d1e5['Cesium'][_0x43bf95(0x7d2)][_0x43bf95(0x422)],'radialWidth':0x2,'showRadial':!0x0,'LabelColor':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x7d2)][_0x43bf95(0x801)],'weftColor':_0x34d1e5[_0x43bf95(0x7aa)]['Color'][_0x43bf95(0x422)],'weftWidth':0x2},_0x3534ab=class extends _0x49dd70{constructor(_0xf8e5ed,_0x382dad){const _0x376c07=_0x43bf95;super(_0xf8e5ed),this[_0x376c07(0x674)]={..._0x5081ed,..._0x382dad},this['_delegate']=new _0x34d1e5[(_0x376c07(0x7aa))][(_0x376c07(0x668))](_0xf8e5ed),this[_0x376c07(0x558)]=_0x4075ae[_0x376c07(0x5d2)];}get['type'](){const _0x361c8a=_0x43bf95;return _0x49dd70[_0x361c8a(0x7b6)](_0x361c8a(0x77f));}[_0x43bf95(0x945)](){const _0x176f32=_0x43bf95;for(let _0x44ce7c=0x0;_0x44ce7c<0x24;_0x44ce7c++)this[_0x176f32(0xaa1)][_0x176f32(0x1f6)][_0x176f32(0x45f)]({'polyline':{'positions':_0x34d1e5['Cesium'][_0x176f32(0x982)][_0x176f32(0x8ab)]([_0x44ce7c*0xa,89.5,_0x44ce7c*0xa,-89.5]),'material':this[_0x176f32(0x674)]['radialColor'],'width':this['_options'][_0x176f32(0x4c2)]},'show':this['_options'][_0x176f32(0x63e)]}),this[_0x176f32(0xaa1)][_0x176f32(0x1f6)][_0x176f32(0x45f)]({'position':_0x34d1e5[_0x176f32(0x7aa)]['Cartesian3']['fromDegrees'](_0x44ce7c*0xa,0x0),'label':{'text':_0x44ce7c*0xa+'°','font':_0x176f32(0x677),'fillColor':this[_0x176f32(0x674)][_0x176f32(0x6d1)]}});for(let _0x10e50c=0x0;_0x10e50c<0x12;_0x10e50c++){let _0x5b97d9=[];for(let _0x5f1eca=0x0;_0x5f1eca<0x81;_0x5f1eca++)_0x5b97d9[_0x176f32(0xb3)](-0xb4+_0x5f1eca*(0x168/0x80),(_0x10e50c<0x9?_0x10e50c:-_0x10e50c)*0xa);this[_0x176f32(0xaa1)][_0x176f32(0x1f6)][_0x176f32(0x45f)]({'polyline':{'positions':_0x34d1e5[_0x176f32(0x7aa)]['Cartesian3'][_0x176f32(0x8ab)](_0x5b97d9),'material':this[_0x176f32(0x674)][_0x176f32(0x37e)],'width':this[_0x176f32(0x674)][_0x176f32(0x3fd)]}});}}};_0x49dd70[_0x43bf95(0x545)](_0x43bf95(0x77f));var _0x519f92=_0x3534ab,_0x25c775=class extends _0x49dd70{constructor(_0x240847){const _0x486def=_0x43bf95;super(_0x240847),this[_0x486def(0xaa1)]=new _0x34d1e5[(_0x486def(0x7aa))]['PrimitiveCollection'](),this[_0x486def(0x14a)]=!0x0,this[_0x486def(0x558)]=_0x4075ae[_0x486def(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x4d9ea0=_0x43bf95;return _0x49dd70['getLayerType'](_0x4d9ea0(0x81b));}['clear'](){const _0x18ba6c=_0x43bf95;return this['_delegate']&&this['_delegate'][_0x18ba6c(0x207)](),this[_0x18ba6c(0x365)]={},this['_state']=_0x4075ae[_0x18ba6c(0x295)],this;}};_0x49dd70[_0x43bf95(0x545)]('ground_primitive');var _0x2abcff=_0x25c775,_0x546b22=class extends _0x49dd70{constructor(_0x8b728c){const _0x5b8770=_0x43bf95;super(_0x8b728c),this[_0x5b8770(0xaa1)]=_0x5b03f8['create'](_0x5b8770(0x7e1),'html-layer',void 0x0),this['_delegate']['setAttribute']('id',this[_0x5b8770(0x20a)]),this[_0x5b8770(0x623)]=void 0x0,this[_0x5b8770(0x558)]=_0x4075ae[_0x5b8770(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x1eed05=_0x43bf95;return _0x49dd70[_0x1eed05(0x7b6)](_0x1eed05(0x840));}set[_0x43bf95(0x867)](_0x5946f4){const _0x57847f=_0x43bf95;this[_0x57847f(0x850)]=_0x5946f4,this[_0x57847f(0xaa1)][_0x57847f(0x6a9)][_0x57847f(0x5cf)]=this[_0x57847f(0x850)]?_0x57847f(0x2a2):'hidden',Object[_0x57847f(0x6f9)](this[_0x57847f(0x365)])['forEach'](_0x54d3b2=>{const _0x4c8493=_0x57847f;this['_cache'][_0x54d3b2][_0x4c8493(0x867)]=_0x5946f4;});}get[_0x43bf95(0x867)](){return this['_show'];}[_0x43bf95(0x84d)](_0x21ced9){const _0x425eb2=_0x43bf95;this[_0x425eb2(0x3f7)]=_0x21ced9,this[_0x425eb2(0x3f7)]['layerContainer'][_0x425eb2(0x87b)](this[_0x425eb2(0xaa1)]);let _0x2b76ef=this[_0x425eb2(0x3f7)][_0x425eb2(0x148)];this[_0x425eb2(0x623)]=_0x2b76ef[_0x425eb2(0x2d3)]['addEventListener'](()=>{const _0x542537=_0x425eb2;let _0x11f5e7=this[_0x542537(0x3f7)]['camera'][_0x542537(0xa2)],_0x1c8400=this['_viewer'][_0x542537(0x698)][_0x542537(0x4ae)],_0x5ade2b=this[_0x542537(0x3f7)][_0x542537(0x665)]();this['eachOverlay'](_0x8cb904=>{const _0x445a3b=_0x542537;if(_0x8cb904&&_0x8cb904[_0x445a3b(0x9a7)]){let _0x5c943a=_0x5e5f93[_0x445a3b(0x432)](_0x8cb904['position']),_0x43ac83=_0x2b76ef[_0x445a3b(0x7fd)]['ellipsoid'][_0x445a3b(0x3d1)](_0x5c943a,new _0x34d1e5[(_0x445a3b(0x7aa))][(_0x445a3b(0x982))]()),_0x317d22=_0x34d1e5[_0x445a3b(0x7aa)][_0x445a3b(0x549)][_0x445a3b(0x54e)](_0x2b76ef,_0x5c943a);_0x317d22&&(_0x317d22['x']+=_0x5ade2b['x'],_0x317d22['y']+=_0x5ade2b['y']),_0x8cb904[_0x445a3b(0x155)](_0x317d22,_0x34d1e5[_0x445a3b(0x7aa)][_0x445a3b(0x982)][_0x445a3b(0x7f4)](_0x5c943a,_0x11f5e7),_0x34d1e5[_0x445a3b(0x7aa)][_0x445a3b(0x982)][_0x445a3b(0x6e2)](_0x1c8400,_0x43ac83)<=0x0);}},this);},this),this[_0x425eb2(0x558)]=_0x4075ae['ADDED'];}[_0x43bf95(0x526)](){const _0x174989=_0x43bf95;this[_0x174989(0x623)]&&this[_0x174989(0x623)](),this[_0x174989(0x3f7)][_0x174989(0x136)][_0x174989(0x6c5)](this[_0x174989(0xaa1)]),this[_0x174989(0x558)]=_0x4075ae[_0x174989(0x947)];}['clear'](){const _0x175437=_0x43bf95;for(;this[_0x175437(0xaa1)][_0x175437(0x5de)]();)this[_0x175437(0xaa1)][_0x175437(0x6c5)](this[_0x175437(0xaa1)][_0x175437(0x6d7)]);return this[_0x175437(0x365)]={},this[_0x175437(0x558)]=_0x4075ae[_0x175437(0x295)],this;}};_0x49dd70[_0x43bf95(0x545)](_0x43bf95(0x840));var _0x323d13=_0x546b22,_0x212f27=class extends _0x49dd70{constructor(_0x1f75b7){const _0x36ce8c=_0x43bf95;super(_0x1f75b7),this[_0x36ce8c(0xaa1)]=new _0x34d1e5[(_0x36ce8c(0x7aa))][(_0x36ce8c(0x7b4))](),this[_0x36ce8c(0x558)]=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){const _0x5d26c0=_0x43bf95;return _0x49dd70[_0x5d26c0(0x7b6)](_0x5d26c0(0x9cc));}[_0x43bf95(0x90d)](){const _0x3ea923=_0x43bf95;return this['_delegate'][_0x3ea923(0x207)](),this[_0x3ea923(0x365)]={},this['_state']=_0x4075ae['CLEARED'],this;}};_0x49dd70[_0x43bf95(0x545)]('i3s');var _0xbd2483=_0x212f27,_0x1e8bd4=class extends _0x49dd70{constructor(_0x1f092e,_0x18e76a,_0x3dd6f5={}){const _0x42f877=_0x43bf95;if(!_0x18e76a)throw new Error(_0x42f877(0x543));super(_0x1f092e),this[_0x42f877(0xaa1)]=_0x34d1e5[_0x42f877(0x7aa)][_0x42f877(0x84b)][_0x42f877(0x101)](_0x18e76a,_0x3dd6f5),this[_0x42f877(0x558)]=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){return _0x49dd70['getLayerType']('kml');}set[_0x43bf95(0x867)](_0x240a83){const _0x4b58da=_0x43bf95;this[_0x4b58da(0x850)]=_0x240a83,this[_0x4b58da(0xaa1)]&&this['_delegate'][_0x4b58da(0x379)](_0x178fdd=>{const _0x3f6e58=_0x4b58da;_0x178fdd[_0x3f6e58(0x867)]=this[_0x3f6e58(0x850)];});}get[_0x43bf95(0x867)](){const _0x2acf68=_0x43bf95;return this[_0x2acf68(0x850)];}['eachOverlay'](_0x616ffb,_0x5ba9a6){const _0x33927a=_0x43bf95;if(this[_0x33927a(0xaa1)])return this[_0x33927a(0xaa1)][_0x33927a(0x379)](_0x321320=>{const _0x3fe28e=_0x33927a;_0x321320['entities'][_0x3fe28e(0x1e2)][_0x3fe28e(0x2de)](_0x1e9d37=>{const _0x590398=_0x3fe28e;_0x616ffb[_0x590398(0x7a4)](_0x5ba9a6,_0x1e9d37);});}),this;}};_0x49dd70[_0x43bf95(0x545)](_0x43bf95(0xa5));var _0x3d98c2=_0x1e8bd4,_0x3ca051=class extends _0x49dd70{constructor(_0x51f6be,_0x1f1543=''){const _0x25977e=_0x43bf95;super(_0x51f6be),this[_0x25977e(0x1dc)]=_0x34d1e5['Cesium']['GeoJsonDataSource'][_0x25977e(0x101)](_0x1f1543),this[_0x25977e(0xaa1)]=new _0x34d1e5['Cesium'][(_0x25977e(0x668))](_0x51f6be),this[_0x25977e(0x75b)](),this[_0x25977e(0x558)]=_0x4075ae[_0x25977e(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x32d047=_0x43bf95;return _0x49dd70[_0x32d047(0x7b6)](_0x32d047(0x5e7));}[_0x43bf95(0x2f7)](_0x239bd5){const _0x495946=_0x43bf95;if(_0x239bd5[_0x495946(0x9a7)]&&_0x239bd5[_0x495946(0x130)])return _0x2e18ac['fromEntity'](_0x239bd5);}[_0x43bf95(0x75b)](){const _0x14fb63=_0x43bf95;this[_0x14fb63(0x1dc)][_0x14fb63(0x379)](_0x2edb35=>{const _0x1ca9c6=_0x14fb63;_0x2edb35[_0x1ca9c6(0x1f6)][_0x1ca9c6(0x1e2)]['forEach'](_0x39b95c=>{const _0x20db88=_0x1ca9c6;let _0x42a1b0=this[_0x20db88(0x2f7)](_0x39b95c);this[_0x20db88(0x75e)](_0x42a1b0);});});}};_0x49dd70[_0x43bf95(0x545)](_0x43bf95(0x5e7));var _0x5309d5=_0x3ca051,_0x38c950=class extends _0x49dd70{constructor(_0x55ccd3){const _0x90359b=_0x43bf95;super(_0x55ccd3),this[_0x90359b(0xaa1)]=new _0x34d1e5[(_0x90359b(0x7aa))][(_0x90359b(0x7b4))](),this[_0x90359b(0x5eb)]=this['_delegate'][_0x90359b(0x45f)](new _0x34d1e5['Cesium'][(_0x90359b(0x31b))]()),this[_0x90359b(0x1c3)]=this['_delegate']['add'](new _0x34d1e5[(_0x90359b(0x7aa))][(_0x90359b(0x5bc))]()),this[_0x90359b(0xa39)]=this['_delegate'][_0x90359b(0x45f)](new _0x34d1e5['Cesium'][(_0x90359b(0x6a4))]()),this[_0x90359b(0xac)]=this[_0x90359b(0xaa1)][_0x90359b(0x45f)](new _0x34d1e5[(_0x90359b(0x7aa))]['PolylineCollection']()),this[_0x90359b(0x3f9)]=this[_0x90359b(0xaa1)][_0x90359b(0x45f)](new _0x34d1e5[(_0x90359b(0x7aa))][(_0x90359b(0x359))]()),this[_0x90359b(0x558)]=_0x4075ae[_0x90359b(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x19ad83=_0x43bf95;return _0x49dd70[_0x19ad83(0x7b6)](_0x19ad83(0x64d));}get[_0x43bf95(0xb2)](){const _0x23c672=_0x43bf95;return this[_0x23c672(0x5eb)];}get[_0x43bf95(0x9e9)](){return this['_labels'];}get[_0x43bf95(0x62d)](){const _0x3b012f=_0x43bf95;return this[_0x3b012f(0xa39)];}get['polylines'](){return this['_polylines'];}get[_0x43bf95(0x4ef)](){return this['_clouds'];}[_0x43bf95(0x90d)](){const _0x338367=_0x43bf95;return this[_0x338367(0xaa1)]&&this[_0x338367(0xaa1)]['removeAll'](),this[_0x338367(0x5eb)]=this[_0x338367(0xaa1)][_0x338367(0x45f)](new _0x34d1e5['Cesium']['PointPrimitiveCollection']()),this[_0x338367(0x1c3)]=this['_delegate'][_0x338367(0x45f)](new _0x34d1e5[(_0x338367(0x7aa))]['LabelCollection']()),this[_0x338367(0xa39)]=this[_0x338367(0xaa1)][_0x338367(0x45f)](new _0x34d1e5[(_0x338367(0x7aa))][(_0x338367(0x6a4))]()),this['_polylines']=this[_0x338367(0xaa1)][_0x338367(0x45f)](new _0x34d1e5['Cesium'][(_0x338367(0x878))]()),this[_0x338367(0x3f9)]=this[_0x338367(0xaa1)][_0x338367(0x45f)](new _0x34d1e5['Cesium']['CloudCollection']()),this[_0x338367(0x365)]={},this[_0x338367(0x558)]=_0x4075ae[_0x338367(0x295)],this;}};_0x49dd70[_0x43bf95(0x545)](_0x43bf95(0x64d));var _0x2f36a3=_0x38c950,_0x2c5067=class extends _0x49dd70{constructor(_0x18caee,_0x42f05a,_0x253986){const _0x1365c1=_0x43bf95;super(_0x18caee),this[_0x1365c1(0xaa1)]=_0x34d1e5[_0x1365c1(0x7aa)]['ImageryLayer']['fromProviderAsync'](_0x42f05a,_0x253986),this[_0x1365c1(0x558)]=_0x4075ae[_0x1365c1(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x263f4c=_0x43bf95;return _0x49dd70[_0x263f4c(0x7b6)]('raster-tile');}};_0x49dd70[_0x43bf95(0x545)](_0x43bf95(0xa1f));var _0xc43515=_0x2c5067,_0x50df08=class extends _0x49dd70{constructor(_0x417593){const _0x4f8a72=_0x43bf95;super(_0x417593),this['_delegate']=new _0x34d1e5[(_0x4f8a72(0x7aa))]['PrimitiveCollection'](),this['_state']=_0x4075ae[_0x4f8a72(0x5d2)];}get['type'](){const _0x30cc76=_0x43bf95;return _0x49dd70[_0x30cc76(0x7b6)](_0x30cc76(0x6af));}[_0x43bf95(0x90d)](){const _0x2edab7=_0x43bf95;return this[_0x2edab7(0xaa1)]['removeAll'](),this[_0x2edab7(0x365)]={},this[_0x2edab7(0x558)]=_0x4075ae['CLEARED'],this;}};_0x49dd70['registerType'](_0x43bf95(0x6af));var _0x1ab616=_0x50df08;_0x26f29e[_0x43bf95(0x545)](_0x43bf95(0x5e8));var _0x2bae51=class extends _0x49dd70{constructor(_0x21171f,_0x2688be){const _0x411170=_0x43bf95;if(!_0x2c4b9b('echarts'))throw new Error(_0x411170(0x491));super(_0x21171f),this[_0x411170(0x3f2)]=_0x2688be,this[_0x411170(0xaa1)]=void 0x0,this[_0x411170(0x2f3)]=void 0x0;}set[_0x43bf95(0x867)](_0x25e066){const _0x2fb84e=_0x43bf95;this['_show']=_0x25e066,this['_delegate']['style'][_0x2fb84e(0x5cf)]=_0x25e066?_0x2fb84e(0x2a2):'hidden';}get['show'](){const _0x539a95=_0x43bf95;return this[_0x539a95(0x850)];}['_createChartElement'](){const _0x5b379b=_0x43bf95;let _0x2b3e3d=this[_0x5b379b(0x3f7)][_0x5b379b(0x148)][_0x5b379b(0x790)],_0x5b133c=document['createElement'](_0x5b379b(0x7e1));return _0x5b133c[_0x5b379b(0x4fe)]('id',this[_0x5b379b(0x20a)]),_0x5b133c[_0x5b379b(0x4fe)](_0x5b379b(0x34b),_0x5b379b(0x702)),_0x5b133c[_0x5b379b(0x6a9)][_0x5b379b(0x4ec)]=_0x5b379b(0x654)+_0x2b3e3d[_0x5b379b(0xa44)]+_0x5b379b(0x657)+_0x2b3e3d[_0x5b379b(0x41d)]+_0x5b379b(0x666),this['_viewer'][_0x5b379b(0x136)][_0x5b379b(0x87b)](_0x5b133c),_0x5b133c;}['_onAdd'](_0x50fa92){const _0x2ad77f=_0x43bf95;let _0x71426d=_0x2c4b9b(_0x2ad77f(0x3b5));this['_viewer']=_0x50fa92,this['_viewer'][_0x2ad77f(0x790)][_0x2ad77f(0x4fe)](_0x2ad77f(0xa42),'0'),this[_0x2ad77f(0xaa1)]=this[_0x2ad77f(0xa92)](),this[_0x2ad77f(0x2f3)]=_0x71426d['init'](this['_delegate']),Object(this[_0x2ad77f(0x2f3)]['getZr']())[_0x2ad77f(0x88c)]=_0x50fa92,this[_0x2ad77f(0x3f2)]&&this[_0x2ad77f(0x2f3)]['setOption']({...this['_option'],'GLMap':{},'animation':!0x1}),this[_0x2ad77f(0x558)]=_0x4075ae[_0x2ad77f(0xa0f)];}[_0x43bf95(0x526)](){const _0x4ee9c3=_0x43bf95;this[_0x4ee9c3(0xaa1)]&&this[_0x4ee9c3(0x3f7)]&&(this['_chart'][_0x4ee9c3(0x426)](),this['_viewer'][_0x4ee9c3(0x136)]['removeChild'](this[_0x4ee9c3(0xaa1)]),this[_0x4ee9c3(0x558)]=_0x4075ae['REMOVED']);}[_0x43bf95(0x3e6)](_0x2b5cb8={}){const _0x564abe=_0x43bf95;return this[_0x564abe(0x3f2)]=_0x2b5cb8,this['_chart']&&this[_0x564abe(0x2f3)]['setOption']({..._0x2b5cb8,'GLMap':{},'animation':!0x1}),this;}[_0x43bf95(0x90d)](){const _0x4fb27d=_0x43bf95;return this['_chart'][_0x4fb27d(0x90d)](),this;}[_0x43bf95(0x9bd)](){return this['_chart']['resize'](),this;}},_0x2f8e82=_0x2bae51,{Cartesian3:_0x4ff6cc,Ellipsoid:_0x2a465b,Math:_0x54795e}=_0x34d1e5['Cesium'];function _0x4d5950(_0x3e9bd5){const _0x5b138e=_0x43bf95;function _0x3d66c3(_0x25f10e){const _0x16a655=_0xf114;this[_0x16a655(0x9e6)]=_0x25f10e,this[_0x16a655(0x3f7)]=Object(_0x25f10e[_0x16a655(0xa46)]())[_0x16a655(0x88c)],this[_0x16a655(0x461)]=[0x0,0x0],this[_0x16a655(0x76c)]=['lng',_0x16a655(0x941)];}return _0x3d66c3[_0x5b138e(0x519)]['getViewer']=function(){const _0x24f074=_0x5b138e;return this[_0x24f074(0x3f7)];},_0x3d66c3['prototype'][_0x5b138e(0xc7)]=function(_0x485bd8){const _0x5331a4=_0x5b138e;return this[_0x5331a4(0x461)]=_0x485bd8,this;},_0x3d66c3[_0x5b138e(0x519)][_0x5b138e(0x324)]=function(_0x32bb31){const _0x5829e6=_0x5b138e;let _0x7756dc=[],_0xdef6d5=_0x4ff6cc[_0x5829e6(0x81e)](_0x32bb31[0x0],_0x32bb31[0x1]);if(!_0xdef6d5)return _0x7756dc;let _0x5ea3ff=_0x2a465b[_0x5829e6(0x423)]['geodeticSurfaceNormal'](_0xdef6d5,new _0x4ff6cc()),_0x48f764=this[_0x5829e6(0x3f7)][_0x5829e6(0x698)][_0x5829e6(0x4ae)];if(_0x4ff6cc['dot'](_0x5ea3ff,_0x48f764)>=0x0)return _0x7756dc;let _0x1984fe=this[_0x5829e6(0x3f7)][_0x5829e6(0x148)]['cartesianToCanvasCoordinates'](_0xdef6d5);return _0x1984fe?[_0x1984fe['x']-this[_0x5829e6(0x461)][0x0],_0x1984fe['y']-this[_0x5829e6(0x461)][0x1]]:_0x7756dc;},_0x3d66c3[_0x5b138e(0x519)][_0x5b138e(0x19a)]=function(_0x341e08){const _0x2f4d1a=_0x5b138e;let _0x42d5a8=this[_0x2f4d1a(0x3f7)]['scene'][_0x2f4d1a(0x7fd)][_0x2f4d1a(0x6eb)],_0x474775=new _0x4ff6cc(_0x341e08[0x0]+this[_0x2f4d1a(0x461)][0x0],_0x341e08[0x1]+this[_0x2f4d1a(0x461)][0x1],0x0),_0x53fe92=_0x42d5a8[_0x2f4d1a(0x8e5)](_0x474775);return[_0x54795e[_0x2f4d1a(0x438)](_0x53fe92[_0x2f4d1a(0xc9)]),_0x54795e[_0x2f4d1a(0x438)](_0x53fe92[_0x2f4d1a(0xa6e)])];},_0x3d66c3['prototype'][_0x5b138e(0x65d)]=function(){const _0x20b1ea=_0x5b138e;let _0x397fe4=this[_0x20b1ea(0x9e6)];return new _0x3e9bd5['graphic']['BoundingRect'](0x0,0x0,_0x397fe4[_0x20b1ea(0x720)](),_0x397fe4[_0x20b1ea(0x706)]());},_0x3d66c3[_0x5b138e(0x519)][_0x5b138e(0x75d)]=function(){const _0x3009f5=_0x5b138e;return _0x3e9bd5[_0x3009f5(0x7bf)][_0x3009f5(0x484)]();},_0x3d66c3['create']=function(_0x2efeb6,_0x4196ed){const _0x53eee6=_0x5b138e;let _0x3a8a84;_0x2efeb6[_0x53eee6(0x789)]('GLMap',function(_0x4c4955){const _0xf14e95=_0x53eee6;_0x3a8a84=new _0x3d66c3(_0x4196ed),_0x3a8a84[_0xf14e95(0xc7)](_0x4c4955[_0xf14e95(0x9dc)]||[0x0,0x0]),_0x4c4955[_0xf14e95(0x2e5)]=_0x3a8a84;}),_0x2efeb6['eachSeries'](function(_0x5c999c){const _0x1e6077=_0x53eee6;_0x5c999c['get']('coordinateSystem')===_0x1e6077(0x24b)&&(_0x5c999c[_0x1e6077(0x2e5)]=_0x3a8a84);});},_0x3d66c3[_0x5b138e(0x76c)]=['lng',_0x5b138e(0x941)],_0x3d66c3;}function _0x39b03d(_0x3d7367){const _0x3314c8=_0x43bf95;let {registerAction:_0x267d83,registerCoordinateSystem:_0xa287f,extendComponentModel:_0x12af16,extendComponentView:_0x1c5195}=_0x3d7367;_0x12af16({'type':_0x3314c8(0x24b),'getViewer'(){const _0x2528ce=_0x3314c8;return Object(this[_0x2528ce(0xa46)]())['viewer'];},'defaultOption':{'roam':!0x1}}),_0x1c5195({'type':_0x3314c8(0x24b),'init':function(_0x29a150,_0x4fb17d){const _0x2a1ad3=_0x3314c8;this[_0x2a1ad3(0x621)]=_0x4fb17d,_0x4fb17d[_0x2a1ad3(0xa46)]()[_0x2a1ad3(0x88c)][_0x2a1ad3(0xaad)][_0x2a1ad3(0x9ae)][_0x2a1ad3(0x278)](this[_0x2a1ad3(0x463)],this);},'moveHandler':function(){const _0x2a7645=_0x3314c8;this[_0x2a7645(0x621)][_0x2a7645(0xa46)]()['dom'][_0x2a7645(0x6a9)][_0x2a7645(0x5cf)]!==_0x2a7645(0x5ad)&&this[_0x2a7645(0x621)][_0x2a7645(0x8de)]({'type':_0x2a7645(0x5a4)});},'render':function(_0x9a0673,_0x4eb701,_0x3d020b){},'dispose':function(){const _0x42e254=_0x3314c8;this['api'][_0x42e254(0xa46)]()['viewer'][_0x42e254(0xaad)][_0x42e254(0x9ae)][_0x42e254(0x97c)](this[_0x42e254(0x463)],this);}}),_0xa287f(_0x3314c8(0x24b),_0x4d5950(_0x3d7367)),_0x267d83({'type':'GLMapRoam','event':_0x3314c8(0x5a4),'update':_0x3314c8(0x98e)},function(_0x3dfeed,_0x349326){});}var _0x3ecfba={'LEFT_MIDDLE':0x0,'LEFT_RIGHT':0x1},_0x5e3ffa=_0x3ecfba,_0x5f52cf=class{constructor(_0x4bc87f){const _0x4f0c60=_0x43bf95;this[_0x4f0c60(0x3f7)]=_0x4bc87f,this[_0x4f0c60(0x674)]={};}[_0x43bf95(0x251)](){const _0x5b1bbb=_0x43bf95;var _0x59626a,_0x3649e3,_0x40f6b6;return this[_0x5b1bbb(0x3f7)][_0x5b1bbb(0x8ca)]['shadows']=(_0x3649e3=(_0x59626a=this['_options'])==null?void 0x0:_0x59626a[_0x5b1bbb(0x3b6)])!=null?_0x3649e3:!0x1,this[_0x5b1bbb(0x3f7)]['delegate'][_0x5b1bbb(0xe6)]=((_0x40f6b6=this[_0x5b1bbb(0x674)])==null?void 0x0:_0x40f6b6[_0x5b1bbb(0xe6)])||0x1,this;}[_0x43bf95(0x9d5)](){const _0x1b039f=_0x43bf95;return this[_0x1b039f(0x674)][_0x1b039f(0xa42)]&&this[_0x1b039f(0x3f7)][_0x1b039f(0x148)]['canvas'][_0x1b039f(0x4fe)](_0x1b039f(0xa42),this[_0x1b039f(0x674)][_0x1b039f(0xa42)]),this;}[_0x43bf95(0x384)](){const _0x666c30=_0x43bf95;var _0x3529e6,_0x12b068,_0xd61d97,_0x129991;let _0x4e2fdf=this[_0x666c30(0x3f7)][_0x666c30(0x148)];return _0x4e2fdf['skyAtmosphere']['show']=(_0x3529e6=this[_0x666c30(0x674)][_0x666c30(0x8d8)])!=null?_0x3529e6:!0x0,_0x4e2fdf[_0x666c30(0x62e)][_0x666c30(0x867)]=(_0x12b068=this[_0x666c30(0x674)][_0x666c30(0x896)])!=null?_0x12b068:!0x0,_0x4e2fdf[_0x666c30(0x1e0)]['show']=(_0xd61d97=this[_0x666c30(0x674)][_0x666c30(0x628)])!=null?_0xd61d97:!0x0,_0x4e2fdf[_0x666c30(0x744)][_0x666c30(0x1df)][_0x666c30(0x776)]=(_0x129991=this[_0x666c30(0x674)][_0x666c30(0x2c8)])!=null?_0x129991:!0x1,_0x4e2fdf[_0x666c30(0x8c9)]&&(_0x4e2fdf[_0x666c30(0x88b)]=+this[_0x666c30(0x674)][_0x666c30(0x88b)]||0x1),this;}[_0x43bf95(0x6a1)](){const _0x3f3a6e=_0x43bf95;var _0x5756bd;if(!this['_options'][_0x3f3a6e(0x3ce)])return this;let _0x2ab10b=this['_options']['skyBox'];if(_0x2ab10b instanceof _0x34d1e5[_0x3f3a6e(0x7aa)][_0x3f3a6e(0x116)])this[_0x3f3a6e(0x3f7)][_0x3f3a6e(0x148)][_0x3f3a6e(0x3ce)]=_0x2ab10b;else{let _0x4f97cf=this[_0x3f3a6e(0x3f7)][_0x3f3a6e(0x148)][_0x3f3a6e(0x3ce)];_0x4f97cf[_0x3f3a6e(0x867)]=(_0x5756bd=_0x2ab10b[_0x3f3a6e(0x867)])!=null?_0x5756bd:!0x0,_0x2ab10b['offsetAngle']&&(_0x4f97cf[_0x3f3a6e(0x6c7)]=_0x2ab10b['offsetAngle']),_0x2ab10b!=null&&_0x2ab10b[_0x3f3a6e(0x86e)]&&(_0x4f97cf['sources']=_0x2ab10b['sources']);}return this;}[_0x43bf95(0x861)](){const _0x39d49c=_0x43bf95;var _0x5391b0,_0x1c73d3,_0x58a402,_0x302763,_0x1699c0,_0x27490b,_0x16c93f,_0x5c6d46,_0x11aef2,_0x1a49e6,_0x133b0e,_0x10a557;if(!this[_0x39d49c(0x674)]['globe'])return this;let _0x4f722f=this[_0x39d49c(0x3f7)][_0x39d49c(0x148)][_0x39d49c(0x7fd)],_0x420eef=this[_0x39d49c(0x674)]['globe'];if(_0x3f7522[_0x39d49c(0x5da)](_0x4f722f,{'show':(_0x5391b0=_0x420eef==null?void 0x0:_0x420eef[_0x39d49c(0x867)])!=null?_0x5391b0:!0x0,'showGroundAtmosphere':(_0x1c73d3=_0x420eef==null?void 0x0:_0x420eef['showGroundAtmosphere'])!=null?_0x1c73d3:!0x0,'enableLighting':(_0x58a402=_0x420eef==null?void 0x0:_0x420eef[_0x39d49c(0x51e)])!=null?_0x58a402:!0x1,'depthTestAgainstTerrain':(_0x302763=_0x420eef==null?void 0x0:_0x420eef[_0x39d49c(0x208)])!=null?_0x302763:!0x1,'tileCacheSize':+(_0x420eef==null?void 0x0:_0x420eef[_0x39d49c(0x65c)])||0x64,'preloadSiblings':(_0x1699c0=_0x420eef==null?void 0x0:_0x420eef[_0x39d49c(0x909)])!=null?_0x1699c0:!0x1,'showSkirts':(_0x27490b=_0x420eef==null?void 0x0:_0x420eef[_0x39d49c(0xa4a)])!=null?_0x27490b:!0x0,'baseColor':(_0x420eef==null?void 0x0:_0x420eef[_0x39d49c(0x367)])||new _0x34d1e5[(_0x39d49c(0x7aa))][(_0x39d49c(0x7d2))](0x0,0x0,0.5,0x1),'terrainExaggeration':(_0x420eef==null?void 0x0:_0x420eef['terrainExaggeration'])||0x1,'terrainExaggerationRelativeHeight':(_0x420eef==null?void 0x0:_0x420eef[_0x39d49c(0xa41)])||0x0}),_0x3f7522['merge'](_0x4f722f[_0x39d49c(0x93c)],{'enabled':(_0x5c6d46=(_0x16c93f=_0x420eef==null?void 0x0:_0x420eef[_0x39d49c(0x93c)])==null?void 0x0:_0x16c93f[_0x39d49c(0x776)])!=null?_0x5c6d46:!0x1,'backFaceAlpha':+((_0x11aef2=_0x420eef==null?void 0x0:_0x420eef[_0x39d49c(0x93c)])==null?void 0x0:_0x11aef2[_0x39d49c(0x3c3)])||0x1,'backFaceAlphaByDistance':(_0x1a49e6=_0x420eef==null?void 0x0:_0x420eef[_0x39d49c(0x93c)])==null?void 0x0:_0x1a49e6[_0x39d49c(0x4ce)],'frontFaceAlpha':+((_0x133b0e=_0x420eef==null?void 0x0:_0x420eef[_0x39d49c(0x93c)])==null?void 0x0:_0x133b0e[_0x39d49c(0x5d7)])||0x1,'frontFaceAlphaByDistance':(_0x10a557=_0x420eef==null?void 0x0:_0x420eef[_0x39d49c(0x93c)])==null?void 0x0:_0x10a557[_0x39d49c(0x74b)]}),_0x420eef!=null&&_0x420eef['filterColor']){let _0x5eaabe=this[_0x39d49c(0x3f7)][_0x39d49c(0x148)][_0x39d49c(0x7fd)][_0x39d49c(0x868)]['baseFragmentShaderSource'],_0x23b7a3=_0x5eaabe[_0x39d49c(0x86e)][_0x39d49c(0x321)]();_0x5eaabe['sources'][_0x39d49c(0xb3)](_0x23b7a3[_0x39d49c(0x965)](_0x39d49c(0x617),_0x39d49c(0x3fe)+_0x420eef['filterColor'][_0x39d49c(0x8fa)]()+';'));}return this;}[_0x43bf95(0x8f9)](){const _0x41574d=_0x43bf95;var _0x19ef14,_0x2b2574,_0x27d31a,_0x568818,_0x31c835,_0x39f609,_0x17dab2;if(!((_0x19ef14=this[_0x41574d(0x674)])!=null&&_0x19ef14[_0x41574d(0x8a3)]))return this;let _0x449ee1=this[_0x41574d(0x3f7)]['scene'][_0x41574d(0x9fb)],_0xd05ec9=this['_options'][_0x41574d(0x8a3)];return _0x3f7522[_0x41574d(0x5da)](_0x449ee1,{'enableInputs':(_0x2b2574=_0xd05ec9==null?void 0x0:_0xd05ec9[_0x41574d(0x740)])!=null?_0x2b2574:!0x0,'enableRotate':(_0x27d31a=_0xd05ec9==null?void 0x0:_0xd05ec9[_0x41574d(0x501)])!=null?_0x27d31a:!0x0,'enableTilt':(_0x568818=_0xd05ec9==null?void 0x0:_0xd05ec9['enableTilt'])!=null?_0x568818:!0x0,'enableTranslate':(_0x31c835=_0xd05ec9==null?void 0x0:_0xd05ec9[_0x41574d(0x21d)])!=null?_0x31c835:!0x0,'enableZoom':(_0x39f609=_0xd05ec9==null?void 0x0:_0xd05ec9[_0x41574d(0x658)])!=null?_0x39f609:!0x0,'enableCollisionDetection':(_0x17dab2=_0xd05ec9==null?void 0x0:_0xd05ec9[_0x41574d(0x37b)])!=null?_0x17dab2:!0x0,'minimumZoomDistance':+(_0xd05ec9==null?void 0x0:_0xd05ec9[_0x41574d(0x70c)])||0x1,'maximumZoomDistance':+(_0xd05ec9==null?void 0x0:_0xd05ec9[_0x41574d(0x131)])||0x269d036}),this;}[_0x43bf95(0x5cc)](_0x552ee7){const _0x2d1085=_0x43bf95;return Object[_0x2d1085(0x6f9)](_0x552ee7)[_0x2d1085(0x6a2)]===0x0?this:(this['_options']={...this[_0x2d1085(0x674)],..._0x552ee7},this[_0x2d1085(0x251)]()['_setCanvasOption']()['_setSceneOption']()[_0x2d1085(0x6a1)]()[_0x2d1085(0x861)]()['_setCameraController'](),this);}},_0x484eb8=_0x5f52cf,_0x498cbb=class{constructor(_0x24c100){const _0xf9a6=_0x43bf95;this[_0xf9a6(0x3f7)]=_0x24c100,this[_0xf9a6(0x29b)]=0x0;}[_0x43bf95(0x739)](_0x5584f1,_0x2a9f1a){const _0x56aca1=_0x43bf95;let _0x58fe91=new _0x34d1e5[(_0x56aca1(0x7aa))]['ScreenSpaceEventHandler'](this[_0x56aca1(0x3f7)]['scene'][_0x56aca1(0x790)]);this[_0x56aca1(0x3f7)][_0x56aca1(0x148)]['mode']===_0x34d1e5['Cesium']['SceneMode']['SCENE3D']&&(_0x58fe91['setInputAction'](_0x11884d=>{const _0x42698c=_0x56aca1;_0x58fe91[_0x42698c(0x307)](_0x3d757c=>{const _0x12d427=_0x42698c;let _0x168d8a=!0x0,_0x42c452=_0x3d757c[_0x12d427(0x837)]['y']<_0x3d757c['startPosition']['y'];_0x42c452&&this[_0x12d427(0x3f7)][_0x12d427(0x698)][_0x12d427(0x442)]>_0x34d1e5['Cesium'][_0x12d427(0x72b)][_0x12d427(0x2b0)](_0x2a9f1a)||!_0x42c452&&this[_0x12d427(0x3f7)]['camera'][_0x12d427(0x442)]<_0x34d1e5['Cesium'][_0x12d427(0x72b)][_0x12d427(0x2b0)](_0x5584f1)?_0x168d8a=!0x1:_0x168d8a=!0x0,this[_0x12d427(0x3f7)][_0x12d427(0x148)][_0x12d427(0x9fb)][_0x12d427(0x3b3)]=_0x168d8a;},_0x34d1e5[_0x42698c(0x7aa)][_0x42698c(0x3be)][_0x42698c(0xa09)]);},this[_0x56aca1(0x29b)]===_0x5e3ffa['LEFT_MIDDLE']?_0x34d1e5[_0x56aca1(0x7aa)][_0x56aca1(0x3be)][_0x56aca1(0x704)]:_0x34d1e5[_0x56aca1(0x7aa)][_0x56aca1(0x3be)][_0x56aca1(0x3a5)]),_0x58fe91['setInputAction'](_0x4dbc14=>{const _0x515e24=_0x56aca1;this['_viewer'][_0x515e24(0x148)][_0x515e24(0x9fb)]['enableTilt']=!0x0,_0x58fe91[_0x515e24(0x290)](_0x34d1e5[_0x515e24(0x7aa)]['ScreenSpaceEventType'][_0x515e24(0xa09)]);},this[_0x56aca1(0x29b)]===_0x5e3ffa[_0x56aca1(0x520)]?_0x34d1e5[_0x56aca1(0x7aa)][_0x56aca1(0x3be)][_0x56aca1(0xa22)]:_0x34d1e5[_0x56aca1(0x7aa)][_0x56aca1(0x3be)][_0x56aca1(0x755)]));}[_0x43bf95(0xa7d)](_0x4ec975){const _0x3eaf8=_0x43bf95;this[_0x3eaf8(0x29b)]=_0x4ec975||_0x5e3ffa[_0x3eaf8(0x520)],_0x4ec975===_0x5e3ffa[_0x3eaf8(0x520)]?(this[_0x3eaf8(0x3f7)]['scene'][_0x3eaf8(0x9fb)][_0x3eaf8(0x5a2)]=[_0x34d1e5['Cesium'][_0x3eaf8(0xa68)]['MIDDLE_DRAG'],_0x34d1e5['Cesium'][_0x3eaf8(0xa68)][_0x3eaf8(0x55a)],{'eventType':_0x34d1e5['Cesium'][_0x3eaf8(0xa68)][_0x3eaf8(0x778)],'modifier':_0x34d1e5['Cesium'][_0x3eaf8(0x4dc)][_0x3eaf8(0x270)]},{'eventType':_0x34d1e5[_0x3eaf8(0x7aa)]['CameraEventType'][_0x3eaf8(0x4de)],'modifier':_0x34d1e5[_0x3eaf8(0x7aa)][_0x3eaf8(0x4dc)][_0x3eaf8(0x270)]}],this['_viewer']['scene'][_0x3eaf8(0x9fb)][_0x3eaf8(0x962)]=[_0x34d1e5[_0x3eaf8(0x7aa)][_0x3eaf8(0xa68)][_0x3eaf8(0x4de)],_0x34d1e5[_0x3eaf8(0x7aa)][_0x3eaf8(0xa68)][_0x3eaf8(0x480)],_0x34d1e5[_0x3eaf8(0x7aa)][_0x3eaf8(0xa68)][_0x3eaf8(0x55a)]]):_0x4ec975===_0x5e3ffa[_0x3eaf8(0x6e9)]&&(this['_viewer'][_0x3eaf8(0x148)]['screenSpaceCameraController'][_0x3eaf8(0x5a2)]=[_0x34d1e5[_0x3eaf8(0x7aa)][_0x3eaf8(0xa68)][_0x3eaf8(0x4de)],_0x34d1e5[_0x3eaf8(0x7aa)][_0x3eaf8(0xa68)][_0x3eaf8(0x55a)],{'eventType':_0x34d1e5[_0x3eaf8(0x7aa)][_0x3eaf8(0xa68)][_0x3eaf8(0x778)],'modifier':_0x34d1e5['Cesium'][_0x3eaf8(0x4dc)][_0x3eaf8(0x270)]},{'eventType':_0x34d1e5['Cesium'][_0x3eaf8(0xa68)]['RIGHT_DRAG'],'modifier':_0x34d1e5[_0x3eaf8(0x7aa)][_0x3eaf8(0x4dc)][_0x3eaf8(0x270)]}],this[_0x3eaf8(0x3f7)][_0x3eaf8(0x148)][_0x3eaf8(0x9fb)][_0x3eaf8(0x962)]=[_0x34d1e5[_0x3eaf8(0x7aa)][_0x3eaf8(0xa68)]['WHEEL'],_0x34d1e5[_0x3eaf8(0x7aa)][_0x3eaf8(0xa68)][_0x3eaf8(0x55a)]]);}},_0x396d8b=_0x498cbb,_0x4a6585=_0x43bf95(0x9f6),_0x2efe43=_0x4a6585,_0x172c6d=_0x43bf95(0x91c),_0x3ddfa4=_0x172c6d,_0x916de1='\x0a<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22\x20standalone=\x22no\x22?>\x0a<svg\x20width=\x2217px\x22\x20height=\x2217px\x22\x20viewBox=\x220\x200\x2017\x2017\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22>\x0a\x20\x20\x20\x20<!--\x20Generator:\x20Sketch\x2043.2\x20(39069)\x20-\x20http://www.bohemiancoding.com/sketch\x20-->\x0a\x20\x20\x20\x20<title>compass-inner</title>\x0a\x20\x20\x20\x20<desc>Created\x20with\x20Sketch.</desc>\x0a\x20\x20\x20\x20<defs></defs>\x0a\x20\x20\x20\x20<g\x20id=\x22Page-1\x22\x20stroke=\x22none\x22\x20stroke-width=\x221\x22\x20fill-rule=\x22evenodd\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<g\x20id=\x22compass-inner\x22\x20fill-rule=\x22nonzero\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M8.5,16.5\x20C4.081722,16.5\x200.5,12.918278\x200.5,8.5\x20C0.5,4.081722\x204.081722,0.5\x208.5,0.5\x20C12.918278,0.5\x2016.5,4.081722\x2016.5,8.5\x20C16.5,12.918278\x2012.918278,16.5\x208.5,16.5\x20Z\x20M8.5,15.5\x20C12.3659932,15.5\x2015.5,12.3659932\x2015.5,8.5\x20C15.5,4.63400675\x2012.3659932,1.5\x208.5,1.5\x20C4.63400675,1.5\x201.5,4.63400675\x201.5,8.5\x20C1.5,12.3659932\x204.63400675,15.5\x208.5,15.5\x20Z\x22\x20id=\x22Oval-96\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M9.92599835,7.09066832\x20C12.7122872,9.87695712\x2014.3709388,12.5452228\x2013.4497471,13.4664145\x20C12.5285555,14.3876061\x209.86028979,12.7289545\x207.074001,9.94266568\x20C4.2877122,7.15637688\x202.62906055,4.48811119\x203.55025221,3.56691953\x20C4.47144386,2.64572788\x207.13970955,4.30437952\x209.92599835,7.09066832\x20Z\x20M9.21889157,7.7977751\x20C6.92836458,5.50724811\x204.52075769,4.01062761\x204.25735899,4.27402631\x20C3.99396029,4.53742501\x205.49058078,6.9450319\x207.78110778,9.2355589\x20C10.0716348,11.5260859\x2012.4792417,13.0227064\x2012.7426404,12.7593077\x20C13.0060391,12.495909\x2011.5094186,10.0883021\x209.21889157,7.7977751\x20Z\x22\x20id=\x22Oval-96-Copy-2\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M9.92599835,9.94266568\x20C7.13970955,12.7289545\x204.47144386,14.3876061\x203.55025221,13.4664145\x20C2.62906055,12.5452228\x204.2877122,9.87695712\x207.074001,7.09066832\x20C9.86028979,4.30437952\x2012.5285555,2.64572788\x2013.4497471,3.56691953\x20C14.3709388,4.48811119\x2012.7122872,7.15637688\x209.92599835,9.94266568\x20Z\x20M9.21889157,9.2355589\x20C11.5094186,6.9450319\x2013.0060391,4.53742501\x2012.7426404,4.27402631\x20C12.4792417,4.01062761\x2010.0716348,5.50724811\x207.78110778,7.7977751\x20C5.49058078,10.0883021\x203.99396029,12.495909\x204.25735899,12.7593077\x20C4.52075769,13.0227064\x206.92836458,11.5260859\x209.21889157,9.2355589\x20Z\x22\x20id=\x22Oval-96-Copy-3\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M15.1464466,1.1464466\x20L14.3453364,1.94755684\x20L13.9608692,2.33202401\x20L14.667976,3.03913077\x20L15.0524431,2.65466362\x20L15.8535534,1.8535534\x20L15.1464466,1.1464466\x20Z\x20M2.29760014,13.995293\x20L1.85311902,14.4397742\x20L1.004311,15.2885822\x20L1.71141776,15.995689\x20L2.56022581,15.146881\x20L3.00470698,14.7023998\x20L2.29760014,13.995293\x20Z\x22\x20id=\x22Line\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20id=\x22Oval-432\x22\x20cx=\x2216\x22\x20cy=\x221\x22\x20r=\x221\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20id=\x22Oval-432-Copy\x22\x20cx=\x221\x22\x20cy=\x2216\x22\x20r=\x221\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</g>\x0a\x20\x20\x20\x20</g>\x0a</svg>\x0a',_0x5a7a58=_0x916de1,_0x18976f='\x0a<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22\x20standalone=\x22no\x22?>\x0a<svg\x20width=\x2253px\x22\x20height=\x2253px\x22\x20viewBox=\x220\x200\x2053\x2053\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22\x20xmlns:sketch=\x22http://www.bohemiancoding.com/sketch/ns\x22>\x0a\x20\x20\x20\x20<!--\x20Generator:\x20Sketch\x203.4.3\x20(16044)\x20-\x20http://www.bohemiancoding.com/sketch\x20-->\x0a\x20\x20\x20\x20<title>compass-rotation-marker</title>\x0a\x20\x20\x20\x20<desc>Created\x20with\x20Sketch.</desc>\x0a\x20\x20\x20\x20<defs></defs>\x0a\x20\x20\x20\x20<g\x20id=\x22Page-1\x22\x20stroke=\x22none\x22\x20stroke-width=\x221\x22\x20fill=\x22none\x22\x20fill-rule=\x22evenodd\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<g\x20id=\x22compass-rotation-marker\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M52.4399986,26.2199993\x20C52.4399986,11.7390936\x2040.7009051,0\x2026.2199993,0\x20C11.7390936,0\x200,11.7390936\x200,26.2199993\x20C0,40.7009051\x2011.7390936,52.4399986\x2026.2199993,52.4399986\x20C40.7009051,52.4399986\x2052.4399986,40.7009051\x2052.4399986,26.2199993\x20Z\x22\x20id=\x22rotator\x22\x20stroke-opacity=\x220.135841259\x22\x20stroke=\x22#E2A549\x22\x20stroke-width=\x229\x22\x20opacity=\x220.201434235\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M0,26.2199993\x20C0,11.7390936\x2011.7390936,0\x2026.2199993,0\x20L26.2199993,9\x20C16.7096563,9\x209,16.7096563\x209,26.2199993\x22\x20id=\x22Shape\x22\x20opacity=\x220.634561567\x22\x20fill=\x22#4990E2\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</g>\x0a\x20\x20\x20\x20</g>\x0a</svg>\x0a',_0x26b802=_0x18976f,_0x3d6c28='\x0a<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22\x20standalone=\x22no\x22?>\x0a<svg\x20width=\x2250px\x22\x20height=\x226px\x22\x20viewBox=\x220\x200\x2050\x206\x22\x20version=\x221.1\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22\x20xmlns:sketch=\x22http://www.bohemiancoding.com/sketch/ns\x22>\x0a\x20\x20\x20\x20<!--\x20Generator:\x20Sketch\x203.4.3\x20(16044)\x20-\x20http://www.bohemiancoding.com/sketch\x20-->\x0a\x20\x20\x20\x20<title>decrease</title>\x0a\x20\x20\x20\x20<path\x20d=\x22M46.6183575,0.657894737\x20L3.30112724,0.657894737\x20C1.44927539,0.657894737\x200,1.66880618\x200,2.96052632\x20C0,4.25224645\x201.44927539,5.26315789\x203.30112724,5.26315789\x20L46.6988728,5.26315789\x20C48.5507246,5.26315789\x2050,4.25224645\x2050,2.96052632\x20C49.9194847,1.66880618\x2048.4702093,0.657894737\x2046.6183575,0.657894737\x20L46.6183575,0.657894737\x20L46.6183575,0.657894737\x20Z\x22\x20id=\x22Shape\x22></path>\x0a</svg>\x0a',_0x4c7eff=_0x3d6c28,_0xc81859=_0x43bf95(0x10d),_0xf7fdab=_0xc81859,_0x2b9eeb=_0x43bf95(0x645),_0x2155fb=_0x2b9eeb,_0x2f1d44=_0x43bf95(0x53b),_0x579977=_0x2f1d44,_0x3ad321={'logo':_0x2efe43,'compass_outer':_0x3ddfa4,'compass_inner':_0x5a7a58,'compass_rotation_marker':_0x26b802,'decrease':_0x4c7eff,'increase':_0xf7fdab,'refresh':_0x2155fb,'splitter':_0x579977},_0x6e760=_0x3ad321,_0x12b20d=class{constructor(){const _0x3f3309=_0x43bf95;this['_delegate']=null,this[_0x3f3309(0x3f7)]=void 0x0;}[_0x43bf95(0x96f)](_0x440c52){const _0x19ba7a=_0x43bf95;this[_0x19ba7a(0xaa1)]&&this['_delegate']['update'](_0x440c52);}[_0x43bf95(0x3eb)](_0xd47591){const _0x1119bd=_0x43bf95;this['_viewer']=_0xd47591;let _0x1f3237=_0x5c9d04(_0x1119bd(0x911)),_0x3637e0=_0x5c9d04('logoImage'),_0x215b18=_0x5c9d04(_0x1119bd(0x6a8))||[];if(_0x1f3237&&!_0x3637e0)return!0x1;let _0x57d7da=_0x1f3237&&_0x3637e0?_0x3637e0:_0x6e760[_0x1119bd(0x3ed)],_0x186127=new _0x34d1e5['Cesium'][(_0x1119bd(0x542))](0x5,0x5,_0x215b18[0x0]||0x50,_0x215b18[0x1]||0x19),_0x4bc300=new _0x34d1e5[(_0x1119bd(0x7aa))][(_0x1119bd(0x4da))]({'fabric':{'type':'Logo-Image','uniforms':{'image':_0x57d7da},'components':{'diffuse':'texture(image,\x20materialInput.st).rgb','alpha':_0x1119bd(0x473)}},'translucent':function(_0x398942){return!0x1;}});this[_0x1119bd(0xaa1)]=new _0x34d1e5[(_0x1119bd(0x7aa))]['ViewportQuad'](_0x186127,_0x4bc300),this[_0x1119bd(0x3f7)]['scene'][_0x1119bd(0x2d5)]['add'](this),_0x1f3237||this[_0x1119bd(0x3f7)][_0x1119bd(0x148)]['postRender'][_0x1119bd(0x278)](()=>{const _0x264058=_0x1119bd;this['_viewer'][_0x264058(0x148)][_0x264058(0x2d5)][_0x264058(0x33e)](this)||this[_0x264058(0x3f7)][_0x264058(0x148)]['primitives']['add'](this);});}[_0x43bf95(0x4aa)](){return!0x1;}[_0x43bf95(0x57b)](){return this;}},_0x4bca10=_0x12b20d,_0x4a89c7={},_0x66aee8=_0x4a89c7,_0x5c3a5f=class{constructor(){const _0x15a0ad=_0x43bf95;this[_0x15a0ad(0x3f7)]=void 0x0,this[_0x15a0ad(0x8d3)]=!0x1,this[_0x15a0ad(0x95c)]=void 0x0,this[_0x15a0ad(0x938)]=!0x1;}set['enable'](_0x1dbd2f){const _0x2d5543=_0x43bf95;this['_enable']!==_0x1dbd2f&&(this[_0x2d5543(0x8d3)]=_0x1dbd2f,this['_state']=this['_enable']?_0x4075ae['ENABLED']:_0x4075ae[_0x2d5543(0x6b6)],this[_0x2d5543(0x9b7)]&&this[_0x2d5543(0x9b7)]());}get[_0x43bf95(0x35a)](){return this['_enable'];}get['state'](){const _0x36fe0e=_0x43bf95;return this[_0x36fe0e(0x558)];}[_0x43bf95(0x4c7)](){}[_0x43bf95(0x4ac)](){}[_0x43bf95(0x2a1)](){}[_0x43bf95(0x9b7)](){const _0x462040=_0x43bf95;!this[_0x462040(0x938)]&&this[_0x462040(0x4c7)](),this[_0x462040(0x8d3)]?(!this['_wrapper'][_0x462040(0x406)]&&this[_0x462040(0x3f7)][_0x462040(0x815)][_0x462040(0x87b)](this[_0x462040(0x95c)]),this[_0x462040(0x4ac)]()):(this[_0x462040(0x2a1)](),this[_0x462040(0x95c)][_0x462040(0x406)]&&this['_viewer'][_0x462040(0x815)]['removeChild'](this[_0x462040(0x95c)]));}[_0x43bf95(0x39d)](_0x2a8ade){}['_installHook'](){}[_0x43bf95(0x369)](){const _0x4c3919=_0x43bf95;return this[_0x4c3919(0x3f7)]?this[_0x4c3919(0x3f7)][_0x4c3919(0x665)]():{'x':0x0,'y':0x0};}[_0x43bf95(0x3eb)](_0x4668f8){const _0x1c4ab0=_0x43bf95;this[_0x1c4ab0(0x3f7)]=_0x4668f8,this['_installHook']&&this[_0x1c4ab0(0x6fc)](),this['_state']=_0x4075ae[_0x1c4ab0(0xef)];}[_0x43bf95(0x49a)](_0x5d0e65){return this;}[_0x43bf95(0x326)](_0x3bca38){const _0x4d7b00=_0x43bf95;if(_0x3bca38&&typeof _0x3bca38==_0x4d7b00(0x55c))this[_0x4d7b00(0x95c)][_0x4d7b00(0x4ff)]=_0x3bca38;else{if(_0x3bca38&&_0x3bca38 instanceof Element){for(;this[_0x4d7b00(0x95c)][_0x4d7b00(0x5de)]();)this[_0x4d7b00(0x95c)][_0x4d7b00(0x6c5)](this[_0x4d7b00(0x95c)][_0x4d7b00(0x6d7)]);this[_0x4d7b00(0x95c)][_0x4d7b00(0x87b)](_0x3bca38);}}return this;}[_0x43bf95(0x497)](){const _0x4f8e4b=_0x43bf95;this[_0x4f8e4b(0x95c)]&&(this[_0x4f8e4b(0x95c)][_0x4f8e4b(0x6a9)]['cssText']='\x0a\x20\x20\x20\x20visibility:hidden;\x0a\x20\x20\x20\x20');}static['registerType'](_0x417bf0){const _0x2dc9ae=_0x43bf95;_0x417bf0&&(_0x66aee8[_0x417bf0['toLocaleUpperCase']()]=_0x417bf0[_0x2dc9ae(0x671)]());}static[_0x43bf95(0xa57)](_0x48900e){return _0x66aee8[_0x48900e['toLocaleUpperCase']()]||void 0x0;}},_0x441b1e=_0x5c3a5f,_0x14337c=class extends _0x441b1e{constructor(){const _0x31575b=_0x43bf95;super(),this['_wrapper']=_0x5b03f8[_0x31575b(0x484)]('div','widget\x20context-menu'),this['_ulEl']=void 0x0,this[_0x31575b(0x1d4)]=void 0x0,this[_0x31575b(0x33c)]=void 0x0,this[_0x31575b(0x691)]=void 0x0,this[_0x31575b(0x8f3)]=void 0x0,this['_surfacePosition']=void 0x0,this[_0x31575b(0xe0)]=void 0x0,this[_0x31575b(0x710)]=void 0x0,this[_0x31575b(0x7e7)]=void 0x0,this[_0x31575b(0x7db)]={},this['_defaultMenu']=[{'label':_0x31575b(0x328),'callback':()=>{const _0x6f4916=_0x31575b;this['_viewer']['camera'][_0x6f4916(0x807)](1.5);},'context':this},{'label':'取消飞行','callback':()=>{const _0x36b300=_0x31575b;this[_0x36b300(0x3f7)]['camera'][_0x36b300(0x16a)]();},'context':this}],this[_0x31575b(0x447)]=[],this['_state']=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){const _0x49975c=_0x43bf95;return _0x441b1e[_0x49975c(0xa57)]('contextmenu');}set[_0x43bf95(0x26f)](_0x1a34be){const _0x2272d5=_0x43bf95;this[_0x2272d5(0x1c5)]=_0x1a34be;}set[_0x43bf95(0x3e4)](_0x43f7cd){const _0x3e058d=_0x43bf95;this['_config']=_0x43f7cd,_0x43f7cd['customClass']&&this[_0x3e058d(0x981)]();}[_0x43bf95(0x6fc)](){const _0x47eb32=_0x43bf95;let _0x4ee360=this;Object['defineProperty'](this['_viewer'],_0x47eb32(0x314),{'get'(){return _0x4ee360;}}),this['_handler']=new _0x34d1e5['Cesium']['ScreenSpaceEventHandler'](this[_0x47eb32(0x3f7)][_0x47eb32(0x790)]);}['_bindEvent'](){const _0x1751eb=_0x43bf95;this[_0x1751eb(0x1d4)][_0x1751eb(0x307)](_0x48e58c=>{const _0x54edbc=_0x1751eb;this[_0x54edbc(0x890)](_0x48e58c);},_0x34d1e5[_0x1751eb(0x7aa)][_0x1751eb(0x3be)][_0x1751eb(0x9b1)]),this[_0x1751eb(0x1d4)]['setInputAction'](_0xe57f7a=>{const _0x39f144=_0x1751eb;this[_0x39f144(0x533)](_0xe57f7a);},_0x34d1e5[_0x1751eb(0x7aa)]['ScreenSpaceEventType'][_0x1751eb(0x55d)]);}['_unbindEvent'](){const _0x202d57=_0x43bf95;this[_0x202d57(0x1d4)][_0x202d57(0x290)](_0x34d1e5[_0x202d57(0x7aa)][_0x202d57(0x3be)][_0x202d57(0x9b1)]),this['_handler'][_0x202d57(0x290)](_0x34d1e5[_0x202d57(0x7aa)][_0x202d57(0x3be)]['LEFT_CLICK']);}[_0x43bf95(0x4c7)](){const _0x245f95=_0x43bf95;this[_0x245f95(0x108)]=_0x5b03f8[_0x245f95(0x484)]('ul',_0x245f95(0x9c4),this[_0x245f95(0x95c)]),this[_0x245f95(0x938)]=!0x0;}[_0x43bf95(0x2a3)](){const _0x299cf2=_0x43bf95;for(;this['_ulEl']['hasChildNodes']();)this[_0x299cf2(0x108)]['removeChild'](this[_0x299cf2(0x108)][_0x299cf2(0x6d7)]);this[_0x299cf2(0x447)]&&this[_0x299cf2(0x447)][_0x299cf2(0x6a2)]&&this['_overlayMenu']['forEach'](_0xcf37f6=>{const _0x4a8ede=_0x299cf2;this['_addMenuItem'](_0xcf37f6[_0x4a8ede(0x5e7)],_0xcf37f6[_0x4a8ede(0x7cc)],_0xcf37f6[_0x4a8ede(0x970)]||this);}),this[_0x299cf2(0x1c5)]&&this['_defaultMenu'][_0x299cf2(0x6a2)]&&this[_0x299cf2(0x1c5)]['forEach'](_0x300486=>{const _0x4442cf=_0x299cf2;this[_0x4442cf(0x650)](_0x300486[_0x4442cf(0x5e7)],_0x300486[_0x4442cf(0x7cc)],_0x300486[_0x4442cf(0x970)]||this);});}[_0x43bf95(0x890)](_0x2e1639){const _0x5a00fc=_0x43bf95;var _0x4553ac;if(!this['_enable'])return;this['_overlay']=void 0x0;let _0x26bbd4=this[_0x5a00fc(0x3f7)][_0x5a00fc(0x148)];this[_0x5a00fc(0x710)]=_0x2e1639[_0x5a00fc(0x9a7)];let _0x1562a7=_0x26bbd4['pick'](_0x2e1639['position']);if(_0x26bbd4[_0x5a00fc(0x159)]&&(this[_0x5a00fc(0x691)]=_0x26bbd4[_0x5a00fc(0x2d7)](_0x2e1639['position'])),this[_0x5a00fc(0x691)]){let _0x7a7ef8=_0x34d1e5['Cesium'][_0x5a00fc(0x7a1)][_0x5a00fc(0x423)][_0x5a00fc(0x8e5)](this[_0x5a00fc(0x691)]);_0x7a7ef8&&(this[_0x5a00fc(0x8f3)]={'lng':_0x34d1e5[_0x5a00fc(0x7aa)][_0x5a00fc(0x72b)][_0x5a00fc(0x438)](_0x7a7ef8['longitude']),'lat':_0x34d1e5[_0x5a00fc(0x7aa)]['Math']['toDegrees'](_0x7a7ef8['latitude']),'alt':_0x7a7ef8[_0x5a00fc(0x795)]});}if(_0x26bbd4[_0x5a00fc(0x6f7)]===_0x34d1e5[_0x5a00fc(0x7aa)][_0x5a00fc(0xba)]['SCENE3D']){let _0x169036=_0x26bbd4[_0x5a00fc(0x698)][_0x5a00fc(0xa3)](_0x2e1639[_0x5a00fc(0x9a7)]);this[_0x5a00fc(0x149)]=_0x26bbd4[_0x5a00fc(0x7fd)][_0x5a00fc(0x112)](_0x169036,_0x26bbd4);}else this[_0x5a00fc(0x149)]=_0x26bbd4['camera']['pickEllipsoid'](_0x2e1639[_0x5a00fc(0x9a7)],_0x34d1e5[_0x5a00fc(0x7aa)][_0x5a00fc(0x7a1)][_0x5a00fc(0x423)]);if(this[_0x5a00fc(0x149)]){let _0xe537e6=_0x34d1e5[_0x5a00fc(0x7aa)][_0x5a00fc(0x7a1)][_0x5a00fc(0x423)]['cartesianToCartographic'](this['_surfacePosition']);_0xe537e6&&(this[_0x5a00fc(0xe0)]={'lng':_0x34d1e5[_0x5a00fc(0x7aa)][_0x5a00fc(0x72b)][_0x5a00fc(0x438)](_0xe537e6['longitude']),'lat':_0x34d1e5[_0x5a00fc(0x7aa)][_0x5a00fc(0x72b)][_0x5a00fc(0x438)](_0xe537e6[_0x5a00fc(0xa6e)]),'alt':_0xe537e6['height']});}if(this[_0x5a00fc(0x7e7)]=_0x1562a7==null?void 0x0:_0x1562a7[_0x5a00fc(0x630)],(_0x1562a7==null?void 0x0:_0x1562a7['id'])instanceof _0x34d1e5[_0x5a00fc(0x7aa)][_0x5a00fc(0x926)]){let _0x34c057=this['_viewer'][_0x5a00fc(0x89c)]()[_0x5a00fc(0x738)](_0xf73899=>_0xf73899[_0x5a00fc(0x4c3)]===_0x1562a7['id'][_0x5a00fc(0x4c3)])[0x0];_0x34c057&&_0x34c057[_0x5a00fc(0x632)]&&(this[_0x5a00fc(0x33c)]=_0x34c057[_0x5a00fc(0x632)](_0x1562a7['id'][_0x5a00fc(0x4a6)]));}else{if(_0x1562a7 instanceof _0x34d1e5[_0x5a00fc(0x7aa)][_0x5a00fc(0x7ba)]){let _0x14acad=this[_0x5a00fc(0x3f7)]['getLayers']()[_0x5a00fc(0x738)](_0xf10285=>_0xf10285['layerId']===_0x1562a7[_0x5a00fc(0x6af)][_0x5a00fc(0x4c3)])[0x0];_0x14acad&&_0x14acad[_0x5a00fc(0x632)]&&(this[_0x5a00fc(0x33c)]=_0x14acad['getOverlay'](_0x1562a7['tileset']['overlayId']));}else{if((_0x1562a7==null?void 0x0:_0x1562a7['primitive'])instanceof _0x34d1e5[_0x5a00fc(0x7aa)][_0x5a00fc(0xa0d)]){let _0xe175ce=this['_viewer']['getLayers']()['filter'](_0x33346e=>_0x33346e[_0x5a00fc(0x4c3)]===_0x1562a7[_0x5a00fc(0x64d)][_0x5a00fc(0x4c3)])[0x0];_0xe175ce&&_0xe175ce[_0x5a00fc(0x632)]&&(this['_overlay']=_0xe175ce[_0x5a00fc(0x632)](_0x1562a7[_0x5a00fc(0x64d)][_0x5a00fc(0x4a6)]));}else{if(_0x1562a7!=null&&_0x1562a7[_0x5a00fc(0x64d)]){let _0x3b95af=this[_0x5a00fc(0x3f7)][_0x5a00fc(0x89c)]()[_0x5a00fc(0x738)](_0x16269c=>_0x16269c[_0x5a00fc(0x4c3)]===_0x1562a7['primitive'][_0x5a00fc(0x4c3)])[0x0];_0x3b95af&&_0x3b95af['getOverlay']&&(this['_overlay']=_0x3b95af[_0x5a00fc(0x632)](_0x1562a7['primitive'][_0x5a00fc(0x4a6)]));}}}}this['_overlayMenu']=((_0x4553ac=this[_0x5a00fc(0x33c)])==null?void 0x0:_0x4553ac[_0x5a00fc(0x314)])||[],this[_0x5a00fc(0x2a3)](),this[_0x5a00fc(0x39d)](_0x2e1639[_0x5a00fc(0x9a7)]);}['_onClick'](_0x37c476){const _0x4152b6=_0x43bf95;this[_0x4152b6(0x497)]();}[_0x43bf95(0x39d)](_0x5e051a){const _0x37ebda=_0x43bf95;let _0xae2381=this[_0x37ebda(0x108)][_0x37ebda(0x5de)]()?_0x37ebda(0x2a2):_0x37ebda(0x5ad),{x:_0x18cc25,y:_0x318c4e}=_0x5e051a,_0x2e6fb7=this[_0x37ebda(0x369)]();_0x18cc25+=_0x2e6fb7['x'],_0x318c4e+=_0x2e6fb7['y'],this[_0x37ebda(0x95c)][_0x37ebda(0x6a9)]['cssText']=_0x37ebda(0xa16)+_0xae2381+';\x0a\x20\x20\x20\x20z-index:1;\x0a\x20\x20\x20\x20transform:translate3d('+Math[_0x37ebda(0x440)](_0x18cc25)+_0x37ebda(0x976)+Math[_0x37ebda(0x440)](_0x318c4e)+_0x37ebda(0x8a4);}[_0x43bf95(0x981)](){const _0x50c0da=_0x43bf95;_0x5b03f8[_0x50c0da(0x9c1)](this[_0x50c0da(0x95c)],_0x50c0da(0x23d)+this[_0x50c0da(0x7db)][_0x50c0da(0x9a3)]);}[_0x43bf95(0x650)](_0x44d738,_0xfcf3c3,_0x505b2d){const _0x36fd5d=_0x43bf95;if(!_0x44d738||!_0xfcf3c3)return this;let _0x464b30=_0x5b03f8[_0x36fd5d(0x484)]('li','menu-item',null),_0x49279e=_0x5b03f8[_0x36fd5d(0x484)]('a','',_0x464b30);_0x49279e[_0x36fd5d(0x4ff)]=_0x44d738,_0x49279e['href']=_0x36fd5d(0x4c8);let _0x2b80a8=this;return _0xfcf3c3&&(_0x49279e[_0x36fd5d(0x195)]=()=>{const _0x3dc2cc=_0x36fd5d;_0xfcf3c3['call'](_0x505b2d,{'windowPosition':_0x2b80a8[_0x3dc2cc(0x710)],'position':_0x2b80a8['_position'],'wgs84Position':_0x2b80a8[_0x3dc2cc(0x8f3)],'surfacePosition':_0x2b80a8['_surfacePosition'],'wgs84SurfacePosition':_0x2b80a8['_wgs84SurfacePosition'],'overlay':_0x2b80a8[_0x3dc2cc(0x33c)],'instanceId':_0x2b80a8[_0x3dc2cc(0x7e7)]}),_0x2b80a8[_0x3dc2cc(0x497)]();}),this['_ulEl'][_0x36fd5d(0x87b)](_0x464b30),this;}};_0x441b1e[_0x43bf95(0x545)](_0x43bf95(0x167));var _0x3a3db0=_0x14337c,_0x22febe=class extends _0x441b1e{constructor(){const _0x4dce9c=_0x43bf95;super(),this[_0x4dce9c(0x95c)]=_0x5b03f8[_0x4dce9c(0x484)](_0x4dce9c(0x7e1),_0x4dce9c(0xa01)),this['_mouseEl']=void 0x0,this[_0x4dce9c(0x4a8)]=void 0x0,this[_0x4dce9c(0x29f)]=void 0x0,this[_0x4dce9c(0x8bc)]=void 0x0,this[_0x4dce9c(0x68c)]=_0x34d1e5['Cesium']['getTimestamp'](),this[_0x4dce9c(0x58d)]=_0x34d1e5[_0x4dce9c(0x7aa)][_0x4dce9c(0x1d8)](),this[_0x4dce9c(0x561)]=_0x34d1e5[_0x4dce9c(0x7aa)][_0x4dce9c(0x1d8)](),this['_lastMsSampleTime']=_0x34d1e5[_0x4dce9c(0x7aa)][_0x4dce9c(0x1d8)](),this[_0x4dce9c(0x504)]=0x0,this['_msFrameCount']=0x0,this['_state']=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){const _0x6061c3=_0x43bf95;return _0x441b1e['getWidgetType'](_0x6061c3(0x53c));}[_0x43bf95(0x6fc)](){const _0x128de1=_0x43bf95;let _0x1176ba=this;Object['defineProperty'](this[_0x128de1(0x3f7)],_0x128de1(0xa86),{'get'(){return _0x1176ba;}});}[_0x43bf95(0x4ac)](){const _0x1070b3=_0x43bf95;this[_0x1070b3(0x3f7)]['on'](_0x5b424c['MOUSE_MOVE'],this[_0x1070b3(0x55b)],this),this[_0x1070b3(0x3f7)]['on'](_0x3f9fee[_0x1070b3(0x5a5)],this[_0x1070b3(0x78a)],this),this[_0x1070b3(0x3f7)]['on'](_0x3f9fee['POST_UPDATE'],this[_0x1070b3(0x61c)],this);}[_0x43bf95(0x2a1)](){const _0x2f722=_0x43bf95;this[_0x2f722(0x3f7)][_0x2f722(0x24d)](_0x5b424c[_0x2f722(0xa09)],this[_0x2f722(0x55b)],this),this['_viewer'][_0x2f722(0x24d)](_0x3f9fee['CAMERA_CHANGED'],this[_0x2f722(0x78a)],this),this['_viewer'][_0x2f722(0x24d)](_0x3f9fee[_0x2f722(0x635)],this['_onPostUpdate'],this);}['_mountContent'](){const _0x316603=_0x43bf95;this['_mouseEl']=_0x5b03f8[_0x316603(0x484)](_0x316603(0x7e1),_0x316603(0x67b),this[_0x316603(0x95c)]),this['_cameraEl']=_0x5b03f8[_0x316603(0x484)](_0x316603(0x7e1),_0x316603(0x69c),this[_0x316603(0x95c)]),this['_msEl']=_0x5b03f8[_0x316603(0x484)]('div',_0x316603(0xb0),this[_0x316603(0x95c)]),this['_fpsEl']=_0x5b03f8[_0x316603(0x484)]('div','fps-bar',this[_0x316603(0x95c)]),this[_0x316603(0x938)]=!0x0;}[_0x43bf95(0x55b)](_0x428a4a){const _0x3bd7fd=_0x43bf95;let _0x29371f=_0x34d1e5[_0x3bd7fd(0x7aa)][_0x3bd7fd(0x1d8)]();if(_0x29371f<this[_0x3bd7fd(0x68c)]+0x12c)return;let _0x21d937=_0x428a4a[_0x3bd7fd(0x655)];this[_0x3bd7fd(0x6c0)][_0x3bd7fd(0x4ff)]=_0x3bd7fd(0x3ae)+((_0x21d937==null?void 0x0:_0x21d937[_0x3bd7fd(0x598)][_0x3bd7fd(0x964)](0x8))||Number[_0x3bd7fd(0x79e)])+_0x3bd7fd(0x420)+((_0x21d937==null?void 0x0:_0x21d937[_0x3bd7fd(0x941)][_0x3bd7fd(0x964)](0x8))||Number['NaN'])+'</span>\x0a\x20\x20\x20\x20\x20\x20<span>海拔:'+((_0x21d937==null?void 0x0:_0x21d937[_0x3bd7fd(0xa84)][_0x3bd7fd(0x964)](0x2))||Number['NaN'])+'\x20米</span>',this[_0x3bd7fd(0x68c)]=_0x29371f;}[_0x43bf95(0x78a)](){const _0x2539d9=_0x43bf95;let _0x476699=_0x34d1e5[_0x2539d9(0x7aa)][_0x2539d9(0x1d8)]();if(_0x476699<this[_0x2539d9(0x58d)]+0x12c)return;let _0x297a2f=this[_0x2539d9(0x3f7)]['cameraPosition'];this['_cameraEl'][_0x2539d9(0x4ff)]=_0x2539d9(0x838)+(+_0x297a2f['pitch'])[_0x2539d9(0x964)](0x2)+'</span>\x0a\x20\x20\x20\x20\x20\x20<span>视高:'+(+_0x297a2f['alt'])['toFixed'](0x2)+_0x2539d9(0x4fd),this[_0x2539d9(0x58d)]=_0x476699;}[_0x43bf95(0x61c)](){const _0x624f5c=_0x43bf95;let _0x3aea3f=_0x34d1e5[_0x624f5c(0x7aa)][_0x624f5c(0x1d8)]();this[_0x624f5c(0xad)]++;let _0x23849d=_0x3aea3f-this['_lastMsSampleTime'];if(_0x23849d>0xc8){let _0x54b7c4=(_0x23849d/this['_msFrameCount'])[_0x624f5c(0x964)](0x2);this[_0x624f5c(0x8bc)][_0x624f5c(0x4ff)]=_0x624f5c(0x1be)+_0x54b7c4+_0x624f5c(0x11c),this['_lastMsSampleTime']=_0x3aea3f,this[_0x624f5c(0xad)]=0x0;}this['_fpsFrameCount']++;let _0x218ab9=_0x3aea3f-this[_0x624f5c(0x561)];if(_0x218ab9>0x3e8){let _0x3a1b61=this['_fpsFrameCount']*0x3e8/_0x218ab9|0x0;this[_0x624f5c(0x29f)][_0x624f5c(0x4ff)]=_0x624f5c(0x1be)+_0x3a1b61+_0x624f5c(0x87c),this[_0x624f5c(0x561)]=_0x3aea3f,this['_fpsFrameCount']=0x0;}}};_0x441b1e[_0x43bf95(0x545)](_0x43bf95(0x53c));var _0x5e61fb=_0x22febe,_0x16e2c2=class extends _0x441b1e{constructor(){const _0x594c22=_0x43bf95;super(),this[_0x594c22(0x95c)]=_0x5b03f8['create'](_0x594c22(0x7e1),_0x594c22(0x711)),this['_baseLayer']=void 0x0,this[_0x594c22(0x3f6)]=!0x1,this['_state']=_0x4075ae[_0x594c22(0x5d2)];}get[_0x43bf95(0x9cf)](){return _0x441b1e['getWidgetType']('map_split');}['_installHook'](){const _0x2717ed=_0x43bf95;let _0x1791db=this;Object[_0x2717ed(0x50a)](this[_0x2717ed(0x3f7)],_0x2717ed(0x34e),{'get'(){return _0x1791db;}});}[_0x43bf95(0x4ac)](){const _0x516b6b=_0x43bf95;this[_0x516b6b(0x3f7)][_0x516b6b(0x148)]['splitPosition']=0.5,this[_0x516b6b(0x95c)][_0x516b6b(0x6a9)][_0x516b6b(0x910)]=_0x516b6b(0x683);}[_0x43bf95(0x2a1)](){const _0x1771b4=_0x43bf95;this[_0x1771b4(0x417)]?this[_0x1771b4(0x3f7)][_0x1771b4(0x148)]['splitPosition']=this['_baseLayer'][_0x1771b4(0x322)]>0x0?0x1:0x0:this[_0x1771b4(0x3f7)][_0x1771b4(0x148)][_0x1771b4(0x87d)]=0x0;}['_mountContent'](){const _0x35827b=_0x43bf95;let _0x2a1d62=_0x5b03f8[_0x35827b(0x629)](_0x6e760[_0x35827b(0x3ea)],!0x0,_0x35827b(0x3ea));this[_0x35827b(0x95c)][_0x35827b(0x87b)](_0x2a1d62);let _0x572c85=new _0x34d1e5[(_0x35827b(0x7aa))][(_0x35827b(0xa8e))](_0x2a1d62),_0x2cab7c=this;_0x572c85[_0x35827b(0x307)](()=>{const _0x4cba0a=_0x35827b;_0x2cab7c[_0x4cba0a(0x3f6)]=!0x0;},_0x34d1e5[_0x35827b(0x7aa)][_0x35827b(0x3be)][_0x35827b(0x1b9)]),_0x572c85[_0x35827b(0x307)](()=>{const _0x48a475=_0x35827b;_0x2cab7c[_0x48a475(0x3f6)]=!0x0;},_0x34d1e5['Cesium'][_0x35827b(0x3be)][_0x35827b(0x271)]),_0x572c85[_0x35827b(0x307)](_0x29f47e=>{const _0x476549=_0x35827b;_0x2cab7c[_0x476549(0x690)](_0x29f47e);},_0x34d1e5['Cesium'][_0x35827b(0x3be)]['MOUSE_MOVE']),_0x572c85['setInputAction'](_0x46397c=>{const _0x2b664f=_0x35827b;_0x2cab7c[_0x2b664f(0x690)](_0x46397c);},_0x34d1e5[_0x35827b(0x7aa)]['ScreenSpaceEventType'][_0x35827b(0x424)]),_0x572c85[_0x35827b(0x307)](()=>{const _0x57da4d=_0x35827b;_0x2cab7c[_0x57da4d(0x3f6)]=!0x1;},_0x34d1e5['Cesium'][_0x35827b(0x3be)][_0x35827b(0x4e1)]),_0x572c85[_0x35827b(0x307)](()=>{const _0x2fb20f=_0x35827b;_0x2cab7c[_0x2fb20f(0x3f6)]=!0x1;},_0x34d1e5[_0x35827b(0x7aa)][_0x35827b(0x3be)][_0x35827b(0x851)]),this['_ready']=!0x0;}[_0x43bf95(0x690)](_0x9b5e07){const _0x530a7e=_0x43bf95;if(!this[_0x530a7e(0x3f6)]||!this[_0x530a7e(0x8d3)])return;let _0x25f0cc=_0x9b5e07[_0x530a7e(0x837)]['x'],_0x3ac963=(this[_0x530a7e(0x95c)]['offsetLeft']+_0x25f0cc)/this[_0x530a7e(0x95c)]['parentElement']['offsetWidth'];this[_0x530a7e(0x95c)][_0x530a7e(0x6a9)][_0x530a7e(0x910)]=0x64*_0x3ac963+'%',this[_0x530a7e(0x3f7)]['scene'][_0x530a7e(0x87d)]=_0x3ac963;}[_0x43bf95(0x5d0)](_0x47c57a,_0x5d83e0=0x1){const _0x3c6939=_0x43bf95;return!this[_0x3c6939(0x3f7)]||!this[_0x3c6939(0x8d3)]?this:(_0x47c57a&&(this[_0x3c6939(0x417)]&&this[_0x3c6939(0x3f7)][_0x3c6939(0x22d)][_0x3c6939(0x109)](this['_baseLayer']),this[_0x3c6939(0x417)]=this['_viewer'][_0x3c6939(0x22d)]['addImageryProvider'](_0x47c57a),this[_0x3c6939(0x417)]['splitDirection']=_0x5d83e0||0x0,this[_0x3c6939(0x3f7)][_0x3c6939(0x148)]['splitPosition']=this[_0x3c6939(0x95c)][_0x3c6939(0x6f4)]/this['_wrapper'][_0x3c6939(0x38c)][_0x3c6939(0x7d8)]),this);}};_0x441b1e['registerType']('map_split');var _0x3ab00c=_0x16e2c2,_0x2a3777=class extends _0x441b1e{constructor(){const _0x1f8362=_0x43bf95;super(),this['_wrapper']=_0x5b03f8[_0x1f8362(0x484)](_0x1f8362(0x7e1),_0x1f8362(0x8dd)),this[_0x1f8362(0x7db)]=void 0x0,this[_0x1f8362(0x365)]=[],this['_state']=_0x4075ae[_0x1f8362(0x5d2)];}get[_0x43bf95(0x9cf)](){return _0x441b1e['getWidgetType']('map_switch');}['_enableHook'](){const _0x53e855=_0x43bf95;!this[_0x53e855(0x95c)]['parentNode']&&this[_0x53e855(0x3f7)]&&this['_viewer'][_0x53e855(0x815)][_0x53e855(0x87b)](this[_0x53e855(0x95c)]);}[_0x43bf95(0x6fc)](){const _0x17aec0=_0x43bf95;let _0x18ff9b=this;Object['defineProperty'](this[_0x17aec0(0x3f7)],'mapSwitch',{'get'(){return _0x18ff9b;}}),this[_0x17aec0(0x35a)]=!0x0,this[_0x17aec0(0x95c)][_0x17aec0(0x596)]=()=>{const _0x33b78b=_0x17aec0;let _0x1631b0=0x50,_0x35f8d4=0x5;_0x18ff9b['_cache'][_0x33b78b(0x6a2)]>0x0&&(_0x1631b0=_0x18ff9b[_0x33b78b(0x365)][_0x33b78b(0x6a2)]*(_0x1631b0+_0x35f8d4)-_0x35f8d4),this[_0x33b78b(0x95c)][_0x33b78b(0x6a9)][_0x33b78b(0x371)]=_0x1631b0+'px';},this['_wrapper']['onmouseout']=()=>{const _0x3af607=_0x17aec0;_0x18ff9b[_0x3af607(0x95c)][_0x3af607(0x6a9)]['width']='80px';};}['_addItem'](_0x3c6b38){const _0x339fc2=_0x43bf95;let _0x3ff741=_0x5b03f8[_0x339fc2(0x484)]('div','map-item',this[_0x339fc2(0x95c)]),_0x21e196=this[_0x339fc2(0x365)][_0x339fc2(0x6a2)]?this['_cache'][_0x339fc2(0x6a2)]-0x1:0x0;_0x21e196===0x0&&_0x5b03f8[_0x339fc2(0x139)](_0x3ff741,_0x339fc2(0x7ca)),_0x3ff741[_0x339fc2(0x4fe)]('data-index',String(_0x21e196)),_0x3ff741[_0x339fc2(0x195)]=_0x5bbeb4=>{const _0x117344=_0x339fc2;let _0x1a5a1c=document[_0x117344(0xca)](_0x117344(0x29c));_0x1a5a1c&&_0x1a5a1c['length']&&(_0x1a5a1c[0x0][_0x117344(0x256)]='map-item'),this[_0x117344(0x3f7)]&&(_0x5bbeb4[_0x117344(0x418)][_0x117344(0x256)]='map-item\x20active',this[_0x117344(0x3f7)][_0x117344(0x9fd)](+_0x5bbeb4[_0x117344(0x418)][_0x117344(0x819)]('data-index')||0x0));},_0x3c6b38['iconUrl']&&(_0x3ff741[_0x339fc2(0x6a9)]['cssText']=_0x339fc2(0x4be)+_0x3c6b38['iconUrl']+_0x339fc2(0x687));let _0x122906=_0x5b03f8['create']('span','',_0x3ff741);_0x122906['innerHTML']=_0x3c6b38['name']||'地图';}[_0x43bf95(0x42e)](_0x24023e={}){const _0x14f4c7=_0x43bf95;this[_0x14f4c7(0x8d3)]&&(this[_0x14f4c7(0x365)][_0x14f4c7(0xb3)](_0x24023e),this[_0x14f4c7(0x6c3)](_0x24023e),this['_cache'][_0x14f4c7(0x6a2)]>0x1&&(this[_0x14f4c7(0x95c)][_0x14f4c7(0x6a9)][_0x14f4c7(0x5cf)]=_0x14f4c7(0x2a2)));}};_0x441b1e[_0x43bf95(0x545)]('map_switch');var _0x487349=_0x2a3777,_0xcccfb1=class extends _0x441b1e{constructor(){const _0x478758=_0x43bf95;super(),this['_wrapper']=_0x5b03f8[_0x478758(0x484)](_0x478758(0x7e1),_0x478758(0x11f)),this[_0x478758(0x7db)]={'customClass':''},this[_0x478758(0x691)]=void 0x0,this[_0x478758(0x558)]=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){const _0x93045a=_0x43bf95;return _0x441b1e[_0x93045a(0xa57)]('popup');}set[_0x43bf95(0x3e4)](_0x51c9fa){const _0x1a5673=_0x43bf95;this[_0x1a5673(0x7db)]=_0x51c9fa,_0x51c9fa[_0x1a5673(0x9a3)]&&this[_0x1a5673(0x981)]();}[_0x43bf95(0x4ac)](){const _0xb2c8e9=_0x43bf95;if(this['_viewer']&&this[_0xb2c8e9(0x95c)]){let _0x3e253a=this,_0x1bca65=this[_0xb2c8e9(0x3f7)][_0xb2c8e9(0x148)];_0x1bca65[_0xb2c8e9(0x2d3)][_0xb2c8e9(0x278)](()=>{const _0x4e77b1=_0xb2c8e9;if(_0x3e253a['_position']&&_0x3e253a[_0x4e77b1(0x8d3)]&&_0x3e253a[_0x4e77b1(0x39d)]&&_0x3e253a[_0x4e77b1(0x95c)]['style']['visibility']==='visible'){let _0x531ca3=_0x34d1e5[_0x4e77b1(0x7aa)]['SceneTransforms'][_0x4e77b1(0x54e)](_0x1bca65,_0x3e253a[_0x4e77b1(0x691)]);_0x531ca3&&_0x3e253a['_updateWindowCoord'](_0x531ca3);}});}}[_0x43bf95(0x4c7)](){const _0x5a0040=_0x43bf95;this[_0x5a0040(0x95c)]['style'][_0x5a0040(0x5cf)]=_0x5a0040(0x5ad);}[_0x43bf95(0x6fc)](){const _0x2417ab=_0x43bf95;this['enable']=!0x0,this[_0x2417ab(0x4ac)]();let _0x57cf29=this;Object['defineProperty'](this['_viewer'],_0x2417ab(0x516),{'get'(){return _0x57cf29;}});}[_0x43bf95(0x39d)](_0x460fa3){const _0x2adf33=_0x43bf95;let _0x37c880=_0x460fa3['x']-this[_0x2adf33(0x95c)][_0x2adf33(0x7d8)]/0x2,_0x450a38=_0x460fa3['y']-this[_0x2adf33(0x95c)][_0x2adf33(0x7da)];this[_0x2adf33(0x7db)][_0x2adf33(0x9a7)]===_0x2adf33(0x6db)?(_0x37c880=_0x460fa3['x']-this[_0x2adf33(0x95c)]['offsetWidth'],_0x450a38=_0x460fa3['y']-this['_wrapper']['offsetHeight']):this['_config'][_0x2adf33(0x9a7)]===_0x2adf33(0xa76)?(_0x37c880=_0x460fa3['x'],_0x450a38=_0x460fa3['y']-this[_0x2adf33(0x95c)][_0x2adf33(0x7da)]):this[_0x2adf33(0x7db)]['position']===_0x2adf33(0x22c)?(_0x37c880=_0x460fa3['x']-this[_0x2adf33(0x95c)][_0x2adf33(0x7d8)],_0x450a38=_0x460fa3['y']):this[_0x2adf33(0x7db)][_0x2adf33(0x9a7)]==='bottomright'&&(_0x37c880=_0x460fa3['x'],_0x450a38=_0x460fa3['y']);let _0x318331=this['_getViewerOffset']();_0x37c880+=_0x318331['x'],_0x450a38+=_0x318331['y'],this[_0x2adf33(0x95c)]['style'][_0x2adf33(0x4ec)]='\x0a\x20\x20\x20\x20visibility:visible;\x0a\x20\x20\x20\x20z-index:1;\x0a\x20\x20\x20\x20transform:translate3d('+Math[_0x2adf33(0x440)](_0x37c880)+_0x2adf33(0x976)+Math[_0x2adf33(0x440)](_0x450a38)+_0x2adf33(0x8a4);}[_0x43bf95(0x981)](){const _0xca4965=_0x43bf95;_0x5b03f8['setClass'](this[_0xca4965(0x95c)],_0xca4965(0xa10)+this['_config'][_0xca4965(0x9a3)]);}[_0x43bf95(0x49a)](_0x2f7996){const _0x4c890d=_0x43bf95;return _0x2f7996&&_0x2f7996 instanceof Element&&(this['_wrapper']=_0x2f7996,_0x5b03f8[_0x4c890d(0x139)](this[_0x4c890d(0x95c)],_0x4c890d(0x11f))),this;}['setPosition'](_0xfdf1ae){const _0x41dc17=_0x43bf95;return this[_0x41dc17(0x691)]=_0xfdf1ae,this[_0x41dc17(0x95c)]&&(this['_wrapper'][_0x41dc17(0x6a9)][_0x41dc17(0x4ec)]='\x0a\x20\x20\x20\x20visibility:visible;\x0a\x20\x20\x20\x20'),this;}[_0x43bf95(0x613)](_0x51f928,_0x32f465){const _0x246799=_0x43bf95;return this[_0x246799(0xa25)](_0x51f928)[_0x246799(0x326)](_0x32f465),this;}};_0x441b1e[_0x43bf95(0x545)](_0x43bf95(0x516));var _0x91ca04=_0xcccfb1,_0x31713c=class extends _0x441b1e{constructor(){const _0x4a558c=_0x43bf95;super(),this['_wrapper']=_0x5b03f8[_0x4a558c(0x484)](_0x4a558c(0x7e1),_0x4a558c(0x7b8)),this[_0x4a558c(0x938)]=!0x0,this[_0x4a558c(0x558)]=_0x4075ae[_0x4a558c(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x1e2fee=_0x43bf95;return _0x441b1e[_0x1e2fee(0xa57)](_0x1e2fee(0x1dd));}[_0x43bf95(0x6fc)](){const _0x3157a6=_0x43bf95;let _0x42666c=this;Object[_0x3157a6(0x50a)](this['_viewer'],_0x3157a6(0x1dd),{'get'(){return _0x42666c;}});}[_0x43bf95(0x39d)](_0x241780){const _0x5c5c25=_0x43bf95;let _0x30bff4=_0x241780['x']+0xa,_0x446079=_0x241780['y']-this[_0x5c5c25(0x95c)]['offsetHeight']/0x2,_0x4d029f=this['_getViewerOffset']();_0x30bff4+=_0x4d029f['x'],_0x446079+=_0x4d029f['y'],this[_0x5c5c25(0x95c)]['style'][_0x5c5c25(0x4ec)]=_0x5c5c25(0x87e)+Math[_0x5c5c25(0x440)](_0x30bff4)+_0x5c5c25(0x976)+Math['round'](_0x446079)+_0x5c5c25(0x8a4);}[_0x43bf95(0x613)](_0x2a6201,_0x35b62b){const _0x2663bf=_0x43bf95;return this[_0x2663bf(0x8d3)]?(_0x2a6201&&this[_0x2663bf(0x39d)](_0x2a6201),this[_0x2663bf(0x326)](_0x35b62b),this):this;}};_0x441b1e[_0x43bf95(0x545)](_0x43bf95(0x1dd));var _0xe5cae8=_0x31713c,_0x2c9a3d=class extends _0x441b1e{constructor(){const _0x3f2600=_0x43bf95;super(),this['_wrapper']=_0x5b03f8[_0x3f2600(0x484)](_0x3f2600(0x7e1),'widget\x20hawkeye-map',null),this['_wrapper'][_0x3f2600(0x4fe)]('id',_0x3f7522[_0x3f2600(0x3ef)]()),this[_0x3f2600(0x114)]=void 0x0,this['_state']=_0x4075ae[_0x3f2600(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x592d70=_0x43bf95;return _0x441b1e['getWidgetType'](_0x592d70(0x1d6));}[_0x43bf95(0x4c7)](){const _0x53546f=_0x43bf95;let _0x5ef1c9=new _0x34d1e5['Cesium'][(_0x53546f(0x2c6))](this['_wrapper'],{'sceneMode':_0x34d1e5['Cesium'][_0x53546f(0xba)][_0x53546f(0x794)],'creditContainer':document[_0x53546f(0x7dc)](_0x53546f(0x7e1)),'creditViewport':document['createElement'](_0x53546f(0x7e1)),'baseLayer':!0x1});_0x5ef1c9['imageryLayers'][_0x53546f(0x207)](),_0x5ef1c9[_0x53546f(0x790)][_0x53546f(0x406)][_0x53546f(0x256)]=_0x53546f(0xa70),_0x3f7522[_0x53546f(0x5da)](_0x5ef1c9[_0x53546f(0x148)][_0x53546f(0x9fb)],{'enableRotate':!0x1,'enableTranslate':!0x1,'enableZoom':!0x1,'enableTilt':!0x1,'enableLook':!0x1,'maximumZoomDistance':0x269d036}),this[_0x53546f(0x114)]=_0x5ef1c9,this[_0x53546f(0x938)]=!0x0;}[_0x43bf95(0x4ac)](){const _0x17d8a2=_0x43bf95;this['_viewer']['on'](_0x3f9fee[_0x17d8a2(0x5a5)],this[_0x17d8a2(0x939)],this);}[_0x43bf95(0x2a1)](){const _0x555175=_0x43bf95;this[_0x555175(0x3f7)]['off'](_0x3f9fee[_0x555175(0x5a5)],this[_0x555175(0x939)],this);}[_0x43bf95(0x6fc)](){const _0x3be97d=_0x43bf95;let _0xc540ea=this;Object[_0x3be97d(0x50a)](this[_0x3be97d(0x3f7)],_0x3be97d(0xa49),{'get'(){return _0xc540ea;}}),this[_0x3be97d(0x3f7)][_0x3be97d(0x698)][_0x3be97d(0x37a)]=0.01;}[_0x43bf95(0x939)](){const _0x267cde=_0x43bf95;let _0x4b76a6=new _0x34d1e5[(_0x267cde(0x7aa))][(_0x267cde(0x48e))](Math['floor'](this[_0x267cde(0x3f7)][_0x267cde(0x790)]['clientWidth']/0x2),Math[_0x267cde(0x46e)](this[_0x267cde(0x3f7)][_0x267cde(0x790)][_0x267cde(0x41d)]/0x2)),_0x3afac6=this[_0x267cde(0x3f7)]['scene'][_0x267cde(0x698)][_0x267cde(0xa9d)](_0x4b76a6);if(!_0x3afac6)return!0x1;let _0x3d5c76=_0x34d1e5[_0x267cde(0x7aa)][_0x267cde(0x982)][_0x267cde(0x7f4)](_0x3afac6,this[_0x267cde(0x3f7)][_0x267cde(0x148)][_0x267cde(0x698)][_0x267cde(0xa2)]);this[_0x267cde(0x114)][_0x267cde(0x148)][_0x267cde(0x698)]['lookAt'](_0x3afac6,new _0x34d1e5[(_0x267cde(0x7aa))][(_0x267cde(0x982))](0x0,0x0,_0x3d5c76));}[_0x43bf95(0x5d0)](_0x1deb90){const _0x1ae9d5=_0x43bf95;return!this[_0x1ae9d5(0x114)]||!this[_0x1ae9d5(0x8d3)]?this:(_0x1deb90&&(this[_0x1ae9d5(0x114)][_0x1ae9d5(0x22d)][_0x1ae9d5(0x207)](),Array[_0x1ae9d5(0x636)](_0x1deb90)||(_0x1deb90=[_0x1deb90]),_0x1deb90[_0x1ae9d5(0x2de)](_0x2a3658=>{const _0x4f3520=_0x1ae9d5;this[_0x4f3520(0x114)][_0x4f3520(0x22d)][_0x4f3520(0x45f)](_0x34d1e5[_0x4f3520(0x7aa)][_0x4f3520(0x4c9)][_0x4f3520(0x6da)](_0x2a3658,{}));})),this);}};_0x441b1e[_0x43bf95(0x545)](_0x43bf95(0x1d6));var _0x2c4d03=_0x2c9a3d,_0xf0271e=class extends _0x441b1e{constructor(){const _0x944d16=_0x43bf95;super(),this[_0x944d16(0x95c)]=_0x5b03f8[_0x944d16(0x484)](_0x944d16(0x7e1),_0x944d16(0x8c7)),this[_0x944d16(0x7dd)]=void 0x0,this[_0x944d16(0x574)]=void 0x0,this[_0x944d16(0xa77)]=void 0x0,this[_0x944d16(0x32e)]=void 0x0,this['_orbitCursorAngle']=0x0,this['_orbitCursorOpacity']=0x0,this[_0x944d16(0x69b)]=0x0,this[_0x944d16(0x1e7)]=void 0x0,this['_orbitIsLook']=!0x1,this['_rotateInitialCursorAngle']=void 0x0,this[_0x944d16(0x873)]=void 0x0,this['_mouseMoveHandle']=void 0x0,this[_0x944d16(0xb1)]=void 0x0,this['_state']=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){const _0x479b4f=_0x43bf95;return _0x441b1e['getWidgetType'](_0x479b4f(0x42a));}[_0x43bf95(0x6fc)](){const _0x36b3ba=_0x43bf95;let _0x3ef59d=this;Object[_0x36b3ba(0x50a)](this[_0x36b3ba(0x3f7)],_0x36b3ba(0x42a),{'get'(){return _0x3ef59d;}}),this[_0x36b3ba(0x95c)][_0x36b3ba(0x339)]=_0x4a56ad=>{const _0x3fe346=_0x36b3ba;this[_0x3fe346(0x5f0)](_0x4a56ad);},this[_0x36b3ba(0x95c)]['ondblclick']=_0x168903=>{const _0x1ef0d2=_0x36b3ba;this[_0x1ef0d2(0x54f)](_0x168903);};}[_0x43bf95(0x4ac)](){const _0x385c0d=_0x43bf95;this['_viewer']['on'](_0x3f9fee[_0x385c0d(0x559)],this['_postRenderHandler'],this);}[_0x43bf95(0x2a1)](){const _0x24ee9e=_0x43bf95;this[_0x24ee9e(0x3f7)][_0x24ee9e(0x24d)](_0x3f9fee[_0x24ee9e(0x559)],this[_0x24ee9e(0x980)],this);}[_0x43bf95(0x980)](){const _0x51a34e=_0x43bf95;let _0x1d82c4=this[_0x51a34e(0x3f7)][_0x51a34e(0x698)][_0x51a34e(0x77c)];this[_0x51a34e(0x574)]&&(this['_outRing']['style'][_0x51a34e(0x4ec)]=_0x51a34e(0x648)+_0x1d82c4+_0x51a34e(0x18a)+_0x1d82c4+_0x51a34e(0x66e));}[_0x43bf95(0x4c7)](){const _0x37b547=_0x43bf95;_0x5b03f8[_0x37b547(0x484)]('div',_0x37b547(0x3a2),this[_0x37b547(0x95c)]),this[_0x37b547(0x574)]=_0x5b03f8[_0x37b547(0x629)](_0x6e760[_0x37b547(0x653)],!0x0,_0x37b547(0xed)),this['_wrapper'][_0x37b547(0x87b)](this['_outRing']),this[_0x37b547(0xa77)]=_0x5b03f8[_0x37b547(0x629)](_0x6e760['compass_inner'],!0x0,_0x37b547(0x9ab)),this[_0x37b547(0x95c)][_0x37b547(0x87b)](this['_gyro']),this[_0x37b547(0x32e)]=_0x5b03f8['parseDom'](_0x6e760['compass_rotation_marker'],!0x0,_0x37b547(0x908)),this[_0x37b547(0x95c)]['appendChild'](this['_rotation_marker']),this[_0x37b547(0x32e)][_0x37b547(0x6a9)]['visibility']=_0x37b547(0x5ad),this[_0x37b547(0x938)]=!0x0;}[_0x43bf95(0x5f0)](_0x3daa30){const _0x3024a8=_0x43bf95;if(this['_viewer'][_0x3024a8(0x148)][_0x3024a8(0x6f7)]===_0x34d1e5['Cesium'][_0x3024a8(0xba)][_0x3024a8(0x73d)])return!0x0;this['_compassRectangle']=_0x3daa30[_0x3024a8(0x160)][_0x3024a8(0x36c)]();let _0x11d268=this[_0x3024a8(0x7dd)]['width']/0x2,_0x6ceeb7=this[_0x3024a8(0x8c4)](_0x3daa30),_0x19aabd=_0x34d1e5[_0x3024a8(0x7aa)]['Cartesian2'][_0x3024a8(0x3db)](_0x6ceeb7)/_0x11d268;if(_0x19aabd<0x32/0x91)this[_0x3024a8(0x5f1)](_0x6ceeb7);else{if(_0x19aabd<0x1)this['_rotate'](_0x6ceeb7);else return!0x0;}}[_0x43bf95(0x54f)](){const _0x3153ac=_0x43bf95;let _0x4f4867=this[_0x3153ac(0x3f7)][_0x3153ac(0x148)],_0xcebd23=_0x4f4867[_0x3153ac(0x698)],_0x428f69=_0x4f4867[_0x3153ac(0x9fb)];if(_0x4f4867[_0x3153ac(0x6f7)]===_0x34d1e5[_0x3153ac(0x7aa)][_0x3153ac(0xba)][_0x3153ac(0x73d)]||!_0x428f69[_0x3153ac(0x740)])return!0x0;if(_0x4f4867[_0x3153ac(0x6f7)]===_0x34d1e5['Cesium'][_0x3153ac(0xba)][_0x3153ac(0x1ca)]&&!_0x428f69['enableTranslate']||(_0x4f4867[_0x3153ac(0x6f7)]===_0x34d1e5[_0x3153ac(0x7aa)][_0x3153ac(0xba)]['SCENE3D']||_0x4f4867[_0x3153ac(0x6f7)]===_0x34d1e5['Cesium'][_0x3153ac(0xba)][_0x3153ac(0x1ca)])&&(!_0x428f69[_0x3153ac(0x5ba)]||_0x4f4867['mode']===_0x34d1e5[_0x3153ac(0x7aa)]['SceneMode']['SCENE3D']&&!_0x428f69[_0x3153ac(0x501)]))return;let _0x4d088c=this[_0x3153ac(0xaa0)](!0x0);if(!_0x4d088c)return;let _0x176403=_0x4f4867[_0x3153ac(0x7fd)][_0x3153ac(0x6eb)][_0x3153ac(0x9bb)](_0xcebd23[_0x3153ac(0x52b)]),_0x6d080f=_0x4f4867[_0x3153ac(0x7fd)][_0x3153ac(0x6eb)][_0x3153ac(0x3d1)](_0x4d088c),_0x4c91a4=new _0x34d1e5[(_0x3153ac(0x7aa))][(_0x3153ac(0x9be))](_0x4d088c,0x0);_0xcebd23[_0x3153ac(0x694)](_0x4c91a4,{'offset':new _0x34d1e5[(_0x3153ac(0x7aa))][(_0x3153ac(0x8ff))](0x0,_0x34d1e5[_0x3153ac(0x7aa)][_0x3153ac(0x72b)][_0x3153ac(0x589)]-_0x34d1e5[_0x3153ac(0x7aa)][_0x3153ac(0x982)][_0x3153ac(0x6f3)](_0x6d080f,_0xcebd23['directionWC']),_0x34d1e5[_0x3153ac(0x7aa)]['Cartesian3'][_0x3153ac(0x7f4)](_0x176403,_0x4d088c)),'duration':1.5});}[_0x43bf95(0xaa0)](_0x6b8830){const _0x2cbd4a=_0x43bf95;let _0x309968=new _0x34d1e5[(_0x2cbd4a(0x7aa))]['Cartesian3'](),_0x19ef35=this[_0x2cbd4a(0x3f7)][_0x2cbd4a(0x148)],_0x111fd7=_0x19ef35[_0x2cbd4a(0x698)];if(_0x19ef35['mode']!==_0x34d1e5['Cesium'][_0x2cbd4a(0xba)]['MORPHING']){if(this[_0x2cbd4a(0x3f7)]['delegate']['trackedEntity'])_0x309968=this[_0x2cbd4a(0x3f7)]['delegate'][_0x2cbd4a(0xa60)][_0x2cbd4a(0x9a7)]['getValue'](this[_0x2cbd4a(0x3f7)][_0x2cbd4a(0xaad)][_0x2cbd4a(0x229)]);else{let _0x38e9e9=new _0x34d1e5['Cesium'][(_0x2cbd4a(0x4d2))]();_0x38e9e9[_0x2cbd4a(0x7c6)]=_0x111fd7[_0x2cbd4a(0xa2)],_0x38e9e9[_0x2cbd4a(0x4ae)]=_0x111fd7[_0x2cbd4a(0x7c9)],_0x309968=_0x19ef35[_0x2cbd4a(0x7fd)][_0x2cbd4a(0x112)](_0x38e9e9,_0x19ef35);}if(_0x309968){if(_0x19ef35[_0x2cbd4a(0x6f7)]===_0x34d1e5[_0x2cbd4a(0x7aa)][_0x2cbd4a(0xba)][_0x2cbd4a(0x794)]||_0x19ef35[_0x2cbd4a(0x6f7)]===_0x34d1e5[_0x2cbd4a(0x7aa)][_0x2cbd4a(0xba)][_0x2cbd4a(0x1ca)]){_0x309968=_0x111fd7['worldToCameraCoordinatesPoint'](_0x309968);let _0x1ba87d=new _0x34d1e5[(_0x2cbd4a(0x7aa))][(_0x2cbd4a(0x4f1))]();_0x6b8830&&(_0x309968=_0x19ef35[_0x2cbd4a(0x7fd)][_0x2cbd4a(0x6eb)]['cartographicToCartesian'](_0x19ef35['mapProjection'][_0x2cbd4a(0x955)](_0x309968,_0x1ba87d)));}else _0x6b8830||(_0x309968=_0x111fd7[_0x2cbd4a(0x721)](_0x309968));return _0x309968;}}}[_0x43bf95(0x5f1)](_0x332557){const _0x15939b=_0x43bf95;let _0x21069a=this[_0x15939b(0x3f7)]['scene'],_0x31668f=_0x21069a[_0x15939b(0x9fb)],_0x5558b1=_0x21069a['camera'];if(!(_0x21069a[_0x15939b(0x6f7)]===_0x34d1e5[_0x15939b(0x7aa)]['SceneMode'][_0x15939b(0x73d)]||!_0x31668f[_0x15939b(0x740)])){switch(_0x21069a[_0x15939b(0x6f7)]){case _0x34d1e5[_0x15939b(0x7aa)][_0x15939b(0xba)][_0x15939b(0x1ca)]:if(_0x31668f['enableLook'])break;if(!_0x31668f['enableTranslate']||!_0x31668f[_0x15939b(0x3b3)])return;break;case _0x34d1e5[_0x15939b(0x7aa)][_0x15939b(0xba)]['SCENE3D']:if(_0x31668f[_0x15939b(0x5ba)])break;if(!_0x31668f[_0x15939b(0x3b3)]||!_0x31668f[_0x15939b(0x501)])return;break;case _0x34d1e5[_0x15939b(0x7aa)]['SceneMode'][_0x15939b(0x794)]:if(!_0x31668f['enableTranslate'])return;break;}if(this['_mouseMoveHandle']=_0x5bc98b=>{this['_orbitMouseMoveFunction'](_0x5bc98b);},this[_0x15939b(0xb1)]=()=>{const _0x4e4c4f=_0x15939b;this[_0x4e4c4f(0x5c1)]();},document[_0x15939b(0x97c)]('mousemove',this[_0x15939b(0x15d)],!0x1),document['removeEventListener'](_0x15939b(0x784),this['_mouseUpHandle'],!0x1),this[_0x15939b(0x69b)]=_0x34d1e5['Cesium'][_0x15939b(0x1d8)](),this[_0x15939b(0x3f7)][_0x15939b(0x8ca)]['trackedEntity'])this[_0x15939b(0x1e7)]=void 0x0,this['_orbitIsLook']=!0x1;else{let _0x259ca9=this[_0x15939b(0xaa0)](!0x0);_0x259ca9?(this[_0x15939b(0x1e7)]=_0x34d1e5[_0x15939b(0x7aa)][_0x15939b(0x7a6)][_0x15939b(0x824)](_0x259ca9,_0x21069a[_0x15939b(0x7fd)]['ellipsoid']),this[_0x15939b(0x634)]=!0x1):(this[_0x15939b(0x1e7)]=_0x34d1e5[_0x15939b(0x7aa)][_0x15939b(0x7a6)][_0x15939b(0x824)](_0x5558b1[_0x15939b(0xa2)],_0x21069a[_0x15939b(0x7fd)][_0x15939b(0x6eb)]),this[_0x15939b(0x634)]=!0x0);}this[_0x15939b(0x32e)][_0x15939b(0x6a9)]['visibility']=_0x15939b(0x2a2),this[_0x15939b(0xa77)]['className']+=_0x15939b(0x924),document['addEventListener'](_0x15939b(0x746),this[_0x15939b(0x15d)],!0x1),document[_0x15939b(0x278)]('mouseup',this['_mouseUpHandle'],!0x1),this[_0x15939b(0x3f7)]['clock'][_0x15939b(0x9ae)]['addEventListener'](this[_0x15939b(0x4cc)],this),this['_updateAngleAndOpacity'](_0x332557,this[_0x15939b(0x7dd)][_0x15939b(0x371)]);}}[_0x43bf95(0x4cc)](){const _0x226503=_0x43bf95;let _0x3dedf9=this['_viewer'][_0x226503(0x148)],_0x4722d0=this[_0x226503(0x3f7)][_0x226503(0x698)],_0x4df08b=_0x34d1e5[_0x226503(0x7aa)][_0x226503(0x1d8)](),_0x1be62d=_0x4df08b-this[_0x226503(0x69b)],_0x88e8=(this[_0x226503(0x51a)]-0.5)*2.5/0x3e8,_0x306b1f=_0x1be62d*_0x88e8,_0x2e34c0=this[_0x226503(0x63f)]+_0x34d1e5[_0x226503(0x7aa)][_0x226503(0x72b)]['PI_OVER_TWO'],_0x37c113=Math[_0x226503(0x728)](_0x2e34c0)*_0x306b1f,_0x3fa02e=Math[_0x226503(0xb8)](_0x2e34c0)*_0x306b1f,_0x171414;this[_0x226503(0x1e7)]&&(_0x171414=_0x34d1e5['Cesium'][_0x226503(0x5ee)][_0x226503(0x5c3)](_0x4722d0['transform']),_0x4722d0[_0x226503(0x5ec)](this[_0x226503(0x1e7)])),_0x3dedf9[_0x226503(0x6f7)]===_0x34d1e5[_0x226503(0x7aa)][_0x226503(0xba)][_0x226503(0x794)]?_0x4722d0['move'](new _0x34d1e5['Cesium'][(_0x226503(0x982))](_0x37c113,_0x3fa02e,0x0),Math['max'](_0x3dedf9[_0x226503(0x790)][_0x226503(0xa44)],_0x3dedf9['canvas']['clientHeight'])/0x64*_0x4722d0[_0x226503(0x52b)]['height']*_0x306b1f):this[_0x226503(0x634)]?(_0x4722d0[_0x226503(0x3e5)](_0x34d1e5['Cesium'][_0x226503(0x982)][_0x226503(0xaa2)],-_0x37c113),_0x4722d0['look'](_0x4722d0[_0x226503(0x828)],-_0x3fa02e)):(_0x4722d0[_0x226503(0x1b7)](_0x37c113),_0x4722d0[_0x226503(0x822)](_0x3fa02e)),this['_orbitFrame']&&_0x171414&&_0x4722d0['lookAtTransform'](_0x171414),this[_0x226503(0x69b)]=_0x4df08b;}['_updateAngleAndOpacity'](_0x171a99,_0x4a23ce){const _0x59b450=_0x43bf95;let _0x3648bd=Math[_0x59b450(0x667)](-_0x171a99['y'],_0x171a99['x']);this[_0x59b450(0x63f)]=_0x34d1e5[_0x59b450(0x7aa)][_0x59b450(0x72b)][_0x59b450(0x586)](_0x3648bd-_0x34d1e5[_0x59b450(0x7aa)][_0x59b450(0x72b)][_0x59b450(0x589)]);let _0x3e6450=_0x34d1e5[_0x59b450(0x7aa)]['Cartesian2']['magnitude'](_0x171a99),_0x17a519=_0x4a23ce/0x2,_0x2a9773=Math[_0x59b450(0x66a)](_0x3e6450/_0x17a519,0x1);this[_0x59b450(0x51a)]=0.5*_0x2a9773*_0x2a9773+0.5,this[_0x59b450(0x32e)][_0x59b450(0x6a9)][_0x59b450(0x4ec)]=_0x59b450(0x4dd)+this[_0x59b450(0x63f)]+_0x59b450(0x518)+this[_0x59b450(0x51a)];}[_0x43bf95(0x855)](_0x4aeb92){const _0xd36633=_0x43bf95;this['_updateAngleAndOpacity'](this['_getVector'](_0x4aeb92),this[_0xd36633(0x7dd)][_0xd36633(0x371)]);}[_0x43bf95(0x5c1)](){const _0x5ec927=_0x43bf95;document[_0x5ec927(0x97c)](_0x5ec927(0x746),this['_mouseMoveHandle'],!0x1),document[_0x5ec927(0x97c)]('mouseup',this[_0x5ec927(0xb1)],!0x1),this[_0x5ec927(0x3f7)][_0x5ec927(0xaad)][_0x5ec927(0x9ae)][_0x5ec927(0x97c)](this[_0x5ec927(0x4cc)],this),this[_0x5ec927(0x15d)]=void 0x0,this[_0x5ec927(0xb1)]=void 0x0,this[_0x5ec927(0x32e)][_0x5ec927(0x6a9)][_0x5ec927(0x5cf)]=_0x5ec927(0x5ad),this[_0x5ec927(0xa77)][_0x5ec927(0x256)]=this['_gyro']['className'][_0x5ec927(0x965)](_0x5ec927(0x924),'');}[_0x43bf95(0x920)](_0x424da4){const _0x2c2e09=_0x43bf95;let _0x25312c=this[_0x2c2e09(0x3f7)]['scene'],_0x3dc059=_0x25312c[_0x2c2e09(0x698)],_0x1f83df=_0x25312c['screenSpaceCameraController'];if(_0x25312c[_0x2c2e09(0x6f7)]===_0x34d1e5[_0x2c2e09(0x7aa)][_0x2c2e09(0xba)]['MORPHING']||_0x25312c[_0x2c2e09(0x6f7)]===_0x34d1e5['Cesium'][_0x2c2e09(0xba)][_0x2c2e09(0x794)]||!_0x1f83df[_0x2c2e09(0x740)]||!_0x1f83df[_0x2c2e09(0x5ba)]&&(_0x25312c[_0x2c2e09(0x6f7)]===_0x34d1e5['Cesium'][_0x2c2e09(0xba)][_0x2c2e09(0x1ca)]||_0x25312c[_0x2c2e09(0x6f7)]===_0x34d1e5[_0x2c2e09(0x7aa)][_0x2c2e09(0xba)]['SCENE3D']&&!_0x1f83df['enableRotate']))return;if(this[_0x2c2e09(0x15d)]=_0x549d64=>{this['_rotateMouseMoveFunction'](_0x549d64);},this[_0x2c2e09(0xb1)]=()=>{const _0x8ea5aa=_0x2c2e09;this[_0x8ea5aa(0x998)]();},document[_0x2c2e09(0x97c)](_0x2c2e09(0x746),this['_mouseMoveHandle'],!0x1),document['removeEventListener'](_0x2c2e09(0x784),this['_mouseUpHandle'],!0x1),this[_0x2c2e09(0x275)]=Math['atan2'](-_0x424da4['y'],_0x424da4['x']),this[_0x2c2e09(0x3f7)][_0x2c2e09(0x8ca)]['trackedEntity'])this[_0x2c2e09(0x873)]=void 0x0;else{let _0x417b79=this['_getCameraFocus'](!0x0);!_0x417b79||_0x25312c[_0x2c2e09(0x6f7)]===_0x34d1e5[_0x2c2e09(0x7aa)][_0x2c2e09(0xba)]['COLUMBUS_VIEW']&&!_0x1f83df[_0x2c2e09(0x5ba)]&&!_0x1f83df['enableTranslate']?this[_0x2c2e09(0x873)]=_0x34d1e5['Cesium']['Transforms'][_0x2c2e09(0x824)](_0x3dc059[_0x2c2e09(0xa2)],_0x25312c[_0x2c2e09(0x7fd)]['ellipsoid']):this[_0x2c2e09(0x873)]=_0x34d1e5[_0x2c2e09(0x7aa)]['Transforms']['eastNorthUpToFixedFrame'](_0x417b79,_0x25312c[_0x2c2e09(0x7fd)][_0x2c2e09(0x6eb)]);}let _0x3db737;this[_0x2c2e09(0x873)]&&(_0x3db737=_0x34d1e5['Cesium'][_0x2c2e09(0x5ee)][_0x2c2e09(0x5c3)](_0x3dc059[_0x2c2e09(0x203)]),_0x3dc059[_0x2c2e09(0x5ec)](this['_rotateFrame'])),this['_rotateInitialCameraAngle']=-_0x3dc059[_0x2c2e09(0x77c)],this[_0x2c2e09(0x873)]&&_0x3db737&&_0x3dc059[_0x2c2e09(0x5ec)](_0x3db737),document['addEventListener']('mousemove',this[_0x2c2e09(0x15d)],!0x1),document[_0x2c2e09(0x278)](_0x2c2e09(0x784),this[_0x2c2e09(0xb1)],!0x1);}['_rotateMouseMoveFunction'](_0x3d0514){const _0x2ce523=_0x43bf95;let _0x519e58=this['_viewer']['camera'],_0x3977c5=this[_0x2ce523(0x8c4)](_0x3d0514),_0x4a161d=Math[_0x2ce523(0x667)](-_0x3977c5['y'],_0x3977c5['x'])-this['_rotateInitialCursorAngle'],_0xfcb2a1=_0x34d1e5[_0x2ce523(0x7aa)][_0x2ce523(0x72b)][_0x2ce523(0x586)](this[_0x2ce523(0x397)]-_0x4a161d),_0x53459d;this[_0x2ce523(0x873)]&&(_0x53459d=_0x34d1e5[_0x2ce523(0x7aa)]['Matrix4']['clone'](_0x519e58['transform']),_0x519e58[_0x2ce523(0x5ec)](this[_0x2ce523(0x873)]));let _0x2ad636=-_0x519e58[_0x2ce523(0x77c)];_0x519e58[_0x2ce523(0x7bb)](_0xfcb2a1-_0x2ad636),this[_0x2ce523(0x873)]&&_0x53459d&&_0x519e58[_0x2ce523(0x5ec)](_0x53459d);}[_0x43bf95(0x998)](){const _0x4cb964=_0x43bf95;document[_0x4cb964(0x97c)](_0x4cb964(0x746),this['_mouseMoveHandle'],!0x1),document[_0x4cb964(0x97c)]('mouseup',this[_0x4cb964(0xb1)],!0x1),this[_0x4cb964(0x15d)]=void 0x0,this[_0x4cb964(0xb1)]=void 0x0;}[_0x43bf95(0x8c4)](_0x139ae7){const _0x54b79f=_0x43bf95;let _0x5794de=this[_0x54b79f(0x7dd)],_0x25d968=new _0x34d1e5['Cesium'][(_0x54b79f(0x48e))]((_0x5794de['right']-_0x5794de['left'])/0x2,(_0x5794de[_0x54b79f(0x16f)]-_0x5794de[_0x54b79f(0x330)])/0x2),_0x5a1eaf=new _0x34d1e5[(_0x54b79f(0x7aa))]['Cartesian2'](_0x139ae7['clientX']-_0x5794de[_0x54b79f(0x910)],_0x139ae7['clientY']-_0x5794de[_0x54b79f(0x330)]),_0x492d39=new _0x34d1e5[(_0x54b79f(0x7aa))][(_0x54b79f(0x48e))]();return _0x34d1e5[_0x54b79f(0x7aa)][_0x54b79f(0x48e)][_0x54b79f(0xa4)](_0x5a1eaf,_0x25d968,_0x492d39),_0x492d39;}};_0x441b1e[_0x43bf95(0x545)](_0x43bf95(0x42a));var _0x4c4e25=_0xf0271e,_0x149ec9=new _0x34d1e5[(_0x43bf95(0x7aa))]['EllipsoidGeodesic'](),_0x1bb8bb=[0x1,0x2,0x3,0x5],_0x209bb7=[..._0x1bb8bb,..._0x1bb8bb[_0x43bf95(0x127)](_0x12dbf8=>_0x12dbf8*0xa),..._0x1bb8bb[_0x43bf95(0x127)](_0x913727=>_0x913727*0x64),..._0x1bb8bb['map'](_0x321f48=>_0x321f48*0x3e8),..._0x1bb8bb[_0x43bf95(0x127)](_0x5a8875=>_0x5a8875*0x2710),..._0x1bb8bb[_0x43bf95(0x127)](_0x1915ea=>_0x1915ea*0x186a0),..._0x1bb8bb[_0x43bf95(0x127)](_0x3be9fc=>_0x3be9fc*0xf4240)],_0x1d9d6f=class extends _0x441b1e{constructor(){const _0x2381b5=_0x43bf95;super(),this['_wrapper']=_0x5b03f8['create'](_0x2381b5(0x7e1),_0x2381b5(0x935)),this[_0x2381b5(0x470)]=void 0x0,this[_0x2381b5(0x4d4)]=void 0x0,this[_0x2381b5(0x260)]=_0x34d1e5['Cesium'][_0x2381b5(0x1d8)](),this[_0x2381b5(0x558)]=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){const _0x39f756=_0x43bf95;return _0x441b1e[_0x39f756(0xa57)](_0x39f756(0x7e8));}[_0x43bf95(0x6fc)](){const _0x3ef7b8=_0x43bf95;let _0x2d3c71=this;Object['defineProperty'](this[_0x3ef7b8(0x3f7)],'distanceLegend',{'get'(){return _0x2d3c71;}});}[_0x43bf95(0x4ac)](){const _0x3e7e53=_0x43bf95;this[_0x3e7e53(0x3f7)]['on'](_0x3f9fee[_0x3e7e53(0x559)],this['_updateContent'],this);}['_unbindEvent'](){const _0x1dad16=_0x43bf95;this['_viewer'][_0x1dad16(0x24d)](_0x3f9fee[_0x1dad16(0x559)],this['_updateContent'],this);}['_updateContent'](_0x58c178,_0x554b4e){const _0x232e45=_0x43bf95;let _0x2666ea=_0x34d1e5['Cesium'][_0x232e45(0x1d8)]();if(_0x2666ea<this[_0x232e45(0x260)]+0xfa||!this[_0x232e45(0x470)]||!this[_0x232e45(0x4d4)])return;this['_lastUpdate']=_0x2666ea;let _0x19ceb1=_0x58c178[_0x232e45(0x790)][_0x232e45(0x371)],_0x46ea58=_0x58c178['canvas'][_0x232e45(0x795)],_0xab20e2=_0x58c178[_0x232e45(0x698)][_0x232e45(0xa3)](new _0x34d1e5[(_0x232e45(0x7aa))][(_0x232e45(0x48e))](_0x19ceb1/0x2|0x0,_0x46ea58-0x1)),_0x413e51=_0x58c178[_0x232e45(0x698)][_0x232e45(0xa3)](new _0x34d1e5[(_0x232e45(0x7aa))][(_0x232e45(0x48e))](0x1+_0x19ceb1/0x2|0x0,_0x46ea58-0x1)),_0x2a6722=_0x58c178['globe'][_0x232e45(0x112)](_0xab20e2,_0x58c178),_0xf098c8=_0x58c178['globe'][_0x232e45(0x112)](_0x413e51,_0x58c178);if(!_0x2a6722||!_0xf098c8)return;_0x149ec9[_0x232e45(0x6bf)](_0x58c178['globe']['ellipsoid'][_0x232e45(0x8e5)](_0x2a6722),_0x58c178[_0x232e45(0x7fd)]['ellipsoid'][_0x232e45(0x8e5)](_0xf098c8));let _0x342775=_0x149ec9['surfaceDistance'],_0x2924f0=0x64,_0x132d7a=0x0;for(let _0xc16a01=_0x209bb7[_0x232e45(0x6a2)]-0x1;_0xc16a01>=0x0;--_0xc16a01)if(_0x209bb7[_0xc16a01]/_0x342775<_0x2924f0){_0x132d7a=_0x209bb7[_0xc16a01];break;}if(_0x132d7a){this[_0x232e45(0x95c)][_0x232e45(0x6a9)]['visibility']='visible',this[_0x232e45(0x470)]['innerHTML']=_0x132d7a>=0x3e8?_0x132d7a/0x3e8+'\x20km':_0x132d7a+'\x20m';let _0x2bb257=_0x132d7a/_0x342775|0x0;this[_0x232e45(0x4d4)]['style'][_0x232e45(0x4ec)]='width:\x20'+_0x2bb257+_0x232e45(0x996)+(0x7d-_0x2bb257)/0x2+_0x232e45(0xb7);}}['_mountContent'](){const _0x391218=_0x43bf95;this[_0x391218(0x470)]=_0x5b03f8[_0x391218(0x484)]('div',_0x391218(0x5e7),this[_0x391218(0x95c)]),this[_0x391218(0x4d4)]=_0x5b03f8['create'](_0x391218(0x7e1),_0x391218(0x25a),this[_0x391218(0x95c)]),this[_0x391218(0x95c)]['style'][_0x391218(0x5cf)]=_0x391218(0x5ad),this['_ready']=!0x0;}};_0x441b1e[_0x43bf95(0x545)](_0x43bf95(0x7e8));var _0x56e893=_0x1d9d6f,_0xb121f0=class extends _0x441b1e{constructor(){const _0x5ed72b=_0x43bf95;super(),this['_wrapper']=_0x5b03f8[_0x5ed72b(0x484)]('div',_0x5ed72b(0x51f)),this[_0x5ed72b(0x41b)]=void 0x0,this[_0x5ed72b(0x9e)]=void 0x0,this[_0x5ed72b(0x530)]=void 0x0,this[_0x5ed72b(0x558)]=_0x4075ae['INITIALIZED'];}get['type'](){const _0x2cf61c=_0x43bf95;return _0x441b1e[_0x2cf61c(0xa57)](_0x2cf61c(0x604));}[_0x43bf95(0xaa0)](_0xe2bcde){const _0x53cd08=_0x43bf95;let _0x5a4773=new _0x34d1e5[(_0x53cd08(0x7aa))][(_0x53cd08(0x4d2))](_0xe2bcde['camera'][_0x53cd08(0xa2)],_0xe2bcde['camera'][_0x53cd08(0x7c9)]),_0x50ed48=_0x34d1e5[_0x53cd08(0x7aa)][_0x53cd08(0x3d7)][_0x53cd08(0x372)](_0x5a4773,_0x34d1e5[_0x53cd08(0x7aa)][_0x53cd08(0x7a1)][_0x53cd08(0x423)]);return _0x50ed48?_0x34d1e5[_0x53cd08(0x7aa)][_0x53cd08(0x4d2)][_0x53cd08(0x444)](_0x5a4773,_0x50ed48[_0x53cd08(0x9ba)]):_0x34d1e5[_0x53cd08(0x7aa)][_0x53cd08(0x3d7)][_0x53cd08(0x5c8)](_0x5a4773,_0x34d1e5[_0x53cd08(0x7aa)][_0x53cd08(0x7a1)]['WGS84']);}[_0x43bf95(0x4bf)](_0x4e5a4f,_0x42d0ab,_0x14bcee){const _0x3c520b=_0x43bf95;let _0x5de296=new _0x34d1e5[(_0x3c520b(0x7aa))][(_0x3c520b(0x982))](),_0x8398ec=_0x34d1e5[_0x3c520b(0x7aa)]['Cartesian3'][_0x3c520b(0xa4)](_0x42d0ab,_0x4e5a4f[_0x3c520b(0x9a7)],_0x5de296),_0x22947b=_0x34d1e5[_0x3c520b(0x7aa)][_0x3c520b(0x982)][_0x3c520b(0x375)](_0x8398ec,_0x14bcee,_0x5de296);return _0x34d1e5[_0x3c520b(0x7aa)]['Cartesian3'][_0x3c520b(0x45f)](_0x4e5a4f[_0x3c520b(0x9a7)],_0x22947b,_0x5de296);}[_0x43bf95(0x5e4)](){const _0x369d87=_0x43bf95;let _0x62d84a=this[_0x369d87(0x3f7)][_0x369d87(0x148)],_0x10efe4=_0x62d84a[_0x369d87(0x698)],_0x36b0e6=_0x62d84a['screenSpaceCameraController'];if(_0x62d84a['mode']===_0x34d1e5[_0x369d87(0x7aa)]['SceneMode'][_0x369d87(0x73d)]||!_0x36b0e6['enableInputs']||_0x62d84a[_0x369d87(0x6f7)]===_0x34d1e5[_0x369d87(0x7aa)]['SceneMode'][_0x369d87(0x1ca)])return!0x0;if(_0x62d84a[_0x369d87(0x6f7)]===_0x34d1e5['Cesium'][_0x369d87(0xba)][_0x369d87(0x794)])_0x10efe4[_0x369d87(0x770)](_0x10efe4['positionCartographic'][_0x369d87(0x795)]*0.5);else{if(_0x62d84a[_0x369d87(0x6f7)]===_0x34d1e5[_0x369d87(0x7aa)][_0x369d87(0xba)]['SCENE3D']){let _0x4ff02e=this[_0x369d87(0xaa0)](_0x62d84a),_0x4ff23e=this[_0x369d87(0x4bf)](_0x10efe4,_0x4ff02e,0x1/0x2);_0x10efe4[_0x369d87(0xa30)]({'destination':_0x4ff23e,'orientation':{'heading':_0x10efe4[_0x369d87(0x77c)],'pitch':_0x10efe4[_0x369d87(0x442)],'roll':_0x10efe4[_0x369d87(0x193)]},'duration':0.5,'convert':!0x1});}}}['_refresh'](){const _0x5aeec2=_0x43bf95;this['_viewer'][_0x5aeec2(0x698)][_0x5aeec2(0x807)](1.5);}[_0x43bf95(0x43c)](){const _0xfd30ec=_0x43bf95;let _0x3ce00c=this['_viewer'][_0xfd30ec(0x148)],_0x4e4f41=_0x3ce00c['camera'],_0xfa13db=_0x3ce00c[_0xfd30ec(0x9fb)];if(_0x3ce00c[_0xfd30ec(0x6f7)]===_0x34d1e5[_0xfd30ec(0x7aa)][_0xfd30ec(0xba)][_0xfd30ec(0x73d)]||!_0xfa13db[_0xfd30ec(0x740)]||_0x3ce00c[_0xfd30ec(0x6f7)]===_0x34d1e5[_0xfd30ec(0x7aa)][_0xfd30ec(0xba)][_0xfd30ec(0x1ca)])return!0x0;if(_0x3ce00c[_0xfd30ec(0x6f7)]===_0x34d1e5[_0xfd30ec(0x7aa)][_0xfd30ec(0xba)][_0xfd30ec(0x794)])_0x4e4f41['zoomOut'](_0x4e4f41['positionCartographic'][_0xfd30ec(0x795)]);else{if(_0x3ce00c[_0xfd30ec(0x6f7)]===_0x34d1e5[_0xfd30ec(0x7aa)][_0xfd30ec(0xba)][_0xfd30ec(0x5f3)]){let _0x1a93ca=this[_0xfd30ec(0xaa0)](_0x3ce00c),_0x4c012b=this[_0xfd30ec(0x4bf)](_0x4e4f41,_0x1a93ca,-0x1);_0x4e4f41[_0xfd30ec(0xa30)]({'destination':_0x4c012b,'orientation':{'heading':_0x4e4f41[_0xfd30ec(0x77c)],'pitch':_0x4e4f41[_0xfd30ec(0x442)],'roll':_0x4e4f41[_0xfd30ec(0x193)]},'duration':0.5,'convert':!0x1});}}}['_installHook'](){const _0x7b35e2=_0x43bf95;let _0x5354bc=this;Object[_0x7b35e2(0x50a)](this[_0x7b35e2(0x3f7)],_0x7b35e2(0x8d0),{'get'(){return _0x5354bc;}});}[_0x43bf95(0x4c7)](){const _0x28c89a=_0x43bf95;this['_zoomInEl']=_0x5b03f8[_0x28c89a(0x629)](_0x6e760[_0x28c89a(0x77e)],!0x0,'zoom-in'),this[_0x28c89a(0x530)]=_0x5b03f8[_0x28c89a(0x629)](_0x6e760['refresh'],!0x0,_0x28c89a(0x4c4)),this[_0x28c89a(0x9e)]=_0x5b03f8[_0x28c89a(0x629)](_0x6e760[_0x28c89a(0x252)],!0x0,_0x28c89a(0x60c)),this['_wrapper'][_0x28c89a(0x87b)](this['_zoomInEl']),this[_0x28c89a(0x95c)]['appendChild'](this['_refreshEl']),this[_0x28c89a(0x95c)][_0x28c89a(0x87b)](this[_0x28c89a(0x9e)]);let _0x59bc57=this;this['_zoomInEl']['onclick']=()=>{const _0x4e5963=_0x28c89a;_0x59bc57[_0x4e5963(0x5e4)]();},this['_refreshEl']['onclick']=()=>{_0x59bc57['_refresh']();},this[_0x28c89a(0x9e)]['onclick']=()=>{const _0x3adde3=_0x28c89a;_0x59bc57[_0x3adde3(0x43c)]();},this[_0x28c89a(0x938)]=!0x0;}};_0x441b1e[_0x43bf95(0x545)](_0x43bf95(0x604));var _0x1f67c4=_0xb121f0,_0x26c55f=class extends _0x441b1e{constructor(){const _0x1f4278=_0x43bf95;super(),this[_0x1f4278(0x95c)]=_0x5b03f8[_0x1f4278(0x484)](_0x1f4278(0x7e1),_0x1f4278(0x1b6)),this[_0x1f4278(0x558)]=_0x4075ae[_0x1f4278(0x5d2)];}get['type'](){const _0x2d9656=_0x43bf95;return _0x441b1e['getWidgetType'](_0x2d9656(0x6aa));}[_0x43bf95(0x6fc)](){const _0x41a3ef=_0x43bf95;let _0xef1bfb=this;Object[_0x41a3ef(0x50a)](this['_viewer'],_0x41a3ef(0x6e6),{'get'(){return _0xef1bfb;}});}[_0x43bf95(0x4c7)](){const _0x4d284d=_0x43bf95;let _0x5a501c=_0x5b03f8['parseDom'](_0x4d284d(0x381),!0x0,_0x4d284d(0x1e6));this['_wrapper'][_0x4d284d(0x87b)](_0x5a501c),this[_0x4d284d(0x938)]=!0x0;}};_0x441b1e[_0x43bf95(0x545)](_0x43bf95(0x6aa));var _0x3aa042=_0x26c55f,_0x126af3=class extends _0x441b1e{constructor(){const _0x51294d=_0x43bf95;super(),this[_0x51294d(0x95c)]=_0x5b03f8[_0x51294d(0x484)]('div','widget\x20slider'),this[_0x51294d(0x6dd)]=void 0x0,this[_0x51294d(0x3f6)]=!0x1,this[_0x51294d(0x558)]=_0x4075ae['INITIALIZED'];}get['type'](){const _0x345908=_0x43bf95;return _0x441b1e[_0x345908(0xa57)](_0x345908(0x8ef));}['_installHook'](){const _0x13fab5=_0x43bf95;let _0x581b49=this;Object[_0x13fab5(0x50a)](this[_0x13fab5(0x3f7)],_0x13fab5(0x9fc),{'get'(){return _0x581b49;}});}[_0x43bf95(0x4ac)](){const _0x290360=_0x43bf95;this[_0x290360(0x3f7)][_0x290360(0x148)][_0x290360(0x87d)]=0.5,this[_0x290360(0x95c)]['style'][_0x290360(0x910)]='50%';}[_0x43bf95(0x2a1)](){const _0x178c6f=_0x43bf95;this[_0x178c6f(0x6dd)]?this['_viewer'][_0x178c6f(0x148)]['splitPosition']=this['_tileset']['splitDirection']>0x0?0x1:0x0:this[_0x178c6f(0x3f7)][_0x178c6f(0x148)][_0x178c6f(0x87d)]=0x0;}[_0x43bf95(0x4c7)](){const _0x32994b=_0x43bf95;let _0x5519c1=_0x5b03f8[_0x32994b(0x629)](_0x6e760[_0x32994b(0x3ea)],!0x0,_0x32994b(0x3ea));this['_wrapper']['appendChild'](_0x5519c1);let _0x19ee7f=new _0x34d1e5['Cesium'][(_0x32994b(0xa8e))](_0x5519c1),_0x3ca5b9=this;_0x19ee7f[_0x32994b(0x307)](()=>{_0x3ca5b9['_moveActive']=!0x0;},_0x34d1e5[_0x32994b(0x7aa)][_0x32994b(0x3be)][_0x32994b(0x1b9)]),_0x19ee7f[_0x32994b(0x307)](()=>{const _0x1db0b2=_0x32994b;_0x3ca5b9[_0x1db0b2(0x3f6)]=!0x0;},_0x34d1e5['Cesium'][_0x32994b(0x3be)][_0x32994b(0x271)]),_0x19ee7f[_0x32994b(0x307)](_0x53f51d=>{const _0x303ae9=_0x32994b;_0x3ca5b9[_0x303ae9(0x690)](_0x53f51d);},_0x34d1e5[_0x32994b(0x7aa)][_0x32994b(0x3be)][_0x32994b(0xa09)]),_0x19ee7f[_0x32994b(0x307)](_0x321b91=>{const _0x3fa94d=_0x32994b;_0x3ca5b9[_0x3fa94d(0x690)](_0x321b91);},_0x34d1e5[_0x32994b(0x7aa)][_0x32994b(0x3be)]['PINCH_MOVE']),_0x19ee7f[_0x32994b(0x307)](()=>{_0x3ca5b9['_moveActive']=!0x1;},_0x34d1e5[_0x32994b(0x7aa)][_0x32994b(0x3be)][_0x32994b(0x4e1)]),_0x19ee7f[_0x32994b(0x307)](()=>{const _0x2650a6=_0x32994b;_0x3ca5b9[_0x2650a6(0x3f6)]=!0x1;},_0x34d1e5['Cesium'][_0x32994b(0x3be)]['PINCH_END']),this['_ready']=!0x0;}[_0x43bf95(0x690)](_0x4b8440){const _0x50763=_0x43bf95;if(!this[_0x50763(0x3f6)]||!this[_0x50763(0x8d3)])return;let _0x746d96=_0x4b8440['endPosition']['x'],_0x249a15=(this[_0x50763(0x95c)][_0x50763(0x6f4)]+_0x746d96)/this[_0x50763(0x95c)][_0x50763(0x38c)][_0x50763(0x7d8)];this[_0x50763(0x95c)]['style'][_0x50763(0x910)]=0x64*_0x249a15+'%',this['_viewer'][_0x50763(0x148)][_0x50763(0x87d)]=_0x249a15;}[_0x43bf95(0xa93)](_0x296db2){const _0x33eaff=_0x43bf95;return!this[_0x33eaff(0x3f7)]||!this['_enable']?this:(_0x296db2&&(this[_0x33eaff(0x6dd)]&&this[_0x33eaff(0x3f7)]['scene'][_0x33eaff(0x2d5)]['remove'](this['_tileset']),this[_0x33eaff(0x6dd)]=this[_0x33eaff(0x3f7)]['scene'][_0x33eaff(0x2d5)][_0x33eaff(0x45f)](_0x296db2[_0x33eaff(0x8ca)]||_0x296db2),this['_viewer']['scene'][_0x33eaff(0x87d)]=this['_wrapper'][_0x33eaff(0x6f4)]/this[_0x33eaff(0x95c)]['parentElement'][_0x33eaff(0x7d8)]),this);}};_0x441b1e[_0x43bf95(0x545)](_0x43bf95(0x8ef));var _0x208388=_0x126af3,_0x3d376f=class extends _0x441b1e{constructor(){const _0x40de27=_0x43bf95;super(),this[_0x40de27(0x95c)]=_0x5b03f8['create'](_0x40de27(0x7e1),_0x40de27(0x711)),this[_0x40de27(0x6dd)]=void 0x0,this['_baseLayer']=void 0x0,this[_0x40de27(0x3f6)]=!0x1,this[_0x40de27(0x558)]=_0x4075ae[_0x40de27(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x4a203e=_0x43bf95;return _0x441b1e[_0x4a203e(0xa57)](_0x4a203e(0x6b5));}[_0x43bf95(0x6fc)](){const _0x1cada2=_0x43bf95;let _0x3804f9=this;Object[_0x1cada2(0x50a)](this['_viewer'],_0x1cada2(0x585),{'get'(){return _0x3804f9;}});}[_0x43bf95(0x4ac)](){const _0x1eb3b3=_0x43bf95;this[_0x1eb3b3(0x3f7)][_0x1eb3b3(0x148)][_0x1eb3b3(0x87d)]=0.5,this[_0x1eb3b3(0x95c)][_0x1eb3b3(0x6a9)][_0x1eb3b3(0x910)]='50%';}[_0x43bf95(0x2a1)](){const _0x93b237=_0x43bf95;this[_0x93b237(0x3f7)][_0x93b237(0x148)][_0x93b237(0x87d)]=0x1;}[_0x43bf95(0x4c7)](){const _0xe97880=_0x43bf95;let _0x6b00de=_0x5b03f8['parseDom'](_0x6e760[_0xe97880(0x3ea)],!0x0,_0xe97880(0x3ea));this[_0xe97880(0x95c)][_0xe97880(0x87b)](_0x6b00de);let _0x50aa67=new _0x34d1e5['Cesium'][(_0xe97880(0xa8e))](_0x6b00de),_0x5d0b1d=this;_0x50aa67['setInputAction'](()=>{const _0x5a4908=_0xe97880;_0x5d0b1d[_0x5a4908(0x3f6)]=!0x0;},_0x34d1e5[_0xe97880(0x7aa)][_0xe97880(0x3be)][_0xe97880(0x1b9)]),_0x50aa67[_0xe97880(0x307)](()=>{const _0x34fb94=_0xe97880;_0x5d0b1d[_0x34fb94(0x3f6)]=!0x0;},_0x34d1e5[_0xe97880(0x7aa)][_0xe97880(0x3be)][_0xe97880(0x271)]),_0x50aa67[_0xe97880(0x307)](_0x5eab5e=>{const _0xd9e65d=_0xe97880;_0x5d0b1d[_0xd9e65d(0x690)](_0x5eab5e);},_0x34d1e5[_0xe97880(0x7aa)][_0xe97880(0x3be)][_0xe97880(0xa09)]),_0x50aa67['setInputAction'](_0x274ab3=>{const _0x33bf59=_0xe97880;_0x5d0b1d[_0x33bf59(0x690)](_0x274ab3);},_0x34d1e5['Cesium']['ScreenSpaceEventType'][_0xe97880(0x424)]),_0x50aa67[_0xe97880(0x307)](()=>{const _0x2235b8=_0xe97880;_0x5d0b1d[_0x2235b8(0x3f6)]=!0x1;},_0x34d1e5[_0xe97880(0x7aa)][_0xe97880(0x3be)]['LEFT_UP']),_0x50aa67[_0xe97880(0x307)](()=>{_0x5d0b1d['_moveActive']=!0x1;},_0x34d1e5[_0xe97880(0x7aa)][_0xe97880(0x3be)][_0xe97880(0x851)]),this[_0xe97880(0x938)]=!0x0;}[_0x43bf95(0x690)](_0x27d9db){const _0x105724=_0x43bf95;if(!this['_moveActive']||!this[_0x105724(0x8d3)])return;let _0x2185ec=_0x27d9db[_0x105724(0x837)]['x'],_0x38e246=(this[_0x105724(0x95c)][_0x105724(0x6f4)]+_0x2185ec)/this[_0x105724(0x95c)][_0x105724(0x38c)][_0x105724(0x7d8)];this[_0x105724(0x95c)][_0x105724(0x6a9)]['left']=0x64*_0x38e246+'%',this['_viewer'][_0x105724(0x148)]['splitPosition']=_0x38e246;}[_0x43bf95(0xa93)](_0x391641){const _0x2ec992=_0x43bf95;return!this['_viewer']||!this['_enable']?this:(_0x391641&&(this[_0x2ec992(0x6dd)]&&this[_0x2ec992(0x3f7)][_0x2ec992(0x148)][_0x2ec992(0x2d5)][_0x2ec992(0x109)](this[_0x2ec992(0x6dd)]),Promise['resolve'](_0x391641[_0x2ec992(0x8ca)]||_0x391641)['then'](_0x3475b7=>{const _0xc6ca13=_0x2ec992;this[_0xc6ca13(0x6dd)]=this['_viewer'][_0xc6ca13(0x148)][_0xc6ca13(0x2d5)][_0xc6ca13(0x45f)](_0x3475b7);})),this);}['addBaseLayer'](_0x4c5e03){const _0x8f9e34=_0x43bf95;return!this[_0x8f9e34(0x3f7)]||!this[_0x8f9e34(0x8d3)]?this:(_0x4c5e03&&(this[_0x8f9e34(0x417)]&&this['_viewer'][_0x8f9e34(0x22d)]['remove'](this['_baseLayer']),Promise[_0x8f9e34(0x509)](_0x4c5e03)[_0x8f9e34(0x379)](_0x38fabb=>{const _0x2331a9=_0x8f9e34;this[_0x2331a9(0x417)]=this[_0x2331a9(0x3f7)][_0x2331a9(0x22d)][_0x2331a9(0x248)](_0x38fabb),this[_0x2331a9(0x417)][_0x2331a9(0x322)]=0x1;})),this);}};_0x441b1e[_0x43bf95(0x545)]('scene_split');var _0x405d7=_0x3d376f;function _0x550848(){return{'attribution':new _0x4bca10(),'popup':new _0x91ca04(),'contextMenu':new _0x3a3db0(),'tooltip':new _0xe5cae8(),'mapSwitch':new _0x487349(),'mapSplit':new _0x3ab00c(),'locationBar':new _0x5e61fb(),'hawkeyeMap':new _0x2c4d03(),'compass':new _0x4c4e25(),'distanceLegend':new _0x56e893(),'zoomController':new _0x1f67c4(),'loadingMask':new _0x3aa042(),'tilesetSplit':new _0x208388(),'sceneSplit':new _0x405d7()};}var _0x46791e='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACCklEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSs8Of+8x3/vv/88ffFu++/jl75/evEte//vnz//e/Dl3d/nrye8P//fwF0fSicv28/Vv7/////t8W7/79Wi///gt0DBb9zLfv/89Cl/3/fff7w//9/A2S9cK/9//i1g4GZqeSdcwnzn4v38HmXgSs3gIGnKfEXIyebOQMDwwWQGMwgh/9fvu8hxhAY4Ix1ZeCdnPOTkYNNgoGB4QMT2DWfv6/50riIaENA4Pvi3Qy/T99k//v0TQOIDzLI4P/nb/zfJm8g2hAY+Nq8hIFJmC8DbNDfp28Sfqw7zEKyKQwMDL8OXQKFLShsDJgYmRhN/j58SY45YPDn1hMOUFpjYmBj5aHEIBhg+vvw5QVWPWWyDWBkY/kBoplYjVQPsOgrkWeIADcDq7kmyGsXQLG2gd3XkoFZXpxkg7hzAhn+3nl6HpaOPvx79X4+35xikgwBWcxVEPSXWUW6iAGajhiYxASLWLTkHxNrGMhLAmsb/v57+2klAwPDAbAYUjEi8O/tp0t/rj2U/ZTSy4ArJtns9Bj4F5T9YWBk2M4kKewHNxytPBL49+p9H5OYYOLPzcfBCQ6WbUAGsAdY/2VWkfrz/+PXIiZxwWkorsRRsCn8e/cp8v+nb/aMvFygTMnw/8v3q8zy4rsZGBgWYKhmYGAAAN6EGE9igaT+AAAAAElFTkSuQmCC',_0x39638d=_0x43bf95(0x8ba),_0x118f2e={'icon_center':_0x39638d,'icon_anchor':_0x46791e,'icon_size':[0xc,0xc],'clampToModel':!0x1,'maxAnchorSize':0x3e7},_0x1b8c48=class{constructor(){const _0x43b785=_0x43bf95;this[_0x43b785(0x3f7)]=void 0x0,this[_0x43b785(0x6c8)]=new _0x34d1e5[(_0x43b785(0x7aa))][(_0x43b785(0x668))](_0x43b785(0x4f2)),this['_floatingAnchor']=void 0x0,this[_0x43b785(0x674)]={},this['_plotEvent']=new _0x3a7cdd(),this[_0x43b785(0x13e)]=void 0x0;}set[_0x43bf95(0x6fe)](_0x5203ed){this['_tooltipMess']=_0x5203ed;}['_getEventPosition'](_0x2fcf81){const _0x39ca78=_0x43bf95;let {overlay:_0x2464b9,layer:_0x51ee1f,position:_0x3579f2,surfacePosition:_0x53f715}=_0x2fcf81;return!this[_0x39ca78(0x674)][_0x39ca78(0xa2b)]||!_0x2464b9&&!_0x51ee1f?_0x53f715:_0x3579f2;}['_onClick'](_0x3ea482){const _0x417bc7=_0x43bf95;let _0x3c7133=this[_0x417bc7(0x436)](_0x3ea482);if(!_0x3c7133)return!0x1;this[_0x417bc7(0x40b)]||(this['_floatingAnchor']=this[_0x417bc7(0x30f)]({'position':_0x3c7133})),this[_0x417bc7(0x36e)][_0x417bc7(0xa4f)](_0x14f7b9[_0x417bc7(0x6f1)],_0x3c7133);}[_0x43bf95(0x6dc)](_0x5b8416){const _0x219f3b=_0x43bf95;this[_0x219f3b(0x3f7)][_0x219f3b(0x1dd)][_0x219f3b(0x613)](_0x5b8416[_0x219f3b(0x84c)],this[_0x219f3b(0x13e)]);let _0x153b7e=this[_0x219f3b(0x436)](_0x5b8416);if(!_0x153b7e)return!0x1;this['_floatingAnchor']&&this[_0x219f3b(0x40b)][_0x219f3b(0x9a7)][_0x219f3b(0xa32)](_0x153b7e),this[_0x219f3b(0x36e)][_0x219f3b(0xa4f)](_0x14f7b9[_0x219f3b(0x641)],_0x153b7e);}[_0x43bf95(0x890)](_0x324920){const _0x559fe9=_0x43bf95;this[_0x559fe9(0x36e)][_0x559fe9(0xa4f)](_0x14f7b9['DRAW_STOP'],this['_getEventPosition'](_0x324920));}[_0x43bf95(0x30f)]({position:_0x4b5e84,isCenter:_0x484c8f=!0x1}){const _0xbd8924=_0x43bf95;var _0x384b5d;return this[_0xbd8924(0x6c8)]['entities'][_0xbd8924(0x45f)]({'position':_0x4b5e84,'billboard':{'image':_0x484c8f?this['_options']['icon_center']:this[_0xbd8924(0x674)][_0xbd8924(0x59a)],'width':this['_options'][_0xbd8924(0x126)][0x0],'height':this['_options']['icon_size'][0x1],'pixelOffset':this[_0xbd8924(0x674)][_0xbd8924(0x1f4)]||new _0x34d1e5[(_0xbd8924(0x7aa))][(_0xbd8924(0x48e))](0x0,0x0),'eyeOffset':this[_0xbd8924(0x674)][_0xbd8924(0x92d)]||new _0x34d1e5[(_0xbd8924(0x7aa))][(_0xbd8924(0x982))](0x0,0x0,-0x64),'disableDepthTestDistance':(_0x384b5d=this['_options'][_0xbd8924(0x564)])!=null?_0x384b5d:0x0,'heightReference':this['_viewer'][_0xbd8924(0x148)][_0xbd8924(0x6f7)]===_0x34d1e5['Cesium'][_0xbd8924(0xba)][_0xbd8924(0x5f3)]&&!this[_0xbd8924(0x674)][_0xbd8924(0xa2b)]?_0x34d1e5['Cesium'][_0xbd8924(0x89e)][_0xbd8924(0x827)]:_0x34d1e5[_0xbd8924(0x7aa)][_0xbd8924(0x89e)][_0xbd8924(0x60e)]}});}['_onClearAnchor'](){const _0x5bfa1d=_0x43bf95;this[_0x5bfa1d(0x6c8)][_0x5bfa1d(0x1f6)][_0x5bfa1d(0x207)]();}[_0x43bf95(0x4ac)](){const _0x74d794=_0x43bf95;this[_0x74d794(0x3f7)]['on'](_0x5b424c[_0x74d794(0x6c1)],this['_onClick'],this),this['_viewer']['on'](_0x5b424c[_0x74d794(0xa09)],this[_0x74d794(0x6dc)],this),this[_0x74d794(0x3f7)]['on'](_0x5b424c[_0x74d794(0x9b1)],this[_0x74d794(0x890)],this),this[_0x74d794(0x36e)]['on'](_0x14f7b9[_0x74d794(0x45b)],this['_onCreateAnchor'],this),this[_0x74d794(0x36e)]['on'](_0x14f7b9[_0x74d794(0x90a)],this['_onClearAnchor'],this);}['_unbindEvent'](){const _0x22e362=_0x43bf95;this[_0x22e362(0x3f7)][_0x22e362(0x24d)](_0x5b424c[_0x22e362(0x6c1)],this[_0x22e362(0x533)],this),this[_0x22e362(0x3f7)]['off'](_0x5b424c['MOUSE_MOVE'],this[_0x22e362(0x6dc)],this),this[_0x22e362(0x3f7)][_0x22e362(0x24d)](_0x5b424c[_0x22e362(0x9b1)],this[_0x22e362(0x890)],this),this[_0x22e362(0x36e)][_0x22e362(0x24d)](_0x14f7b9[_0x22e362(0x45b)],this['_onCreateAnchor'],this),this[_0x22e362(0x36e)][_0x22e362(0x24d)](_0x14f7b9[_0x22e362(0x90a)],this[_0x22e362(0x9a2)],this);}['on'](_0x39af19,_0x2a69ce,_0x25d2dc){return this['_plotEvent']['on'](_0x39af19,_0x2a69ce,_0x25d2dc||this),this;}[_0x43bf95(0x24d)](_0x2fae11,_0x1b700d,_0x171a45){const _0x4e2993=_0x43bf95;return this['_plotEvent'][_0x4e2993(0x24d)](_0x2fae11,_0x1b700d,_0x171a45||this),this;}[_0x43bf95(0xa4f)](_0xac9169,_0x1095c1={}){const _0x2dbcf7=_0x43bf95;return this[_0x2dbcf7(0x36e)][_0x2dbcf7(0xa4f)](_0xac9169,_0x1095c1),this;}[_0x43bf95(0x4fc)](_0x4fbf7d={}){const _0x8ef745=_0x43bf95;return this[_0x8ef745(0x3f7)][_0x8ef745(0x1dd)][_0x8ef745(0x35a)]=!0x0,this[_0x8ef745(0x674)]={..._0x118f2e,..._0x4fbf7d},this['_unbindEvent'](),this[_0x8ef745(0x4ac)](),this[_0x8ef745(0xa4f)](_0x14f7b9[_0x8ef745(0x575)],this['_options']),this;}[_0x43bf95(0x96a)](){const _0x9c90fc=_0x43bf95;return this[_0x9c90fc(0x2a1)](),this['_viewer']['tooltip']['enable']=!0x1,this[_0x9c90fc(0x6c8)][_0x9c90fc(0x1f6)][_0x9c90fc(0x207)](),this[_0x9c90fc(0x40b)]=void 0x0,this;}[_0x43bf95(0x3eb)](_0x10da38){const _0x5d394f=_0x43bf95;this[_0x5d394f(0x3f7)]=_0x10da38,this[_0x5d394f(0x3f7)][_0x5d394f(0x268)][_0x5d394f(0x45f)](this[_0x5d394f(0x6c8)]),Object[_0x5d394f(0x50a)](this[_0x5d394f(0x3f7)],_0x5d394f(0x95d),{'value':this,'writable':!0x1});}},_0x36c25b=_0x1b8c48,_0x3b2944=_0x43bf95(0x9c2),_0x481c05={'icon_center':_0x39638d,'icon_anchor':_0x46791e,'icon_midAnchor':_0x3b2944,'icon_size':[0xc,0xc],'clampToModel':!0x0},_0x2919d7=class{constructor(){const _0xd0c147=_0x43bf95;this[_0xd0c147(0x3f7)]=void 0x0,this[_0xd0c147(0x6c8)]=new _0x34d1e5[(_0xd0c147(0x7aa))]['CustomDataSource'](_0xd0c147(0x902)),this[_0xd0c147(0x674)]={},this[_0xd0c147(0x36e)]=new _0x3a7cdd(),this[_0xd0c147(0x13e)]=void 0x0,this[_0xd0c147(0x3e0)]=void 0x0,this[_0xd0c147(0xaac)]=!0x1,this[_0xd0c147(0x6e4)]=[];}set['tooltipMess'](_0x4f88b8){const _0x1afdcf=_0x43bf95;this[_0x1afdcf(0x13e)]=_0x4f88b8;}['_onClick'](_0x206c6e){const _0x40b65c=_0x43bf95;if(this[_0x40b65c(0xaac)]){let _0x1996cc=this[_0x40b65c(0x674)][_0x40b65c(0xa2b)]&&_0x206c6e['position']?_0x206c6e['position']:_0x206c6e[_0x40b65c(0x7b1)];if(!_0x1996cc)return!0x1;this[_0x40b65c(0x3e0)]&&this['_pickedAnchor'][_0x40b65c(0x9a7)]&&this['_pickedAnchor'][_0x40b65c(0x66f)]&&(this[_0x40b65c(0x3e0)][_0x40b65c(0x9a7)][_0x40b65c(0xa32)](_0x1996cc),this['_plotEvent'][_0x40b65c(0xa4f)](_0x14f7b9[_0x40b65c(0x753)],{'pickedAnchor':this[_0x40b65c(0x3e0)],'position':_0x1996cc})),this[_0x40b65c(0xaac)]=!0x1;}else{if(!_0x206c6e['target']||!_0x206c6e['target']['id'])return!0x1;this[_0x40b65c(0x3e0)]=_0x206c6e[_0x40b65c(0x418)]['id'],this[_0x40b65c(0xaac)]=!0x0;}}[_0x43bf95(0x6dc)](_0x4405ef){const _0x3cf12b=_0x43bf95;if(this[_0x3cf12b(0x3f7)][_0x3cf12b(0x1dd)][_0x3cf12b(0x613)](_0x4405ef[_0x3cf12b(0x84c)],this[_0x3cf12b(0x13e)]),!this[_0x3cf12b(0xaac)]&&this[_0x3cf12b(0x6e4)][_0x3cf12b(0x6a2)]!==0x0)return!0x1;let _0xbb6d40=this[_0x3cf12b(0x674)][_0x3cf12b(0xa2b)]&&_0x4405ef['position']?_0x4405ef[_0x3cf12b(0x9a7)]:_0x4405ef[_0x3cf12b(0x7b1)];if(!_0xbb6d40)return!0x1;this['_pickedAnchor']&&this['_pickedAnchor'][_0x3cf12b(0x9a7)]&&this[_0x3cf12b(0x3e0)]['properties']?(this[_0x3cf12b(0x3e0)][_0x3cf12b(0x9a7)][_0x3cf12b(0xa32)](_0xbb6d40),this[_0x3cf12b(0x36e)][_0x3cf12b(0xa4f)](_0x14f7b9[_0x3cf12b(0x641)],{'pickedAnchor':this[_0x3cf12b(0x3e0)],'position':_0xbb6d40})):this[_0x3cf12b(0x6e4)]['length']===0x0&&this[_0x3cf12b(0x36e)][_0x3cf12b(0xa4f)](_0x14f7b9[_0x3cf12b(0x641)],{'position':_0xbb6d40});}[_0x43bf95(0x890)](_0x2f9ff5){const _0x529fea=_0x43bf95;let _0x4d34a4=this['_options'][_0x529fea(0xa2b)]&&_0x2f9ff5[_0x529fea(0x9a7)]?_0x2f9ff5['position']:_0x2f9ff5[_0x529fea(0x7b1)];this[_0x529fea(0x36e)][_0x529fea(0xa4f)](_0x14f7b9['EDIT_STOP'],{'pickedAnchor':this['_pickedAnchor'],'position':_0x4d34a4});}[_0x43bf95(0x30f)]({position:_0x49c828,index:_0xb44d2f,isCenter:_0x4755b5=!0x1,isMid:_0x496927=!0x1}){const _0x126081=_0x43bf95;var _0x15fdd1;let _0x175b94=_0x496927?this[_0x126081(0x674)][_0x126081(0x2e6)]:_0x4755b5?this['_options']['icon_center']:this[_0x126081(0x674)][_0x126081(0x59a)],_0x18a5e7=this['_anchorLayer'][_0x126081(0x1f6)]['add']({'position':_0x49c828,'billboard':{'image':_0x175b94,'width':this[_0x126081(0x674)][_0x126081(0x126)][0x0],'height':this[_0x126081(0x674)][_0x126081(0x126)][0x1],'pixelOffset':this[_0x126081(0x674)][_0x126081(0x1f4)]||new _0x34d1e5['Cesium'][(_0x126081(0x48e))](0x0,0x0),'eyeOffset':this[_0x126081(0x674)][_0x126081(0x92d)]||new _0x34d1e5[(_0x126081(0x7aa))][(_0x126081(0x982))](0x0,0x0,-0x64),'disableDepthTestDistance':(_0x15fdd1=this[_0x126081(0x674)][_0x126081(0x564)])!=null?_0x15fdd1:0x0,'heightReference':this['_viewer'][_0x126081(0x148)]['mode']===_0x34d1e5['Cesium']['SceneMode'][_0x126081(0x5f3)]&&!this['_options'][_0x126081(0xa2b)]?_0x34d1e5[_0x126081(0x7aa)][_0x126081(0x89e)][_0x126081(0x827)]:_0x34d1e5[_0x126081(0x7aa)][_0x126081(0x89e)][_0x126081(0x60e)]},'properties':{'isMid':_0x496927,'index':_0xb44d2f}});this['_anchors'][_0x126081(0xb3)](_0x18a5e7);}[_0x43bf95(0x541)]({index:_0x46ae38,position:_0x5026fd}){const _0x1977e1=_0x43bf95;this['_anchors'][_0x46ae38]&&this[_0x1977e1(0x6e4)][_0x46ae38][_0x1977e1(0x9a7)][_0x1977e1(0xa32)](_0x5026fd);}[_0x43bf95(0x9a2)](){const _0x5c42b3=_0x43bf95;this[_0x5c42b3(0x6c8)][_0x5c42b3(0x1f6)][_0x5c42b3(0x207)](),this['_anchors']=[];}[_0x43bf95(0x4ac)](){const _0x32767e=_0x43bf95;this[_0x32767e(0x3f7)]['on'](_0x5b424c[_0x32767e(0x6c1)],this[_0x32767e(0x533)],this),this[_0x32767e(0x3f7)]['on'](_0x5b424c[_0x32767e(0xa09)],this[_0x32767e(0x6dc)],this),this[_0x32767e(0x3f7)]['on'](_0x5b424c[_0x32767e(0x9b1)],this[_0x32767e(0x890)],this),this[_0x32767e(0x36e)]['on'](_0x14f7b9[_0x32767e(0x45b)],this[_0x32767e(0x30f)],this),this['_plotEvent']['on'](_0x14f7b9['UPDATE_ANCHOR'],this['_onUpdateAnchor'],this),this['_plotEvent']['on'](_0x14f7b9[_0x32767e(0x90a)],this[_0x32767e(0x9a2)],this);}[_0x43bf95(0x2a1)](){const _0x127ce5=_0x43bf95;this['_viewer'][_0x127ce5(0x24d)](_0x5b424c['CLICK'],this[_0x127ce5(0x533)],this),this[_0x127ce5(0x3f7)]['off'](_0x5b424c[_0x127ce5(0xa09)],this[_0x127ce5(0x6dc)],this),this[_0x127ce5(0x3f7)][_0x127ce5(0x24d)](_0x5b424c[_0x127ce5(0x9b1)],this['_onRightClick'],this),this[_0x127ce5(0x36e)][_0x127ce5(0x24d)](_0x14f7b9[_0x127ce5(0x45b)],this[_0x127ce5(0x30f)],this),this[_0x127ce5(0x36e)][_0x127ce5(0x24d)](_0x14f7b9['UPDATE_ANCHOR'],this[_0x127ce5(0x541)],this),this[_0x127ce5(0x36e)]['off'](_0x14f7b9[_0x127ce5(0x90a)],this[_0x127ce5(0x9a2)],this);}['on'](_0x172d7d,_0x5db97f,_0x24ad17){const _0x5899cc=_0x43bf95;return this[_0x5899cc(0x36e)]['on'](_0x172d7d,_0x5db97f,_0x24ad17||this),this;}['off'](_0x448508,_0x3016fa,_0x16b185){const _0x4ec585=_0x43bf95;return this[_0x4ec585(0x36e)][_0x4ec585(0x24d)](_0x448508,_0x3016fa,_0x16b185||this),this;}[_0x43bf95(0xa4f)](_0x22ec1b,_0x276237){const _0x3c21af=_0x43bf95;return this[_0x3c21af(0x36e)]['fire'](_0x22ec1b,_0x276237),this;}[_0x43bf95(0x4fc)](_0x3048e7={}){const _0x26a408=_0x43bf95;return this[_0x26a408(0x6c8)][_0x26a408(0x1f6)][_0x26a408(0x207)](),this['_anchors']=[],this[_0x26a408(0x3f7)][_0x26a408(0x1dd)][_0x26a408(0x35a)]=!0x0,this[_0x26a408(0x674)]={..._0x481c05,..._0x3048e7},this[_0x26a408(0x2a1)](),this[_0x26a408(0x4ac)](),this[_0x26a408(0xa4f)](_0x14f7b9['EDIT_START'],this[_0x26a408(0x674)]),this;}[_0x43bf95(0x96a)](){const _0x4cfd44=_0x43bf95;return this[_0x4cfd44(0x2a1)](),this[_0x4cfd44(0x3f7)][_0x4cfd44(0x1dd)][_0x4cfd44(0x35a)]=!0x1,this[_0x4cfd44(0x6c8)][_0x4cfd44(0x1f6)][_0x4cfd44(0x207)](),this[_0x4cfd44(0x6e4)]=[],this;}[_0x43bf95(0x3eb)](_0x426d8d){const _0x424628=_0x43bf95;this['_viewer']=_0x426d8d,this[_0x424628(0x3f7)][_0x424628(0x268)]['add'](this[_0x424628(0x6c8)]),Object[_0x424628(0x50a)](this[_0x424628(0x3f7)],_0x424628(0x419),{'value':this,'writable':!0x1});}},_0x33f708=_0x2919d7;function _0xdfec5(){return{'drawTool':new _0x36c25b(),'editTool':new _0x33f708()};}var {ImageryLayer:_0x11522b}=_0x34d1e5['Cesium'],_0x54bcdd=class{constructor(_0x3e7536){const _0xe53a3=_0x43bf95;if(!_0x3e7536[_0xe53a3(0x7fd)])throw new Error('globe\x20is\x20required');this['_globe']=_0x3e7536[_0xe53a3(0x7fd)],this[_0xe53a3(0x582)]=[],this[_0xe53a3(0x51b)]=void 0x0,this[_0xe53a3(0x99e)]=0x0;}set[_0x43bf95(0xa63)](_0x1da35c){const _0x3ea593=_0x43bf95;if((!_0x1da35c||!_0x1da35c[_0x3ea593(0x12b)])&&new Error(_0x3ea593(0x1aa)),!(this['_selectedImageryLayer']&&_0x1da35c['id']===this[_0x3ea593(0x51b)]['id'])){if(this[_0x3ea593(0x51b)]&&_0x1da35c['id']!==this['_selectedImageryLayer']['id']){for(let _0x4846ff=0x0;_0x4846ff<this[_0x3ea593(0x51b)][_0x3ea593(0x65b)]['length'];_0x4846ff++)this['_globe'][_0x3ea593(0x22d)][_0x3ea593(0x109)](this[_0x3ea593(0x51b)][_0x3ea593(0x65b)][_0x4846ff]);_0x1da35c[_0x3ea593(0x65b)]=[];}for(let _0x4e22e0=_0x1da35c['layers'][_0x3ea593(0x6a2)]-0x1;_0x4e22e0>=0x0;_0x4e22e0--){let _0xe7ac14=_0x1da35c['layers'][_0x4e22e0],_0x1c7177=_0x11522b[_0x3ea593(0x6da)](_0xe7ac14,_0x1da35c[_0x3ea593(0x7e4)]);_0xe7ac14&&this[_0x3ea593(0x991)][_0x3ea593(0x22d)]['add'](_0x1c7177,0x0),_0x1da35c['cache'][_0x3ea593(0xb3)](_0x1c7177);}this[_0x3ea593(0x51b)]=_0x1da35c;}}get[_0x43bf95(0xa63)](){const _0x4f06a3=_0x43bf95;return this[_0x4f06a3(0x51b)];}[_0x43bf95(0x858)](_0x5be57e,_0x227f11={}){const _0x29fa2e=_0x43bf95;let _0x2bd7e6=[];return Array['isArray'](_0x5be57e)?_0x2bd7e6=_0x5be57e[_0x29fa2e(0x724)](0x0):_0x2bd7e6=[_0x5be57e],this['_count']++,this['_imageryLayers']['push']({'id':_0x29fa2e(0x923)+this[_0x29fa2e(0x99e)],'layers':_0x2bd7e6,'cache':[]}),this;}[_0x43bf95(0x3b1)](_0x55d804){const _0x554fb7=_0x43bf95;if(_0x55d804>this['_imageryLayers'][_0x554fb7(0x6a2)]-0x1)throw new Error(_0x554fb7(0x1b0));return this['selectedImageryLayer']=this['_imageryLayers'][_0x55d804],this;}},_0x79a8ba=_0x54bcdd,{BoxGeometry:_0x35d7c5,Cartesian3:_0xda035c,defined:_0x5dfe4d,DeveloperError:_0x5ab8a5,GeometryPipeline:_0x14a370,Matrix3:_0x48a9ac,Matrix4:_0x58c0aa,Transforms:_0xe413b3,VertexFormat:_0x597493,BufferUsage:_0x4ab98d,CubeMap:_0x2fd459,loadCubeMap:_0x492217,RenderState:_0x20e992,VertexArray:_0x4d4b2f,BlendingState:_0x247eba,SceneMode:_0x1046df,ShaderProgram:_0x51bf88,ShaderSource:_0x24402e,SkyBox:_0x47aec8}=_0x34d1e5['Cesium'],_0xf2b53f='\x0a\x20\x20uniform\x20samplerCube\x20u_cubeMap;\x0a\x20\x20in\x20vec3\x20v_texCoord;\x0a\x20\x20void\x20main()\x0a\x20\x20{\x0a\x20\x20\x20\x20vec4\x20color\x20=\x20czm_textureCube(u_cubeMap,\x20normalize(v_texCoord));\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(czm_gammaCorrect(color).rgb,\x20czm_morphTime);\x0a\x20\x20}\x0a',_0x4a8869=_0x43bf95(0x9a0),_0x1d2d4b=class extends _0x47aec8{constructor(_0x1f9183={}){const _0x30e7e1=_0x43bf95;super(_0x1f9183),this[_0x30e7e1(0x6c7)]=(_0x1f9183==null?void 0x0:_0x1f9183[_0x30e7e1(0x6c7)])||0x0;}[_0x43bf95(0x96f)](_0x39ec56,_0x1a3a04){const _0x5870ba=_0x43bf95;let _0x5c35de=this;if(!this['show']||_0x39ec56[_0x5870ba(0x6f7)]!==_0x1046df['SCENE3D']&&_0x39ec56[_0x5870ba(0x6f7)]!==_0x1046df[_0x5870ba(0x73d)]||!_0x39ec56[_0x5870ba(0x686)][_0x5870ba(0x9aa)])return;let _0x36db09=_0x39ec56['context'];if(this[_0x5870ba(0x269)]!==this['sources']){this['_sources']=this['sources'];let _0x4d4106=this[_0x5870ba(0x86e)];if(!_0x5dfe4d(_0x4d4106[_0x5870ba(0x537)])||!_0x5dfe4d(_0x4d4106[_0x5870ba(0x9f)])||!_0x5dfe4d(_0x4d4106[_0x5870ba(0x15b)])||!_0x5dfe4d(_0x4d4106[_0x5870ba(0x49e)])||!_0x5dfe4d(_0x4d4106[_0x5870ba(0x2bc)])||!_0x5dfe4d(_0x4d4106['negativeZ']))throw new _0x5ab8a5(_0x5870ba(0x502));if(typeof _0x4d4106[_0x5870ba(0x537)]!=typeof _0x4d4106[_0x5870ba(0x9f)]||typeof _0x4d4106[_0x5870ba(0x537)]!=typeof _0x4d4106[_0x5870ba(0x15b)]||typeof _0x4d4106[_0x5870ba(0x537)]!=typeof _0x4d4106[_0x5870ba(0x49e)]||typeof _0x4d4106['positiveX']!=typeof _0x4d4106[_0x5870ba(0x2bc)]||typeof _0x4d4106[_0x5870ba(0x537)]!=typeof _0x4d4106[_0x5870ba(0x4e3)])throw new _0x5ab8a5('this.sources\x20properties\x20must\x20all\x20be\x20the\x20same\x20type.');typeof _0x4d4106[_0x5870ba(0x537)]==_0x5870ba(0x55c)?_0x492217(_0x36db09,this[_0x5870ba(0x269)])[_0x5870ba(0x379)](function(_0xf6969){const _0x12f3cc=_0x5870ba;_0x5c35de[_0x12f3cc(0x4ee)]=_0x5c35de[_0x12f3cc(0x4ee)]&&_0x5c35de['_cubeMap'][_0x12f3cc(0x57b)](),_0x5c35de[_0x12f3cc(0x4ee)]=_0xf6969;}):(this[_0x5870ba(0x4ee)]=this[_0x5870ba(0x4ee)]&&this[_0x5870ba(0x4ee)][_0x5870ba(0x57b)](),this[_0x5870ba(0x4ee)]=new _0x2fd459({'context':_0x36db09,'source':_0x4d4106}));}let _0x23bab1=this['_command'];if(_0x23bab1['modelMatrix']=_0xe413b3['eastNorthUpToFixedFrame'](_0x39ec56[_0x5870ba(0x698)][_0x5870ba(0xa2)]),this[_0x5870ba(0x6c7)]!==0x0&&_0x58c0aa[_0x5870ba(0x310)](_0x23bab1[_0x5870ba(0xa0c)],_0x58c0aa[_0x5870ba(0x90c)](_0x48a9ac[_0x5870ba(0x353)](this[_0x5870ba(0x6c7)]/0xb4*Math['PI'])),_0x23bab1['modelMatrix']),!_0x5dfe4d(_0x23bab1[_0x5870ba(0x241)])){_0x23bab1[_0x5870ba(0x13a)]={'u_cubeMap':function(){const _0x308d02=_0x5870ba;return _0x5c35de[_0x308d02(0x4ee)];},'u_rotateMatrix':function(){const _0x80ed7d=_0x5870ba;return _0x58c0aa[_0x80ed7d(0x17d)](_0x23bab1[_0x80ed7d(0xa0c)],new _0x48a9ac());}};let _0x3d60a5=_0x35d7c5[_0x5870ba(0x1a4)](_0x35d7c5[_0x5870ba(0x944)]({'dimensions':new _0xda035c(0x2,0x2,0x2),'vertexFormat':_0x597493['POSITION_ONLY']})),_0x22e14=this[_0x5870ba(0x238)]=_0x14a370[_0x5870ba(0x41a)](_0x3d60a5);_0x23bab1[_0x5870ba(0x241)]=_0x4d4b2f['fromGeometry']({'context':_0x36db09,'geometry':_0x3d60a5,'attributeLocations':_0x22e14,'bufferUsage':_0x4ab98d[_0x5870ba(0x85a)]}),_0x23bab1['renderState']=_0x20e992[_0x5870ba(0x5ed)]({'blending':_0x247eba['ALPHA_BLEND']});}if(!_0x5dfe4d(_0x23bab1['shaderProgram'])||this[_0x5870ba(0x506)]!==_0x1a3a04){let _0x2a18f3=new _0x24402e({'defines':[_0x1a3a04?'HDR':''],'sources':[_0xf2b53f]});_0x23bab1['shaderProgram']=_0x51bf88[_0x5870ba(0x5ed)]({'context':_0x36db09,'vertexShaderSource':_0x4a8869,'fragmentShaderSource':_0x2a18f3,'attributeLocations':this[_0x5870ba(0x238)]}),this[_0x5870ba(0x506)]=_0x1a3a04;}if(_0x5dfe4d(this[_0x5870ba(0x4ee)]))return _0x23bab1;}},_0x4b798d=_0x1d2d4b,_0x2bdd65={'creditContainer':document[_0x43bf95(0x7dc)](_0x43bf95(0x7e1)),'creditViewport':document[_0x43bf95(0x7dc)]('div'),'baseLayer':!0x1,'shouldAnimate':!0x0},_0x258433=class{constructor(_0x2f001c,_0x3db835={}){const _0x4531ef=_0x43bf95;if(!_0x5c9d04(_0x4531ef(0x7f3)))throw new Error(_0x4531ef(0x3a7));if(!_0x2f001c||typeof _0x2f001c==_0x4531ef(0x55c)&&!document[_0x4531ef(0x309)](_0x2f001c))throw new Error(_0x4531ef(0x639));if(_0x2f001c instanceof HTMLElement)throw new Error(_0x4531ef(0x4e0));if(typeof _0x2f001c==_0x4531ef(0x55c)){let _0xc82313=_0x5c9d04('baseUrl');_0xc82313&&_0x34d1e5[_0x4531ef(0x7aa)]['buildModuleUrl']['setBaseUrl'](_0xc82313);}this['_delegate']=typeof _0x2f001c!=_0x4531ef(0x55c)?_0x2f001c:new _0x34d1e5[(_0x4531ef(0x7aa))][(_0x4531ef(0x2c6))](_0x2f001c,{..._0x2bdd65,..._0x3db835}),this[_0x4531ef(0xaa1)][_0x4531ef(0x790)][_0x4531ef(0x406)][_0x4531ef(0x256)]=_0x4531ef(0xa70),new _0x2f8030(this,_0x3db835),this[_0x4531ef(0x810)]=new _0x303577(),this['_sceneEvent']=new _0x1e38d6(this),this['_viewerOption']=new _0x484eb8(this),this[_0x4531ef(0xa2f)]=new _0x396d8b(this),this['_widgetContainer']=_0x5b03f8['create'](_0x4531ef(0x7e1),'viewer-widgets',typeof _0x2f001c==_0x4531ef(0x55c)?document['getElementById'](_0x2f001c):this['_delegate'][_0x4531ef(0x12a)]),this[_0x4531ef(0x79f)]=_0x5b03f8[_0x4531ef(0x484)](_0x4531ef(0x7e1),_0x4531ef(0x6ed),typeof _0x2f001c==_0x4531ef(0x55c)?document[_0x4531ef(0x309)](_0x2f001c):this[_0x4531ef(0xaa1)]['container']),this[_0x4531ef(0x82a)]=new _0x79a8ba({'globe':this['_delegate'][_0x4531ef(0x148)][_0x4531ef(0x7fd)]}),this[_0x4531ef(0x312)]={},this[_0x4531ef(0x25b)]={};let _0x52086c=_0x550848();Object[_0x4531ef(0x6f9)](_0x52086c)[_0x4531ef(0x2de)](_0x2dba43=>{const _0x2a3c9e=_0x4531ef;this[_0x2a3c9e(0x8b5)](_0x52086c[_0x2dba43]);});let _0x40ad30=_0xdfec5();Object['keys'](_0x40ad30)[_0x4531ef(0x2de)](_0x1b702a=>{this['_use'](_0x40ad30[_0x1b702a]);});}get[_0x43bf95(0x8ca)](){const _0x2c7f94=_0x43bf95;return this[_0x2c7f94(0xaa1)];}get[_0x43bf95(0x12a)](){const _0x2c706c=_0x43bf95;return this[_0x2c706c(0xaa1)][_0x2c706c(0x12a)];}get['widgetContainer'](){const _0x264bec=_0x43bf95;return this[_0x264bec(0x40e)];}get[_0x43bf95(0x136)](){const _0x4fc118=_0x43bf95;return this[_0x4fc118(0x79f)];}get['scene'](){const _0x3e8159=_0x43bf95;return this[_0x3e8159(0xaa1)]['scene'];}get[_0x43bf95(0x698)](){const _0x2732f7=_0x43bf95;return this[_0x2732f7(0xaa1)][_0x2732f7(0x698)];}get[_0x43bf95(0x790)](){const _0x21a5db=_0x43bf95;return this[_0x21a5db(0xaa1)]['scene'][_0x21a5db(0x790)];}get[_0x43bf95(0x268)](){const _0x14e4bc=_0x43bf95;return this['_delegate'][_0x14e4bc(0x268)];}get[_0x43bf95(0x22d)](){const _0x1ebee5=_0x43bf95;return this[_0x1ebee5(0xaa1)][_0x1ebee5(0x22d)];}get[_0x43bf95(0x4ed)](){const _0x62ec0e=_0x43bf95;return this['_delegate'][_0x62ec0e(0x4ed)];}get['entities'](){const _0x24e957=_0x43bf95;return this['_delegate'][_0x24e957(0x1f6)];}get[_0x43bf95(0x744)](){const _0x524375=_0x43bf95;return this[_0x524375(0xaa1)]['scene'][_0x524375(0x744)];}get[_0x43bf95(0xaad)](){const _0x33de87=_0x43bf95;return this[_0x33de87(0xaa1)][_0x33de87(0xaad)];}get[_0x43bf95(0x701)](){const _0x39459=_0x43bf95;return this[_0x39459(0x810)];}get['cameraPosition'](){const _0x310af5=_0x43bf95;var _0x299949,_0x3db680,_0x2dbf5b,_0x361f50,_0x55be53,_0x455b58,_0x7c244b;let _0x5617a1=_0x5e5f93['transformCartographicToWGS84']((_0x299949=this['camera'])==null?void 0x0:_0x299949[_0x310af5(0x52b)]);return _0x5617a1&&(_0x5617a1['heading']=_0x34d1e5[_0x310af5(0x7aa)][_0x310af5(0x72b)][_0x310af5(0x438)]((_0x2dbf5b=(_0x3db680=this[_0x310af5(0x698)])==null?void 0x0:_0x3db680['heading'])!=null?_0x2dbf5b:0x0),_0x5617a1[_0x310af5(0x442)]=_0x34d1e5[_0x310af5(0x7aa)][_0x310af5(0x72b)][_0x310af5(0x438)]((_0x55be53=(_0x361f50=this[_0x310af5(0x698)])==null?void 0x0:_0x361f50['pitch'])!=null?_0x55be53:0x0),_0x5617a1['roll']=_0x34d1e5[_0x310af5(0x7aa)][_0x310af5(0x72b)][_0x310af5(0x438)]((_0x7c244b=(_0x455b58=this[_0x310af5(0x698)])==null?void 0x0:_0x455b58['roll'])!=null?_0x7c244b:0x0)),_0x5617a1;}get[_0x43bf95(0x88d)](){const _0xe53df9=_0x43bf95;let _0x2448d=this[_0xe53df9(0x148)]['canvas'][_0xe53df9(0x371)],_0x23c045=this['scene']['canvas'][_0xe53df9(0x795)],_0x2dc6a1=_0x5e5f93[_0xe53df9(0x364)](new _0x34d1e5[(_0xe53df9(0x7aa))][(_0xe53df9(0x48e))](_0x2448d/0x2|0x0,_0x23c045-0x1),this),_0x31295d=_0x5e5f93[_0xe53df9(0x364)](new _0x34d1e5['Cesium'][(_0xe53df9(0x48e))](0x1+_0x2448d/0x2|0x0,_0x23c045-0x1),this);return!_0x2dc6a1||!_0x31295d?0x1:Math['abs'](_0x2dc6a1[_0xe53df9(0x598)]-_0x31295d[_0xe53df9(0x598)]);}get['viewBounds'](){const _0x47d31=_0x43bf95;let _0x5c626b=this[_0x47d31(0x148)][_0x47d31(0x790)]['width'],_0x56be87=this[_0x47d31(0x148)][_0x47d31(0x790)]['height'],_0x421235=_0x5e5f93[_0x47d31(0x364)](new _0x34d1e5[(_0x47d31(0x7aa))]['Cartesian2'](0x0,_0x56be87),this),_0x3b7597=_0x5e5f93[_0x47d31(0x364)](new _0x34d1e5['Cesium']['Cartesian2'](_0x5c626b,0x0),this);return!_0x421235||!_0x3b7597?_0x34d1e5['Cesium'][_0x47d31(0x6e7)][_0x47d31(0x1fc)]:_0x34d1e5[_0x47d31(0x7aa)]['Rectangle'][_0x47d31(0x81e)](_0x421235[_0x47d31(0x598)],_0x421235['lat'],_0x3b7597[_0x47d31(0x598)],_0x3b7597['lat']);}get[_0x43bf95(0x525)](){const _0x1148e2=_0x43bf95;let _0x543d43=this['camera'][_0x1148e2(0x52b)][_0x1148e2(0x795)],_0x37bfc2=40487.57,_0x1cfdd1=0.00007096758,_0x2c7638=91610.74,_0x1aa913=-40467.74;return Math[_0x1148e2(0x440)](_0x1aa913+(_0x37bfc2-_0x1aa913)/(0x1+Math[_0x1148e2(0x191)](_0x543d43/_0x2c7638,_0x1cfdd1)));}['_use'](_0x2e9349){return _0x2e9349&&_0x2e9349['install']&&_0x2e9349['install'](this),this;}['_addLayerGroup'](_0x2f2a14){const _0x38d90d=_0x43bf95;_0x2f2a14!=null&&_0x2f2a14[_0x38d90d(0x937)]&&!Object(this[_0x38d90d(0x312)])[_0x38d90d(0x373)](_0x2f2a14['id'])&&(_0x2f2a14['layerGroupEvent'][_0x38d90d(0xa4f)](_0x2a0e44['ADD'],this),this[_0x38d90d(0x312)][_0x2f2a14['id']]=_0x2f2a14);}[_0x43bf95(0x5f6)](_0x1f9345){const _0xd7c2a6=_0x43bf95;_0x1f9345!=null&&_0x1f9345['layerGroupEvent']&&Object(this[_0xd7c2a6(0x312)])['hasOwnProperty'](_0x1f9345['id'])&&(_0x1f9345[_0xd7c2a6(0x937)][_0xd7c2a6(0xa4f)](_0x2a0e44['REMOVE'],this),delete this[_0xd7c2a6(0x312)][_0x1f9345['id']]);}[_0x43bf95(0x823)](_0x2751d3){const _0x6284f5=_0x43bf95;!this[_0x6284f5(0x25b)][_0x2751d3[_0x6284f5(0x9cf)]]&&(this['_layerCache'][_0x2751d3[_0x6284f5(0x9cf)]]={}),Object(this[_0x6284f5(0x25b)][_0x2751d3['type']])[_0x6284f5(0x373)](_0x2751d3['id'])||(_0x2751d3['fire'](_0x3a74c0[_0x6284f5(0x123)],this),this[_0x6284f5(0x25b)][_0x2751d3[_0x6284f5(0x9cf)]][_0x2751d3['id']]=_0x2751d3);}[_0x43bf95(0x315)](_0x2d5b20){const _0x870354=_0x43bf95;Object(this['_layerCache'][_0x2d5b20[_0x870354(0x9cf)]])[_0x870354(0x373)](_0x2d5b20['id'])&&(_0x2d5b20[_0x870354(0xa4f)](_0x3a74c0[_0x870354(0x6d8)],this),delete this[_0x870354(0x25b)][_0x2d5b20[_0x870354(0x9cf)]][_0x2d5b20['id']]);}[_0x43bf95(0x5cc)](_0x2b55d9){const _0x5385b6=_0x43bf95;return this[_0x5385b6(0x948)][_0x5385b6(0x5cc)](_0x2b55d9),this;}[_0x43bf95(0x739)](_0x185b7e=-0x5a,_0xff6c56=-0x14){const _0x5745f9=_0x43bf95;return this[_0x5745f9(0xa2f)]['setPitchRange'](_0x185b7e,_0xff6c56),this;}[_0x43bf95(0x707)](_0x1cd6ee,_0x44343b=0x0){const _0x4c8e28=_0x43bf95;return _0x1cd6ee===0x2?this[_0x4c8e28(0xaa1)][_0x4c8e28(0x148)][_0x4c8e28(0x143)](_0x44343b):_0x1cd6ee===0x3?this['_delegate'][_0x4c8e28(0x148)][_0x4c8e28(0x3a9)](_0x44343b):_0x1cd6ee===2.5&&this['_delegate'][_0x4c8e28(0x148)][_0x4c8e28(0x3d0)](_0x44343b),this;}[_0x43bf95(0xa7d)](_0x4177ec){const _0x4ddd75=_0x43bf95;return this[_0x4ddd75(0xa2f)][_0x4ddd75(0xa7d)](_0x4177ec),this;}[_0x43bf95(0x6b8)](_0x59bae8){const _0x549476=_0x43bf95;return this[_0x549476(0xaa1)]['scene']['setTerrain'](new _0x34d1e5[(_0x549476(0x7aa))][(_0x549476(0x434))](_0x59bae8||Promise[_0x549476(0x509)](new _0x34d1e5[(_0x549476(0x7aa))][(_0x549476(0x940))]()))),this;}[_0x43bf95(0x5d0)](_0x1e64c6,_0x294109={}){const _0x266c33=_0x43bf95;return _0x1e64c6?(this['_baseLayerPicker'][_0x266c33(0x858)](_0x1e64c6,_0x294109),this[_0x266c33(0x82a)][_0x266c33(0xa63)]||this[_0x266c33(0x82a)][_0x266c33(0x3b1)](0x0),this['mapSwitch']&&this[_0x266c33(0x3fa)][_0x266c33(0x42e)](_0x294109),this):this;}['changeBaseLayer'](_0x6f2559){const _0xb2f7c8=_0x43bf95;return this['_baseLayerPicker'][_0xb2f7c8(0x3b1)](_0x6f2559),this;}[_0x43bf95(0x76d)](_0x51fe7e){const _0x524377=_0x43bf95;let _0x202e70=this[_0x524377(0xaa1)]['camera'][_0x524377(0xa3)](_0x51fe7e);return this['_delegate'][_0x524377(0x22d)][_0x524377(0x462)](_0x202e70,this[_0x524377(0xaa1)]['scene']);}[_0x43bf95(0x19c)](_0x29f9ca){const _0x100bda=_0x43bf95;return this[_0x100bda(0x354)](_0x29f9ca),this;}[_0x43bf95(0x5ef)](_0x2752e4){const _0x2cf40c=_0x43bf95;return this[_0x2cf40c(0x5f6)](_0x2752e4),this;}[_0x43bf95(0x277)](_0x1a1ba8){return this['_layerGroupCache'][_0x1a1ba8]||void 0x0;}[_0x43bf95(0x4ea)](_0x17bb54){return this['_addLayer'](_0x17bb54),this;}[_0x43bf95(0x2a6)](_0xcd8304){const _0x55208a=_0x43bf95;return this[_0x55208a(0x315)](_0xcd8304),this;}[_0x43bf95(0x660)](_0x1331eb){const _0x2333fc=_0x43bf95;return Object(this[_0x2333fc(0x25b)][_0x1331eb[_0x2333fc(0x9cf)]])['hasOwnProperty'](_0x1331eb['id']);}[_0x43bf95(0x803)](_0x3e4ecb){const _0x11b8e3=_0x43bf95;let _0x444237=this[_0x11b8e3(0x89c)]()[_0x11b8e3(0x738)](_0x387f2e=>_0x387f2e['id']===_0x3e4ecb);return _0x444237&&_0x444237[_0x11b8e3(0x6a2)]?_0x444237[0x0]:void 0x0;}['getLayers'](){const _0x40774e=_0x43bf95;let _0x3ad331=[];return Object[_0x40774e(0x6f9)](this[_0x40774e(0x25b)])[_0x40774e(0x2de)](_0xae4d7a=>{const _0x3610b3=_0x40774e;let _0x84284d=this['_layerCache'][_0xae4d7a];Object[_0x3610b3(0x6f9)](_0x84284d)[_0x3610b3(0x2de)](_0x1e9679=>{const _0x196f41=_0x3610b3;_0x3ad331[_0x196f41(0xb3)](_0x84284d[_0x1e9679]);});}),_0x3ad331;}[_0x43bf95(0x2ad)](_0x141f3a,_0x37ad34){const _0x487447=_0x43bf95;return Object[_0x487447(0x6f9)](this[_0x487447(0x25b)])['forEach'](_0x166fac=>{const _0x49d6a0=_0x487447;let _0x57fff2=this[_0x49d6a0(0x25b)][_0x166fac];Object[_0x49d6a0(0x6f9)](_0x57fff2)[_0x49d6a0(0x2de)](_0x5af8df=>{const _0x3c57e7=_0x49d6a0;_0x141f3a[_0x3c57e7(0x7a4)](_0x37ad34,_0x57fff2[_0x5af8df]);});}),this;}[_0x43bf95(0xa30)](_0x4d00a2,_0x470b21){const _0x2bff6f=_0x43bf95;return this[_0x2bff6f(0xaa1)][_0x2bff6f(0xa30)]((_0x4d00a2==null?void 0x0:_0x4d00a2['delegate'])||_0x4d00a2,{'duration':_0x470b21}),this;}[_0x43bf95(0xa11)](_0x2f2ffc){const _0x320376=_0x43bf95;return this[_0x320376(0xaa1)][_0x320376(0xa11)]((_0x2f2ffc==null?void 0x0:_0x2f2ffc[_0x320376(0x8ca)])||_0x2f2ffc),this;}['flyToPosition'](_0x4c8cf9,_0x2e67ed,_0x3038a3){const _0x30cbaf=_0x43bf95;return _0x4c8cf9=_0x16f48b[_0x30cbaf(0x81a)](_0x4c8cf9),this[_0x30cbaf(0x698)][_0x30cbaf(0xa30)]({'destination':_0x5e5f93['transformWGS84ToCartesian'](_0x4c8cf9),'orientation':{'heading':_0x34d1e5['Cesium'][_0x30cbaf(0x72b)][_0x30cbaf(0x2b0)](_0x4c8cf9[_0x30cbaf(0x77c)]),'pitch':_0x34d1e5['Cesium']['Math']['toRadians'](_0x4c8cf9[_0x30cbaf(0x442)]),'roll':_0x34d1e5[_0x30cbaf(0x7aa)][_0x30cbaf(0x72b)]['toRadians'](_0x4c8cf9['roll'])},'complete':_0x2e67ed,'duration':_0x3038a3}),this;}[_0x43bf95(0x358)](_0x48547d,_0x31cda8){const _0x26adab=_0x43bf95;return this[_0x26adab(0xa03)](_0x48547d,_0x31cda8,0x0),this;}[_0x43bf95(0xb4)](_0x2e3648,{heading:_0x131224=0x0,pitch:_0x1174a3=0x0,roll:_0x2f560a=0x0},_0x50543c,_0x49568e){const _0x2f15f0=_0x43bf95;return _0x2e3648?(Array[_0x2f15f0(0x636)](_0x2e3648)||(_0x2e3648=_0x2e3648[_0x2f15f0(0x4f3)](',')),this['camera'][_0x2f15f0(0xa30)]({'destination':_0x34d1e5[_0x2f15f0(0x7aa)][_0x2f15f0(0x6e7)][_0x2f15f0(0x81e)](_0x2e3648[0x0],_0x2e3648[0x1],_0x2e3648[0x2],_0x2e3648[0x3]),'orientation':{'heading':_0x34d1e5[_0x2f15f0(0x7aa)][_0x2f15f0(0x72b)]['toRadians'](_0x131224),'pitch':_0x34d1e5[_0x2f15f0(0x7aa)][_0x2f15f0(0x72b)][_0x2f15f0(0x2b0)](_0x1174a3),'roll':_0x34d1e5[_0x2f15f0(0x7aa)]['Math'][_0x2f15f0(0x2b0)](_0x2f560a)},'complete':_0x50543c,'duration':_0x49568e}),this):this;}[_0x43bf95(0x2e2)](_0x3093db,{heading:_0x522670=0x0,pitch:_0x3d74d8=0x0,roll:_0x1bf856=0x0},_0x164493){return this['flyToBounds'](_0x3093db,{'heading':_0x522670,'pitch':_0x3d74d8,'roll':_0x1bf856},_0x164493),this;}['on'](_0x32edd9,_0x181fc0,_0x4c569d){const _0x33a3b6=_0x43bf95;return this['_viewerEvent']['on'](_0x32edd9,_0x181fc0,_0x4c569d||this),this[_0x33a3b6(0xa5a)]['on'](_0x32edd9,_0x181fc0,_0x4c569d||this),this;}['once'](_0x5006bd,_0x30aff0,_0x240056){const _0x19b67f=_0x43bf95;return this['_viewerEvent'][_0x19b67f(0x12e)](_0x5006bd,_0x30aff0,_0x240056||this),this;}['off'](_0x525392,_0x584126,_0x523dd8){const _0x5974f2=_0x43bf95;return this[_0x5974f2(0x810)][_0x5974f2(0x24d)](_0x525392,_0x584126,_0x523dd8||this),this[_0x5974f2(0xa5a)][_0x5974f2(0x24d)](_0x525392,_0x584126,_0x523dd8||this),this;}[_0x43bf95(0x57b)](){const _0x4b6e42=_0x43bf95;return Object[_0x4b6e42(0x6f9)](this[_0x4b6e42(0x25b)])[_0x4b6e42(0x2de)](_0x2ded6b=>{const _0x4b0ba8=_0x4b6e42;let _0x3f883d=this[_0x4b0ba8(0x25b)][_0x2ded6b];Object['keys'](_0x3f883d)['forEach'](_0x514a0c=>{this['_removeLayer'](_0x3f883d[_0x514a0c]);});}),this['_delegate']['destroy'](),this[_0x4b6e42(0xaa1)]=void 0x0,this[_0x4b6e42(0x82a)]=void 0x0,this[_0x4b6e42(0x25b)]={},this[_0x4b6e42(0x40e)]['parentNode']['removeChild'](this[_0x4b6e42(0x40e)]),this['_widgetContainer']=void 0x0,this['_layerContainer'][_0x4b6e42(0x406)][_0x4b6e42(0x6c5)](this[_0x4b6e42(0x79f)]),this[_0x4b6e42(0x79f)]=void 0x0,this;}[_0x43bf95(0xa96)](_0x5a9131){const _0x71d004=_0x43bf95;this[_0x71d004(0x148)][_0x71d004(0x9aa)]();let _0x1dbecf=this[_0x71d004(0x790)][_0x71d004(0x578)]('image/png')[_0x71d004(0x965)](_0x71d004(0x9de),_0x71d004(0x6cc)),_0x3ea43f=document['createElement']('a'),_0x34ca1c=_0x3f7522['dataURLtoBlob'](_0x1dbecf),_0x3f6d08=URL[_0x71d004(0x6b7)](_0x34ca1c);return _0x3ea43f['download']=(_0x5a9131||_0x71d004(0x148))+_0x71d004(0x3f3),_0x3ea43f[_0x71d004(0xa79)]=_0x3f6d08,_0x3ea43f[_0x71d004(0x618)](),this;}[_0x43bf95(0x665)](){const _0x7817ba=_0x43bf95;var _0x5b8663;let _0x1628dd={'x':0x0,'y':0x0},_0xf2d090=(_0x5b8663=this[_0x7817ba(0xaa1)])==null?void 0x0:_0x5b8663['container'];if(_0xf2d090){if(_0xf2d090['getBoundingClientRect']){let _0x4442b1=_0xf2d090[_0x7817ba(0x36c)]();_0x1628dd['x']=_0x4442b1[_0x7817ba(0x910)],_0x1628dd['y']=_0x4442b1[_0x7817ba(0x330)];}else _0x1628dd['x']=_0xf2d090[_0x7817ba(0x6f4)],_0x1628dd['y']=_0xf2d090['offsetTop'];}return _0x1628dd;}},_0x2e7414=_0x258433,_0x45d0a0={'ARCGIS':_0x43bf95(0x104),'BING':'bing','OSM':_0x43bf95(0x5f9),'SINGLE_TILE':_0x43bf95(0x607),'WMS':_0x43bf95(0x3d8),'WMTS':_0x43bf95(0x726),'XYZ':_0x43bf95(0x8ed),'COORD':_0x43bf95(0x6ae),'GRID':_0x43bf95(0x627),'MAPBOX':_0x43bf95(0x1ea),'MAPBOX_STYLE':_0x43bf95(0x697),'TMS':_0x43bf95(0x2a8)},_0x234967=_0x45d0a0,_0x15692f=class extends _0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x181)]{constructor(_0x4739cd){const _0xa636f5=_0x43bf95;super(_0x4739cd);let _0x5f03f8=new _0x34d1e5[(_0xa636f5(0x7aa))][(_0xa636f5(0xa43))]();this[_0xa636f5(0x943)]['project']=function(_0x187c81,_0x4390fc){const _0x5159da=_0xa636f5;return _0x4390fc=_0x3dccda['WGS84ToGCJ02'](_0x34d1e5[_0x5159da(0x7aa)][_0x5159da(0x72b)]['toDegrees'](_0x187c81[_0x5159da(0xc9)]),_0x34d1e5[_0x5159da(0x7aa)][_0x5159da(0x72b)][_0x5159da(0x438)](_0x187c81[_0x5159da(0xa6e)])),_0x4390fc=_0x5f03f8[_0x5159da(0x4bb)](new _0x34d1e5[(_0x5159da(0x7aa))][(_0x5159da(0x4f1))](_0x34d1e5[_0x5159da(0x7aa)][_0x5159da(0x72b)]['toRadians'](_0x4390fc[0x0]),_0x34d1e5[_0x5159da(0x7aa)][_0x5159da(0x72b)]['toRadians'](_0x4390fc[0x1]))),new _0x34d1e5[(_0x5159da(0x7aa))][(_0x5159da(0x48e))](_0x4390fc['x'],_0x4390fc['y']);},this[_0xa636f5(0x943)][_0xa636f5(0x955)]=function(_0x4908ac,_0xf8de64){const _0x1a7bf6=_0xa636f5;let _0x417d63=_0x5f03f8[_0x1a7bf6(0x955)](_0x4908ac);return _0xf8de64=_0x3dccda[_0x1a7bf6(0x273)](_0x34d1e5[_0x1a7bf6(0x7aa)][_0x1a7bf6(0x72b)]['toDegrees'](_0x417d63[_0x1a7bf6(0xc9)]),_0x34d1e5['Cesium'][_0x1a7bf6(0x72b)]['toDegrees'](_0x417d63[_0x1a7bf6(0xa6e)])),new _0x34d1e5['Cesium'][(_0x1a7bf6(0x4f1))](_0x34d1e5['Cesium'][_0x1a7bf6(0x72b)][_0x1a7bf6(0x2b0)](_0xf8de64[0x0]),_0x34d1e5[_0x1a7bf6(0x7aa)]['Math']['toRadians'](_0xf8de64[0x1]));};}},_0xd4046c=_0x15692f,_0x1adcf6={'img':_0x43bf95(0x9f0),'elec':_0x43bf95(0x65f),'cva':_0x43bf95(0x6f5)},_0x7dab15=class extends _0x34d1e5['Cesium'][_0x43bf95(0x332)]{constructor(_0x4e1733={}){const _0x305347=_0x43bf95;_0x4e1733[_0x305347(0x5e3)]=_0x4e1733[_0x305347(0x5e3)]||[_0x4e1733[_0x305347(0x693)]||'',_0x1adcf6[_0x4e1733[_0x305347(0x6a9)]]||_0x1adcf6['elec']][_0x305347(0x9e0)](''),_0x4e1733[_0x305347(0x2da)]=_0x4e1733[_0x305347(0x2da)]||['01','02','03','04'],_0x4e1733['crs']===_0x305347(0x423)&&(_0x4e1733['tilingScheme']=new _0xd4046c()),super(_0x4e1733);}};_0x234967[_0x43bf95(0xd7)]=_0x43bf95(0x9a);var _0x2ed2f0=_0x7dab15,_0x2014d2=6370996.81,_0x47d2c5=[12890594.86,8362377.87,0x554fed,3481989.83,1678043.12,0x0],_0x271593=[0x4b,0x3c,0x2d,0x1e,0xf,0x0],_0x2cfbf2=[[1.410526172116255e-8,0.00000898305509648872,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-0.03801003308653,17337981.2],[-7.435856389565537e-9,0.000008983055097726239,-0.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,10260144.86],[-3.030883460898826e-8,0.00000898305509983578,0.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,0.32710905363475,6856817.37],[-1.981981304930552e-8,0.000008983055099779535,0.03278182852591,40.31678527705744,0.65659298677277,-4.44255534477492,0.85341911805263,0.12923347998204,-0.04625736007561,4482777.06],[3.09191371068437e-9,0.000008983055096812155,0.00006995724062,23.10934304144901,-0.00023663490511,-0.6321817810242,-0.00663494467273,0.03430082397953,-0.00466043876332,2555164.4],[2.890871144776878e-9,0.000008983055095805407,-3.068298e-8,7.47137025468032,-0.00000353937994,-0.02145144861037,-0.00001234426596,0.00010322952773,-0.00000323890364,826088.5]],_0x42b22d=[[-0.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[0.0008277824516172526,111320.7020463578,647795574.6671607,-4082003173.641316,10774905663.51142,-15171875531.51559,12053065338.62167,-5124939663.577472,913311935.9512032,67.5],[0.00337398766765,111320.7020202162,4481351.045890365,-23393751.19931662,79682215.47186455,-115964993.2797253,97236711.15602145,-43661946.33752821,8477230.501135234,52.5],[0.00220636496208,111320.7020209128,51751.86112841131,3796837.749470245,992013.7397791013,-1221952.21711287,1340652.697009075,-620943.6990984312,144416.9293806241,37.5],[-0.0003441963504368392,111320.7020576856,278.2353980772752,2485758.690035394,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-0.0003218135878613132,111320.7020701615,0.00369383431289,823725.6402795718,0.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,0.37238884252424,7.45]],_0x53826a=class{constructor(){const _0x129b72=_0x43bf95;this[_0x129b72(0x6d3)]=!0x1;}[_0x43bf95(0x140)](_0x140e7e,_0x2e4eba){const _0xa2441e=_0x43bf95;if(!_0x140e7e||!_0x2e4eba||(_0x140e7e=this[_0xa2441e(0xcc)](_0x140e7e),!_0x140e7e))return 0x0;let _0x9bfa8c=this['toRadians'](_0x140e7e[_0xa2441e(0x598)]),_0x2c721e=this[_0xa2441e(0x2b0)](_0x140e7e[_0xa2441e(0x941)]);if(_0x2e4eba=this[_0xa2441e(0xcc)](_0x2e4eba),!_0x2e4eba)return 0x0;let _0xfadbaf=this[_0xa2441e(0x2b0)](_0x2e4eba[_0xa2441e(0x598)]),_0x3ec820=this[_0xa2441e(0x2b0)](_0x2e4eba[_0xa2441e(0x941)]);return this['getDistance'](_0x9bfa8c,_0xfadbaf,_0x2c721e,_0x3ec820);}[_0x43bf95(0x386)](_0x65526f,_0x174f45){const _0x287a78=_0x43bf95;if(!_0x65526f||!_0x174f45)return 0x0;_0x65526f[_0x287a78(0x598)]=this[_0x287a78(0x482)](_0x65526f[_0x287a78(0x598)],-0xb4,0xb4),_0x65526f[_0x287a78(0x941)]=this[_0x287a78(0x2e8)](_0x65526f['lat'],-0x4a,0x4a),_0x174f45[_0x287a78(0x598)]=this[_0x287a78(0x482)](_0x174f45[_0x287a78(0x598)],-0xb4,0xb4),_0x174f45[_0x287a78(0x941)]=this[_0x287a78(0x2e8)](_0x174f45[_0x287a78(0x941)],-0x4a,0x4a);let _0x209b1e=this['toRadians'](_0x65526f['lng']),_0x3a0697=this[_0x287a78(0x2b0)](_0x65526f[_0x287a78(0x941)]),_0x4b04c6=this['toRadians'](_0x174f45[_0x287a78(0x598)]),_0x3bbdab=this[_0x287a78(0x2b0)](_0x174f45[_0x287a78(0x941)]);return this[_0x287a78(0x46b)](_0x209b1e,_0x4b04c6,_0x3a0697,_0x3bbdab);}[_0x43bf95(0xcc)](_0x412534){const _0x5f24e5=_0x43bf95;if(!_0x412534)return{'lng':0x0,'lat':0x0};let _0x51290a={};if(this[_0x5f24e5(0x6d3)]){_0x51290a[_0x5f24e5(0x598)]=_0x412534['lng']/20037508.34*0xb4;let _0x1dedae=_0x412534['lat']/20037508.34*0xb4;return _0x51290a[_0x5f24e5(0x941)]=0xb4/Math['PI']*(0x2*Math[_0x5f24e5(0x8e6)](Math[_0x5f24e5(0x204)](_0x1dedae*Math['PI']/0xb4))-Math['PI']/0x2),{'lng':_0x51290a[_0x5f24e5(0x598)][_0x5f24e5(0x964)](0x6),'lat':_0x51290a[_0x5f24e5(0x941)][_0x5f24e5(0x964)](0x6)};}let _0x1e6333={'lng':Math['abs'](_0x412534[_0x5f24e5(0x598)]),'lat':Math['abs'](_0x412534[_0x5f24e5(0x941)])},_0xc63f05;for(let _0xb40540=0x0;_0xb40540<_0x47d2c5[_0x5f24e5(0x6a2)];_0xb40540++)if(_0x1e6333['lat']>=_0x47d2c5[_0xb40540]){_0xc63f05=_0x2cfbf2[_0xb40540];break;}return _0x51290a=this[_0x5f24e5(0x44e)](_0x412534,_0xc63f05),{'lng':_0x51290a[_0x5f24e5(0x598)]['toFixed'](0x6),'lat':_0x51290a[_0x5f24e5(0x941)]['toFixed'](0x6)};}['convertLL2MC'](_0x4a255f){const _0x68a914=_0x43bf95;if(!_0x4a255f)return{'lng':0x0,'lat':0x0};if(_0x4a255f['lng']>0xb4||_0x4a255f[_0x68a914(0x598)]<-0xb4||_0x4a255f[_0x68a914(0x941)]>0x5a||_0x4a255f['lat']<-0x5a)return _0x4a255f;if(this[_0x68a914(0x6d3)]){let _0x54fa24={},_0x589909=0x615299;_0x54fa24[_0x68a914(0x598)]=_0x4a255f[_0x68a914(0x598)]*Math['PI']/0xb4*_0x589909;let _0x2ca8ac=_0x4a255f[_0x68a914(0x941)]*Math['PI']/0xb4;return _0x54fa24[_0x68a914(0x941)]=_0x589909/0x2*Math[_0x68a914(0x7e6)]((0x1+Math['sin'](_0x2ca8ac))/(0x1-Math[_0x68a914(0xb8)](_0x2ca8ac))),{'lng':parseFloat(_0x54fa24['lng'][_0x68a914(0x964)](0x2)),'lat':parseFloat(_0x54fa24['lat'][_0x68a914(0x964)](0x2))};}_0x4a255f[_0x68a914(0x598)]=this[_0x68a914(0x482)](_0x4a255f[_0x68a914(0x598)],-0xb4,0xb4),_0x4a255f[_0x68a914(0x941)]=this['getRange'](_0x4a255f[_0x68a914(0x941)],-0x4a,0x4a);let _0x6f76f4={'lng':_0x4a255f[_0x68a914(0x598)],'lat':_0x4a255f[_0x68a914(0x941)]},_0x59dcf9;for(let _0x561b45=0x0;_0x561b45<_0x271593['length'];_0x561b45++)if(_0x6f76f4[_0x68a914(0x941)]>=_0x271593[_0x561b45]){_0x59dcf9=_0x42b22d[_0x561b45];break;}if(!_0x59dcf9){for(let _0x47c301=0x0;_0x47c301<_0x271593[_0x68a914(0x6a2)];_0x47c301++)if(_0x6f76f4[_0x68a914(0x941)]<=-_0x271593[_0x47c301]){_0x59dcf9=_0x42b22d[_0x47c301];break;}}let _0x144deb=this[_0x68a914(0x44e)](_0x4a255f,_0x59dcf9);return{'lng':parseFloat(_0x144deb['lng']['toFixed'](0x2)),'lat':parseFloat(_0x144deb[_0x68a914(0x941)][_0x68a914(0x964)](0x2))};}[_0x43bf95(0x44e)](_0x41e838,_0x2fa8cb){const _0x5ee9dc=_0x43bf95;if(!_0x41e838||!_0x2fa8cb)return{'lng':0x0,'lat':0x0};let _0x5550bc=_0x2fa8cb[0x0]+_0x2fa8cb[0x1]*Math[_0x5ee9dc(0x133)](_0x41e838[_0x5ee9dc(0x598)]),_0x48e3b3=Math[_0x5ee9dc(0x133)](_0x41e838[_0x5ee9dc(0x941)])/_0x2fa8cb[0x9],_0x458306=_0x2fa8cb[0x2]+_0x2fa8cb[0x3]*_0x48e3b3+_0x2fa8cb[0x4]*_0x48e3b3*_0x48e3b3+_0x2fa8cb[0x5]*_0x48e3b3*_0x48e3b3*_0x48e3b3+_0x2fa8cb[0x6]*_0x48e3b3*_0x48e3b3*_0x48e3b3*_0x48e3b3+_0x2fa8cb[0x7]*_0x48e3b3*_0x48e3b3*_0x48e3b3*_0x48e3b3*_0x48e3b3+_0x2fa8cb[0x8]*_0x48e3b3*_0x48e3b3*_0x48e3b3*_0x48e3b3*_0x48e3b3*_0x48e3b3;return _0x5550bc*=_0x41e838[_0x5ee9dc(0x598)]<0x0?-0x1:0x1,_0x458306*=_0x41e838[_0x5ee9dc(0x941)]<0x0?-0x1:0x1,{'lng':_0x5550bc,'lat':_0x458306};}['getDistance'](_0xd2961b,_0x4a583e,_0xf69b4e,_0xcef91a){const _0x23e1dc=_0x43bf95;return _0x2014d2*Math[_0x23e1dc(0x7e9)](Math[_0x23e1dc(0xb8)](_0xf69b4e)*Math[_0x23e1dc(0xb8)](_0xcef91a)+Math[_0x23e1dc(0x728)](_0xf69b4e)*Math[_0x23e1dc(0x728)](_0xcef91a)*Math[_0x23e1dc(0x728)](_0x4a583e-_0xd2961b));}[_0x43bf95(0x2b0)](_0x14e3c3){return Math['PI']*_0x14e3c3/0xb4;}[_0x43bf95(0x438)](_0x31052b){return 0xb4*_0x31052b/Math['PI'];}['getRange'](_0x3a69c8,_0x287731,_0x49d0b5){const _0x2d7c75=_0x43bf95;return _0x287731!=null&&(_0x3a69c8=Math[_0x2d7c75(0x2c3)](_0x3a69c8,_0x287731)),_0x49d0b5!=null&&(_0x3a69c8=Math['min'](_0x3a69c8,_0x49d0b5)),_0x3a69c8;}['getLoop'](_0x2a488a,_0x3012e4,_0x7f4dfb){for(;_0x2a488a>_0x7f4dfb;)_0x2a488a-=_0x7f4dfb-_0x3012e4;for(;_0x2a488a<_0x3012e4;)_0x2a488a+=_0x7f4dfb-_0x3012e4;return _0x2a488a;}[_0x43bf95(0x67e)](_0x37f028){const _0x1e1534=_0x43bf95;return this[_0x1e1534(0x615)](_0x37f028);}[_0x43bf95(0x8cc)](_0x400e84){const _0x1dfada=_0x43bf95;let _0x217f83=this[_0x1dfada(0x615)](_0x400e84);return{'x':_0x217f83[_0x1dfada(0x598)],'y':_0x217f83['lat']};}['mercatorToLngLat'](_0x54d2d5){return this['convertMC2LL'](_0x54d2d5);}[_0x43bf95(0x49f)](_0x591f1f){const _0x4e7e31=_0x43bf95;let _0x1bfcfa={'lng':_0x591f1f['x'],'lat':_0x591f1f['y']};return this[_0x4e7e31(0xcc)](_0x1bfcfa);}['pointToPixel'](_0x65ccc1,_0x4526f6,_0x38fe31,_0x4176ab){const _0x52ba6f=_0x43bf95;if(!_0x65ccc1)return{'x':0x0,'y':0x0};_0x65ccc1=this[_0x52ba6f(0x67e)](_0x65ccc1);let _0x2b4594=this[_0x52ba6f(0x79b)](_0x4526f6),_0x145086=Math[_0x52ba6f(0x440)]((_0x65ccc1[_0x52ba6f(0x598)]-_0x38fe31[_0x52ba6f(0x598)])/_0x2b4594+_0x4176ab['width']/0x2),_0x4a371f=Math[_0x52ba6f(0x440)]((_0x38fe31[_0x52ba6f(0x941)]-_0x65ccc1['lat'])/_0x2b4594+_0x4176ab['height']/0x2);return{'x':_0x145086,'y':_0x4a371f};}[_0x43bf95(0x38b)](_0xe77d5b,_0x5d7a29,_0x3166b9,_0xc77061){const _0x36ffa9=_0x43bf95;if(!_0xe77d5b)return{'lng':0x0,'lat':0x0};let _0x9da915=this[_0x36ffa9(0x79b)](_0x5d7a29),_0x27ec0d=_0x3166b9[_0x36ffa9(0x598)]+_0x9da915*(_0xe77d5b['x']-_0xc77061[_0x36ffa9(0x371)]/0x2),_0x4b3952=_0x3166b9['lat']-_0x9da915*(_0xe77d5b['y']-_0xc77061[_0x36ffa9(0x795)]/0x2),_0x31cc38={'lng':_0x27ec0d,'lat':_0x4b3952};return this[_0x36ffa9(0x919)](_0x31cc38);}[_0x43bf95(0x79b)](_0x5778d1){const _0x45cb58=_0x43bf95;return Math[_0x45cb58(0x191)](0x2,0x12-_0x5778d1);}},_0x1c9dc1=_0x53826a,_0x37101f=class extends _0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x181)]{constructor(_0x94a5e3){const _0x4372c2=_0x43bf95;super(_0x94a5e3);let _0x590ab6=new _0x1c9dc1();this[_0x4372c2(0x943)][_0x4372c2(0x4bb)]=function(_0x3ddfef,_0x2e3a00){const _0x4db9f1=_0x4372c2;return _0x2e3a00=_0x2e3a00||{},_0x2e3a00=_0x3dccda[_0x4db9f1(0x12c)](_0x34d1e5['Cesium'][_0x4db9f1(0x72b)][_0x4db9f1(0x438)](_0x3ddfef[_0x4db9f1(0xc9)]),_0x34d1e5[_0x4db9f1(0x7aa)][_0x4db9f1(0x72b)][_0x4db9f1(0x438)](_0x3ddfef[_0x4db9f1(0xa6e)])),_0x2e3a00=_0x3dccda[_0x4db9f1(0x1a1)](_0x2e3a00[0x0],_0x2e3a00[0x1]),_0x2e3a00[0x0]=Math[_0x4db9f1(0x66a)](_0x2e3a00[0x0],0xb4),_0x2e3a00[0x0]=Math[_0x4db9f1(0x2c3)](_0x2e3a00[0x0],-0xb4),_0x2e3a00[0x1]=Math[_0x4db9f1(0x66a)](_0x2e3a00[0x1],74.000022),_0x2e3a00[0x1]=Math[_0x4db9f1(0x2c3)](_0x2e3a00[0x1],-71.988531),_0x2e3a00=_0x590ab6[_0x4db9f1(0x8cc)]({'lng':_0x2e3a00[0x0],'lat':_0x2e3a00[0x1]}),new _0x34d1e5['Cesium'][(_0x4db9f1(0x48e))](_0x2e3a00['x'],_0x2e3a00['y']);},this[_0x4372c2(0x943)][_0x4372c2(0x955)]=function(_0x57b54a,_0x44511c){const _0xb324bd=_0x4372c2;return _0x44511c=_0x44511c||{},_0x44511c=_0x590ab6['mercatorToLngLat']({'lng':_0x57b54a['x'],'lat':_0x57b54a['y']}),_0x44511c=_0x3dccda[_0xb324bd(0xab)](_0x44511c[_0xb324bd(0x598)],_0x44511c[_0xb324bd(0x941)]),_0x44511c=_0x3dccda[_0xb324bd(0x273)](_0x44511c[0x0],_0x44511c[0x1]),new _0x34d1e5[(_0xb324bd(0x7aa))][(_0xb324bd(0x4f1))](_0x34d1e5['Cesium'][_0xb324bd(0x72b)][_0xb324bd(0x2b0)](_0x44511c[0x0]),_0x34d1e5['Cesium'][_0xb324bd(0x72b)][_0xb324bd(0x2b0)](_0x44511c[0x1]));},this[_0x4372c2(0x66b)]=_0x94a5e3[_0x4372c2(0x66b)]||[];}['tileXYToNativeRectangle'](_0x2bd605,_0x23a340,_0x126d4b,_0x5b2ed0){const _0x259be9=_0x43bf95;let _0x5ebdb7=this[_0x259be9(0x66b)][_0x126d4b],_0x2cfa4c=_0x2bd605*_0x5ebdb7,_0x53e018=(_0x2bd605+0x1)*_0x5ebdb7,_0x27e750=((_0x23a340=-_0x23a340)+0x1)*_0x5ebdb7,_0x54322d=_0x23a340*_0x5ebdb7;return _0x34d1e5[_0x259be9(0x7aa)][_0x259be9(0x89d)](_0x5b2ed0)?(_0x5b2ed0[_0x259be9(0x97d)]=_0x2cfa4c,_0x5b2ed0[_0x259be9(0x35e)]=_0x54322d,_0x5b2ed0[_0x259be9(0x147)]=_0x53e018,_0x5b2ed0[_0x259be9(0x3bf)]=_0x27e750,_0x5b2ed0):new _0x34d1e5[(_0x259be9(0x7aa))][(_0x259be9(0x6e7))](_0x2cfa4c,_0x54322d,_0x53e018,_0x27e750);}[_0x43bf95(0x812)](_0x4a59c1,_0x20e03e,_0x2a1ec8){const _0x496a82=_0x43bf95;let _0x2ed829=this[_0x496a82(0x23b)];if(!_0x34d1e5[_0x496a82(0x7aa)][_0x496a82(0x6e7)][_0x496a82(0x33e)](_0x2ed829,_0x4a59c1))return;let _0x23e63f=this[_0x496a82(0x943)][_0x496a82(0x4bb)](_0x4a59c1);if(!_0x34d1e5[_0x496a82(0x7aa)]['defined'](_0x23e63f))return;let _0x3df236=this[_0x496a82(0x66b)][_0x20e03e],_0x345cd7=Math[_0x496a82(0x46e)](_0x23e63f['x']/_0x3df236),_0x30736a=-Math[_0x496a82(0x46e)](_0x23e63f['y']/_0x3df236);return _0x34d1e5[_0x496a82(0x7aa)][_0x496a82(0x89d)](_0x2a1ec8)?(_0x2a1ec8['x']=_0x345cd7,_0x2a1ec8['y']=_0x30736a,_0x2a1ec8):new _0x34d1e5['Cesium'][(_0x496a82(0x48e))](_0x345cd7,_0x30736a);}},_0xe8fd48=_0x37101f,_0x5cc8d1={'img':_0x43bf95(0x5f8),'vec':'//online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl&v=020','custom':_0x43bf95(0x870),'traffic':_0x43bf95(0x53f)},_0x6890cf=class extends _0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x332)]{constructor(_0x18ffaa={}){const _0x422355=_0x43bf95;if(_0x18ffaa['url']=_0x18ffaa['url']||[_0x18ffaa[_0x422355(0x693)]||'',_0x5cc8d1[_0x18ffaa[_0x422355(0x6a9)]]||_0x5cc8d1[_0x422355(0x2be)]][_0x422355(0x9e0)](''),_0x18ffaa['crs']===_0x422355(0x423)){let _0x5d4676=[];for(let _0x5e971b=0x0;_0x5e971b<0x13;_0x5e971b++)_0x5d4676[_0x5e971b]=0x100*Math[_0x422355(0x191)](0x2,0x12-_0x5e971b);_0x18ffaa[_0x422355(0xd2)]=new _0xe8fd48({'resolutions':_0x5d4676,'rectangleSouthwestInMeters':new _0x34d1e5[(_0x422355(0x7aa))][(_0x422355(0x48e))](-20037726.37,-12474104.17),'rectangleNortheastInMeters':new _0x34d1e5[(_0x422355(0x7aa))]['Cartesian2'](20037726.37,12474104.17)});}else _0x18ffaa[_0x422355(0xd2)]=new _0x34d1e5[(_0x422355(0x7aa))]['WebMercatorTilingScheme']({'rectangleSouthwestInMeters':new _0x34d1e5['Cesium']['Cartesian2'](-0x1fffe86,-0x202ef88),'rectangleNortheastInMeters':new _0x34d1e5[(_0x422355(0x7aa))][(_0x422355(0x48e))](0x1fffe86,0x202ef88)});_0x18ffaa[_0x422355(0x777)]=0x12,super(_0x18ffaa),this[_0x422355(0x23b)]=this[_0x422355(0xa08)][_0x422355(0xc8)],this[_0x422355(0x164)]=_0x18ffaa[_0x422355(0x5e3)],this['_crs']=_0x18ffaa['crs']||'BD09',this[_0x422355(0x9ca)]=_0x18ffaa[_0x422355(0x6a9)]||'normal';}[_0x43bf95(0xa98)](_0x396814,_0x5c87c0,_0x2e59a2){const _0x509cea=_0x43bf95;let _0x359b7e=this[_0x509cea(0xa08)]['getNumberOfXTilesAtLevel'](_0x2e59a2),_0xbdd189=this[_0x509cea(0xa08)][_0x509cea(0xa47)](_0x2e59a2),_0x1e25cc=this[_0x509cea(0x164)][_0x509cea(0x965)](_0x509cea(0x2cd),_0x2e59a2)['replace']('{s}',String(0x1))[_0x509cea(0x965)](_0x509cea(0x680),this[_0x509cea(0x9ca)]);return this['_crs']===_0x509cea(0x423)?_0x1e25cc=_0x1e25cc[_0x509cea(0x965)](_0x509cea(0x40c),String(_0x396814))[_0x509cea(0x965)]('{y}',String(-_0x5c87c0)):_0x1e25cc=_0x1e25cc['replace'](_0x509cea(0x40c),String(_0x396814-_0x359b7e/0x2))[_0x509cea(0x965)]('{y}',String(_0xbdd189/0x2-_0x5c87c0-0x1)),_0x34d1e5[_0x509cea(0x7aa)][_0x509cea(0x28c)]['loadImage'](this,_0x1e25cc);}};_0x234967[_0x43bf95(0x1af)]=_0x43bf95(0x742);var _0x2de3ad=_0x6890cf,_0x4d3bfb='//tiles{s}.geovisearth.com/base/v1/{style}/{z}/{x}/{y}?format={format}&tmsIds=w&token={key}',_0x1b8083=class extends _0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x332)]{constructor(_0x31b5b6={}){const _0x60f5aa=_0x43bf95;_0x31b5b6[_0x60f5aa(0x5e3)]=_0x31b5b6['url']||[_0x31b5b6[_0x60f5aa(0x693)]||'',_0x4d3bfb[_0x60f5aa(0x965)](/\{style\}/g,_0x31b5b6[_0x60f5aa(0x6a9)]||_0x60f5aa(0x299))['replace'](/\{format\}/g,_0x31b5b6[_0x60f5aa(0x5a7)]||_0x60f5aa(0x6b3))['replace'](/\{key\}/g,_0x31b5b6[_0x60f5aa(0x64f)]||'')][_0x60f5aa(0x9e0)](''),_0x31b5b6[_0x60f5aa(0x2da)]=_0x31b5b6[_0x60f5aa(0x2da)]||['1','2','3'],super(_0x31b5b6);}};_0x234967[_0x43bf95(0x552)]=_0x43bf95(0x96c);var _0x5c5981=_0x1b8083,_0x4786de={'img':_0x43bf95(0x8f1),'elec':_0x43bf95(0xa9a),'cva':_0x43bf95(0x198),'ter':_0x43bf95(0x16d),'img_cva':_0x43bf95(0x95f)},_0x1fbd44=class extends _0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x332)]{constructor(_0x3ea856={}){const _0x3eb68f=_0x43bf95;_0x3ea856[_0x3eb68f(0x5e3)]=_0x3ea856[_0x3eb68f(0x5e3)]||[_0x3ea856['protocol']||'',_0x4786de[_0x3ea856[_0x3eb68f(0x6a9)]]||_0x4786de['elec']]['join'](''),_0x3ea856[_0x3eb68f(0x9b9)]==='WGS84'&&(_0x3ea856[_0x3eb68f(0xd2)]=new _0xd4046c()),super(_0x3ea856);}};_0x234967[_0x43bf95(0x450)]=_0x43bf95(0x3aa);var _0x14487f=_0x1fbd44,_0x59c8a3='//t{s}.tianditu.gov.cn/DataServer?T={style}_w&x={x}&y={y}&l={z}&tk={key}',_0x375153=class extends _0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x332)]{constructor(_0x12125a={}){const _0x189c9c=_0x43bf95;super({'url':[_0x12125a[_0x189c9c(0x693)]||'',_0x59c8a3[_0x189c9c(0x965)](/\{style\}/g,_0x12125a[_0x189c9c(0x6a9)]||_0x189c9c(0x299))[_0x189c9c(0x965)](/\{key\}/g,_0x12125a[_0x189c9c(0x64f)]||'')]['join'](''),'subdomains':['0','1','2','3','4','5','6','7'],'maximumLevel':0x12});}};_0x234967[_0x43bf95(0x144)]='tdt';var _0x341615=_0x375153,_0x454421={'img':_0x43bf95(0x2cf),'elec':'//rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid={style}&scene=0&version=347'},_0x2504a8=class extends _0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x332)]{constructor(_0x1846d5={}){const _0x33f8c7=_0x43bf95;let _0xd9bceb=_0x1846d5['url']||[_0x1846d5[_0x33f8c7(0x693)]||'',_0x454421[_0x1846d5[_0x33f8c7(0x6a9)]]||_0x454421[_0x33f8c7(0x74f)]]['join']('');_0x1846d5['url']=_0xd9bceb[_0x33f8c7(0x965)]('{style}',_0x1846d5[_0x33f8c7(0x6a9)]||0x1),_0x1846d5['subdomains']=_0x1846d5['subdomains']||['1','2','3'],_0x1846d5['style']===_0x33f8c7(0x602)&&(_0x1846d5[_0x33f8c7(0x6d5)]={'sx':(_0x42d429,_0x29318f,_0x2254d1,_0x1654f9)=>_0x29318f>>0x4,'sy':(_0xd009c0,_0x484610,_0x1fbc0a,_0x5c2274)=>(0x1<<_0x5c2274)-_0x1fbc0a>>0x4}),super(_0x1846d5);}};_0x234967['TENCENT']='tencent';var _0x4484e5=_0x2504a8,_0x593a9f=class{static[_0x43bf95(0x8a6)](_0x5ad6bf){const _0x175230=_0x43bf95;return Promise[_0x175230(0x509)](new _0x2ed2f0(_0x5ad6bf));}static[_0x43bf95(0x225)](_0x29cac9){const _0x2ba5bc=_0x43bf95;return Promise[_0x2ba5bc(0x509)](new _0x2de3ad(_0x29cac9));}static['createGeoVisImageryLayer'](_0x57fa9a){const _0xe6d975=_0x43bf95;return Promise[_0xe6d975(0x509)](new _0x5c5981(_0x57fa9a));}static[_0x43bf95(0xa6f)](_0x342db9){const _0x50dc99=_0x43bf95;return Promise[_0x50dc99(0x509)](new _0x14487f(_0x342db9));}static[_0x43bf95(0x6f8)](_0x2ad9fb){return Promise['resolve'](new _0x341615(_0x2ad9fb));}static[_0x43bf95(0x263)](_0x1d3bee){return Promise['resolve'](new _0x4484e5(_0x1d3bee));}static[_0x43bf95(0x9d)](_0x62202a){const _0x31d97f=_0x43bf95;return _0x34d1e5[_0x31d97f(0x7aa)][_0x31d97f(0x72c)]['fromUrl'](_0x62202a[_0x31d97f(0x5e3)],_0x62202a);}static[_0x43bf95(0x3fb)](_0x487f8b){const _0xfe74d5=_0x43bf95;return _0x34d1e5[_0xfe74d5(0x7aa)][_0xfe74d5(0x89a)]['fromUrl'](_0x487f8b['url'],_0x487f8b);}static['createOSMImageryLayer'](_0x4af489){const _0x56a780=_0x43bf95;return Promise[_0x56a780(0x509)](new _0x34d1e5[(_0x56a780(0x7aa))]['OpenStreetMapImageryProvider'](_0x4af489));}static[_0x43bf95(0x2e9)](_0x1f5e0b){const _0x360872=_0x43bf95;return _0x34d1e5[_0x360872(0x7aa)][_0x360872(0x906)][_0x360872(0x5fb)](_0x1f5e0b['url'],_0x1f5e0b);}static[_0x43bf95(0x7ad)](_0x28f8fb){const _0x26f669=_0x43bf95;return Promise[_0x26f669(0x509)](new _0x34d1e5['Cesium'][(_0x26f669(0x1f9))](_0x28f8fb));}static[_0x43bf95(0xa23)](_0x2f5a0e){const _0xab32ae=_0x43bf95;return Promise[_0xab32ae(0x509)](new _0x34d1e5[(_0xab32ae(0x7aa))][(_0xab32ae(0x8b8))](_0x2f5a0e));}static[_0x43bf95(0x28d)](_0x36a6c9){const _0x5a06d6=_0x43bf95;return Promise[_0x5a06d6(0x509)](new _0x34d1e5['Cesium'][(_0x5a06d6(0x332))](_0x36a6c9));}static[_0x43bf95(0x77b)](_0x48ddc9){const _0x538bca=_0x43bf95;return Promise[_0x538bca(0x509)](new _0x34d1e5['Cesium']['TileCoordinatesImageryProvider'](_0x48ddc9));}static[_0x43bf95(0x246)](_0x5ded4a){const _0x17f185=_0x43bf95;return Promise[_0x17f185(0x509)](new _0x34d1e5[(_0x17f185(0x7aa))][(_0x17f185(0xa7b))](_0x5ded4a));}static['createMapboxImageryLayer'](_0x5ceca8){const _0x341c38=_0x43bf95;return Promise[_0x341c38(0x509)](new _0x34d1e5['Cesium'][(_0x341c38(0x3f0))](_0x5ceca8));}static[_0x43bf95(0xa61)](_0x4464de){const _0x1a3c73=_0x43bf95;return Promise[_0x1a3c73(0x509)](new _0x34d1e5['Cesium'][(_0x1a3c73(0x49b))](_0x4464de));}static[_0x43bf95(0x1a0)](_0x25d793){const _0x52466a=_0x43bf95;return _0x34d1e5[_0x52466a(0x7aa)][_0x52466a(0x1cc)][_0x52466a(0x5fb)](_0x25d793[_0x52466a(0x5e3)],_0x25d793);}static['createImageryLayer'](_0xea6278,_0x5b377f){const _0x473e46=_0x43bf95;let _0x6b786a;switch(_0xea6278){case _0x234967[_0x473e46(0xd7)]:_0x6b786a=this['createAMapImageryLayer'](_0x5b377f);break;case _0x234967[_0x473e46(0x1af)]:_0x6b786a=this[_0x473e46(0x225)](_0x5b377f);break;case _0x234967[_0x473e46(0x552)]:_0x6b786a=this[_0x473e46(0xa2c)](_0x5b377f);break;case _0x234967[_0x473e46(0x450)]:_0x6b786a=this['createGoogleImageryLayer'](_0x5b377f);break;case _0x234967['TDT']:_0x6b786a=this[_0x473e46(0x6f8)](_0x5b377f);break;case _0x234967[_0x473e46(0x34a)]:_0x6b786a=this['createTencentImageryLayer'](_0x5b377f);break;case _0x234967[_0x473e46(0x584)]:_0x6b786a=this[_0x473e46(0x9d)](_0x5b377f);break;case _0x234967[_0x473e46(0x3e8)]:_0x6b786a=this[_0x473e46(0x3fb)](_0x5b377f);break;case _0x234967['OSM']:_0x6b786a=this[_0x473e46(0x9a6)](_0x5b377f);break;case _0x234967[_0x473e46(0x32d)]:_0x6b786a=this[_0x473e46(0x2e9)](_0x5b377f);break;case _0x234967[_0x473e46(0x4f9)]:_0x6b786a=this[_0x473e46(0x7ad)](_0x5b377f);break;case _0x234967[_0x473e46(0x205)]:_0x6b786a=this['createWMTSImageryLayer'](_0x5b377f);break;case _0x234967[_0x473e46(0x466)]:_0x6b786a=this[_0x473e46(0x28d)](_0x5b377f);break;case _0x234967['COORD']:_0x6b786a=this[_0x473e46(0x77b)](_0x5b377f);break;case _0x234967[_0x473e46(0x2ce)]:_0x6b786a=this[_0x473e46(0x246)](_0x5b377f);break;case _0x234967['MAPBOX']:_0x6b786a=this[_0x473e46(0xa5e)](_0x5b377f);break;case _0x234967[_0x473e46(0x121)]:_0x6b786a=this['createMapboxStyleImageryLayer'](_0x5b377f);break;case _0x234967['TMS']:_0x6b786a=this[_0x473e46(0x1a0)](_0x5b377f);break;default:break;}return _0x6b786a;}},_0x50f811=_0x593a9f,_0x33c694=class extends _0x34d1e5['Cesium']['GeographicTilingScheme']{constructor(_0x25373f={}){const _0x317b6e=_0x43bf95;super(_0x25373f),this[_0x317b6e(0x2f6)]=_0x25373f[_0x317b6e(0x7c6)]||[-0xb4,0x5a],this[_0x317b6e(0x633)]=_0x25373f[_0x317b6e(0x7d3)]||0x0,this[_0x317b6e(0x92c)]=_0x25373f[_0x317b6e(0x834)]||0x100,this[_0x317b6e(0x8ce)]=_0x25373f['resolutions']||[];}get[_0x43bf95(0x7d3)](){const _0x3db8f0=_0x43bf95;return this[_0x3db8f0(0x633)];}[_0x43bf95(0x676)](_0x3e34eb,_0x2fc6dc,_0x328997,_0x6f16e5){const _0x585455=_0x43bf95;if(!this[_0x585455(0x8ce)]||!this[_0x585455(0x8ce)][_0x328997+this[_0x585455(0x633)]])return _0x34d1e5[_0x585455(0x7aa)][_0x585455(0x6e7)][_0x585455(0x1fc)];let _0x1397df=this[_0x585455(0x8ce)][_0x328997+this[_0x585455(0x633)]]*this[_0x585455(0x92c)],_0x19cf08=_0x34d1e5[_0x585455(0x7aa)][_0x585455(0x72b)][_0x585455(0x2b0)](this[_0x585455(0x2f6)][0x0]+_0x3e34eb*_0x1397df),_0x31c213=_0x34d1e5['Cesium'][_0x585455(0x72b)][_0x585455(0x2b0)](this[_0x585455(0x2f6)][0x1]-(_0x2fc6dc+0x1)*_0x1397df),_0x7dce34=_0x34d1e5['Cesium'][_0x585455(0x72b)][_0x585455(0x2b0)](this[_0x585455(0x2f6)][0x0]+(_0x3e34eb+0x1)*_0x1397df),_0x2623e4=_0x34d1e5['Cesium']['Math'][_0x585455(0x2b0)](this[_0x585455(0x2f6)][0x1]-_0x2fc6dc*_0x1397df);return _0x6f16e5?(_0x6f16e5[_0x585455(0x97d)]=_0x19cf08,_0x6f16e5[_0x585455(0x35e)]=_0x31c213,_0x6f16e5[_0x585455(0x147)]=_0x7dce34,_0x6f16e5[_0x585455(0x3bf)]=_0x2623e4,_0x6f16e5):new _0x34d1e5['Cesium']['Rectangle'](_0x19cf08,_0x31c213,_0x7dce34,_0x2623e4);}[_0x43bf95(0x812)](_0x753192,_0xc4ea44,_0x373652){const _0x403b29=_0x43bf95;if(!this[_0x403b29(0x8ce)]||!this[_0x403b29(0x8ce)][_0xc4ea44+this[_0x403b29(0x633)]])return new _0x34d1e5[(_0x403b29(0x7aa))][(_0x403b29(0x48e))]();let _0x5be7fd=this[_0x403b29(0x8ce)][_0xc4ea44+this[_0x403b29(0x633)]]*this['_tileSize'],_0x421efc=_0x34d1e5[_0x403b29(0x7aa)][_0x403b29(0x72b)][_0x403b29(0x438)](_0x753192[_0x403b29(0xc9)]),_0x48cb7e=_0x34d1e5[_0x403b29(0x7aa)][_0x403b29(0x72b)][_0x403b29(0x438)](_0x753192[_0x403b29(0xa6e)]),_0x43b475=Math[_0x403b29(0x46e)]((_0x421efc-this[_0x403b29(0x2f6)][0x0])/_0x5be7fd),_0x18bfc1=Math[_0x403b29(0x46e)]((this[_0x403b29(0x2f6)][0x1]-_0x48cb7e)/_0x5be7fd);return _0x373652?(_0x373652['x']=_0x43b475,_0x373652['y']=_0x18bfc1,_0x373652):new _0x34d1e5[(_0x403b29(0x7aa))][(_0x403b29(0x48e))](Math[_0x403b29(0x2c3)](0x0,_0x43b475),Math[_0x403b29(0x2c3)](0x0,_0x18bfc1));}},_0x5b4e2a=_0x33c694,_0x56dd0a=class extends _0x34d1e5['Cesium'][_0x43bf95(0x181)]{constructor(_0x225ca5={}){const _0x465b6e=_0x43bf95;super(_0x225ca5),this[_0x465b6e(0x2f6)]=_0x225ca5[_0x465b6e(0x7c6)]||[-20037508.3427892,20037508.3427892],this[_0x465b6e(0x633)]=_0x225ca5[_0x465b6e(0x7d3)]||0x0,this[_0x465b6e(0x92c)]=_0x225ca5['tileSize']||0x100,this['_resolutions']=_0x225ca5['resolutions']||[];}get[_0x43bf95(0x7d3)](){const _0x28065a=_0x43bf95;return this[_0x28065a(0x633)];}[_0x43bf95(0xd4)](_0x310b7e,_0xf733e6,_0x15eb30,_0x133891){const _0x37c681=_0x43bf95;if(!this[_0x37c681(0x8ce)]||!this['_resolutions'][_0x15eb30+this[_0x37c681(0x633)]])return _0x34d1e5['Cesium'][_0x37c681(0x6e7)]['MAX_VALUE'];if(_0x310b7e<0x0||_0xf733e6<0x0)return _0x34d1e5['Cesium']['Rectangle'][_0x37c681(0x1fc)];let _0x328e6e=this['_resolutions'][_0x15eb30+this[_0x37c681(0x633)]]*this[_0x37c681(0x92c)],_0x189028=this[_0x37c681(0x2f6)][0x0]+_0x310b7e*_0x328e6e,_0x46cf57=this['_origin'][0x1]-(_0xf733e6+0x1)*_0x328e6e,_0x7eade8=this[_0x37c681(0x2f6)][0x0]+(_0x310b7e+0x1)*_0x328e6e,_0xacab64=this[_0x37c681(0x2f6)][0x1]-_0xf733e6*_0x328e6e;return _0x133891?(_0x133891[_0x37c681(0x97d)]=_0x189028,_0x133891[_0x37c681(0x35e)]=_0x46cf57,_0x133891[_0x37c681(0x147)]=_0x7eade8,_0x133891[_0x37c681(0x3bf)]=_0xacab64,_0x133891):new _0x34d1e5[(_0x37c681(0x7aa))]['Rectangle'](_0x189028,_0x46cf57,_0x7eade8,_0xacab64);}[_0x43bf95(0x812)](_0x45b750,_0x41aba3,_0x3fb1db){const _0x2d13b1=_0x43bf95;let _0x562621=this['_rectangle'];if(!_0x34d1e5[_0x2d13b1(0x7aa)][_0x2d13b1(0x6e7)][_0x2d13b1(0x33e)](_0x562621,_0x45b750))return;if(!this[_0x2d13b1(0x8ce)]||!this[_0x2d13b1(0x8ce)][_0x41aba3+this[_0x2d13b1(0x633)]])return new _0x34d1e5[(_0x2d13b1(0x7aa))]['Cartesian2']();let _0x207659=this[_0x2d13b1(0x8ce)][_0x41aba3+this[_0x2d13b1(0x633)]]*this[_0x2d13b1(0x92c)],_0x355e10=this[_0x2d13b1(0x943)][_0x2d13b1(0x4bb)](_0x45b750),_0x312bac=Math[_0x2d13b1(0x46e)]((_0x355e10['x']-this[_0x2d13b1(0x2f6)][0x0])/_0x207659),_0x17c84d=Math[_0x2d13b1(0x46e)]((this['_origin'][0x1]-_0x355e10['y'])/_0x207659);return _0x3fb1db?(_0x3fb1db['x']=_0x312bac,_0x3fb1db['y']=_0x17c84d,_0x3fb1db):new _0x34d1e5[(_0x2d13b1(0x7aa))][(_0x2d13b1(0x48e))](Math[_0x2d13b1(0x2c3)](0x0,_0x312bac),Math[_0x2d13b1(0x2c3)](0x0,_0x17c84d));}},_0x236817=_0x56dd0a,_0x57efb7={'NONE':_0x43bf95(0x488),'XYZ':_0x43bf95(0x8ed),'ARCGIS':'arcgis','GOOGLE':_0x43bf95(0x3aa),'VR':'vr'},_0x1dc0f5=_0x57efb7,_0x5e2e0d=class{static[_0x43bf95(0x759)](_0x180a50){const _0x13a47e=_0x43bf95;return Promise['resolve'](new _0x34d1e5[(_0x13a47e(0x7aa))][(_0x13a47e(0x940))](_0x180a50));}static[_0x43bf95(0x7bd)](_0x331695){const _0x1907d4=_0x43bf95;return _0x34d1e5['Cesium'][_0x1907d4(0x1e3)]['fromUrl'](_0x331695[_0x1907d4(0x5e3)],_0x331695);}static[_0x43bf95(0x6cd)](_0x2da28f){const _0x50a0ef=_0x43bf95;return _0x34d1e5[_0x50a0ef(0x7aa)][_0x50a0ef(0x55e)]['fromUrl'](_0x2da28f[_0x50a0ef(0x5e3)],_0x2da28f);}static[_0x43bf95(0x46f)](_0x123985){const _0x348518=_0x43bf95;return _0x34d1e5[_0x348518(0x7aa)][_0x348518(0x9c0)][_0x348518(0x5fb)](_0x123985['url'],_0x123985);}static[_0x43bf95(0x3d3)](_0x2b9440){const _0x312328=_0x43bf95;return _0x34d1e5[_0x312328(0x7aa)][_0x312328(0x894)][_0x312328(0x5fb)](_0x2b9440[_0x312328(0x5e3)],_0x2b9440);}static['createTerrain'](_0x11b2f4,_0x40e719){const _0x4667a5=_0x43bf95;let _0x541031;switch(_0x11b2f4){case _0x1dc0f5['NONE']:_0x541031=this[_0x4667a5(0x759)](_0x40e719);break;case _0x1dc0f5[_0x4667a5(0x466)]:_0x541031=this[_0x4667a5(0x7bd)](_0x40e719);break;case _0x1dc0f5['GOOGLE']:_0x541031=this[_0x4667a5(0x6cd)](_0x40e719);break;case _0x1dc0f5[_0x4667a5(0x584)]:_0x541031=this[_0x4667a5(0x46f)](_0x40e719);break;case _0x1dc0f5['VR']:_0x541031=this['createVRTerrain'](_0x40e719);break;default:break;}return _0x541031;}},_0x40fc9b=_0x5e2e0d,_0x4f0eb5=[][_0x43bf95(0x8e3)]||function(_0x25d20f){for(let _0x54da6c=0x0,_0x248f30=this['length'];_0x54da6c<_0x248f30;_0x54da6c++)if(_0x54da6c in this&&this[_0x54da6c]===_0x25d20f)return _0x54da6c;return-0x1;},_0x44ef51=_0x43bf95(0x5d9),_0x18d0e0=_0x43bf95(0x880),_0x57126d=function(){const _0x2bc530=_0x43bf95;let _0x5a628b,_0xdf1531,_0x567660,_0x4a7e83;if(window['WebGLRenderingContext']!=null)return _0x4a7e83=[_0x2bc530(0x59f),'MOZ','MS','O'],_0x567660=/^WEBKIT_(.*)|MOZ_(.*)|MS_(.*)|O_(.*)/,_0x5a628b=WebGLRenderingContext[_0x2bc530(0x519)][_0x2bc530(0x20e)],WebGLRenderingContext[_0x2bc530(0x519)]['getExtension']=function(_0x5da636){const _0x16276d=_0x2bc530;let _0x35cf6b,_0x4325c7,_0x46a62c,_0x2545fd,_0xe47401;if(_0x4325c7=_0x5da636[_0x16276d(0x4a5)](_0x567660),_0x4325c7!==null&&(_0x5da636=_0x4325c7[0x1]),_0x35cf6b=_0x5a628b['call'](this,_0x5da636),_0x35cf6b===null){for(_0x2545fd=0x0,_0xe47401=_0x4a7e83[_0x16276d(0x6a2)];_0x2545fd<_0xe47401;_0x2545fd++)if(_0x46a62c=_0x4a7e83[_0x2545fd],_0x35cf6b=_0x5a628b['call'](this,_0x46a62c+'_'+_0x5da636),_0x35cf6b!==null)return _0x35cf6b;return null;}else return _0x35cf6b;},_0xdf1531=WebGLRenderingContext['prototype'][_0x2bc530(0x17b)],WebGLRenderingContext[_0x2bc530(0x519)][_0x2bc530(0x17b)]=function(){const _0x94da7c=_0x2bc530;let _0x4bc970,_0x4ca637,_0x3ff6d0,_0x332e75,_0x193c2e,_0x57daa3;for(_0x332e75=_0xdf1531[_0x94da7c(0x7a4)](this),_0x3ff6d0=[],_0x193c2e=0x0,_0x57daa3=_0x332e75[_0x94da7c(0x6a2)];_0x193c2e<_0x57daa3;_0x193c2e++)_0x4bc970=_0x332e75[_0x193c2e],_0x4ca637=_0x4bc970[_0x94da7c(0x4a5)](_0x567660),_0x4ca637!==null&&(_0x4bc970=_0x4ca637[0x1]),_0x4f0eb5[_0x94da7c(0x7a4)](_0x3ff6d0,_0x4bc970)<0x0&&_0x3ff6d0['push'](_0x4bc970);return _0x3ff6d0;};},_0xa98301=function(){const _0x7f7752=_0x43bf95;let _0x493101,_0xbfd1c,_0xb7e2b0,_0x101510,_0x27515d,_0x2261b7,_0x5daeee,_0x2c5a0f,_0x4ef2dd,_0x3bd2a0,_0x2ceac0,_0x3b5637,_0x56deb5,_0x3df180;if(_0x27515d=function(){const _0x3326b1=_0xf114;let _0x5768c8,_0x431428,_0x17e520;return _0x5768c8=document['createElement'](_0x3326b1(0x790)),_0x5768c8[_0x3326b1(0x371)]=0x2,_0x5768c8[_0x3326b1(0x795)]=0x2,_0x431428=_0x5768c8[_0x3326b1(0x7f0)]('2d'),_0x17e520=_0x431428['getImageData'](0x0,0x0,0x2,0x2),_0x17e520[_0x3326b1(0x82d)][_0x3326b1(0x48a)](new Uint8ClampedArray([0x0,0x0,0x0,0x0,0xff,0xff,0xff,0xff,0x0,0x0,0x0,0x0,0xff,0xff,0xff,0xff])),_0x431428[_0x3326b1(0x50e)](_0x17e520,0x0,0x0),_0x5768c8;},_0x27515d(),_0xbfd1c=function(_0x11158a,_0x5d5bb9){const _0x1cf8d1=_0xf114;let _0x1dccb6,_0x373a55,_0x3b344d,_0x5d297a,_0x33be0f,_0x492f84,_0x8c30f9,_0x43f08c,_0x289cc2,_0x3d87ed,_0x49d724,_0x4d1046,_0x301c45,_0x516958;if(_0x492f84=_0x11158a['createProgram'](),_0x301c45=_0x11158a[_0x1cf8d1(0x276)](_0x11158a['VERTEX_SHADER']),_0x11158a['attachShader'](_0x492f84,_0x301c45),_0x11158a['shaderSource'](_0x301c45,'attribute\x20vec2\x20position;\x0avoid\x20main(){\x0a\x20\x20\x20\x20gl_Position\x20=\x20vec4(position,\x200.0,\x201.0);\x0a}'),_0x11158a['compileShader'](_0x301c45),!_0x11158a[_0x1cf8d1(0xf2)](_0x301c45,_0x11158a[_0x1cf8d1(0x8bd)]))throw _0x11158a['getShaderInfoLog'](_0x301c45);if(_0x3b344d=_0x11158a[_0x1cf8d1(0x276)](_0x11158a['FRAGMENT_SHADER']),_0x11158a['attachShader'](_0x492f84,_0x3b344d),_0x11158a[_0x1cf8d1(0xa71)](_0x3b344d,'uniform\x20sampler2D\x20source;\x0avoid\x20main(){\x0a\x20\x20\x20\x20gl_FragColor\x20=\x20texture2D(source,\x20vec2(1.0,\x201.0));\x0a}'),_0x11158a[_0x1cf8d1(0x7c3)](_0x3b344d),!_0x11158a[_0x1cf8d1(0xf2)](_0x3b344d,_0x11158a[_0x1cf8d1(0x8bd)]))throw _0x11158a[_0x1cf8d1(0x40d)](_0x3b344d);if(_0x11158a['linkProgram'](_0x492f84),!_0x11158a[_0x1cf8d1(0x4c0)](_0x492f84,_0x11158a[_0x1cf8d1(0x472)]))throw _0x11158a[_0x1cf8d1(0x688)](_0x492f84);return _0x11158a['useProgram'](_0x492f84),_0x373a55=function(){const _0x8a22c1=_0x1cf8d1;return _0x11158a[_0x8a22c1(0x3a4)](_0x3b344d),_0x11158a[_0x8a22c1(0x3a4)](_0x301c45),_0x11158a[_0x8a22c1(0x82f)](_0x492f84),_0x11158a[_0x8a22c1(0x66c)](_0x1dccb6),_0x11158a[_0x8a22c1(0x5d5)](_0x289cc2),_0x11158a[_0x8a22c1(0x5d5)](_0x4d1046),_0x11158a['deleteFramebuffer'](_0x5d297a),_0x11158a[_0x8a22c1(0x189)](_0x11158a[_0x8a22c1(0x832)],null),_0x11158a[_0x8a22c1(0x736)](null),_0x11158a[_0x8a22c1(0x9a8)](_0x11158a[_0x8a22c1(0x44f)],null),_0x11158a['bindFramebuffer'](_0x11158a[_0x8a22c1(0x689)],null);},_0x4d1046=_0x11158a[_0x1cf8d1(0x40f)](),_0x11158a['bindTexture'](_0x11158a['TEXTURE_2D'],_0x4d1046),_0x11158a[_0x1cf8d1(0x5b4)](_0x11158a[_0x1cf8d1(0x44f)],0x0,_0x11158a[_0x1cf8d1(0x1b2)],0x2,0x2,0x0,_0x11158a[_0x1cf8d1(0x1b2)],_0x11158a[_0x1cf8d1(0x958)],null),_0x11158a[_0x1cf8d1(0x580)](_0x11158a['TEXTURE_2D'],_0x11158a[_0x1cf8d1(0x7fb)],_0x11158a[_0x1cf8d1(0x6fd)]),_0x11158a[_0x1cf8d1(0x580)](_0x11158a[_0x1cf8d1(0x44f)],_0x11158a[_0x1cf8d1(0x20c)],_0x11158a[_0x1cf8d1(0x6fd)]),_0x5d297a=_0x11158a['createFramebuffer'](),_0x11158a[_0x1cf8d1(0x9fe)](_0x11158a[_0x1cf8d1(0x689)],_0x5d297a),_0x11158a[_0x1cf8d1(0x670)](_0x11158a[_0x1cf8d1(0x689)],_0x11158a[_0x1cf8d1(0x453)],_0x11158a['TEXTURE_2D'],_0x4d1046,0x0),_0x3d87ed=_0x27515d(),_0x289cc2=_0x11158a[_0x1cf8d1(0x40f)](),_0x11158a['bindTexture'](_0x11158a[_0x1cf8d1(0x44f)],_0x289cc2),_0x11158a['texImage2D'](_0x11158a['TEXTURE_2D'],0x0,_0x11158a[_0x1cf8d1(0x1b2)],_0x11158a[_0x1cf8d1(0x1b2)],_0x5d5bb9,_0x3d87ed),_0x11158a[_0x1cf8d1(0x580)](_0x11158a['TEXTURE_2D'],_0x11158a[_0x1cf8d1(0x7fb)],_0x11158a[_0x1cf8d1(0x6fd)]),_0x11158a[_0x1cf8d1(0x580)](_0x11158a[_0x1cf8d1(0x44f)],_0x11158a[_0x1cf8d1(0x20c)],_0x11158a[_0x1cf8d1(0x6fd)]),_0x516958=new Float32Array([0x1,0x1,-0x1,0x1,-0x1,-0x1,0x1,0x1,-0x1,-0x1,0x1,-0x1]),_0x1dccb6=_0x11158a['createBuffer'](),_0x11158a[_0x1cf8d1(0x189)](_0x11158a[_0x1cf8d1(0x832)],_0x1dccb6),_0x11158a['bufferData'](_0x11158a['ARRAY_BUFFER'],_0x516958,_0x11158a[_0x1cf8d1(0x323)]),_0x33be0f=_0x11158a[_0x1cf8d1(0x362)](_0x492f84,_0x1cf8d1(0x9a7)),_0x49d724=_0x11158a[_0x1cf8d1(0x469)](_0x492f84,'source'),_0x11158a[_0x1cf8d1(0x70e)](_0x33be0f),_0x11158a['vertexAttribPointer'](_0x33be0f,0x2,_0x11158a[_0x1cf8d1(0x5fa)],!0x1,0x0,0x0),_0x11158a['uniform1i'](_0x49d724,0x0),_0x11158a[_0x1cf8d1(0x40a)](_0x11158a[_0x1cf8d1(0xa9f)],0x0,0x6),_0x8c30f9=new Uint8Array(0x4*0x4),_0x11158a[_0x1cf8d1(0x439)](0x0,0x0,0x2,0x2,_0x11158a['RGBA'],_0x11158a['UNSIGNED_BYTE'],_0x8c30f9),_0x43f08c=Math['abs'](_0x8c30f9[0x0]-0x7f)<0xa,_0x373a55(),_0x43f08c;},_0x101510=function(_0x1bfe61,_0x5e5a2a){const _0x403980=_0xf114;let _0x1e82ff;return _0x1e82ff=_0x1bfe61['createTexture'](),_0x1bfe61[_0x403980(0x9a8)](_0x1bfe61[_0x403980(0x44f)],_0x1e82ff),_0x1bfe61[_0x403980(0x5b4)](_0x1bfe61[_0x403980(0x44f)],0x0,_0x1bfe61[_0x403980(0x1b2)],0x2,0x2,0x0,_0x1bfe61['RGBA'],_0x5e5a2a,null),_0x1bfe61['getError']()===0x0?(_0x1bfe61[_0x403980(0x5d5)](_0x1e82ff),!0x0):(_0x1bfe61[_0x403980(0x5d5)](_0x1e82ff),!0x1);},_0x493101=function(_0x50c394,_0x429876){const _0x2c9403=_0xf114;let _0x4a7c20,_0x124431,_0x16e4ea;return _0x16e4ea=_0x50c394[_0x2c9403(0x40f)](),_0x50c394[_0x2c9403(0x9a8)](_0x50c394[_0x2c9403(0x44f)],_0x16e4ea),_0x50c394[_0x2c9403(0x5b4)](_0x50c394['TEXTURE_2D'],0x0,_0x50c394['RGBA'],0x2,0x2,0x0,_0x50c394[_0x2c9403(0x1b2)],_0x429876,null),_0x124431=_0x50c394['createFramebuffer'](),_0x50c394[_0x2c9403(0x9fe)](_0x50c394[_0x2c9403(0x689)],_0x124431),_0x50c394[_0x2c9403(0x670)](_0x50c394['FRAMEBUFFER'],_0x50c394[_0x2c9403(0x453)],_0x50c394[_0x2c9403(0x44f)],_0x16e4ea,0x0),_0x4a7c20=_0x50c394[_0x2c9403(0x5aa)](_0x50c394['FRAMEBUFFER']),_0x50c394[_0x2c9403(0x5d5)](_0x16e4ea),_0x50c394[_0x2c9403(0x495)](_0x124431),_0x50c394['bindTexture'](_0x50c394['TEXTURE_2D'],null),_0x50c394[_0x2c9403(0x9fe)](_0x50c394[_0x2c9403(0x689)],null),_0x4a7c20===_0x50c394[_0x2c9403(0x805)];},_0x4ef2dd=[],_0x3bd2a0={},_0x2ceac0=[],_0xb7e2b0=function(){const _0x1a3506=_0xf114;let _0x4ff510,_0x117e6a,_0x2bf2c6,_0x148cbc,_0x499208,_0x15a8b3,_0x416ec1;_0x4ff510=document[_0x1a3506(0x7dc)](_0x1a3506(0x790)),_0x2bf2c6=null;try{_0x2bf2c6=_0x4ff510[_0x1a3506(0x7f0)](_0x1a3506(0x917)),_0x2bf2c6===null&&(_0x2bf2c6=_0x4ff510[_0x1a3506(0x7f0)](_0x1a3506(0x4d5)));}catch{}if(_0x2bf2c6!=null&&(_0x15a8b3=_0x2bf2c6['getExtension'](_0x1a3506(0xb6)),_0x15a8b3===null?_0x101510(_0x2bf2c6,_0x2bf2c6[_0x1a3506(0x5fa)])?(_0x416ec1=!0x0,_0x4ef2dd['push'](_0x1a3506(0xb6)),_0x3bd2a0[_0x1a3506(0xb6)]={'shim':!0x0}):(_0x416ec1=!0x1,_0x2ceac0[_0x1a3506(0xb3)]('OES_texture_float')):_0x101510(_0x2bf2c6,_0x2bf2c6[_0x1a3506(0x5fa)])?(_0x416ec1=!0x0,_0x4ef2dd[_0x1a3506(0xb3)](_0x1a3506(0xb6))):(_0x416ec1=!0x1,_0x2ceac0[_0x1a3506(0xb3)]('OES_texture_float')),_0x416ec1&&(_0x117e6a=_0x2bf2c6[_0x1a3506(0x20e)]('WEBGL_color_buffer_float'),_0x117e6a===null?_0x493101(_0x2bf2c6,_0x2bf2c6[_0x1a3506(0x5fa)])?(_0x4ef2dd[_0x1a3506(0xb3)](_0x1a3506(0x291)),_0x3bd2a0[_0x1a3506(0x291)]={'shim':!0x0,'RGBA32F_EXT':0x8814,'RGB32F_EXT':0x8815,'FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT':0x8211,'UNSIGNED_NORMALIZED_EXT':0x8c17}):_0x2ceac0[_0x1a3506(0xb3)](_0x1a3506(0x291)):_0x493101(_0x2bf2c6,_0x2bf2c6[_0x1a3506(0x5fa)])?_0x4ef2dd[_0x1a3506(0xb3)](_0x1a3506(0x291)):_0x2ceac0[_0x1a3506(0xb3)]('WEBGL_color_buffer_float'),_0x117e6a=_0x2bf2c6[_0x1a3506(0x20e)](_0x1a3506(0x971)),_0x117e6a===null?_0xbfd1c(_0x2bf2c6,_0x2bf2c6['FLOAT'])?(_0x4ef2dd['push'](_0x1a3506(0x971)),_0x3bd2a0[_0x1a3506(0x971)]={'shim':!0x0}):_0x2ceac0['push']('OES_texture_float_linear'):_0xbfd1c(_0x2bf2c6,_0x2bf2c6[_0x1a3506(0x5fa)])?_0x4ef2dd[_0x1a3506(0xb3)](_0x1a3506(0x971)):_0x2ceac0[_0x1a3506(0xb3)]('OES_texture_float_linear')),_0x148cbc=_0x2bf2c6[_0x1a3506(0x20e)](_0x1a3506(0x2a5)),_0x148cbc===null?_0x101510(_0x2bf2c6,0x8d61)?(_0x499208=!0x0,_0x4ef2dd[_0x1a3506(0xb3)](_0x1a3506(0x2a5)),_0x148cbc=_0x3bd2a0[_0x1a3506(0x2a5)]={'HALF_FLOAT_OES':0x8d61,'shim':!0x0}):(_0x499208=!0x1,_0x2ceac0[_0x1a3506(0xb3)](_0x1a3506(0x2a5))):_0x101510(_0x2bf2c6,_0x148cbc[_0x1a3506(0x154)])?(_0x499208=!0x0,_0x4ef2dd[_0x1a3506(0xb3)](_0x1a3506(0x2a5))):(_0x499208=!0x1,_0x2ceac0[_0x1a3506(0xb3)](_0x1a3506(0x2a5))),_0x499208))return _0x117e6a=_0x2bf2c6[_0x1a3506(0x20e)]('EXT_color_buffer_half_float'),_0x117e6a===null?_0x493101(_0x2bf2c6,_0x148cbc[_0x1a3506(0x154)])?(_0x4ef2dd[_0x1a3506(0xb3)]('EXT_color_buffer_half_float'),_0x3bd2a0['EXT_color_buffer_half_float']={'shim':!0x0,'RGBA16F_EXT':0x881a,'RGB16F_EXT':0x881b,'FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT':0x8211,'UNSIGNED_NORMALIZED_EXT':0x8c17}):_0x2ceac0[_0x1a3506(0xb3)](_0x1a3506(0x3c2)):_0x493101(_0x2bf2c6,_0x148cbc[_0x1a3506(0x154)])?_0x4ef2dd['push'](_0x1a3506(0x3c2)):_0x2ceac0[_0x1a3506(0xb3)](_0x1a3506(0x3c2)),_0x117e6a=_0x2bf2c6[_0x1a3506(0x20e)](_0x1a3506(0x48f)),_0x117e6a===null?_0xbfd1c(_0x2bf2c6,_0x148cbc['HALF_FLOAT_OES'])?(_0x4ef2dd[_0x1a3506(0xb3)](_0x1a3506(0x48f)),_0x3bd2a0[_0x1a3506(0x48f)]={'shim':!0x0}):_0x2ceac0[_0x1a3506(0xb3)](_0x1a3506(0x48f)):_0xbfd1c(_0x2bf2c6,_0x148cbc[_0x1a3506(0x154)])?_0x4ef2dd[_0x1a3506(0xb3)](_0x1a3506(0x48f)):_0x2ceac0[_0x1a3506(0xb3)](_0x1a3506(0x48f));},window['WebGLRenderingContext']!=null){for(_0xb7e2b0(),_0x3b5637={},_0x56deb5=0x0,_0x3df180=_0x2ceac0[_0x7f7752(0x6a2)];_0x56deb5<_0x3df180;_0x56deb5++)_0x2c5a0f=_0x2ceac0[_0x56deb5],_0x3b5637[_0x2c5a0f]=!0x0;return _0x2261b7=WebGLRenderingContext[_0x7f7752(0x519)][_0x7f7752(0x20e)],WebGLRenderingContext[_0x7f7752(0x519)][_0x7f7752(0x20e)]=function(_0x2eae6e){let _0x1f09ea;return _0x1f09ea=_0x3bd2a0[_0x2eae6e],_0x1f09ea===void 0x0?_0x3b5637[_0x2eae6e]?null:_0x2261b7['call'](this,_0x2eae6e):_0x1f09ea;},_0x5daeee=WebGLRenderingContext[_0x7f7752(0x519)][_0x7f7752(0x17b)],WebGLRenderingContext[_0x7f7752(0x519)][_0x7f7752(0x17b)]=function(){const _0x3fd4dc=_0x7f7752;let _0x23b2dc,_0x1308b9,_0x25c9e0,_0x1cc0ae,_0x5c8f9c,_0x114029,_0x34aa4b;for(_0x25c9e0=_0x5daeee[_0x3fd4dc(0x7a4)](this),_0x1308b9=[],_0x1cc0ae=0x0,_0x114029=_0x25c9e0[_0x3fd4dc(0x6a2)];_0x1cc0ae<_0x114029;_0x1cc0ae++)_0x23b2dc=_0x25c9e0[_0x1cc0ae],_0x3b5637[_0x23b2dc]===void 0x0&&_0x1308b9['push'](_0x23b2dc);for(_0x5c8f9c=0x0,_0x34aa4b=_0x4ef2dd[_0x3fd4dc(0x6a2)];_0x5c8f9c<_0x34aa4b;_0x5c8f9c++)_0x23b2dc=_0x4ef2dd[_0x5c8f9c],_0x4f0eb5[_0x3fd4dc(0x7a4)](_0x1308b9,_0x23b2dc)<0x0&&_0x1308b9['push'](_0x23b2dc);return _0x1308b9;},WebGLRenderingContext[_0x7f7752(0x519)][_0x7f7752(0xcd)]=function(_0x288602){const _0x583645=_0x7f7752;let _0x395416,_0x555623,_0x2f734b,_0x1a12b2,_0x301a55,_0x3d1951,_0x4ba310,_0x12b2f3,_0xdb89a3,_0x381796,_0xc8f9f3,_0xcd1a3d,_0x4eceb8,_0x37973e,_0xe9e5e0,_0x6ae160,_0x473c73,_0x438ab3,_0x111edc,_0x54d18b,_0x587878,_0x460461,_0xfa8627,_0x490c41,_0x2a1c7d,_0x36982b;for(_0x288602[_0x583645(0x433)]==null&&(_0x288602[_0x583645(0x433)]=[_0x583645(0x914)]),_0x288602['require']==null&&(_0x288602[_0x583645(0xfb)]=[]),_0x288602[_0x583645(0x9bc)]==null&&(_0x288602[_0x583645(0x9bc)]=!0x0),_0x37973e=this[_0x583645(0x20e)]('OES_texture_float'),_0x3d1951=this['getExtension'](_0x583645(0x2a5)),_0xcd1a3d=this['getExtension']('WEBGL_color_buffer_float'),_0x1a12b2=this[_0x583645(0x20e)]('EXT_color_buffer_half_float'),_0x4eceb8=this['getExtension'](_0x583645(0x971)),_0x301a55=this['getExtension'](_0x583645(0x48f)),_0xc8f9f3={'texture':_0x37973e!==null,'filterable':_0x4eceb8!==null,'renderable':_0xcd1a3d!==null,'score':0x0,'precision':_0x583645(0x510),'half':!0x1,'single':!0x0,'type':this[_0x583645(0x5fa)]},_0x2f734b={'texture':_0x3d1951!==null,'filterable':_0x301a55!==null,'renderable':_0x1a12b2!==null,'score':0x0,'precision':_0x583645(0x914),'half':!0x0,'single':!0x1,'type':(_0x490c41=_0x3d1951!=null?_0x3d1951[_0x583645(0x154)]:void 0x0)!=null?_0x490c41:null},_0x555623=[],_0xc8f9f3[_0x583645(0xf1)]&&_0x555623[_0x583645(0xb3)](_0xc8f9f3),_0x2f734b['texture']&&_0x555623['push'](_0x2f734b),_0x381796=[],_0x6ae160=0x0,_0x111edc=_0x555623[_0x583645(0x6a2)];_0x6ae160<_0x111edc;_0x6ae160++){for(_0x395416=_0x555623[_0x6ae160],_0xe9e5e0=!0x0,_0x2a1c7d=_0x288602['require'],_0x473c73=0x0,_0x54d18b=_0x2a1c7d[_0x583645(0x6a2)];_0x473c73<_0x54d18b;_0x473c73++)_0x2c5a0f=_0x2a1c7d[_0x473c73],_0x395416[_0x2c5a0f]===!0x1&&(_0xe9e5e0=!0x1);_0xe9e5e0&&_0x381796[_0x583645(0xb3)](_0x395416);}for(_0x438ab3=0x0,_0x587878=_0x381796[_0x583645(0x6a2)];_0x438ab3<_0x587878;_0x438ab3++)for(_0x395416=_0x381796[_0x438ab3],_0x36982b=_0x288602[_0x583645(0x433)],_0x4ba310=_0xfa8627=0x0,_0x460461=_0x36982b[_0x583645(0x6a2)];_0xfa8627<_0x460461;_0x4ba310=++_0xfa8627)_0xdb89a3=_0x36982b[_0x4ba310],_0x12b2f3=Math[_0x583645(0x191)](0x2,_0x288602['prefer'][_0x583645(0x6a2)]-_0x4ba310-0x1),_0x395416[_0xdb89a3]&&(_0x395416[_0x583645(0x76f)]+=_0x12b2f3);if(_0x381796[_0x583645(0xaab)](function(_0x2b38bb,_0x1a895a){const _0x2ce1ec=_0x583645;if(_0x2b38bb['score']===_0x1a895a[_0x2ce1ec(0x76f)])return 0x0;if(_0x2b38bb[_0x2ce1ec(0x76f)]<_0x1a895a['score'])return 0x1;if(_0x2b38bb['score']>_0x1a895a[_0x2ce1ec(0x76f)])return-0x1;}),_0x381796['length']===0x0){if(_0x288602[_0x583645(0x9bc)])throw _0x583645(0x7c1)+_0x288602[_0x583645(0xfb)][_0x583645(0x9e0)](',\x20');return null;}else return _0x381796=_0x381796[0x0],{'filterable':_0x381796[_0x583645(0x6de)],'renderable':_0x381796[_0x583645(0x5ca)],'type':_0x381796[_0x583645(0x9cf)],'precision':_0x381796[_0x583645(0x168)]};};}};_0x57126d(),_0xa98301();var _0x10e95a=(function(){const _0x8250d0=_0x43bf95;function _0x4ee9db(_0x1d1805,_0x386f4e){const _0x2aaac8=_0xf114;let _0x4a27f8,_0x1e4b93;this['gl']=_0x1d1805,_0x1e4b93=_0x386f4e['vertex'],_0x4a27f8=_0x386f4e[_0x2aaac8(0x493)],this[_0x2aaac8(0x8f2)]=this['gl'][_0x2aaac8(0x163)](),this['vs']=this['gl'][_0x2aaac8(0x276)](this['gl'][_0x2aaac8(0xa3b)]),this['fs']=this['gl']['createShader'](this['gl'][_0x2aaac8(0x161)]),this['gl'][_0x2aaac8(0x316)](this[_0x2aaac8(0x8f2)],this['vs']),this['gl'][_0x2aaac8(0x316)](this[_0x2aaac8(0x8f2)],this['fs']),this['compileShader'](this['vs'],_0x1e4b93),this[_0x2aaac8(0x7c3)](this['fs'],_0x4a27f8),this[_0x2aaac8(0x405)](),this['value_cache']={},this[_0x2aaac8(0x852)]={},this[_0x2aaac8(0x5a8)]={};}return _0x4ee9db[_0x8250d0(0x519)][_0x8250d0(0x1e4)]=function(_0xb869d7){const _0x24c843=_0x8250d0;let _0x38ef0f=this[_0x24c843(0x5a8)][_0xb869d7];return _0x38ef0f===void 0x0&&(_0x38ef0f=this['attribCache'][_0xb869d7]=this['gl']['getAttribLocation'](this['program'],_0xb869d7)),_0x38ef0f;},_0x4ee9db[_0x8250d0(0x519)][_0x8250d0(0x7c3)]=function(_0x463e50,_0x238739){const _0xc11c5d=_0x8250d0;if(this['gl'][_0xc11c5d(0xa71)](_0x463e50,_0x238739),this['gl'][_0xc11c5d(0x7c3)](_0x463e50),!this['gl'][_0xc11c5d(0xf2)](_0x463e50,this['gl'][_0xc11c5d(0x8bd)]))throw _0xc11c5d(0x831)+this['gl'][_0xc11c5d(0x40d)](_0x463e50);},_0x4ee9db[_0x8250d0(0x519)][_0x8250d0(0x405)]=function(){const _0x2fe8e7=_0x8250d0;if(this['gl'][_0x2fe8e7(0x4d3)](this[_0x2fe8e7(0x8f2)]),!this['gl'][_0x2fe8e7(0x4c0)](this[_0x2fe8e7(0x8f2)],this['gl'][_0x2fe8e7(0x472)]))throw _0x2fe8e7(0x8f8)+this['gl'][_0x2fe8e7(0x688)](this[_0x2fe8e7(0x8f2)]);},_0x4ee9db[_0x8250d0(0x519)][_0x8250d0(0x50c)]=function(){const _0x2af1ba=_0x8250d0;return this['gl'][_0x2af1ba(0x736)](this[_0x2af1ba(0x8f2)]),this;},_0x4ee9db[_0x8250d0(0x519)][_0x8250d0(0xb9)]=function(_0x4815ac){const _0x508d67=_0x8250d0;let _0x33ba65=this[_0x508d67(0x852)][_0x4815ac];return _0x33ba65===void 0x0&&(_0x33ba65=this[_0x508d67(0x852)][_0x4815ac]=this['gl'][_0x508d67(0x469)](this[_0x508d67(0x8f2)],_0x4815ac)),_0x33ba65;},_0x4ee9db[_0x8250d0(0x519)]['int']=function(_0x2bd812,_0x447336){const _0x380e6c=_0x8250d0;let _0x541127,_0x37c877;return _0x541127=this[_0x380e6c(0x5cd)][_0x2bd812],_0x541127!==_0x447336&&(this['value_cache'][_0x2bd812]=_0x447336,_0x37c877=this[_0x380e6c(0xb9)](_0x2bd812),_0x37c877&&this['gl']['uniform1i'](_0x37c877,_0x447336)),this;},_0x4ee9db['prototype']['vec2']=function(_0x4d47ca,_0x1e7189,_0x372efa){const _0x479faa=_0x8250d0;let _0x47b23d;return _0x47b23d=this['uniformLoc'](_0x4d47ca),_0x47b23d&&this['gl'][_0x479faa(0x36b)](_0x47b23d,_0x1e7189,_0x372efa),this;},_0x4ee9db[_0x8250d0(0x519)][_0x8250d0(0xa19)]=function(_0xc436e8,_0xc7d5f2){const _0x41bdd5=_0x8250d0;let _0x1cd45f,_0x78ef88;return _0x1cd45f=this[_0x41bdd5(0x5cd)][_0xc436e8],_0x1cd45f!==_0xc7d5f2&&(this[_0x41bdd5(0x5cd)][_0xc436e8]=_0xc7d5f2,_0x78ef88=this[_0x41bdd5(0xb9)](_0xc436e8),_0x78ef88&&this['gl'][_0x41bdd5(0x98c)](_0x78ef88,_0xc7d5f2)),this;},_0x4ee9db;}()),_0x4bd0df=(function(){const _0x3fd91f=_0x43bf95;function _0x5017d7(_0x4be514){const _0x4bf6dc=_0xf114;this['gl']=_0x4be514,this[_0x4bf6dc(0x72f)]=this['gl']['createFramebuffer']();}return _0x5017d7[_0x3fd91f(0x519)]['destroy']=function(){return this['gl']['deleteFRamebuffer'](this['buffer']);},_0x5017d7[_0x3fd91f(0x519)]['bind']=function(){const _0x4ea7b2=_0x3fd91f;return this['gl']['bindFramebuffer'](this['gl'][_0x4ea7b2(0x689)],this[_0x4ea7b2(0x72f)]),this;},_0x5017d7[_0x3fd91f(0x519)][_0x3fd91f(0x272)]=function(){const _0x3068fc=_0x3fd91f;return this['gl'][_0x3068fc(0x9fe)](this['gl'][_0x3068fc(0x689)],null),this;},_0x5017d7['prototype'][_0x3fd91f(0xa9b)]=function(){const _0x208818=_0x3fd91f;let _0x1f4bd7;switch(_0x1f4bd7=this['gl'][_0x208818(0x5aa)](this['gl'][_0x208818(0x689)]),_0x1f4bd7){case this['gl'][_0x208818(0x258)]:throw _0x208818(0x592);case this['gl']['FRAMEBUFFER_INCOMPLETE_ATTACHMENT']:throw _0x208818(0x929);case this['gl'][_0x208818(0x18b)]:throw _0x208818(0x437);case this['gl'][_0x208818(0x39b)]:throw'Framebuffer\x20incomplete\x20missing\x20attachment';}return this;},_0x5017d7[_0x3fd91f(0x519)][_0x3fd91f(0x124)]=function(_0x45d772){const _0x427228=_0x3fd91f;return this['gl'][_0x427228(0x670)](this['gl'][_0x427228(0x689)],this['gl'][_0x427228(0x453)],_0x45d772['target'],_0x45d772['handle'],0x0),this[_0x427228(0xa9b)](),this;},_0x5017d7[_0x3fd91f(0x519)][_0x3fd91f(0x55f)]=function(_0x399090){const _0x3a783b=_0x3fd91f;return this['gl']['framebufferRenderbuffer'](this['gl']['FRAMEBUFFER'],this['gl']['DEPTH_ATTACHMENT'],this['gl']['RENDERBUFFER'],_0x399090['id']),this[_0x3a783b(0xa9b)](),this;},_0x5017d7[_0x3fd91f(0x519)][_0x3fd91f(0x57b)]=function(){const _0x4544cd=_0x3fd91f;return this['gl']['deleteFramebuffer'](this[_0x4544cd(0x72f)]);},_0x5017d7;}()),_0x38e327=(function(){const _0x294d91=_0x43bf95;function _0x3a87bd(_0x3d4166,_0x45fbb2){const _0xbbc8f4=_0xf114;let _0x46cb37,_0x162bdf;switch(this['gl']=_0x3d4166,_0x45fbb2==null&&(_0x45fbb2={}),this[_0xbbc8f4(0x5dd)]=this['gl'][((_0x46cb37=_0x45fbb2['channels'])!=null?_0x46cb37:'rgba')[_0xbbc8f4(0x9d4)]()],typeof _0x45fbb2[_0xbbc8f4(0x9cf)]==_0xbbc8f4(0x380)?this[_0xbbc8f4(0x9cf)]=_0x45fbb2['type']:this[_0xbbc8f4(0x9cf)]=this['gl'][((_0x162bdf=_0x45fbb2['type'])!=null?_0x162bdf:'unsigned_byte')[_0xbbc8f4(0x9d4)]()],this[_0xbbc8f4(0x5dd)]){case this['gl'][_0xbbc8f4(0x1b2)]:this[_0xbbc8f4(0x727)]=0x4;break;case this['gl'][_0xbbc8f4(0x9c8)]:this[_0xbbc8f4(0x727)]=0x3;break;case this['gl'][_0xbbc8f4(0x3b2)]:this[_0xbbc8f4(0x727)]=0x2;break;default:this[_0xbbc8f4(0x727)]=0x1;}this[_0xbbc8f4(0x418)]=this['gl']['TEXTURE_2D'],this['handle']=this['gl'][_0xbbc8f4(0x40f)]();}return _0x3a87bd[_0x294d91(0x519)][_0x294d91(0x57b)]=function(){const _0x3a68aa=_0x294d91;return this['gl'][_0x3a68aa(0x5d5)](this[_0x3a68aa(0xa3f)]);},_0x3a87bd[_0x294d91(0x519)][_0x294d91(0x31a)]=function(_0x39377d){const _0x2d87b1=_0x294d91;if(_0x39377d==null&&(_0x39377d=0x0),_0x39377d>0xf)throw _0x2d87b1(0x8f7)+_0x39377d;return this['gl']['activeTexture'](this['gl'][_0x2d87b1(0x170)]+_0x39377d),this['gl'][_0x2d87b1(0x9a8)](this[_0x2d87b1(0x418)],this[_0x2d87b1(0xa3f)]),this;},_0x3a87bd[_0x294d91(0x519)]['setSize']=function(_0x17087a,_0x28c2d2){const _0x50f5be=_0x294d91;return this[_0x50f5be(0x371)]=_0x17087a,this[_0x50f5be(0x795)]=_0x28c2d2,this['gl']['texImage2D'](this['target'],0x0,this[_0x50f5be(0x5dd)],this['width'],this['height'],0x0,this[_0x50f5be(0x5dd)],this['type'],null),this;},_0x3a87bd[_0x294d91(0x519)][_0x294d91(0x6d6)]=function(_0x45278d){const _0x448c0f=_0x294d91;return this['width']=_0x45278d['width'],this['height']=_0x45278d['height'],this['gl']['texImage2D'](this['target'],0x0,this[_0x448c0f(0x5dd)],this['channels'],this[_0x448c0f(0x9cf)],_0x45278d),this;},_0x3a87bd[_0x294d91(0x519)][_0x294d91(0x243)]=function(){const _0x143268=_0x294d91;return this['gl']['texParameteri'](this[_0x143268(0x418)],this['gl']['TEXTURE_MAG_FILTER'],this['gl'][_0x143268(0x6fd)]),this['gl'][_0x143268(0x580)](this[_0x143268(0x418)],this['gl']['TEXTURE_MIN_FILTER'],this['gl'][_0x143268(0x6fd)]),this;},_0x3a87bd[_0x294d91(0x519)][_0x294d91(0x936)]=function(){const _0x25fc2c=_0x294d91;return this['gl'][_0x25fc2c(0x580)](this[_0x25fc2c(0x418)],this['gl'][_0x25fc2c(0x7fb)],this['gl']['NEAREST']),this['gl']['texParameteri'](this[_0x25fc2c(0x418)],this['gl'][_0x25fc2c(0x20c)],this['gl'][_0x25fc2c(0x1b3)]),this;},_0x3a87bd['prototype'][_0x294d91(0x486)]=function(){const _0x53fea0=_0x294d91;return this['gl'][_0x53fea0(0x580)](this[_0x53fea0(0x418)],this['gl'][_0x53fea0(0x899)],this['gl'][_0x53fea0(0x94f)]),this['gl'][_0x53fea0(0x580)](this[_0x53fea0(0x418)],this['gl'][_0x53fea0(0x7be)],this['gl'][_0x53fea0(0x94f)]),this;},_0x3a87bd[_0x294d91(0x519)][_0x294d91(0x190)]=function(){const _0x445afc=_0x294d91;return this['gl']['texParameteri'](this['target'],this['gl'][_0x445afc(0x899)],this['gl'][_0x445afc(0x714)]),this['gl'][_0x445afc(0x580)](this[_0x445afc(0x418)],this['gl'][_0x445afc(0x7be)],this['gl'][_0x445afc(0x714)]),this;},_0x3a87bd;}()),_0x3b5251=(function(){const _0xb64629=_0x43bf95;function _0x969b06(_0x1d8624,_0x5b87e5,_0x3cd44e){const _0x53cc21=_0xf114;let _0xb91cbe;this['gl']=_0x1d8624,this[_0x53cc21(0x371)]=_0x5b87e5,this[_0x53cc21(0x795)]=_0x3cd44e,_0xb91cbe=this['gl'][_0x53cc21(0xcd)]({'require':['renderable']}),this['texture']=new _0x38e327(this['gl'],{'type':_0xb91cbe[_0x53cc21(0x9cf)]})[_0x53cc21(0x31a)](0x0)[_0x53cc21(0x5d1)](this[_0x53cc21(0x371)],this[_0x53cc21(0x795)])[_0x53cc21(0x936)]()['clampToEdge'](),this[_0x53cc21(0x1b1)]=new _0x4bd0df(this['gl'])[_0x53cc21(0x31a)]()[_0x53cc21(0x124)](this[_0x53cc21(0xf1)])[_0x53cc21(0x272)]();}return _0x969b06[_0xb64629(0x519)][_0xb64629(0x50c)]=function(){const _0x472fe3=_0xb64629;return this['fbo'][_0x472fe3(0x31a)]();},_0x969b06[_0xb64629(0x519)][_0xb64629(0x31a)]=function(_0x2dc548){const _0x53bd90=_0xb64629;return this[_0x53bd90(0xf1)]['bind'](_0x2dc548);},_0x969b06[_0xb64629(0x519)][_0xb64629(0x8a9)]=function(){const _0x86b6f2=_0xb64629;return this['fbo'][_0x86b6f2(0x272)]();},_0x969b06[_0xb64629(0x519)][_0xb64629(0x9bd)]=function(_0x3afc35,_0x53559c){const _0x58a087=_0xb64629;return this[_0x58a087(0x371)]=_0x3afc35,this[_0x58a087(0x795)]=_0x53559c,this[_0x58a087(0xf1)]['bind'](0x0)['setSize'](this[_0x58a087(0x371)],this[_0x58a087(0x795)]);},_0x969b06;}()),_0x477de1=(function(){const _0x185cd8=_0x43bf95;function _0x3b7f9b(_0x3095d4,_0x5098d9,_0x1a5e45,_0x241739){const _0x347e13=_0xf114;let _0x5065c4,_0x19a983,_0x4e108e;for(this[_0x347e13(0x3fc)]=_0x3095d4,this['gl']=_0x5098d9,this[_0x347e13(0x371)]=_0x1a5e45,this[_0x347e13(0x795)]=_0x241739,this[_0x347e13(0x874)]=new _0x10e95a(this['gl'],{'vertex':_0x347e13(0x7cf),'fragment':'#ifdef\x20GL_FRAGMENT_PRECISION_HIGH\x0a\x20\x20\x20\x20precision\x20highp\x20int;\x0a\x20\x20\x20\x20precision\x20highp\x20float;\x0a#else\x0a\x20\x20\x20\x20precision\x20mediump\x20int;\x0a\x20\x20\x20\x20precision\x20mediump\x20float;\x0a#endif\x0avarying\x20vec2\x20off,\x20dim;\x0avarying\x20float\x20vIntensity;\x0avoid\x20main(){\x0a\x20\x20\x20\x20float\x20falloff\x20=\x20(1.0\x20-\x20smoothstep(0.0,\x201.0,\x20length(off/dim)));\x0a\x20\x20\x20\x20float\x20intensity\x20=\x20falloff*vIntensity;\x0a\x20\x20\x20\x20gl_FragColor\x20=\x20vec4(intensity);\x0a}'}),this['clampShader']=new _0x10e95a(this['gl'],{'vertex':_0x44ef51,'fragment':_0x18d0e0+_0x347e13(0x120)}),this[_0x347e13(0x779)]=new _0x10e95a(this['gl'],{'vertex':_0x44ef51,'fragment':_0x18d0e0+_0x347e13(0x766)}),this['blurShader']=new _0x10e95a(this['gl'],{'vertex':_0x44ef51,'fragment':_0x18d0e0+'uniform\x20vec2\x20viewport;\x0avoid\x20main(){\x0a\x20\x20\x20\x20vec4\x20result\x20=\x20vec4(0.0);\x0a\x20\x20\x20\x20for(int\x20x=-1;\x20x<=1;\x20x++){\x0a\x20\x20\x20\x20\x20\x20\x20\x20for(int\x20y=-1;\x20y<=1;\x20y++){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20vec2\x20off\x20=\x20vec2(x,y)/viewport;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//float\x20factor\x20=\x201.0\x20-\x20smoothstep(0.0,\x201.5,\x20length(off));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20float\x20factor\x20=\x201.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20result\x20+=\x20vec4(texture2D(source,\x20texcoord+off).rgb*factor,\x20factor);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20gl_FragColor\x20=\x20vec4(result.rgb/result.w,\x201.0);\x0a}'}),this['nodeBack']=new _0x3b5251(this['gl'],this[_0x347e13(0x371)],this[_0x347e13(0x795)]),this[_0x347e13(0x388)]=new _0x3b5251(this['gl'],this[_0x347e13(0x371)],this[_0x347e13(0x795)]),this['vertexBuffer']=this['gl'][_0x347e13(0x134)](),this[_0x347e13(0x28f)]=0x8,this['maxPointCount']=0x400*0xa,this[_0x347e13(0xa18)]=new Float32Array(this[_0x347e13(0x71b)]*this['vertexSize']*0x6),this[_0x347e13(0x53d)]=[],_0x5065c4=_0x19a983=0x0,_0x4e108e=this[_0x347e13(0x71b)];0x0<=_0x4e108e?_0x19a983<_0x4e108e:_0x19a983>_0x4e108e;_0x5065c4=0x0<=_0x4e108e?++_0x19a983:--_0x19a983)this['vertexBufferViews'][_0x347e13(0xb3)](new Float32Array(this[_0x347e13(0xa18)][_0x347e13(0x72f)],0x0,_0x5065c4*this[_0x347e13(0x28f)]*0x6));this[_0x347e13(0x90b)]=0x0,this[_0x347e13(0x792)]=0x0;}return _0x3b7f9b[_0x185cd8(0x519)][_0x185cd8(0x9bd)]=function(_0x49a128,_0x22a26b){const _0x375a21=_0x185cd8;return this[_0x375a21(0x371)]=_0x49a128,this[_0x375a21(0x795)]=_0x22a26b,this[_0x375a21(0x68b)][_0x375a21(0x9bd)](this['width'],this[_0x375a21(0x795)]),this['nodeFront'][_0x375a21(0x9bd)](this[_0x375a21(0x371)],this[_0x375a21(0x795)]);},_0x3b7f9b[_0x185cd8(0x519)][_0x185cd8(0x96f)]=function(){const _0xf6204c=_0x185cd8;var _0x4bbad8,_0xa1ded8;if(this[_0xf6204c(0x792)]>0x0)return this['gl'][_0xf6204c(0x35a)](this['gl'][_0xf6204c(0x1fd)]),this['nodeFront']['use'](),this['gl'][_0xf6204c(0x189)](this['gl'][_0xf6204c(0x832)],this[_0xf6204c(0x9f4)]),this['gl'][_0xf6204c(0xbd)](this['gl']['ARRAY_BUFFER'],this[_0xf6204c(0x53d)][this[_0xf6204c(0x792)]],this['gl'][_0xf6204c(0x2fc)]),_0xa1ded8=this[_0xf6204c(0x874)][_0xf6204c(0x1e4)](_0xf6204c(0x9a7)),_0x4bbad8=this[_0xf6204c(0x874)][_0xf6204c(0x1e4)](_0xf6204c(0x7f7)),this['gl'][_0xf6204c(0x70e)](0x1),this['gl'][_0xf6204c(0x223)](_0xa1ded8,0x4,this['gl']['FLOAT'],!0x1,0x8*0x4,0x0),this['gl'][_0xf6204c(0x223)](_0x4bbad8,0x4,this['gl'][_0xf6204c(0x5fa)],!0x1,0x8*0x4,0x4*0x4),this[_0xf6204c(0x874)][_0xf6204c(0x50c)]()[_0xf6204c(0x85f)]('viewport',this[_0xf6204c(0x371)],this[_0xf6204c(0x795)]),this['gl']['drawArrays'](this['gl']['TRIANGLES'],0x0,this[_0xf6204c(0x792)]*0x6),this['gl'][_0xf6204c(0x3a8)](0x1),this[_0xf6204c(0x792)]=0x0,this[_0xf6204c(0x90b)]=0x0,this[_0xf6204c(0x388)]['end'](),this['gl']['disable'](this['gl'][_0xf6204c(0x1fd)]);},_0x3b7f9b['prototype'][_0x185cd8(0x90d)]=function(){const _0x4414b4=_0x185cd8;return this[_0x4414b4(0x388)]['use'](),this['gl'][_0x4414b4(0x830)](0x0,0x0,0x0,0x1),this['gl']['clear'](this['gl'][_0x4414b4(0xa4d)]),this[_0x4414b4(0x388)]['end']();},_0x3b7f9b[_0x185cd8(0x519)][_0x185cd8(0x80a)]=function(_0x591ee2,_0x5adaf4){const _0x28aa07=_0x185cd8;return this['gl'][_0x28aa07(0x189)](this['gl'][_0x28aa07(0x832)],this[_0x28aa07(0x3fc)][_0x28aa07(0x2d8)]),this['gl'][_0x28aa07(0x223)](0x0,0x4,this['gl'][_0x28aa07(0x5fa)],!0x1,0x0,0x0),this[_0x28aa07(0x388)][_0x28aa07(0x31a)](0x0),this[_0x28aa07(0x68b)][_0x28aa07(0x50c)](),this[_0x28aa07(0x966)]['use']()[_0x28aa07(0x857)]('source',0x0)[_0x28aa07(0xa19)](_0x28aa07(0x45d),_0x591ee2)[_0x28aa07(0xa19)](_0x28aa07(0x94c),_0x5adaf4),this['gl'][_0x28aa07(0x40a)](this['gl'][_0x28aa07(0xa9f)],0x0,0x6),this[_0x28aa07(0x68b)][_0x28aa07(0x8a9)](),this[_0x28aa07(0x3b8)]();},_0x3b7f9b[_0x185cd8(0x519)]['multiply']=function(_0x50f96d){const _0x4c9451=_0x185cd8;return this['gl']['bindBuffer'](this['gl'][_0x4c9451(0x832)],this['heatmap'][_0x4c9451(0x2d8)]),this['gl'][_0x4c9451(0x223)](0x0,0x4,this['gl'][_0x4c9451(0x5fa)],!0x1,0x0,0x0),this[_0x4c9451(0x388)][_0x4c9451(0x31a)](0x0),this[_0x4c9451(0x68b)][_0x4c9451(0x50c)](),this[_0x4c9451(0x779)][_0x4c9451(0x50c)]()[_0x4c9451(0x857)](_0x4c9451(0x2b9),0x0)[_0x4c9451(0xa19)](_0x4c9451(0xa59),_0x50f96d),this['gl']['drawArrays'](this['gl'][_0x4c9451(0xa9f)],0x0,0x6),this[_0x4c9451(0x68b)][_0x4c9451(0x8a9)](),this['swap']();},_0x3b7f9b['prototype']['blur']=function(){const _0xfb459a=_0x185cd8;return this['gl'][_0xfb459a(0x189)](this['gl'][_0xfb459a(0x832)],this[_0xfb459a(0x3fc)][_0xfb459a(0x2d8)]),this['gl'][_0xfb459a(0x223)](0x0,0x4,this['gl']['FLOAT'],!0x1,0x0,0x0),this[_0xfb459a(0x388)][_0xfb459a(0x31a)](0x0),this[_0xfb459a(0x68b)][_0xfb459a(0x50c)](),this[_0xfb459a(0x649)][_0xfb459a(0x50c)]()[_0xfb459a(0x857)]('source',0x0)[_0xfb459a(0x85f)](_0xfb459a(0xea),this[_0xfb459a(0x371)],this[_0xfb459a(0x795)]),this['gl']['drawArrays'](this['gl'][_0xfb459a(0xa9f)],0x0,0x6),this[_0xfb459a(0x68b)]['end'](),this[_0xfb459a(0x3b8)]();},_0x3b7f9b[_0x185cd8(0x519)][_0x185cd8(0x3b8)]=function(){const _0x21b634=_0x185cd8;let _0x356d54=this[_0x21b634(0x388)];return this[_0x21b634(0x388)]=this[_0x21b634(0x68b)],this[_0x21b634(0x68b)]=_0x356d54;},_0x3b7f9b[_0x185cd8(0x519)][_0x185cd8(0x49d)]=function(_0x1e70ce,_0x29a17d,_0xa0b453,_0x5ed6d9,_0x1b055b){const _0x4abb09=_0x185cd8;return this[_0x4abb09(0xa18)][this[_0x4abb09(0x90b)]++]=_0x1e70ce,this[_0x4abb09(0xa18)][this[_0x4abb09(0x90b)]++]=_0x29a17d,this['vertexBufferData'][this[_0x4abb09(0x90b)]++]=_0xa0b453,this['vertexBufferData'][this[_0x4abb09(0x90b)]++]=_0x5ed6d9,this[_0x4abb09(0xa18)][this[_0x4abb09(0x90b)]++]=_0x1b055b,this[_0x4abb09(0xa18)][this[_0x4abb09(0x90b)]++]=_0x1b055b,this[_0x4abb09(0xa18)][this[_0x4abb09(0x90b)]++]=_0x1b055b,this['vertexBufferData'][this[_0x4abb09(0x90b)]++]=_0x1b055b;},_0x3b7f9b[_0x185cd8(0x519)]['addPoint']=function(_0x3cd0c6,_0x58557c,_0x1b20c0,_0x263528){const _0x4cde5e=_0x185cd8;let _0x16bb02;return _0x1b20c0==null&&(_0x1b20c0=0x32),_0x263528==null&&(_0x263528=0.2),this[_0x4cde5e(0x792)]>=this[_0x4cde5e(0x71b)]-0x1&&this[_0x4cde5e(0x96f)](),_0x58557c=this['height']-_0x58557c,_0x16bb02=_0x1b20c0/0x2,this['addVertex'](_0x3cd0c6,_0x58557c,-_0x16bb02,-_0x16bb02,_0x263528),this[_0x4cde5e(0x49d)](_0x3cd0c6,_0x58557c,+_0x16bb02,-_0x16bb02,_0x263528),this['addVertex'](_0x3cd0c6,_0x58557c,-_0x16bb02,+_0x16bb02,_0x263528),this[_0x4cde5e(0x49d)](_0x3cd0c6,_0x58557c,-_0x16bb02,+_0x16bb02,_0x263528),this[_0x4cde5e(0x49d)](_0x3cd0c6,_0x58557c,+_0x16bb02,-_0x16bb02,_0x263528),this[_0x4cde5e(0x49d)](_0x3cd0c6,_0x58557c,+_0x16bb02,+_0x16bb02,_0x263528),this[_0x4cde5e(0x792)]+=0x1;},_0x3b7f9b;}()),_0x5a1162=(function(){const _0x7e87dc=_0x43bf95;function _0x3b80de(_0xa34c2f){const _0x37431f=_0xf114;let _0x4fb575,_0x140ee8,_0x144e51,_0x591f40,_0x2bec27,_0x594490,_0x50e8b2,_0x195f89,_0x45faf7,_0x21d0c1,_0xa9bc08,_0x37f723,_0x66788b;_0x37f723=_0xa34c2f!=null?_0xa34c2f:{},this['canvas']=_0x37f723['canvas'],this[_0x37431f(0x371)]=_0x37f723[_0x37431f(0x371)],this[_0x37431f(0x795)]=_0x37f723[_0x37431f(0x795)],_0x195f89=_0x37f723['intensityToAlpha'],_0x594490=_0x37f723[_0x37431f(0x705)],_0x140ee8=_0x37f723[_0x37431f(0x377)],this[_0x37431f(0x790)]||(this[_0x37431f(0x790)]=document[_0x37431f(0x7dc)](_0x37431f(0x790)));try{if(this['gl']=this[_0x37431f(0x790)][_0x37431f(0x7f0)](_0x37431f(0x917),{'depth':!0x1,'antialias':!0x1}),this['gl']===null&&(this['gl']=this[_0x37431f(0x790)]['getContext'](_0x37431f(0x4d5),{'depth':!0x1,'antialias':!0x1}),this['gl']===null))throw'WebGL\x20not\x20supported';}catch(_0xcdf580){throw _0x591f40=_0xcdf580,_0x37431f(0x4fb);}window[_0x37431f(0x8f5)]!=null&&(this['gl']=window[_0x37431f(0x8f5)][_0x37431f(0x9f2)](this['gl'],function(_0x4caa1a,_0xfba0bc,_0x2785b9){const _0x20d9d2=_0x37431f;throw window[_0x20d9d2(0x8f5)][_0x20d9d2(0x288)](_0x4caa1a)+_0x20d9d2(0x3cf)+_0xfba0bc;})),this['gl'][_0x37431f(0x70e)](0x0),this['gl'][_0x37431f(0x187)](this['gl'][_0x37431f(0x409)],this['gl'][_0x37431f(0x409)]),_0x594490?(_0xa9bc08=this[_0x37431f(0x705)]=new _0x38e327(this['gl'],{'channels':'rgba'})[_0x37431f(0x31a)](0x0)[_0x37431f(0x5d1)](0x2,0x2)[_0x37431f(0x936)]()[_0x37431f(0x486)](),typeof _0x594490=='string'?(_0x50e8b2=new Image(),_0x50e8b2[_0x37431f(0x38f)]=function(){const _0x513bff=_0x37431f;return _0xa9bc08[_0x513bff(0x31a)]()['upload'](_0x50e8b2);},_0x50e8b2[_0x37431f(0x4e8)]=_0x594490):_0x594490[_0x37431f(0x371)]>0x0&&_0x594490[_0x37431f(0x795)]>0x0?_0xa9bc08[_0x37431f(0x6d6)](_0x594490):_0x594490[_0x37431f(0x38f)]=function(){const _0x58633a=_0x37431f;return _0xa9bc08[_0x58633a(0x6d6)](_0x594490);},_0x2bec27=_0x37431f(0x8a8)):(_0xa9bc08=null,_0x2bec27=_0x37431f(0x91e)),_0x195f89==null&&(_0x195f89=!0x0),_0x195f89?(_0x66788b=_0x140ee8!=null?_0x140ee8:[0x0,0x1],_0x144e51=_0x66788b[0x0],_0x4fb575=_0x66788b[0x1],_0x45faf7=_0x37431f(0x26c)+_0x144e51[_0x37431f(0x964)](0x8)+',\x20'+_0x4fb575[_0x37431f(0x964)](0x8)+_0x37431f(0x985)):_0x45faf7=_0x37431f(0x524),this[_0x37431f(0x874)]=new _0x10e95a(this['gl'],{'vertex':_0x44ef51,'fragment':_0x18d0e0+(_0x37431f(0x348)+_0x2bec27+'\x0a'+_0x45faf7+_0x37431f(0xa34))}),this[_0x37431f(0x371)]==null&&(this[_0x37431f(0x371)]=this[_0x37431f(0x790)]['offsetWidth']||0x2),this[_0x37431f(0x795)]==null&&(this['height']=this[_0x37431f(0x790)][_0x37431f(0x7da)]||0x2),this[_0x37431f(0x790)][_0x37431f(0x371)]=this[_0x37431f(0x371)],this['canvas']['height']=this[_0x37431f(0x795)],this['gl']['viewport'](0x0,0x0,this[_0x37431f(0x371)],this['height']),this[_0x37431f(0x2d8)]=this['gl'][_0x37431f(0x134)](),this['gl'][_0x37431f(0x189)](this['gl'][_0x37431f(0x832)],this[_0x37431f(0x2d8)]),_0x21d0c1=new Float32Array([-0x1,-0x1,0x0,0x1,0x1,-0x1,0x0,0x1,-0x1,0x1,0x0,0x1,-0x1,0x1,0x0,0x1,0x1,-0x1,0x0,0x1,0x1,0x1,0x0,0x1]),this['gl'][_0x37431f(0xbd)](this['gl']['ARRAY_BUFFER'],_0x21d0c1,this['gl'][_0x37431f(0x323)]),this['gl'][_0x37431f(0x189)](this['gl']['ARRAY_BUFFER'],null),this['heights']=new _0x477de1(this,this['gl'],this[_0x37431f(0x371)],this[_0x37431f(0x795)]);}return _0x3b80de['prototype'][_0x7e87dc(0x3f4)]=function(){const _0x142df4=_0x7e87dc;let _0x20c64f,_0x4612d4;if(_0x4612d4=this[_0x142df4(0x790)][_0x142df4(0x7d8)]||0x2,_0x20c64f=this['canvas']['offsetHeight']||0x2,this['width']!==_0x4612d4||this[_0x142df4(0x795)]!==_0x20c64f)return this['gl'][_0x142df4(0xea)](0x0,0x0,_0x4612d4,_0x20c64f),this[_0x142df4(0x790)][_0x142df4(0x371)]=_0x4612d4,this[_0x142df4(0x790)][_0x142df4(0x795)]=_0x20c64f,this[_0x142df4(0x371)]=_0x4612d4,this['height']=_0x20c64f,this[_0x142df4(0xa4e)]['resize'](this[_0x142df4(0x371)],this[_0x142df4(0x795)]);},_0x3b80de['prototype'][_0x7e87dc(0xa66)]=function(){const _0x53f964=_0x7e87dc;return this['gl']['bindBuffer'](this['gl'][_0x53f964(0x832)],this[_0x53f964(0x2d8)]),this['gl'][_0x53f964(0x223)](0x0,0x4,this['gl'][_0x53f964(0x5fa)],!0x1,0x0,0x0),this[_0x53f964(0xa4e)][_0x53f964(0x388)]['bind'](0x0),this[_0x53f964(0x705)]&&this[_0x53f964(0x705)][_0x53f964(0x31a)](0x1),this[_0x53f964(0x874)][_0x53f964(0x50c)]()['int'](_0x53f964(0x2b9),0x0)['int'](_0x53f964(0x705),0x1),this['gl'][_0x53f964(0x40a)](this['gl'][_0x53f964(0xa9f)],0x0,0x6);},_0x3b80de[_0x7e87dc(0x519)][_0x7e87dc(0x96f)]=function(){const _0xc747d2=_0x7e87dc;return this[_0xc747d2(0xa4e)][_0xc747d2(0x96f)]();},_0x3b80de[_0x7e87dc(0x519)][_0x7e87dc(0x90d)]=function(){const _0x222661=_0x7e87dc;return this['heights'][_0x222661(0x90d)]();},_0x3b80de[_0x7e87dc(0x519)][_0x7e87dc(0x80a)]=function(_0xd389d7,_0x279d9e){const _0x309e7f=_0x7e87dc;return _0xd389d7==null&&(_0xd389d7=0x0),_0x279d9e==null&&(_0x279d9e=0x1),this['heights'][_0x309e7f(0x80a)](_0xd389d7,_0x279d9e);},_0x3b80de[_0x7e87dc(0x519)][_0x7e87dc(0x310)]=function(_0x5811){const _0x2b086f=_0x7e87dc;return _0x5811==null&&(_0x5811=0.95),this[_0x2b086f(0xa4e)][_0x2b086f(0x310)](_0x5811);},_0x3b80de[_0x7e87dc(0x519)]['blur']=function(){return this['heights']['blur']();},_0x3b80de[_0x7e87dc(0x519)][_0x7e87dc(0x3a0)]=function(_0x104c26,_0x4503a1,_0x3b2514,_0x6ceed4){const _0x2bb468=_0x7e87dc;return this['heights'][_0x2bb468(0x3a0)](_0x104c26,_0x4503a1,_0x3b2514,_0x6ceed4);},_0x3b80de[_0x7e87dc(0x519)][_0x7e87dc(0x933)]=function(_0x212edd){const _0x1d217a=_0x7e87dc;let _0x2e8bb2,_0x3e633c,_0x30bd8a,_0x236f6a;for(_0x236f6a=[],_0x3e633c=0x0,_0x30bd8a=_0x212edd['length'];_0x3e633c<_0x30bd8a;_0x3e633c++)_0x2e8bb2=_0x212edd[_0x3e633c],_0x236f6a[_0x1d217a(0xb3)](this[_0x1d217a(0x3a0)](_0x2e8bb2['x'],_0x2e8bb2['y'],_0x2e8bb2[_0x1d217a(0x729)],_0x2e8bb2[_0x1d217a(0x7f7)]));return _0x236f6a;},_0x3b80de;}());function _0x8ead50(_0x336e48){return new _0x5a1162(_0x336e48);}var _0x455f3f=new _0x34d1e5['Cesium']['WebMercatorProjection'](),_0x25fdd5={'radius':0x1e,'height':0x0,'gradient':void 0x0,'useGround':!0x1,'classificationType':0x2},_0x259fcf=class extends _0x49dd70{constructor(_0x272e6b,_0x317166={}){const _0x53a538=_0x43bf95;super(_0x272e6b),this[_0x53a538(0x674)]={..._0x25fdd5,..._0x317166},this[_0x53a538(0xaa1)]=new _0x34d1e5[(_0x53a538(0x7aa))][(_0x53a538(0x7b4))](),this['_isGround']=this[_0x53a538(0x674)]['useGround'],this['_canvas']=document[_0x53a538(0x7dc)]('canvas'),this['_canvas'][_0x53a538(0x4fe)]('id',_0x272e6b),this[_0x53a538(0x859)]=void 0x0,this[_0x53a538(0x8a2)]=0x1,this[_0x53a538(0x5eb)]=[],this['_bounds']=new _0x34d1e5[(_0x53a538(0x7aa))][(_0x53a538(0x6e7))](),this['_boundsInMeter']=void 0x0,this['_primitive']=this[_0x53a538(0xaa1)][_0x53a538(0x45f)](this[_0x53a538(0x14a)]?new _0x34d1e5[(_0x53a538(0x7aa))][(_0x53a538(0xa7))]({'geometryInstances':new _0x34d1e5[(_0x53a538(0x7aa))]['GeometryInstance']({'geometry':{}}),'classificationType':this[_0x53a538(0x674)][_0x53a538(0x64a)]}):new _0x34d1e5[(_0x53a538(0x7aa))][(_0x53a538(0x508))]({'geometryInstances':new _0x34d1e5[(_0x53a538(0x7aa))][(_0x53a538(0x456))]({'geometry':{}})})),this['_state']=_0x4075ae[_0x53a538(0x5d2)];}get['type'](){const _0x2be08e=_0x43bf95;return _0x49dd70[_0x2be08e(0x7b6)]('heat-map');}[_0x43bf95(0x945)](){const _0x4c5cab=_0x43bf95;this['_canvas'][_0x4c5cab(0x6a9)][_0x4c5cab(0x4ec)]='\x0a\x20\x20\x20\x20\x20\x20visibility:hidden;\x0a\x20\x20\x20\x20\x20\x20width:'+this[_0x4c5cab(0x3f7)][_0x4c5cab(0x790)]['width']+'px;\x0a\x20\x20\x20\x20\x20\x20height:'+this[_0x4c5cab(0x3f7)][_0x4c5cab(0x790)][_0x4c5cab(0x795)]+_0x4c5cab(0x1cd),this['_viewer']['layerContainer'][_0x4c5cab(0x87b)](this[_0x4c5cab(0x22b)]),this[_0x4c5cab(0x5eb)]&&this[_0x4c5cab(0x5eb)]['length']&&(this[_0x4c5cab(0x859)]=_0x8ead50({'canvas':this[_0x4c5cab(0x22b)],'gradientTexture':this[_0x4c5cab(0x9af)]()}),this[_0x4c5cab(0x8a2)]=Math[_0x4c5cab(0x66a)](Math[_0x4c5cab(0x133)](this[_0x4c5cab(0x265)][_0x4c5cab(0x97d)]-this[_0x4c5cab(0x265)][_0x4c5cab(0x147)])/this[_0x4c5cab(0x3f7)][_0x4c5cab(0x790)]['width'],Math['abs'](this[_0x4c5cab(0x265)][_0x4c5cab(0x3bf)]-this[_0x4c5cab(0x265)]['south'])/this['_viewer'][_0x4c5cab(0x790)][_0x4c5cab(0x795)]),this['_heat'][_0x4c5cab(0x99b)](),this[_0x4c5cab(0x859)][_0x4c5cab(0x933)](this[_0x4c5cab(0x932)](this[_0x4c5cab(0x5eb)])),this[_0x4c5cab(0xa99)]());}['_createGradientTexture'](){const _0xecce09=_0x43bf95;if(!this[_0xecce09(0x674)]['gradient'])return;let _0x26099c=document['createElement'](_0xecce09(0x790));_0x26099c[_0xecce09(0x371)]=0xc8,_0x26099c[_0xecce09(0x795)]=0xa;let _0x52763b=_0x26099c[_0xecce09(0x7f0)]('2d'),_0x251c46=_0x52763b[_0xecce09(0x471)](0x0,0x0,0xc8,0x0);for(let _0x2bc377 in this[_0xecce09(0x674)][_0xecce09(0x1ef)])_0x251c46[_0xecce09(0x5d6)](+_0x2bc377,this[_0xecce09(0x674)]['gradient'][_0x2bc377]);return _0x52763b[_0xecce09(0x2fa)]=_0x251c46,_0x52763b[_0xecce09(0x3dd)](0x0,0x0,0xc8,0xa),_0x26099c;}[_0x43bf95(0x932)](_0x2d78fb){return _0x2d78fb['map'](_0x3c8240=>{const _0x590101=_0xf114;let _0xdb1df7=_0x455f3f['project'](_0x34d1e5[_0x590101(0x7aa)]['Cartographic']['fromDegrees'](_0x3c8240['lng'],_0x3c8240[_0x590101(0x941)]));return{'x':(_0xdb1df7['x']-this[_0x590101(0x265)][_0x590101(0x97d)])/this[_0x590101(0x8a2)],'y':(_0xdb1df7['y']-this[_0x590101(0x265)][_0x590101(0x35e)])/this['_scale'],'size':this[_0x590101(0x674)]['radius'],'intensity':_0x3c8240[_0x590101(0xa59)]||Math[_0x590101(0x15f)]()};});}[_0x43bf95(0x33d)](){const _0x555cdc=_0x43bf95;_0x34d1e5[_0x555cdc(0x7aa)][_0x555cdc(0x6e7)][_0x555cdc(0x363)](this[_0x555cdc(0x5eb)][_0x555cdc(0x127)](_0x53df61=>_0x34d1e5[_0x555cdc(0x7aa)][_0x555cdc(0x4f1)][_0x555cdc(0x81e)](_0x53df61[_0x555cdc(0x598)],_0x53df61['lat'])),this[_0x555cdc(0x54a)]);}[_0x43bf95(0x900)](){const _0x8a8718=_0x43bf95;let _0x4e0e01=_0x455f3f['project'](_0x34d1e5[_0x8a8718(0x7aa)]['Rectangle'][_0x8a8718(0x25d)](this['_bounds'])),_0x5ab5e3=_0x455f3f[_0x8a8718(0x4bb)](_0x34d1e5['Cesium'][_0x8a8718(0x6e7)][_0x8a8718(0x300)](this[_0x8a8718(0x54a)]));this['_boundsInMeter']=new _0x34d1e5[(_0x8a8718(0x7aa))][(_0x8a8718(0x6e7))](_0x4e0e01['x'],_0x4e0e01['y'],_0x5ab5e3['x'],_0x5ab5e3['y']);}[_0x43bf95(0xa99)](){const _0x4f7428=_0x43bf95;if(!this[_0x4f7428(0x5eb)]||!this[_0x4f7428(0x5eb)][_0x4f7428(0x6a2)])return!0x1;this[_0x4f7428(0x859)][_0x4f7428(0x3f4)](),this[_0x4f7428(0x859)][_0x4f7428(0x96f)](),this['_heat'][_0x4f7428(0xa66)](),this[_0x4f7428(0x889)]&&this[_0x4f7428(0x889)][_0x4f7428(0x28a)]&&(this[_0x4f7428(0x889)][_0x4f7428(0x28a)][_0x4f7428(0x10a)]=new _0x34d1e5['Cesium']['RectangleGeometry']({'rectangle':this[_0x4f7428(0x54a)],'height':this[_0x4f7428(0x674)]['height']})),this[_0x4f7428(0x889)]['appearance']=new _0x34d1e5['Cesium']['MaterialAppearance']({'material':new _0x34d1e5[(_0x4f7428(0x7aa))][(_0x4f7428(0x4da))]({'fabric':{'type':_0x4f7428(0x4df),'uniforms':{'image':this[_0x4f7428(0x22b)]},'source':_0x4f7428(0x357)},'translucent':function(_0x2927d1){return!0x0;}}),'flat':!0x0});}[_0x43bf95(0xa6a)](_0x1b6d9b){const _0x1e14f3=_0x43bf95;return this[_0x1e14f3(0x5eb)]=_0x1b6d9b,this[_0x1e14f3(0x33d)](),this[_0x1e14f3(0x900)](),this['_viewer']&&(this[_0x1e14f3(0x8a2)]=Math[_0x1e14f3(0x66a)](Math[_0x1e14f3(0x133)](this['_boundsInMeter']['west']-this[_0x1e14f3(0x265)][_0x1e14f3(0x147)])/this['_viewer'][_0x1e14f3(0x790)][_0x1e14f3(0x371)],Math['abs'](this[_0x1e14f3(0x265)]['north']-this[_0x1e14f3(0x265)][_0x1e14f3(0x35e)])/this['_viewer']['canvas'][_0x1e14f3(0x795)]),this[_0x1e14f3(0x859)]=_0x8ead50({'canvas':this['_canvas'],'gradientTexture':this[_0x1e14f3(0x9af)]()})),this[_0x1e14f3(0x859)]&&(this[_0x1e14f3(0x859)][_0x1e14f3(0x99b)](),this[_0x1e14f3(0x859)][_0x1e14f3(0x933)](this['_parsePoints'](this[_0x1e14f3(0x5eb)])),this[_0x1e14f3(0xa99)]()),this;}['clear'](){const _0x46a440=_0x43bf95;return this[_0x46a440(0x859)][_0x46a440(0x90d)](),this[_0x46a440(0x5eb)]=[],this[_0x46a440(0x558)]=_0x4075ae[_0x46a440(0x295)],this;}};_0x49dd70[_0x43bf95(0x545)]('heat-map');var _0x4b34d6=_0x259fcf,_0x4c6f29=class{constructor(_0x2c7409,_0x4ba86c){const _0x54aa4b=_0x43bf95;this['u']=_0x2c7409,this['v']=_0x4ba86c,this['m']=this[_0x54aa4b(0x3db)]();}['magnitude'](){const _0x2a0f5b=_0x43bf95;return Math[_0x2a0f5b(0x8d5)](this['u']*this['u']+this['v']*this['v']);}['directionTo'](){const _0x14465e=_0x43bf95;let _0x210dcb=Math[_0x14465e(0x667)](this['u'],this['v'])*(0xb4/Math['PI']);return _0x210dcb<0x0&&(_0x210dcb+=0x168),_0x210dcb;}[_0x43bf95(0x4d1)](){return(this['directionTo']()+0xb4)%0x168;}},_0x5060f3=_0x4c6f29,_0x1a6004=class{constructor(_0x54ed1a){const _0x161b71=_0x43bf95;this['grid']=[],this['xmin']=_0x54ed1a[_0x161b71(0x79c)],this[_0x161b71(0x8ee)]=_0x54ed1a[_0x161b71(0x8ee)],this[_0x161b71(0x529)]=_0x54ed1a[_0x161b71(0x529)],this[_0x161b71(0x643)]=_0x54ed1a[_0x161b71(0x643)],this[_0x161b71(0x8d9)]=_0x54ed1a[_0x161b71(0x8d9)],this[_0x161b71(0x81d)]=_0x54ed1a[_0x161b71(0x81d)],this['us']=_0x54ed1a['us'],this['vs']=_0x54ed1a['vs'],this[_0x161b71(0xa50)]=_0x54ed1a[_0x161b71(0xa50)],this['deltaY']=_0x54ed1a[_0x161b71(0x16b)],this[_0x161b71(0x16b)]<0x0&&this[_0x161b71(0x529)]<this[_0x161b71(0x643)]?console['warn']('[wind-core]:\x20The\x20data\x20is\x20flipY'):(this[_0x161b71(0x529)]=Math[_0x161b71(0x66a)](_0x54ed1a['ymax'],_0x54ed1a[_0x161b71(0x529)]),this['ymax']=Math[_0x161b71(0x2c3)](_0x54ed1a[_0x161b71(0x643)],_0x54ed1a['ymin'])),this[_0x161b71(0x6e3)]=!0x0;let _0x47dd33=Math[_0x161b71(0x452)]((this[_0x161b71(0x8ee)]-this['xmin'])/_0x54ed1a['deltaX']),_0x26cea3=Math[_0x161b71(0x452)]((this[_0x161b71(0x643)]-this[_0x161b71(0x529)])/_0x54ed1a[_0x161b71(0x16b)]);(_0x47dd33!==this[_0x161b71(0x8d9)]||_0x26cea3!==this['rows'])&&console['warn'](_0x161b71(0x48b)),this[_0x161b71(0x3c4)]=Math['floor'](this[_0x161b71(0x8d9)]*_0x54ed1a[_0x161b71(0xa50)])>=0x168,this['wrappedX']=_0x161b71(0x194)in _0x54ed1a?_0x54ed1a[_0x161b71(0x194)]:this[_0x161b71(0x8ee)]>0xb4,this['grid']=this[_0x161b71(0xdc)](),this[_0x161b71(0x599)]=this['calculateRange']();}[_0x43bf95(0xdc)](){const _0x1c3f24=_0x43bf95;let _0x33c2ad=[],_0x4be5ab=0x0,_0x418e2a=this,_0x9680bd=_0x418e2a[_0x1c3f24(0x81d)],_0x2e4199=_0x418e2a[_0x1c3f24(0x8d9)],_0x3aefe4=_0x418e2a['us'],_0x4f73ba=_0x418e2a['vs'];for(let _0x8ed689=0x0;_0x8ed689<_0x9680bd;_0x8ed689++){let _0x2c2e9c=[];for(let _0x5adb5e=0x0;_0x5adb5e<_0x2e4199;_0x5adb5e++,_0x4be5ab++){let _0x426a5e=_0x3aefe4[_0x4be5ab],_0x2d5ae5=_0x4f73ba[_0x4be5ab],_0x3029e5=this['isValid'](_0x426a5e)&&this[_0x1c3f24(0x86c)](_0x2d5ae5);_0x2c2e9c[_0x5adb5e]=_0x3029e5?new _0x5060f3(_0x426a5e,_0x2d5ae5):null;}this[_0x1c3f24(0x3c4)]&&_0x2c2e9c[_0x1c3f24(0xb3)](_0x2c2e9c[0x0]),_0x33c2ad[_0x8ed689]=_0x2c2e9c;}return _0x33c2ad;}[_0x43bf95(0x2f1)](){const _0x1c4a89=_0x43bf95;this[_0x1c4a89(0x627)]=[];}[_0x43bf95(0x737)](){const _0x31333d=_0x43bf95;return[this[_0x31333d(0x79c)],this[_0x31333d(0x529)],this[_0x31333d(0x8ee)],this[_0x31333d(0x643)]];}[_0x43bf95(0x95a)](_0x15e8a9,_0x2bbeca,_0x56c036,_0x6fbefc,_0x3dc888,_0x395d6a){let _0x4b740c=0x1-_0x15e8a9,_0x118d1a=0x1-_0x2bbeca,_0xa99fa8=_0x4b740c*_0x118d1a,_0x58a364=_0x15e8a9*_0x118d1a,_0x176779=_0x4b740c*_0x2bbeca,_0x590203=_0x15e8a9*_0x2bbeca,_0xcd1ba8=_0x56c036['u']*_0xa99fa8+_0x6fbefc['u']*_0x58a364+_0x3dc888['u']*_0x176779+_0x395d6a['u']*_0x590203,_0x47b701=_0x56c036['v']*_0xa99fa8+_0x6fbefc['v']*_0x58a364+_0x3dc888['v']*_0x176779+_0x395d6a['v']*_0x590203;return new _0x5060f3(_0xcd1ba8,_0x47b701);}[_0x43bf95(0x802)](){const _0x5f1ad6=_0x43bf95;if(!this['grid']||!this[_0x5f1ad6(0x627)][0x0])return;let _0x7d164b=this[_0x5f1ad6(0x627)][_0x5f1ad6(0x6a2)],_0x2519c7=this['grid'][0x0][_0x5f1ad6(0x6a2)],_0x3fd24c,_0x15b428;for(let _0x12179c=0x0;_0x12179c<_0x7d164b;_0x12179c++)for(let _0x549ae3=0x0;_0x549ae3<_0x2519c7;_0x549ae3++){let _0x1b373c=this[_0x5f1ad6(0x627)][_0x12179c][_0x549ae3];if(_0x1b373c!==null){let _0x3a9094=_0x1b373c['m']||_0x1b373c[_0x5f1ad6(0x3db)]();_0x3fd24c===void 0x0?_0x3fd24c=_0x3a9094:_0x15b428===void 0x0?(_0x15b428=_0x3a9094,_0x3fd24c=Math[_0x5f1ad6(0x66a)](_0x3fd24c,_0x15b428),_0x15b428=Math[_0x5f1ad6(0x2c3)](_0x3fd24c,_0x15b428)):(_0x3fd24c=Math[_0x5f1ad6(0x66a)](_0x3a9094,_0x3fd24c),_0x15b428=Math[_0x5f1ad6(0x2c3)](_0x3a9094,_0x15b428));}}return[_0x3fd24c,_0x15b428];}[_0x43bf95(0x86c)](_0x331bc8){return _0x331bc8!=null;}[_0x43bf95(0x27f)](){const _0x3ba025=_0x43bf95;let _0x1111fc=this[_0x3ba025(0x79c)],_0xe1655=this[_0x3ba025(0x8ee)];return this[_0x3ba025(0x194)]&&(this['isContinuous']?(_0x1111fc=-0xb4,_0xe1655=0xb4):(_0xe1655=this[_0x3ba025(0x8ee)]-0x168,_0x1111fc=this[_0x3ba025(0x79c)]-0x168)),[_0x1111fc,_0xe1655];}['contains'](_0xa3deca,_0x7acf1a){const _0x2299e9=_0x43bf95;let _0x5335df=this[_0x2299e9(0x27f)](),_0x34612d=_0x5335df[0x0],_0x4d47fa=_0x5335df[0x1],_0x180341=_0xa3deca>=_0x34612d&&_0xa3deca<=_0x4d47fa,_0x4f3b1d;return this[_0x2299e9(0x16b)]>=0x0?_0x4f3b1d=_0x7acf1a>=this['ymin']&&_0x7acf1a<=this[_0x2299e9(0x643)]:_0x4f3b1d=_0x7acf1a>=this[_0x2299e9(0x643)]&&_0x7acf1a<=this[_0x2299e9(0x529)],_0x180341&&_0x4f3b1d;}[_0x43bf95(0x3ec)](_0x4ea571,_0x16182a){const _0x52806a=_0x43bf95;return _0x4ea571-_0x16182a*Math[_0x52806a(0x46e)](_0x4ea571/_0x16182a);}[_0x43bf95(0xa56)](_0xeec6ca,_0x57fbd1){const _0x3d1888=_0x43bf95;let _0x470f11=this[_0x3d1888(0x3ec)](_0xeec6ca-this[_0x3d1888(0x79c)],0x168)/this['deltaX'],_0x6df681=(this[_0x3d1888(0x643)]-_0x57fbd1)/this[_0x3d1888(0x16b)];return[_0x470f11,_0x6df681];}[_0x43bf95(0x959)](_0x6a6f65,_0x5d3a28){const _0x1190c0=_0x43bf95;if(!this[_0x1190c0(0x33e)](_0x6a6f65,_0x5d3a28))return null;let _0x347235=this[_0x1190c0(0xa56)](_0x6a6f65,_0x5d3a28),_0x312c7d=Math[_0x1190c0(0x46e)](_0x347235[0x0]),_0xb46120=Math['floor'](_0x347235[0x1]),_0x325ede=this[_0x1190c0(0x302)](_0x312c7d),_0x20e2a7=this[_0x1190c0(0x3d2)](_0xb46120);return this[_0x1190c0(0x5b8)](_0x325ede,_0x20e2a7);}[_0x43bf95(0x33f)](_0x4c966a,_0x25fc31){const _0x1e5852=_0x43bf95;if(!this[_0x1e5852(0x33e)](_0x4c966a,_0x25fc31))return null;let _0x275a44=this[_0x1e5852(0xa56)](_0x4c966a,_0x25fc31),_0x3a5847=_0x275a44[0x0],_0x41fe19=_0x275a44[0x1];return this[_0x1e5852(0x860)](_0x3a5847,_0x41fe19);}[_0x43bf95(0x7a3)](_0xd5f8f,_0x27c94b){const _0x322b79=_0x43bf95;return this[_0x322b79(0x959)](_0xd5f8f,_0x27c94b)!==null;}[_0x43bf95(0x860)](_0x44e853,_0x40815a){const _0x5c599b=_0x43bf95;let _0x5413e5=this['getFourSurroundingIndexes'](_0x44e853,_0x40815a),_0x5671a9=_0x5413e5[0x0],_0x2c1e68=_0x5413e5[0x1],_0x16dee0=_0x5413e5[0x2],_0xfb358a=_0x5413e5[0x3],_0x26efb4=this[_0x5c599b(0x662)](_0x5671a9,_0x2c1e68,_0x16dee0,_0xfb358a);if(_0x26efb4){let _0x2c3d16=_0x26efb4[0x0],_0x402ff2=_0x26efb4[0x1],_0x1b57a7=_0x26efb4[0x2],_0x170b51=_0x26efb4[0x3];return this['bilinearInterpolateVector'](_0x44e853-_0x5671a9,_0x40815a-_0x16dee0,_0x2c3d16,_0x402ff2,_0x1b57a7,_0x170b51);}return null;}['clampColumnIndex'](_0x952706){let _0x35cb1d=_0x952706;_0x952706<0x0&&(_0x35cb1d=0x0);let _0x2eabc0=this['cols']-0x1;return _0x952706>_0x2eabc0&&(_0x35cb1d=_0x2eabc0),_0x35cb1d;}['clampRowIndex'](_0x4c277f){const _0x404e1b=_0x43bf95;let _0x156c12=_0x4c277f;_0x4c277f<0x0&&(_0x156c12=0x0);let _0x35cbeb=this[_0x404e1b(0x81d)]-0x1;return _0x4c277f>_0x35cbeb&&(_0x156c12=_0x35cbeb),_0x156c12;}['getFourSurroundingIndexes'](_0x45a5cf,_0x111baf){const _0x33cc7a=_0x43bf95;let _0x5b3543=Math[_0x33cc7a(0x46e)](_0x45a5cf),_0x2ff974=_0x5b3543+0x1;this[_0x33cc7a(0x3c4)]&&_0x2ff974>=this[_0x33cc7a(0x8d9)]&&(_0x2ff974=0x0),_0x2ff974=this[_0x33cc7a(0x302)](_0x2ff974);let _0x1f715d=this[_0x33cc7a(0x3d2)](Math[_0x33cc7a(0x46e)](_0x111baf)),_0x4dbb75=this[_0x33cc7a(0x3d2)](_0x1f715d+0x1);return[_0x5b3543,_0x2ff974,_0x1f715d,_0x4dbb75];}['getFourSurroundingValues'](_0x56e531,_0x3ee4e6,_0x5a78d0,_0x545edb){const _0x56177a=_0x43bf95;let _0x1e0278;if(_0x1e0278=this[_0x56177a(0x627)][_0x5a78d0]){let _0x240a3d=_0x1e0278[_0x56e531],_0xfc26b9=_0x1e0278[_0x3ee4e6];if(this[_0x56177a(0x86c)](_0x240a3d)&&this[_0x56177a(0x86c)](_0xfc26b9)&&(_0x1e0278=this['grid'][_0x545edb])){let _0x282fbb=_0x1e0278[_0x56e531],_0x4fe13c=_0x1e0278[_0x3ee4e6];if(this['isValid'](_0x282fbb)&&this[_0x56177a(0x86c)](_0x4fe13c))return[_0x240a3d,_0xfc26b9,_0x282fbb,_0x4fe13c];}}return null;}[_0x43bf95(0x5b8)](_0x14dbf7,_0x4b14a5){const _0x30ced6=_0x43bf95;return this[_0x30ced6(0x627)][_0x4b14a5][_0x14dbf7];}[_0x43bf95(0x642)](_0x367ae1,_0x25d199){const _0x24e8e5=_0x43bf95;let _0x150ccb=this[_0x24e8e5(0x9b8)](_0x367ae1),_0xc81365=this['latitudeAtY'](_0x25d199);return[_0x150ccb,_0xc81365];}[_0x43bf95(0x9b8)](_0x2f791d){const _0x54e18e=_0x43bf95;let _0x16df93=this['deltaX']/0x2,_0x300cb0=this['xmin']+_0x16df93+_0x2f791d*this[_0x54e18e(0xa50)];return this[_0x54e18e(0x194)]&&(_0x300cb0=_0x300cb0>0xb4?_0x300cb0-0x168:_0x300cb0),_0x300cb0;}[_0x43bf95(0x455)](_0x1e31cc){const _0x90ad33=_0x43bf95;let _0x242bdf=this[_0x90ad33(0x16b)]/0x2;return this[_0x90ad33(0x643)]-_0x242bdf-_0x1e31cc*this[_0x90ad33(0x16b)];}[_0x43bf95(0x177)](_0x5234af,_0x5252c9,_0x14cd7e,_0x29173a){const _0x583c3c=_0x43bf95;_0x5234af===void 0x0&&(_0x5234af={});let _0x20ed04=Math['random']()*(_0x5252c9||this[_0x583c3c(0x8d9)])|0x0,_0x3b39c2=Math[_0x583c3c(0x15f)]()*(_0x14cd7e||this['rows'])|0x0,_0x447759=_0x29173a([_0x20ed04,_0x3b39c2]);return _0x447759!==null?(_0x5234af['x']=_0x447759[0x0],_0x5234af['y']=_0x447759[0x1]):(_0x5234af['x']=this[_0x583c3c(0x9b8)](_0x20ed04),_0x5234af['y']=this['latitudeAtY'](_0x3b39c2)),_0x5234af;}[_0x43bf95(0xe3)](){return this['isFields'];}},_0x3f44fc=_0x1a6004,_0x1870ad=class{constructor(_0x59a08b){const _0x388113=_0x43bf95;this[_0x388113(0x7e4)]={},this[_0x388113(0x84a)]=[],this[_0x388113(0x80c)]=_0x59a08b,this[_0x388113(0x77a)]=void 0x0,this[_0x388113(0x551)]=this['animate'][_0x388113(0x31a)](this);}[_0x43bf95(0x6ea)](_0x3dc6a4,_0x46291a,_0x40cdf1,_0xb3d706){const _0x538951=_0x43bf95;return Math[_0x538951(0x2c3)](0x0,Math[_0x538951(0x66a)](_0xb3d706[_0x538951(0x6a2)]-0x1,Math[_0x538951(0x440)]((_0x3dc6a4-_0x46291a)/(_0x40cdf1-_0x46291a)*(_0xb3d706[_0x538951(0x6a2)]-0x1))));}[_0x43bf95(0xa13)](){const _0x10db6a=_0x43bf95;if(!this[_0x10db6a(0x84a)]||!this[_0x10db6a(0x84a)]['length'])return;let _0x273900=this[_0x10db6a(0x80c)]['canvas'][_0x10db6a(0x371)],_0x5074b9=this[_0x10db6a(0x80c)][_0x10db6a(0x790)][_0x10db6a(0x795)],_0x50fda2=this['particles'],_0x4586ed=this[_0x10db6a(0x7e4)][_0x10db6a(0x62f)],_0xc3825b=typeof this[_0x10db6a(0x7e4)][_0x10db6a(0xa3a)]==_0x10db6a(0x9e7)?this[_0x10db6a(0x7e4)][_0x10db6a(0xa3a)]():this[_0x10db6a(0x7e4)][_0x10db6a(0xa3a)];for(let _0x40bbb1=0x0;_0x40bbb1<_0x50fda2[_0x10db6a(0x6a2)];_0x40bbb1++){let _0x117092=_0x50fda2[_0x40bbb1];_0x117092['age']>_0x4586ed&&(_0x117092['age']=0x0,this[_0x10db6a(0x376)][_0x10db6a(0x177)](_0x117092,_0x273900,_0x5074b9,this[_0x10db6a(0x5e6)]));let _0x22a09d=_0x117092['x'],_0x26850c=_0x117092['y'],_0x51b4e8=this['field'][_0x10db6a(0x33f)](_0x22a09d,_0x26850c);if(_0x51b4e8===null)_0x117092[_0x10db6a(0x547)]=_0x4586ed;else{let _0x59ca0e=_0x22a09d+_0x51b4e8['u']*_0xc3825b,_0x3ce67f=_0x26850c+_0x51b4e8['v']*_0xc3825b;this['field'][_0x10db6a(0x7a3)](_0x59ca0e,_0x3ce67f)?(_0x117092['xt']=_0x59ca0e,_0x117092['yt']=_0x3ce67f,_0x117092['m']=_0x51b4e8['m']):(_0x117092['x']=_0x59ca0e,_0x117092['y']=_0x3ce67f,_0x117092[_0x10db6a(0x547)]=_0x4586ed);}_0x117092[_0x10db6a(0x547)]++;}}['_drawParticles'](){const _0x5a52bb=_0x43bf95;if(!this[_0x5a52bb(0x84a)]||!this['particles'][_0x5a52bb(0x6a2)])return;let _0x5bb736=this[_0x5a52bb(0x84a)],_0x3754ed=this[_0x5a52bb(0x80c)]['globalCompositeOperation'];this['ctx'][_0x5a52bb(0x1fe)]=_0x5a52bb(0x9db),this[_0x5a52bb(0x80c)][_0x5a52bb(0x3dd)](0x0,0x0,this[_0x5a52bb(0x80c)][_0x5a52bb(0x790)][_0x5a52bb(0x371)],this['ctx'][_0x5a52bb(0x790)]['height']),this['ctx'][_0x5a52bb(0x1fe)]=_0x3754ed,this[_0x5a52bb(0x80c)]['globalAlpha']=this[_0x5a52bb(0x7e4)][_0x5a52bb(0x88a)],this['ctx'][_0x5a52bb(0x2fa)]='rgba(0,\x200,\x200,\x20'+this[_0x5a52bb(0x7e4)][_0x5a52bb(0x88a)]+')',this[_0x5a52bb(0x80c)][_0x5a52bb(0x907)]=this[_0x5a52bb(0x7e4)][_0x5a52bb(0x907)]?this[_0x5a52bb(0x7e4)][_0x5a52bb(0x907)]:0x1,this[_0x5a52bb(0x80c)][_0x5a52bb(0x4e6)]=this[_0x5a52bb(0x7e4)][_0x5a52bb(0x595)]?this[_0x5a52bb(0x7e4)]['colorScale']:_0x5a52bb(0x247);let _0x295d73=0x0,_0x3a5b46=_0x5bb736['length'];if(this[_0x5a52bb(0x376)]&&_0x3a5b46>0x0){let _0x43cd49,_0x34e621;if(this['options']['minVelocity']&&this[_0x5a52bb(0x7e4)][_0x5a52bb(0x24e)])_0x43cd49=this['options'][_0x5a52bb(0x864)],_0x34e621=this[_0x5a52bb(0x7e4)][_0x5a52bb(0x24e)];else{let _0x21fcd9=this[_0x5a52bb(0x376)][_0x5a52bb(0x599)];_0x43cd49=_0x21fcd9[0x0],_0x34e621=_0x21fcd9[0x1];}for(;_0x295d73<_0x3a5b46;_0x295d73++)this[this['options'][_0x5a52bb(0x990)]?'_drawCoordsParticle':_0x5a52bb(0x20f)](_0x5bb736[_0x295d73],_0x43cd49,_0x34e621);}}[_0x43bf95(0x20f)](_0x21acea,_0x5a4f94,_0x5c160a){const _0xc8b4b2=_0x43bf95;let _0x557463=[_0x21acea['x'],_0x21acea['y']],_0x51804e=[_0x21acea['xt'],_0x21acea['yt']],_0x19f39b=_0x21acea['xt']-_0x21acea['x'],_0x412f09=_0x21acea['yt']-_0x21acea['y'];_0x19f39b*_0x19f39b+_0x412f09*_0x412f09>0x14*0x14||_0x51804e&&_0x557463&&_0x51804e[0x0]&&_0x51804e[0x1]&&_0x557463[0x0]&&_0x557463[0x1]&&_0x21acea[_0xc8b4b2(0x547)]<=this[_0xc8b4b2(0x7e4)][_0xc8b4b2(0x62f)]&&this['_drawStroke'](_0x557463,_0x51804e,_0x21acea,_0x5a4f94,_0x5c160a);}[_0x43bf95(0x9f7)](_0x5b9c7e,_0x2d55a7,_0x527814){const _0x56d71a=_0x43bf95;let _0x117207=[_0x5b9c7e['x'],_0x5b9c7e['y']],_0x2d84ea=[_0x5b9c7e['xt'],_0x5b9c7e['yt']];if(_0x2d84ea&&_0x117207&&_0x2d84ea[0x0]&&_0x2d84ea[0x1]&&_0x117207[0x0]&&_0x117207[0x1]&&this[_0x56d71a(0x5a1)](_0x2d84ea)&&_0x5b9c7e[_0x56d71a(0x547)]<=this[_0x56d71a(0x7e4)][_0x56d71a(0x62f)]){let _0x3fa7ec=this['project'](_0x117207),_0x103e49=this['project'](_0x2d84ea);this[_0x56d71a(0x85e)](_0x3fa7ec,_0x103e49,_0x5b9c7e,_0x2d55a7,_0x527814);}}[_0x43bf95(0x85e)](_0x236395,_0x27114e,_0x1a25a2,_0x24c0a1,_0x37e398){const _0x1e6ae7=_0x43bf95;if(_0x236395&&_0x27114e){if(this[_0x1e6ae7(0x80c)][_0x1e6ae7(0x9b6)](),this[_0x1e6ae7(0x80c)][_0x1e6ae7(0x3f1)](_0x236395[0x0],_0x236395[0x1]),this[_0x1e6ae7(0x80c)]['lineTo'](_0x27114e[0x0],_0x27114e[0x1]),typeof this[_0x1e6ae7(0x7e4)][_0x1e6ae7(0x595)]==_0x1e6ae7(0x9e7))this[_0x1e6ae7(0x80c)][_0x1e6ae7(0x4e6)]=this['options'][_0x1e6ae7(0x595)](_0x1a25a2['m']);else{if(Array[_0x1e6ae7(0x636)](this['options'][_0x1e6ae7(0x595)])){let _0x5130ab=this[_0x1e6ae7(0x6ea)](_0x1a25a2['m'],_0x24c0a1,_0x37e398,this['options'][_0x1e6ae7(0x595)]);this[_0x1e6ae7(0x80c)][_0x1e6ae7(0x4e6)]=this[_0x1e6ae7(0x7e4)][_0x1e6ae7(0x595)][_0x5130ab];}}typeof this[_0x1e6ae7(0x7e4)]['lineWidth']==_0x1e6ae7(0x9e7)&&(this[_0x1e6ae7(0x80c)][_0x1e6ae7(0x907)]=this[_0x1e6ae7(0x7e4)]['lineWidth'](_0x1a25a2['m'])),_0x1a25a2['x']=_0x1a25a2['xt'],_0x1a25a2['y']=_0x1a25a2['yt'],this[_0x1e6ae7(0x80c)][_0x1e6ae7(0x16e)]();}}[_0x43bf95(0x722)](){const _0x243a52=_0x43bf95;let _0x513e40=this[_0x243a52(0x80c)][_0x243a52(0x790)][_0x243a52(0x371)],_0x628fcd=this[_0x243a52(0x80c)]['canvas'][_0x243a52(0x795)],_0x3cf160=typeof this[_0x243a52(0x7e4)][_0x243a52(0x414)]==_0x243a52(0x9e7)?this['options']['paths'](this):this['options'][_0x243a52(0x414)],_0x4ed0ee=[];if(!this[_0x243a52(0x376)])return[];for(let _0x2b4036=0x0;_0x2b4036<_0x3cf160;_0x2b4036++)_0x4ed0ee[_0x243a52(0xb3)](this['field']['randomize']({'age':Math[_0x243a52(0x46e)](Math[_0x243a52(0x15f)]()*this[_0x243a52(0x7e4)][_0x243a52(0x62f)])},_0x513e40,_0x628fcd,this[_0x243a52(0x5e6)]));return _0x4ed0ee;}[_0x43bf95(0x4bb)](){const _0x1d47cf=_0x43bf95;throw new Error(_0x1d47cf(0x5d3));}[_0x43bf95(0x5e6)](){const _0x85e21b=_0x43bf95;throw new Error(_0x85e21b(0x528));}[_0x43bf95(0x5a1)](_0x45bc7a){const _0x618be8=_0x43bf95;throw new Error(_0x618be8(0x255));}[_0x43bf95(0x11a)](){const _0x334596=_0x43bf95;this[_0x334596(0x376)]&&(this[_0x334596(0x84a)]=this[_0x334596(0x722)](),!this['starting']&&!this[_0x334596(0x95b)]&&(this[_0x334596(0x100)]=!0x0,this[_0x334596(0x451)]=Date[_0x334596(0xaa6)](),this[_0x334596(0x551)]()));}[_0x43bf95(0x9aa)](){const _0x9dbd4e=_0x43bf95;return this[_0x9dbd4e(0xa13)](),this[_0x9dbd4e(0x4ad)](),this;}[_0x43bf95(0x2d1)](){const _0x51d3fe=_0x43bf95;this['stop'](),this['ctx'][_0x51d3fe(0x872)](0x0,0x0,this['ctx'][_0x51d3fe(0x790)][_0x51d3fe(0x371)],this['ctx'][_0x51d3fe(0x790)][_0x51d3fe(0x795)]),this[_0x51d3fe(0x95b)]=!0x1;}[_0x43bf95(0x9ba)](){const _0x1bf54a=_0x43bf95;this[_0x1bf54a(0x100)]=!0x0,this[_0x1bf54a(0x95b)]=!0x1,this[_0x1bf54a(0x451)]=Date[_0x1bf54a(0xaa6)](),this['animate']();}['stop'](){const _0x22bc17=_0x43bf95;cancelAnimationFrame(this[_0x22bc17(0x77a)]),this[_0x22bc17(0x100)]=!0x1,this[_0x22bc17(0x95b)]=!0x0;}[_0x43bf95(0x551)](){const _0x4ed73b=_0x43bf95;this[_0x4ed73b(0x77a)]&&cancelAnimationFrame(this[_0x4ed73b(0x77a)]),this[_0x4ed73b(0x77a)]=requestAnimationFrame(this[_0x4ed73b(0x551)]);let _0x516120=Date[_0x4ed73b(0xaa6)](),_0x38b26c=_0x516120-this['_then'];_0x38b26c>this[_0x4ed73b(0x7e4)][_0x4ed73b(0x99a)]&&(this[_0x4ed73b(0x451)]=_0x516120-_0x38b26c%this[_0x4ed73b(0x7e4)]['frameRate'],this[_0x4ed73b(0x9aa)]());}['setData'](_0x5e3bd6){const _0x3fa84f=_0x43bf95;return this[_0x3fa84f(0x376)]=_0x5e3bd6,this;}['setOptions'](_0x367f12){const _0x311d3b=_0x43bf95;var _0x55f349,_0x406bd1,_0x2090a5,_0x5284c0;return this[_0x311d3b(0x7e4)]=_0x367f12,!((_0x55f349=this[_0x311d3b(0x7e4)])!=null&&_0x55f349[_0x311d3b(0x62f)])&&((_0x406bd1=this['options'])!=null&&_0x406bd1['particleAge'])&&(this[_0x311d3b(0x7e4)]['maxAge']=Number(this[_0x311d3b(0x7e4)][_0x311d3b(0x8e2)])),!((_0x2090a5=this[_0x311d3b(0x7e4)])!=null&&_0x2090a5['paths'])&&((_0x5284c0=this[_0x311d3b(0x7e4)])!=null&&_0x5284c0[_0x311d3b(0x94d)])&&(this[_0x311d3b(0x7e4)]['paths']=Math[_0x311d3b(0x440)](this[_0x311d3b(0x7e4)][_0x311d3b(0x371)]*this['options'][_0x311d3b(0x795)]*Number(this['options'][_0x311d3b(0x94d)]))),this;}},_0x51a2cb=_0x1870ad,_0x2ad29d={'globalAlpha':0.9,'lineWidth':0x1,'colorScale':_0x43bf95(0x247),'velocityScale':0x1/0x19,'maxAge':0x5a,'paths':0x320,'frameRate':0x14,'useCoordsDraw':!0x0,'gpet':!0x0},_0x535c72=class extends _0x49dd70{constructor(_0x14083e,_0xa42b2c={}){const _0x5758a8=_0x43bf95;super(_0x14083e),this['_options']={..._0x2ad29d,..._0xa42b2c},this['_data']=void 0x0,this[_0x5758a8(0x22b)]=document[_0x5758a8(0x7dc)](_0x5758a8(0x790)),this[_0x5758a8(0x558)]=_0x4075ae[_0x5758a8(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x24c3e8=_0x43bf95;return _0x49dd70[_0x24c3e8(0x7b6)]('wind');}set[_0x43bf95(0x867)](_0x928539){const _0x1f3c65=_0x43bf95;this[_0x1f3c65(0x850)]=_0x928539,this['_canvas'][_0x1f3c65(0x6a9)][_0x1f3c65(0x5cf)]=_0x928539?_0x1f3c65(0x2a2):_0x1f3c65(0x5ad);}get[_0x43bf95(0x867)](){const _0x5a30e4=_0x43bf95;return this[_0x5a30e4(0x850)];}[_0x43bf95(0x67a)](_0x10a75a){const _0x6d8df1=_0x43bf95;let _0xf94690,_0x511055;if(_0x10a75a[_0x6d8df1(0x2de)](function(_0x471325){const _0x4672df=_0x6d8df1;switch(_0x471325['header'][_0x4672df(0xb5)]+','+_0x471325[_0x4672df(0x9b)]['parameterNumber']){case _0x4672df(0x1c1):case'2,2':_0xf94690=_0x471325;break;case'1,3':case _0x4672df(0x2c0):_0x511055=_0x471325;break;}}),!_0x511055||!_0xf94690)return;let _0x38e696=_0xf94690[_0x6d8df1(0x9b)];return new _0x3f44fc({'xmin':_0x38e696[_0x6d8df1(0x1c8)],'ymin':_0x38e696['la1'],'xmax':_0x38e696['lo2'],'ymax':_0x38e696[_0x6d8df1(0xcf)],'deltaX':_0x38e696['dx'],'deltaY':_0x38e696['dy'],'cols':_0x38e696['nx'],'rows':_0x38e696['ny'],'us':_0xf94690[_0x6d8df1(0x82d)],'vs':_0x511055['data']});}[_0x43bf95(0x734)](){const _0x204ba7=_0x43bf95;if(!this[_0x204ba7(0x3f7)]||!this[_0x204ba7(0x22b)])return;this['_canvas']['style'][_0x204ba7(0x4ec)]=_0x204ba7(0x725),this['_canvas'][_0x204ba7(0x256)]=_0x204ba7(0x7ec);let {width:_0x16979d,height:_0x112939}=this[_0x204ba7(0x3f7)][_0x204ba7(0x790)];this['_canvas']['width']=_0x16979d,this[_0x204ba7(0x22b)][_0x204ba7(0x795)]=_0x112939,this[_0x204ba7(0x22b)][_0x204ba7(0x6a9)][_0x204ba7(0x371)]=_0x16979d+'px',this[_0x204ba7(0x22b)][_0x204ba7(0x6a9)][_0x204ba7(0x795)]=_0x112939+'px',this[_0x204ba7(0x3f7)][_0x204ba7(0x136)][_0x204ba7(0x87b)](this[_0x204ba7(0x22b)]);}[_0x43bf95(0x945)](){const _0x5d49dd=_0x43bf95;let _0x669ff9=this[_0x5d49dd(0x3f7)][_0x5d49dd(0x148)],_0x4f08c7=this[_0x5d49dd(0x3f7)][_0x5d49dd(0x698)],_0x34da31=_0x34d1e5['Cesium'][_0x5d49dd(0x7a1)][_0x5d49dd(0x423)];this[_0x5d49dd(0xaa1)][_0x5d49dd(0x5a1)]=_0x563330=>{const _0x2c6ae5=_0x5d49dd;if(_0x669ff9[_0x2c6ae5(0x6f7)]===_0x34d1e5[_0x2c6ae5(0x7aa)][_0x2c6ae5(0xba)]['SCENE3D']){let _0x135f2b=new _0x34d1e5[(_0x2c6ae5(0x7aa))]['EllipsoidalOccluder'](_0x34da31,_0x4f08c7['position']),_0x191bf3=_0x34d1e5[_0x2c6ae5(0x7aa)][_0x2c6ae5(0x982)][_0x2c6ae5(0x81e)](_0x563330[0x0],_0x563330[0x1]);return _0x135f2b['isPointVisible'](_0x191bf3);}else{if(_0x669ff9[_0x2c6ae5(0x6f7)]===_0x34d1e5[_0x2c6ae5(0x7aa)][_0x2c6ae5(0xba)][_0x2c6ae5(0x794)])return!(_0x563330[0x0]===-0xb4||_0x563330[0x0]===0xb4);}return!0x0;},this['_delegate']['project']=_0x4d2955=>{const _0x3bdf85=_0x5d49dd;let _0x564c24=_0x34d1e5['Cesium'][_0x3bdf85(0x982)][_0x3bdf85(0x81e)](_0x4d2955[0x0],_0x4d2955[0x1]),_0x2a7533=_0x34d1e5['Cesium'][_0x3bdf85(0x549)]['worldToWindowCoordinates'](_0x669ff9,_0x564c24);return[_0x2a7533['x'],_0x2a7533['y']];},this[_0x5d49dd(0xaa1)]['unProject']=_0x511101=>{const _0x313b9c=_0x5d49dd;let _0x18332d=new _0x34d1e5['Cesium'][(_0x313b9c(0x48e))](_0x511101[0x0],_0x511101[0x1]),_0x391b5f;if(_0x669ff9[_0x313b9c(0x6f7)]===_0x34d1e5['Cesium'][_0x313b9c(0xba)][_0x313b9c(0x5f3)]?_0x391b5f=_0x669ff9[_0x313b9c(0x7fd)][_0x313b9c(0x112)](_0x4f08c7[_0x313b9c(0xa3)](_0x18332d),_0x669ff9):_0x391b5f=_0x669ff9[_0x313b9c(0x698)][_0x313b9c(0xa9d)](_0x18332d,_0x34da31),!_0x391b5f)return null;let _0xc9c20c=_0x34da31[_0x313b9c(0x8e5)](_0x391b5f),_0x301dfa=_0x34d1e5[_0x313b9c(0x7aa)][_0x313b9c(0x72b)][_0x313b9c(0x438)](_0xc9c20c[_0x313b9c(0xa6e)]);return[_0x34d1e5[_0x313b9c(0x7aa)][_0x313b9c(0x72b)][_0x313b9c(0x438)](_0xc9c20c[_0x313b9c(0xc9)]),_0x301dfa];};}[_0x43bf95(0x84d)](_0x2c3123){const _0x2dff35=_0x43bf95;this['_viewer']=_0x2c3123,this[_0x2dff35(0x734)]();let _0x4f0b4e=this['_canvas'][_0x2dff35(0x7f0)]('2d');this['_delegate']||(this[_0x2dff35(0xaa1)]=new _0x51a2cb(_0x4f0b4e),this[_0x2dff35(0xaa1)][_0x2dff35(0x5cc)](this[_0x2dff35(0x674)]),this[_0x2dff35(0x945)]()),this[_0x2dff35(0xeb)]&&(this[_0x2dff35(0xaa1)][_0x2dff35(0x32c)](this[_0x2dff35(0xeb)]),this['_delegate'][_0x2dff35(0x11a)](),this[_0x2dff35(0xaa1)][_0x2dff35(0x9aa)]());}[_0x43bf95(0x526)](){const _0x2b95fd=_0x43bf95;this[_0x2b95fd(0xaa1)]&&this['_delegate'][_0x2b95fd(0x86d)](),this[_0x2b95fd(0x22b)]&&this[_0x2b95fd(0x3f7)][_0x2b95fd(0x136)][_0x2b95fd(0x6c5)](this[_0x2b95fd(0x22b)]),delete this[_0x2b95fd(0x22b)];}['setData'](_0x13209f,_0xd427d6){const _0x593f26=_0x43bf95;return _0x13209f&&_0x13209f[_0x593f26(0xe3)]&&_0x13209f[_0x593f26(0xe3)]()?this[_0x593f26(0xeb)]=_0x13209f:Array['isArray'](_0x13209f)&&(this[_0x593f26(0xeb)]=this['_formatData'](_0x13209f)),this[_0x593f26(0xaa1)]&&(this[_0x593f26(0xaa1)][_0x593f26(0x32c)](this['_data']),_0xd427d6&&(this[_0x593f26(0x674)]={...this['_options'],..._0xd427d6},this[_0x593f26(0xaa1)][_0x593f26(0x5cc)](this[_0x593f26(0x674)])),this[_0x593f26(0xaa1)][_0x593f26(0x11a)](),this[_0x593f26(0xaa1)]['render']()),this;}[_0x43bf95(0x5cc)](_0x175c1e){const _0x5bc744=_0x43bf95;return this['_options']={...this[_0x5bc744(0x674)],..._0x175c1e},this[_0x5bc744(0xaa1)]&&(this['_delegate'][_0x5bc744(0x5cc)](this[_0x5bc744(0x674)]),this['_delegate'][_0x5bc744(0x11a)](),this[_0x5bc744(0xaa1)][_0x5bc744(0x9aa)]()),this;}};_0x49dd70[_0x43bf95(0x545)](_0x43bf95(0x8ae));var _0x543b02=_0x535c72,_0x50e508='/**\x0a\x20*\x20@license\x0a\x20*\x20Cellular\x20noise\x20(\x22Worley\x20noise\x22)\x20in\x202D\x20in\x20GLSL.\x0a\x20*\x20Copyright\x20(c)\x20Stefan\x20Gustavson\x202011-04-19.\x20All\x20rights\x20reserved.\x0a\x20*\x20This\x20code\x20is\x20released\x20under\x20the\x20conditions\x20of\x20the\x20MIT\x20license.\x0a\x20*\x20See\x20LICENSE\x20file\x20for\x20details.\x0a\x20*/\x0a\x0a//#ifdef\x20GL_OES_standard_derivatives\x0a//\x20\x20\x20\x20#extension\x20GL_OES_standard_derivatives\x20:\x20enable\x0a//#endif\x0a//\x0a//float\x20aastep\x20(float\x20threshold\x20,\x20float\x20value)\x0a//{\x0a//\x20\x20\x20\x20float\x20afwidth\x20=\x200.7\x20*\x20length\x20(\x20vec2\x20(\x20dFdx\x20(\x20value\x20),\x20dFdy\x20(\x20value\x20)));\x0a//\x20\x20\x20\x20return\x20smoothstep\x20(\x20threshold\x20-\x20afwidth\x20,\x20threshold\x20+\x20afwidth\x20,\x20value\x20);\x0a//}\x0a\x0a//\x20Permutation\x20polynomial:\x20(34x^2\x20+\x20x)\x20mod\x20289\x0avec3\x20_czm_permute289(vec3\x20x)\x0a{\x0a\x20\x20\x20\x20return\x20mod((34.0\x20*\x20x\x20+\x201.0)\x20*\x20x,\x20289.0);\x0a}\x0a\x0a/**\x0a\x20*\x20DOC_TBA\x0a\x20*\x0a\x20*\x20Implemented\x20by\x20Stefan\x20Gustavson,\x20and\x20distributed\x20under\x20the\x20MIT\x20License.\x20\x20{@link\x20http://openglinsights.git.sourceforge.net/git/gitweb.cgi?p=openglinsights/openglinsights;a=tree;f=proceduraltextures}\x0a\x20*\x0a\x20*\x20@name\x20czm_cellular\x0a\x20*\x20@glslFunction\x0a\x20*\x0a\x20*\x20@see\x20Stefan\x20Gustavson\x27s\x20chapter,\x20<i>Procedural\x20Textures\x20in\x20GLSL</i>,\x20in\x20<a\x20href=\x22http://www.openglinsights.com/\x22>OpenGL\x20Insights</a>.\x0a\x20*/\x0avec2\x20czm_cellular(vec2\x20P)\x0a//\x20Cellular\x20noise,\x20returning\x20F1\x20and\x20F2\x20in\x20a\x20vec2.\x0a//\x20Standard\x203x3\x20search\x20window\x20for\x20good\x20F1\x20and\x20F2\x20values\x0a{\x0a#define\x20K\x200.142857142857\x20//\x201/7\x0a#define\x20Ko\x200.428571428571\x20//\x203/7\x0a#define\x20jitter\x201.0\x20//\x20Less\x20gives\x20more\x20regular\x20pattern\x0a\x20\x20\x20\x20vec2\x20Pi\x20=\x20mod(floor(P),\x20289.0);\x0a\x20\x20\x20\x20vec2\x20Pf\x20=\x20fract(P);\x0a\x20\x20\x20\x20vec3\x20oi\x20=\x20vec3(-1.0,\x200.0,\x201.0);\x0a\x20\x20\x20\x20vec3\x20of\x20=\x20vec3(-0.5,\x200.5,\x201.5);\x0a\x20\x20\x20\x20vec3\x20px\x20=\x20_czm_permute289(Pi.x\x20+\x20oi);\x0a\x20\x20\x20\x20vec3\x20p\x20=\x20_czm_permute289(px.x\x20+\x20Pi.y\x20+\x20oi);\x20//\x20p11,\x20p12,\x20p13\x0a\x20\x20\x20\x20vec3\x20ox\x20=\x20fract(p*K)\x20-\x20Ko;\x0a\x20\x20\x20\x20vec3\x20oy\x20=\x20mod(floor(p*K),7.0)*K\x20-\x20Ko;\x0a\x20\x20\x20\x20vec3\x20dx\x20=\x20Pf.x\x20+\x200.5\x20+\x20jitter*ox;\x0a\x20\x20\x20\x20vec3\x20dy\x20=\x20Pf.y\x20-\x20of\x20+\x20jitter*oy;\x0a\x20\x20\x20\x20vec3\x20d1\x20=\x20dx\x20*\x20dx\x20+\x20dy\x20*\x20dy;\x20//\x20d11,\x20d12\x20and\x20d13,\x20squared\x0a\x20\x20\x20\x20p\x20=\x20_czm_permute289(px.y\x20+\x20Pi.y\x20+\x20oi);\x20//\x20p21,\x20p22,\x20p23\x0a\x20\x20\x20\x20ox\x20=\x20fract(p*K)\x20-\x20Ko;\x0a\x20\x20\x20\x20oy\x20=\x20mod(floor(p*K),7.0)*K\x20-\x20Ko;\x0a\x20\x20\x20\x20dx\x20=\x20Pf.x\x20-\x200.5\x20+\x20jitter*ox;\x0a\x20\x20\x20\x20dy\x20=\x20Pf.y\x20-\x20of\x20+\x20jitter*oy;\x0a\x20\x20\x20\x20vec3\x20d2\x20=\x20dx\x20*\x20dx\x20+\x20dy\x20*\x20dy;\x20//\x20d21,\x20d22\x20and\x20d23,\x20squared\x0a\x20\x20\x20\x20p\x20=\x20_czm_permute289(px.z\x20+\x20Pi.y\x20+\x20oi);\x20//\x20p31,\x20p32,\x20p33\x0a\x20\x20\x20\x20ox\x20=\x20fract(p*K)\x20-\x20Ko;\x0a\x20\x20\x20\x20oy\x20=\x20mod(floor(p*K),7.0)*K\x20-\x20Ko;\x0a\x20\x20\x20\x20dx\x20=\x20Pf.x\x20-\x201.5\x20+\x20jitter*ox;\x0a\x20\x20\x20\x20dy\x20=\x20Pf.y\x20-\x20of\x20+\x20jitter*oy;\x0a\x20\x20\x20\x20vec3\x20d3\x20=\x20dx\x20*\x20dx\x20+\x20dy\x20*\x20dy;\x20//\x20d31,\x20d32\x20and\x20d33,\x20squared\x0a\x20\x20\x20\x20//\x20Sort\x20out\x20the\x20two\x20smallest\x20distances\x20(F1,\x20F2)\x0a\x20\x20\x20\x20vec3\x20d1a\x20=\x20min(d1,\x20d2);\x0a\x20\x20\x20\x20d2\x20=\x20max(d1,\x20d2);\x20//\x20Swap\x20to\x20keep\x20candidates\x20for\x20F2\x0a\x20\x20\x20\x20d2\x20=\x20min(d2,\x20d3);\x20//\x20neither\x20F1\x20nor\x20F2\x20are\x20now\x20in\x20d3\x0a\x20\x20\x20\x20d1\x20=\x20min(d1a,\x20d2);\x20//\x20F1\x20is\x20now\x20in\x20d1\x0a\x20\x20\x20\x20d2\x20=\x20max(d1a,\x20d2);\x20//\x20Swap\x20to\x20keep\x20candidates\x20for\x20F2\x0a\x20\x20\x20\x20d1.xy\x20=\x20(d1.x\x20<\x20d1.y)\x20?\x20d1.xy\x20:\x20d1.yx;\x20//\x20Swap\x20if\x20smaller\x0a\x20\x20\x20\x20d1.xz\x20=\x20(d1.x\x20<\x20d1.z)\x20?\x20d1.xz\x20:\x20d1.zx;\x20//\x20F1\x20is\x20in\x20d1.x\x0a\x20\x20\x20\x20d1.yz\x20=\x20min(d1.yz,\x20d2.yz);\x20//\x20F2\x20is\x20now\x20not\x20in\x20d2.yz\x0a\x20\x20\x20\x20d1.y\x20=\x20min(d1.y,\x20d1.z);\x20//\x20nor\x20in\x20\x20d1.z\x0a\x20\x20\x20\x20d1.y\x20=\x20min(d1.y,\x20d2.x);\x20//\x20F2\x20is\x20in\x20d1.y,\x20we\x27re\x20done.\x0a\x20\x20\x20\x20return\x20sqrt(d1.xy);\x0a}\x0a',_0x4c2332=_0x43bf95(0x39a),_0x416292=_0x43bf95(0xa7a),_0xda8047=_0x43bf95(0x2b5),_0x153862=_0x43bf95(0x9b3),_0x237443='uniform\x20vec4\x20cementColor;\x0auniform\x20float\x20grainScale;\x0auniform\x20float\x20roughness;\x0a\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0a\x0a\x20\x20float\x20noise\x20=\x20czm_snoise(materialInput.st\x20/\x20grainScale);\x0a\x20\x20noise\x20=\x20pow(noise,\x205.0)\x20*\x20roughness;\x0a\x0a\x20\x20vec4\x20color\x20=\x20cementColor;\x0a\x20\x20color.rgb\x20+=\x20noise;\x0a\x0a\x20\x20material.diffuse\x20=\x20color.rgb;\x0a\x20\x20material.alpha\x20=\x20color.a;\x0a\x0a\x20\x20return\x20material;\x0a}\x0a',_0x10d9ee=_0x43bf95(0x43b),_0x10c4c9=_0x43bf95(0xa02),_0x51c373=_0x43bf95(0x2ae),_0x680d65=_0x43bf95(0x9a4),_0x1669dc=_0x43bf95(0x21c),_0x5bc91c='uniform\x20samplerCube\x20cubeMap;\x0auniform\x20float\x20indexOfRefractionRatio;\x0a\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0a\x0a\x20\x20vec3\x20normalWC\x20=\x20normalize(czm_inverseViewRotation\x20*\x20material.normal);\x0a\x20\x20vec3\x20positionWC\x20=\x20normalize(czm_inverseViewRotation\x20*\x20materialInput.positionToEyeEC);\x0a\x20\x20vec3\x20refractedWC\x20=\x20refract(positionWC,\x20-normalWC,\x20indexOfRefractionRatio);\x0a\x20\x20material.diffuse\x20=\x20textureCube(cubeMap,\x20refractedWC).channels;\x0a\x0a\x20\x20return\x20material;\x0a}\x0a',_0x3229b4=_0x43bf95(0x68a),_0x323fbf=_0x43bf95(0x712);_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x498)][_0x43bf95(0x806)][_0x43bf95(0xbf)]=_0x50e508,_0x34d1e5['Cesium'][_0x43bf95(0x498)]['_czmBuiltinsAndUniforms'][_0x43bf95(0x20b)]=_0x4c2332,_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0x349)]=_0x43bf95(0x54c),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x349)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x349)],'uniforms':{'asphaltColor':new _0x34d1e5['Cesium'][(_0x43bf95(0x7d2))](0.15,0.15,0.15,0x1),'bumpSize':0.02,'roughness':0.2},'source':_0x416292},'translucent':function(_0x40e098){const _0x5b309e=_0x43bf95;return _0x40e098[_0x5b309e(0x2eb)][_0x5b309e(0x1ee)][_0x5b309e(0x429)]<0x1;}}),_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x327)]='Blob',_0x34d1e5['Cesium']['Material']['_materialCache'][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x327)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x327)],'uniforms':{'lightColor':new _0x34d1e5['Cesium'][(_0x43bf95(0x7d2))](0x1,0x1,0x1,0.5),'darkColor':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x0,0x0,0x1,0.5),'frequency':0xa},'source':_0xda8047},'translucent':function(_0x401ec9){const _0x5a9a52=_0x43bf95;var _0x51875d=_0x401ec9[_0x5a9a52(0x2eb)];return _0x51875d['lightColor'][_0x5a9a52(0x429)]<0x1||_0x51875d[_0x5a9a52(0x467)][_0x5a9a52(0x429)]<0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x678)]='Brick',_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5['Cesium'][_0x43bf95(0x4da)]['BrickType'],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x678)],'uniforms':{'brickColor':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0.6,0.3,0.1,0x1),'mortarColor':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0.8,0.8,0.7,0x1),'brickSize':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x48e))](0.3,0.15),'brickPct':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x48e))](0.9,0.85),'brickRoughness':0.2,'mortarRoughness':0.1},'source':_0x153862},'translucent':function(_0x206d81){const _0x30b0bc=_0x43bf95;var _0x24cf73=_0x206d81['uniforms'];return _0x24cf73[_0x30b0bc(0x8c5)][_0x30b0bc(0x429)]<0x1||_0x24cf73[_0x30b0bc(0x881)][_0x30b0bc(0x429)]<0x1;}}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x23c)]=_0x43bf95(0x715),_0x34d1e5['Cesium'][_0x43bf95(0x4da)]['_materialCache'][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x23c)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['CementType'],'uniforms':{'cementColor':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0.95,0.95,0.85,0x1),'grainScale':0.01,'roughness':0.3},'source':_0x237443},'translucent':function(_0x4d4d5e){const _0x1be101=_0x43bf95;return _0x4d4d5e[_0x1be101(0x2eb)]['cementColor']['alpha']<0x1;}}),_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x476)]=_0x43bf95(0x897),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0x476)],{'fabric':{'type':_0x34d1e5['Cesium'][_0x43bf95(0x4da)]['ErosionType'],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))]['Color'](0x1,0x0,0x0,0.5),'time':0x1},'source':_0x10d9ee},'translucent':function(_0x5513de){const _0xfac2ab=_0x43bf95;return _0x5513de[_0xfac2ab(0x2eb)][_0xfac2ab(0x124)]['alpha']<0x1;}}),_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0x39e)]='Facet',_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0x4b1)]['addMaterial'](_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x39e)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x39e)],'uniforms':{'lightColor':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0.25,0.25,0.25,0.75),'darkColor':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0.75,0.75,0.75,0.75),'frequency':0xa},'source':_0x10c4c9},'translucent':function(_0x257775){const _0xb42616=_0x43bf95;var _0x1fd3c2=_0x257775['uniforms'];return _0x1fd3c2[_0xb42616(0x719)][_0xb42616(0x429)]<0x1||_0x1fd3c2[_0xb42616(0x467)][_0xb42616(0x429)]<0x0;}}),_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0x253)]=_0x43bf95(0x4a1),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0x253)],{'fabric':{'type':_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0x253)],'materials':{'reflection':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x8c0)]},'refraction':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x45a)]}},'source':_0x51c373},'translucent':!0x1}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x647)]=_0x43bf95(0x343),_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x647)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x647)],'uniforms':{'grassColor':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0.25,0.4,0.1,0x1),'dirtColor':new _0x34d1e5[(_0x43bf95(0x7aa))]['Color'](0.1,0.1,0.1,0x1),'patchiness':1.5},'source':_0x680d65},'translucent':function(_0x3644f7){const _0x31a9f6=_0x43bf95;var _0x19fee0=_0x3644f7[_0x31a9f6(0x2eb)];return _0x19fee0[_0x31a9f6(0xa21)][_0x31a9f6(0x429)]<0x1||_0x19fee0['dirtColor'][_0x31a9f6(0x429)]<0x1;}}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['ReflectionType']=_0x43bf95(0x7ff),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)]['addMaterial'](_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0x8c0)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x8c0)],'uniforms':{'cubeMap':_0x34d1e5['Cesium']['Material']['DefaultCubeMapId'],'channels':_0x43bf95(0x82e)},'source':_0x1669dc},'translucent':!0x1}),_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x45a)]=_0x43bf95(0x80f),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x45a)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x45a)],'uniforms':{'cubeMap':_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0x15a)],'channels':_0x43bf95(0x82e),'indexOfRefractionRatio':0.9},'source':_0x5bc91c},'translucent':!0x1}),_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x7f5)]=_0x43bf95(0xdd),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)]['addMaterial'](_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0x7f5)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)]['Material']['TyeDyeType'],'uniforms':{'lightColor':new _0x34d1e5['Cesium']['Color'](0x1,0x1,0x0,0.75),'darkColor':new _0x34d1e5['Cesium'][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.75),'frequency':0x5},'source':_0x3229b4},'translucent':function(_0x215e40){const _0x42b2d3=_0x43bf95;var _0x1155b5=_0x215e40[_0x42b2d3(0x2eb)];return _0x1155b5[_0x42b2d3(0x719)][_0x42b2d3(0x429)]<0x1||_0x1155b5[_0x42b2d3(0x467)][_0x42b2d3(0x429)]<0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x963)]=_0x43bf95(0x785),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x963)],{'fabric':{'type':_0x34d1e5['Cesium'][_0x43bf95(0x4da)]['WoodType'],'uniforms':{'lightWoodColor':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0.6,0.3,0.1,0x1),'darkWoodColor':new _0x34d1e5['Cesium']['Color'](0.4,0.2,0.07,0x1),'ringFrequency':0x3,'noiseScale':new _0x34d1e5[(_0x43bf95(0x7aa))]['Cartesian2'](0.7,0.5),'grainFrequency':0x1b},'source':_0x323fbf},'translucent':function(_0x28ccd4){const _0x2755d6=_0x43bf95;let _0x342d93=_0x28ccd4[_0x2755d6(0x2eb)];return _0x342d93[_0x2755d6(0x2fb)][_0x2755d6(0x429)]<0x1||_0x342d93[_0x2755d6(0xa1b)]['alpha']<0x1;}});var _0x11ef45=_0x43bf95(0x500),_0x566db3=_0x43bf95(0x3e7),_0x316c6e=_0x43bf95(0x544),_0x1b52dc=_0x43bf95(0x9d7),_0x519e17='uniform\x20vec4\x20color;\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0a\x20\x20vec2\x20center\x20=\x20st\x20-\x20vec2(0.5,0.5);\x0a\x20\x20float\x20length\x20=\x20length(center)\x20/\x200.5;\x0a\x20\x20float\x20time\x20=\x201.\x20-\x20abs(czm_frameNumber\x20/\x20360.\x20-\x200.5);\x0a\x20\x20float\x20param\x20=\x201.\x20-\x20step(length,\x200.6);\x20//大于0.6模糊,rate\x20=\x200.6\x0a\x20\x20float\x20scale\x20=\x20param\x20*\x20length;\x20//\x200.6<\x20length\x20返回0,反之返回1.\x0a\x20\x20float\x20alpha\x20=\x20param\x20*\x20(1.0\x20-\x20abs(scale\x20-\x200.8)\x20/\x200.2);\x20//\x200.8\x20<\x20length\x20返回0,反之返回1.\x0a\x20\x20float\x20param1\x20=\x20step(length,\x200.7);\x20//小于0.5模糊\x0a\x20\x20float\x20scale1\x20=\x20param1\x20*\x20length;\x20//\x200.6<\x20length\x20返回0,反之返回1.\x0a\x20\x20alpha\x20+=\x20param1\x20*\x20(1.0\x20-\x20abs(scale1\x20-\x200.35)\x20/\x200.35);\x20//\x200.8\x20<\x20length\x20返回0,反之返回1.\x0a\x20\x20material.diffuse\x20=\x20color.rgb\x20*\x20vec3(color.a);\x0a\x20\x20material.alpha\x20=\x20pow(alpha,\x204.0);\x0a\x20\x20return\x20material;\x0a}\x0a',_0x1ded71=_0x43bf95(0x652),_0x218bf0=_0x43bf95(0x71a),_0x5e2516=_0x43bf95(0x16c),_0x52cd97=_0x43bf95(0x9e5),_0x20fa90='uniform\x20vec4\x20color;\x0auniform\x20float\x20speed;\x0auniform\x20float\x20count;\x0auniform\x20float\x20gradient;\x0a\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput)\x0a{\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0a\x20\x20material.diffuse\x20=\x201.5\x20*\x20color.rgb;\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0a\x20\x20float\x20dis\x20=\x20distance(st,\x20vec2(0.5,\x200.5));\x0a\x20\x20float\x20per\x20=\x20fract(czm_frameNumber\x20*\x20speed\x20/\x201000.0);\x0a\x20\x20if(count\x20==\x201.0){\x0a\x20\x20\x20\x20if(dis\x20>\x20per\x20*\x200.5){\x0a\x20\x20\x20\x20\x20\x20discard;\x0a\x20\x20\x20\x20}else\x20{\x0a\x20\x20\x20\x20\x20\x20material.alpha\x20=\x20color.a\x20\x20*\x20dis\x20/\x20per\x20/\x202.0;\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20vec3\x20str\x20=\x20materialInput.str;\x0a\x20\x20\x20\x20if(abs(str.z)\x20\x20>\x200.001){\x0a\x20\x20\x20\x20\x20\x20discard;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if(dis\x20>\x200.5){\x0a\x20\x20\x20\x20\x20\x20discard;\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20float\x20perDis\x20=\x200.5\x20/\x20count;\x0a\x20\x20\x20\x20\x20\x20float\x20disNum;\x0a\x20\x20\x20\x20\x20\x20float\x20bl\x20=\x200.0;\x0a\x20\x20\x20\x20\x20\x20for(int\x20i\x20=\x200;\x20i\x20<=\x20999;\x20i++){\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(float(i)\x20<=\x20count){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20disNum\x20=\x20perDis\x20*\x20float(i)\x20-\x20dis\x20+\x20per\x20/\x20count;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(disNum\x20>\x200.0){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(disNum\x20<\x20perDis){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20bl\x20=\x201.0\x20-\x20disNum\x20/\x20perDis;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20else\x20if(disNum\x20-\x20perDis\x20<\x20perDis){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20bl\x20=\x201.0\x20-\x20abs(1.0\x20-\x20disNum\x20/\x20perDis);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20material.alpha\x20=\x20pow(bl,(1.0\x20+\x2010.0\x20*\x20(1.0\x20-\x20gradient)));\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x20\x20return\x20material;\x0a}\x0a\x0a';_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x843)]=_0x43bf95(0x8db),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['_materialCache'][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x843)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x843)],'uniforms':{'color':new _0x34d1e5['Cesium']['Color'](0x1,0x0,0x0,0.7),'speed':0x3},'source':_0x11ef45},'translucent':function(_0x4b65df){return!0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x2dc)]=_0x43bf95(0x57e),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['_materialCache'][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x2dc)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x2dc)],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'speed':0x3},'source':_0x566db3},'translucent':function(_0x46cfcd){return!0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x296)]=_0x43bf95(0x96b),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['_materialCache'][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x296)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x296)],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'speed':0x3},'source':_0x316c6e},'translucent':function(_0x26c49c){return!0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)]['Material']['CirclePulseType']=_0x43bf95(0x56e),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['CirclePulseType'],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['CirclePulseType'],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'speed':0xc},'source':_0x1b52dc},'translucent':function(_0x5b2014){return!0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['CircleRingType']=_0x43bf95(0x2cb),_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5['Cesium']['Material']['CircleRingType'],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x244)],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7)},'source':_0x519e17},'translucent':function(_0x3083b3){return!0x0;}}),_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0xaa7)]=_0x43bf95(0x4af),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['_materialCache']['addMaterial'](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0xaa7)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0xaa7)],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'image':_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x70d)]},'source':_0x1ded71},'translucent':function(_0x5564b){return!0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['CircleScanType']=_0x43bf95(0x1ab),_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x12d)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x12d)],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'speed':0x1},'source':_0x218bf0},'translucent':function(_0x58ce6e){return!0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x52e)]=_0x43bf95(0x567),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x52e)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x52e)],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'speed':0x3},'source':_0x5e2516},'translucent':function(_0x31d45c){return!0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x997)]=_0x43bf95(0x3cc),_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x997)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x997)],'uniforms':{'color':new _0x34d1e5['Cesium']['Color'](0x1,0x0,0x0,0.7),'speed':0x3},'source':_0x52cd97},'translucent':function(_0x4dc57d){return!0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x8ea)]=_0x43bf95(0x52a),_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x8ea)],{'fabric':{'type':_0x34d1e5['Cesium'][_0x43bf95(0x4da)]['CircleWaveType'],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'speed':0x3,'count':0x1,'gradient':0.1},'source':_0x20fa90},'translucent':function(_0x5997ca){return!0x0;}});var _0x5d9e5b=_0x43bf95(0x7d9),_0x58911c=_0x43bf95(0xf5);_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x3ee)]=_0x43bf95(0x8e9),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)]['addMaterial'](_0x34d1e5[_0x43bf95(0x7aa)]['Material']['CylinderFadeType'],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x3ee)],'uniforms':{'color':new _0x34d1e5['Cesium']['Color'](0x1,0x0,0x0,0.7)},'source':_0x5d9e5b},'translucent':function(_0x4abee3){return!0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x483)]='CylinderParticles',_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)]['addMaterial'](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x483)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x483)],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'image':_0x34d1e5[_0x43bf95(0x7aa)]['Material']['DefaultImageId']},'source':_0x58911c},'translucent':function(_0x1efd46){return!0x0;}});var _0x222379=_0x43bf95(0x63d),_0x3fc893='uniform\x20vec4\x20color;\x0auniform\x20float\x20speed;\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0a\x20\x20float\x20time\x20=\x20fract(czm_frameNumber\x20*\x20speed\x20/\x201000.0);\x0a\x20\x20float\x20alpha\x20=\x20abs(smoothstep(0.5,1.,fract(\x20-st.t\x20-\x20time)));\x0a\x20\x20alpha\x20+=\x20.1;\x0a\x20\x20material.alpha\x20=\x20alpha;\x0a\x20\x20material.diffuse\x20=\x20color.rgb;\x0a\x20\x20return\x20material;\x0a}\x0a';_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x523)]=_0x43bf95(0x6df),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['_materialCache'][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x523)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x523)],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'speed':0x1},'source':_0x222379},'translucent':function(_0x6a3559){return!0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x5c6)]='EllipsoidTrail',_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x5c6)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x5c6)],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'speed':0x3},'source':_0x3fc893},'translucent':function(_0x4518e4){return!0x0;}});var _0x333420=_0x43bf95(0x221),_0x119b3d=_0x43bf95(0x460),_0x84873d=_0x43bf95(0xa8d),_0xe439e=_0x43bf95(0x22a),_0x384f68='uniform\x20sampler2D\x20image;\x0auniform\x20vec4\x20color;\x0auniform\x20float\x20speed;\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0a\x20\x20float\x20time\x20=\x20fract(czm_frameNumber\x20*\x20speed\x20/\x201000.0);\x0a\x20\x20vec4\x20colorImage\x20=\x20texture(image,st);\x0a\x20\x20vec3\x20fragColor\x20=\x20color.rgb;\x0a\x20\x20if(st.t\x20>\x200.45\x20&&\x20st.t\x20<\x200.55\x20)\x20{\x0a\x20\x20\x20\x20fragColor\x20=\x20vec3(1.0);\x0a\x20\x20}\x0a\x20\x20if(color.a\x20==\x200.0){\x0a\x20\x20\x20\x20material.alpha\x20=\x20colorImage.a\x20*\x201.5\x20*\x20fract(st.s\x20-\x20time);\x0a\x20\x20\x20\x20material.diffuse\x20=\x20colorImage.rgb;\x0a\x20\x20}else{\x0a\x20\x20\x20\x20material.alpha\x20=\x20colorImage.a\x20*\x20color.a\x20*\x201.5\x20*\x20smoothstep(.0,1.,\x20fract(st.s\x20-\x20time));\x0a\x20\x20\x20\x20material.diffuse\x20=\x20max(fragColor.rgb\x20*\x20material.alpha\x20,\x20fragColor.rgb);\x0a\x20\x20}\x0a\x20\x20return\x20material;\x0a}\x0a',_0xb8eaf5=_0x43bf95(0x2af);_0x34d1e5['Cesium']['Material']['PolylineFlickerType']=_0x43bf95(0x6f2),_0x34d1e5['Cesium']['Material'][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0x2ea)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x2ea)],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))]['Color'](0x1,0x0,0x0,0.7),'speed':0x1},'source':_0x333420},'translucent':function(_0xe4138f){return!0x0;}}),_0x34d1e5['Cesium'][_0x43bf95(0x4da)]['PolylineFlowType']=_0x43bf95(0x7ea),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)]['Material']['PolylineFlowType'],{'fabric':{'type':_0x34d1e5['Cesium']['Material'][_0x43bf95(0x5e0)],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'speed':0x1,'percent':0.03,'gradient':0.1},'source':_0x119b3d},'translucent':function(_0x180bd7){return!0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['PolylineImageTrailType']=_0x43bf95(0x1f5),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['_materialCache'][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0xa7c)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0xa7c)],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))]['Color'](0x1,0x0,0x0,0.7),'image':_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0x70d)],'speed':0x1,'repeat':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x48e))](0x1,0x1)},'source':_0x84873d},'translucent':function(_0x58a370){return!0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x57d)]=_0x43bf95(0x5f7),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x57d)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x57d)],'uniforms':{'color':new _0x34d1e5['Cesium'][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'image':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x70d)]},'source':_0xe439e},'translucent':function(_0x2bb22c){return!0x0;}}),_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0x699)]=_0x43bf95(0xa9),_0x34d1e5['Cesium']['Material'][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['PolylineLightingTrailType'],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x699)],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'image':_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x70d)],'speed':0x3},'source':_0x384f68},'translucent':function(_0x4b64e0){return!0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['PolylineTrailType']=_0x43bf95(0x9c),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0xf9)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['PolylineTrailType'],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'image':_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0x70d)],'speed':0x1,'repeat':new _0x34d1e5['Cesium'][(_0x43bf95(0x48e))](0x1,0x1)},'source':_0xb8eaf5},'translucent':function(_0x54d8c5){return!0x0;}});var _0x305dde=_0x43bf95(0x2e4),_0x4e8f3c=_0x43bf95(0x5b5),_0x3c2834=_0x43bf95(0xa80);_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['RadarLineType']=_0x43bf95(0x1d0),_0x34d1e5['Cesium']['Material'][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x679)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['RadarLineType'],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'speed':0x3},'source':_0x305dde},'translucent':function(_0x4fb6e7){return!0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0xa14)]=_0x43bf95(0x26d),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['RadarSweepType'],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0xa14)],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'speed':0x3},'source':_0x4e8f3c},'translucent':function(_0x6fff7a){return!0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x2a4)]=_0x43bf95(0x150),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x2a4)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x2a4)],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'speed':0x3},'source':_0x3c2834},'translucent':function(_0x52d7d2){return!0x0;}});var _0x1949c8='uniform\x20vec4\x20color;\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0a\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0a\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0a\x20\x20material.diffuse\x20=\x20color.rgb\x20*\x202.0;\x0a\x20\x20material.alpha\x20=\x20color.a\x20*\x20(1.0-fract(st.t))\x20*\x200.8;\x0a\x20\x20return\x20material;\x0a}\x0a',_0x137d25=_0x43bf95(0x21f),_0x322b19=_0x43bf95(0x600),_0x3c496e='\x20uniform\x20sampler2D\x20image;\x0a\x20uniform\x20float\x20speed;\x0a\x20uniform\x20vec4\x20color;\x0a\x0aczm_material\x20czm_getMaterial(czm_materialInput\x20materialInput){\x0a\x20\x20\x20czm_material\x20material\x20=\x20czm_getDefaultMaterial(materialInput);\x0a\x20\x20\x20vec2\x20st\x20=\x20materialInput.st;\x0a\x20\x20\x20float\x20time\x20=\x20fract(czm_frameNumber\x20*\x20speed\x20/\x201000.0);\x0a\x20\x20\x20vec4\x20colorImage\x20=\x20texture(image,\x20vec2(fract(st.t\x20-\x20time),\x20st.t));\x0a\x20\x20\x20if(color.a\x20==\x200.0){\x0a\x20\x20\x20\x20material.alpha\x20=\x20colorImage.a;\x0a\x20\x20\x20\x20material.diffuse\x20=\x20colorImage.rgb;\x0a\x20\x20\x20}else{\x0a\x20\x20\x20\x20material.alpha\x20=\x20colorImage.a\x20*\x20color.a;\x0a\x20\x20\x20\x20material.diffuse\x20=\x20max(color.rgb\x20*\x20material.alpha\x20*\x203.0,\x20color.rgb);\x0a\x20\x20\x20}\x0a\x20\x20\x20return\x20material;\x0a}\x0a';_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x184)]=_0x43bf95(0x24a),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)]['addMaterial'](_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x184)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x184)],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7)},'source':_0x1949c8},'translucent':function(_0x5b785c){return!0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)]['WallImageTrailType']=_0x43bf95(0x93a),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x2e3)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)]['Material']['WallImageTrailType'],'uniforms':{'image':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x70d)],'color':new _0x34d1e5['Cesium'][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'speed':0x3,'repeat':new _0x34d1e5[(_0x43bf95(0x7aa))]['Cartesian2'](0x1,0x1)},'source':_0x137d25},'translucent':function(_0x22dc7e){return!0x0;}}),_0x34d1e5['Cesium'][_0x43bf95(0x4da)]['WallLineTrailType']=_0x43bf95(0x25c),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x4b1)][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0xa90)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0xa90)],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))]['Color'](0x1,0x0,0x0,0.7),'image':_0x34d1e5['Cesium'][_0x43bf95(0x4da)]['DefaultImageId'],'repeat':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x48e))](0x1,0x1),'speed':0x3},'source':_0x322b19},'translucent':function(_0x2e5995){return!0x0;}}),_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x5b7)]=_0x43bf95(0x1de),_0x34d1e5['Cesium']['Material']['_materialCache'][_0x43bf95(0xa2a)](_0x34d1e5[_0x43bf95(0x7aa)]['Material'][_0x43bf95(0x5b7)],{'fabric':{'type':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)][_0x43bf95(0x5b7)],'uniforms':{'color':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0.7),'image':_0x34d1e5['Cesium'][_0x43bf95(0x4da)][_0x43bf95(0x70d)],'speed':0x1},'source':_0x3c496e},'translucent':function(_0x609309){return!0x0;}});var _0x1544c3=class{constructor(_0x257247={}){const _0x396d1f=_0x43bf95;this[_0x396d1f(0x922)]=new _0x34d1e5[(_0x396d1f(0x7aa))][(_0x396d1f(0x43e))](),this[_0x396d1f(0x993)]=void 0x0,this[_0x396d1f(0x703)]=void 0x0,this['_speed']=void 0x0,this[_0x396d1f(0x14b)]=void 0x0,this[_0x396d1f(0x124)]=_0x257247[_0x396d1f(0x124)]||_0x34d1e5[_0x396d1f(0x7aa)][_0x396d1f(0x7d2)][_0x396d1f(0x1e1)](0x0,0xff,0xff,0xff),this[_0x396d1f(0x178)]=_0x257247['speed']||0x1;}get[_0x43bf95(0x3d6)](){return!0x1;}get['definitionChanged'](){const _0x15b2d9=_0x43bf95;return this[_0x15b2d9(0x922)];}['getType'](_0x2962cf){return null;}['getValue'](_0x5b2847,_0x16da4f){const _0x32c052=_0x43bf95;return _0x16da4f=_0x34d1e5['Cesium'][_0x32c052(0x692)](_0x16da4f,{}),_0x16da4f;}[_0x43bf95(0x411)](_0x54347b){return this===_0x54347b;}},_0x463e2f=_0x1544c3,_0x26cc87=class _0x315929 extends _0x463e2f{constructor(_0x4feed9={}){super(_0x4feed9);}[_0x43bf95(0x7f6)](_0x5c7bdf){const _0x588a3f=_0x43bf95;return _0x34d1e5['Cesium'][_0x588a3f(0x4da)][_0x588a3f(0x843)];}['getValue'](_0x2932cc,_0x101db2){const _0x136cfe=_0x43bf95;return _0x101db2=_0x34d1e5[_0x136cfe(0x7aa)][_0x136cfe(0x692)](_0x101db2,{}),_0x101db2[_0x136cfe(0x124)]=_0x34d1e5[_0x136cfe(0x7aa)][_0x136cfe(0x53a)][_0x136cfe(0x2c9)](this[_0x136cfe(0x993)],_0x2932cc),_0x101db2[_0x136cfe(0x178)]=_0x34d1e5[_0x136cfe(0x7aa)][_0x136cfe(0x53a)][_0x136cfe(0x2c9)](this[_0x136cfe(0x7df)],_0x2932cc),_0x101db2;}[_0x43bf95(0x411)](_0x53e1f1){const _0x2fd5e4=_0x43bf95;return this===_0x53e1f1||_0x53e1f1 instanceof _0x315929&&_0x34d1e5[_0x2fd5e4(0x7aa)][_0x2fd5e4(0x53a)][_0x2fd5e4(0x411)](this[_0x2fd5e4(0x993)],_0x53e1f1[_0x2fd5e4(0x993)])&&_0x34d1e5[_0x2fd5e4(0x7aa)][_0x2fd5e4(0x53a)][_0x2fd5e4(0x411)](this[_0x2fd5e4(0x7df)],_0x53e1f1[_0x2fd5e4(0x7df)]);}};Object[_0x43bf95(0x4a3)](_0x26cc87[_0x43bf95(0x519)],{'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)]('color'),'speed':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x178))});var _0x285282=_0x26cc87,_0x18cfa4=class _0x10dd3c extends _0x463e2f{constructor(_0x33df61={}){super(_0x33df61);}[_0x43bf95(0x7f6)](_0x57b653){const _0xe9b5c9=_0x43bf95;return _0x34d1e5[_0xe9b5c9(0x7aa)][_0xe9b5c9(0x4da)][_0xe9b5c9(0x2dc)];}[_0x43bf95(0x4e7)](_0x320aab,_0x3f644f){const _0x518684=_0x43bf95;return _0x3f644f=_0x34d1e5[_0x518684(0x7aa)]['defaultValue'](_0x3f644f,{}),_0x3f644f[_0x518684(0x124)]=_0x34d1e5[_0x518684(0x7aa)][_0x518684(0x53a)]['getValueOrUndefined'](this[_0x518684(0x993)],_0x320aab),_0x3f644f[_0x518684(0x178)]=_0x34d1e5[_0x518684(0x7aa)][_0x518684(0x53a)][_0x518684(0x2c9)](this[_0x518684(0x7df)],_0x320aab),_0x3f644f;}[_0x43bf95(0x411)](_0xc6a482){const _0x8d73bf=_0x43bf95;return this===_0xc6a482||_0xc6a482 instanceof _0x10dd3c&&_0x34d1e5[_0x8d73bf(0x7aa)][_0x8d73bf(0x53a)][_0x8d73bf(0x411)](this[_0x8d73bf(0x993)],_0xc6a482['_color'])&&_0x34d1e5['Cesium'][_0x8d73bf(0x53a)][_0x8d73bf(0x411)](this[_0x8d73bf(0x7df)],_0xc6a482['_speed']);}};Object[_0x43bf95(0x4a3)](_0x18cfa4[_0x43bf95(0x519)],{'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x124)),'speed':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x178))});var _0x263473=_0x18cfa4,_0x545499=class _0x78cf8 extends _0x463e2f{constructor(_0x1bb587={}){super(_0x1bb587);}[_0x43bf95(0x7f6)](_0x5b099d){const _0x5756d8=_0x43bf95;return _0x34d1e5[_0x5756d8(0x7aa)]['Material'][_0x5756d8(0x296)];}[_0x43bf95(0x4e7)](_0x45d7aa,_0x313583){const _0xaacb27=_0x43bf95;return _0x313583||(_0x313583={}),_0x313583['color']=_0x34d1e5[_0xaacb27(0x7aa)][_0xaacb27(0x53a)][_0xaacb27(0x2c9)](this[_0xaacb27(0x993)],_0x45d7aa),_0x313583[_0xaacb27(0x178)]=_0x34d1e5[_0xaacb27(0x7aa)][_0xaacb27(0x53a)][_0xaacb27(0x2c9)](this[_0xaacb27(0x7df)],_0x45d7aa),_0x313583;}[_0x43bf95(0x411)](_0x4e2ee2){const _0x3e57ce=_0x43bf95;return this===_0x4e2ee2||_0x4e2ee2 instanceof _0x78cf8&&_0x34d1e5['Cesium'][_0x3e57ce(0x53a)][_0x3e57ce(0x411)](this[_0x3e57ce(0x993)],_0x4e2ee2['_color'])&&_0x34d1e5['Cesium'][_0x3e57ce(0x53a)][_0x3e57ce(0x411)](this[_0x3e57ce(0x7df)],_0x4e2ee2[_0x3e57ce(0x7df)]);}};Object[_0x43bf95(0x4a3)](_0x545499[_0x43bf95(0x519)],{'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x124)),'speed':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x178))});var _0x3a7331=_0x545499,_0x572b6d=class _0x436704 extends _0x463e2f{constructor(_0x45030f={}){super(_0x45030f);}[_0x43bf95(0x7f6)](_0x4c983d){const _0x1b7f46=_0x43bf95;return _0x34d1e5[_0x1b7f46(0x7aa)][_0x1b7f46(0x4da)][_0x1b7f46(0x6b9)];}[_0x43bf95(0x4e7)](_0x2b9d2f,_0x162be4){const _0x4b1265=_0x43bf95;return _0x162be4||(_0x162be4={}),_0x162be4[_0x4b1265(0x124)]=_0x34d1e5[_0x4b1265(0x7aa)][_0x4b1265(0x53a)][_0x4b1265(0x2c9)](this[_0x4b1265(0x993)],_0x2b9d2f),_0x162be4[_0x4b1265(0x178)]=_0x34d1e5[_0x4b1265(0x7aa)][_0x4b1265(0x53a)][_0x4b1265(0x2c9)](this[_0x4b1265(0x7df)],_0x2b9d2f),_0x162be4;}['equals'](_0x50d649){const _0xe3db6=_0x43bf95;return this===_0x50d649||_0x50d649 instanceof _0x436704&&_0x34d1e5[_0xe3db6(0x7aa)][_0xe3db6(0x53a)][_0xe3db6(0x411)](this['_color'],_0x50d649[_0xe3db6(0x993)])&&_0x34d1e5[_0xe3db6(0x7aa)][_0xe3db6(0x53a)][_0xe3db6(0x411)](this['_speed'],_0x50d649['_speed']);}};Object[_0x43bf95(0x4a3)](_0x572b6d[_0x43bf95(0x519)],{'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x124)),'speed':_0x34d1e5['Cesium'][_0x43bf95(0x554)]('speed')});var _0x438d13=_0x572b6d,_0x7bdcae=class _0x21e9cb extends _0x463e2f{constructor(_0x187a81={}){super(_0x187a81);}['getType'](_0x4eb6b3){const _0x53839d=_0x43bf95;return _0x34d1e5[_0x53839d(0x7aa)][_0x53839d(0x4da)][_0x53839d(0x12d)];}[_0x43bf95(0x4e7)](_0x22ddc6,_0x44aa9c){const _0x57cbec=_0x43bf95;return _0x44aa9c||(_0x44aa9c={}),_0x44aa9c[_0x57cbec(0x124)]=_0x34d1e5[_0x57cbec(0x7aa)][_0x57cbec(0x53a)]['getValueOrUndefined'](this[_0x57cbec(0x993)],_0x22ddc6),_0x44aa9c[_0x57cbec(0x178)]=_0x34d1e5['Cesium'][_0x57cbec(0x53a)][_0x57cbec(0x2c9)](this[_0x57cbec(0x7df)],_0x22ddc6),_0x44aa9c;}[_0x43bf95(0x411)](_0x4290e7){const _0xffa7a9=_0x43bf95;return this===_0x4290e7||_0x4290e7 instanceof _0x21e9cb&&_0x34d1e5[_0xffa7a9(0x7aa)][_0xffa7a9(0x53a)]['equals'](this[_0xffa7a9(0x993)],_0x4290e7[_0xffa7a9(0x993)])&&_0x34d1e5[_0xffa7a9(0x7aa)][_0xffa7a9(0x53a)][_0xffa7a9(0x411)](this[_0xffa7a9(0x7df)],_0x4290e7['_speed']);}};Object[_0x43bf95(0x4a3)](_0x7bdcae[_0x43bf95(0x519)],{'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x124)),'speed':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x178))});var _0xc43f06=_0x7bdcae,_0x438b12=class _0x1e8730 extends _0x463e2f{constructor(_0x5c1700={}){super(_0x5c1700);}[_0x43bf95(0x7f6)](_0x429b06){const _0x5debb1=_0x43bf95;return _0x34d1e5[_0x5debb1(0x7aa)][_0x5debb1(0x4da)]['CircleSpiralType'];}[_0x43bf95(0x4e7)](_0x4aee05,_0x5bcda8){const _0x9d626b=_0x43bf95;return _0x5bcda8||(_0x5bcda8={}),_0x5bcda8['color']=_0x34d1e5[_0x9d626b(0x7aa)][_0x9d626b(0x53a)][_0x9d626b(0x2c9)](this[_0x9d626b(0x993)],_0x4aee05),_0x5bcda8[_0x9d626b(0x178)]=_0x34d1e5[_0x9d626b(0x7aa)][_0x9d626b(0x53a)]['getValueOrUndefined'](this['_speed'],_0x4aee05),_0x5bcda8;}['equals'](_0xc1fbcd){const _0x5e5752=_0x43bf95;return this===_0xc1fbcd||_0xc1fbcd instanceof _0x1e8730&&_0x34d1e5['Cesium']['Property']['equals'](this[_0x5e5752(0x993)],_0xc1fbcd[_0x5e5752(0x993)])&&_0x34d1e5[_0x5e5752(0x7aa)][_0x5e5752(0x53a)][_0x5e5752(0x411)](this[_0x5e5752(0x7df)],_0xc1fbcd[_0x5e5752(0x7df)]);}};Object[_0x43bf95(0x4a3)](_0x438b12[_0x43bf95(0x519)],{'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x124)),'speed':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x178))});var _0x34954f=_0x438b12,_0x3e5346=class _0x23d4ba extends _0x463e2f{constructor(_0x307fca={}){super(_0x307fca);}[_0x43bf95(0x7f6)](_0xba3136){const _0x31d6ab=_0x43bf95;return _0x34d1e5[_0x31d6ab(0x7aa)]['Material']['CircleVaryType'];}[_0x43bf95(0x4e7)](_0x4c323f,_0x3c98a8){const _0x5a3039=_0x43bf95;return _0x3c98a8=_0x34d1e5[_0x5a3039(0x7aa)][_0x5a3039(0x692)](_0x3c98a8,{}),_0x3c98a8['color']=_0x34d1e5[_0x5a3039(0x7aa)][_0x5a3039(0x53a)][_0x5a3039(0x2c9)](this[_0x5a3039(0x993)],_0x4c323f),_0x3c98a8['speed']=_0x34d1e5[_0x5a3039(0x7aa)]['Property'][_0x5a3039(0x2c9)](this[_0x5a3039(0x7df)],_0x4c323f),_0x3c98a8;}[_0x43bf95(0x411)](_0x539b71){const _0x5cd74c=_0x43bf95;return this===_0x539b71||_0x539b71 instanceof _0x23d4ba&&_0x34d1e5[_0x5cd74c(0x7aa)]['Property'][_0x5cd74c(0x411)](this[_0x5cd74c(0x993)],_0x539b71[_0x5cd74c(0x993)])&&_0x34d1e5[_0x5cd74c(0x7aa)][_0x5cd74c(0x53a)][_0x5cd74c(0x411)](this['_speed'],_0x539b71[_0x5cd74c(0x7df)]);}};Object[_0x43bf95(0x4a3)](_0x3e5346['prototype'],{'color':_0x34d1e5['Cesium']['createPropertyDescriptor'](_0x43bf95(0x124)),'speed':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x178))});var _0x3a7c80=_0x3e5346,_0x50f8ff=class _0x51a8be extends _0x463e2f{constructor(_0x3a7a90={}){const _0x28a680=_0x43bf95;super(_0x3a7a90),this[_0x28a680(0x565)]=Math[_0x28a680(0x2c3)](_0x3a7a90[_0x28a680(0x565)]||0x3,0x1),this['gradient']=_0x34d1e5[_0x28a680(0x7aa)][_0x28a680(0x72b)]['clamp'](_0x3a7a90['gradient']||0.1,0x0,0x1);}get['isConstant'](){return!0x1;}get[_0x43bf95(0x103)](){const _0x9cc051=_0x43bf95;return this[_0x9cc051(0x922)];}['getType'](_0x3a875e){const _0x74468a=_0x43bf95;return _0x34d1e5[_0x74468a(0x7aa)]['Material'][_0x74468a(0x8ea)];}[_0x43bf95(0x4e7)](_0x576980,_0x348ffb){const _0x4d113b=_0x43bf95;return _0x348ffb||(_0x348ffb={}),_0x348ffb[_0x4d113b(0x124)]=_0x34d1e5['Cesium']['Property']['getValueOrUndefined'](this[_0x4d113b(0x993)],_0x576980),_0x348ffb[_0x4d113b(0x178)]=_0x34d1e5[_0x4d113b(0x7aa)][_0x4d113b(0x53a)][_0x4d113b(0x2c9)](this[_0x4d113b(0x7df)],_0x576980),_0x348ffb[_0x4d113b(0x565)]=_0x34d1e5[_0x4d113b(0x7aa)][_0x4d113b(0x53a)][_0x4d113b(0x2c9)](this[_0x4d113b(0x99e)],_0x576980),_0x348ffb['gradient']=_0x34d1e5[_0x4d113b(0x7aa)][_0x4d113b(0x53a)][_0x4d113b(0x2c9)](this[_0x4d113b(0x92b)],_0x576980),_0x348ffb;}['equals'](_0x560ea8){const _0x26f388=_0x43bf95;return this===_0x560ea8||_0x560ea8 instanceof _0x51a8be&&_0x34d1e5[_0x26f388(0x7aa)][_0x26f388(0x53a)][_0x26f388(0x411)](this[_0x26f388(0x993)],_0x560ea8[_0x26f388(0x993)])&&_0x34d1e5[_0x26f388(0x7aa)][_0x26f388(0x53a)][_0x26f388(0x411)](this['_speed'],_0x560ea8[_0x26f388(0x7df)]);}};Object['defineProperties'](_0x50f8ff[_0x43bf95(0x519)],{'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x124)),'speed':_0x34d1e5['Cesium']['createPropertyDescriptor'](_0x43bf95(0x178))});var _0x21a60b=_0x50f8ff,_0x3770d8=class _0x145326 extends _0x463e2f{constructor(_0x1bf5a8={}){super(_0x1bf5a8);}[_0x43bf95(0x7f6)](_0x2fa70c){const _0xb5aecd=_0x43bf95;return _0x34d1e5[_0xb5aecd(0x7aa)][_0xb5aecd(0x4da)][_0xb5aecd(0x523)];}[_0x43bf95(0x4e7)](_0x3402bb,_0x2ce77f){const _0x1358dc=_0x43bf95;return _0x2ce77f=_0x34d1e5[_0x1358dc(0x7aa)][_0x1358dc(0x692)](_0x2ce77f,{}),_0x2ce77f[_0x1358dc(0x124)]=_0x34d1e5['Cesium']['Property']['getValueOrUndefined'](this[_0x1358dc(0x993)],_0x3402bb),_0x2ce77f[_0x1358dc(0x178)]=_0x34d1e5[_0x1358dc(0x7aa)][_0x1358dc(0x53a)][_0x1358dc(0x2c9)](this[_0x1358dc(0x7df)],_0x3402bb),_0x2ce77f;}[_0x43bf95(0x411)](_0x4f092b){const _0x56b7fb=_0x43bf95;return this===_0x4f092b||_0x4f092b instanceof _0x145326&&_0x34d1e5[_0x56b7fb(0x7aa)][_0x56b7fb(0x53a)]['equals'](this[_0x56b7fb(0x993)],_0x4f092b['_color'])&&_0x34d1e5[_0x56b7fb(0x7aa)][_0x56b7fb(0x53a)][_0x56b7fb(0x411)](this[_0x56b7fb(0x7df)],_0x4f092b[_0x56b7fb(0x7df)]);}};Object['defineProperties'](_0x3770d8[_0x43bf95(0x519)],{'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)]('color'),'speed':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x178))});var _0x2c6202=_0x3770d8,_0x5f1e09=class _0x90a20f extends _0x463e2f{constructor(_0x383ecd={}){super(_0x383ecd);}[_0x43bf95(0x7f6)](_0x2d8d68){const _0x2e150e=_0x43bf95;return _0x34d1e5['Cesium'][_0x2e150e(0x4da)][_0x2e150e(0x5c6)];}[_0x43bf95(0x4e7)](_0x206487,_0x530f67){const _0x13a463=_0x43bf95;return _0x530f67=_0x34d1e5[_0x13a463(0x7aa)][_0x13a463(0x692)](_0x530f67,{}),_0x530f67[_0x13a463(0x124)]=_0x34d1e5[_0x13a463(0x7aa)][_0x13a463(0x53a)]['getValueOrUndefined'](this['_color'],_0x206487),_0x530f67[_0x13a463(0x178)]=_0x34d1e5['Cesium']['Property']['getValueOrUndefined'](this[_0x13a463(0x7df)],_0x206487),_0x530f67;}['equals'](_0x22e939){const _0x33317d=_0x43bf95;return this===_0x22e939||_0x22e939 instanceof _0x90a20f&&_0x34d1e5[_0x33317d(0x7aa)][_0x33317d(0x53a)][_0x33317d(0x411)](this[_0x33317d(0x993)],_0x22e939[_0x33317d(0x993)])&&_0x34d1e5[_0x33317d(0x7aa)][_0x33317d(0x53a)]['equals'](this[_0x33317d(0x7df)],_0x22e939['_speed']);}};Object[_0x43bf95(0x4a3)](_0x5f1e09[_0x43bf95(0x519)],{'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)]('color'),'speed':_0x34d1e5['Cesium']['createPropertyDescriptor'](_0x43bf95(0x178))});var _0x579b4e=_0x5f1e09,_0x1a4c64=class _0x51d3cd extends _0x463e2f{constructor(_0xce2c93={}){super(_0xce2c93);}[_0x43bf95(0x7f6)](_0x918957){const _0xa9df24=_0x43bf95;return _0x34d1e5[_0xa9df24(0x7aa)][_0xa9df24(0x4da)][_0xa9df24(0x2ea)];}[_0x43bf95(0x4e7)](_0x5696e6,_0x15b4ea){const _0x321141=_0x43bf95;return _0x15b4ea||(_0x15b4ea={}),_0x15b4ea['color']=_0x34d1e5['Cesium'][_0x321141(0x53a)][_0x321141(0x2c9)](this[_0x321141(0x993)],_0x5696e6),_0x15b4ea['speed']=_0x34d1e5[_0x321141(0x7aa)][_0x321141(0x53a)][_0x321141(0x2c9)](this['_speed'],_0x5696e6),_0x15b4ea;}['equals'](_0x330e39){const _0xc1514b=_0x43bf95;return this===_0x330e39||_0x330e39 instanceof _0x51d3cd&&_0x34d1e5['Cesium'][_0xc1514b(0x53a)][_0xc1514b(0x411)](this[_0xc1514b(0x993)],_0x330e39[_0xc1514b(0x993)])&&_0x34d1e5[_0xc1514b(0x7aa)][_0xc1514b(0x53a)]['equals'](this[_0xc1514b(0x7df)],_0x330e39[_0xc1514b(0x7df)]);}};Object[_0x43bf95(0x4a3)](_0x1a4c64[_0x43bf95(0x519)],{'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)]('color'),'speed':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)]('speed')});var _0x3617d3=_0x1a4c64,_0x4fb488=class _0x1559cd extends _0x463e2f{constructor(_0x915c24={}){const _0x5efb39=_0x43bf95;super(_0x915c24),this[_0x5efb39(0x91f)]=void 0x0,this[_0x5efb39(0x787)]=void 0x0,this[_0x5efb39(0x92b)]=void 0x0,this[_0x5efb39(0x162)]=void 0x0,this[_0x5efb39(0x37c)]=_0x915c24[_0x5efb39(0x37c)]||0.03,this[_0x5efb39(0x1ef)]=_0x915c24[_0x5efb39(0x1ef)]||0.1;}[_0x43bf95(0x7f6)](_0x5a417b){const _0x2da84c=_0x43bf95;return _0x34d1e5[_0x2da84c(0x7aa)][_0x2da84c(0x4da)][_0x2da84c(0x5e0)];}['getValue'](_0x50da0f,_0x5dad4c){const _0x5afc19=_0x43bf95;return _0x5dad4c||(_0x5dad4c={}),_0x5dad4c[_0x5afc19(0x124)]=_0x34d1e5[_0x5afc19(0x7aa)][_0x5afc19(0x53a)][_0x5afc19(0x2c9)](this[_0x5afc19(0x993)],_0x50da0f),_0x5dad4c['speed']=_0x34d1e5[_0x5afc19(0x7aa)][_0x5afc19(0x53a)][_0x5afc19(0x2c9)](this[_0x5afc19(0x7df)],_0x50da0f),_0x5dad4c[_0x5afc19(0x37c)]=_0x34d1e5[_0x5afc19(0x7aa)]['Property'][_0x5afc19(0x2c9)](this[_0x5afc19(0x91f)],_0x50da0f),_0x5dad4c[_0x5afc19(0x1ef)]=_0x34d1e5['Cesium'][_0x5afc19(0x53a)][_0x5afc19(0x2c9)](this[_0x5afc19(0x92b)],_0x50da0f),_0x5dad4c;}[_0x43bf95(0x411)](_0x3bb89d){const _0x4e7122=_0x43bf95;return this===_0x3bb89d||_0x3bb89d instanceof _0x1559cd&&_0x34d1e5['Cesium'][_0x4e7122(0x53a)][_0x4e7122(0x411)](this['_color'],_0x3bb89d[_0x4e7122(0x993)])&&_0x34d1e5[_0x4e7122(0x7aa)][_0x4e7122(0x53a)]['equals'](this[_0x4e7122(0x7df)],_0x3bb89d[_0x4e7122(0x7df)])&&_0x34d1e5[_0x4e7122(0x7aa)][_0x4e7122(0x53a)][_0x4e7122(0x411)](this['_percent'],_0x3bb89d[_0x4e7122(0x91f)])&&_0x34d1e5['Cesium']['Property'][_0x4e7122(0x411)](this['_gradient'],_0x3bb89d['_gradient']);}};Object[_0x43bf95(0x4a3)](_0x4fb488[_0x43bf95(0x519)],{'color':_0x34d1e5['Cesium'][_0x43bf95(0x554)](_0x43bf95(0x124)),'speed':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)]('speed'),'percent':_0x34d1e5['Cesium'][_0x43bf95(0x554)](_0x43bf95(0x37c)),'gradient':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x1ef))});var _0x475c96=_0x4fb488,_0x14c6b6=class _0x46fd81 extends _0x463e2f{constructor(_0x17a097={}){const _0x5693c4=_0x43bf95;var _0x2f1eb9,_0x127282;super(_0x17a097),this[_0x5693c4(0x487)]=void 0x0,this[_0x5693c4(0x113)]=void 0x0,this['_repeat']=void 0x0,this[_0x5693c4(0x4b8)]=void 0x0,this[_0x5693c4(0x6bd)]=_0x17a097[_0x5693c4(0x6bd)],this[_0x5693c4(0x190)]=new _0x34d1e5['Cesium'][(_0x5693c4(0x48e))](((_0x2f1eb9=_0x17a097['repeat'])==null?void 0x0:_0x2f1eb9['x'])||0x1,((_0x127282=_0x17a097['repeat'])==null?void 0x0:_0x127282['y'])||0x1);}[_0x43bf95(0x7f6)](_0x27a0e9){const _0x231b09=_0x43bf95;return _0x34d1e5['Cesium'][_0x231b09(0x4da)][_0x231b09(0xa7c)];}[_0x43bf95(0x4e7)](_0x20ccd9,_0xa91e3b){const _0x7dd35=_0x43bf95;return _0xa91e3b||(_0xa91e3b={}),_0xa91e3b['color']=_0x34d1e5['Cesium'][_0x7dd35(0x53a)][_0x7dd35(0x2c9)](this[_0x7dd35(0x993)],_0x20ccd9),_0xa91e3b['image']=_0x34d1e5[_0x7dd35(0x7aa)][_0x7dd35(0x53a)][_0x7dd35(0x2c9)](this[_0x7dd35(0x487)],_0x20ccd9),_0xa91e3b[_0x7dd35(0x190)]=_0x34d1e5[_0x7dd35(0x7aa)][_0x7dd35(0x53a)][_0x7dd35(0x2c9)](this[_0x7dd35(0x18f)],_0x20ccd9),_0xa91e3b[_0x7dd35(0x178)]=_0x34d1e5[_0x7dd35(0x7aa)][_0x7dd35(0x53a)][_0x7dd35(0x2c9)](this[_0x7dd35(0x7df)],_0x20ccd9),_0xa91e3b;}[_0x43bf95(0x411)](_0x58d5f2){const _0xae3c85=_0x43bf95;return this===_0x58d5f2||_0x58d5f2 instanceof _0x46fd81&&_0x34d1e5['Cesium'][_0xae3c85(0x53a)][_0xae3c85(0x411)](this[_0xae3c85(0x993)],_0x58d5f2[_0xae3c85(0x993)])&&_0x34d1e5[_0xae3c85(0x7aa)][_0xae3c85(0x53a)][_0xae3c85(0x411)](this[_0xae3c85(0x487)],_0x58d5f2[_0xae3c85(0x487)])&&_0x34d1e5[_0xae3c85(0x7aa)][_0xae3c85(0x53a)][_0xae3c85(0x411)](this[_0xae3c85(0x18f)],_0x58d5f2[_0xae3c85(0x18f)])&&_0x34d1e5['Cesium'][_0xae3c85(0x53a)][_0xae3c85(0x411)](this[_0xae3c85(0x7df)],_0x58d5f2['_speed']);}};Object[_0x43bf95(0x4a3)](_0x14c6b6[_0x43bf95(0x519)],{'color':_0x34d1e5[_0x43bf95(0x7aa)]['createPropertyDescriptor'](_0x43bf95(0x124)),'speed':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x178)),'image':_0x34d1e5['Cesium'][_0x43bf95(0x554)](_0x43bf95(0x6bd)),'repeat':_0x34d1e5[_0x43bf95(0x7aa)]['createPropertyDescriptor'](_0x43bf95(0x190))});var _0x5a0f20=_0x14c6b6,_0x60f143=_0x43bf95(0x8aa),_0xe638f=class _0x598515 extends _0x463e2f{constructor(_0x2de9d9={}){const _0x1c49b3=_0x43bf95;super(_0x2de9d9),this[_0x1c49b3(0x487)]=void 0x0,this['_imageSubscription']=void 0x0,this[_0x1c49b3(0x6bd)]=_0x60f143;}[_0x43bf95(0x7f6)](_0x3d39e8){const _0x26dab5=_0x43bf95;return _0x34d1e5[_0x26dab5(0x7aa)][_0x26dab5(0x4da)]['PolylineLightingType'];}['getValue'](_0x18ffd3,_0x5eda7d){const _0x56b74d=_0x43bf95;return _0x5eda7d||(_0x5eda7d={}),_0x5eda7d[_0x56b74d(0x124)]=_0x34d1e5[_0x56b74d(0x7aa)][_0x56b74d(0x53a)]['getValueOrUndefined'](this[_0x56b74d(0x993)],_0x18ffd3),_0x5eda7d[_0x56b74d(0x6bd)]=_0x34d1e5['Cesium'][_0x56b74d(0x53a)]['getValueOrUndefined'](this[_0x56b74d(0x487)],_0x18ffd3),_0x5eda7d;}[_0x43bf95(0x411)](_0x2cad09){const _0x5906f9=_0x43bf95;return this===_0x2cad09||_0x2cad09 instanceof _0x598515&&_0x34d1e5[_0x5906f9(0x7aa)]['Property']['equals'](this[_0x5906f9(0x993)],_0x2cad09[_0x5906f9(0x993)])&&_0x34d1e5[_0x5906f9(0x7aa)][_0x5906f9(0x53a)][_0x5906f9(0x411)](this[_0x5906f9(0x487)],_0x2cad09[_0x5906f9(0x487)]);}};Object['defineProperties'](_0xe638f[_0x43bf95(0x519)],{'color':_0x34d1e5[_0x43bf95(0x7aa)]['createPropertyDescriptor'](_0x43bf95(0x124)),'image':_0x34d1e5['Cesium'][_0x43bf95(0x554)]('image')});var _0xd34b80=_0xe638f,_0x2f5f1d=class _0x2c45ee extends _0x463e2f{constructor(_0xb5f9d6={}){const _0x687186=_0x43bf95;super(_0xb5f9d6),this[_0x687186(0x487)]=void 0x0,this['_imageSubscription']=void 0x0,this[_0x687186(0x6bd)]=_0x60f143;}[_0x43bf95(0x7f6)](_0x27d032){const _0x19d60f=_0x43bf95;return _0x34d1e5['Cesium'][_0x19d60f(0x4da)]['PolylineLightingTrailType'];}['getValue'](_0x13a57c,_0x1e45bb){const _0x2f0be1=_0x43bf95;return _0x1e45bb||(_0x1e45bb={}),_0x1e45bb[_0x2f0be1(0x124)]=_0x34d1e5['Cesium']['Property'][_0x2f0be1(0x2c9)](this[_0x2f0be1(0x993)],_0x13a57c),_0x1e45bb[_0x2f0be1(0x6bd)]=_0x34d1e5[_0x2f0be1(0x7aa)]['Property'][_0x2f0be1(0x2c9)](this[_0x2f0be1(0x487)],_0x13a57c),_0x1e45bb[_0x2f0be1(0x178)]=_0x34d1e5[_0x2f0be1(0x7aa)][_0x2f0be1(0x53a)][_0x2f0be1(0x2c9)](this[_0x2f0be1(0x7df)],_0x13a57c),_0x1e45bb;}['equals'](_0x3f1ea0){const _0x4ede49=_0x43bf95;return this===_0x3f1ea0||_0x3f1ea0 instanceof _0x2c45ee&&_0x34d1e5[_0x4ede49(0x7aa)][_0x4ede49(0x53a)][_0x4ede49(0x411)](this[_0x4ede49(0x993)],_0x3f1ea0[_0x4ede49(0x993)])&&_0x34d1e5[_0x4ede49(0x7aa)][_0x4ede49(0x53a)]['equals'](this[_0x4ede49(0x7df)],_0x3f1ea0[_0x4ede49(0x7df)]);}};Object[_0x43bf95(0x4a3)](_0x2f5f1d['prototype'],{'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x124)),'speed':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x178)),'image':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)]('image')});var _0x466f8c=_0x2f5f1d,_0x1df2be=class _0x4e1b9d extends _0x463e2f{constructor(_0x232d4e={}){super(_0x232d4e);}['getType'](_0x312d89){const _0x1563c4=_0x43bf95;return _0x34d1e5[_0x1563c4(0x7aa)][_0x1563c4(0x4da)]['PolylineTrailType'];}['getValue'](_0x26cf83,_0x57293e){const _0x3bdc4b=_0x43bf95;return _0x57293e||(_0x57293e={}),_0x57293e[_0x3bdc4b(0x124)]=_0x34d1e5[_0x3bdc4b(0x7aa)][_0x3bdc4b(0x53a)][_0x3bdc4b(0x2c9)](this[_0x3bdc4b(0x993)],_0x26cf83),_0x57293e[_0x3bdc4b(0x178)]=this[_0x3bdc4b(0x7df)],_0x57293e;}[_0x43bf95(0x411)](_0x92ff5a){const _0x5e89b4=_0x43bf95;return this===_0x92ff5a||_0x92ff5a instanceof _0x4e1b9d&&_0x34d1e5[_0x5e89b4(0x7aa)][_0x5e89b4(0x53a)][_0x5e89b4(0x411)](this[_0x5e89b4(0x993)],_0x92ff5a[_0x5e89b4(0x993)])&&_0x34d1e5['Cesium'][_0x5e89b4(0x53a)][_0x5e89b4(0x411)](this[_0x5e89b4(0x7df)],_0x92ff5a[_0x5e89b4(0x7df)]);}};Object[_0x43bf95(0x4a3)](_0x1df2be[_0x43bf95(0x519)],{'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x124)),'speed':_0x34d1e5[_0x43bf95(0x7aa)]['createPropertyDescriptor'](_0x43bf95(0x178))});var _0x1be278=_0x1df2be,_0x1bd718=class _0x48dc66 extends _0x463e2f{constructor(_0x23087d={}){super(_0x23087d);}[_0x43bf95(0x7f6)](_0x563be4){return _0x34d1e5['Cesium']['Material']['RadarLineType'];}['getValue'](_0x30c964,_0x54c6d9){const _0x456470=_0x43bf95;return _0x54c6d9=_0x34d1e5[_0x456470(0x7aa)][_0x456470(0x692)](_0x54c6d9,{}),_0x54c6d9[_0x456470(0x124)]=_0x34d1e5[_0x456470(0x7aa)][_0x456470(0x53a)]['getValueOrUndefined'](this[_0x456470(0x993)],_0x30c964),_0x54c6d9[_0x456470(0x178)]=_0x34d1e5[_0x456470(0x7aa)][_0x456470(0x53a)][_0x456470(0x2c9)](this['_speed'],_0x30c964),_0x54c6d9;}['equals'](_0x41fbac){const _0x35ad0a=_0x43bf95;return this===_0x41fbac||_0x41fbac instanceof _0x48dc66&&_0x34d1e5[_0x35ad0a(0x7aa)]['Property']['equals'](this[_0x35ad0a(0x993)],_0x41fbac[_0x35ad0a(0x993)])&&_0x34d1e5[_0x35ad0a(0x7aa)]['Property'][_0x35ad0a(0x411)](this[_0x35ad0a(0x7df)],_0x41fbac[_0x35ad0a(0x7df)]);}};Object[_0x43bf95(0x4a3)](_0x1bd718[_0x43bf95(0x519)],{'color':_0x34d1e5['Cesium'][_0x43bf95(0x554)](_0x43bf95(0x124)),'speed':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)]('speed')});var _0x126a85=_0x1bd718,_0x170f1b=class _0x48920b extends _0x463e2f{constructor(_0x3cbdde={}){super(_0x3cbdde);}[_0x43bf95(0x7f6)](_0xfc0add){const _0x149636=_0x43bf95;return _0x34d1e5[_0x149636(0x7aa)][_0x149636(0x4da)][_0x149636(0xa14)];}[_0x43bf95(0x4e7)](_0xc9d86d,_0x2224b3){const _0x4bb23e=_0x43bf95;return _0x2224b3=_0x34d1e5['Cesium'][_0x4bb23e(0x692)](_0x2224b3,{}),_0x2224b3[_0x4bb23e(0x124)]=_0x34d1e5['Cesium'][_0x4bb23e(0x53a)][_0x4bb23e(0x2c9)](this[_0x4bb23e(0x993)],_0xc9d86d),_0x2224b3[_0x4bb23e(0x178)]=_0x34d1e5[_0x4bb23e(0x7aa)][_0x4bb23e(0x53a)][_0x4bb23e(0x2c9)](this[_0x4bb23e(0x7df)],_0xc9d86d),_0x2224b3;}[_0x43bf95(0x411)](_0x496052){const _0x130eb2=_0x43bf95;return this===_0x496052||_0x496052 instanceof _0x48920b&&_0x34d1e5[_0x130eb2(0x7aa)][_0x130eb2(0x53a)][_0x130eb2(0x411)](this[_0x130eb2(0x993)],_0x496052[_0x130eb2(0x993)])&&_0x34d1e5[_0x130eb2(0x7aa)][_0x130eb2(0x53a)][_0x130eb2(0x411)](this[_0x130eb2(0x7df)],_0x496052[_0x130eb2(0x7df)]);}};Object[_0x43bf95(0x4a3)](_0x170f1b[_0x43bf95(0x519)],{'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x124)),'speed':_0x34d1e5['Cesium'][_0x43bf95(0x554)](_0x43bf95(0x178))});var _0x44b681=_0x170f1b,_0x1de392=class _0x4a2e20 extends _0x463e2f{constructor(_0x591829={}){super(_0x591829);}[_0x43bf95(0x7f6)](_0x15bb54){const _0x165563=_0x43bf95;return _0x34d1e5['Cesium'][_0x165563(0x4da)][_0x165563(0x2a4)];}[_0x43bf95(0x4e7)](_0x109d58,_0x160c11){const _0x37a41f=_0x43bf95;return _0x160c11=_0x34d1e5[_0x37a41f(0x7aa)][_0x37a41f(0x692)](_0x160c11,{}),_0x160c11[_0x37a41f(0x124)]=_0x34d1e5[_0x37a41f(0x7aa)]['Property']['getValueOrUndefined'](this['_color'],_0x109d58),_0x160c11[_0x37a41f(0x178)]=_0x34d1e5['Cesium'][_0x37a41f(0x53a)][_0x37a41f(0x2c9)](this[_0x37a41f(0x7df)],_0x109d58),_0x160c11;}[_0x43bf95(0x411)](_0x551ee4){const _0x2acd0a=_0x43bf95;return this===_0x551ee4||_0x551ee4 instanceof _0x4a2e20&&_0x34d1e5['Cesium'][_0x2acd0a(0x53a)][_0x2acd0a(0x411)](this[_0x2acd0a(0x993)],_0x551ee4['_color'])&&_0x34d1e5[_0x2acd0a(0x7aa)][_0x2acd0a(0x53a)][_0x2acd0a(0x411)](this[_0x2acd0a(0x7df)],_0x551ee4['_speed']);}};Object[_0x43bf95(0x4a3)](_0x1de392[_0x43bf95(0x519)],{'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x124)),'speed':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x178))});var _0x4f2b75=_0x1de392,_0x112f69=class _0x417977 extends _0x463e2f{constructor(_0x455af9={}){const _0x5cba9a=_0x43bf95;var _0x415d6f,_0x5984ae;super(_0x455af9),this['_image']=void 0x0,this[_0x5cba9a(0x113)]=void 0x0,this['_repeat']=void 0x0,this[_0x5cba9a(0x4b8)]=void 0x0,this[_0x5cba9a(0x6bd)]=_0x455af9[_0x5cba9a(0x6bd)],this[_0x5cba9a(0x190)]=new _0x34d1e5[(_0x5cba9a(0x7aa))][(_0x5cba9a(0x48e))](((_0x415d6f=_0x455af9[_0x5cba9a(0x190)])==null?void 0x0:_0x415d6f['x'])||0x1,((_0x5984ae=_0x455af9[_0x5cba9a(0x190)])==null?void 0x0:_0x5984ae['y'])||0x1);}[_0x43bf95(0x7f6)](_0x53a187){const _0x33df27=_0x43bf95;return _0x34d1e5[_0x33df27(0x7aa)]['Material'][_0x33df27(0x2e3)];}[_0x43bf95(0x4e7)](_0x2842d7,_0x283848){const _0x821c81=_0x43bf95;return _0x283848=_0x34d1e5['Cesium'][_0x821c81(0x692)](_0x283848,{}),_0x283848[_0x821c81(0x124)]=_0x34d1e5[_0x821c81(0x7aa)]['Property'][_0x821c81(0x2c9)](this[_0x821c81(0x993)],_0x2842d7),_0x283848['image']=_0x34d1e5[_0x821c81(0x7aa)]['Property'][_0x821c81(0x2c9)](this['_image'],_0x2842d7),_0x283848['repeat']=_0x34d1e5[_0x821c81(0x7aa)][_0x821c81(0x53a)][_0x821c81(0x2c9)](this['_repeat'],_0x2842d7),_0x283848[_0x821c81(0x178)]=_0x34d1e5[_0x821c81(0x7aa)][_0x821c81(0x53a)][_0x821c81(0x2c9)](this[_0x821c81(0x7df)],_0x2842d7),_0x283848;}[_0x43bf95(0x411)](_0x5cabc3){const _0x5481ac=_0x43bf95;return this===_0x5cabc3||_0x5cabc3 instanceof _0x417977&&_0x34d1e5[_0x5481ac(0x7aa)][_0x5481ac(0x53a)][_0x5481ac(0x411)](this[_0x5481ac(0x993)],_0x5cabc3[_0x5481ac(0x993)])&&_0x34d1e5['Cesium']['Property'][_0x5481ac(0x411)](this[_0x5481ac(0x487)],_0x5cabc3['_image'])&&_0x34d1e5['Cesium'][_0x5481ac(0x53a)]['equals'](this[_0x5481ac(0x18f)],_0x5cabc3[_0x5481ac(0x18f)])&&_0x34d1e5[_0x5481ac(0x7aa)]['Property'][_0x5481ac(0x411)](this['_speed'],_0x5cabc3[_0x5481ac(0x7df)]);}};Object['defineProperties'](_0x112f69['prototype'],{'image':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)]('image'),'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x124)),'speed':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x178)),'repeat':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x190))});var _0x331bba=_0x112f69,_0x42a244=_0x43bf95(0x76a),_0x5acea3=class _0x156c5b extends _0x463e2f{constructor(_0x52b43f={}){const _0x4cd544=_0x43bf95;var _0x53e655,_0x31b7ea;super(_0x52b43f),this[_0x4cd544(0x487)]=void 0x0,this[_0x4cd544(0x113)]=void 0x0,this['_repeat']=void 0x0,this['_repeatSubscription']=void 0x0,this[_0x4cd544(0x6bd)]=_0x42a244,this[_0x4cd544(0x190)]=new _0x34d1e5[(_0x4cd544(0x7aa))][(_0x4cd544(0x48e))](((_0x53e655=_0x52b43f[_0x4cd544(0x190)])==null?void 0x0:_0x53e655['x'])||0x1,((_0x31b7ea=_0x52b43f[_0x4cd544(0x190)])==null?void 0x0:_0x31b7ea['y'])||0x1);}[_0x43bf95(0x7f6)](_0x41f5e6){const _0x3b5163=_0x43bf95;return _0x34d1e5[_0x3b5163(0x7aa)][_0x3b5163(0x4da)]['WallLineTrailType'];}['getValue'](_0x45056e,_0x558e5e){const _0x45383a=_0x43bf95;return _0x558e5e||(_0x558e5e={}),_0x558e5e[_0x45383a(0x124)]=_0x34d1e5['Cesium'][_0x45383a(0x53a)][_0x45383a(0x2c9)](this[_0x45383a(0x993)],_0x45056e),_0x558e5e[_0x45383a(0x6bd)]=_0x34d1e5[_0x45383a(0x7aa)][_0x45383a(0x53a)]['getValueOrUndefined'](this[_0x45383a(0x487)],_0x45056e),_0x558e5e['repeat']=_0x34d1e5[_0x45383a(0x7aa)][_0x45383a(0x53a)][_0x45383a(0x2c9)](this[_0x45383a(0x18f)],_0x45056e),_0x558e5e[_0x45383a(0x178)]=_0x34d1e5[_0x45383a(0x7aa)]['Property']['getValueOrUndefined'](this[_0x45383a(0x7df)],_0x45056e),_0x558e5e;}[_0x43bf95(0x411)](_0x2583c0){const _0x4145f8=_0x43bf95;return this===_0x2583c0||_0x2583c0 instanceof _0x156c5b&&_0x34d1e5['Cesium'][_0x4145f8(0x53a)]['equals'](this[_0x4145f8(0x993)],_0x2583c0[_0x4145f8(0x993)])&&_0x34d1e5[_0x4145f8(0x7aa)][_0x4145f8(0x53a)]['equals'](this[_0x4145f8(0x7df)],_0x2583c0[_0x4145f8(0x7df)])&&_0x34d1e5['Cesium'][_0x4145f8(0x53a)][_0x4145f8(0x411)](this[_0x4145f8(0x18f)],_0x2583c0[_0x4145f8(0x18f)]);}};Object[_0x43bf95(0x4a3)](_0x5acea3[_0x43bf95(0x519)],{'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x124)),'image':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)]('image'),'repeat':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x190)),'speed':_0x34d1e5['Cesium'][_0x43bf95(0x554)]('speed')});var _0x1d3b64=_0x5acea3,_0x2c8999=_0x43bf95(0x757),_0x16fb34=class _0x27087a extends _0x463e2f{constructor(_0x579383={}){const _0x485c57=_0x43bf95;super(_0x579383),this['_image']=void 0x0,this['_imageSubscription']=void 0x0,this[_0x485c57(0x6bd)]=_0x2c8999;}['getType'](_0x5e026c){const _0x41ad47=_0x43bf95;return _0x34d1e5['Cesium'][_0x41ad47(0x4da)][_0x41ad47(0x5b7)];}[_0x43bf95(0x4e7)](_0x10e245,_0x29a5a8){const _0x4469dc=_0x43bf95;return _0x29a5a8||(_0x29a5a8={}),_0x29a5a8['color']=_0x34d1e5['Cesium'][_0x4469dc(0x53a)]['getValueOrUndefined'](this[_0x4469dc(0x993)],_0x10e245),_0x29a5a8[_0x4469dc(0x6bd)]=_0x34d1e5[_0x4469dc(0x7aa)][_0x4469dc(0x53a)]['getValueOrUndefined'](this[_0x4469dc(0x487)],_0x10e245),_0x29a5a8[_0x4469dc(0x178)]=_0x34d1e5[_0x4469dc(0x7aa)]['Property']['getValueOrUndefined'](this[_0x4469dc(0x7df)],_0x10e245),_0x29a5a8;}[_0x43bf95(0x411)](_0x3a5f7b){const _0x3a47df=_0x43bf95;return this===_0x3a5f7b||_0x3a5f7b instanceof _0x27087a&&_0x34d1e5[_0x3a47df(0x7aa)][_0x3a47df(0x53a)][_0x3a47df(0x411)](this['_color'],_0x3a5f7b[_0x3a47df(0x993)])&&_0x34d1e5[_0x3a47df(0x7aa)][_0x3a47df(0x53a)]['equals'](this[_0x3a47df(0x7df)],_0x3a5f7b[_0x3a47df(0x7df)]);}};Object[_0x43bf95(0x4a3)](_0x16fb34['prototype'],{'color':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x124)),'speed':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x178)),'image':_0x34d1e5[_0x43bf95(0x7aa)]['createPropertyDescriptor'](_0x43bf95(0x6bd))});var _0x29a900=_0x16fb34,_0x400689=class _0x454f86{constructor(_0x3afce2){const _0x40221d=_0x43bf95;_0x3afce2=_0x3afce2||{},this[_0x40221d(0x922)]=new _0x34d1e5['Cesium']['Event'](),this[_0x40221d(0x514)]=void 0x0,this[_0x40221d(0xa33)]=void 0x0,this[_0x40221d(0x2f2)]=_0x3afce2[_0x40221d(0x2f2)]||new _0x34d1e5[(_0x40221d(0x7aa))][(_0x40221d(0x7d2))](0.2,0.3,0.6,0x1),this[_0x40221d(0x279)]=void 0x0,this[_0x40221d(0x87f)]=void 0x0,this[_0x40221d(0x5fd)]=_0x3afce2[_0x40221d(0x5fd)]||new _0x34d1e5[(_0x40221d(0x7aa))][(_0x40221d(0x7d2))](0x0,0x1,0.699,0x1),this[_0x40221d(0x9f8)]=void 0x0,this[_0x40221d(0x34c)]=void 0x0,this[_0x40221d(0x15e)]=_0x3afce2[_0x40221d(0x15e)]||_0x34d1e5[_0x40221d(0x7aa)][_0x40221d(0x4da)][_0x40221d(0x70d)],this[_0x40221d(0xa72)]=void 0x0,this['_normalMapSubscription']=void 0x0,this[_0x40221d(0x106)]=_0x3afce2[_0x40221d(0x106)]||_0x34d1e5[_0x40221d(0x7aa)][_0x40221d(0x4da)][_0x40221d(0x70d)],this['frequency']=_0x34d1e5[_0x40221d(0x7aa)][_0x40221d(0x692)](_0x3afce2[_0x40221d(0x5af)],0x3e8),this[_0x40221d(0x1d7)]=_0x34d1e5[_0x40221d(0x7aa)][_0x40221d(0x692)](_0x3afce2[_0x40221d(0x1d7)],0.01),this[_0x40221d(0x78e)]=_0x34d1e5[_0x40221d(0x7aa)][_0x40221d(0x692)](_0x3afce2['amplitude'],0xa),this[_0x40221d(0x318)]=_0x34d1e5['Cesium'][_0x40221d(0x692)](_0x3afce2[_0x40221d(0x318)],0.5);}get[_0x43bf95(0x3d6)](){return!0x1;}get[_0x43bf95(0x103)](){const _0x5b9158=_0x43bf95;return this[_0x5b9158(0x922)];}['getType'](_0x41a2d5){const _0xd08712=_0x43bf95;return _0x34d1e5[_0xd08712(0x7aa)][_0xd08712(0x4da)][_0xd08712(0x1cf)];}[_0x43bf95(0x4e7)](_0x500091,_0x954b24){const _0x4e4806=_0x43bf95;return _0x954b24||(_0x954b24={}),_0x954b24[_0x4e4806(0x2f2)]=_0x34d1e5[_0x4e4806(0x7aa)][_0x4e4806(0x53a)][_0x4e4806(0x2c9)](this[_0x4e4806(0x514)],_0x500091),_0x954b24[_0x4e4806(0x5fd)]=_0x34d1e5[_0x4e4806(0x7aa)]['Property'][_0x4e4806(0x2c9)](this['_blendColor'],_0x500091),_0x954b24[_0x4e4806(0x15e)]=_0x34d1e5[_0x4e4806(0x7aa)][_0x4e4806(0x53a)][_0x4e4806(0x2c9)](this['_specularMap'],_0x500091),_0x954b24[_0x4e4806(0x106)]=_0x34d1e5[_0x4e4806(0x7aa)][_0x4e4806(0x53a)][_0x4e4806(0x2c9)](this['_normalMap'],_0x500091),_0x954b24[_0x4e4806(0x5af)]=this[_0x4e4806(0x5af)],_0x954b24[_0x4e4806(0x1d7)]=this[_0x4e4806(0x1d7)],_0x954b24[_0x4e4806(0x78e)]=this['amplitude'],_0x954b24[_0x4e4806(0x318)]=this['specularIntensity'],_0x954b24;}['equals'](_0x5e9f99){const _0x33df96=_0x43bf95;return this===_0x5e9f99||_0x5e9f99 instanceof _0x454f86&&_0x34d1e5[_0x33df96(0x7aa)][_0x33df96(0x53a)]['equals'](this[_0x33df96(0x514)],_0x5e9f99[_0x33df96(0x514)]);}};Object[_0x43bf95(0x4a3)](_0x400689[_0x43bf95(0x519)],{'baseWaterColor':_0x34d1e5[_0x43bf95(0x7aa)]['createPropertyDescriptor']('baseWaterColor'),'blendColor':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x5fd)),'specularMap':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x15e)),'normalMap':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x554)](_0x43bf95(0x106))});var _0x303e6e=_0x400689,_0x3243a1=class{constructor(_0x486899){const _0x1294e6=_0x43bf95;this[_0x1294e6(0x9ca)]=_0x486899,this[_0x1294e6(0x3f7)]=void 0x0,this[_0x1294e6(0x761)]=void 0x0,this[_0x1294e6(0xaa1)]=void 0x0,this[_0x1294e6(0x674)]={},this[_0x1294e6(0x387)]=[];}get[_0x43bf95(0x95d)](){const _0x17b1ce=_0x43bf95;return this[_0x17b1ce(0x3f7)][_0x17b1ce(0x95d)];}['_mountedHook'](){}[_0x43bf95(0x222)](){}[_0x43bf95(0x38e)](_0x2847fb){}[_0x43bf95(0x4c5)](_0x15dea5){const _0x46844f=_0x43bf95;this[_0x46844f(0x387)][_0x46844f(0x321)](),this[_0x46844f(0x387)][_0x46844f(0xb3)](_0x15dea5);}[_0x43bf95(0x56d)](){const _0x59336c=_0x43bf95;this[_0x59336c(0x2a1)](),this[_0x59336c(0x3f7)][_0x59336c(0x95d)][_0x59336c(0x96a)](),this[_0x59336c(0xaa1)]&&this[_0x59336c(0x761)][_0x59336c(0x1f6)][_0x59336c(0x109)](this[_0x59336c(0xaa1)]),this['_stoppedHook']();}[_0x43bf95(0x4ac)](){const _0x26e10c=_0x43bf95;this['drawTool']['on'](_0x14f7b9[_0x26e10c(0x6f1)],this['_onDrawAnchor'],this),this['drawTool']['on'](_0x14f7b9[_0x26e10c(0x641)],this['_onAnchorMoving'],this),this[_0x26e10c(0x95d)]['on'](_0x14f7b9['DRAW_STOP'],this[_0x26e10c(0x56d)],this);}[_0x43bf95(0x2a1)](){const _0x51f7c6=_0x43bf95;this[_0x51f7c6(0x95d)]['off'](_0x14f7b9[_0x51f7c6(0x6f1)],this[_0x51f7c6(0x38e)],this),this[_0x51f7c6(0x95d)][_0x51f7c6(0x24d)](_0x14f7b9[_0x51f7c6(0x641)],this['_onAnchorMoving'],this),this['drawTool'][_0x51f7c6(0x24d)](_0x14f7b9[_0x51f7c6(0xa27)],this[_0x51f7c6(0x56d)],this);}[_0x43bf95(0x9ba)](_0x568f3c,_0x17785f){const _0x2d194d=_0x43bf95;return this[_0x2d194d(0x3f7)]=_0x568f3c[_0x2d194d(0x88c)],this[_0x2d194d(0x761)]=_0x568f3c[_0x2d194d(0x4a9)],this['_options']=_0x17785f,this[_0x2d194d(0x3f7)][_0x2d194d(0x419)][_0x2d194d(0x96a)](),this[_0x2d194d(0x3f7)][_0x2d194d(0x95d)][_0x2d194d(0x4fc)](_0x17785f),this[_0x2d194d(0x6a3)](),this[_0x2d194d(0x2a1)](),this['_bindEvent'](),this;}[_0x43bf95(0x86d)](){const _0x37b4ee=_0x43bf95;return this[_0x37b4ee(0x95d)][_0x37b4ee(0xa4f)](_0x14f7b9[_0x37b4ee(0xa27)]),this;}},_0xbc5bfb=_0x3243a1,_0x294393={'pixelSize':0xa,'outlineColor':_0x34d1e5[_0x43bf95(0x7aa)]['Color']['BLUE'],'outlineWidth':0x5},_0x4896c7=class extends _0xbc5bfb{constructor(_0x39051d){const _0x20b18d=_0x43bf95;super(),this[_0x20b18d(0x691)]=_0x34d1e5['Cesium'][_0x20b18d(0x982)][_0x20b18d(0x3d4)],this[_0x20b18d(0x9ca)]={..._0x294393,..._0x39051d};}['_mountedHook'](){const _0x44e3ba=_0x43bf95;this[_0x44e3ba(0x95d)][_0x44e3ba(0x6fe)]='单击选择点位',this[_0x44e3ba(0xaa1)]=new _0x34d1e5[(_0x44e3ba(0x7aa))][(_0x44e3ba(0x926))]({'position':new _0x34d1e5[(_0x44e3ba(0x7aa))]['CallbackProperty'](()=>this[_0x44e3ba(0x691)],!0x1),'point':{...this['_style']}}),this[_0x44e3ba(0x761)][_0x44e3ba(0x1f6)][_0x44e3ba(0x45f)](this[_0x44e3ba(0xaa1)]);}[_0x43bf95(0x222)](){const _0x24c3d6=_0x43bf95;let _0x2421a8=null;this[_0x24c3d6(0x691)]&&(_0x2421a8=new _0xa05a30(_0x5e5f93[_0x24c3d6(0x30b)](this[_0x24c3d6(0x691)]))['setStyle'](this[_0x24c3d6(0x9ca)])),this[_0x24c3d6(0x674)][_0x24c3d6(0x53e)]&&this[_0x24c3d6(0x674)][_0x24c3d6(0x53e)](_0x2421a8);}[_0x43bf95(0x38e)](_0x3a07a7){const _0x3e104a=_0x43bf95;this[_0x3e104a(0x691)]=_0x3a07a7,this[_0x3e104a(0x95d)][_0x3e104a(0xa4f)](_0x14f7b9[_0x3e104a(0xa27)],_0x3a07a7);}['_onAnchorMoving'](_0x156746){const _0x2f8394=_0x43bf95;this[_0x2f8394(0x691)]=_0x156746;}},_0x6ef9f9=_0x4896c7,_0x5d0ee3={'width':0x3,'material':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x7d2)][_0x43bf95(0x801)][_0x43bf95(0x8e4)](0.6)},_0x3384dc=class extends _0xbc5bfb{constructor(_0x176270){super(),this['_style']={..._0x5d0ee3,..._0x176270};}[_0x43bf95(0x6a3)](){const _0x4ab0ac=_0x43bf95;this[_0x4ab0ac(0x95d)][_0x4ab0ac(0x6fe)]='左击选择点位,右击结束',this[_0x4ab0ac(0xaa1)]=new _0x34d1e5[(_0x4ab0ac(0x7aa))][(_0x4ab0ac(0x926))]({'polyline':{...this['_style'],'positions':new _0x34d1e5['Cesium'][(_0x4ab0ac(0x18c))](()=>this[_0x4ab0ac(0x387)],!0x1)}}),this[_0x4ab0ac(0x761)][_0x4ab0ac(0x1f6)][_0x4ab0ac(0x45f)](this['_delegate']);}['_stoppedHook'](){const _0x546510=_0x43bf95;let _0x335ff1=null;this[_0x546510(0x387)][_0x546510(0x6a2)]&&(_0x335ff1=new _0x210775(_0x5e5f93[_0x546510(0x625)](this['_positions']))[_0x546510(0x5db)](this[_0x546510(0x9ca)])),this['_options'][_0x546510(0x53e)]&&this[_0x546510(0x674)]['onDrawStop'](_0x335ff1);}[_0x43bf95(0x38e)](_0x354c1d){const _0x2f2e8c=_0x43bf95;let _0xfec5dd=this[_0x2f2e8c(0x387)][_0x2f2e8c(0x6a2)];this[_0x2f2e8c(0x387)][_0x2f2e8c(0xb3)](_0x354c1d),this[_0x2f2e8c(0x95d)][_0x2f2e8c(0xa4f)](_0x14f7b9[_0x2f2e8c(0x45b)],{'position':_0x354c1d}),_0xfec5dd>=this[_0x2f2e8c(0x674)][_0x2f2e8c(0x612)]&&(this[_0x2f2e8c(0x387)][_0x2f2e8c(0x321)](),this[_0x2f2e8c(0x95d)][_0x2f2e8c(0xa4f)](_0x14f7b9[_0x2f2e8c(0xa27)]));}},_0x2dc2a8=_0x3384dc,_0x56a109={'material':_0x34d1e5[_0x43bf95(0x7aa)]['Color'][_0x43bf95(0x801)]['withAlpha'](0.6),'fill':!0x0},_0xd8b367=class extends _0xbc5bfb{constructor(_0x4cda20){const _0x49e798=_0x43bf95;super(),this[_0x49e798(0x9ca)]={..._0x56a109,..._0x4cda20};}[_0x43bf95(0x6a3)](){const _0x5d20ba=_0x43bf95;this['drawTool'][_0x5d20ba(0x6fe)]=_0x5d20ba(0x71c),this[_0x5d20ba(0xaa1)]=new _0x34d1e5[(_0x5d20ba(0x7aa))]['Entity']({'polygon':{...this[_0x5d20ba(0x9ca)],'hierarchy':new _0x34d1e5[(_0x5d20ba(0x7aa))][(_0x5d20ba(0x18c))](()=>this[_0x5d20ba(0x387)][_0x5d20ba(0x6a2)]>0x2?new _0x34d1e5['Cesium'][(_0x5d20ba(0x89f))](this[_0x5d20ba(0x387)]['map'](_0x49e95c=>_0x49e95c[_0x5d20ba(0x5c3)]())):null,!0x1)}}),this[_0x5d20ba(0x761)][_0x5d20ba(0x1f6)][_0x5d20ba(0x45f)](this[_0x5d20ba(0xaa1)]);}[_0x43bf95(0x222)](){const _0x51eba6=_0x43bf95;let _0x21caef=null;this[_0x51eba6(0x387)]['length']&&(_0x21caef=new _0x291d2b(_0x5e5f93[_0x51eba6(0x625)](this[_0x51eba6(0x387)]))[_0x51eba6(0x5db)](this[_0x51eba6(0x9ca)])),this[_0x51eba6(0x674)][_0x51eba6(0x53e)]&&this['_options'][_0x51eba6(0x53e)](_0x21caef);}[_0x43bf95(0x38e)](_0x523ed7){const _0x1f7358=_0x43bf95;this[_0x1f7358(0x387)][_0x1f7358(0xb3)](_0x523ed7),this[_0x1f7358(0x95d)]['fire'](_0x14f7b9[_0x1f7358(0x45b)],{'position':_0x523ed7});}},_0x8384db=_0xd8b367,_0x3e20f3={'material':_0x34d1e5[_0x43bf95(0x7aa)]['Color'][_0x43bf95(0x801)][_0x43bf95(0x8e4)](0.6),'fill':!0x0},_0x492ebd=class extends _0xbc5bfb{constructor(_0x131d49){const _0xcff951=_0x43bf95;super(),this['_maxAnchorSize']=0x2,this['_radius']=0x0,this[_0xcff951(0x9ca)]={..._0x3e20f3,..._0x131d49};}[_0x43bf95(0x6a3)](){const _0x3468e4=_0x43bf95;this[_0x3468e4(0x95d)][_0x3468e4(0x6fe)]='单击选择点位',this['_delegate']=new _0x34d1e5[(_0x3468e4(0x7aa))][(_0x3468e4(0x926))]({'polygon':{...this[_0x3468e4(0x9ca)],'hierarchy':new _0x34d1e5['Cesium'][(_0x3468e4(0x18c))](()=>{const _0x48aa99=_0x3468e4;if(this[_0x48aa99(0x387)][_0x48aa99(0x6a2)]>0x1){if(this[_0x48aa99(0x4b0)]=_0x34d1e5[_0x48aa99(0x7aa)][_0x48aa99(0x982)]['distance'](this[_0x48aa99(0x387)][0x0],this[_0x48aa99(0x387)][0x1]),this['_radius']<=0x0)return null;let _0x1aa048=_0x34d1e5['Cesium'][_0x48aa99(0x8d4)]['computeEllipsePositions']({'center':this[_0x48aa99(0x387)][0x0],'semiMajorAxis':this[_0x48aa99(0x4b0)],'semiMinorAxis':this[_0x48aa99(0x4b0)],'rotation':0x0,'granularity':0.005},!0x1,!0x0),_0x2265e3=_0x34d1e5[_0x48aa99(0x7aa)]['Cartesian3'][_0x48aa99(0x877)](_0x1aa048[_0x48aa99(0x8e1)]);return _0x2265e3['push'](_0x2265e3[0x0]),new _0x34d1e5[(_0x48aa99(0x7aa))]['PolygonHierarchy'](_0x2265e3);}else return null;},!0x1)}}),this[_0x3468e4(0x761)][_0x3468e4(0x1f6)][_0x3468e4(0x45f)](this['_delegate']);}['_stoppedHook'](){const _0x1cc3d0=_0x43bf95;let _0x4fbb93=null;this['_positions'][_0x1cc3d0(0x6a2)]&&(_0x4fbb93=new _0x2614b6(_0x5e5f93[_0x1cc3d0(0x30b)](this[_0x1cc3d0(0x387)][0x0]),this[_0x1cc3d0(0x4b0)])['setStyle'](this[_0x1cc3d0(0x9ca)])),this[_0x1cc3d0(0x674)][_0x1cc3d0(0x53e)]&&this['_options'][_0x1cc3d0(0x53e)](_0x4fbb93);}[_0x43bf95(0x38e)](_0x4f314f){const _0x5c7a11=_0x43bf95;let _0x3acada=this[_0x5c7a11(0x387)]['length'];this[_0x5c7a11(0x387)]['push'](_0x4f314f),this[_0x5c7a11(0x95d)][_0x5c7a11(0xa4f)](_0x14f7b9[_0x5c7a11(0x45b)],{'position':_0x4f314f,'isCenter':_0x3acada===0x1}),_0x3acada>=this['_maxAnchorSize']&&(this[_0x5c7a11(0x387)]['pop'](),this[_0x5c7a11(0x95d)][_0x5c7a11(0xa4f)](_0x14f7b9[_0x5c7a11(0xa27)]));}},_0x28d820=_0x492ebd,_0x2bc062={'material':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x7d2)][_0x43bf95(0x801)][_0x43bf95(0x8e4)](0.6)},_0x26ffe2=class extends _0xbc5bfb{constructor(_0x4ce0d2){const _0x5ce3e=_0x43bf95;super(),this[_0x5ce3e(0x4d7)]=0x2,this[_0x5ce3e(0x9ca)]={..._0x2bc062,..._0x4ce0d2};}[_0x43bf95(0x6a3)](){const _0xa99957=_0x43bf95;this[_0xa99957(0x95d)]['tooltipMess']='左击选择点位',this['_delegate']=new _0x34d1e5['Cesium']['Entity']({'rectangle':{...this['_style'],'coordinates':new _0x34d1e5['Cesium'][(_0xa99957(0x18c))](_0x20a50c=>this[_0xa99957(0x387)]['length']>0x1?_0x34d1e5[_0xa99957(0x7aa)][_0xa99957(0x6e7)][_0xa99957(0x77d)](this[_0xa99957(0x387)]):null,!0x1)}}),this['_layer']['entities'][_0xa99957(0x45f)](this[_0xa99957(0xaa1)]);}[_0x43bf95(0x222)](){const _0x177470=_0x43bf95;let _0x22d593=null;this[_0x177470(0x387)]['length']&&(_0x22d593=new _0x3415b7(_0x5e5f93[_0x177470(0x625)](this[_0x177470(0x387)]))['setStyle'](this[_0x177470(0x9ca)])),this[_0x177470(0x674)][_0x177470(0x53e)]&&this[_0x177470(0x674)][_0x177470(0x53e)](_0x22d593);}[_0x43bf95(0x38e)](_0x3a04d9){const _0x247f8a=_0x43bf95;let _0x18ae47=this[_0x247f8a(0x387)][_0x247f8a(0x6a2)];this['_positions']['push'](_0x3a04d9),this[_0x247f8a(0x95d)][_0x247f8a(0xa4f)](_0x14f7b9['CREATE_ANCHOR'],{'position':_0x3a04d9}),_0x18ae47>=this[_0x247f8a(0x4d7)]&&(this[_0x247f8a(0x387)][_0x247f8a(0x321)](),this[_0x247f8a(0x95d)][_0x247f8a(0xa4f)](_0x14f7b9[_0x247f8a(0xa27)]));}},_0xf6eeea=_0x26ffe2,_0x560c09=class extends _0xbc5bfb{constructor(_0x1839b0){const _0x5c85c4=_0x43bf95;super(),this['_position']=_0x34d1e5[_0x5c85c4(0x7aa)][_0x5c85c4(0x982)][_0x5c85c4(0x3d4)],this['_style']={'image':_0x46791e,..._0x1839b0};}[_0x43bf95(0x6a3)](){const _0x182ff7=_0x43bf95;this['drawTool'][_0x182ff7(0x6fe)]=_0x182ff7(0x898),this[_0x182ff7(0xaa1)]=new _0x34d1e5[(_0x182ff7(0x7aa))]['Entity']({'position':new _0x34d1e5['Cesium']['CallbackProperty'](()=>this[_0x182ff7(0x691)],!0x1),'billboard':{...this['_style']}}),this[_0x182ff7(0x761)]['entities'][_0x182ff7(0x45f)](this[_0x182ff7(0xaa1)]);}[_0x43bf95(0x222)](){const _0x651f5a=_0x43bf95;let _0x54ba8c=null;this[_0x651f5a(0x691)]&&(_0x54ba8c=new _0x25d4a3(_0x5e5f93[_0x651f5a(0x30b)](this[_0x651f5a(0x691)]),this[_0x651f5a(0x9ca)]['image'])['setStyle'](this[_0x651f5a(0x9ca)])),this[_0x651f5a(0x674)][_0x651f5a(0x53e)]&&this[_0x651f5a(0x674)][_0x651f5a(0x53e)](_0x54ba8c);}[_0x43bf95(0x38e)](_0x4a827a){const _0x51fe42=_0x43bf95;this[_0x51fe42(0x691)]=_0x4a827a,this[_0x51fe42(0x95d)]['fire'](_0x14f7b9[_0x51fe42(0xa27)]);}[_0x43bf95(0x4c5)](_0x5be8e0){const _0xf70ace=_0x43bf95;this[_0xf70ace(0x691)]=_0x5be8e0;}},_0x594f5d=_0x560c09,_0x4b6e4c=Math['PI']/0x2,_0x273294=class{constructor(_0x3e4a5b){const _0x39d5d0=_0x43bf95;this['_positions']=(_0x3e4a5b==null?void 0x0:_0x3e4a5b[_0x39d5d0(0x752)])||[],this[_0x39d5d0(0x1c9)]=0.18,this[_0x39d5d0(0x608)]=0.3,this['neckHeightFactor']=0.85,this[_0x39d5d0(0x972)]=0.15,this[_0x39d5d0(0x416)]=0.8;}set['positions'](_0x5461c2){this['_positions']=_0x5461c2;}get[_0x43bf95(0x752)](){const _0x2a1267=_0x43bf95;return this[_0x2a1267(0x387)];}get[_0x43bf95(0x245)](){const _0x4d085a=_0x43bf95;return this[_0x4d085a(0x745)]();}[_0x43bf95(0x5ab)](_0x212725,_0x3d6734,_0x1ef641){const _0x1cd010=_0x43bf95;let _0x56e84e=_0x6f549e[_0x1cd010(0x846)](_0x212725),_0x419ca8=_0x56e84e*this[_0x1cd010(0x1c9)],_0x2323eb=_0x212725[_0x212725[_0x1cd010(0x6a2)]-0x1];_0x56e84e=_0x6f549e[_0x1cd010(0x7f4)](_0x2323eb,_0x212725[_0x212725[_0x1cd010(0x6a2)]-0x2]);let _0x4f9d61=_0x6f549e[_0x1cd010(0x7f4)](_0x3d6734,_0x1ef641);_0x419ca8>_0x4f9d61*this['headTailFactor']&&(_0x419ca8=_0x4f9d61*this[_0x1cd010(0x416)]);let _0x378f32=_0x419ca8*this[_0x1cd010(0x608)],_0x55e7b8=_0x419ca8*this[_0x1cd010(0x972)];_0x419ca8=_0x419ca8>_0x56e84e?_0x56e84e:_0x419ca8;let _0x58aba1=_0x419ca8*this[_0x1cd010(0x973)],_0x27568c=_0x6f549e[_0x1cd010(0x393)](_0x212725[_0x212725[_0x1cd010(0x6a2)]-0x2],_0x2323eb,0x0,_0x419ca8,!0x0),_0x576261=_0x6f549e['getThirdPoint'](_0x212725[_0x212725[_0x1cd010(0x6a2)]-0x2],_0x2323eb,0x0,_0x58aba1,!0x0),_0x57683c=_0x6f549e[_0x1cd010(0x393)](_0x2323eb,_0x27568c,_0x4b6e4c,_0x378f32,!0x1),_0x2df7b4=_0x6f549e[_0x1cd010(0x393)](_0x2323eb,_0x27568c,_0x4b6e4c,_0x378f32,!0x0),_0x5c99b3=_0x6f549e['getThirdPoint'](_0x2323eb,_0x576261,_0x4b6e4c,_0x55e7b8,!0x1),_0x3d8124=_0x6f549e['getThirdPoint'](_0x2323eb,_0x576261,_0x4b6e4c,_0x55e7b8,!0x0);return[_0x5c99b3,_0x57683c,_0x2323eb,_0x2df7b4,_0x3d8124];}[_0x43bf95(0x26b)](_0x102cbf,_0x2c99a4,_0x3579c5,_0x15867a){const _0x1d83dd=_0x43bf95;let _0x57c991=_0x6f549e[_0x1d83dd(0x9c3)](_0x102cbf),_0x1346ed=_0x6f549e[_0x1d83dd(0x846)](_0x102cbf)*_0x15867a,_0x1bf2a5=_0x6f549e['distance'](_0x2c99a4,_0x3579c5),_0x41cff9=(_0x1346ed-_0x1bf2a5)/0x2,_0x22c25b=0x0,_0x5722f1=[],_0x168500=[];for(let _0x5d1b48=0x1;_0x5d1b48<_0x102cbf[_0x1d83dd(0x6a2)]-0x1;_0x5d1b48++){let _0x5f59bb=_0x6f549e[_0x1d83dd(0x1a8)](_0x102cbf[_0x5d1b48-0x1],_0x102cbf[_0x5d1b48],_0x102cbf[_0x5d1b48+0x1])/0x2;_0x22c25b+=_0x6f549e[_0x1d83dd(0x7f4)](_0x102cbf[_0x5d1b48-0x1],_0x102cbf[_0x5d1b48]);let _0x14c2a4=(_0x1346ed/0x2-_0x22c25b/_0x57c991*_0x41cff9)/Math[_0x1d83dd(0xb8)](_0x5f59bb),_0x303053=_0x6f549e[_0x1d83dd(0x393)](_0x102cbf[_0x5d1b48-0x1],_0x102cbf[_0x5d1b48],Math['PI']-_0x5f59bb,_0x14c2a4,!0x0),_0x57d1e1=_0x6f549e['getThirdPoint'](_0x102cbf[_0x5d1b48-0x1],_0x102cbf[_0x5d1b48],_0x5f59bb,_0x14c2a4,!0x1);_0x5722f1[_0x1d83dd(0xb3)](_0x303053),_0x168500[_0x1d83dd(0xb3)](_0x57d1e1);}return _0x5722f1[_0x1d83dd(0x64c)](_0x168500);}[_0x43bf95(0x745)](){const _0x2ada0d=_0x43bf95;let _0x5aeb42=_0x16f48b[_0x2ada0d(0x66d)](_0x5e5f93['transformCartesianArrayToWGS84Array'](this[_0x2ada0d(0x387)]))[0x0],_0x287c54=_0x5aeb42[0x0],_0x2ddcac=_0x5aeb42[0x1];_0x6f549e[_0x2ada0d(0x762)](_0x5aeb42[0x0],_0x5aeb42[0x1],_0x5aeb42[0x2])&&(_0x287c54=_0x5aeb42[0x1],_0x2ddcac=_0x5aeb42[0x0]);let _0x3b0129=[_0x6f549e['mid'](_0x287c54,_0x2ddcac)]['concat'](_0x5aeb42[_0x2ada0d(0x724)](0x2)),_0x1a615e=this[_0x2ada0d(0x5ab)](_0x3b0129,_0x287c54,_0x2ddcac),_0x444d4b=_0x1a615e[0x0],_0x467780=_0x1a615e[0x4],_0x525278=_0x6f549e[_0x2ada0d(0x7f4)](_0x287c54,_0x2ddcac)/_0x6f549e[_0x2ada0d(0x846)](_0x3b0129),_0x1a20f9=this[_0x2ada0d(0x26b)](_0x3b0129,_0x444d4b,_0x467780,_0x525278),_0x4d1ef5=_0x1a20f9[_0x2ada0d(0x6a2)],_0x59a902=[_0x287c54][_0x2ada0d(0x64c)](_0x1a20f9[_0x2ada0d(0x724)](0x0,_0x4d1ef5/0x2));_0x59a902[_0x2ada0d(0xb3)](_0x444d4b);let _0x4e477a=[_0x2ddcac]['concat'](_0x1a20f9[_0x2ada0d(0x724)](_0x4d1ef5/0x2,_0x4d1ef5));return _0x4e477a['push'](_0x467780),_0x59a902=_0x6f549e[_0x2ada0d(0x780)](_0x59a902),_0x4e477a=_0x6f549e[_0x2ada0d(0x780)](_0x4e477a),new _0x34d1e5[(_0x2ada0d(0x7aa))][(_0x2ada0d(0x89f))](_0x5e5f93[_0x2ada0d(0x999)](_0x16f48b[_0x2ada0d(0xa8b)](_0x59a902[_0x2ada0d(0x64c)](_0x1a615e,_0x4e477a[_0x2ada0d(0xd9)]()))));}},_0x561a92=_0x273294,_0x3fa258={'material':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x7d2)]['YELLOW'][_0x43bf95(0x8e4)](0.6),'fill':!0x0},_0x2b55f9=class extends _0xbc5bfb{constructor(_0x556da4){const _0x14f240=_0x43bf95;super(),this[_0x14f240(0x4d7)]=0x3,this['_style']={..._0x3fa258,..._0x556da4},this[_0x14f240(0x515)]=new _0x561a92();}[_0x43bf95(0x6a3)](){const _0x1c7338=_0x43bf95;this[_0x1c7338(0x95d)]['tooltipMess']=_0x1c7338(0x898),this[_0x1c7338(0xaa1)]=new _0x34d1e5['Cesium'][(_0x1c7338(0x926))]({'polygon':{...this[_0x1c7338(0x9ca)],'hierarchy':new _0x34d1e5[(_0x1c7338(0x7aa))][(_0x1c7338(0x18c))](()=>this['_positions'][_0x1c7338(0x6a2)]>0x2?(this['_graphics'][_0x1c7338(0x752)]=this[_0x1c7338(0x387)],this[_0x1c7338(0x515)]['hierarchy']):null,!0x1)}}),this[_0x1c7338(0x761)][_0x1c7338(0x1f6)][_0x1c7338(0x45f)](this[_0x1c7338(0xaa1)]);}[_0x43bf95(0x222)](){const _0x3dcd90=_0x43bf95;let _0x15159c=null;this['_positions'][_0x3dcd90(0x6a2)]&&(_0x15159c=new _0x22d820(_0x5e5f93['transformCartesianArrayToWGS84Array'](this[_0x3dcd90(0x387)]))[_0x3dcd90(0x5db)](this[_0x3dcd90(0x9ca)])),this[_0x3dcd90(0x674)][_0x3dcd90(0x53e)]&&this[_0x3dcd90(0x674)]['onDrawStop'](_0x15159c);}[_0x43bf95(0x38e)](_0x516f2b){const _0x10ad0a=_0x43bf95;let _0x10d264=this[_0x10ad0a(0x387)][_0x10ad0a(0x6a2)];this['_positions'][_0x10ad0a(0xb3)](_0x516f2b),this['drawTool']['fire'](_0x14f7b9[_0x10ad0a(0x45b)],{'position':_0x516f2b}),this[_0x10ad0a(0x515)][_0x10ad0a(0x752)]=this[_0x10ad0a(0x387)],_0x10d264>=this[_0x10ad0a(0x4d7)]&&(this[_0x10ad0a(0x387)]['pop'](),this[_0x10ad0a(0x95d)][_0x10ad0a(0xa4f)](_0x14f7b9[_0x10ad0a(0xa27)]));}},_0x59e858=_0x2b55f9,_0x21e813=Math['PI']/0x2,_0x3b08e4=class{constructor(_0x16e3d3){const _0x2002ec=_0x43bf95;this[_0x2002ec(0x387)]=(_0x16e3d3==null?void 0x0:_0x16e3d3[_0x2002ec(0x752)])||[],this[_0x2002ec(0x1c9)]=0.25,this[_0x2002ec(0x608)]=0.3,this['neckHeightFactor']=0.85,this['neckWidthFactor']=0.15;}set['positions'](_0x2ab845){this['_positions']=_0x2ab845;}get[_0x43bf95(0x752)](){const _0x402b5b=_0x43bf95;return this[_0x402b5b(0x387)];}get[_0x43bf95(0x245)](){const _0x4dd7d3=_0x43bf95;return this[_0x4dd7d3(0x745)]();}['_getArrowPoints'](_0x20cd41,_0x53ab85,_0x160cfc,_0x5af76e){const _0x549096=_0x43bf95;let _0x2efa10=_0x6f549e[_0x549096(0x8bf)](_0x20cd41,_0x53ab85),_0x24f153=_0x6f549e[_0x549096(0x7f4)](_0x2efa10,_0x160cfc),_0x2229a=_0x6f549e[_0x549096(0x393)](_0x160cfc,_0x2efa10,0x0,_0x24f153*0.3,!0x0),_0x53e168=_0x6f549e[_0x549096(0x393)](_0x160cfc,_0x2efa10,0x0,_0x24f153*0.5,!0x0);_0x2229a=_0x6f549e['getThirdPoint'](_0x2efa10,_0x2229a,_0x21e813,_0x24f153/0x5,_0x5af76e),_0x53e168=_0x6f549e['getThirdPoint'](_0x2efa10,_0x53e168,_0x21e813,_0x24f153/0x4,_0x5af76e);let _0x427777=[_0x2efa10,_0x2229a,_0x53e168,_0x160cfc],_0x48e856=this[_0x549096(0x5ab)](_0x427777),_0x3839f5=_0x48e856[0x0],_0x24d8fa=_0x48e856[0x4],_0x2acac2=_0x6f549e[_0x549096(0x7f4)](_0x20cd41,_0x53ab85)/_0x6f549e[_0x549096(0x846)](_0x427777)/0x2,_0x55c595=this['_getArrowBodyPoints'](_0x427777,_0x3839f5,_0x24d8fa,_0x2acac2),_0x4b0b41=_0x55c595['length'],_0x5e835d=_0x55c595['slice'](0x0,_0x4b0b41/0x2),_0x440c56=_0x55c595[_0x549096(0x724)](_0x4b0b41/0x2,_0x4b0b41);return _0x5e835d['push'](_0x3839f5),_0x440c56[_0x549096(0xb3)](_0x24d8fa),_0x5e835d=_0x5e835d['reverse'](),_0x5e835d[_0x549096(0xb3)](_0x53ab85),_0x440c56=_0x440c56['reverse'](),_0x440c56[_0x549096(0xb3)](_0x20cd41),_0x5e835d[_0x549096(0xd9)]()['concat'](_0x48e856,_0x440c56);}[_0x43bf95(0x5ab)](_0x66f24){const _0x3be3e1=_0x43bf95;let _0x18e5f4=_0x6f549e[_0x3be3e1(0x846)](_0x66f24)*this[_0x3be3e1(0x1c9)],_0x349bd4=_0x66f24[_0x66f24[_0x3be3e1(0x6a2)]-0x1],_0x202733=_0x18e5f4*this[_0x3be3e1(0x608)],_0x4724ad=_0x18e5f4*this[_0x3be3e1(0x972)],_0x48f339=_0x18e5f4*this[_0x3be3e1(0x973)],_0x22b9f4=_0x6f549e[_0x3be3e1(0x393)](_0x66f24[_0x66f24[_0x3be3e1(0x6a2)]-0x2],_0x349bd4,0x0,_0x18e5f4,!0x0),_0x381b69=_0x6f549e['getThirdPoint'](_0x66f24[_0x66f24[_0x3be3e1(0x6a2)]-0x2],_0x349bd4,0x0,_0x48f339,!0x0),_0x4a96b8=_0x6f549e[_0x3be3e1(0x393)](_0x349bd4,_0x22b9f4,_0x21e813,_0x202733,!0x1),_0x4d11a2=_0x6f549e[_0x3be3e1(0x393)](_0x349bd4,_0x22b9f4,_0x21e813,_0x202733,!0x0),_0x3b8bb7=_0x6f549e['getThirdPoint'](_0x349bd4,_0x381b69,_0x21e813,_0x4724ad,!0x1),_0x4f6fb0=_0x6f549e[_0x3be3e1(0x393)](_0x349bd4,_0x381b69,_0x21e813,_0x4724ad,!0x0);return[_0x3b8bb7,_0x4a96b8,_0x349bd4,_0x4d11a2,_0x4f6fb0];}[_0x43bf95(0x26b)](_0x1362e9,_0x5e204b,_0x347d92,_0x573716){const _0x5337df=_0x43bf95;let _0x413eec=_0x6f549e[_0x5337df(0x9c3)](_0x1362e9),_0x4191cd=_0x6f549e[_0x5337df(0x846)](_0x1362e9)*_0x573716,_0x197bef=_0x6f549e[_0x5337df(0x7f4)](_0x5e204b,_0x347d92),_0x50e59b=(_0x4191cd-_0x197bef)/0x2,_0x1879ff=0x0,_0x34c229=[],_0x438225=[];for(let _0xfd2eb=0x1;_0xfd2eb<_0x1362e9[_0x5337df(0x6a2)]-0x1;_0xfd2eb++){let _0x5aadce=_0x6f549e[_0x5337df(0x1a8)](_0x1362e9[_0xfd2eb-0x1],_0x1362e9[_0xfd2eb],_0x1362e9[_0xfd2eb+0x1])/0x2;_0x1879ff+=_0x6f549e[_0x5337df(0x7f4)](_0x1362e9[_0xfd2eb-0x1],_0x1362e9[_0xfd2eb]);let _0x45a73e=(_0x4191cd/0x2-_0x1879ff/_0x413eec*_0x50e59b)/Math[_0x5337df(0xb8)](_0x5aadce),_0x21a761=_0x6f549e['getThirdPoint'](_0x1362e9[_0xfd2eb-0x1],_0x1362e9[_0xfd2eb],Math['PI']-_0x5aadce,_0x45a73e,!0x0),_0x184f7e=_0x6f549e[_0x5337df(0x393)](_0x1362e9[_0xfd2eb-0x1],_0x1362e9[_0xfd2eb],_0x5aadce,_0x45a73e,!0x1);_0x34c229[_0x5337df(0xb3)](_0x21a761),_0x438225[_0x5337df(0xb3)](_0x184f7e);}return _0x34c229[_0x5337df(0x64c)](_0x438225);}['_getTempPoint4'](_0x316efc,_0x4fcaec,_0x2ba6ac){const _0x23abab=_0x43bf95;let _0x2f292b=_0x6f549e[_0x23abab(0x8bf)](_0x316efc,_0x4fcaec),_0x1122c9=_0x6f549e[_0x23abab(0x7f4)](_0x2f292b,_0x2ba6ac),_0x323970=_0x6f549e['getAngleOfThreePoints'](_0x316efc,_0x2f292b,_0x2ba6ac),_0x19a319,_0x3575c1,_0x338cb2,_0x3ce1dc;return _0x323970<_0x21e813?(_0x3575c1=_0x1122c9*Math[_0x23abab(0xb8)](_0x323970),_0x338cb2=_0x1122c9*Math[_0x23abab(0x728)](_0x323970),_0x3ce1dc=_0x6f549e['getThirdPoint'](_0x316efc,_0x2f292b,_0x21e813,_0x3575c1,!0x1),_0x19a319=_0x6f549e[_0x23abab(0x393)](_0x2f292b,_0x3ce1dc,_0x21e813,_0x338cb2,!0x0)):_0x323970>=_0x21e813&&_0x323970<Math['PI']?(_0x3575c1=_0x1122c9*Math['sin'](Math['PI']-_0x323970),_0x338cb2=_0x1122c9*Math[_0x23abab(0x728)](Math['PI']-_0x323970),_0x3ce1dc=_0x6f549e[_0x23abab(0x393)](_0x316efc,_0x2f292b,_0x21e813,_0x3575c1,!0x1),_0x19a319=_0x6f549e['getThirdPoint'](_0x2f292b,_0x3ce1dc,_0x21e813,_0x338cb2,!0x1)):_0x323970>=Math['PI']&&_0x323970<Math['PI']*1.5?(_0x3575c1=_0x1122c9*Math[_0x23abab(0xb8)](_0x323970-Math['PI']),_0x338cb2=_0x1122c9*Math[_0x23abab(0x728)](_0x323970-Math['PI']),_0x3ce1dc=_0x6f549e[_0x23abab(0x393)](_0x316efc,_0x2f292b,_0x21e813,_0x3575c1,!0x0),_0x19a319=_0x6f549e[_0x23abab(0x393)](_0x2f292b,_0x3ce1dc,_0x21e813,_0x338cb2,!0x0)):(_0x3575c1=_0x1122c9*Math[_0x23abab(0xb8)](Math['PI']*0x2-_0x323970),_0x338cb2=_0x1122c9*Math[_0x23abab(0x728)](Math['PI']*0x2-_0x323970),_0x3ce1dc=_0x6f549e[_0x23abab(0x393)](_0x316efc,_0x2f292b,_0x21e813,_0x3575c1,!0x0),_0x19a319=_0x6f549e['getThirdPoint'](_0x2f292b,_0x3ce1dc,_0x21e813,_0x338cb2,!0x1)),_0x19a319;}['_createHierarchy'](){const _0x1b246e=_0x43bf95;let _0x4a6610=this[_0x1b246e(0x387)][_0x1b246e(0x6a2)],_0x11cf40,_0x42fd94,_0x50fd0e=_0x16f48b[_0x1b246e(0x66d)](_0x5e5f93['transformCartesianArrayToWGS84Array'](this['_positions']))[0x0],_0x37c7f4=_0x50fd0e[0x0],_0xa44b7c=_0x50fd0e[0x1],_0x404ec3=_0x50fd0e[0x2];_0x4a6610===0x3?_0x11cf40=this[_0x1b246e(0x717)](_0x37c7f4,_0xa44b7c,_0x404ec3):_0x11cf40=_0x50fd0e[0x3],_0x4a6610===0x3||_0x4a6610===0x4?_0x42fd94=_0x6f549e[_0x1b246e(0x8bf)](_0x37c7f4,_0xa44b7c):_0x42fd94=_0x50fd0e[0x4];let _0x201d09,_0x542834;_0x6f549e['isClockWise'](_0x37c7f4,_0xa44b7c,_0x404ec3)?(_0x201d09=this['_getArrowPoints'](_0x37c7f4,_0x42fd94,_0x11cf40,!0x1),_0x542834=this[_0x1b246e(0x78d)](_0x42fd94,_0xa44b7c,_0x404ec3,!0x0)):(_0x201d09=this[_0x1b246e(0x78d)](_0xa44b7c,_0x42fd94,_0x404ec3,!0x1),_0x542834=this['_getArrowPoints'](_0x42fd94,_0x37c7f4,_0x11cf40,!0x0));let _0x3439ec=_0x201d09[_0x1b246e(0x6a2)],_0x5020c6=(_0x3439ec-0x5)/0x2,_0x556a5b=_0x201d09[_0x1b246e(0x724)](0x0,_0x5020c6),_0x16b981=_0x201d09[_0x1b246e(0x724)](_0x5020c6,_0x5020c6+0x5),_0x2db3e9=_0x201d09[_0x1b246e(0x724)](_0x5020c6+0x5,_0x3439ec),_0x799c12=_0x542834['slice'](0x0,_0x5020c6),_0x5de579=_0x542834[_0x1b246e(0x724)](_0x5020c6,_0x5020c6+0x5),_0x56b995=_0x542834[_0x1b246e(0x724)](_0x5020c6+0x5,_0x3439ec);_0x799c12=_0x6f549e[_0x1b246e(0x5dc)](_0x799c12);let _0x1576c4=_0x6f549e[_0x1b246e(0x5dc)](_0x56b995['concat'](_0x556a5b[_0x1b246e(0x724)](0x1)));return _0x2db3e9=_0x6f549e[_0x1b246e(0x5dc)](_0x2db3e9),new _0x34d1e5[(_0x1b246e(0x7aa))]['PolygonHierarchy'](_0x5e5f93[_0x1b246e(0x999)](_0x16f48b['parsePositions'](_0x799c12['concat'](_0x5de579,_0x1576c4,_0x16b981,_0x2db3e9))));}},_0x5384b9=_0x3b08e4,_0x175c3a={'material':_0x34d1e5[_0x43bf95(0x7aa)]['Color'][_0x43bf95(0x801)]['withAlpha'](0.6),'fill':!0x0},_0x206c49=class extends _0xbc5bfb{constructor(_0x3dd784){const _0xd3c435=_0x43bf95;super(),this[_0xd3c435(0x4d7)]=0x4,this[_0xd3c435(0x9ca)]={..._0x175c3a,..._0x3dd784},this[_0xd3c435(0x515)]=new _0x5384b9();}['_mountedHook'](){const _0x1b4d62=_0x43bf95;this['drawTool'][_0x1b4d62(0x6fe)]=_0x1b4d62(0x898),this[_0x1b4d62(0xaa1)]=new _0x34d1e5[(_0x1b4d62(0x7aa))]['Entity']({'polygon':{...this[_0x1b4d62(0x9ca)],'hierarchy':new _0x34d1e5[(_0x1b4d62(0x7aa))][(_0x1b4d62(0x18c))](()=>this[_0x1b4d62(0x387)][_0x1b4d62(0x6a2)]>0x2?(this['_graphics']['positions']=this[_0x1b4d62(0x387)],this[_0x1b4d62(0x515)]['hierarchy']):null,!0x1)}}),this['_layer'][_0x1b4d62(0x1f6)][_0x1b4d62(0x45f)](this[_0x1b4d62(0xaa1)]);}[_0x43bf95(0x222)](){const _0x1a4ee4=_0x43bf95;let _0x38abef=null;this[_0x1a4ee4(0x387)][_0x1a4ee4(0x6a2)]&&(_0x38abef=new _0xa72d62(_0x5e5f93[_0x1a4ee4(0x625)](this['_positions']))[_0x1a4ee4(0x5db)](this[_0x1a4ee4(0x9ca)])),this[_0x1a4ee4(0x674)][_0x1a4ee4(0x53e)]&&this[_0x1a4ee4(0x674)]['onDrawStop'](_0x38abef);}[_0x43bf95(0x38e)](_0x4e153f){const _0x265a21=_0x43bf95;let _0x401795=this[_0x265a21(0x387)][_0x265a21(0x6a2)];this[_0x265a21(0x387)][_0x265a21(0xb3)](_0x4e153f),this[_0x265a21(0x95d)][_0x265a21(0xa4f)](_0x14f7b9[_0x265a21(0x45b)],{'position':_0x4e153f}),this['_graphics'][_0x265a21(0x752)]=this[_0x265a21(0x387)],_0x401795>=this[_0x265a21(0x4d7)]&&(this['_positions'][_0x265a21(0x321)](),this[_0x265a21(0x95d)][_0x265a21(0xa4f)](_0x14f7b9[_0x265a21(0xa27)]));}},_0x22bb1c=_0x206c49,_0x3cf4f9=Math['PI']/0x2,_0x13ac7a=class{constructor(_0x44587d){const _0x3434dc=_0x43bf95;this[_0x3434dc(0x387)]=(_0x44587d==null?void 0x0:_0x44587d[_0x3434dc(0x752)])||[],this[_0x3434dc(0x987)]=0.15,this[_0x3434dc(0x972)]=0.2,this[_0x3434dc(0x608)]=0.25,this[_0x3434dc(0x895)]=Math['PI']/8.5,this[_0x3434dc(0x3c9)]=Math['PI']/0xd;}set[_0x43bf95(0x752)](_0x4ca2e9){const _0x4c151e=_0x43bf95;this[_0x4c151e(0x387)]=_0x4ca2e9;}get[_0x43bf95(0x752)](){const _0x4712ae=_0x43bf95;return this[_0x4712ae(0x387)];}get['hierarchy'](){const _0xd5d25=_0x43bf95;return this[_0xd5d25(0x745)]();}[_0x43bf95(0x745)](){const _0x1a3ae7=_0x43bf95;let _0xb0abf8=_0x16f48b[_0x1a3ae7(0x66d)](_0x5e5f93[_0x1a3ae7(0x625)](this['_positions']))[0x0],_0x37acb6=_0xb0abf8[0x0],_0x1d8d6f=_0xb0abf8[0x1],_0x33ec4b=_0x6f549e[_0x1a3ae7(0x846)](_0xb0abf8),_0x79074d=_0x33ec4b*this[_0x1a3ae7(0x987)],_0x1c4f1b=_0x33ec4b*this[_0x1a3ae7(0x972)],_0x2ff92a=_0x33ec4b*this[_0x1a3ae7(0x608)],_0x5baf88=_0x6f549e[_0x1a3ae7(0x393)](_0x1d8d6f,_0x37acb6,_0x3cf4f9,_0x79074d,!0x0),_0x3fb4c2=_0x6f549e[_0x1a3ae7(0x393)](_0x1d8d6f,_0x37acb6,_0x3cf4f9,_0x79074d,!0x1),_0x30fcbd=_0x6f549e[_0x1a3ae7(0x393)](_0x37acb6,_0x1d8d6f,this[_0x1a3ae7(0x895)],_0x2ff92a,!0x1),_0x230fc6=_0x6f549e[_0x1a3ae7(0x393)](_0x37acb6,_0x1d8d6f,this[_0x1a3ae7(0x895)],_0x2ff92a,!0x0),_0x2aedf6=_0x6f549e[_0x1a3ae7(0x393)](_0x37acb6,_0x1d8d6f,this['neckAngle'],_0x1c4f1b,!0x1),_0x94850c=_0x6f549e['getThirdPoint'](_0x37acb6,_0x1d8d6f,this[_0x1a3ae7(0x3c9)],_0x1c4f1b,!0x0);return new _0x34d1e5['Cesium'][(_0x1a3ae7(0x89f))](_0x5e5f93['transformWGS84ArrayToCartesianArray'](_0x16f48b[_0x1a3ae7(0xa8b)]([_0x5baf88,_0x2aedf6,_0x30fcbd,_0x1d8d6f,_0x230fc6,_0x94850c,_0x3fb4c2])));}},_0x4fbfff=_0x13ac7a,_0x2259d3={'material':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x7d2)]['YELLOW'][_0x43bf95(0x8e4)](0.6),'fill':!0x0},_0x1670d5=class extends _0xbc5bfb{constructor(_0x3ebda6){const _0x2a1236=_0x43bf95;super(),this[_0x2a1236(0x4d7)]=0x2,this[_0x2a1236(0x9ca)]={..._0x2259d3,..._0x3ebda6},this[_0x2a1236(0x515)]=new _0x4fbfff();}[_0x43bf95(0x6a3)](){const _0x29612a=_0x43bf95;this[_0x29612a(0x95d)][_0x29612a(0x6fe)]=_0x29612a(0x898),this['_delegate']=new _0x34d1e5[(_0x29612a(0x7aa))][(_0x29612a(0x926))]({'polygon':{...this[_0x29612a(0x9ca)],'hierarchy':new _0x34d1e5[(_0x29612a(0x7aa))][(_0x29612a(0x18c))](()=>this[_0x29612a(0x387)]['length']>0x1?(this[_0x29612a(0x515)]['positions']=this[_0x29612a(0x387)],this[_0x29612a(0x515)]['hierarchy']):null,!0x1)}}),this[_0x29612a(0x761)][_0x29612a(0x1f6)][_0x29612a(0x45f)](this[_0x29612a(0xaa1)]);}[_0x43bf95(0x222)](){const _0x526352=_0x43bf95;let _0x1ae996=null;this[_0x526352(0x387)][_0x526352(0x6a2)]&&(_0x1ae996=new _0x3d1b87(_0x5e5f93[_0x526352(0x625)](this[_0x526352(0x387)]))[_0x526352(0x5db)](this[_0x526352(0x9ca)])),this[_0x526352(0x674)][_0x526352(0x53e)]&&this['_options'][_0x526352(0x53e)](_0x1ae996);}['_onDrawAnchor'](_0x55e961){const _0x814e6c=_0x43bf95;let _0x33b221=this[_0x814e6c(0x387)][_0x814e6c(0x6a2)];this[_0x814e6c(0x387)][_0x814e6c(0xb3)](_0x55e961),this['drawTool'][_0x814e6c(0xa4f)](_0x14f7b9[_0x814e6c(0x45b)],{'position':_0x55e961}),this[_0x814e6c(0x515)]['positions']=this[_0x814e6c(0x387)],_0x33b221>=this[_0x814e6c(0x4d7)]&&(this['_positions'][_0x814e6c(0x321)](),this['drawTool'][_0x814e6c(0xa4f)](_0x14f7b9['DRAW_STOP']));}},_0xca5d8a=_0x1670d5,_0x227935=Math['PI']/0x2,_0x53b8a0=0x64,_0x4fb154=class{constructor(_0x4b20b7){const _0x177815=_0x43bf95;this[_0x177815(0x387)]=(_0x4b20b7==null?void 0x0:_0x4b20b7[_0x177815(0x752)])||[],this['t']=0.4;}set['positions'](_0x1a0c45){const _0x577f2b=_0x43bf95;this[_0x577f2b(0x387)]=_0x1a0c45;}get[_0x43bf95(0x752)](){const _0x3c5912=_0x43bf95;return this[_0x3c5912(0x387)];}get['hierarchy'](){const _0x838516=_0x43bf95;return this[_0x838516(0x745)]();}[_0x43bf95(0x745)](){const _0x6eb55a=_0x43bf95;let _0x31bc5b=_0x16f48b[_0x6eb55a(0x66d)](_0x5e5f93[_0x6eb55a(0x625)](this[_0x6eb55a(0x387)]))[0x0];if(this[_0x6eb55a(0x387)][_0x6eb55a(0x6a2)]===0x2){let _0xbcfdd8=_0x6f549e['mid'](_0x31bc5b[0x0],_0x31bc5b[0x1]),_0x3fa81d=_0x6f549e[_0x6eb55a(0x7f4)](_0x31bc5b[0x0],_0xbcfdd8)/0.9,_0x33cfbb=_0x6f549e[_0x6eb55a(0x393)](_0x31bc5b[0x0],_0xbcfdd8,_0x227935,_0x3fa81d,!0x0);_0x31bc5b=[_0x31bc5b[0x0],_0x33cfbb,_0x31bc5b[0x1]];}let _0x3941be=_0x6f549e[_0x6eb55a(0x8bf)](_0x31bc5b[0x0],_0x31bc5b[0x2]);_0x31bc5b[_0x6eb55a(0xb3)](_0x3941be,_0x31bc5b[0x0],_0x31bc5b[0x1]);let _0x27e5a0=[];for(let _0x215acf=0x0;_0x215acf<_0x31bc5b[_0x6eb55a(0x6a2)]-0x2;_0x215acf++){let _0x797ec4=_0x31bc5b[_0x215acf],_0x46d2f9=_0x31bc5b[_0x215acf+0x1],_0x39dee7=_0x31bc5b[_0x215acf+0x2],_0x59935d=_0x6f549e[_0x6eb55a(0x2f4)](this['t'],_0x797ec4,_0x46d2f9,_0x39dee7);_0x27e5a0=_0x27e5a0[_0x6eb55a(0x64c)](_0x59935d);}let _0x1e0096=_0x27e5a0['length'];_0x27e5a0=[_0x27e5a0[_0x1e0096-0x1]][_0x6eb55a(0x64c)](_0x27e5a0['slice'](0x0,_0x1e0096-0x1));let _0x353bfb=[];for(let _0x6da861=0x0;_0x6da861<_0x31bc5b['length']-0x2;_0x6da861++){let _0x2be2e1=_0x31bc5b[_0x6da861],_0x166929=_0x31bc5b[_0x6da861+0x1];_0x353bfb['push'](_0x2be2e1);for(let _0x12f771=0x0;_0x12f771<=_0x53b8a0;_0x12f771++){let _0x343819=_0x6f549e[_0x6eb55a(0x7e5)](_0x12f771/_0x53b8a0,_0x2be2e1,_0x27e5a0[_0x6da861*0x2],_0x27e5a0[_0x6da861*0x2+0x1],_0x166929);_0x353bfb[_0x6eb55a(0xb3)](_0x343819);}_0x353bfb[_0x6eb55a(0xb3)](_0x166929);}return new _0x34d1e5[(_0x6eb55a(0x7aa))][(_0x6eb55a(0x89f))](_0x5e5f93[_0x6eb55a(0x999)](_0x16f48b[_0x6eb55a(0xa8b)](_0x353bfb)));}},_0x33e56f=_0x4fb154,_0x2bf49a={'material':_0x34d1e5[_0x43bf95(0x7aa)]['Color'][_0x43bf95(0x801)][_0x43bf95(0x8e4)](0.6),'fill':!0x0},_0x1bd80b=class extends _0xbc5bfb{constructor(_0x4fd7f5){const _0x59770a=_0x43bf95;super(),this[_0x59770a(0x4d7)]=0x3,this[_0x59770a(0x9ca)]={..._0x2bf49a,..._0x4fd7f5},this['_graphics']=new _0x33e56f();}[_0x43bf95(0x6a3)](){const _0x2ded45=_0x43bf95;this[_0x2ded45(0x95d)][_0x2ded45(0x6fe)]='单击选择点位',this[_0x2ded45(0xaa1)]=new _0x34d1e5[(_0x2ded45(0x7aa))]['Entity']({'polygon':{...this[_0x2ded45(0x9ca)],'hierarchy':new _0x34d1e5[(_0x2ded45(0x7aa))][(_0x2ded45(0x18c))](()=>this['_positions'][_0x2ded45(0x6a2)]>0x1?(this[_0x2ded45(0x515)][_0x2ded45(0x752)]=this[_0x2ded45(0x387)],this[_0x2ded45(0x515)][_0x2ded45(0x245)]):null,!0x1)}}),this[_0x2ded45(0x761)][_0x2ded45(0x1f6)][_0x2ded45(0x45f)](this['_delegate']);}[_0x43bf95(0x222)](){const _0x16b16f=_0x43bf95;let _0x4f8f72=null;this['_positions']['length']&&(_0x4f8f72=new _0x5e3739(_0x5e5f93[_0x16b16f(0x625)](this[_0x16b16f(0x387)]))[_0x16b16f(0x5db)](this[_0x16b16f(0x9ca)])),this[_0x16b16f(0x674)][_0x16b16f(0x53e)]&&this[_0x16b16f(0x674)]['onDrawStop'](_0x4f8f72);}['_onDrawAnchor'](_0xfcf95){const _0x182062=_0x43bf95;let _0x429c42=this[_0x182062(0x387)][_0x182062(0x6a2)];this[_0x182062(0x387)]['push'](_0xfcf95),this[_0x182062(0x95d)][_0x182062(0xa4f)](_0x14f7b9[_0x182062(0x45b)],{'position':_0xfcf95}),this[_0x182062(0x515)][_0x182062(0x752)]=this[_0x182062(0x387)],_0x429c42>=this['_maxAnchorSize']&&(this['_positions'][_0x182062(0x321)](),this[_0x182062(0x95d)][_0x182062(0xa4f)](_0x14f7b9['DRAW_STOP']));}},_0xce0c8b=_0x1bd80b,_0x5b0d6c=class extends _0x561a92{constructor(_0x145cfd){const _0x2c12fa=_0x43bf95;super(_0x145cfd),this[_0x2c12fa(0x1c9)]=0.18,this['headWidthFactor']=0.3,this['neckHeightFactor']=0.85,this['neckWidthFactor']=0.15,this[_0x2c12fa(0x987)]=0.1,this['headTailFactor']=0.8,this[_0x2c12fa(0x3dc)]=0x1;}['_createHierarchy'](){const _0x586ee7=_0x43bf95;let _0x3a9623=_0x16f48b['parsePolygonCoordToArray'](_0x5e5f93[_0x586ee7(0x625)](this[_0x586ee7(0x387)]))[0x0],_0x2bd2f4=_0x3a9623[0x0],_0x976c3c=_0x3a9623[0x1];_0x6f549e['isClockWise'](_0x3a9623[0x0],_0x3a9623[0x1],_0x3a9623[0x2])&&(_0x2bd2f4=_0x3a9623[0x1],_0x976c3c=_0x3a9623[0x0]);let _0x17fb71=[_0x6f549e['mid'](_0x2bd2f4,_0x976c3c)][_0x586ee7(0x64c)](_0x3a9623['slice'](0x2)),_0x47e150=this['_getArrowHeadPoints'](_0x17fb71,_0x2bd2f4,_0x976c3c),_0x2dc792=_0x47e150[0x0],_0x208fb3=_0x47e150[0x4],_0x3e75ba=_0x6f549e[_0x586ee7(0x7f4)](_0x2bd2f4,_0x976c3c),_0x5dc17a=_0x6f549e['getBaseLength'](_0x17fb71),_0x232c23=_0x5dc17a*this[_0x586ee7(0x987)]*this[_0x586ee7(0x3dc)],_0x30d7be=_0x6f549e['getThirdPoint'](_0x17fb71[0x1],_0x17fb71[0x0],0x0,_0x232c23,!0x0),_0x3a47ec=_0x3e75ba/_0x5dc17a,_0x176e51=this[_0x586ee7(0x26b)](_0x17fb71,_0x2dc792,_0x208fb3,_0x3a47ec),_0x926256=_0x176e51['length'],_0x4548b9=[_0x2bd2f4]['concat'](_0x176e51['slice'](0x0,_0x926256/0x2));_0x4548b9['push'](_0x2dc792);let _0x185e79=[_0x976c3c][_0x586ee7(0x64c)](_0x176e51['slice'](_0x926256/0x2,_0x926256));return _0x185e79['push'](_0x208fb3),_0x4548b9=_0x6f549e[_0x586ee7(0x780)](_0x4548b9),_0x185e79=_0x6f549e[_0x586ee7(0x780)](_0x185e79),new _0x34d1e5['Cesium'][(_0x586ee7(0x89f))](_0x5e5f93[_0x586ee7(0x999)](_0x16f48b[_0x586ee7(0xa8b)](_0x4548b9['concat'](_0x47e150,_0x185e79[_0x586ee7(0xd9)](),[_0x30d7be,_0x4548b9[0x0]]))));}},_0x329057=_0x5b0d6c,_0xb8547f={'material':_0x34d1e5['Cesium']['Color']['YELLOW'][_0x43bf95(0x8e4)](0.6),'fill':!0x0},_0x29a8c8=class extends _0xbc5bfb{constructor(_0xc7b5a6){const _0x2f236b=_0x43bf95;super(),this[_0x2f236b(0x4d7)]=0x3,this[_0x2f236b(0x9ca)]={..._0xb8547f,..._0xc7b5a6},this['_graphics']=new _0x329057();}[_0x43bf95(0x37f)](){const _0x31020e=_0x43bf95;this[_0x31020e(0x95d)][_0x31020e(0x6fe)]=_0x31020e(0x492),this[_0x31020e(0xaa1)]=new _0x34d1e5['Cesium'][(_0x31020e(0x926))]({'polygon':{...this[_0x31020e(0x9ca)],'hierarchy':new _0x34d1e5['Cesium'][(_0x31020e(0x18c))](()=>this['_positions']['length']>0x2?(this['_graphics']['positions']=this[_0x31020e(0x387)],this[_0x31020e(0x515)][_0x31020e(0x245)]):null,!0x1)}}),this[_0x31020e(0x761)][_0x31020e(0x1f6)][_0x31020e(0x45f)](this[_0x31020e(0xaa1)]);}['_stoppedHook'](){const _0xb16b74=_0x43bf95;let _0x33f6b2=null;this[_0xb16b74(0x387)]['length']&&(_0x33f6b2=new _0x2c4845(_0x5e5f93['transformCartesianArrayToWGS84Array'](this[_0xb16b74(0x387)]))[_0xb16b74(0x5db)](this[_0xb16b74(0x9ca)])),this[_0xb16b74(0x674)][_0xb16b74(0x53e)]&&this[_0xb16b74(0x674)][_0xb16b74(0x53e)](_0x33f6b2);}[_0x43bf95(0x38e)](_0x4fb8f8){const _0x1b9c59=_0x43bf95;let _0x210794=this[_0x1b9c59(0x387)]['length'];this[_0x1b9c59(0x387)][_0x1b9c59(0xb3)](_0x4fb8f8),this[_0x1b9c59(0x95d)]['fire'](_0x14f7b9[_0x1b9c59(0x45b)],{'position':_0x4fb8f8}),this[_0x1b9c59(0x515)]['positions']=this[_0x1b9c59(0x387)],_0x210794>=this[_0x1b9c59(0x4d7)]&&(this['_positions'][_0x1b9c59(0x321)](),this['drawTool']['fire'](_0x14f7b9[_0x1b9c59(0xa27)]));}},_0x2b1b78=_0x29a8c8,_0x4a050b=class{constructor(_0x5c2ca3){const _0x4df8bd=_0x43bf95;this[_0x4df8bd(0x3f7)]=void 0x0,this[_0x4df8bd(0x761)]=void 0x0,this['_overlay']=_0x5c2ca3,this['_overlay']['show']=!0x1,this['_delegate']=new _0x34d1e5[(_0x4df8bd(0x7aa))][(_0x4df8bd(0x926))](),this[_0x4df8bd(0xaa1)]['merge'](_0x5c2ca3['delegate']),this['_options']={},this[_0x4df8bd(0x387)]=[];}get[_0x43bf95(0x419)](){const _0x5f16db=_0x43bf95;return this[_0x5f16db(0x3f7)][_0x5f16db(0x419)];}['_mountedHook'](){}[_0x43bf95(0x222)](){const _0x538ecb=_0x43bf95;this[_0x538ecb(0x33c)][_0x538ecb(0x752)]=_0x5e5f93[_0x538ecb(0x625)](this['_positions']),this[_0x538ecb(0x33c)][_0x538ecb(0x867)]=!0x0,this[_0x538ecb(0x674)]['onEditStop']&&this[_0x538ecb(0x674)][_0x538ecb(0x8be)](this['_overlay']);}[_0x43bf95(0x8df)](){const _0x49a471=_0x43bf95;this['_positions']=[][_0x49a471(0x64c)](_0x5e5f93[_0x49a471(0x999)](this[_0x49a471(0x33c)][_0x49a471(0x752)])),this[_0x49a471(0x387)][_0x49a471(0x2de)]((_0x448580,_0x5357cd)=>{const _0xfd6707=_0x49a471;this['editTool'][_0xfd6707(0xa4f)](_0x14f7b9['CREATE_ANCHOR'],{'position':_0x448580,'index':_0x5357cd});});}[_0x43bf95(0x142)]({pickedAnchor:_0x5c6d6d,position:_0x24ac6c}){const _0x30741a=_0x43bf95;let _0x40c970=_0x5c6d6d[_0x30741a(0x66f)]['getValue'](_0x34d1e5[_0x30741a(0x7aa)][_0x30741a(0xc3)][_0x30741a(0xaa6)]());this[_0x30741a(0x387)][_0x40c970[_0x30741a(0x458)]]=_0x24ac6c;}[_0x43bf95(0x4c5)]({pickedAnchor:_0x47964c,position:_0x912545}){const _0x46ddb3=_0x43bf95;let _0x10f745=_0x47964c['properties'][_0x46ddb3(0x4e7)](_0x34d1e5[_0x46ddb3(0x7aa)]['JulianDate'][_0x46ddb3(0xaa6)]());this['_positions'][_0x10f745['index']]=_0x912545;}[_0x43bf95(0x709)]({pickedAnchor:_0x17c2f9,position:_0x165e26}){const _0x44d110=_0x43bf95;this['_unbindEvent'](),this[_0x44d110(0x3f7)][_0x44d110(0x419)][_0x44d110(0x96a)](),this[_0x44d110(0x761)][_0x44d110(0x1f6)][_0x44d110(0x109)](this[_0x44d110(0xaa1)]),this[_0x44d110(0x222)]();}[_0x43bf95(0x4ac)](){const _0x578c61=_0x43bf95;return this[_0x578c61(0x419)]['on'](_0x14f7b9[_0x578c61(0x641)],this[_0x578c61(0x4c5)],this),this[_0x578c61(0x419)]['on'](_0x14f7b9[_0x578c61(0x753)],this[_0x578c61(0x142)],this),this[_0x578c61(0x419)]['on'](_0x14f7b9['EDIT_STOP'],this[_0x578c61(0x709)],this),this;}[_0x43bf95(0x2a1)](){const _0x16b641=_0x43bf95;this[_0x16b641(0x419)]['off'](_0x14f7b9[_0x16b641(0x641)],this[_0x16b641(0x4c5)],this),this[_0x16b641(0x419)]['off'](_0x14f7b9[_0x16b641(0x753)],this[_0x16b641(0x142)],this),this[_0x16b641(0x419)]['off'](_0x14f7b9[_0x16b641(0x23a)],this['_onEditStop'],this);}[_0x43bf95(0x9ba)](_0x311e26,_0x549192){const _0x3ddbc1=_0x43bf95;return this['_viewer']=_0x311e26[_0x3ddbc1(0x88c)],this[_0x3ddbc1(0x761)]=_0x311e26[_0x3ddbc1(0x4a9)],this[_0x3ddbc1(0x674)]=_0x549192,this[_0x3ddbc1(0x3f7)][_0x3ddbc1(0x419)]['deactivate'](),this[_0x3ddbc1(0x3f7)]['editTool'][_0x3ddbc1(0x6fe)]=_0x3ddbc1(0xa2e),this[_0x3ddbc1(0x3f7)]['editTool'][_0x3ddbc1(0x4fc)](_0x549192),this[_0x3ddbc1(0x6a3)](),this[_0x3ddbc1(0x8df)](),this[_0x3ddbc1(0x2a1)](),this['_bindEvent'](),this;}[_0x43bf95(0x86d)](){const _0x5b104f=_0x43bf95;return this[_0x5b104f(0x419)][_0x5b104f(0xa4f)](_0x14f7b9[_0x5b104f(0x23a)],{'pickedAnchor':null,'position':null}),this;}},_0x809e78=_0x4a050b,_0x4d2b7a=class extends _0x809e78{constructor(_0x3271ce){const _0x10e77f=_0x43bf95;super(_0x3271ce),this[_0x10e77f(0x691)]=void 0x0;}['_mountedHook'](){const _0x5b71de=_0x43bf95;this['editTool'][_0x5b71de(0x6fe)]=_0x5b71de(0x8e8),this[_0x5b71de(0x691)]=this[_0x5b71de(0xaa1)][_0x5b71de(0x9a7)][_0x5b71de(0x4e7)](_0x34d1e5[_0x5b71de(0x7aa)][_0x5b71de(0xc3)][_0x5b71de(0xaa6)]()),this[_0x5b71de(0xaa1)][_0x5b71de(0x9a7)]=new _0x34d1e5[(_0x5b71de(0x7aa))]['CallbackProperty'](()=>this[_0x5b71de(0x691)],!0x1),this[_0x5b71de(0x761)][_0x5b71de(0x1f6)][_0x5b71de(0x45f)](this[_0x5b71de(0xaa1)]);}['_stoppedHook'](){const _0x874980=_0x43bf95;this[_0x874980(0x33c)][_0x874980(0x9a7)]=_0x5e5f93[_0x874980(0x30b)](this[_0x874980(0x691)]),this[_0x874980(0x33c)][_0x874980(0x867)]=!0x0,this['_options'][_0x874980(0x8be)]&&this[_0x874980(0x674)][_0x874980(0x8be)](this[_0x874980(0x33c)]);}[_0x43bf95(0x4c5)]({pickedAnchor:_0x5de278,position:_0x4e37fd}){const _0xaf3cb0=_0x43bf95;this[_0xaf3cb0(0x691)]=_0x4e37fd;}},_0x14f2b4=_0x4d2b7a,_0x2021fe=class extends _0x809e78{constructor(_0xf5c872){super(_0xf5c872);}[_0x43bf95(0x6a3)](){const _0x1abeb1=_0x43bf95;this['_delegate'][_0x1abeb1(0x10c)][_0x1abeb1(0x752)]=new _0x34d1e5['Cesium']['CallbackProperty'](()=>this[_0x1abeb1(0x387)]['length']>0x1?this[_0x1abeb1(0x387)]:null,!0x1),this[_0x1abeb1(0x761)][_0x1abeb1(0x1f6)][_0x1abeb1(0x45f)](this[_0x1abeb1(0xaa1)]);}[_0x43bf95(0x222)](){const _0x564548=_0x43bf95;this[_0x564548(0x33c)][_0x564548(0x752)]=_0x5e5f93[_0x564548(0x625)](this[_0x564548(0x387)]['filter']((_0xee2e8d,_0x22f5a1)=>_0x22f5a1%0x2===0x0)),this[_0x564548(0x33c)][_0x564548(0x867)]=!0x0,this[_0x564548(0x674)]['onEditStop']&&this['_options'][_0x564548(0x8be)](this[_0x564548(0x33c)]);}[_0x43bf95(0x8df)](){const _0x56a0a8=_0x43bf95;this[_0x56a0a8(0x387)]=[];let _0x3afbc9=this[_0x56a0a8(0x33c)][_0x56a0a8(0x8ca)][_0x56a0a8(0x10c)][_0x56a0a8(0x752)][_0x56a0a8(0x4e7)](_0x34d1e5[_0x56a0a8(0x7aa)][_0x56a0a8(0xc3)][_0x56a0a8(0xaa6)]());for(let _0x4d64ee=0x0;_0x4d64ee<_0x3afbc9[_0x56a0a8(0x6a2)]-0x1;_0x4d64ee++){let _0x7bb84=_0x3a8784(_0x3afbc9[_0x4d64ee],_0x3afbc9[_0x4d64ee+0x1]);this[_0x56a0a8(0x387)][_0x56a0a8(0xb3)](_0x3afbc9[_0x4d64ee]),this[_0x56a0a8(0x387)][_0x56a0a8(0xb3)](_0x7bb84);}this[_0x56a0a8(0x387)]['push'](_0x3afbc9[_0x3afbc9[_0x56a0a8(0x6a2)]-0x1]),this[_0x56a0a8(0x387)][_0x56a0a8(0x2de)]((_0x2ef820,_0x384f28)=>{const _0x3ebdd6=_0x56a0a8;this[_0x3ebdd6(0x419)][_0x3ebdd6(0xa4f)](_0x14f7b9[_0x3ebdd6(0x45b)],{'position':_0x2ef820,'index':_0x384f28,'isMid':_0x384f28%0x2!==0x0});});}[_0x43bf95(0x142)]({pickedAnchor:_0x4c3cbe,position:_0x54e880}){const _0x48d9a4=_0x43bf95;let _0x417848=_0x4c3cbe[_0x48d9a4(0x66f)][_0x48d9a4(0x4e7)](_0x34d1e5[_0x48d9a4(0x7aa)][_0x48d9a4(0xc3)][_0x48d9a4(0xaa6)]()),_0x52da4=_0x417848[_0x48d9a4(0x458)];if(_0x417848[_0x48d9a4(0x587)]){let _0x42cdff=_0x3a8784(this[_0x48d9a4(0x387)][_0x52da4],this['_positions'][_0x52da4-0x1]),_0x1f39a9=_0x3a8784(this[_0x48d9a4(0x387)][_0x52da4],this['_positions'][_0x52da4+0x1]);this[_0x48d9a4(0x387)][_0x48d9a4(0xae)](_0x52da4,0x1,_0x42cdff,_0x54e880,_0x1f39a9),this[_0x48d9a4(0x419)][_0x48d9a4(0xa4f)](_0x14f7b9[_0x48d9a4(0x90a)]),this[_0x48d9a4(0x387)]['forEach']((_0x4b6e8c,_0x3ac0b5)=>{const _0x33cfd5=_0x48d9a4;this[_0x33cfd5(0x419)][_0x33cfd5(0xa4f)](_0x14f7b9['CREATE_ANCHOR'],{'position':_0x4b6e8c,'index':_0x3ac0b5,'isMid':_0x3ac0b5%0x2!==0x0});});}}[_0x43bf95(0x4c5)]({pickedAnchor:_0x3d6ff5,position:_0x3a434d}){const _0x2caedd=_0x43bf95;let _0x396b64=_0x3d6ff5[_0x2caedd(0x66f)]['getValue'](_0x34d1e5['Cesium']['JulianDate'][_0x2caedd(0xaa6)]()),_0x3d22cc=_0x396b64['index'];if(this[_0x2caedd(0x387)][_0x3d22cc]=_0x3a434d,!_0x396b64['isMid']&&this['_options'][_0x2caedd(0x612)]>0x2){let _0x23fda6=-0x1,_0x365509=-0x1,_0xf8fecf=-0x1,_0x3f234d=-0x1,_0x31c59d=this['_positions']['length'];if(_0x3d22cc===0x0?(_0xf8fecf=_0x3d22cc+0x2,_0x3f234d=_0x3d22cc+0x1):_0x396b64[_0x2caedd(0x458)]===_0x31c59d-0x1?(_0x23fda6=_0x3d22cc-0x2,_0x365509=_0x3d22cc-0x1):(_0x23fda6=_0x3d22cc-0x2,_0x365509=_0x3d22cc-0x1,_0xf8fecf=_0x3d22cc+0x2,_0x3f234d=_0x3d22cc+0x1),_0x23fda6>0x0){let _0x1cdea9=_0x3a8784(this[_0x2caedd(0x387)][_0x23fda6],this[_0x2caedd(0x387)][_0x3d22cc]);this[_0x2caedd(0x387)][_0x365509]=_0x1cdea9,this[_0x2caedd(0x419)][_0x2caedd(0xa4f)](_0x14f7b9[_0x2caedd(0x27d)],{'index':_0x365509,'position':_0x1cdea9});}if(_0xf8fecf>0x0){let _0x25b241=_0x3a8784(this[_0x2caedd(0x387)][_0xf8fecf],this[_0x2caedd(0x387)][_0x3d22cc]);this[_0x2caedd(0x387)][_0x3f234d]=_0x25b241,this['editTool'][_0x2caedd(0xa4f)](_0x14f7b9['UPDATE_ANCHOR'],{'index':_0x3f234d,'position':_0x25b241});}}}},_0x3f7734=_0x2021fe,_0x5e228c=class extends _0x809e78{constructor(_0x12bc91){super(_0x12bc91);}[_0x43bf95(0x6a3)](){const _0x42f0bf=_0x43bf95;this[_0x42f0bf(0xaa1)]['polygon']['hierarchy']=new _0x34d1e5[(_0x42f0bf(0x7aa))][(_0x42f0bf(0x18c))](_0xe953f5=>this['_positions'][_0x42f0bf(0x6a2)]>0x2?new _0x34d1e5['Cesium']['PolygonHierarchy'](this[_0x42f0bf(0x387)]['map'](_0x1af8f3=>_0x1af8f3[_0x42f0bf(0x5c3)]())):null,!0x1),this['_layer'][_0x42f0bf(0x1f6)][_0x42f0bf(0x45f)](this[_0x42f0bf(0xaa1)]);}[_0x43bf95(0x222)](){const _0x15eaa7=_0x43bf95;this[_0x15eaa7(0x33c)][_0x15eaa7(0x752)]=_0x5e5f93[_0x15eaa7(0x625)](this[_0x15eaa7(0x387)][_0x15eaa7(0x738)]((_0x2ff556,_0x1ebb6c)=>_0x1ebb6c%0x2===0x0)),this[_0x15eaa7(0x33c)]['show']=!0x0,this[_0x15eaa7(0x674)]['onEditStop']&&this[_0x15eaa7(0x674)][_0x15eaa7(0x8be)](this[_0x15eaa7(0x33c)]);}['_mountAnchor'](){const _0x125611=_0x43bf95;this[_0x125611(0x387)]=[];let _0x5b301e=this['_overlay'][_0x125611(0x8ca)][_0x125611(0x410)][_0x125611(0x245)][_0x125611(0x4e7)](_0x34d1e5[_0x125611(0x7aa)][_0x125611(0xc3)]['now']())['positions'];_0x5b301e[_0x125611(0xb3)](_0x5b301e[0x0]);for(let _0xf3288a=0x0;_0xf3288a<_0x5b301e[_0x125611(0x6a2)]-0x1;_0xf3288a++){let _0x35561a=_0x3a8784(_0x5b301e[_0xf3288a],_0x5b301e[_0xf3288a+0x1]);this['_positions']['push'](_0x5b301e[_0xf3288a]),this[_0x125611(0x387)][_0x125611(0xb3)](_0x35561a);}this[_0x125611(0x387)][_0x125611(0x2de)]((_0x3fdcc8,_0x19e46b)=>{const _0x3bfc6d=_0x125611;this[_0x3bfc6d(0x419)][_0x3bfc6d(0xa4f)](_0x14f7b9[_0x3bfc6d(0x45b)],{'position':_0x3fdcc8,'index':_0x19e46b,'isMid':_0x19e46b%0x2!==0x0});});}['_onEditAnchorStop']({pickedAnchor:_0x44480b,position:_0x57b3b8}){const _0x4a9215=_0x43bf95;let _0x48c246=_0x44480b[_0x4a9215(0x66f)]['getValue'](_0x34d1e5[_0x4a9215(0x7aa)][_0x4a9215(0xc3)][_0x4a9215(0xaa6)]()),_0xac5708=_0x48c246[_0x4a9215(0x458)];if(_0x48c246[_0x4a9215(0x587)]){let _0x103d97,_0x3410f4,_0x5aafb6=this[_0x4a9215(0x387)][_0x4a9215(0x6a2)];_0xac5708===_0x5aafb6-0x1?(_0x103d97=_0x3a8784(this['_positions'][_0xac5708],this[_0x4a9215(0x387)][_0xac5708-0x1]),_0x3410f4=_0x3a8784(this[_0x4a9215(0x387)][_0xac5708],this[_0x4a9215(0x387)][0x0])):(_0x103d97=_0x3a8784(this[_0x4a9215(0x387)][_0xac5708],this['_positions'][_0xac5708-0x1]),_0x3410f4=_0x3a8784(this['_positions'][_0xac5708],this['_positions'][_0xac5708+0x1])),this[_0x4a9215(0x387)][_0x4a9215(0xae)](_0xac5708,0x1,_0x103d97,_0x57b3b8,_0x3410f4),this[_0x4a9215(0x419)][_0x4a9215(0xa4f)](_0x14f7b9[_0x4a9215(0x90a)]),this[_0x4a9215(0x387)][_0x4a9215(0x2de)]((_0x1f250d,_0x9c6a86)=>{const _0x5d172a=_0x4a9215;this[_0x5d172a(0x419)][_0x5d172a(0xa4f)](_0x14f7b9[_0x5d172a(0x45b)],{'position':_0x1f250d,'index':_0x9c6a86,'isMid':_0x9c6a86%0x2!==0x0});});}}[_0x43bf95(0x4c5)]({pickedAnchor:_0x1dc8ad,position:_0x1764b6}){const _0x51606f=_0x43bf95;let _0xf68f94=_0x1dc8ad[_0x51606f(0x66f)][_0x51606f(0x4e7)](_0x34d1e5['Cesium']['JulianDate']['now']()),_0x5b82a2=_0xf68f94[_0x51606f(0x458)];this[_0x51606f(0x387)][_0x5b82a2]=_0x1764b6;let _0x2f5c18=this[_0x51606f(0x387)][_0x51606f(0x6a2)];if(!_0xf68f94[_0x51606f(0x587)]){let _0x115acb=-0x1,_0x4d1ac8=-0x1,_0x31dce8=-0x1,_0x536d86=-0x1;_0x5b82a2===0x0?(_0x115acb=_0x2f5c18-0x2,_0x4d1ac8=_0x2f5c18-0x1,_0x31dce8=_0x5b82a2+0x2,_0x536d86=_0x5b82a2+0x1):_0x5b82a2===_0x2f5c18-0x2?(_0x115acb=_0x5b82a2-0x2,_0x4d1ac8=_0x5b82a2-0x1,_0x31dce8=0x0,_0x536d86=_0x2f5c18-0x1):(_0x115acb=_0x5b82a2-0x2,_0x4d1ac8=_0x5b82a2-0x1,_0x31dce8=_0x5b82a2+0x2,_0x536d86=_0x5b82a2+0x1);let _0x9182a8=_0x3a8784(this[_0x51606f(0x387)][_0x115acb],this[_0x51606f(0x387)][_0x5b82a2]),_0x264c94=_0x3a8784(this[_0x51606f(0x387)][_0x31dce8],this[_0x51606f(0x387)][_0x5b82a2]);this[_0x51606f(0x387)][_0x4d1ac8]=_0x9182a8,this[_0x51606f(0x387)][_0x536d86]=_0x264c94,this['editTool'][_0x51606f(0xa4f)](_0x14f7b9[_0x51606f(0x27d)],{'index':_0x4d1ac8,'position':_0x9182a8}),this[_0x51606f(0x419)]['fire'](_0x14f7b9[_0x51606f(0x27d)],{'index':_0x536d86,'position':_0x264c94});}}},_0x330340=_0x5e228c,_0x13636b=class extends _0x809e78{constructor(_0xa17947){const _0x551470=_0x43bf95;super(_0xa17947),this[_0x551470(0x2b7)]=void 0x0,this[_0x551470(0x4b0)]=0x0;}[_0x43bf95(0x6a3)](){const _0x61e3eb=_0x43bf95;this['_radius']=this[_0x61e3eb(0x33c)][_0x61e3eb(0x28e)],this[_0x61e3eb(0x2b7)]=_0x5e5f93['transformWGS84ToCartesian'](this[_0x61e3eb(0x33c)][_0x61e3eb(0x765)]),this[_0x61e3eb(0x387)]=[][_0x61e3eb(0x64c)]([this[_0x61e3eb(0x2b7)],this[_0x61e3eb(0x5e2)](this['_center'],this[_0x61e3eb(0x4b0)])[0x0]]),this[_0x61e3eb(0xaa1)][_0x61e3eb(0x410)][_0x61e3eb(0x245)]=new _0x34d1e5['Cesium'][(_0x61e3eb(0x18c))](_0x578468=>{const _0x3ad814=_0x61e3eb;if(this[_0x3ad814(0x387)][_0x3ad814(0x6a2)]>0x1){if(this['_radius']=_0x34d1e5[_0x3ad814(0x7aa)][_0x3ad814(0x982)]['distance'](this['_positions'][0x0],this['_positions'][0x1]),this[_0x3ad814(0x4b0)]<=0x0)return null;let _0x1864dd=this[_0x3ad814(0x5e2)](this[_0x3ad814(0x387)][0x0],this[_0x3ad814(0x4b0)]);return _0x1864dd['push'](_0x1864dd[0x0]),new _0x34d1e5[(_0x3ad814(0x7aa))]['PolygonHierarchy'](_0x1864dd);}else return null;},!0x1),this[_0x61e3eb(0x761)][_0x61e3eb(0x1f6)][_0x61e3eb(0x45f)](this['_delegate']);}[_0x43bf95(0x5e2)](_0x470777,_0x11d743){const _0x14fae2=_0x43bf95;let _0x5b5dbf=[],_0x4a3c75=_0x34d1e5['Cesium'][_0x14fae2(0x8d4)][_0x14fae2(0xa58)]({'center':_0x470777,'semiMajorAxis':_0x11d743,'semiMinorAxis':_0x11d743,'rotation':0x0,'granularity':0.005},!0x1,!0x0);return _0x4a3c75&&_0x4a3c75[_0x14fae2(0x8e1)]&&(_0x5b5dbf=_0x34d1e5[_0x14fae2(0x7aa)][_0x14fae2(0x982)][_0x14fae2(0x877)](_0x4a3c75[_0x14fae2(0x8e1)])),_0x5b5dbf;}[_0x43bf95(0x222)](){const _0x436ec0=_0x43bf95;this[_0x436ec0(0x33c)][_0x436ec0(0x765)]=_0x5e5f93[_0x436ec0(0x30b)](this[_0x436ec0(0x387)][0x0]),this[_0x436ec0(0x33c)][_0x436ec0(0x28e)]=this[_0x436ec0(0x4b0)],this[_0x436ec0(0x33c)]['show']=!0x0,this[_0x436ec0(0x674)]['onEditStop']&&this[_0x436ec0(0x674)][_0x436ec0(0x8be)](this['_overlay']);}['_mountAnchor'](){const _0x2b45c3=_0x43bf95;this[_0x2b45c3(0x387)][_0x2b45c3(0x2de)]((_0x5b4f8b,_0x563db9)=>{const _0x5378e7=_0x2b45c3;this[_0x5378e7(0x419)]['fire'](_0x14f7b9['CREATE_ANCHOR'],{'position':_0x5b4f8b,'index':_0x563db9,'isCenter':_0x563db9%0x2===0x0});});}},_0x141554=_0x13636b,_0x25ac96=class extends _0x809e78{constructor(_0x37a283){const _0x328676=_0x43bf95;super(_0x37a283),this[_0x328676(0x33c)]=_0x37a283;}['_mountedHook'](){const _0x14925d=_0x43bf95;this['_delegate']['rectangle'][_0x14925d(0x9d9)]=new _0x34d1e5[(_0x14925d(0x7aa))][(_0x14925d(0x18c))](_0x19d848=>this[_0x14925d(0x387)][_0x14925d(0x6a2)]>0x1?_0x34d1e5['Cesium'][_0x14925d(0x6e7)][_0x14925d(0x77d)](this[_0x14925d(0x387)]):null,!0x1),this[_0x14925d(0x761)][_0x14925d(0x1f6)]['add'](this[_0x14925d(0xaa1)]);}},_0x289d5f=_0x25ac96,_0x6c51d1=class extends _0x809e78{constructor(_0x7a922){const _0x1f25f5=_0x43bf95;super(_0x7a922),this[_0x1f25f5(0x691)]=void 0x0;}[_0x43bf95(0x6a3)](){const _0x204f81=_0x43bf95;this['editTool'][_0x204f81(0x6fe)]=_0x204f81(0x8e8),this[_0x204f81(0x691)]=this[_0x204f81(0xaa1)][_0x204f81(0x9a7)][_0x204f81(0x4e7)](_0x34d1e5[_0x204f81(0x7aa)][_0x204f81(0xc3)]['now']()),this[_0x204f81(0xaa1)][_0x204f81(0x9a7)]=new _0x34d1e5['Cesium'][(_0x204f81(0x18c))](()=>this['_position'],!0x1),this[_0x204f81(0x761)][_0x204f81(0x1f6)][_0x204f81(0x45f)](this[_0x204f81(0xaa1)]);}[_0x43bf95(0x222)](){const _0xbac53b=_0x43bf95;this['_overlay'][_0xbac53b(0x9a7)]=_0x5e5f93['transformCartesianToWGS84'](this['_position']),this[_0xbac53b(0x33c)][_0xbac53b(0x867)]=!0x0,this['_options']['onEditStop']&&this[_0xbac53b(0x674)]['onEditStop'](this[_0xbac53b(0x33c)]);}[_0x43bf95(0x4c5)]({pickedAnchor:_0x474b2e,position:_0xbe3553}){this['_position']=_0xbe3553;}},_0x2f2f0a=_0x6c51d1,_0x4f6f7a=class extends _0x809e78{constructor(_0x16fd19){const _0x3a4f08=_0x43bf95;super(_0x16fd19),this[_0x3a4f08(0x515)]=new _0x561a92();}[_0x43bf95(0x6a3)](){const _0x34b107=_0x43bf95;this['_delegate'][_0x34b107(0x410)][_0x34b107(0x245)]=new _0x34d1e5['Cesium'][(_0x34b107(0x18c))](()=>this['_positions'][_0x34b107(0x6a2)]>0x2?(this[_0x34b107(0x515)][_0x34b107(0x752)]=this[_0x34b107(0x387)],this[_0x34b107(0x515)][_0x34b107(0x245)]):null,!0x1),this['_layer']['entities']['add'](this[_0x34b107(0xaa1)]);}},_0x5344e3=_0x4f6f7a,_0x3f77fe=class extends _0x809e78{constructor(_0x26cfea){const _0x41b07e=_0x43bf95;super(_0x26cfea),this[_0x41b07e(0x515)]=new _0x5384b9();}[_0x43bf95(0x6a3)](){const _0x4d1456=_0x43bf95;this['_delegate']['polygon']['hierarchy']=new _0x34d1e5[(_0x4d1456(0x7aa))][(_0x4d1456(0x18c))](()=>this[_0x4d1456(0x387)]['length']>0x2?(this['_graphics'][_0x4d1456(0x752)]=this[_0x4d1456(0x387)],this[_0x4d1456(0x515)][_0x4d1456(0x245)]):null,!0x1),this['_layer'][_0x4d1456(0x1f6)]['add'](this['_delegate']);}},_0x391666=_0x3f77fe,_0x2b9558=class extends _0x809e78{constructor(_0xac20aa){const _0x1addb0=_0x43bf95;super(_0xac20aa),this[_0x1addb0(0x515)]=new _0x4fbfff();}[_0x43bf95(0x6a3)](){const _0x3e6bf4=_0x43bf95;this['_delegate'][_0x3e6bf4(0x410)]['hierarchy']=new _0x34d1e5[(_0x3e6bf4(0x7aa))][(_0x3e6bf4(0x18c))](()=>this['_positions'][_0x3e6bf4(0x6a2)]>0x1?(this[_0x3e6bf4(0x515)]['positions']=this[_0x3e6bf4(0x387)],this[_0x3e6bf4(0x515)][_0x3e6bf4(0x245)]):null,!0x1),this['_layer'][_0x3e6bf4(0x1f6)][_0x3e6bf4(0x45f)](this[_0x3e6bf4(0xaa1)]);}},_0x54eb76=_0x2b9558,_0x50b684=class extends _0x809e78{constructor(_0x2b4770){const _0x4e4496=_0x43bf95;super(_0x2b4770),this[_0x4e4496(0x515)]=new _0x33e56f();}['_mountedHook'](){const _0x1b8ef8=_0x43bf95;this[_0x1b8ef8(0xaa1)][_0x1b8ef8(0x410)][_0x1b8ef8(0x245)]=new _0x34d1e5[(_0x1b8ef8(0x7aa))][(_0x1b8ef8(0x18c))](()=>this[_0x1b8ef8(0x387)][_0x1b8ef8(0x6a2)]>0x1?(this['_graphics'][_0x1b8ef8(0x752)]=this[_0x1b8ef8(0x387)],this[_0x1b8ef8(0x515)]['hierarchy']):null,!0x1),this['_layer'][_0x1b8ef8(0x1f6)]['add'](this['_delegate']);}},_0x393a06=_0x50b684,_0xac379f=class extends _0x809e78{constructor(_0x3f16d2){const _0x1b2dc6=_0x43bf95;super(_0x3f16d2),this[_0x1b2dc6(0x515)]=new _0x329057();}[_0x43bf95(0x6a3)](){const _0x2a1249=_0x43bf95;this[_0x2a1249(0xaa1)][_0x2a1249(0x410)]['hierarchy']=new _0x34d1e5['Cesium'][(_0x2a1249(0x18c))](()=>this[_0x2a1249(0x387)][_0x2a1249(0x6a2)]>0x2?(this[_0x2a1249(0x515)][_0x2a1249(0x752)]=this[_0x2a1249(0x387)],this['_graphics'][_0x2a1249(0x245)]):null,!0x1),this[_0x2a1249(0x761)][_0x2a1249(0x1f6)]['add'](this[_0x2a1249(0xaa1)]);}},_0x2e51f2=_0xac379f,_0x2ecd7a=class{constructor(_0x3ebb3a,_0x4644cc={}){const _0x36f62d=_0x43bf95;this[_0x36f62d(0x3f7)]=_0x3ebb3a,this[_0x36f62d(0x674)]=_0x4644cc,this['_layer']=new _0x34d1e5['Cesium'][(_0x36f62d(0x668))]('plot-layer'),this['_viewer'][_0x36f62d(0x268)]['add'](this[_0x36f62d(0x761)]),this['_currentWorker']=void 0x0,this[_0x36f62d(0x558)]=void 0x0;}get[_0x43bf95(0x88c)](){const _0x4eccf6=_0x43bf95;return this[_0x4eccf6(0x3f7)];}get[_0x43bf95(0x4a9)](){return this['_layer'];}get[_0x43bf95(0x988)](){const _0x3a056f=_0x43bf95;return this[_0x3a056f(0x558)];}[_0x43bf95(0x83d)](_0x1fae35,_0x202c4f){const _0x3d0587=_0x43bf95;let _0x4661c2;switch(_0x1fae35){case _0x10d75a[_0x3d0587(0x960)]:_0x4661c2=new _0x6ef9f9(_0x202c4f);break;case _0x10d75a['POLYLINE']:_0x4661c2=new _0x2dc2a8(_0x202c4f);break;case _0x10d75a['POLYGON']:_0x4661c2=new _0x8384db(_0x202c4f);break;case _0x10d75a[_0x3d0587(0x5b1)]:_0x4661c2=new _0x28d820(_0x202c4f);break;case _0x10d75a[_0x3d0587(0xbe)]:_0x4661c2=new _0xf6eeea(_0x202c4f);break;case _0x10d75a[_0x3d0587(0x308)]:_0x4661c2=new _0x594f5d(_0x202c4f);break;case _0x10d75a[_0x3d0587(0x8b0)]:_0x4661c2=new _0x59e858(_0x202c4f);break;case _0x10d75a[_0x3d0587(0x854)]:_0x4661c2=new _0x22bb1c(_0x202c4f);break;case _0x10d75a[_0x3d0587(0x2d2)]:_0x4661c2=new _0xca5d8a(_0x202c4f);break;case _0x10d75a[_0x3d0587(0x8d7)]:_0x4661c2=new _0x2b1b78(_0x202c4f);break;case _0x10d75a[_0x3d0587(0x975)]:_0x4661c2=new _0xce0c8b(_0x202c4f);break;default:break;}return _0x4661c2;}[_0x43bf95(0xaaa)](_0x115f9a){const _0x345d3f=_0x43bf95;let _0xf75d19;switch(_0x115f9a[_0x345d3f(0x9cf)]){case _0x10d75a[_0x345d3f(0x960)]:_0xf75d19=new _0x14f2b4(_0x115f9a);break;case _0x10d75a['POLYLINE']:_0xf75d19=new _0x3f7734(_0x115f9a);break;case _0x10d75a[_0x345d3f(0x8ad)]:_0xf75d19=new _0x330340(_0x115f9a);break;case _0x10d75a[_0x345d3f(0x5b1)]:_0xf75d19=new _0x141554(_0x115f9a);break;case _0x10d75a['RECT']:_0xf75d19=new _0x289d5f(_0x115f9a);break;case _0x10d75a[_0x345d3f(0x308)]:_0xf75d19=new _0x2f2f0a(_0x115f9a);break;case _0x10d75a[_0x345d3f(0x8b0)]:_0xf75d19=new _0x5344e3(_0x115f9a);break;case _0x10d75a[_0x345d3f(0x854)]:_0xf75d19=new _0x391666(_0x115f9a);break;case _0x10d75a[_0x345d3f(0x2d2)]:_0xf75d19=new _0x54eb76(_0x115f9a);break;case _0x10d75a[_0x345d3f(0x8d7)]:_0xf75d19=new _0x2e51f2(_0x115f9a);break;case _0x10d75a['GATHERING_PLACE']:_0xf75d19=new _0x393a06(_0x115f9a);break;default:break;}return _0xf75d19;}[_0x43bf95(0x90f)](_0x25e974,_0x45c999,_0x33726b={},_0x2d68c0=!0x1){const _0x4d2207=_0x43bf95;var _0x4392f1;this['_state']=_0x4d2207(0x90f),this[_0x4d2207(0x977)]&&this[_0x4d2207(0x977)][_0x4d2207(0x86d)]();let _0x759692=(_0x33726b==null?void 0x0:_0x33726b['maxAnchorSize'])||0x3e7;return _0x33726b&&delete _0x33726b[_0x4d2207(0x612)],this[_0x4d2207(0x977)]=(_0x4392f1=this[_0x4d2207(0x83d)](_0x25e974,_0x33726b))==null?void 0x0:_0x4392f1[_0x4d2207(0x9ba)](this,{...this[_0x4d2207(0x674)],'maxAnchorSize':_0x759692,'onDrawStop':_0x45c999,'clampToModel':_0x2d68c0!=null?_0x2d68c0:this['_options']['clampToModel']}),this;}['edit'](_0x2fae08,_0x11498c,_0x145f78=!0x1){const _0x3ba5bc=_0x43bf95;var _0x595d07;return this[_0x3ba5bc(0x558)]='edit',this['_currentWorker']&&this['_currentWorker'][_0x3ba5bc(0x86d)](),this[_0x3ba5bc(0x977)]=(_0x595d07=this[_0x3ba5bc(0xaaa)](_0x2fae08))==null?void 0x0:_0x595d07[_0x3ba5bc(0x9ba)](this,{...this[_0x3ba5bc(0x674)],'onEditStop':_0x11498c,'clampToModel':_0x145f78!=null?_0x145f78:this[_0x3ba5bc(0x674)][_0x3ba5bc(0xa2b)]}),this;}[_0x43bf95(0x86d)](){const _0x216aab=_0x43bf95;this['_currentWorker']&&this['_currentWorker'][_0x216aab(0x86d)](),this[_0x216aab(0x977)]=null;}[_0x43bf95(0x57b)](){const _0x16f153=_0x43bf95;return this['_viewer'][_0x16f153(0x268)][_0x16f153(0x109)](this[_0x16f153(0x761)]),this[_0x16f153(0x3f7)]=void 0x0,this;}},_0xaa461c=_0x2ecd7a,_0x3d08c6=class{constructor(_0x45482d){const _0x284abd=_0x43bf95;this[_0x284abd(0x3f7)]=_0x45482d,this['_options']={};}[_0x43bf95(0x4ac)](){}[_0x43bf95(0x2a1)](){}['start'](){const _0x3ce51a=_0x43bf95;if(this['_viewer'][_0x3ce51a(0xaad)][_0x3ce51a(0x7c7)]=!0x0,this[_0x3ce51a(0x2a1)](),this['_options']['duration']){let _0x56f5c=setTimeout(()=>{const _0x201957=_0x3ce51a;this[_0x201957(0x2a1)](),this[_0x201957(0x674)][_0x201957(0x7cc)]&&this[_0x201957(0x674)]['callback'][_0x201957(0x7a4)](this[_0x201957(0x674)][_0x201957(0x970)]||this),clearTimeout(_0x56f5c);},Number(this[_0x3ce51a(0x674)][_0x3ce51a(0xa36)])*0x3e8);}return this[_0x3ce51a(0x4ac)](),this;}[_0x43bf95(0x86d)](){return this['_unbindEvent'](),this;}},_0x3782bd=_0x3d08c6,_0xe43134={},_0x28f6c8=_0xe43134,_0x10aa93=class extends _0x3782bd{constructor(_0x24895c,_0x3bae21={}){const _0x513131=_0x43bf95;super(_0x24895c),this[_0x513131(0x674)]=_0x3bae21,this['_heading']=_0x24895c[_0x513131(0x698)][_0x513131(0x77c)],this[_0x513131(0x2b6)]=0.2;}get[_0x43bf95(0x9cf)](){return _0x28f6c8['AROUND_VIEW'];}set[_0x43bf95(0xc4)](_0x4654d6){const _0x3e6497=_0x43bf95;this[_0x3e6497(0x2b6)]=_0x4654d6;}[_0x43bf95(0x4ac)](){const _0x5a0606=_0x43bf95;this[_0x5a0606(0x3f7)][_0x5a0606(0xaad)][_0x5a0606(0x9ae)][_0x5a0606(0x278)](this[_0x5a0606(0x6e5)],this);}[_0x43bf95(0x2a1)](){const _0x483624=_0x43bf95;this[_0x483624(0x3f7)][_0x483624(0x698)]['lookAtTransform'](_0x34d1e5[_0x483624(0x7aa)]['Matrix4']['IDENTITY']),this['_viewer'][_0x483624(0xaad)]['onTick'][_0x483624(0x97c)](this[_0x483624(0x6e5)],this);}[_0x43bf95(0x6e5)](_0x209532,_0x1a4389){const _0x359b10=_0x43bf95;this[_0x359b10(0x656)]+=_0x34d1e5[_0x359b10(0x7aa)][_0x359b10(0x72b)][_0x359b10(0x2b0)](this['_aroundAmount']),(this['_heading']>=Math['PI']*0x2||this[_0x359b10(0x656)]<=-Math['PI']*0x2)&&(this[_0x359b10(0x656)]=0x0),this[_0x359b10(0x3f7)][_0x359b10(0x698)][_0x359b10(0x6d4)]({'orientation':{'heading':this['_heading'],'pitch':this[_0x359b10(0x674)][_0x359b10(0x442)]?_0x34d1e5[_0x359b10(0x7aa)][_0x359b10(0x72b)][_0x359b10(0x2b0)](this[_0x359b10(0x674)][_0x359b10(0x442)]):this['_viewer'][_0x359b10(0x698)]['pitch'],'roll':this[_0x359b10(0x674)][_0x359b10(0x193)]?_0x34d1e5[_0x359b10(0x7aa)][_0x359b10(0x72b)][_0x359b10(0x2b0)](this[_0x359b10(0x674)]['roll']):this[_0x359b10(0x3f7)][_0x359b10(0x698)][_0x359b10(0x193)]}});}};_0x28f6c8['AROUND_VIEW']=_0x43bf95(0x879);var _0x4e9754=_0x10aa93,_0xdeba69=class extends _0x3782bd{constructor(_0x47b300,_0x5cdefb,_0x5ad10c={}){const _0x3a3d42=_0x43bf95;super(_0x47b300),this[_0x3a3d42(0x691)]=_0x16f48b[_0x3a3d42(0x81a)](_0x5cdefb),this['_options']=_0x5ad10c,this['_heading']=_0x47b300['camera'][_0x3a3d42(0x77c)],this[_0x3a3d42(0x2b6)]=0.2;}get[_0x43bf95(0x9cf)](){const _0x3ca535=_0x43bf95;return _0x28f6c8[_0x3ca535(0x233)];}set['position'](_0x2725d3){const _0x1271b6=_0x43bf95;this[_0x1271b6(0x691)]=_0x16f48b['parsePosition'](_0x2725d3);}set['aroundAmount'](_0x3831cc){const _0x77be2=_0x43bf95;this[_0x77be2(0x2b6)]=_0x3831cc;}[_0x43bf95(0x4ac)](){const _0x468479=_0x43bf95;this[_0x468479(0x3f7)][_0x468479(0xaad)]['onTick']['addEventListener'](this[_0x468479(0x6e5)],this);}[_0x43bf95(0x2a1)](){const _0x12cc3f=_0x43bf95;this[_0x12cc3f(0x3f7)][_0x12cc3f(0x698)][_0x12cc3f(0x5ec)](_0x34d1e5[_0x12cc3f(0x7aa)][_0x12cc3f(0x5ee)]['IDENTITY']),this[_0x12cc3f(0x3f7)]['clock'][_0x12cc3f(0x9ae)]['removeEventListener'](this[_0x12cc3f(0x6e5)],this);}['_onAround'](_0x4bac98,_0x5c6c58){const _0x9f37cf=_0x43bf95;this[_0x9f37cf(0x656)]+=_0x34d1e5[_0x9f37cf(0x7aa)]['Math'][_0x9f37cf(0x2b0)](this[_0x9f37cf(0x2b6)]),(this['_heading']>=Math['PI']*0x2||this[_0x9f37cf(0x656)]<=-Math['PI']*0x2)&&(this['_heading']=0x0),this[_0x9f37cf(0x3f7)]['camera']['lookAt'](_0x5e5f93['transformWGS84ToCartesian'](this[_0x9f37cf(0x691)]),new _0x34d1e5[(_0x9f37cf(0x7aa))][(_0x9f37cf(0x8ff))](this['_heading'],_0x34d1e5['Cesium'][_0x9f37cf(0x72b)][_0x9f37cf(0x2b0)](this[_0x9f37cf(0x674)]['pitch']||0x0),this[_0x9f37cf(0x674)][_0x9f37cf(0x599)]||0x3e8));}};_0x28f6c8[_0x43bf95(0x233)]=_0x43bf95(0xa8a);var _0x18efab=_0xdeba69,_0x1ace0b=_0x43bf95(0x2bf),_0x49328f=class extends _0x3782bd{constructor(_0x2ead06,_0x5c7e14,_0x4eb2d9,_0x32b41b={}){const _0x507dd5=_0x43bf95;super(_0x2ead06),this[_0x507dd5(0xaa1)]=void 0x0,this['_position']=_0x16f48b['parsePosition'](_0x5c7e14),this[_0x507dd5(0x4b0)]=_0x4eb2d9||0x64,this['_color']=_0x32b41b[_0x507dd5(0x124)]||_0x34d1e5[_0x507dd5(0x7aa)]['Color'][_0x507dd5(0x80b)],this[_0x507dd5(0x7df)]=_0x32b41b[_0x507dd5(0x178)]||0x2;}get['type'](){return _0x28f6c8['CIRCLE_SCAN'];}[_0x43bf95(0x4c7)](){const _0x33f964=_0x43bf95;let _0x1aab2f=_0x5e5f93[_0x33f964(0x432)](this[_0x33f964(0x691)]),_0x26a464=_0x34d1e5['Cesium'][_0x33f964(0x7a1)]['WGS84'][_0x33f964(0x3d1)](_0x1aab2f,new _0x34d1e5[(_0x33f964(0x7aa))][(_0x33f964(0x982))]()),_0x1767e7=this;this['_delegate']=new _0x34d1e5[(_0x33f964(0x7aa))][(_0x33f964(0x14f))]({'name':_0x3f7522[_0x33f964(0x3ef)](),'fragmentShader':_0x1ace0b,'uniforms':{'centerWC':function(){return _0x1aab2f;},'normalWC':function(){return _0x26a464;},'radius':function(){const _0x25f896=_0x33f964;return _0x1767e7[_0x25f896(0x4b0)];},'speed':function(){const _0x19744c=_0x33f964;return _0x1767e7[_0x19744c(0x7df)];},'color':function(){const _0x3190a6=_0x33f964;return _0x1767e7[_0x3190a6(0x993)];}}});}[_0x43bf95(0x9ba)](){const _0x454092=_0x43bf95;return!this[_0x454092(0xaa1)]&&this[_0x454092(0x4c7)](),this['_delegate']&&this[_0x454092(0x3f7)][_0x454092(0x148)][_0x454092(0x744)][_0x454092(0x45f)](this[_0x454092(0xaa1)]),this;}[_0x43bf95(0x86d)](){const _0x56d306=_0x43bf95;return this[_0x56d306(0xaa1)]&&this[_0x56d306(0x3f7)][_0x56d306(0x148)]['postProcessStages']['remove'](this[_0x56d306(0xaa1)]),this[_0x56d306(0xaa1)]=void 0x0,this;}};_0x28f6c8[_0x43bf95(0x65e)]=_0x43bf95(0x7c2);var _0x4af2be=_0x49328f,_0x5782f2=class extends _0x3782bd{constructor(_0x4be36a,_0x1e9d66={}){const _0x4a5f60=_0x43bf95;super(_0x4be36a),this[_0x4a5f60(0x674)]=_0x1e9d66,this[_0x4a5f60(0x387)]=[],this[_0x4a5f60(0x2bb)]=[0x3],this[_0x4a5f60(0x285)]=0x0,this[_0x4a5f60(0x145)]=void 0x0;}get['type'](){const _0x1046d0=_0x43bf95;return _0x28f6c8[_0x1046d0(0x63b)];}set['positions'](_0x112741){const _0x377981=_0x43bf95;this[_0x377981(0x387)]=_0x16f48b[_0x377981(0xa8b)](_0x112741);}get[_0x43bf95(0x752)](){const _0x1ec263=_0x43bf95;return this[_0x1ec263(0x387)];}set[_0x43bf95(0x89b)](_0x276541){const _0x553888=_0x43bf95;this[_0x553888(0x2bb)]=_0x276541;}get['durations'](){const _0x57f296=_0x43bf95;return this[_0x57f296(0x2bb)];}['_cameraFly'](){const _0x319d03=_0x43bf95;let _0x391a11=this,_0x3c5ceb=this[_0x319d03(0x3f7)][_0x319d03(0x698)],_0x385e54=this[_0x319d03(0x387)][this[_0x319d03(0x285)]],_0x2e4628=()=>{const _0x7eb3a0=_0x319d03;let _0x3473c2=_0x391a11[_0x7eb3a0(0x387)][_0x391a11[_0x7eb3a0(0x285)]+0x1];_0x3473c2?(_0x391a11['_currentIndex']++,_0x391a11[_0x7eb3a0(0x285)]<=_0x391a11[_0x7eb3a0(0x387)][_0x7eb3a0(0x6a2)]-0x1&&(_0x391a11[_0x7eb3a0(0x145)]=setTimeout(()=>{const _0x26f832=_0x7eb3a0;_0x391a11[_0x26f832(0x9b0)]();},(_0x391a11[_0x7eb3a0(0x674)][_0x7eb3a0(0x2ca)]||0x1)*0x3e8))):!_0x3473c2&&_0x391a11[_0x7eb3a0(0x674)]['loop']&&(_0x391a11['_currentIndex']=0x0,_0x391a11[_0x7eb3a0(0x145)]=setTimeout(()=>{const _0x105fee=_0x7eb3a0;_0x391a11[_0x105fee(0x9b0)]();},(_0x391a11[_0x7eb3a0(0x674)][_0x7eb3a0(0x2ca)]||0x1)*0x3e8)),_0x391a11[_0x7eb3a0(0x674)]['callback']&&_0x391a11[_0x7eb3a0(0x674)][_0x7eb3a0(0x7cc)](_0x391a11['_currentIndex']);};_0x385e54&&_0x3c5ceb[_0x319d03(0xa30)]({'destination':_0x5e5f93[_0x319d03(0x432)](_0x385e54),'orientation':{'heading':_0x34d1e5[_0x319d03(0x7aa)][_0x319d03(0x72b)][_0x319d03(0x2b0)](_0x385e54['heading']),'pitch':_0x34d1e5[_0x319d03(0x7aa)][_0x319d03(0x72b)]['toRadians'](_0x385e54[_0x319d03(0x442)]),'roll':_0x34d1e5[_0x319d03(0x7aa)][_0x319d03(0x72b)][_0x319d03(0x2b0)](_0x385e54[_0x319d03(0x193)])},'complete':_0x2e4628,'duration':this[_0x319d03(0x2bb)]['length']===0x1?this[_0x319d03(0x2bb)][0x0]:this[_0x319d03(0x2bb)][this[_0x319d03(0x285)]]});}[_0x43bf95(0x9ba)](){const _0x2da888=_0x43bf95;return this[_0x2da888(0x387)]&&this[_0x2da888(0x387)][_0x2da888(0x6a2)]&&(this[_0x2da888(0x285)]=0x0,this['_cameraFly']()),this;}['pause'](){const _0x3a11cb=_0x43bf95;return this[_0x3a11cb(0x3f7)][_0x3a11cb(0x698)]['cancelFlight'](),this[_0x3a11cb(0x145)]&&clearTimeout(this[_0x3a11cb(0x145)]),this;}[_0x43bf95(0x347)](){const _0x29a6dc=_0x43bf95;return this[_0x29a6dc(0x387)]&&this[_0x29a6dc(0x387)][_0x29a6dc(0x6a2)]&&this[_0x29a6dc(0x9b0)](),this;}};_0x28f6c8[_0x43bf95(0x63b)]=_0x43bf95(0x19b);var _0x4337a5=_0x5782f2,_0x23f919=class extends _0x3782bd{constructor(_0x204c92,_0x254414={}){const _0x35b1e6=_0x43bf95;super(_0x204c92),this[_0x35b1e6(0x674)]=_0x254414;}get[_0x43bf95(0x9cf)](){return _0x28f6c8['GLOBE_ROTATE'];}['_icrf'](_0x48165b,_0x6e5ee1){const _0x11937f=_0x43bf95;if(_0x48165b['mode']!==_0x34d1e5[_0x11937f(0x7aa)][_0x11937f(0xba)]['SCENE3D'])return!0x0;let _0x3b6f1f=_0x34d1e5[_0x11937f(0x7aa)]['Transforms'][_0x11937f(0xe5)](_0x6e5ee1);if(_0x3b6f1f){let _0x2e4e8e=this[_0x11937f(0x3f7)][_0x11937f(0x698)],_0x5f0db6=_0x34d1e5[_0x11937f(0x7aa)]['Cartesian3'][_0x11937f(0x5c3)](_0x2e4e8e['position']),_0xe661e7=_0x34d1e5['Cesium'][_0x11937f(0x5ee)][_0x11937f(0x90c)](_0x3b6f1f);_0x2e4e8e[_0x11937f(0x5ec)](_0xe661e7,_0x5f0db6);}}[_0x43bf95(0x4ac)](){const _0x1a9690=_0x43bf95;this[_0x1a9690(0x3f7)][_0x1a9690(0xaad)][_0x1a9690(0x304)]=this[_0x1a9690(0x674)][_0x1a9690(0x178)]||0xc*0x3e8,this[_0x1a9690(0x3f7)]['camera'][_0x1a9690(0x5ec)](_0x34d1e5[_0x1a9690(0x7aa)][_0x1a9690(0x5ee)][_0x1a9690(0x96d)]),this[_0x1a9690(0x3f7)][_0x1a9690(0x148)][_0x1a9690(0x925)][_0x1a9690(0x278)](this[_0x1a9690(0x197)],this);}['_unbindEvent'](){const _0x2b7342=_0x43bf95;this['_viewer'][_0x2b7342(0xaad)][_0x2b7342(0x304)]=0x1,this[_0x2b7342(0x3f7)][_0x2b7342(0x698)][_0x2b7342(0x5ec)](_0x34d1e5['Cesium'][_0x2b7342(0x5ee)][_0x2b7342(0x96d)]),this[_0x2b7342(0x3f7)][_0x2b7342(0x148)][_0x2b7342(0x925)][_0x2b7342(0x97c)](this[_0x2b7342(0x197)],this);}};_0x28f6c8[_0x43bf95(0x24c)]=_0x43bf95(0x3c1);var _0x375f82=_0x23f919,_0x3fcc60=_0x43bf95(0x399),_0x5c0aa5=class extends _0x3782bd{constructor(_0x19a1cf,_0x23d555,_0x3ee99a,_0x18b57f={}){const _0x3cdf94=_0x43bf95;super(_0x19a1cf),this[_0x3cdf94(0x691)]=_0x16f48b[_0x3cdf94(0x81a)](_0x23d555),this[_0x3cdf94(0x4b0)]=_0x3ee99a||0x64,this[_0x3cdf94(0x993)]=_0x18b57f[_0x3cdf94(0x124)]||_0x34d1e5[_0x3cdf94(0x7aa)][_0x3cdf94(0x7d2)]['BLUE'],this[_0x3cdf94(0x7df)]=_0x18b57f[_0x3cdf94(0x178)]||0x3,this[_0x3cdf94(0xaa1)]=void 0x0;}get[_0x43bf95(0x9cf)](){const _0x15b250=_0x43bf95;return _0x28f6c8[_0x15b250(0xa48)];}[_0x43bf95(0x4c7)](){const _0x588f9b=_0x43bf95;let _0x8f079d=_0x5e5f93[_0x588f9b(0x432)](this[_0x588f9b(0x691)]),_0x5e6b9a=_0x34d1e5['Cesium']['Ellipsoid'][_0x588f9b(0x423)][_0x588f9b(0x3d1)](_0x8f079d,new _0x34d1e5['Cesium']['Cartesian3']()),_0x2df172=new Date()['getTime'](),_0x4e0141=this;this[_0x588f9b(0xaa1)]=new _0x34d1e5[(_0x588f9b(0x7aa))][(_0x588f9b(0x14f))]({'name':_0x3f7522[_0x588f9b(0x3ef)](),'fragmentShader':_0x3fcc60,'uniforms':{'centerWC':function(){return _0x8f079d;},'planeNormalWC':function(){return _0x5e6b9a;},'lineNormalWC':function(){const _0x41de42=_0x588f9b;let _0x50b5bd=new _0x34d1e5['Cesium'][(_0x41de42(0x158))](),_0x5b8fcd=new _0x34d1e5[(_0x41de42(0x7aa))][(_0x41de42(0x72d))](),_0x9702d=_0x34d1e5[_0x41de42(0x7aa)][_0x41de42(0x982)][_0x41de42(0x5df)](_0x34d1e5['Cesium'][_0x41de42(0x982)]['UNIT_Z'],_0x5e6b9a,new _0x34d1e5[(_0x41de42(0x7aa))][(_0x41de42(0x982))]()),_0x3b2417=new Date()[_0x41de42(0x91b)](),_0x5a1968=_0x34d1e5[_0x41de42(0x7aa)][_0x41de42(0x72b)]['PI']*0x2*((_0x3b2417-_0x2df172)/0x2710)*_0x4e0141['_speed'];return _0x34d1e5['Cesium']['Quaternion']['fromAxisAngle'](_0x5e6b9a,_0x5a1968,_0x50b5bd),_0x34d1e5[_0x41de42(0x7aa)][_0x41de42(0x72d)][_0x41de42(0x1d2)](_0x50b5bd,_0x5b8fcd),_0x34d1e5[_0x41de42(0x7aa)][_0x41de42(0x72d)][_0x41de42(0xa69)](_0x5b8fcd,_0x9702d,_0x9702d),_0x34d1e5[_0x41de42(0x7aa)][_0x41de42(0x982)][_0x41de42(0x732)](_0x9702d,_0x9702d),_0x9702d;},'radius':function(){const _0x43b5c4=_0x588f9b;return _0x4e0141[_0x43b5c4(0x4b0)];},'color':function(){return _0x4e0141['_color'];}}});}[_0x43bf95(0x9ba)](){const _0x3a442d=_0x43bf95;return!this[_0x3a442d(0xaa1)]&&this[_0x3a442d(0x4c7)](),this[_0x3a442d(0xaa1)]&&this[_0x3a442d(0x3f7)]['scene'][_0x3a442d(0x744)][_0x3a442d(0x45f)](this[_0x3a442d(0xaa1)]),this;}[_0x43bf95(0x86d)](){const _0x452541=_0x43bf95;return this[_0x452541(0xaa1)]&&this[_0x452541(0x3f7)]['scene']['postProcessStages'][_0x452541(0x109)](this[_0x452541(0xaa1)]),this[_0x452541(0xaa1)]=void 0x0,this;}};_0x28f6c8[_0x43bf95(0xa48)]='radar_scan';var _0x15616a=_0x5c0aa5,_0x17c459=class{constructor(_0xff9159){const _0x183790=_0x43bf95;this[_0x183790(0x3f7)]=_0xff9159,this['_delegate']=void 0x0,this[_0x183790(0x8d3)]=!0x1,this[_0x183790(0x771)]=0x1,this['_selected']=[],this['_state']=_0x4075ae['INITIALIZED'];}get['type'](){return'black_and_white';}set[_0x43bf95(0x35a)](_0x3e2a79){const _0x257da2=_0x43bf95;this[_0x257da2(0x8d3)]=_0x3e2a79,!this[_0x257da2(0xaa1)]&&this[_0x257da2(0x4cb)](),this[_0x257da2(0xaa1)][_0x257da2(0x776)]=_0x3e2a79,this[_0x257da2(0x558)]=_0x3e2a79?_0x4075ae['ENABLED']:_0x4075ae['DISABLED'];}get[_0x43bf95(0x35a)](){const _0x4373ad=_0x43bf95;return this[_0x4373ad(0x8d3)];}set['gradations'](_0x76859e){const _0x4b78b2=_0x43bf95;this[_0x4b78b2(0x771)]=_0x76859e,this['_delegate']&&(this[_0x4b78b2(0xaa1)][_0x4b78b2(0x2eb)][_0x4b78b2(0x445)]=_0x76859e);}get[_0x43bf95(0x445)](){const _0x324aa2=_0x43bf95;return this[_0x324aa2(0x771)];}set['selected'](_0x564d4e){const _0x3160a0=_0x43bf95;this[_0x3160a0(0x5ae)]=_0x564d4e,this['_delegate']&&(this[_0x3160a0(0xaa1)][_0x3160a0(0x1f2)]=_0x564d4e);}get['selected'](){const _0x3fe090=_0x43bf95;return this[_0x3fe090(0x5ae)];}[_0x43bf95(0x4cb)](){const _0x218c8e=_0x43bf95;this[_0x218c8e(0xaa1)]=_0x34d1e5[_0x218c8e(0x7aa)][_0x218c8e(0x19e)][_0x218c8e(0x76b)](),this[_0x218c8e(0xaa1)]&&(this[_0x218c8e(0xaa1)]['uniforms'][_0x218c8e(0x445)]=this[_0x218c8e(0x771)],this['_viewer']['scene'][_0x218c8e(0x744)][_0x218c8e(0x45f)](this[_0x218c8e(0xaa1)]));}},_0x28ef05=_0x17c459,_0x4a6889=class{constructor(_0x3df3a1){const _0x215e83=_0x43bf95;this[_0x215e83(0x3f7)]=_0x3df3a1,this[_0x215e83(0x8d3)]=!0x1,this['_contrast']=0x80,this[_0x215e83(0x32b)]=-0.3,this[_0x215e83(0x927)]=!0x1,this[_0x215e83(0x4b5)]=0x1,this['_sigma']=3.8,this[_0x215e83(0x2d9)]=0x5,this[_0x215e83(0x5ae)]=[],this[_0x215e83(0x558)]=_0x4075ae[_0x215e83(0x5d2)];}get['type'](){const _0x310604=_0x43bf95;return _0x310604(0x9ff);}set['enable'](_0x3f8f89){const _0x1bebaf=_0x43bf95;this[_0x1bebaf(0x8d3)]=_0x3f8f89,!this['_delegate']&&this[_0x1bebaf(0x4cb)](),this[_0x1bebaf(0xaa1)][_0x1bebaf(0x776)]=_0x3f8f89,this[_0x1bebaf(0x558)]=_0x3f8f89?_0x4075ae['ENABLED']:_0x4075ae['DISABLED'];}get['enable'](){const _0x5a2d4f=_0x43bf95;return this[_0x5a2d4f(0x8d3)];}set[_0x43bf95(0x9f5)](_0xa1afbc){const _0xf93ebe=_0x43bf95;this['_contrast']=_0xa1afbc,this[_0xf93ebe(0xaa1)]&&(this['_delegate'][_0xf93ebe(0x2eb)][_0xf93ebe(0x9f5)]=_0xa1afbc);}get['contrast'](){const _0x392d1e=_0x43bf95;return this[_0x392d1e(0x5c4)];}set[_0x43bf95(0x407)](_0x288463){const _0x4dbeb0=_0x43bf95;this[_0x4dbeb0(0x32b)]=_0x288463,this[_0x4dbeb0(0xaa1)]&&(this['_delegate'][_0x4dbeb0(0x2eb)][_0x4dbeb0(0x407)]=_0x288463);}get[_0x43bf95(0x407)](){const _0x20ddc6=_0x43bf95;return this[_0x20ddc6(0x32b)];}set['glowOnly'](_0x35d120){const _0x7ff2a6=_0x43bf95;this[_0x7ff2a6(0x927)]=_0x35d120,this[_0x7ff2a6(0xaa1)]&&(this[_0x7ff2a6(0xaa1)][_0x7ff2a6(0x2eb)][_0x7ff2a6(0x8a5)]=_0x35d120);}get[_0x43bf95(0x8a5)](){const _0xa8ae43=_0x43bf95;return this[_0xa8ae43(0x927)];}set[_0x43bf95(0x912)](_0x510358){const _0x5e3b9f=_0x43bf95;this['_delta']=_0x510358,this[_0x5e3b9f(0xaa1)]&&(this[_0x5e3b9f(0xaa1)][_0x5e3b9f(0x2eb)][_0x5e3b9f(0x912)]=_0x510358);}get['delta'](){const _0x502682=_0x43bf95;return this[_0x502682(0x4b5)];}set['sigma'](_0x1b11db){const _0x3ee2fe=_0x43bf95;this[_0x3ee2fe(0x756)]=_0x1b11db,this[_0x3ee2fe(0xaa1)]&&(this[_0x3ee2fe(0xaa1)][_0x3ee2fe(0x2eb)][_0x3ee2fe(0x4f8)]=_0x1b11db);}get[_0x43bf95(0x4f8)](){return this['_sigma'];}set[_0x43bf95(0x7ac)](_0x291a17){const _0x4d354b=_0x43bf95;this[_0x4d354b(0x2d9)]=_0x291a17,this[_0x4d354b(0xaa1)]&&(this[_0x4d354b(0xaa1)]['uniforms'][_0x4d354b(0x7ac)]=_0x291a17);}get[_0x43bf95(0x7ac)](){const _0x1dc640=_0x43bf95;return this[_0x1dc640(0x2d9)];}set[_0x43bf95(0x1f2)](_0x4d3aec){const _0x4fd6a9=_0x43bf95;this[_0x4fd6a9(0x5ae)]=_0x4d3aec,this[_0x4fd6a9(0xaa1)]&&(this[_0x4fd6a9(0xaa1)][_0x4fd6a9(0x1f2)]=_0x4d3aec);}get[_0x43bf95(0x1f2)](){return this['_selected'];}[_0x43bf95(0x4cb)](){const _0x3fc26a=_0x43bf95;this[_0x3fc26a(0xaa1)]=this[_0x3fc26a(0x3f7)]['scene'][_0x3fc26a(0x744)][_0x3fc26a(0x9ff)],this['_delegate'][_0x3fc26a(0x2eb)][_0x3fc26a(0x9f5)]=this[_0x3fc26a(0x5c4)],this[_0x3fc26a(0xaa1)][_0x3fc26a(0x2eb)][_0x3fc26a(0x407)]=this[_0x3fc26a(0x32b)],this[_0x3fc26a(0xaa1)]['uniforms']['glowOnly']=this[_0x3fc26a(0x927)],this['_delegate']['uniforms']['delta']=this[_0x3fc26a(0x4b5)],this[_0x3fc26a(0xaa1)][_0x3fc26a(0x2eb)]['sigma']=this[_0x3fc26a(0x756)],this[_0x3fc26a(0xaa1)][_0x3fc26a(0x2eb)][_0x3fc26a(0x7ac)]=this[_0x3fc26a(0x2d9)];}},_0x569c89=_0x4a6889,_0x5f4268=class{constructor(_0x5ae1fd){const _0x24636c=_0x43bf95;this[_0x24636c(0x3f7)]=_0x5ae1fd,this[_0x24636c(0xaa1)]=void 0x0,this['_enable']=!0x1,this[_0x24636c(0x928)]=0x1,this[_0x24636c(0x5ae)]=[],this[_0x24636c(0x558)]=_0x4075ae[_0x24636c(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x163e43=_0x43bf95;return _0x163e43(0x407);}set[_0x43bf95(0x35a)](_0x460506){const _0x1bba74=_0x43bf95;this['_enable']=_0x460506,!this[_0x1bba74(0xaa1)]&&this['_createPostProcessStage'](),this[_0x1bba74(0xaa1)][_0x1bba74(0x776)]=_0x460506,this[_0x1bba74(0x558)]=_0x460506?_0x4075ae[_0x1bba74(0x4a0)]:_0x4075ae[_0x1bba74(0x6b6)];}get['enable'](){const _0x20b5ae=_0x43bf95;return this[_0x20b5ae(0x8d3)];}set[_0x43bf95(0x7f7)](_0x5ba0db){const _0x418198=_0x43bf95;this['_intensity']=_0x5ba0db,this[_0x418198(0xaa1)]&&(this[_0x418198(0xaa1)][_0x418198(0x2eb)][_0x418198(0x407)]=_0x5ba0db);}get[_0x43bf95(0x7f7)](){const _0x2cfead=_0x43bf95;return this[_0x2cfead(0x928)];}set[_0x43bf95(0x1f2)](_0x5f3795){const _0x29bda6=_0x43bf95;this[_0x29bda6(0x5ae)]=_0x5f3795,this[_0x29bda6(0xaa1)]&&(this[_0x29bda6(0xaa1)][_0x29bda6(0x1f2)]=_0x5f3795);}get[_0x43bf95(0x1f2)](){const _0x110ccf=_0x43bf95;return this[_0x110ccf(0x5ae)];}[_0x43bf95(0x4cb)](){const _0x5c7aed=_0x43bf95;this['_delegate']=_0x34d1e5[_0x5c7aed(0x7aa)][_0x5c7aed(0x19e)]['createBrightnessStage'](),this[_0x5c7aed(0xaa1)]&&(this[_0x5c7aed(0xaa1)][_0x5c7aed(0x2eb)]['brightness']=this[_0x5c7aed(0x928)],this['_viewer'][_0x5c7aed(0x148)][_0x5c7aed(0x744)][_0x5c7aed(0x45f)](this[_0x5c7aed(0xaa1)]));}},_0x1708da=_0x5f4268,_0x62ac11=class{constructor(_0x32a20a){const _0x5ae258=_0x43bf95;this['_viewer']=_0x32a20a,this[_0x5ae258(0xaa1)]=void 0x0,this[_0x5ae258(0x8d3)]=!0x1,this[_0x5ae258(0x2ee)]=0x57,this['_delta']=0x1,this[_0x5ae258(0x756)]=3.8,this['_stepSize']=2.5,this[_0x5ae258(0x5ae)]=[],this['_state']=_0x4075ae[_0x5ae258(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x215a00=_0x43bf95;return _0x215a00(0x6ef);}set[_0x43bf95(0x35a)](_0x622efa){const _0x3ab6e4=_0x43bf95;this[_0x3ab6e4(0x8d3)]=_0x622efa,_0x34d1e5['Cesium'][_0x3ab6e4(0x19e)][_0x3ab6e4(0x953)](this[_0x3ab6e4(0x3f7)][_0x3ab6e4(0x148)])&&!this[_0x3ab6e4(0xaa1)]&&this[_0x3ab6e4(0x4cb)](),this[_0x3ab6e4(0xaa1)]&&(this[_0x3ab6e4(0xaa1)][_0x3ab6e4(0x776)]=_0x622efa),this[_0x3ab6e4(0x558)]=_0x622efa?_0x4075ae[_0x3ab6e4(0x4a0)]:_0x4075ae['DISABLED'];}get[_0x43bf95(0x35a)](){const _0x399987=_0x43bf95;return this[_0x399987(0x8d3)];}set[_0x43bf95(0x713)](_0x72a1ae){const _0x516a53=_0x43bf95;this[_0x516a53(0x2ee)]=_0x72a1ae,this[_0x516a53(0xaa1)]&&(this['_delegate'][_0x516a53(0x2eb)][_0x516a53(0x713)]=_0x72a1ae);}get['focalDistance'](){const _0x2de26e=_0x43bf95;return this[_0x2de26e(0x2ee)];}set['delta'](_0x274256){const _0x43ce8c=_0x43bf95;this[_0x43ce8c(0x4b5)]=_0x274256,this[_0x43ce8c(0xaa1)]&&(this[_0x43ce8c(0xaa1)][_0x43ce8c(0x2eb)][_0x43ce8c(0x912)]=_0x274256);}get[_0x43bf95(0x912)](){const _0xc55e63=_0x43bf95;return this[_0xc55e63(0x4b5)];}set[_0x43bf95(0x4f8)](_0x23d960){const _0x5d5c06=_0x43bf95;this['_sigma']=_0x23d960,this['_delegate']&&(this[_0x5d5c06(0xaa1)]['uniforms'][_0x5d5c06(0x4f8)]=_0x23d960);}get['sigma'](){const _0x4c33c1=_0x43bf95;return this[_0x4c33c1(0x756)];}set[_0x43bf95(0x7ac)](_0x4aa233){const _0x18ec58=_0x43bf95;this[_0x18ec58(0x2d9)]=_0x4aa233,this[_0x18ec58(0xaa1)]&&(this[_0x18ec58(0xaa1)][_0x18ec58(0x2eb)][_0x18ec58(0x7ac)]=_0x4aa233);}get['stepSize'](){const _0x4bfed9=_0x43bf95;return this[_0x4bfed9(0x2d9)];}set[_0x43bf95(0x1f2)](_0x2d811e){const _0x530bd9=_0x43bf95;this[_0x530bd9(0x5ae)]=_0x2d811e,this[_0x530bd9(0xaa1)]&&(this[_0x530bd9(0xaa1)][_0x530bd9(0x1f2)]=_0x2d811e);}get[_0x43bf95(0x1f2)](){return this['_selected'];}['_createPostProcessStage'](){const _0x1c2a6b=_0x43bf95;this['_delegate']=_0x34d1e5[_0x1c2a6b(0x7aa)][_0x1c2a6b(0x19e)][_0x1c2a6b(0x91a)](),this[_0x1c2a6b(0xaa1)]&&(this['_delegate'][_0x1c2a6b(0x2eb)][_0x1c2a6b(0x713)]=this[_0x1c2a6b(0x2ee)],this[_0x1c2a6b(0xaa1)][_0x1c2a6b(0x2eb)][_0x1c2a6b(0x912)]=this[_0x1c2a6b(0x4b5)],this['_delegate'][_0x1c2a6b(0x2eb)][_0x1c2a6b(0x4f8)]=this[_0x1c2a6b(0x756)],this[_0x1c2a6b(0xaa1)][_0x1c2a6b(0x2eb)][_0x1c2a6b(0x7ac)]=this[_0x1c2a6b(0x2d9)],this[_0x1c2a6b(0x3f7)][_0x1c2a6b(0x148)][_0x1c2a6b(0x744)]['add'](this[_0x1c2a6b(0xaa1)]));}},_0x5504a9=_0x62ac11,_0x35620e=class{constructor(_0x3d4611){const _0x428250=_0x43bf95;this['_viewer']=_0x3d4611,this[_0x428250(0xaa1)]=void 0x0,this[_0x428250(0x8d3)]=!0x1,this['_intensity']=0x6,this[_0x428250(0x12f)]=0x3d,this[_0x428250(0x1c2)]=0.4,this[_0x428250(0x601)]=0.4,this[_0x428250(0x5ae)]=[],this[_0x428250(0x558)]=_0x4075ae[_0x428250(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x3194c5=_0x43bf95;return _0x3194c5(0xa0);}set[_0x43bf95(0x35a)](_0x51f603){const _0x3b625f=_0x43bf95;this['_enable']=_0x51f603,!this['_delegate']&&this[_0x3b625f(0x4cb)](),this[_0x3b625f(0xaa1)]['enabled']=_0x51f603,this['_state']=_0x51f603?_0x4075ae[_0x3b625f(0x4a0)]:_0x4075ae[_0x3b625f(0x6b6)];}get[_0x43bf95(0x35a)](){const _0x35849a=_0x43bf95;return this[_0x35849a(0x8d3)];}set['intensity'](_0x160b23){const _0x190e0d=_0x43bf95;this[_0x190e0d(0x928)]=_0x160b23,this[_0x190e0d(0xaa1)]&&(this[_0x190e0d(0xaa1)]['uniforms']['intensity']=_0x160b23);}get[_0x43bf95(0x7f7)](){const _0x28287c=_0x43bf95;return this[_0x28287c(0x928)];}set[_0x43bf95(0x4e5)](_0x5d39ce){const _0x44d8fe=_0x43bf95;this[_0x44d8fe(0x12f)]=_0x5d39ce,this[_0x44d8fe(0xaa1)]&&(this[_0x44d8fe(0xaa1)][_0x44d8fe(0x2eb)][_0x44d8fe(0x4e5)]=_0x5d39ce);}get[_0x43bf95(0x4e5)](){return this['_distortion'];}set[_0x43bf95(0x4db)](_0x44a419){const _0x1b50b6=_0x43bf95;this[_0x1b50b6(0x1c2)]=_0x44a419,this[_0x1b50b6(0xaa1)]&&(this[_0x1b50b6(0xaa1)][_0x1b50b6(0x2eb)]['dirtAmount']=_0x44a419);}get[_0x43bf95(0x4db)](){const _0x4a28a4=_0x43bf95;return this[_0x4a28a4(0x1c2)];}set[_0x43bf95(0x1a6)](_0x4e4aab){const _0x499189=_0x43bf95;this['_haloWidth']=_0x4e4aab,this['_delegate']&&(this[_0x499189(0xaa1)][_0x499189(0x2eb)][_0x499189(0x1a6)]=_0x4e4aab);}get[_0x43bf95(0x1a6)](){const _0x1badcc=_0x43bf95;return this[_0x1badcc(0x601)];}set[_0x43bf95(0x1f2)](_0x113de6){const _0x23e232=_0x43bf95;this[_0x23e232(0x5ae)]=_0x113de6,this[_0x23e232(0xaa1)]&&(this['_delegate']['selected']=_0x113de6);}get[_0x43bf95(0x1f2)](){const _0x1b15a3=_0x43bf95;return this[_0x1b15a3(0x5ae)];}[_0x43bf95(0x4cb)](){const _0x662878=_0x43bf95;this['_delegate']=_0x34d1e5[_0x662878(0x7aa)][_0x662878(0x19e)][_0x662878(0x1a3)](),this[_0x662878(0xaa1)]&&(this[_0x662878(0xaa1)][_0x662878(0x2eb)][_0x662878(0x7f7)]=this[_0x662878(0x928)],this[_0x662878(0xaa1)]['uniforms'][_0x662878(0x4e5)]=this[_0x662878(0x12f)],this[_0x662878(0xaa1)][_0x662878(0x2eb)][_0x662878(0x4db)]=this['_dirtAmount'],this['_delegate'][_0x662878(0x2eb)]['haloWidth']=this[_0x662878(0x601)],this[_0x662878(0x3f7)][_0x662878(0x148)][_0x662878(0x744)][_0x662878(0x45f)](this['_delegate']));}},_0x2d2c45=_0x35620e,_0x46c7ff=class{constructor(_0x1c745e){const _0x606ef0=_0x43bf95;this[_0x606ef0(0x3f7)]=_0x1c745e,this['_enable']=!0x1,this[_0x606ef0(0x5ae)]=[],this[_0x606ef0(0x558)]=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){return'night';}set[_0x43bf95(0x35a)](_0x235a7d){const _0x2349c2=_0x43bf95;this[_0x2349c2(0x8d3)]=_0x235a7d,!this[_0x2349c2(0xaa1)]&&this['_createPostProcessStage'](),this[_0x2349c2(0xaa1)][_0x2349c2(0x776)]=_0x235a7d,this[_0x2349c2(0x558)]=_0x235a7d?_0x4075ae[_0x2349c2(0x4a0)]:_0x4075ae['DISABLED'];}get[_0x43bf95(0x35a)](){const _0x6d1616=_0x43bf95;return this[_0x6d1616(0x8d3)];}set[_0x43bf95(0x1f2)](_0x4435ef){const _0x38358e=_0x43bf95;this[_0x38358e(0x5ae)]=_0x4435ef,this['_delegate']&&(this['_delegate'][_0x38358e(0x1f2)]=_0x4435ef);}get[_0x43bf95(0x1f2)](){const _0x293eef=_0x43bf95;return this[_0x293eef(0x5ae)];}[_0x43bf95(0x4cb)](){const _0x2693d5=_0x43bf95;this['_delegate']=_0x34d1e5['Cesium'][_0x2693d5(0x19e)][_0x2693d5(0x331)](),this['_delegate']&&this['_viewer'][_0x2693d5(0x148)]['postProcessStages'][_0x2693d5(0x45f)](this[_0x2693d5(0xaa1)]);}},_0x539278=_0x46c7ff,_0x5aace6=class{constructor(_0x36b53e){const _0x59e15f=_0x43bf95;this[_0x59e15f(0x3f7)]=_0x36b53e,this[_0x59e15f(0xaa1)]=void 0x0,this[_0x59e15f(0x8d3)]=!0x1,this[_0x59e15f(0x993)]=_0x34d1e5[_0x59e15f(0x7aa)][_0x59e15f(0x7d2)][_0x59e15f(0x4fa)],this[_0x59e15f(0x8cb)]=0.5,this[_0x59e15f(0x5ae)]=[],this[_0x59e15f(0x558)]=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){const _0x2bda4d=_0x43bf95;return _0x2bda4d(0x392);}set['enable'](_0x53fdbf){const _0x5ac99f=_0x43bf95;this[_0x5ac99f(0x8d3)]=_0x53fdbf,_0x34d1e5[_0x5ac99f(0x7aa)]['PostProcessStageLibrary'][_0x5ac99f(0x743)](this[_0x5ac99f(0x3f7)][_0x5ac99f(0x148)])&&!this[_0x5ac99f(0xaa1)]&&this[_0x5ac99f(0x4cb)](),this['_delegate']&&(this[_0x5ac99f(0xaa1)][_0x5ac99f(0x776)]=_0x53fdbf),this['_state']=_0x53fdbf?_0x4075ae['ENABLED']:_0x4075ae[_0x5ac99f(0x6b6)];}get[_0x43bf95(0x35a)](){const _0x1f03fa=_0x43bf95;return this[_0x1f03fa(0x8d3)];}set[_0x43bf95(0x124)](_0x1eb4bd){const _0xce9c3a=_0x43bf95;this[_0xce9c3a(0x993)]=_0x1eb4bd,this[_0xce9c3a(0xaa1)]&&(this[_0xce9c3a(0xaa1)][_0xce9c3a(0x2eb)][_0xce9c3a(0x124)]=_0x1eb4bd);}get[_0x43bf95(0x124)](){const _0x26c748=_0x43bf95;return this[_0x26c748(0x993)];}set[_0x43bf95(0x6a2)](_0x4f2c23){const _0x4f18f6=_0x43bf95;this[_0x4f18f6(0x8cb)]=_0x4f2c23,this[_0x4f18f6(0xaa1)]&&(this[_0x4f18f6(0xaa1)][_0x4f18f6(0x2eb)][_0x4f18f6(0x6a2)]=_0x4f2c23);}get[_0x43bf95(0x6a2)](){const _0x3acbd7=_0x43bf95;return this[_0x3acbd7(0x8cb)];}set[_0x43bf95(0x1f2)](_0xbf4d99){const _0x445f11=_0x43bf95;this[_0x445f11(0x5ae)]=_0xbf4d99,this[_0x445f11(0xaa1)]&&(this[_0x445f11(0xaa1)][_0x445f11(0x1f2)]=_0xbf4d99);}get['selected'](){const _0x477070=_0x43bf95;return this[_0x477070(0x5ae)];}[_0x43bf95(0x4cb)](){const _0x9003a9=_0x43bf95;this[_0x9003a9(0xaa1)]=_0x34d1e5['Cesium'][_0x9003a9(0x19e)][_0x9003a9(0x7f8)](),this['_delegate']&&(this[_0x9003a9(0xaa1)][_0x9003a9(0x2eb)][_0x9003a9(0x124)]=this[_0x9003a9(0x993)],this['_delegate']['uniforms'][_0x9003a9(0x6a2)]=this['_length'],this['_viewer'][_0x9003a9(0x148)]['postProcessStages'][_0x9003a9(0x45f)](this[_0x9003a9(0xaa1)]));}},_0x2f8169=_0x5aace6,_0x1c30eb='in\x20\x20vec2\x20v_textureCoordinates;\x0auniform\x20sampler2D\x20colorTexture;\x0auniform\x20sampler2D\x20depthTexture;\x0auniform\x20float\x20u_depthThreshold;\x0a\x0a\x0avoid\x20main(void)\x20{\x0a\x20\x20float\x20depth\x20=\x20czm_readDepth(depthTexture,\x20v_textureCoordinates);\x0a\x20\x20vec4\x20color\x20=\x20texture(colorTexture,\x20v_textureCoordinates);\x0a\x20\x20if(depth\x20<\x201.0\x20-\x20u_depthThreshold\x20){\x0a\x20\x20\x20\x20out_FragColor\x20=\x20color;\x0a\x20\x20}else\x20{\x0a\x20\x20\x20\x20out_FragColor\x20=\x20vec4(1.,0.,0.,1.);\x0a\x20\x20}\x0a}\x0a',_0x35e9e8=_0x43bf95(0x29a),_0x459209=class{constructor(_0x56962b){const _0x3852b7=_0x43bf95;this['_viewer']=_0x56962b,this[_0x3852b7(0xaa1)]=void 0x0,this[_0x3852b7(0x8d3)]=!0x1,this[_0x3852b7(0x7cb)]=0.00001,this['_color']=_0x34d1e5['Cesium'][_0x3852b7(0x7d2)]['RED'],this[_0x3852b7(0x558)]=_0x4075ae[_0x3852b7(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x364dc4=_0x43bf95;return _0x364dc4(0x224);}set[_0x43bf95(0x35a)](_0x16aa56){const _0x3e6800=_0x43bf95;this['_enable']=_0x16aa56,!this[_0x3e6800(0xaa1)]&&this[_0x3e6800(0x4cb)](),this[_0x3e6800(0xaa1)][_0x3e6800(0x776)]=_0x16aa56,this[_0x3e6800(0x558)]=_0x16aa56?_0x4075ae[_0x3e6800(0x4a0)]:_0x4075ae[_0x3e6800(0x6b6)];}get[_0x43bf95(0x35a)](){return this['_enable'];}set['depthThreshold'](_0x321001){const _0x56b726=_0x43bf95;this[_0x56b726(0x7cb)]=_0x321001;}get[_0x43bf95(0x94a)](){const _0xdd11da=_0x43bf95;return this[_0xdd11da(0x7cb)];}set[_0x43bf95(0x124)](_0x2c90d4){this['_color']=_0x2c90d4;}get[_0x43bf95(0x124)](){return this['_color'];}[_0x43bf95(0x4cb)](){const _0xfc8f4e=_0x43bf95;let _0x2ba16f=_0x34d1e5[_0xfc8f4e(0x7aa)]['PostProcessStageLibrary']['createEdgeDetectionStage'](),_0x23c360=this,_0x4b323e=new _0x34d1e5[(_0xfc8f4e(0x7aa))][(_0xfc8f4e(0x14f))]({'fragmentShader':_0x1c30eb,'uniforms':{'u_depthThreshold':function(){return _0x23c360['_depthThreshold'];}}}),_0x11b8d1=new _0x34d1e5[(_0xfc8f4e(0x7aa))]['PostProcessStage']({'fragmentShader':_0x35e9e8,'uniforms':{'u_silhouetteTexture':_0x2ba16f[_0xfc8f4e(0x130)],'u_redTexture':_0x4b323e[_0xfc8f4e(0x130)],'u_color':function(){return _0x23c360['_color'];}}});this[_0xfc8f4e(0xaa1)]=new _0x34d1e5[(_0xfc8f4e(0x7aa))][(_0xfc8f4e(0x682))]({'stages':[_0x2ba16f,_0x4b323e,_0x11b8d1],'inputPreviousStageTexture':!0x1,'uniforms':_0x2ba16f[_0xfc8f4e(0x2eb)]}),this[_0xfc8f4e(0x3f7)][_0xfc8f4e(0x148)][_0xfc8f4e(0x744)][_0xfc8f4e(0x45f)](this[_0xfc8f4e(0xaa1)]);}},_0x9a53bd=_0x459209,_0x34906b=class{constructor(_0x77d9b0){const _0x25cdda=_0x43bf95;if(!_0x77d9b0)throw Error(_0x25cdda(0x808));this[_0x25cdda(0x209)]=new _0x28ef05(_0x77d9b0),this[_0x25cdda(0x199)]=new _0x569c89(_0x77d9b0),this[_0x25cdda(0x32b)]=new _0x1708da(_0x77d9b0),this[_0x25cdda(0x6fa)]=new _0x5504a9(_0x77d9b0),this[_0x25cdda(0x2ec)]=new _0x2d2c45(_0x77d9b0),this['_night']=new _0x539278(_0x77d9b0),this['_silhouette']=new _0x2f8169(_0x77d9b0),this[_0x25cdda(0x83b)]=new _0x9a53bd(_0x77d9b0);}get[_0x43bf95(0x2fd)](){const _0xe11867=_0x43bf95;return this[_0xe11867(0x209)];}get['bloom'](){const _0x41c13d=_0x43bf95;return this[_0x41c13d(0x199)];}get[_0x43bf95(0x407)](){const _0x34cc74=_0x43bf95;return this[_0x34cc74(0x32b)];}get[_0x43bf95(0xf7)](){const _0x59d974=_0x43bf95;return this[_0x59d974(0x6fa)];}get[_0x43bf95(0x368)](){const _0x226721=_0x43bf95;return this[_0x226721(0x2ec)];}get[_0x43bf95(0x216)](){const _0x14cce=_0x43bf95;return this[_0x14cce(0xda)];}get[_0x43bf95(0x392)](){const _0xf130ae=_0x43bf95;return this[_0xf130ae(0x435)];}get[_0x43bf95(0x224)](){const _0x115656=_0x43bf95;return this[_0x115656(0x83b)];}},_0x2aca32=_0x34906b,_0x283071='in\x20vec2\x20v_textureCoordinates;\x0auniform\x20sampler2D\x20colorTexture;\x0auniform\x20sampler2D\x20depthTexture;\x0auniform\x20vec4\x20fogByDistance;\x0auniform\x20vec4\x20fogColor;\x0a\x0a\x0afloat\x20getDistance(sampler2D\x20depthTexture,\x20vec2\x20texCoords){\x0a\x20\x20float\x20depth\x20=\x20czm_unpackDepth(texture(depthTexture,\x20texCoords));\x0a\x20\x20if\x20(depth\x20==\x200.0)\x20{\x0a\x20\x20\x20\x20return\x20czm_infinity;\x0a\x20\x20}\x0a\x20\x20vec4\x20eyeCoordinate\x20=\x20czm_windowToEyeCoordinates(gl_FragCoord.xy,\x20depth);\x0a\x20\x20return\x20-eyeCoordinate.z\x20/\x20eyeCoordinate.w;\x0a}\x0a\x0a\x0afloat\x20interpolateByDistance(vec4\x20nearFarScalar,\x20float\x20distance){\x0a\x20\x20float\x20startDistance\x20=\x20nearFarScalar.x;\x0a\x20\x20float\x20startValue\x20=\x20nearFarScalar.y;\x0a\x20\x20float\x20endDistance\x20=\x20nearFarScalar.z;\x0a\x20\x20float\x20endValue\x20=\x20nearFarScalar.w;\x0a\x20\x20float\x20t\x20=\x20clamp((distance\x20-\x20startDistance)\x20/\x20(endDistance\x20-\x20startDistance),\x200.0,\x201.0);\x0a\x20\x20return\x20mix(startValue,\x20endValue,\x20t);\x0a}\x0a\x0avec4\x20alphaBlend(vec4\x20sourceColor,\x20vec4\x20destinationColor){\x0a\x20\x20return\x20sourceColor\x20*\x20vec4(sourceColor.aaa,\x201.0)\x20+\x20destinationColor\x20*\x20(1.0\x20-\x20sourceColor.a);\x0a}\x0a\x0avoid\x20main(void){\x0a\x20\x20float\x20distance\x20=\x20getDistance(depthTexture,\x20v_textureCoordinates);\x0a\x20\x20vec4\x20sceneColor\x20=\x20texture(colorTexture,\x20v_textureCoordinates);\x0a\x20\x20float\x20blendAmount\x20=\x20interpolateByDistance(fogByDistance,\x20distance);\x0a\x20\x20vec4\x20finalFogColor\x20=\x20vec4(fogColor.rgb,\x20fogColor.a\x20*\x20blendAmount);\x0a\x20\x20out_FragColor\x20=\x20alphaBlend(finalFogColor,\x20sceneColor);\x0a}\x0a',_0x22fe4c=class{constructor(_0xc4eb35){const _0xbc00dd=_0x43bf95;this['_id']=_0x3f7522[_0xbc00dd(0x3ef)](),this['_viewer']=_0xc4eb35,this[_0xbc00dd(0xaa1)]=void 0x0,this[_0xbc00dd(0x8d3)]=!0x1,this['_fogByDistance']={'near':0xa,'nearValue':0x0,'far':0x7d0,'farValue':0x1},this['_color']=new _0x34d1e5[(_0xbc00dd(0x7aa))][(_0xbc00dd(0x7d2))](0x0,0x0,0x0,0x1),this['_state']=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){const _0x32dc40=_0x43bf95;return _0x32dc40(0x13d);}set['enable'](_0x490426){const _0x18d68f=_0x43bf95;this['_enable']=_0x490426,_0x490426&&this[_0x18d68f(0x3f7)]&&!this['_delegate']&&this[_0x18d68f(0x4cb)](),this[_0x18d68f(0xaa1)]&&(this[_0x18d68f(0xaa1)][_0x18d68f(0x776)]=_0x490426);}get[_0x43bf95(0x35a)](){const _0x2aa7d5=_0x43bf95;return this[_0x2aa7d5(0x8d3)];}set[_0x43bf95(0x192)](_0x4c676f){const _0x3720bb=_0x43bf95;var _0x4cb84c,_0x2986ea,_0x6f7235,_0x3fc788;this['_fogByDistance']=_0x4c676f,this['_delegate']&&(this['_delegate'][_0x3720bb(0x2eb)][_0x3720bb(0x192)]=new _0x34d1e5[(_0x3720bb(0x7aa))]['Cartesian4'](((_0x4cb84c=this[_0x3720bb(0x2f9)])==null?void 0x0:_0x4cb84c[_0x3720bb(0x7cd)])||0xa,((_0x2986ea=this[_0x3720bb(0x2f9)])==null?void 0x0:_0x2986ea[_0x3720bb(0xd3)])||0x0,((_0x6f7235=this['_fogByDistance'])==null?void 0x0:_0x6f7235[_0x3720bb(0x7ed)])||0x7d0,((_0x3fc788=this[_0x3720bb(0x2f9)])==null?void 0x0:_0x3fc788[_0x3720bb(0x2ff)])||0x1));}get[_0x43bf95(0x192)](){return this['_fogByDistance'];}set[_0x43bf95(0x124)](_0xefc2ad){const _0x4c2989=_0x43bf95;this[_0x4c2989(0x993)]=_0xefc2ad,this[_0x4c2989(0xaa1)]&&(this[_0x4c2989(0xaa1)][_0x4c2989(0x2eb)][_0x4c2989(0x398)]=_0xefc2ad);}get[_0x43bf95(0x124)](){const _0x20affe=_0x43bf95;return this[_0x20affe(0x993)];}[_0x43bf95(0x4cb)](){const _0xb0b42e=_0x43bf95;var _0x5c120d,_0x59a767,_0x545390,_0x51fdec;this[_0xb0b42e(0xaa1)]=new _0x34d1e5[(_0xb0b42e(0x7aa))][(_0xb0b42e(0x14f))]({'name':this[_0xb0b42e(0x20a)],'fragmentShader':_0x283071,'uniforms':{'fogByDistance':new _0x34d1e5[(_0xb0b42e(0x7aa))]['Cartesian4'](((_0x5c120d=this[_0xb0b42e(0x2f9)])==null?void 0x0:_0x5c120d[_0xb0b42e(0x7cd)])||0xa,((_0x59a767=this[_0xb0b42e(0x2f9)])==null?void 0x0:_0x59a767['nearValue'])||0x0,((_0x545390=this[_0xb0b42e(0x2f9)])==null?void 0x0:_0x545390[_0xb0b42e(0x7ed)])||0xc8,((_0x51fdec=this['_fogByDistance'])==null?void 0x0:_0x51fdec[_0xb0b42e(0x2ff)])||0x1),'fogColor':this[_0xb0b42e(0x993)]}}),this[_0xb0b42e(0x3f7)][_0xb0b42e(0x148)][_0xb0b42e(0x744)][_0xb0b42e(0x45f)](this[_0xb0b42e(0xaa1)]);}},_0x43b286=_0x22fe4c,_0x2c20b2=_0x43bf95(0xaa8),_0x1b6e55=class{constructor(_0x7c6d9f){const _0xd1ef3c=_0x43bf95;this[_0xd1ef3c(0x20a)]=_0x3f7522[_0xd1ef3c(0x3ef)](),this['_viewer']=_0x7c6d9f,this[_0xd1ef3c(0xaa1)]=void 0x0,this[_0xd1ef3c(0x8d3)]=!0x1,this[_0xd1ef3c(0x7df)]=0xa,this['_mixNum']=0.5,this[_0xd1ef3c(0x558)]=_0x4075ae[_0xd1ef3c(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x5b4af9=_0x43bf95;return _0x5b4af9(0x507);}set[_0x43bf95(0x35a)](_0x97f676){const _0x6f5900=_0x43bf95;this[_0x6f5900(0x8d3)]=_0x97f676,_0x97f676&&this['_viewer']&&!this['_delegate']&&this[_0x6f5900(0x4cb)](),this[_0x6f5900(0xaa1)]&&(this[_0x6f5900(0xaa1)][_0x6f5900(0x776)]=_0x97f676);}get[_0x43bf95(0x35a)](){return this['_enable'];}set[_0x43bf95(0x178)](_0x3fc1b1){const _0x1855fc=_0x43bf95;this[_0x1855fc(0x7df)]=_0x3fc1b1,this[_0x1855fc(0xaa1)]&&(this['_delegate'][_0x1855fc(0x2eb)]['speed']=_0x3fc1b1);}get['speed'](){return this['_speed'];}set['mixNum'](_0x21f26e){const _0x4ecb1e=_0x43bf95;this['_mixNum']=_0x21f26e,this['_delegate']&&(this[_0x4ecb1e(0xaa1)][_0x4ecb1e(0x2eb)][_0x4ecb1e(0x2f5)]=_0x21f26e);}get[_0x43bf95(0x2f5)](){return this['_mixNum'];}['_createPostProcessStage'](){const _0xcbee70=_0x43bf95;this[_0xcbee70(0xaa1)]=new _0x34d1e5[(_0xcbee70(0x7aa))][(_0xcbee70(0x14f))]({'name':this[_0xcbee70(0x20a)],'fragmentShader':_0x2c20b2,'uniforms':{'speed':this[_0xcbee70(0x7df)],'mixNum':this[_0xcbee70(0x183)]}}),this[_0xcbee70(0x3f7)][_0xcbee70(0x148)]['postProcessStages'][_0xcbee70(0x45f)](this['_delegate']);}},_0x538245=_0x1b6e55,_0x9a35c4=_0x43bf95(0x6c4),_0x599c9e=class{constructor(_0x415607){const _0x4e4fcb=_0x43bf95;this[_0x4e4fcb(0x20a)]=_0x3f7522[_0x4e4fcb(0x3ef)](),this[_0x4e4fcb(0x3f7)]=_0x415607,this[_0x4e4fcb(0xaa1)]=void 0x0,this[_0x4e4fcb(0x8d3)]=!0x1,this['_speed']=0xa,this[_0x4e4fcb(0x558)]=_0x4075ae[_0x4e4fcb(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x525974=_0x43bf95;return _0x525974(0x9bf);}set['enable'](_0xddf333){const _0x529f89=_0x43bf95;this['_enable']=_0xddf333,_0xddf333&&this['_viewer']&&!this[_0x529f89(0xaa1)]&&this[_0x529f89(0x4cb)](),this[_0x529f89(0xaa1)]&&(this[_0x529f89(0xaa1)][_0x529f89(0x776)]=_0xddf333);}get[_0x43bf95(0x35a)](){const _0x101462=_0x43bf95;return this[_0x101462(0x8d3)];}set[_0x43bf95(0x178)](_0x4ddcdb){const _0x427caf=_0x43bf95;this['_speed']=_0x4ddcdb,this[_0x427caf(0xaa1)]&&(this[_0x427caf(0xaa1)][_0x427caf(0x2eb)][_0x427caf(0x178)]=_0x4ddcdb);}get[_0x43bf95(0x178)](){const _0x494361=_0x43bf95;return this[_0x494361(0x7df)];}['_createPostProcessStage'](){const _0x1dbad7=_0x43bf95;this[_0x1dbad7(0xaa1)]=new _0x34d1e5[(_0x1dbad7(0x7aa))][(_0x1dbad7(0x14f))]({'name':this[_0x1dbad7(0x20a)],'fragmentShader':_0x9a35c4,'uniforms':{'speed':this[_0x1dbad7(0x7df)]}}),this[_0x1dbad7(0x3f7)][_0x1dbad7(0x148)][_0x1dbad7(0x744)]['add'](this[_0x1dbad7(0xaa1)]);}},_0x146de7=_0x599c9e,_0x3a425b=_0x43bf95(0x8da),_0x47fe96=class{constructor(_0x413882){const _0x443c37=_0x43bf95;this['_id']=_0x3f7522[_0x443c37(0x3ef)](),this[_0x443c37(0x3f7)]=_0x413882,this['_delegate']=void 0x0,this[_0x443c37(0x3cd)]=0x0,this[_0x443c37(0x8d3)]=!0x1,this['_heading']=0x0,this[_0x443c37(0x558)]=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){const _0x3ecd14=_0x43bf95;return _0x3ecd14(0x7e0);}set[_0x43bf95(0x35a)](_0x22012c){const _0x4f2fb7=_0x43bf95;!this[_0x4f2fb7(0x3f7)][_0x4f2fb7(0x148)][_0x4f2fb7(0x6f7)]!==_0x34d1e5[_0x4f2fb7(0x7aa)][_0x4f2fb7(0xba)]['SCENE3D']&&(this[_0x4f2fb7(0xaa1)]||this[_0x4f2fb7(0x9ec)](),this[_0x4f2fb7(0x8d3)]=this['_delegate'][_0x4f2fb7(0x867)]=_0x22012c,this[_0x4f2fb7(0x8d3)]?this[_0x4f2fb7(0x3f7)][_0x4f2fb7(0x148)][_0x4f2fb7(0x925)]['addEventListener'](this[_0x4f2fb7(0x6c2)],this):this[_0x4f2fb7(0x3f7)][_0x4f2fb7(0x148)]['postUpdate'][_0x4f2fb7(0x97c)](this[_0x4f2fb7(0x6c2)],this));}get['enable'](){return this['_enable'];}set[_0x43bf95(0x36f)](_0xb5592e){const _0x4424aa=_0x43bf95;this[_0x4424aa(0x3cd)]=_0xb5592e;}get['rotateAmount'](){const _0xe6bf32=_0x43bf95;return this[_0xe6bf32(0x3cd)];}['_onRotate'](_0x1fe928,_0x23339a){const _0x23525d=_0x43bf95;this['_rotateAmount']!==0x0&&(this[_0x23525d(0x656)]+=this['_rotateAmount'],(this[_0x23525d(0x656)]>=0x168||this['_heading']<=-0x168)&&(this['_heading']=0x0),this[_0x23525d(0xaa1)][_0x23525d(0xa0c)]=_0x34d1e5[_0x23525d(0x7aa)][_0x23525d(0x7a6)][_0x23525d(0x228)](new _0x34d1e5[(_0x23525d(0x7aa))][(_0x23525d(0x982))](),new _0x34d1e5[(_0x23525d(0x7aa))]['HeadingPitchRoll'](_0x34d1e5[_0x23525d(0x7aa)][_0x23525d(0x72b)]['toRadians'](this['_heading']),0x0,0x0)));}[_0x43bf95(0x9ec)](){const _0x76b482=_0x43bf95;this[_0x76b482(0xaa1)]=new _0x34d1e5['Cesium'][(_0x76b482(0x508))]({'appearance':new _0x34d1e5['Cesium'][(_0x76b482(0xc5))]({'material':new _0x34d1e5[(_0x76b482(0x7aa))][(_0x76b482(0x4da))]({'fabric':{'type':'Image','uniforms':{'color':new _0x34d1e5[(_0x76b482(0x7aa))][(_0x76b482(0x7d2))](0x1,0x1,0x1,0x1),'image':_0x3a425b},'components':{'alpha':_0x76b482(0x60d),'diffuse':_0x76b482(0x4f0)}}}),'translucent':!0x0,'aboveGround':!0x0})}),this[_0x76b482(0xaa1)][_0x76b482(0x28a)]=new _0x34d1e5[(_0x76b482(0x7aa))][(_0x76b482(0x456))]({'geometry':new _0x34d1e5[(_0x76b482(0x7aa))][(_0x76b482(0x485))]({'vertexFormat':_0x34d1e5[_0x76b482(0x7aa)]['VertexFormat'][_0x76b482(0x176)],'radii':this[_0x76b482(0x3f7)][_0x76b482(0x148)][_0x76b482(0x7fd)][_0x76b482(0x6eb)][_0x76b482(0x21e)]}),'id':this[_0x76b482(0x20a)]}),this[_0x76b482(0xaa1)][_0x76b482(0x867)]=this['_enable'],this['_viewer']['scene']['primitives'][_0x76b482(0x45f)](this[_0x76b482(0xaa1)]);}},_0x95d737=_0x47fe96,_0x21cfda=class{constructor(_0x6318d7){const _0x4cce89=_0x43bf95;if(!_0x6318d7)throw Error(_0x4cce89(0x808));this[_0x4cce89(0x186)]=new _0x43b286(_0x6318d7),this[_0x4cce89(0x19d)]=new _0x538245(_0x6318d7),this[_0x4cce89(0x69d)]=new _0x146de7(_0x6318d7),this[_0x4cce89(0x5bd)]=new _0x95d737(_0x6318d7);}get[_0x43bf95(0x13d)](){const _0x2b7213=_0x43bf95;return this[_0x2b7213(0x186)];}get[_0x43bf95(0x507)](){return this['_rain'];}get[_0x43bf95(0x9bf)](){const _0x44d015=_0x43bf95;return this[_0x44d015(0x69d)];}get[_0x43bf95(0x7e0)](){const _0x3edd9b=_0x43bf95;return this[_0x3edd9b(0x5bd)];}},_0x178d49=_0x21cfda,_0xfd13fd=class{constructor(_0x11c910){const _0x1b73d4=_0x43bf95;this[_0x1b73d4(0x3f7)]=_0x11c910,this[_0x1b73d4(0x8d3)]=!0x1,this[_0x1b73d4(0x13f)]=0x64,this['_rotateRate']=0.01,this[_0x1b73d4(0x8c1)]={'moveForward':!0x1,'moveBackward':!0x1,'moveUp':!0x1,'moveDown':!0x1,'moveLeft':!0x1,'moveRight':!0x1,'turnLeft':!0x1,'turnRight':!0x1};}set[_0x43bf95(0x35a)](_0x3a2ae3){const _0x30b8ec=_0x43bf95;this[_0x30b8ec(0x8d3)]!==_0x3a2ae3&&this[_0x30b8ec(0x3f7)][_0x30b8ec(0x148)][_0x30b8ec(0x6f7)]===_0x34d1e5[_0x30b8ec(0x7aa)]['SceneMode'][_0x30b8ec(0x5f3)]&&(this[_0x30b8ec(0x8d3)]=_0x3a2ae3,this['_enable']?this['_bindEvent']():this[_0x30b8ec(0x2a1)]());}get[_0x43bf95(0x35a)](){return this['_enable'];}set[_0x43bf95(0xa6d)](_0x55ead5){this['_moveRate']=_0x55ead5;}get[_0x43bf95(0xa6d)](){const _0x350c79=_0x43bf95;return this[_0x350c79(0x13f)];}set['rotateRate'](_0x3c7bde){const _0x4d032c=_0x43bf95;this[_0x4d032c(0x7a8)]=_0x3c7bde;}get[_0x43bf95(0x4f7)](){const _0x2710c3=_0x43bf95;return this[_0x2710c3(0x7a8)];}[_0x43bf95(0x4ac)](){const _0x31ba66=_0x43bf95;let _0x5b2b6e=this['_viewer'][_0x31ba66(0x148)]['canvas'];_0x5b2b6e[_0x31ba66(0x4fe)]('tabindex','0'),_0x5b2b6e[_0x31ba66(0x278)]('click',this[_0x31ba66(0x533)][_0x31ba66(0x31a)](this),!0x1),this['_viewer']['clock'][_0x31ba66(0x9ae)][_0x31ba66(0x278)](this[_0x31ba66(0x8b4)],this),document['addEventListener'](_0x31ba66(0x5ac),this[_0x31ba66(0x292)][_0x31ba66(0x31a)](this),!0x1),document[_0x31ba66(0x278)](_0x31ba66(0x325),this[_0x31ba66(0x218)][_0x31ba66(0x31a)](this),!0x1);}[_0x43bf95(0x2a1)](){const _0x32491b=_0x43bf95;Object[_0x32491b(0x6f9)](this[_0x32491b(0x8c1)])['forEach'](_0x4ec9e3=>{const _0x4c713c=_0x32491b;this[_0x4c713c(0x8c1)][_0x4ec9e3]=!0x1;});let _0x2a17f8=this['_viewer'][_0x32491b(0x148)][_0x32491b(0x790)];_0x2a17f8[_0x32491b(0x1c0)](_0x32491b(0xa2d)),_0x2a17f8[_0x32491b(0x97c)](_0x32491b(0x618),this['_onClick'],!0x1),this[_0x32491b(0x3f7)][_0x32491b(0xaad)]['onTick'][_0x32491b(0x97c)](this[_0x32491b(0x8b4)],this),document[_0x32491b(0x97c)](_0x32491b(0x5ac),this[_0x32491b(0x292)],!0x1),document[_0x32491b(0x97c)](_0x32491b(0x325),this['_onKeyup'],!0x1);}['_getFlagForKeyCode'](_0x4ed037){const _0x27a794=_0x43bf95;let _0x511f71;switch(_0x4ed037[_0x27a794(0x42b)]){case 0x57:case 0x26:_0x4ed037['shiftKey']?_0x511f71=_0x27a794(0x974):_0x511f71='moveForward';break;case 0x53:case 0x28:_0x4ed037['shiftKey']?_0x511f71='moveDown':_0x511f71=_0x27a794(0x294);break;case 0x41:case 0x25:_0x511f71=_0x27a794(0x842);break;case 0x44:case 0x27:_0x511f71=_0x27a794(0x571);break;case 0x51:_0x511f71=_0x27a794(0x2d0);break;case 0x45:_0x511f71=_0x27a794(0x576);break;default:break;}return _0x511f71;}[_0x43bf95(0x533)](){const _0x5147f9=_0x43bf95;this[_0x5147f9(0x3f7)][_0x5147f9(0x148)][_0x5147f9(0x790)][_0x5147f9(0x174)]();}['_onKeydown'](_0x47576a){const _0x2cbd20=_0x43bf95;let _0x3fe898=this[_0x2cbd20(0x869)](_0x47576a);_0x3fe898&&(this[_0x2cbd20(0x8c1)][_0x3fe898]=!0x0);}[_0x43bf95(0x218)](_0x530c57){const _0x35aef5=_0x43bf95;Object[_0x35aef5(0x6f9)](this[_0x35aef5(0x8c1)])['forEach'](_0xf74dec=>{const _0x433f13=_0x35aef5;this[_0x433f13(0x8c1)][_0xf74dec]=!0x1;});}[_0x43bf95(0x8b4)](){const _0x27799f=_0x43bf95;let _0x3f81a2=this[_0x27799f(0x3f7)][_0x27799f(0x148)]['camera'],_0x53a708=this[_0x27799f(0x3f7)]['scene'][_0x27799f(0x7fd)][_0x27799f(0x6eb)][_0x27799f(0x8e5)](_0x3f81a2['position'])['height']/this[_0x27799f(0x13f)],_0x1eac73=_0x34d1e5[_0x27799f(0x7aa)][_0x27799f(0x982)][_0x27799f(0x5c3)](_0x3f81a2[_0x27799f(0x9a7)],new _0x34d1e5['Cesium']['Cartesian3']());this[_0x27799f(0x8c1)]['moveForward']&&_0x3f81a2[_0x27799f(0x1f1)](_0x53a708),this['_flags'][_0x27799f(0x294)]&&_0x3f81a2[_0x27799f(0x294)](_0x53a708),this['_flags'][_0x27799f(0x974)]&&_0x3f81a2['moveUp'](_0x53a708),this[_0x27799f(0x8c1)][_0x27799f(0x4cf)]&&_0x3f81a2['moveDown'](_0x53a708),this[_0x27799f(0x8c1)][_0x27799f(0x842)]&&_0x3f81a2['moveLeft'](_0x53a708),this[_0x27799f(0x8c1)]['moveRight']&&_0x3f81a2[_0x27799f(0x571)](_0x53a708),this['_flags'][_0x27799f(0x2d0)]&&_0x3f81a2['rotate'](_0x1eac73,-this[_0x27799f(0x7a8)]),this['_flags'][_0x27799f(0x576)]&&_0x3f81a2[_0x27799f(0x68f)](_0x1eac73,this[_0x27799f(0x7a8)]);}},_0x46d845=_0xfd13fd,_0x5758c5=class{constructor(_0x4750a4){const _0x1cd7dd=_0x43bf95;this[_0x1cd7dd(0x3f7)]=_0x4750a4,this['_viewOption']={},this[_0x1cd7dd(0x365)]={},this[_0x1cd7dd(0x532)]=void 0x0;}[_0x43bf95(0x370)](){const _0x768619=_0x43bf95;if(!this[_0x768619(0x532)])return!0x1;this[_0x768619(0x532)][_0x768619(0x833)]&&this[_0x768619(0x532)][_0x768619(0x833)][_0x768619(0xa4f)](_0x3437c9[_0x768619(0x559)],{'viewer':this['_viewer'],'viewOption':this[_0x768619(0x9a9)]});}[_0x43bf95(0x7c5)](_0x251db0){const _0x5980da=_0x43bf95;return _0x251db0&&!this[_0x5980da(0x365)][_0x5980da(0x373)](_0x251db0['pathId'])&&(_0x251db0[_0x5980da(0x833)][_0x5980da(0xa4f)](_0x3437c9['ADD']),this[_0x5980da(0x365)][_0x251db0[_0x5980da(0x389)]]=_0x251db0),this;}['addPaths'](_0x107a46){const _0x360f87=_0x43bf95;return Array['isArray'](_0x107a46)&&_0x107a46[_0x360f87(0x2de)](_0x18dd00=>{const _0x4f7659=_0x360f87;this[_0x4f7659(0x7c5)](_0x18dd00);}),this;}[_0x43bf95(0x138)](_0x2e4425){const _0x316e0f=_0x43bf95;return _0x2e4425&&this[_0x316e0f(0x365)][_0x316e0f(0x373)](_0x2e4425[_0x316e0f(0x389)])&&(delete this['_cache'][_0x2e4425[_0x316e0f(0x389)]],_0x2e4425['pathEvent']['fire'](_0x3437c9['REMOVE'])),this;}[_0x43bf95(0x206)](_0x463bfb){const _0x22de74=_0x43bf95;let _0x1baf80=this['getPaths']()['filter'](_0x1061b5=>_0x1061b5['id']===_0x463bfb);return _0x1baf80&&_0x1baf80[_0x22de74(0x6a2)]?_0x1baf80[0x0]:void 0x0;}['getPaths'](){const _0x16bfd9=_0x43bf95;let _0x4a61b5=[];return Object[_0x16bfd9(0x6f9)](this[_0x16bfd9(0x365)])[_0x16bfd9(0x2de)](_0x3a8a25=>{const _0x7be063=_0x16bfd9;_0x4a61b5[_0x7be063(0xb3)](this['_cache'][_0x3a8a25]);}),_0x4a61b5;}['activate'](_0x2dce54,_0x5c4b40={}){const _0x374074=_0x43bf95;var _0x370d51;return!_0x2dce54||(_0x2dce54==null?void 0x0:_0x2dce54[_0x374074(0x389)])===((_0x370d51=this[_0x374074(0x532)])==null?void 0x0:_0x370d51['pathId'])||!this[_0x374074(0x365)][_0x374074(0x373)](_0x2dce54==null?void 0x0:_0x2dce54[_0x374074(0x389)])?this:(this['_viewOption']=_0x5c4b40,this[_0x374074(0x532)]&&this[_0x374074(0x96a)](),this[_0x374074(0x532)]=_0x2dce54,this[_0x374074(0x532)][_0x374074(0x833)]&&this[_0x374074(0x532)][_0x374074(0x833)]['fire'](_0x3437c9[_0x374074(0x17c)]),this[_0x374074(0x3f7)]['on'](_0x3f9fee['POST_RENDER'],this[_0x374074(0x370)],this),this);}['deactivate'](){const _0x1cda08=_0x43bf95;return this['_activedPath']&&(this[_0x1cda08(0x532)][_0x1cda08(0x284)]=!0x1),this[_0x1cda08(0x532)]=void 0x0,this['_viewer'][_0x1cda08(0x24d)](_0x3f9fee['POST_RENDER'],this[_0x1cda08(0x370)],this),this[_0x1cda08(0x3f7)]['camera'][_0x1cda08(0x5ec)](_0x34d1e5[_0x1cda08(0x7aa)][_0x1cda08(0x5ee)]['IDENTITY']),this;}[_0x43bf95(0x90d)](){const _0x3e0096=_0x43bf95;return this[_0x3e0096(0x365)]={},this['_activedPath']&&(this[_0x3e0096(0x532)]['actived']=!0x1),this['_activedPath']=void 0x0,this[_0x3e0096(0x3f7)][_0x3e0096(0x24d)](_0x3f9fee[_0x3e0096(0x559)],this[_0x3e0096(0x370)],this),this[_0x3e0096(0x3f7)][_0x3e0096(0x698)][_0x3e0096(0x5ec)](_0x34d1e5['Cesium'][_0x3e0096(0x5ee)]['IDENTITY']),this;}},_0x3fb8d8=_0x5758c5,_0x1f024a=class{constructor(_0x2addc4,_0x16d2ee,_0x2e0598){const _0x1bf556=_0x43bf95;this[_0x1bf556(0x20a)]=_0x3f7522[_0x1bf556(0x3ef)](),this['_bid']=void 0x0,this[_0x1bf556(0x387)]=_0x16f48b[_0x1bf556(0xa8b)](_0x2addc4),this[_0x1bf556(0x1bc)]=_0x16d2ee||0x14,this['_pathMode']=_0x2e0598||_0x1bf556(0x178),this[_0x1bf556(0x74e)]=[],this[_0x1bf556(0x179)]=void 0x0,this['_actived']=!0x1,this[_0x1bf556(0x9dd)]=_0x34d1e5['Cesium']['JulianDate'][_0x1bf556(0xaa6)](),this['_pathEvent']=new _0x3bec08(),this[_0x1bf556(0x775)]['on'](_0x3437c9[_0x1bf556(0x123)],this[_0x1bf556(0x84d)],this),this[_0x1bf556(0x775)]['on'](_0x3437c9[_0x1bf556(0x6d8)],this['_onRemove'],this),this[_0x1bf556(0x775)]['on'](_0x3437c9[_0x1bf556(0x559)],this[_0x1bf556(0x370)],this),this[_0x1bf556(0x775)]['on'](_0x3437c9[_0x1bf556(0x17c)],this['_resetTimeLine'],this),this[_0x1bf556(0x558)]=_0x4075ae[_0x1bf556(0x5d2)];}get[_0x43bf95(0x389)](){const _0x5bb71e=_0x43bf95;return this[_0x5bb71e(0x20a)];}set['id'](_0x50f15d){const _0x4116ae=_0x43bf95;this[_0x4116ae(0x56a)]=_0x50f15d;}get['id'](){return this['_bid'];}set[_0x43bf95(0x752)](_0x1fdac8){const _0x44ddfa=_0x43bf95;this['_positions']=_0x16f48b[_0x44ddfa(0xa8b)](_0x1fdac8);}get[_0x43bf95(0x752)](){const _0x17c540=_0x43bf95;return this[_0x17c540(0x387)];}set[_0x43bf95(0xa36)](_0x5200d2){const _0xd86d=_0x43bf95;this[_0xd86d(0x1bc)]=_0x5200d2;}get[_0x43bf95(0xa36)](){const _0x12cd98=_0x43bf95;return this[_0x12cd98(0x1bc)];}set[_0x43bf95(0x219)](_0x27c16d){const _0x20c264=_0x43bf95;this[_0x20c264(0x7c4)]=_0x27c16d;}get[_0x43bf95(0x219)](){const _0x2fd68a=_0x43bf95;return this[_0x2fd68a(0x7c4)];}get[_0x43bf95(0x833)](){const _0x1c5d90=_0x43bf95;return this[_0x1c5d90(0x775)];}set['actived'](_0xf26532){const _0x24791b=_0x43bf95;this[_0x24791b(0x54d)]=_0xf26532;}get['actived'](){return this['_actived'];}get[_0x43bf95(0x988)](){return this['_state'];}[_0x43bf95(0x84d)](){const _0x3da1a3=_0x43bf95;this[_0x3da1a3(0x558)]=_0x4075ae['ADDED'];}[_0x43bf95(0x526)](){const _0x2de75f=_0x43bf95;this['_state']=_0x4075ae[_0x2de75f(0x947)];}[_0x43bf95(0x370)]({viewer:_0x3baae2,viewOption:_0x360718}){const _0x5c56e5=_0x43bf95;if(!this[_0x5c56e5(0x284)])return!0x1;let _0x432b72=_0x34d1e5[_0x5c56e5(0x7aa)][_0x5c56e5(0xc3)]['now']();if(_0x34d1e5[_0x5c56e5(0x7aa)]['JulianDate']['lessThan'](_0x432b72,this[_0x5c56e5(0x9dd)])&&this[_0x5c56e5(0x179)]){let _0x18c3d9=this['_sampledPosition'][_0x5c56e5(0x4e7)](_0x432b72),_0x44fc3d=this[_0x5c56e5(0x179)][_0x5c56e5(0x4e7)](_0x34d1e5[_0x5c56e5(0x7aa)][_0x5c56e5(0xc3)]['addSeconds'](_0x432b72,0.001,new _0x34d1e5[(_0x5c56e5(0x7aa))][(_0x5c56e5(0xc3))]()));_0x18c3d9&&_0x44fc3d&&_0x3baae2[_0x5c56e5(0x698)][_0x5c56e5(0xa0a)](_0x18c3d9,new _0x34d1e5[(_0x5c56e5(0x7aa))]['HeadingPitchRange'](_0x4a436d(_0x18c3d9,_0x44fc3d),_0x34d1e5[_0x5c56e5(0x7aa)][_0x5c56e5(0x72b)]['toRadians']((_0x360718==null?void 0x0:_0x360718['pitch'])||-0x14),(_0x360718==null?void 0x0:_0x360718[_0x5c56e5(0x599)])||0x7d0));}else _0x3baae2[_0x5c56e5(0x698)][_0x5c56e5(0x5ec)](_0x34d1e5[_0x5c56e5(0x7aa)][_0x5c56e5(0x5ee)][_0x5c56e5(0x96d)]),this[_0x5c56e5(0x54d)]=!0x1;}[_0x43bf95(0x70f)](){const _0x374567=_0x43bf95;if(!this[_0x374567(0x387)]||!this['_positions'][_0x374567(0x6a2)])return!0x1;let _0x14c065=_0x34d1e5[_0x374567(0x7aa)][_0x374567(0xc3)][_0x374567(0xaa6)](),_0x3edd9e=0x0,_0x5f9af6=[];if(this['_pathMode']===_0x374567(0x178)){let _0x42fb68=_0x55c5f1(this['_positions'])/this[_0x374567(0x1bc)];_0x5f9af6=this[_0x374567(0x387)][_0x374567(0x127)]((_0x71c32a,_0x6e67ec,_0x142047)=>(_0x6e67ec!==0x0&&(_0x3edd9e+=_0x55c5f1([_0x142047[_0x6e67ec-0x1],_0x71c32a])/_0x42fb68),_0x34d1e5[_0x374567(0x7aa)][_0x374567(0xc3)][_0x374567(0x930)](_0x14c065,_0x3edd9e,new _0x34d1e5[(_0x374567(0x7aa))][(_0x374567(0xc3))]())));}else{let _0x3e58c5=this[_0x374567(0x387)][_0x374567(0x6a2)],_0x49dd22=(this['_duration']-this[_0x374567(0x1bc)]%_0x3e58c5)/_0x3e58c5;_0x5f9af6=this['_positions'][_0x374567(0x127)]((_0x5354b4,_0x38278d)=>_0x34d1e5[_0x374567(0x7aa)]['JulianDate'][_0x374567(0x930)](_0x14c065,_0x38278d*_0x49dd22,new _0x34d1e5[(_0x374567(0x7aa))][(_0x374567(0xc3))]()));}this['_sampledPosition']=new _0x34d1e5[(_0x374567(0x7aa))][(_0x374567(0x797))](),this[_0x374567(0x179)][_0x374567(0x763)](_0x5f9af6,_0x5e5f93['transformWGS84ArrayToCartesianArray'](this[_0x374567(0x387)])),this[_0x374567(0x179)][_0x374567(0x5d8)]=_0x34d1e5[_0x374567(0x7aa)][_0x374567(0x125)]['HOLD'],this[_0x374567(0x179)]['setInterpolationOptions']({'interpolationDegree':0x2,'interpolationAlgorithm':_0x34d1e5['Cesium'][_0x374567(0x8fb)]}),this[_0x374567(0x9dd)]=_0x5f9af6[_0x5f9af6[_0x374567(0x6a2)]-0x1],this[_0x374567(0x54d)]=!0x0;}},_0xe0379a=_0x1f024a,_0xa44239={'FP':'1','TP':'2','TRACKED':_0x43bf95(0x196),'FREE':_0x43bf95(0x946)},_0x47c824=_0xa44239,_0x58cca5=class{constructor(_0x399c7d){const _0x981029=_0x43bf95;this[_0x981029(0x3f7)]=_0x399c7d,this[_0x981029(0x365)]={},this['_delegete']=new _0x34d1e5[(_0x981029(0x7aa))][(_0x981029(0x668))](_0x981029(0x215)),this['_viewer'][_0x981029(0x268)][_0x981029(0x45f)](this[_0x981029(0xa06)]),this[_0x981029(0xde)]=void 0x0,this[_0x981029(0x9a9)]={},this['_stopTime']=void 0x0,this[_0x981029(0x558)]=_0x4075ae[_0x981029(0x5d2)];}get[_0x43bf95(0x8ca)](){const _0x403c22=_0x43bf95;return this[_0x403c22(0xa06)]['entities'];}get['state'](){const _0x3a73aa=_0x43bf95;return this[_0x3a73aa(0x558)];}['_onPostRender'](){const _0x249e18=_0x43bf95;Object[_0x249e18(0x6f9)](this[_0x249e18(0x365)])[_0x249e18(0x2de)](_0x257184=>{const _0x277259=_0x249e18;let _0x2735b4=this[_0x277259(0x365)][_0x257184];_0x2735b4[_0x277259(0xf0)]&&_0x2735b4[_0x277259(0xf0)][_0x277259(0xa4f)](_0x4133b5[_0x277259(0x559)],{'viewer':this['_viewer'],'viewOption':this[_0x277259(0x9a9)]});}),this['_viewer'][_0x249e18(0x148)][_0x249e18(0x718)]();}[_0x43bf95(0x5e9)](_0x5ddc4a){const _0x3220a9=_0x43bf95;return _0x5ddc4a&&_0x5ddc4a[_0x3220a9(0xf0)]&&!this[_0x3220a9(0x365)][_0x3220a9(0x373)](_0x5ddc4a[_0x3220a9(0x481)])&&(_0x5ddc4a[_0x3220a9(0xf0)]['fire'](_0x4133b5[_0x3220a9(0x123)],this),this[_0x3220a9(0x365)][_0x5ddc4a[_0x3220a9(0x481)]]=_0x5ddc4a),this;}[_0x43bf95(0x811)](_0x577322){const _0x35f7a3=_0x43bf95;return Array['isArray'](_0x577322)&&_0x577322[_0x35f7a3(0x2de)](_0x7ebf72=>{const _0x35069a=_0x35f7a3;this[_0x35069a(0x5e9)](_0x7ebf72);}),this;}['getTrack'](_0x4b3467){const _0x3c7769=_0x43bf95;let _0x464363=this[_0x3c7769(0x1ff)]()[_0x3c7769(0x738)](_0x563451=>_0x563451['id']===_0x4b3467);return _0x464363&&_0x464363[_0x3c7769(0x6a2)]?_0x464363[0x0]:void 0x0;}[_0x43bf95(0x68d)](_0x366cfc){const _0x4f0cc0=_0x43bf95;return _0x366cfc&&_0x366cfc[_0x4f0cc0(0xf0)]&&this[_0x4f0cc0(0x365)][_0x4f0cc0(0x373)](_0x366cfc['trackId'])&&(_0x366cfc[_0x4f0cc0(0xf0)][_0x4f0cc0(0xa4f)](_0x4133b5[_0x4f0cc0(0x6d8)],this),delete this['_cache'][_0x366cfc[_0x4f0cc0(0x481)]]),this;}[_0x43bf95(0x1ff)](){const _0x116bfe=_0x43bf95;let _0x418826=[];return Object[_0x116bfe(0x6f9)](this[_0x116bfe(0x365)])[_0x116bfe(0x2de)](_0x4b5115=>{const _0x1704c5=_0x116bfe;_0x418826[_0x1704c5(0xb3)](this[_0x1704c5(0x365)][_0x4b5115]);}),_0x418826;}[_0x43bf95(0x10e)](){const _0x44711b=_0x43bf95;let _0x5acf8f=_0x34d1e5['Cesium'][_0x44711b(0xc3)][_0x44711b(0xaa6)]();return Object[_0x44711b(0x6f9)](this[_0x44711b(0x365)])[_0x44711b(0x2de)](_0x4a4dc9=>{const _0xa9c5fc=_0x44711b;let _0x51b530=this[_0xa9c5fc(0x365)][_0x4a4dc9];_0x51b530[_0xa9c5fc(0x6b4)]=_0x5acf8f,_0x51b530[_0xa9c5fc(0x83a)]=!0x1;}),this[_0x44711b(0xde)]=void 0x0,this[_0x44711b(0x60a)]=void 0x0,this[_0x44711b(0x3f7)]['off'](_0x3f9fee['POST_RENDER'],this['_onPostRender'],this),this['_viewer']['on'](_0x3f9fee[_0x44711b(0x559)],this[_0x44711b(0x370)],this),this[_0x44711b(0x558)]=_0x4075ae[_0x44711b(0x42f)],this;}['pause'](){const _0x5a6802=_0x43bf95;return this[_0x5a6802(0x60a)]=_0x34d1e5[_0x5a6802(0x7aa)][_0x5a6802(0xc3)]['now'](),this[_0x5a6802(0x3f7)][_0x5a6802(0x698)][_0x5a6802(0x5ec)](_0x34d1e5[_0x5a6802(0x7aa)][_0x5a6802(0x5ee)]['IDENTITY']),this[_0x5a6802(0x3f7)][_0x5a6802(0x8ca)][_0x5a6802(0xa60)]=void 0x0,this['_viewer'][_0x5a6802(0x24d)](_0x3f9fee['POST_RENDER'],this['_onPostRender'],this),this[_0x5a6802(0x558)]=_0x4075ae[_0x5a6802(0x83f)],this;}[_0x43bf95(0x347)](){const _0x3acb9c=_0x43bf95;if(this[_0x3acb9c(0x558)]!==_0x4075ae[_0x3acb9c(0x83f)])return this;if(this[_0x3acb9c(0x60a)]){let _0x55246d=_0x34d1e5['Cesium']['JulianDate'][_0x3acb9c(0xaa6)]();Object['keys'](this[_0x3acb9c(0x365)])[_0x3acb9c(0x2de)](_0x5e1795=>{const _0x57880b=_0x3acb9c;this['_cache'][_0x5e1795][_0x57880b(0xf0)][_0x57880b(0xa4f)](_0x4133b5[_0x57880b(0x17c)],{'stopTime':this[_0x57880b(0x60a)],'duration':_0x34d1e5[_0x57880b(0x7aa)][_0x57880b(0xc3)][_0x57880b(0x950)](_0x55246d,this[_0x57880b(0x60a)])});});}return this[_0x3acb9c(0x3f7)][_0x3acb9c(0x24d)](_0x3f9fee[_0x3acb9c(0x559)],this[_0x3acb9c(0x370)],this),this[_0x3acb9c(0x3f7)]['on'](_0x3f9fee['POST_RENDER'],this[_0x3acb9c(0x370)],this),this[_0x3acb9c(0x558)]=_0x4075ae['PLAY'],this;}[_0x43bf95(0x839)](_0x13efad,_0x5bbda1={}){const _0x4ad9d1=_0x43bf95;if(!this[_0x4ad9d1(0x365)][_0x4ad9d1(0x373)](_0x13efad[_0x4ad9d1(0x481)]))throw new Error(_0x4ad9d1(0x73a));return this[_0x4ad9d1(0x9a9)]=_0x5bbda1,this[_0x4ad9d1(0xde)]&&(this['_activedTrack']['viewed']=!0x1),_0x13efad[_0x4ad9d1(0x83a)]=!0x0,this[_0x4ad9d1(0xde)]=_0x13efad,_0x5bbda1['mode']===_0x47c824[_0x4ad9d1(0x9ac)]&&(this[_0x4ad9d1(0x3f7)][_0x4ad9d1(0x698)]['lookAtTransform'](_0x34d1e5['Cesium'][_0x4ad9d1(0x5ee)]['IDENTITY']),this[_0x4ad9d1(0x3f7)]['delegate'][_0x4ad9d1(0xa60)]=void 0x0),this;}[_0x43bf95(0x6fb)](_0x33aafe){const _0x3baa6d=_0x43bf95;if(!this[_0x3baa6d(0x365)][_0x3baa6d(0x373)](_0x33aafe[_0x3baa6d(0x481)]))throw new Error('TrackController:\x20track\x20does\x20not\x20added\x20');return _0x33aafe['viewed']&&(_0x33aafe[_0x3baa6d(0x83a)]=!0x1),this['_activedTrack']=void 0x0,this[_0x3baa6d(0x3f7)]['camera'][_0x3baa6d(0x5ec)](_0x34d1e5['Cesium']['Matrix4'][_0x3baa6d(0x96d)]),this[_0x3baa6d(0x3f7)]['delegate']['trackedEntity']=void 0x0,this;}['clear'](){const _0x151f2c=_0x43bf95;return Object['keys'](this[_0x151f2c(0x365)])['forEach'](_0x4028b4=>{const _0x3b2ca1=_0x151f2c;this[_0x3b2ca1(0x68d)](this['_cache'][_0x4028b4]);}),this[_0x151f2c(0xde)]&&(this['_activedTrack']['viewed']=!0x1),this[_0x151f2c(0xde)]=void 0x0,this[_0x151f2c(0x3f7)][_0x151f2c(0x24d)](_0x3f9fee[_0x151f2c(0x559)],this[_0x151f2c(0x370)],this),this['_viewer'][_0x151f2c(0x698)][_0x151f2c(0x5ec)](_0x34d1e5[_0x151f2c(0x7aa)][_0x151f2c(0x5ee)][_0x151f2c(0x96d)]),this[_0x151f2c(0x3f7)][_0x151f2c(0x8ca)]['trackedEntity']=void 0x0,this;}},_0x3edf5b=_0x58cca5,_0xd2b7a2={'clampToGround':!0x1,'clampToTileset':!0x1,'interpolationType':_0x43bf95(0x402),'interpolationDegree':0x2,'endDelayTime':0.5,'headingOffset':0x0},_0xf6acc9={'width':0x2,'material':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x7d2)][_0x43bf95(0x5be)],'clampToGround':!0x0,'depthFailMaterial':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x7d2)][_0x43bf95(0x5be)]['withAlpha'](0.8)},_0x41f92a=class{constructor(_0x213dff,_0x3cf728,_0x57a2a6,_0x375a2e){const _0x4d6d08=_0x43bf95;this[_0x4d6d08(0x20a)]=_0x3f7522[_0x4d6d08(0x3ef)](),this['_bid']=void 0x0,this['_positions']=_0x16f48b[_0x4d6d08(0xa8b)](_0x213dff),this[_0x4d6d08(0x1bc)]=_0x3cf728||0x14,this[_0x4d6d08(0xdf)]=_0x57a2a6,this[_0x4d6d08(0x674)]={..._0xd2b7a2,..._0x375a2e},this['_controller']=void 0x0,this[_0x4d6d08(0x179)]=void 0x0,this[_0x4d6d08(0x6a5)]=void 0x0,this['_viewed']=!0x1,this['_delegate']=new _0x34d1e5['Cesium']['Entity'](),this[_0x4d6d08(0x6d2)]=[],this[_0x4d6d08(0x9fa)]=new _0x34d1e5['Cesium'][(_0x4d6d08(0x926))]({'show':!0x1,'polyline':{'positions':new _0x34d1e5[(_0x4d6d08(0x7aa))][(_0x4d6d08(0x18c))](()=>this['_pathPositions'],!0x1)}}),this[_0x4d6d08(0x5c0)]=0x0,this[_0x4d6d08(0x74e)]=[],this[_0x4d6d08(0x75a)]=void 0x0,this['_endTime']=void 0x0,this[_0x4d6d08(0x217)]=new _0x3ba0b9(),this[_0x4d6d08(0x217)]['on'](_0x4133b5[_0x4d6d08(0x559)],this[_0x4d6d08(0x370)],this),this[_0x4d6d08(0x217)]['on'](_0x4133b5['ADD'],this[_0x4d6d08(0x84d)],this),this[_0x4d6d08(0x217)]['on'](_0x4133b5[_0x4d6d08(0x6d8)],this[_0x4d6d08(0x526)],this),this['_trackEvent']['on'](_0x4133b5[_0x4d6d08(0x17c)],this['_resetTimeLine'],this),this[_0x4d6d08(0x558)]=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x4ca)](){const _0x2207d6=_0x43bf95;return _0x55c5f1(_0x16f48b[_0x2207d6(0xa8b)](this['_pathPositions']));}get[_0x43bf95(0xa55)](){const _0x2153bb=_0x43bf95;let [_0x270d43]=this['_pathPositions'][_0x2153bb(0x724)](-0x1);return _0x16f48b['parsePosition'](_0x270d43);}get['allDistance'](){const _0x1d9347=_0x43bf95;return _0x55c5f1(this[_0x1d9347(0x387)]);}get[_0x43bf95(0x481)](){const _0xdbe234=_0x43bf95;return this[_0xdbe234(0x20a)];}set['id'](_0x5864e4){const _0x4d8956=_0x43bf95;this[_0x4d8956(0x56a)]=_0x5864e4;}get['id'](){const _0x323f8f=_0x43bf95;return this[_0x323f8f(0x56a)];}set['positions'](_0x53f16d){const _0x16cec0=_0x43bf95;this[_0x16cec0(0x387)]=_0x16f48b[_0x16cec0(0xa8b)](_0x53f16d),this[_0x16cec0(0x70f)]({});}get['positions'](){return this['_positions'];}set[_0x43bf95(0xa36)](_0x414ff8){const _0x472e1b=_0x43bf95;this[_0x472e1b(0x1bc)]=_0x414ff8,this[_0x472e1b(0x70f)]({});}get[_0x43bf95(0xa36)](){const _0x205f05=_0x43bf95;return this[_0x205f05(0x1bc)];}set[_0x43bf95(0x6b4)](_0xce1b19){const _0x2b2a43=_0x43bf95;_0xce1b19 instanceof Date?this['_startTime']=_0x34d1e5[_0x2b2a43(0x7aa)]['JulianDate'][_0x2b2a43(0x79d)](_0xce1b19):this[_0x2b2a43(0x75a)]=_0xce1b19,this[_0x2b2a43(0x70f)]({});}get[_0x43bf95(0x6b4)](){const _0x194434=_0x43bf95;return this[_0x194434(0x75a)];}set[_0x43bf95(0x83a)](_0x42bcbb){const _0x5e2e67=_0x43bf95;this[_0x5e2e67(0x786)]=_0x42bcbb;}get[_0x43bf95(0x83a)](){const _0x31cfb7=_0x43bf95;return this[_0x31cfb7(0x786)];}get[_0x43bf95(0xf0)](){const _0x586848=_0x43bf95;return this[_0x586848(0x217)];}get['state'](){const _0x57791e=_0x43bf95;return this[_0x57791e(0x558)];}[_0x43bf95(0x84d)](_0xbc5b55){const _0x434005=_0x43bf95;if(!_0xbc5b55)return!0x1;this[_0x434005(0xd6)]=_0xbc5b55,this['_controller'][_0x434005(0x8ca)][_0x434005(0x45f)](this['_delegate']),this[_0x434005(0xd6)][_0x434005(0x8ca)][_0x434005(0x45f)](this[_0x434005(0x9fa)]),!this['_startTime']&&(this[_0x434005(0x75a)]=_0x34d1e5['Cesium'][_0x434005(0xc3)][_0x434005(0xaa6)]()),this[_0x434005(0x558)]=_0x4075ae[_0x434005(0xa0f)];}[_0x43bf95(0x526)](){const _0x5cd2dc=_0x43bf95;if(!this[_0x5cd2dc(0xd6)])return!0x1;this['_controller']['delegate'][_0x5cd2dc(0x109)](this['_delegate']),this[_0x5cd2dc(0xd6)][_0x5cd2dc(0x8ca)][_0x5cd2dc(0x109)](this[_0x5cd2dc(0x9fa)]),this[_0x5cd2dc(0x786)]=!0x1,this['_startTime']=void 0x0,this[_0x5cd2dc(0x558)]=_0x4075ae[_0x5cd2dc(0x947)];}[_0x43bf95(0x370)]({viewer:_0xe1513e,viewOption:_0x39bfb8}){const _0x418148=_0x43bf95;if(!this[_0x418148(0x75a)]||!this[_0x418148(0x9dd)])return!0x1;let _0x2775ee=_0x34d1e5['Cesium']['JulianDate'][_0x418148(0xaa6)]();if(_0x34d1e5['Cesium'][_0x418148(0xc3)][_0x418148(0x918)](_0x2775ee,this['_endTime'])){let _0x3a5e7a=this['_sampledPosition'][_0x418148(0x4e7)](_0x2775ee);if(!_0x3a5e7a)return!0x1;this[_0x418148(0x6d2)][_0x418148(0xb3)](_0x3a5e7a),this[_0x418148(0x674)][_0x418148(0x18e)]?this[_0x418148(0xaa1)][_0x418148(0x9a7)]=_0xe1513e[_0x418148(0x148)][_0x418148(0x46d)](_0x3a5e7a,[this['_delegate']]):this['_delegate'][_0x418148(0x9a7)]=_0x3a5e7a;let _0x5d5dbd=this[_0x418148(0x6a5)][_0x418148(0x4e7)](_0x2775ee);if(_0x5d5dbd){let _0x54df21=_0x34d1e5['Cesium'][_0x418148(0x158)]['fromHeadingPitchRoll'](new _0x34d1e5['Cesium'][(_0x418148(0x517))](_0x34d1e5['Cesium'][_0x418148(0x72b)][_0x418148(0x2b0)](this['_options']['headingOffset']||0x0),0x0,0x0),new _0x34d1e5[(_0x418148(0x7aa))][(_0x418148(0x158))]());this[_0x418148(0xaa1)][_0x418148(0x2b2)]=_0x34d1e5[_0x418148(0x7aa)][_0x418148(0x158)][_0x418148(0x310)](_0x5d5dbd,_0x54df21,new _0x34d1e5[(_0x418148(0x7aa))][(_0x418148(0x158))]());}let _0x3a5e8b=this[_0x418148(0x74e)][this['_positionIndex']];if(_0x3a5e8b){let _0x4fba9d=_0x34d1e5[_0x418148(0x7aa)][_0x418148(0xc3)][_0x418148(0x950)](_0x2775ee,_0x3a5e8b);if(_0x4fba9d>=0x0&&_0x4fba9d<=0x1){let _0x5acb23=this[_0x418148(0x387)][this[_0x418148(0x5c0)]]||void 0x0;if(_0x5acb23&&_0x5d5dbd){let _0x518aa4=_0x34d1e5[_0x418148(0x7aa)][_0x418148(0x72d)][_0x418148(0x1d2)](_0x5d5dbd),_0x74fc3c=_0x34d1e5[_0x418148(0x7aa)][_0x418148(0x5ee)][_0x418148(0x90c)](_0x518aa4,_0x3a5e7a),_0x5c7d45=_0x34d1e5[_0x418148(0x7aa)]['Transforms']['fixedFrameToHeadingPitchRoll'](_0x74fc3c);_0x5acb23[_0x418148(0x77c)]=_0x34d1e5[_0x418148(0x7aa)][_0x418148(0x72b)]['toDegrees'](_0x5c7d45[_0x418148(0x77c)]),_0x5acb23[_0x418148(0x442)]=_0x34d1e5[_0x418148(0x7aa)][_0x418148(0x72b)][_0x418148(0x438)](_0x5c7d45[_0x418148(0x442)]),_0x5acb23['roll']=_0x34d1e5[_0x418148(0x7aa)][_0x418148(0x72b)][_0x418148(0x438)](_0x5c7d45[_0x418148(0x193)]);}this[_0x418148(0xdf)]&&this[_0x418148(0xdf)](_0x5acb23,this[_0x418148(0x5c0)]+0x1===this[_0x418148(0x387)][_0x418148(0x6a2)]),this[_0x418148(0x5c0)]++,this[_0x418148(0x674)][_0x418148(0x4c6)]&&this[_0x418148(0x5c0)]===this['_positions'][_0x418148(0x6a2)]&&this['_restart']();}}}this['_setCameraView'](_0xe1513e,_0x39bfb8);}[_0x43bf95(0x767)](){const _0x760f5d=_0x43bf95;this['_startTime']=_0x34d1e5[_0x760f5d(0x7aa)][_0x760f5d(0xc3)]['now'](),this[_0x760f5d(0x70f)]({});}[_0x43bf95(0x644)](_0xdabcf8,_0x3bdbd3){const _0x2a9624=_0x43bf95;var _0x3795c9,_0x50bd58,_0x43befe;if(!this[_0x2a9624(0x786)])return!0x1;let _0x1a5898=_0x34d1e5['Cesium'][_0x2a9624(0xc3)][_0x2a9624(0xaa6)]();if(_0x34d1e5['Cesium'][_0x2a9624(0xc3)][_0x2a9624(0xa67)](_0x1a5898,this[_0x2a9624(0x9dd)]))_0xdabcf8[_0x2a9624(0x698)][_0x2a9624(0x5ec)](_0x34d1e5[_0x2a9624(0x7aa)][_0x2a9624(0x5ee)][_0x2a9624(0x96d)]),_0xdabcf8[_0x2a9624(0x8ca)]['trackedEntity']&&(_0xdabcf8[_0x2a9624(0x8ca)][_0x2a9624(0xa60)]=void 0x0),this[_0x2a9624(0x786)]=!0x1;else{let _0x256ec1=this[_0x2a9624(0x179)]['getValue'](_0x1a5898),_0x1c6046=this[_0x2a9624(0x179)][_0x2a9624(0x4e7)](_0x34d1e5[_0x2a9624(0x7aa)][_0x2a9624(0xc3)][_0x2a9624(0x930)](_0x1a5898,0x1/0x3c,new _0x34d1e5[(_0x2a9624(0x7aa))][(_0x2a9624(0xc3))]()));_0x256ec1&&_0x1c6046&&((_0x3bdbd3==null?void 0x0:_0x3bdbd3[_0x2a9624(0x6f7)])===_0x47c824['TRACKED']&&((_0x50bd58=(_0x3795c9=_0xdabcf8[_0x2a9624(0x8ca)])==null?void 0x0:_0x3795c9[_0x2a9624(0xa60)])==null?void 0x0:_0x50bd58['id'])!==((_0x43befe=this[_0x2a9624(0xaa1)])==null?void 0x0:_0x43befe['id'])?_0xdabcf8['delegate'][_0x2a9624(0xa60)]=this['_delegate']:(_0x3bdbd3==null?void 0x0:_0x3bdbd3[_0x2a9624(0x6f7)])===_0x47c824['FP']?_0xdabcf8[_0x2a9624(0x698)]['lookAt'](_0x256ec1,new _0x34d1e5[(_0x2a9624(0x7aa))][(_0x2a9624(0x8ff))](_0x4a436d(_0x256ec1,_0x1c6046),_0x34d1e5[_0x2a9624(0x7aa)][_0x2a9624(0x72b)][_0x2a9624(0x2b0)]((_0x3bdbd3==null?void 0x0:_0x3bdbd3[_0x2a9624(0x442)])||0x0),(_0x3bdbd3==null?void 0x0:_0x3bdbd3[_0x2a9624(0x599)])||0xa)):(_0x3bdbd3==null?void 0x0:_0x3bdbd3[_0x2a9624(0x6f7)])===_0x47c824['TP']&&_0xdabcf8[_0x2a9624(0x698)][_0x2a9624(0xa0a)](_0x256ec1,new _0x34d1e5['Cesium'][(_0x2a9624(0x8ff))](0x0,_0x34d1e5[_0x2a9624(0x7aa)]['Math']['toRadians']((_0x3bdbd3==null?void 0x0:_0x3bdbd3[_0x2a9624(0x442)])||-0x5a),(_0x3bdbd3==null?void 0x0:_0x3bdbd3[_0x2a9624(0x599)])||0x3e8)));}}[_0x43bf95(0x70f)](_0x81f13d){const _0x54894b=_0x43bf95;var _0x582c6c;if(!this['_startTime']||!this[_0x54894b(0x1bc)]||!((_0x582c6c=this['_positions'])!=null&&_0x582c6c[_0x54894b(0x6a2)]))return!0x1;let _0x50bc91=0x0;if(!(_0x81f13d!=null&&_0x81f13d[_0x54894b(0x82c)])&&!(_0x81f13d!=null&&_0x81f13d[_0x54894b(0xa36)])){let _0x383047=_0x55c5f1(this['_positions'])/this[_0x54894b(0x1bc)];this['_timeLine']=this[_0x54894b(0x387)][_0x54894b(0x127)]((_0x168c83,_0x13ee13,_0xf3f250)=>(_0x13ee13!==0x0&&(_0x50bc91+=_0x55c5f1([_0xf3f250[_0x13ee13-0x1],_0x168c83])/_0x383047),_0x34d1e5[_0x54894b(0x7aa)][_0x54894b(0xc3)]['addSeconds'](this[_0x54894b(0x75a)],_0x50bc91,new _0x34d1e5['Cesium'][(_0x54894b(0xc3))]()))),this[_0x54894b(0x6d2)]=[],this[_0x54894b(0x5c0)]=0x0;}else _0x81f13d!=null&&_0x81f13d[_0x54894b(0x82c)]&&(_0x81f13d!=null&&_0x81f13d[_0x54894b(0xa36)])&&(this['_duration']+=_0x81f13d[_0x54894b(0xa36)],this[_0x54894b(0x74e)]=this[_0x54894b(0x74e)]['map'](_0x1a02e2=>(_0x34d1e5[_0x54894b(0x7aa)]['JulianDate'][_0x54894b(0xa67)](_0x1a02e2,_0x81f13d['stopTime'])&&(_0x1a02e2=_0x34d1e5[_0x54894b(0x7aa)][_0x54894b(0xc3)]['addSeconds'](_0x1a02e2,_0x81f13d[_0x54894b(0xa36)],new _0x34d1e5[(_0x54894b(0x7aa))][(_0x54894b(0xc3))]())),_0x1a02e2)));this['_sampledPosition']=new _0x34d1e5[(_0x54894b(0x7aa))][(_0x54894b(0x797))](),this[_0x54894b(0x179)]['addSamples'](this[_0x54894b(0x74e)],_0x5e5f93[_0x54894b(0x999)](this['_positions'])),this[_0x54894b(0x179)][_0x54894b(0x5d8)]=_0x34d1e5[_0x54894b(0x7aa)][_0x54894b(0x125)][_0x54894b(0x346)],this[_0x54894b(0x674)][_0x54894b(0x48c)]===_0x54894b(0x153)?this[_0x54894b(0x179)][_0x54894b(0x118)]({'interpolationDegree':this[_0x54894b(0x674)][_0x54894b(0x800)]||0x2,'interpolationAlgorithm':_0x34d1e5['Cesium'][_0x54894b(0x8fb)]}):this['_options']['interpolationType']===_0x54894b(0x402)?this[_0x54894b(0x179)][_0x54894b(0x118)]({'interpolationDegree':this[_0x54894b(0x674)]['interpolationDegree']||0x1,'interpolationAlgorithm':_0x34d1e5['Cesium'][_0x54894b(0x59b)]}):this[_0x54894b(0x674)][_0x54894b(0x48c)]===_0x54894b(0x862)&&this[_0x54894b(0x179)][_0x54894b(0x118)]({'interpolationDegree':this[_0x54894b(0x674)][_0x54894b(0x800)]||0x5,'interpolationAlgorithm':_0x34d1e5[_0x54894b(0x7aa)][_0x54894b(0x56b)]}),this['_velocityOrientation']=new _0x34d1e5['Cesium']['VelocityOrientationProperty'](this[_0x54894b(0x179)]),this['_endTime']=_0x34d1e5[_0x54894b(0x7aa)][_0x54894b(0xc3)][_0x54894b(0x930)](this[_0x54894b(0x74e)][this[_0x54894b(0x74e)][_0x54894b(0x6a2)]-0x1],this[_0x54894b(0x674)][_0x54894b(0xa6)],new _0x34d1e5[(_0x54894b(0x7aa))][(_0x54894b(0xc3))]());}[_0x43bf95(0x301)](_0x3d9126,_0x4738cd){const _0x1ae24f=_0x43bf95;return this[_0x1ae24f(0x387)][_0x1ae24f(0xb3)](_0x16f48b[_0x1ae24f(0x81a)](_0x3d9126)),this[_0x1ae24f(0x1bc)]+=_0x4738cd,this[_0x1ae24f(0x70f)]({}),this;}[_0x43bf95(0x6bc)](_0x5473e1,_0x4a7844){const _0x480eb5=_0x43bf95;return this['_delegate'][_0x480eb5(0x361)]={..._0x4a7844,'uri':_0x5473e1,'heightReference':this[_0x480eb5(0x674)][_0x480eb5(0x5d4)]?_0x34d1e5['Cesium']['HeightReference'][_0x480eb5(0x827)]:_0x34d1e5[_0x480eb5(0x7aa)][_0x480eb5(0x89e)][_0x480eb5(0x60e)]},this;}[_0x43bf95(0xa75)](_0x3283b7,_0x147afa){const _0x4732d9=_0x43bf95;return this[_0x4732d9(0xaa1)][_0x4732d9(0x1cb)]={..._0x147afa,'image':_0x3283b7,'heightReference':this['_options'][_0x4732d9(0x5d4)]?_0x34d1e5[_0x4732d9(0x7aa)]['HeightReference'][_0x4732d9(0x827)]:_0x34d1e5['Cesium'][_0x4732d9(0x89e)]['NONE']},this;}[_0x43bf95(0x610)](_0x27bb13,_0x219957){const _0x530228=_0x43bf95;return this[_0x530228(0xaa1)][_0x530228(0x5e7)]={..._0x219957,'text':_0x27bb13,'heightReference':this['_options'][_0x530228(0x5d4)]?_0x34d1e5[_0x530228(0x7aa)]['HeightReference'][_0x530228(0x827)]:_0x34d1e5[_0x530228(0x7aa)][_0x530228(0x89e)][_0x530228(0x60e)]},this;}['setPath'](_0x537d1f,_0x125f24={}){const _0xc703ed=_0x43bf95;return this[_0xc703ed(0x9fa)][_0xc703ed(0x867)]=!!_0x537d1f,_0x3f7522[_0xc703ed(0x5da)](this[_0xc703ed(0x9fa)][_0xc703ed(0x10c)],_0xf6acc9,_0x125f24),this;}},_0x3a847a=_0x41f92a,_0x41eb24={'ANGLE':_0x43bf95(0xc0),'AREA':_0x43bf95(0x2b1),'AREA_HEIGHT':_0x43bf95(0x9c9),'AREA_SURFACE':_0x43bf95(0x27b),'DISTANCE':_0x43bf95(0x7f4),'DISTANCE_SURFACE':'distance_surface','HEADING':_0x43bf95(0x77c),'HEIGHT':_0x43bf95(0x795),'TRIANGLE_HEIGHT':_0x43bf95(0x876)},_0x3d2045=_0x41eb24,_0x586c2c=class{constructor(_0x1d27c0){const _0x1d14a1=_0x43bf95;this[_0x1d14a1(0x9ca)]=_0x1d27c0,this[_0x1d14a1(0x3f7)]=void 0x0,this[_0x1d14a1(0x761)]=void 0x0,this[_0x1d14a1(0xaa1)]=void 0x0,this[_0x1d14a1(0x674)]={},this[_0x1d14a1(0x387)]=[];}get['drawTool'](){const _0x1b102a=_0x43bf95;return this[_0x1b102a(0x3f7)][_0x1b102a(0x95d)];}['_mountedHook'](){}['_onDrawAnchor'](_0x3d184e){}[_0x43bf95(0x4c5)](_0x19a56e){const _0x1fe31=_0x43bf95;this[_0x1fe31(0x387)]['pop'](),this[_0x1fe31(0x387)][_0x1fe31(0xb3)](_0x19a56e),this[_0x1fe31(0x674)][_0x1fe31(0x663)]&&this[_0x1fe31(0x674)][_0x1fe31(0x663)](this['_positions']);}[_0x43bf95(0x56d)](){const _0x4760e4=_0x43bf95;this[_0x4760e4(0x2a1)](),this[_0x4760e4(0x3f7)][_0x4760e4(0x95d)][_0x4760e4(0x96a)](),this['_options']['onDrawStop']&&this['_options'][_0x4760e4(0x53e)](this[_0x4760e4(0xaa1)]);}['_bindEvent'](){const _0x3e989=_0x43bf95;this[_0x3e989(0x95d)]['on'](_0x14f7b9[_0x3e989(0x6f1)],this['_onDrawAnchor'],this),this[_0x3e989(0x95d)]['on'](_0x14f7b9[_0x3e989(0x641)],this['_onAnchorMoving'],this),this[_0x3e989(0x95d)]['on'](_0x14f7b9['DRAW_STOP'],this[_0x3e989(0x56d)],this);}['_unbindEvent'](){const _0xa47da2=_0x43bf95;this[_0xa47da2(0x95d)][_0xa47da2(0x24d)](_0x14f7b9[_0xa47da2(0x6f1)],this[_0xa47da2(0x38e)],this),this[_0xa47da2(0x95d)][_0xa47da2(0x24d)](_0x14f7b9[_0xa47da2(0x641)],this[_0xa47da2(0x4c5)],this),this['drawTool'][_0xa47da2(0x24d)](_0x14f7b9[_0xa47da2(0xa27)],this['_onDrawStop'],this);}[_0x43bf95(0x9ba)](_0x37a468,_0x206f81){const _0x41685a=_0x43bf95;return this[_0x41685a(0x3f7)]=_0x37a468[_0x41685a(0x88c)],this[_0x41685a(0x761)]=_0x37a468['layer'],this[_0x41685a(0x674)]=_0x206f81,this[_0x41685a(0x3f7)][_0x41685a(0x419)][_0x41685a(0x96a)](),this['_viewer']['drawTool']['activate'](_0x206f81),this[_0x41685a(0x6a3)](),this['_unbindEvent'](),this[_0x41685a(0x4ac)](),this;}},_0x3f9a47=_0x586c2c,_0x14322e=class extends _0x3f9a47{constructor(_0x36438c){super(_0x36438c);}[_0x43bf95(0x6a3)](){const _0x5ea2aa=_0x43bf95;this[_0x5ea2aa(0x95d)][_0x5ea2aa(0x6fe)]='左击选择点位,右击结束',this[_0x5ea2aa(0xaa1)]=new _0x34d1e5[(_0x5ea2aa(0x7aa))][(_0x5ea2aa(0x926))]({'polyline':{...this[_0x5ea2aa(0x9ca)],'positions':new _0x34d1e5[(_0x5ea2aa(0x7aa))]['CallbackProperty'](()=>this[_0x5ea2aa(0x387)],!0x1)}}),this['_layer']['entities']['add'](this['_delegate']);}['_onDrawAnchor'](_0x33c774){const _0x563a3f=_0x43bf95;let _0x269b42=this['_positions'][_0x563a3f(0x6a2)];this['_positions'][_0x563a3f(0xb3)](_0x33c774),_0x269b42>0x0&&this[_0x563a3f(0x95d)][_0x563a3f(0xa4f)](_0x14f7b9[_0x563a3f(0x45b)],{'position':_0x33c774}),_0x269b42>=this[_0x563a3f(0x674)]['maxAnchorSize']&&(this[_0x563a3f(0x387)][_0x563a3f(0x321)](),this[_0x563a3f(0x95d)][_0x563a3f(0xa4f)](_0x14f7b9[_0x563a3f(0xa27)],_0x33c774));}},_0xb5cc02=_0x14322e,_0x419710=class{constructor(_0x4dab01){const _0x9bb895=_0x43bf95;this[_0x9bb895(0x3f7)]=void 0x0,this[_0x9bb895(0x761)]=void 0x0,this[_0x9bb895(0x33c)]=_0x4dab01,this[_0x9bb895(0xaa1)]=new _0x34d1e5['Cesium']['Entity'](),this[_0x9bb895(0xaa1)][_0x9bb895(0x5da)](_0x4dab01),this[_0x9bb895(0x674)]={},this[_0x9bb895(0x387)]=[];}get[_0x43bf95(0x419)](){return this['_viewer']['editTool'];}[_0x43bf95(0x6a3)](){}[_0x43bf95(0x8df)](){}[_0x43bf95(0x4c5)]({pickedAnchor:_0x1115da,position:_0x7a233e}){}[_0x43bf95(0x142)]({pickedAnchor:_0x5421cf,position:_0xfc1e5b}){}[_0x43bf95(0x709)]({pickedAnchor:_0x450d65,position:_0x45975c}){const _0x116bfc=_0x43bf95;this[_0x116bfc(0x2a1)](),this['_viewer'][_0x116bfc(0x419)][_0x116bfc(0x96a)]();}[_0x43bf95(0x4ac)](){const _0x10795c=_0x43bf95;return this[_0x10795c(0x419)]['on'](_0x14f7b9[_0x10795c(0x641)],this[_0x10795c(0x4c5)],this),this[_0x10795c(0x419)]['on'](_0x14f7b9[_0x10795c(0x753)],this[_0x10795c(0x142)],this),this['editTool']['on'](_0x14f7b9[_0x10795c(0x23a)],this[_0x10795c(0x709)],this),this;}['_unbindEvent'](){const _0x1defde=_0x43bf95;this['editTool']['off'](_0x14f7b9[_0x1defde(0x641)],this['_onAnchorMoving'],this),this[_0x1defde(0x419)][_0x1defde(0x24d)](_0x14f7b9[_0x1defde(0x753)],this[_0x1defde(0x142)],this),this['editTool'][_0x1defde(0x24d)](_0x14f7b9[_0x1defde(0x23a)],this['_onEditStop'],this);}[_0x43bf95(0x9ba)](_0x34bd55,_0x13de80){const _0x1f848e=_0x43bf95;return this[_0x1f848e(0x3f7)]=_0x34bd55[_0x1f848e(0x88c)],this[_0x1f848e(0x761)]=_0x34bd55[_0x1f848e(0x4a9)],this['_options']=_0x13de80,this['_viewer'][_0x1f848e(0x419)][_0x1f848e(0x96a)](),this['_viewer'][_0x1f848e(0x419)][_0x1f848e(0x4fc)](_0x13de80),this[_0x1f848e(0x6a3)](),this[_0x1f848e(0x8df)](),this[_0x1f848e(0x2a1)](),this[_0x1f848e(0x4ac)](),this;}},_0x3ca971=_0x419710,_0x4d351d=class extends _0x3ca971{constructor(_0x153ba7){super(_0x153ba7);}[_0x43bf95(0x6a3)](){const _0x1059f0=_0x43bf95;this[_0x1059f0(0x419)][_0x1059f0(0x6fe)]=_0x1059f0(0xa2e),this[_0x1059f0(0xaa1)][_0x1059f0(0x10c)][_0x1059f0(0x752)]=new _0x34d1e5[(_0x1059f0(0x7aa))][(_0x1059f0(0x18c))](()=>this['_positions'][_0x1059f0(0x6a2)]>0x1?this[_0x1059f0(0x387)]:null,!0x1),this[_0x1059f0(0x761)][_0x1059f0(0x1f6)]['add'](this[_0x1059f0(0xaa1)]);}[_0x43bf95(0x8df)](){const _0x31f6da=_0x43bf95;let _0x27e18d=[]['concat'](this['_overlay'][_0x31f6da(0x10c)]['positions'][_0x31f6da(0x4e7)](_0x34d1e5[_0x31f6da(0x7aa)][_0x31f6da(0xc3)]['now']()));if(this['_options']['maxAnchorSize']>0x2){for(let _0x5bdf94=0x0;_0x5bdf94<_0x27e18d['length']-0x1;_0x5bdf94++){let _0x1874c9=_0x3a8784(_0x27e18d[_0x5bdf94],_0x27e18d[_0x5bdf94+0x1]);this['_positions'][_0x31f6da(0xb3)](_0x27e18d[_0x5bdf94]),this[_0x31f6da(0x387)][_0x31f6da(0xb3)](_0x1874c9);}this['_positions']['push'](_0x27e18d[_0x27e18d[_0x31f6da(0x6a2)]-0x1]),this[_0x31f6da(0x387)][_0x31f6da(0x2de)]((_0x142de4,_0x1aa6af)=>{const _0x54e278=_0x31f6da;this[_0x54e278(0x419)][_0x54e278(0xa4f)](_0x14f7b9['CREATE_ANCHOR'],{'position':_0x142de4,'index':_0x1aa6af,'isMid':_0x1aa6af%0x2!==0x0});});}else this[_0x31f6da(0x387)]=_0x27e18d,this[_0x31f6da(0x387)][_0x31f6da(0x2de)]((_0x2a86ae,_0x5d98cd)=>{const _0x1355aa=_0x31f6da;this[_0x1355aa(0x419)][_0x1355aa(0xa4f)](_0x14f7b9[_0x1355aa(0x45b)],{'position':_0x2a86ae,'index':_0x5d98cd});});this['_layer'][_0x31f6da(0x1f6)]['remove'](this[_0x31f6da(0x33c)]);}[_0x43bf95(0x142)]({pickedAnchor:_0x2ea749,position:_0xb57990}){const _0x1a70c3=_0x43bf95;let _0x1efca0=_0x2ea749[_0x1a70c3(0x66f)][_0x1a70c3(0x4e7)](_0x34d1e5[_0x1a70c3(0x7aa)][_0x1a70c3(0xc3)]['now']()),_0x22a283=_0x1efca0[_0x1a70c3(0x458)];if(_0x1efca0[_0x1a70c3(0x587)]){let _0x4e9132=_0x3a8784(this[_0x1a70c3(0x387)][_0x22a283],this[_0x1a70c3(0x387)][_0x22a283-0x1]),_0x54a3ee=_0x3a8784(this['_positions'][_0x22a283],this[_0x1a70c3(0x387)][_0x22a283+0x1]);this[_0x1a70c3(0x387)][_0x1a70c3(0xae)](_0x22a283,0x1,_0x4e9132,_0xb57990,_0x54a3ee),this[_0x1a70c3(0x419)]['fire'](_0x14f7b9[_0x1a70c3(0x90a)]),this['_positions'][_0x1a70c3(0x2de)]((_0x3b511b,_0x111bc2)=>{const _0x27f2a7=_0x1a70c3;this[_0x27f2a7(0x419)][_0x27f2a7(0xa4f)](_0x14f7b9[_0x27f2a7(0x45b)],{'position':_0x3b511b,'index':_0x111bc2,'isMid':_0x111bc2%0x2!==0x0});});}}[_0x43bf95(0x4c5)]({pickedAnchor:_0x55a2e0,position:_0x5d39fa}){const _0x3865dc=_0x43bf95;let _0x65e860=_0x55a2e0[_0x3865dc(0x66f)][_0x3865dc(0x4e7)](_0x34d1e5[_0x3865dc(0x7aa)][_0x3865dc(0xc3)][_0x3865dc(0xaa6)]()),_0x441c54=_0x65e860[_0x3865dc(0x458)];if(this['_positions'][_0x441c54]=_0x5d39fa,!_0x65e860[_0x3865dc(0x587)]&&this[_0x3865dc(0x674)]['maxAnchorSize']>0x2){let _0x30c6d7=-0x1,_0x8fa361=-0x1,_0x36323d=-0x1,_0x68f865=-0x1,_0x58add7=this[_0x3865dc(0x387)][_0x3865dc(0x6a2)];if(_0x441c54===0x0?(_0x36323d=_0x441c54+0x2,_0x68f865=_0x441c54+0x1):_0x65e860['index']===_0x58add7-0x1?(_0x30c6d7=_0x441c54-0x2,_0x8fa361=_0x441c54-0x1):(_0x30c6d7=_0x441c54-0x2,_0x8fa361=_0x441c54-0x1,_0x36323d=_0x441c54+0x2,_0x68f865=_0x441c54+0x1),_0x30c6d7>0x0){let _0x264355=_0x3a8784(this[_0x3865dc(0x387)][_0x30c6d7],this[_0x3865dc(0x387)][_0x441c54]);this[_0x3865dc(0x387)][_0x8fa361]=_0x264355,this['editTool'][_0x3865dc(0xa4f)](_0x14f7b9[_0x3865dc(0x27d)],{'index':_0x8fa361,'position':_0x264355});}if(_0x36323d>0x0){let _0x1e464b=_0x3a8784(this[_0x3865dc(0x387)][_0x36323d],this['_positions'][_0x441c54]);this['_positions'][_0x68f865]=_0x1e464b,this[_0x3865dc(0x419)][_0x3865dc(0xa4f)](_0x14f7b9[_0x3865dc(0x27d)],{'index':_0x68f865,'position':_0x1e464b});}}this[_0x3865dc(0x674)][_0x3865dc(0x663)]&&this['_options'][_0x3865dc(0x663)](this[_0x3865dc(0x387)]);}},_0x14157f=_0x4d351d,_0x17507f=class{constructor(){const _0x571c72=_0x43bf95;this['_viewer']=void 0x0,this[_0x571c72(0x761)]=void 0x0,this[_0x571c72(0x44d)]=new _0x34d1e5[(_0x571c72(0x7aa))][(_0x571c72(0x926))]({'label':{'text':'开始','font':_0x571c72(0x677),'pixelOffset':{'x':0x0,'y':-0xf},'disableDepthTestDistance':Number[_0x571c72(0x1fb)],'showBackground':!0x0}}),this['_resultLabel']=new _0x34d1e5['Cesium'][(_0x571c72(0x926))]({'label':{'font':_0x571c72(0x677),'pixelOffset':{'x':0x0,'y':-0xf},'disableDepthTestDistance':Number['POSITIVE_INFINITY'],'showBackground':!0x0}}),this[_0x571c72(0x674)]={};}[_0x43bf95(0x1a2)](_0x3f7382,_0x1d8dee=!0x1){const _0x3e9769=_0x43bf95;let _0x3572e7=this[_0x3e9769(0x3f7)]['terrainProvider']&&!(this[_0x3e9769(0x3f7)][_0x3e9769(0x4ed)]instanceof _0x34d1e5['Cesium']['EllipsoidTerrainProvider'])?_0x34d1e5[_0x3e9769(0x7aa)][_0x3e9769(0x796)](this[_0x3e9769(0x3f7)][_0x3e9769(0x4ed)],_0x3f7382[_0x3e9769(0x127)](_0x5443d2=>_0x34d1e5[_0x3e9769(0x7aa)][_0x3e9769(0x4f1)][_0x3e9769(0x17a)](_0x5443d2))):Promise[_0x3e9769(0x509)](_0x3f7382[_0x3e9769(0x127)](_0x2c159d=>_0x34d1e5['Cesium'][_0x3e9769(0x4f1)]['fromCartesian'](_0x2c159d))),_0x2a00cf=this[_0x3e9769(0x3f7)]['scene']['clampToHeightSupported']&&_0x1d8dee?this[_0x3e9769(0x3f7)][_0x3e9769(0x148)][_0x3e9769(0x3c7)](_0x3f7382,this[_0x3e9769(0x761)][_0x3e9769(0x1f6)][_0x3e9769(0x1e2)]):Promise[_0x3e9769(0x509)](_0x3f7382);return Promise[_0x3e9769(0xa54)]([_0x3572e7,_0x2a00cf]);}[_0x43bf95(0x56d)](_0x1ed0f6){}[_0x43bf95(0x4d8)](_0x272806){}[_0x43bf95(0x672)](_0x27192f,_0x658b27){const _0x551712=_0x43bf95;this[_0x551712(0x3f7)]=_0x27192f[_0x551712(0x88c)],this[_0x551712(0x761)]=_0x27192f[_0x551712(0x4a9)],this[_0x551712(0x674)]=_0x658b27,this['_options']['onDrawStop']=this[_0x551712(0x56d)]['bind'](this),this[_0x551712(0x674)][_0x551712(0x663)]=this[_0x551712(0x4d8)][_0x551712(0x31a)](this),this[_0x551712(0x761)][_0x551712(0x1f6)][_0x551712(0x45f)](this[_0x551712(0x44d)]),this['_layer'][_0x551712(0x1f6)]['add'](this['_resultLabel']);}[_0x43bf95(0x9ba)](_0x2128af,_0x38b5ea){return this;}},_0x29a529=_0x17507f,_0x3ff95e=class extends _0x29a529{constructor(){const _0xc73d05=_0x43bf95;super(),this[_0xc73d05(0x4d7)]=0x2,this['_helpLinePositions']=[],this[_0xc73d05(0x2f8)]=new _0x34d1e5[(_0xc73d05(0x7aa))][(_0xc73d05(0x926))]({'polyline':{'positions':new _0x34d1e5[(_0xc73d05(0x7aa))][(_0xc73d05(0x18c))](()=>this[_0xc73d05(0x313)][_0xc73d05(0x6a2)]>0x1?this[_0xc73d05(0x313)]:null,!0x1)}});}[_0x43bf95(0x56d)](_0x4f2631){const _0x425e77=_0x43bf95;new _0x14157f(_0x4f2631)[_0x425e77(0x9ba)]({'viewer':this['_viewer'],'layer':this[_0x425e77(0x761)]},{...this[_0x425e77(0x674)],'maxAnchorSize':this[_0x425e77(0x4d7)]});}[_0x43bf95(0x4d8)](_0x37943c){const _0x3382ed=_0x43bf95;if(_0x37943c['length']>0x0&&(this['_startLabel'][_0x3382ed(0x9a7)]=_0x37943c[0x0]),_0x37943c[_0x3382ed(0x6a2)]>0x1){this[_0x3382ed(0x22f)][_0x3382ed(0x9a7)]=_0x37943c[0x1];let _0x2040f1=_0x34d1e5[_0x3382ed(0x7aa)][_0x3382ed(0x7a1)][_0x3382ed(0x423)]['geodeticSurfaceNormal'](_0x37943c[0x0],new _0x34d1e5[(_0x3382ed(0x7aa))][(_0x3382ed(0x982))]()),_0x5d406f=_0x34d1e5['Cesium'][_0x3382ed(0x2ac)][_0x3382ed(0xa0e)](_0x37943c[0x0],_0x2040f1);this[_0x3382ed(0x313)]=[_0x37943c[0x0],_0x34d1e5['Cesium']['Plane'][_0x3382ed(0x685)](_0x5d406f,_0x37943c[0x1],new _0x34d1e5[(_0x3382ed(0x7aa))][(_0x3382ed(0x982))]()),_0x37943c[0x1]];let _0x2700e7=Math[_0x3382ed(0x133)](_0x34d1e5[_0x3382ed(0x7aa)][_0x3382ed(0x2ac)]['getPointDistance'](_0x5d406f,_0x37943c[0x1]));this[_0x3382ed(0x22f)][_0x3382ed(0x5e7)][_0x3382ed(0xd8)]='角度:'+_0x34d1e5[_0x3382ed(0x7aa)]['Math']['toDegrees'](Math[_0x3382ed(0x50f)](_0x2700e7/_0x34d1e5[_0x3382ed(0x7aa)]['Cartesian3'][_0x3382ed(0x7f4)](_0x37943c[0x0],_0x37943c[0x1])))[_0x3382ed(0x964)](0x2)+'\x20度';}}['start'](_0x1a6c11,_0x5656dc){const _0x467ed1=_0x43bf95;this[_0x467ed1(0x672)](_0x1a6c11,_0x5656dc);let _0x5a0875=new _0x34d1e5[(_0x467ed1(0x7aa))][(_0x467ed1(0x336))]({'color':_0x34d1e5['Cesium'][_0x467ed1(0x7d2)][_0x467ed1(0x748)]});return this[_0x467ed1(0x2f8)][_0x467ed1(0x10c)][_0x467ed1(0x22e)]=_0x5a0875,this[_0x467ed1(0x2f8)][_0x467ed1(0x10c)][_0x467ed1(0x182)]=_0x5a0875,this['_layer'][_0x467ed1(0x1f6)][_0x467ed1(0x45f)](this['_helpLine']),new _0xb5cc02({'material':_0x5656dc[_0x467ed1(0x22e)]||_0x34d1e5[_0x467ed1(0x7aa)][_0x467ed1(0x7d2)][_0x467ed1(0x801)][_0x467ed1(0x8e4)](0.6),'depthFailMaterial':_0x5656dc[_0x467ed1(0x182)]||new _0x34d1e5[(_0x467ed1(0x7aa))][(_0x467ed1(0x336))]({'color':_0x34d1e5[_0x467ed1(0x7aa)][_0x467ed1(0x7d2)][_0x467ed1(0x801)][_0x467ed1(0x8e4)](0.6)}),'width':_0x5656dc[_0x467ed1(0x371)]||0x2,'clampToGround':!0x1})[_0x467ed1(0x9ba)](_0x1a6c11,{..._0x5656dc,'maxAnchorSize':this[_0x467ed1(0x4d7)]}),this;}},_0x44cf2a=_0x3ff95e,_0x4d78f6=class extends _0x3f9a47{constructor(_0x1121fc){super(_0x1121fc);}['_mountedHook'](){const _0x306426=_0x43bf95;this[_0x306426(0x95d)]['tooltipMess']=_0x306426(0x71c),this[_0x306426(0xaa1)]=new _0x34d1e5[(_0x306426(0x7aa))][(_0x306426(0x926))]({'polygon':{...this['_style'],'hierarchy':new _0x34d1e5[(_0x306426(0x7aa))][(_0x306426(0x18c))](()=>this[_0x306426(0x387)]['length']>0x2?new _0x34d1e5[(_0x306426(0x7aa))]['PolygonHierarchy'](this['_positions'][_0x306426(0x127)](_0x358a62=>_0x358a62[_0x306426(0x5c3)]())):null,!0x1)}}),this[_0x306426(0x761)][_0x306426(0x1f6)][_0x306426(0x45f)](this[_0x306426(0xaa1)]);}[_0x43bf95(0x38e)](_0x204139){const _0x52e396=_0x43bf95;this[_0x52e396(0x387)][_0x52e396(0xb3)](_0x204139),this[_0x52e396(0x95d)][_0x52e396(0xa4f)](_0x14f7b9['CREATE_ANCHOR'],{'position':_0x204139});}},_0x49862d=_0x4d78f6,_0x120461=class extends _0x3ca971{constructor(_0x15e11a){super(_0x15e11a);}[_0x43bf95(0x6a3)](){const _0x5547d0=_0x43bf95;this['editTool'][_0x5547d0(0x6fe)]='点击锚点移动,右击结束编辑',this[_0x5547d0(0xaa1)]['polygon'][_0x5547d0(0x245)]=new _0x34d1e5[(_0x5547d0(0x7aa))][(_0x5547d0(0x18c))](_0x2f5610=>this['_positions'][_0x5547d0(0x6a2)]>0x2?new _0x34d1e5[(_0x5547d0(0x7aa))][(_0x5547d0(0x89f))](this[_0x5547d0(0x387)]):null,!0x1),this['_layer']['entities'][_0x5547d0(0x45f)](this[_0x5547d0(0xaa1)]);}[_0x43bf95(0x8df)](){const _0x2ceb9c=_0x43bf95;let _0x102063=[][_0x2ceb9c(0x64c)](this[_0x2ceb9c(0x33c)][_0x2ceb9c(0x410)][_0x2ceb9c(0x245)][_0x2ceb9c(0x4e7)](_0x34d1e5[_0x2ceb9c(0x7aa)][_0x2ceb9c(0xc3)][_0x2ceb9c(0xaa6)]())['positions']);_0x102063[_0x2ceb9c(0xb3)](_0x102063[0x0]);for(let _0x42e041=0x0;_0x42e041<_0x102063['length']-0x1;_0x42e041++){let _0x155f56=_0x3a8784(_0x102063[_0x42e041],_0x102063[_0x42e041+0x1]);this[_0x2ceb9c(0x387)][_0x2ceb9c(0xb3)](_0x102063[_0x42e041]),this[_0x2ceb9c(0x387)]['push'](_0x155f56);}this[_0x2ceb9c(0x387)][_0x2ceb9c(0x2de)]((_0x2c041a,_0x4f5adb)=>{const _0x2a3fef=_0x2ceb9c;this[_0x2a3fef(0x419)][_0x2a3fef(0xa4f)](_0x14f7b9[_0x2a3fef(0x45b)],{'position':_0x2c041a,'index':_0x4f5adb,'isMid':_0x4f5adb%0x2!==0x0});}),this[_0x2ceb9c(0x761)][_0x2ceb9c(0x1f6)]['remove'](this[_0x2ceb9c(0x33c)]);}[_0x43bf95(0x142)]({pickedAnchor:_0x2c3662,position:_0x3391da}){const _0x5e79b6=_0x43bf95;let _0xaa072d=_0x2c3662[_0x5e79b6(0x66f)][_0x5e79b6(0x4e7)](_0x34d1e5[_0x5e79b6(0x7aa)][_0x5e79b6(0xc3)][_0x5e79b6(0xaa6)]()),_0x2320f6=_0xaa072d[_0x5e79b6(0x458)];if(_0xaa072d[_0x5e79b6(0x587)]){let _0x148212,_0x1c5a72,_0x20d747=this[_0x5e79b6(0x387)]['length'];_0x2320f6===_0x20d747-0x1?(_0x148212=_0x3a8784(this['_positions'][_0x2320f6],this['_positions'][_0x2320f6-0x1]),_0x1c5a72=_0x3a8784(this['_positions'][_0x2320f6],this['_positions'][0x0])):(_0x148212=_0x3a8784(this[_0x5e79b6(0x387)][_0x2320f6],this[_0x5e79b6(0x387)][_0x2320f6-0x1]),_0x1c5a72=_0x3a8784(this['_positions'][_0x2320f6],this[_0x5e79b6(0x387)][_0x2320f6+0x1])),this['_positions'][_0x5e79b6(0xae)](_0x2320f6,0x1,_0x148212,_0x3391da,_0x1c5a72),this[_0x5e79b6(0x419)][_0x5e79b6(0xa4f)](_0x14f7b9['CLEAR_ANCHOR']),this[_0x5e79b6(0x387)][_0x5e79b6(0x2de)]((_0x4ba035,_0x11b0f4)=>{const _0x877244=_0x5e79b6;this[_0x877244(0x419)][_0x877244(0xa4f)](_0x14f7b9[_0x877244(0x45b)],{'position':_0x4ba035,'index':_0x11b0f4,'isMid':_0x11b0f4%0x2!==0x0});});}}['_onAnchorMoving']({pickedAnchor:_0x52b6f0,position:_0x5c913f}){const _0x15b8e9=_0x43bf95;let _0x4b6dd7=_0x52b6f0['properties'][_0x15b8e9(0x4e7)](_0x34d1e5['Cesium'][_0x15b8e9(0xc3)][_0x15b8e9(0xaa6)]()),_0x196675=_0x4b6dd7[_0x15b8e9(0x458)];this['_positions'][_0x196675]=_0x5c913f;let _0x121e3d=this[_0x15b8e9(0x387)][_0x15b8e9(0x6a2)];if(!_0x4b6dd7['isMid']){let _0x30e6a2=-0x1,_0x4bacab=-0x1,_0x4f1021=-0x1,_0x5f54b4=-0x1;_0x196675===0x0?(_0x30e6a2=_0x121e3d-0x2,_0x4bacab=_0x121e3d-0x1,_0x4f1021=_0x196675+0x2,_0x5f54b4=_0x196675+0x1):_0x196675===_0x121e3d-0x2?(_0x30e6a2=_0x196675-0x2,_0x4bacab=_0x196675-0x1,_0x4f1021=0x0,_0x5f54b4=_0x121e3d-0x1):(_0x30e6a2=_0x196675-0x2,_0x4bacab=_0x196675-0x1,_0x4f1021=_0x196675+0x2,_0x5f54b4=_0x196675+0x1);let _0x43db46=_0x3a8784(this[_0x15b8e9(0x387)][_0x30e6a2],this[_0x15b8e9(0x387)][_0x196675]),_0x201aab=_0x3a8784(this[_0x15b8e9(0x387)][_0x4f1021],this[_0x15b8e9(0x387)][_0x196675]);this[_0x15b8e9(0x387)][_0x4bacab]=_0x43db46,this['_positions'][_0x5f54b4]=_0x201aab,this[_0x15b8e9(0x419)][_0x15b8e9(0xa4f)](_0x14f7b9[_0x15b8e9(0x27d)],{'index':_0x4bacab,'position':_0x43db46}),this[_0x15b8e9(0x419)]['fire'](_0x14f7b9[_0x15b8e9(0x27d)],{'index':_0x5f54b4,'position':_0x201aab});}this[_0x15b8e9(0x674)]['onCalc']&&this['_options'][_0x15b8e9(0x663)](this[_0x15b8e9(0x387)]);}},_0x1e64b3=_0x120461,_0x1ebab2=class extends _0x29a529{constructor(){super();}[_0x43bf95(0x56d)](_0x2b7749){const _0x33fff1=_0x43bf95;new _0x1e64b3(_0x2b7749)[_0x33fff1(0x9ba)]({'viewer':this[_0x33fff1(0x3f7)],'layer':this[_0x33fff1(0x761)]},this[_0x33fff1(0x674)]);}['_onCalc'](_0x3756c6){const _0x3ce1d8=_0x43bf95;var _0x30bea8;_0x3756c6[_0x3ce1d8(0x6a2)]>0x2&&(this[_0x3ce1d8(0x22f)][_0x3ce1d8(0x9a7)]=(_0x30bea8=_0x34d1e5['Cesium']['BoundingSphere'][_0x3ce1d8(0x27c)](_0x3756c6))==null?void 0x0:_0x30bea8[_0x3ce1d8(0x765)],this[_0x3ce1d8(0x22f)][_0x3ce1d8(0x5e7)][_0x3ce1d8(0xd8)]=_0x3ce1d8(0x535)+_0x1b9dd7(_0x3756c6)[_0x3ce1d8(0x964)](0x2)+_0x3ce1d8(0x107));}[_0x43bf95(0x9ba)](_0x12837a,_0x3a02ba){const _0x51bcb3=_0x43bf95;return this[_0x51bcb3(0x672)](_0x12837a,_0x3a02ba),new _0x49862d({'material':_0x3a02ba[_0x51bcb3(0x22e)]||_0x34d1e5['Cesium'][_0x51bcb3(0x7d2)][_0x51bcb3(0x801)][_0x51bcb3(0x8e4)](0.6),'perPositionHeight':!0x0})[_0x51bcb3(0x9ba)](_0x12837a,this[_0x51bcb3(0x674)]),this;}},_0x1b26ad=_0x1ebab2,_0x55f082=class extends _0x29a529{constructor(){super();}[_0x43bf95(0x56d)](_0x7971a4){const _0xe59897=_0x43bf95;new _0x1e64b3(_0x7971a4)[_0xe59897(0x9ba)]({'viewer':this[_0xe59897(0x3f7)],'layer':this[_0xe59897(0x761)]},this[_0xe59897(0x674)]);}[_0x43bf95(0x3af)](_0x3f59cf,_0x18542f=0x4){const _0x5f5862=_0x43bf95;let _0xc87ee3=[];for(let _0x43c575=0x0;_0x43c575<_0x18542f;++_0x43c575)for(let _0x47c264=0x0;_0x47c264<_0x18542f;++_0x47c264){let _0x1642a6=_0x34d1e5[_0x5f5862(0x7aa)]['Math']['lerp'](_0x3f59cf[_0x5f5862(0x97d)],_0x3f59cf['east'],_0x47c264/(_0x18542f-0x1)),_0x437c16=_0x34d1e5[_0x5f5862(0x7aa)][_0x5f5862(0x72b)]['lerp'](_0x3f59cf[_0x5f5862(0x35e)],_0x3f59cf[_0x5f5862(0x3bf)],_0x43c575/(_0x18542f-0x1));_0xc87ee3[_0x5f5862(0xb3)](_0x34d1e5[_0x5f5862(0x7aa)]['Cartesian3'][_0x5f5862(0x464)](_0x1642a6,_0x437c16));}return _0xc87ee3;}['_onCalc'](_0x142ceb){const _0x5488a0=_0x43bf95;if(_0x142ceb['length']>0x2){let _0x23924a=this[_0x5488a0(0x3af)](_0x34d1e5[_0x5488a0(0x7aa)][_0x5488a0(0x6e7)]['fromCartesianArray'](_0x142ceb),this[_0x5488a0(0x674)]['lerpNum']);this[_0x5488a0(0x1a2)](_0x23924a,!0x0)[_0x5488a0(0x379)](([_0x7a020f,_0x3f23be])=>_0x7a020f[_0x5488a0(0x127)]((_0x2c09e7,_0x746f8e)=>({'lng':_0x2c09e7[_0x5488a0(0xc9)],'lat':_0x2c09e7['latitude'],'alt':Math['max'](_0x2c09e7[_0x5488a0(0x795)]||0x0,_0x3f23be[_0x746f8e]?_0x34d1e5['Cesium'][_0x5488a0(0x4f1)][_0x5488a0(0x17a)](_0x3f23be[_0x746f8e])[_0x5488a0(0x795)]:0x0)})))['then'](_0x3142da=>{const _0x57d5ff=_0x5488a0;let _0x2129f8=0x0,_0x155d42;_0x3142da['forEach'](_0x4e70a2=>{const _0x509f40=_0xf114;_0x4e70a2[_0x509f40(0xa84)]>_0x2129f8&&(_0x2129f8=_0x4e70a2['alt'],_0x155d42=_0x4e70a2);}),_0x155d42&&(this[_0x57d5ff(0x22f)][_0x57d5ff(0x9a7)]=_0x34d1e5['Cesium']['Cartesian3'][_0x57d5ff(0x464)](_0x155d42[_0x57d5ff(0x598)],_0x155d42['lat'],_0x155d42['alt']),this['_resultLabel'][_0x57d5ff(0x5e7)][_0x57d5ff(0xd8)]=_0x57d5ff(0x1a9)+_0x2129f8['toFixed'](0x2)+'\x20米');});}}['start'](_0x1a8a72,_0x9374ac){const _0x177248=_0x43bf95;return this[_0x177248(0x672)](_0x1a8a72,_0x9374ac),new _0x49862d({'material':_0x9374ac[_0x177248(0x22e)]||_0x34d1e5['Cesium'][_0x177248(0x7d2)]['YELLOW']['withAlpha'](0.6)})['start'](_0x1a8a72,this['_options']),this;}},_0x4bfc0b=_0x55f082,_0xb55276=class extends _0x29a529{constructor(){super();}[_0x43bf95(0x3af)](_0x508498,_0x194526=0x4){const _0x1fabed=_0x43bf95;let _0x23d419=[];for(let _0x5d9bf4=0x0;_0x5d9bf4<_0x194526;++_0x5d9bf4)for(let _0x4a0548=0x0;_0x4a0548<_0x194526;++_0x4a0548){let _0xa9f718=_0x34d1e5[_0x1fabed(0x7aa)][_0x1fabed(0x72b)][_0x1fabed(0x538)](_0x508498[_0x1fabed(0x97d)],_0x508498['east'],_0x4a0548/(_0x194526-0x1)),_0x5b2641=_0x34d1e5['Cesium'][_0x1fabed(0x72b)][_0x1fabed(0x538)](_0x508498['south'],_0x508498[_0x1fabed(0x3bf)],_0x5d9bf4/(_0x194526-0x1));_0x23d419[_0x1fabed(0xb3)](_0x34d1e5[_0x1fabed(0x7aa)]['Cartesian3']['fromRadians'](_0xa9f718,_0x5b2641));}return _0x23d419;}[_0x43bf95(0x56d)](_0x5a94e2){const _0x2b825b=_0x43bf95;new _0x1e64b3(_0x5a94e2)[_0x2b825b(0x9ba)]({'viewer':this[_0x2b825b(0x3f7)],'layer':this[_0x2b825b(0x761)]},this[_0x2b825b(0x674)]);}['_onCalc'](_0x2cef04){const _0x434439=_0x43bf95;var _0x389426;if(_0x2cef04[_0x434439(0x6a2)]>0x2){this[_0x434439(0x22f)]['position']=(_0x389426=_0x34d1e5[_0x434439(0x7aa)][_0x434439(0x9be)][_0x434439(0x27c)](_0x2cef04))==null?void 0x0:_0x389426[_0x434439(0x765)];let _0x15fe4a=this[_0x434439(0x3af)](_0x34d1e5[_0x434439(0x7aa)][_0x434439(0x6e7)][_0x434439(0x77d)](_0x2cef04),this[_0x434439(0x674)][_0x434439(0x9e1)]);this[_0x434439(0x1a2)](_0x15fe4a[_0x434439(0x64c)](_0x2cef04),!0x1)[_0x434439(0x379)](([_0x39a17c])=>_0x39a17c[_0x434439(0x127)](_0x2c4766=>_0x34d1e5['Cesium'][_0x434439(0x982)][_0x434439(0x81e)](_0x34d1e5[_0x434439(0x7aa)][_0x434439(0x72b)][_0x434439(0x438)](_0x2c4766['longitude']),_0x34d1e5[_0x434439(0x7aa)][_0x434439(0x72b)][_0x434439(0x438)](_0x2c4766[_0x434439(0xa6e)]),_0x2c4766[_0x434439(0x795)])))[_0x434439(0x379)](_0x3f1048=>{const _0x44731d=_0x434439;this['_resultLabel']['label'][_0x44731d(0xd8)]='面积:'+_0x1b9dd7(_0x3f1048)[_0x44731d(0x964)](0x2)+_0x44731d(0x107);});}}[_0x43bf95(0x9ba)](_0xa72f0,_0x6a4e10){const _0x4cf7fb=_0x43bf95;return this[_0x4cf7fb(0x672)](_0xa72f0,_0x6a4e10),new _0x49862d({'material':_0x6a4e10[_0x4cf7fb(0x22e)]||_0x34d1e5[_0x4cf7fb(0x7aa)][_0x4cf7fb(0x7d2)][_0x4cf7fb(0x801)]['withAlpha'](0.6)})[_0x4cf7fb(0x9ba)](_0xa72f0,this[_0x4cf7fb(0x674)]),this;}},_0x8cb350=_0xb55276,_0x3c7495=class extends _0x29a529{constructor(){const _0x2aa59b=_0x43bf95;super(),this[_0x2aa59b(0x4d7)]=0x270f;}[_0x43bf95(0x56d)](_0x1ec9c4){const _0x437ad=_0x43bf95;new _0x14157f(_0x1ec9c4)['start']({'viewer':this[_0x437ad(0x3f7)],'layer':this['_layer']},{...this['_options'],'maxAnchorSize':this[_0x437ad(0x4d7)]});}[_0x43bf95(0x4d8)](_0xced013){const _0x2ad85b=_0x43bf95;if(_0xced013[_0x2ad85b(0x6a2)]>0x0&&(this['_startLabel'][_0x2ad85b(0x9a7)]=_0xced013[0x0]),_0xced013[_0x2ad85b(0x6a2)]>0x1){this[_0x2ad85b(0x22f)][_0x2ad85b(0x9a7)]=_0xced013[_0xced013[_0x2ad85b(0x6a2)]-0x1];let _0x1e08b7=0x0;for(let _0x5213b6=0x0;_0x5213b6<_0xced013[_0x2ad85b(0x6a2)]-0x1;_0x5213b6++){let _0x265bd0=_0x34d1e5['Cesium']['Cartesian3'][_0x2ad85b(0x7f4)](_0xced013[_0x5213b6],_0xced013[_0x5213b6+0x1]);_0x1e08b7+=_0x265bd0;}this['_resultLabel'][_0x2ad85b(0x5e7)][_0x2ad85b(0xd8)]=_0x1e08b7>0x3e8?_0x2ad85b(0x70a)+(_0x1e08b7/0x3e8)[_0x2ad85b(0x964)](0x2)+_0x2ad85b(0x5bb):_0x2ad85b(0x70a)+_0x1e08b7[_0x2ad85b(0x964)](0x2)+'\x20米';}}['start'](_0x1d8877,_0x5f0a6e){const _0x586338=_0x43bf95;return this[_0x586338(0x672)](_0x1d8877,_0x5f0a6e),new _0xb5cc02({'material':_0x5f0a6e[_0x586338(0x22e)]||_0x34d1e5['Cesium'][_0x586338(0x7d2)]['YELLOW'][_0x586338(0x8e4)](0.6),'depthFailMaterial':_0x5f0a6e[_0x586338(0x182)]||new _0x34d1e5[(_0x586338(0x7aa))][(_0x586338(0x336))]({'color':_0x34d1e5[_0x586338(0x7aa)]['Color'][_0x586338(0x801)][_0x586338(0x8e4)](0.6)}),'width':_0x5f0a6e[_0x586338(0x371)]||0x2,'clampToGround':!0x1})[_0x586338(0x9ba)](_0x1d8877,{..._0x5f0a6e,'maxAnchorSize':this[_0x586338(0x4d7)]}),this;}},_0x20119a=_0x3c7495,_0xc907e4=class extends _0x29a529{constructor(){const _0x46fec6=_0x43bf95;super(),this[_0x46fec6(0x4d7)]=0x270f;}['_lerp'](_0x101a5b,_0x482d4b,_0x3a29f8=0x5){const _0x380b56=_0x43bf95;let _0x427fb6=[],_0x2bcad7=_0x34d1e5['Cesium']['Cartographic'][_0x380b56(0x17a)](_0x101a5b),_0x3c26c4=_0x34d1e5[_0x380b56(0x7aa)][_0x380b56(0x4f1)]['fromCartesian'](_0x482d4b);for(let _0x46e57f=0x0;_0x46e57f<_0x3a29f8;_0x46e57f++){let _0x560012=_0x34d1e5[_0x380b56(0x7aa)][_0x380b56(0x72b)][_0x380b56(0x538)](_0x2bcad7[_0x380b56(0xc9)],_0x3c26c4[_0x380b56(0xc9)],_0x46e57f/_0x3a29f8),_0x4c810b=_0x34d1e5[_0x380b56(0x7aa)][_0x380b56(0x72b)][_0x380b56(0x538)](_0x2bcad7[_0x380b56(0xa6e)],_0x3c26c4[_0x380b56(0xa6e)],_0x46e57f/_0x3a29f8),_0x199459=_0x2bcad7['height']-(_0x2bcad7[_0x380b56(0x795)]-_0x3c26c4['height'])*(_0x46e57f/_0x3a29f8);_0x427fb6[_0x380b56(0xb3)](_0x34d1e5[_0x380b56(0x7aa)][_0x380b56(0x982)][_0x380b56(0x464)](_0x560012,_0x4c810b,_0x199459));}return _0x427fb6;}[_0x43bf95(0x56d)](_0x27e9ad){const _0xef45ec=_0x43bf95;new _0x14157f(_0x27e9ad)[_0xef45ec(0x9ba)]({'viewer':this['_viewer'],'layer':this[_0xef45ec(0x761)]},{...this[_0xef45ec(0x674)],'maxAnchorSize':this['_maxAnchorSize']});}[_0x43bf95(0x4d8)](_0x2e89d1){const _0x5dc1e5=_0x43bf95;if(_0x2e89d1['length']>0x0&&(this[_0x5dc1e5(0x44d)][_0x5dc1e5(0x9a7)]=_0x2e89d1[0x0]),_0x2e89d1[_0x5dc1e5(0x6a2)]>0x1){let _0x473947=[_0x2e89d1[0x0]];this[_0x5dc1e5(0x22f)][_0x5dc1e5(0x9a7)]=_0x2e89d1[_0x2e89d1[_0x5dc1e5(0x6a2)]-0x1];for(let _0x3b8bfe=0x0;_0x3b8bfe<_0x2e89d1[_0x5dc1e5(0x6a2)]-0x1;_0x3b8bfe++)_0x473947=_0x473947['concat'](this[_0x5dc1e5(0x3af)](_0x2e89d1[_0x3b8bfe],_0x2e89d1[_0x3b8bfe+0x1],this['_options']['lerpNum']));_0x473947[_0x5dc1e5(0xb3)](_0x2e89d1[_0x2e89d1['length']-0x1]),this[_0x5dc1e5(0x1a2)](_0x473947)[_0x5dc1e5(0x379)](([_0x1226e2,_0x1dc7d3])=>_0x1226e2['map']((_0x9139e8,_0x61a5be)=>_0x34d1e5['Cesium'][_0x5dc1e5(0x982)][_0x5dc1e5(0x81e)](_0x34d1e5[_0x5dc1e5(0x7aa)][_0x5dc1e5(0x72b)][_0x5dc1e5(0x438)](_0x9139e8[_0x5dc1e5(0xc9)]),_0x34d1e5['Cesium'][_0x5dc1e5(0x72b)]['toDegrees'](_0x9139e8['latitude']),Math[_0x5dc1e5(0x2c3)](_0x9139e8[_0x5dc1e5(0x795)]||0x0,_0x1dc7d3[_0x61a5be]?_0x34d1e5[_0x5dc1e5(0x7aa)]['Cartographic'][_0x5dc1e5(0x17a)](_0x1dc7d3[_0x61a5be])[_0x5dc1e5(0x795)]:0x0))))[_0x5dc1e5(0x379)](_0x271678=>{const _0x5284a5=_0x5dc1e5;let _0x45ff67=0x0;for(let _0x11a783=0x0;_0x11a783<_0x271678['length']-0x1;_0x11a783++){let _0x1a2df7=_0x34d1e5[_0x5284a5(0x7aa)][_0x5284a5(0x982)][_0x5284a5(0x7f4)](_0x271678[_0x11a783],_0x271678[_0x11a783+0x1]);_0x45ff67+=_0x1a2df7;}this['_resultLabel'][_0x5284a5(0x5e7)][_0x5284a5(0xd8)]=_0x45ff67>0x3e8?_0x5284a5(0x70a)+(_0x45ff67/0x3e8)[_0x5284a5(0x964)](0x2)+_0x5284a5(0x5bb):'距离:'+_0x45ff67['toFixed'](0x2)+'\x20米';});}}[_0x43bf95(0x9ba)](_0x62d237,_0x3ba219){const _0x112114=_0x43bf95;return this[_0x112114(0x672)](_0x62d237,_0x3ba219),new _0xb5cc02({'material':_0x3ba219[_0x112114(0x22e)]||_0x34d1e5[_0x112114(0x7aa)][_0x112114(0x7d2)][_0x112114(0x801)][_0x112114(0x8e4)](0.6),'depthFailMaterial':_0x3ba219[_0x112114(0x182)]||new _0x34d1e5[(_0x112114(0x7aa))][(_0x112114(0x336))]({'color':_0x34d1e5['Cesium'][_0x112114(0x7d2)]['YELLOW'][_0x112114(0x8e4)](0.6)}),'width':_0x3ba219['width']||0x2,'clampToGround':!0x0})[_0x112114(0x9ba)](_0x62d237,{...this[_0x112114(0x674)],'maxAnchorSize':this[_0x112114(0x4d7)]}),this;}},_0x3259c0=_0xc907e4,_0x4c008c=class extends _0x29a529{constructor(){const _0x1e8fca=_0x43bf95;super(),this[_0x1e8fca(0x4d7)]=0x2;}['_onDrawStop'](_0x53077d){const _0x106716=_0x43bf95;new _0x14157f(_0x53077d)[_0x106716(0x9ba)]({'viewer':this['_viewer'],'layer':this[_0x106716(0x761)]},{...this[_0x106716(0x674)],'maxAnchorSize':this[_0x106716(0x4d7)]});}['_onCalc'](_0x38d1c0){const _0x29316e=_0x43bf95;_0x38d1c0[_0x29316e(0x6a2)]>0x0&&(this['_startLabel'][_0x29316e(0x9a7)]=_0x38d1c0[0x0]),_0x38d1c0[_0x29316e(0x6a2)]>0x1&&(this['_resultLabel']['position']=_0x38d1c0[_0x38d1c0['length']-0x1],this[_0x29316e(0x22f)]['label'][_0x29316e(0xd8)]=_0x29316e(0x505)+_0x34d1e5[_0x29316e(0x7aa)][_0x29316e(0x72b)]['toDegrees'](_0x4a436d(_0x38d1c0[0x0],_0x38d1c0[0x1]))[_0x29316e(0x964)](0x1)+'\x20度');}[_0x43bf95(0x9ba)](_0x3c735d,_0x3cb7e1){const _0x2ec258=_0x43bf95;return this[_0x2ec258(0x672)](_0x3c735d,_0x3cb7e1),new _0xb5cc02({'material':_0x3cb7e1[_0x2ec258(0x22e)]||_0x34d1e5[_0x2ec258(0x7aa)]['Color'][_0x2ec258(0x801)]['withAlpha'](0.6),'depthFailMaterial':_0x3cb7e1['depthFailMaterial']||new _0x34d1e5[(_0x2ec258(0x7aa))][(_0x2ec258(0x336))]({'color':_0x34d1e5[_0x2ec258(0x7aa)][_0x2ec258(0x7d2)][_0x2ec258(0x801)][_0x2ec258(0x8e4)](0.6)}),'width':_0x3cb7e1[_0x2ec258(0x371)]||0x2})[_0x2ec258(0x9ba)](_0x3c735d,{...this['_options'],'maxAnchorSize':this[_0x2ec258(0x4d7)]}),this;}},_0x1610fc=_0x4c008c,_0x16eaab=class extends _0x29a529{constructor(){const _0x29b011=_0x43bf95;super(),this[_0x29b011(0x4d7)]=0x2,this['_helpLinePositions']=[],this['_helpLine']=new _0x34d1e5['Cesium'][(_0x29b011(0x926))]({'polyline':{'positions':new _0x34d1e5[(_0x29b011(0x7aa))][(_0x29b011(0x18c))](()=>this[_0x29b011(0x313)]['length']>0x1?this[_0x29b011(0x313)]:null,!0x1)}});}[_0x43bf95(0x56d)](_0x3ad060){const _0x48dba2=_0x43bf95;new _0x14157f(_0x3ad060)[_0x48dba2(0x9ba)]({'viewer':this[_0x48dba2(0x3f7)],'layer':this[_0x48dba2(0x761)]},{...this[_0x48dba2(0x674)],'maxAnchorSize':this['_maxAnchorSize']});}['_onCalc'](_0x1d6231){const _0x5bc0ad=_0x43bf95;if(_0x1d6231['length']>0x0&&(this['_startLabel'][_0x5bc0ad(0x9a7)]=_0x1d6231[0x0]),_0x1d6231[_0x5bc0ad(0x6a2)]>0x1){this[_0x5bc0ad(0x22f)][_0x5bc0ad(0x9a7)]=_0x1d6231[0x1];let _0x365cb4=_0x34d1e5[_0x5bc0ad(0x7aa)][_0x5bc0ad(0x7a1)][_0x5bc0ad(0x423)][_0x5bc0ad(0x3d1)](_0x1d6231[0x0],new _0x34d1e5[(_0x5bc0ad(0x7aa))][(_0x5bc0ad(0x982))]()),_0x215138=_0x34d1e5[_0x5bc0ad(0x7aa)][_0x5bc0ad(0x2ac)]['fromPointNormal'](_0x1d6231[0x0],_0x365cb4);this[_0x5bc0ad(0x313)]=[_0x1d6231[0x0],_0x34d1e5[_0x5bc0ad(0x7aa)]['Plane'][_0x5bc0ad(0x685)](_0x215138,_0x1d6231[0x1],new _0x34d1e5[(_0x5bc0ad(0x7aa))]['Cartesian3']()),_0x1d6231[0x1]];let _0x30908c=Math[_0x5bc0ad(0x133)](_0x34d1e5[_0x5bc0ad(0x7aa)][_0x5bc0ad(0x2ac)][_0x5bc0ad(0x7a2)](_0x215138,_0x1d6231[0x1]));this[_0x5bc0ad(0x22f)][_0x5bc0ad(0x5e7)][_0x5bc0ad(0xd8)]=_0x5bc0ad(0x1a9)+_0x30908c[_0x5bc0ad(0x964)](0x2)+'\x20米';}}[_0x43bf95(0x9ba)](_0x5c6851,_0x33d78f){const _0x1d9e72=_0x43bf95;this[_0x1d9e72(0x672)](_0x5c6851,_0x33d78f);let _0x4e5e31=new _0x34d1e5[(_0x1d9e72(0x7aa))]['PolylineDashMaterialProperty']({'color':_0x34d1e5[_0x1d9e72(0x7aa)]['Color'][_0x1d9e72(0x748)]});return this[_0x1d9e72(0x2f8)]['polyline'][_0x1d9e72(0x22e)]=_0x4e5e31,this['_helpLine'][_0x1d9e72(0x10c)][_0x1d9e72(0x182)]=_0x4e5e31,this[_0x1d9e72(0x761)][_0x1d9e72(0x1f6)][_0x1d9e72(0x45f)](this[_0x1d9e72(0x2f8)]),new _0xb5cc02({'material':_0x33d78f['material']||_0x34d1e5[_0x1d9e72(0x7aa)][_0x1d9e72(0x7d2)][_0x1d9e72(0x801)][_0x1d9e72(0x8e4)](0.6),'depthFailMaterial':_0x33d78f[_0x1d9e72(0x182)]||new _0x34d1e5[(_0x1d9e72(0x7aa))][(_0x1d9e72(0x336))]({'color':_0x34d1e5['Cesium'][_0x1d9e72(0x7d2)][_0x1d9e72(0x801)][_0x1d9e72(0x8e4)](0.6)}),'width':_0x33d78f['width']||0x2})[_0x1d9e72(0x9ba)](_0x5c6851,{...this[_0x1d9e72(0x674)],'maxAnchorSize':this[_0x1d9e72(0x4d7)]}),this;}},_0x1da1a8=_0x16eaab,_0xa94d31=class extends _0x29a529{constructor(){const _0xb9b6dd=_0x43bf95;super(),this[_0xb9b6dd(0x4d7)]=0x2,this[_0xb9b6dd(0x313)]=[],this[_0xb9b6dd(0x2f8)]=new _0x34d1e5[(_0xb9b6dd(0x7aa))]['Entity']({'polyline':{'positions':new _0x34d1e5[(_0xb9b6dd(0x7aa))][(_0xb9b6dd(0x18c))](()=>this['_helpLinePositions'][_0xb9b6dd(0x6a2)]>0x1?this[_0xb9b6dd(0x313)]:null,!0x1)}}),this[_0xb9b6dd(0x661)]=new _0x34d1e5['Cesium'][(_0xb9b6dd(0x926))]({'label':{'font':_0xb9b6dd(0x677),'pixelOffset':{'x':0x0,'y':-0xf},'disableDepthTestDistance':Number[_0xb9b6dd(0x1fb)],'showBackground':!0x0}}),this[_0xb9b6dd(0x2ab)]=new _0x34d1e5[(_0xb9b6dd(0x7aa))][(_0xb9b6dd(0x926))]({'label':{'font':_0xb9b6dd(0x677),'pixelOffset':{'x':0x0,'y':-0xf},'disableDepthTestDistance':Number[_0xb9b6dd(0x1fb)],'showBackground':!0x0}}),this[_0xb9b6dd(0x791)]=new _0x34d1e5[(_0xb9b6dd(0x7aa))][(_0xb9b6dd(0x926))]({'label':{'font':_0xb9b6dd(0x677),'pixelOffset':{'x':0x0,'y':-0xf},'disableDepthTestDistance':Number[_0xb9b6dd(0x1fb)],'showBackground':!0x0}});}[_0x43bf95(0x56d)](_0x1c2520){const _0x56e3a8=_0x43bf95;new _0x14157f(_0x1c2520)['start']({'viewer':this[_0x56e3a8(0x3f7)],'layer':this[_0x56e3a8(0x761)]},{...this[_0x56e3a8(0x674)],'maxAnchorSize':this[_0x56e3a8(0x4d7)]});}[_0x43bf95(0x4d8)](_0x1db765){const _0x472aa3=_0x43bf95;if(_0x1db765[_0x472aa3(0x6a2)]>0x0&&(this['_startLabel'][_0x472aa3(0x9a7)]=_0x1db765[0x0]),_0x1db765[_0x472aa3(0x6a2)]>0x1){let _0x3574b4=_0x34d1e5['Cesium'][_0x472aa3(0x7a1)][_0x472aa3(0x423)]['geodeticSurfaceNormal'](_0x1db765[0x0],new _0x34d1e5[(_0x472aa3(0x7aa))][(_0x472aa3(0x982))]()),_0x46c686=_0x34d1e5[_0x472aa3(0x7aa)][_0x472aa3(0x2ac)]['fromPointNormal'](_0x1db765[0x0],_0x3574b4),_0x58ac2b=_0x34d1e5[_0x472aa3(0x7aa)][_0x472aa3(0x2ac)]['projectPointOntoPlane'](_0x46c686,_0x1db765[0x1],new _0x34d1e5[(_0x472aa3(0x7aa))][(_0x472aa3(0x982))]());this['_helpLinePositions']=[_0x1db765[0x0],_0x58ac2b,_0x1db765[0x1]];let _0x535932=_0x34d1e5[_0x472aa3(0x7aa)][_0x472aa3(0x982)][_0x472aa3(0x7f4)](_0x1db765[0x0],_0x58ac2b),_0x5d3cdb=Math[_0x472aa3(0x133)](_0x34d1e5['Cesium'][_0x472aa3(0x2ac)][_0x472aa3(0x7a2)](_0x46c686,_0x1db765[0x1])),_0x561892=_0x34d1e5['Cesium'][_0x472aa3(0x982)][_0x472aa3(0x7f4)](_0x1db765[0x0],_0x1db765[0x1]);this[_0x472aa3(0x661)]['position']=_0x34d1e5['Cesium'][_0x472aa3(0x982)][_0x472aa3(0x403)](_0x1db765[0x0],_0x58ac2b,new _0x34d1e5[(_0x472aa3(0x7aa))][(_0x472aa3(0x982))]()),this[_0x472aa3(0x661)][_0x472aa3(0x5e7)]['text']=_0x535932>0x3e8?(_0x535932/0x3e8)[_0x472aa3(0x964)](0x2)+_0x472aa3(0x5bb):_0x535932[_0x472aa3(0x964)](0x2)+'\x20米',this[_0x472aa3(0x791)][_0x472aa3(0x9a7)]=_0x34d1e5[_0x472aa3(0x7aa)][_0x472aa3(0x982)][_0x472aa3(0x403)](_0x1db765[0x0],_0x1db765[0x1],new _0x34d1e5[(_0x472aa3(0x7aa))][(_0x472aa3(0x982))]()),this[_0x472aa3(0x791)]['label'][_0x472aa3(0xd8)]=_0x561892>0x3e8?(_0x561892/0x3e8)[_0x472aa3(0x964)](0x2)+_0x472aa3(0x5bb):_0x561892['toFixed'](0x2)+'\x20米',this[_0x472aa3(0x2ab)][_0x472aa3(0x9a7)]=_0x34d1e5[_0x472aa3(0x7aa)][_0x472aa3(0x982)][_0x472aa3(0x403)](_0x58ac2b,_0x1db765[0x1],new _0x34d1e5[(_0x472aa3(0x7aa))]['Cartesian3']()),this[_0x472aa3(0x2ab)][_0x472aa3(0x5e7)][_0x472aa3(0xd8)]=_0x5d3cdb>0x3e8?(_0x5d3cdb/0x3e8)[_0x472aa3(0x964)](0x2)+'\x20公里':_0x5d3cdb['toFixed'](0x2)+'\x20米';}}[_0x43bf95(0x9ba)](_0x4d046b,_0x3d4297){const _0x23dcae=_0x43bf95;this['_startHook'](_0x4d046b,_0x3d4297);let _0x55654c=new _0x34d1e5[(_0x23dcae(0x7aa))][(_0x23dcae(0x336))]({'color':_0x34d1e5[_0x23dcae(0x7aa)][_0x23dcae(0x7d2)][_0x23dcae(0x748)]});return this['_helpLine']['polyline'][_0x23dcae(0x22e)]=_0x55654c,this[_0x23dcae(0x2f8)][_0x23dcae(0x10c)][_0x23dcae(0x182)]=_0x55654c,this['_layer'][_0x23dcae(0x1f6)][_0x23dcae(0x45f)](this[_0x23dcae(0x2f8)]),this[_0x23dcae(0x761)][_0x23dcae(0x1f6)][_0x23dcae(0x45f)](this[_0x23dcae(0x661)]),this[_0x23dcae(0x761)][_0x23dcae(0x1f6)]['add'](this[_0x23dcae(0x2ab)]),this[_0x23dcae(0x761)][_0x23dcae(0x1f6)][_0x23dcae(0x45f)](this[_0x23dcae(0x791)]),new _0xb5cc02({'material':_0x3d4297[_0x23dcae(0x22e)]||_0x34d1e5[_0x23dcae(0x7aa)]['Color'][_0x23dcae(0x801)][_0x23dcae(0x8e4)](0.6),'depthFailMaterial':_0x3d4297[_0x23dcae(0x182)]||new _0x34d1e5[(_0x23dcae(0x7aa))][(_0x23dcae(0x336))]({'color':_0x34d1e5[_0x23dcae(0x7aa)][_0x23dcae(0x7d2)][_0x23dcae(0x801)]['withAlpha'](0.6)}),'width':_0x3d4297[_0x23dcae(0x371)]||0x2,'clampToGround':!0x1})[_0x23dcae(0x9ba)](_0x4d046b,{..._0x3d4297,'maxAnchorSize':this[_0x23dcae(0x4d7)]}),this;}},_0x153037=_0xa94d31,_0x16b199=class{constructor(_0x3ed171){const _0x2cced8=_0x43bf95;if(!_0x3ed171)throw Error(_0x2cced8(0x808));this[_0x2cced8(0x3f7)]=_0x3ed171,this[_0x2cced8(0x761)]=new _0x34d1e5[(_0x2cced8(0x7aa))]['CustomDataSource']('measure-layer'),this[_0x2cced8(0x3f7)][_0x2cced8(0x268)]['add'](this[_0x2cced8(0x761)]);}get['viewer'](){return this['_viewer'];}get[_0x43bf95(0x4a9)](){const _0x54c024=_0x43bf95;return this[_0x54c024(0x761)];}[_0x43bf95(0xc0)](_0xb6bd1a={}){return new _0x44cf2a()['start'](this,_0xb6bd1a),this;}[_0x43bf95(0x2b1)](_0x2906d1={}){const _0x596885=_0x43bf95;return new _0x1b26ad()[_0x596885(0x9ba)](this,_0x2906d1),this;}['areaHeight'](_0x1a0c06={}){const _0x48e5f2=_0x43bf95;return new _0x4bfc0b()[_0x48e5f2(0x9ba)](this,_0x1a0c06),this;}[_0x43bf95(0x3f8)](_0x26fe7e={}){return new _0x8cb350()['start'](this,_0x26fe7e),this;}[_0x43bf95(0x7f4)](_0xffdc9f={}){const _0x41aa4e=_0x43bf95;return new _0x20119a()[_0x41aa4e(0x9ba)](this,_0xffdc9f),this;}[_0x43bf95(0x814)](_0x2349ff={}){const _0x1807cc=_0x43bf95;return new _0x3259c0()[_0x1807cc(0x9ba)](this,_0x2349ff),this;}[_0x43bf95(0x77c)](_0x17b060={}){const _0x37fdbf=_0x43bf95;return new _0x1610fc()[_0x37fdbf(0x9ba)](this,_0x17b060),this;}[_0x43bf95(0x795)](_0x3bc230={}){const _0x49c82f=_0x43bf95;return new _0x1da1a8()[_0x49c82f(0x9ba)](this,_0x3bc230),this;}[_0x43bf95(0x54b)](_0x16cee9={}){const _0x4d6d66=_0x43bf95;return new _0x153037()[_0x4d6d66(0x9ba)](this,_0x16cee9),this;}[_0x43bf95(0x4fc)](_0x173c3d,_0x2d6213){const _0x446fd8=_0x43bf95;switch(_0x173c3d){case _0x3d2045[_0x446fd8(0x11d)]:this['angle'](_0x2d6213);break;case _0x3d2045[_0x446fd8(0x282)]:this['area'](_0x2d6213);break;case _0x3d2045[_0x446fd8(0x579)]:this['areaHeight'](_0x2d6213);break;case _0x3d2045[_0x446fd8(0x298)]:this[_0x446fd8(0x3f8)](_0x2d6213);break;case _0x3d2045[_0x446fd8(0x731)]:this['distance'](_0x2d6213);break;case _0x3d2045['DISTANCE_SURFACE']:this[_0x446fd8(0x814)](_0x2d6213);break;case _0x3d2045[_0x446fd8(0x404)]:this['heading'](_0x2d6213);break;case _0x3d2045['HEIGHT']:this['height'](_0x2d6213);break;case _0x3d2045[_0x446fd8(0x954)]:this['triangleHeight'](_0x2d6213);break;default:break;}return this;}[_0x43bf95(0x96a)](){const _0x35c426=_0x43bf95;return this[_0x35c426(0x761)][_0x35c426(0x1f6)][_0x35c426(0x207)](),this[_0x35c426(0x3f7)][_0x35c426(0x95d)][_0x35c426(0x6fe)]='',this[_0x35c426(0x3f7)][_0x35c426(0x95d)][_0x35c426(0x96a)](),this['_viewer'][_0x35c426(0x419)]['tooltipMess']='',this[_0x35c426(0x3f7)][_0x35c426(0x419)]['deactivate'](),this;}},_0x3bbc6d=_0x16b199,_0x7da56f=class{static[_0x43bf95(0x622)](_0xdb431b,_0x4ac1ad,_0x35447b=0x8){const _0x307f97=_0x43bf95;var _0x4b9368;let _0x5cd4f5=_0x2c4b9b(_0x307f97(0x1e5));if(!_0x5cd4f5)throw'missing\x20turf';let _0xa22cad=_0x5cd4f5[_0x307f97(0x5b3)](_0x16f48b[_0x307f97(0x979)](_0xdb431b)),_0x25d2f7=_0x5cd4f5['buffer'](_0xa22cad,_0x4ac1ad,{'units':'meters','steps':_0x35447b});return((_0x4b9368=_0x25d2f7==null?void 0x0:_0x25d2f7[_0x307f97(0x10a)])==null?void 0x0:_0x4b9368['coordinates'][0x0])||[];}static[_0x43bf95(0x5fe)](_0x1d207d,_0x7499a0,_0x134255=0x8){const _0x210ad3=_0x43bf95;var _0x2ae275;let _0x4e32a2=_0x2c4b9b('turf');if(!_0x4e32a2)throw _0x210ad3(0x430);let _0x47d2a8=_0x4e32a2[_0x210ad3(0x1ec)](_0x16f48b[_0x210ad3(0x951)](_0x1d207d)),_0x5cd312=_0x4e32a2[_0x210ad3(0x72f)](_0x47d2a8,_0x7499a0,{'units':_0x210ad3(0x675),'steps':_0x134255});return((_0x2ae275=_0x5cd312==null?void 0x0:_0x5cd312['geometry'])==null?void 0x0:_0x2ae275[_0x210ad3(0x9d9)][0x0])||[];}static[_0x43bf95(0x4e4)](_0x3a2825,_0x459774,_0x2fa14f=0x8){const _0x48b0ea=_0x43bf95;var _0x1804c0;let _0x430e3e=_0x2c4b9b(_0x48b0ea(0x1e5));if(!_0x430e3e)throw _0x48b0ea(0x430);let _0x38af42=_0x430e3e[_0x48b0ea(0x410)](_0x16f48b['parsePolygonCoordToArray'](_0x3a2825,!0x0)),_0x58a991=_0x430e3e[_0x48b0ea(0x72f)](_0x38af42,_0x459774,{'units':_0x48b0ea(0x675),'steps':_0x2fa14f});return((_0x1804c0=_0x58a991==null?void 0x0:_0x58a991[_0x48b0ea(0x10a)])==null?void 0x0:_0x1804c0[_0x48b0ea(0x9d9)][0x0])||[];}static[_0x43bf95(0x96e)](_0x10b622,_0x112b71,_0x1494e4,_0x14dbfd,_0x3b5999=0x40){const _0x209b8e=_0x43bf95;var _0x1f0853;let _0x36721b=_0x2c4b9b(_0x209b8e(0x1e5));if(!_0x36721b)throw _0x209b8e(0x430);let _0x5340b4=_0x36721b[_0x209b8e(0x5b3)](_0x16f48b[_0x209b8e(0x979)](_0x10b622)),_0x4a2cb4=_0x36721b['sector'](_0x5340b4,_0x112b71,_0x1494e4,_0x14dbfd,{'units':_0x209b8e(0x675),'steps':_0x3b5999});return((_0x1f0853=_0x4a2cb4==null?void 0x0:_0x4a2cb4[_0x209b8e(0x10a)])==null?void 0x0:_0x1f0853[_0x209b8e(0x9d9)][0x0])||[];}static[_0x43bf95(0x5bf)](_0x3178d9,_0x2b67ec){const _0x4258d7=_0x43bf95;var _0x5061e8;let _0x4390c5=_0x2c4b9b('turf');if(!_0x4390c5)throw _0x4258d7(0x430);let _0x2e8be2=_0x4390c5[_0x4258d7(0x1ec)](_0x16f48b['parsePolylineCoordToArray'](_0x3178d9)),_0x3a08f5=_0x4390c5['transformScale'](_0x2e8be2,_0x2b67ec);return((_0x5061e8=_0x3a08f5==null?void 0x0:_0x3a08f5['geometry'])==null?void 0x0:_0x5061e8[_0x4258d7(0x9d9)])||[];}static['transformPolygonScale'](_0x1ffd3b,_0x5c30df){const _0x422543=_0x43bf95;var _0x5408be;let _0x5e7de6=_0x2c4b9b(_0x422543(0x1e5));if(!_0x5e7de6)throw _0x422543(0x430);let _0x3d31f5=_0x5e7de6[_0x422543(0x410)](_0x16f48b['parsePolygonCoordToArray'](_0x1ffd3b,!0x0)),_0x2332ac=_0x5e7de6['transformScale'](_0x3d31f5,_0x5c30df);return((_0x5408be=_0x2332ac==null?void 0x0:_0x2332ac[_0x422543(0x10a)])==null?void 0x0:_0x5408be[_0x422543(0x9d9)][0x0])||[];}static['transformPolylineRotate'](_0x4a59c0,_0x504dac){const _0x206106=_0x43bf95;var _0x4bee95;let _0x4da965=_0x2c4b9b(_0x206106(0x1e5));if(!_0x4da965)throw _0x206106(0x430);let _0x1fef54=_0x4da965[_0x206106(0x1ec)](_0x16f48b['parsePolylineCoordToArray'](_0x4a59c0)),_0x1bee8d=_0x4da965[_0x206106(0x8f6)](_0x1fef54,_0x504dac);return((_0x4bee95=_0x1bee8d==null?void 0x0:_0x1bee8d[_0x206106(0x10a)])==null?void 0x0:_0x4bee95['coordinates'])||[];}static[_0x43bf95(0x62a)](_0x3b316e,_0x381340){const _0x201b8c=_0x43bf95;var _0x5cdeca;let _0x180d84=_0x2c4b9b('turf');if(!_0x180d84)throw'missing\x20turf';let _0x172472=_0x180d84[_0x201b8c(0x410)](_0x16f48b['parsePolygonCoordToArray'](_0x3b316e,!0x0)),_0x10d7cf=_0x180d84[_0x201b8c(0x8f6)](_0x172472,_0x381340);return((_0x5cdeca=_0x10d7cf==null?void 0x0:_0x10d7cf[_0x201b8c(0x10a)])==null?void 0x0:_0x5cdeca[_0x201b8c(0x9d9)][0x0])||[];}},_0x5ecfaf=_0x7da56f,_0x595e3d={'disappearHeight':0x3e8,'disappearSeconds':0.5,'appearSeconds':0.5},_0x3d03c4=class{constructor(_0x47ed96,_0x149155=[],_0x39b919={}){const _0x39016f=_0x43bf95;this[_0x39016f(0x3f7)]=_0x47ed96,this[_0x39016f(0xe4)]=_0x149155[_0x39016f(0x127)](_0xf71b42=>_0xf71b42[_0x39016f(0x8ca)]||_0xf71b42)||[],this['_options']={..._0x595e3d,..._0x39b919},this[_0x39016f(0x31d)]=this['_models'][_0x39016f(0x127)](_0x491fb3=>_0x491fb3[_0x39016f(0x9a7)][_0x39016f(0x4e7)](_0x34d1e5[_0x39016f(0x7aa)]['JulianDate'][_0x39016f(0xaa6)]()))||[],this[_0x39016f(0x47d)]=[],this[_0x39016f(0x995)]=[],this[_0x39016f(0x285)]=-0x1;}set['models'](_0x573708){const _0x4c27c3=_0x43bf95;this[_0x4c27c3(0xe4)]=_0x573708[_0x4c27c3(0x127)](_0x34e382=>_0x34e382[_0x4c27c3(0x8ca)]||_0x34e382)||[],this[_0x4c27c3(0x31d)]=this['_models']['map'](_0x22ac8d=>_0x22ac8d['position'][_0x4c27c3(0x4e7)](_0x34d1e5[_0x4c27c3(0x7aa)][_0x4c27c3(0xc3)]['now']()))||[],this[_0x4c27c3(0x47d)]=[],this[_0x4c27c3(0x995)]=[],this[_0x4c27c3(0x285)]=-0x1;}get[_0x43bf95(0x35c)](){const _0x423b2b=_0x43bf95;return this[_0x423b2b(0xe4)];}[_0x43bf95(0x8f0)](_0x256fb5,_0xba330d=0x2,_0x1017ce=0x1){const _0x47545c=_0x43bf95;if(_0x256fb5<=0x0)return this;let _0x5e57db=_0x34d1e5[_0x47545c(0x7aa)][_0x47545c(0xc3)][_0x47545c(0xaa6)]();return this[_0x47545c(0xe4)]['forEach']((_0x94faa,_0x316a60)=>{const _0x3772d0=_0x47545c;let _0x1e3293=_0x94faa[_0x3772d0(0x9a7)][_0x3772d0(0x4e7)](_0x5e57db);if(_0x1e3293){let _0x24788b=new _0x34d1e5['Cesium'][(_0x3772d0(0x797))]();_0x24788b[_0x3772d0(0x5d8)]=_0x1017ce;let _0xcfe37c=_0x34d1e5['Cesium']['Cartographic'][_0x3772d0(0x17a)](_0x1e3293);_0xcfe37c[_0x3772d0(0x795)]+=_0x256fb5*_0x316a60,_0x24788b[_0x3772d0(0x31e)](_0x34d1e5[_0x3772d0(0x7aa)][_0x3772d0(0xc3)][_0x3772d0(0x930)](_0x5e57db,-0x1,new _0x34d1e5[(_0x3772d0(0x7aa))]['JulianDate']()),_0x1e3293),_0x24788b[_0x3772d0(0x31e)](_0x34d1e5[_0x3772d0(0x7aa)][_0x3772d0(0xc3)][_0x3772d0(0x930)](_0x5e57db,_0xba330d,new _0x34d1e5['Cesium'][(_0x3772d0(0xc3))]()),_0x34d1e5[_0x3772d0(0x7aa)][_0x3772d0(0x4f1)][_0x3772d0(0x5b6)](_0xcfe37c)),_0x94faa[_0x3772d0(0x9a7)]=_0x24788b,this['_spreadtPositions'][_0x316a60]=_0x34d1e5[_0x3772d0(0x7aa)][_0x3772d0(0x4f1)][_0x3772d0(0x5b6)](_0xcfe37c);}else{let _0x593838=_0x34d1e5[_0x3772d0(0x7aa)][_0x3772d0(0x4f1)][_0x3772d0(0x17a)](this['_spreadtPositions'][_0x316a60]||this[_0x3772d0(0x31d)][_0x316a60]);_0x593838[_0x3772d0(0x795)]+=_0x256fb5*_0x316a60,this[_0x3772d0(0x47d)][_0x316a60]=_0x34d1e5[_0x3772d0(0x7aa)]['Cartographic'][_0x3772d0(0x5b6)](_0x593838);}}),this;}[_0x43bf95(0x58e)](_0x293b0d=0x2){const _0x1d8d5a=_0x43bf95;let _0xd9ef41=_0x34d1e5[_0x1d8d5a(0x7aa)]['JulianDate'][_0x1d8d5a(0xaa6)]();return this[_0x1d8d5a(0xe4)][_0x1d8d5a(0x2de)]((_0x10ee6d,_0x56e4f9)=>{const _0x42b4fa=_0x1d8d5a;let _0x4c0e7b=_0x10ee6d[_0x42b4fa(0x9a7)][_0x42b4fa(0x4e7)](_0xd9ef41);if(this['_spreadtPositions'][_0x56e4f9]&&_0x4c0e7b){let _0x5cfbf6=new _0x34d1e5['Cesium']['SampledPositionProperty']();_0x5cfbf6[_0x42b4fa(0x5d8)]=_0x34d1e5['Cesium'][_0x42b4fa(0x125)][_0x42b4fa(0x346)],_0x5cfbf6['addSample'](_0x34d1e5[_0x42b4fa(0x7aa)]['JulianDate'][_0x42b4fa(0x930)](_0xd9ef41,-0x1,new _0x34d1e5[(_0x42b4fa(0x7aa))]['JulianDate']()),this['_spreadtPositions'][_0x56e4f9]),_0x5cfbf6[_0x42b4fa(0x31e)](_0x34d1e5['Cesium'][_0x42b4fa(0xc3)][_0x42b4fa(0x930)](_0xd9ef41,_0x293b0d,new _0x34d1e5[(_0x42b4fa(0x7aa))]['JulianDate']()),this['_oriPositions'][_0x56e4f9]),_0x10ee6d[_0x42b4fa(0x9a7)]=_0x5cfbf6;}}),this[_0x1d8d5a(0x285)]=-0x1,this[_0x1d8d5a(0x47d)]=[],this[_0x1d8d5a(0x995)]=[],this;}[_0x43bf95(0x28b)](_0x4a1042){const _0x137642=_0x43bf95;if(_0x4a1042>this[_0x137642(0xe4)][_0x137642(0x6a2)]-0x1||this['_currentIndex']===_0x4a1042)return this;let _0x596b7d=_0x34d1e5[_0x137642(0x7aa)][_0x137642(0xc3)][_0x137642(0xaa6)](),_0xa28302=this[_0x137642(0xe4)][_0x137642(0x6a2)];return this[_0x137642(0xe4)][_0x137642(0x2de)]((_0x40fcac,_0x75042)=>{const _0x1c8b1e=_0x137642;let _0x38fe51=_0x40fcac['position'][_0x1c8b1e(0x4e7)](_0x596b7d),_0x186a9c=new _0x34d1e5[(_0x1c8b1e(0x7aa))][(_0x1c8b1e(0x797))]();if(_0x75042>_0x4a1042&&(_0x186a9c[_0x1c8b1e(0x5d8)]=_0x34d1e5[_0x1c8b1e(0x7aa)][_0x1c8b1e(0x125)][_0x1c8b1e(0x60e)],_0x38fe51)){let _0x186fbf=_0x34d1e5[_0x1c8b1e(0x7aa)][_0x1c8b1e(0x4f1)]['fromCartesian'](_0x38fe51);_0x186fbf['height']+=this[_0x1c8b1e(0x674)][_0x1c8b1e(0x4a4)]/_0xa28302*(_0x75042+0x1),_0x186a9c['addSample'](_0x34d1e5[_0x1c8b1e(0x7aa)][_0x1c8b1e(0xc3)][_0x1c8b1e(0x930)](_0x596b7d,-0x1,new _0x34d1e5[(_0x1c8b1e(0x7aa))]['JulianDate']()),_0x38fe51),_0x186a9c[_0x1c8b1e(0x31e)](_0x34d1e5['Cesium'][_0x1c8b1e(0xc3)][_0x1c8b1e(0x930)](_0x596b7d,this['_options'][_0x1c8b1e(0x21a)],new _0x34d1e5[(_0x1c8b1e(0x7aa))][(_0x1c8b1e(0xc3))]()),_0x34d1e5[_0x1c8b1e(0x7aa)]['Cartographic'][_0x1c8b1e(0x5b6)](_0x186fbf)),_0x40fcac[_0x1c8b1e(0x9a7)]=_0x186a9c,this['_lastPositions'][_0x75042]=_0x34d1e5['Cesium'][_0x1c8b1e(0x4f1)][_0x1c8b1e(0x5b6)](_0x186fbf);}!_0x38fe51&&_0x4a1042>=_0x75042&&(_0x186a9c[_0x1c8b1e(0x5d8)]=_0x34d1e5[_0x1c8b1e(0x7aa)][_0x1c8b1e(0x125)][_0x1c8b1e(0x346)],_0x186a9c[_0x1c8b1e(0x31e)](_0x34d1e5[_0x1c8b1e(0x7aa)][_0x1c8b1e(0xc3)][_0x1c8b1e(0x930)](_0x596b7d,-0x1,new _0x34d1e5['Cesium']['JulianDate']()),this[_0x1c8b1e(0x995)][_0x75042]),_0x186a9c[_0x1c8b1e(0x31e)](_0x34d1e5['Cesium'][_0x1c8b1e(0xc3)]['addSeconds'](_0x596b7d,this['_options']['appearSeconds'],new _0x34d1e5[(_0x1c8b1e(0x7aa))][(_0x1c8b1e(0xc3))]()),this[_0x1c8b1e(0x47d)][_0x75042]||this[_0x1c8b1e(0x31d)][_0x75042]),_0x40fcac[_0x1c8b1e(0x9a7)]=_0x186a9c,this['_lastPositions'][_0x75042]=this[_0x1c8b1e(0x47d)][_0x75042]||this[_0x1c8b1e(0x31d)][_0x75042]);}),this[_0x137642(0x285)]=_0x4a1042,this;}[_0x43bf95(0x347)](){const _0x4d63f3=_0x43bf95;return this[_0x4d63f3(0xe4)]['forEach']((_0x33f72c,_0x56b224)=>{_0x33f72c['position']=this['_oriPositions'][_0x56b224];}),this[_0x4d63f3(0x285)]=-0x1,this[_0x4d63f3(0x995)]=[],this[_0x4d63f3(0x47d)]=[],this;}},_0xe5a7e4=_0x3d03c4,_0x2e0c53={'TRANSLATION':_0x43bf95(0x560),'ROTATION':_0x43bf95(0x7c0)},_0x138d4a=_0x2e0c53,_0x34f82e={'depthFail':!0x0,'width':0xa,'arrow':!0x1},_0x53b5bc=class{constructor(_0x479bae,_0x5bab61={}){const _0x2adddd=_0x43bf95;this[_0x2adddd(0xaa1)]=void 0x0,this[_0x2adddd(0x387)]=[],this[_0x2adddd(0x674)]={..._0x34f82e,..._0x5bab61},this[_0x2adddd(0x993)]=this[_0x2adddd(0x674)][_0x2adddd(0x124)],this[_0x2adddd(0x387)]=_0x479bae[_0x2adddd(0x724)](),this[_0x2adddd(0x674)]['loop']&&this[_0x2adddd(0x387)][_0x2adddd(0xb3)](_0x479bae[0x0]),this[_0x2adddd(0x81c)]=_0x34d1e5[_0x2adddd(0x7aa)][_0x2adddd(0x9be)][_0x2adddd(0x27c)](this[_0x2adddd(0x387)]),this[_0x2adddd(0x2a7)]=_0x34d1e5['Cesium']['BoundingSphere'][_0x2adddd(0x5c3)](this[_0x2adddd(0x81c)]),this[_0x2adddd(0x69e)]=_0x34d1e5[_0x2adddd(0x7aa)][_0x2adddd(0x5ee)][_0x2adddd(0x5c3)](_0x34d1e5[_0x2adddd(0x7aa)][_0x2adddd(0x5ee)][_0x2adddd(0x96d)]),this[_0x2adddd(0x758)]=!0x1,this[_0x2adddd(0x850)]=!0x1,this[_0x2adddd(0xa99)]=!0x0;}set[_0x43bf95(0x867)](_0x34fbab){this['_show']=_0x34fbab;}get[_0x43bf95(0x867)](){return this['_show'];}set[_0x43bf95(0x7ca)](_0x5c21e5){const _0xe0c92d=_0x43bf95;this[_0xe0c92d(0x758)]=_0x5c21e5,this['_color']=_0x5c21e5?_0x34d1e5['Cesium'][_0xe0c92d(0x7d2)]['YELLOW']:this[_0xe0c92d(0x674)]['color'],this['_update']=!0x0;}get['active'](){const _0x3724e7=_0x43bf95;return this[_0x3724e7(0x758)];}set[_0x43bf95(0x752)](_0x9971c5){const _0xa2bc96=_0x43bf95;this[_0xa2bc96(0x387)]=_0x9971c5[_0xa2bc96(0x724)](),this['_options'][_0xa2bc96(0x4c6)]&&this[_0xa2bc96(0x387)][_0xa2bc96(0xb3)](_0x9971c5[0x0]);}get[_0x43bf95(0x752)](){const _0x24fe4e=_0x43bf95;return this[_0x24fe4e(0x387)];}set[_0x43bf95(0xa0c)](_0x15e994){const _0x9cc632=_0x43bf95;_0x34d1e5[_0x9cc632(0x7aa)][_0x9cc632(0x5ee)][_0x9cc632(0xdb)](_0x15e994,this[_0x9cc632(0x69e)],_0x34d1e5[_0x9cc632(0x7aa)][_0x9cc632(0x72b)][_0x9cc632(0x3c6)])||(_0x34d1e5['Cesium']['Matrix4'][_0x9cc632(0x5c3)](_0x15e994,this[_0x9cc632(0x69e)]),this[_0x9cc632(0xa99)]=!0x0);}get[_0x43bf95(0xa0c)](){const _0x12ef40=_0x43bf95;return this[_0x12ef40(0x69e)];}get[_0x43bf95(0x156)](){const _0x5b1873=_0x43bf95;return this[_0x5b1873(0x2a7)];}['update'](_0x25d00d){const _0x52707a=_0x43bf95;if(this['_show']){if(this[_0x52707a(0xa99)]){this[_0x52707a(0xa99)]=!0x1,this[_0x52707a(0xaa1)]=this[_0x52707a(0xaa1)]&&this[_0x52707a(0xaa1)][_0x52707a(0x57b)]();let _0x2d292a=this[_0x52707a(0x993)],_0x560d67=_0x2d292a[_0x52707a(0x8e4)](0.3),_0x23e01c,_0x4cf6e9;this['_options']['arrow']?(_0x23e01c=new _0x34d1e5[(_0x52707a(0x7aa))][(_0x52707a(0x646))]({'material':_0x34d1e5[_0x52707a(0x7aa)][_0x52707a(0x4da)][_0x52707a(0xa40)](_0x34d1e5[_0x52707a(0x7aa)][_0x52707a(0x4da)]['PolylineArrowType'],{'color':_0x2d292a})}),this[_0x52707a(0x674)]['depthFail']&&(_0x4cf6e9=new _0x34d1e5[(_0x52707a(0x7aa))][(_0x52707a(0x646))]({'material':_0x34d1e5[_0x52707a(0x7aa)][_0x52707a(0x4da)][_0x52707a(0xa40)](_0x34d1e5['Cesium']['Material']['PolylineArrowType'],{'color':_0x560d67})}))):(_0x23e01c=new _0x34d1e5['Cesium']['PolylineColorAppearance']({'translucent':_0x2d292a['alpha']!==0x1}),this[_0x52707a(0x674)]['depthFail']&&(_0x4cf6e9=new _0x34d1e5[(_0x52707a(0x7aa))][(_0x52707a(0x47f))]({'translucent':_0x560d67['alpha']!==0x1})));let _0x5e76de=new _0x34d1e5['Cesium']['PolylineGeometry']({'positions':this[_0x52707a(0x387)],'width':this[_0x52707a(0x674)][_0x52707a(0x371)],'vertexFormat':_0x34d1e5['Cesium'][_0x52707a(0x646)][_0x52707a(0xa53)],'arcType':_0x34d1e5[_0x52707a(0x7aa)][_0x52707a(0xc1)][_0x52707a(0x60e)]});this[_0x52707a(0xaa1)]=new _0x34d1e5[(_0x52707a(0x7aa))]['Primitive']({'geometryInstances':new _0x34d1e5[(_0x52707a(0x7aa))]['GeometryInstance']({'geometry':_0x5e76de,'attributes':{'color':_0x34d1e5[_0x52707a(0x7aa)][_0x52707a(0x606)]['fromColor'](_0x2d292a),'depthFailColor':_0x34d1e5[_0x52707a(0x7aa)][_0x52707a(0x606)][_0x52707a(0x817)](_0x560d67)},'id':this['_options']['id'],'modelMatrix':this[_0x52707a(0x69e)]}),'appearance':_0x23e01c,'depthFailAppearance':_0x4cf6e9,'asynchronous':!0x1}),this[_0x52707a(0x2a7)]=_0x34d1e5[_0x52707a(0x7aa)]['BoundingSphere'][_0x52707a(0x203)](this[_0x52707a(0x81c)],this[_0x52707a(0x69e)],this['_transformedBoundingSphere']);}this[_0x52707a(0xaa1)]['update'](_0x25d00d);}}['isDestroyed'](){return!0x1;}[_0x43bf95(0x57b)](){const _0x4a9305=_0x43bf95;return this[_0x4a9305(0xaa1)]=this[_0x4a9305(0xaa1)]&&this['_delegate'][_0x4a9305(0x57b)](),_0x34d1e5['Cesium'][_0x4a9305(0x72a)](this);}},_0x1a8b55=_0x53b5bc,_0x302969={'X':_0x34d1e5[_0x43bf95(0x7aa)]['Cartesian3'][_0x43bf95(0x21b)],'Y':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x982)][_0x43bf95(0xa9e)],'Z':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x982)][_0x43bf95(0xaa2)]},_0x366845=class{constructor(_0x528b5b,_0x2588c0={}){const _0x3429ad=_0x43bf95;this[_0x3429ad(0x3f7)]=_0x528b5b,this[_0x3429ad(0x674)]=_0x2588c0,this[_0x3429ad(0x69e)]=void 0x0,this[_0x3429ad(0x758)]=!0x1,this['_activeAxis']=void 0x0,this[_0x3429ad(0x257)]=void 0x0,this[_0x3429ad(0x41c)]=new _0x34d1e5['Cesium'][(_0x3429ad(0x982))](),this['_pickingPlane']=new _0x34d1e5['Cesium'][(_0x3429ad(0x2ac))](_0x34d1e5[_0x3429ad(0x7aa)][_0x3429ad(0x982)][_0x3429ad(0x21b)],0x0),this['_axisX']=this[_0x3429ad(0x527)]('X',_0x34d1e5[_0x3429ad(0x7aa)][_0x3429ad(0x7d2)][_0x3429ad(0x80b)]),this['_axisY']=this['_createAxisLine']('Y',_0x34d1e5[_0x3429ad(0x7aa)]['Color'][_0x3429ad(0x4fa)]),this[_0x3429ad(0x71e)]=this[_0x3429ad(0x527)]('Z',_0x34d1e5[_0x3429ad(0x7aa)][_0x3429ad(0x7d2)][_0x3429ad(0x141)]),this[_0x3429ad(0x60f)]=void 0x0,this[_0x3429ad(0x478)]=void 0x0;}set[_0x43bf95(0xa0c)](_0x3d5eff){const _0x1c8e4b=_0x43bf95;return this['_modelMatrix']=_0x3d5eff,this[_0x1c8e4b(0x96f)](),this;}set[_0x43bf95(0x7ca)](_0x2836a8){const _0x2dc2de=_0x43bf95;return this[_0x2dc2de(0x758)]=_0x2836a8,this[_0x2dc2de(0x751)][_0x2dc2de(0x867)]=this[_0x2dc2de(0x758)],this[_0x2dc2de(0x3a1)][_0x2dc2de(0x867)]=this[_0x2dc2de(0x758)],this[_0x2dc2de(0x71e)][_0x2dc2de(0x867)]=this[_0x2dc2de(0x758)],this;}get[_0x43bf95(0x7ca)](){const _0x309bcb=_0x43bf95;return this[_0x309bcb(0x758)];}get[_0x43bf95(0x968)](){const _0x15032b=_0x43bf95;return _0x34d1e5[_0x15032b(0x7aa)][_0x15032b(0x5ee)][_0x15032b(0x45c)](this[_0x15032b(0x69e)],new _0x34d1e5[(_0x15032b(0x7aa))][(_0x15032b(0x982))]());}['_createAxisLine'](_0x4b06c9,_0x1d311b){const _0x17b026=_0x43bf95;return this[_0x17b026(0x3f7)]['scene'][_0x17b026(0x2d5)][_0x17b026(0x45f)](new _0x1a8b55([_0x34d1e5[_0x17b026(0x7aa)][_0x17b026(0x982)][_0x17b026(0x3d4)],_0x302969[_0x4b06c9]],{'id':'position-editor-'+_0x4b06c9,'arrow':this[_0x17b026(0x674)][_0x17b026(0x92f)],'color':_0x1d311b,'depthFail':this[_0x17b026(0x674)][_0x17b026(0x242)]}));}['handleLeftDown'](_0x10e6d8){const _0x503016=_0x43bf95;let _0x3bcd71=this[_0x503016(0x3f7)][_0x503016(0x148)],_0x1a3298=_0x3bcd71[_0x503016(0x698)],_0x269d1e=_0x3bcd71['drillPick'](_0x10e6d8[_0x503016(0x9a7)])||[];for(let _0x5e2f54=0x0;_0x5e2f54<_0x269d1e[_0x503016(0x6a2)];_0x5e2f54++){let _0x3b6619=_0x269d1e[_0x5e2f54];if(_0x3b6619['id']&&_0x3b6619['id']===_0x503016(0x6e0)){this[_0x503016(0x875)]='X',this[_0x503016(0x751)][_0x503016(0x7ca)]=!0x0;break;}else{if(_0x3b6619['id']&&_0x3b6619['id']===_0x503016(0x132)){this[_0x503016(0x875)]='Y',this['_axisY'][_0x503016(0x7ca)]=!0x0;break;}else{if(_0x3b6619['id']&&_0x3b6619['id']===_0x503016(0xa7f)){this[_0x503016(0x875)]='Z',this[_0x503016(0x71e)][_0x503016(0x7ca)]=!0x0;break;}}}}if(!this[_0x503016(0x875)])return;this[_0x503016(0x3f7)][_0x503016(0x790)][_0x503016(0x6a9)][_0x503016(0x259)]=_0x503016(0x9c7);let _0x3608c6=_0x34d1e5['Cesium'][_0x503016(0x5ee)][_0x503016(0x4bd)](this[_0x503016(0x257)],_0x302969[this[_0x503016(0x875)]],new _0x34d1e5[(_0x503016(0x7aa))][(_0x503016(0x982))]()),_0x2773ca=new _0x34d1e5[(_0x503016(0x7aa))][(_0x503016(0x982))]();Math[_0x503016(0x133)](_0x34d1e5[_0x503016(0x7aa)][_0x503016(0x982)][_0x503016(0x6e2)](_0x1a3298[_0x503016(0x448)],_0x3608c6)>0.7)?_0x2773ca=_0x34d1e5[_0x503016(0x7aa)][_0x503016(0x982)][_0x503016(0x5df)](_0x1a3298[_0x503016(0x71d)],_0x3608c6,_0x2773ca):_0x2773ca=_0x34d1e5[_0x503016(0x7aa)]['Cartesian3'][_0x503016(0x5df)](_0x1a3298[_0x503016(0x448)],_0x3608c6,_0x2773ca),_0x34d1e5[_0x503016(0x7aa)][_0x503016(0x982)][_0x503016(0x732)](_0x2773ca,_0x2773ca),_0x34d1e5[_0x503016(0x7aa)]['Plane'][_0x503016(0xa0e)](this[_0x503016(0x968)],_0x2773ca,this[_0x503016(0xa9c)]),_0x34d1e5['Cesium'][_0x503016(0x3d7)][_0x503016(0x6ac)](_0x1a3298[_0x503016(0xa3)](_0x10e6d8['position']),this[_0x503016(0xa9c)],this[_0x503016(0x41c)]),_0x34d1e5[_0x503016(0x7aa)][_0x503016(0x982)][_0x503016(0xa4)](this[_0x503016(0x41c)],this[_0x503016(0x968)],this['_offset']),_0x3bcd71[_0x503016(0x9fb)][_0x503016(0x740)]=!0x1;}[_0x43bf95(0x36a)](_0x59429a){const _0x1321ee=_0x43bf95;if(!this[_0x1321ee(0x875)])return;let _0x5a8473=this[_0x1321ee(0x3f7)][_0x1321ee(0x148)][_0x1321ee(0x698)],_0x1608b5=new _0x34d1e5['Cesium'][(_0x1321ee(0x982))](),_0x79c3ef=_0x34d1e5[_0x1321ee(0x7aa)][_0x1321ee(0x3d7)][_0x1321ee(0x6ac)](_0x5a8473['getPickRay'](_0x59429a[_0x1321ee(0x837)]),this[_0x1321ee(0xa9c)],new _0x34d1e5[(_0x1321ee(0x7aa))][(_0x1321ee(0x982))]());if(!_0x79c3ef)return;let _0x48ab5e=_0x34d1e5[_0x1321ee(0x7aa)][_0x1321ee(0x982)][_0x1321ee(0xa4)](_0x79c3ef,this[_0x1321ee(0x968)],new _0x34d1e5[(_0x1321ee(0x7aa))][(_0x1321ee(0x982))]()),_0x4d9598=_0x34d1e5[_0x1321ee(0x7aa)][_0x1321ee(0x5ee)][_0x1321ee(0x4bd)](this[_0x1321ee(0x257)],_0x302969[this[_0x1321ee(0x875)]],new _0x34d1e5['Cesium'][(_0x1321ee(0x982))]());_0x34d1e5['Cesium'][_0x1321ee(0x982)][_0x1321ee(0x396)](_0x48ab5e,_0x4d9598,_0x48ab5e),_0x34d1e5['Cesium'][_0x1321ee(0x982)]['projectVector'](this[_0x1321ee(0x41c)],_0x4d9598,_0x1608b5),_0x34d1e5[_0x1321ee(0x7aa)][_0x1321ee(0x982)]['subtract'](_0x48ab5e,_0x1608b5,_0x48ab5e);let _0x401f72=_0x34d1e5[_0x1321ee(0x7aa)]['Cartesian3'][_0x1321ee(0x45f)](this[_0x1321ee(0x968)],_0x48ab5e,new _0x34d1e5[(_0x1321ee(0x7aa))][(_0x1321ee(0x982))]());this[_0x1321ee(0x60f)]&&this['resetTranslation'](_0x401f72);}[_0x43bf95(0x8a7)](_0x12abb4){const _0x5df984=_0x43bf95;this[_0x5df984(0x3f7)][_0x5df984(0x790)][_0x5df984(0x6a9)]['cursor']=_0x5df984(0x7eb),this['_activeAxis']=void 0x0,this['_axisX'][_0x5df984(0x7ca)]=!0x1,this[_0x5df984(0x3a1)][_0x5df984(0x7ca)]=!0x1,this[_0x5df984(0x71e)][_0x5df984(0x7ca)]=!0x1,this['_viewer'][_0x5df984(0x148)][_0x5df984(0x9fb)]['enableInputs']=!0x0,this['complete']&&this['complete']();}[_0x43bf95(0x96f)](){const _0x1750c0=_0x43bf95;let _0x17805b=0x5*this['_options'][_0x1750c0(0x378)];this[_0x1750c0(0x257)]=_0x34d1e5[_0x1750c0(0x7aa)][_0x1750c0(0x7a6)][_0x1750c0(0x824)](this[_0x1750c0(0x968)]);let _0x304efd=_0x34d1e5[_0x1750c0(0x7aa)]['Matrix4'][_0x1750c0(0x227)](this[_0x1750c0(0x257)],_0x17805b,new _0x34d1e5['Cesium'][(_0x1750c0(0x5ee))]());this[_0x1750c0(0x751)][_0x1750c0(0xa0c)]=_0x304efd,this[_0x1750c0(0x3a1)][_0x1750c0(0xa0c)]=_0x304efd,this[_0x1750c0(0x71e)][_0x1750c0(0xa0c)]=_0x304efd;}[_0x43bf95(0x4aa)](){return!0x1;}[_0x43bf95(0x57b)](){const _0x191b01=_0x43bf95;this[_0x191b01(0x7ca)]=!0x1;let _0x53133d=this[_0x191b01(0x3f7)][_0x191b01(0x148)];_0x53133d[_0x191b01(0x2d5)][_0x191b01(0x109)](this[_0x191b01(0x751)]),_0x53133d['primitives'][_0x191b01(0x109)](this['_axisY']),_0x53133d[_0x191b01(0x2d5)]['remove'](this[_0x191b01(0x71e)]),_0x34d1e5[_0x191b01(0x7aa)][_0x191b01(0x72a)](this);}},_0x549185=_0x366845,_0x1b6323={'X':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x982)][_0x43bf95(0x21b)],'Y':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x982)][_0x43bf95(0xa9e)],'Z':_0x34d1e5['Cesium'][_0x43bf95(0x982)][_0x43bf95(0xaa2)]},_0x457875=class{constructor(_0x1fc2e8,_0x4c021d={}){const _0x4e7b04=_0x43bf95;this[_0x4e7b04(0x3f7)]=_0x1fc2e8,this[_0x4e7b04(0x674)]=_0x4c021d,this[_0x4e7b04(0x69e)]=void 0x0,this[_0x4e7b04(0x758)]=!0x1,this[_0x4e7b04(0x875)]=void 0x0,this[_0x4e7b04(0x696)]=new _0x34d1e5[(_0x4e7b04(0x7aa))]['Cartesian3'](),this[_0x4e7b04(0x356)]=new _0x34d1e5['Cesium']['Plane'](_0x34d1e5[_0x4e7b04(0x7aa)][_0x4e7b04(0x982)][_0x4e7b04(0x21b)],0x0);let _0x44babe=this['_getUnitCirclePositions']();this['_axisX']=this[_0x4e7b04(0x527)]('X',_0x44babe['x'],_0x34d1e5[_0x4e7b04(0x7aa)][_0x4e7b04(0x7d2)][_0x4e7b04(0x80b)]),this['_axisY']=this[_0x4e7b04(0x527)]('Y',_0x44babe['y'],_0x34d1e5[_0x4e7b04(0x7aa)]['Color'][_0x4e7b04(0x4fa)]),this[_0x4e7b04(0x71e)]=this[_0x4e7b04(0x527)]('Z',_0x44babe['z'],_0x34d1e5[_0x4e7b04(0x7aa)]['Color'][_0x4e7b04(0x141)]),this[_0x4e7b04(0x334)]=void 0x0,this[_0x4e7b04(0x478)]=void 0x0;}set['modelMatrix'](_0x2fbdc1){const _0x15a1a3=_0x43bf95;this[_0x15a1a3(0x69e)]=_0x2fbdc1,this[_0x15a1a3(0x96f)]();}set[_0x43bf95(0x7ca)](_0x5130bc){const _0x12a44c=_0x43bf95;this[_0x12a44c(0x758)]=_0x5130bc,this[_0x12a44c(0x751)][_0x12a44c(0x867)]=_0x5130bc,this[_0x12a44c(0x3a1)]['show']=_0x5130bc,this[_0x12a44c(0x71e)][_0x12a44c(0x867)]=_0x5130bc;}get[_0x43bf95(0x7ca)](){return this['_active'];}get['modelTranslation'](){const _0x6134cb=_0x43bf95;return _0x34d1e5[_0x6134cb(0x7aa)][_0x6134cb(0x5ee)][_0x6134cb(0x45c)](this[_0x6134cb(0x69e)],new _0x34d1e5[(_0x6134cb(0x7aa))]['Cartesian3']());}[_0x43bf95(0x983)](){const _0x3caf50=_0x43bf95;let _0x4dfe83=[],_0x5506c2=[],_0xb9790a=[];for(let _0xbb8011=0x0;_0xbb8011<0x168;_0xbb8011++){let _0x523940=_0x34d1e5[_0x3caf50(0x7aa)][_0x3caf50(0x72b)][_0x3caf50(0x2b0)](_0xbb8011),_0x486f4a=Math['cos'](_0x523940),_0x5c904e=Math[_0x3caf50(0xb8)](_0x523940);_0x4dfe83['push'](new _0x34d1e5[(_0x3caf50(0x7aa))][(_0x3caf50(0x982))](0x0,_0x486f4a,_0x5c904e)),_0x5506c2['push'](new _0x34d1e5[(_0x3caf50(0x7aa))][(_0x3caf50(0x982))](_0x5c904e,0x0,_0x486f4a)),_0xb9790a[_0x3caf50(0xb3)](new _0x34d1e5['Cesium']['Cartesian3'](_0x486f4a,_0x5c904e,0x0));}return{'x':_0x4dfe83,'y':_0x5506c2,'z':_0xb9790a};}[_0x43bf95(0x527)](_0x53f077,_0x29a185,_0x1abe5a){const _0x17177b=_0x43bf95;return this[_0x17177b(0x3f7)][_0x17177b(0x148)][_0x17177b(0x2d5)][_0x17177b(0x45f)](new _0x1a8b55(_0x29a185,{'id':_0x17177b(0x152)+_0x53f077,'loop':!0x0,'color':_0x1abe5a,'width':0x5,'depthFail':this[_0x17177b(0x674)][_0x17177b(0x242)]}));}[_0x43bf95(0x173)](_0x37a856,_0x59b0e7,_0x449018){const _0x1c3357=_0x43bf95;let _0x1dac1b=_0x34d1e5[_0x1c3357(0x7aa)][_0x1c3357(0x5ee)][_0x1c3357(0x6b2)](_0x37a856,new _0x34d1e5['Cesium']['Matrix4']()),_0xaf54b8=_0x34d1e5[_0x1c3357(0x7aa)][_0x1c3357(0x5ee)]['multiplyByPoint'](_0x1dac1b,_0x59b0e7,new _0x34d1e5[(_0x1c3357(0x7aa))][(_0x1c3357(0x982))]()),_0x2e42a6=_0x34d1e5[_0x1c3357(0x7aa)][_0x1c3357(0x5ee)][_0x1c3357(0x408)](_0x1dac1b,_0x449018,new _0x34d1e5[(_0x1c3357(0x7aa))][(_0x1c3357(0x982))]()),_0x1fd27d=new _0x34d1e5['Cesium'][(_0x1c3357(0x48e))](),_0x147227=new _0x34d1e5[(_0x1c3357(0x7aa))][(_0x1c3357(0x48e))]();this[_0x1c3357(0x875)]==='X'?(_0x1fd27d['x']=_0xaf54b8['y'],_0x1fd27d['y']=_0xaf54b8['z'],_0x147227['x']=_0x2e42a6['y'],_0x147227['y']=_0x2e42a6['z']):this[_0x1c3357(0x875)]==='Y'?(_0x1fd27d['x']=-_0xaf54b8['x'],_0x1fd27d['y']=_0xaf54b8['z'],_0x147227['x']=-_0x2e42a6['x'],_0x147227['y']=_0x2e42a6['z']):(_0x1fd27d['x']=_0xaf54b8['x'],_0x1fd27d['y']=_0xaf54b8['y'],_0x147227['x']=_0x2e42a6['x'],_0x147227['y']=_0x2e42a6['y']);let _0x6642b2=_0x1fd27d['x']*_0x147227['y']-_0x1fd27d['y']*_0x147227['x']>=0x0,_0x4532bf=_0x34d1e5[_0x1c3357(0x7aa)][_0x1c3357(0x48e)][_0x1c3357(0x6f3)](_0x1fd27d,_0x147227);return _0x6642b2||(_0x4532bf=-_0x4532bf),_0x4532bf;}[_0x43bf95(0x441)](_0x4166c9){const _0x54f2f6=_0x43bf95;let _0x45df5e=this[_0x54f2f6(0x3f7)]['scene'],_0xfb426c=_0x45df5e['drillPick'](_0x4166c9[_0x54f2f6(0x9a7)])||[];for(let _0x132e42=0x0;_0x132e42<_0xfb426c[_0x54f2f6(0x6a2)];_0x132e42++){let _0x21f2c2=_0xfb426c[_0x132e42];if(_0x21f2c2['id']&&_0x21f2c2['id']===_0x54f2f6(0x6e0)){this[_0x54f2f6(0x875)]='X',this[_0x54f2f6(0x751)][_0x54f2f6(0x7ca)]=!0x0;break;}else{if(_0x21f2c2['id']&&_0x21f2c2['id']===_0x54f2f6(0x132)){this[_0x54f2f6(0x875)]='Y',this[_0x54f2f6(0x3a1)][_0x54f2f6(0x7ca)]=!0x0;break;}else{if(_0x21f2c2['id']&&_0x21f2c2['id']===_0x54f2f6(0xa7f)){this[_0x54f2f6(0x875)]='Z',this[_0x54f2f6(0x71e)][_0x54f2f6(0x7ca)]=!0x0;break;}}}}if(!this[_0x54f2f6(0x875)])return;this[_0x54f2f6(0x3f7)][_0x54f2f6(0x790)][_0x54f2f6(0x6a9)][_0x54f2f6(0x259)]='pointer';let _0x2096d1=_0x34d1e5[_0x54f2f6(0x7aa)]['Matrix4'][_0x54f2f6(0x408)](this[_0x54f2f6(0x69e)],_0x1b6323[this[_0x54f2f6(0x875)]],new _0x34d1e5[(_0x54f2f6(0x7aa))][(_0x54f2f6(0x982))]()),_0x30e5e7=_0x34d1e5[_0x54f2f6(0x7aa)][_0x54f2f6(0x982)]['subtract'](_0x2096d1,this[_0x54f2f6(0x968)],_0x2096d1);_0x34d1e5[_0x54f2f6(0x7aa)][_0x54f2f6(0x982)]['normalize'](_0x30e5e7,_0x30e5e7),_0x34d1e5['Cesium'][_0x54f2f6(0x2ac)]['fromPointNormal'](this[_0x54f2f6(0x968)],_0x30e5e7,this[_0x54f2f6(0x356)]),_0x34d1e5['Cesium'][_0x54f2f6(0x3d7)][_0x54f2f6(0x6ac)](_0x45df5e['camera'][_0x54f2f6(0xa3)](_0x4166c9[_0x54f2f6(0x9a7)]),this[_0x54f2f6(0x356)],this[_0x54f2f6(0x696)]),_0x45df5e[_0x54f2f6(0x9fb)][_0x54f2f6(0x740)]=!0x1;}['handleMouseMove'](_0x3f2602){const _0x4a5742=_0x43bf95;if(!this[_0x4a5742(0x875)])return;let _0x582315=this[_0x4a5742(0x3f7)]['scene'][_0x4a5742(0x698)],_0x5aed5f=_0x34d1e5[_0x4a5742(0x7aa)][_0x4a5742(0x3d7)][_0x4a5742(0x6ac)](_0x582315[_0x4a5742(0xa3)](_0x3f2602['endPosition']),this[_0x4a5742(0x356)],new _0x34d1e5[(_0x4a5742(0x7aa))][(_0x4a5742(0x982))]());if(!_0x5aed5f)return;let _0x1afb75=this[_0x4a5742(0x173)](this[_0x4a5742(0x69e)],this[_0x4a5742(0x696)],_0x5aed5f),_0x50576c=_0x34d1e5[_0x4a5742(0x7aa)][_0x4a5742(0x158)]['fromAxisAngle'](_0x1b6323[this['_activeAxis']],_0x1afb75,new _0x34d1e5[(_0x4a5742(0x7aa))][(_0x4a5742(0x158))]()),_0x133629=_0x34d1e5['Cesium'][_0x4a5742(0x72d)][_0x4a5742(0x1d2)](_0x50576c),_0x2096a9=_0x34d1e5[_0x4a5742(0x7aa)]['Matrix4']['getTranslation'](this[_0x4a5742(0x69e)],new _0x34d1e5['Cesium']['Cartesian3']()),_0x280f11=_0x34d1e5['Cesium'][_0x4a5742(0x7a6)][_0x4a5742(0x824)](_0x2096a9),_0x265a79=_0x34d1e5[_0x4a5742(0x7aa)]['Matrix4'][_0x4a5742(0x17d)](_0x280f11,new _0x34d1e5[(_0x4a5742(0x7aa))]['Matrix3']());_0x34d1e5[_0x4a5742(0x7aa)][_0x4a5742(0x72d)][_0x4a5742(0x310)](_0x265a79,_0x133629,_0x133629);let _0x269318=_0x34d1e5[_0x4a5742(0x7aa)][_0x4a5742(0x5ee)][_0x4a5742(0x90c)](_0x133629,this[_0x4a5742(0x968)],new _0x34d1e5[(_0x4a5742(0x7aa))]['Matrix4']());this[_0x4a5742(0x334)]&&this['resetRotation'](_0x269318);}[_0x43bf95(0x8a7)](_0xc0a538){const _0x3a8300=_0x43bf95;this[_0x3a8300(0x3f7)]['canvas'][_0x3a8300(0x6a9)][_0x3a8300(0x259)]=_0x3a8300(0x7eb),this[_0x3a8300(0x875)]=void 0x0,this[_0x3a8300(0x751)]['active']=!0x1,this[_0x3a8300(0x3a1)][_0x3a8300(0x7ca)]=!0x1,this['_axisZ'][_0x3a8300(0x7ca)]=!0x1,this[_0x3a8300(0x3f7)]['scene']['screenSpaceCameraController'][_0x3a8300(0x740)]=!0x0,this['complete']&&this[_0x3a8300(0x478)]();}['update'](){const _0x1edb4b=_0x43bf95;let _0x5d32d6=0x5*this[_0x1edb4b(0x674)][_0x1edb4b(0x378)],_0x205644=_0x34d1e5[_0x1edb4b(0x7aa)][_0x1edb4b(0x5ee)][_0x1edb4b(0x45c)](this[_0x1edb4b(0x69e)],new _0x34d1e5[(_0x1edb4b(0x7aa))]['Cartesian3']()),_0x198c9a=_0x34d1e5['Cesium']['Transforms'][_0x1edb4b(0x824)](_0x205644),_0x392555=_0x34d1e5[_0x1edb4b(0x7aa)]['Matrix4'][_0x1edb4b(0x227)](_0x198c9a,_0x5d32d6,new _0x34d1e5[(_0x1edb4b(0x7aa))][(_0x1edb4b(0x5ee))]());this[_0x1edb4b(0x751)][_0x1edb4b(0xa0c)]=_0x392555,this['_axisY'][_0x1edb4b(0xa0c)]=_0x392555,this[_0x1edb4b(0x71e)][_0x1edb4b(0xa0c)]=_0x392555;}['isDestroyed'](){return!0x1;}[_0x43bf95(0x57b)](){const _0xfdaf1c=_0x43bf95;this['active']=!0x1;let _0x3a3623=this['_viewer'][_0xfdaf1c(0x148)];return _0x3a3623[_0xfdaf1c(0x2d5)][_0xfdaf1c(0x109)](this[_0xfdaf1c(0x751)]),_0x3a3623[_0xfdaf1c(0x2d5)]['remove'](this['_axisY']),_0x3a3623[_0xfdaf1c(0x2d5)][_0xfdaf1c(0x109)](this[_0xfdaf1c(0x71e)]),_0x34d1e5['Cesium'][_0xfdaf1c(0x72a)](this);}},_0x1c586f=_0x457875,_0x2c5e0e={'arrow':!0x0,'width':0x8,'depthFail':!0x0,'axisLineScale':0x1},_0xe0811f=class{constructor(_0x436c51,_0x4962bf={}){const _0x2b9706=_0x43bf95;this[_0x2b9706(0x3f7)]=_0x436c51,this[_0x2b9706(0x674)]={..._0x2c5e0e,..._0x4962bf},this[_0x2b9706(0x69e)]=void 0x0,this['_model']=void 0x0,this[_0x2b9706(0x1d4)]=void 0x0,this[_0x2b9706(0x457)]=void 0x0,this[_0x2b9706(0xdf)]=void 0x0,this[_0x2b9706(0x691)]={'lng':0x0,'lat':0x0,'alt':0x0,'heading':0x0,'pitch':0x0,'roll':0x0},this[_0x2b9706(0x8e7)]=new _0x549185(this[_0x2b9706(0x3f7)],this[_0x2b9706(0x674)]),this[_0x2b9706(0x521)]=new _0x1c586f(this['_viewer'],this[_0x2b9706(0x674)]),this[_0x2b9706(0x8e7)][_0x2b9706(0x60f)]=this['_resetTranslation'][_0x2b9706(0x31a)](this),this[_0x2b9706(0x8e7)][_0x2b9706(0x478)]=this['_complete'][_0x2b9706(0x31a)](this),this[_0x2b9706(0x521)][_0x2b9706(0x334)]=this[_0x2b9706(0x172)][_0x2b9706(0x31a)](this),this[_0x2b9706(0x521)][_0x2b9706(0x478)]=this['_complete']['bind'](this);}set['overlay'](_0x441c1a){const _0x335811=_0x43bf95;return this[_0x335811(0x3e3)]=_0x441c1a[_0x335811(0x8ca)]||_0x441c1a,this[_0x335811(0x691)]=_0x441c1a['position']||{'lng':0x0,'lat':0x0,'alt':0x0,'heading':0x0,'pitch':0x0,'roll':0x0},this;}[_0x43bf95(0x4ac)](){const _0xf7b737=_0x43bf95;this['_handler']=new _0x34d1e5[(_0xf7b737(0x7aa))][(_0xf7b737(0xa8e))](this[_0xf7b737(0x3f7)][_0xf7b737(0x790)]),this[_0xf7b737(0x1d4)][_0xf7b737(0x307)](this[_0xf7b737(0x6ec)][_0xf7b737(0x31a)](this),_0x34d1e5['Cesium'][_0xf7b737(0x3be)][_0xf7b737(0x1b9)]),this[_0xf7b737(0x1d4)]['setInputAction'](this[_0xf7b737(0xa64)][_0xf7b737(0x31a)](this),_0x34d1e5[_0xf7b737(0x7aa)]['ScreenSpaceEventType'][_0xf7b737(0x4e1)]),this[_0xf7b737(0x1d4)][_0xf7b737(0x307)](this[_0xf7b737(0x6dc)][_0xf7b737(0x31a)](this),_0x34d1e5['Cesium'][_0xf7b737(0x3be)][_0xf7b737(0xa09)]);}[_0x43bf95(0x2a1)](){const _0x3dc860=_0x43bf95;this[_0x3dc860(0x1d4)]&&(this[_0x3dc860(0x1d4)][_0x3dc860(0x290)](this['_onLeftDown'][_0x3dc860(0x31a)](this),_0x34d1e5[_0x3dc860(0x7aa)][_0x3dc860(0x3be)]['LEFT_DOWN']),this[_0x3dc860(0x1d4)][_0x3dc860(0x290)](this[_0x3dc860(0xa64)][_0x3dc860(0x31a)](this),_0x34d1e5['Cesium'][_0x3dc860(0x3be)][_0x3dc860(0x4e1)]),this[_0x3dc860(0x1d4)]['removeInputAction'](this[_0x3dc860(0x6dc)][_0x3dc860(0x31a)](this),_0x34d1e5[_0x3dc860(0x7aa)]['ScreenSpaceEventType'][_0x3dc860(0xa09)]));}['_setModelMatrix'](){const _0x528732=_0x43bf95;this[_0x528732(0x3e3)]instanceof _0x34d1e5[_0x528732(0x7aa)][_0x528732(0x926)]?(this[_0x528732(0x69e)]=_0x34d1e5['Cesium'][_0x528732(0x7a6)][_0x528732(0x228)](this[_0x528732(0x3e3)][_0x528732(0x9a7)][_0x528732(0x4e7)](_0x34d1e5['Cesium'][_0x528732(0xc3)][_0x528732(0xaa6)]()),new _0x34d1e5[(_0x528732(0x7aa))][(_0x528732(0x517))](_0x34d1e5[_0x528732(0x7aa)][_0x528732(0x72b)]['toRadians'](this[_0x528732(0x691)]['heading']),_0x34d1e5[_0x528732(0x7aa)][_0x528732(0x72b)][_0x528732(0x2b0)](-this['_position'][_0x528732(0x442)]),_0x34d1e5[_0x528732(0x7aa)][_0x528732(0x72b)][_0x528732(0x2b0)](this[_0x528732(0x691)][_0x528732(0x193)]))),this['_activeEditor'][_0x528732(0xa0c)]=this['_modelMatrix'],this[_0x528732(0x457)][_0x528732(0x7ca)]=!0x0,this[_0x528732(0x891)](this[_0x528732(0x69e)])):this[_0x528732(0x3e3)]instanceof Promise&&this[_0x528732(0x3e3)][_0x528732(0x379)](_0x56c8bc=>{const _0x34f15a=_0x528732;_0x56c8bc instanceof _0x34d1e5[_0x34f15a(0x7aa)][_0x34f15a(0x64e)]?this['_modelMatrix']=_0x56c8bc['modelMatrix'][_0x34f15a(0x5c3)]():_0x56c8bc instanceof _0x34d1e5[_0x34f15a(0x7aa)][_0x34f15a(0xa0d)]&&(this['_modelMatrix']=_0x56c8bc['root'][_0x34f15a(0x203)]['clone']()),this[_0x34f15a(0x457)][_0x34f15a(0xa0c)]=this[_0x34f15a(0x69e)],this['_activeEditor'][_0x34f15a(0x7ca)]=!0x0,this[_0x34f15a(0x891)](this[_0x34f15a(0x69e)]);});}[_0x43bf95(0x891)](_0x540d3f){const _0x5cb2d3=_0x43bf95;let _0x7816e4=_0x34d1e5[_0x5cb2d3(0x7aa)][_0x5cb2d3(0x5ee)][_0x5cb2d3(0x45c)](_0x540d3f,new _0x34d1e5[(_0x5cb2d3(0x7aa))][(_0x5cb2d3(0x982))]()),_0x2921ca=_0x34d1e5['Cesium'][_0x5cb2d3(0x4f1)][_0x5cb2d3(0x17a)](_0x7816e4);this[_0x5cb2d3(0x691)][_0x5cb2d3(0x598)]=Number(_0x34d1e5[_0x5cb2d3(0x7aa)][_0x5cb2d3(0x72b)][_0x5cb2d3(0x438)](_0x2921ca[_0x5cb2d3(0xc9)])[_0x5cb2d3(0x964)](0x8)),this['_position'][_0x5cb2d3(0x941)]=Number(_0x34d1e5['Cesium'][_0x5cb2d3(0x72b)][_0x5cb2d3(0x438)](_0x2921ca[_0x5cb2d3(0xa6e)])[_0x5cb2d3(0x964)](0x8)),this[_0x5cb2d3(0x691)][_0x5cb2d3(0xa84)]=Number(_0x2921ca[_0x5cb2d3(0x795)][_0x5cb2d3(0x964)](0x2));}['_setHPR'](_0x543ef3){const _0x423b5d=_0x43bf95;this[_0x423b5d(0x691)][_0x423b5d(0x77c)]+=Number(_0x34d1e5[_0x423b5d(0x7aa)][_0x423b5d(0x72b)][_0x423b5d(0x438)](_0x543ef3['heading'])[_0x423b5d(0x964)](0x8)),this[_0x423b5d(0x691)][_0x423b5d(0x77c)]=this[_0x423b5d(0x691)][_0x423b5d(0x77c)]%0x168,this[_0x423b5d(0x691)][_0x423b5d(0x442)]+=Number(-_0x34d1e5['Cesium']['Math'][_0x423b5d(0x438)](_0x543ef3['pitch'])[_0x423b5d(0x964)](0x8)),this[_0x423b5d(0x691)][_0x423b5d(0x442)]=this[_0x423b5d(0x691)]['pitch']%0x168,this[_0x423b5d(0x691)]['roll']+=Number(-_0x34d1e5[_0x423b5d(0x7aa)][_0x423b5d(0x72b)][_0x423b5d(0x438)](_0x543ef3[_0x423b5d(0x193)])[_0x423b5d(0x964)](0x8)),this['_position'][_0x423b5d(0x193)]=this['_position'][_0x423b5d(0x193)]%0x168;}['_onLeftDown'](_0x2da33a){const _0x2875d8=_0x43bf95;this['_activeEditor']&&this[_0x2875d8(0x457)][_0x2875d8(0x441)](_0x2da33a);}[_0x43bf95(0x6dc)](_0xa62d72){const _0x1e7425=_0x43bf95;this[_0x1e7425(0x457)]&&this[_0x1e7425(0x457)]['handleMouseMove'](_0xa62d72);}[_0x43bf95(0xa64)](_0x1a8acd){const _0x41efdb=_0x43bf95;this[_0x41efdb(0x457)]&&this[_0x41efdb(0x457)][_0x41efdb(0x8a7)](_0x1a8acd);}[_0x43bf95(0x172)](_0x5d8e3f){const _0x221ee3=_0x43bf95;let _0x3d4510=_0x34d1e5[_0x221ee3(0x7aa)][_0x221ee3(0x7a6)][_0x221ee3(0x7b5)](_0x5d8e3f);this[_0x221ee3(0x303)](_0x3d4510),this[_0x221ee3(0x3e3)]instanceof _0x34d1e5[_0x221ee3(0x7aa)][_0x221ee3(0x926)]?this['_model'][_0x221ee3(0x2b2)]=_0x34d1e5[_0x221ee3(0x7aa)]['Transforms']['headingPitchRollQuaternion'](this['_model'][_0x221ee3(0x9a7)][_0x221ee3(0x4e7)](_0x34d1e5['Cesium']['JulianDate'][_0x221ee3(0xaa6)]()),new _0x34d1e5[(_0x221ee3(0x7aa))]['HeadingPitchRoll'](_0x34d1e5['Cesium'][_0x221ee3(0x72b)][_0x221ee3(0x2b0)](this[_0x221ee3(0x691)][_0x221ee3(0x77c)]),_0x34d1e5[_0x221ee3(0x7aa)][_0x221ee3(0x72b)]['toRadians'](-this['_position']['pitch']),_0x34d1e5[_0x221ee3(0x7aa)][_0x221ee3(0x72b)][_0x221ee3(0x2b0)](this['_position'][_0x221ee3(0x193)]))):this[_0x221ee3(0x3e3)]instanceof Promise&&this['_model'][_0x221ee3(0x379)](_0x375ae2=>{const _0xf20a13=_0x221ee3;_0x375ae2 instanceof _0x34d1e5[_0xf20a13(0x7aa)][_0xf20a13(0x64e)]?_0x34d1e5['Cesium']['Matrix4'][_0xf20a13(0x310)](_0x375ae2['modelMatrix'],_0x34d1e5[_0xf20a13(0x7aa)]['Matrix4'][_0xf20a13(0x90c)](_0x34d1e5[_0xf20a13(0x7aa)][_0xf20a13(0x72d)]['fromHeadingPitchRoll'](_0x3d4510)),_0x375ae2[_0xf20a13(0xa0c)]):_0x375ae2 instanceof _0x34d1e5[_0xf20a13(0x7aa)][_0xf20a13(0xa0d)]&&_0x34d1e5[_0xf20a13(0x7aa)]['Matrix4'][_0xf20a13(0x310)](_0x375ae2[_0xf20a13(0x6a0)][_0xf20a13(0x203)],_0x34d1e5['Cesium'][_0xf20a13(0x5ee)][_0xf20a13(0x90c)](_0x34d1e5[_0xf20a13(0x7aa)][_0xf20a13(0x72d)][_0xf20a13(0xf6)](_0x3d4510)),_0x375ae2[_0xf20a13(0x6a0)][_0xf20a13(0x203)]);});}[_0x43bf95(0x845)](_0x4a4cf4){const _0x4f65b4=_0x43bf95;_0x34d1e5[_0x4f65b4(0x7aa)][_0x4f65b4(0x5ee)][_0x4f65b4(0x5c2)](this[_0x4f65b4(0x69e)],_0x4a4cf4,this[_0x4f65b4(0x69e)]),this[_0x4f65b4(0x3e3)]instanceof _0x34d1e5[_0x4f65b4(0x7aa)][_0x4f65b4(0x926)]?this[_0x4f65b4(0x3e3)][_0x4f65b4(0x9a7)]=_0x4a4cf4:this['_model']instanceof Promise&&this[_0x4f65b4(0x3e3)]['then'](_0x39f518=>{const _0x2ce8cc=_0x4f65b4;_0x39f518 instanceof _0x34d1e5[_0x2ce8cc(0x7aa)][_0x2ce8cc(0x64e)]?_0x34d1e5[_0x2ce8cc(0x7aa)][_0x2ce8cc(0x5ee)][_0x2ce8cc(0x5c2)](_0x39f518['modelMatrix'],_0x4a4cf4,_0x39f518['modelMatrix']):_0x39f518 instanceof _0x34d1e5[_0x2ce8cc(0x7aa)][_0x2ce8cc(0xa0d)]&&_0x34d1e5['Cesium'][_0x2ce8cc(0x5ee)][_0x2ce8cc(0x5c2)](_0x39f518[_0x2ce8cc(0x6a0)][_0x2ce8cc(0x203)],_0x4a4cf4,_0x39f518[_0x2ce8cc(0x6a0)]['transform']);}),this[_0x4f65b4(0x457)][_0x4f65b4(0xa0c)]=this[_0x4f65b4(0x69e)],this[_0x4f65b4(0x891)](this['_modelMatrix']);}[_0x43bf95(0x6b1)](){const _0x35d6a3=_0x43bf95;this['_callback']&&this[_0x35d6a3(0xdf)](this[_0x35d6a3(0x691)]);}['activate'](_0x3925fa,_0x4cd34e){const _0x205175=_0x43bf95;if(!this['_model'])throw new Error(_0x205175(0x235));return this[_0x205175(0x8e7)][_0x205175(0x7ca)]=!0x1,this[_0x205175(0x521)][_0x205175(0x7ca)]=!0x1,this[_0x205175(0x457)]=_0x3925fa===_0x138d4a[_0x205175(0x573)]?this[_0x205175(0x8e7)]:this[_0x205175(0x521)],this[_0x205175(0x1bb)](),!this['_handler']&&this[_0x205175(0x4ac)](),this[_0x205175(0xdf)]=_0x4cd34e,this;}[_0x43bf95(0x96a)](){const _0xc326a5=_0x43bf95;return this['_unbindEvent'](),this[_0xc326a5(0x1d4)]&&this['_handler']['destroy'](),this[_0xc326a5(0x1d4)]=void 0x0,this[_0xc326a5(0x8e7)][_0xc326a5(0x7ca)]=!0x1,this[_0xc326a5(0x521)]['active']=!0x1,this[_0xc326a5(0x457)]=void 0x0,this[_0xc326a5(0x69e)]=void 0x0,this;}},_0x3a8530=_0xe0811f,_0x5067c8=class extends _0x49dd70{constructor(_0x11cd6d){const _0x5ccc3a=_0x43bf95;super(_0x11cd6d),this['_delegate']=void 0x0,this[_0x5ccc3a(0x6d9)]=new _0x34d1e5['Cesium'][(_0x5ccc3a(0x508))]({'geometryInstances':new _0x34d1e5[(_0x5ccc3a(0x7aa))][(_0x5ccc3a(0x456))]({'geometry':{}}),'asynchronous':!0x0,'show':!0x1}),this[_0x5ccc3a(0x558)]=_0x4075ae[_0x5ccc3a(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x34869b=_0x43bf95;return _0x49dd70[_0x34869b(0x7b6)](_0x34869b(0x788));}set[_0x43bf95(0x867)](_0x534f60){const _0x466d4f=_0x43bf95;this[_0x466d4f(0x850)]=_0x534f60,Object['keys'](this[_0x466d4f(0x365)])['forEach'](_0x39c110=>{const _0x4e2448=_0x466d4f;this['_cache'][_0x39c110][_0x4e2448(0x776)]=this['_show'];});}get['show'](){const _0x31f919=_0x43bf95;return this[_0x31f919(0x850)];}[_0x43bf95(0x84d)](_0x12bd82){const _0x19b24a=_0x43bf95;this[_0x19b24a(0x3f7)]=_0x12bd82,this[_0x19b24a(0xaa1)]=this[_0x19b24a(0x3f7)][_0x19b24a(0x148)][_0x19b24a(0x744)],Object['keys'](this[_0x19b24a(0x365)])[_0x19b24a(0x2de)](_0x4586f1=>{const _0x2771b9=_0x19b24a;this[_0x2771b9(0xaa1)]['add'](this['_cache'][_0x4586f1]['delegate']);}),this[_0x19b24a(0x3f7)][_0x19b24a(0x148)][_0x19b24a(0x2d5)][_0x19b24a(0x45f)](this[_0x19b24a(0x6d9)]),this[_0x19b24a(0x558)]=_0x4075ae[_0x19b24a(0xa0f)];}[_0x43bf95(0x526)](){const _0xd096de=_0x43bf95;Object[_0xd096de(0x6f9)](this[_0xd096de(0x365)])[_0xd096de(0x2de)](_0x49956e=>{const _0x5792dc=_0xd096de;this['_delegate']['remove'](this[_0x5792dc(0x365)][_0x49956e][_0x5792dc(0x8ca)]);}),this[_0xd096de(0x3f7)][_0xd096de(0x148)][_0xd096de(0x2d5)][_0xd096de(0x109)](this['_helpPrimitive']),this[_0xd096de(0x365)]={},this['_state']=_0x4075ae[_0xd096de(0x947)];}[_0x43bf95(0x847)](_0x5ebcba,_0x48a80c){const _0x53eee5=_0x43bf95;if(!_0x5ebcba)return!0x1;this['_helpPrimitive'][_0x53eee5(0x28a)]=new _0x34d1e5[(_0x53eee5(0x7aa))][(_0x53eee5(0x456))]({'geometry':new _0x34d1e5[(_0x53eee5(0x7aa))][(_0x53eee5(0x984))]({'origin':_0x5ebcba[_0x53eee5(0xa2)],'orientation':_0x1ea9e9['getCameraOrientation'](_0x5ebcba),'frustum':_0x5ebcba[_0x53eee5(0x7b3)]}),'attributes':{'color':_0x34d1e5['Cesium']['ColorGeometryInstanceAttribute'][_0x53eee5(0x817)](_0x48a80c)}}),this[_0x53eee5(0x6d9)]['appearance']=new _0x34d1e5[(_0x53eee5(0x7aa))][(_0x53eee5(0x20d))]({'translucent':!0x1,'flat':!0x0});}[_0x43bf95(0x903)](_0xcbf89c,_0x3677b7,_0x3114f4){const _0x564a14=_0x43bf95;return this[_0x564a14(0x6d9)][_0x564a14(0x867)]=_0xcbf89c,_0xcbf89c&&this[_0x564a14(0x847)](_0x3677b7[_0x564a14(0x698)],_0x3114f4||_0x34d1e5[_0x564a14(0x7aa)]['Color'][_0x564a14(0x4fa)]),this;}['clear'](){const _0x46e704=_0x43bf95;return Object[_0x46e704(0x6f9)](this[_0x46e704(0x365)])['forEach'](_0x4a328c=>{const _0x4be922=_0x46e704;this[_0x4be922(0xaa1)][_0x4be922(0x109)](this[_0x4be922(0x365)][_0x4a328c][_0x4be922(0x8ca)]);}),this[_0x46e704(0x365)]={},this['_state']=_0x4075ae[_0x46e704(0x295)],this;}};_0x49dd70[_0x43bf95(0x545)](_0x43bf95(0x788));var _0x1224ec=_0x5067c8,_0x56bf65=class extends _0x49dd70{constructor(_0x551b15){const _0x20ce55=_0x43bf95;super(_0x551b15),this[_0x20ce55(0xaa1)]=new _0x34d1e5[(_0x20ce55(0x7aa))]['CustomDataSource'](_0x551b15),this[_0x20ce55(0x6d9)]=new _0x34d1e5[(_0x20ce55(0x7aa))][(_0x20ce55(0x508))]({'geometryInstances':new _0x34d1e5[(_0x20ce55(0x7aa))]['GeometryInstance']({'geometry':{}}),'asynchronous':!0x0,'show':!0x1}),this[_0x20ce55(0x558)]=_0x4075ae['INITIALIZED'];}get[_0x43bf95(0x9cf)](){const _0x4def36=_0x43bf95;return _0x49dd70['getLayerType'](_0x4def36(0x88f));}set['show'](_0x4c3805){const _0x5b67aa=_0x43bf95;this[_0x5b67aa(0x850)]=_0x4c3805,Object[_0x5b67aa(0x6f9)](this[_0x5b67aa(0x365)])[_0x5b67aa(0x2de)](_0x411db1=>{const _0x59339f=_0x5b67aa;this[_0x59339f(0x365)][_0x411db1][_0x59339f(0x776)]=this[_0x59339f(0x850)];});}get[_0x43bf95(0x867)](){const _0x50158f=_0x43bf95;return this[_0x50158f(0x850)];}['_addedHook'](){const _0x5f01ca=_0x43bf95;this[_0x5f01ca(0x3f7)][_0x5f01ca(0x148)][_0x5f01ca(0x2d5)][_0x5f01ca(0x45f)](this[_0x5f01ca(0x6d9)]);}[_0x43bf95(0x32a)](){const _0xe10c9e=_0x43bf95;this[_0xe10c9e(0x3f7)]['scene'][_0xe10c9e(0x2d5)][_0xe10c9e(0x109)](this[_0xe10c9e(0x6d9)]);}[_0x43bf95(0x847)](_0x5e6f40,_0x155d63){const _0x9be1a4=_0x43bf95;if(!_0x5e6f40)return!0x1;this['_helpPrimitive'][_0x9be1a4(0x28a)]=new _0x34d1e5[(_0x9be1a4(0x7aa))][(_0x9be1a4(0x456))]({'geometry':new _0x34d1e5['Cesium'][(_0x9be1a4(0x984))]({'origin':_0x5e6f40[_0x9be1a4(0xa2)],'orientation':_0x1ea9e9[_0x9be1a4(0x98b)](_0x5e6f40),'frustum':_0x5e6f40[_0x9be1a4(0x7b3)]}),'attributes':{'color':_0x34d1e5[_0x9be1a4(0x7aa)][_0x9be1a4(0x606)][_0x9be1a4(0x817)](_0x155d63)}}),this[_0x9be1a4(0x6d9)][_0x9be1a4(0x171)]=new _0x34d1e5[(_0x9be1a4(0x7aa))]['PerInstanceColorAppearance']({'translucent':!0x1,'flat':!0x0});}[_0x43bf95(0x903)](_0x267b4c,_0x1f1ca2,_0x240a7b){const _0x1f44dd=_0x43bf95;return this[_0x1f44dd(0x6d9)]['show']=_0x267b4c,_0x267b4c&&this[_0x1f44dd(0x847)](_0x1f1ca2[_0x1f44dd(0x698)],_0x240a7b||_0x34d1e5[_0x1f44dd(0x7aa)][_0x1f44dd(0x7d2)][_0x1f44dd(0x4fa)]),this;}[_0x43bf95(0x90d)](){const _0x1e21bd=_0x43bf95;return Object[_0x1e21bd(0x6f9)](this[_0x1e21bd(0x365)])['forEach'](_0x3cf6f=>{const _0x5f087c=_0x1e21bd;this[_0x5f087c(0xaa1)][_0x5f087c(0x109)](this[_0x5f087c(0x365)][_0x3cf6f][_0x5f087c(0x8ca)]);}),this[_0x1e21bd(0x365)]={},this[_0x1e21bd(0x558)]=_0x4075ae[_0x1e21bd(0x295)],this;}};_0x49dd70[_0x43bf95(0x545)]('plane_video');var _0xabd273=_0x56bf65,_0x41da91=_0x43bf95(0xa00),_0x298f1a=class extends _0x4f8204{constructor(_0x24ece4,_0x37d116,_0x448251){const _0x29307d=_0x43bf95;super(),this[_0x29307d(0x691)]=_0x16f48b[_0x29307d(0x81a)](_0x24ece4),this[_0x29307d(0x267)]=_0x37d116,this['_maskUrl']=_0x448251,this[_0x29307d(0x3f7)]=void 0x0,this['_camera']=void 0x0,this[_0x29307d(0x887)]=void 0x0,this[_0x29307d(0x111)]=void 0x0,this[_0x29307d(0xa73)]=void 0x0,this[_0x29307d(0x8bb)]=new _0x34d1e5[(_0x29307d(0x7aa))][(_0x29307d(0x99f))]({'fov':_0x34d1e5[_0x29307d(0x7aa)][_0x29307d(0x72b)][_0x29307d(0x2b0)](0x3c),'aspectRatio':0x1}),this[_0x29307d(0x3df)]=0x1,this[_0x29307d(0x893)]=!0x0,this[_0x29307d(0xa52)]=new _0x34d1e5['Cesium'][(_0x29307d(0x7d2))](0x1,0x1,0x1,0x1),this[_0x29307d(0x558)]=_0x4075ae[_0x29307d(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x532335=_0x43bf95;return _0x4f8204[_0x532335(0x853)](_0x532335(0x788));}set[_0x43bf95(0x867)](_0xf12ff5){const _0x198b48=_0x43bf95;this['_show']=_0xf12ff5,this[_0x198b48(0xaa1)]&&(this[_0x198b48(0xaa1)]['enabled']=_0xf12ff5);}get['show'](){const _0x23ff18=_0x43bf95;return this[_0x23ff18(0x850)];}set['position'](_0x285b13){const _0x6c0f04=_0x43bf95;this[_0x6c0f04(0x691)]=_0x16f48b[_0x6c0f04(0x81a)](_0x285b13),this[_0x6c0f04(0x43d)]();}get[_0x43bf95(0x9a7)](){const _0x512da6=_0x43bf95;return this[_0x512da6(0x691)];}set[_0x43bf95(0x83e)](_0x5f060d){const _0x17d8d2=_0x43bf95;this[_0x17d8d2(0x267)]=_0x5f060d;}get[_0x43bf95(0x83e)](){return this['_video'];}set['maskUrl'](_0x1169af){const _0x1d2ff7=_0x43bf95;this[_0x1d2ff7(0x2a1)](),this[_0x1d2ff7(0x8c8)]=_0x1169af;let _0x1184cf=new Image(),_0x2db032=this;_0x1184cf[_0x1d2ff7(0x38f)]=()=>{const _0x319d2b=_0x1d2ff7;_0x2db032[_0x319d2b(0x111)]=new _0x34d1e5[(_0x319d2b(0x7aa))][(_0x319d2b(0x61e))]({'context':_0x2db032[_0x319d2b(0x3f7)][_0x319d2b(0x148)][_0x319d2b(0x970)],'source':_0x1184cf}),_0x2db032[_0x319d2b(0x4ac)]();},_0x1184cf['src']=_0x1169af;}get['maskUrl'](){const _0x132675=_0x43bf95;return this[_0x132675(0x8c8)];}get[_0x43bf95(0x698)](){return this['_camera'];}[_0x43bf95(0x395)](){const _0x2664ad=_0x43bf95;var _0x5642f3;let _0x2653a0=_0x34d1e5[_0x2664ad(0x7aa)][_0x2664ad(0x982)][_0x2664ad(0x81e)](this[_0x2664ad(0x691)][_0x2664ad(0x598)],this[_0x2664ad(0x691)][_0x2664ad(0x941)],this[_0x2664ad(0x691)][_0x2664ad(0xa84)]),_0x371839=_0x1ea9e9[_0x2664ad(0x730)](this[_0x2664ad(0x691)],((_0x5642f3=this[_0x2664ad(0x8bb)])==null?void 0x0:_0x5642f3[_0x2664ad(0x7ed)])||0x78);this[_0x2664ad(0x3f7)]&&(this[_0x2664ad(0x6a7)]||(this[_0x2664ad(0x6a7)]=new _0x34d1e5['Cesium'][(_0x2664ad(0x673))](this['_viewer']['scene'])),this[_0x2664ad(0x6a7)][_0x2664ad(0x7b3)]=this[_0x2664ad(0x8bb)],_0x1ea9e9[_0x2664ad(0xa1e)](this[_0x2664ad(0x6a7)],_0x2653a0,_0x371839,this[_0x2664ad(0x691)][_0x2664ad(0x193)]));}[_0x43bf95(0x43d)](){const _0x2d709e=_0x43bf95;this[_0x2d709e(0x395)](),this[_0x2d709e(0xa73)]=new _0x34d1e5[(_0x2d709e(0x7aa))][(_0x2d709e(0x550))]({'lightCamera':this['_camera'],'enable':!0x1,'isPointLight':!0x1,'isSpotLight':!0x0,'cascadesEnabled':!0x1,'context':this[_0x2d709e(0x3f7)][_0x2d709e(0x148)][_0x2d709e(0x970)],'pointLightRadius':this[_0x2d709e(0x8bb)][_0x2d709e(0x7ed)]});}[_0x43bf95(0x4cb)](){const _0x36e82c=_0x43bf95;this[_0x36e82c(0xaa1)]=new _0x34d1e5[(_0x36e82c(0x7aa))][(_0x36e82c(0x14f))]({'fragmentShader':_0x41da91,'uniforms':{'mixNum':()=>this[_0x36e82c(0x3df)],'clearBlack':()=>this[_0x36e82c(0x893)],'disViewColor':()=>this[_0x36e82c(0xa52)],'videoTexture':()=>this[_0x36e82c(0x887)],'maskTexture':()=>this[_0x36e82c(0x111)],'shadowMapTexture':()=>this[_0x36e82c(0xa73)]['_shadowMapTexture'],'shadowMap_matrix':()=>this[_0x36e82c(0xa73)][_0x36e82c(0x7fe)],'shadowMap_lightPositionEC':()=>this[_0x36e82c(0xa73)][_0x36e82c(0x41e)],'shadowMap_texelSizeDepthBiasAndNormalShadingSmooth':()=>{const _0x3f74b2=_0x36e82c;let _0x2eb896=this[_0x3f74b2(0xa73)][_0x3f74b2(0x311)]?this[_0x3f74b2(0xa73)][_0x3f74b2(0x871)]:this[_0x3f74b2(0xa73)][_0x3f74b2(0x905)];return _0x34d1e5[_0x3f74b2(0x7aa)][_0x3f74b2(0x849)][_0x3f74b2(0x597)](0x1/this[_0x3f74b2(0xa73)]['_textureSize']['x'],0x1/this[_0x3f74b2(0xa73)][_0x3f74b2(0x105)]['y'],_0x2eb896[_0x3f74b2(0xa6c)],_0x2eb896[_0x3f74b2(0x577)],new _0x34d1e5[(_0x3f74b2(0x7aa))][(_0x3f74b2(0x849))]());},'shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness':()=>{const _0x1e9205=_0x36e82c;let _0x2b16f4=this[_0x1e9205(0xa73)][_0x1e9205(0x311)]?this[_0x1e9205(0xa73)]['_pointBias']:this[_0x1e9205(0xa73)][_0x1e9205(0x905)];return _0x34d1e5['Cesium'][_0x1e9205(0x849)][_0x1e9205(0x597)](_0x2b16f4[_0x1e9205(0xec)],this[_0x1e9205(0xa73)][_0x1e9205(0x2e0)],this[_0x1e9205(0xa73)]['maximumDistance'],this[_0x1e9205(0xa73)]['_darkness'],new _0x34d1e5['Cesium']['Cartesian4']());}}});}[_0x43bf95(0x8a1)](){const _0x5b5624=_0x43bf95;this['_videoTexture']&&this[_0x5b5624(0x887)][_0x5b5624(0x57b)](),this[_0x5b5624(0x887)]=new _0x34d1e5[(_0x5b5624(0x7aa))][(_0x5b5624(0x61e))]({'context':this['_viewer'][_0x5b5624(0x148)]['context'],'source':this[_0x5b5624(0x267)],'width':0x1,'height':0x1,'pixelFormat':_0x34d1e5[_0x5b5624(0x7aa)][_0x5b5624(0x503)][_0x5b5624(0x1b2)],'pixelDatatype':_0x34d1e5['Cesium'][_0x5b5624(0x8b1)][_0x5b5624(0x958)]});}['_bindEvent'](){const _0x16dfb1=_0x43bf95;this[_0x16dfb1(0x3f7)][_0x16dfb1(0xaad)][_0x16dfb1(0x9ae)][_0x16dfb1(0x278)](this['_onClockTick'],this);}['_unbindEvent'](){const _0x5908f3=_0x43bf95;this['_viewer']['clock'][_0x5908f3(0x9ae)][_0x5908f3(0x97c)](this[_0x5908f3(0x8a1)],this);}[_0x43bf95(0x6a3)](){const _0x1dee5d=_0x43bf95;this['_viewer']=this[_0x1dee5d(0x761)]['_viewer'],this[_0x1dee5d(0x111)]=new _0x34d1e5[(_0x1dee5d(0x7aa))][(_0x1dee5d(0x61e))]({'context':this[_0x1dee5d(0x3f7)][_0x1dee5d(0x148)][_0x1dee5d(0x970)],'source':{'width':0x1,'height':0x1,'arrayBufferView':new Uint8Array([0xff,0xff,0xff,0xff])},'flipY':!0x1}),this[_0x1dee5d(0x8c8)]?(this[_0x1dee5d(0x887)]=new _0x34d1e5[(_0x1dee5d(0x7aa))]['Texture']({'context':this[_0x1dee5d(0x3f7)][_0x1dee5d(0x148)][_0x1dee5d(0x970)],'source':{'width':0x1,'height':0x1,'arrayBufferView':new Uint8Array([0xff,0xff,0xff,0xff])},'flipY':!0x1}),this[_0x1dee5d(0x3b7)]=this[_0x1dee5d(0x8c8)]):this[_0x1dee5d(0x4ac)](),this[_0x1dee5d(0x43d)](),this['_createPostProcessStage'](),this[_0x1dee5d(0x3f7)][_0x1dee5d(0x148)][_0x1dee5d(0x2d5)][_0x1dee5d(0x45f)](this);}[_0x43bf95(0x32a)](){const _0x30e4b5=_0x43bf95;this[_0x30e4b5(0x2a1)](),this['_viewShadowMap']=void 0x0;}[_0x43bf95(0x4aa)](){return!0x1;}[_0x43bf95(0x96f)](){const _0x5956c2=_0x43bf95;this[_0x5956c2(0xa73)]&&this['_viewer']['scene'][_0x5956c2(0x86f)][_0x5956c2(0x70b)]['push'](this[_0x5956c2(0xa73)]);}[_0x43bf95(0x5db)](_0x31894b){const _0x5b5fc9=_0x43bf95;var _0x5498d5;return Object[_0x5b5fc9(0x6f9)](_0x31894b)[_0x5b5fc9(0x6a2)]===0x0?this:(this[_0x5b5fc9(0x9ca)]=_0x31894b,_0x31894b[_0x5b5fc9(0x7ae)]&&(this[_0x5b5fc9(0x8bb)]['fov']=_0x34d1e5[_0x5b5fc9(0x7aa)][_0x5b5fc9(0x72b)]['toRadians'](_0x31894b[_0x5b5fc9(0x7ae)])),_0x31894b[_0x5b5fc9(0x7cd)]&&(this['_frustum'][_0x5b5fc9(0x7cd)]=_0x31894b[_0x5b5fc9(0x7cd)]),_0x31894b[_0x5b5fc9(0x7ed)]&&(this['_frustum']['far']=_0x31894b[_0x5b5fc9(0x7ed)]),_0x31894b[_0x5b5fc9(0x865)]&&(this[_0x5b5fc9(0x8bb)][_0x5b5fc9(0x865)]=_0x31894b['aspectRatio']),_0x31894b['alpha']&&(this['_alpha']=_0x31894b[_0x5b5fc9(0x429)]),this[_0x5b5fc9(0x893)]=(_0x5498d5=_0x31894b['clearBlack'])!=null?_0x5498d5:!0x0,_0x31894b[_0x5b5fc9(0x1fa)]&&(this[_0x5b5fc9(0xa52)]=_0x31894b[_0x5b5fc9(0x1fa)]),this[_0x5b5fc9(0xaa1)]&&this[_0x5b5fc9(0x43d)](),this);}};_0x4f8204[_0x43bf95(0x545)](_0x43bf95(0x788));var _0x1065ff=_0x298f1a,_0x3d34f8=new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0xa43))](),_0x26e542=class extends _0x4f8204{constructor(_0x4c5ae3,_0x47088d){const _0x54e2b1=_0x43bf95;super(),this[_0x54e2b1(0x691)]=_0x16f48b[_0x54e2b1(0x81a)](_0x4c5ae3),this[_0x54e2b1(0x267)]=_0x47088d,this[_0x54e2b1(0xaa1)]=new _0x34d1e5[(_0x54e2b1(0x7aa))][(_0x54e2b1(0x926))]({'plane':{}}),this[_0x54e2b1(0x3f7)]=void 0x0,this['_camera']=void 0x0,this[_0x54e2b1(0x8bb)]=new _0x34d1e5[(_0x54e2b1(0x7aa))][(_0x54e2b1(0x99f))]({'fov':_0x34d1e5[_0x54e2b1(0x7aa)][_0x54e2b1(0x72b)][_0x54e2b1(0x2b0)](0x3c),'aspectRatio':0x1}),this[_0x54e2b1(0x558)]=_0x4075ae[_0x54e2b1(0x5d2)];}get[_0x43bf95(0x9cf)](){const _0x4c7568=_0x43bf95;return _0x4f8204[_0x4c7568(0x853)](_0x4c7568(0x88f));}set[_0x43bf95(0x867)](_0xa637e5){const _0x30d59d=_0x43bf95;this[_0x30d59d(0x850)]=_0xa637e5;}get['show'](){const _0x2b27d2=_0x43bf95;return this[_0x2b27d2(0x850)];}set[_0x43bf95(0x9a7)](_0x1a108c){const _0x658afe=_0x43bf95;this[_0x658afe(0x691)]=_0x16f48b[_0x658afe(0x81a)](_0x1a108c),this[_0x658afe(0x59d)]();}get['position'](){const _0x15014b=_0x43bf95;return this[_0x15014b(0x691)];}set['video'](_0xd947c0){const _0x49a1ec=_0x43bf95;this[_0x49a1ec(0x267)]=_0xd947c0;}get['video'](){const _0x5e0371=_0x43bf95;return this[_0x5e0371(0x267)];}get[_0x43bf95(0x698)](){const _0x4aa88e=_0x43bf95;return this[_0x4aa88e(0x6a7)];}[_0x43bf95(0x6a3)](){const _0x29be5e=_0x43bf95;this[_0x29be5e(0x3f7)]=this[_0x29be5e(0x761)][_0x29be5e(0x3f7)],this[_0x29be5e(0x59d)]();}[_0x43bf95(0x754)](){const _0x1bf362=_0x43bf95;var _0x13f902;let _0x21da74=_0x34d1e5[_0x1bf362(0x7aa)][_0x1bf362(0x982)][_0x1bf362(0x81e)](this[_0x1bf362(0x691)][_0x1bf362(0x598)],this[_0x1bf362(0x691)][_0x1bf362(0x941)],this[_0x1bf362(0x691)]['alt']),_0x31f407=_0x1ea9e9[_0x1bf362(0x730)](this[_0x1bf362(0x691)],((_0x13f902=this['_frustum'])==null?void 0x0:_0x13f902[_0x1bf362(0x7ed)])||0x78);return this['_viewer']&&(this[_0x1bf362(0x6a7)]||(this[_0x1bf362(0x6a7)]=new _0x34d1e5[(_0x1bf362(0x7aa))][(_0x1bf362(0x673))](this[_0x1bf362(0x3f7)][_0x1bf362(0x148)])),this[_0x1bf362(0x6a7)][_0x1bf362(0x7b3)]=this[_0x1bf362(0x8bb)],_0x1ea9e9['setCamera'](this[_0x1bf362(0x6a7)],_0x21da74,_0x31f407,this[_0x1bf362(0x691)]['roll'])),{'cameraPosition':_0x21da74,'viewPosition':_0x31f407};}['_updatePlane'](){const _0x424156=_0x43bf95;let {cameraPosition:_0x301a56,viewPosition:_0x33df19}=this[_0x424156(0x754)](),_0x5c6c95=_0x34d1e5['Cesium'][_0x424156(0x4f1)][_0x424156(0x17a)](_0x301a56),_0x493d0a=_0x34d1e5['Cesium'][_0x424156(0x4f1)]['fromCartesian'](_0x33df19),_0xd4c925=new _0x34d1e5[(_0x424156(0x7aa))][(_0x424156(0x982))]();_0x34d1e5[_0x424156(0x7aa)][_0x424156(0x982)][_0x424156(0xa4)](_0x3d34f8[_0x424156(0x4bb)](_0x5c6c95),_0x3d34f8['project'](_0x493d0a),_0xd4c925),_0x34d1e5['Cesium']['Cartesian3'][_0x424156(0x732)](_0xd4c925,_0xd4c925);let _0x390c18=this[_0x424156(0x8bb)][_0x424156(0x7ed)]*Math['tan'](this['_frustum']['fov']*0.5)*0x2,_0x2d11fb=_0x390c18/this['_frustum'][_0x424156(0x865)];this[_0x424156(0xaa1)]['position']=_0x33df19,this['_delegate'][_0x424156(0x6bb)]={'dimensions':{'x':_0x390c18,'y':_0x2d11fb},'plane':new _0x34d1e5['Cesium'][(_0x424156(0x2ac))](_0xd4c925,0x0),'material':this[_0x424156(0x267)]||_0x34d1e5[_0x424156(0x7aa)][_0x424156(0x7d2)][_0x424156(0x4fa)][_0x424156(0x8e4)](0.5)};}[_0x43bf95(0x5db)](_0xa93d76){const _0x2402ea=_0x43bf95;return Object[_0x2402ea(0x6f9)](_0xa93d76)[_0x2402ea(0x6a2)]===0x0?this:(this[_0x2402ea(0x9ca)]=_0xa93d76,_0xa93d76[_0x2402ea(0x7ae)]&&(this[_0x2402ea(0x8bb)][_0x2402ea(0x7ae)]=_0x34d1e5[_0x2402ea(0x7aa)]['Math']['toRadians'](_0xa93d76['fov'])),_0xa93d76[_0x2402ea(0x7cd)]&&(this[_0x2402ea(0x8bb)][_0x2402ea(0x7cd)]=_0xa93d76[_0x2402ea(0x7cd)]),_0xa93d76[_0x2402ea(0x7ed)]&&(this[_0x2402ea(0x8bb)][_0x2402ea(0x7ed)]=_0xa93d76['far']),_0xa93d76[_0x2402ea(0x865)]&&(this['_frustum'][_0x2402ea(0x865)]=_0xa93d76[_0x2402ea(0x865)]),this[_0x2402ea(0xaa1)]&&this[_0x2402ea(0x59d)](),this);}};_0x4f8204['registerType'](_0x43bf95(0x88f));var _0x5d88cb=_0x26e542,_0x1f6337={'UP':'up','DOWN':_0x43bf95(0x56c),'LEFT':_0x43bf95(0x910),'RIGHT':_0x43bf95(0x828),'FRONT':_0x43bf95(0xaf),'BACK':_0x43bf95(0x3ac),'NONE':'none'},_0x2ad0cd=_0x1f6337,_0xb1e7ca={'edgeWidth':0x0,'edgeColor':_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x7d2)]['WHITE'],'unionClippingRegions':!0x1},_0x3eb354=class{constructor(_0x39e50a={}){const _0x3a52e6=_0x43bf95;this[_0x3a52e6(0x674)]={..._0xb1e7ca,..._0x39e50a},this[_0x3a52e6(0x555)]=void 0x0,this[_0x3a52e6(0x2e0)]=0x0,this[_0x3a52e6(0x431)]=0x0,this['_positions']=void 0x0,this[_0x3a52e6(0x15c)]=new _0x34d1e5[(_0x3a52e6(0x7aa))][(_0x3a52e6(0x826))]({'edgeWidth':this[_0x3a52e6(0x674)][_0x3a52e6(0x8c2)],'edgeColor':this[_0x3a52e6(0x674)][_0x3a52e6(0x522)],'unionClippingRegions':this[_0x3a52e6(0x674)][_0x3a52e6(0x570)]}),this[_0x3a52e6(0x8d3)]=!0x1;}set['positions'](_0x20dfad){const _0x2928a2=_0x43bf95;this[_0x2928a2(0x387)]=_0x16f48b[_0x2928a2(0xa8b)](_0x20dfad),this[_0x2928a2(0x555)]=void 0x0,this['_mountPlanes']();}get[_0x43bf95(0x752)](){return this['_positions'];}set['direction'](_0x2b78f3){const _0x20374e=_0x43bf95;this[_0x20374e(0x387)]=[],this[_0x20374e(0x555)]=_0x2b78f3,this['_mountPlanes']();}get['direction'](){const _0x441928=_0x43bf95;return this[_0x441928(0x555)];}set['distance'](_0xe4550b){const _0x4e9744=_0x43bf95;this[_0x4e9744(0x2e0)]=+_0xe4550b,this[_0x4e9744(0x15c)][_0x4e9744(0x287)][_0x4e9744(0x2de)](_0x166297=>{_0x166297['distance']=+_0xe4550b;});}get[_0x43bf95(0x7f4)](){const _0x441a7b=_0x43bf95;return this[_0x441a7b(0x2e0)];}set[_0x43bf95(0xc0)](_0x56aa0d){const _0x93972c=_0x43bf95;this[_0x93972c(0x431)]=+_0x56aa0d,this[_0x93972c(0x15c)][_0x93972c(0x287)]['forEach'](_0x2d5d37=>{const _0x4e0947=_0x93972c;if(_0x56aa0d){let _0x148dbe=_0x34d1e5['Cesium'][_0x4e0947(0x72d)][_0x4e0947(0x353)](_0x34d1e5[_0x4e0947(0x7aa)][_0x4e0947(0x72b)][_0x4e0947(0x2b0)](+_0x56aa0d));_0x34d1e5['Cesium'][_0x4e0947(0x72d)]['multiplyByVector'](_0x148dbe,_0x2d5d37[_0x4e0947(0x75c)],_0x2d5d37[_0x4e0947(0x75c)]);}});}get[_0x43bf95(0xc0)](){const _0x2f27c8=_0x43bf95;return this[_0x2f27c8(0x431)];}set['enable'](_0xa97fa8){const _0x1209af=_0x43bf95;this[_0x1209af(0x8d3)]!==_0xa97fa8&&(this[_0x1209af(0x8d3)]=_0xa97fa8,this[_0x1209af(0x15c)][_0x1209af(0x776)]=this[_0x1209af(0x8d3)],this[_0x1209af(0x558)]=this[_0x1209af(0x8d3)]?_0x4075ae[_0x1209af(0x4a0)]:_0x4075ae[_0x1209af(0x6b6)],this['_enableHook']&&this[_0x1209af(0x9b7)]());}get[_0x43bf95(0x35a)](){const _0x518fc4=_0x43bf95;return this[_0x518fc4(0x8d3)];}get[_0x43bf95(0x988)](){const _0x220e8c=_0x43bf95;return this[_0x220e8c(0x558)];}['_enableHook'](){}[_0x43bf95(0x4eb)](){}[_0x43bf95(0x1a7)](_0x5df0f8){const _0x541b6a=_0x43bf95;let _0x4ac392;switch(_0x5df0f8){case _0x2ad0cd['UP']:_0x4ac392=new _0x34d1e5[(_0x541b6a(0x7aa))]['Cartesian3'](0x0,0x0,0x1);break;case _0x2ad0cd[_0x541b6a(0xa65)]:_0x4ac392=new _0x34d1e5[(_0x541b6a(0x7aa))][(_0x541b6a(0x982))](0x0,0x0,-0x1);break;case _0x2ad0cd['LEFT']:_0x4ac392=new _0x34d1e5[(_0x541b6a(0x7aa))][(_0x541b6a(0x982))](-0x1,0x0,0x0);break;case _0x2ad0cd[_0x541b6a(0x63c)]:_0x4ac392=new _0x34d1e5[(_0x541b6a(0x7aa))][(_0x541b6a(0x982))](0x1,0x0,0x0);break;case _0x2ad0cd[_0x541b6a(0x637)]:_0x4ac392=new _0x34d1e5['Cesium'][(_0x541b6a(0x982))](0x0,-0x1,0x0);break;case _0x2ad0cd[_0x541b6a(0x782)]:_0x4ac392=new _0x34d1e5[(_0x541b6a(0x7aa))][(_0x541b6a(0x982))](0x0,0x1,0x0);break;default:break;}return _0x4ac392;}[_0x43bf95(0x888)](_0x485d7d){const _0x1f7828=_0x43bf95;if(!_0x485d7d||_0x485d7d[_0x1f7828(0x6a2)]<0x3)return!0x1;let _0x226fe5=_0x5e5f93['transformWGS84ToCartesian'](this['_positions'][0x0]),_0x5d9943=_0x5e5f93[_0x1f7828(0x432)](this[_0x1f7828(0x387)][0x1]),_0xc6d91f=_0x5e5f93[_0x1f7828(0x432)](this[_0x1f7828(0x387)][0x2]);return(_0xc6d91f['y']-_0x5d9943['y'])*(_0x5d9943['x']-_0x226fe5['x'])-(_0x5d9943['y']-_0x226fe5['y'])*(_0xc6d91f['x']-_0x5d9943['x'])>0x0;}[_0x43bf95(0x62c)](){const _0x183533=_0x43bf95;let _0x25dfb1=[];if(this['_positions']&&this[_0x183533(0x387)][_0x183533(0x6a2)]>=0x3){let _0x2fde47=this[_0x183533(0x888)](this[_0x183533(0x387)]),_0x4f1fd8=this['_positions'][_0x183533(0x6a2)];for(let _0x3aa136=0x0;_0x3aa136<_0x4f1fd8;_0x3aa136++){let _0x41fa05=(_0x3aa136+0x1)%_0x4f1fd8;if(this[_0x183533(0x387)][_0x3aa136]['lng']===this[_0x183533(0x387)][_0x41fa05]['lng']&&this[_0x183533(0x387)][_0x3aa136][_0x183533(0x941)]===this[_0x183533(0x387)][_0x41fa05][_0x183533(0x941)]&&this[_0x183533(0x387)][_0x3aa136]['alt']===this[_0x183533(0x387)][_0x41fa05][_0x183533(0x941)])continue;let _0x14ca46=_0x5e5f93[_0x183533(0x432)](this['_positions'][_0x3aa136]),_0x47c123=_0x5e5f93[_0x183533(0x432)](this[_0x183533(0x387)][_0x41fa05]),_0x204112=_0x34d1e5[_0x183533(0x7aa)][_0x183533(0x982)][_0x183533(0x5df)](_0x14ca46,_0x2fde47?_0x34d1e5['Cesium'][_0x183533(0x982)][_0x183533(0xa4)](_0x14ca46,_0x47c123,new _0x34d1e5[(_0x183533(0x7aa))][(_0x183533(0x982))]()):_0x34d1e5[_0x183533(0x7aa)][_0x183533(0x982)]['subtract'](_0x47c123,_0x14ca46,new _0x34d1e5[(_0x183533(0x7aa))][(_0x183533(0x982))]()),new _0x34d1e5['Cesium'][(_0x183533(0x982))]());_0x34d1e5[_0x183533(0x7aa)][_0x183533(0x982)][_0x183533(0x732)](_0x204112,_0x204112),_0x25dfb1[_0x183533(0xb3)](new _0x34d1e5[(_0x183533(0x7aa))]['ClippingPlane'](_0x204112,this[_0x183533(0x2e0)]||0x0));}}return _0x25dfb1;}[_0x43bf95(0x49c)](_0x1e6604){const _0x59edd3=_0x43bf95;let _0x1de0d6=[],_0x2c69c5=_0x34d1e5['Cesium']['Matrix4'][_0x59edd3(0x9d1)](_0x1e6604,new _0x34d1e5[(_0x59edd3(0x7aa))][(_0x59edd3(0x5ee))]());if(this['_positions']&&this['_positions']['length']===0x2){let _0x5a8d23=_0x34d1e5['Cesium'][_0x59edd3(0x982)][_0x59edd3(0xaa2)],_0x4fcaa6=_0x34d1e5[_0x59edd3(0x7aa)]['Matrix4'][_0x59edd3(0x408)](_0x2c69c5,_0x5e5f93[_0x59edd3(0x432)](this[_0x59edd3(0x387)][0x0]),new _0x34d1e5['Cesium']['Cartesian3']()),_0x702744=_0x34d1e5['Cesium'][_0x59edd3(0x5ee)][_0x59edd3(0x408)](_0x2c69c5,_0x5e5f93[_0x59edd3(0x432)](this[_0x59edd3(0x387)][0x1]),new _0x34d1e5['Cesium'][(_0x59edd3(0x982))]()),_0x5b7c98=_0x34d1e5[_0x59edd3(0x7aa)]['Cartesian3'][_0x59edd3(0xa4)](_0x702744,_0x4fcaa6,new _0x34d1e5[(_0x59edd3(0x7aa))]['Cartesian3']());_0x34d1e5[_0x59edd3(0x7aa)][_0x59edd3(0x982)]['normalize'](_0x5b7c98,_0x5b7c98);let _0x2cc3a=_0x34d1e5[_0x59edd3(0x7aa)][_0x59edd3(0x982)][_0x59edd3(0x5df)](_0x5a8d23,_0x5b7c98,new _0x34d1e5[(_0x59edd3(0x7aa))][(_0x59edd3(0x982))]());_0x1de0d6[_0x59edd3(0xb3)](new _0x34d1e5['Cesium'][(_0x59edd3(0x57f))](_0x2cc3a,this[_0x59edd3(0x2e0)]||0x0));}else{if(this[_0x59edd3(0x387)]&&this[_0x59edd3(0x387)][_0x59edd3(0x6a2)]>=0x3){let _0x9b0786=_0x34d1e5[_0x59edd3(0x7aa)][_0x59edd3(0x982)]['UNIT_Z'],_0x41939b=this[_0x59edd3(0x888)](this[_0x59edd3(0x387)]),_0x139a47=this[_0x59edd3(0x387)][_0x59edd3(0x6a2)];for(let _0x7e3197=0x0;_0x7e3197<_0x139a47;_0x7e3197++){let _0x49c599=(_0x7e3197+0x1)%_0x139a47;if(this[_0x59edd3(0x387)][_0x7e3197][_0x59edd3(0x598)]===this[_0x59edd3(0x387)][_0x49c599][_0x59edd3(0x598)]&&this[_0x59edd3(0x387)][_0x7e3197][_0x59edd3(0x941)]===this['_positions'][_0x49c599][_0x59edd3(0x941)]&&this[_0x59edd3(0x387)][_0x7e3197][_0x59edd3(0xa84)]===this[_0x59edd3(0x387)][_0x49c599][_0x59edd3(0x941)])continue;let _0x4c8e9e=_0x34d1e5[_0x59edd3(0x7aa)][_0x59edd3(0x5ee)][_0x59edd3(0x408)](_0x2c69c5,_0x5e5f93[_0x59edd3(0x432)](this['_positions'][_0x7e3197]),new _0x34d1e5[(_0x59edd3(0x7aa))][(_0x59edd3(0x982))]()),_0x1ecc2e=_0x34d1e5['Cesium'][_0x59edd3(0x5ee)]['multiplyByPoint'](_0x2c69c5,_0x5e5f93[_0x59edd3(0x432)](this['_positions'][_0x49c599]),new _0x34d1e5[(_0x59edd3(0x7aa))][(_0x59edd3(0x982))]()),_0x3558d4=_0x34d1e5[_0x59edd3(0x7aa)][_0x59edd3(0x982)][_0x59edd3(0x5df)](_0x9b0786,_0x34d1e5['Cesium']['Cartesian3'][_0x59edd3(0x732)](_0x41939b?_0x34d1e5[_0x59edd3(0x7aa)]['Cartesian3'][_0x59edd3(0xa4)](_0x4c8e9e,_0x1ecc2e,new _0x34d1e5[(_0x59edd3(0x7aa))]['Cartesian3']()):_0x34d1e5[_0x59edd3(0x7aa)][_0x59edd3(0x982)][_0x59edd3(0xa4)](_0x1ecc2e,_0x4c8e9e,new _0x34d1e5[(_0x59edd3(0x7aa))][(_0x59edd3(0x982))]()),new _0x34d1e5['Cesium']['Cartesian3']()),new _0x34d1e5[(_0x59edd3(0x7aa))][(_0x59edd3(0x982))]());_0x1de0d6[_0x59edd3(0xb3)](new _0x34d1e5[(_0x59edd3(0x7aa))][(_0x59edd3(0x57f))](_0x3558d4,this['_distance']||0x0));}}else{if(this[_0x59edd3(0x555)]&&this['_direction']!==_0x2ad0cd[_0x59edd3(0x60e)]){let _0x5d784b=this[_0x59edd3(0x1a7)](this[_0x59edd3(0x555)]);if(this[_0x59edd3(0x431)]){let _0x59e321=_0x34d1e5[_0x59edd3(0x7aa)][_0x59edd3(0x72d)]['fromRotationZ'](_0x34d1e5[_0x59edd3(0x7aa)][_0x59edd3(0x72b)]['toRadians'](this[_0x59edd3(0x431)]));_0x34d1e5[_0x59edd3(0x7aa)][_0x59edd3(0x72d)][_0x59edd3(0xa69)](_0x59e321,_0x5d784b,_0x5d784b);}_0x5d784b&&_0x1de0d6[_0x59edd3(0xb3)](new _0x34d1e5[(_0x59edd3(0x7aa))][(_0x59edd3(0x57f))](_0x5d784b,this[_0x59edd3(0x2e0)]||0x0));}}}return _0x1de0d6;}},_0x4b1bc7=_0x3eb354,_0x152563=class extends _0x4b1bc7{constructor(_0x42226f,_0x56b50c={}){const _0x2dd2f1=_0x43bf95;super(_0x56b50c),this[_0x2dd2f1(0x3f7)]=_0x42226f,this[_0x2dd2f1(0x15c)]['unionClippingRegions']=!0x0,this[_0x2dd2f1(0x3f7)][_0x2dd2f1(0x148)]['globe'][_0x2dd2f1(0x6d0)]=this['_planeCollection'];}[_0x43bf95(0x4eb)](){const _0x109ed8=_0x43bf95;let _0x537e38=this[_0x109ed8(0x62c)]();this['_planeCollection'][_0x109ed8(0x207)](),_0x537e38[_0x109ed8(0x2de)](_0x41a608=>{const _0x227cbf=_0x109ed8;this[_0x227cbf(0x15c)]['add'](_0x41a608);});}},_0x5a8bc2=_0x152563,_0x56dafd={'lerpInterval':0x32,'bottomImage':'','sideImage':''},_0x21e41d=class extends _0x4b1bc7{constructor(_0x57dd2a,_0x2eab6a={}){const _0xd03837=_0x43bf95;super({..._0x56dafd,..._0x2eab6a}),this['_viewer']=_0x57dd2a,this['_viewer'][_0xd03837(0x148)][_0xd03837(0x7fd)][_0xd03837(0x6d0)]=this[_0xd03837(0x15c)],this[_0xd03837(0x17e)]=0x5,this[_0xd03837(0x761)]=new _0x34d1e5[(_0xd03837(0x7aa))][(_0xd03837(0x7b4))](),this['_viewer'][_0xd03837(0x148)][_0xd03837(0x2d5)][_0xd03837(0x45f)](this[_0xd03837(0x761)]);}set['height'](_0x9bf51e){const _0x1ffe9f=_0x43bf95;this[_0x1ffe9f(0x17e)]=_0x9bf51e,this[_0x1ffe9f(0x761)][_0x1ffe9f(0x207)](),this[_0x1ffe9f(0x110)]();}get['height'](){const _0x4171c5=_0x43bf95;return this[_0x4171c5(0x17e)];}[_0x43bf95(0x9b7)](){const _0x47e02b=_0x43bf95;this['_layer'][_0x47e02b(0x867)]=this[_0x47e02b(0x8d3)];}['_drawPrimitive'](){const _0x159132=_0x43bf95;if(this[_0x159132(0x15c)][_0x159132(0x6a2)]){if(this[_0x159132(0x10b)](),this[_0x159132(0x3f7)][_0x159132(0x4ed)]&&!(this['_viewer'][_0x159132(0x4ed)]instanceof _0x34d1e5[_0x159132(0x7aa)][_0x159132(0x940)])){let _0x90f1a4=[],_0x328e89=this[_0x159132(0x387)][_0x159132(0x6a2)],_0xd9f84f=this[_0x159132(0x674)][_0x159132(0x286)];for(let _0x2de51d=0x0;_0x2de51d<_0x328e89;_0x2de51d++){let _0x30668d=(_0x2de51d+0x1)%_0x328e89,_0x2a14ac=_0x5e5f93[_0x159132(0x41f)](this['_positions'][_0x2de51d]),_0x1395df=_0x5e5f93[_0x159132(0x41f)](this[_0x159132(0x387)][_0x30668d]);for(let _0x11e47d=0x0;_0x11e47d<_0xd9f84f;_0x11e47d++){let _0x29fc33=_0x34d1e5['Cesium'][_0x159132(0x72b)][_0x159132(0x538)](_0x2a14ac['longitude'],_0x1395df[_0x159132(0xc9)],_0x11e47d/_0xd9f84f),_0x15f1bd=_0x34d1e5[_0x159132(0x7aa)]['Math'][_0x159132(0x538)](_0x2a14ac['latitude'],_0x1395df[_0x159132(0xa6e)],_0x11e47d/_0xd9f84f);_0x90f1a4[_0x159132(0xb3)](new _0x34d1e5[(_0x159132(0x7aa))][(_0x159132(0x4f1))](_0x29fc33,_0x15f1bd));}}_0x34d1e5[_0x159132(0x7aa)][_0x159132(0x796)](this[_0x159132(0x3f7)]['terrainProvider'],_0x90f1a4)['then'](_0x18e09d=>{const _0x51d021=_0x159132;this[_0x51d021(0x5f2)](_0x18e09d[_0x51d021(0x127)](_0x39b57d=>_0x34d1e5[_0x51d021(0x7aa)]['Cartesian3']['fromRadians'](_0x39b57d[_0x51d021(0xc9)],_0x39b57d[_0x51d021(0xa6e)])),_0x18e09d[_0x51d021(0x127)](_0x2e1b8a=>_0x2e1b8a[_0x51d021(0x795)]));});}else this['_createSideWall'](this[_0x159132(0x387)][_0x159132(0x127)](_0x16ee43=>_0x5e5f93[_0x159132(0x432)](_0x16ee43)),this['_positions'][_0x159132(0x127)](_0x1e31cd=>_0x1e31cd[_0x159132(0xa84)]));}}[_0x43bf95(0x4eb)](){const _0x4b3c32=_0x43bf95;this[_0x4b3c32(0x761)][_0x4b3c32(0x207)](),this[_0x4b3c32(0x15c)]['removeAll'](),this[_0x4b3c32(0x62c)]()[_0x4b3c32(0x2de)](_0x28dd73=>{const _0x3e3f29=_0x4b3c32;this[_0x3e3f29(0x15c)]['add'](_0x28dd73);}),this['_drawPrimitive']();}[_0x43bf95(0x769)](){const _0x51723b=_0x43bf95;let _0x4b4713=this[_0x51723b(0x387)][0x0][_0x51723b(0xa84)];return this[_0x51723b(0x387)][_0x51723b(0x2de)](_0x50dcba=>{const _0x18830a=_0x51723b;_0x4b4713=Math[_0x18830a(0x66a)](_0x4b4713,_0x50dcba[_0x18830a(0xa84)]);}),_0x4b4713-this[_0x51723b(0x17e)];}[_0x43bf95(0x10b)](){const _0x41512f=_0x43bf95;let _0x2f4641=this[_0x41512f(0x769)](),_0x270ea1=this[_0x41512f(0x387)][_0x41512f(0x127)](_0x175319=>({'lng':_0x175319[_0x41512f(0x598)],'lat':_0x175319[_0x41512f(0x941)],'alt':_0x2f4641})),_0x24ab00=new _0x34d1e5['Cesium'][(_0x41512f(0x829))]({'polygonHierarchy':new _0x34d1e5[(_0x41512f(0x7aa))]['PolygonHierarchy'](_0x5e5f93['transformWGS84ArrayToCartesianArray'](_0x270ea1)),'perPositionHeight':!0x0}),_0x2dd2f3=_0x34d1e5[_0x41512f(0x7aa)]['PolygonGeometry'][_0x41512f(0x1a4)](_0x24ab00);this[_0x41512f(0x761)]['add'](new _0x34d1e5[(_0x41512f(0x7aa))][(_0x41512f(0x508))]({'geometryInstances':new _0x34d1e5[(_0x41512f(0x7aa))][(_0x41512f(0x456))]({'geometry':_0x2dd2f3}),'appearance':new _0x34d1e5[(_0x41512f(0x7aa))][(_0x41512f(0x4a2))]({'material':_0x34d1e5['Cesium'][_0x41512f(0x4da)][_0x41512f(0xa40)](_0x34d1e5['Cesium'][_0x41512f(0x4da)]['ImageType'],{'image':this[_0x41512f(0x674)][_0x41512f(0x78b)],'repeat':new _0x34d1e5['Cesium'][(_0x41512f(0x48e))](0x5,0x5)})}),'asynchronous':!0x1}));}['_createSideWall'](_0x57a4f3,_0x2617de){const _0xb50e7e=_0x43bf95;let _0x2fb829=this[_0xb50e7e(0x769)](),_0x1c75d1=_0x57a4f3['map'](()=>_0x2fb829),_0x594d5f=new _0x34d1e5[(_0xb50e7e(0x7aa))][(_0xb50e7e(0x319))]({'positions':_0x57a4f3[_0xb50e7e(0x64c)](_0x57a4f3[0x0]),'maximumHeights':_0x1c75d1[_0xb50e7e(0x64c)](_0x1c75d1[0x0]),'minimumHeights':_0x2617de[_0xb50e7e(0x64c)](_0x2617de[0x0])}),_0x1c1141=_0x34d1e5['Cesium'][_0xb50e7e(0x319)]['createGeometry'](_0x594d5f);this[_0xb50e7e(0x761)][_0xb50e7e(0x45f)](new _0x34d1e5['Cesium'][(_0xb50e7e(0x508))]({'geometryInstances':new _0x34d1e5[(_0xb50e7e(0x7aa))]['GeometryInstance']({'geometry':_0x1c1141}),'appearance':new _0x34d1e5['Cesium']['MaterialAppearance']({'material':_0x34d1e5[_0xb50e7e(0x7aa)][_0xb50e7e(0x4da)][_0xb50e7e(0xa40)](_0x34d1e5['Cesium'][_0xb50e7e(0x4da)][_0xb50e7e(0x5ff)],{'image':this[_0xb50e7e(0x674)][_0xb50e7e(0x165)],'repeat':new _0x34d1e5[(_0xb50e7e(0x7aa))][(_0xb50e7e(0x48e))](0x5,0x5)})}),'asynchronous':!0x1}));}},_0x11153e=_0x21e41d,_0x2ba333=class extends _0x4b1bc7{constructor(_0xb63826,_0x5a3fb0={}){const _0x364460=_0x43bf95;super(_0x5a3fb0),this[_0x364460(0x6dd)]=_0xb63826;}[_0x43bf95(0x4eb)](){const _0x56284a=_0x43bf95;this[_0x56284a(0x15c)][_0x56284a(0x207)](),this['_tileset'][_0x56284a(0x6ad)][_0x56284a(0x379)](_0x581474=>{const _0xee2e46=_0x56284a;let _0x400964=_0x581474[_0xee2e46(0x6a0)][_0xee2e46(0x203)],_0x3e70df=this[_0xee2e46(0x49c)](_0x400964);this[_0xee2e46(0x15c)][_0xee2e46(0xa0c)]=_0x400964,_0x3e70df[_0xee2e46(0x2de)](_0x543a62=>{const _0x1ee93b=_0xee2e46;this['_planeCollection'][_0x1ee93b(0x45f)](_0x543a62);}),_0x581474[_0xee2e46(0x6d0)]=this[_0xee2e46(0x15c)];});}[_0x43bf95(0x7e2)](){}},_0x485bc0=_0x2ba333,_0x2fb9ab={'CONTOUR_LINE':_0x43bf95(0x33b),'SHADOWS':_0x43bf95(0x4e2),'SIGHT_CIRCLE':_0x43bf95(0x489),'SIGHT_LINE':'SightLine','VIEWSHED':_0x43bf95(0x254)},_0x140f34=_0x2fb9ab,_0x3b813e=class{constructor(_0x4965e9){const _0x5aa674=_0x43bf95;this[_0x5aa674(0x3f7)]=_0x4965e9,this[_0x5aa674(0x716)]=_0x34d1e5[_0x5aa674(0x7aa)][_0x5aa674(0x4da)]['fromType'](_0x34d1e5['Cesium'][_0x5aa674(0x4da)][_0x5aa674(0x804)],{'color':_0x34d1e5[_0x5aa674(0x7aa)][_0x5aa674(0x7d2)]['YELLOW']});}[_0x43bf95(0x9ba)](_0x1e4b8f,_0x24de25,_0x45c0c0){const _0x57c36b=_0x43bf95;return _0x1e4b8f&&(this['_material'][_0x57c36b(0x2eb)][_0x57c36b(0x124)]=_0x1e4b8f),_0x24de25&&(this[_0x57c36b(0x716)][_0x57c36b(0x2eb)][_0x57c36b(0x371)]=_0x24de25),_0x45c0c0&&(this[_0x57c36b(0x716)][_0x57c36b(0x2eb)]['spacing']=_0x45c0c0),this[_0x57c36b(0x3f7)][_0x57c36b(0x148)][_0x57c36b(0x7fd)]['material']=this[_0x57c36b(0x716)],this;}[_0x43bf95(0x86d)](){const _0x488ebd=_0x43bf95;return this[_0x488ebd(0x3f7)][_0x488ebd(0x148)]['globe'][_0x488ebd(0x22e)]=void 0x0,this;}},_0x10a8ed=_0x3b813e,_0x2b19f6=class{constructor(_0x135097){const _0x5219e8=_0x43bf95;this[_0x5219e8(0x3f7)]=_0x135097,this['_shadowsState']=this[_0x5219e8(0x3f7)][_0x5219e8(0x8ca)][_0x5219e8(0x3b6)];}[_0x43bf95(0x9ba)](_0x4fd4ef,_0x4d2279=0x640){const _0x1f69ac=_0x43bf95;return this[_0x1f69ac(0x3f7)][_0x1f69ac(0x8ca)][_0x1f69ac(0x3b6)]=!0x0,this[_0x1f69ac(0x3f7)][_0x1f69ac(0xaad)]['currentTime']=_0x34d1e5[_0x1f69ac(0x7aa)][_0x1f69ac(0xc3)][_0x1f69ac(0x79d)](_0x4fd4ef),this[_0x1f69ac(0x3f7)][_0x1f69ac(0xaad)]['multiplier']=_0x4d2279,this;}[_0x43bf95(0x86d)](){const _0x4e22fa=_0x43bf95;return this[_0x4e22fa(0x3f7)][_0x4e22fa(0x8ca)][_0x4e22fa(0x3b6)]=this[_0x4e22fa(0x4bc)],this[_0x4e22fa(0x3f7)][_0x4e22fa(0xaad)][_0x4e22fa(0x229)]=_0x34d1e5[_0x4e22fa(0x7aa)][_0x4e22fa(0xc3)][_0x4e22fa(0xaa6)](),this['_viewer'][_0x4e22fa(0xaad)][_0x4e22fa(0x304)]=0x1,this;}},_0x2404ae=_0x2b19f6,_0xdc563e=class{constructor(_0x1995f2){const _0xeb9e08=_0x43bf95;this[_0xeb9e08(0x3f7)]=_0x1995f2,this[_0xeb9e08(0xaa1)]=new _0x34d1e5[(_0xeb9e08(0x7aa))]['PrimitiveCollection'](),this[_0xeb9e08(0x3f7)][_0xeb9e08(0x148)][_0xeb9e08(0x2d5)][_0xeb9e08(0x45f)](this[_0xeb9e08(0xaa1)]);}['_lerp'](_0x39a9c3,_0x4dc192,_0x28cbf7=0x64){const _0x89d87a=_0x43bf95;let _0x28c364=[];for(let _0x123b1d=0x0;_0x123b1d<_0x28cbf7;_0x123b1d++){let _0x424ebd=_0x34d1e5[_0x89d87a(0x7aa)][_0x89d87a(0x72b)][_0x89d87a(0x538)](_0x39a9c3[_0x89d87a(0x598)],_0x4dc192['lng'],_0x123b1d/_0x28cbf7),_0x47578f=_0x34d1e5[_0x89d87a(0x7aa)][_0x89d87a(0x72b)]['lerp'](_0x39a9c3[_0x89d87a(0x941)],_0x4dc192[_0x89d87a(0x941)],_0x123b1d/_0x28cbf7),_0x41dea5=_0x39a9c3[_0x89d87a(0xa84)]-(_0x39a9c3['alt']-_0x4dc192[_0x89d87a(0xa84)])*(_0x123b1d/_0x28cbf7);_0x28c364['push']({'lng':_0x424ebd,'lat':_0x47578f,'alt':_0x41dea5});}return _0x28c364;}[_0x43bf95(0x249)](_0x574687,_0x1486bd){const _0x4cd897=_0x43bf95;let _0x172fc6=new _0x34d1e5[(_0x4cd897(0x7aa))][(_0x4cd897(0x8b9))]({'positions':_0x574687,'width':0x3,'vertexFormat':_0x34d1e5[_0x4cd897(0x7aa)][_0x4cd897(0x646)][_0x4cd897(0xa53)],'arcType':_0x34d1e5[_0x4cd897(0x7aa)][_0x4cd897(0xc1)][_0x4cd897(0x60e)]}),_0x634ab2=_0x1486bd[_0x4cd897(0x8e4)](0.6),_0x356875=new _0x34d1e5[(_0x4cd897(0x7aa))]['PolylineColorAppearance']({'translucent':_0x1486bd['alpha']!==0x1}),_0x4afe33=new _0x34d1e5[(_0x4cd897(0x7aa))][(_0x4cd897(0x47f))]({'translucent':_0x634ab2[_0x4cd897(0x429)]!==0x1});return new _0x34d1e5[(_0x4cd897(0x7aa))][(_0x4cd897(0x508))]({'geometryInstances':new _0x34d1e5[(_0x4cd897(0x7aa))][(_0x4cd897(0x456))]({'geometry':_0x172fc6,'attributes':{'color':_0x34d1e5[_0x4cd897(0x7aa)]['ColorGeometryInstanceAttribute'][_0x4cd897(0x817)](_0x1486bd),'depthFailColor':_0x34d1e5[_0x4cd897(0x7aa)][_0x4cd897(0x606)]['fromColor'](_0x634ab2)}}),'appearance':_0x356875,'depthFailAppearance':_0x4afe33,'asynchronous':!0x0});}[_0x43bf95(0x9ba)](_0xdce011,_0x3a3ccb,_0x321788,_0x36766b){const _0x521a53=_0x43bf95;_0xdce011=_0x16f48b[_0x521a53(0x81a)](_0xdce011),_0x3a3ccb=_0x16f48b['parsePosition'](_0x3a3ccb);let _0x4c587f=this[_0x521a53(0x3af)](_0xdce011,_0x3a3ccb,_0x36766b),_0x3501d5=_0x4c587f[_0x521a53(0x127)](_0x169da3=>_0x5e5f93[_0x521a53(0x41f)](_0x169da3)),_0x3ff887=_0x4c587f[_0x521a53(0x127)](_0x428c34=>_0x5e5f93[_0x521a53(0x432)](_0x428c34)),_0x16a4a2=this[_0x521a53(0x3f7)][_0x521a53(0x4ed)]&&!(this[_0x521a53(0x3f7)]['terrainProvider']instanceof _0x34d1e5[_0x521a53(0x7aa)][_0x521a53(0x940)])?_0x34d1e5[_0x521a53(0x7aa)]['sampleTerrainMostDetailed'](this['_viewer']['terrainProvider'],_0x3501d5):Promise[_0x521a53(0x509)]([]),_0xe3f1b=this[_0x521a53(0x3f7)][_0x521a53(0x148)][_0x521a53(0x774)]?this[_0x521a53(0x3f7)]['scene']['clampToHeightMostDetailed'](_0x3ff887,_0x321788):Promise['resolve']([]);return Promise[_0x521a53(0xa54)]([_0x16a4a2,_0xe3f1b])[_0x521a53(0x379)](([_0x20138b,_0xeb237b])=>{const _0x1c5cee=_0x521a53;let _0x1f9b8c=[],_0xa10449=0x0;return _0x20138b[_0x1c5cee(0x2de)]((_0x45acfd,_0x5cd166)=>{const _0x258094=_0x1c5cee;let _0x20410f=Math[_0x258094(0x2c3)](_0x45acfd[_0x258094(0x795)]||0x0,_0xeb237b[_0x5cd166]?_0x34d1e5['Cesium']['Cartographic'][_0x258094(0x17a)](_0xeb237b[_0x5cd166])[_0x258094(0x795)]:0x0);(_0x4c587f[_0x5cd166][_0x258094(0xa84)]<_0x20410f&&_0xa10449===0x0||_0xa10449>=0x1&&(_0x4c587f[_0x5cd166]['alt']>_0x20410f&&_0xa10449%0x2!==0x0||_0x4c587f[_0x5cd166]['alt']<_0x20410f&&_0xa10449%0x2===0x0))&&(_0x1f9b8c[_0x258094(0xb3)](_0x4c587f[_0x5cd166]),_0xa10449++);}),_0x1f9b8c;})[_0x521a53(0x379)](_0x49c309=>{const _0xe8b165=_0x521a53;_0x49c309['length']?(this[_0xe8b165(0xaa1)]['add'](this['_createLine']([_0x5e5f93[_0xe8b165(0x432)](_0xdce011),_0x5e5f93['transformWGS84ToCartesian'](_0x49c309[0x0])],_0x34d1e5[_0xe8b165(0x7aa)]['Color']['GREEN'])),_0x49c309[_0xe8b165(0x2de)]((_0x7bb850,_0x5b15cb)=>{const _0x364f6d=_0xe8b165;let _0x501a72=_0x49c309[_0x5b15cb+0x1];_0x501a72=_0x501a72?_0x5e5f93[_0x364f6d(0x432)](_0x501a72):_0x5e5f93['transformWGS84ToCartesian'](_0x3a3ccb),this[_0x364f6d(0xaa1)][_0x364f6d(0x45f)](this[_0x364f6d(0x249)]([_0x5e5f93['transformWGS84ToCartesian'](_0x7bb850),_0x501a72],_0x5b15cb%0x2===0x0?_0x34d1e5['Cesium']['Color'][_0x364f6d(0x80b)]:_0x34d1e5['Cesium'][_0x364f6d(0x7d2)][_0x364f6d(0x61f)]));})):this[_0xe8b165(0xaa1)][_0xe8b165(0x45f)](this[_0xe8b165(0x249)]([_0x5e5f93[_0xe8b165(0x432)](_0xdce011),_0x5e5f93[_0xe8b165(0x432)](_0x3a3ccb)],_0x34d1e5['Cesium'][_0xe8b165(0x7d2)]['GREEN']));}),this;}[_0x43bf95(0x86d)](){const _0xb197a8=_0x43bf95;return this[_0xb197a8(0xaa1)]['removeAll'](),this;}},_0x5069a9=_0xdc563e,_0x57d4b3=_0x43bf95(0x7fa),_0x5da6cd={'visibleColor':new _0x34d1e5['Cesium'][(_0x43bf95(0x7d2))](0x0,0x1,0x0,0x1),'disVisibleColor':new _0x34d1e5[(_0x43bf95(0x7aa))][(_0x43bf95(0x7d2))](0x1,0x0,0x0,0x1),'showHelp':!0x1,'mixNum':0x1,'gridColor':_0x34d1e5[_0x43bf95(0x7aa)]['Color'][_0x43bf95(0x801)],'lineColor':_0x34d1e5['Cesium'][_0x43bf95(0x7d2)][_0x43bf95(0x801)][_0x43bf95(0x8e4)](0.3)},_0x15236a=class{constructor(_0x551857){const _0x39f50f=_0x43bf95;this['_viewer']=_0x551857,this[_0x39f50f(0x8bb)]=void 0x0,this[_0x39f50f(0x6a7)]=void 0x0,this['_viewShadowMap']=void 0x0,this['_delegate']=void 0x0,this[_0x39f50f(0x674)]={},this[_0x39f50f(0x747)]=void 0x0,this[_0x39f50f(0x3b0)]=void 0x0,this[_0x39f50f(0x3f7)][_0x39f50f(0x148)][_0x39f50f(0x2d5)][_0x39f50f(0x45f)](this);}[_0x43bf95(0x395)](_0x42532a){const _0x47eec4=_0x43bf95;let _0x135c88=_0x5e5f93[_0x47eec4(0x432)](_0x42532a),_0x17a78d=_0x1ea9e9[_0x47eec4(0x730)](_0x42532a,this[_0x47eec4(0x8bb)][_0x47eec4(0x7ed)]);this[_0x47eec4(0x3f7)]&&(this['_camera']||(this['_camera']=new _0x34d1e5['Cesium'][(_0x47eec4(0x673))](this[_0x47eec4(0x3f7)]['scene'])),this['_camera'][_0x47eec4(0x7b3)]=this[_0x47eec4(0x8bb)],_0x1ea9e9[_0x47eec4(0xa1e)](this[_0x47eec4(0x6a7)],_0x135c88,_0x17a78d,_0x42532a[_0x47eec4(0x193)]));}[_0x43bf95(0x847)](_0x3f2971){const _0x555854=_0x43bf95;this[_0x555854(0x3f7)][_0x555854(0x148)][_0x555854(0x2d5)][_0x555854(0x109)](this[_0x555854(0x3b0)]),this[_0x555854(0x3f7)][_0x555854(0x148)][_0x555854(0x2d5)][_0x555854(0x109)](this[_0x555854(0x747)]);let _0x5af238=_0x34d1e5['Cesium'][_0x555854(0x7a6)][_0x555854(0x228)](_0x5e5f93[_0x555854(0x432)](_0x3f2971),new _0x34d1e5['Cesium']['HeadingPitchRoll']((-Math['PI']+this[_0x555854(0x8bb)][_0x555854(0x7ae)])/0x2+_0x34d1e5[_0x555854(0x7aa)][_0x555854(0x72b)][_0x555854(0x2b0)](_0x3f2971[_0x555854(0x77c)]),_0x34d1e5[_0x555854(0x7aa)][_0x555854(0x72b)][_0x555854(0x2b0)](_0x3f2971[_0x555854(0x442)]),_0x34d1e5[_0x555854(0x7aa)][_0x555854(0x72b)][_0x555854(0x2b0)](_0x3f2971[_0x555854(0x193)]))),_0x2360d0=new _0x34d1e5[(_0x555854(0x7aa))][(_0x555854(0x982))](this[_0x555854(0x8bb)][_0x555854(0x7ed)],this['_frustum'][_0x555854(0x7ed)],this['_frustum'][_0x555854(0x7ed)]),_0x562722=new _0x34d1e5['Cesium'][(_0x555854(0x8eb))]({'radii':_0x2360d0,'innerRadii':_0x34d1e5[_0x555854(0x7aa)][_0x555854(0x982)]['divideByScalar'](_0x2360d0,0x14,new _0x34d1e5['Cesium'][(_0x555854(0x982))]()),'minimumClock':0x0,'maximumClock':this[_0x555854(0x8bb)][_0x555854(0x7ae)],'minimumCone':(Math['PI']-this[_0x555854(0x8bb)][_0x555854(0x921)])/0x2,'maximumCone':_0x34d1e5[_0x555854(0x7aa)][_0x555854(0x72b)]['toRadians'](0x6e)});this[_0x555854(0x747)]=this[_0x555854(0x3f7)][_0x555854(0x148)][_0x555854(0x2d5)][_0x555854(0x45f)](new _0x34d1e5[(_0x555854(0x7aa))][(_0x555854(0x508))]({'geometryInstances':new _0x34d1e5[(_0x555854(0x7aa))][(_0x555854(0x456))]({'geometry':_0x562722,'attributes':{'color':_0x34d1e5[_0x555854(0x7aa)][_0x555854(0x606)][_0x555854(0x817)](this[_0x555854(0x674)]['lineColor'])}}),'appearance':new _0x34d1e5[(_0x555854(0x7aa))][(_0x555854(0x20d))]({'flat':!0x0,'renderState':{'lineWidth':Math[_0x555854(0x66a)](0x2,this[_0x555854(0x3f7)]['scene'][_0x555854(0x236)])}}),'modelMatrix':_0x5af238})),_0x562722=new _0x34d1e5[(_0x555854(0x7aa))][(_0x555854(0x485))]({'radii':_0x2360d0,'minimumClock':0x0,'maximumClock':this[_0x555854(0x8bb)][_0x555854(0x7ae)],'minimumCone':(Math['PI']-this[_0x555854(0x8bb)][_0x555854(0x921)])/0x2,'maximumCone':_0x34d1e5[_0x555854(0x7aa)][_0x555854(0x72b)][_0x555854(0x2b0)](0x6e)}),this[_0x555854(0x3b0)]=this[_0x555854(0x3f7)][_0x555854(0x148)][_0x555854(0x2d5)][_0x555854(0x45f)](new _0x34d1e5[(_0x555854(0x7aa))][(_0x555854(0x508))]({'geometryInstances':new _0x34d1e5['Cesium'][(_0x555854(0x456))]({'geometry':_0x562722}),'appearance':new _0x34d1e5['Cesium'][(_0x555854(0x4a2))]({'translucent':!0x1,'material':_0x34d1e5[_0x555854(0x7aa)][_0x555854(0x4da)][_0x555854(0xa40)](_0x34d1e5[_0x555854(0x7aa)][_0x555854(0x4da)]['GridType'],{'color':this[_0x555854(0x674)][_0x555854(0x73b)],'lineCount':new _0x34d1e5[(_0x555854(0x7aa))][(_0x555854(0x48e))](0xc8,0xc8)})}),'modelMatrix':_0x5af238}));}[_0x43bf95(0x4cb)](){const _0x2125c2=_0x43bf95;return new _0x34d1e5[(_0x2125c2(0x7aa))][(_0x2125c2(0x14f))]({'fragmentShader':_0x57d4b3,'uniforms':{'czzj':()=>_0x34d1e5[_0x2125c2(0x7aa)][_0x2125c2(0x72b)]['toDegrees'](this[_0x2125c2(0x8bb)][_0x2125c2(0x921)]),'dis':()=>this[_0x2125c2(0x8bb)][_0x2125c2(0x7ed)],'spzj':()=>_0x34d1e5[_0x2125c2(0x7aa)][_0x2125c2(0x72b)][_0x2125c2(0x438)](this[_0x2125c2(0x8bb)][_0x2125c2(0x7ae)]),'visibleColor':()=>this['_options'][_0x2125c2(0x35d)],'disVisibleColor':()=>this[_0x2125c2(0x674)][_0x2125c2(0x818)],'mixNum':()=>this[_0x2125c2(0x674)][_0x2125c2(0x2f5)],'stcshadow':()=>this['_viewShadowMap'][_0x2125c2(0x4f5)],'_shadowMap_matrix':()=>this[_0x2125c2(0xa73)][_0x2125c2(0x7fe)],'shadowMap_lightPositionEC':()=>this[_0x2125c2(0xa73)]['_lightPositionEC'],'shadowMap_lightDirectionEC':()=>this[_0x2125c2(0xa73)][_0x2125c2(0x4b2)],'shadowMap_lightUp':()=>this['_viewShadowMap'][_0x2125c2(0x344)]['up'],'shadowMap_lightDir':()=>this[_0x2125c2(0xa73)][_0x2125c2(0x344)][_0x2125c2(0x4ae)],'shadowMap_lightRight':()=>this[_0x2125c2(0xa73)][_0x2125c2(0x344)][_0x2125c2(0x828)],'shadowMap_texelSizeDepthBiasAndNormalShadingSmooth':()=>{const _0x762dd6=_0x2125c2;let _0x56d621=this[_0x762dd6(0xa73)][_0x762dd6(0x311)]?this[_0x762dd6(0xa73)]['_pointBias']:this[_0x762dd6(0xa73)][_0x762dd6(0x905)];return _0x34d1e5['Cesium']['Cartesian4'][_0x762dd6(0x597)](0x1/this[_0x762dd6(0xa73)][_0x762dd6(0x105)]['x'],0x1/this[_0x762dd6(0xa73)][_0x762dd6(0x105)]['y'],_0x56d621[_0x762dd6(0xa6c)],_0x56d621[_0x762dd6(0x577)],new _0x34d1e5[(_0x762dd6(0x7aa))][(_0x762dd6(0x849))]());},'shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness':()=>{const _0x4db79c=_0x2125c2;let _0x73072b=this['_viewShadowMap'][_0x4db79c(0x311)]?this[_0x4db79c(0xa73)][_0x4db79c(0x871)]:this['_viewShadowMap'][_0x4db79c(0x905)];return _0x34d1e5['Cesium'][_0x4db79c(0x849)]['fromElements'](_0x73072b[_0x4db79c(0xec)],this[_0x4db79c(0xa73)][_0x4db79c(0x2e0)],this[_0x4db79c(0xa73)][_0x4db79c(0x35f)],this[_0x4db79c(0xa73)][_0x4db79c(0xff)],new _0x34d1e5[(_0x4db79c(0x7aa))]['Cartesian4']());}}});}[_0x43bf95(0x96f)](){const _0x5c790f=_0x43bf95;this[_0x5c790f(0xa73)]&&this[_0x5c790f(0x3f7)][_0x5c790f(0x148)][_0x5c790f(0x86f)][_0x5c790f(0x70b)][_0x5c790f(0xb3)](this[_0x5c790f(0xa73)]);}[_0x43bf95(0x9ba)](_0x7a6693,_0x1492fd,_0x1080a9,_0x210def,_0x4a8eaf={}){const _0x87497f=_0x43bf95;return this['_options']={..._0x5da6cd,..._0x4a8eaf},this[_0x87497f(0x8bb)]=new _0x34d1e5[(_0x87497f(0x7aa))][(_0x87497f(0x99f))]({'fov':_0x34d1e5[_0x87497f(0x7aa)][_0x87497f(0x72b)][_0x87497f(0x2b0)](_0x1080a9),'aspectRatio':_0x210def,'far':_0x1492fd,'near':0.05}),_0x7a6693=_0x16f48b['parsePosition'](_0x7a6693),this[_0x87497f(0x395)](_0x7a6693),this[_0x87497f(0xa73)]=new _0x34d1e5[(_0x87497f(0x7aa))][(_0x87497f(0x550))]({'lightCamera':this[_0x87497f(0x6a7)],'enable':!0x1,'isPointLight':!0x1,'isSpotLight':!0x0,'cascadesEnabled':!0x1,'context':this['_viewer'][_0x87497f(0x148)][_0x87497f(0x970)],'pointLightRadius':this[_0x87497f(0x8bb)]['far'],'darkness':0x1}),this[_0x87497f(0xaa1)]||(this[_0x87497f(0xaa1)]=this[_0x87497f(0x4cb)](),this['_viewer'][_0x87497f(0x148)][_0x87497f(0x744)][_0x87497f(0x45f)](this[_0x87497f(0xaa1)]),this[_0x87497f(0xaa1)][_0x87497f(0x776)]=!0x0),this[_0x87497f(0x674)][_0x87497f(0x903)]?this[_0x87497f(0x847)](_0x7a6693):(this[_0x87497f(0x3b0)]&&this[_0x87497f(0x3f7)][_0x87497f(0x148)][_0x87497f(0x2d5)][_0x87497f(0x109)](this[_0x87497f(0x3b0)]),this['_linePrimitive']&&this['_viewer'][_0x87497f(0x148)][_0x87497f(0x2d5)]['remove'](this['_linePrimitive']),this[_0x87497f(0x3b0)]=void 0x0,this[_0x87497f(0x747)]=void 0x0),this;}[_0x43bf95(0x4aa)](){return!0x1;}[_0x43bf95(0x86d)](){const _0x58152c=_0x43bf95;return this[_0x58152c(0xaa1)]&&this[_0x58152c(0x3f7)]['scene'][_0x58152c(0x744)][_0x58152c(0x109)](this[_0x58152c(0xaa1)]),this[_0x58152c(0x3b0)]&&this[_0x58152c(0x3f7)][_0x58152c(0x148)][_0x58152c(0x2d5)][_0x58152c(0x109)](this[_0x58152c(0x3b0)]),this['_linePrimitive']&&this['_viewer'][_0x58152c(0x148)][_0x58152c(0x2d5)][_0x58152c(0x109)](this[_0x58152c(0x747)]),this['_delegate']=void 0x0,this['_ellipsoidPrimitive']=void 0x0,this[_0x58152c(0x747)]=void 0x0,this[_0x58152c(0xa73)]=void 0x0,this[_0x58152c(0x8bb)]=void 0x0,this;}},_0x1faa6f=_0x15236a,_0x226386=class{constructor(_0x5429d9){const _0x394130=_0x43bf95;this[_0x394130(0x499)]=new _0x10a8ed(_0x5429d9),this[_0x394130(0x338)]=new _0x2404ae(_0x5429d9),this[_0x394130(0x201)]=new _0x5069a9(_0x5429d9),this['_viewshed']=new _0x1faa6f(_0x5429d9);}[_0x43bf95(0x454)](_0xf48000,_0x491ac2,_0x2a96b3){const _0x545ea6=_0x43bf95;return this[_0x545ea6(0x499)][_0x545ea6(0x9ba)](_0xf48000,_0x491ac2,_0x2a96b3),this;}[_0x43bf95(0x3b6)](_0x312e89,_0x59871c){const _0x3d56ec=_0x43bf95;return this[_0x3d56ec(0x338)][_0x3d56ec(0x9ba)](_0x312e89||new Date(),_0x59871c||0x640),this;}[_0x43bf95(0x44a)](_0x198f99,_0x2b3cea,_0x9107ee=[],_0x474115=0xa){const _0x1908c3=_0x43bf95;return!_0x198f99||!_0x2b3cea?this:(this[_0x1908c3(0x201)][_0x1908c3(0x9ba)](_0x198f99,_0x2b3cea,_0x9107ee[_0x1908c3(0x127)](_0xbac75c=>_0xbac75c['delegate']||_0xbac75c),_0x474115),this);}[_0x43bf95(0x6b0)](_0x449f21,_0x34f56d,_0x2a8fe4,_0x458cf1=0xa){const _0x4b84e0=_0x43bf95;if(!_0x449f21||!_0x34f56d)return this;let _0x2ac238=_0x34d1e5['Cesium'][_0x4b84e0(0x8d4)]['computeEllipsePositions']({'center':_0x5e5f93[_0x4b84e0(0x432)](_0x449f21),'semiMajorAxis':+_0x34f56d,'semiMinorAxis':+_0x34f56d,'rotation':0x0,'granularity':0.03},!0x1,!0x0);return _0x34d1e5[_0x4b84e0(0x7aa)][_0x4b84e0(0x982)][_0x4b84e0(0x877)](_0x2ac238[_0x4b84e0(0x8e1)])['forEach'](_0x59a4ab=>{const _0x688bb5=_0x4b84e0;this['sightLine'](_0x449f21,_0x5e5f93[_0x688bb5(0x30b)](_0x59a4ab),_0x2a8fe4||[],_0x458cf1);}),this;}[_0x43bf95(0x7d5)](_0x97ae10,_0x584c6b,_0x35c116,_0x153f9c=1.3,_0x5648c5={}){const _0x474b47=_0x43bf95;return!_0x97ae10||!_0x584c6b||!_0x35c116?this:(this[_0x474b47(0x5ce)]['start'](_0x97ae10,_0x584c6b,_0x35c116,_0x153f9c,_0x5648c5),this);}[_0x43bf95(0x96a)](_0x27814b){const _0x210373=_0x43bf95;switch(_0x27814b){case _0x140f34[_0x210373(0x75f)]:this['_contourLine'][_0x210373(0x86d)]();break;case _0x140f34['SHADOWS']:this['_shadows'][_0x210373(0x86d)]();break;case _0x140f34['SIGHT_CIRCLE']:case _0x140f34[_0x210373(0x8b7)]:this['_sightLine'][_0x210373(0x86d)]();break;case _0x140f34['VIEWSHED']:this[_0x210373(0x5ce)][_0x210373(0x86d)]();break;default:this[_0x210373(0x499)][_0x210373(0x86d)](),this[_0x210373(0x338)][_0x210373(0x86d)](),this[_0x210373(0x201)][_0x210373(0x86d)](),this[_0x210373(0x5ce)][_0x210373(0x86d)]();break;}return this;}},_0x16dcf1=_0x226386,_0x1ae9e2=_0x34d1e5[_0x43bf95(0x7aa)]['Cartesian2'],_0x427355=_0x34d1e5['Cesium'][_0x43bf95(0x982)],_0x4ff012=_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x72d)],_0x4f2af2=_0x34d1e5[_0x43bf95(0x7aa)]['Matrix4'],_0x2f22a4=_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x4da)],_0x2f0b0a=_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0xba)],_0x1e2554=_0x34d1e5['Cesium'][_0x43bf95(0x116)],_0x530035=_0x34d1e5['Cesium']['Color'],_0xb39b2=_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x6e7)],_0x37eb6e=_0x34d1e5[_0x43bf95(0x7aa)]['ShadowMode'],_0x1cedf9=_0x34d1e5[_0x43bf95(0x7aa)]['JulianDate'],_0x36bb50=_0x34d1e5[_0x43bf95(0x7aa)]['HeightReference'],_0x520f06=_0x34d1e5['Cesium'][_0x43bf95(0x351)],_0x4bd78b=_0x34d1e5[_0x43bf95(0x7aa)]['VerticalOrigin'],_0x23a193=_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x18c)],_0x5d26ca=_0x34d1e5[_0x43bf95(0x7aa)]['ClassificationType'],_0x4457a5=_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x1b8)],_0x188c9e=_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x2ba)],_0x17a670=_0x34d1e5['Cesium'][_0x43bf95(0x181)],_0x12d142=_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0xa89)],_0x41e9b5=_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0xa8c)],_0x88bc9=_0x34d1e5[_0x43bf95(0x7aa)]['PolylineDashMaterialProperty'],_0x4ebbbc=_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x99d)],_0xc51353=_0x34d1e5['Cesium'][_0x43bf95(0xa38)],_0x16b1c0=_0x34d1e5['Cesium'][_0x43bf95(0x226)],_0x1d7c24=_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3da)],_0x3ad815=_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0xa1)],_0x21b29f=_0x34d1e5[_0x43bf95(0x7aa)]['CustomShaderTranslucencyMode'],_0xe8a9cd=_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3b9)],_0x723cd1=_0x34d1e5['Cesium'][_0x43bf95(0x293)],_0x4dd5ef=_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x7a1)],_0x253ec3=_0x34d1e5['Cesium'][_0x43bf95(0x30d)],_0x2b07ac=_0x34d1e5['Cesium'][_0x43bf95(0x185)],_0x42fdc5=_0x34d1e5['Cesium'][_0x43bf95(0x58b)],_0x3e29eb=_0x34d1e5[_0x43bf95(0x7aa)]['ModelAnimationLoop'],_0x2253ba=_0x34d1e5['Cesium']['ClippingPlane'],_0x18529e=_0x34d1e5[_0x43bf95(0x7aa)]['ClippingPlaneCollection'],_0x467bce=_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0xa91)],_0x17f9c1=_0x34d1e5[_0x43bf95(0x7aa)][_0x43bf95(0x3cb)],_0x596303=_0x43bf95(0x7b2),_0x1dd1cf=_0x596303,_0x31b9b4='',_0x22c998='',_0x5379fc=[],_0x471942=!0x1,_0x427ca0={set 'baseUrl'(_0x3449ec){_0x1dd1cf=_0x3449ec;},get 'baseUrl'(){return _0x1dd1cf;},set 'accessToken'(_0x5ce057){_0x31b9b4=_0x5ce057;},get 'accessToken'(){return _0x31b9b4;},set 'logoImage'(_0x47c33c){_0x22c998=_0x47c33c;},get 'logoImage'(){return _0x22c998;},set 'logoSize'(_0x53dddd){_0x5379fc=_0x53dddd;},get 'logoSize'(){return _0x5379fc;}};function _0x146b8b(_0x3bec27={}){const _0x541c6=_0x43bf95;return _0x471942?Promise[_0x541c6(0x509)]():new Promise(_0x3f7280=>{const _0x2b06b7=_0x541c6;_0x3bec27[_0x2b06b7(0x76e)]&&(this[_0x2b06b7(0x3e4)][_0x2b06b7(0x76e)]=_0x3bec27[_0x2b06b7(0x76e)]),_0x3bec27[_0x2b06b7(0x3b5)]&&(_0x39b03d(_0x3bec27[_0x2b06b7(0x3b5)]),_0x5ae98d(_0x2b06b7(0x3b5),_0x3bec27[_0x2b06b7(0x3b5)])),_0x3bec27[_0x2b06b7(0x1e5)]&&_0x5ae98d(_0x2b06b7(0x1e5),_0x3bec27[_0x2b06b7(0x1e5)]),_0x3bec27['accessToken']&&(this['config']['accessToken']=_0x3bec27[_0x2b06b7(0x978)]),_0x3bec27[_0x2b06b7(0x341)]&&(this['config'][_0x2b06b7(0x341)]=_0x3bec27[_0x2b06b7(0x341)]),_0x3bec27[_0x2b06b7(0x6a8)]&&(this[_0x2b06b7(0x3e4)][_0x2b06b7(0x6a8)]=_0x3bec27[_0x2b06b7(0x6a8)]),_0x471942=!0x0,_0x4f6200(_0x2b06b7(0x7f3),!0x0),_0x4f6200(_0x2b06b7(0x76e),this[_0x2b06b7(0x3e4)][_0x2b06b7(0x76e)]),_0x501d11(this[_0x2b06b7(0x3e4)][_0x2b06b7(0x978)])?(_0x4f6200(_0x2b06b7(0x911),!0x0),_0x4f6200(_0x2b06b7(0x341),this[_0x2b06b7(0x3e4)]['logoImage']),_0x4f6200(_0x2b06b7(0x6a8),this[_0x2b06b7(0x3e4)][_0x2b06b7(0x6a8)])):_0xce134e&&_0xce134e(),_0x3f7280();})['catch'](_0x531752=>{const _0xd24b84=_0x541c6;throw new Error(_0x531752[_0xd24b84(0x8c6)]);});}function _0xce134e(){const _0x2bfb41=_0x43bf95;console[_0x2bfb41(0x90d)](),console[_0x2bfb41(0x7e6)](_0x2bfb41(0x1f7),_0x2bfb41(0x443),_0x2bfb41(0x835),'font-size:12px;color:#0865ba');}var _0x55b01a=_0x43bf95(0xa20);return _0xbb775c(_0x1b64d5);})());
|
|